@snf/qa-bot-core 0.3.2 β†’ 0.4.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.
@@ -1,9 +1,9 @@
1
- import*as e from"react";import t,{forwardRef as n,createContext as r,useContext as A,useCallback as o,useRef as i,useState as l,useEffect as a,useMemo as s,isValidElement as c,Fragment as u,createElement as d,useImperativeHandle as f}from"react";import p from"react-dom/client";import{jsx as g,jsxs as h,Fragment as m}from"react/jsx-runtime";import v from"react-dom/server";import{createPortal as y}from"react-dom";function w(){return w=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},w.apply(null,arguments)}function b(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var A=0;for(r=Object.getOwnPropertySymbols(e);A<r.length;A++)t.indexOf(r[A])<0&&Object.prototype.propertyIsEnumerable.call(e,r[A])&&(n[r[A]]=e[r[A]])}return n}"function"==typeof SuppressedError&&SuppressedError;const E={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"},P="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",B=n((t,n)=>e.createElement("svg",{viewBox:"0 0 637 637",ref:n,...t},e.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"}),e.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"}))),D=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),C=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),x=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),k=n((t,n)=>e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:n,...t},e.createElement("g",{strokeLinecap:"round",strokeWidth:10},e.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),S=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),T=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),I=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),Q=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),M=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),O=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),L={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:B},header:{title:g("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:P,buttons:[E.NOTIFICATION_BUTTON,E.AUDIO_BUTTON,E.CLOSE_CHAT_BUTTON],closeChatIcon:k},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:C,iconDisabled:x,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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OAPT/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:M,iconDisabled:O},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:S,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[E.VOICE_MESSAGE_BUTTON,E.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:P,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:T,iconDisabled:I},footer:{text:h("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[g("span",{children:"Powered By "},0),g("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:g(B,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),g("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[E.FILE_ATTACHMENT_BUTTON,E.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:D,iconDisabled:D,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Q,iconDisabled:Q,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}},N=r({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),H=()=>A(N),R=({children:e,settings:t=L,setSyncedSettings:n,syncedSettingsRef:r})=>g(N.Provider,{value:{settings:t,setSyncedSettings:n,syncedSettingsRef:r},children:e}),F={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:{}},U=r({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),j=()=>A(U),z=({children:e,styles:t=F,setSyncedStyles:n,syncedStylesRef:r})=>g(U.Provider,{value:{styles:t,setSyncedStyles:n,syncedStylesRef:r},children:e}),_=({buttons:e})=>{var t,n,r,A,o,i,l;const{settings:a}=H(),{styles:s}=j(),d={backgroundImage:`linear-gradient(to right, ${null==(t=a.general)?void 0:t.secondaryColor},\n\t\t\t${null==(n=a.general)?void 0:n.primaryColor})`,...s.headerStyle};return h("div",{style:d,className:"rcb-chat-header-container",children:[h("div",{className:"rcb-chat-header",children:[(null==(r=a.header)?void 0:r.showAvatar)&&g("div",{style:{backgroundImage:`url("${null==(A=a.header)?void 0:A.avatar}")`},className:"rcb-bot-avatar"}),c(null==(o=a.header)?void 0:o.title)?null==(i=a.header)?void 0:i.title:g("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:null==(l=a.header)?void 0:l.title})]}),g("div",{className:"rcb-chat-header",children:null==e?void 0:e.map((e,t)=>g(u,{children:e},t))})]})},q=r({}),G=()=>A(q),Y=({children:e,botIdRef:t,flowRef:n})=>{const r=i(null),A=i(""),o=i(null),l=i(new Map),a=i(null),s=i(""),c=i(!1),u=i(null),d=i(null),f=i(null);return g(q.Provider,{value:{botIdRef:t,flowRef:n,inputRef:r,timeoutIdRef:o,streamMessageMap:l,chatBodyRef:a,paramsInputRef:s,keepVoiceOnRef:c,audioContextRef:u,audioBufferRef:d,gainNodeRef:f,prevInputRef:A},children:e})},W=e=>{const[t,n]=l(e),r=i(e);return[t,e=>{const t="function"==typeof e?e(r.current):e;r.current=t,n(t)},r]},V=r({}),X=()=>A(V),K=({children:e,settings:t})=>{var n,r,A,o,i,a;const[s,c,u]=W(!1),[d,f,p]=W((null==(n=null==t?void 0:t.chatWindow)?void 0:n.defaultOpen)??!1),[h,m,v]=W((null==(r=null==t?void 0:t.audio)?void 0:r.defaultToggledOn)??!1),[y,w,b]=W((null==(A=null==t?void 0:t.voice)?void 0:A.defaultToggledOn)??!1),[E,P,B]=W((null==(o=null==t?void 0:t.notification)?void 0:o.defaultToggledOn)??!0),[D,C]=l(!1),[x,k]=l(!1),[S,T,I]=W(!1),[Q,M,O]=W(!0),[L,N,H]=W(!1),[R,F]=l(!1),[U,j]=l(!1),[z,_]=l(0),[q,G]=l(0),[Y,X]=l(!1),[K,J]=l((null==(i=window.visualViewport)?void 0:i.height)??window.innerHeight),[Z,$]=l((null==(a=window.visualViewport)?void 0:a.width)??window.innerWidth);return g(V.Provider,{value:{isBotTyping:s,setSyncedIsBotTyping:c,syncedIsBotTypingRef:u,isChatWindowOpen:d,setSyncedIsChatWindowOpen:f,syncedIsChatWindowOpenRef:p,audioToggledOn:h,setSyncedAudioToggledOn:m,syncedAudioToggledOnRef:v,voiceToggledOn:y,setSyncedVoiceToggledOn:w,syncedVoiceToggledOnRef:b,notificationsToggledOn:E,setSyncedNotificationsToggledOn:P,syncedNotificationsToggledOnRef:B,isLoadingChatHistory:D,setIsLoadingChatHistory:C,hasChatHistoryLoaded:x,setHasChatHistoryLoaded:k,isScrolling:S,setSyncedIsScrolling:T,syncedIsScrollingRef:I,textAreaDisabled:Q,setSyncedTextAreaDisabled:M,syncedTextAreaDisabledRef:O,textAreaSensitiveMode:L,setSyncedTextAreaSensitiveMode:N,syncedTextAreaSensitiveModeRef:H,hasInteractedPage:R,setHasInteractedPage:F,hasFlowStarted:U,setHasFlowStarted:j,unreadCount:z,setUnreadCount:_,inputLength:q,setInputLength:G,blockAllowsAttachment:Y,setBlockAllowsAttachment:X,viewportHeight:K,setViewportHeight:J,viewportWidth:Z,setViewportWidth:$},children:e})};var J=(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))(J||{});const Z={[J.START_SPEAK_AUDIO]:!0,[J.TOGGLE_AUDIO]:!0,[J.TOGGLE_VOICE]:!0,[J.TOGGLE_NOTIFICATIONS]:!0,[J.TOGGLE_CHAT_WINDOW]:!0,[J.PRE_INJECT_MESSAGE]:!0,[J.POST_INJECT_MESSAGE]:!1,[J.PRE_LOAD_CHATBOT]:!0,[J.POST_LOAD_CHATBOT]:!1,[J.START_SIMULATE_STREAM_MESSAGE]:!0,[J.STOP_SIMULATE_STREAM_MESSAGE]:!1,[J.START_STREAM_MESSAGE]:!0,[J.CHUNK_STREAM_MESSAGE]:!0,[J.STOP_STREAM_MESSAGE]:!0,[J.REMOVE_MESSAGE]:!0,[J.SAVE_CHAT_HISTORY]:!0,[J.LOAD_CHAT_HISTORY]:!0,[J.CHANGE_PATH]:!0,[J.SHOW_TOAST]:!0,[J.DISMISS_TOAST]:!0,[J.USER_SUBMIT_TEXT]:!0,[J.USER_UPLOAD_FILE]:!0,[J.TEXT_AREA_CHANGE_VALUE]:!0,[J.PRE_PROCESS_BLOCK]:!0,[J.POST_PROCESS_BLOCK]:!0},$=async(e,t,n)=>{const r=new CustomEvent(e,{detail:t,cancelable:Z[e]});return r.data=n,r.promises=[],window.dispatchEvent(r),await Promise.all(r.promises),r},ee=r({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),te=()=>A(ee),ne=({children:e})=>{const[t,n,r]=W([]);return g(ee.Provider,{value:{paths:t,setSyncedPaths:n,syncedPathsRef:r},children:e})},re=()=>{const{botIdRef:e}=G(),{syncedPathsRef:t}=te(),n=o(()=>t.current.length>0?t.current.at(-1)??null:null,[]),r=o(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:o(async(t,A)=>{const o={botId:e.current,currPath:n(),prevPath:r()};return await $(t,o,A)},[e])}},Ae=()=>{const{settings:e}=H(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,viewportHeight:r,setViewportHeight:A,viewportWidth:i,setViewportWidth:l,setUnreadCount:a,setSyncedIsBotTyping:s,setSyncedIsScrolling:c,syncedIsBotTypingRef:u,syncedIsChatWindowOpenRef:d}=X(),{chatBodyRef:f}=G(),{dispatchRcbEvent:p}=re(),g=o(()=>{if(!f.current)return!1;const e=f.current.getBoundingClientRect(),t=window.innerHeight??document.documentElement.clientHeight,n=window.innerWidth??document.documentElement.clientWidth;return e.top>=0&&e.left>=0&&e.bottom<=t&&e.right<=n},[f]),h=o(async t=>{var r;t!==d.current&&(null!=(r=e.event)&&r.rcbToggleChatWindow&&(await p(J.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||n(e=>(e||a(0),!e)))},[d]),m=o(async e=>{e!==u.current&&s(e=>!e)},[u]),v=o((e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t,[]),y=o((e=0)=>{if(!f.current)return;const t=f.current.scrollHeight-f.current.clientHeight;if(e<=0)return f.current.scrollTop=t,void c(!1);const n=f.current.scrollTop,r=t-n;let A=0;const o=()=>{if(!f.current)return;A+=20;const t=v(A,n,r,e);f.current.scrollTop=t,A<e?requestAnimationFrame(o):c(!1)};o()},[f]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,toggleChatWindow:h,viewportHeight:r,setViewportHeight:A,viewportWidth:i,setViewportWidth:l,toggleIsBotTyping:m,scrollToBottom:y,getIsChatBotVisible:g}},oe=()=>{var e,t,n;const{settings:r}=H(),{styles:A}=j(),{unreadCount:o,isScrolling:i}=X(),{chatBodyRef:a}=G(),{scrollToBottom:s}=Ae(),[c,u]=l(!1),d={color:null==(e=r.general)?void 0:e.primaryColor,borderColor:null==(t=r.general)?void 0:t.primaryColor,...A.chatMessagePromptHoveredStyle};return g("div",{className:"rcb-message-prompt-container "+(a.current&&(null==(f=r.chatWindow)?void 0:f.showMessagePrompt)&&i&&o>0?"visible":"hidden"),children:g("div",{onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},style:c?d:{...A.chatMessagePromptStyle},onMouseDown:e=>{e.preventDefault(),s(600)},className:"rcb-message-prompt-text",children:null==(n=r.chatWindow)?void 0:n.messagePromptText})});var f},ie=r({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),le=()=>A(ie),ae=({children:e})=>{const[t,n,r]=W([]);return g(ie.Provider,{value:{messages:t,setSyncedMessages:n,syncedMessagesRef:r},children:e})},se=({message:e,isNewSender:t})=>{var n,r,A,o,i,l;const{settings:a}=H(),{styles:s}=j(),c="string"==typeof e.content,u=e.content,d=e.contentWrapper?g(e.contentWrapper,{children:u}):u,f={backgroundColor:null==(n=a.general)?void 0:n.primaryColor,color:"#fff",maxWidth:null!=(r=a.userBubble)&&r.showAvatar?"65%":"70%",...s.userBubbleStyle},p=null!=(A=a.userBubble)&&A.animate?"rcb-user-message-entry":"",v=(null==(o=a.userBubble)?void 0:o.showAvatar)&&t,y="rcb-user-message"+(!t&&null!=(i=a.userBubble)&&i.showAvatar?" rcb-user-message-offset":"");return h("div",{className:"rcb-user-message-container",children:[c?g("div",{style:f,className:`${y} ${p}`,children:d}):g(m,{children:d}),v&&g("div",{style:{backgroundImage:`url("${null==(l=a.userBubble)?void 0:l.avatar}")`},className:"rcb-message-user-avatar"})]})},ce=({message:e,isNewSender:t})=>{var n,r,A,o,i,l;const{settings:a}=H(),{styles:s}=j(),c="string"==typeof e.content,u=e.content,d=e.contentWrapper?g(e.contentWrapper,{children:u}):u,f={backgroundColor:null==(n=a.general)?void 0:n.secondaryColor,color:"#fff",maxWidth:null!=(r=a.botBubble)&&r.showAvatar?"65%":"70%",...s.botBubbleStyle},p=null!=(A=a.botBubble)&&A.animate?"rcb-bot-message-entry":"",v=(null==(o=a.botBubble)?void 0:o.showAvatar)&&t,y="rcb-bot-message"+(!t&&null!=(i=a.botBubble)&&i.showAvatar?" rcb-bot-message-offset":"");return h("div",{className:"rcb-bot-message-container",children:[v&&g("div",{style:{backgroundImage:`url("${null==(l=a.botBubble)?void 0:l.avatar}")`},className:"rcb-message-bot-avatar"}),c?g("div",{style:f,className:`${y} ${p}`,children:d}):g(m,{children:d})]})},ue=()=>{var e,t,n;const{settings:r}=H(),{styles:A}=j(),o=null!=(e=r.botBubble)&&e.animate?"rcb-bot-message-entry":"";return h("div",{className:"rcb-bot-message-container",children:[(null==(t=r.botBubble)?void 0:t.showAvatar)&&g("div",{style:{backgroundImage:`url("${null==(n=r.botBubble)?void 0:n.avatar}")`},className:"rcb-message-bot-avatar"}),g("div",{onMouseDown:e=>{e.preventDefault()},className:`rcb-bot-message ${o}`,children:h("div",{className:"rcb-typing-indicator",style:{...null==A?void 0:A.rcbTypingIndicatorContainerStyle},children:[g("span",{className:"rcb-dot",style:{...null==A?void 0:A.rcbTypingIndicatorDotStyle}}),g("span",{className:"rcb-dot",style:{...null==A?void 0:A.rcbTypingIndicatorDotStyle}}),g("span",{className:"rcb-dot",style:{...null==A?void 0:A.rcbTypingIndicatorDotStyle}})]})})]})},de=()=>{var e,t,n;const{settings:r}=H(),{styles:A}=j(),{messages:o}=le(),{scrollToBottom:i}=Ae(),{isBotTyping:l,syncedIsScrollingRef:s}=X(),{chatBodyRef:c}=G(),u={...null==A?void 0:A.bodyStyle,scrollbarWidth:null!=(e=r.chatWindow)&&e.showScrollbar?"auto":"none"};a(()=>{s.current||i()},[null==(t=c.current)?void 0:t.scrollHeight]);return h("div",{style:u,className:"rcb-chat-body-container",ref:c,children:[o.map((e,t)=>{const n=(e=>0===e||o[e].sender!==o[e-1].sender)(t);return"USER"===e.sender.toUpperCase()?g(se,{message:e,isNewSender:n},t):"BOT"===e.sender.toUpperCase()?g(ce,{message:e,isNewSender:n},t):g("div",{children:e.content},t)}),l&&(null==(n=r.chatWindow)?void 0:n.showTypingIndicator)&&g(ue,{}),g(oe,{})]})},fe=({checkboxes:e,checkedItems:t,path:n})=>{var r,A,o,i,s,c,u,d,f,p,m;const{settings:v}=H(),{styles:y}=j(),{paths:w}=te(),{handleSubmitText:b}=dt(),[E,P]=l(new Set),[B,D]=l(!1),C={cursor:B?`url("${null==(r=v.general)?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:null==(A=v.general)?void 0:A.primaryColor,borderColor:null==(o=v.general)?void 0:o.primaryColor,...y.botCheckboxRowStyle},x={cursor:B||E.size<e.min?`url("${null==(i=v.general)?void 0:i.actionDisabledIcon}"), auto`:"pointer",color:null==(s=v.general)?void 0:s.primaryColor,borderColor:null==(c=v.general)?void 0:c.primaryColor,...y.botCheckboxNextStyle},k={cursor:B?`url("${null==(u=v.general)?void 0:u.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...y.botCheckMarkStyle},S={cursor:B?`url("${null==(d=v.general)?void 0:d.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:null==(f=v.general)?void 0:f.primaryColor,backgroundColor:null==(p=v.general)?void 0:p.primaryColor,...y.botCheckMarkSelectedStyle};a(()=>{w.length>0&&w[w.length-1]!==n&&D(!e.reusable)},[w]);return h("div",{className:"rcb-checkbox-container "+(null!=(m=v.botBubble)&&m.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(n=>g("div",{onMouseDown:r=>{r.preventDefault(),(n=>{B||P(r=>{const A=new Set(r);if(A.has(n))t.delete(n),A.delete(n);else{if(E.size==e.max)return r;t.add(n),A.add(n)}return A})})(n)},style:C,className:"rcb-checkbox-row-container",children:h("div",{className:"rcb-checkbox-row",children:[g("div",{style:E.has(n)?S:k,className:"rcb-checkbox-mark"}),g("div",{className:"rcb-checkbox-label",children:n})]})},n)),g("div",{style:x,className:"rcb-checkbox-next-button",onMouseDown:n=>{var r;if(n.preventDefault(),B||E.size<e.min)return;const A=Array.from(t).join(", ");let o;D(!e.reusable),o=null!=e.sendOutput?e.sendOutput:(null==(r=v.chatInput)?void 0:r.sendCheckboxOutput)??!0,b(A,o)}})]})},pe=async(e,t)=>{const n=e.checkboxes;if(!n)return;let r;if("function"==typeof n?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||0==r.items.length)return;null==r.min&&(r.min=1),null==r.max&&(r.max=r.items.length),r.min>r.max&&(r.min=r.max),null==r.reusable&&(r.reusable=!1);const A=new Set,o=t.currPath,i=g(fe,{checkboxes:r,checkedItems:A,path:o});await t.injectMessage(i)},ge=async(e,t)=>{const n=e.function;if(!n)return;const r=n(t);return r instanceof Promise?await r:r},he=async(e,t,n)=>{const r=e.message;if(!r)return;if("string"==typeof r)return void(""!==r.trim()&&(n?await t.simulateStreamMessage(r):await t.injectMessage(r)));let A=r(t);A instanceof Promise&&(A=await A),"string"==typeof A&&""!==A.trim()&&(n?await t.simulateStreamMessage(A):await t.injectMessage(A))},me=({options:e,path:t})=>{var n,r,A,o,i,s;const{settings:c}=H(),{styles:u}=j(),{paths:d}=te(),{handleSubmitText:f}=dt(),[p,h]=l([]),[m,v]=l(!1),y={cursor:m?`url("${null==(n=c.general)?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:null==(r=c.general)?void 0:r.primaryColor,borderColor:null==(A=c.general)?void 0:A.primaryColor,backgroundColor:"#fff",...u.botOptionStyle},w={color:"#fff",borderColor:null==(o=c.general)?void 0:o.primaryColor,backgroundColor:null==(i=c.general)?void 0:i.primaryColor,...u.botOptionHoveredStyle};a(()=>{d.length>0&&d[d.length-1]!==t&&v(!e.reusable)},[d]);return g("div",{className:"rcb-options-container "+(null!=(s=c.botBubble)&&s.showAvatar?"rcb-options-offset":""),children:e.items.map((t,n)=>{const r=p[n]&&!m;return g("div",{className:"rcb-options",style:r?w:y,onMouseEnter:()=>(e=>{h(t=>{const n=[...t];return n[e]=!0,n})})(n),onMouseLeave:()=>(e=>{h(t=>{const n=[...t];return n[e]=!1,n})})(n),onMouseDown:n=>{var r;if(n.preventDefault(),m)return;let A;v(!e.reusable),A=null!=e.sendOutput?e.sendOutput:(null==(r=c.chatInput)?void 0:r.sendOptionOutput)??!0,f(t,A)},children:t},t)})})},ve=async(e,t)=>{const n=e.options;if(!n)return;let r;if("function"==typeof n?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||0==r.items.length)return;null==r.reusable&&(r.reusable=!1);const A=t.currPath,o=g(me,{options:r,path:A});await t.injectMessage(o)},ye=async(e,t)=>{const n=e.component;if(n){if("function"==typeof n){let e=n(t);if(e instanceof Promise&&(e=await e),!e)return;return void await t.injectMessage(e)}await t.injectMessage(n)}},we=async(e,t,n,r)=>{const A=e.transition;let o;if("function"==typeof A?(o=A(t),o instanceof Promise&&(o=await o)):o=A,"number"==typeof o&&(o={duration:o}),!o||o instanceof Promise||null==o.duration||"number"!=typeof o.duration)return;null==o.interruptable&&(o.interruptable=!1);const i=setTimeout(async()=>{const n=await r(e);n&&await Pe(n,t)},o.duration);o.interruptable&&(n.current=i)},be=async(e,t,n)=>{const r=e.chatDisabled;if(null==r)return;let A;"function"==typeof r?(A=r(t),A instanceof Promise&&(A=await A)):A=r,n(A)},Ee=async(e,t,n)=>{const r=e.isSensitive;if(!r)return void n(!1);let A;"function"==typeof r?(A=r(t),A instanceof Promise&&(A=await A)):A=r,n(A)},Pe=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const n=Object.keys(e);for(const r of n)"function"===r&&await ge(e,t);n.includes("path")&&await(async(e,t)=>{const n=e.path;if(!n)return!1;if("string"==typeof n)return await t.goToPath(n),!0;let r=n(t);if(r instanceof Promise&&(r=await r),!r)return!1;const A=r;return await t.goToPath(A),!0})(e,t)},Be=()=>{var e;const{settings:t}=H(),{styles:n}=j();return g("div",{className:"rcb-line-break-container",children:g("div",{style:{...n.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:null==(e=t.chatHistory)?void 0:e.chatHistoryLineBreakText})})},De=()=>{var e;const{settings:t}=H(),{styles:n}=j(),r={borderTop:`4px solid ${null==(e=t.general)?void 0:e.primaryColor}`,...n.loadingSpinnerStyle};return g("div",{className:"rcb-spinner-container",children:g("div",{style:r,className:"rcb-spinner"})})},Ce=()=>{try{if(typeof crypto<"u"&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&"function"==typeof crypto.getRandomValues)return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=crypto.getRandomValues(new Uint8Array(1))[0]%16;return("x"===e?t:3&t|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},xe=(e,t)=>({id:Ce(),content:e,sender:t,type:"string"==typeof e?"string":"object",timestamp:(new Date).toUTCString(),tags:[]});let ke,Se=!1,Te="rcb-history",Ie=30,Qe=!1,Me=[];const Oe=()=>Me,Le=e=>{Ne(e),Me=e},Ne=e=>{ke&&ke.setItem(Te,JSON.stringify(e))},He=e=>{var t,n,r,A,o;ke="SESSION_STORAGE"===(null==(n=null==(t=e.chatHistory)?void 0:t.storageType)?void 0:n.toUpperCase())?sessionStorage:localStorage,Te=null==(r=e.chatHistory)?void 0:r.storageKey,Ie=null==(A=e.chatHistory)?void 0:A.maxEntries,Qe=null==(o=e.chatHistory)?void 0:o.disabled,Me=(e=>{if(null!=e)try{return JSON.parse(e)}catch{return[]}return[]})(ke.getItem(Te))},Re=e=>c(e.content)?structuredClone({id:e.id,content:v.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,Fe=(e,t,n)=>{const r=(new DOMParser).parseFromString(e,"text/html");return Array.from(r.body.childNodes).map((e,r)=>{var A;if(e.nodeType===Node.TEXT_NODE)return e.textContent;{const o=e.tagName.toLowerCase();let i=Array.from(e.attributes).reduce((e,t)=>{const n=t.name.toLowerCase();if("style"===n){const r=t.value.split(";").filter(e=>""!==e.trim()),A={};r.forEach(e=>{const[t,n]=e.split(":").map(e=>e.trim()),r=t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());A[r]=n}),e[n]=A}else"audio"!==o&&"video"!==o||"controls"!==n||""!==t.value?e[n]=t.value:e[n]="true";return e},{});if(Object.prototype.hasOwnProperty.call(i,"class")){const r=e.classList;i.className=r.toString(),delete i.class,null!=(A=t.botBubble)&&A.showAvatar&&(i=Ue(r,i)),i=je(r,i,t,n),i=ze(r,i,t,n),i=_e(r,i,t,n),i=qe(r,i,t,n)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(o))return d(o,{key:r,...i});{const A=Fe(e.innerHTML,t,n);return d(o,{key:r,...i},...A)}}})},Ue=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),je=(e,t,n,r)=>{var A,o,i,l,a;return e.contains("rcb-options")&&(t.style={...t.style,color:(null==(A=r.botOptionStyle)?void 0:A.color)??(null==(o=n.general)?void 0:o.primaryColor),borderColor:(null==(i=r.botOptionStyle)?void 0:i.color)??(null==(l=n.general)?void 0:l.primaryColor),cursor:`url("${null==(a=n.general)?void 0:a.actionDisabledIcon}"), auto`,...r.botOptionStyle}),t},ze=(e,t,n,r)=>{var A,o,i,l,a;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:(null==(A=r.botCheckboxRowStyle)?void 0:A.color)??(null==(o=n.general)?void 0:o.primaryColor),borderColor:(null==(i=r.botCheckboxRowStyle)?void 0:i.color)??(null==(l=n.general)?void 0:l.primaryColor),cursor:`url("${null==(a=n.general)?void 0:a.actionDisabledIcon}"), auto`,...r.botCheckboxRowStyle}),t},_e=(e,t,n,r)=>{var A,o,i,l,a;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:(null==(A=r.botCheckboxNextStyle)?void 0:A.color)??(null==(o=n.general)?void 0:o.primaryColor),borderColor:(null==(i=r.botCheckboxNextStyle)?void 0:i.color)??(null==(l=n.general)?void 0:l.primaryColor),cursor:`url("${null==(a=n.general)?void 0:a.actionDisabledIcon}"), auto`,...r.botCheckboxNextStyle}),t},qe=(e,t,n,r)=>{var A,o;return(e.contains("rcb-media-display-image-container")||e.contains("rcb-media-display-video-container"))&&(t.style={...t.style,backgroundColor:null==(A=n.general)?void 0:A.primaryColor,maxWidth:null!=(o=n.userBubble)&&o.showAvatar?"65%":"70%",...r.mediaDisplayContainerStyle}),t},Ge=()=>{const{settings:e}=H(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:n,hasInteractedPage:r,unreadCount:A,setUnreadCount:i,syncedNotificationsToggledOnRef:l}=X(),{audioBufferRef:a,audioContextRef:s,gainNodeRef:c}=G(),{dispatchRcbEvent:u}=re(),d=o(async()=>{var t,n;const r=null==(t=e.notification)?void 0:t.sound;s.current=new AudioContext;const A=s.current.createGain();let o;if(A.gain.value=(null==(n=e.notification)?void 0:n.volume)??.2,c.current=A,null!=r&&r.startsWith("data:audio")){const e=atob(r.split(",")[1]),t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);o=t}else o=await(await fetch(r)).arrayBuffer();a.current=await s.current.decodeAudioData(o)},[e.notification]),f=o(()=>{var t;if(null!=(t=e.notification)&&t.disabled||!l.current||!r||!s.current||!a.current)return;const n=s.current.createBufferSource();n.buffer=a.current,n.connect(c.current).connect(s.current.destination),n.start()},[e.notification,l,r,s,a,c]);return{unreadCount:A,setUnreadCount:i,notificationsToggledOn:t,toggleNotifications:o(async t=>{var r;t!==l.current&&(null!=(r=e.event)&&r.rcbToggleNotifications&&(await u(J.TOGGLE_NOTIFICATIONS,{currState:l.current,newState:!l.current})).defaultPrevented||n(e=>!e))},[l]),playNotificationSound:f,setUpNotifications:d}},Ye=(e,t)=>{var n,r,A,o;((e,t,n,r,A)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const o=new window.SpeechSynthesisUtterance;o.text=e,o.lang=t,o.rate=r,o.volume=A;let i=!1;for(const e of n){const t=window.speechSynthesis.getVoices().find(t=>t.name===e);if(t){o.voice=t,window.speechSynthesis.speak(o),i=!0;break}}i||window.speechSynthesis.speak(o)})(t,null==(n=e.audio)?void 0:n.language,null==(r=e.audio)?void 0:r.voiceNames,null==(A=e.audio)?void 0:A.rate,null==(o=e.audio)?void 0:o.volume)},We=()=>{const{settings:e}=H(),{audioToggledOn:t,setSyncedAudioToggledOn:n,syncedAudioToggledOnRef:r}=X(),{dispatchRcbEvent:A}=re(),i=o(async t=>{var o;t!==r.current&&(null!=(o=e.event)&&o.rcbToggleAudio&&(await A(J.TOGGLE_AUDIO,{currState:r.current,newState:!r.current})).defaultPrevented||n(e=>!e))},[r]),l=o(async t=>{var n,o;if(null!=(n=e.audio)&&n.disabled||!r.current)return;let i=t;if(null!=(o=e.event)&&o.rcbStartSpeakAudio){const e=await A(J.START_SPEAK_AUDIO,{textToRead:i});if(e.defaultPrevented)return;i=e.data.textToRead}Ye(e,i)},[e,r]);return{audioToggledOn:t,speakAudio:l,toggleAudio:i}},Ve=()=>{var e,t,n;const{settings:r}=H(),{messages:A,setSyncedMessages:i,syncedMessagesRef:l}=le(),{setSyncedIsBotTyping:a,setUnreadCount:s,syncedIsScrollingRef:c,syncedIsChatWindowOpenRef:u}=X(),{streamMessageMap:d,chatBodyRef:f,paramsInputRef:p}=G(),{scrollToBottom:g,getIsChatBotVisible:h}=Ae(),{dispatchRcbEvent:m}=re(),{speakAudio:v}=We(),{playNotificationSound:y}=Ge(),w=o(async e=>{var t,n;if(null!=(t=r.event)&&t.rcbSaveChatHistory){const t=await m(J.SAVE_CHAT_HISTORY,{messages:e});if(t.defaultPrevented)return;e=(null==(n=t.data)?void 0:n.messages)??e}await(async e=>{if(Qe||!ke)return;const t=[];for(let n=e.length-1;n>=0;n--){const r=e[n];if("SYSTEM"!==r.sender.toUpperCase()&&(""!==r.content&&t.unshift(r),t.length===Ie))break}let n=t.map(Re);if(!Se&&n.length<Ie){const e=Ie-n.length;n=[...Me.slice(-e),...n]}Ne(n)})(e)},[m,null==(e=r.event)?void 0:e.rcbSaveChatHistory]),b=o((e,t=!1)=>{var n,A;w(e);let o=!0;const i=e[e.length-1];if(!i)return;const l=i.sender.toUpperCase();"USER"===l&&(o=!1),null!=(n=r.general)&&n.embedded&&h()&&(o=!1),(u.current&&!c.current||t)&&(o=!1),o&&y(),!t&&("USER"!==l&&null!=(A=r.chatWindow)&&A.autoJumpToBottom||"USER"===l||!c.current)&&setTimeout(()=>g(),1)},[r,f,u,c,y,g,h]),E=o(async(e,t="BOT",n=null)=>{var A,o,d,f,g;if("string"!=typeof e)throw new Error("Content must be of type string to simulate stream.");t=t.toUpperCase();let h=xe(e,t);if(null!=(A=r.event)&&A.rcbStartSimulateStreamMessage){const e=await m(J.START_SIMULATE_STREAM_MESSAGE,{message:h});if(e.defaultPrevented)return null;n=e.data.simulateStreamChunker||n,h=e.data.message}a(!1);let y=30;y="BOT"===t?null==(o=r.botBubble)?void 0:o.streamSpeed:null==(d=r.userBubble)?void 0:d.streamSpeed;const E={...h,content:""};i(e=>[...e,E]),b(l.current);let P=h.content;n&&(P=n(P));let B=0;const D=P.length;"BOT"===h.sender.toUpperCase()&&(u.current||null!=(f=r.general)&&f.embedded)&&"string"==typeof h.content&&""!==h.content.trim()&&v(h.content);const C=new Promise(e=>{const t=setInterval(()=>{if(B>=D)return clearInterval(t),void e();i(e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if(t[e].id===E.id){const n=P[B];n&&(E.content+=n,t[e]=E),B++;break}return t})},y)});return(c.current||!u.current)&&s(e=>e+1),await C,w(l.current),null!=(g=r.event)&&g.rcbStopSimulateStreamMessage&&await m(J.STOP_SIMULATE_STREAM_MESSAGE,{message:h}),"USER"===t&&(p.current=e),h},[r,m,b,l,p,a,s,u,v]),P=o(async(e,t="BOT")=>{var n,A,o;t=t.toUpperCase();let a=xe(e,t);if(null!=(n=r.event)&&n.rcbPreInjectMessage){const e=await m(J.PRE_INJECT_MESSAGE,{message:a});if(e.defaultPrevented)return null;a=e.data.message}return"BOT"===a.sender.toUpperCase()&&(u.current||null!=(A=r.general)&&A.embedded)&&"string"==typeof a.content&&""!==a.content.trim()&&v(a.content),(c.current||!u.current)&&s(e=>e+1),null!=(o=r.event)&&o.rcbPostInjectMessage&&await m(J.POST_INJECT_MESSAGE,{message:a}),i(e=>[...e,a]),b(l.current),"USER"===t&&"string"==typeof e&&(p.current=e),a},[r,m,b,p,l,u,v,s]),B=o(async e=>{var t;let n=l.current.find(t=>t.id===e),A=null,o=!1;return n||(A=Oe(),n=A.find(t=>t.id===e),n&&(o=!0)),!n||null!=(t=r.event)&&t.rcbRemoveMessage&&(await m(J.REMOVE_MESSAGE,{message:n})).defaultPrevented?null:o?(A&&Le(A.filter(t=>t.id!==e)),n):(i(t=>t.filter(t=>t.id!==e)),b(l.current),s(e=>Math.max(e-1,0)),n)},[m,null==(t=r.event)?void 0:t.rcbRemoveMessage,b,l,s,Oe,Le]),D=o(async(e,t="BOT")=>{var n,A;if(t=t.toUpperCase(),!d.current.has(t)){const A=xe(e,t);return null!=(n=r.event)&&n.rcbStartStreamMessage&&(await m(J.START_STREAM_MESSAGE,{message:A})).defaultPrevented?null:(a(!1),i(e=>[...e,A]),b(l.current),d.current.set(t,A.id),(c.current||!u.current)&&s(e=>e+1),A)}const o={...xe(e,t),id:d.current.get(t)};return null!=(A=r.event)&&A.rcbChunkStreamMessage&&(await m(J.CHUNK_STREAM_MESSAGE,{message:o})).defaultPrevented?null:(i(e=>e.map(e=>e.id===o.id?o:e)),b(l.current,!0),o)},[m,r.event,b,l,a,s,d]),C=o(async(e="BOT")=>{var t;if(e=e.toUpperCase(),!d.current.has(e))return!0;const n=d.current.get(e);let A;for(let e=0;e<3;e++){const e=l.current.find(e=>e.id===n);e&&(A=e),await new Promise(e=>setTimeout(e,20))}return(null==(t=r.event)||!t.rcbStopStreamMessage||!(await m(J.STOP_STREAM_MESSAGE,{message:A})).defaultPrevented)&&(d.current.delete(e),w(l.current),"USER"===e&&"string"==typeof(null==A?void 0:A.content)&&(p.current=A.content),!0)},[m,null==(n=r.event)?void 0:n.rcbStopStreamMessage,d,p]),x=o(e=>{const t="function"==typeof e?e(l.current):e;i(t),b(t)},[b,l]),k=o((e,t,n=0)=>{var r;const A=l.current,o=e?e.toUpperCase():null,i=[];let a=n;for(let e=A.length-1;e>=0;e--){const n=A[e];if(!o||(null==(r=null==n?void 0:n.sender)?void 0:r.toUpperCase())===o){if(a>0){a--;continue}if(i.push(n),void 0!==t&&i.length===t)break}}return i.length>0?i:null},[l]);return{simulateStreamMessage:E,injectMessage:P,removeMessage:B,streamMessage:D,endStreamMessage:C,replaceMessages:x,getMessages:k,messages:A}};let Xe,Ke,Je,Ze=!1,$e=null;const et=()=>{if(!Xe){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Xe=null!=e?new e:null}return Xe},tt=(e,t,n,r,A,o)=>{var i,l,a;const s=et();if(!s)return;if(!Ze)try{Ze=!0,s.lang=null==(i=e.voice)?void 0:i.language,s.start()}catch{}const c=null==(l=e.voice)?void 0:l.timeoutPeriod,u=null==(a=e.voice)?void 0:a.autoSendPeriod;s.onresult=i=>{var l,a;clearTimeout(Ke),Ke=null,clearTimeout(Je);const s=i.results[i.results.length-1][0].transcript;if(o.current){const t=null==(l=e.chatInput)?void 0:l.characterLimit,n=o.current.value+s;null!=t&&t>=0&&n.length>t?r(n.slice(0,t)):r(n),A(o.current.value.length)}c&&(Ke=setTimeout(async()=>await At(t,o),c)),null!=(a=e.voice)&&a.autoSendDisabled||(Je=setTimeout(n,u))},s.onend=()=>{Ze?(s.start(),!Ke&&c&&(Ke=setTimeout(async()=>await At(t,o),c))):(clearTimeout(Ke),Ke=null,clearTimeout(Je))},c&&(Ke=setTimeout(async()=>await At(t,o),c))},nt=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(n=>{if($e=new MediaRecorder(n),!Ze)try{Ze=!0,$e.start()}catch{}$e.ondataavailable=e=>{t.current&&t.current.push(e.data)},$e.onstop=()=>{e(),n.getTracks().forEach(e=>e.stop())}}).catch(e=>{console.error("Unable to use microphone:",e)})},rt=()=>{const e=et();e&&(Ze=!1,e&&e.stop(),$e&&"inactive"!==$e.state&&($e.stop(),$e=null),clearTimeout(Ke),Ke=null,clearTimeout(Je))},At=async(e,t)=>{var n;null!=(n=t.current)&&n.disabled||await e(),rt()},ot=()=>{const{settings:e}=H(),{voiceToggledOn:t,setSyncedVoiceToggledOn:n,syncedVoiceToggledOnRef:r}=X(),{dispatchRcbEvent:A}=re(),i=o(async t=>{var o;t!==r.current&&(null!=(o=e.event)&&o.rcbToggleVoice&&(await A(J.TOGGLE_VOICE,{currState:r.current,newState:!r.current})).defaultPrevented||n(e=>!e))},[r]),l=o(t=>{((e,t)=>{var n,r,A;const o=et();null!=(n=t.voice)&&n.disabled||null==(r=t.chatInput)||!r.blockSpam||!o||(e&&!Ze?(Ze=!0,null!=(A=t.voice)&&A.sendAsAudio?null==$e||$e.start():o.start()):e||rt())})(t,e)},[e]);return{voiceToggledOn:t,toggleVoice:i,syncVoice:l}},it=()=>{var e;const{settings:t}=H(),{inputLength:n,setInputLength:r,textAreaDisabled:A,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:l,setSyncedTextAreaSensitiveMode:a,syncedTextAreaDisabledRef:s,syncedTextAreaSensitiveModeRef:c}=X(),{inputRef:u,chatBodyRef:d,prevInputRef:f}=G(),{dispatchRcbEvent:p}=re(),{getIsChatBotVisible:g}=Ae(),h=o(async e=>{var n,r,A;if(s.current&&u.current)u.current.value="";else if(u.current&&null!==f.current){const o=null==(n=t.chatInput)?void 0:n.characterLimit,i=(null==(r=t.chatInput)?void 0:r.allowNewline)?e:e.replace(/\n/g," ");if(null!=o&&o>=0&&i.length>o?u.current.value=i.slice(0,o):u.current.value=i,null!=(A=t.event)&&A.rcbTextAreaChangeValue&&(await p(J.TEXT_AREA_CHANGE_VALUE,{currValue:u.current.value,prevValue:f.current})).defaultPrevented)return void(u.current.value=f.current);f.current=u.current.value}},[s,u,f,t,p]),m=o(e=>{var n;null!=(n=u.current)&&n.disabled||setTimeout(()=>{var n,r,A;null!=(n=t.general)&&n.embedded?g()&&(null==(r=u.current)||r.focus()):"start"!==e&&(null==(A=u.current)||A.focus())},100)},[u,null==(e=t.general)?void 0:e.embedded,d,g]),v=o(()=>{u.current&&u.current.focus()},[]),y=o(()=>{u.current&&u.current.blur()},[]),w=o(()=>u&&u.current?u.current.value:"",[]),b=o(e=>{e!==s.current&&i(e=>!e)},[s]),E=o(e=>{e!==c.current&&a(e=>!e)},[c]);return{textAreaDisabled:A,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:l,setSyncedTextAreaSensitiveMode:a,inputLength:n,setInputLength:r,getTextAreaValue:w,setTextAreaValue:h,updateTextAreaFocus:m,focusTextArea:v,blurTextArea:y,toggleTextAreaDisabled:b,toggleTextAreaSensitiveMode:E}},lt=r({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),at=()=>A(lt),st=({children:e})=>{const[t,n,r]=W([]);return g(lt.Provider,{value:{toasts:t,setSyncedToasts:n,syncedToastsRef:r},children:e})},ct=()=>{const{settings:e}=H(),{toasts:t,setSyncedToasts:n,syncedToastsRef:r}=at(),{dispatchRcbEvent:A}=re(),i=o(async(t,o)=>{var i,l,a,s;let c=null;if(r.current.length>=((null==(i=e.toast)?void 0:i.maxCount)??3)){if(null!=(l=e.toast)&&l.forbidOnMax)return null;c=Ce();let r={id:c,content:t,timeout:o};if(null!=(a=e.event)&&a.rcbShowToast){const e=await A(J.SHOW_TOAST,{toast:r});if(e.defaultPrevented)return null;r=e.data.toast}return n(e=>[...e.slice(1),r]),c}c=Ce();let u={id:c,content:t,timeout:o};if(null!=(s=e.event)&&s.rcbShowToast){const e=await A(J.SHOW_TOAST,{toast:u});if(e.defaultPrevented)return null;u=e.data.toast}return n(e=>[...e,u]),c},[e,A]),l=o(async t=>{var o;const i=r.current.find(e=>e.id===t);return!i||null!=(o=e.event)&&o.rcbDismissToast&&(await A(J.DISMISS_TOAST,{toast:i})).defaultPrevented?null:(n(e=>e.filter(e=>e.id!==t)),t)},[A]),a=o(e=>{const t="function"==typeof e?e(r.current):e;n(t)},[r]);return{showToast:i,dismissToast:l,toasts:t,replaceToasts:a}},ut=()=>{var e,t,n,r,A;const{settings:i}=H(),{paths:l,setSyncedPaths:a,syncedPathsRef:s}=te(),{flowRef:c,streamMessageMap:u,paramsInputRef:d,keepVoiceOnRef:f,timeoutIdRef:p}=G(),{setSyncedIsBotTyping:g,setSyncedTextAreaDisabled:h,setSyncedTextAreaSensitiveMode:m,blockAllowsAttachment:v,setBlockAllowsAttachment:y}=X(),{dispatchRcbEvent:w}=re(),{endStreamMessage:b,injectMessage:E,removeMessage:P,simulateStreamMessage:B,streamMessage:D}=Ve(),{showToast:C,dismissToast:x}=ct(),{toggleChatWindow:k}=Ae(),{updateTextAreaFocus:S,setTextAreaValue:T}=it(),{syncVoice:I}=ot(),Q=o(async e=>{var t;if(null!=(t=i.event)&&t.rcbPostProcessBlock){const t=await w(J.POST_PROCESS_BLOCK,{block:e});if(t.defaultPrevented)return null;e=t.data.block}return e},[null==(e=i.event)?void 0:e.rcbPostProcessBlock,w]),M=o(async(e,t)=>{var n,r,A,o;if(!e)return;let l=c.current[e];if(!l)return void g(!1);if(null!=(n=i.event)&&n.rcbPreProcessBlock){const e=await w(J.PRE_PROCESS_BLOCK,{block:l});if(e.defaultPrevented)return;l=e.data.block}g(!0),null!=(r=i.chatInput)&&r.blockSpam&&h(!0),m(!1);const a={prevPath:t,currPath:e,goToPath:N,setTextAreaValue:T,userInput:d.current,endStreamMessage:b,injectMessage:E,removeMessage:P,simulateStreamMessage:B,streamMessage:D,toggleChatWindow:k,showToast:C,dismissToast:x};await(async(e,t,n,r,A,o,i)=>{if(!e)throw new Error("Block is not valid.");for(const l of Object.keys(e))switch(l){case"message":await he(e,t,n);break;case"options":await ve(e,t);break;case"checkboxes":await pe(e,t);break;case"component":await ye(e,t);break;case"chatDisabled":await be(e,t,A);break;case"isSensitive":await Ee(e,t,o);break;case"transition":await we(e,t,r,i)}})(l,a,(null==(A=i.botBubble)?void 0:A.simulateStream)??!1,p,h,m,Q),g(!1),"chatDisabled"in l||h(null==(o=i.chatInput)?void 0:o.disabled),"isSensitive"in l||m(!1),y("function"==typeof l.file),S(e),I(f.current&&!l.chatDisabled),e!==t&&u.current.clear()},[c,S,I,null==(t=i.botBubble)?void 0:t.simulateStream,null==(n=i.chatInput)?void 0:n.disabled,d,b,E,P,B,D,k,C,x,f,u]),O=o(()=>s.current.length>0?s.current.at(-1)??null:null,[]),L=o(()=>s.current.length>1?s.current.at(-2)??null:null,[]),N=o(async e=>{var t;const n=O(),r=L();return(null==(t=i.event)||!t.rcbChangePath||!(await w(J.CHANGE_PATH,{currPath:n,prevPath:r,nextPath:e})).defaultPrevented)&&(a(t=>[...t,e]),await M(e,n),!0)},[null==(r=i.chatInput)?void 0:r.blockSpam,null==(A=i.event)?void 0:A.rcbChangePath,M,w]),R=o(e=>{const t="function"==typeof e?e(s.current):e;a(t)},[s]);return{getCurrPath:O,getPrevPath:L,goToPath:N,blockAllowsAttachment:v,setBlockAllowsAttachment:y,paths:l,replacePaths:R,firePostProcessBlockEvent:Q}},dt=()=>{var e,t,n,r;const{settings:A}=H(),{endStreamMessage:i,injectMessage:l,removeMessage:a,simulateStreamMessage:s,streamMessage:c}=Ve(),{syncedPathsRef:u}=te(),{getCurrPath:d,getPrevPath:f,goToPath:p,firePostProcessBlockEvent:g}=ut(),{setSyncedTextAreaSensitiveMode:h,setSyncedTextAreaDisabled:m,setSyncedIsBotTyping:v,setBlockAllowsAttachment:y,setInputLength:w,syncedVoiceToggledOnRef:b,syncedTextAreaSensitiveModeRef:E}=X(),{flowRef:P,inputRef:B,keepVoiceOnRef:D,paramsInputRef:C,timeoutIdRef:x}=G(),{showToast:k,dismissToast:S}=ct(),{dispatchRcbEvent:T}=re(),{syncVoice:I}=ot(),{setTextAreaValue:Q}=it(),{toggleChatWindow:M}=Ae(),O=o(async e=>{var t,n,r,o,i,a;const c=d();if(c&&P.current[c]){if(E.current){if(null!=(t=null==A?void 0:A.sensitiveInput)&&t.hideInUserBubble)return;if(null!=(n=null==A?void 0:A.sensitiveInput)&&n.maskInUserBubble)return void(null!=(r=A.userBubble)&&r.simulateStream?await s("*".repeat((null==(o=A.sensitiveInput)?void 0:o.asterisksCount)??10),"USER"):await l("*".repeat((null==(i=A.sensitiveInput)?void 0:i.asterisksCount)??10),"USER"))}null!=(a=A.userBubble)&&a.simulateStream?await s(e,"USER"):await l(e,"USER")}},[P,d,A,l,s,E]),L=o(async(e,t=!0)=>{var n,r;if(""===(e=e.trim()))return;t&&await O(e),x.current&&clearTimeout(x.current),B.current&&(Q(""),w(0));const o=d();if(!o)return;let E=P.current[o];const T=await g(E);T&&(null!=(n=A.chatInput)&&n.blockSpam&&m(!0),D.current=b.current,I(!1),setTimeout(()=>{v(!0)},400),h(!1),setTimeout(async()=>{var e;const t={prevPath:f(),currPath:d(),goToPath:p,setTextAreaValue:Q,userInput:C.current,injectMessage:l,simulateStreamMessage:s,streamMessage:c,removeMessage:a,endStreamMessage:i,toggleChatWindow:M,showToast:k,dismissToast:S},n=u.current.length;await Pe(T,t),u.current.length===n&&(m("chatDisabled"in E?!!E.chatDisabled:!(null==(e=A.chatInput)||!e.disabled)),Ee(E,t,h),y("function"==typeof E.file),I(D.current),v(!1))},null==(r=A.chatInput)?void 0:r.botDelay))},[x,null==(e=A.chatInput)?void 0:e.blockSpam,null==(t=A.chatInput)?void 0:t.botDelay,null==(n=A.chatInput)?void 0:n.disabled,D,b,I,O,f,d,p,l,s,c,a,i,M,k,S,P]);return{handleSubmitText:o(async(e,t=!0)=>{var n,r;e=e??(null==(n=B.current)?void 0:n.value),!(null!=(r=A.event)&&r.rcbUserSubmitText&&(await T(J.USER_SUBMIT_TEXT,{inputText:e,sendInChat:t})).defaultPrevented||!d())&&L(e,t)},[T,d,L,B,null==(r=A.event)?void 0:r.rcbUserSubmitText])}},ft=()=>{var e;const{settings:t}=H();return s(()=>{var e;if(typeof window>"u"||!window.navigator)return!1;if(null==(e=t.device)||!e.applyMobileOptimizations)return!0;const n=navigator.userAgent,r=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n),A=window.innerWidth>=768;return r&&A},[null==(e=t.device)?void 0:e.applyMobileOptimizations])},pt=({buttons:e})=>{var t,n,r,A,o,i,a,s,c,d,f;const p=ft(),{settings:v}=H(),{styles:y}=j(),{textAreaDisabled:w,textAreaSensitiveMode:b,inputLength:E,hasFlowStarted:P,setHasFlowStarted:B,setInputLength:D}=X(),{inputRef:C}=G(),[x,k]=l(!1),[S,T]=l(!1),{handleSubmitText:I}=dt(),{setTextAreaValue:Q}=it(),M={boxSizing:p?"content-box":"border-box",...y.chatInputAreaStyle},O={outline:w?"":"none",boxShadow:w?"":`0 0 5px ${null==(t=v.general)?void 0:t.primaryColor}`,boxSizing:p?"content-box":"border-box",...y.chatInputAreaStyle,...y.chatInputAreaFocusedStyle},L={cursor:`url("${null==(n=v.general)?void 0:n.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:p?"content-box":"border-box",...y.chatInputAreaStyle,...y.chatInputAreaDisabledStyle},N={color:"#989898",...y.characterLimitStyle},R={color:"#ff0000",...y.characterLimitReachedStyle},F=w?null==(r=v.chatInput)?void 0:r.disabledPlaceholderText:null==(A=v.chatInput)?void 0:A.enabledPlaceholderText,U=()=>{w||k(!0)},z=()=>{k(!1)},_=()=>{T(!0)},q=()=>{T(!1)},Y=async e=>{var t;if(!S&&"Enter"===e.key){if(e.shiftKey)return void(null!=(t=v.chatInput)&&t.allowNewline||e.preventDefault());e.preventDefault(),await I()}},W=e=>{C.current&&(Q(e.target.value),D(C.current.value.length))};return h("div",{"aria-label":(null==(o=v.ariaLabel)?void 0:o.inputTextArea)??"input text area",role:"textbox",onMouseDown:e=>{var t;e.stopPropagation(),!P&&"ON_CHATBOT_INTERACT"===(null==(t=v.general)?void 0:t.flowStartTrigger)&&B(!0)},style:{...y.chatInputContainerStyle},className:"rcb-chat-input",children:[b&&null!=(i=v.sensitiveInput)&&i.maskInTextArea?g("input",{ref:C,type:"password",className:"rcb-chat-input-textarea",style:w?L:x?O:M,placeholder:F,onChange:W,onKeyDown:Y,onFocus:U,onBlur:z,onCompositionStart:_,onCompositionEnd:q}):g("textarea",{ref:C,style:w?L:x?O:M,rows:1,className:"rcb-chat-input-textarea",placeholder:F,onChange:W,onKeyDown:Y,onFocus:U,onBlur:z,onCompositionStart:_,onCompositionEnd:q}),h(m,{children:[null==e?void 0:e.map((e,t)=>g(u,{children:e},t)),(null==(a=v.chatInput)?void 0:a.showCharacterCount)&&null!=(null==(s=v.chatInput)?void 0:s.characterLimit)&&(null==(c=v.chatInput)?void 0:c.characterLimit)>0&&h("div",{className:"rcb-chat-input-char-counter",style:E>=(null==(d=v.chatInput)?void 0:d.characterLimit)?R:N,children:[E,"/",null==(f=v.chatInput)?void 0:f.characterLimit]})]})]})},gt=({buttons:e})=>{var t;const{settings:n}=H(),{styles:r}=j();return h("div",{"data-testid":"chatbot-footer-container",style:{...r.footerStyle},className:"rcb-chat-footer-container",children:[g("div",{className:"rcb-chat-footer",children:null==e?void 0:e.map((e,t)=>g(u,{children:e},t))}),g("span",{children:null==(t=n.footer)?void 0:t.text})]})},ht=()=>{var e,t,n,r,A,o,i;const{settings:a}=H(),{styles:s}=j(),{unreadCount:c}=X(),{isChatWindowOpen:u,toggleChatWindow:d}=Ae(),[f,p]=l(!1),v={backgroundImage:`linear-gradient(to right, ${null==(e=a.general)?void 0:e.secondaryColor},\n\t\t\t${null==(t=a.general)?void 0:t.primaryColor})`,...s.chatButtonStyle},y={transform:"scale(1.05)",...v,...s.chatButtonHoveredStyle},w={backgroundImage:`url(${null==(n=a.chatButton)?void 0:n.icon})`,fill:"#fff",width:75,height:75,...s.chatIconStyle};return g(m,{children:!(null!=(r=a.general)&&r.embedded)&&h("div",{"aria-label":(null==(A=a.ariaLabel)?void 0:A.chatButton)??"open chat",role:"button",style:f?y:v,className:"rcb-toggle-button "+(u?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)},onClick:()=>d(!0),children:[(()=>{var e;const t=null==(e=a.chatButton)?void 0:e.icon;return t&&"string"!=typeof t?t&&g("span",{className:"rcb-toggle-icon",children:g(t,{style:w})}):g("span",{className:"rcb-toggle-icon",style:w})})(),!(null!=(o=a.notification)&&o.disabled)&&(null==(i=a.notification)?void 0:i.showCount)&&g("span",{style:{...s.notificationBadgeStyle},className:"rcb-badge",children:c})]})})},mt=()=>{var e,t,n,r,A,o;const i=ft(),{settings:s}=H(),{styles:c}=j(),{chatBodyRef:u}=G(),{isChatWindowOpen:d,toggleChatWindow:f}=Ae(),[p,v]=l(!1),[y,w]=l(!1),[b,E]=l(0);a(()=>{var e,t,n;const r=null==(e=s.tooltip)?void 0:e.mode;if("ALWAYS"===r)if(i){let e;e=d?((null==(t=u.current)?void 0:t.offsetWidth)??375)-("number"==typeof(null==(n=c.chatButtonStyle)?void 0:n.width)?c.chatButtonStyle.width:75):0,E(e),v(!0)}else v(!d);else"NEVER"===r?v(!1):"START"===r?y?v(!1):(w(!0),v(!0)):"CLOSE"===r&&v(!d)},[d,i,y,null==(e=c.chatButtonStyle)?void 0:e.width,null==(t=s.tooltip)?void 0:t.mode]);const P={transform:`translateX(-${b}px)`,right:((null==(n=c.chatButtonStyle)?void 0:n.width)??75)+40,bottom:30,backgroundColor:null==(r=s.general)?void 0:r.secondaryColor,color:"#fff",...c.tooltipStyle},B={borderColor:`transparent transparent transparent ${P.backgroundColor}`};return g(m,{children:!(null!=(A=s.general)&&A.embedded)&&h("div",{"data-testid":"chat-tooltip",style:P,className:"rcb-chat-tooltip "+(p?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>f(!0),children:[g("span",{children:null==(o=s.tooltip)?void 0:o.text}),g("span",{className:"rcb-chat-tooltip-tail",style:B})]})})},vt=({id:e,content:t,timeout:n})=>{var r,A;const{settings:o}=H(),{styles:i}=j(),[s]=l({toastPromptStyle:{...i.toastPromptStyle},toastPromptHoveredStyle:{...i.toastPromptHoveredStyle}}),{dismissToast:c}=ct(),[u,d]=l(!1),f={color:null==(r=o.general)?void 0:r.primaryColor,borderColor:null==(A=o.general)?void 0:A.primaryColor,...s.toastPromptHoveredStyle};return a(()=>{if(n){const t=setTimeout(()=>{c(e)},n);return()=>clearTimeout(t)}},[e,c,n]),"string"==typeof t?g("div",{onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},style:u?f:s.toastPromptStyle,onMouseDown:async t=>{var n;null!=(n=o.toast)&&n.dismissOnClick&&(t.preventDefault(),await c(e))},className:"rcb-toast-prompt",children:t}):g(m,{children:t})},yt=()=>{var e,t,n,r,A,o,i,l,a,s,c,u;const{styles:d}=j(),{toasts:f}=at(),p={bottom:`calc(${"number"==typeof(null==(e=d.footerStyle)?void 0:e.height)?`${null==(t=d.footerStyle)?void 0:t.height}px`:(null==(n=d.footerStyle)?void 0:n.height)??"50px"} + ${"number"==typeof(null==(r=d.chatInputContainerStyle)?void 0:r.height)?`${null==(A=d.chatInputContainerStyle)?void 0:A.height}px`:(null==(o=d.chatInputContainerStyle)?void 0:o.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${"number"==typeof(null==(i=d.chatWindowStyle)?void 0:i.width)?`${null==(l=d.chatWindowStyle)?void 0:l.width}px`:(null==(a=d.chatWindowStyle)?void 0:a.width)??"375px"} / 2)`,maxWidth:`calc(${"number"==typeof(null==(s=d.chatWindowStyle)?void 0:s.width)?`${null==(c=d.chatWindowStyle)?void 0:c.width}px`:(null==(u=d.chatWindowStyle)?void 0:u.width)??"375px"} - 50px)`,...d.toastPromptContainerStyle};return g("div",{className:"rcb-toast-prompt-container",style:p,children:f.map(e=>g(vt,{id:e.id,content:e.content,timeout:e.timeout},e.id))})},wt=({file:e,fileType:t,fileUrl:n})=>{var r,A,o;const{settings:i}=H(),{styles:l}=j(),a={backgroundColor:null==(r=i.general)?void 0:r.primaryColor,maxWidth:null!=(A=i.userBubble)&&A.showAvatar?"65%":"70%",...l.mediaDisplayContainerStyle};return g(m,{children:n?h(m,{children:["image"===t&&n&&g("div",{style:a,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:g("img",{src:n,alt:"Image Display",className:"rcb-media-display-image"})}),"video"===t&&n&&g("div",{style:a,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:h("video",{controls:!0,className:"rcb-media-display-video",children:[g("source",{src:n,type:e.type}),"Your browser does not support the video tag."]})}),"audio"===t&&n&&h("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:null!=(o=i.userBubble)&&o.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[g("source",{src:n,type:e.type}),"Your browser does not support the audio tag."]})]}):g(m,{})})},bt=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((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(new Error("File reading failed")),r.readAsDataURL(e)})}}catch(e){return console.error(e),{fileType:null,fileUrl:null}}},Et=()=>{var e,t,n,r,A,o;const{settings:i}=H(),{styles:l}=j(),{injectMessage:a,simulateStreamMessage:s,streamMessage:c,removeMessage:u,endStreamMessage:d}=Ve(),{getCurrPath:f,getPrevPath:p,goToPath:m,blockAllowsAttachment:v}=ut(),{flowRef:y,inputRef:w}=G(),b=y.current,{showToast:E,dismissToast:P}=ct(),{dispatchRcbEvent:B}=re(),{toggleChatWindow:D}=Ae(),{setTextAreaValue:C}=it(),{handleSubmitText:x}=dt(),k={cursor:`url("${null==(e=i.general)?void 0:e.actionDisabledIcon}"), auto`,...l.fileAttachmentButtonStyle,...l.fileAttachmentButtonDisabledStyle},S={backgroundImage:`url(${null==(t=i.fileAttachment)?void 0:t.icon})`,fill:"#a6a6a6",...l.fileAttachmentIconStyle},T={backgroundImage:`url(${null==(n=i.fileAttachment)?void 0:n.icon})`,fill:"#a6a6a6",...l.fileAttachmentIconStyle,...l.fileAttachmentIconDisabledStyle};return h("label",{"aria-label":(null==(r=i.ariaLabel)?void 0:r.fileAttachmentButton)??"upload file",role:"button",className:v?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:v?{...l.fileAttachmentButtonStyle}:k,children:[g("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async e=>{var t,n,r,A;const o=e.target.files;if(!o)return;const l=Array.from(o);if(e.target.value="",null!=(t=i.event)&&t.rcbUserUploadFile&&(await B(J.USER_UPLOAD_FILE,{files:l})).defaultPrevented)return;const h=f();if(!h)return;const v=b[h];if(!v)return;const y=v.file;if(null!=y){const e=[];for(let t=0;t<l.length;t++){if(e.push(l[t].name),null==(n=i.fileAttachment)||!n.showMediaDisplay)continue;const r=await bt(l[t]);!r.fileType||!r.fileUrl||await a(g(wt,{file:l[t],fileType:r.fileType,fileUrl:r.fileUrl}),"USER")}await x("πŸ“„ "+e.join(", "),null==(r=i.fileAttachment)?void 0:r.sendFileName),await y({userInput:null==(A=w.current)?void 0:A.value,prevPath:p(),currPath:f(),goToPath:m,setTextAreaValue:C,injectMessage:a,simulateStreamMessage:s,streamMessage:c,removeMessage:u,endStreamMessage:d,toggleChatWindow:D,showToast:E,dismissToast:P,files:l})}},multiple:null==(A=i.fileAttachment)?void 0:A.multiple,accept:null==(o=i.fileAttachment)?void 0:o.accept,disabled:!v}),(()=>{var e,t;const n=v?null==(e=i.fileAttachment)?void 0:e.icon:null==(t=i.fileAttachment)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&g("span",{className:v?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:g(n,{style:v?S:T})}):g("span",{className:v?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:v?S:T})})()]})},Pt=()=>{var e,t,n,r,A,o;const{settings:s}=H(),{styles:c}=j(),{syncedTextAreaDisabledRef:u}=X(),{inputRef:d}=G(),{textAreaDisabled:f,setTextAreaValue:p}=it(),v=i(null),y=i(null),[w,b]=l(!1),E={cursor:`url("${null==(e=s.general)?void 0:e.actionDisabledIcon}"), auto`,...c.emojiButtonStyle,...c.emojiButtonDisabledStyle},P={backgroundImage:`url(${null==(t=s.emoji)?void 0:t.icon})`,fill:"#a6a6a6",...c.emojiIconStyle},B={backgroundImage:`url(${null==(n=s.emoji)?void 0:n.icon})`,fill:"#a6a6a6",...c.emojiIconStyle,...c.emojiIconDisabledStyle};a(()=>{const e=e=>{const t=e.composedPath();v.current&&!t.includes(v.current)&&y.current&&!t.includes(y.current)&&b(!1)},t=()=>{(()=>{if(v.current&&y.current){const e=y.current.getBoundingClientRect(),t=v.current.offsetHeight,n=e.top-t-8;v.current.style.left=`${e.left}px`,v.current.style.top=`${n}px`}})()};return document.addEventListener("mousedown",e),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t)}},[]);return h(m,{children:[g("div",{"aria-label":(null==(r=s.ariaLabel)?void 0:r.emojiButton)??"emoji picker",role:"button",ref:y,className:""+(f?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled"),style:f?E:{...c.emojiButtonStyle},onMouseDown:e=>{e.preventDefault(),u.current?b(!1):b(e=>!e)},children:(()=>{var e,t;const n=f?null==(e=s.emoji)?void 0:e.iconDisabled:null==(t=s.emoji)?void 0:t.icon;return n&&"string"!=typeof n?n&&g("span",{className:""+(f?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),children:g(n,{style:f?B:P})}):g("span",{className:""+(f?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),style:f?B:P})})()}),w&&g("div",{className:"rcb-emoji-button-popup",ref:v,children:null==(o=null==(A=s.emoji)?void 0:A.list)?void 0:o.map((e,t)=>g("span",{className:"rcb-emoji",onMouseDown:t=>((e,t)=>{e.preventDefault(),d.current&&(p(d.current.value+t),setTimeout(()=>{const e=d.current;if(e){e.focus();const t=e.value.length;e.setSelectionRange(t,t)}},50)),b(!1)})(t,e),children:e},t))})]})},Bt=()=>{var e,t,n;const{settings:r}=H(),{styles:A}=j(),{audioToggledOn:o,toggleAudio:i}=We(),l={backgroundImage:`url(${null==(e=r.audio)?void 0:e.icon})`,fill:"#fcec3d",...A.audioIconStyle},a={backgroundImage:`url(${null==(t=r.audio)?void 0:t.iconDisabled})`,fill:"#e8eaed",...A.audioIconStyle,...A.audioIconDisabledStyle};return g("div",{"aria-label":(null==(n=r.ariaLabel)?void 0:n.audioButton)??"toggle audio",role:"button",onMouseDown:async e=>{e.preventDefault(),await i()},style:o?{...A.audioButtonStyle}:{...A.audioButtonStyle,...A.audioButtonDisabledStyle},children:(()=>{var e,t;const n=o?null==(e=r.audio)?void 0:e.icon:null==(t=r.audio)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&g("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:g(n,{style:o?l:a,"data-testid":"rcb-audio-icon-svg"})}):g("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:o?l:a})})()})},Dt=()=>{var e,t;const{settings:n}=H(),{styles:r}=j(),{toggleChatWindow:A}=Ae(),o={backgroundImage:`url(${null==(e=n.header)?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...r.closeChatIconStyle};return g("div",{"aria-label":(null==(t=n.ariaLabel)?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:e=>{e.stopPropagation(),A(!1)},style:{...r.closeChatButtonStyle},children:(()=>{var e;const t=null==(e=n.header)?void 0:e.closeChatIcon;return t&&"string"!=typeof t?t&&g("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:g(t,{style:o})}):g("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:o})})()})},Ct=()=>{var e,t,n;const{settings:r}=H(),{styles:A}=j(),{notificationsToggledOn:o,toggleNotifications:i}=(()=>{const{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}=Ge();return{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}})(),l={backgroundImage:`url(${null==(e=r.notification)?void 0:e.icon})`,fill:"#fcec3d",...A.notificationIconStyle},a={backgroundImage:`url(${null==(t=r.notification)?void 0:t.iconDisabled})`,fill:"#e8eaed",...A.notificationIconStyle,...A.notificationIconDisabledStyle};return g("div",{"aria-label":(null==(n=r.ariaLabel)?void 0:n.notificationButton)??"toggle notifications",role:"button",onMouseDown:async e=>{e.preventDefault(),await i()},style:o?{...A.notificationButtonStyle}:{...A.notificationButtonStyle,...A.notificationButtonDisabledStyle},children:(()=>{var e,t;const n=o?null==(e=r.notification)?void 0:e.icon:null==(t=r.notification)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&g("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:g(n,{style:o?l:a,"data-testid":"rcb-notification-icon-svg"})}):g("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:o?l:a})})()})},xt=()=>{var e,t,n;const{settings:r}=H(),{styles:A}=j(),{injectMessage:o}=Ve(),{inputRef:s}=G(),{voiceToggledOn:c,toggleVoice:u}=ot(),{setInputLength:d,setTextAreaValue:f,textAreaDisabled:p}=it(),{handleSubmitText:h}=dt(),m=i([]),[v,y]=l(!1);a(()=>{var e;null!=(e=r.voice)&&e.sendAsAudio?(P(),m.current=[]):h()},[v]),a(()=>{c?((e,t,n,r,A,o,i)=>{var l;null!=(l=e.voice)&&l.sendAsAudio?nt(n,o):tt(e,t,n,r,A,i)})(r,u,E,f,d,m,s):rt()},[c]);const w={backgroundImage:`url(${null==(e=r.voice)?void 0:e.icon})`,fill:"#9aa0a6",...A.voiceIconStyle},b={backgroundImage:`url(${null==(t=r.voice)?void 0:t.iconDisabled})`,fill:"#9aa0a6",...A.voiceIconStyle,...A.voiceIconDisabledStyle},E=()=>{y(e=>!e)},P=async()=>{const e=new Blob(m.current,{type:"audio/wav"}),t=new File([e],"voice-input.wav",{type:"audio/wav"}),n=await bt(t);!n.fileType||!n.fileUrl||await o(g(wt,{file:t,fileType:n.fileType,fileUrl:n.fileUrl}),"USER")};return g("div",{"aria-label":(null==(n=r.ariaLabel)?void 0:n.voiceButton)??"toggle voice",role:"button",onMouseDown:async e=>{e.preventDefault(),!p&&await u()},style:c&&!p?{...A.voiceButtonStyle}:{...A.voiceButtonStyle,...A.voiceButtonDisabledStyle},className:c&&!p?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var e,t;const n=c?null==(e=r.voice)?void 0:e.icon:null==(t=r.voice)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&g("span",{className:"rcb-voice-icon "+(c&&!p?"on":""),children:g(n,{style:c&&!p?w:b})}):g("span",{className:"rcb-voice-icon"+(c&&!p?"-on":""),"data-testid":"rcb-voice-icon",style:c&&!p?w:b})})()})},kt=()=>{var e,t,n,r,A,o,i,a;const{settings:s}=H(),{styles:c}=j(),{textAreaDisabled:u}=X(),[d,f]=l(!1),{handleSubmitText:p}=dt(),h={backgroundColor:null==(e=s.general)?void 0:e.primaryColor,...c.sendButtonStyle},m={cursor:`url("${null==(t=s.general)?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:null==(n=s.general)?void 0:n.primaryColor,...c.sendButtonStyle,...c.sendButtonDisabledStyle},v={backgroundColor:null==(r=s.general)?void 0:r.secondaryColor,...c.sendButtonStyle,...c.sendButtonHoveredStyle},y={backgroundImage:`url(${null==(A=s.chatInput)?void 0:A.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle},w={backgroundImage:`url(${null==(o=s.chatInput)?void 0:o.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconDisabledStyle},b={backgroundImage:`url(${null==(i=s.chatInput)?void 0:i.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconHoveredStyle};return g("div",{"aria-label":(null==(a=s.ariaLabel)?void 0:a.sendButton)??"send message",role:"button",onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onMouseDown:async e=>{null==e||e.preventDefault(),!u&&await p()},style:u?m:d?v:h,className:"rcb-send-button",children:(()=>{var e;const t=null==(e=s.chatInput)?void 0:e.sendButtonIcon;return t&&"string"!=typeof t?t&&g("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:g(t,{style:u?w:d?b:y})}):g("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:u?w:d?b:y})})()})},St=(e,t)=>{var n,r,A,o,i,l,a,s,c;const u={[E.AUDIO_BUTTON]:null==(n=e.audio)?void 0:n.disabled,[E.CLOSE_CHAT_BUTTON]:null==(r=e.general)?void 0:r.embedded,[E.EMOJI_PICKER_BUTTON]:null==(A=e.emoji)?void 0:A.disabled,[E.FILE_ATTACHMENT_BUTTON]:null==(o=e.fileAttachment)?void 0:o.disabled,[E.NOTIFICATION_BUTTON]:null==(i=e.notification)?void 0:i.disabled,[E.SEND_MESSAGE_BUTTON]:!1,[E.VOICE_MESSAGE_BUTTON]:null==(l=e.voice)?void 0:l.disabled},d={},f=e=>e?e.map(e=>{if("string"==typeof e){if((e=>Object.values(E).includes(e))(e)&&!u[e]){if(d[e])return d[e];const n=t[e];if("function"==typeof n){const t=n();return d[e]=t,t}return null}return null}return e}).filter(e=>null!==e):[];return{header:f(null==(a=e.header)?void 0:a.buttons),chatInput:f(null==(s=e.chatInput)?void 0:s.buttons),footer:f(null==(c=e.footer)?void 0:c.buttons)}},Tt=()=>{const{settings:e}=H(),t=s(()=>({[E.CLOSE_CHAT_BUTTON]:()=>g(Dt,{}),[E.AUDIO_BUTTON]:()=>g(Bt,{}),[E.NOTIFICATION_BUTTON]:()=>g(Ct,{}),[E.EMOJI_PICKER_BUTTON]:()=>g(Pt,{}),[E.FILE_ATTACHMENT_BUTTON]:()=>g(Et,{}),[E.SEND_MESSAGE_BUTTON]:()=>g(kt,{}),[E.VOICE_MESSAGE_BUTTON]:()=>g(xt,{})}),[]),{header:n,chatInput:r,footer:A}=s(()=>St(e,t),[e,t]);return{headerButtons:s(()=>n,[n]),chatInputButtons:s(()=>r,[r]),footerButtons:s(()=>A,[A])}},It=()=>{const{settings:e}=H(),{styles:t}=j(),{setSyncedMessages:n,syncedMessagesRef:r}=le(),{isLoadingChatHistory:A,setIsLoadingChatHistory:i,hasChatHistoryLoaded:l,setHasChatHistoryLoaded:a}=X(),{chatBodyRef:s}=G(),{dispatchRcbEvent:c}=re(),u=o(async()=>{var A,o;const l=Oe();if(!l||null!=(A=e.event)&&A.rcbLoadChatHistory&&(await c(J.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;i(!0);const u=(null==(o=s.current)?void 0:o.scrollHeight)??0;((e,t,n,r,A,o,i,l,a)=>{var s;if(Se=!0,null!=n)try{const s=xe(g(De,{}),"SYSTEM"),c=A.current.slice(1);r([s,...c]);const u=n.map(n=>{if("object"===n.type){const r=Fe(n.content,e,t);return{...n,content:r}}return n});setTimeout(()=>{var t;const n=A.current.slice(1);let o=null!=(t=e.chatHistory)&&t.autoLoad?xe(g(m,{}),"SYSTEM"):xe(g(Be,{}),"SYSTEM");r([...u,o,...n]),a(!0)},500),setTimeout(()=>{if(!o.current)return;const{scrollHeight:e}=o.current,t=e-i;o.current.scrollTop+=t,l(!1)},510)}catch{ke.removeItem(null==(s=e.chatHistory)?void 0:s.storageKey)}})(e,t,l,n,r,s,u,i,a)},[e,t,c,r,s,i,a]);return{isLoadingChatHistory:A,setIsLoadingChatHistory:i,hasChatHistoryLoaded:l,showChatHistory:u}},Qt=()=>{var e,t,n;const{settings:r}=H(),{styles:A}=j(),{showChatHistory:o}=It(),[i,a]=l(!1),s={color:null==(e=r.general)?void 0:e.primaryColor,borderColor:null==(t=r.general)?void 0:t.primaryColor,...A.chatHistoryButtonStyle,...A.chatHistoryButtonHoveredStyle};return g("div",{className:"rcb-view-history-container",children:g("div",{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},style:i?s:{...A.chatHistoryButtonStyle},onMouseDown:e=>{e.preventDefault(),o()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:g("p",{children:null==(n=r.chatHistory)?void 0:n.viewChatHistoryButtonText})})})},Mt=()=>{var e,t,n,r;const A=ft(),{settings:l}=H(),{replaceMessages:s}=Ve(),{isBotTyping:c,isChatWindowOpen:u,setUnreadCount:d,setSyncedIsChatWindowOpen:f,setSyncedTextAreaDisabled:p,setSyncedAudioToggledOn:h,setSyncedVoiceToggledOn:m,setSyncedIsScrolling:v,syncedIsScrollingRef:y,syncedIsChatWindowOpenRef:w}=X(),{chatBodyRef:b}=G(),{viewportHeight:E,setViewportHeight:P,setViewportWidth:B,scrollToBottom:D}=Ae(),{setUpNotifications:C}=Ge(),{handleFirstInteraction:x}=(()=>{var e;const{settings:t}=H(),{hasInteractedPage:n,setHasInteractedPage:r,hasFlowStarted:A,setHasFlowStarted:i}=X(),l=o(()=>{var e;if(r(!0),!A&&"ON_PAGE_INTERACT"===(null==(e=t.general)?void 0:e.flowStartTrigger)&&i(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const n=new window.SpeechSynthesisUtterance;n.text="",n.onend=()=>{window.removeEventListener("click",l),window.removeEventListener("keydown",l),window.removeEventListener("touchstart",l)},window.speechSynthesis.speak(n)},[A,null==(e=t.general)?void 0:e.flowStartTrigger]);return{hasInteractedPage:n,handleFirstInteraction:l}})(),{showChatHistory:k}=It(),S=i(0),T=i(!1);a(()=>(window.addEventListener("click",x),window.addEventListener("keydown",x),window.addEventListener("touchstart",x),()=>{window.removeEventListener("click",x),window.removeEventListener("keydown",x),window.removeEventListener("touchstart",x)}),[]),a(()=>{const e=b.current;if(!e)return;const t=()=>{T.current||(T.current=!0,requestAnimationFrame(()=>{var t,n;if(!e)return;const{scrollTop:r,clientHeight:A,scrollHeight:o}=e,i=r+A<o-((null==(t=l.chatWindow)?void 0:t.messagePromptOffset)??30);v(i),y.current=i,i||(r+A>=o-1&&(e.scrollTop=o-A-1),(w.current||null!=(n=l.general)&&n.embedded)&&d(0)),T.current=!1}))};return e.addEventListener("wheel",t,{passive:!0}),e.addEventListener("touchmove",t,{passive:!0}),()=>{e.removeEventListener("wheel",t),e.removeEventListener("touchmove",t)}},[]),a(()=>{var e,t,n;p(null==(e=l.chatInput)?void 0:e.disabled),f(null==(t=l.chatWindow)?void 0:t.defaultOpen),h(null==(n=l.audio)?void 0:n.defaultToggledOn),setTimeout(()=>{var e;m(null==(e=l.voice)?void 0:e.defaultToggledOn)},1)},[]),a(()=>{var e;null!=(e=l.notification)&&e.disabled||C()},[null==(e=l.notification)?void 0:e.disabled]),a(()=>{!y.current&&null!=b&&b.current&&D()},[c]),a(()=>{var e,t;if(null!=(e=l.chatHistory)&&e.disabled)ke&&ke.removeItem(Te);else if(He(l),Oe().length>0){const e=xe(g(Qt,{}),"SYSTEM");s([e]),null!=(t=l.chatHistory)&&t.autoLoad&&k()}},[null==(t=l.chatHistory)?void 0:t.storageKey,null==(n=l.chatHistory)?void 0:n.maxEntries,null==(r=l.chatHistory)?void 0:r.disabled]),a(()=>{var e;A||null!=(e=l.general)&&e.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",e=>{if(!e.target)return;const{x:t,y:n,width:r,height:A}=e.target.boundingRect;0==t&&0==n&&0==r&&0==A?(setTimeout(()=>{var e;P(null==(e=window.visualViewport)?void 0:e.height)},101),setTimeout(()=>{var e,t;E!=(null==(e=window.visualViewport)?void 0:e.height)&&P(null==(t=window.visualViewport)?void 0:t.height)},1001)):setTimeout(()=>{var e;P((null==(e=window.visualViewport)?void 0:e.height)-A)},101)}))},[A]),a(()=>{var e,t,n,r;if(A)return;u&&(P(null==(e=window.visualViewport)?void 0:e.height),B(null==(t=window.visualViewport)?void 0:t.width));const o=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),i=()=>S.current=window.scrollY,l=()=>{var e,t;P(null==(e=window.visualViewport)?void 0:e.height),B(null==(t=window.visualViewport)?void 0:t.width)},a=()=>{var e;window.removeEventListener("scroll",o),window.removeEventListener("scroll",i),null==(e=window.visualViewport)||e.removeEventListener("resize",l)};return u?(a(),document.body.style.position="fixed",window.addEventListener("scroll",o),null==(n=window.visualViewport)||n.addEventListener("resize",l)):(document.body.style.position="static",a(),window.scrollTo({top:S.current,left:0,behavior:"auto"}),window.addEventListener("scroll",i),null==(r=window.visualViewport)||r.removeEventListener("resize",l)),a},[u,A])},Ot="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",Lt="2592000",Nt="RCB_THEME_CACHE_DATA",Ht=async(e,t)=>{const{id:n,version:r,baseUrl:A=Ot,cacheDuration:o=Lt}=t,i=r||await(async(e,t)=>{const n=`${t}/${e}/meta.json`;try{const e=await fetch(n);return e.ok?(await e.json()).version:(console.error(`Failed to fetch meta.json from ${n}`),null)}catch(e){return console.error(`Failed to fetch meta.json from ${n}`,e),null}})(n,A);if(!i)return console.error(`Unable to find version for theme: ${n}`),{settings:{},inlineStyles:{},cssStylesText:""};const l=((e,t,n)=>{const r=localStorage.getItem(`${Nt}_${e}_${t}`);if(!r)return null;try{const e=JSON.parse(r),t=(new Date).getTime(),A=Math.floor(t/1e3);return e.cacheDate+n>=A?e:null}catch(t){return console.error(`Unable to fetch cache for ${e}`,t),null}})(n,i,o);if(l){const t=Rt(e,l.cssStylesText);return{settings:l.settings,inlineStyles:l.inlineStyles,cssStylesText:t}}const a=`${A}/${n}/${i}/styles.css`,s=`${A}/${n}/${i}/settings.json`,c=`${A}/${n}/${i}/styles.json`;let u="";const d=await fetch(a);d.ok?u=await d.text():console.info(`Could not fetch styles.css from ${a}`);const f=await fetch(s);let p={};f.ok?p=await f.json():console.info(`Could not fetch settings.json from ${s}`);const g=await fetch(c);let h={};g.ok?h=await g.json():console.info(`Could not fetch styles.json from ${c}`),((e,t,n,r,A)=>{const o=(new Date).getTime(),i={settings:n,inlineStyles:r,cssStylesText:A,cacheDate:Math.floor(o/1e3)};localStorage.setItem(`${Nt}_${e}_${t}`,JSON.stringify(i))})(n,i,p,h,u);return{settings:p,inlineStyles:h,cssStylesText:Rt(e,u)}},Rt=(e,t)=>t.split(new RegExp("(?<=})")).map(t=>{const n=t.trim();return n.startsWith("@import")||n.startsWith("@keyframes")||n.startsWith("@media")?n:n?`#${e} ${n}`:""}).join("\n"),Ft=async(e,t,n,r)=>{var A,o;let i=jt(L),l=jt(F),a="";if(null!=r)if(Array.isArray(r))for(const t of r){const n=await Ht(e,t);i=Ut(n.settings,i),l=Ut(n.inlineStyles,l),a+=n.cssStylesText}else{const t=await Ht(e,r);i=Ut(t.settings,i),l=Ut(t.inlineStyles,l),a+=t.cssStylesText}return null!=t&&(i=Ut(t,i)),null!=n&&(l=Ut(n,l)),null!=(null==(A=i.chatInput)?void 0:A.botDelay)&&(null==(o=i.chatInput)?void 0:o.botDelay)<500&&(i.chatInput.botDelay=500),{settings:i,inlineStyles:l,cssStylesText:a}},Ut=(e,t)=>{const n=[{source:e,target:t}];for(;n.length;){const e=n.pop();if(null==e)continue;const{source:t,target:r}=e;for(const e of Object.keys(t)){const A=e;if(c(t[A]))r[A]=t[A];else if("object"!=typeof t[A]||null===t[A]||Array.isArray(t[A]))try{r[A]=t[A]}catch{}else("object"!=typeof r[A]||null===r[A])&&(r[A]={}),n.push({source:t[A],target:r[A]})}}return t},jt=e=>{if(null===e||"object"!=typeof e)return e;const t=Array.isArray(e)?[]:{},n=[{source:e,target:t}],r=new WeakMap;for(r.set(e,t);n.length;){const e=n.pop();if(null==e)continue;const{source:t,target:A}=e;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const o=t[e];if(o&&"object"==typeof o)if(r.has(o))A[e]=r.get(o);else{const t=Array.isArray(o)?[]:{};r.set(o,t),A[e]=t,n.push({source:o,target:t})}else A[e]=o}}return t},zt=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:n}=H(),r=o(n=>{!n||0===Object.keys(n).length||t(jt(Ut(n,e)))},[e]),A=o(e=>{const r="function"==typeof e?e(n.current):e;t(r)},[n]);return{settings:e,replaceSettings:A,updateSettings:r}},_t=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:n}=j(),r=o(n=>{!n||0===Object.keys(n).length||t(jt(Ut(n,e)))},[e]),A=o(e=>{const r="function"==typeof e?e(n.current):e;t(r)},[n]);return{styles:e,replaceStyles:A,updateStyles:r}},qt=({plugins:e,slots:t})=>{var n,r;const A=ft(),{settings:o}=H(),{styles:i}=j(),{hasFlowStarted:l,setHasFlowStarted:c}=X(),{inputRef:u}=G(),{viewportHeight:d,viewportWidth:f,isChatWindowOpen:p}=Ae(),{goToPath:v}=ut(),{headerButtons:y,chatInputButtons:w,footerButtons:b}=Tt();Mt(),(e=>{const{updateSettings:t}=zt(),{updateStyles:n}=_t(),r=null==e?void 0:e.map(e=>e());a(()=>{let e={},A={};null==r||r.forEach(t=>{null!=t&&t.settings&&0!==Object.keys(null==t?void 0:t.settings).length&&(e=Ut(t.settings,e)),null!=t&&t.styles&&0!==Object.keys(null==t?void 0:t.styles).length&&(A=Ut(t.styles,A))}),t(e),n(A)},[])})(e),a(()=>{var e;(l||"ON_LOAD"===(null==(e=o.general)?void 0:e.flowStartTrigger))&&v("start")},[l,null==(n=o.general)?void 0:n.flowStartTrigger]);const E=s(()=>{var e;const t="rcb-chatbot-global ";return null!=(e=o.general)&&e.embedded?t+"rcb-window-embedded":p?t+"rcb-window-open":t+"rcb-window-close"},[o,p]);return g(m,{children:(()=>{var e,t;return A&&(null==(e=o.device)?void 0:e.desktopEnabled)||!A&&(null==(t=o.device)?void 0:t.mobileEnabled)})()&&h("div",{onMouseDown:e=>{var t,n;!l&&"ON_CHATBOT_INTERACT"===(null==(t=o.general)?void 0:t.flowStartTrigger)&&c(!0),A?null==(n=u.current)||n.blur():null==e||e.preventDefault()},className:E,children:[g(mt,{}),g(ht,{}),p&&!A&&!(null!=(r=o.general)&&r.embedded)&&h(m,{children:[g("style",{children:"\n\t\t\t\t\t\t\t\t\thtml {\n\t\t\t\t\t\t\t\t\t\toverflow: hidden !important;\n\t\t\t\t\t\t\t\t\t\ttouch-action: none !important;\n\t\t\t\t\t\t\t\t\t\tscroll-behavior: auto !important;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t"}),g("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),g("div",{style:(()=>{var e,t;return A||null!=(e=o.general)&&e.embedded?null!=(t=o.general)&&t.embedded?{...i.chatWindowStyle}:{...i.chatWindowStyle,zIndex:1e4}:{...i.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${f}px`,height:`${d}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var e,n,r;const A=(null==t?void 0:t.chatBotHeader)||_,i=(null==t?void 0:t.chatBotBody)||de,l=(null==t?void 0:t.chatBotInput)||pt,a=(null==t?void 0:t.chatBotFooter)||gt;return h(m,{children:[(null==(e=o.general)?void 0:e.showHeader)&&g(A,{buttons:y}),g(i,{}),g(yt,{}),(null==(n=o.general)?void 0:n.showInputRow)&&g(l,{buttons:w}),(null==(r=o.general)?void 0:r.showFooter)&&g(a,{buttons:b})]})})()})]})})},Gt=r(void 0),Yt=()=>A(Gt),Wt=({children:e})=>{var t;const n=i(""),r=i({}),[A,o,s]=W({}),[c,u,d]=W({}),[f,p]=l(!1);a(()=>{p(!0)},[]);return f?g("div",{style:{fontFamily:null==(t=A.general)?void 0:t.fontFamily},children:g(Gt.Provider,{value:{loadConfig:async(e,t,A,i,l,a)=>{n.current=e,r.current=t;const s=await Ft(e,A,i,l);a.current&&(a.current.textContent=s.cssStylesText),o(s.settings),u(s.inlineStyles)}},children:g(R,{settings:A,setSyncedSettings:o,syncedSettingsRef:s,children:g(z,{styles:c,setSyncedStyles:u,syncedStylesRef:d,children:g(st,{children:g(Y,{botIdRef:n,flowRef:r,children:g(ne,{children:g(K,{settings:A,children:g(ae,{children:e})})})})})})})})}):null},Vt=({id:e,flow:t,settings:n,styles:r,themes:A,plugins:o,setConfigLoaded:i,styleRootRef:l})=>{const c=s(()=>e,[]),u=Yt(),{flowRef:d}=G();d&&d.current!==t&&(d.current=t);return a(()=>{(async()=>{var e,a;null!=(e=n.event)&&e.rcbPreLoadChatBot&&(await $(J.PRE_LOAD_CHATBOT,{botId:c,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:A,plugins:o})).defaultPrevented||(null!=u&&u.loadConfig&&(await u.loadConfig(c,t,n,r,A,l),i(!0)),null!=(a=n.event)&&a.rcbPostLoadChatBot&&$(J.POST_LOAD_CHATBOT,{botId:c,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:A,plugins:o}))})()},[A]),null},Xt=["Quickstart","API Docs","Examples","Github","Discord"],Kt={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:Xt,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:Xt,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:Xt,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"}},Jt=({id:e,flow:t,settings:n,styles:r,themes:A,plugins:o,slots:c})=>{const u=s(()=>e||"rcb-"+Ce(),[]),d=t&&0!==Object.keys(t).length?t:Kt,f=n||{},p=r||{},v=o||[],[y,w]=l(!1),b=Yt(),E=i(null),[P,B]=l(A||[]);a(()=>{A&&B(A)},[A]);const D=()=>h(m,{children:[g(Vt,{styleRootRef:E,id:u,flow:d,settings:f,styles:p,themes:P,plugins:v,setConfigLoaded:w}),y&&g(qt,{plugins:o,slots:c})]});return h(null==b?Wt:m,{children:[g("style",{ref:E}),g("div",{id:u,children:D()})]})},Zt=()=>{const{getBotId:e}=(()=>{const{botIdRef:e}=G();return{getBotId:o(()=>e.current,[e])}})();return{getBotId:e}},$t=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:n}=(()=>{const{replaceMessages:e}=Ve(),{replacePaths:t,goToPath:n}=ut(),{replaceToasts:r}=ct(),{hasFlowStarted:A}=X(),{flowRef:i,timeoutIdRef:l}=G(),{settings:a}=H();return{hasFlowStarted:A,restartFlow:o(async()=>{He(a),l.current&&clearTimeout(l.current),e([]),r([]),t([]),await n("start")},[l,a,e,r,t,He,n]),getFlow:o(()=>(null==i?void 0:i.current)??{},[i])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:n}},en=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:A,messages:o,replaceMessages:i,getMessages:l}=Ve();return{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:A,messages:o,replaceMessages:i,getMessages:l}},tn=(e,t)=>{const{getBotId:n}=Zt();a(()=>{const r=e=>{e.detail.botId===n()&&t(e)};return window.addEventListener(e,r),()=>{window.removeEventListener(e,r)}},[n,e,t])},nn=()=>{const{settings:e,replaceSettings:t,updateSettings:n}=zt();return{settings:e,replaceSettings:t,updateSettings:n}},rn=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:A,setTextAreaValue:o,focusTextArea:i,blurTextArea:l}=it();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:A,setTextAreaValue:o,focusTextArea:i,blurTextArea:l}},An=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=It();return{showChatHistory:e,getHistoryMessages:Oe,setHistoryMessages:Le,hasChatHistoryLoaded:t}},on={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 ln(e){return t=>{on[t]={...e,...on[t]}}}["address","main","div","figure","p","pre"].forEach(ln({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(ln({content:8,type:73})),["p","pre"].forEach(ln({content:8,type:65})),["s","small","span","del","ins"].forEach(ln({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(ln({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(ln({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(ln({type:89}));const an=Object.freeze(on),sn=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],cn=Object.keys(an).filter(e=>"canvas"!==e&&"iframe"!==e),un=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}),dn=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function fn(){return fn=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},fn.apply(this,arguments)}function pn({attributes:e={},className:n,children:r=null,selfClose:A=!1,tagName:o}){const i=o;return A?t.createElement(i,fn({className:n},e)):t.createElement(i,fn({className:n},e),r)}class gn{attribute(e,t){return t}node(e,t){return t}}function hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}
1
+ import*as e from"react";import t,{forwardRef as n,createContext as r,useContext as o,useCallback as i,useRef as l,useState as a,useEffect as s,useMemo as A,isValidElement as c,Fragment as u,createElement as d,useImperativeHandle as f}from"react";import p from"react-dom/client";import{jsx as h,jsxs as g,Fragment as m}from"react/jsx-runtime";import v from"react-dom/server";import{createPortal as y}from"react-dom";function w(){return w=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},w.apply(null,arguments)}function b(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){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}"function"==typeof SuppressedError&&SuppressedError;const k={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"},x="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",E=n((t,n)=>e.createElement("svg",{viewBox:"0 0 637 637",ref:n,...t},e.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"}),e.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"}))),P=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),C=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),S=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),D=n((t,n)=>e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:n,...t},e.createElement("g",{strokeLinecap:"round",strokeWidth:10},e.createElement("path",{d:"m19 19 61 61M80 19 19 80"})))),B=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"}))),I=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),T=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),Q=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),M=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),O=n((t,n)=>e.createElement("svg",{viewBox:"0 -960 960 960",ref:n,...t},e.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"}))),L={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:E},header:{title:h("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:x,buttons:[k.NOTIFICATION_BUTTON,k.AUDIO_BUTTON,k.CLOSE_CHAT_BUTTON],closeChatIcon:D},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:C,iconDisabled:S,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//8AAAEAA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Cp/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/HgAMAAoAPQABAFMA/f9HAP7/HwAEAN//+v/H/wMAs//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9v8bAPj/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:M,iconDisabled:O},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:B,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[k.VOICE_MESSAGE_BUTTON,k.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:x,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:I,iconDisabled:T},footer:{text:g("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com","_blank","noopener,noreferrer"),children:[h("span",{children:"Powered By "},0),h("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:h(E,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),h("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[k.FILE_ATTACHMENT_BUTTON,k.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:P,iconDisabled:P,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:Q,iconDisabled:Q,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}},N=r({settings:{},setSyncedSettings:()=>null,syncedSettingsRef:{current:{}}}),R=()=>o(N),H=({children:e,settings:t=L,setSyncedSettings:n,syncedSettingsRef:r})=>h(N.Provider,{value:{settings:t,setSyncedSettings:n,syncedSettingsRef:r},children:e}),F={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:{}},z=r({styles:{},setSyncedStyles:()=>null,syncedStylesRef:{current:{}}}),j=()=>o(z),U=({children:e,styles:t=F,setSyncedStyles:n,syncedStylesRef:r})=>h(z.Provider,{value:{styles:t,setSyncedStyles:n,syncedStylesRef:r},children:e}),_=({buttons:e})=>{var t,n,r,o,i,l,a;const{settings:s}=R(),{styles:A}=j(),d={backgroundImage:`linear-gradient(to right, ${null==(t=s.general)?void 0:t.secondaryColor},\n\t\t\t${null==(n=s.general)?void 0:n.primaryColor})`,...A.headerStyle};return g("div",{style:d,className:"rcb-chat-header-container",children:[g("div",{className:"rcb-chat-header",children:[(null==(r=s.header)?void 0:r.showAvatar)&&h("div",{style:{backgroundImage:`url("${null==(o=s.header)?void 0:o.avatar}")`},className:"rcb-bot-avatar"}),c(null==(i=s.header)?void 0:i.title)?null==(l=s.header)?void 0:l.title:h("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:null==(a=s.header)?void 0:a.title})]}),h("div",{className:"rcb-chat-header",children:null==e?void 0:e.map((e,t)=>h(u,{children:e},t))})]})},q=r({}),V=()=>o(q),G=({children:e,botIdRef:t,flowRef:n})=>{const r=l(null),o=l(""),i=l(null),a=l(new Map),s=l(null),A=l(""),c=l(!1),u=l(null),d=l(null),f=l(null);return h(q.Provider,{value:{botIdRef:t,flowRef:n,inputRef:r,timeoutIdRef:i,streamMessageMap:a,chatBodyRef:s,paramsInputRef:A,keepVoiceOnRef:c,audioContextRef:u,audioBufferRef:d,gainNodeRef:f,prevInputRef:o},children:e})},W=e=>{const[t,n]=a(e),r=l(e);return[t,e=>{const t="function"==typeof e?e(r.current):e;r.current=t,n(t)},r]},Y=r({}),K=()=>o(Y),X=({children:e,settings:t})=>{var n,r,o,i,l,s;const[A,c,u]=W(!1),[d,f,p]=W((null==(n=null==t?void 0:t.chatWindow)?void 0:n.defaultOpen)??!1),[g,m,v]=W((null==(r=null==t?void 0:t.audio)?void 0:r.defaultToggledOn)??!1),[y,w,b]=W((null==(o=null==t?void 0:t.voice)?void 0:o.defaultToggledOn)??!1),[k,x,E]=W((null==(i=null==t?void 0:t.notification)?void 0:i.defaultToggledOn)??!0),[P,C]=a(!1),[S,D]=a(!1),[B,I,T]=W(!1),[Q,M,O]=W(!0),[L,N,R]=W(!1),[H,F]=a(!1),[z,j]=a(!1),[U,_]=a(0),[q,V]=a(0),[G,K]=a(!1),[X,J]=a((null==(l=window.visualViewport)?void 0:l.height)??window.innerHeight),[Z,$]=a((null==(s=window.visualViewport)?void 0:s.width)??window.innerWidth);return h(Y.Provider,{value:{isBotTyping:A,setSyncedIsBotTyping:c,syncedIsBotTypingRef:u,isChatWindowOpen:d,setSyncedIsChatWindowOpen:f,syncedIsChatWindowOpenRef:p,audioToggledOn:g,setSyncedAudioToggledOn:m,syncedAudioToggledOnRef:v,voiceToggledOn:y,setSyncedVoiceToggledOn:w,syncedVoiceToggledOnRef:b,notificationsToggledOn:k,setSyncedNotificationsToggledOn:x,syncedNotificationsToggledOnRef:E,isLoadingChatHistory:P,setIsLoadingChatHistory:C,hasChatHistoryLoaded:S,setHasChatHistoryLoaded:D,isScrolling:B,setSyncedIsScrolling:I,syncedIsScrollingRef:T,textAreaDisabled:Q,setSyncedTextAreaDisabled:M,syncedTextAreaDisabledRef:O,textAreaSensitiveMode:L,setSyncedTextAreaSensitiveMode:N,syncedTextAreaSensitiveModeRef:R,hasInteractedPage:H,setHasInteractedPage:F,hasFlowStarted:z,setHasFlowStarted:j,unreadCount:U,setUnreadCount:_,inputLength:q,setInputLength:V,blockAllowsAttachment:G,setBlockAllowsAttachment:K,viewportHeight:X,setViewportHeight:J,viewportWidth:Z,setViewportWidth:$},children:e})};var J=(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))(J||{});const Z={[J.START_SPEAK_AUDIO]:!0,[J.TOGGLE_AUDIO]:!0,[J.TOGGLE_VOICE]:!0,[J.TOGGLE_NOTIFICATIONS]:!0,[J.TOGGLE_CHAT_WINDOW]:!0,[J.PRE_INJECT_MESSAGE]:!0,[J.POST_INJECT_MESSAGE]:!1,[J.PRE_LOAD_CHATBOT]:!0,[J.POST_LOAD_CHATBOT]:!1,[J.START_SIMULATE_STREAM_MESSAGE]:!0,[J.STOP_SIMULATE_STREAM_MESSAGE]:!1,[J.START_STREAM_MESSAGE]:!0,[J.CHUNK_STREAM_MESSAGE]:!0,[J.STOP_STREAM_MESSAGE]:!0,[J.REMOVE_MESSAGE]:!0,[J.SAVE_CHAT_HISTORY]:!0,[J.LOAD_CHAT_HISTORY]:!0,[J.CHANGE_PATH]:!0,[J.SHOW_TOAST]:!0,[J.DISMISS_TOAST]:!0,[J.USER_SUBMIT_TEXT]:!0,[J.USER_UPLOAD_FILE]:!0,[J.TEXT_AREA_CHANGE_VALUE]:!0,[J.PRE_PROCESS_BLOCK]:!0,[J.POST_PROCESS_BLOCK]:!0},$=async(e,t,n)=>{const r=new CustomEvent(e,{detail:t,cancelable:Z[e]});return r.data=n,r.promises=[],window.dispatchEvent(r),await Promise.all(r.promises),r},ee=r({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),te=()=>o(ee),ne=({children:e})=>{const[t,n,r]=W([]);return h(ee.Provider,{value:{paths:t,setSyncedPaths:n,syncedPathsRef:r},children:e})},re=()=>{const{botIdRef:e}=V(),{syncedPathsRef:t}=te(),n=i(()=>t.current.length>0?t.current.at(-1)??null:null,[]),r=i(()=>t.current.length>1?t.current.at(-2)??null:null,[]);return{dispatchRcbEvent:i(async(t,o)=>{const i={botId:e.current,currPath:n(),prevPath:r()};return await $(t,i,o)},[e])}},oe=()=>{const{settings:e}=R(),{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,viewportHeight:r,setViewportHeight:o,viewportWidth:l,setViewportWidth:a,setUnreadCount:s,setSyncedIsBotTyping:A,setSyncedIsScrolling:c,syncedIsBotTypingRef:u,syncedIsChatWindowOpenRef:d}=K(),{chatBodyRef:f}=V(),{dispatchRcbEvent:p}=re(),h=i(()=>{if(!f.current)return!1;const e=f.current.getBoundingClientRect(),t=window.innerHeight??document.documentElement.clientHeight,n=window.innerWidth??document.documentElement.clientWidth;return e.top>=0&&e.left>=0&&e.bottom<=t&&e.right<=n},[f]),g=i(async t=>{var r;t!==d.current&&(null!=(r=e.event)&&r.rcbToggleChatWindow&&(await p(J.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||n(e=>(e||s(0),!e)))},[d]),m=i(async e=>{e!==u.current&&A(e=>!e)},[u]),v=i((e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t,[]),y=i((e=0)=>{if(!f.current)return;const t=f.current.scrollHeight-f.current.clientHeight;if(e<=0)return f.current.scrollTop=t,void c(!1);const n=f.current.scrollTop,r=t-n;let o=0;const i=()=>{if(!f.current)return;o+=20;const t=v(o,n,r,e);f.current.scrollTop=t,o<e?requestAnimationFrame(i):c(!1)};i()},[f]);return{isChatWindowOpen:t,setSyncedIsChatWindowOpen:n,toggleChatWindow:g,viewportHeight:r,setViewportHeight:o,viewportWidth:l,setViewportWidth:a,toggleIsBotTyping:m,scrollToBottom:y,getIsChatBotVisible:h}},ie=()=>{var e,t,n;const{settings:r}=R(),{styles:o}=j(),{unreadCount:i,isScrolling:l}=K(),{chatBodyRef:s}=V(),{scrollToBottom:A}=oe(),[c,u]=a(!1),d={color:null==(e=r.general)?void 0:e.primaryColor,borderColor:null==(t=r.general)?void 0:t.primaryColor,...o.chatMessagePromptHoveredStyle};return h("div",{className:"rcb-message-prompt-container "+(s.current&&(null==(f=r.chatWindow)?void 0:f.showMessagePrompt)&&l&&i>0?"visible":"hidden"),children:h("div",{onMouseEnter:()=>{u(!0)},onMouseLeave:()=>{u(!1)},style:c?d:{...o.chatMessagePromptStyle},onMouseDown:e=>{e.preventDefault(),A(600)},className:"rcb-message-prompt-text",children:null==(n=r.chatWindow)?void 0:n.messagePromptText})});var f},le=r({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),ae=()=>o(le),se=({children:e})=>{const[t,n,r]=W([]);return h(le.Provider,{value:{messages:t,setSyncedMessages:n,syncedMessagesRef:r},children:e})},Ae=({message:e,isNewSender:t})=>{var n,r,o,i,l,a;const{settings:s}=R(),{styles:A}=j(),c="string"==typeof e.content,u=e.content,d=e.contentWrapper?h(e.contentWrapper,{children:u}):u,f={backgroundColor:null==(n=s.general)?void 0:n.primaryColor,color:"#fff",maxWidth:null!=(r=s.userBubble)&&r.showAvatar?"65%":"70%",...A.userBubbleStyle},p=null!=(o=s.userBubble)&&o.animate?"rcb-user-message-entry":"",v=(null==(i=s.userBubble)?void 0:i.showAvatar)&&t,y="rcb-user-message"+(!t&&null!=(l=s.userBubble)&&l.showAvatar?" rcb-user-message-offset":"");return g("div",{className:"rcb-user-message-container",children:[c?h("div",{style:f,className:`${y} ${p}`,children:d}):h(m,{children:d}),v&&h("div",{style:{backgroundImage:`url("${null==(a=s.userBubble)?void 0:a.avatar}")`},className:"rcb-message-user-avatar"})]})},ce=({message:e,isNewSender:t})=>{var n,r,o,i,l,a;const{settings:s}=R(),{styles:A}=j(),c="string"==typeof e.content,u=e.content,d=e.contentWrapper?h(e.contentWrapper,{children:u}):u,f={backgroundColor:null==(n=s.general)?void 0:n.secondaryColor,color:"#fff",maxWidth:null!=(r=s.botBubble)&&r.showAvatar?"65%":"70%",...A.botBubbleStyle},p=null!=(o=s.botBubble)&&o.animate?"rcb-bot-message-entry":"",v=(null==(i=s.botBubble)?void 0:i.showAvatar)&&t,y="rcb-bot-message"+(!t&&null!=(l=s.botBubble)&&l.showAvatar?" rcb-bot-message-offset":"");return g("div",{className:"rcb-bot-message-container",children:[v&&h("div",{style:{backgroundImage:`url("${null==(a=s.botBubble)?void 0:a.avatar}")`},className:"rcb-message-bot-avatar"}),c?h("div",{style:f,className:`${y} ${p}`,children:d}):h(m,{children:d})]})},ue=()=>{var e,t,n;const{settings:r}=R(),{styles:o}=j(),i=null!=(e=r.botBubble)&&e.animate?"rcb-bot-message-entry":"";return g("div",{className:"rcb-bot-message-container",children:[(null==(t=r.botBubble)?void 0:t.showAvatar)&&h("div",{style:{backgroundImage:`url("${null==(n=r.botBubble)?void 0:n.avatar}")`},className:"rcb-message-bot-avatar"}),h("div",{onMouseDown:e=>{e.preventDefault()},className:`rcb-bot-message ${i}`,children:g("div",{className:"rcb-typing-indicator",style:{...null==o?void 0:o.rcbTypingIndicatorContainerStyle},children:[h("span",{className:"rcb-dot",style:{...null==o?void 0:o.rcbTypingIndicatorDotStyle}}),h("span",{className:"rcb-dot",style:{...null==o?void 0:o.rcbTypingIndicatorDotStyle}}),h("span",{className:"rcb-dot",style:{...null==o?void 0:o.rcbTypingIndicatorDotStyle}})]})})]})},de=()=>{var e,t,n;const{settings:r}=R(),{styles:o}=j(),{messages:i}=ae(),{scrollToBottom:l}=oe(),{isBotTyping:a,syncedIsScrollingRef:A}=K(),{chatBodyRef:c}=V(),u={...null==o?void 0:o.bodyStyle,scrollbarWidth:null!=(e=r.chatWindow)&&e.showScrollbar?"auto":"none"};s(()=>{A.current||l()},[null==(t=c.current)?void 0:t.scrollHeight]);return g("div",{style:u,className:"rcb-chat-body-container",ref:c,children:[i.map((e,t)=>{const n=(e=>0===e||i[e].sender!==i[e-1].sender)(t);return"USER"===e.sender.toUpperCase()?h(Ae,{message:e,isNewSender:n},t):"BOT"===e.sender.toUpperCase()?h(ce,{message:e,isNewSender:n},t):h("div",{children:e.content},t)}),a&&(null==(n=r.chatWindow)?void 0:n.showTypingIndicator)&&h(ue,{}),h(ie,{})]})},fe=({checkboxes:e,checkedItems:t,path:n})=>{var r,o,i,l,A,c,u,d,f,p,m;const{settings:v}=R(),{styles:y}=j(),{paths:w}=te(),{handleSubmitText:b}=dt(),[k,x]=a(new Set),[E,P]=a(!1),C={cursor:E?`url("${null==(r=v.general)?void 0:r.actionDisabledIcon}"), auto`:"pointer",color:null==(o=v.general)?void 0:o.primaryColor,borderColor:null==(i=v.general)?void 0:i.primaryColor,...y.botCheckboxRowStyle},S={cursor:E||k.size<e.min?`url("${null==(l=v.general)?void 0:l.actionDisabledIcon}"), auto`:"pointer",color:null==(A=v.general)?void 0:A.primaryColor,borderColor:null==(c=v.general)?void 0:c.primaryColor,...y.botCheckboxNextStyle},D={cursor:E?`url("${null==(u=v.general)?void 0:u.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...y.botCheckMarkStyle},B={cursor:E?`url("${null==(d=v.general)?void 0:d.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:null==(f=v.general)?void 0:f.primaryColor,backgroundColor:null==(p=v.general)?void 0:p.primaryColor,...y.botCheckMarkSelectedStyle};s(()=>{w.length>0&&w[w.length-1]!==n&&P(!e.reusable)},[w]);return g("div",{className:"rcb-checkbox-container "+(null!=(m=v.botBubble)&&m.showAvatar?"rcb-checkbox-offset":""),children:[e.items.map(n=>h("div",{onMouseDown:r=>{r.preventDefault(),(n=>{E||x(r=>{const o=new Set(r);if(o.has(n))t.delete(n),o.delete(n);else{if(k.size==e.max)return r;t.add(n),o.add(n)}return o})})(n)},style:C,className:"rcb-checkbox-row-container",children:g("div",{className:"rcb-checkbox-row",children:[h("div",{style:k.has(n)?B:D,className:"rcb-checkbox-mark"}),h("div",{className:"rcb-checkbox-label",children:n})]})},n)),h("div",{style:S,className:"rcb-checkbox-next-button",onMouseDown:n=>{var r;if(n.preventDefault(),E||k.size<e.min)return;const o=Array.from(t).join(", ");let i;P(!e.reusable),i=null!=e.sendOutput?e.sendOutput:(null==(r=v.chatInput)?void 0:r.sendCheckboxOutput)??!0,b(o,i)}})]})},pe=async(e,t)=>{const n=e.checkboxes;if(!n)return;let r;if("function"==typeof n?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||0==r.items.length)return;null==r.min&&(r.min=1),null==r.max&&(r.max=r.items.length),r.min>r.max&&(r.min=r.max),null==r.reusable&&(r.reusable=!1);const o=new Set,i=t.currPath,l=h(fe,{checkboxes:r,checkedItems:o,path:i});await t.injectMessage(l)},he=async(e,t)=>{const n=e.function;if(!n)return;const r=n(t);return r instanceof Promise?await r:r},ge=async(e,t,n)=>{const r=e.message;if(!r)return;if("string"==typeof r)return void(""!==r.trim()&&(n?await t.simulateStreamMessage(r):await t.injectMessage(r)));let o=r(t);o instanceof Promise&&(o=await o),"string"==typeof o&&""!==o.trim()&&(n?await t.simulateStreamMessage(o):await t.injectMessage(o))},me=({options:e,path:t})=>{var n,r,o,i,l,A;const{settings:c}=R(),{styles:u}=j(),{paths:d}=te(),{handleSubmitText:f}=dt(),[p,g]=a([]),[m,v]=a(!1),y={cursor:m?`url("${null==(n=c.general)?void 0:n.actionDisabledIcon}"), auto`:"pointer",color:null==(r=c.general)?void 0:r.primaryColor,borderColor:null==(o=c.general)?void 0:o.primaryColor,backgroundColor:"#fff",...u.botOptionStyle},w={color:"#fff",borderColor:null==(i=c.general)?void 0:i.primaryColor,backgroundColor:null==(l=c.general)?void 0:l.primaryColor,...u.botOptionHoveredStyle};s(()=>{d.length>0&&d[d.length-1]!==t&&v(!e.reusable)},[d]);return h("div",{className:"rcb-options-container "+(null!=(A=c.botBubble)&&A.showAvatar?"rcb-options-offset":""),children:e.items.map((t,n)=>{const r=p[n]&&!m;return h("div",{className:"rcb-options",style:r?w:y,onMouseEnter:()=>(e=>{g(t=>{const n=[...t];return n[e]=!0,n})})(n),onMouseLeave:()=>(e=>{g(t=>{const n=[...t];return n[e]=!1,n})})(n),onMouseDown:n=>{var r;if(n.preventDefault(),m)return;let o;v(!e.reusable),o=null!=e.sendOutput?e.sendOutput:(null==(r=c.chatInput)?void 0:r.sendOptionOutput)??!0,f(t,o)},children:t},t)})})},ve=async(e,t)=>{const n=e.options;if(!n)return;let r;if("function"==typeof n?(r=n(t),r instanceof Promise&&(r=await r)):r=n,Array.isArray(r)&&(r={items:r}),!("items"in r)||0==r.items.length)return;null==r.reusable&&(r.reusable=!1);const o=t.currPath,i=h(me,{options:r,path:o});await t.injectMessage(i)},ye=async(e,t)=>{const n=e.component;if(n){if("function"==typeof n){let e=n(t);if(e instanceof Promise&&(e=await e),!e)return;return void await t.injectMessage(e)}await t.injectMessage(n)}},we=async(e,t,n,r)=>{const o=e.transition;let i;if("function"==typeof o?(i=o(t),i instanceof Promise&&(i=await i)):i=o,"number"==typeof i&&(i={duration:i}),!i||i instanceof Promise||null==i.duration||"number"!=typeof i.duration)return;null==i.interruptable&&(i.interruptable=!1);const l=setTimeout(async()=>{const n=await r(e);n&&await xe(n,t)},i.duration);i.interruptable&&(n.current=l)},be=async(e,t,n)=>{const r=e.chatDisabled;if(null==r)return;let o;"function"==typeof r?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},ke=async(e,t,n)=>{const r=e.isSensitive;if(!r)return void n(!1);let o;"function"==typeof r?(o=r(t),o instanceof Promise&&(o=await o)):o=r,n(o)},xe=async(e,t)=>{if(!e)throw new Error("Block is not valid.");const n=Object.keys(e);for(const r of n)"function"===r&&await he(e,t);n.includes("path")&&await(async(e,t)=>{const n=e.path;if(!n)return!1;if("string"==typeof n)return await t.goToPath(n),!0;let r=n(t);if(r instanceof Promise&&(r=await r),!r)return!1;const o=r;return await t.goToPath(o),!0})(e,t)},Ee=()=>{var e;const{settings:t}=R(),{styles:n}=j();return h("div",{className:"rcb-line-break-container",children:h("div",{style:{...n.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:null==(e=t.chatHistory)?void 0:e.chatHistoryLineBreakText})})},Pe=()=>{var e;const{settings:t}=R(),{styles:n}=j(),r={borderTop:`4px solid ${null==(e=t.general)?void 0:e.primaryColor}`,...n.loadingSpinnerStyle};return h("div",{className:"rcb-spinner-container",children:h("div",{style:r,className:"rcb-spinner"})})},Ce=()=>{try{if(typeof crypto<"u"&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();throw new Error("crypto.randomUUID not available")}catch(e){if(typeof crypto<"u"&&"function"==typeof crypto.getRandomValues)return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=crypto.getRandomValues(new Uint8Array(1))[0]%16;return("x"===e?t:3&t|8).toString(16)});throw console.error(e),new Error("crypto.getRandomValues is also not available")}},Se=(e,t)=>({id:Ce(),content:e,sender:t,type:"string"==typeof e?"string":"object",timestamp:(new Date).toUTCString(),tags:[]});let De,Be=!1,Ie="rcb-history",Te=30,Qe=!1,Me=[];const Oe=()=>Me,Le=e=>{Ne(e),Me=e},Ne=e=>{De&&De.setItem(Ie,JSON.stringify(e))},Re=e=>{var t,n,r,o,i;De="SESSION_STORAGE"===(null==(n=null==(t=e.chatHistory)?void 0:t.storageType)?void 0:n.toUpperCase())?sessionStorage:localStorage,Ie=null==(r=e.chatHistory)?void 0:r.storageKey,Te=null==(o=e.chatHistory)?void 0:o.maxEntries,Qe=null==(i=e.chatHistory)?void 0:i.disabled,Me=(e=>{if(null!=e)try{return JSON.parse(e)}catch{return[]}return[]})(De.getItem(Ie))},He=e=>c(e.content)?structuredClone({id:e.id,content:v.renderToString(e.content),type:e.type,sender:e.sender.toUpperCase(),timestamp:e.timestamp,tags:e.tags}):e,Fe=(e,t,n)=>{const r=(new DOMParser).parseFromString(e,"text/html");return Array.from(r.body.childNodes).map((e,r)=>{var o;if(e.nodeType===Node.TEXT_NODE)return e.textContent;{const i=e.tagName.toLowerCase();let l=Array.from(e.attributes).reduce((e,t)=>{const n=t.name.toLowerCase();if("style"===n){const r=t.value.split(";").filter(e=>""!==e.trim()),o={};r.forEach(e=>{const[t,n]=e.split(":").map(e=>e.trim()),r=t.replace(/-([a-z])/g,(e,t)=>t.toUpperCase());o[r]=n}),e[n]=o}else"audio"!==i&&"video"!==i||"controls"!==n||""!==t.value?e[n]=t.value:e[n]="true";return e},{});if(Object.prototype.hasOwnProperty.call(l,"class")){const r=e.classList;l.className=r.toString(),delete l.class,null!=(o=t.botBubble)&&o.showAvatar&&(l=ze(r,l)),l=je(r,l,t,n),l=Ue(r,l,t,n),l=_e(r,l,t,n),l=qe(r,l,t,n)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(i))return d(i,{key:r,...l});{const o=Fe(e.innerHTML,t,n);return d(i,{key:r,...l},...o)}}})},ze=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),je=(e,t,n,r)=>{var o,i,l,a,s;return e.contains("rcb-options")&&(t.style={...t.style,color:(null==(o=r.botOptionStyle)?void 0:o.color)??(null==(i=n.general)?void 0:i.primaryColor),borderColor:(null==(l=r.botOptionStyle)?void 0:l.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botOptionStyle}),t},Ue=(e,t,n,r)=>{var o,i,l,a,s;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:(null==(o=r.botCheckboxRowStyle)?void 0:o.color)??(null==(i=n.general)?void 0:i.primaryColor),borderColor:(null==(l=r.botCheckboxRowStyle)?void 0:l.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botCheckboxRowStyle}),t},_e=(e,t,n,r)=>{var o,i,l,a,s;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:(null==(o=r.botCheckboxNextStyle)?void 0:o.color)??(null==(i=n.general)?void 0:i.primaryColor),borderColor:(null==(l=r.botCheckboxNextStyle)?void 0:l.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botCheckboxNextStyle}),t},qe=(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:null==(o=n.general)?void 0:o.primaryColor,maxWidth:null!=(i=n.userBubble)&&i.showAvatar?"65%":"70%",...r.mediaDisplayContainerStyle}),t},Ve=()=>{const{settings:e}=R(),{notificationsToggledOn:t,setSyncedNotificationsToggledOn:n,hasInteractedPage:r,unreadCount:o,setUnreadCount:l,syncedNotificationsToggledOnRef:a}=K(),{audioBufferRef:s,audioContextRef:A,gainNodeRef:c}=V(),{dispatchRcbEvent:u}=re(),d=i(async()=>{var t,n;const r=null==(t=e.notification)?void 0:t.sound;A.current=new AudioContext;const o=A.current.createGain();let i;if(o.gain.value=(null==(n=e.notification)?void 0:n.volume)??.2,c.current=o,null!=r&&r.startsWith("data:audio")){const e=atob(r.split(",")[1]),t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);i=t}else i=await(await fetch(r)).arrayBuffer();s.current=await A.current.decodeAudioData(i)},[e.notification]),f=i(()=>{var t;if(null!=(t=e.notification)&&t.disabled||!a.current||!r||!A.current||!s.current)return;const n=A.current.createBufferSource();n.buffer=s.current,n.connect(c.current).connect(A.current.destination),n.start()},[e.notification,a,r,A,s,c]);return{unreadCount:o,setUnreadCount:l,notificationsToggledOn:t,toggleNotifications:i(async t=>{var r;t!==a.current&&(null!=(r=e.event)&&r.rcbToggleNotifications&&(await u(J.TOGGLE_NOTIFICATIONS,{currState:a.current,newState:!a.current})).defaultPrevented||n(e=>!e))},[a]),playNotificationSound:f,setUpNotifications:d}},Ge=(e,t)=>{var n,r,o,i;((e,t,n,r,o)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const i=new window.SpeechSynthesisUtterance;i.text=e,i.lang=t,i.rate=r,i.volume=o;let l=!1;for(const e of n){const t=window.speechSynthesis.getVoices().find(t=>t.name===e);if(t){i.voice=t,window.speechSynthesis.speak(i),l=!0;break}}l||window.speechSynthesis.speak(i)})(t,null==(n=e.audio)?void 0:n.language,null==(r=e.audio)?void 0:r.voiceNames,null==(o=e.audio)?void 0:o.rate,null==(i=e.audio)?void 0:i.volume)},We=()=>{const{settings:e}=R(),{audioToggledOn:t,setSyncedAudioToggledOn:n,syncedAudioToggledOnRef:r}=K(),{dispatchRcbEvent:o}=re(),l=i(async t=>{var i;t!==r.current&&(null!=(i=e.event)&&i.rcbToggleAudio&&(await o(J.TOGGLE_AUDIO,{currState:r.current,newState:!r.current})).defaultPrevented||n(e=>!e))},[r]),a=i(async t=>{var n,i;if(null!=(n=e.audio)&&n.disabled||!r.current)return;let l=t;if(null!=(i=e.event)&&i.rcbStartSpeakAudio){const e=await o(J.START_SPEAK_AUDIO,{textToRead:l});if(e.defaultPrevented)return;l=e.data.textToRead}Ge(e,l)},[e,r]);return{audioToggledOn:t,speakAudio:a,toggleAudio:l}},Ye=()=>{var e,t,n;const{settings:r}=R(),{messages:o,setSyncedMessages:l,syncedMessagesRef:a}=ae(),{setSyncedIsBotTyping:s,setUnreadCount:A,syncedIsScrollingRef:c,syncedIsChatWindowOpenRef:u}=K(),{streamMessageMap:d,chatBodyRef:f,paramsInputRef:p}=V(),{scrollToBottom:h,getIsChatBotVisible:g}=oe(),{dispatchRcbEvent:m}=re(),{speakAudio:v}=We(),{playNotificationSound:y}=Ve(),w=i(async e=>{var t,n;if(null!=(t=r.event)&&t.rcbSaveChatHistory){const t=await m(J.SAVE_CHAT_HISTORY,{messages:e});if(t.defaultPrevented)return;e=(null==(n=t.data)?void 0:n.messages)??e}await(async e=>{if(Qe||!De)return;const t=[];for(let n=e.length-1;n>=0;n--){const r=e[n];if("SYSTEM"!==r.sender.toUpperCase()&&(""!==r.content&&t.unshift(r),t.length===Te))break}let n=t.map(He);if(!Be&&n.length<Te){const e=Te-n.length;n=[...Me.slice(-e),...n]}Ne(n)})(e)},[m,null==(e=r.event)?void 0:e.rcbSaveChatHistory]),b=i((e,t=!1)=>{var n,o;w(e);let i=!0;const l=e[e.length-1];if(!l)return;const a=l.sender.toUpperCase();"USER"===a&&(i=!1),null!=(n=r.general)&&n.embedded&&g()&&(i=!1),(u.current&&!c.current||t)&&(i=!1),i&&y(),!t&&("USER"!==a&&null!=(o=r.chatWindow)&&o.autoJumpToBottom||"USER"===a||!c.current)&&setTimeout(()=>h(),1)},[r,f,u,c,y,h,g]),k=i(async(e,t="BOT",n=null)=>{var o,i,d,f,h;if("string"!=typeof e)throw new Error("Content must be of type string to simulate stream.");t=t.toUpperCase();let g=Se(e,t);if(null!=(o=r.event)&&o.rcbStartSimulateStreamMessage){const e=await m(J.START_SIMULATE_STREAM_MESSAGE,{message:g});if(e.defaultPrevented)return null;n=e.data.simulateStreamChunker||n,g=e.data.message}s(!1);let y=30;y="BOT"===t?null==(i=r.botBubble)?void 0:i.streamSpeed:null==(d=r.userBubble)?void 0:d.streamSpeed;const k={...g,content:""};l(e=>[...e,k]),b(a.current);let x=g.content;n&&(x=n(x));let E=0;const P=x.length;"BOT"===g.sender.toUpperCase()&&(u.current||null!=(f=r.general)&&f.embedded)&&"string"==typeof g.content&&""!==g.content.trim()&&v(g.content);const C=new Promise(e=>{const t=setInterval(()=>{if(E>=P)return clearInterval(t),void e();l(e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if(t[e].id===k.id){const n=x[E];n&&(k.content+=n,t[e]=k),E++;break}return t})},y)});return(c.current||!u.current)&&A(e=>e+1),await C,w(a.current),null!=(h=r.event)&&h.rcbStopSimulateStreamMessage&&await m(J.STOP_SIMULATE_STREAM_MESSAGE,{message:g}),"USER"===t&&(p.current=e),g},[r,m,b,a,p,s,A,u,v]),x=i(async(e,t="BOT")=>{var n,o,i;t=t.toUpperCase();let s=Se(e,t);if(null!=(n=r.event)&&n.rcbPreInjectMessage){const e=await m(J.PRE_INJECT_MESSAGE,{message:s});if(e.defaultPrevented)return null;s=e.data.message}return"BOT"===s.sender.toUpperCase()&&(u.current||null!=(o=r.general)&&o.embedded)&&"string"==typeof s.content&&""!==s.content.trim()&&v(s.content),(c.current||!u.current)&&A(e=>e+1),null!=(i=r.event)&&i.rcbPostInjectMessage&&await m(J.POST_INJECT_MESSAGE,{message:s}),l(e=>[...e,s]),b(a.current),"USER"===t&&"string"==typeof e&&(p.current=e),s},[r,m,b,p,a,u,v,A]),E=i(async e=>{var t;let n=a.current.find(t=>t.id===e),o=null,i=!1;return n||(o=Oe(),n=o.find(t=>t.id===e),n&&(i=!0)),!n||null!=(t=r.event)&&t.rcbRemoveMessage&&(await m(J.REMOVE_MESSAGE,{message:n})).defaultPrevented?null:i?(o&&Le(o.filter(t=>t.id!==e)),n):(l(t=>t.filter(t=>t.id!==e)),b(a.current),A(e=>Math.max(e-1,0)),n)},[m,null==(t=r.event)?void 0:t.rcbRemoveMessage,b,a,A,Oe,Le]),P=i(async(e,t="BOT")=>{var n,o;if(t=t.toUpperCase(),!d.current.has(t)){const o=Se(e,t);return null!=(n=r.event)&&n.rcbStartStreamMessage&&(await m(J.START_STREAM_MESSAGE,{message:o})).defaultPrevented?null:(s(!1),l(e=>[...e,o]),b(a.current),d.current.set(t,o.id),(c.current||!u.current)&&A(e=>e+1),o)}const i={...Se(e,t),id:d.current.get(t)};return null!=(o=r.event)&&o.rcbChunkStreamMessage&&(await m(J.CHUNK_STREAM_MESSAGE,{message:i})).defaultPrevented?null:(l(e=>e.map(e=>e.id===i.id?i:e)),b(a.current,!0),i)},[m,r.event,b,a,s,A,d]),C=i(async(e="BOT")=>{var t;if(e=e.toUpperCase(),!d.current.has(e))return!0;const n=d.current.get(e);let o;for(let e=0;e<3;e++){const e=a.current.find(e=>e.id===n);e&&(o=e),await new Promise(e=>setTimeout(e,20))}return(null==(t=r.event)||!t.rcbStopStreamMessage||!(await m(J.STOP_STREAM_MESSAGE,{message:o})).defaultPrevented)&&(d.current.delete(e),w(a.current),"USER"===e&&"string"==typeof(null==o?void 0:o.content)&&(p.current=o.content),!0)},[m,null==(n=r.event)?void 0:n.rcbStopStreamMessage,d,p]),S=i(e=>{const t="function"==typeof e?e(a.current):e;l(t),b(t)},[b,a]),D=i((e,t,n=0)=>{var r;const o=a.current,i=e?e.toUpperCase():null,l=[];let s=n;for(let e=o.length-1;e>=0;e--){const n=o[e];if(!i||(null==(r=null==n?void 0:n.sender)?void 0:r.toUpperCase())===i){if(s>0){s--;continue}if(l.push(n),void 0!==t&&l.length===t)break}}return l.length>0?l:null},[a]);return{simulateStreamMessage:k,injectMessage:x,removeMessage:E,streamMessage:P,endStreamMessage:C,replaceMessages:S,getMessages:D,messages:o}};let Ke,Xe,Je,Ze=!1,$e=null;const et=()=>{if(!Ke){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Ke=null!=e?new e:null}return Ke},tt=(e,t,n,r,o,i)=>{var l,a,s;const A=et();if(!A)return;if(!Ze)try{Ze=!0,A.lang=null==(l=e.voice)?void 0:l.language,A.start()}catch{}const c=null==(a=e.voice)?void 0:a.timeoutPeriod,u=null==(s=e.voice)?void 0:s.autoSendPeriod;A.onresult=l=>{var a,s;clearTimeout(Xe),Xe=null,clearTimeout(Je);const A=l.results[l.results.length-1][0].transcript;if(i.current){const t=null==(a=e.chatInput)?void 0:a.characterLimit,n=i.current.value+A;null!=t&&t>=0&&n.length>t?r(n.slice(0,t)):r(n),o(i.current.value.length)}c&&(Xe=setTimeout(async()=>await ot(t,i),c)),null!=(s=e.voice)&&s.autoSendDisabled||(Je=setTimeout(n,u))},A.onend=()=>{Ze?(A.start(),!Xe&&c&&(Xe=setTimeout(async()=>await ot(t,i),c))):(clearTimeout(Xe),Xe=null,clearTimeout(Je))},c&&(Xe=setTimeout(async()=>await ot(t,i),c))},nt=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(n=>{if($e=new MediaRecorder(n),!Ze)try{Ze=!0,$e.start()}catch{}$e.ondataavailable=e=>{t.current&&t.current.push(e.data)},$e.onstop=()=>{e(),n.getTracks().forEach(e=>e.stop())}}).catch(e=>{console.error("Unable to use microphone:",e)})},rt=()=>{const e=et();e&&(Ze=!1,e&&e.stop(),$e&&"inactive"!==$e.state&&($e.stop(),$e=null),clearTimeout(Xe),Xe=null,clearTimeout(Je))},ot=async(e,t)=>{var n;null!=(n=t.current)&&n.disabled||await e(),rt()},it=()=>{const{settings:e}=R(),{voiceToggledOn:t,setSyncedVoiceToggledOn:n,syncedVoiceToggledOnRef:r}=K(),{dispatchRcbEvent:o}=re(),l=i(async t=>{var i;t!==r.current&&(null!=(i=e.event)&&i.rcbToggleVoice&&(await o(J.TOGGLE_VOICE,{currState:r.current,newState:!r.current})).defaultPrevented||n(e=>!e))},[r]),a=i(t=>{((e,t)=>{var n,r,o;const i=et();null!=(n=t.voice)&&n.disabled||null==(r=t.chatInput)||!r.blockSpam||!i||(e&&!Ze?(Ze=!0,null!=(o=t.voice)&&o.sendAsAudio?null==$e||$e.start():i.start()):e||rt())})(t,e)},[e]);return{voiceToggledOn:t,toggleVoice:l,syncVoice:a}},lt=()=>{var e;const{settings:t}=R(),{inputLength:n,setInputLength:r,textAreaDisabled:o,setSyncedTextAreaDisabled:l,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:A,syncedTextAreaSensitiveModeRef:c}=K(),{inputRef:u,chatBodyRef:d,prevInputRef:f}=V(),{dispatchRcbEvent:p}=re(),{getIsChatBotVisible:h}=oe(),g=i(async e=>{var n,r,o;if(A.current&&u.current)u.current.value="";else if(u.current&&null!==f.current){const i=null==(n=t.chatInput)?void 0:n.characterLimit,l=(null==(r=t.chatInput)?void 0:r.allowNewline)?e:e.replace(/\n/g," ");if(null!=i&&i>=0&&l.length>i?u.current.value=l.slice(0,i):u.current.value=l,null!=(o=t.event)&&o.rcbTextAreaChangeValue&&(await p(J.TEXT_AREA_CHANGE_VALUE,{currValue:u.current.value,prevValue:f.current})).defaultPrevented)return void(u.current.value=f.current);f.current=u.current.value}},[A,u,f,t,p]),m=i(e=>{var n;null!=(n=u.current)&&n.disabled||setTimeout(()=>{var n,r,o;null!=(n=t.general)&&n.embedded?h()&&(null==(r=u.current)||r.focus()):"start"!==e&&(null==(o=u.current)||o.focus())},100)},[u,null==(e=t.general)?void 0:e.embedded,d,h]),v=i(()=>{u.current&&u.current.focus()},[]),y=i(()=>{u.current&&u.current.blur()},[]),w=i(()=>u&&u.current?u.current.value:"",[]),b=i(e=>{e!==A.current&&l(e=>!e)},[A]),k=i(e=>{e!==c.current&&s(e=>!e)},[c]);return{textAreaDisabled:o,setSyncedTextAreaDisabled:l,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,inputLength:n,setInputLength:r,getTextAreaValue:w,setTextAreaValue:g,updateTextAreaFocus:m,focusTextArea:v,blurTextArea:y,toggleTextAreaDisabled:b,toggleTextAreaSensitiveMode:k}},at=r({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),st=()=>o(at),At=({children:e})=>{const[t,n,r]=W([]);return h(at.Provider,{value:{toasts:t,setSyncedToasts:n,syncedToastsRef:r},children:e})},ct=()=>{const{settings:e}=R(),{toasts:t,setSyncedToasts:n,syncedToastsRef:r}=st(),{dispatchRcbEvent:o}=re(),l=i(async(t,i)=>{var l,a,s,A;let c=null;if(r.current.length>=((null==(l=e.toast)?void 0:l.maxCount)??3)){if(null!=(a=e.toast)&&a.forbidOnMax)return null;c=Ce();let r={id:c,content:t,timeout:i};if(null!=(s=e.event)&&s.rcbShowToast){const e=await o(J.SHOW_TOAST,{toast:r});if(e.defaultPrevented)return null;r=e.data.toast}return n(e=>[...e.slice(1),r]),c}c=Ce();let u={id:c,content:t,timeout:i};if(null!=(A=e.event)&&A.rcbShowToast){const e=await o(J.SHOW_TOAST,{toast:u});if(e.defaultPrevented)return null;u=e.data.toast}return n(e=>[...e,u]),c},[e,o]),a=i(async t=>{var i;const l=r.current.find(e=>e.id===t);return!l||null!=(i=e.event)&&i.rcbDismissToast&&(await o(J.DISMISS_TOAST,{toast:l})).defaultPrevented?null:(n(e=>e.filter(e=>e.id!==t)),t)},[o]),s=i(e=>{const t="function"==typeof e?e(r.current):e;n(t)},[r]);return{showToast:l,dismissToast:a,toasts:t,replaceToasts:s}},ut=()=>{var e,t,n,r,o;const{settings:l}=R(),{paths:a,setSyncedPaths:s,syncedPathsRef:A}=te(),{flowRef:c,streamMessageMap:u,paramsInputRef:d,keepVoiceOnRef:f,timeoutIdRef:p}=V(),{setSyncedIsBotTyping:h,setSyncedTextAreaDisabled:g,setSyncedTextAreaSensitiveMode:m,blockAllowsAttachment:v,setBlockAllowsAttachment:y}=K(),{dispatchRcbEvent:w}=re(),{endStreamMessage:b,injectMessage:k,removeMessage:x,simulateStreamMessage:E,streamMessage:P}=Ye(),{showToast:C,dismissToast:S}=ct(),{toggleChatWindow:D}=oe(),{updateTextAreaFocus:B,setTextAreaValue:I}=lt(),{syncVoice:T}=it(),Q=i(async e=>{var t;if(null!=(t=l.event)&&t.rcbPostProcessBlock){const t=await w(J.POST_PROCESS_BLOCK,{block:e});if(t.defaultPrevented)return null;e=t.data.block}return e},[null==(e=l.event)?void 0:e.rcbPostProcessBlock,w]),M=i(async(e,t)=>{var n,r,o,i;if(!e)return;let a=c.current[e];if(!a)return void h(!1);if(null!=(n=l.event)&&n.rcbPreProcessBlock){const e=await w(J.PRE_PROCESS_BLOCK,{block:a});if(e.defaultPrevented)return;a=e.data.block}h(!0),null!=(r=l.chatInput)&&r.blockSpam&&g(!0),m(!1);const s={prevPath:t,currPath:e,goToPath:N,setTextAreaValue:I,userInput:d.current,endStreamMessage:b,injectMessage:k,removeMessage:x,simulateStreamMessage:E,streamMessage:P,toggleChatWindow:D,showToast:C,dismissToast:S};await(async(e,t,n,r,o,i,l)=>{if(!e)throw new Error("Block is not valid.");for(const a of Object.keys(e))switch(a){case"message":await ge(e,t,n);break;case"options":await ve(e,t);break;case"checkboxes":await pe(e,t);break;case"component":await ye(e,t);break;case"chatDisabled":await be(e,t,o);break;case"isSensitive":await ke(e,t,i);break;case"transition":await we(e,t,r,l)}})(a,s,(null==(o=l.botBubble)?void 0:o.simulateStream)??!1,p,g,m,Q),h(!1),"chatDisabled"in a||g(null==(i=l.chatInput)?void 0:i.disabled),"isSensitive"in a||m(!1),y("function"==typeof a.file),B(e),T(f.current&&!a.chatDisabled),e!==t&&u.current.clear()},[c,B,T,null==(t=l.botBubble)?void 0:t.simulateStream,null==(n=l.chatInput)?void 0:n.disabled,d,b,k,x,E,P,D,C,S,f,u]),O=i(()=>A.current.length>0?A.current.at(-1)??null:null,[]),L=i(()=>A.current.length>1?A.current.at(-2)??null:null,[]),N=i(async e=>{var t;const n=O(),r=L();return(null==(t=l.event)||!t.rcbChangePath||!(await w(J.CHANGE_PATH,{currPath:n,prevPath:r,nextPath:e})).defaultPrevented)&&(s(t=>[...t,e]),await M(e,n),!0)},[null==(r=l.chatInput)?void 0:r.blockSpam,null==(o=l.event)?void 0:o.rcbChangePath,M,w]),H=i(e=>{const t="function"==typeof e?e(A.current):e;s(t)},[A]);return{getCurrPath:O,getPrevPath:L,goToPath:N,blockAllowsAttachment:v,setBlockAllowsAttachment:y,paths:a,replacePaths:H,firePostProcessBlockEvent:Q}},dt=()=>{var e,t,n,r;const{settings:o}=R(),{endStreamMessage:l,injectMessage:a,removeMessage:s,simulateStreamMessage:A,streamMessage:c}=Ye(),{syncedPathsRef:u}=te(),{getCurrPath:d,getPrevPath:f,goToPath:p,firePostProcessBlockEvent:h}=ut(),{setSyncedTextAreaSensitiveMode:g,setSyncedTextAreaDisabled:m,setSyncedIsBotTyping:v,setBlockAllowsAttachment:y,setInputLength:w,syncedVoiceToggledOnRef:b,syncedTextAreaSensitiveModeRef:k}=K(),{flowRef:x,inputRef:E,keepVoiceOnRef:P,paramsInputRef:C,timeoutIdRef:S}=V(),{showToast:D,dismissToast:B}=ct(),{dispatchRcbEvent:I}=re(),{syncVoice:T}=it(),{setTextAreaValue:Q}=lt(),{toggleChatWindow:M}=oe(),O=i(async e=>{var t,n,r,i,l,s;const c=d();if(c&&x.current[c]){if(k.current){if(null!=(t=null==o?void 0:o.sensitiveInput)&&t.hideInUserBubble)return;if(null!=(n=null==o?void 0:o.sensitiveInput)&&n.maskInUserBubble)return void(null!=(r=o.userBubble)&&r.simulateStream?await A("*".repeat((null==(i=o.sensitiveInput)?void 0:i.asterisksCount)??10),"USER"):await a("*".repeat((null==(l=o.sensitiveInput)?void 0:l.asterisksCount)??10),"USER"))}null!=(s=o.userBubble)&&s.simulateStream?await A(e,"USER"):await a(e,"USER")}},[x,d,o,a,A,k]),L=i(async(e,t=!0)=>{var n,r;if(""===(e=e.trim()))return;t&&await O(e),S.current&&clearTimeout(S.current),E.current&&(Q(""),w(0));const i=d();if(!i)return;let k=x.current[i];const I=await h(k);I&&(null!=(n=o.chatInput)&&n.blockSpam&&m(!0),P.current=b.current,T(!1),setTimeout(()=>{v(!0)},400),g(!1),setTimeout(async()=>{var e;const t={prevPath:f(),currPath:d(),goToPath:p,setTextAreaValue:Q,userInput:C.current,injectMessage:a,simulateStreamMessage:A,streamMessage:c,removeMessage:s,endStreamMessage:l,toggleChatWindow:M,showToast:D,dismissToast:B},n=u.current.length;await xe(I,t),u.current.length===n&&(m("chatDisabled"in k?!!k.chatDisabled:!(null==(e=o.chatInput)||!e.disabled)),ke(k,t,g),y("function"==typeof k.file),T(P.current),v(!1))},null==(r=o.chatInput)?void 0:r.botDelay))},[S,null==(e=o.chatInput)?void 0:e.blockSpam,null==(t=o.chatInput)?void 0:t.botDelay,null==(n=o.chatInput)?void 0:n.disabled,P,b,T,O,f,d,p,a,A,c,s,l,M,D,B,x]);return{handleSubmitText:i(async(e,t=!0)=>{var n,r;e=e??(null==(n=E.current)?void 0:n.value),!(null!=(r=o.event)&&r.rcbUserSubmitText&&(await I(J.USER_SUBMIT_TEXT,{inputText:e,sendInChat:t})).defaultPrevented||!d())&&L(e,t)},[I,d,L,E,null==(r=o.event)?void 0:r.rcbUserSubmitText])}},ft=()=>{var e;const{settings:t}=R();return A(()=>{var e;if(typeof window>"u"||!window.navigator)return!1;if(null==(e=t.device)||!e.applyMobileOptimizations)return!0;const n=navigator.userAgent,r=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(n),o=window.innerWidth>=768;return r&&o},[null==(e=t.device)?void 0:e.applyMobileOptimizations])},pt=({buttons:e})=>{var t,n,r,o,i,l,s,A,c,d,f;const p=ft(),{settings:v}=R(),{styles:y}=j(),{textAreaDisabled:w,textAreaSensitiveMode:b,inputLength:k,hasFlowStarted:x,setHasFlowStarted:E,setInputLength:P}=K(),{inputRef:C}=V(),[S,D]=a(!1),[B,I]=a(!1),{handleSubmitText:T}=dt(),{setTextAreaValue:Q}=lt(),M={boxSizing:p?"content-box":"border-box",...y.chatInputAreaStyle},O={outline:w?"":"none",boxShadow:w?"":`0 0 5px ${null==(t=v.general)?void 0:t.primaryColor}`,boxSizing:p?"content-box":"border-box",...y.chatInputAreaStyle,...y.chatInputAreaFocusedStyle},L={cursor:`url("${null==(n=v.general)?void 0:n.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:p?"content-box":"border-box",...y.chatInputAreaStyle,...y.chatInputAreaDisabledStyle},N={color:"#989898",...y.characterLimitStyle},H={color:"#ff0000",...y.characterLimitReachedStyle},F=w?null==(r=v.chatInput)?void 0:r.disabledPlaceholderText:null==(o=v.chatInput)?void 0:o.enabledPlaceholderText,z=()=>{w||D(!0)},U=()=>{D(!1)},_=()=>{I(!0)},q=()=>{I(!1)},G=async e=>{var t;if(!B&&"Enter"===e.key){if(e.shiftKey)return void(null!=(t=v.chatInput)&&t.allowNewline||e.preventDefault());e.preventDefault(),await T()}},W=e=>{C.current&&(Q(e.target.value),P(C.current.value.length))};return g("div",{"aria-label":(null==(i=v.ariaLabel)?void 0:i.inputTextArea)??"input text area",role:"textbox",onMouseDown:e=>{var t;e.stopPropagation(),!x&&"ON_CHATBOT_INTERACT"===(null==(t=v.general)?void 0:t.flowStartTrigger)&&E(!0)},style:{...y.chatInputContainerStyle},className:"rcb-chat-input",children:[b&&null!=(l=v.sensitiveInput)&&l.maskInTextArea?h("input",{ref:C,type:"password",className:"rcb-chat-input-textarea",style:w?L:S?O:M,placeholder:F,onChange:W,onKeyDown:G,onFocus:z,onBlur:U,onCompositionStart:_,onCompositionEnd:q}):h("textarea",{ref:C,style:w?L:S?O:M,rows:1,className:"rcb-chat-input-textarea",placeholder:F,onChange:W,onKeyDown:G,onFocus:z,onBlur:U,onCompositionStart:_,onCompositionEnd:q}),g(m,{children:[null==e?void 0:e.map((e,t)=>h(u,{children:e},t)),(null==(s=v.chatInput)?void 0:s.showCharacterCount)&&null!=(null==(A=v.chatInput)?void 0:A.characterLimit)&&(null==(c=v.chatInput)?void 0:c.characterLimit)>0&&g("div",{className:"rcb-chat-input-char-counter",style:k>=(null==(d=v.chatInput)?void 0:d.characterLimit)?H:N,children:[k,"/",null==(f=v.chatInput)?void 0:f.characterLimit]})]})]})},ht=({buttons:e})=>{var t;const{settings:n}=R(),{styles:r}=j();return g("div",{"data-testid":"chatbot-footer-container",style:{...r.footerStyle},className:"rcb-chat-footer-container",children:[h("div",{className:"rcb-chat-footer",children:null==e?void 0:e.map((e,t)=>h(u,{children:e},t))}),h("span",{children:null==(t=n.footer)?void 0:t.text})]})},gt=()=>{var e,t,n,r,o,i,l;const{settings:s}=R(),{styles:A}=j(),{unreadCount:c}=K(),{isChatWindowOpen:u,toggleChatWindow:d}=oe(),[f,p]=a(!1),v={backgroundImage:`linear-gradient(to right, ${null==(e=s.general)?void 0:e.secondaryColor},\n\t\t\t${null==(t=s.general)?void 0:t.primaryColor})`,...A.chatButtonStyle},y={transform:"scale(1.05)",...v,...A.chatButtonHoveredStyle},w={backgroundImage:`url(${null==(n=s.chatButton)?void 0:n.icon})`,fill:"#fff",width:75,height:75,...A.chatIconStyle};return h(m,{children:!(null!=(r=s.general)&&r.embedded)&&g("div",{"aria-label":(null==(o=s.ariaLabel)?void 0:o.chatButton)??"open chat",role:"button",style:f?y:v,className:"rcb-toggle-button "+(u?"rcb-button-hide":"rcb-button-show"),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)},onClick:()=>d(!0),children:[(()=>{var e;const t=null==(e=s.chatButton)?void 0:e.icon;return t&&"string"!=typeof t?t&&h("span",{className:"rcb-toggle-icon",children:h(t,{style:w})}):h("span",{className:"rcb-toggle-icon",style:w})})(),!(null!=(i=s.notification)&&i.disabled)&&(null==(l=s.notification)?void 0:l.showCount)&&h("span",{style:{...A.notificationBadgeStyle},className:"rcb-badge",children:c})]})})},mt=()=>{var e,t,n,r,o,i;const l=ft(),{settings:A}=R(),{styles:c}=j(),{chatBodyRef:u}=V(),{isChatWindowOpen:d,toggleChatWindow:f}=oe(),[p,v]=a(!1),[y,w]=a(!1),[b,k]=a(0);s(()=>{var e,t,n;const r=null==(e=A.tooltip)?void 0:e.mode;if("ALWAYS"===r)if(l){let e;e=d?((null==(t=u.current)?void 0:t.offsetWidth)??375)-("number"==typeof(null==(n=c.chatButtonStyle)?void 0:n.width)?c.chatButtonStyle.width:75):0,k(e),v(!0)}else v(!d);else"NEVER"===r?v(!1):"START"===r?y?v(!1):(w(!0),v(!0)):"CLOSE"===r&&v(!d)},[d,l,y,null==(e=c.chatButtonStyle)?void 0:e.width,null==(t=A.tooltip)?void 0:t.mode]);const x={transform:`translateX(-${b}px)`,right:((null==(n=c.chatButtonStyle)?void 0:n.width)??75)+40,bottom:30,backgroundColor:null==(r=A.general)?void 0:r.secondaryColor,color:"#fff",...c.tooltipStyle},E={borderColor:`transparent transparent transparent ${x.backgroundColor}`};return h(m,{children:!(null!=(o=A.general)&&o.embedded)&&g("div",{"data-testid":"chat-tooltip",style:x,className:"rcb-chat-tooltip "+(p?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>f(!0),children:[h("span",{children:null==(i=A.tooltip)?void 0:i.text}),h("span",{className:"rcb-chat-tooltip-tail",style:E})]})})},vt=({id:e,content:t,timeout:n})=>{var r,o;const{settings:i}=R(),{styles:l}=j(),[A]=a({toastPromptStyle:{...l.toastPromptStyle},toastPromptHoveredStyle:{...l.toastPromptHoveredStyle}}),{dismissToast:c}=ct(),[u,d]=a(!1),f={color:null==(r=i.general)?void 0:r.primaryColor,borderColor:null==(o=i.general)?void 0:o.primaryColor,...A.toastPromptHoveredStyle};return s(()=>{if(n){const t=setTimeout(()=>{c(e)},n);return()=>clearTimeout(t)}},[e,c,n]),"string"==typeof t?h("div",{onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},style:u?f:A.toastPromptStyle,onMouseDown:async t=>{var n;null!=(n=i.toast)&&n.dismissOnClick&&(t.preventDefault(),await c(e))},className:"rcb-toast-prompt",children:t}):h(m,{children:t})},yt=()=>{var e,t,n,r,o,i,l,a,s,A,c,u;const{styles:d}=j(),{toasts:f}=st(),p={bottom:`calc(${"number"==typeof(null==(e=d.footerStyle)?void 0:e.height)?`${null==(t=d.footerStyle)?void 0:t.height}px`:(null==(n=d.footerStyle)?void 0:n.height)??"50px"} + ${"number"==typeof(null==(r=d.chatInputContainerStyle)?void 0:r.height)?`${null==(o=d.chatInputContainerStyle)?void 0:o.height}px`:(null==(i=d.chatInputContainerStyle)?void 0:i.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${"number"==typeof(null==(l=d.chatWindowStyle)?void 0:l.width)?`${null==(a=d.chatWindowStyle)?void 0:a.width}px`:(null==(s=d.chatWindowStyle)?void 0:s.width)??"375px"} / 2)`,maxWidth:`calc(${"number"==typeof(null==(A=d.chatWindowStyle)?void 0:A.width)?`${null==(c=d.chatWindowStyle)?void 0:c.width}px`:(null==(u=d.chatWindowStyle)?void 0:u.width)??"375px"} - 50px)`,...d.toastPromptContainerStyle};return h("div",{className:"rcb-toast-prompt-container",style:p,children:f.map(e=>h(vt,{id:e.id,content:e.content,timeout:e.timeout},e.id))})},wt=({file:e,fileType:t,fileUrl:n})=>{var r,o,i;const{settings:l}=R(),{styles:a}=j(),s={backgroundColor:null==(r=l.general)?void 0:r.primaryColor,maxWidth:null!=(o=l.userBubble)&&o.showAvatar?"65%":"70%",...a.mediaDisplayContainerStyle};return h(m,{children:n?g(m,{children:["image"===t&&n&&h("div",{style:s,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:h("img",{src:n,alt:"Image Display",className:"rcb-media-display-image"})}),"video"===t&&n&&h("div",{style:s,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:g("video",{controls:!0,className:"rcb-media-display-video",children:[h("source",{src:n,type:e.type}),"Your browser does not support the video tag."]})}),"audio"===t&&n&&g("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:null!=(i=l.userBubble)&&i.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[h("source",{src:n,type:e.type}),"Your browser does not support the audio tag."]})]}):h(m,{})})},bt=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((t,n)=>{const r=new FileReader;r.onload=()=>t(r.result),r.onerror=()=>n(new Error("File reading failed")),r.readAsDataURL(e)})}}catch(e){return console.error(e),{fileType:null,fileUrl:null}}},kt=()=>{var e,t,n,r,o,i;const{settings:l}=R(),{styles:a}=j(),{injectMessage:s,simulateStreamMessage:A,streamMessage:c,removeMessage:u,endStreamMessage:d}=Ye(),{getCurrPath:f,getPrevPath:p,goToPath:m,blockAllowsAttachment:v}=ut(),{flowRef:y,inputRef:w}=V(),b=y.current,{showToast:k,dismissToast:x}=ct(),{dispatchRcbEvent:E}=re(),{toggleChatWindow:P}=oe(),{setTextAreaValue:C}=lt(),{handleSubmitText:S}=dt(),D={cursor:`url("${null==(e=l.general)?void 0:e.actionDisabledIcon}"), auto`,...a.fileAttachmentButtonStyle,...a.fileAttachmentButtonDisabledStyle},B={backgroundImage:`url(${null==(t=l.fileAttachment)?void 0:t.icon})`,fill:"#a6a6a6",...a.fileAttachmentIconStyle},I={backgroundImage:`url(${null==(n=l.fileAttachment)?void 0:n.icon})`,fill:"#a6a6a6",...a.fileAttachmentIconStyle,...a.fileAttachmentIconDisabledStyle};return g("label",{"aria-label":(null==(r=l.ariaLabel)?void 0:r.fileAttachmentButton)??"upload file",role:"button",className:v?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:v?{...a.fileAttachmentButtonStyle}:D,children:[h("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async e=>{var t,n,r,o;const i=e.target.files;if(!i)return;const a=Array.from(i);if(e.target.value="",null!=(t=l.event)&&t.rcbUserUploadFile&&(await E(J.USER_UPLOAD_FILE,{files:a})).defaultPrevented)return;const g=f();if(!g)return;const v=b[g];if(!v)return;const y=v.file;if(null!=y){const e=[];for(let t=0;t<a.length;t++){if(e.push(a[t].name),null==(n=l.fileAttachment)||!n.showMediaDisplay)continue;const r=await bt(a[t]);!r.fileType||!r.fileUrl||await s(h(wt,{file:a[t],fileType:r.fileType,fileUrl:r.fileUrl}),"USER")}await S("πŸ“„ "+e.join(", "),null==(r=l.fileAttachment)?void 0:r.sendFileName),await y({userInput:null==(o=w.current)?void 0:o.value,prevPath:p(),currPath:f(),goToPath:m,setTextAreaValue:C,injectMessage:s,simulateStreamMessage:A,streamMessage:c,removeMessage:u,endStreamMessage:d,toggleChatWindow:P,showToast:k,dismissToast:x,files:a})}},multiple:null==(o=l.fileAttachment)?void 0:o.multiple,accept:null==(i=l.fileAttachment)?void 0:i.accept,disabled:!v}),(()=>{var e,t;const n=v?null==(e=l.fileAttachment)?void 0:e.icon:null==(t=l.fileAttachment)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&h("span",{className:v?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:h(n,{style:v?B:I})}):h("span",{className:v?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:v?B:I})})()]})},xt=()=>{var e,t,n,r,o,i;const{settings:A}=R(),{styles:c}=j(),{syncedTextAreaDisabledRef:u}=K(),{inputRef:d}=V(),{textAreaDisabled:f,setTextAreaValue:p}=lt(),v=l(null),y=l(null),[w,b]=a(!1),k={cursor:`url("${null==(e=A.general)?void 0:e.actionDisabledIcon}"), auto`,...c.emojiButtonStyle,...c.emojiButtonDisabledStyle},x={backgroundImage:`url(${null==(t=A.emoji)?void 0:t.icon})`,fill:"#a6a6a6",...c.emojiIconStyle},E={backgroundImage:`url(${null==(n=A.emoji)?void 0:n.icon})`,fill:"#a6a6a6",...c.emojiIconStyle,...c.emojiIconDisabledStyle};s(()=>{const e=e=>{const t=e.composedPath();v.current&&!t.includes(v.current)&&y.current&&!t.includes(y.current)&&b(!1)},t=()=>{(()=>{if(v.current&&y.current){const e=y.current.getBoundingClientRect(),t=v.current.offsetHeight,n=e.top-t-8;v.current.style.left=`${e.left}px`,v.current.style.top=`${n}px`}})()};return document.addEventListener("mousedown",e),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t)}},[]);return g(m,{children:[h("div",{"aria-label":(null==(r=A.ariaLabel)?void 0:r.emojiButton)??"emoji picker",role:"button",ref:y,className:""+(f?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled"),style:f?k:{...c.emojiButtonStyle},onMouseDown:e=>{e.preventDefault(),u.current?b(!1):b(e=>!e)},children:(()=>{var e,t;const n=f?null==(e=A.emoji)?void 0:e.iconDisabled:null==(t=A.emoji)?void 0:t.icon;return n&&"string"!=typeof n?n&&h("span",{className:""+(f?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),children:h(n,{style:f?E:x})}):h("span",{className:""+(f?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),style:f?E:x})})()}),w&&h("div",{className:"rcb-emoji-button-popup",ref:v,children:null==(i=null==(o=A.emoji)?void 0:o.list)?void 0:i.map((e,t)=>h("span",{className:"rcb-emoji",onMouseDown:t=>((e,t)=>{e.preventDefault(),d.current&&(p(d.current.value+t),setTimeout(()=>{const e=d.current;if(e){e.focus();const t=e.value.length;e.setSelectionRange(t,t)}},50)),b(!1)})(t,e),children:e},t))})]})},Et=()=>{var e,t,n;const{settings:r}=R(),{styles:o}=j(),{audioToggledOn:i,toggleAudio:l}=We(),a={backgroundImage:`url(${null==(e=r.audio)?void 0:e.icon})`,fill:"#fcec3d",...o.audioIconStyle},s={backgroundImage:`url(${null==(t=r.audio)?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.audioIconStyle,...o.audioIconDisabledStyle};return h("div",{"aria-label":(null==(n=r.ariaLabel)?void 0:n.audioButton)??"toggle audio",role:"button",onMouseDown:async e=>{e.preventDefault(),await l()},style:i?{...o.audioButtonStyle}:{...o.audioButtonStyle,...o.audioButtonDisabledStyle},children:(()=>{var e,t;const n=i?null==(e=r.audio)?void 0:e.icon:null==(t=r.audio)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&h("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:h(n,{style:i?a:s,"data-testid":"rcb-audio-icon-svg"})}):h("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:i?a:s})})()})},Pt=()=>{var e,t;const{settings:n}=R(),{styles:r}=j(),{toggleChatWindow:o}=oe(),i={backgroundImage:`url(${null==(e=n.header)?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...r.closeChatIconStyle};return h("div",{"aria-label":(null==(t=n.ariaLabel)?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:e=>{e.stopPropagation(),o(!1)},style:{...r.closeChatButtonStyle},children:(()=>{var e;const t=null==(e=n.header)?void 0:e.closeChatIcon;return t&&"string"!=typeof t?t&&h("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:h(t,{style:i})}):h("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:i})})()})},Ct=()=>{var e,t,n;const{settings:r}=R(),{styles:o}=j(),{notificationsToggledOn:i,toggleNotifications:l}=(()=>{const{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}=Ve();return{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}})(),a={backgroundImage:`url(${null==(e=r.notification)?void 0:e.icon})`,fill:"#fcec3d",...o.notificationIconStyle},s={backgroundImage:`url(${null==(t=r.notification)?void 0:t.iconDisabled})`,fill:"#e8eaed",...o.notificationIconStyle,...o.notificationIconDisabledStyle};return h("div",{"aria-label":(null==(n=r.ariaLabel)?void 0:n.notificationButton)??"toggle notifications",role:"button",onMouseDown:async e=>{e.preventDefault(),await l()},style:i?{...o.notificationButtonStyle}:{...o.notificationButtonStyle,...o.notificationButtonDisabledStyle},children:(()=>{var e,t;const n=i?null==(e=r.notification)?void 0:e.icon:null==(t=r.notification)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&h("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:h(n,{style:i?a:s,"data-testid":"rcb-notification-icon-svg"})}):h("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:i?a:s})})()})},St=()=>{var e,t,n;const{settings:r}=R(),{styles:o}=j(),{injectMessage:i}=Ye(),{inputRef:A}=V(),{voiceToggledOn:c,toggleVoice:u}=it(),{setInputLength:d,setTextAreaValue:f,textAreaDisabled:p}=lt(),{handleSubmitText:g}=dt(),m=l([]),[v,y]=a(!1);s(()=>{var e;null!=(e=r.voice)&&e.sendAsAudio?(x(),m.current=[]):g()},[v]),s(()=>{c?((e,t,n,r,o,i,l)=>{var a;null!=(a=e.voice)&&a.sendAsAudio?nt(n,i):tt(e,t,n,r,o,l)})(r,u,k,f,d,m,A):rt()},[c]);const w={backgroundImage:`url(${null==(e=r.voice)?void 0:e.icon})`,fill:"#9aa0a6",...o.voiceIconStyle},b={backgroundImage:`url(${null==(t=r.voice)?void 0:t.iconDisabled})`,fill:"#9aa0a6",...o.voiceIconStyle,...o.voiceIconDisabledStyle},k=()=>{y(e=>!e)},x=async()=>{const e=new Blob(m.current,{type:"audio/wav"}),t=new File([e],"voice-input.wav",{type:"audio/wav"}),n=await bt(t);!n.fileType||!n.fileUrl||await i(h(wt,{file:t,fileType:n.fileType,fileUrl:n.fileUrl}),"USER")};return h("div",{"aria-label":(null==(n=r.ariaLabel)?void 0:n.voiceButton)??"toggle voice",role:"button",onMouseDown:async e=>{e.preventDefault(),!p&&await u()},style:c&&!p?{...o.voiceButtonStyle}:{...o.voiceButtonStyle,...o.voiceButtonDisabledStyle},className:c&&!p?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var e,t;const n=c?null==(e=r.voice)?void 0:e.icon:null==(t=r.voice)?void 0:t.iconDisabled;return n&&"string"!=typeof n?n&&h("span",{className:"rcb-voice-icon "+(c&&!p?"on":""),children:h(n,{style:c&&!p?w:b})}):h("span",{className:"rcb-voice-icon"+(c&&!p?"-on":""),"data-testid":"rcb-voice-icon",style:c&&!p?w:b})})()})},Dt=()=>{var e,t,n,r,o,i,l,s;const{settings:A}=R(),{styles:c}=j(),{textAreaDisabled:u}=K(),[d,f]=a(!1),{handleSubmitText:p}=dt(),g={backgroundColor:null==(e=A.general)?void 0:e.primaryColor,...c.sendButtonStyle},m={cursor:`url("${null==(t=A.general)?void 0:t.actionDisabledIcon}"), auto`,backgroundColor:null==(n=A.general)?void 0:n.primaryColor,...c.sendButtonStyle,...c.sendButtonDisabledStyle},v={backgroundColor:null==(r=A.general)?void 0:r.secondaryColor,...c.sendButtonStyle,...c.sendButtonHoveredStyle},y={backgroundImage:`url(${null==(o=A.chatInput)?void 0:o.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle},w={backgroundImage:`url(${null==(i=A.chatInput)?void 0:i.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconDisabledStyle},b={backgroundImage:`url(${null==(l=A.chatInput)?void 0:l.sendButtonIcon})`,fill:"#fff",...c.sendIconStyle,...c.sendIconHoveredStyle};return h("div",{"aria-label":(null==(s=A.ariaLabel)?void 0:s.sendButton)??"send message",role:"button",onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onMouseDown:async e=>{null==e||e.preventDefault(),!u&&await p()},style:u?m:d?v:g,className:"rcb-send-button",children:(()=>{var e;const t=null==(e=A.chatInput)?void 0:e.sendButtonIcon;return t&&"string"!=typeof t?t&&h("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:h(t,{style:u?w:d?b:y})}):h("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:u?w:d?b:y})})()})},Bt=(e,t)=>{var n,r,o,i,l,a,s,A,c;const u={[k.AUDIO_BUTTON]:null==(n=e.audio)?void 0:n.disabled,[k.CLOSE_CHAT_BUTTON]:null==(r=e.general)?void 0:r.embedded,[k.EMOJI_PICKER_BUTTON]:null==(o=e.emoji)?void 0:o.disabled,[k.FILE_ATTACHMENT_BUTTON]:null==(i=e.fileAttachment)?void 0:i.disabled,[k.NOTIFICATION_BUTTON]:null==(l=e.notification)?void 0:l.disabled,[k.SEND_MESSAGE_BUTTON]:!1,[k.VOICE_MESSAGE_BUTTON]:null==(a=e.voice)?void 0:a.disabled},d={},f=e=>e?e.map(e=>{if("string"==typeof e){if((e=>Object.values(k).includes(e))(e)&&!u[e]){if(d[e])return d[e];const n=t[e];if("function"==typeof n){const t=n();return d[e]=t,t}return null}return null}return e}).filter(e=>null!==e):[];return{header:f(null==(s=e.header)?void 0:s.buttons),chatInput:f(null==(A=e.chatInput)?void 0:A.buttons),footer:f(null==(c=e.footer)?void 0:c.buttons)}},It=()=>{const{settings:e}=R(),t=A(()=>({[k.CLOSE_CHAT_BUTTON]:()=>h(Pt,{}),[k.AUDIO_BUTTON]:()=>h(Et,{}),[k.NOTIFICATION_BUTTON]:()=>h(Ct,{}),[k.EMOJI_PICKER_BUTTON]:()=>h(xt,{}),[k.FILE_ATTACHMENT_BUTTON]:()=>h(kt,{}),[k.SEND_MESSAGE_BUTTON]:()=>h(Dt,{}),[k.VOICE_MESSAGE_BUTTON]:()=>h(St,{})}),[]),{header:n,chatInput:r,footer:o}=A(()=>Bt(e,t),[e,t]);return{headerButtons:A(()=>n,[n]),chatInputButtons:A(()=>r,[r]),footerButtons:A(()=>o,[o])}},Tt=()=>{const{settings:e}=R(),{styles:t}=j(),{setSyncedMessages:n,syncedMessagesRef:r}=ae(),{isLoadingChatHistory:o,setIsLoadingChatHistory:l,hasChatHistoryLoaded:a,setHasChatHistoryLoaded:s}=K(),{chatBodyRef:A}=V(),{dispatchRcbEvent:c}=re(),u=i(async()=>{var o,i;const a=Oe();if(!a||null!=(o=e.event)&&o.rcbLoadChatHistory&&(await c(J.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;l(!0);const u=(null==(i=A.current)?void 0:i.scrollHeight)??0;((e,t,n,r,o,i,l,a,s)=>{var A;if(Be=!0,null!=n)try{const A=Se(h(Pe,{}),"SYSTEM"),c=o.current.slice(1);r([A,...c]);const u=n.map(n=>{if("object"===n.type){const r=Fe(n.content,e,t);return{...n,content:r}}return n});setTimeout(()=>{var t;const n=o.current.slice(1);let i=null!=(t=e.chatHistory)&&t.autoLoad?Se(h(m,{}),"SYSTEM"):Se(h(Ee,{}),"SYSTEM");r([...u,i,...n]),s(!0)},500),setTimeout(()=>{if(!i.current)return;const{scrollHeight:e}=i.current,t=e-l;i.current.scrollTop+=t,a(!1)},510)}catch{De.removeItem(null==(A=e.chatHistory)?void 0:A.storageKey)}})(e,t,a,n,r,A,u,l,s)},[e,t,c,r,A,l,s]);return{isLoadingChatHistory:o,setIsLoadingChatHistory:l,hasChatHistoryLoaded:a,showChatHistory:u}},Qt=()=>{var e,t,n;const{settings:r}=R(),{styles:o}=j(),{showChatHistory:i}=Tt(),[l,s]=a(!1),A={color:null==(e=r.general)?void 0:e.primaryColor,borderColor:null==(t=r.general)?void 0:t.primaryColor,...o.chatHistoryButtonStyle,...o.chatHistoryButtonHoveredStyle};return h("div",{className:"rcb-view-history-container",children:h("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)},style:l?A:{...o.chatHistoryButtonStyle},onMouseDown:e=>{e.preventDefault(),i()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:h("p",{children:null==(n=r.chatHistory)?void 0:n.viewChatHistoryButtonText})})})},Mt=()=>{var e,t,n,r;const o=ft(),{settings:a}=R(),{replaceMessages:A}=Ye(),{isBotTyping:c,isChatWindowOpen:u,setUnreadCount:d,setSyncedIsChatWindowOpen:f,setSyncedTextAreaDisabled:p,setSyncedAudioToggledOn:g,setSyncedVoiceToggledOn:m,setSyncedIsScrolling:v,syncedIsScrollingRef:y,syncedIsChatWindowOpenRef:w}=K(),{chatBodyRef:b}=V(),{viewportHeight:k,setViewportHeight:x,setViewportWidth:E,scrollToBottom:P}=oe(),{setUpNotifications:C}=Ve(),{handleFirstInteraction:S}=(()=>{var e;const{settings:t}=R(),{hasInteractedPage:n,setHasInteractedPage:r,hasFlowStarted:o,setHasFlowStarted:l}=K(),a=i(()=>{var e;if(r(!0),!o&&"ON_PAGE_INTERACT"===(null==(e=t.general)?void 0:e.flowStartTrigger)&&l(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const n=new window.SpeechSynthesisUtterance;n.text="",n.onend=()=>{window.removeEventListener("click",a),window.removeEventListener("keydown",a),window.removeEventListener("touchstart",a)},window.speechSynthesis.speak(n)},[o,null==(e=t.general)?void 0:e.flowStartTrigger]);return{hasInteractedPage:n,handleFirstInteraction:a}})(),{showChatHistory:D}=Tt(),B=l(0),I=l(!1);s(()=>(window.addEventListener("click",S),window.addEventListener("keydown",S),window.addEventListener("touchstart",S),()=>{window.removeEventListener("click",S),window.removeEventListener("keydown",S),window.removeEventListener("touchstart",S)}),[]),s(()=>{const e=b.current;if(!e)return;const t=()=>{I.current||(I.current=!0,requestAnimationFrame(()=>{var t,n;if(!e)return;const{scrollTop:r,clientHeight:o,scrollHeight:i}=e,l=r+o<i-((null==(t=a.chatWindow)?void 0:t.messagePromptOffset)??30);v(l),y.current=l,l||(r+o>=i-1&&(e.scrollTop=i-o-1),(w.current||null!=(n=a.general)&&n.embedded)&&d(0)),I.current=!1}))};return e.addEventListener("wheel",t,{passive:!0}),e.addEventListener("touchmove",t,{passive:!0}),()=>{e.removeEventListener("wheel",t),e.removeEventListener("touchmove",t)}},[]),s(()=>{var e,t,n;p(null==(e=a.chatInput)?void 0:e.disabled),f(null==(t=a.chatWindow)?void 0:t.defaultOpen),g(null==(n=a.audio)?void 0:n.defaultToggledOn),setTimeout(()=>{var e;m(null==(e=a.voice)?void 0:e.defaultToggledOn)},1)},[]),s(()=>{var e;null!=(e=a.notification)&&e.disabled||C()},[null==(e=a.notification)?void 0:e.disabled]),s(()=>{!y.current&&null!=b&&b.current&&P()},[c]),s(()=>{var e,t;if(null!=(e=a.chatHistory)&&e.disabled)De&&De.removeItem(Ie);else if(Re(a),Oe().length>0){const e=Se(h(Qt,{}),"SYSTEM");A([e]),null!=(t=a.chatHistory)&&t.autoLoad&&D()}},[null==(t=a.chatHistory)?void 0:t.storageKey,null==(n=a.chatHistory)?void 0:n.maxEntries,null==(r=a.chatHistory)?void 0:r.disabled]),s(()=>{var e;o||null!=(e=a.general)&&e.embedded||!navigator.virtualKeyboard||(navigator.virtualKeyboard.overlaysContent=!0,navigator.virtualKeyboard.addEventListener("geometrychange",e=>{if(!e.target)return;const{x:t,y:n,width:r,height:o}=e.target.boundingRect;0==t&&0==n&&0==r&&0==o?(setTimeout(()=>{var e;x(null==(e=window.visualViewport)?void 0:e.height)},101),setTimeout(()=>{var e,t;k!=(null==(e=window.visualViewport)?void 0:e.height)&&x(null==(t=window.visualViewport)?void 0:t.height)},1001)):setTimeout(()=>{var e;x((null==(e=window.visualViewport)?void 0:e.height)-o)},101)}))},[o]),s(()=>{var e,t,n,r;if(o)return;u&&(x(null==(e=window.visualViewport)?void 0:e.height),E(null==(t=window.visualViewport)?void 0:t.width));const i=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),l=()=>B.current=window.scrollY,a=()=>{var e,t;x(null==(e=window.visualViewport)?void 0:e.height),E(null==(t=window.visualViewport)?void 0:t.width)},s=()=>{var e;window.removeEventListener("scroll",i),window.removeEventListener("scroll",l),null==(e=window.visualViewport)||e.removeEventListener("resize",a)};return u?(s(),document.body.style.position="fixed",window.addEventListener("scroll",i),null==(n=window.visualViewport)||n.addEventListener("resize",a)):(document.body.style.position="static",s(),window.scrollTo({top:B.current,left:0,behavior:"auto"}),window.addEventListener("scroll",l),null==(r=window.visualViewport)||r.removeEventListener("resize",a)),s},[u,o])},Ot="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",Lt="2592000",Nt="RCB_THEME_CACHE_DATA",Rt=async(e,t)=>{const{id:n,version:r,baseUrl:o=Ot,cacheDuration:i=Lt}=t,l=r||await(async(e,t)=>{const n=`${t}/${e}/meta.json`;try{const e=await fetch(n);return e.ok?(await e.json()).version:(console.error(`Failed to fetch meta.json from ${n}`),null)}catch(e){return console.error(`Failed to fetch meta.json from ${n}`,e),null}})(n,o);if(!l)return console.error(`Unable to find version for theme: ${n}`),{settings:{},inlineStyles:{},cssStylesText:""};const a=((e,t,n)=>{const r=localStorage.getItem(`${Nt}_${e}_${t}`);if(!r)return null;try{const e=JSON.parse(r),t=(new Date).getTime(),o=Math.floor(t/1e3);return e.cacheDate+n>=o?e:null}catch(t){return console.error(`Unable to fetch cache for ${e}`,t),null}})(n,l,i);if(a){const t=Ht(e,a.cssStylesText);return{settings:a.settings,inlineStyles:a.inlineStyles,cssStylesText:t}}const s=`${o}/${n}/${l}/styles.css`,A=`${o}/${n}/${l}/settings.json`,c=`${o}/${n}/${l}/styles.json`;let u="";const d=await fetch(s);d.ok?u=await d.text():console.info(`Could not fetch styles.css from ${s}`);const f=await fetch(A);let p={};f.ok?p=await f.json():console.info(`Could not fetch settings.json from ${A}`);const h=await fetch(c);let g={};h.ok?g=await h.json():console.info(`Could not fetch styles.json from ${c}`),((e,t,n,r,o)=>{const i=(new Date).getTime(),l={settings:n,inlineStyles:r,cssStylesText:o,cacheDate:Math.floor(i/1e3)};localStorage.setItem(`${Nt}_${e}_${t}`,JSON.stringify(l))})(n,l,p,g,u);return{settings:p,inlineStyles:g,cssStylesText:Ht(e,u)}},Ht=(e,t)=>t.split(new RegExp("(?<=})")).map(t=>{const n=t.trim();return n.startsWith("@import")||n.startsWith("@keyframes")||n.startsWith("@media")?n:n?`#${e} ${n}`:""}).join("\n"),Ft=async(e,t,n,r)=>{var o,i;let l=jt(L),a=jt(F),s="";if(null!=r)if(Array.isArray(r))for(const t of r){const n=await Rt(e,t);l=zt(n.settings,l),a=zt(n.inlineStyles,a),s+=n.cssStylesText}else{const t=await Rt(e,r);l=zt(t.settings,l),a=zt(t.inlineStyles,a),s+=t.cssStylesText}return null!=t&&(l=zt(t,l)),null!=n&&(a=zt(n,a)),null!=(null==(o=l.chatInput)?void 0:o.botDelay)&&(null==(i=l.chatInput)?void 0:i.botDelay)<500&&(l.chatInput.botDelay=500),{settings:l,inlineStyles:a,cssStylesText:s}},zt=(e,t)=>{const n=[{source:e,target:t}];for(;n.length;){const e=n.pop();if(null==e)continue;const{source:t,target:r}=e;for(const e of Object.keys(t)){const o=e;if(c(t[o]))r[o]=t[o];else if("object"!=typeof t[o]||null===t[o]||Array.isArray(t[o]))try{r[o]=t[o]}catch{}else("object"!=typeof r[o]||null===r[o])&&(r[o]={}),n.push({source:t[o],target:r[o]})}}return t},jt=e=>{if(null===e||"object"!=typeof e)return e;const t=Array.isArray(e)?[]:{},n=[{source:e,target:t}],r=new WeakMap;for(r.set(e,t);n.length;){const e=n.pop();if(null==e)continue;const{source:t,target:o}=e;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const i=t[e];if(i&&"object"==typeof i)if(r.has(i))o[e]=r.get(i);else{const t=Array.isArray(i)?[]:{};r.set(i,t),o[e]=t,n.push({source:i,target:t})}else o[e]=i}}return t},Ut=()=>{const{settings:e,setSyncedSettings:t,syncedSettingsRef:n}=R(),r=i(n=>{!n||0===Object.keys(n).length||t(jt(zt(n,e)))},[e]),o=i(e=>{const r="function"==typeof e?e(n.current):e;t(r)},[n]);return{settings:e,replaceSettings:o,updateSettings:r}},_t=()=>{const{styles:e,setSyncedStyles:t,syncedStylesRef:n}=j(),r=i(n=>{!n||0===Object.keys(n).length||t(jt(zt(n,e)))},[e]),o=i(e=>{const r="function"==typeof e?e(n.current):e;t(r)},[n]);return{styles:e,replaceStyles:o,updateStyles:r}},qt=({plugins:e,slots:t})=>{var n,r;const o=ft(),{settings:i}=R(),{styles:l}=j(),{hasFlowStarted:a,setHasFlowStarted:c}=K(),{inputRef:u}=V(),{viewportHeight:d,viewportWidth:f,isChatWindowOpen:p}=oe(),{goToPath:v}=ut(),{headerButtons:y,chatInputButtons:w,footerButtons:b}=It();Mt(),(e=>{const{updateSettings:t}=Ut(),{updateStyles:n}=_t(),r=null==e?void 0:e.map(e=>e());s(()=>{let e={},o={};null==r||r.forEach(t=>{null!=t&&t.settings&&0!==Object.keys(null==t?void 0:t.settings).length&&(e=zt(t.settings,e)),null!=t&&t.styles&&0!==Object.keys(null==t?void 0:t.styles).length&&(o=zt(t.styles,o))}),t(e),n(o)},[])})(e),s(()=>{var e;(a||"ON_LOAD"===(null==(e=i.general)?void 0:e.flowStartTrigger))&&v("start")},[a,null==(n=i.general)?void 0:n.flowStartTrigger]);const k=A(()=>{var e;const t="rcb-chatbot-global ";return null!=(e=i.general)&&e.embedded?t+"rcb-window-embedded":p?t+"rcb-window-open":t+"rcb-window-close"},[i,p]);return h(m,{children:(()=>{var e,t;return o&&(null==(e=i.device)?void 0:e.desktopEnabled)||!o&&(null==(t=i.device)?void 0:t.mobileEnabled)})()&&g("div",{onMouseDown:e=>{var t,n;!a&&"ON_CHATBOT_INTERACT"===(null==(t=i.general)?void 0:t.flowStartTrigger)&&c(!0),o?null==(n=u.current)||n.blur():null==e||e.preventDefault()},className:k,children:[h(mt,{}),h(gt,{}),p&&!o&&!(null!=(r=i.general)&&r.embedded)&&g(m,{children:[h("style",{children:"\n\t\t\t\t\t\t\t\t\thtml {\n\t\t\t\t\t\t\t\t\t\toverflow: hidden !important;\n\t\t\t\t\t\t\t\t\t\ttouch-action: none !important;\n\t\t\t\t\t\t\t\t\t\tscroll-behavior: auto !important;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t"}),h("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),h("div",{style:(()=>{var e,t;return o||null!=(e=i.general)&&e.embedded?null!=(t=i.general)&&t.embedded?{...l.chatWindowStyle}:{...l.chatWindowStyle,zIndex:1e4}:{...l.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${f}px`,height:`${d}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var e,n,r;const o=(null==t?void 0:t.chatBotHeader)||_,l=(null==t?void 0:t.chatBotBody)||de,a=(null==t?void 0:t.chatBotInput)||pt,s=(null==t?void 0:t.chatBotFooter)||ht;return g(m,{children:[(null==(e=i.general)?void 0:e.showHeader)&&h(o,{buttons:y}),h(l,{}),h(yt,{}),(null==(n=i.general)?void 0:n.showInputRow)&&h(a,{buttons:w}),(null==(r=i.general)?void 0:r.showFooter)&&h(s,{buttons:b})]})})()})]})})},Vt=r(void 0),Gt=()=>o(Vt),Wt=({children:e})=>{var t;const n=l(""),r=l({}),[o,i,A]=W({}),[c,u,d]=W({}),[f,p]=a(!1);s(()=>{p(!0)},[]);return f?h("div",{style:{fontFamily:null==(t=o.general)?void 0:t.fontFamily},children:h(Vt.Provider,{value:{loadConfig:async(e,t,o,l,a,s)=>{n.current=e,r.current=t;const A=await Ft(e,o,l,a);s.current&&(s.current.textContent=A.cssStylesText),i(A.settings),u(A.inlineStyles)}},children:h(H,{settings:o,setSyncedSettings:i,syncedSettingsRef:A,children:h(U,{styles:c,setSyncedStyles:u,syncedStylesRef:d,children:h(At,{children:h(G,{botIdRef:n,flowRef:r,children:h(ne,{children:h(X,{settings:o,children:h(se,{children:e})})})})})})})})}):null},Yt=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,setConfigLoaded:l,styleRootRef:a})=>{const c=A(()=>e,[]),u=Gt(),{flowRef:d}=V();d&&d.current!==t&&(d.current=t);return s(()=>{(async()=>{var e,s;null!=(e=n.event)&&e.rcbPreLoadChatBot&&(await $(J.PRE_LOAD_CHATBOT,{botId:c,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i})).defaultPrevented||(null!=u&&u.loadConfig&&(await u.loadConfig(c,t,n,r,o,a),l(!0)),null!=(s=n.event)&&s.rcbPostLoadChatBot&&$(J.POST_LOAD_CHATBOT,{botId:c,currPath:null,prevPath:null},{flow:t,settings:n,styles:r,themes:o,plugins:i}))})()},[o]),null},Kt=["Quickstart","API Docs","Examples","Github","Discord"],Xt={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:Kt,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:Kt,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:Kt,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"}},Jt=({id:e,flow:t,settings:n,styles:r,themes:o,plugins:i,slots:c})=>{const u=A(()=>e||"rcb-"+Ce(),[]),d=t&&0!==Object.keys(t).length?t:Xt,f=n||{},p=r||{},v=i||[],[y,w]=a(!1),b=Gt(),k=l(null),[x,E]=a(o||[]);s(()=>{o&&E(o)},[o]);const P=()=>g(m,{children:[h(Yt,{styleRootRef:k,id:u,flow:d,settings:f,styles:p,themes:x,plugins:v,setConfigLoaded:w}),y&&h(qt,{plugins:i,slots:c})]});return g(null==b?Wt:m,{children:[h("style",{ref:k}),h("div",{id:u,children:P()})]})},Zt=()=>{const{getBotId:e}=(()=>{const{botIdRef:e}=V();return{getBotId:i(()=>e.current,[e])}})();return{getBotId:e}},$t=()=>{const{hasFlowStarted:e,restartFlow:t,getFlow:n}=(()=>{const{replaceMessages:e}=Ye(),{replacePaths:t,goToPath:n}=ut(),{replaceToasts:r}=ct(),{hasFlowStarted:o}=K(),{flowRef:l,timeoutIdRef:a}=V(),{settings:s}=R();return{hasFlowStarted:o,restartFlow:i(async()=>{Re(s),a.current&&clearTimeout(a.current),e([]),r([]),t([]),await n("start")},[a,s,e,r,t,Re,n]),getFlow:i(()=>(null==l?void 0:l.current)??{},[l])}})();return{hasFlowStarted:e,restartFlow:t,getFlow:n}},en=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:l,getMessages:a}=Ye();return{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:l,getMessages:a}},tn=(e,t)=>{const{getBotId:n}=Zt();s(()=>{const r=e=>{e.detail.botId===n()&&t(e)};return window.addEventListener(e,r),()=>{window.removeEventListener(e,r)}},[n,e,t])},nn=()=>{const{settings:e,replaceSettings:t,updateSettings:n}=Ut();return{settings:e,replaceSettings:t,updateSettings:n}},rn=()=>{const{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:l,blurTextArea:a}=lt();return{textAreaDisabled:e,toggleTextAreaDisabled:t,textAreaSensitiveMode:n,toggleTextAreaSensitiveMode:r,getTextAreaValue:o,setTextAreaValue:i,focusTextArea:l,blurTextArea:a}},on=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=Tt();return{showChatHistory:e,getHistoryMessages:Oe,setHistoryMessages:Le,hasChatHistoryLoaded:t}},ln={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 an(e){return t=>{ln[t]={...e,...ln[t]}}}["address","main","div","figure","p","pre"].forEach(an({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(an({content:8,type:73})),["p","pre"].forEach(an({content:8,type:65})),["s","small","span","del","ins"].forEach(an({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(an({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(an({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(an({type:89}));const sn=Object.freeze(ln),An=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],cn=Object.keys(sn).filter(e=>"canvas"!==e&&"iframe"!==e),un=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}),dn=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function fn(){return fn=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},fn.apply(this,arguments)}function pn({attributes:e={},className:n,children:r=null,selfClose:o=!1,tagName:i}){const l=i;return o?t.createElement(l,fn({className:n},e)):t.createElement(l,fn({className:n},e),r)}class hn{attribute(e,t){return t}node(e,t){return t}}function gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}
2
2
  /*!
3
3
  * escape-html
4
4
  * Copyright(c) 2012-2013 TJ Holowaychuk
5
5
  * Copyright(c) 2015 Andreas Lubbe
6
6
  * Copyright(c) 2015 Tiancheng "Timothy" Gu
7
7
  * MIT Licensed
8
- */var mn,vn;const yn=hn(function(){if(vn)return mn;vn=1;var e=/["'&<>]/;return mn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var A,o="",i=0,l=0;for(i=r.index;i<n.length;i++){switch(n.charCodeAt(i)){case 34:A="&quot;";break;case 38:A="&amp;";break;case 39:A="&#39;";break;case 60:A="&lt;";break;case 62:A="&gt;";break;default:continue}l!==i&&(o+=n.substring(l,i)),l=i+1,o+=A}return l!==i?o+n.substring(l,i):o}}());function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=/(url|image|image-set)\(/i;class En extends gn{attribute(e,t){return"style"===e&&Object.keys(t).forEach(e=>{String(t[e]).match(bn)&&delete t[e]}),t}}const Pn=/^<(!doctype|(html|head|body)(\s|>))/i,Bn=/^(aria-|data-|\w+:)/iu,Dn=/{{{(\w+)\/?}}}/;function Cn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let xn=class{constructor(e,t={},n=[],r=[]){var A;if(wn(this,"allowed",void 0),wn(this,"banned",void 0),wn(this,"blocked",void 0),wn(this,"container",void 0),wn(this,"content",[]),wn(this,"props",void 0),wn(this,"matchers",void 0),wn(this,"filters",void 0),wn(this,"keyIndex",void 0),"production"!==process.env.NODE_ENV&&e&&"string"!=typeof e)throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new En],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(A=t.allowList)&&void 0!==A?A:cn),this.banned=new Set(sn),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t,t)}applyNodeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t,t)}applyMatchers(e,t){const n={},{props:r}=this;let A=e,o=0,i=null;return this.matchers.forEach(e=>{const l=e.asTag().toLowerCase(),a=this.getTagConfig(l);if(r[e.inverseName]||!this.isTagAllowed(l)||!this.canRenderChild(t,a))return;let s="";for(;A&&(i=e.match(A));){const{index:t,length:l,match:a,valid:c,void:u,...d}=i,f=e.propName+String(o);t>0&&(s+=A.slice(0,t)),c?(s+=u?`{{{${f}/}}}`:`{{{${f}}}}${a}{{{/${f}}}}`,this.keyIndex+=1,o+=1,n[f]={children:a,matcher:e,props:{...r,...d,key:this.keyIndex}}):s+=a,e.greedy?(A=s+A.slice(t+l),s=""):A=A.slice(t+(l||a.length))}e.greedy||(A=s+A)}),0===o?e:this.replaceTokens(A,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,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||Cn)();if(!n)return;const r=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",A="body"===r||"fragment"===r?n.body:n.createElement(r);if(e.match(Pn)){if("production"!==process.env.NODE_ENV)throw new Error("HTML documents as Interweave content are not supported.")}else A.innerHTML=this.convertLineBreaks(this.props.escapeHtml?yn(e):e);return A}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes&&([...e.attributes].forEach(A=>{const{name:o,value:i}=A,l=o.toLowerCase(),a=un[l]||un[o];if(!this.isSafe(e)||!l.match(Bn)&&(!t&&(!a||2===a)||l.startsWith("on")||i.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let s="style"===l?this.extractStyleAttribute(e):i;4===a?s=!0:3===a?s=Number.parseFloat(String(s)):5!==a&&(s=String(s)),n[dn[l]||l]=this.applyAttributeFilters(l,s),r+=1}),0!==r)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(n=>{const r=e.style[n];("string"==typeof r||"number"==typeof r)&&(t[n.replace(/-([a-z])/g,(e,t)=>String(t).toUpperCase())]=r)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return an[e]?{...t,...an[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}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,n){const{noHtml:r,noHtmlExceptMatchers:A,allowElements:o,transform:i,transformOnlyAllowList:l}=this.props;let a=[],s="";return[...e.childNodes].forEach(e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),d=this.getTagConfig(u);s&&(a.push(s),s="");const f=this.applyNodeFilters(u,e);if(!f)return;let p;if(i&&(!l||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;p=this.parseNode(f,d);const n=i(f,p,d);if(null===n)return;if(typeof n<"u")return void a.push(t.cloneElement(n,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(r||A&&"br"!==u||!this.isTagAllowed(u)||!o&&!this.canRenderChild(n,d))a=[...a,...this.parseNode(f,d.tagName?d:n)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(f),n={tagName:u};e&&(n.attributes=e),d.void&&(n.selfClose=d.void),a.push(t.createElement(pn,{...n,key:this.keyIndex},null!==(c=p)&&void 0!==c?c:this.parseNode(f,d)))}}else if(3===e.nodeType){const t=r&&!A?e.textContent:this.applyMatchers(e.textContent||"",n);Array.isArray(t)?a=[...a,...t]:s+=t}}),s&&a.push(s),a}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,A=null;for(;A=r.match(Dn);){const[e,o]=A,i=A.index,l=e.includes("/");if("production"!==process.env.NODE_ENV&&!t[o])throw new Error(`Token "${o}" found but no matching element to replace with.`);i>0&&(n.push(r.slice(0,i)),r=r.slice(i));const{children:a,matcher:s,props:c}=t[o];let u;if(l)u=e.length,n.push(s.createElement(a,c));else{const A=r.match(new RegExp(`{{{/${o}}}}`));if("production"!==process.env.NODE_ENV&&!A)throw new Error(`Closing token missing for interpolated element "${o}".`);u=A.index+A[0].length,n.push(s.createElement(this.replaceTokens(r.slice(e.length,A.index),t),c))}r=r.slice(u)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}};function kn(e){var n;const{attributes:r,className:A,containerTagName:o,content:i,emptyContent:l,parsedContent:a,tagName:s,noWrap:c}=e,u=null!==(n=o??s)&&void 0!==n?n:"span",d="fragment"===u||c;let f;if(a)f=a;else{const t=new xn(i??"",e).parse();t.length>0&&(f=t)}return f||(f=l),d?t.createElement(t.Fragment,null,f):t.createElement(pn,{attributes:r,className:A,tagName:u},f)}function Sn(e){const{attributes:n,className:r,content:A="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:l=null,filters:a=[],matchers:s=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1,...p}=e,g=i?[]:s,h=o?[]:a,m=u?[u]:[],v=c?[c]:[];g.forEach(e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&v.push(e.onAfterParse.bind(e))});const y=m.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r},A??""),w=new xn(y,p,g,h),b=v.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&!Array.isArray(r))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return r},w.parse());return t.createElement(kn,{attributes:n,className:r,containerTagName:e.containerTagName,emptyContent:l,noWrap:f,parsedContent:0===b.length?void 0:b,tagName:d})}const Tn=({children:e})=>g("div",{style:{whiteSpace:"normal"},children:g(Sn,{content:"string"==typeof e?e:""})}),In={autoConfig:!0},Qn=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const A=t[e.detail.currPath];return!!A&&((null==(r=A.renderHtml)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)},Mn=e=>{const t=[];let n="",r=!1;for(let A=0;A<e.length;A++){const o=e[A];"<"===o?r?(t.push(n),n=o):(r=!0,n=o):">"===o?(n+=o,t.push(n),n="",r=!1):r?n+=o:t.push(o)}return""!==n&&t.push(n),t},On=e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:A}=nn(),{hasChatHistoryLoaded:o}=An(),i={...e,...In},l=i.htmlComponent?i.htmlComponent:Tn;a(()=>{var e,t;if(o){const o=[...n];for(let n=0;n<o.length&&n<((null==(e=A.chatHistory)?void 0:e.maxEntries)??30);n++){const e=o[n];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=l)}r(o)}},[o]);const s=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&Qn(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=Mn),e.data.message.contentWrapper=l,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,s),tn(J.CHUNK_STREAM_MESSAGE,s),tn(J.START_STREAM_MESSAGE,s),tn(J.START_SIMULATE_STREAM_MESSAGE,s),tn(J.START_SPEAK_AUDIO,async e=>{Qn(e,t(),"BOT")&&(e.data.textToRead=(e=>typeof window.DOMParser<"u"?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e.replace(/<\/?[^>]+(>|$)/g,""))(e.data.textToRead))});const c={name:"@rcb-plugins/html-renderer"};return null!=i&&i.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const Ln=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hn={};function Rn(e,t){return(Hn.jsx?Nn:Ln).test(e)}const Fn=/[ \t\n\f\r]/g;function Un(e){return""===e.replace(Fn,"")}class jn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function zn(e,t){const n={},r={};let A=-1;for(;++A<e.length;)Object.assign(n,e[A].property),Object.assign(r,e[A].normal);return new jn(n,r,t)}function _n(e){return e.toLowerCase()}jn.prototype.property={},jn.prototype.normal={},jn.prototype.space=null;class qn{constructor(e,t){this.property=e,this.attribute=t}}qn.prototype.space=null,qn.prototype.boolean=!1,qn.prototype.booleanish=!1,qn.prototype.overloadedBoolean=!1,qn.prototype.number=!1,qn.prototype.commaSeparated=!1,qn.prototype.spaceSeparated=!1,qn.prototype.commaOrSpaceSeparated=!1,qn.prototype.mustUseProperty=!1,qn.prototype.defined=!1;let Gn=0;const Yn=$n(),Wn=$n(),Vn=$n(),Xn=$n(),Kn=$n(),Jn=$n(),Zn=$n();function $n(){return 2**++Gn}const er=Object.freeze(Object.defineProperty({__proto__:null,boolean:Yn,booleanish:Wn,commaOrSpaceSeparated:Zn,commaSeparated:Jn,number:Xn,overloadedBoolean:Vn,spaceSeparated:Kn},Symbol.toStringTag,{value:"Module"})),tr=Object.keys(er);class nr extends qn{constructor(e,t,n,r){let A=-1;if(super(e,t),rr(this,"space",r),"number"==typeof n)for(;++A<tr.length;){const e=tr[A];rr(this,tr[A],(n&er[e])===er[e])}}}function rr(e,t,n){n&&(e[t]=n)}nr.prototype.defined=!0;const Ar={}.hasOwnProperty;function or(e){const t={},n={};let r;for(r in e.properties)if(Ar.call(e.properties,r)){const A=e.properties[r],o=new nr(r,e.transform(e.attributes||{},r),A,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[_n(r)]=r,n[_n(o.attribute)]=r}return new jn(t,n,e.space)}const ir=or({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}}),lr=or({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ar(e,t){return t in e?e[t]:t}function sr(e,t){return ar(e,t.toLowerCase())}const cr=or({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:sr,properties:{xmlns:null,xmlnsXLink:null}}),ur=or({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Wn,ariaAutoComplete:null,ariaBusy:Wn,ariaChecked:Wn,ariaColCount:Xn,ariaColIndex:Xn,ariaColSpan:Xn,ariaControls:Kn,ariaCurrent:null,ariaDescribedBy:Kn,ariaDetails:null,ariaDisabled:Wn,ariaDropEffect:Kn,ariaErrorMessage:null,ariaExpanded:Wn,ariaFlowTo:Kn,ariaGrabbed:Wn,ariaHasPopup:null,ariaHidden:Wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Kn,ariaLevel:Xn,ariaLive:null,ariaModal:Wn,ariaMultiLine:Wn,ariaMultiSelectable:Wn,ariaOrientation:null,ariaOwns:Kn,ariaPlaceholder:null,ariaPosInSet:Xn,ariaPressed:Wn,ariaReadOnly:Wn,ariaRelevant:null,ariaRequired:Wn,ariaRoleDescription:Kn,ariaRowCount:Xn,ariaRowIndex:Xn,ariaRowSpan:Xn,ariaSelected:Wn,ariaSetSize:Xn,ariaSort:null,ariaValueMax:Xn,ariaValueMin:Xn,ariaValueNow:Xn,ariaValueText:null,role:null}}),dr=or({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:sr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jn,acceptCharset:Kn,accessKey:Kn,action:null,allow:null,allowFullScreen:Yn,allowPaymentRequest:Yn,allowUserMedia:Yn,alt:null,as:null,async:Yn,autoCapitalize:null,autoComplete:Kn,autoFocus:Yn,autoPlay:Yn,blocking:Kn,capture:null,charSet:null,checked:Yn,cite:null,className:Kn,cols:Xn,colSpan:null,content:null,contentEditable:Wn,controls:Yn,controlsList:Kn,coords:Xn|Jn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Yn,defer:Yn,dir:null,dirName:null,disabled:Yn,download:Vn,draggable:Wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Yn,formTarget:null,headers:Kn,height:Xn,hidden:Yn,high:Xn,href:null,hrefLang:null,htmlFor:Kn,httpEquiv:Kn,id:null,imageSizes:null,imageSrcSet:null,inert:Yn,inputMode:null,integrity:null,is:null,isMap:Yn,itemId:null,itemProp:Kn,itemRef:Kn,itemScope:Yn,itemType:Kn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Yn,low:Xn,manifest:null,max:null,maxLength:Xn,media:null,method:null,min:null,minLength:Xn,multiple:Yn,muted:Yn,name:null,nonce:null,noModule:Yn,noValidate:Yn,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:Yn,optimum:Xn,pattern:null,ping:Kn,placeholder:null,playsInline:Yn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Yn,referrerPolicy:null,rel:Kn,required:Yn,reversed:Yn,rows:Xn,rowSpan:Xn,sandbox:Kn,scope:null,scoped:Yn,seamless:Yn,selected:Yn,shadowRootClonable:Yn,shadowRootDelegatesFocus:Yn,shadowRootMode:null,shape:null,size:Xn,sizes:null,slot:null,span:Xn,spellCheck:Wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Xn,step:null,style:null,tabIndex:Xn,target:null,title:null,translate:null,type:null,typeMustMatch:Yn,useMap:null,value:Wn,width:Xn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Kn,axis:null,background:null,bgColor:null,border:Xn,borderColor:null,bottomMargin:Xn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Yn,declare:Yn,event:null,face:null,frame:null,frameBorder:null,hSpace:Xn,leftMargin:Xn,link:null,longDesc:null,lowSrc:null,marginHeight:Xn,marginWidth:Xn,noResize:Yn,noHref:Yn,noShade:Yn,noWrap:Yn,object:null,profile:null,prompt:null,rev:null,rightMargin:Xn,rules:null,scheme:null,scrolling:Wn,standby:null,summary:null,text:null,topMargin:Xn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Xn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Yn,disableRemotePlayback:Yn,prefix:null,property:null,results:Xn,security:null,unselectable:null}}),fr=or({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:ar,properties:{about:Zn,accentHeight:Xn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Xn,amplitude:Xn,arabicForm:null,ascent:Xn,attributeName:null,attributeType:null,azimuth:Xn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Xn,by:null,calcMode:null,capHeight:Xn,className:Kn,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:Xn,diffuseConstant:Xn,direction:null,display:null,dur:null,divisor:Xn,dominantBaseline:null,download:Yn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Xn,enableBackground:null,end:null,event:null,exponent:Xn,externalResourcesRequired:null,fill:null,fillOpacity:Xn,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:Jn,g2:Jn,glyphName:Jn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Xn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Xn,horizOriginX:Xn,horizOriginY:Xn,id:null,ideographic:Xn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Xn,k:Xn,k1:Xn,k2:Xn,k3:Xn,k4:Xn,kernelMatrix:Zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Xn,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:Xn,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:Xn,overlineThickness:Xn,paintOrder:null,panose1:null,path:null,pathLength:Xn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Kn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Xn,pointsAtY:Xn,pointsAtZ:Xn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zn,rev:Zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zn,requiredFeatures:Zn,requiredFonts:Zn,requiredFormats:Zn,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:Xn,specularExponent:Xn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Xn,strikethroughThickness:Xn,string:null,stroke:null,strokeDashArray:Zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Xn,strokeOpacity:Xn,strokeWidth:null,style:null,surfaceScale:Xn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zn,tabIndex:Xn,tableValues:null,target:null,targetX:Xn,targetY:Xn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Xn,underlineThickness:Xn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Xn,values:null,vAlphabetic:Xn,vMathematical:Xn,vectorEffect:null,vHanging:Xn,vIdeographic:Xn,version:null,vertAdvY:Xn,vertOriginX:Xn,vertOriginY:Xn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Xn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pr=/^data[-\w.:]+$/i,gr=/-[a-z]/g,hr=/[A-Z]/g;function mr(e){return"-"+e.toLowerCase()}function vr(e){return e.charAt(1).toUpperCase()}const yr={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"},wr=zn([lr,ir,cr,ur,dr],"html"),br=zn([lr,ir,cr,ur,fr],"svg");function Er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pr,Br,Dr,Cr={};var xr=function(){if(Dr)return Cr;Dr=1;var e=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var A=(0,t.default)(e),o="function"==typeof n;return A.forEach(function(e){if("declaration"===e.type){var t=e.property,A=e.value;o?n(t,A,e):A&&((r=r||{})[t]=A)}}),r};var t=e(function(){if(Br)return Pr;Br=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,A=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,l=/^\s+|\s+$/g,a="";function s(e){return e?e.replace(l,a):a}return Pr=function(l,c){if("string"!=typeof l)throw new TypeError("First argument must be a string");if(!l)return[];c=c||{};var u=1,d=1;function f(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new g(e),v(),t}}function g(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function h(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=l,!c.silent)throw t}function m(e){var t=e.exec(l);if(t){var n=t[0];return f(n),l=l.slice(n.length),t}}function v(){m(n)}function y(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=p();if("/"==l.charAt(0)&&"*"==l.charAt(1)){for(var t=2;a!=l.charAt(t)&&("*"!=l.charAt(t)||"/"!=l.charAt(t+1));)++t;if(t+=2,a===l.charAt(t-1))return h("End of comment missing");var n=l.slice(2,t-2);return d+=2,f(n),l=l.slice(t),d+=2,e({type:"comment",comment:n})}}function b(){var t=p(),n=m(r);if(n){if(w(),!m(A))return h("property missing ':'");var l=m(o),c=t({type:"declaration",property:s(n[0].replace(e,a)),value:l?s(l[0].replace(e,a)):a});return m(i),c}}return g.prototype.content=l,v(),function(){var e,t=[];for(y(t);e=b();)!1!==e&&(t.push(e),y(t));return t}()},Pr}());return Cr}();const kr=Er(xr),Sr=kr.default||kr,Tr=Qr("end"),Ir=Qr("start");function Qr(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Mr(e){return e&&"object"==typeof e?"position"in e||"type"in e?Lr(e.position):"start"in e||"end"in e?Lr(e):"line"in e||"column"in e?Or(e):"":""}function Or(e){return Nr(e&&e.line)+":"+Nr(e&&e.column)}function Lr(e){return Or(e&&e.start)+"-"+Or(e&&e.end)}function Nr(e){return e&&"number"==typeof e?e:1}class Hr extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",A={},o=!1;if(t&&(A="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!A.cause&&e&&(o=!0,r=e.message,A.cause=e),!A.ruleId&&!A.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?A.ruleId=n:(A.source=n.slice(0,e),A.ruleId=n.slice(e+1))}if(!A.place&&A.ancestors&&A.ancestors){const e=A.ancestors[A.ancestors.length-1];e&&(A.place=e.position)}const i=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=i?i.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=i?i.line:void 0,this.name=Mr(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=o&&A.cause&&"string"==typeof A.cause.stack?A.cause.stack:"",this.actual,this.expected,this.note,this.url}}Hr.prototype.file="",Hr.prototype.name="",Hr.prototype.reason="",Hr.prototype.message="",Hr.prototype.stack="",Hr.prototype.column=void 0,Hr.prototype.line=void 0,Hr.prototype.ancestors=void 0,Hr.prototype.cause=void 0,Hr.prototype.fatal=void 0,Hr.prototype.place=void 0,Hr.prototype.ruleId=void 0,Hr.prototype.source=void 0;const Rr={}.hasOwnProperty,Fr=new Map,Ur=/[A-Z]/g,jr=/-([a-z])/g,zr=new Set(["table","tbody","thead","tfoot","tr"]),_r=new Set(["td","th"]),qr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,A,o){const i=Array.isArray(A.children),l=Ir(n);return t(r,A,o,i,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,A,o){const i=Array.isArray(A.children)?n:t;return o?i(r,A,o):i(r,A)}}(0,t.jsx,t.jsxs)}const A={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?br:wr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Yr(A,e,void 0);return o&&"string"!=typeof o?o:A.create(e,A.Fragment,{children:o||void 0},void 0)}function Yr(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let A=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(A=br,e.schema=A),e.ancestors.push(t);const o=Jr(e,t.tagName,!1),i=function(e,t){const n={};let r,A;for(A in t.properties)if("children"!==A&&Rr.call(t.properties,A)){const o=Kr(e,A,t.properties[A]);if(o){const[A,i]=o;e.tableCellAlignToStyle&&"align"===A&&"string"==typeof i&&_r.has(t.tagName)?r=i:n[A]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let l=Xr(e,t);return zr.has(t.tagName)&&(l=l.filter(function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&Un(e.value):Un(e)}(e)})),Wr(e,i,o,t),Vr(i,l),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Zr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let A=r;"svg"===t.name&&"html"===r.space&&(A=br,e.schema=A),e.ancestors.push(t);const o=null===t.name?e.Fragment:Jr(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const A=t.expression;A.type;const o=A.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Zr(e,t.position);else{const A=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,o=e.evaluater.evaluateExpression(t.expression)}else Zr(e,t.position);else o=null===r.value||r.value;n[A]=o}return n}(e,t),l=Xr(e,t);return Wr(e,i,o,t),Vr(i,l),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Vr(r,Xr(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Wr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Xr(e,t){const n=[];let r=-1;const A=e.passKeys?new Map:Fr;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=A.get(e)||0;i=e+"-"+t,A.set(e,t+1)}}const l=Yr(e,o,i);void 0!==l&&n.push(l)}return n}function Kr(e,t,n){const r=function(e,t){const n=_n(t);let r=t,A=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&pr.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(gr,vr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!gr.test(e)){let n=e.replace(hr,mr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}A=nr}return new A(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{Sr(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Hr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=qr+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(jr,eA)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Rr.call(e,n)&&(t[$r(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?yr[r.property]||r.property:r.attribute,n]}}function Jr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,A=-1;for(;++A<e.length;){const t=Rn(e[A])?{type:"Identifier",name:e[A]}:{type:"Literal",value:e[A]};n=n?{type:"MemberExpression",object:n,property:t,computed:!(!A||"Literal"!==t.type),optional:!1}:t}r=n}else r=Rn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Rr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zr(e)}function Zr(e,t){const n=new Hr("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=qr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $r(e){let t=e.replace(Ur,tA);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function eA(e,t){return t.toUpperCase()}function tA(e){return"-"+e.toLowerCase()}const nA={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"]},rA={};function AA(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return oA(e.children,t,n)}return Array.isArray(e)?oA(e,t,n):""}function oA(e,t,n){const r=[];let A=-1;for(;++A<e.length;)r[A]=AA(e[A],t,n);return r.join("")}const iA=document.createElement("i");function lA(e){const t="&"+e+";";iA.innerHTML=t;const n=iA.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function aA(e,t,n,r){const A=e.length;let o,i=0;if(t=t<0?-t>A?0:A+t:t>A?A:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function sA(e,t){return e.length>0?(aA(e,e.length,0,t),e):t}const cA={}.hasOwnProperty;function uA(e){const t={};let n=-1;for(;++n<e.length;)dA(t,e[n]);return t}function dA(e,t){let n;for(n in t){const r=(cA.call(e,n)?e[n]:void 0)||(e[n]={}),A=t[n];let o;if(A)for(o in A){cA.call(r,o)||(r[o]=[]);const e=A[o];fA(r[o],Array.isArray(e)?e:e?[e]:[])}}}function fA(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);aA(e,0,0,r)}function pA(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"οΏ½":String.fromCodePoint(n)}function gA(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const hA=kA(/[A-Za-z]/),mA=kA(/[\dA-Za-z]/),vA=kA(/[#-'*+\--9=?A-Z^-~]/);function yA(e){return null!==e&&(e<32||127===e)}const wA=kA(/\d/),bA=kA(/[\dA-Fa-f]/),EA=kA(/[!-/:-@[-`{-~]/);function PA(e){return null!==e&&e<-2}function BA(e){return null!==e&&(e<0||32===e)}function DA(e){return-2===e||-1===e||32===e}const CA=kA(new RegExp("\\p{P}|\\p{S}","u")),xA=kA(/\s/);function kA(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function SA(e){const t=[];let n=-1,r=0,A=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&mA(e.charCodeAt(n+1))&&mA(e.charCodeAt(n+2)))A=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),A=1):i="οΏ½"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+A+1,i=""),A&&(n+=A,A=0)}return t.join("")+e.slice(r)}function TA(e,t,n,r){const A=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){return DA(r)?(e.enter(n),i(r)):t(r)};function i(r){return DA(r)&&o++<A?(e.consume(r),i):(e.exit(n),t(r))}}const IA={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),TA(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,A(t)}function A(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):PA(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),A)}}};const QA={tokenize:function(e){const t=this,n=[];let r,A,o,i=0;return l;function l(r){if(i<n.length){const A=n[i];return t.containerState=A[1],e.attempt(A[0].continuation,a,s)(r)}return s(r)}function a(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let A,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){A=t.events[o][1].end;break}m(i);let l=n;for(;l<t.events.length;)t.events[l][1].end={...A},l++;return aA(t.events,o+1,0,t.events.slice(n)),t.events.length=l,s(e)}return l(e)}function s(A){if(i===n.length){if(!r)return d(A);if(r.currentConstruct&&r.currentConstruct.concrete)return p(A);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(MA,c,u)(A)}function c(e){return r&&v(),m(i),d(e)}function u(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(MA,f,p)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&v(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:A}),g(n))}function g(n){return null===n?(h(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):PA(n)?(e.consume(n),h(e.exit("chunkFlow")),i=0,t.interrupt=void 0,l):(e.consume(n),g)}function h(e,n){const l=t.sliceStream(e);if(n&&l.push(null),e.previous=A,A&&(A.next=e),A=e,r.defineSkip(e.start),r.write(l),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let A,l,a=n;for(;a--;)if("exit"===t.events[a][0]&&"chunkFlow"===t.events[a][1].type){if(A){l=t.events[a][1].end;break}A=!0}for(m(i),e=n;e<t.events.length;)t.events[e][1].end={...l},e++;aA(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let A=n.length;for(;A-- >r;){const r=n[A];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),A=void 0,r=void 0,t.containerState._closeFlow=void 0}}},MA={tokenize:function(e,t,n){return TA(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function OA(e){return null===e||BA(e)||xA(e)?1:CA(e)?2:void 0}function LA(e,t,n){const r=[];let A=-1;for(;++A<e.length;){const o=e[A].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const NA={name:"attention",resolveAll:function(e,t){let n,r,A,o,i,l,a,s,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&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;l=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 u={...e[n][1].end},d={...e[c][1].start};HA(u,-l),HA(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},i={type:l>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},A={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[c][1].start}},r={type:l>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[c][1].start={...i.end},a=[],e[n][1].end.offset-e[n][1].start.offset&&(a=sA(a,[["enter",e[n][1],t],["exit",e[n][1],t]])),a=sA(a,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",A,t]]),a=sA(a,LA(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),a=sA(a,[["exit",A,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(s=2,a=sA(a,[["enter",e[c][1],t],["exit",e[c][1],t]])):s=0,aA(e,n-1,c-n+3,a),c=n+a.length-s-2;break}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,A=OA(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(l){if(l===o)return e.consume(l),i;const a=e.exit("attentionSequence"),s=OA(l),c=!s||2===s&&A||n.includes(l),u=!A||2===A&&s||n.includes(r);return a._open=!!(42===o?c:c&&(A||!u)),a._close=!!(42===o?u:u&&(s||!c)),t(l)}}};function HA(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const RA={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),A};function A(t){return hA(t)?(e.consume(t),o):64===t?n(t):a(t)}function o(e){return 43===e||45===e||46===e||mA(e)?(r=1,i(e)):a(e)}function i(t){return 58===t?(e.consume(t),r=0,l):(43===t||45===t||46===t||mA(t))&&r++<32?(e.consume(t),i):(r=0,a(t))}function l(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||yA(r)?n(r):(e.consume(r),l)}function a(t){return 64===t?(e.consume(t),s):vA(t)?(e.consume(t),a):n(t)}function s(e){return mA(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,s):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||mA(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const FA={partial:!0,tokenize:function(e,t,n){return function(t){return DA(t)?TA(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||PA(e)?t(e):n(e)}}};const UA={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return DA(t)?TA(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)};function A(r){return e.attempt(UA,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),A}return n(t)};function A(n){return DA(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const jA={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return EA(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const zA={name:"characterReference",tokenize:function(e,t,n){const r=this;let A,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),A=31,o=mA,s(t))}function a(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),A=6,o=bA,s):(e.enter("characterReferenceValue"),A=7,o=wA,s(t))}function s(l){if(59===l&&i){const A=e.exit("characterReferenceValue");return o!==mA||lA(r.sliceSerialize(A))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return o(l)&&i++<A?(e.consume(l),s):n(l)}}};const _A={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A)};function A(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},qA={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,A={partial:!0,tokenize:function(e,t,n){let A=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a}function a(t){return e.enter("codeFencedFence"),DA(t)?TA(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(A++,e.consume(t),c):A>=l?(e.exit("codeFencedFenceSequence"),DA(t)?TA(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||PA(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,l=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),a(t)}(t)};function a(t){return t===o?(l++,e.consume(t),a):l<3?n(t):(e.exit("codeFencedFenceSequence"),DA(t)?TA(e,s,"whitespace")(t):s(t))}function s(n){return null===n||PA(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(_A,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||PA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(t)):DA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),TA(e,u,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),c)}function u(t){return null===t||PA(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||PA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(t)):96===t&&t===o?n(t):(e.consume(t),d)}function f(t){return e.attempt(A,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return i>0&&DA(t)?TA(e,h,"linePrefix",i+1)(t):h(t)}function h(t){return null===t||PA(t)?e.check(_A,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||PA(t)?(e.exit("codeFlowValue"),h(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const GA={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),TA(e,A,"linePrefix",5)(t)};function A(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?l(t):PA(t)?e.attempt(YA,o,l)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||PA(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function l(n){return e.exit("codeIndented"),t(n)}}},YA={partial:!0,tokenize:function(e,t,n){const r=this;return A;function A(t){return r.parser.lazy[r.now().line]?n(t):PA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A):TA(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):PA(e)?A(e):n(e)}}};const WA={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,A=3;if(!("lineEnding"!==e[A][1].type&&"space"!==e[A][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=A;++t<r;)if("codeTextData"===e[t][1].type){e[A][1].type="codeTextPadding",e[r][1].type="codeTextPadding",A+=2,r-=2;break}for(t=A-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(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,A,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),l(t))}function l(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):96===t?(A=e.enter("codeTextSequence"),r=0,s(t)):PA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("codeTextData"),a(t))}function a(t){return null===t||32===t||96===t||PA(t)?(e.exit("codeTextData"),l(t)):(e.consume(t),a)}function s(n){return 96===n?(e.consume(n),r++,s):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(A.type="codeTextData",a(n))}}};class VA{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const A=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&XA(this.left,n),A.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),XA(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),XA(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);XA(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);XA(this.left,t.reverse())}}}function XA(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 KA(e){const t={};let n,r,A,o,i,l,a,s=-1;const c=new VA(e);for(;++s<c.length;){for(;s in t;)s=t[s];if(n=c.get(s),s&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(s-1)[1].type&&(l=n[1]._tokenizer.events,A=0,A<l.length&&"lineEndingBlank"===l[A][1].type&&(A+=2),A<l.length&&"content"===l[A][1].type))for(;++A<l.length&&"content"!==l[A][1].type;)"chunkText"===l[A][1].type&&(l[A][1]._isInFirstContentOfListItem=!0,A++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,JA(c,s)),s=t[s],a=!0);else if(n[1]._container){for(A=s,r=void 0;A--;)if(o=c.get(A),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=A);else if("linePrefix"!==o[1].type)break;r&&(n[1].end={...c.get(r)[1].start},i=c.slice(r,s),i.unshift(n),c.splice(r,s-r+1,i))}}return aA(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!a}function JA(e,t){const n=e.get(t)[1],r=e.get(t)[2];let A=t-1;const o=[],i=n._tokenizer||r.parser[n.contentType](n.start),l=i.events,a=[],s={};let c,u,d=-1,f=n,p=0,g=0;const h=[g];for(;f;){for(;e.get(++A)[1]!==f;);o.push(A),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<l.length;)"exit"===l[d][0]&&"enter"===l[d-1][0]&&l[d][1].type===l[d-1][1].type&&l[d][1].start.line!==l[d][1].end.line&&(g=d+1,h.push(g),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),d=h.length;d--;){const t=l.slice(h[d],h[d+1]),n=o.pop();a.push([n,n+t.length-1]),e.splice(n,2,t)}for(a.reverse(),d=-1;++d<a.length;)s[p+a[d][0]]=p+a[d][1],p+=a[d][1]-a[d][0]-1;return s}const ZA={resolve:function(e){return KA(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?A(t):PA(t)?e.check($A,o,A)(t):(e.consume(t),r)}function A(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},$A={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),TA(e,A,"linePrefix")};function A(A){if(null===A||PA(A))return n(A);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(A):e.interrupt(r.parser.constructs.flow,n,t)(A)}}};function eo(e,t,n,r,A,o,i,l,a){const s=a||Number.POSITIVE_INFINITY;let c=0;return function(t){return 60===t?(e.enter(r),e.enter(A),e.enter(o),e.consume(t),e.exit(o),u):null===t||32===t||41===t||yA(t)?n(t):(e.enter(r),e.enter(i),e.enter(l),e.enter("chunkString",{contentType:"string"}),p(t))};function u(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(A),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(l),u(t)):null===t||60===t||PA(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(A){return c||null!==A&&41!==A&&!BA(A)?c<s&&40===A?(e.consume(A),c++,p):41===A?(e.consume(A),c--,p):null===A||32===A||40===A||yA(A)?n(A):(e.consume(A),92===A?g:p):(e.exit("chunkString"),e.exit(l),e.exit(i),e.exit(r),t(A))}function g(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function to(e,t,n,r,A,o){const i=this;let l,a=0;return function(t){return e.enter(r),e.enter(A),e.consume(t),e.exit(A),e.enter(o),s};function s(u){return a>999||null===u||91===u||93===u&&!l||94===u&&!a&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):93===u?(e.exit(o),e.enter(A),e.consume(u),e.exit(A),e.exit(r),t):PA(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||PA(t)||a++>999?(e.exit("chunkString"),s(t)):(e.consume(t),l||(l=!DA(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),a++,c):c(t)}}function no(e,t,n,r,A,o){let i;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(A),e.consume(t),e.exit(A),i=40===t?41:t,l):n(t)};function l(n){return n===i?(e.enter(A),e.consume(n),e.exit(A),e.exit(r),t):(e.enter(o),a(n))}function a(t){return t===i?(e.exit(o),l(i)):null===t?n(t):PA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),TA(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(t))}function s(t){return t===i||null===t||PA(t)?(e.exit("chunkString"),a(t)):(e.consume(t),92===t?c:s)}function c(t){return t===i||92===t?(e.consume(t),s):s(t)}}function ro(e,t){let n;return function r(A){return PA(A)?(e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),n=!0,r):DA(A)?TA(e,r,n?"linePrefix":"lineSuffix")(A):t(A)}}const Ao={name:"definition",tokenize:function(e,t,n){const r=this;let A;return function(t){return e.enter("definition"),function(t){return to.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return A=gA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return BA(t)?ro(e,l)(t):l(t)}function l(t){return eo(e,a,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function a(t){return e.attempt(oo,s,s)(t)}function s(t){return DA(t)?TA(e,c,"whitespace")(t):c(t)}function c(o){return null===o||PA(o)?(e.exit("definition"),r.parser.defined.push(A),t(o)):n(o)}}},oo={partial:!0,tokenize:function(e,t,n){return function(t){return BA(t)?ro(e,r)(t):n(t)};function r(t){return no(e,A,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function A(t){return DA(t)?TA(e,o,"whitespace")(t):o(t)}function o(e){return null===e||PA(e)?t(e):n(e)}}};const io={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return PA(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const lo={name:"headingAtx",resolve:function(e,t){let n,r,A=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),A-2>o&&"whitespace"===e[A][1].type&&(A-=2),"atxHeadingSequence"===e[A][1].type&&(o===A-1||A-4>o&&"whitespace"===e[A-2][1].type)&&(A-=o+1===A?2:4),A>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[A][1].end},r={type:"chunkText",start:e[o][1].start,end:e[A][1].end,contentType:"text"},aA(e,o,A-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),A(t)}(t)};function A(t){return 35===t&&r++<6?(e.consume(t),A):null===t||BA(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||PA(n)?(e.exit("atxHeading"),t(n)):DA(n)?TA(e,o,"whitespace")(n):(e.enter("atxHeadingText"),l(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function l(t){return null===t||35===t||BA(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),l)}}};const ao=["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"],so=["pre","script","style","textarea"],co={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(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 A,o,i,l,a;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),s}(t)};function s(l){return 33===l?(e.consume(l),c):47===l?(e.consume(l),o=!0,f):63===l?(e.consume(l),A=3,r.interrupt?t:O):hA(l)?(e.consume(l),i=String.fromCharCode(l),p):n(l)}function c(o){return 45===o?(e.consume(o),A=2,u):91===o?(e.consume(o),A=5,l=0,d):hA(o)?(e.consume(o),A=4,r.interrupt?t:O):n(o)}function u(A){return 45===A?(e.consume(A),r.interrupt?t:O):n(A)}function d(A){const o="CDATA[";return A===o.charCodeAt(l++)?(e.consume(A),6===l?r.interrupt?t:C:d):n(A)}function f(t){return hA(t)?(e.consume(t),i=String.fromCharCode(t),p):n(t)}function p(l){if(null===l||47===l||62===l||BA(l)){const a=47===l,s=i.toLowerCase();return a||o||!so.includes(s)?ao.includes(i.toLowerCase())?(A=6,a?(e.consume(l),g):r.interrupt?t(l):C(l)):(A=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(l):o?h(l):m(l)):(A=1,r.interrupt?t(l):C(l))}return 45===l||mA(l)?(e.consume(l),i+=String.fromCharCode(l),p):n(l)}function g(A){return 62===A?(e.consume(A),r.interrupt?t:C):n(A)}function h(t){return DA(t)?(e.consume(t),h):B(t)}function m(t){return 47===t?(e.consume(t),B):58===t||95===t||hA(t)?(e.consume(t),v):DA(t)?(e.consume(t),m):B(t)}function v(t){return 45===t||46===t||58===t||95===t||mA(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),w):DA(t)?(e.consume(t),y):m(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,b):DA(t)?(e.consume(t),w):E(t)}function b(t){return t===a?(e.consume(t),a=null,P):null===t||PA(t)?n(t):(e.consume(t),b)}function E(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||BA(t)?y(t):(e.consume(t),E)}function P(e){return 47===e||62===e||DA(e)?m(e):n(e)}function B(t){return 62===t?(e.consume(t),D):n(t)}function D(t){return null===t||PA(t)?C(t):DA(t)?(e.consume(t),D):n(t)}function C(t){return 45===t&&2===A?(e.consume(t),T):60===t&&1===A?(e.consume(t),I):62===t&&4===A?(e.consume(t),L):63===t&&3===A?(e.consume(t),O):93===t&&5===A?(e.consume(t),M):!PA(t)||6!==A&&7!==A?null===t||PA(t)?(e.exit("htmlFlowData"),x(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(uo,N,x)(t))}function x(t){return e.check(fo,k,N)(t)}function k(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),S}function S(t){return null===t||PA(t)?x(t):(e.enter("htmlFlowData"),C(t))}function T(t){return 45===t?(e.consume(t),O):C(t)}function I(t){return 47===t?(e.consume(t),i="",Q):C(t)}function Q(t){if(62===t){const n=i.toLowerCase();return so.includes(n)?(e.consume(t),L):C(t)}return hA(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),Q):C(t)}function M(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===A?(e.consume(t),O):C(t)}function L(t){return null===t||PA(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},uo={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(FA,t,n)}}},fo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return PA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A):n(t)};function A(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const po={name:"htmlText",tokenize:function(e,t,n){const r=this;let A,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),a):47===t?(e.consume(t),w):63===t?(e.consume(t),v):hA(t)?(e.consume(t),P):n(t)}function a(t){return 45===t?(e.consume(t),s):91===t?(e.consume(t),o=0,f):hA(t)?(e.consume(t),m):n(t)}function s(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):PA(t)?(i=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?I(e):45===e?u(e):c(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),g):PA(t)?(i=p,Q(t)):(e.consume(t),p)}function g(t){return 93===t?(e.consume(t),h):p(t)}function h(t){return 62===t?I(t):93===t?(e.consume(t),h):p(t)}function m(t){return null===t||62===t?I(t):PA(t)?(i=m,Q(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):PA(t)?(i=v,Q(t)):(e.consume(t),v)}function y(e){return 62===e?I(e):v(e)}function w(t){return hA(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||mA(t)?(e.consume(t),b):E(t)}function E(t){return PA(t)?(i=E,Q(t)):DA(t)?(e.consume(t),E):I(t)}function P(t){return 45===t||mA(t)?(e.consume(t),P):47===t||62===t||BA(t)?B(t):n(t)}function B(t){return 47===t?(e.consume(t),I):58===t||95===t||hA(t)?(e.consume(t),D):PA(t)?(i=B,Q(t)):DA(t)?(e.consume(t),B):I(t)}function D(t){return 45===t||46===t||58===t||95===t||mA(t)?(e.consume(t),D):C(t)}function C(t){return 61===t?(e.consume(t),x):PA(t)?(i=C,Q(t)):DA(t)?(e.consume(t),C):B(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),A=t,k):PA(t)?(i=x,Q(t)):DA(t)?(e.consume(t),x):(e.consume(t),S)}function k(t){return t===A?(e.consume(t),A=void 0,T):null===t?n(t):PA(t)?(i=k,Q(t)):(e.consume(t),k)}function S(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||BA(t)?B(t):(e.consume(t),S)}function T(e){return 47===e||62===e||BA(e)?B(e):n(e)}function I(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return DA(t)?TA(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),i(t)}}};const go={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&aA(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,A,o,i=e.length,l=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(A){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(A=i);const a={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},s={type:"label",start:{...e[r][1].start},end:{...e[A][1].end}},c={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[A-2][1].start}};return o=[["enter",a,t],["enter",s,t]],o=sA(o,e.slice(r+1,r+l+3)),o=sA(o,[["enter",c,t]]),o=sA(o,LA(t.parser.constructs.insideSpan.null,e.slice(r+l+4,A-3),t)),o=sA(o,[["exit",c,t],e[A-2],e[A-1],["exit",s,t]]),o=sA(o,e.slice(A+1)),o=sA(o,[["exit",a,t]]),aA(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let A,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){A=r.events[i][1];break}return function(t){return A?A._inactive?c(t):(o=r.parser.defined.includes(gA(r.sliceSerialize({start:A.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(ho,s,o?s:c)(t):91===t?e.attempt(mo,s,o?a:c)(t):o?s(t):c(t)}function a(t){return e.attempt(vo,s,c)(t)}function s(e){return t(e)}function c(e){return A._balanced=!0,n(e)}}},ho={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return BA(t)?ro(e,A)(t):A(t)}function A(t){return 41===t?s(t):eo(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return BA(t)?ro(e,l)(t):s(t)}function i(e){return n(e)}function l(t){return 34===t||39===t||40===t?no(e,a,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):s(t)}function a(t){return BA(t)?ro(e,s)(t):s(t)}function s(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},mo={tokenize:function(e,t,n){const r=this;return function(t){return to.call(r,e,A,o,"reference","referenceMarker","referenceString")(t)};function A(e){return r.parser.defined.includes(gA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},vo={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const yo={name:"labelStartImage",resolveAll:go.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),A};function A(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const wo={name:"labelStartLink",resolveAll:go.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),A};function A(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const bo={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),TA(e,t,"linePrefix")}}};const Eo={name:"thematicBreak",tokenize:function(e,t,n){let r,A=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):A>=3&&(null===o||PA(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),A++,i):(e.exit("thematicBreakSequence"),DA(t)?TA(e,o,"whitespace")(t):o(t))}}};const Po={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(FA,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,TA(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!DA(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,A(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Do,t,A)(n))});function A(A){return r.containerState._closeFlow=!0,r.interrupt=void 0,TA(e,e.attempt(Po,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,A=r.events[r.events.length-1];let o=A&&"linePrefix"===A[1].type?A[2].sliceSerialize(A[1],!0).length:0,i=0;return function(t){const A=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===A?!r.containerState.marker||t===r.containerState.marker:wA(t)){if(r.containerState.type||(r.containerState.type=A,e.enter(A,{_container:!0})),"listUnordered"===A)return e.enter("listItemPrefix"),42===t||45===t?e.check(Eo,n,a)(t):a(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(t)}return n(t)};function l(t){return wA(t)&&++i<10?(e.consume(t),l):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),a(t)):n(t)}function a(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(FA,r.interrupt?n:s,e.attempt(Bo,u,c))}function s(e){return r.containerState.initialBlankLine=!0,o++,u(e)}function c(t){return DA(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Bo={partial:!0,tokenize:function(e,t,n){const r=this;return TA(e,function(e){const A=r.events[r.events.length-1];return!DA(e)&&A&&"listItemPrefixWhitespace"===A[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Do={partial:!0,tokenize:function(e,t,n){const r=this;return TA(e,function(e){const A=r.events[r.events.length-1];return A&&"listItemIndent"===A[1].type&&A[2].sliceSerialize(A[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Co={name:"setextUnderline",resolveTo:function(e,t){let n,r,A,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),!A&&"definition"===e[o][1].type&&(A=o);const i={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",A?(e.splice(r,0,["enter",i,t]),e.splice(A+1,0,["exit",e[n][1],t]),e[n][1].end={...e[A][1].end}):e[n][1]=i,e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let A;return function(t){let i,l=r.events.length;for(;l--;)if("lineEnding"!==r.events[l][1].type&&"linePrefix"!==r.events[l][1].type&&"content"!==r.events[l][1].type){i="paragraph"===r.events[l][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!i?n(t):(e.enter("setextHeadingLine"),A=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t))};function o(t){return t===A?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),DA(t)?TA(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||PA(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const xo={tokenize:function(e){const t=this,n=e.attempt(FA,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,TA(e,e.attempt(this.parser.constructs.flow,r,e.attempt(ZA,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const ko={resolveAll:Qo()},So=Io("string"),To=Io("text");function Io(e){return{resolveAll:Qo("text"===e?Mo:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],A=t.attempt(r,o,i);return o;function o(e){return a(e)?A(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),l;t.consume(e)}function l(e){return a(e)?(t.exit("data"),A(e)):(t.consume(e),l)}function a(e){if(null===e)return!0;const t=r[e];let A=-1;if(t)for(;++A<t.length;){const e=t[A];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Qo(e){return function(t,n){let r,A=-1;for(;++A<=t.length;)void 0===r?t[A]&&"data"===t[A][1].type&&(r=A,A++):(!t[A]||"data"!==t[A][1].type)&&(A!==r+2&&(t[r][1].end=t[A-1][1].end,t.splice(r+2,A-r-2),A=r+2),r=void 0);return e?e(t,n):t}}function Mo(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],A=t.sliceStream(r);let o,i=A.length,l=-1,a=0;for(;i--;){const e=A[i];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)a++,l--;if(l)break;l=-1}else if(-2===e)o=!0,a++;else if(-1!==e){i++;break}}if(a){const A={type:n===e.length||o||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:r.start._bufferIndex+l,_index:r.start._index+i,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},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 Oo={42:Po,43:Po,45:Po,48:Po,49:Po,50:Po,51:Po,52:Po,53:Po,54:Po,55:Po,56:Po,57:Po,62:UA},Lo={91:Ao},No={[-2]:GA,[-1]:GA,32:GA},Ho={35:lo,42:Eo,45:[Co,Eo],60:co,61:Co,95:Eo,96:qA,126:qA},Ro={38:zA,92:jA},Fo={[-5]:bo,[-4]:bo,[-3]:bo,33:yo,38:zA,42:NA,60:[RA,po],91:wo,92:[io,jA],93:go,95:NA,96:WA},Uo={null:[NA,ko]},jo=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Lo,disable:{null:[]},document:Oo,flow:Ho,flowInitial:No,insideSpan:Uo,string:Ro,text:Fo},Symbol.toStringTag,{value:"Module"}));function zo(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 A={},o=[];let i=[],l=[];const a={attempt:g(function(e,t){h(e,t.from)}),check:g(p),consume:function(e){PA(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),s.events.push(["enter",n,s]),l.push(n),n},exit:function(e){const t=l.pop();return t.end=d(),s.events.push(["exit",t,s]),t},interrupt:g(p,{interrupt:!0})},s={code:null,containerState:{},defineSkip:function(e){A[e.line]=e.column,m()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let A;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&A)continue;i=" ";break;default:i=String.fromCharCode(o)}A=-2===o,r.push(i)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return i=sA(i,e),function(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)f(t.charCodeAt(r._bufferIndex));else f(t)}}(),null!==i[i.length-1]?[]:(h(t,0),s.events=LA(o,s.events,s),s.events)}};let c=t.tokenize.call(s,a);return t.resolveAll&&o.push(t),s;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,A=t.end._index,o=t.end._bufferIndex;let i;if(n===A)i=[e[n].slice(r,o)];else{if(i=e.slice(n,A),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[A].slice(0,o))}return i}(i,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:A,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:A,offset:o}}function f(e){c=c(e)}function p(e,t){t.restore()}function g(e,t){return function(n,A,o){let i,c,u,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return i=e,c=0,0===e.length?o:g(e[c])}function g(e){return function(n){return f=function(){const e=d(),t=s.previous,n=s.currentConstruct,A=s.events.length,o=Array.from(l);return{from:A,restore:i};function i(){r=e,s.previous=t,s.currentConstruct=n,s.events.length=A,l=o,m()}}(),u=e,e.partial||(s.currentConstruct=e),e.name&&s.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(s),t):s,a,h,v)(n)}}function h(t){return e(u,f),A}function v(e){return f.restore(),++c<i.length?g(i[c]):o}}}function h(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&aA(s.events,t,s.events.length-t,e.resolve(s.events.slice(t),s)),e.resolveTo&&(s.events=e.resolveTo(s.events,s))}function m(){r.line in A&&r.column<2&&(r.column=A[r.line],r.offset+=A[r.line]-1)}}const _o=/[\0\t\n\r]/g;const qo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Go(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return pA(n.slice(t?2:1),t?16:10)}return lA(n)||e}const Yo={}.hasOwnProperty;function Wo(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:D,autolinkEmail:D,atxHeading:o(J),blockQuote:o(Y),characterEscape:D,characterReference:D,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(V,i),codeTextData:D,data:D,codeFlowValue:D,definition:o(X),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(K),hardBreakEscape:o(Z),hardBreakTrailing:o(Z),htmlFlow:o($,i),htmlFlowData:D,htmlText:o($,i),htmlTextData:D,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:d,listOrdered:o(ne,u),listUnordered:o(ne),paragraph:o(Ae),reference:F,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(J),strong:o(oe),thematicBreak:o(le)},exit:{atxHeading:a(),atxHeadingSequence:b,autolink:a(),autolinkEmail:G,autolinkProtocol:q,blockQuote:a(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:z,characterReference:_,codeFenced:a(h),codeFencedFence:g,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:a(m),codeText:a(I),codeTextData:C,data:C,definition:a(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:a(),hardBreakEscape:a(k),hardBreakTrailing:a(k),htmlFlow:a(S),htmlFlowData:C,htmlText:a(T),htmlTextData:C,image:a(M),label:L,labelText:O,lineEnding:x,link:a(Q),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:U,resourceDestinationString:N,resourceTitleString:H,resource:R,setextHeading:a(B),setextHeadingLineSequence:P,setextHeadingText:E,strong:a(),thematicBreak:a()}};Xo(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:l,exit:s,buffer:i,resume:c,data:n},a=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])a.push(u);else{u=A(e,a.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];Yo.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},o),e[u][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Jo).call(o,void 0,e[0])}for(r.position={start:Vo(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Vo(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function A(e,t,n){let r,A,o,i,l=t-1,a=-1,s=!1;for(;++l<=n;){const t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?a++:a--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!i&&!a&&!o&&(o=l),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!a&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===a&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=l;for(A=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;A&&(e[A][1].type="lineEndingBlank",s=!0),t[1].type="lineEnding",A=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!A||o<A)&&(r._spread=!0),r.end=Object.assign({},A?e[A][1].start:t[1].end),e.splice(A||l,0,["exit",r,t[2]]),l++,n++}if("listItemPrefix"===t[1].type){const A={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=A,e.splice(l,0,["enter",A,t[2]]),l++,n++,o=void 0,i=!0}}}return e[t][1]._spread=s,n}function o(e,t){return n;function n(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Vo(t.start),end:void 0}}function a(e){return t;function t(t){e&&e.call(this,t),s.call(this,t)}}function s(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Jo).call(this,e,r[0])),n.position.end=Vo(e.end)}function c(){return function(e){return AA(e,"boolean"!=typeof rA.includeImageAlt||rA.includeImageAlt,"boolean"!=typeof rA.includeHtml||rA.includeHtml)}(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function h(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=gA(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function P(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function B(){this.data.setextHeadingSlurpLineEnding=void 0}function D(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=ie(),n.position={start:Vo(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Vo(e.end)}function x(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Vo(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(D.call(this,e),C.call(this,e))}function k(){this.data.atHardBreak=!0}function S(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(qo,Go)}(t),n.identifier=gA(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function H(){const e=this.resume();this.stack[this.stack.length-1].title=e}function R(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=gA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function z(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=pA(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=lA(t);this.stack[this.stack.length-1].value+=r}function _(e){this.stack.pop().position.end=Vo(e.end)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Y(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function V(){return{type:"inlineCode",value:""}}function X(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}(n)(function(e){for(;!KA(e););return e}(function(e){const t={constructs:uA([jo,...(e||{}).extensions||[]]),content:n(IA),defined:[],document:n(QA),flow:n(xo),lazy:{},string:n(So),text:n(To)};return t;function n(e){return function(n){return zo(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(A,o,i){const l=[];let a,s,c,u,d;for(A=n+("string"==typeof A?A.toString():new TextDecoder(o||void 0).decode(A)),c=0,n="",r&&(65279===A.charCodeAt(0)&&c++,r=void 0);c<A.length;){if(_o.lastIndex=c,a=_o.exec(A),u=a&&void 0!==a.index?a.index:A.length,d=A.charCodeAt(u),!a){n=A.slice(c);break}if(10===d&&c===u&&e)l.push(-3),e=void 0;else switch(e&&(l.push(-5),e=void 0),c<u&&(l.push(A.slice(c,u)),t+=u-c),d){case 0:l.push(65533),t++;break;case 9:for(s=4*Math.ceil(t/4),l.push(-2);t++<s;)l.push(-1);break;case 10:l.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return i&&(e&&l.push(-5),n&&l.push(n),l.push(null)),l}}()(e,t,!0))))}function Vo(e){return{line:e.line,column:e.column,offset:e.offset}}function Xo(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Xo(e,r):Ko(e,r)}}function Ko(e,t){let n;for(n in t)if(Yo.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 Jo(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is still open")}function Zo(e){const t=this;t.parser=function(n){return Wo(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function $o(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const A=e.all(t),o=A[0];o&&"text"===o.type?o.value="["+o.value:A.unshift({type:"text",value:"["});const i=A[A.length-1];return i&&"text"===i.type?i.value+=r:A.push({type:"text",value:r}),A}function ei(e){return e.spread??e.children.length>1}function ti(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),A=0;const o=[];for(;r;)o.push(ni(t.slice(A,r.index),A>0,!0),r[0]),A=r.index+r[0].length,r=n.exec(t);return o.push(ni(t.slice(A),A>0,!1)),o.join("")}function ni(e,t,n){let r=0,A=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(A-1);for(;9===t||32===t;)A--,t=e.codePointAt(A-1)}return A>r?e.slice(r,A):""}const ri={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:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let A={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(A.data={meta:t.meta}),e.patch(t,A),A=e.applyData(t,A),A={type:"element",tagName:"pre",properties:{},children:[A]},e.patch(t,A),A},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="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),A=SA(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,l=e.footnoteCounts.get(r);void 0===l?(l=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,l+=1,e.footnoteCounts.set(r,l);const a={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+A,id:n+"fnref-"+A+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,a);const s={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,s),e.applyData(t,s)},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 $o(e,t);const A={src:SA(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(A.title=r.title);const o={type:"element",tagName:"img",properties:A,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:SA(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(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 $o(e,t);const A={href:SA(r.url||"")};null!==r.title&&void 0!==r.title&&(A.title=r.title);const o={type:"element",tagName:"a",properties:A,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:SA(t.url)};null!==t.title&&void 0!==t.title&&(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),A=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=ei(n[r])}return t}(n):ei(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const e=r[l];(A||0!==l||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||A?i.push(e):i.push(...e.children)}const a=r[r.length-1];a&&(A||"element"!==a.type||"p"!==a.tagName)&&i.push({type:"text",value:"\n"});const s={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,s),e.applyData(t,s)},list:function(e,t){const n={},r=e.all(t);let A=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++A<r.length;){const e=r[A];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},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(),A=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),A.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Ir(t.children[1]),i=Tr(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),A.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(A,!0)};return e.patch(t,o),e.applyData(t,o)},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,A=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let l=-1;const a=[];for(;++l<i;){const n=t.children[l],r={},i=o?o[l]:void 0;i&&(r.align=i);let s={type:"element",tagName:A,properties:r,children:[]};n&&(s.children=e.all(n),e.patch(n,s),s=e.applyData(n,s)),a.push(s)}const s={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)},text:function(e,t){const n={type:"text",value:ti(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:Ai,yaml:Ai,definition:Ai,footnoteDefinition:Ai};function Ai(){}const oi="object"==typeof self?self:globalThis,ii=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=A=>{if(e.has(A))return e.get(A);const[o,i]=t[A];switch(o){case 0:case-1:return n(i,A);case 1:{const e=n([],A);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},A);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),A);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),A)}case 5:{const e=n(new Map,A);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,A);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new oi[e](t),A)}case 8:return n(BigInt(i),A);case"BigInt":return n(Object(BigInt(i)),A);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new oi[o](i),A)};return r})(new Map,e)(0),li="",{toString:ai}={},{keys:si}=Object,ci=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=ai.call(e).slice(8,-1);switch(n){case"Array":return[1,li];case"Object":return[2,li];case"Date":return[3,li];case"RegExp":return[4,li];case"Map":return[5,li];case"Set":return[6,li];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ui=([e,t])=>0===e&&("function"===t||"symbol"===t),di=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const A=(e,t)=>{const A=r.push(e)-1;return n.set(t,A),A},o=r=>{if(n.has(r))return n.get(r);let[i,l]=ci(r);switch(i){case 0:{let t=r;switch(l){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);t=null;break;case"undefined":return A([-1],r)}return A([i,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),A([l,[...e]],r)}const e=[],t=A([i,e],r);for(const t of r)e.push(o(t));return t}case 2:{if(l)switch(l){case"BigInt":return A([l,r.toString()],r);case"Boolean":case"Number":case"String":return A([l,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],a=A([i,n],r);for(const t of si(r))(e||!ui(ci(r[t])))&&n.push([o(t),o(r[t])]);return a}case 3:return A([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return A([i,{source:e,flags:t}],r)}case 5:{const t=[],n=A([i,t],r);for(const[n,A]of r)(e||!ui(ci(n))&&!ui(ci(A)))&&t.push([o(n),o(A)]);return n}case 6:{const t=[],n=A([i,t],r);for(const n of r)(e||!ui(ci(n)))&&t.push(o(n));return n}}const{message:a}=r;return A([i,{name:l,message:a}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},fi="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ii(di(e,t)):structuredClone(e):(e,t)=>ii(di(e,t));function pi(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 gi(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const hi=function(e){if(null==e)return vi;if("function"==typeof e)return mi(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=hi(e[n]);return mi(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return mi(n);function n(n){const r=n;let A;for(A in e)if(r[A]!==t[A])return!1;return!0}}(e);if("string"==typeof e)return function(e){return mi(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function mi(e){return function(t,n,r){return!(!function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)||!e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function vi(){return!0}const yi=[],wi=!0,bi=!1;function Ei(e,t,n,r){let A;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):A=t;const o=hi(A),i=r?-1:1;!function e(A,l,a){const s=A&&"object"==typeof A?A:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(c,"name",{value:"node ("+A.type+(e?"<"+e+">":"")+")"})}return c;function c(){let s,c,u,d=yi;if((!t||o(A,l,a[a.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[wi,e]:null==e?yi:[e]}(n(A,a)),d[0]===bi))return d;if("children"in A&&A.children){const t=A;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+i,u=a.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(s=e(n,c,u)(),s[0]===bi)return s;c="number"==typeof s[1]?s[1]:c+i}}return d}}(e,void 0,[])()}function Pi(e,t,n,r){let A,o,i;"function"==typeof t?(o=void 0,i=t,A=n):(o=t,i=n,A=r),Ei(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)},A)}const Bi={}.hasOwnProperty,Di={};function Ci(e,t){const n=t||Di,r=new Map,A=new Map,o=new Map,i={...ri,...n.handlers},l={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const A=l.one(n[r],e);if(A){if(r&&"break"===n[r-1].type&&(!Array.isArray(A)&&"text"===A.type&&(A.value=Ii(A.value)),!Array.isArray(A)&&"element"===A.type)){const e=A.children[0];e&&"text"===e.type&&(e.value=Ii(e.value))}Array.isArray(A)?t.push(...A):t.push(A)}}}return t},applyData:ki,definitionById:r,footnoteById:A,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=l.handlers[n];if(Bi.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=fi(n);return r.children=l.all(e),r}return fi(e)}return(l.options.unknownHandler||Si)(l,e,t)},options:n,patch:xi,wrap:Ti};return Pi(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:A,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),l}function xi(e,t){e.position&&(t.position=function(e){const t=Ir(e),n=Tr(e);if(t&&n)return{start:t,end:n}}(e))}function ki(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,A=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&A&&Object.assign(n.properties,fi(A)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Si(e,t){const n=t.data||{},r=!("value"in t)||Bi.call(n,"hProperties")||Bi.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 Ti(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Ii(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Qi(e,t){const n=Ci(e,t),r=n.one(e,void 0),A=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pi,r=e.options.footnoteBackLabel||gi,A=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let a=-1;for(;++a<e.footnoteOrder.length;){const A=e.footnoteById.get(e.footnoteOrder[a]);if(!A)continue;const o=e.all(A),i=String(A.identifier).toUpperCase(),s=SA(i.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(i);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(a,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(a,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else o.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+s},children:e.wrap(o,!0)};e.patch(A,p),l.push(p)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...fi(i),id:"footnote-label"},children:[{type:"text",value:A}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return A&&o.children.push({type:"text",value:"\n"},A),o}function Mi(e,t){return e&&"run"in e?async function(n,r){const A=Qi(n,{file:r,...t});await e.run(A,r)}:function(n,r){return Qi(n,{file:r,...e||t})}}function Oi(e){if(e)throw e}var Li,Ni;var Hi=function(){if(Ni)return Li;Ni=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,A=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,A=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!A&&!o)return!1;for(r in n);return typeof r>"u"||e.call(n,r)},i=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Li=function e(){var t,n,r,a,s,c,u=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof u&&(p=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=l(u,n),u!==(a=l(t,n))&&(p&&a&&(o(a)||(s=A(a)))?(s?(s=!1,c=r&&A(r)?r:[]):c=r&&o(r)?r:{},i(u,{name:n,newValue:e(p,c,a)})):typeof a<"u"&&i(u,{name:n,newValue:a}));return u},Li}();const Ri=Er(Hi);function Fi(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Ui(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function A(o,...i){const l=e[++n];let a=-1;if(o)r(o);else{for(;++a<t.length;)(null===i[a]||void 0===i[a])&&(i[a]=t[a]);t=i,l?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(A);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return A(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(o,A):i instanceof Error?A(i):o(i))}function A(e,...r){n||(n=!0,t(e,...r))}function o(e){A(null,e)}}(l,A)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const ji={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');zi(e);let n,r=0,A=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else A<0&&(n=!0,A=o+1);return A<0?"":e.slice(r,A)}if(t===e)return"";let i=-1,l=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(A=o):(l=-1,A=i));return r===A?A=i:A<0&&(A=e.length),e.slice(r,A)},dirname:function(e){if(zi(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){zi(e);let t,n=e.length,r=-1,A=0,o=-1,i=0;for(;n--;){const l=e.codePointAt(n);if(47!==l)r<0&&(t=!0,r=n+1),46===l?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){A=n+1;break}}return o<0||r<0||0===i||1===i&&o===r-1&&o===A+1?"":e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)zi(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){zi(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,A="",o=0,i=-1,l=0,a=-1;for(;++a<=e.length;){if(a<e.length)n=e.codePointAt(a);else{if(47===n)break;n=47}if(47===n){if(i!==a-1&&1!==l)if(i!==a-1&&2===l){if(A.length<2||2!==o||46!==A.codePointAt(A.length-1)||46!==A.codePointAt(A.length-2))if(A.length>2){if(r=A.lastIndexOf("/"),r!==A.length-1){r<0?(A="",o=0):(A=A.slice(0,r),o=A.length-1-A.lastIndexOf("/")),i=a,l=0;continue}}else if(A.length>0){A="",o=0,i=a,l=0;continue}t&&(A=A.length>0?A+"/..":"..",o=2)}else A.length>0?A+="/"+e.slice(i+1,a):A=e.slice(i+1,a),o=a-i-1;i=a,l=0}else 46===n&&l>-1?l++:l=-1}return A}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function zi(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _i={cwd:function(){return"/"}};function qi(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Gi(e){if("string"==typeof e)e=new URL(e);else if(!qi(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Yi=["history","path","basename","stem","extname","dirname"];class Wi{constructor(e){let t;var n;t=e?qi(e)?{path:e}:"string"==typeof e||(n=e)&&"object"==typeof n&&"byteLength"in n&&"byteOffset"in n?{value:e}:e:{},this.cwd="cwd"in t?"":_i.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,A=-1;for(;++A<Yi.length;){const e=Yi[A];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Yi.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?ji.basename(this.path):void 0}set basename(e){Xi(e,"basename"),Vi(e,"basename"),this.path=ji.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ji.dirname(this.path):void 0}set dirname(e){Ki(this.basename,"dirname"),this.path=ji.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ji.extname(this.path):void 0}set extname(e){if(Vi(e,"extname"),Ki(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ji.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){qi(e)&&(e=Gi(e)),Xi(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ji.basename(this.path,this.extname):void 0}set stem(e){Xi(e,"stem"),Vi(e,"stem"),this.path=ji.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Hr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Vi(e,t){if(e&&e.includes(ji.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ji.sep+"`")}function Xi(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ki(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Ji=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Zi={}.hasOwnProperty;class $i extends Ji{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=Ui()}copy(){const e=new $i;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Ri(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(rl("data",this.frozen),this.namespace[e]=t,this):Zi.call(this.namespace,e)&&this.namespace[e]||void 0:e?(rl("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=il(e),n=this.parser||this.Parser;return tl("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),tl("process",this.parser||this.Parser),nl("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,A){const o=il(e),i=n.parse(o);function l(e,n){e||!n?A(e):r?r(n):t(void 0,n)}n.run(i,o,function(e,t,r){if(e||!t||!r)return l(e);const A=t,o=n.stringify(A,r);var i;"string"==typeof(i=o)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),tl("processSync",this.parser||this.Parser),nl("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Oi(e),t=r}),ol("processSync","process",n),t}run(e,t,n){Al(e),this.freeze();const r=this.transformers;return!n&&"function"==typeof t&&(n=t,t=void 0),n?A(void 0,n):new Promise(A);function A(A,o){const i=il(t);r.run(e,i,function(t,r,i){const l=r||e;t?o(t):A?A(l):n(void 0,l,i)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Oi(e),n=t,r=!0}),ol("runSync","run",r),n}stringify(e,t){this.freeze();const n=il(t),r=this.compiler||this.Compiler;return nl("stringify",r),Al(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(rl("use",this.frozen),null!=e)if("function"==typeof e)l(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function A(e){if("function"==typeof e)l(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;l(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=Ri(!0,r.settings,e.settings))}function i(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){A(e[t])}}}function l(e,t){let r=-1,A=-1;for(;++r<n.length;)if(n[r][0]===e){A=r;break}if(-1===A)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[A][1];Fi(i)&&Fi(r)&&(r=Ri(!0,i,r)),n[A]=[e,r,...o]}}}}const el=(new $i).freeze();function tl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function nl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function rl(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 Al(e){if(!Fi(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ol(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function il(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Wi(e)}const ll=[],al={allowDangerousHtml:!0},sl=/^(https?|ircs?|mailto|xmpp)$/i,cl=[{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 ul(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",A=e.className,o=e.components,i=e.disallowedElements,l=e.rehypePlugins||ll,a=e.remarkPlugins||ll,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...al}:al,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||dl,f=el().use(Zo).use(a).use(Mi,s).use(l),p=new Wi;"string"==typeof r&&(p.value=r);for(const t of cl)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const v=f.parse(p);let y=f.runSync(v,p);return A&&(y={type:"element",tagName:"div",properties:{className:A},children:"root"===y.type?y.children:[y]}),Pi(y,function(e,r,A){if("raw"===e.type&&A&&"number"==typeof r)return c?A.children.splice(r,1):A.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in nA)if(Object.hasOwn(nA,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=nA[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof r&&(o=!n(e,r,A)),o&&A&&"number"==typeof r)return u&&e.children?A.children.splice(r,1,...e.children):A.children.splice(r,1),r}}),Gr(y,{Fragment:m,components:o,ignoreInvalidStyle:!0,jsx:g,jsxs:h,passKeys:!0,passNode:!0})}function dl(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),A=e.indexOf("/");return-1===t||-1!==A&&t>A||-1!==n&&t>n||-1!==r&&t>r||sl.test(e.slice(0,t))?e:""}const fl=({children:e})=>g("div",{style:{whiteSpace:"normal"},children:g(ul,{components:{p:({...e})=>g("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>g("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>g("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>g("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?g("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):g("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:g("code",{children:t})}),blockquote:({...e})=>g("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),pl={autoConfig:!0},gl=e=>()=>(e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:A}=nn(),{hasChatHistoryLoaded:o}=An(),i={...e,...pl},l=i.markdownComponent?i.markdownComponent:fl;a(()=>{var e,t;if(o){const o=[...n];for(let n=0;n<o.length&&n<((null==(e=A.chatHistory)?void 0:e.maxEntries)??30);n++){const e=o[n];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=l)}r(o)}},[o]);const s=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();((e,t,n)=>{var r;if("string"!=typeof e.data.message.content||!e.detail.currPath)return!1;const A=t[e.detail.currPath];return!!A&&((null==(r=A.renderMarkdown)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)})(e,t(),r)&&(e.data.message.contentWrapper=l,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,s),tn(J.CHUNK_STREAM_MESSAGE,s),tn(J.START_STREAM_MESSAGE,s),tn(J.START_SIMULATE_STREAM_MESSAGE,s);const c={name:"@rcb-plugins/markdown-renderer"};return null!=i&&i.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),hl={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"}},ml=(e,t,n="validateTextInput")=>{var r;if(null==(r=e.detail)||!r.currPath)return;const A=t[e.detail.currPath];if(!A)return;const o=A[n];return"function"==typeof o?o:void 0},vl=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=ct();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=$t(),{styles:r,updateStyles:A,replaceStyles:o}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=_t();return{styles:e,replaceStyles:t,updateStyles:n}})(),s=(e=>({...hl,...e,promptBaseColors:{...hl.promptBaseColors},promptHoveredColors:{...hl.promptHoveredColors},textAreaHighlightColors:{...hl.textAreaHighlightColors}}))(e),[c,u]=l(0),d=i({});tn(J.USER_SUBMIT_TEXT,e=>{const o=e,i=ml(o,n(),"validateTextInput");if(!i)return;const l=i(o.data.inputText);if(null!=l&&l.success||e.preventDefault(),!l.promptContent)return;0===c&&(d.current=structuredClone(r));const a=((e,t)=>{const n=e.promptType??"info";let r={};return t.advancedStyles&&(r=t.advancedStyles[n]),t.promptBaseColors&&(r.toastPromptStyle={color:t.promptBaseColors[n],borderColor:t.promptBaseColors[n]}),t.promptHoveredColors&&(r.toastPromptHoveredStyle={color:t.promptHoveredColors[n],borderColor:t.promptHoveredColors[n]}),t.textAreaHighlightColors&&(e.highlightTextArea??!0)&&(r.chatInputAreaStyle={boxShadow:`${t.textAreaHighlightColors[n]} 0px 0px 5px`}),r})(l,s);A(a),t(l.promptContent,l.promptDuration??3e3),u(e=>e+1)}),tn(J.USER_UPLOAD_FILE,e=>{var r,A;const o=e,i=null==(A=null==(r=o.data)?void 0:r.files)?void 0:A[0];if(!i)return console.error("No file uploaded."),void e.preventDefault();const l=ml(o,n(),"validateFileInput");if(!l)return void console.error("Validator not found for file input.");const a=l(i);if(!a.success)return console.error("Validation failed:",a),a.promptContent&&t(a.promptContent,a.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",a)}),tn(J.DISMISS_TOAST,()=>{u(e=>e-1)}),a(()=>{0===c&&setTimeout(()=>{o(d.current)})},[c,o]);const f={name:"@rcb-plugins/input-validator"};return s.autoConfig&&(f.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),f},yl=n((e,t)=>{let{embedded:n,currentOpen:r,enabled:A,onSetEnabled:o}=e;const l=en(),s=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:A}=Ae();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:A}})(),c=i(!1),u=i(!1);return a(()=>{!n&&s&&s.toggleChatWindow&&(c.current===r||u.current||(setTimeout(()=>{s&&s.toggleChatWindow&&s.toggleChatWindow(r)},0),c.current=null!=r&&r),u.current=!1)},[r,n,s]),a(()=>{const e=()=>{u.current=!0};return window.addEventListener("rcb-toggle-chat-window",e),()=>window.removeEventListener("rcb-toggle-chat-window",e)}),f(t,()=>({addMessage:e=>{l&&l.injectMessage&&l.injectMessage(e)},openChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow(!0)},closeChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow(!1)},toggleChat:()=>{!n&&s&&s.toggleChatWindow&&s.toggleChatWindow()},setBotEnabled:e=>{o&&o(e)}}),[l,s,n,o]),null});yl.displayName="BotController";const wl=r(null),bl=e=>{let{trackEvent:n,children:r}=e;const A=i(n);return A.current=n,t.createElement(wl.Provider,{value:{trackEvent:e=>A.current(e)}},r)},El=()=>{const e=A(wl);return e||{trackEvent:()=>{}}},Pl=e=>{let{loginUrl:n,className:r="",style:A,isHeaderButton:o=!1}=e;const{trackEvent:i}=El(),l=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 t.createElement(t.Fragment,null,o&&t.createElement("style",null,"\n .rcb-chat-header-container .qa-bot-header-login-button:hover {\n background-color: #0000001a !important;\n opacity: 1 !important;\n }\n "),t.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${r}`,style:Object.assign(Object.assign({},l),A),onClick:()=>{i({type:"chatbot_login_clicked",loginUrl:n})}},"Log In"))},Bl=()=>t.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"},t.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"},t.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),t.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Dl=[];for(let e=0;e<256;++e)Dl.push((e+256).toString(16).slice(1));let Cl;const xl=new Uint8Array(16);var kl={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Sl(e,t,n){if(kl.randomUUID&&!e)return kl.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!Cl){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Cl=crypto.getRandomValues.bind(crypto)}return Cl(xl)}();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(e,t=0){return(Dl[e[t+0]]+Dl[e[t+1]]+Dl[e[t+2]]+Dl[e[t+3]]+"-"+Dl[e[t+4]]+Dl[e[t+5]]+"-"+Dl[e[t+6]]+Dl[e[t+7]]+"-"+Dl[e[t+8]]+Dl[e[t+9]]+"-"+Dl[e[t+10]]+Dl[e[t+11]]+Dl[e[t+12]]+Dl[e[t+13]]+Dl[e[t+14]]+Dl[e[t+15]]).toLowerCase()}(r)}function Tl(){return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("QA_BOT_DEBUG")}const Il="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",Ql="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",Ml="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",Ol="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",Ll="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",Nl="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",Hl=()=>{Tl()&&console.log("%c QA Bot Core %c v0.2.35 ",Ll,Nl)},Rl=function(e){if(Tl()){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}`,Il,"",...n)}},Fl=function(e){if(Tl()){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}`,Ql,"",...n)}},Ul=(e,t)=>{Tl()&&console.log(`%c[Message]%c ${e}`,Ml,"",t)},jl=function(e){if(Tl()){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}`,Ol,"",...n)}},zl=function(){console.warn(...arguments)},_l=function(){console.error(...arguments)},ql="qa_bot_session_messages",Gl=()=>`qa_bot_session_${Sl()}`,Yl=()=>{try{const e=localStorage.getItem(ql);return e?JSON.parse(e):{}}catch(e){return{}}},Wl=(e,t,n,r,A)=>{const o=Yl();!o[e]&&(o[e]={messages:[],startedAt:(new Date).toISOString(),preview:""},Fl("NEW session created",{sessionId:e.slice(-12)}));if(o[e].messages.some(e=>e.id===t))return void Fl("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r});const i={id:t,content:n,sender:r,type:A,timestamp:Date.now()};o[e].messages.push(i),Fl("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:o[e].messages.length});const l=o[e].messages,a=l.find(e=>{var t;return"bot"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())&&e.content.length>=100});if(a){const t=a.content;o[e].preview=t.slice(0,50)+(t.length>50?"...":"")}else{const t=l.find(e=>{var t;return"user"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())});if(t&&!o[e].preview){const n=t.content;o[e].preview=n.slice(0,50)+(n.length>50?"...":"")}}(e=>{var t;const n=()=>Object.values(e).reduce((e,t)=>e+t.messages.length,0);for(;n()>100&&Object.keys(e).length>1;){const n=null===(t=Object.entries(e).sort((e,t)=>{let[,n]=e,[,r]=t;return new Date(n.startedAt).getTime()-new Date(r.startedAt).getTime()})[0])||void 0===t?void 0:t[0];if(!n)break;delete e[n]}localStorage.setItem(ql,JSON.stringify(e))})(o),Fl("STORAGE state",{ourSessions:Object.keys(o).length,ourTotalMessages:Object.values(o).reduce((e,t)=>e+t.messages.length,0)})},Vl=e=>{var t,n;return null!==(n=null===(t=Yl()[e])||void 0===t?void 0:t.messages.length)&&void 0!==n?n:0},Xl=e=>{const t=Yl()[e];return(null==t?void 0:t.startedAt)?Date.now()-new Date(t.startedAt).getTime():0},Kl=r(void 0),Jl=e=>{let{children:n,getSessionId:r,setSessionId:A,resetSession:o,clearResettingFlag:i}=e;return t.createElement(Kl.Provider,{value:{getSessionId:r,setSessionId:A,resetSession:o,clearResettingFlag:i}},n)},Zl=()=>{const e=A(Kl);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},$l=()=>{const[e,n]=l(!1),[r,A]=l([]),[o,s]=l(null),[c,u]=l(0),d=i(null),f=i(null),{replaceMessages:p}=en(),{toggleTextAreaDisabled:g}=rn(),{setSessionId:h,getSessionId:m}=Zl();a(()=>{var t,r;const A=e=>{d.current&&!d.current.contains(e.target)&&f.current&&!f.current.contains(e.target)&&n(!1)},o=null!==(r=null===(t=d.current)||void 0===t?void 0:t.getRootNode())&&void 0!==r?r:document;return e&&o.addEventListener("mousedown",A),()=>{o.removeEventListener("mousedown",A)}},[e]);const v=e=>{var t;const r=m();if(Fl("RESTORE requested",{targetSession:e.slice(-12),currentSession:null==r?void 0:r.slice(-12)}),e===r)return Fl("RESTORE skipped - already on this session"),void n(!1);const A=(e=>{var t;return(null===(t=Yl()[e])||void 0===t?void 0:t.messages)||[]})(e).filter(e=>{var t;return null===(t=e.content)||void 0===t?void 0:t.trim()});Fl("Stored messages from our localStorage",{count:A.length,ids:A.map(e=>e.id.slice(-8))});const o=A.map(e=>({id:e.id,content:e.content,sender:e.sender.toUpperCase(),type:e.type||"string",timestamp:new Date(e.timestamp).toISOString()}));var i;h(e),Fl("Session ID updated",{newSession:e.slice(-12)}),p(o),Fl("replaceMessages called",{count:o.length}),i=null===(t=f.current)||void 0===t?void 0:t.getRootNode(),setTimeout(()=>{const e=(i||document).querySelector(".rcb-chat-body-container");e&&e.querySelectorAll(".rcb-bot-message").forEach(e=>{var t;let n=e.innerHTML,r=!1;n.includes("](")&&(n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),r=!0),n.includes("&lt;a href=")&&(n=n.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),(n.includes("&lt;a ")||(null===(t=e.textContent)||void 0===t?void 0:t.includes("<a href=")))&&(e.textContent||"").includes("<a href=")&&(n=n.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),r&&(e.innerHTML=n)})},50),g(!1),Fl("Chat input enabled after restore"),n(!1)};return t.createElement("div",{style:{position:"relative"}},t.createElement("button",{ref:f,className:"history-button",onClick:()=>{if(!e&&(A((()=>{const e=Yl();return Object.entries(e).map(e=>{let[t,n]=e;return Object.assign({sessionId:t},n)}).sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime())})()),f.current)){const e=f.current.closest(".rcb-chat-window");if(e){const t=e.getBoundingClientRect(),n=f.current.getBoundingClientRect();s(t.width+3),u(t.right-n.right-18+4)}}n(!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"},t.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"},t.createElement("circle",{cx:"12",cy:"12",r:"10"}),t.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&t.createElement("div",{ref:d,role:"menu",style:{position:"absolute",right:c?`-${c}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}},0===r.length?t.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(e=>t.createElement("button",{key:e.sessionId,role:"menuitem",onClick:()=>v(e.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:e=>{e.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},t.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.preview||"New conversation"),t.createElement("span",{style:{fontSize:"12px",color:"#888"}},(e=>{const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/864e5);return 0===r?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):1===r?"Yesterday":r<7?t.toLocaleDateString([],{weekday:"short"}):t.toLocaleDateString([],{month:"short",day:"numeric"})})(e.startedAt))))))},ea=e=>{var{width:n=24,height:r=24,color:A="currentColor",children:o}=e,i=b(e,["width","height","color","children"]);return t.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 24 24",fill:"none",stroke:A,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},i),o)},ta=e=>t.createElement(ea,e,t.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"})),na=()=>{const{restartFlow:e}=$t(),{setTextAreaValue:n}=rn(),{messages:r}=en(),{getSessionId:A,resetSession:o,clearResettingFlag:i}=Zl(),{trackEvent:l}=El();return t.createElement("button",{onClick:async()=>{const t=A(),r=t?Vl(t):0;l({type:"chatbot_new_chat",previousMessageCount:r}),o(),await n(""),await e(),setTimeout(()=>{i()},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:e=>{e.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:e=>{e.target.style.backgroundColor="var(--primaryColor, #107180)"}},t.createElement(ta,{width:16,height:16}),"New Chat")};function ra(e){if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(!e)return"";if(Array.isArray(e))return e.map(ra).join("");if("object"==typeof e&&null!==e&&"props"in e){const t=e.props;if(t&&"children"in t)return ra(t.children)}return""}const Aa=()=>{const{getSessionId:e}=Zl(),t=o(t=>{var n;const r=null===(n=t.data)||void 0===n?void 0:n.message;if(!(null==r?void 0:r.id))return;const A=r.sender,o=r.type||"string";let i;if(i="string"==typeof r.content?r.content:ra(r.content),Ul("TRACKED",{id:r.id,sender:A,content:i.substring(0,50)+(i.length>50?"...":"")}),i.includes("rcb-options-container"))return;if(!i.trim())return;const l=e();Wl(l,r.id,i,A,o)},[e]);return a(()=>(window.addEventListener("rcb-pre-inject-message",t),()=>{window.removeEventListener("rcb-pre-inject-message",t)}),[t]),null},oa=()=>(a(()=>{const e=e=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(e.key))return;const n=document.activeElement;if(n&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"true"===n.contentEditable||n.classList.contains("rcb-chat-input-textarea")))return;const r=document.querySelector(".rcb-chat-window");if(!r)return;const A=Array.from(r.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(A.length>0){const t=A[A.length-1].querySelector(".rcb-checkbox-container");if(t&&null!==t.offsetParent){const n=Array.from(t.querySelectorAll(".rcb-checkbox-row-container")),r=t.querySelector(".rcb-checkbox-next-button");if(n.length>0){const t=[...n];return r&&t.push(r),void((e,t)=>{e.preventDefault();let n=-1;for(let e=0;e<t.length;e++)if(t[e]===document.activeElement||t[e].contains(document.activeElement)){n=e;break}-1===n&&(n=0);let r=n;switch(e.key){case"ArrowDown":case"ArrowRight":r=n<t.length-1?n+1:0;break;case"ArrowUp":case"ArrowLeft":r=n>0?n-1:t.length-1;break;case"Home":r=0;break;case"End":r=t.length-1;break;case"Enter":case" ":{const e=t[n],r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void e.dispatchEvent(r)}default:return}t[r].focus(),t[r].setAttribute("tabindex","0"),t[r].classList.add("keyboard-focused"),t.forEach((e,t)=>{t!==r&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})})(e,t)}}}let o=[];if(A.length>0){const e=A[A.length-1],t=Array.from(e.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);if(t.length>0){const e=t[t.length-1];o=Array.from(e.querySelectorAll(".rcb-options"))}}if(0===o.length)return;const i=o.findIndex(e=>e===document.activeElement);switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=i<o.length-1?i+1:0,o[t].setAttribute("tabindex","0"),o.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),o[t].classList.add("keyboard-focused"),o[t].focus();break}case"ArrowUp":case"ArrowLeft":{let t;e.preventDefault(),t=i>0?i-1:o.length-1,o[t].setAttribute("tabindex","0"),o.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),o[t].classList.add("keyboard-focused"),o[t].focus();break}case"Enter":case" ":if(e.preventDefault(),document.activeElement&&o.includes(document.activeElement)){const e=document.activeElement;if(e.classList.contains("rcb-checkbox-row-container")||e.closest(".rcb-checkbox-row-container")){const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.querySelector(".rcb-checkbox-label"),A=r?r.textContent:e.textContent||"checkbox",o=e.querySelector(".rcb-checkbox-mark"),i=o&&o.style.backgroundColor?"checked":"unchecked";t(`${A} ${i}`)}else{const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.textContent||e.innerText;t(`Selected: ${r}`)}}break;case"Home":e.preventDefault(),o.length>0&&(o[0].setAttribute("tabindex","0"),o.forEach((e,t)=>{0!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),o[0].classList.add("keyboard-focused"),o[0].focus());break;case"End":if(e.preventDefault(),o.length>0){const e=o.length-1;o[e].setAttribute("tabindex","0"),o.forEach((t,n)=>{n!==e&&(t.setAttribute("tabindex","-1"),t.classList.remove("keyboard-focused"))}),o[e].classList.add("keyboard-focused"),o[e].focus()}}},t=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{document.body.contains(t)&&document.body.removeChild(t)},1e3)},n=(e=null)=>{let n=e;if(n||(n=document.querySelector(".rcb-chat-window"),n||(n=document.querySelector('[class*="rcb-chat"]')),n||(n=document.querySelector(".qa-bot"))),!n)return;const r=null!==n.closest(".embedded-qa-bot"),A=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(0===A.length)return;const o=A[A.length-1],i=Array.from(o.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);let l=[];if(i.length>0){const e=i[i.length-1];l=Array.from(e.querySelectorAll(".rcb-options"))}if(0===l.length){let e=o.querySelector(".rcb-checkbox-container");if(!e&&n&&(e=n.querySelector(".rcb-checkbox-container")),e&&null!==e.offsetParent){const t=Array.from(e.querySelectorAll(".rcb-checkbox-row-container")).filter(e=>null!==e.offsetParent&&"none"!==e.style.display);if(t.length>0){const n=e.querySelector(".rcb-checkbox-next-button"),A=[...t];if(n&&null!==n.offsetParent&&A.push(n),A.forEach((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),t.length>1){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}return void setTimeout(()=>{A[0]&&null!==A[0].offsetParent&&!r&&A[0].focus()},150)}}}if(l.length>0){if(l.forEach((e,t)=>{const n=0===t?"0":"-1";e.setAttribute("tabindex",n),e.setAttribute("role","option"),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",l.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),l.length>1){const e=i.length>0?i[i.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}}else{const e=i.length>0?i[i.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove())}}setTimeout(()=>{l[0]&&null!==l[0].offsetParent&&!r&&(l[0].focus(),l.length>1&&t(`${l.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(e=>{e.forEach(e=>{if("childList"===e.type){const t=Array.from(e.addedNodes),r=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-options-container")||e.classList?.contains("rcb-options")||e.querySelector?.(".rcb-options-container")||e.querySelector?.(".rcb-options"))),A=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-checkbox-container")||e.querySelector?.(".rcb-checkbox-container")));if(r||A){let t=e.target;for(;t&&!t.classList?.contains("qa-bot")&&!t.classList?.contains("rcb-chat-window");)t=t.parentElement;(t||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(e=>{e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused")}),setTimeout(()=>n(t),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const A=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(e=>{const t=e.querySelectorAll(".rcb-options-container .rcb-options").length>0,r=e.querySelectorAll(".rcb-checkbox-row-container").length>0;if(t){const t=e.querySelectorAll(".rcb-options[tabindex]").length;e.querySelectorAll(".rcb-options").length>t&&n(e)}if(r){const t=e.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;e.querySelectorAll(".rcb-checkbox-row-container").length>t&&n(e)}})},1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(A)}},[]),null);let ia=!1,la=null;function aa(){return ia?Promise.resolve():la||(la=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=()=>{ia=!0,jl("Script loaded"),e()},n.onerror=()=>{la=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),la)}const sa=e=>{if(!e||"string"!=typeof e)return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(/(?<!\]\(|href=["']|\[)https?:\/\/[^\s[\]()]+/gi,e=>{let t=e,n="";const r=t.match(/([.,;:!?]+)$/);return r&&(n=r[1],t=t.slice(0,-n.length)),`[${t}](${t})${n}`}),t},ca=e=>{let{siteKey:n,onVerify:r,onError:A,loginUrl:s}=e;const c=i(null),u=i(null),d=i(!1),f=i(null),p=i(null),[g,h]=l(!1),[m,v]=l(0),w=i("widget_error"),b=i(null),E=s&&"/login"!==s,P=o(()=>{const e=window.turnstile;if(f.current&&(null==e?void 0:e.remove)){try{e.remove(f.current)}catch(e){}f.current=null}},[]),B=o(()=>{var e;P(),g?null==A||A(w.current,null!==(e=b.current)&&void 0!==e?e:void 0):null==A||A("user_cancelled")},[A,P,g]);a(()=>()=>{P()},[P]),a(()=>{var e;return p.current=document.activeElement,null===(e=u.current)||void 0===e||e.focus(),()=>{p.current&&"function"==typeof p.current.focus&&p.current.focus()}},[]),a(()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),void B();if("Tab"===e.key&&u.current){const t=u.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[B]),a(()=>{d.current||!c.current||g||(d.current=!0,aa().then(()=>{const e=window.turnstile;if(!e||!c.current)return _l("Turnstile API not available after script load"),w.current="api_unavailable",void h(!0);f.current=e.render(c.current,{sitekey:n,callback:e=>{jl("Visible challenge completed"),r(e)},"error-callback":e=>(_l("Turnstile challenge failed:",e),b.current=e,w.current="widget_error",P(),h(!0),!0),"expired-callback":()=>{_l("Turnstile token expired"),w.current="token_expired",P(),h(!0)}})}).catch(e=>{_l("Failed to load Turnstile script:",e),w.current="script_load_failed",h(!0)}))},[n,r,g]);const D=t.createElement(t.Fragment,null,t.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),t.createElement("div",{ref:u,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'}},t.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"),g?t.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},0===m?t.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",E&&t.createElement(t.Fragment,null,", or"," ",t.createElement("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):t.createElement(t.Fragment,null,t.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."),t.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",E&&t.createElement(t.Fragment,null," ",t.createElement("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement("button",{type:"button",onClick:()=>{P(),d.current=!1,v(e=>e+1),h(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),t.createElement("button",{type:"button",onClick:B,style:{padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Close"))):t.createElement(t.Fragment,null,t.createElement("div",{ref:c,style:{borderRadius:"8px",overflow:"hidden"}}),t.createElement("button",{type:"button",onClick:B,style:{marginTop:"16px",padding:"8px 16px",background:"#f0f0f0",color:"#333",border:"1px solid #ccc",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Cancel"))));return y(D,document.body)};function ua(e){const{confidence:t,tools_used:n,metadata:r}=e;if(!(t||n&&0!==n.length))return"";const A=[];return t&&A.push(`β€’ Confidence: ${t}`),n&&n.length>0&&A.push(`β€’ Tools used: ${n.join(", ")}`),(null==r?void 0:r.agent)&&A.push(`β€’ Agent: ${r.agent}`),`---\n${A.join("\n")}`}function da(e){let{getState:n,onResubmit:r,trackEvent:A,loginUrl:o}=e;var i,l;const[a,s]=t.useState(null),[c,u]=t.useState(0),d=n(),f=null!==(i=import.meta.env)&&void 0!==i?i:{},p="true"===f.VITE_FORCE_TURNSTILE_WIDGET,g=null!==(l=d.siteKey)&&void 0!==l?l:p?f.VITE_TURNSTILE_SITE_KEY:null;return g&&(p||a!==g)?t.createElement(ca,{key:c,siteKey:g,loginUrl:o,onVerify:async e=>{const t=g;d.token=e,null==A||A({type:"chatbot_turnstile_completed"});"needs_another_challenge"===await r(e)?u(e=>e+1):s(t)},onError:(e,t)=>{var n;const r=null===(n=d.pendingQuery)||void 0===n?void 0:n.queryId,o=g;d.token=null,d.pendingQuery=null,d.needsChallenge=!1,d.siteKey=null,s(o),null==A||A({type:"chatbot_turnstile_error",queryId:r,failureReason:e,cloudflareErrorCode:t})}}):null}const fa="#1a5b6e",pa="#107180",ga="Arial, sans-serif",ha="Q&A Bot",ma="/chat-icon.svg",va="Type your question here...",ya="Select an option to continue",wa=!1,ba="Ask me a question!",Ea="/login",Pa={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}},Ba=n((e,n)=>{var r,A,c;const{apiKey:u,qaEndpoint:d,ratingEndpoint:f,capabilitiesEndpoint:p,agentRatingEndpoint:g,welcomeMessage:h,open:m,onOpenChange:v,isLoggedIn:y,allowAnonAccess:w=!1,actingUser:b,primaryColor:P,secondaryColor:B,botName:D,logo:C,placeholder:x,errorMessage:k,embedded:S,footerText:T,footerLink:I,tooltipText:Q,loginUrl:M,turnstileSiteKey:O,backendId:L,resourceContext:N,customFlow:H,onAnalyticsEvent:R}=e,F=i(`bot_${Math.random().toString(36).substr(2,9)}`);a(()=>{Hl()},[]);const U=i(null);null===U.current&&(U.current=Gl(),Rl("CREATED",U.current));const j=i(!1),z=i({getSessionId:()=>U.current,isResetting:()=>j.current}),_=i(null),q=function(e,t){const[n,r]=l(null),[A,s]=l("idle"),c=i(null),u=i(null),d=i(!0),f=o(()=>{const e=window.turnstile;if(u.current&&(null==e?void 0:e.remove)){try{e.remove(u.current)}catch(e){}u.current=null}c.current&&(c.current.remove(),c.current=null)},[]);return a(()=>{if(d.current=!0,!e)return s("idle"),void r(null);s("loading");const n=document.createElement("div");return n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.setAttribute("aria-hidden","true"),document.body.appendChild(n),c.current=n,aa().then(()=>{if(!d.current)return;const n=window.turnstile;if(!n||!c.current)return _l("Turnstile API not available for silent verification"),s("failed"),void(null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const A=n.render(c.current,{sitekey:e,execution:"render","refresh-expired":"auto",callback:e=>{d.current&&(jl("Silent verification succeeded"),r(e),s("verified"))},"error-callback":e=>!d.current||(_l("Turnstile silent verification failed:",e),r(null),s("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:e}),!0),"expired-callback":()=>{d.current&&(jl("Token expired, awaiting refresh"),r(null),s("loading"))}});u.current=A}).catch(e=>{d.current&&(_l("Failed to load Turnstile script for silent verification:",e),s("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{d.current=!1,f()}},[e,f]),{token:n,status:A,reset:o(()=>{const e=window.turnstile;u.current&&(null==e?void 0:e.reset)&&(r(null),s("loading"),e.reset(u.current),jl("Token consumed, resetting widget for fresh token"))},[])}}(O,e=>{var t;null===(t=_.current)||void 0===t||t.call(_,e)}),G=i(null);G.current=q.token;const[Y,W]=l(y);a(()=>{W(y)},[y]);const V=void 0!==S?S:wa,X=o(e=>{var t;R&&R(Object.assign(Object.assign({},e),{timestamp:Date.now(),sessionId:null!==(t=U.current)&&void 0!==t?t:void 0,pageUrl:"undefined"!=typeof window?window.location.href:void 0,isEmbedded:V}))},[R,V]);a(()=>{_.current=e=>X(e)},[X]);const K=s(()=>{const e=Object.assign({},Pa);e.general=Object.assign(Object.assign({},e.general),{primaryColor:P||fa,secondaryColor:B||pa,fontFamily:ga,embedded:V});const n=!1===Y?[t.createElement(Pl,{key:"login-button",loginUrl:M||Ea,isHeaderButton:!0})]:[t.createElement($l,{key:"history-button"}),t.createElement(Bl,{key:"user-icon"})];e.header={title:t.createElement("span",{style:{fontSize:14,fontWeight:500}},D||ha),showAvatar:!0,avatar:C||ma,buttons:[...n,E.CLOSE_CHAT_BUTTON]},e.chatInput=Object.assign(Object.assign({},e.chatInput),{disabled:!1,enabledPlaceholderText:x||va,disabledPlaceholderText:k||ya}),e.tooltip=Object.assign(Object.assign({},e.tooltip),{text:Q||ba});const r=T?I?t.createElement("a",{href:I,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},T):t.createElement("span",{key:"footer-text"},T):null;return e.footer={text:null!=r?r:void 0,buttons:[t.createElement(na,{key:"new-chat-button"})]},e.chatWindow=Object.assign(Object.assign({},e.chatWindow),{defaultOpen:!!V}),e.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},e},[P,B,D,C,x,k,V,Q,Y,M,T,I]),J=i(null),Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s(()=>{const n=(t,n)=>{if(e.current){const n=getComputedStyle(e.current).getPropertyValue(t);if(n&&""!==n.trim())return n.trim();if(e.current.parentElement){const n=getComputedStyle(e.current.parentElement).getPropertyValue(t);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:n("--primaryColor",t.primaryColor),secondaryColor:n("--secondaryColor",t.secondaryColor),fontFamily:n("--fontFamily",t.fontFamily)}},[e,t])}(J,K.general);((e,t)=>{a(()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))},[e,t])})(!1!==Y,J),(e=>{let{settings:n,themeColors:r}=e;a(()=>{r&&(Object.entries(r).forEach(e=>{let[t,n]=e;n&&document.documentElement.style.setProperty(`--${t}`,n)}),r.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",r.primaryColor),r.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",r.secondaryColor))},[r]),a(()=>{var e,r;(null===(e=n.header)||void 0===e?void 0:e.title)&&"string"==typeof n.header.title&&(n.header.title=t.createElement("div",{key:"header-title"},t.createElement("h1",{className:"sr-only"},n.header.title),t.createElement("span",{"aria-hidden":"true"},n.header.title))),n.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},n.chatHistory={disabled:!0},n.chatButton=Object.assign(Object.assign({},n.chatButton),{icon:null===(r=n.header)||void 0===r?void 0:r.avatar}),n.event=Object.assign(Object.assign({},n.event),{rcbToggleChatWindow:!0})},[n])})({settings:K,themeColors:Z});const $=s(()=>{const e=(e=>{let{endpoint:n,ratingEndpoint:r,agentRatingEndpoint:A,apiKey:o,sessionId:i,isResetting:l=()=>!1,isLoggedIn:a,allowAnonAccess:s=!1,loginUrl:c="/login",trackEvent:u,getTurnstileToken:d,resetTurnstileToken:f,backendId:p,resourceContext:g}=e;if(!1===a&&!s)return null==u||u({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:t.createElement(Pl,{loginUrl:c}),chatDisabled:!0,path:"qa_loop"}};let h=null,m=null,v=!1;const y={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let w=null;if(!n)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async e=>{var t;w=e.injectMessage.bind(e);const{userInput:a}=e;if((!l||!l())&&a&&""!==a.trim()){if("πŸ‘ Helpful"===a||"πŸ‘Ž Not helpful"===a){if(h){const e="πŸ‘ Helpful"===a,t="agent"===m?A:r;if(t)try{const n={"Content-Type":"application/json"};o&&(n["X-API-KEY"]=o);const r=i();r&&(n["X-Session-ID"]=r,n["X-Query-ID"]=h);const A="agent"===m?{query_id:h,rating:e?"helpful":"not_helpful",session_id:r}:{sessionId:r,queryId:h,rating:e?1:0};await fetch(t,{method:"POST",headers:n,credentials:"include",body:JSON.stringify(A)}),null==u||u({type:"chatbot_rating_sent",queryId:h,rating:e?"helpful":"not_helpful"})}catch(e){_l("Error sending feedback:",e)}}return"Thanks for the feedback!"}try{const r=Sl();h=r,null==u||u({type:"chatbot_question_sent",queryId:r,questionLength:a.length});const A={"Content-Type":"application/json"};o&&(A["X-API-KEY"]=o);const l=i();l&&(A["X-Session-ID"]=l,A["X-Query-ID"]=r),A["X-Origin"]=g||"access";const s={query:a,question_id:r};l&&(s.session_id=l),p&&(s._backend=p),g&&(s.rp_name=g);const c=null==d?void 0:d();c&&(s.turnstile_token=c),Rl("SENT to API",{session_id:l,question_id:r});const w=Date.now(),b=await fetch(n,{method:"POST",headers:A,credentials:"include",body:JSON.stringify(s)});if(!b.ok)throw new Error(`API returned ${b.status}`);if((b.headers.get("content-type")||"").includes("text/event-stream")){null==f||f();const n=null===(t=b.body)||void 0===t?void 0:t.getReader();if(!n)throw new Error("Response body is not readable");const A=new TextDecoder;let o="",i="",l=!1;try{for(;;){const{done:t,value:r}=await n.read();if(t)break;o+=A.decode(r,{stream:!0});let a=o.indexOf("\n\n");for(;-1!==a;){const t=o.slice(0,a);o=o.slice(a+2);let n,r="",A="";for(const e of t.split("\n"))e.startsWith("event: ")?r=e.slice(7):e.startsWith("data: ")&&(A=e.slice(6));if(r&&A){try{n=JSON.parse(A)}catch(e){zl("Failed to parse SSE data:",A),a=o.indexOf("\n\n");continue}if("status"===r){const t=n.message||"Processing...";await e.streamMessage(`_${t}_`,"BOT"),l=!0}else if("token"===r){i+=n.content||"";const t=sa(i);await e.streamMessage(t,"BOT")}else if("done"===r){const t=n.metadata||{};if(m=t.rating_target||null,v=!0===t.is_final_response,i)console.log("[SSE DEBUG] done: tokenContent exists, skipping streamMessage, calling endStreamMessage"),await e.endStreamMessage("BOT");else{const t=n.response||"";if(t){const n=sa(t);await e.streamMessage(n,"BOT"),l=!0}l&&await e.endStreamMessage("BOT")}}else if("error"===r){const t=n.message||"An error occurred";_l("SSE error event:",t),l?(await e.streamMessage(t,"BOT"),await e.endStreamMessage("BOT")):await e.injectMessage(t)}a=o.indexOf("\n\n")}else a=o.indexOf("\n\n")}}l&&await e.endStreamMessage("BOT")}catch(t){if(_l("Error reading SSE stream:",t),!l)throw t;await e.streamMessage("I had trouble completing the response. Please try again.","BOT"),await e.endStreamMessage("BOT")}const a=Date.now()-w;return void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:a,success:!0,responseLength:i.length}))}const E=Date.now()-w,P=await b.json();if(P.requires_turnstile)return null==u||u({type:"chatbot_turnstile_shown",queryId:r}),y.siteKey=P.site_key,y.pendingQuery={query:a,sessionId:l,queryId:r},y.needsChallenge=!0,"One moment β€” verifying your session…";null==f||f();const B=P.response||P.answer||P.text||P.message;if(!B)throw new Error("Invalid response format from API");const D=P.metadata||{};m=D.rating_target||null,v=!0===D.is_final_response;const C=sa(B),x=Tl()?ua(P):"",k=x?`${C}\n\n${x}`:C;return await e.injectMessage(k),void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:E,success:!0,responseLength:B.length,hasMetadata:!!x}))}catch(e){return _l("Error in Q&A flow:",e),null==u||u({type:"chatbot_answer_error",queryId:null!=h?h:void 0,errorType:e instanceof Error?e.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}}},options:e=>l&&l()||"πŸ‘ Helpful"===e.userInput||"πŸ‘Ž Not helpful"===e.userInput||y.needsChallenge?[]:v&&m&&("agent"===m?A:r)?["πŸ‘ Helpful","πŸ‘Ž Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:t.createElement(da,{getState:()=>y,onResubmit:async e=>{var t;if(!y.pendingQuery||!w)return _l("Turnstile resubmit called without pending query or injectMessage"),"error";try{const r={"Content-Type":"application/json"};o&&(r["X-API-KEY"]=o),y.pendingQuery.sessionId&&(r["X-Session-ID"]=y.pendingQuery.sessionId,r["X-Query-ID"]=y.pendingQuery.queryId),r["X-Origin"]=g||"access";const A={query:y.pendingQuery.query,question_id:y.pendingQuery.queryId,turnstile_token:e};y.pendingQuery.sessionId&&(A.session_id=y.pendingQuery.sessionId),p&&(A._backend=p),g&&(A.rp_name=g);const i=await fetch(n,{method:"POST",headers:r,credentials:"include",body:JSON.stringify(A)}),l=y.pendingQuery.queryId;if(!i.ok)throw new Error(`API returned ${i.status} after Turnstile`);if((i.headers.get("content-type")||"").includes("text/event-stream")){const e=null===(t=i.body)||void 0===t?void 0:t.getReader();if(!e)throw new Error("Response body is not readable");const n=new TextDecoder;let r="",A="",o={};for(;;){const{done:t,value:i}=await e.read();if(t)break;r+=n.decode(i,{stream:!0});let l=r.indexOf("\n\n");for(;-1!==l;){const e=r.slice(0,l);r=r.slice(l+2);let t="",n="";for(const r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&(n=r.slice(6));if(t&&n)try{const e=JSON.parse(n);"token"===t?A+=e.content||"":"done"===t&&(o=e.metadata||{})}catch(e){}l=r.indexOf("\n\n")}}if(y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,!A)throw new Error("No content received from stream");m=o.rating_target||null,v=!0===o.is_final_response,h=l;const a=sa(A);return await w(a),null==u||u({type:"chatbot_answer_received",queryId:l,success:!0,responseLength:A.length}),"success"}const a=await i.json();if(a.requires_turnstile)return y.siteKey=a.site_key,y.token=null,await w("Still verifying β€” please complete the challenge again."),"needs_another_challenge";y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null;const s=a.response||a.answer||a.text||a.message;if(!s)throw new Error("Invalid response format from API");const c=a.metadata||{};m=c.rating_target||null,v=!0===c.is_final_response,h=l;const d=sa(s),f=Tl()?ua(a):"",b=f?`${d}\n\n${f}`:d;return await w(b),null==u||u({type:"chatbot_answer_received",queryId:l,success:!0,responseLength:s.length}),"success"}catch(e){return _l("Error resubmitting after Turnstile:",e),y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,await(null==w?void 0:w("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:u,loginUrl:c}),path:"qa_loop"}}})({endpoint:d,ratingEndpoint:f,agentRatingEndpoint:g,apiKey:u,sessionId:z.current.getSessionId,isResetting:z.current.isResetting,isLoggedIn:Y,allowAnonAccess:w,loginUrl:M||Ea,trackEvent:X,getTurnstileToken:()=>G.current,resetTurnstileToken:()=>q.reset(),backendId:L,resourceContext:N}),n={message:h,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"};return Object.assign(Object.assign({start:n},e),H||{})},[u,d,f,g,h,Y,w,M,H,b,X,N,L]),ee=s(()=>{return[()=>On(t),gl(),()=>vl(e)];var e,t},[]);return a(()=>{const e=()=>{const e=document.querySelector(".rcb-chat-window");if(!e)return;const t=e.querySelector(".rcb-send-button");t&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("data-keyboard-enabled")||(t.setAttribute("data-keyboard-enabled","true"),t.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const n=t&&Object.keys(t).find(e=>e.startsWith("__reactProps"));if(n){const r=t[n],A=null==r?void 0:r.onMouseDown;if(A&&"function"==typeof A)return void A(e)}const r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(r)}})))},t=setInterval(e,1e3);return e(),()=>clearInterval(t)},[]),oa(),a(()=>{const e=J.current;if(!e)return;const t=e=>{var t,n,r;const A=null===(n=(t=e.target).closest)||void 0===n?void 0:n.call(t,"a");A&&A.closest(".rcb-chat-body-container")&&(A.classList.contains("qa-bot-login-button")||A.closest(".rcb-options-container")||X({type:"chatbot_link_clicked",linkUrl:A.href,linkText:(null===(r=A.textContent)||void 0===r?void 0:r.trim())||""}))};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},[X]),a(()=>{if(!V){const e=e=>{const t=e.data.newState;null==v||v(t);const n=U.current;X(t?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:n?Vl(n):0,durationMs:n?Xl(n):0})};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}},[V,v,X]),t.createElement("div",{className:"qa-bot "+((null===(r=K.general)||void 0===r?void 0:r.embedded)?"embedded-qa-bot":""),ref:J,role:"region","aria-label":`${D||ha}${(null===(A=K.general)||void 0===A?void 0:A.embedded)?" - Embedded":""}`},t.createElement(Jl,{getSessionId:()=>U.current,setSessionId:e=>{const t=U.current;U.current=e,Rl("RESTORED",`${null==t?void 0:t.slice(-12)} -> ${e.slice(-12)}`)},resetSession:()=>{const e=U.current;j.current=!0,U.current=Gl(),Rl("RESET",`${null==e?void 0:e.slice(-12)} -> ${U.current.slice(-12)}`)},clearResettingFlag:()=>{j.current=!1}},t.createElement(bl,{trackEvent:X},t.createElement(Wt,null,t.createElement("div",null,t.createElement(Aa,null),t.createElement(yl,{ref:n,embedded:(null===(c=K.general)||void 0===c?void 0:c.embedded)||!1,currentOpen:m||!1,enabled:!1!==Y,onSetEnabled:e=>W(!!e&&void 0)}),t.createElement(Jt,{key:`chatbot-${F.current}-${Y}`,settings:K,flow:$,plugins:ee}),t.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}}),t.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."))))))});Ba.displayName="QABot";const Da=()=>{const[e,t]=l(!1),n=()=>"undefined"!=typeof navigator&&void 0!==navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),n=document.createElement("video");n.srcObject=e,await new Promise(e=>{n.onloadedmetadata=()=>{n.play(),e()}});const r=document.createElement("canvas");r.width=n.videoWidth,r.height=n.videoHeight;const A=r.getContext("2d");if(!A)throw new Error("Could not get canvas context");A.drawImage(n,0,0,r.width,r.height);const o=await new Promise(e=>r.toBlob(e,"image/png"));if(!o)throw new Error("Could not create image blob");const i=(new Date).toISOString().replace(/[:.]/g,"-"),l=new File([o],`screenshot-${i}.png`,{type:"image/png"});return e.getTracks().forEach(e=>e.stop()),t(!1),l}catch(e){throw _l("Error capturing screenshot:",e),t(!1),e}},isCapturing:e,isScreenCaptureAvailable:n()}},Ca=e=>t.createElement(ea,e,t.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.createElement("polyline",{points:"17 8 12 3 7 8"}),t.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),xa=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if("string"!=typeof r.result)return void n(new Error(`Failed to read file ${e.name}`));const A=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:A})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)}),ka=e=>Promise.all(e.map(xa)),Sa=function(e){const t=1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:10)*1024;return e.size<=t},Ta=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Ia=e=>{let{onFileUpload:n,maxSizeMB:r=10,acceptedTypes:A="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:o=!1,className:a}=e;const[s,c]=l(!1),[u,d]=l([]),[f,p]=l(null),g=i(null),{captureScreenshot:h,isCapturing:m,isScreenCaptureAvailable:v}=Da(),y=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>document.body.removeChild(t),1e3)},w=e=>{if(!e||0===e.length)return void zl("FileUploadComponent: No valid files provided to handleFiles");let t;try{t=Array.from(e)}catch(e){return _l("FileUploadComponent: Error converting files to array:",e),void y("Error processing selected files. Please try again.")}const r=[...u,...t];d(r);const A=t.length,o=t.map(e=>e.name).join(", ");y(`${A} file${A>1?"s":""} selected: ${o}`),setTimeout(()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)},100),n&&n(r)},b=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?c(!0):"dragleave"===e.type&&c(!1)},E=()=>{try{g.current&&g.current.click()}catch(e){_l("FileUploadComponent: Error in handleButtonClick:",e),y("Error opening file selection dialog. Please try again.")}},P=()=>{p(null)},B=o&&v;return t.createElement("div",{className:`file-upload-container ${a||""}`,style:{padding:"16px",margin:"8px 0"}},B&&t.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},t.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await h();w([e]),y("Screenshot captured successfully")}catch(e){y("Error capturing screenshot. Please try again.")}})()},disabled:m,"aria-describedby":"screenshot-help","aria-label":m?"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:m?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},t.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"},t.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"}),t.createElement("circle",{cx:"12",cy:"13",r:"4"})),m?"Taking screenshot...":"Take screenshot..."),t.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),t.createElement("div",{className:"file-upload-dropzone "+(s?"active":""),onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:e=>{var t;e.preventDefault(),e.stopPropagation(),c(!1);try{(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)&&e.dataTransfer.files.length>0&&w(e.dataTransfer.files)}catch(e){_l("FileUploadComponent: Error in handleDrop:",e),y("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=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),E())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:s?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},t.createElement("input",{ref:g,type:"file",className:"file-input",onChange:e=>{var t;try{(null===(t=e.target)||void 0===t?void 0:t.files)&&e.target.files.length>0&&w(e.target.files)}catch(e){_l("FileUploadComponent: Error in handleFileSelect:",e),y("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:A}),t.createElement("div",{className:"upload-content",onClick:E,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},t.createElement(Ca,null),t.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),t.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)")),u.length>0&&t.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},t.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),u.map((e,r)=>t.createElement("span",{key:r,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:t=>{t.stopPropagation(),(e=>{p(e)})(e)}},t.createElement("span",{onClick:e=>{e.stopPropagation(),(e=>{const t=u.filter((t,n)=>n!==e);d(t),n&&n(t)})(r)},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," (",Ta(e.size),")"))))),(()=>{if(!f)return null;const e=f.type.startsWith("image/"),n=f.type.startsWith("text/"),r="application/pdf"===f.type;return t.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:P},t.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:P,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"Γ—"),t.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},f.name),e&&t.createElement("img",{src:URL.createObjectURL(f),alt:f.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&t.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(f)),r&&t.createElement("iframe",{src:URL.createObjectURL(f),style:{width:"100%",height:"70vh",border:"none"},title:f.name}),!e&&!n&&!r&&t.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Qa(e,t){if(!t||0===Object.keys(t).length)return e;const n={};for(const[r,A]of Object.entries(e)){let e=Object.assign({},A);if(t.disableOnOptions&&void 0===e.chatDisabled){const t=!(!e.options&&!e.checkboxes);e.chatDisabled=t}n[r]=e}return n}function Ma(e){return async t=>{await t.injectMessage(e)}}function Oa(e){return async t=>{const n=await e(t);await t.injectMessage(n)}}const La=t.forwardRef((e,n)=>{var{defaultOpen:r}=e,A=b(e,["defaultOpen"]);const[o,i]=t.useState(r||!1),l=t.useRef(null);return t.useImperativeHandle(n,()=>({addMessage:e=>{var t;null===(t=l.current)||void 0===t||t.addMessage(e)},setBotEnabled:e=>{var t;null===(t=l.current)||void 0===t||t.setBotEnabled(e)},openChat:()=>{var e;i(!0),null===(e=l.current)||void 0===e||e.openChat()},closeChat:()=>{var e;i(!1),null===(e=l.current)||void 0===e||e.closeChat()},toggleChat:()=>{var e;i(e=>!e),null===(e=l.current)||void 0===e||e.toggleChat()}}),[]),t.createElement(Ba,w({ref:l},A,{open:o,onOpenChange:i}))});function Na(e){if(!(e.target&&e.target instanceof HTMLElement))return void _l("QA Bot: A valid target DOM element is required");const{target:n}=e,r=b(e,["target"]),A=p.createRoot(n),o={current:null};return A.render(t.createElement(t.StrictMode,null,t.createElement(La,w({ref:e=>{o.current=e}},r)))),{addMessage:e=>{var t;return null===(t=o.current)||void 0===t?void 0:t.addMessage(e)},setBotEnabled:e=>{var t;return null===(t=o.current)||void 0===t?void 0:t.setBotEnabled(e)},openChat:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=o.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{o.current=null,A.unmount()}}}La.displayName="ProgrammaticQABot";export{Ia as FileUploadComponent,Ba as QABot,Qa as applyFlowSettings,Na as default,xa as fileToBase64,ka as filesToBase64,Ta as formatFileSize,Na as qaBot,Da as useScreenshotCapture,Sa as validateFileSize,Ma as withHistory,Oa as withHistoryFn};
8
+ */var mn,vn;const yn=gn(function(){if(vn)return mn;vn=1;var e=/["'&<>]/;return mn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",l=0,a=0;for(l=r.index;l<n.length;l++){switch(n.charCodeAt(l)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}a!==l&&(i+=n.substring(a,l)),a=l+1,i+=o}return a!==l?i+n.substring(a,l):i}}());function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bn=/(url|image|image-set)\(/i;class kn extends hn{attribute(e,t){return"style"===e&&Object.keys(t).forEach(e=>{String(t[e]).match(bn)&&delete t[e]}),t}}const xn=/^<(!doctype|(html|head|body)(\s|>))/i,En=/^(aria-|data-|\w+:)/iu,Pn=/{{{(\w+)\/?}}}/;function Cn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}let Sn=class{constructor(e,t={},n=[],r=[]){var o;if(wn(this,"allowed",void 0),wn(this,"banned",void 0),wn(this,"blocked",void 0),wn(this,"container",void 0),wn(this,"content",[]),wn(this,"props",void 0),wn(this,"matchers",void 0),wn(this,"filters",void 0),wn(this,"keyIndex",void 0),"production"!==process.env.NODE_ENV&&e&&"string"!=typeof e)throw new TypeError("Interweave parser requires a valid string.");this.props=t,this.matchers=n,this.filters=[...r,new kn],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:cn),this.banned=new Set(An),this.blocked=new Set(t.blockList)}applyAttributeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.attribute?n.attribute(e,t):t,t)}applyNodeFilters(e,t){return this.filters.reduce((t,n)=>null!==t&&"function"==typeof n.node?n.node(e,t):t,t)}applyMatchers(e,t){const n={},{props:r}=this;let o=e,i=0,l=null;return this.matchers.forEach(e=>{const a=e.asTag().toLowerCase(),s=this.getTagConfig(a);if(r[e.inverseName]||!this.isTagAllowed(a)||!this.canRenderChild(t,s))return;let A="";for(;o&&(l=e.match(o));){const{index:t,length:a,match:s,valid:c,void:u,...d}=l,f=e.propName+String(i);t>0&&(A+=o.slice(0,t)),c?(A+=u?`{{{${f}/}}}`:`{{{${f}}}}${s}{{{/${f}}}}`,this.keyIndex+=1,i+=1,n[f]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):A+=s,e.greedy?(o=A+o.slice(t+a),A=""):o=o.slice(t+(a||s.length))}e.greedy||(o=A+o)}),0===i?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,"\n");return r=r.replace(/\n{3,}/g,"\n\n\n"),r=r.replace(/\n/g,"<br/>"),r}createContainer(e){var t;const n=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||Cn)();if(!n)return;const r=null!==(t=this.props.containerTagName)&&void 0!==t?t:"body",o="body"===r||"fragment"===r?n.body:n.createElement(r);if(e.match(xn)){if("production"!==process.env.NODE_ENV)throw new Error("HTML documents as Interweave content are not supported.")}else o.innerHTML=this.convertLineBreaks(this.props.escapeHtml?yn(e):e);return o}extractAttributes(e){const{allowAttributes:t}=this.props,n={};let r=0;return 1===e.nodeType&&e.attributes&&([...e.attributes].forEach(o=>{const{name:i,value:l}=o,a=i.toLowerCase(),s=un[a]||un[i];if(!this.isSafe(e)||!a.match(En)&&(!t&&(!s||2===s)||a.startsWith("on")||l.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let A="style"===a?this.extractStyleAttribute(e):l;4===s?A=!0:3===s?A=Number.parseFloat(String(A)):5!==s&&(A=String(A)),n[dn[a]||a]=this.applyAttributeFilters(a,A),r+=1}),0!==r)?n:null}extractStyleAttribute(e){const t={};return Array.from(e.style).forEach(n=>{const r=e.style[n];("string"==typeof r||"number"==typeof r)&&(t[n.replace(/-([a-z])/g,(e,t)=>String(t).toUpperCase())]=r)}),t}getTagConfig(e){const t={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return sn[e]?{...t,...sn[e],tagName:e}:t}isSafe(e){if(typeof HTMLAnchorElement<"u"&&e instanceof HTMLAnchorElement){const t=e.getAttribute("href");if(null!=t&&t.startsWith("#"))return!0;const n=e.protocol.toLowerCase();return":"===n||"http:"===n||"https:"===n||"mailto:"===n||"tel:"===n}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,n){const{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:l,transformOnlyAllowList:a}=this.props;let s=[],A="";return[...e.childNodes].forEach(e=>{if(1===e.nodeType){const u=e.nodeName.toLowerCase(),d=this.getTagConfig(u);A&&(s.push(A),A="");const f=this.applyNodeFilters(u,e);if(!f)return;let p;if(l&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const e=this.keyIndex;p=this.parseNode(f,d);const n=l(f,p,d);if(null===n)return;if(typeof n<"u")return void s.push(t.cloneElement(n,{key:e}));this.keyIndex=e-1}if(this.banned.has(u))return;if(r||o&&"br"!==u||!this.isTagAllowed(u)||!i&&!this.canRenderChild(n,d))s=[...s,...this.parseNode(f,d.tagName?d:n)];else{var c;this.keyIndex+=1;const e=this.extractAttributes(f),n={tagName:u};e&&(n.attributes=e),d.void&&(n.selfClose=d.void),s.push(t.createElement(pn,{...n,key:this.keyIndex},null!==(c=p)&&void 0!==c?c:this.parseNode(f,d)))}}else if(3===e.nodeType){const t=r&&!o?e.textContent:this.applyMatchers(e.textContent||"",n);Array.isArray(t)?s=[...s,...t]:A+=t}}),A&&s.push(A),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(Pn);){const[e,i]=o,l=o.index,a=e.includes("/");if("production"!==process.env.NODE_ENV&&!t[i])throw new Error(`Token "${i}" found but no matching element to replace with.`);l>0&&(n.push(r.slice(0,l)),r=r.slice(l));const{children:s,matcher:A,props:c}=t[i];let u;if(a)u=e.length,n.push(A.createElement(s,c));else{const o=r.match(new RegExp(`{{{/${i}}}}`));if("production"!==process.env.NODE_ENV&&!o)throw new Error(`Closing token missing for interpolated element "${i}".`);u=o.index+o[0].length,n.push(A.createElement(this.replaceTokens(r.slice(e.length,o.index),t),c))}r=r.slice(u)}return r.length>0&&n.push(r),0===n.length?"":1===n.length&&"string"==typeof n[0]?n[0]:n}};function Dn(e){var n;const{attributes:r,className:o,containerTagName:i,content:l,emptyContent:a,parsedContent:s,tagName:A,noWrap:c}=e,u=null!==(n=i??A)&&void 0!==n?n:"span",d="fragment"===u||c;let f;if(s)f=s;else{const t=new Sn(l??"",e).parse();t.length>0&&(f=t)}return f||(f=a),d?t.createElement(t.Fragment,null,f):t.createElement(pn,{attributes:r,className:o,tagName:u},f)}function Bn(e){const{attributes:n,className:r,content:o="",disableFilters:i=!1,disableMatchers:l=!1,emptyContent:a=null,filters:s=[],matchers:A=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1,...p}=e,h=l?[]:A,g=i?[]:s,m=u?[u]:[],v=c?[c]:[];h.forEach(e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&v.push(e.onAfterParse.bind(e))});const y=m.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r},o??""),w=new Sn(y,p,h,g),b=v.reduce((t,n)=>{const r=n(t,e);if("production"!==process.env.NODE_ENV&&!Array.isArray(r))throw new TypeError("Interweave `onAfterParse` must return an array of strings and React elements.");return r},w.parse());return t.createElement(Dn,{attributes:n,className:r,containerTagName:e.containerTagName,emptyContent:a,noWrap:f,parsedContent:0===b.length?void 0:b,tagName:d})}const In=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(Bn,{content:"string"==typeof e?e:""})}),Tn={autoConfig:!0},Qn=(e,t,n)=>{var r;if(!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderHtml)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)},Mn=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},On=e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:i}=on(),l={...e,...Tn},a=l.htmlComponent?l.htmlComponent:In;s(()=>{var e,t;if(i){const i=[...n];for(let n=0;n<i.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=i[n];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(i)}},[i]);const A=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();"string"==typeof e.data.message.content&&Qn(e,t(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=Mn),e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,A),tn(J.CHUNK_STREAM_MESSAGE,A),tn(J.START_STREAM_MESSAGE,A),tn(J.START_SIMULATE_STREAM_MESSAGE,A),tn(J.START_SPEAK_AUDIO,async e=>{Qn(e,t(),"BOT")&&(e.data.textToRead=(e=>typeof window.DOMParser<"u"?(new DOMParser).parseFromString(e,"text/html").body.textContent||"":e.replace(/<\/?[^>]+(>|$)/g,""))(e.data.textToRead))});const c={name:"@rcb-plugins/html-renderer"};return null!=l&&l.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const Ln=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rn={};function Hn(e,t){return(Rn.jsx?Nn:Ln).test(e)}const Fn=/[ \t\n\f\r]/g;function zn(e){return""===e.replace(Fn,"")}class jn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Un(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 jn(n,r,t)}function _n(e){return e.toLowerCase()}jn.prototype.property={},jn.prototype.normal={},jn.prototype.space=null;class qn{constructor(e,t){this.property=e,this.attribute=t}}qn.prototype.space=null,qn.prototype.boolean=!1,qn.prototype.booleanish=!1,qn.prototype.overloadedBoolean=!1,qn.prototype.number=!1,qn.prototype.commaSeparated=!1,qn.prototype.spaceSeparated=!1,qn.prototype.commaOrSpaceSeparated=!1,qn.prototype.mustUseProperty=!1,qn.prototype.defined=!1;let Vn=0;const Gn=$n(),Wn=$n(),Yn=$n(),Kn=$n(),Xn=$n(),Jn=$n(),Zn=$n();function $n(){return 2**++Vn}const er=Object.freeze(Object.defineProperty({__proto__:null,boolean:Gn,booleanish:Wn,commaOrSpaceSeparated:Zn,commaSeparated:Jn,number:Kn,overloadedBoolean:Yn,spaceSeparated:Xn},Symbol.toStringTag,{value:"Module"})),tr=Object.keys(er);class nr extends qn{constructor(e,t,n,r){let o=-1;if(super(e,t),rr(this,"space",r),"number"==typeof n)for(;++o<tr.length;){const e=tr[o];rr(this,tr[o],(n&er[e])===er[e])}}}function rr(e,t,n){n&&(e[t]=n)}nr.prototype.defined=!0;const or={}.hasOwnProperty;function ir(e){const t={},n={};let r;for(r in e.properties)if(or.call(e.properties,r)){const o=e.properties[r],i=new nr(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[_n(r)]=r,n[_n(i.attribute)]=r}return new jn(t,n,e.space)}const lr=ir({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}}),ar=ir({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function sr(e,t){return t in e?e[t]:t}function Ar(e,t){return sr(e,t.toLowerCase())}const cr=ir({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ar,properties:{xmlns:null,xmlnsXLink:null}}),ur=ir({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Wn,ariaAutoComplete:null,ariaBusy:Wn,ariaChecked:Wn,ariaColCount:Kn,ariaColIndex:Kn,ariaColSpan:Kn,ariaControls:Xn,ariaCurrent:null,ariaDescribedBy:Xn,ariaDetails:null,ariaDisabled:Wn,ariaDropEffect:Xn,ariaErrorMessage:null,ariaExpanded:Wn,ariaFlowTo:Xn,ariaGrabbed:Wn,ariaHasPopup:null,ariaHidden:Wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xn,ariaLevel:Kn,ariaLive:null,ariaModal:Wn,ariaMultiLine:Wn,ariaMultiSelectable:Wn,ariaOrientation:null,ariaOwns:Xn,ariaPlaceholder:null,ariaPosInSet:Kn,ariaPressed:Wn,ariaReadOnly:Wn,ariaRelevant:null,ariaRequired:Wn,ariaRoleDescription:Xn,ariaRowCount:Kn,ariaRowIndex:Kn,ariaRowSpan:Kn,ariaSelected:Wn,ariaSetSize:Kn,ariaSort:null,ariaValueMax:Kn,ariaValueMin:Kn,ariaValueNow:Kn,ariaValueText:null,role:null}}),dr=ir({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ar,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jn,acceptCharset:Xn,accessKey:Xn,action:null,allow:null,allowFullScreen:Gn,allowPaymentRequest:Gn,allowUserMedia:Gn,alt:null,as:null,async:Gn,autoCapitalize:null,autoComplete:Xn,autoFocus:Gn,autoPlay:Gn,blocking:Xn,capture:null,charSet:null,checked:Gn,cite:null,className:Xn,cols:Kn,colSpan:null,content:null,contentEditable:Wn,controls:Gn,controlsList:Xn,coords:Kn|Jn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Gn,defer:Gn,dir:null,dirName:null,disabled:Gn,download:Yn,draggable:Wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Gn,formTarget:null,headers:Xn,height:Kn,hidden:Gn,high:Kn,href:null,hrefLang:null,htmlFor:Xn,httpEquiv:Xn,id:null,imageSizes:null,imageSrcSet:null,inert:Gn,inputMode:null,integrity:null,is:null,isMap:Gn,itemId:null,itemProp:Xn,itemRef:Xn,itemScope:Gn,itemType:Xn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Gn,low:Kn,manifest:null,max:null,maxLength:Kn,media:null,method:null,min:null,minLength:Kn,multiple:Gn,muted:Gn,name:null,nonce:null,noModule:Gn,noValidate:Gn,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:Gn,optimum:Kn,pattern:null,ping:Xn,placeholder:null,playsInline:Gn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Gn,referrerPolicy:null,rel:Xn,required:Gn,reversed:Gn,rows:Kn,rowSpan:Kn,sandbox:Xn,scope:null,scoped:Gn,seamless:Gn,selected:Gn,shadowRootClonable:Gn,shadowRootDelegatesFocus:Gn,shadowRootMode:null,shape:null,size:Kn,sizes:null,slot:null,span:Kn,spellCheck:Wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Kn,step:null,style:null,tabIndex:Kn,target:null,title:null,translate:null,type:null,typeMustMatch:Gn,useMap:null,value:Wn,width:Kn,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xn,axis:null,background:null,bgColor:null,border:Kn,borderColor:null,bottomMargin:Kn,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Gn,declare:Gn,event:null,face:null,frame:null,frameBorder:null,hSpace:Kn,leftMargin:Kn,link:null,longDesc:null,lowSrc:null,marginHeight:Kn,marginWidth:Kn,noResize:Gn,noHref:Gn,noShade:Gn,noWrap:Gn,object:null,profile:null,prompt:null,rev:null,rightMargin:Kn,rules:null,scheme:null,scrolling:Wn,standby:null,summary:null,text:null,topMargin:Kn,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Kn,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Gn,disableRemotePlayback:Gn,prefix:null,property:null,results:Kn,security:null,unselectable:null}}),fr=ir({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:sr,properties:{about:Zn,accentHeight:Kn,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Kn,amplitude:Kn,arabicForm:null,ascent:Kn,attributeName:null,attributeType:null,azimuth:Kn,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Kn,by:null,calcMode:null,capHeight:Kn,className:Xn,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:Kn,diffuseConstant:Kn,direction:null,display:null,dur:null,divisor:Kn,dominantBaseline:null,download:Gn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Kn,enableBackground:null,end:null,event:null,exponent:Kn,externalResourcesRequired:null,fill:null,fillOpacity:Kn,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:Jn,g2:Jn,glyphName:Jn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Kn,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Kn,horizOriginX:Kn,horizOriginY:Kn,id:null,ideographic:Kn,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Kn,k:Kn,k1:Kn,k2:Kn,k3:Kn,k4:Kn,kernelMatrix:Zn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Kn,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:Kn,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:Kn,overlineThickness:Kn,paintOrder:null,panose1:null,path:null,pathLength:Kn,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Kn,pointsAtY:Kn,pointsAtZ:Kn,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zn,rev:Zn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zn,requiredFeatures:Zn,requiredFonts:Zn,requiredFormats:Zn,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:Kn,specularExponent:Kn,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Kn,strikethroughThickness:Kn,string:null,stroke:null,strokeDashArray:Zn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Kn,strokeOpacity:Kn,strokeWidth:null,style:null,surfaceScale:Kn,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zn,tabIndex:Kn,tableValues:null,target:null,targetX:Kn,targetY:Kn,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Kn,underlineThickness:Kn,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Kn,values:null,vAlphabetic:Kn,vMathematical:Kn,vectorEffect:null,vHanging:Kn,vIdeographic:Kn,version:null,vertAdvY:Kn,vertOriginX:Kn,vertOriginY:Kn,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Kn,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),pr=/^data[-\w.:]+$/i,hr=/-[a-z]/g,gr=/[A-Z]/g;function mr(e){return"-"+e.toLowerCase()}function vr(e){return e.charAt(1).toUpperCase()}const yr={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"},wr=Un([ar,lr,cr,ur,dr],"html"),br=Un([ar,lr,cr,ur,fr],"svg");function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xr,Er,Pr,Cr={};var Sr=function(){if(Pr)return Cr;Pr=1;var e=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach(function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}}),r};var t=e(function(){if(Er)return xr;Er=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function A(e){return e?e.replace(a,s):s}return xr=function(a,c){if("string"!=typeof a)throw new TypeError("First argument must be a string");if(!a)return[];c=c||{};var u=1,d=1;function f(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new h(e),v(),t}}function h(e){this.start=e,this.end={line:u,column:d},this.source=c.source}function g(e){var t=new Error(c.source+":"+u+":"+d+": "+e);if(t.reason=e,t.filename=c.source,t.line=u,t.column=d,t.source=a,!c.silent)throw t}function m(e){var t=e.exec(a);if(t){var n=t[0];return f(n),a=a.slice(n.length),t}}function v(){m(n)}function y(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=p();if("/"==a.charAt(0)&&"*"==a.charAt(1)){for(var t=2;s!=a.charAt(t)&&("*"!=a.charAt(t)||"/"!=a.charAt(t+1));)++t;if(t+=2,s===a.charAt(t-1))return g("End of comment missing");var n=a.slice(2,t-2);return d+=2,f(n),a=a.slice(t),d+=2,e({type:"comment",comment:n})}}function b(){var t=p(),n=m(r);if(n){if(w(),!m(o))return g("property missing ':'");var a=m(i),c=t({type:"declaration",property:A(n[0].replace(e,s)),value:a?A(a[0].replace(e,s)):s});return m(l),c}}return h.prototype.content=a,v(),function(){var e,t=[];for(y(t);e=b();)!1!==e&&(t.push(e),y(t));return t}()},xr}());return Cr}();const Dr=kr(Sr),Br=Dr.default||Dr,Ir=Qr("end"),Tr=Qr("start");function Qr(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Mr(e){return e&&"object"==typeof e?"position"in e||"type"in e?Lr(e.position):"start"in e||"end"in e?Lr(e):"line"in e||"column"in e?Or(e):"":""}function Or(e){return Nr(e&&e.line)+":"+Nr(e&&e.column)}function Lr(e){return Or(e&&e.start)+"-"+Or(e&&e.end)}function Nr(e){return e&&"number"==typeof e?e:1}class Rr extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=l?l.line:void 0,this.name=Mr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Rr.prototype.file="",Rr.prototype.name="",Rr.prototype.reason="",Rr.prototype.message="",Rr.prototype.stack="",Rr.prototype.column=void 0,Rr.prototype.line=void 0,Rr.prototype.ancestors=void 0,Rr.prototype.cause=void 0,Rr.prototype.fatal=void 0,Rr.prototype.place=void 0,Rr.prototype.ruleId=void 0,Rr.prototype.source=void 0;const Hr={}.hasOwnProperty,Fr=new Map,zr=/[A-Z]/g,jr=/-([a-z])/g,Ur=new Set(["table","tbody","thead","tfoot","tr"]),_r=new Set(["td","th"]),qr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Vr(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const l=Array.isArray(o.children),a=Tr(n);return t(r,o,i,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const l=Array.isArray(o.children)?n:t;return i?l(r,o,i):l(r,o)}}(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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?br:wr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Gr(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Gr(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=br,e.schema=o),e.ancestors.push(t);const i=Jr(e,t.tagName,!1),l=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Hr.call(t.properties,o)){const i=Xr(e,o,t.properties[o]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof l&&_r.has(t.tagName)?r=l:n[o]=l}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Kr(e,t);return Ur.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&zn(e.value):zn(e)}(e)})),Wr(e,l,i,t),Yr(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Zr(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=br,e.schema=o),e.ancestors.push(t);const i=null===t.name?e.Fragment:Jr(e,t.name,!0),l=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else Zr(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else Zr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=Kr(e,t);return Wr(e,l,i,t),Yr(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Yr(r,Kr(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Wr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Fr;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;l=e+"-"+t,o.set(e,t+1)}}const a=Gr(e,i,l);void 0!==a&&n.push(a)}return n}function Xr(e,t,n){const r=function(e,t){const n=_n(t);let r=t,o=qn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&pr.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(hr,vr);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!hr.test(e)){let n=e.replace(gr,mr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=nr}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{Br(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Rr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=qr+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(jr,eo)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Hr.call(e,n)&&(t[$r(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?yr[r.property]||r.property:r.attribute,n]}}function Jr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Hn(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:!(!o||"Literal"!==t.type),optional:!1}:t}r=n}else r=Hn(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Hr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zr(e)}function Zr(e,t){const n=new Rr("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=qr+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $r(e){let t=e.replace(zr,to);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function eo(e,t){return t.toUpperCase()}function to(e){return"-"+e.toLowerCase()}const no={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"]},ro={};function oo(e,t,n){if(function(e){return!(!e||"object"!=typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return io(e.children,t,n)}return Array.isArray(e)?io(e,t,n):""}function io(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=oo(e[o],t,n);return r.join("")}const lo=document.createElement("i");function ao(e){const t="&"+e+";";lo.innerHTML=t;const n=lo.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function so(e,t,n,r){const o=e.length;let i,l=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);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function Ao(e,t){return e.length>0?(so(e,e.length,0,t),e):t}const co={}.hasOwnProperty;function uo(e){const t={};let n=-1;for(;++n<e.length;)fo(t,e[n]);return t}function fo(e,t){let n;for(n in t){const r=(co.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){co.call(r,i)||(r[i]=[]);const e=o[i];po(r[i],Array.isArray(e)?e:e?[e]:[])}}}function po(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);so(e,0,0,r)}function ho(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"οΏ½":String.fromCodePoint(n)}function go(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const mo=Bo(/[A-Za-z]/),vo=Bo(/[\dA-Za-z]/),yo=Bo(/[#-'*+\--9=?A-Z^-~]/);function wo(e){return null!==e&&(e<32||127===e)}const bo=Bo(/\d/),ko=Bo(/[\dA-Fa-f]/),xo=Bo(/[!-/:-@[-`{-~]/);function Eo(e){return null!==e&&e<-2}function Po(e){return null!==e&&(e<0||32===e)}function Co(e){return-2===e||-1===e||32===e}const So=Bo(new RegExp("\\p{P}|\\p{S}","u")),Do=Bo(/\s/);function Bo(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function Io(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(37===i&&vo(e.charCodeAt(n+1))&&vo(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(l=String.fromCharCode(i,t),o=1):l="οΏ½"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function To(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return Co(r)?(e.enter(n),l(r)):t(r)};function l(r){return Co(r)&&i++<o?(e.consume(r),l):(e.exit(n),t(r))}}const Qo={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),To(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Eo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const Mo={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return a;function a(r){if(l<n.length){const o=n[l];return t.containerState=o[1],e.attempt(o[0].continuation,s,A)(r)}return A(r)}function s(e){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}m(l);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return so(t.events,i+1,0,t.events.slice(n)),t.events.length=a,A(e)}return a(e)}function A(o){if(l===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return p(o);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Oo,c,u)(o)}function c(e){return r&&v(),m(l),d(e)}function u(e){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(Oo,f,p)(n)}function f(e){return l++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&v(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):Eo(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.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 n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(l),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;so(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Oo={tokenize:function(e,t,n){return To(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function Lo(e){return null===e||Po(e)||Do(e)?1:So(e)?2:void 0}function No(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 Ro={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,a,s,A,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&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 u={...e[n][1].end},d={...e[c][1].start};Ho(u,-a),Ho(d,a),i={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},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:{...l.end}},e[n][1].end={...i.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=Ao(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=Ao(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=Ao(s,No(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=Ao(s,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,s=Ao(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,so(e,n-1,c-n+3,s),c=n+s.length-A-2;break}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Lo(r);let i;return function(t){return i=t,e.enter("attentionSequence"),l(t)};function l(a){if(a===i)return e.consume(a),l;const s=e.exit("attentionSequence"),A=Lo(a),c=!A||2===A&&o||n.includes(a),u=!o||2===o&&A||n.includes(r);return s._open=!!(42===i?c:c&&(o||!u)),s._close=!!(42===i?u:u&&(A||!c)),t(a)}}};function Ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Fo={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return mo(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||vo(e)?(r=1,l(e)):s(e)}function l(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||vo(t))&&r++<32?(e.consume(t),l):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||wo(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),A):yo(t)?(e.consume(t),s):n(t)}function A(e){return vo(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,A):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||vo(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const zo={partial:!0,tokenize:function(e,t,n){return function(t){return Co(t)?To(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Eo(e)?t(e):n(e)}}};const jo={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Co(t)?To(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(jo,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return Co(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Uo={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return xo(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const _o={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=vo,A(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=ko,A):(e.enter("characterReferenceValue"),o=7,i=bo,A(t))}function A(a){if(59===a&&l){const o=e.exit("characterReferenceValue");return i!==vo||ao(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<o?(e.consume(a),A):n(a)}}};const qo={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Vo={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return l;function l(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),Co(t)?To(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),Co(t)?To(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||Eo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,l=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return l=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===i?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),Co(t)?To(e,A,"whitespace")(t):A(t))}function A(n){return null===n||Eo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(qo,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(t)):Co(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),To(e,u,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function u(t){return null===t||Eo(t)?A(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||Eo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(t)):96===t&&t===i?n(t):(e.consume(t),d)}function f(t){return e.attempt(o,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return l>0&&Co(t)?To(e,g,"linePrefix",l+1)(t):g(t)}function g(t){return null===t||Eo(t)?e.check(qo,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const Go={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),To(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):Eo(t)?e.attempt(Wo,i,a)(t):(e.enter("codeFlowValue"),l(t))}function l(t){return null===t||Eo(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),l)}function a(n){return e.exit("codeIndented"),t(n)}}},Wo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):To(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):Eo(e)?o(e):n(e)}}};const Yo={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(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(t){return e.enter("codeText"),e.enter("codeTextSequence"),l(t)};function l(t){return 96===t?(e.consume(t),i++,l):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,A(t)):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||Eo(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function A(n){return 96===n?(e.consume(n),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Ko{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=t??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Xo(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Xo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xo(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Xo(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Xo(this.left,t.reverse())}}}function Xo(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 Jo(e){const t={};let n,r,o,i,l,a,s,A=-1;const c=new Ko(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(A-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Zo(c,A)),A=t[A],s=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...c.get(r)[1].start},l=c.slice(r,A),l.unshift(n),c.splice(r,A-r+1,l))}}return so(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function Zo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],l=n._tokenizer||r.parser[n.contentType](n.start),a=l.events,s=[],A={};let c,u,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)A[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return A}const $o={resolve:function(e){return Jo(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):Eo(t)?e.check(ei,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},ei={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),To(e,o,"linePrefix")};function o(o){if(null===o||Eo(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function ti(e,t,n,r,o,i,l,a,s){const A=s||Number.POSITIVE_INFINITY;let c=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),u):null===t||32===t||41===t||wo(t)?n(t):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t))};function u(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||Eo(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(o){return c||null!==o&&41!==o&&!Po(o)?c<A&&40===o?(e.consume(o),c++,p):41===o?(e.consume(o),c--,p):null===o||32===o||40===o||wo(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function ni(e,t,n,r,o,i){const l=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),A};function A(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(u):93===u?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):Eo(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||Eo(t)||s++>999?(e.exit("chunkString"),A(t)):(e.consume(t),a||(a=!Co(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function ri(e,t,n,r,o,i){let l;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),l=40===t?41:t,a):n(t)};function a(n){return n===l?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===l?(e.exit(i),a(l)):null===t?n(t):Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),To(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(t))}function A(t){return t===l||null===t||Eo(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return t===l||92===t?(e.consume(t),A):A(t)}}function oi(e,t){let n;return function r(o){return Eo(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Co(o)?To(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const ii={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return ni.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return Po(t)?oi(e,a)(t):a(t)}function a(t){return ti(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(li,A,A)(t)}function A(t){return Co(t)?To(e,c,"whitespace")(t):c(t)}function c(i){return null===i||Eo(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},li={partial:!0,tokenize:function(e,t,n){return function(t){return Po(t)?oi(e,r)(t):n(t)};function r(t){return ri(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return Co(t)?To(e,i,"whitespace")(t):i(t)}function i(e){return null===e||Eo(e)?t(e):n(e)}}};const ai={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Eo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const si={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[i][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(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"},so(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(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||Po(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||Eo(n)?(e.exit("atxHeading"),t(n)):Co(n)?To(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||Po(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}}};const Ai=["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"],ci=["pre","script","style","textarea"],ui={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(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,l,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),A}(t)};function A(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:O):mo(a)?(e.consume(a),l=String.fromCharCode(a),p):n(a)}function c(i){return 45===i?(e.consume(i),o=2,u):91===i?(e.consume(i),o=5,a=0,d):mo(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:C:d):n(o)}function f(t){return mo(t)?(e.consume(t),l=String.fromCharCode(t),p):n(t)}function p(a){if(null===a||47===a||62===a||Po(a)){const s=47===a,A=l.toLowerCase();return s||i||!ci.includes(A)?Ai.includes(l.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):C(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):m(a)):(o=1,r.interrupt?t(a):C(a))}return 45===a||vo(a)?(e.consume(a),l+=String.fromCharCode(a),p):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return Co(t)?(e.consume(t),g):E(t)}function m(t){return 47===t?(e.consume(t),E):58===t||95===t||mo(t)?(e.consume(t),v):Co(t)?(e.consume(t),m):E(t)}function v(t){return 45===t||46===t||58===t||95===t||vo(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),w):Co(t)?(e.consume(t),y):m(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,b):Co(t)?(e.consume(t),w):k(t)}function b(t){return t===s?(e.consume(t),s=null,x):null===t||Eo(t)?n(t):(e.consume(t),b)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Po(t)?y(t):(e.consume(t),k)}function x(e){return 47===e||62===e||Co(e)?m(e):n(e)}function E(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||Eo(t)?C(t):Co(t)?(e.consume(t),P):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!Eo(t)||6!==o&&7!==o?null===t||Eo(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(di,N,S)(t))}function S(t){return e.check(fi,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||Eo(t)?S(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),O):C(t)}function T(t){return 47===t?(e.consume(t),l="",Q):C(t)}function Q(t){if(62===t){const n=l.toLowerCase();return ci.includes(n)?(e.consume(t),L):C(t)}return mo(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),Q):C(t)}function M(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):C(t)}function L(t){return null===t||Eo(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},di={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(zo,t,n)}}},fi={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return Eo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const pi={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):mo(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),A):91===t?(e.consume(t),i=0,f):mo(t)?(e.consume(t),m):n(t)}function A(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):Eo(t)?(l=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),h):Eo(t)?(l=p,Q(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?T(t):Eo(t)?(l=m,Q(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):Eo(t)?(l=v,Q(t)):(e.consume(t),v)}function y(e){return 62===e?T(e):v(e)}function w(t){return mo(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||vo(t)?(e.consume(t),b):k(t)}function k(t){return Eo(t)?(l=k,Q(t)):Co(t)?(e.consume(t),k):T(t)}function x(t){return 45===t||vo(t)?(e.consume(t),x):47===t||62===t||Po(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),T):58===t||95===t||mo(t)?(e.consume(t),P):Eo(t)?(l=E,Q(t)):Co(t)?(e.consume(t),E):T(t)}function P(t){return 45===t||46===t||58===t||95===t||vo(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),S):Eo(t)?(l=C,Q(t)):Co(t)?(e.consume(t),C):E(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):Eo(t)?(l=S,Q(t)):Co(t)?(e.consume(t),S):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):Eo(t)?(l=D,Q(t)):(e.consume(t),D)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Po(t)?E(t):(e.consume(t),B)}function I(e){return 47===e||62===e||Po(e)?E(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return Co(t)?To(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),l(t)}}};const hi={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&so(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=l);const s={type:"labelLink"===e[r][1].type?"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",s,t],["enter",A,t]],i=Ao(i,e.slice(r+1,r+a+3)),i=Ao(i,[["enter",c,t]]),i=Ao(i,No(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=Ao(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=Ao(i,e.slice(o+1)),i=Ao(i,[["exit",s,t]]),so(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if(("labelImage"===r.events[l][1].type||"labelLink"===r.events[l][1].type)&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(t){return o?o._inactive?c(t):(i=r.parser.defined.includes(go(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a):n(t)};function a(t){return 40===t?e.attempt(gi,A,i?A:c)(t):91===t?e.attempt(mi,A,i?s:c)(t):i?A(t):c(t)}function s(t){return e.attempt(vi,A,c)(t)}function A(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},gi={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return Po(t)?oi(e,o)(t):o(t)}function o(t){return 41===t?A(t):ti(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return Po(t)?oi(e,a)(t):A(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?ri(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):A(t)}function s(t){return Po(t)?oi(e,A)(t):A(t)}function A(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},mi={tokenize:function(e,t,n){const r=this;return function(t){return ni.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(go(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},vi={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const yi={name:"labelStartImage",resolveAll:hi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const wi={name:"labelStartLink",resolveAll:hi.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const bi={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),To(e,t,"linePrefix")}}};const ki={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),l(i)):o>=3&&(null===i||Eo(i))?(e.exit("thematicBreak"),t(i)):n(i)}function l(t){return t===r?(e.consume(t),o++,l):(e.exit("thematicBreakSequence"),Co(t)?To(e,i,"whitespace")(t):i(t))}}};const xi={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(zo,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,To(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!Co(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Pi,t,o)(n))});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,To(e,e.attempt(xi,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},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&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:bo(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(ki,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return bo(t)&&++l<10?(e.consume(t),a):(!r.interrupt||l<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(zo,r.interrupt?n:A,e.attempt(Ei,u,c))}function A(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return Co(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Ei={partial:!0,tokenize:function(e,t,n){const r=this;return To(e,function(e){const o=r.events[r.events.length-1];return!Co(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Pi={partial:!0,tokenize:function(e,t,n){const r=this;return To(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Ci={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),!o&&"definition"===e[i][1].type&&(o=i);const l={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",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l,e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let l,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){l="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!l?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t))};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),Co(t)?To(e,l,"lineSuffix")(t):l(t))}function l(r){return null===r||Eo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Si={tokenize:function(e){const t=this,n=e.attempt(zo,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,To(e,e.attempt(this.parser.constructs.flow,r,e.attempt($o,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Di={resolveAll:Qi()},Bi=Ti("string"),Ii=Ti("text");function Ti(e){return{resolveAll:Qi("text"===e?Mi:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(e){return s(e)?o(e):l(e)}function l(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Qi(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):(!t[o]||"data"!==t[o][1].type)&&(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 Mi(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,a=-1,s=0;for(;l--;){const e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)i=!0,s++;else if(-1!==e){l++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Oi={42:xi,43:xi,45:xi,48:xi,49:xi,50:xi,51:xi,52:xi,53:xi,54:xi,55:xi,56:xi,57:xi,62:jo},Li={91:ii},Ni={[-2]:Go,[-1]:Go,32:Go},Ri={35:si,42:ki,45:[Ci,ki],60:ui,61:Ci,95:ki,96:Vo,126:Vo},Hi={38:_o,92:Uo},Fi={[-5]:bi,[-4]:bi,[-3]:bi,33:yi,38:_o,42:Ro,60:[Fo,pi],91:wi,92:[ai,Uo],93:hi,95:Ro,96:Yo},zi={null:[Ro,Di]},ji=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Li,disable:{null:[]},document:Oi,flow:Ri,flowInitial:Ni,insideSpan:zi,string:Hi,text:Fi},Symbol.toStringTag,{value:"Module"}));function Ui(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 l=[],a=[];const s={attempt:h(function(e,t){g(e,t.from)}),check:h(p),consume:function(e){Eo(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),A.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),A.events.push(["enter",n,A]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),A.events.push(["exit",t,A]),t},interrupt:h(p,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,m()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let l;if("string"==typeof i)l=i;else switch(i){case-5:l="\r";break;case-4:l="\n";break;case-3:l="\r\n";break;case-2:l=t?" ":"\t";break;case-1:if(!t&&o)continue;l=" ";break;default:l=String.fromCharCode(i)}o=-2===i,r.push(l)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return l=Ao(l,e),function(){let e;for(;r._index<l.length;){const t=l[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)f(t.charCodeAt(r._bufferIndex));else f(t)}}(),null!==l[l.length-1]?[]:(g(t,0),A.events=No(i,A.events,A),A.events)}};let c=t.tokenize.call(A,s);return t.resolveAll&&i.push(t),A;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,i)];else{if(l=e.slice(n,o),r>-1){const e=l[0];"string"==typeof e?l[0]=e.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}(l,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(e){c=c(e)}function p(e,t){t.restore()}function h(e,t){return function(n,o,i){let l,c,u,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return l=e,c=0,0===e.length?i:h(e[c])}function h(e){return function(n){return f=function(){const e=d(),t=A.previous,n=A.currentConstruct,o=A.events.length,i=Array.from(a);return{from:o,restore:l};function l(){r=e,A.previous=t,A.currentConstruct=n,A.events.length=o,a=i,m()}}(),u=e,e.partial||(A.currentConstruct=e),e.name&&A.parser.constructs.disable.null.includes(e.name)?v():e.tokenize.call(t?Object.assign(Object.create(A),t):A,s,g,v)(n)}}function g(t){return e(u,f),o}function v(e){return f.restore(),++c<l.length?h(l[c]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&so(A.events,t,A.events.length-t,e.resolve(A.events.slice(t),A)),e.resolveTo&&(A.events=e.resolveTo(A.events,A))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const _i=/[\0\t\n\r]/g;const qi=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Vi(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return ho(n.slice(t?2:1),t?16:10)}return ao(n)||e}const Gi={}.hasOwnProperty;function Wi(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(J),blockQuote:i(G),characterEscape:P,characterReference:P,codeFenced:i(W),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(W,l),codeText:i(Y,l),codeTextData:P,data:P,codeFlowValue:P,definition:i(K),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(X),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i($,l),htmlFlowData:P,htmlText:i($,l),htmlTextData:P,image:i(ee),label:l,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,u),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(J),strong:i(ie),thematicBreak:i(ae)},exit:{atxHeading:s(),atxHeadingSequence:b,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:U,characterReference:_,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(T),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(I),htmlTextData:C,image:s(M),label:L,labelText:O,lineEnding:S,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:z,resourceDestinationString:N,resourceTitleString:R,resource:H,setextHeading:s(E),setextHeadingLineSequence:x,setextHeadingText:k,strong:s(),thematicBreak:s()}};Ki(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:a,exit:A,buffer:l,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];Gi.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},i),e[u][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||Ji).call(i,void 0,e[0])}for(r.position={start:Yi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Yi(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,i,l,a=t-1,s=-1,A=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!l&&!s&&!i&&(i=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(o=void 0;l--;){const t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",A=!0),t[1].type="lineEnding",o=l}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,l=!0}}}return e[t][1]._spread=A,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Yi(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),A.call(this,t)}}function A(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ji).call(this,e,r[0])),n.position.end=Yi(e.end)}function c(){return function(e){return oo(e,"boolean"!=typeof ro.includeImageAlt||ro.includeImageAlt,"boolean"!=typeof ro.includeHtml||ro.includeHtml)}(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=go(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function x(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];(!n||"text"!==n.type)&&(n=le(),n.position={start:Yi(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Yi(e.end)}function S(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Yi(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),C.call(this,e))}function D(){this.data.atHardBreak=!0}function B(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(qi,Vi)}(t),n.identifier=go(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function z(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=go(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=ho(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=ao(t);this.stack[this.stack.length-1].value+=r}function _(e){this.stack.pop().position.end=Yi(e.end)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Jo(e););return e}(function(e){const t={constructs:uo([ji,...(e||{}).extensions||[]]),content:n(Qo),defined:[],document:n(Mo),flow:n(Si),lazy:{},string:n(Bi),text:n(Ii)};return t;function n(e){return function(n){return Ui(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,l){const a=[];let s,A,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(_i.lastIndex=c,s=_i.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(A=4*Math.ceil(t/4),a.push(-2);t++<A;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return l&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Yi(e){return{line:e.line,column:e.column,offset:e.offset}}function Ki(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Ki(e,r):Xi(e,r)}}function Xi(e,t){let n;for(n in t)if(Gi.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 Ji(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Mr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Mr({start:t.start,end:t.end})+") is still open")}function Zi(e){const t=this;t.parser=function(n){return Wi(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function $i(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&"text"===l.type?l.value+=r:o.push({type:"text",value:r}),o}function el(e){return e.spread??e.children.length>1}function tl(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(nl(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(nl(t.slice(o),o>0,!1)),i.join("")}function nl(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const rl={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:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",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="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Io(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={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(l)}]};e.patch(t,s);const A={type:"element",tagName:"sup",properties:{},children:[s]};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 $i(e,t);const o={src:Io(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(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:Io(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(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 $i(e,t);const o={href:Io(r.url||"")};null!==r.title&&void 0!==r.title&&(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:Io(t.url)};null!==t.title&&void 0!==t.title&&(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(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=el(n[r])}return t}(n):el(t),i={},l=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.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 e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&l.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?l.push(e):l.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&l.push({type:"text",value:"\n"});const A={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.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 n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Tr(t.children[1]),l=Ir(t.children[t.children.length-1]);i&&l&&(r.position={start:i,end:l}),o.push(r)}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=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,l=i?i.length:t.children.length;let a=-1;const s=[];for(;++a<l;){const n=t.children[a],r={},l=i?i[a]:void 0;l&&(r.align=l);let A={type:"element",tagName:o,properties:r,children:[]};n&&(A.children=e.all(n),e.patch(n,A),A=e.applyData(n,A)),s.push(A)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:tl(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:ol,yaml:ol,definition:ol,footnoteDefinition:ol};function ol(){}const il="object"==typeof self?self:globalThis,ll=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,l]=t[o];switch(i){case 0:case-1:return n(l,o);case 1:{const e=n([],o);for(const t of l)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of l)e[r(t)]=r(n);return e}case 3:return n(new Date(l),o);case 4:{const{source:e,flags:t}=l;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of l)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of l)e.add(r(t));return e}case 7:{const{name:e,message:t}=l;return n(new il[e](t),o)}case 8:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:e}=new Uint8Array(l);return n(new DataView(e),l)}}return n(new il[i](l),o)};return r})(new Map,e)(0),al="",{toString:sl}={},{keys:Al}=Object,cl=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=sl.call(e).slice(8,-1);switch(n){case"Array":return[1,al];case"Object":return[2,al];case"Date":return[3,al];case"RegExp":return[4,al];case"Map":return[5,al];case"Set":return[6,al];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ul=([e,t])=>0===e&&("function"===t||"symbol"===t),dl=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[l,a]=cl(r);switch(l){case 0:{let t=r;switch(a){case"bigint":l=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([l,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([l,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([l,n],r);for(const t of Al(r))(e||!ul(cl(r[t])))&&n.push([i(t),i(r[t])]);return s}case 3:return o([l,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([l,{source:e,flags:t}],r)}case 5:{const t=[],n=o([l,t],r);for(const[n,o]of r)(e||!ul(cl(n))&&!ul(cl(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([l,t],r);for(const n of r)(e||!ul(cl(n)))&&t.push(i(n));return n}}const{message:s}=r;return o([l,{name:a,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},fl="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ll(dl(e,t)):structuredClone(e):(e,t)=>ll(dl(e,t));function pl(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 hl(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const gl=function(e){if(null==e)return vl;if("function"==typeof e)return ml(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gl(e[n]);return ml(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return ml(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return ml(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function ml(e){return function(t,n,r){return!(!function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)||!e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function vl(){return!0}const yl=[],wl=!0,bl=!1;function kl(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=gl(o),l=r?-1:1;!function e(o,a,s){const A=o&&"object"==typeof o?o:{};if("string"==typeof A.type){const e="string"==typeof A.tagName?A.tagName:"string"==typeof A.name?A.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let A,c,u,d=yl;if((!t||i(o,a,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[wl,e]:null==e?yl:[e]}(n(o,s)),d[0]===bl))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+l,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(A=e(n,c,u)(),A[0]===bl)return A;c="number"==typeof A[1]?A[1]:c+l}}return d}}(e,void 0,[])()}function xl(e,t,n,r){let o,i,l;"function"==typeof t?(i=void 0,l=t,o=n):(i=t,l=n,o=r),kl(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},o)}const El={}.hasOwnProperty,Pl={};function Cl(e,t){const n=t||Pl,r=new Map,o=new Map,i=new Map,l={...rl,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(!Array.isArray(o)&&"text"===o.type&&(o.value=Tl(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Tl(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Dl,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:function(e,t){const n=e.type,r=a.handlers[n];if(El.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=fl(n);return r.children=a.all(e),r}return fl(e)}return(a.options.unknownHandler||Bl)(a,e,t)},options:n,patch:Sl,wrap:Il};return xl(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}function Sl(e,t){e.position&&(t.position=function(e){const t=Tr(e),n=Ir(e);if(t&&n)return{start:t,end:n}}(e))}function Dl(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,fl(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Bl(e,t){const n=t.data||{},r=!("value"in t)||El.call(n,"hProperties")||El.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 Il(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Tl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ql(e,t){const n=Cl(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pl,r=e.options.footnoteBackLabel||hl,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),l=String(o.identifier).toUpperCase(),A=Io(l.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(l);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+A+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else i.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+A},children:e.wrap(i,!0)};e.patch(o,p),a.push(p)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...fl(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Ml(e,t){return e&&"run"in e?async function(n,r){const o=Ql(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Ql(n,{file:r,...e||t})}}function Ol(e){if(e)throw e}var Ll,Nl;var Rl=function(){if(Nl)return Ll;Nl=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return typeof r>"u"||e.call(n,r)},l=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Ll=function e(){var t,n,r,s,A,c,u=arguments[0],d=1,f=arguments.length,p=!1;for("boolean"==typeof u&&(p=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=a(u,n),u!==(s=a(t,n))&&(p&&s&&(i(s)||(A=o(s)))?(A?(A=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},l(u,{name:n,newValue:e(p,c,s)})):typeof s<"u"&&l(u,{name:n,newValue:s}));return u},Ll}();const Hl=kr(Rl);function Fl(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function zl(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...l){const a=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)(null===l[s]||void 0===l[s])&&(l[s]=t[s]);t=l,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let l;r&&t.push(o);try{l=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(l&&l.then&&"function"==typeof l.then?l.then(i,o):l instanceof Error?o(l):i(l))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(a,o)(...l):r(null,...l)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const jl={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ul(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){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 l=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=l));return r===o?o=l:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Ul(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Ul(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==l&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}return i<0||r<0||0===l||1===l&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ul(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ul(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,l=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(l!==s-1&&1!==a)if(l!==s-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),l=s,a=0;continue}}else if(o.length>0){o="",i=0,l=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(l+1,s):o=e.slice(l+1,s),i=s-l-1;l=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);return 0===n.length&&!t&&(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function Ul(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _l={cwd:function(){return"/"}};function ql(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Vl(e){if("string"==typeof e)e=new URL(e);else if(!ql(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const Gl=["history","path","basename","stem","extname","dirname"];class Wl{constructor(e){let t;var n;t=e?ql(e)?{path:e}:"string"==typeof e||(n=e)&&"object"==typeof n&&"byteLength"in n&&"byteOffset"in n?{value:e}:e:{},this.cwd="cwd"in t?"":_l.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<Gl.length;){const e=Gl[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Gl.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?jl.basename(this.path):void 0}set basename(e){Kl(e,"basename"),Yl(e,"basename"),this.path=jl.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?jl.dirname(this.path):void 0}set dirname(e){Xl(this.basename,"dirname"),this.path=jl.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?jl.extname(this.path):void 0}set extname(e){if(Yl(e,"extname"),Xl(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jl.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ql(e)&&(e=Vl(e)),Kl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?jl.basename(this.path,this.extname):void 0}set stem(e){Kl(e,"stem"),Yl(e,"stem"),this.path=jl.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Rr(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Yl(e,t){if(e&&e.includes(jl.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jl.sep+"`")}function Kl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xl(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Jl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Zl={}.hasOwnProperty;class $l extends Jl{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=zl()}copy(){const e=new $l;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Hl(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(ra("data",this.frozen),this.namespace[e]=t,this):Zl.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ra("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=la(e),n=this.parser||this.Parser;return ta("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),ta("process",this.parser||this.Parser),na("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=la(e),l=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(l,i,function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var l;"string"==typeof(l=i)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(l)?r.value=i:r.result=i,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ta("processSync",this.parser||this.Parser),na("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Ol(e),t=r}),ia("processSync","process",n),t}run(e,t,n){oa(e),this.freeze();const r=this.transformers;return!n&&"function"==typeof t&&(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const l=la(t);r.run(e,l,function(t,r,l){const a=r||e;t?i(t):o?o(a):n(void 0,a,l)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Ol(e),n=t,r=!0}),ia("runSync","run",r),n}stringify(e,t){this.freeze();const n=la(t),r=this.compiler||this.Compiler;return na("stringify",r),oa(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ra("use",this.frozen),null!=e)if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");l(e.plugins),e.settings&&(r.settings=Hl(!0,r.settings,e.settings))}function l(e){let t=-1;if(null!=e){if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const l=n[o][1];Fl(l)&&Fl(r)&&(r=Hl(!0,l,r)),n[o]=[e,r,...i]}}}}const ea=(new $l).freeze();function ta(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function na(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ra(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(!Fl(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function ia(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function la(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Wl(e)}const aa=[],sa={allowDangerousHtml:!0},Aa=/^(https?|ircs?|mailto|xmpp)$/i,ca=[{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 ua(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,l=e.disallowedElements,a=e.rehypePlugins||aa,s=e.remarkPlugins||aa,A=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sa}:sa,c=e.skipHtml,u=e.unwrapDisallowed,d=e.urlTransform||da,f=ea().use(Zi).use(s).use(Ml,A).use(a),p=new Wl;"string"==typeof r&&(p.value=r);for(const t of ca)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const v=f.parse(p);let y=f.runSync(v,p);return o&&(y={type:"element",tagName:"div",properties:{className:o},children:"root"===y.type?y.children:[y]}),xl(y,function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return c?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in no)if(Object.hasOwn(no,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=no[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=d(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!l&&l.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return u&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}}),Vr(y,{Fragment:m,components:i,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0})}function da(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||Aa.test(e.slice(0,t))?e:""}const fa=({children:e})=>h("div",{style:{whiteSpace:"normal"},children:h(ua,{components:{p:({...e})=>h("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>h("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>h("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>h("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?h("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):h("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:h("code",{children:t})}),blockquote:({...e})=>h("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),pa={autoConfig:!0},ha=e=>()=>(e=>{const{getFlow:t}=$t(),{messages:n,replaceMessages:r}=en(),{settings:o}=nn(),{hasChatHistoryLoaded:i}=on(),l={...e,...pa},a=l.markdownComponent?l.markdownComponent:fa;s(()=>{var e,t;if(i){const i=[...n];for(let n=0;n<i.length&&n<((null==(e=o.chatHistory)?void 0:e.maxEntries)??30);n++){const e=i[n];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=a)}r(i)}},[i]);const A=async e=>{var n;const r=null==(n=e.data.message)?void 0:n.sender.toUpperCase();((e,t,n)=>{var r;if("string"!=typeof e.data.message.content||!e.detail.currPath)return!1;const o=t[e.detail.currPath];return!!o&&((null==(r=o.renderMarkdown)?void 0:r.map(e=>e.toUpperCase()).includes(n))??!1)})(e,t(),r)&&(e.data.message.contentWrapper=a,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};tn(J.PRE_INJECT_MESSAGE,A),tn(J.CHUNK_STREAM_MESSAGE,A),tn(J.START_STREAM_MESSAGE,A),tn(J.START_SIMULATE_STREAM_MESSAGE,A);const c={name:"@rcb-plugins/markdown-renderer"};return null!=l&&l.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(e),ga={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"}},ma=(e,t,n="validateTextInput")=>{var r;if(null==(r=e.detail)||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const i=o[n];return"function"==typeof i?i:void 0},va=e=>{const{showToast:t}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=ct();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:n}=$t(),{styles:r,updateStyles:o,replaceStyles:i}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=_t();return{styles:e,replaceStyles:t,updateStyles:n}})(),A=(e=>({...ga,...e,promptBaseColors:{...ga.promptBaseColors},promptHoveredColors:{...ga.promptHoveredColors},textAreaHighlightColors:{...ga.textAreaHighlightColors}}))(e),[c,u]=a(0),d=l({});tn(J.USER_SUBMIT_TEXT,e=>{const i=e,l=ma(i,n(),"validateTextInput");if(!l)return;const a=l(i.data.inputText);if(null!=a&&a.success||e.preventDefault(),!a.promptContent)return;0===c&&(d.current=structuredClone(r));const s=((e,t)=>{const n=e.promptType??"info";let r={};return t.advancedStyles&&(r=t.advancedStyles[n]),t.promptBaseColors&&(r.toastPromptStyle={color:t.promptBaseColors[n],borderColor:t.promptBaseColors[n]}),t.promptHoveredColors&&(r.toastPromptHoveredStyle={color:t.promptHoveredColors[n],borderColor:t.promptHoveredColors[n]}),t.textAreaHighlightColors&&(e.highlightTextArea??!0)&&(r.chatInputAreaStyle={boxShadow:`${t.textAreaHighlightColors[n]} 0px 0px 5px`}),r})(a,A);o(s),t(a.promptContent,a.promptDuration??3e3),u(e=>e+1)}),tn(J.USER_UPLOAD_FILE,e=>{var r,o;const i=e,l=null==(o=null==(r=i.data)?void 0:r.files)?void 0:o[0];if(!l)return console.error("No file uploaded."),void e.preventDefault();const a=ma(i,n(),"validateFileInput");if(!a)return void console.error("Validator not found for file input.");const s=a(l);if(!s.success)return console.error("Validation failed:",s),s.promptContent&&t(s.promptContent,s.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",s)}),tn(J.DISMISS_TOAST,()=>{u(e=>e-1)}),s(()=>{0===c&&setTimeout(()=>{i(d.current)})},[c,i]);const f={name:"@rcb-plugins/input-validator"};return A.autoConfig&&(f.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),f};function ya(){}function wa(){}const ba=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ka=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xa={};function Ea(e,t){return(xa.jsx?ka:ba).test(e)}const Pa=/[ \t\n\f\r]/g;function Ca(e){return""===e.replace(Pa,"")}class Sa{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function Da(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Sa(n,r,t)}function Ba(e){return e.toLowerCase()}Sa.prototype.normal={},Sa.prototype.property={},Sa.prototype.space=void 0;class Ia{constructor(e,t){this.attribute=t,this.property=e}}Ia.prototype.attribute="",Ia.prototype.booleanish=!1,Ia.prototype.boolean=!1,Ia.prototype.commaOrSpaceSeparated=!1,Ia.prototype.commaSeparated=!1,Ia.prototype.defined=!1,Ia.prototype.mustUseProperty=!1,Ia.prototype.number=!1,Ia.prototype.overloadedBoolean=!1,Ia.prototype.property="",Ia.prototype.spaceSeparated=!1,Ia.prototype.space=void 0;let Ta=0;const Qa=Fa(),Ma=Fa(),Oa=Fa(),La=Fa(),Na=Fa(),Ra=Fa(),Ha=Fa();function Fa(){return 2**++Ta}var za=Object.freeze({__proto__:null,boolean:Qa,booleanish:Ma,commaOrSpaceSeparated:Ha,commaSeparated:Ra,number:La,overloadedBoolean:Oa,spaceSeparated:Na});const ja=Object.keys(za);class Ua extends Ia{constructor(e,t,n,r){let o=-1;if(super(e,t),_a(this,"space",r),"number"==typeof n)for(;++o<ja.length;){const e=ja[o];_a(this,ja[o],(n&za[e])===za[e])}}}function _a(e,t,n){n&&(e[t]=n)}function qa(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new Ua(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ba(r)]=r,n[Ba(i.attribute)]=r}return new Sa(t,n,e.space)}Ua.prototype.defined=!0;const Va=qa({properties:{ariaActiveDescendant:null,ariaAtomic:Ma,ariaAutoComplete:null,ariaBusy:Ma,ariaChecked:Ma,ariaColCount:La,ariaColIndex:La,ariaColSpan:La,ariaControls:Na,ariaCurrent:null,ariaDescribedBy:Na,ariaDetails:null,ariaDisabled:Ma,ariaDropEffect:Na,ariaErrorMessage:null,ariaExpanded:Ma,ariaFlowTo:Na,ariaGrabbed:Ma,ariaHasPopup:null,ariaHidden:Ma,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Na,ariaLevel:La,ariaLive:null,ariaModal:Ma,ariaMultiLine:Ma,ariaMultiSelectable:Ma,ariaOrientation:null,ariaOwns:Na,ariaPlaceholder:null,ariaPosInSet:La,ariaPressed:Ma,ariaReadOnly:Ma,ariaRelevant:null,ariaRequired:Ma,ariaRoleDescription:Na,ariaRowCount:La,ariaRowIndex:La,ariaRowSpan:La,ariaSelected:Ma,ariaSetSize:La,ariaSort:null,ariaValueMax:La,ariaValueMin:La,ariaValueNow:La,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function Ga(e,t){return t in e?e[t]:t}function Wa(e,t){return Ga(e,t.toLowerCase())}const Ya=qa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ra,acceptCharset:Na,accessKey:Na,action:null,allow:null,allowFullScreen:Qa,allowPaymentRequest:Qa,allowUserMedia:Qa,alt:null,as:null,async:Qa,autoCapitalize:null,autoComplete:Na,autoFocus:Qa,autoPlay:Qa,blocking:Na,capture:null,charSet:null,checked:Qa,cite:null,className:Na,cols:La,colSpan:null,content:null,contentEditable:Ma,controls:Qa,controlsList:Na,coords:La|Ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qa,defer:Qa,dir:null,dirName:null,disabled:Qa,download:Oa,draggable:Ma,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qa,formTarget:null,headers:Na,height:La,hidden:Oa,high:La,href:null,hrefLang:null,htmlFor:Na,httpEquiv:Na,id:null,imageSizes:null,imageSrcSet:null,inert:Qa,inputMode:null,integrity:null,is:null,isMap:Qa,itemId:null,itemProp:Na,itemRef:Na,itemScope:Qa,itemType:Na,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qa,low:La,manifest:null,max:null,maxLength:La,media:null,method:null,min:null,minLength:La,multiple:Qa,muted:Qa,name:null,nonce:null,noModule:Qa,noValidate:Qa,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:Qa,optimum:La,pattern:null,ping:Na,placeholder:null,playsInline:Qa,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qa,referrerPolicy:null,rel:Na,required:Qa,reversed:Qa,rows:La,rowSpan:La,sandbox:Na,scope:null,scoped:Qa,seamless:Qa,selected:Qa,shadowRootClonable:Qa,shadowRootDelegatesFocus:Qa,shadowRootMode:null,shape:null,size:La,sizes:null,slot:null,span:La,spellCheck:Ma,src:null,srcDoc:null,srcLang:null,srcSet:null,start:La,step:null,style:null,tabIndex:La,target:null,title:null,translate:null,type:null,typeMustMatch:Qa,useMap:null,value:Ma,width:La,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Na,axis:null,background:null,bgColor:null,border:La,borderColor:null,bottomMargin:La,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qa,declare:Qa,event:null,face:null,frame:null,frameBorder:null,hSpace:La,leftMargin:La,link:null,longDesc:null,lowSrc:null,marginHeight:La,marginWidth:La,noResize:Qa,noHref:Qa,noShade:Qa,noWrap:Qa,object:null,profile:null,prompt:null,rev:null,rightMargin:La,rules:null,scheme:null,scrolling:Ma,standby:null,summary:null,text:null,topMargin:La,valueType:null,version:null,vAlign:null,vLink:null,vSpace:La,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qa,disableRemotePlayback:Qa,prefix:null,property:null,results:La,security:null,unselectable:null},space:"html",transform:Wa}),Ka=qa({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:Ha,accentHeight:La,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:La,amplitude:La,arabicForm:null,ascent:La,attributeName:null,attributeType:null,azimuth:La,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:La,by:null,calcMode:null,capHeight:La,className:Na,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:La,diffuseConstant:La,direction:null,display:null,dur:null,divisor:La,dominantBaseline:null,download:Qa,dx:null,dy:null,edgeMode:null,editable:null,elevation:La,enableBackground:null,end:null,event:null,exponent:La,externalResourcesRequired:null,fill:null,fillOpacity:La,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:Ra,g2:Ra,glyphName:Ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:La,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:La,horizOriginX:La,horizOriginY:La,id:null,ideographic:La,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:La,k:La,k1:La,k2:La,k3:La,k4:La,kernelMatrix:Ha,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:La,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:La,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:La,overlineThickness:La,paintOrder:null,panose1:null,path:null,pathLength:La,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Na,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:La,pointsAtY:La,pointsAtZ:La,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ha,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ha,rev:Ha,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ha,requiredFeatures:Ha,requiredFonts:Ha,requiredFormats:Ha,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:La,specularExponent:La,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:La,strikethroughThickness:La,string:null,stroke:null,strokeDashArray:Ha,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:La,strokeOpacity:La,strokeWidth:null,style:null,surfaceScale:La,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ha,tabIndex:La,tableValues:null,target:null,targetX:La,targetY:La,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ha,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:La,underlineThickness:La,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:La,values:null,vAlphabetic:La,vMathematical:La,vectorEffect:null,vHanging:La,vIdeographic:La,version:null,vertAdvY:La,vertOriginX:La,vertOriginY:La,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:La,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ga}),Xa=qa({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()}),Ja=qa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wa}),Za=qa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),$a={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"},es=/[A-Z]/g,ts=/-[a-z]/g,ns=/^data[-\w.:]+$/i;function rs(e){return"-"+e.toLowerCase()}function os(e){return e.charAt(1).toUpperCase()}const is=Da([Va,Ya,Xa,Ja,Za],"html"),ls=Da([Va,Ka,Xa,Ja,Za],"svg");var as="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ss(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var As={},cs=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,us=/\n/g,ds=/^\s*/,fs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ps=/^:\s*/,hs=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gs=/^[;\s]*/,ms=/^\s+|\s+$/g,vs="";function ys(e){return e?e.replace(ms,vs):vs}var ws=as&&as.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(As,"__esModule",{value:!0}),As.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,bs.default)(e),o="function"==typeof t;return r.forEach(function(e){if("declaration"===e.type){var r=e.property,i=e.value;o?t(r,i,e):i&&((n=n||{})[r]=i)}}),n};var bs=ws(function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(e){var t=e.match(us);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=~o?e.length-o:r+e.length}function i(){var e={line:n,column:r};return function(t){return t.position=new l(e),A(),t}}function l(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function a(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i}function s(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function A(){s(ds)}function c(e){var t;for(e=e||[];t=u();)!1!==t&&e.push(t);return e}function u(){var t=i();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;vs!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,vs===e.charAt(n-1))return a("End of comment missing");var l=e.slice(2,n-2);return r+=2,o(l),e=e.slice(n),r+=2,t({type:"comment",comment:l})}}function d(){var e=i(),t=s(fs);if(t){if(u(),!s(ps))return a("property missing ':'");var n=s(hs),r=e({type:"declaration",property:ys(t[0].replace(cs,vs)),value:n?ys(n[0].replace(cs,vs)):vs});return s(gs),r}}return l.prototype.content=e,A(),function(){var e,t=[];for(c(t);e=d();)!1!==e&&(t.push(e),c(t));return t}()});var ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.camelCase=void 0;var xs=/^--[a-zA-Z0-9_-]+$/,Es=/-([a-z])/g,Ps=/^[^-]+$/,Cs=/^-(webkit|moz|ms|o|khtml)-/,Ss=/^-(ms)-/,Ds=function(e,t){return t.toUpperCase()},Bs=function(e,t){return"".concat(t,"-")};ks.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Ps.test(e)||xs.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Ss,Bs):e.replace(Cs,Bs)).replace(Es,Ds))};var Is=(as&&as.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(As),Ts=ks;function Qs(e,t){var n={};return e&&"string"==typeof e?((0,Is.default)(e,function(e,r){e&&r&&(n[(0,Ts.camelCase)(e,t)]=r)}),n):n}Qs.default=Qs;var Ms=ss(Qs);const Os=Ns("end"),Ls=Ns("start");function Ns(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function Rs(e){return e&&"object"==typeof e?"position"in e||"type"in e?Fs(e.position):"start"in e||"end"in e?Fs(e):"line"in e||"column"in e?Hs(e):"":""}function Hs(e){return zs(e&&e.line)+":"+zs(e&&e.column)}function Fs(e){return Hs(e&&e.start)+"-"+Hs(e&&e.end)}function zs(e){return e&&"number"==typeof e?e:1}class js extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const l=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Rs(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}js.prototype.file="",js.prototype.name="",js.prototype.reason="",js.prototype.message="",js.prototype.stack="",js.prototype.column=void 0,js.prototype.line=void 0,js.prototype.ancestors=void 0,js.prototype.cause=void 0,js.prototype.fatal=void 0,js.prototype.place=void 0,js.prototype.ruleId=void 0,js.prototype.source=void 0;const Us={}.hasOwnProperty,_s=new Map,qs=/[A-Z]/g,Vs=new Set(["table","tbody","thead","tfoot","tr"]),Gs=new Set(["td","th"]),Ws="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ys(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const l=Array.isArray(o.children),a=Ls(n);return t(r,o,i,l,{columnNumber:a?a.column-1:void 0,fileName:e,lineNumber:a?a.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const l=Array.isArray(o.children)?n:t;return i?l(r,o,i):l(r,o)}}(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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?ls:is,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Ks(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ks(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=ls,e.schema=o);e.ancestors.push(t);const i=eA(e,t.tagName,!1),l=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&Us.call(t.properties,o)){const i=$s(e,o,t.properties[o]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof l&&Gs.has(t.tagName)?r=l:n[o]=l}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Zs(e,t);Vs.has(t.tagName)&&(a=a.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Ca(t.value):Ca(t));var t}));return Xs(e,l,i,t),Js(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}tA(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=ls,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:eA(e,t.name,!0),l=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];ya(t.type);const o=t.expression;ya(o.type);const i=o.properties[0];ya(i.type),Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else tA(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];ya(t.type),i=e.evaluater.evaluateExpression(t.expression)}else tA(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=Zs(e,t);return Xs(e,l,i,t),Js(l,a),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tA(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Js(r,Zs(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Xs(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Js(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zs(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_s;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;l=e+"-"+t,o.set(e,t+1)}}const a=Ks(e,i,l);void 0!==a&&n.push(a)}return n}function $s(e,t,n){const r=function(e,t){const n=Ba(t);let r=t,o=Ia;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ns.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ts,os);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ts.test(e)){let n=e.replace(es,rs);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Ua}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Ms(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new js("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ws+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Us.call(e,n)&&(t[nA(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?$a[r.property]||r.property:r.attribute,n]}}function eA(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=Ea(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=Ea(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Us.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tA(e)}function tA(e,t){const n=new js("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=Ws+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nA(e){let t=e.replace(qs,rA);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function rA(e){return"-"+e.toLowerCase()}const oA={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"]},iA={};function lA(e,t){return aA(e,"boolean"!=typeof iA.includeImageAlt||iA.includeImageAlt,"boolean"!=typeof iA.includeHtml||iA.includeHtml)}function aA(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return sA(e.children,t,n)}return Array.isArray(e)?sA(e,t,n):""}function sA(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=aA(e[o],t,n);return r.join("")}const AA=document.createElement("i");function cA(e){const t="&"+e+";";AA.innerHTML=t;const n=AA.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function uA(e,t,n,r){const o=e.length;let i,l=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);l<r.length;)i=r.slice(l,l+1e4),i.unshift(t,0),e.splice(...i),l+=1e4,t+=1e4}function dA(e,t){return e.length>0?(uA(e,e.length,0,t),e):t}const fA={}.hasOwnProperty;function pA(e){const t={};let n=-1;for(;++n<e.length;)hA(t,e[n]);return t}function hA(e,t){let n;for(n in t){const r=(fA.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){fA.call(r,i)||(r[i]=[]);const e=o[i];gA(r[i],Array.isArray(e)?e:e?[e]:[])}}}function gA(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);uA(e,0,0,r)}function mA(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"οΏ½":String.fromCodePoint(n)}function vA(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yA=TA(/[A-Za-z]/),wA=TA(/[\dA-Za-z]/),bA=TA(/[#-'*+\--9=?A-Z^-~]/);function kA(e){return null!==e&&(e<32||127===e)}const xA=TA(/\d/),EA=TA(/[\dA-Fa-f]/),PA=TA(/[!-/:-@[-`{-~]/);function CA(e){return null!==e&&e<-2}function SA(e){return null!==e&&(e<0||32===e)}function DA(e){return-2===e||-1===e||32===e}const BA=TA(/\p{P}|\p{S}/u),IA=TA(/\s/);function TA(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function QA(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(37===i&&wA(e.charCodeAt(n+1))&&wA(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(l=String.fromCharCode(i,t),o=1):l="οΏ½"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function MA(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(DA(r))return e.enter(n),l(r);return t(r)};function l(r){return DA(r)&&i++<o?(e.consume(r),l):(e.exit(n),t(r))}}const OA={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),MA(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):CA(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const LA={tokenize:function(e){const t=this,n=[];let r,o,i,l=0;return a;function a(r){if(l<n.length){const o=n[l];return t.containerState=o[1],e.attempt(o[0].continuation,s,A)(r)}return A(r)}function s(e){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}m(l);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return uA(t.events,i+1,0,t.events.slice(n)),t.events.length=a,A(e)}return a(e)}function A(o){if(l===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return p(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(NA,c,u)(o)}function c(e){return r&&v(),m(l),d(e)}function u(e){return t.parser.lazy[t.now().line]=l!==n.length,i=t.now().offset,p(e)}function d(n){return t.containerState={},e.attempt(NA,f,p)(n)}function f(e){return l++,n.push([t.currentConstruct,t.containerState]),d(e)}function p(n){return null===n?(r&&v(),m(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),h(n))}function h(n){return null===n?(g(e.exit("chunkFlow"),!0),m(0),void e.consume(n)):CA(n)?(e.consume(n),g(e.exit("chunkFlow")),l=0,t.interrupt=void 0,a):(e.consume(n),h)}function g(e,n){const a=t.sliceStream(e);if(n&&a.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(a),t.parser.lazy[e.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 n=t.events.length;let o,a,s=n;for(;s--;)if("exit"===t.events[s][0]&&"chunkFlow"===t.events[s][1].type){if(o){a=t.events[s][1].end;break}o=!0}for(m(l),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;uA(t.events,s+1,0,t.events.slice(n)),t.events.length=e}}function m(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},NA={tokenize:function(e,t,n){return MA(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function RA(e){return null===e||SA(e)||IA(e)?1:BA(e)?2:void 0}function HA(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 FA={name:"attention",resolveAll:function(e,t){let n,r,o,i,l,a,s,A,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close)for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&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 u={...e[n][1].end},d={...e[c][1].start};zA(u,-a),zA(d,a),i={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},l={type:a>1?"strongSequence":"emphasisSequence",start:{...e[c][1].start},end:d},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:{...l.end}},e[n][1].end={...i.start},e[c][1].start={...l.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=dA(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=dA(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=dA(s,HA(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=dA(s,[["exit",o,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(A=2,s=dA(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):A=0,uA(e,n-1,c-n+3,s),c=n+s.length-A-2;break}c=-1;for(;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=RA(r);let i;return function(t){return i=t,e.enter("attentionSequence"),l(t)};function l(a){if(a===i)return e.consume(a),l;const s=e.exit("attentionSequence"),A=RA(a),c=!A||2===A&&o||n.includes(a),u=!o||2===o&&A||n.includes(r);return s._open=Boolean(42===i?c:c&&(o||!u)),s._close=Boolean(42===i?u:u&&(A||!c)),t(a)}}};function zA(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jA={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return yA(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||wA(e)?(r=1,l(e)):s(e)}function l(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||wA(t))&&r++<32?(e.consume(t),l):(r=0,s(t))}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||kA(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),A):bA(t)?(e.consume(t),s):n(t)}function A(e){return wA(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,A):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):u(n)}function u(t){if((45===t||wA(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const UA={partial:!0,tokenize:function(e,t,n){return function(t){return DA(t)?MA(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||CA(e)?t(e):n(e)}}};const _A={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(DA(t))return MA(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(_A,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return DA(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const qA={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return PA(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const VA={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,l=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),a};function a(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,i=wA,A(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=EA,A):(e.enter("characterReferenceValue"),o=7,i=xA,A(t))}function A(a){if(59===a&&l){const o=e.exit("characterReferenceValue");return i!==wA||cA(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&l++<o?(e.consume(a),A):n(a)}}};const GA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},WA={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return l;function l(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),DA(t)?MA(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),DA(t)?MA(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||CA(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,l=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return l=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===i?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),DA(t)?MA(e,A,"whitespace")(t):A(t))}function A(n){return null===n||CA(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(GA,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||CA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),A(t)):DA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),MA(e,u,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function u(t){return null===t||CA(t)?A(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||CA(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),A(t)):96===t&&t===i?n(t):(e.consume(t),d)}function f(t){return e.attempt(o,v,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return l>0&&DA(t)?MA(e,g,"linePrefix",l+1)(t):g(t)}function g(t){return null===t||CA(t)?e.check(GA,f,v)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||CA(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function v(n){return e.exit("codeFenced"),t(n)}}};const YA={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),MA(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?a(t):CA(t)?e.attempt(KA,i,a)(t):(e.enter("codeFlowValue"),l(t))}function l(t){return null===t||CA(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),l)}function a(n){return e.exit("codeIndented"),t(n)}}},KA={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):MA(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):CA(e)?o(e):n(e)}}};const XA={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(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(t){return e.enter("codeText"),e.enter("codeTextSequence"),l(t)};function l(t){return 96===t?(e.consume(t),i++,l):(e.exit("codeTextSequence"),a(t))}function a(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),a):96===t?(o=e.enter("codeTextSequence"),r=0,A(t)):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):(e.enter("codeTextData"),s(t))}function s(t){return null===t||32===t||96===t||CA(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function A(n){return 96===n?(e.consume(n),r++,A):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class JA{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&ZA(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),ZA(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ZA(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);ZA(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);ZA(this.left,t.reverse())}}}function ZA(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 $A(e){const t={};let n,r,o,i,l,a,s,A=-1;const c=new JA(e);for(;++A<c.length;){for(;A in t;)A=t[A];if(n=c.get(A),A&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(A-1)[1].type&&(a=n[1]._tokenizer.events,o=0,o<a.length&&"lineEndingBlank"===a[o][1].type&&(o+=2),o<a.length&&"content"===a[o][1].type))for(;++o<a.length&&"content"!==a[o][1].type;)"chunkText"===a[o][1].type&&(a[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,ec(c,A)),A=t[A],s=!0);else if(n[1]._container){for(o=A,r=void 0;o--;)if(i=c.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...c.get(r)[1].start},l=c.slice(r,A),l.unshift(n),c.splice(r,A-r+1,l))}}return uA(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function ec(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,s=[],A={};let c,u,d=-1,f=n,p=0,h=0;const g=[h];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),u&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),u=f,f=f.next}for(f=n;++d<a.length;)"exit"===a[d][0]&&"enter"===a[d-1][0]&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(h=d+1,g.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=i.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)A[p+s[d][0]]=p+s[d][1],p+=s[d][1]-s[d][0]-1;return A}const tc={resolve:function(e){return $A(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):CA(t)?e.check(nc,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},nc={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),MA(e,o,"linePrefix")};function o(o){if(null===o||CA(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function rc(e,t,n,r,o,i,l,a,s){const A=s||Number.POSITIVE_INFINITY;let c=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),u;if(null===t||32===t||41===t||kA(t))return n(t);return e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),p(t)};function u(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),d(n))}function d(t){return 62===t?(e.exit("chunkString"),e.exit(a),u(t)):null===t||60===t||CA(t)?n(t):(e.consume(t),92===t?f:d)}function f(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function p(o){return c||null!==o&&41!==o&&!SA(o)?c<A&&40===o?(e.consume(o),c++,p):41===o?(e.consume(o),c--,p):null===o||32===o||40===o||kA(o)?n(o):(e.consume(o),92===o?h:p):(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function oc(e,t,n,r,o,i){const l=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),A};function A(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(u):93===u?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):CA(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),A):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||CA(t)||s++>999?(e.exit("chunkString"),A(t)):(e.consume(t),a||(a=!DA(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function ic(e,t,n,r,o,i){let l;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),l=40===t?41:t,a;return n(t)};function a(n){return n===l?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===l?(e.exit(i),a(l)):null===t?n(t):CA(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),MA(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),A(t))}function A(t){return t===l||null===t||CA(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return t===l||92===t?(e.consume(t),A):A(t)}}function lc(e,t){let n;return function r(o){if(CA(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(DA(o))return MA(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const ac={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return oc.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=vA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),l):n(t)}function l(t){return SA(t)?lc(e,a)(t):a(t)}function a(t){return rc(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(sc,A,A)(t)}function A(t){return DA(t)?MA(e,c,"whitespace")(t):c(t)}function c(i){return null===i||CA(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},sc={partial:!0,tokenize:function(e,t,n){return function(t){return SA(t)?lc(e,r)(t):n(t)};function r(t){return ic(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return DA(t)?MA(e,i,"whitespace")(t):i(t)}function i(e){return null===e||CA(e)?t(e):n(e)}}};const Ac={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return CA(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const cc={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(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"},uA(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||SA(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),l(n)):null===n||CA(n)?(e.exit("atxHeading"),t(n)):DA(n)?MA(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function l(t){return 35===t?(e.consume(t),l):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||SA(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}}};const uc=["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"],dc=["pre","script","style","textarea"],fc={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,l,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),A}(t)};function A(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),o=3,r.interrupt?t:O):yA(a)?(e.consume(a),l=String.fromCharCode(a),p):n(a)}function c(i){return 45===i?(e.consume(i),o=2,u):91===i?(e.consume(i),o=5,a=0,d):yA(i)?(e.consume(i),o=4,r.interrupt?t:O):n(i)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const i="CDATA[";return o===i.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:C:d):n(o)}function f(t){return yA(t)?(e.consume(t),l=String.fromCharCode(t),p):n(t)}function p(a){if(null===a||47===a||62===a||SA(a)){const s=47===a,A=l.toLowerCase();return s||i||!dc.includes(A)?uc.includes(l.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):C(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):m(a)):(o=1,r.interrupt?t(a):C(a))}return 45===a||wA(a)?(e.consume(a),l+=String.fromCharCode(a),p):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:C):n(o)}function g(t){return DA(t)?(e.consume(t),g):E(t)}function m(t){return 47===t?(e.consume(t),E):58===t||95===t||yA(t)?(e.consume(t),v):DA(t)?(e.consume(t),m):E(t)}function v(t){return 45===t||46===t||58===t||95===t||wA(t)?(e.consume(t),v):y(t)}function y(t){return 61===t?(e.consume(t),w):DA(t)?(e.consume(t),y):m(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,b):DA(t)?(e.consume(t),w):k(t)}function b(t){return t===s?(e.consume(t),s=null,x):null===t||CA(t)?n(t):(e.consume(t),b)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||SA(t)?y(t):(e.consume(t),k)}function x(e){return 47===e||62===e||DA(e)?m(e):n(e)}function E(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||CA(t)?C(t):DA(t)?(e.consume(t),P):n(t)}function C(t){return 45===t&&2===o?(e.consume(t),I):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),L):63===t&&3===o?(e.consume(t),O):93===t&&5===o?(e.consume(t),M):!CA(t)||6!==o&&7!==o?null===t||CA(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(pc,N,S)(t))}function S(t){return e.check(hc,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),B}function B(t){return null===t||CA(t)?S(t):(e.enter("htmlFlowData"),C(t))}function I(t){return 45===t?(e.consume(t),O):C(t)}function T(t){return 47===t?(e.consume(t),l="",Q):C(t)}function Q(t){if(62===t){const n=l.toLowerCase();return dc.includes(n)?(e.consume(t),L):C(t)}return yA(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),Q):C(t)}function M(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):C(t)}function L(t){return null===t||CA(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},pc={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(UA,t,n)}}},hc={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(CA(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const gc={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,l;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),a};function a(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),w):63===t?(e.consume(t),v):yA(t)?(e.consume(t),x):n(t)}function s(t){return 45===t?(e.consume(t),A):91===t?(e.consume(t),i=0,f):yA(t)?(e.consume(t),m):n(t)}function A(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):CA(t)?(l=c,Q(t)):(e.consume(t),c)}function u(t){return 45===t?(e.consume(t),d):c(t)}function d(e){return 62===e?T(e):45===e?u(e):c(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),h):CA(t)?(l=p,Q(t)):(e.consume(t),p)}function h(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):p(t)}function m(t){return null===t||62===t?T(t):CA(t)?(l=m,Q(t)):(e.consume(t),m)}function v(t){return null===t?n(t):63===t?(e.consume(t),y):CA(t)?(l=v,Q(t)):(e.consume(t),v)}function y(e){return 62===e?T(e):v(e)}function w(t){return yA(t)?(e.consume(t),b):n(t)}function b(t){return 45===t||wA(t)?(e.consume(t),b):k(t)}function k(t){return CA(t)?(l=k,Q(t)):DA(t)?(e.consume(t),k):T(t)}function x(t){return 45===t||wA(t)?(e.consume(t),x):47===t||62===t||SA(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),T):58===t||95===t||yA(t)?(e.consume(t),P):CA(t)?(l=E,Q(t)):DA(t)?(e.consume(t),E):T(t)}function P(t){return 45===t||46===t||58===t||95===t||wA(t)?(e.consume(t),P):C(t)}function C(t){return 61===t?(e.consume(t),S):CA(t)?(l=C,Q(t)):DA(t)?(e.consume(t),C):E(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):CA(t)?(l=S,Q(t)):DA(t)?(e.consume(t),S):(e.consume(t),B)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):CA(t)?(l=D,Q(t)):(e.consume(t),D)}function B(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||SA(t)?E(t):(e.consume(t),B)}function I(e){return 47===e||62===e||SA(e)?E(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function Q(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return DA(t)?MA(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),l(t)}}};const mc={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&uA(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,l=e.length,a=0;for(;l--;)if(n=e[l][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[l][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[l][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=l,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=l);const s={type:"labelLink"===e[r][1].type?"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",s,t],["enter",A,t]],i=dA(i,e.slice(r+1,r+a+3)),i=dA(i,[["enter",c,t]]),i=dA(i,HA(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=dA(i,[["exit",c,t],e[o-2],e[o-1],["exit",A,t]]),i=dA(i,e.slice(o+1)),i=dA(i,[["exit",s,t]]),uA(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,l=r.events.length;for(;l--;)if(("labelImage"===r.events[l][1].type||"labelLink"===r.events[l][1].type)&&!r.events[l][1]._balanced){o=r.events[l][1];break}return function(t){if(!o)return n(t);if(o._inactive)return c(t);return i=r.parser.defined.includes(vA(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),a};function a(t){return 40===t?e.attempt(vc,A,i?A:c)(t):91===t?e.attempt(yc,A,i?s:c)(t):i?A(t):c(t)}function s(t){return e.attempt(wc,A,c)(t)}function A(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},vc={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return SA(t)?lc(e,o)(t):o(t)}function o(t){return 41===t?A(t):rc(e,i,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return SA(t)?lc(e,a)(t):A(t)}function l(e){return n(e)}function a(t){return 34===t||39===t||40===t?ic(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):A(t)}function s(t){return SA(t)?lc(e,A)(t):A(t)}function A(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},yc={tokenize:function(e,t,n){const r=this;return function(t){return oc.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(vA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},wc={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const bc={name:"labelStartImage",resolveAll:mc.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const kc={name:"labelStartLink",resolveAll:mc.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const xc={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),MA(e,t,"linePrefix")}}};const Ec={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),l(i)):o>=3&&(null===i||CA(i))?(e.exit("thematicBreak"),t(i)):n(i)}function l(t){return t===r?(e.consume(t),o++,l):(e.exit("thematicBreakSequence"),DA(t)?MA(e,i,"whitespace")(t):i(t))}}};const Pc={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(UA,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,MA(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!DA(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Sc,t,l)(n))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,MA(e,e.attempt(Pc,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},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&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,l=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:xA(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(Ec,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),a(t)}return n(t)};function a(t){return xA(t)&&++l<10?(e.consume(t),a):(!r.interrupt||l<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),s(t)):n(t)}function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(UA,r.interrupt?n:A,e.attempt(Cc,u,c))}function A(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return DA(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Cc={partial:!0,tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return!DA(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Sc={partial:!0,tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const Dc={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const l={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",l,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=l;return e.push(["exit",l,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let l,a=r.events.length;for(;a--;)if("lineEnding"!==r.events[a][1].type&&"linePrefix"!==r.events[a][1].type&&"content"!==r.events[a][1].type){l="paragraph"===r.events[a][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||l))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),DA(t)?MA(e,l,"lineSuffix")(t):l(t))}function l(r){return null===r||CA(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const Bc={tokenize:function(e){const t=this,n=e.attempt(UA,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,MA(e,e.attempt(this.parser.constructs.flow,r,e.attempt(tc,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const Ic={resolveAll:Oc()},Tc=Mc("string"),Qc=Mc("text");function Mc(e){return{resolveAll:Oc("text"===e?Lc:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,l);return i;function i(e){return s(e)?o(e):l(e)}function l(e){if(null!==e)return t.enter("data"),t.consume(e),a;t.consume(e)}function a(e){return s(e)?(t.exit("data"),o(e)):(t.consume(e),a)}function s(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Oc(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(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 Lc(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,l=o.length,a=-1,s=0;for(;l--;){const e=o[l];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)i=!0,s++;else if(-1!==e){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:r.start._bufferIndex+a,_index:r.start._index+l,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const Nc={42:Pc,43:Pc,45:Pc,48:Pc,49:Pc,50:Pc,51:Pc,52:Pc,53:Pc,54:Pc,55:Pc,56:Pc,57:Pc,62:_A},Rc={91:ac},Hc={[-2]:YA,[-1]:YA,32:YA},Fc={35:cc,42:Ec,45:[Dc,Ec],60:fc,61:Dc,95:Ec,96:WA,126:WA},zc={38:VA,92:qA},jc={[-5]:xc,[-4]:xc,[-3]:xc,33:bc,38:VA,42:FA,60:[jA,gc],91:kc,92:[Ac,qA],93:mc,95:FA,96:XA},Uc={null:[FA,Ic]};var _c=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:Rc,disable:{null:[]},document:Nc,flow:Fc,flowInitial:Hc,insideSpan:Uc,string:zc,text:jc});function qc(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 l=[],a=[];const s={attempt:g(function(e,t){m(e,t.from)}),check:g(h),consume:function(e){CA(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,v()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++));A.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),A.events.push(["enter",n,A]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),A.events.push(["exit",t,A]),t},interrupt:g(h,{interrupt:!0})},A={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,v()},events:[],now:d,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let l;if("string"==typeof i)l=i;else switch(i){case-5:l="\r";break;case-4:l="\n";break;case-3:l="\r\n";break;case-2:l=t?" ":"\t";break;case-1:if(!t&&o)continue;l=" ";break;default:l=String.fromCharCode(i)}o=-2===i,r.push(l)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){if(l=dA(l,e),f(),null!==l[l.length-1])return[];return m(t,0),A.events=HA(i,A.events,A),A.events}};let c=t.tokenize.call(A,s);return t.resolveAll&&i.push(t),A;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(r,i)];else{if(l=e.slice(n,o),r>-1){const e=l[0];"string"==typeof e?l[0]=e.slice(r):l.shift()}i>0&&l.push(e[o].slice(0,i))}return l}(l,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function f(){let e;for(;r._index<l.length;){const t=l[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)p(t.charCodeAt(r._bufferIndex));else p(t)}}function p(e){c=c(e)}function h(e,t){t.restore()}function g(e,t){return function(n,o,i){let l,c,u,f;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return l=e,c=0,0===e.length?i:h(e[c])}function h(e){return function(n){f=function(){const e=d(),t=A.previous,n=A.currentConstruct,o=A.events.length,i=Array.from(a);return{from:o,restore:l};function l(){r=e,A.previous=t,A.currentConstruct=n,A.events.length=o,a=i,v()}}(),u=e,e.partial||(A.currentConstruct=e);if(e.name&&A.parser.constructs.disable.null.includes(e.name))return m();return e.tokenize.call(t?Object.assign(Object.create(A),t):A,s,g,m)(n)}}function g(t){return e(u,f),o}function m(e){return f.restore(),++c<l.length?h(l[c]):i}}}function m(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&uA(A.events,t,A.events.length-t,e.resolve(A.events.slice(t),A)),e.resolveTo&&(A.events=e.resolveTo(A.events,A))}function v(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Vc=/[\0\t\n\r]/g;const Gc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Wc(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return mA(n.slice(t?2:1),t?16:10)}return cA(n)||e}const Yc={}.hasOwnProperty;function Kc(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(J),blockQuote:i(G),characterEscape:P,characterReference:P,codeFenced:i(W),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(W,l),codeText:i(Y,l),codeTextData:P,data:P,codeFlowValue:P,definition:i(K),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(X),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i($,l),htmlFlowData:P,htmlText:i($,l),htmlTextData:P,image:i(ee),label:l,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,u),listUnordered:i(ne),paragraph:i(oe),reference:F,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(J),strong:i(ie),thematicBreak:i(ae)},exit:{atxHeading:s(),atxHeadingSequence:b,autolink:s(),autolinkEmail:V,autolinkProtocol:q,blockQuote:s(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:j,characterReferenceMarkerNumeric:j,characterReferenceValue:U,characterReference:_,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:s(m),codeText:s(T),codeTextData:C,data:C,definition:s(),definitionDestinationString:w,definitionLabelString:v,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(B),htmlFlowData:C,htmlText:s(I),htmlTextData:C,image:s(M),label:L,labelText:O,lineEnding:S,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:z,resourceDestinationString:N,resourceTitleString:R,resource:H,setextHeading:s(E),setextHeadingLineSequence:x,setextHeadingText:k,strong:s(),thematicBreak:s()}};Jc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:a,exit:A,buffer:l,resume:c,data:n},s=[];let u=-1;for(;++u<e.length;)if("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)if("enter"===e[u][0])s.push(u);else{u=o(e,s.pop(),u)}for(u=-1;++u<e.length;){const n=t[e[u][0]];Yc.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},i),e[u][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||$c).call(i,void 0,e[0])}for(r.position={start:Xc(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Xc(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r}function o(e,t,n){let r,o,i,l,a=t-1,s=-1,A=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,l=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||l||s||i||(i=a),l=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:l=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let l=a;for(o=void 0;l--;){const t=e[l];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",A=!0),t[1].type="lineEnding",o=l}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||a,0,["exit",r,t[2]]),a++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(a,0,["enter",o,t[2]]),a++,n++,i=void 0,l=!0}}}return e[t][1]._spread=A,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function l(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Xc(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),A.call(this,t)}}function A(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||$c).call(this,e,r[0])}n.position.end=Xc(e.end)}function c(){return lA(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function p(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=vA(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function b(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function x(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function P(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=le(),n.position={start:Xc(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Xc(e.end)}function S(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Xc(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),C.call(this,e))}function D(){this.data.atHardBreak=!0}function B(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function Q(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function O(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Gc,Wc)}(t),n.identifier=vA(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function N(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function H(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function z(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function j(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=mA(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=cA(t)}this.stack[this.stack.length-1].value+=r}function _(e){this.stack.pop().position.end=Xc(e.end)}function q(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function V(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function G(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Z(){return{type:"break"}}function $(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function le(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!$A(e););return e}(function(e){const t={constructs:pA([_c,...(e||{}).extensions||[]]),content:n(OA),defined:[],document:n(LA),flow:n(Bc),lazy:{},string:n(Tc),text:n(Qc)};return t;function n(e){return function(n){return qc(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,l){const a=[];let s,A,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(Vc.lastIndex=c,s=Vc.exec(o),u=s&&void 0!==s.index?s.index:o.length,d=o.charCodeAt(u),!s){n=o.slice(c);break}if(10===d&&c===u&&e)a.push(-3),e=void 0;else switch(e&&(a.push(-5),e=void 0),c<u&&(a.push(o.slice(c,u)),t+=u-c),d){case 0:a.push(65533),t++;break;case 9:for(A=4*Math.ceil(t/4),a.push(-2);t++<A;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return l&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Xc(e){return{line:e.line,column:e.column,offset:e.offset}}function Jc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jc(e,r):Zc(e,r)}}function Zc(e,t){let n;for(n in t)if(Yc.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 $c(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Rs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Rs({start:t.start,end:t.end})+") is still open")}function eu(e){const t=this;t.parser=function(n){return Kc(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tu(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&"text"===l.type?l.value+=r:o.push({type:"text",value:r}),o}function nu(e){const t=e.spread;return null==t?e.children.length>1:t}function ru(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(ou(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(ou(t.slice(o),o>0,!1)),i.join("")}function ou(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const iu={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:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",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="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=QA(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,a+=1,e.footnoteCounts.set(r,a);const s={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(l)}]};e.patch(t,s);const A={type:"element",tagName:"sup",properties:{},children:[s]};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 tu(e,t);const o={src:QA(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(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:QA(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(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 tu(e,t);const o={href:QA(r.url||"")};null!==r.title&&void 0!==r.title&&(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:QA(t.url)};null!==t.title&&void 0!==t.title&&(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(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=nu(n[r])}return t}(n):nu(t),i={},l=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.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 e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&l.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?l.push(e):l.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&l.push({type:"text",value:"\n"});const A={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,A),e.applyData(t,A)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.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 n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=Ls(t.children[1]),l=Os(t.children[t.children.length-1]);i&&l&&(r.position={start:i,end:l}),o.push(r)}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=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,l=i?i.length:t.children.length;let a=-1;const s=[];for(;++a<l;){const n=t.children[a],r={},l=i?i[a]:void 0;l&&(r.align=l);let A={type:"element",tagName:o,properties:r,children:[]};n&&(A.children=e.all(n),e.patch(n,A),A=e.applyData(n,A)),s.push(A)}const A={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,A),e.applyData(t,A)},text:function(e,t){const n={type:"text",value:ru(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:lu,yaml:lu,definition:lu,footnoteDefinition:lu};function lu(){}const au="object"==typeof self?self:globalThis,su=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,l]=t[o];switch(i){case 0:case-1:return n(l,o);case 1:{const e=n([],o);for(const t of l)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of l)e[r(t)]=r(n);return e}case 3:return n(new Date(l),o);case 4:{const{source:e,flags:t}=l;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of l)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of l)e.add(r(t));return e}case 7:{const{name:e,message:t}=l;return n(new au[e](t),o)}case 8:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:e}=new Uint8Array(l);return n(new DataView(e),l)}}return n(new au[i](l),o)};return r})(new Map,e)(0),Au="",{toString:cu}={},{keys:uu}=Object,du=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=cu.call(e).slice(8,-1);switch(n){case"Array":return[1,Au];case"Object":return[2,Au];case"Date":return[3,Au];case"RegExp":return[4,Au];case"Map":return[5,Au];case"Set":return[6,Au];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},fu=([e,t])=>0===e&&("function"===t||"symbol"===t),pu=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[l,a]=du(r);switch(l){case 0:{let t=r;switch(a){case"bigint":l=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+a);t=null;break;case"undefined":return o([-1],r)}return o([l,t],r)}case 1:{if(a){let e=r;return"DataView"===a?e=new Uint8Array(r.buffer):"ArrayBuffer"===a&&(e=new Uint8Array(r)),o([a,[...e]],r)}const e=[],t=o([l,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(a)switch(a){case"BigInt":return o([a,r.toString()],r);case"Boolean":case"Number":case"String":return o([a,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],s=o([l,n],r);for(const t of uu(r))!e&&fu(du(r[t]))||n.push([i(t),i(r[t])]);return s}case 3:return o([l,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([l,{source:e,flags:t}],r)}case 5:{const t=[],n=o([l,t],r);for(const[n,o]of r)(e||!fu(du(n))&&!fu(du(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([l,t],r);for(const n of r)!e&&fu(du(n))||t.push(i(n));return n}}const{message:s}=r;return o([l,{name:a,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var hu="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?su(pu(e,t)):structuredClone(e):(e,t)=>su(pu(e,t));function gu(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 mu(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const vu=function(e){if(null==e)return wu;if("function"==typeof e)return yu(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=vu(e[n]);return yu(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return yu(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return yu(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function yu(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function wu(){return!0}const bu=[],ku=!0,xu=!1;function Eu(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=vu(o),l=r?-1:1;!function e(o,a,s){const A=o&&"object"==typeof o?o:{};if("string"==typeof A.type){const e="string"==typeof A.tagName?A.tagName:"string"==typeof A.name?A.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let A,c,u,d=bu;if((!t||i(o,a,s[s.length-1]||void 0))&&(d=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[ku,e];return null==e?bu:[e]}(n(o,s)),d[0]===xu))return d;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==d[0])for(c=(r?t.children.length:-1)+l,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(A=e(n,c,u)(),A[0]===xu)return A;c="number"==typeof A[1]?A[1]:c+l}}return d}}(e,void 0,[])()}function Pu(e,t,n,r){let o,i,l;"function"==typeof t&&"function"!=typeof n?(i=void 0,l=t,o=n):(i=t,l=n,o=r),Eu(e,i,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return l(e,r,n)},o)}const Cu={}.hasOwnProperty,Su={};function Du(e,t){e.position&&(t.position=function(e){const t=Ls(e),n=Os(e);if(t&&n)return{start:t,end:n}}(e))}function Bu(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,hu(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Iu(e,t){const n=t.data||{},r=!("value"in t)||Cu.call(n,"hProperties")||Cu.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 Tu(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Qu(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Mu(e,t){const n=function(e,t){const n=t||Su,r=new Map,o=new Map,i=new Map,l={...iu,...n.handlers},a={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=a.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=Qu(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=Qu(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Bu,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:l,one:function(e,t){const n=e.type,r=a.handlers[n];if(Cu.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=hu(n);return r.children=a.all(e),r}return hu(e)}return(a.options.unknownHandler||Iu)(a,e,t)},options:n,patch:Du,wrap:Tu};return Pu(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||gu,r=e.options.footnoteBackLabel||mu,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let s=-1;for(;++s<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[s]);if(!o)continue;const i=e.all(o),l=String(o.identifier).toUpperCase(),A=QA(l.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(l);for(;void 0!==d&&++c<=d;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+A+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=i[i.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else i.push(...u);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+A},children:e.wrap(i,!0)};e.patch(o,p),a.push(p)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...hu(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function Ou(e,t){return e&&"run"in e?async function(n,r){const o=Mu(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Mu(n,{file:r,...e||t})}}function Lu(e){if(e)throw e}var Nu=Object.prototype.hasOwnProperty,Ru=Object.prototype.toString,Hu=Object.defineProperty,Fu=Object.getOwnPropertyDescriptor,zu=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ru.call(e)},ju=function(e){if(!e||"[object Object]"!==Ru.call(e))return!1;var t,n=Nu.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Nu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Nu.call(e,t)},Uu=function(e,t){Hu&&"__proto__"===t.name?Hu(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},_u=function(e,t){if("__proto__"===t){if(!Nu.call(e,t))return;if(Fu)return Fu(e,t).value}return e[t]},qu=function e(){var t,n,r,o,i,l,a=arguments[0],s=1,A=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},s=2),(null==a||"object"!=typeof a&&"function"!=typeof a)&&(a={});s<A;++s)if(null!=(t=arguments[s]))for(n in t)r=_u(a,n),a!==(o=_u(t,n))&&(c&&o&&(ju(o)||(i=zu(o)))?(i?(i=!1,l=r&&zu(r)?r:[]):l=r&&ju(r)?r:{},Uu(a,{name:n,newValue:e(c,l,o)})):void 0!==o&&Uu(a,{name:n,newValue:o}));return a},Vu=ss(qu);function Gu(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Wu(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...l){const a=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)null!==l[s]&&void 0!==l[s]||(l[s]=t[s]);t=l,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let l;r&&t.push(o);try{l=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(l&&l.then&&"function"==typeof l.then?l.then(i,o):l instanceof Error?o(l):i(l))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(a,o)(...l):r(null,...l)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Yu={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ku(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){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 l=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else l<0&&(n=!0,l=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=l));r===o?o=l:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(Ku(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Ku(e);let t,n=e.length,r=-1,o=0,i=-1,l=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?i<0?i=n:1!==l&&(l=1):i>-1&&(l=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===l||1===l&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ku(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ku(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,l=-1,a=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else{if(47===n)break;n=47}if(47===n){if(l===s-1||1===a);else if(l!==s-1&&2===a){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),l=s,a=0;continue}}else if(o.length>0){o="",i=0,l=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(l+1,s):o=e.slice(l+1,s),i=s-l-1;l=s,a=0}else 46===n&&a>-1?a++:a=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Ku(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Xu={cwd:function(){return"/"}};function Ju(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Zu(e){if("string"==typeof e)e=new URL(e);else if(!Ju(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const $u=["history","path","basename","stem","extname","dirname"];class ed{constructor(e){let t;t=e?Ju(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Xu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<$u.length;){const e=$u[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)$u.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Yu.basename(this.path):void 0}set basename(e){nd(e,"basename"),td(e,"basename"),this.path=Yu.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Yu.dirname(this.path):void 0}set dirname(e){rd(this.basename,"dirname"),this.path=Yu.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Yu.extname(this.path):void 0}set extname(e){if(td(e,"extname"),rd(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yu.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Ju(e)&&(e=Zu(e)),nd(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Yu.basename(this.path,this.extname):void 0}set stem(e){nd(e,"stem"),td(e,"stem"),this.path=Yu.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new js(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function td(e,t){if(e&&e.includes(Yu.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yu.sep+"`")}function nd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rd(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const od=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},id={}.hasOwnProperty;class ld extends od{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=Wu()}copy(){const e=new ld;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Vu(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(cd("data",this.frozen),this.namespace[e]=t,this):id.call(this.namespace,e)&&this.namespace[e]||void 0:e?(cd("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=fd(e),n=this.parser||this.Parser;return sd("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),sd("process",this.parser||this.Parser),Ad("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=fd(e),l=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(l,i,function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var l;"string"==typeof(l=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(l)?r.value=i:r.result=i,a(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),sd("processSync",this.parser||this.Parser),Ad("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Lu(e),t=r}),dd("processSync","process",n),t}run(e,t,n){ud(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const l=fd(t);r.run(e,l,function(t,r,l){const a=r||e;t?i(t):o?o(a):n(void 0,a,l)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Lu(e),n=t,r=!0}),dd("runSync","run",r),n}stringify(e,t){this.freeze();const n=fd(t),r=this.compiler||this.Compiler;return Ad("stringify",r),ud(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(cd("use",this.frozen),null==e);else if("function"==typeof e)a(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?l(e):i(e)}return this;function o(e){if("function"==typeof e)a(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;a(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))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");l(e.plugins),e.settings&&(r.settings=Vu(!0,r.settings,e.settings))}function l(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function a(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const l=n[o][1];Gu(l)&&Gu(r)&&(r=Vu(!0,l,r)),n[o]=[e,r,...i]}}}}const ad=(new ld).freeze();function sd(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Ad(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function cd(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 ud(e){if(!Gu(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function dd(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fd(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new ed(e)}const pd=[],hd={allowDangerousHtml:!0},gd=/^(https?|ircs?|mailto|xmpp)$/i,md=[{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 vd(e){const t=function(e){const t=e.rehypePlugins||pd,n=e.remarkPlugins||pd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...hd}:hd,o=ad().use(eu).use(n).use(Ou,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new ed;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,l=t.skipHtml,a=t.unwrapDisallowed,s=t.urlTransform||yd;for(const e of md)Object.hasOwn(t,e.from)&&wa((e.from,e.to&&e.to,e.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Pu(e,A),Ys(e,{Fragment:m,components:o,ignoreInvalidStyle:!0,jsx:h,jsxs:g,passKeys:!0,passNode:!0});function A(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return l?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in oA)if(Object.hasOwn(oA,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=oA[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let l=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!l&&r&&"number"==typeof t&&(l=!r(e,t,o)),l&&o&&"number"==typeof t)return a&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function yd(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||gd.test(e.slice(0,t))?e:""}function wd(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function bd(e,t,n){const r=vu((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([kd(e[0]),xd(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)Eu(e,"text",l);function l(e,t){let n,l=-1;for(;++l<t.length;){const e=t[l],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],l=o[i][1];let a=0;const s=n.children.indexOf(e);let A=!1,c=[];r.lastIndex=0;let u=r.exec(e.value);for(;u;){const n=u.index,o={index:u.index,input:u.input,stack:[...t,e]};let i=l(...u,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(a!==n&&c.push({type:"text",value:e.value.slice(a,n)}),Array.isArray(i)?c.push(...i):i&&c.push(i),a=n+u[0].length,A=!0),!r.global)break;u=r.exec(e.value)}A?(a<e.value.length&&c.push({type:"text",value:e.value.slice(a)}),n.children.splice(s,1,...c)):c=[e];return s+c.length}(e,t)}}function kd(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function xd(e){return"function"==typeof e?e:function(){return e}}const Ed="phrasing",Pd=["autolink","link","image","label"];function Cd(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Sd(e){this.config.enter.autolinkProtocol.call(this,e)}function Dd(e){this.config.exit.autolinkProtocol.call(this,e)}function Bd(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 Id(e){this.config.exit.autolinkEmail.call(this,e)}function Td(e){this.exit(e)}function Qd(e){bd(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Md],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Od]],{ignore:["link","linkReference"]})}function Md(e,t,n,r,o){let i="";if(!Ld(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const l=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=wd(e,"(");let i=wd(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!l[0])return!1;const a={type:"link",title:null,url:i+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[a,{type:"text",value:l[1]}]:a}function Od(e,t,n,r){return!(!Ld(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Ld(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||IA(n)||BA(n))&&(!t||47!==n)}function Nd(){this.buffer()}function Rd(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Hd(){this.buffer()}function Fd(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function zd(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function jd(e){this.exit(e)}function Ud(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=vA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _d(e){this.exit(e)}function qd(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const l=n.enter("footnoteReference"),a=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),a(),l(),i+=o.move("]"),i}function Vd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let l=i.move("[^");const a=r.enter("footnoteDefinition"),s=r.enter("label");l+=i.move(r.safe(r.associationId(e),{before:l,after:"]"})),s(),l+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),l+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?Wd:Gd)));return a(),l},footnoteReference:qd},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function Gd(e,t,n){return 0===t?e:Wd(e,t,n)}function Wd(e,t,n){return(n?"":" ")+e}qd.peek=function(){return"["};const Yd=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function Kd(e){this.enter({type:"delete",children:[]},e)}function Xd(e){this.exit(e)}function Jd(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let l=o.move("~~");return l+=n.containerPhrasing(e,{...o.current(),before:l,after:"~"}),l+=o.move("~~"),i(),l}function Zd(e){return e.length}function $d(e){return null==e?"":String(e)}function ef(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function tf(e,t,n){return">"+(n?"":" ")+e}function nf(e,t){return rf(e,t.inConstruct,!0)&&!rf(e,t.notInConstruct,!1)}function rf(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function of(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&nf(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function lf(e,t,n){return(n?"":" ")+e}function af(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 sf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Af(e,t,n){const r=RA(e),o=RA(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function cf(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),l=n.createTracker(r),a=l.move(o);let s=l.move(n.containerPhrasing(e,{after:o,before:a,...l.current()}));const A=s.charCodeAt(0),c=Af(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(s=sf(A)+s.slice(1));const u=s.charCodeAt(s.length-1),d=Af(r.after.charCodeAt(0),u,o);d.inside&&(s=s.slice(0,-1)+sf(u));const f=l.move(o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},a+s+f}function uf(e){return e.value||""}function df(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.enter("image");let a=n.enter("label");const s=n.createTracker(r);let A=s.move("![");return A+=s.move(n.safe(e.alt,{before:A,after:"]",...s.current()})),A+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=s.move("<"),A+=s.move(n.safe(e.url,{before:A,after:">",...s.current()})),A+=s.move(">")):(a=n.enter("destinationRaw"),A+=s.move(n.safe(e.url,{before:A,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=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),a()),A+=s.move(")"),l(),A}function ff(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("![");const A=n.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(A+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,i(),"full"!==o&&A&&A===u?"shortcut"===o?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(u+"]"),s}function pf(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 e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function hf(e,t){const n=lA(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function gf(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.createTracker(r);let a,s;if(hf(e,n)){const t=n.stack;n.stack=[],a=n.enter("autolink");let r=l.move("<");return r+=l.move(n.containerPhrasing(e,{before:r,after:">",...l.current()})),r+=l.move(">"),a(),n.stack=t,r}a=n.enter("link"),s=n.enter("label");let A=l.move("[");return A+=l.move(n.containerPhrasing(e,{before:A,after:"](",...l.current()})),A+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),A+=l.move("<"),A+=l.move(n.safe(e.url,{before:A,after:">",...l.current()})),A+=l.move(">")):(s=n.enter("destinationRaw"),A+=l.move(n.safe(e.url,{before:A,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=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),s()),A+=l.move(")"),a(),A}function mf(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let l=n.enter("label");const a=n.createTracker(r);let s=a.move("[");const A=n.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(A+"]["),l();const c=n.stack;n.stack=[],l=n.enter("reference");const u=n.safe(n.associationId(e),{before:s,after:"]",...a.current()});return l(),n.stack=c,i(),"full"!==o&&A&&A===u?"shortcut"===o?s=s.slice(0,-1):s+=a.move("]"):s+=a.move(u+"]"),s}function vf(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 yf(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}Jd.peek=function(){return"~"},cf.peek=function(e,t,n){return n.options.emphasis||"*"},uf.peek=function(){return"<"},df.peek=function(){return"!"},ff.peek=function(){return"!"},pf.peek=function(){return"`"},gf.peek=function(e,t,n){return hf(e,n)?"<":"["},mf.peek=function(){return"["};const wf=vu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function bf(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),l=n.createTracker(r),a=l.move(o+o);let s=l.move(n.containerPhrasing(e,{after:o,before:a,...l.current()}));const A=s.charCodeAt(0),c=Af(r.before.charCodeAt(r.before.length-1),A,o);c.inside&&(s=sf(A)+s.slice(1));const u=s.charCodeAt(s.length-1),d=Af(r.after.charCodeAt(0),u,o);d.inside&&(s=s.slice(0,-1)+sf(u));const f=l.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},a+s+f}bf.peek=function(e,t,n){return n.options.strong||"*"};const kf={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const l=n.indentLines(n.containerFlow(e,i.current()),tf);return o(),l},break:of,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",l="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,lf);return e(),t}const a=n.createTracker(r),s=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,l=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>l&&(l=i):i=1,o=r+t.length,r=n.indexOf(t,o);return l}(i,o)+1,3)),A=n.enter("codeFenced");let c=a.move(s);if(e.lang){const t=n.enter(`codeFencedLang${l}`);c+=a.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${l}`);c+=a.move(" "),c+=a.move(n.safe(e.meta,{before:c,after:"\n",encode:["`"],...a.current()})),t()}return c+=a.move("\n"),i&&(c+=a.move(i+"\n")),c+=a.move(s),A(),c},definition:function(e,t,n,r){const o=af(n),i='"'===o?"Quote":"Apostrophe",l=n.enter("definition");let a=n.enter("label");const s=n.createTracker(r);let A=s.move("[");return A+=s.move(n.safe(n.associationId(e),{before:A,after:"]",...s.current()})),A+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),A+=s.move("<"),A+=s.move(n.safe(e.url,{before:A,after:">",...s.current()})),A+=s.move(">")):(a=n.enter("destinationRaw"),A+=s.move(n.safe(e.url,{before:A,after:e.title?" ":"\n",...s.current()}))),a(),e.title&&(a=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),a()),l(),A},emphasis:cf,hardBreak:of,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return Pu(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,xu}),Boolean((!e.depth||e.depth<3)&&lA(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),l=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),l+"\n"+(1===o?"=":"-").repeat(l.length-(Math.max(l.lastIndexOf("\r"),l.lastIndexOf("\n"))+1))}const l="#".repeat(o),a=n.enter("headingAtx"),s=n.enter("phrasing");i.move(l+" ");let A=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(A)&&(A=sf(A.charCodeAt(0))+A.slice(1)),A=A?l+" "+A:l,n.options.closeAtx&&(A+=" "+l),s(),a(),A},html:uf,image:df,imageReference:ff,inlineCode:pf,link:gf,linkReference:mf,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let l=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):vf(n);const a=e.ordered?"."===l?")":".":function(e){const t=vf(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let s=!(!t||!n.bulletLastUsed)&&l===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==l&&"-"!==l||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(s=!0),yf(n)===l&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){s=!0;break}}}}s&&(l=a),n.bulletCurrent=l;const A=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=i,o(),A},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||vf(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let l=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(l=4*Math.ceil(l/4));const a=n.createTracker(r);a.move(i+" ".repeat(l-i.length)),a.shift(l);const s=n.enter("listItem"),A=n.indentLines(n.containerFlow(e,a.current()),function(e,t,n){if(t)return(n?"":" ".repeat(l))+e;return(n?i:i+" ".repeat(l-i.length))+e});return s(),A},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),l=n.containerPhrasing(e,r);return i(),o(),l},root:function(e,t,n,r){const o=e.children.some(function(e){return wf(e)});return(o?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:bf,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(yf(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function xf(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Ef(e){this.exit(e),this.data.inTable=void 0}function Pf(e){this.enter({type:"tableRow",children:[]},e)}function Cf(e){this.exit(e)}function Sf(e){this.enter({type:"tableCell",children:[]},e)}function Df(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Bf));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Bf(e,t){return"|"===t?t:e}function If(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=kf.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return a(function(e,t,n){const r=e.children;let o=-1;const i=[],l=t.enter("table");for(;++o<r.length;)i[o]=s(r[o],t,n);return l(),i}(e,n,r),e.align)},tableCell:l,tableRow:function(e,t,n,r){const o=s(e,n,r),i=a([o]);return i.slice(0,i.indexOf("\n"))}}};function l(e,t,n,r){const o=n.enter("tableCell"),l=n.enter("phrasing"),a=n.containerPhrasing(e,{...r,before:i,after:i});return l(),o(),a}function a(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||Zd,i=[],l=[],a=[],s=[];let A=0,c=-1;for(;++c<e.length;){const t=[],r=[];let i=-1;for(e[c].length>A&&(A=e[c].length);++i<e[c].length;){const l=$d(e[c][i]);if(!1!==n.alignDelimiters){const e=o(l);r[i]=e,(void 0===s[i]||e>s[i])&&(s[i]=e)}t.push(l)}l[c]=t,a[c]=r}let u=-1;if("object"==typeof r&&"length"in r)for(;++u<A;)i[u]=ef(r[u]);else{const e=ef(r);for(;++u<A;)i[u]=e}u=-1;const d=[],f=[];for(;++u<A;){const e=i[u];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,s[u]-t.length-r.length);const l=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>s[u]&&(s[u]=o),f[u]=o),d[u]=l}l.splice(1,0,d),a.splice(1,0,f),c=-1;const p=[];for(;++c<l.length;){const e=l[c],t=a[c];u=-1;const r=[];for(;++u<A;){const o=e[u]||"";let l="",a="";if(!1!==n.alignDelimiters){const e=s[u]-(t[u]||0),n=i[u];114===n?l=" ".repeat(e):99===n?e%2?(l=" ".repeat(e/2+.5),a=" ".repeat(e/2-.5)):(l=" ".repeat(e/2),a=l):a=" ".repeat(e)}!1===n.delimiterStart||u||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!u||r.push(" "),!1!==n.alignDelimiters&&r.push(l),r.push(o),!1!==n.alignDelimiters&&r.push(a),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&u===A-1||r.push("|")}p.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function s(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("tableRow");for(;++o<r.length;)i[o]=l(r[o],0,t,n);return a(),i}}function Tf(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Qf(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Mf(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,l="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);i&&a.move(l);let s=kf.listItem(e,t,n,{...r,...a.current()});return i&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+l})),s}const Of={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},Lf={tokenize:function(e,t,n){let r,o,i;return l;function l(t){return 46===t||95===t?e.check(Rf,s,a)(t):null===t||SA(t)||IA(t)||45!==t&&BA(t)?s(t):(i=!0,e.consume(t),l)}function a(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),l}function s(e){return o||r||!i?n(e):t(e)}},partial:!0},Nf={tokenize:function(e,t){let n=0,r=0;return o;function o(l){return 40===l?(n++,e.consume(l),o):41===l&&r<n?i(l):33===l||34===l||38===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||60===l||63===l||93===l||95===l||126===l?e.check(Rf,t,i)(l):null===l||SA(l)||IA(l)?t(l):(e.consume(l),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},Rf={tokenize:function(e,t,n){return r;function r(l){return 33===l||34===l||39===l||41===l||42===l||44===l||46===l||58===l||59===l||63===l||95===l||126===l?(e.consume(l),r):38===l?(e.consume(l),i):93===l?(e.consume(l),o):60===l||null===l||SA(l)||IA(l)?t(l):n(l)}function o(e){return null===e||40===e||91===e||SA(e)||IA(e)?t(e):r(e)}function i(e){return yA(e)?l(e):n(e)}function l(t){return 59===t?(e.consume(t),r):yA(t)?(e.consume(t),l):n(t)}},partial:!0},Hf={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return wA(e)?n(e):t(e)}},partial:!0},Ff={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!qf.call(r,r.previous)||Yf(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Of,e.attempt(Lf,e.attempt(Nf,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:qf},zf={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&Vf.call(r,r.previous)&&!Yf(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),l;return n(t)};function l(t){if(yA(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),l;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),a}return n(t)}function a(t){return 47===t?(e.consume(t),i?s:(i=!0,a)):n(t)}function s(t){return null===t||kA(t)||SA(t)||IA(t)||BA(t)?n(t):e.attempt(Lf,e.attempt(Nf,A),n)(t)}function A(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:Vf},jf={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!Wf(t)||!Gf.call(r,r.previous)||Yf(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(t)};function l(t){return Wf(t)?(e.consume(t),l):64===t?(e.consume(t),a):n(t)}function a(t){return 46===t?e.check(Hf,A,s)(t):45===t||95===t||wA(t)?(i=!0,e.consume(t),a):A(t)}function s(t){return e.consume(t),o=!0,a}function A(l){return i&&o&&yA(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(l)):n(l)}},previous:Gf},Uf={};let _f=48;for(;_f<123;)Uf[_f]=jf,_f++,58===_f?_f=65:91===_f&&(_f=97);function qf(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||SA(e)}function Vf(e){return!yA(e)}function Gf(e){return!(47===e||Wf(e))}function Wf(e){return 43===e||45===e||46===e||95===e||wA(e)}function Yf(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Uf[43]=jf,Uf[45]=jf,Uf[46]=jf,Uf[95]=jf,Uf[72]=[jf,zf],Uf[104]=[jf,zf],Uf[87]=[jf,Ff],Uf[119]=[jf,Ff];const Kf={tokenize:function(e,t,n){const r=this;return MA(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function Xf(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){l=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!l||!l._balanced)return n(o);const a=vA(r.sliceSerialize({start:l.end,end:r.now()}));if(94!==a.codePointAt(0)||!i.includes(a.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function Jf(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},l={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",l,t],["exit",l,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 Zf(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),a};function a(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(a){if(l>999||93===a&&!i||null===a||91===a||SA(a))return n(a);if(93===a){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(vA(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(a)}return SA(a)||(i=!0),l++,e.consume(a),92===a?A:s}function A(t){return 91===t||92===t||93===t?(e.consume(t),l++,s):s(t)}}function $f(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,l,a=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",A):n(t)}function A(t){if(a>999||93===t&&!l||null===t||91===t||SA(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=vA(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return SA(t)||(l=!0),a++,e.consume(t),92===t?c:A}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,A):A(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),MA(e,d,"gfmFootnoteDefinitionWhitespace")):n(t)}function d(e){return t(e)}}function ep(e,t,n){return e.check(UA,t,e.attempt(Kf,t,n))}function tp(e){e.exit("gfmFootnoteDefinition")}function np(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let l=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),a(t)};function a(i){const s=RA(o);if(126===i)return l>1?r(i):(e.consume(i),l++,a);if(l<2&&!t)return r(i);const A=e.exit("strikethroughSequenceTemporary"),c=RA(i);return A._open=!c||2===c&&Boolean(s),A._close=!s||2===s&&Boolean(c),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},l=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],a=t.parser.constructs.insideSpan.null;a&&uA(l,l.length,0,HA(a,e.slice(r+1,n),t)),uA(l,l.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),uA(e,r-1,n-r+3,l),n=r+l.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class rp{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function op(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function ip(e,t,n){const r=this;let o,i=0,l=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:a;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function a(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return s(e);return o=!0,l+=1,s(e)}(t)}function s(t){return null===t?n(t):CA(t)?l>1?(l=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):n(t):DA(t)?MA(e,s,"whitespace")(t):(l+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,s):(e.enter("data"),A(t)))}function A(t){return null===t||124===t||SA(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?c:A)}function c(t){return 92===t||124===t?(e.consume(t),A):A(t)}function u(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,DA(t)?MA(e,d,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):d(t))}function d(t){return 45===t||58===t?p(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):y(t)}function f(t){return DA(t)?MA(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(l+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(l+=1,h(t)):null===t||CA(t)?v(t):y(t)}function h(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):y(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(t))}function m(t){return DA(t)?MA(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?d(n):(null===n||CA(n))&&o&&i===l?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):y(n)}function y(e){return n(e)}function w(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||CA(n)?(e.exit("tableRow"),t(n)):DA(n)?MA(e,b,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||SA(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?x:k)}function x(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function lp(e,t){let n,r,o,i=-1,l=!0,a=0,s=[0,0,0,0],A=[0,0,0,0],c=!1,u=0;const d=new rp;for(;++i<e.length;){const f=e[i],p=f[1];"enter"===f[0]?"tableHead"===p.type?(c=!1,0!==u&&(sp(d,t,u,n,r),r=void 0,u=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(i,0,[["enter",n,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(l=!0,o=void 0,s=[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)},d.add(i,0,[["enter",r,t]])),a="tableDelimiterRow"===p.type?2:r?3:1):!a||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(l?l=!1:(0!==s[1]&&(A[0]=A[1],o=ap(d,t,s,a,void 0,o)),s=A,A=[s[1],i,0,0])):(l=!1,0===A[2]&&(0!==s[1]&&(A[0]=A[1],o=ap(d,t,s,a,void 0,o),s=[0,0,0,0]),A[2]=i)):"tableHead"===p.type?(c=!0,u=i):"tableRow"===p.type||"tableDelimiterRow"===p.type?(u=i,0!==s[1]?(A[0]=A[1],o=ap(d,t,s,a,i,o)):0!==A[1]&&(o=ap(d,t,A,a,i,o)),a=0):!a||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(A[3]=i)}for(0!==u&&sp(d,t,u,n,r),d.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=op(t.events,i))}return e}function ap(e,t,n,r,o,i){const l=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},Ap(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const a=Ap(t.events,n[1]);if(i={type:l,start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=Ap(t.events,n[2]),i=Ap(t.events,n[3]),l={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",l,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",l,t]])}return void 0!==o&&(i.end=Object.assign({},Ap(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function sp(e,t,n,r,o){const i=[],l=Ap(t.events,n);o&&(o.end=Object.assign({},l),i.push(["exit",o,t])),r.end=Object.assign({},l),i.push(["exit",r,t]),e.add(n+1,0,i)}function Ap(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const cp={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return SA(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(t)}function l(r){return CA(r)?t(r):DA(r)?e.check({tokenize:up},t,n)(r):n(r)}}};function up(e,t,n){return MA(e,function(e){return null===e?n(e):t(e)},"whitespace")}const dp={};function fp(e){const t=e||dp,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return pA([{text:Uf},{document:{91:{name:"gfmFootnoteDefinition",tokenize:$f,continuation:{tokenize:ep},exit:tp}},text:{91:{name:"gfmFootnoteCall",tokenize:Zf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Xf,resolveTo:Jf}}},np(e),{flow:{null:{name:"table",tokenize:ip,resolveAll:lp}}},{text:{91:cp}}])}(t)),o.push([{transforms:[Qd],enter:{literalAutolink:Cd,literalAutolinkEmail:Sd,literalAutolinkHttp:Sd,literalAutolinkWww:Sd},exit:{literalAutolink:Td,literalAutolinkEmail:Id,literalAutolinkHttp:Dd,literalAutolinkWww:Bd}},{enter:{gfmFootnoteCallString:Nd,gfmFootnoteCall:Rd,gfmFootnoteDefinitionLabelString:Hd,gfmFootnoteDefinition:Fd},exit:{gfmFootnoteCallString:zd,gfmFootnoteCall:jd,gfmFootnoteDefinitionLabelString:Ud,gfmFootnoteDefinition:_d}},{canContainEols:["delete"],enter:{strikethrough:Kd},exit:{strikethrough:Xd}},{enter:{table:xf,tableData:Sf,tableHeader:Sf,tableRow:Pf},exit:{codeText:Df,table:Ef,tableData:Cf,tableHeader:Cf,tableRow:Cf}},{exit:{taskListCheckValueChecked:Tf,taskListCheckValueUnchecked:Tf,paragraph:Qf}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Pd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ed,notInConstruct:Pd},{character:":",before:"[ps]",after:"\\/",inConstruct:Ed,notInConstruct:Pd}]},Vd(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yd}],handlers:{delete:Jd}},If(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Mf}}]}}(t))}const pp="rgba(0, 0, 0, 0.3)",hp={p:e=>{let{children:n}=e;return t.createElement("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"}},n)},ul:e=>{let{children:n}=e;return t.createElement("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},n)},ol:e=>{let{children:n}=e;return t.createElement("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"}},n)},li:e=>{let{children:n}=e;return t.createElement("li",{style:{marginBottom:"1px",lineHeight:1.4}},n)},code:e=>{let{className:n,children:r}=e;return/\blanguage-/.test(n||"")?t.createElement("pre",{style:{backgroundColor:pp,padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"}},t.createElement("code",null,r)):t.createElement("code",{style:{backgroundColor:pp,padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"}},r)},blockquote:e=>{let{children:n}=e;return t.createElement("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid rgba(255, 255, 255, 0.4)",color:"inherit",fontStyle:"italic"}},n)},a:e=>{let{children:n,href:r}=e;return t.createElement("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline",fontWeight:600}},n)},table:e=>{let{children:n}=e;return t.createElement("table",{style:{borderCollapse:"collapse",width:"100%",margin:"0.5em 0",fontSize:"0.95em",color:"#fff"}},n)},th:e=>{let{children:n}=e;return t.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"}},n)},td:e=>{let{children:n}=e;return t.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"}},n)}},gp=e=>{let{children:n}=e;return t.createElement("div",{style:{whiteSpace:"normal"}},t.createElement(vd,{remarkPlugins:[fp],components:hp},"string"==typeof n?n:""))},mp=n((e,t)=>{let{embedded:n,currentOpen:r,enabled:o,onSetEnabled:i}=e;const a=en(),A=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=oe();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),c=l(!1),u=l(!1);return s(()=>{!n&&A&&A.toggleChatWindow&&(c.current===r||u.current||(setTimeout(()=>{A&&A.toggleChatWindow&&A.toggleChatWindow(r)},0),c.current=null!=r&&r),u.current=!1)},[r,n,A]),s(()=>{const e=()=>{u.current=!0};return window.addEventListener("rcb-toggle-chat-window",e),()=>window.removeEventListener("rcb-toggle-chat-window",e)}),f(t,()=>({addMessage:e=>{a&&a.injectMessage&&a.injectMessage(e)},openChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow(!0)},closeChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow(!1)},toggleChat:()=>{!n&&A&&A.toggleChatWindow&&A.toggleChatWindow()},setBotEnabled:e=>{i&&i(e)}}),[a,A,n,i]),null});mp.displayName="BotController";const vp=r(null),yp=e=>{let{trackEvent:n,children:r}=e;const o=l(n);return o.current=n,t.createElement(vp.Provider,{value:{trackEvent:e=>o.current(e)}},r)},wp=()=>{const e=o(vp);return e||{trackEvent:()=>{}}},bp=e=>{let{loginUrl:n,className:r="",style:o,isHeaderButton:i=!1}=e;const{trackEvent:l}=wp(),a=i?{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 t.createElement(t.Fragment,null,i&&t.createElement("style",null,"\n .rcb-chat-header-container .qa-bot-header-login-button:hover {\n background-color: #0000001a !important;\n opacity: 1 !important;\n }\n "),t.createElement("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${i?"qa-bot-header-login-button":""} ${r}`,style:Object.assign(Object.assign({},a),o),onClick:()=>{l({type:"chatbot_login_clicked",loginUrl:n})}},"Log In"))},kp=()=>t.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"},t.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"},t.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),t.createElement("circle",{cx:"12",cy:"7",r:"4"}))),xp=[];for(let e=0;e<256;++e)xp.push((e+256).toString(16).slice(1));let Ep;const Pp=new Uint8Array(16);var Cp={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Sp(e,t,n){if(Cp.randomUUID&&!e)return Cp.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!Ep){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ep=crypto.getRandomValues.bind(crypto)}return Ep(Pp)}();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(e,t=0){return(xp[e[t+0]]+xp[e[t+1]]+xp[e[t+2]]+xp[e[t+3]]+"-"+xp[e[t+4]]+xp[e[t+5]]+"-"+xp[e[t+6]]+xp[e[t+7]]+"-"+xp[e[t+8]]+xp[e[t+9]]+"-"+xp[e[t+10]]+xp[e[t+11]]+xp[e[t+12]]+xp[e[t+13]]+xp[e[t+14]]+xp[e[t+15]]).toLowerCase()}(r)}function Dp(){return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("QA_BOT_DEBUG")}const Bp="background: #1a5b6e; color: white; padding: 2px 6px; border-radius: 3px;",Ip="background: #7c3aed; color: white; padding: 2px 6px; border-radius: 3px;",Tp="background: #059669; color: white; padding: 2px 6px; border-radius: 3px;",Qp="background: #f97316; color: white; padding: 2px 6px; border-radius: 3px;",Mp="background: #f59e0b; color: #000; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;",Op="background: #fbbf24; color: #000; padding: 2px 6px; border-radius: 0 3px 3px 0;",Lp=()=>{Dp()&&console.log("%c QA Bot Core %c v0.4.0 ",Mp,Op)},Np=function(e){if(Dp()){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}`,Bp,"",...n)}},Rp=function(e){if(Dp()){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}`,Ip,"",...n)}},Hp=(e,t)=>{Dp()&&console.log(`%c[Message]%c ${e}`,Tp,"",t)},Fp=function(e){if(Dp()){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}`,Qp,"",...n)}},zp=function(){console.warn(...arguments)},jp=function(){console.error(...arguments)},Up="qa_bot_session_messages",_p=()=>`qa_bot_session_${Sp()}`,qp=()=>{try{const e=localStorage.getItem(Up);return e?JSON.parse(e):{}}catch(e){return{}}},Vp=(e,t,n,r,o)=>{const i=qp();!i[e]&&(i[e]={messages:[],startedAt:(new Date).toISOString(),preview:""},Rp("NEW session created",{sessionId:e.slice(-12)}));if(i[e].messages.some(e=>e.id===t))return void Rp("DUPLICATE message skipped",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r});const l={id:t,content:n,sender:r,type:o,timestamp:Date.now()};i[e].messages.push(l),Rp("MESSAGE added",{sessionId:e.slice(-12),messageId:t.slice(-8),sender:r,totalInSession:i[e].messages.length});const a=i[e].messages,s=a.find(e=>{var t;return"bot"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())&&e.content.length>=100});if(s){const t=s.content;i[e].preview=t.slice(0,50)+(t.length>50?"...":"")}else{const t=a.find(e=>{var t;return"user"===e.sender.toLowerCase()&&(null===(t=e.content)||void 0===t?void 0:t.trim())});if(t&&!i[e].preview){const n=t.content;i[e].preview=n.slice(0,50)+(n.length>50?"...":"")}}(e=>{var t;const n=()=>Object.values(e).reduce((e,t)=>e+t.messages.length,0);for(;n()>100&&Object.keys(e).length>1;){const n=null===(t=Object.entries(e).sort((e,t)=>{let[,n]=e,[,r]=t;return new Date(n.startedAt).getTime()-new Date(r.startedAt).getTime()})[0])||void 0===t?void 0:t[0];if(!n)break;delete e[n]}localStorage.setItem(Up,JSON.stringify(e))})(i),Rp("STORAGE state",{ourSessions:Object.keys(i).length,ourTotalMessages:Object.values(i).reduce((e,t)=>e+t.messages.length,0)})},Gp=e=>{var t,n;return null!==(n=null===(t=qp()[e])||void 0===t?void 0:t.messages.length)&&void 0!==n?n:0},Wp=e=>{const t=qp()[e];return(null==t?void 0:t.startedAt)?Date.now()-new Date(t.startedAt).getTime():0},Yp=r(void 0),Kp=e=>{let{children:n,getSessionId:r,setSessionId:o,resetSession:i,clearResettingFlag:l}=e;return t.createElement(Yp.Provider,{value:{getSessionId:r,setSessionId:o,resetSession:i,clearResettingFlag:l}},n)},Xp=()=>{const e=o(Yp);if(!e)throw new Error("useSession must be used within a SessionProvider");return e},Jp=()=>{const[e,n]=a(!1),[r,o]=a([]),[i,A]=a(null),[c,u]=a(0),d=l(null),f=l(null),{replaceMessages:p}=en(),{toggleTextAreaDisabled:h}=rn(),{setSessionId:g,getSessionId:m}=Xp();s(()=>{var t,r;const o=e=>{d.current&&!d.current.contains(e.target)&&f.current&&!f.current.contains(e.target)&&n(!1)},i=null!==(r=null===(t=d.current)||void 0===t?void 0:t.getRootNode())&&void 0!==r?r:document;return e&&i.addEventListener("mousedown",o),()=>{i.removeEventListener("mousedown",o)}},[e]);const v=e=>{var t;const r=m();if(Rp("RESTORE requested",{targetSession:e.slice(-12),currentSession:null==r?void 0:r.slice(-12)}),e===r)return Rp("RESTORE skipped - already on this session"),void n(!1);const o=(e=>{var t;return(null===(t=qp()[e])||void 0===t?void 0:t.messages)||[]})(e).filter(e=>{var t;return null===(t=e.content)||void 0===t?void 0:t.trim()});Rp("Stored messages from our localStorage",{count:o.length,ids:o.map(e=>e.id.slice(-8))});const i=o.map(e=>({id:e.id,content:e.content,sender:e.sender.toUpperCase(),type:e.type||"string",timestamp:new Date(e.timestamp).toISOString()}));g(e),Rp("Session ID updated",{newSession:e.slice(-12)}),p(i),Rp("replaceMessages called",{count:i.length}),(e=>{setTimeout(()=>{const t=(e||document).querySelector(".rcb-chat-body-container");t&&t.querySelectorAll(".rcb-bot-message").forEach(e=>{var t;let n=e.innerHTML,r=!1;n.includes("](")&&(n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'),r=!0),n.includes("&lt;a href=")&&(n=n.replace(/&lt;a\s+href=["']([^"']+)["'][^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),(n.includes("&lt;a ")||(null===(t=e.textContent)||void 0===t?void 0:t.includes("<a href=")))&&(e.textContent||"").includes("<a href=")&&(n=n.replace(/&lt;a\s+href="([^"]+)"[^&]*&gt;([^&]+)&lt;\/a&gt;/gi,'<a href="$1" target="_blank" rel="noopener noreferrer">$2</a>'),r=!0),r&&(e.innerHTML=n)})},50)})(null===(t=f.current)||void 0===t?void 0:t.getRootNode()),h(!1),Rp("Chat input enabled after restore"),n(!1)};return t.createElement("div",{style:{position:"relative"}},t.createElement("button",{ref:f,className:"history-button",onClick:()=>{if(!e&&(o((()=>{const e=qp();return Object.entries(e).map(e=>{let[t,n]=e;return Object.assign({sessionId:t},n)}).sort((e,t)=>new Date(t.startedAt).getTime()-new Date(e.startedAt).getTime())})()),f.current)){const e=f.current.closest(".rcb-chat-window");if(e){const t=e.getBoundingClientRect(),n=f.current.getBoundingClientRect();A(t.width+3),u(t.right-n.right-18+4)}}n(!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"},t.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"},t.createElement("circle",{cx:"12",cy:"12",r:"10"}),t.createElement("polyline",{points:"12 6 12 12 16 14"}))),e&&t.createElement("div",{ref:d,role:"menu",style:{position:"absolute",right:c?`-${c}px`:"-18px",top:"100%",marginTop:"8px",width:i?`${i}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}},0===r.length?t.createElement("div",{style:{padding:"12px 16px",color:"#666",fontSize:"14px",textAlign:"center"}},"No chat history"):r.map(e=>t.createElement("button",{key:e.sessionId,role:"menuitem",onClick:()=>v(e.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:e=>{e.currentTarget.style.backgroundColor="#f5f5f5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},t.createElement("span",{style:{fontSize:"14px",color:"#333",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},e.preview||"New conversation"),t.createElement("span",{style:{fontSize:"12px",color:"#888"}},(e=>{const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/864e5);return 0===r?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):1===r?"Yesterday":r<7?t.toLocaleDateString([],{weekday:"short"}):t.toLocaleDateString([],{month:"short",day:"numeric"})})(e.startedAt))))))},Zp=e=>{var{width:n=24,height:r=24,color:o="currentColor",children:i}=e,l=b(e,["width","height","color","children"]);return t.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:n,height:r,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},l),i)},$p=e=>t.createElement(Zp,e,t.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"})),eh=()=>{const{restartFlow:e}=$t(),{setTextAreaValue:n}=rn(),{getSessionId:r,resetSession:o,clearResettingFlag:i}=Xp(),{trackEvent:l}=wp();return t.createElement("button",{onClick:async()=>{const t=r(),a=t?Gp(t):0;l({type:"chatbot_new_chat",previousMessageCount:a}),o(),await n(""),await e(),setTimeout(()=>{i()},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:e=>{e.target.style.backgroundColor="var(--secondaryColor, #0d5f6b)"},onMouseLeave:e=>{e.target.style.backgroundColor="var(--primaryColor, #107180)"}},t.createElement($p,{width:16,height:16}),"New Chat")};function th(e){if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(!e)return"";if(Array.isArray(e))return e.map(th).join("");if("object"==typeof e&&null!==e&&"props"in e){const t=e.props;if(t&&"children"in t)return th(t.children)}return""}const nh=()=>{const{getSessionId:e}=Xp(),t=i(t=>{var n;const r=null===(n=t.data)||void 0===n?void 0:n.message;if(!(null==r?void 0:r.id))return;const o=r.sender,i=r.type||"string";let l;if(l="string"==typeof r.content?r.content:th(r.content),Hp("TRACKED",{id:r.id,sender:o,content:l.substring(0,50)+(l.length>50?"...":"")}),l.includes("rcb-options-container"))return;if(!l.trim())return;const a=e();Vp(a,r.id,l,o,i)},[e]);return s(()=>(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},rh=()=>(s(()=>{const e=e=>{if(!["ArrowDown","ArrowUp","ArrowLeft","ArrowRight","Enter"," ","Home","End"].includes(e.key))return;const n=document.activeElement;if(n&&("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"true"===n.contentEditable||n.classList.contains("rcb-chat-input-textarea")))return;const r=document.querySelector(".rcb-chat-window");if(!r)return;const o=Array.from(r.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(o.length>0){const t=o[o.length-1].querySelector(".rcb-checkbox-container");if(t&&null!==t.offsetParent){const n=Array.from(t.querySelectorAll(".rcb-checkbox-row-container")),r=t.querySelector(".rcb-checkbox-next-button");if(n.length>0){const t=[...n];return r&&t.push(r),void((e,t)=>{e.preventDefault();let n=-1;for(let e=0;e<t.length;e++)if(t[e]===document.activeElement||t[e].contains(document.activeElement)){n=e;break}-1===n&&(n=0);let r=n;switch(e.key){case"ArrowDown":case"ArrowRight":r=n<t.length-1?n+1:0;break;case"ArrowUp":case"ArrowLeft":r=n>0?n-1:t.length-1;break;case"Home":r=0;break;case"End":r=t.length-1;break;case"Enter":case" ":{const e=t[n],r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});return void e.dispatchEvent(r)}default:return}t[r].focus(),t[r].setAttribute("tabindex","0"),t[r].classList.add("keyboard-focused"),t.forEach((e,t)=>{t!==r&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})})(e,t)}}}let i=[];if(o.length>0){const e=o[o.length-1],t=Array.from(e.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);if(t.length>0){const e=t[t.length-1];i=Array.from(e.querySelectorAll(".rcb-options"))}}if(0===i.length)return;const l=i.findIndex(e=>e===document.activeElement);switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=l<i.length-1?l+1:0,i[t].setAttribute("tabindex","0"),i.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[t].classList.add("keyboard-focused"),i[t].focus();break}case"ArrowUp":case"ArrowLeft":{let t;e.preventDefault(),t=l>0?l-1:i.length-1,i[t].setAttribute("tabindex","0"),i.forEach((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[t].classList.add("keyboard-focused"),i[t].focus();break}case"Enter":case" ":if(e.preventDefault(),document.activeElement&&i.includes(document.activeElement)){const e=document.activeElement;if(e.classList.contains("rcb-checkbox-row-container")||e.closest(".rcb-checkbox-row-container")){const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.querySelector(".rcb-checkbox-label"),o=r?r.textContent:e.textContent||"checkbox",i=e.querySelector(".rcb-checkbox-mark"),l=i&&i.style.backgroundColor?"checked":"unchecked";t(`${o} ${l}`)}else{const n=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(n);const r=e.textContent||e.innerText;t(`Selected: ${r}`)}}break;case"Home":e.preventDefault(),i.length>0&&(i[0].setAttribute("tabindex","0"),i.forEach((e,t)=>{0!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))}),i[0].classList.add("keyboard-focused"),i[0].focus());break;case"End":if(e.preventDefault(),i.length>0){const e=i.length-1;i[e].setAttribute("tabindex","0"),i.forEach((t,n)=>{n!==e&&(t.setAttribute("tabindex","-1"),t.classList.remove("keyboard-focused"))}),i[e].classList.add("keyboard-focused"),i[e].focus()}}},t=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{document.body.contains(t)&&document.body.removeChild(t)},1e3)},n=(e=null)=>{let n=e;if(n||(n=document.querySelector(".rcb-chat-window"),n||(n=document.querySelector('[class*="rcb-chat"]')),n||(n=document.querySelector(".qa-bot"))),!n)return;const r=null!==n.closest(".embedded-qa-bot"),o=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter(e=>null!==e.offsetParent);if(0===o.length)return;const i=o[o.length-1],l=Array.from(i.querySelectorAll(".rcb-options-container")).filter(e=>null!==e.offsetParent);let a=[];if(l.length>0){const e=l[l.length-1];a=Array.from(e.querySelectorAll(".rcb-options"))}if(0===a.length){let e=i.querySelector(".rcb-checkbox-container");if(!e&&n&&(e=n.querySelector(".rcb-checkbox-container")),e&&null!==e.offsetParent){const t=Array.from(e.querySelectorAll(".rcb-checkbox-row-container")).filter(e=>null!==e.offsetParent&&"none"!==e.style.display);if(t.length>0){const n=e.querySelector(".rcb-checkbox-next-button"),o=[...t];if(n&&null!==n.offsetParent&&o.push(n),o.forEach((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),t.length>1){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select/deselect, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}return void setTimeout(()=>{o[0]&&null!==o[0].offsetParent&&!r&&o[0].focus()},150)}}}if(a.length>0){if(a.forEach((e,t)=>{const n=0===t?"0":"-1";e.setAttribute("tabindex",n),e.setAttribute("role","option"),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",a.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")}),a.length>1){const e=l.length>0?l[l.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove());const t=document.createElement("div");t.className="keyboard-nav-hint",t.textContent="Use arrow keys ↕ to navigate, Enter to select, or click any option",t.style.cssText="font-size: 12px !important; color: #666 !important; margin-bottom: 8px !important; font-style: italic !important; display: block !important;",e.insertBefore(t,e.firstChild)}}else{const e=l.length>0?l[l.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach(e=>e.remove())}}setTimeout(()=>{a[0]&&null!==a[0].offsetParent&&!r&&(a[0].focus(),a.length>1&&t(`${a.length} options available. Use arrow keys to navigate.`))},200)}},r=new MutationObserver(e=>{e.forEach(e=>{if("childList"===e.type){const t=Array.from(e.addedNodes),r=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-options-container")||e.classList?.contains("rcb-options")||e.querySelector?.(".rcb-options-container")||e.querySelector?.(".rcb-options"))),o=t.some(e=>e.nodeType===Node.ELEMENT_NODE&&(e.classList?.contains("rcb-checkbox-container")||e.querySelector?.(".rcb-checkbox-container")));if(r||o){let t=e.target;for(;t&&!t.classList?.contains("qa-bot")&&!t.classList?.contains("rcb-chat-window");)t=t.parentElement;(t||document).querySelectorAll(".rcb-options[tabindex], .rcb-checkbox-row-container[tabindex], .rcb-checkbox-next-button[tabindex]").forEach(e=>{e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused")}),setTimeout(()=>n(t),100)}}})});r.observe(document.body,{childList:!0,subtree:!0}),document.addEventListener("keydown",e),n();const o=setInterval(()=>{document.querySelectorAll(".qa-bot").forEach(e=>{const t=e.querySelectorAll(".rcb-options-container .rcb-options").length>0,r=e.querySelectorAll(".rcb-checkbox-row-container").length>0;if(t){const t=e.querySelectorAll(".rcb-options[tabindex]").length;e.querySelectorAll(".rcb-options").length>t&&n(e)}if(r){const t=e.querySelectorAll(".rcb-checkbox-row-container[tabindex]").length;e.querySelectorAll(".rcb-checkbox-row-container").length>t&&n(e)}})},1e3);return()=>{document.removeEventListener("keydown",e),r.disconnect(),clearInterval(o)}},[]),null);let oh=!1,ih=null;function lh(){return oh?Promise.resolve():ih||(ih=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=()=>{oh=!0,Fp("Script loaded"),e()},n.onerror=()=>{ih=null,t(new Error("Failed to load Turnstile script"))},document.head.appendChild(n)}),ih)}const ah=e=>{if(!e||"string"!=typeof e)return e;let t=e.replace(/\[(https?:\/\/[^\s]+?)\]/gi,"[$1]($1)");return t=t.replace(/(?<!\]\(|href=["']|\[)https?:\/\/[^\s[\]()]+/gi,e=>{let t=e,n="";const r=t.match(/([.,;:!?]+)$/);return r&&(n=r[1],t=t.slice(0,-n.length)),`[${t}](${t})${n}`}),t},sh=e=>{let{siteKey:n,onVerify:r,onError:o,loginUrl:A}=e;const c=l(null),u=l(null),d=l(!1),f=l(null),p=l(null),[h,g]=a(!1),[m,v]=a(0),w=l("widget_error"),b=l(null),k=A&&"/login"!==A,x=i(()=>{const e=window.turnstile;if(f.current&&(null==e?void 0:e.remove)){try{e.remove(f.current)}catch(e){}f.current=null}},[]),E=i(()=>{var e;x(),h?null==o||o(w.current,null!==(e=b.current)&&void 0!==e?e:void 0):null==o||o("user_cancelled")},[o,x,h]);s(()=>()=>{x()},[x]),s(()=>{var e;return p.current=document.activeElement,null===(e=u.current)||void 0===e||e.focus(),()=>{p.current&&"function"==typeof p.current.focus&&p.current.focus()}},[]),s(()=>{const e=e=>{if("Escape"===e.key)return e.preventDefault(),void E();if("Tab"===e.key&&u.current){const t=u.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[E]),s(()=>{d.current||!c.current||h||(d.current=!0,lh().then(()=>{const e=window.turnstile;if(!e||!c.current)return jp("Turnstile API not available after script load"),w.current="api_unavailable",void g(!0);f.current=e.render(c.current,{sitekey:n,callback:e=>{Fp("Visible challenge completed"),r(e)},"error-callback":e=>(jp("Turnstile challenge failed:",e),b.current=e,w.current="widget_error",x(),g(!0),!0),"expired-callback":()=>{jp("Turnstile token expired"),w.current="token_expired",x(),g(!0)}})}).catch(e=>{jp("Failed to load Turnstile script:",e),w.current="script_load_failed",g(!0)}))},[n,r,h,x]);const P=t.createElement(t.Fragment,null,t.createElement("div",{"aria-hidden":"true",style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.5)",zIndex:999998}}),t.createElement("div",{ref:u,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'}},t.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"),h?t.createElement("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"#333"}},0===m?t.createElement("p",{style:{margin:"0 0 16px 0"}},"Verification failed. You can try again",k&&t.createElement(t.Fragment,null,", or"," ",t.createElement("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"log in")," ","to skip verification"),"."):t.createElement(t.Fragment,null,t.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."),t.createElement("p",{style:{margin:"0 0 16px 0"}},"Try disabling extensions, using a private/incognito window,",k&&t.createElement(t.Fragment,null," ",t.createElement("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--primaryColor, #107180)",fontWeight:"bold"}},"logging in"),",")," ","or using a different browser.")),t.createElement("div",{style:{display:"flex",gap:"8px"}},t.createElement("button",{type:"button",onClick:()=>{x(),d.current=!1,v(e=>e+1),g(!1)},style:{padding:"8px 16px",background:"var(--primaryColor, #107180)",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"}},"Try again"),t.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"))):t.createElement(t.Fragment,null,t.createElement("div",{ref:c,style:{borderRadius:"8px",overflow:"hidden"}}),t.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 y(P,document.body)};function Ah(e){const{confidence:t,tools_used:n,metadata:r}=e;if(!(t||n&&0!==n.length))return"";const o=[];return t&&o.push(`β€’ Confidence: ${t}`),n&&n.length>0&&o.push(`β€’ Tools used: ${n.join(", ")}`),(null==r?void 0:r.agent)&&o.push(`β€’ Agent: ${r.agent}`),`---\n${o.join("\n")}`}function ch(e){let{getState:n,onResubmit:r,trackEvent:o,loginUrl:i}=e;var l,a;const[s,A]=t.useState(null),[c,u]=t.useState(0),d=n(),f=null!==(l=import.meta.env)&&void 0!==l?l:{},p="true"===f.VITE_FORCE_TURNSTILE_WIDGET,h=null!==(a=d.siteKey)&&void 0!==a?a:p?f.VITE_TURNSTILE_SITE_KEY:null;return h&&(p||s!==h)?t.createElement(sh,{key:c,siteKey:h,loginUrl:i,onVerify:async e=>{const t=h;d.token=e,null==o||o({type:"chatbot_turnstile_completed"});"needs_another_challenge"===await r(e)?u(e=>e+1):A(t)},onError:(e,t)=>{var n;const r=null===(n=d.pendingQuery)||void 0===n?void 0:n.queryId,i=h;d.token=null,d.pendingQuery=null,d.needsChallenge=!1,d.siteKey=null,A(i),null==o||o({type:"chatbot_turnstile_error",queryId:r,failureReason:e,cloudflareErrorCode:t})}}):null}const uh="#1a5b6e",dh="#107180",fh="Arial, sans-serif",ph="Q&A Bot",hh="/chat-icon.svg",gh="Type your question here...",mh="Select an option to continue",vh=!1,yh="Ask me a question!",wh="/login",bh={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}},kh=n((e,n)=>{var r,o,c;const{apiKey:u,qaEndpoint:d,ratingEndpoint:f,agentRatingEndpoint:p,welcomeMessage:h,open:g,onOpenChange:m,isLoggedIn:v,allowAnonAccess:y=!1,actingUser:w,primaryColor:b,secondaryColor:x,botName:E,logo:P,placeholder:C,errorMessage:S,embedded:D,footerText:B,footerLink:I,tooltipText:T,loginUrl:Q,turnstileSiteKey:M,backendId:O,resourceContext:L,customFlow:N,onAnalyticsEvent:R}=e,H=l(`bot_${Math.random().toString(36).substr(2,9)}`);s(()=>{Lp()},[]);const F=l(null);null===F.current&&(F.current=_p(),Np("CREATED",F.current));const z=l(!1),j=l({getSessionId:()=>F.current,isResetting:()=>z.current}),U=l(null),_=function(e,t){const[n,r]=a(null),[o,A]=a("idle"),c=l(null),u=l(null),d=l(!0),f=i(()=>{const e=window.turnstile;if(u.current&&(null==e?void 0:e.remove)){try{e.remove(u.current)}catch(e){}u.current=null}c.current&&(c.current.remove(),c.current=null)},[]);return s(()=>{if(d.current=!0,!e)return A("idle"),void r(null);A("loading");const n=document.createElement("div");return n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.setAttribute("aria-hidden","true"),document.body.appendChild(n),c.current=n,lh().then(()=>{if(!d.current)return;const n=window.turnstile;if(!n||!c.current)return jp("Turnstile API not available for silent verification"),A("failed"),void(null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"api_unavailable"}));const o=n.render(c.current,{sitekey:e,execution:"render","refresh-expired":"auto",callback:e=>{d.current&&(Fp("Silent verification succeeded"),r(e),A("verified"))},"error-callback":e=>!d.current||(jp("Turnstile silent verification failed:",e),r(null),A("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"widget_error",cloudflareErrorCode:e}),!0),"expired-callback":()=>{d.current&&(Fp("Token expired, awaiting refresh"),r(null),A("loading"))}});u.current=o}).catch(e=>{d.current&&(jp("Failed to load Turnstile script for silent verification:",e),A("failed"),null==t||t({type:"chatbot_turnstile_silent_failed",failureReason:"script_load_failed"}))}),()=>{d.current=!1,f()}},[e,f]),{token:n,status:o,reset:i(()=>{const e=window.turnstile;u.current&&(null==e?void 0:e.reset)&&(r(null),A("loading"),e.reset(u.current),Fp("Token consumed, resetting widget for fresh token"))},[])}}(M,e=>{var t;null===(t=U.current)||void 0===t||t.call(U,e)}),q=l(null);q.current=_.token;const[V,G]=a(v);s(()=>{G(v)},[v]);const W=void 0!==D?D:vh,Y=i(e=>{var t;R&&R(Object.assign(Object.assign({},e),{timestamp:Date.now(),sessionId:null!==(t=F.current)&&void 0!==t?t:void 0,pageUrl:"undefined"!=typeof window?window.location.href:void 0,isEmbedded:W}))},[R,W]);s(()=>{U.current=e=>Y(e)},[Y]);const K=A(()=>{const e=Object.assign({},bh);e.general=Object.assign(Object.assign({},e.general),{primaryColor:b||uh,secondaryColor:x||dh,fontFamily:fh,embedded:W});const n=!1===V?[t.createElement(Jp,{key:"history-button"}),t.createElement(bp,{key:"login-button",loginUrl:Q||wh,isHeaderButton:!0})]:[t.createElement(Jp,{key:"history-button"}),t.createElement(kp,{key:"user-icon"})];e.header={title:t.createElement("span",{style:{fontSize:14,fontWeight:500}},E||ph),showAvatar:!0,avatar:P||hh,buttons:[...n,k.CLOSE_CHAT_BUTTON]},e.chatInput=Object.assign(Object.assign({},e.chatInput),{disabled:!1,enabledPlaceholderText:C||gh,disabledPlaceholderText:S||mh}),e.tooltip=Object.assign(Object.assign({},e.tooltip),{text:T||yh});const r=B?I?t.createElement("a",{href:I,target:"_blank",rel:"noopener noreferrer",key:"footer-link"},B):t.createElement("span",{key:"footer-text"},B):null;return e.footer={text:null!=r?r:void 0,buttons:[t.createElement(eh,{key:"new-chat-button"})]},e.chatWindow=Object.assign(Object.assign({},e.chatWindow),{defaultOpen:!!W}),e.event={rcbPreInjectMessage:!0,rcbPostInjectMessage:!0,rcbStopStreamMessage:!0,rcbUserSubmitText:!0,rcbChangePath:!0,rcbToggleChatWindow:!0},e},[b,x,E,P,C,S,W,T,V,Q,B,I]),X=l(null),J=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=A(()=>{const n=(t,n)=>{if(e.current){const n=getComputedStyle(e.current).getPropertyValue(t);if(n&&""!==n.trim())return n.trim();if(e.current.parentElement){const n=getComputedStyle(e.current.parentElement).getPropertyValue(t);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:n("--primaryColor",t.primaryColor),secondaryColor:n("--secondaryColor",t.secondaryColor),fontFamily:n("--fontFamily",t.fontFamily)}},[e,t]);return n}(X,K.general);((e,t)=>{s(()=>{t.current&&(e?t.current.classList.add("bot-logged-in"):t.current.classList.remove("bot-logged-in"))},[e,t])})(!1!==V,X),(e=>{let{settings:n,themeColors:r}=e;s(()=>{r&&(Object.entries(r).forEach(e=>{let[t,n]=e;n&&document.documentElement.style.setProperty(`--${t}`,n)}),r.primaryColor&&document.documentElement.style.setProperty("--rcb-header-background",r.primaryColor),r.secondaryColor&&document.documentElement.style.setProperty("--rcb-header-background-hover",r.secondaryColor))},[r]),s(()=>{var e,r;(null===(e=n.header)||void 0===e?void 0:e.title)&&"string"==typeof n.header.title&&(n.header.title=t.createElement("div",{key:"header-title"},t.createElement("h1",{className:"sr-only"},n.header.title),t.createElement("span",{"aria-hidden":"true"},n.header.title))),n.device={desktopEnabled:!0,mobileEnabled:!0,applyMobileOptimizations:!1},n.chatHistory={disabled:!0},n.chatButton=Object.assign(Object.assign({},n.chatButton),{icon:null===(r=n.header)||void 0===r?void 0:r.avatar}),n.event=Object.assign(Object.assign({},n.event),{rcbToggleChatWindow:!0})},[n])})({settings:K,themeColors:J});const Z=A(()=>{const e=(e=>{let{endpoint:n,ratingEndpoint:r,agentRatingEndpoint:o,apiKey:i,sessionId:l,isResetting:a=()=>!1,isLoggedIn:s,allowAnonAccess:A=!1,loginUrl:c="/login",trackEvent:u,getTurnstileToken:d,resetTurnstileToken:f,backendId:p,resourceContext:h}=e;if(!1===s&&!A)return null==u||u({type:"chatbot_login_prompt_shown"}),{qa_loop:{message:"To ask questions, please log in first.",component:t.createElement(bp,{loginUrl:c}),chatDisabled:!0,path:"qa_loop"}};let g=null,m=null,v=!1;const y={siteKey:null,token:null,pendingQuery:null,needsChallenge:!1};let w=null;if(!n)throw new Error("Q&A endpoint is required");return{qa_loop:{message:async e=>{var t;w=e.injectMessage.bind(e);const{userInput:s}=e;if((!a||!a())&&s&&""!==s.trim()){if("πŸ‘ Helpful"===s||"πŸ‘Ž Not helpful"===s){if(g){const e="πŸ‘ Helpful"===s,t="agent"===m?o:r;if(t)try{const n={"Content-Type":"application/json"};i&&(n["X-API-KEY"]=i);const r=l();r&&(n["X-Session-ID"]=r,n["X-Query-ID"]=g);const o="agent"===m?{query_id:g,rating:e?"helpful":"not_helpful",session_id:r}:{sessionId:r,queryId:g,rating:e?1:0};await fetch(t,{method:"POST",headers:n,credentials:"include",body:JSON.stringify(o)}),null==u||u({type:"chatbot_rating_sent",queryId:g,rating:e?"helpful":"not_helpful"})}catch(e){jp("Error sending feedback:",e)}}return"Thanks for the feedback!"}try{const r=Sp();g=r,null==u||u({type:"chatbot_question_sent",queryId:r,questionLength:s.length});const o={"Content-Type":"application/json"};i&&(o["X-API-KEY"]=i);const a=l();a&&(o["X-Session-ID"]=a,o["X-Query-ID"]=r),o["X-Origin"]=h||"access";const A={query:s,question_id:r};a&&(A.session_id=a),p&&(A._backend=p),h&&(A.rp_name=h,A.resource_context=h);const c=null==d?void 0:d();c&&(A.turnstile_token=c),Np("SENT to API",{session_id:a,question_id:r});const w=Date.now(),b=await fetch(n,{method:"POST",headers:o,credentials:"include",body:JSON.stringify(A)});if(!b.ok)throw new Error(`API returned ${b.status}`);if((b.headers.get("content-type")||"").includes("text/event-stream")){null==f||f();const n=null===(t=b.body)||void 0===t?void 0:t.getReader();if(!n)throw new Error("Response body is not readable");const o=new TextDecoder;let i="",l="",a=!1;try{for(;;){const{done:t,value:r}=await n.read();if(t)break;i+=o.decode(r,{stream:!0});let s=i.indexOf("\n\n");for(;-1!==s;){const t=i.slice(0,s);i=i.slice(s+2);let n,r="",o="";for(const e of t.split("\n"))e.startsWith("event: ")?r=e.slice(7):e.startsWith("data: ")&&(o=e.slice(6));if(r&&o){try{n=JSON.parse(o)}catch(e){zp("Failed to parse SSE data:",o),s=i.indexOf("\n\n");continue}if("status"===r){const t=n.message||"Processing...";await e.streamMessage(`_${t}_`,"BOT"),a=!0}else if("token"===r){l+=n.content||"";const t=ah(l);await e.streamMessage(t,"BOT")}else if("done"===r){const t=n.metadata||{};if(m=t.rating_target||null,v=!0===t.is_final_response,l)await e.endStreamMessage("BOT");else{const t=n.response||"";if(t){const n=ah(t);await e.streamMessage(n,"BOT"),a=!0}a&&await e.endStreamMessage("BOT")}}else if("error"===r){const t=n.message||"An error occurred";jp("SSE error event:",t),a?(await e.streamMessage(t,"BOT"),await e.endStreamMessage("BOT")):await e.injectMessage(t)}s=i.indexOf("\n\n")}else s=i.indexOf("\n\n")}}a&&await e.endStreamMessage("BOT")}catch(t){if(jp("Error reading SSE stream:",t),!a)throw t;await e.streamMessage("I had trouble completing the response. Please try again.","BOT"),await e.endStreamMessage("BOT")}const s=Date.now()-w;return void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:s,success:!0,responseLength:l.length}))}const k=Date.now()-w,x=await b.json();if(x.requires_turnstile)return null==u||u({type:"chatbot_turnstile_shown",queryId:r}),y.siteKey=x.site_key,y.pendingQuery={query:s,sessionId:a,queryId:r},y.needsChallenge=!0,"One moment β€” verifying your session…";null==f||f();const E=x.response||x.answer||x.text||x.message;if(!E)throw new Error("Invalid response format from API");const P=x.metadata||{};m=P.rating_target||null,v=!0===P.is_final_response;const C=ah(E),S=Dp()?Ah(x):"",D=S?`${C}\n\n${S}`:C;return await e.injectMessage(D),void(null==u||u({type:"chatbot_answer_received",queryId:r,responseTimeMs:k,success:!0,responseLength:E.length,hasMetadata:!!S}))}catch(e){return jp("Error in Q&A flow:",e),null==u||u({type:"chatbot_answer_error",queryId:null!=g?g:void 0,errorType:e instanceof Error?e.message:"unknown"}),"I apologize, but I'm having trouble processing your question. Please try again later."}}},options:e=>a&&a()||"πŸ‘ Helpful"===e.userInput||"πŸ‘Ž Not helpful"===e.userInput||y.needsChallenge?[]:v&&m&&("agent"===m?o:r)?["πŸ‘ Helpful","πŸ‘Ž Not helpful"]:[],renderMarkdown:["BOT"],chatDisabled:!1,component:t.createElement(ch,{getState:()=>y,onResubmit:async e=>{var t;if(!y.pendingQuery||!w)return jp("Turnstile resubmit called without pending query or injectMessage"),"error";try{const r={"Content-Type":"application/json"};i&&(r["X-API-KEY"]=i),y.pendingQuery.sessionId&&(r["X-Session-ID"]=y.pendingQuery.sessionId,r["X-Query-ID"]=y.pendingQuery.queryId),r["X-Origin"]=h||"access";const o={query:y.pendingQuery.query,question_id:y.pendingQuery.queryId,turnstile_token:e};y.pendingQuery.sessionId&&(o.session_id=y.pendingQuery.sessionId),p&&(o._backend=p),h&&(o.rp_name=h,o.resource_context=h);const l=await fetch(n,{method:"POST",headers:r,credentials:"include",body:JSON.stringify(o)}),a=y.pendingQuery.queryId;if(!l.ok)throw new Error(`API returned ${l.status} after Turnstile`);if((l.headers.get("content-type")||"").includes("text/event-stream")){const e=null===(t=l.body)||void 0===t?void 0:t.getReader();if(!e)throw new Error("Response body is not readable");const n=new TextDecoder;let r="",o="",i={};for(;;){const{done:t,value:l}=await e.read();if(t)break;r+=n.decode(l,{stream:!0});let a=r.indexOf("\n\n");for(;-1!==a;){const e=r.slice(0,a);r=r.slice(a+2);let t="",n="";for(const r of e.split("\n"))r.startsWith("event: ")?t=r.slice(7):r.startsWith("data: ")&&(n=r.slice(6));if(t&&n)try{const e=JSON.parse(n);"token"===t?o+=e.content||"":"done"===t&&(i=e.metadata||{})}catch(e){}a=r.indexOf("\n\n")}}if(y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,!o)throw new Error("No content received from stream");m=i.rating_target||null,v=!0===i.is_final_response,g=a;const s=ah(o);return await w(s),null==u||u({type:"chatbot_answer_received",queryId:a,success:!0,responseLength:o.length}),"success"}const s=await l.json();if(s.requires_turnstile)return y.siteKey=s.site_key,y.token=null,await w("Still verifying β€” please complete the challenge again."),"needs_another_challenge";y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null;const A=s.response||s.answer||s.text||s.message;if(!A)throw new Error("Invalid response format from API");const c=s.metadata||{};m=c.rating_target||null,v=!0===c.is_final_response,g=a;const d=ah(A),f=Dp()?Ah(s):"",b=f?`${d}\n\n${f}`:d;return await w(b),null==u||u({type:"chatbot_answer_received",queryId:a,success:!0,responseLength:A.length}),"success"}catch(e){return jp("Error resubmitting after Turnstile:",e),y.token=null,y.pendingQuery=null,y.needsChallenge=!1,y.siteKey=null,await(null==w?void 0:w("I had trouble processing your question after verification. Please try again.")),"error"}},trackEvent:u,loginUrl:c}),path:"qa_loop"}}})({endpoint:d,ratingEndpoint:f,agentRatingEndpoint:p,apiKey:u,sessionId:j.current.getSessionId,isResetting:j.current.isResetting,isLoggedIn:V,allowAnonAccess:y,loginUrl:Q||wh,trackEvent:Y,getTurnstileToken:()=>q.current,resetTurnstileToken:()=>_.reset(),backendId:O,resourceContext:L}),n={message:h,renderMarkdown:["BOT"],transition:{duration:0},path:"qa_loop"};return Object.assign(Object.assign({start:n},e),N||{})},[u,d,f,p,h,V,y,Q,N,w,Y,L,O]),$=A(()=>{return[()=>On(t),ha({markdownComponent:gp}),()=>va(e)];var e,t},[]);return s(()=>{const e=()=>{const e=document.querySelector(".rcb-chat-window");if(!e)return;const t=e.querySelector(".rcb-send-button");t&&(t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("data-keyboard-enabled")||(t.setAttribute("data-keyboard-enabled","true"),t.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const n=t&&Object.keys(t).find(e=>e.startsWith("__reactProps"));if(n){const r=t[n],o=null==r?void 0:r.onMouseDown;if(o&&"function"==typeof o)return void o(e)}const r=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(r)}})))},t=setInterval(e,1e3);return e(),()=>clearInterval(t)},[]),rh(),s(()=>{const e=X.current;if(!e)return;const t=e=>{var t,n,r;const o=null===(n=(t=e.target).closest)||void 0===n?void 0:n.call(t,"a");o&&o.closest(".rcb-chat-body-container")&&(o.classList.contains("qa-bot-login-button")||o.closest(".rcb-options-container")||Y({type:"chatbot_link_clicked",linkUrl:o.href,linkText:(null===(r=o.textContent)||void 0===r?void 0:r.trim())||""}))};return e.addEventListener("click",t),()=>e.removeEventListener("click",t)},[Y]),s(()=>{if(!W){const e=e=>{const t=e.data.newState;null==m||m(t);const n=F.current;Y(t?{type:"chatbot_open"}:{type:"chatbot_close",messageCount:n?Gp(n):0,durationMs:n?Wp(n):0})};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}},[W,m,Y]),t.createElement("div",{className:"qa-bot "+((null===(r=K.general)||void 0===r?void 0:r.embedded)?"embedded-qa-bot":""),ref:X,role:"region","aria-label":`${E||ph}${(null===(o=K.general)||void 0===o?void 0:o.embedded)?" - Embedded":""}`},t.createElement(Kp,{getSessionId:()=>F.current,setSessionId:e=>{const t=F.current;F.current=e,Np("RESTORED",`${null==t?void 0:t.slice(-12)} -> ${e.slice(-12)}`)},resetSession:()=>{const e=F.current;z.current=!0,F.current=_p(),Np("RESET",`${null==e?void 0:e.slice(-12)} -> ${F.current.slice(-12)}`)},clearResettingFlag:()=>{z.current=!1}},t.createElement(yp,{trackEvent:Y},t.createElement(Wt,null,t.createElement("div",null,t.createElement(nh,null),t.createElement(mp,{ref:n,embedded:(null===(c=K.general)||void 0===c?void 0:c.embedded)||!1,currentOpen:g||!1,enabled:!1!==V,onSetEnabled:e=>G(!!e&&void 0)}),t.createElement(Jt,{key:`chatbot-${H.current}-${V}`,settings:K,flow:Z,plugins:$}),t.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}}),t.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."))))))});kh.displayName="QABot";const xh=()=>{const[e,t]=a(!1),n=()=>"undefined"!=typeof navigator&&void 0!==navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!n())throw new Error("Screen capture is not available in this environment");try{t(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",width:{ideal:1920},height:{ideal:1080}},audio:!1}),n=document.createElement("video");n.srcObject=e,await new Promise(e=>{n.onloadedmetadata=()=>{n.play(),e()}});const r=document.createElement("canvas");r.width=n.videoWidth,r.height=n.videoHeight;const o=r.getContext("2d");if(!o)throw new Error("Could not get canvas context");o.drawImage(n,0,0,r.width,r.height);const i=await new Promise(e=>r.toBlob(e,"image/png"));if(!i)throw new Error("Could not create image blob");const l=(new Date).toISOString().replace(/[:.]/g,"-"),a=new File([i],`screenshot-${l}.png`,{type:"image/png"});return e.getTracks().forEach(e=>e.stop()),t(!1),a}catch(e){throw jp("Error capturing screenshot:",e),t(!1),e}},isCapturing:e,isScreenCaptureAvailable:n()}},Eh=e=>t.createElement(Zp,e,t.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),t.createElement("polyline",{points:"17 8 12 3 7 8"}),t.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Ph=e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{if("string"!=typeof r.result)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)}),Ch=e=>Promise.all(e.map(Ph)),Sh=function(e){const t=1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:10)*1024;return e.size<=t},Dh=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,Bh=e=>{let{onFileUpload:n,maxSizeMB:r=10,acceptedTypes:o="image/*,application/pdf,text/*,.doc,.docx",enableScreenshot:i=!1,className:s}=e;const[A,c]=a(!1),[u,d]=a([]),[f,p]=a(null),h=l(null),{captureScreenshot:g,isCapturing:m,isScreenCaptureAvailable:v}=xh(),y=e=>{const t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.setAttribute("aria-atomic","true"),t.className="sr-only",t.textContent=e,document.body.appendChild(t),setTimeout(()=>document.body.removeChild(t),1e3)},w=e=>{if(!e||0===e.length)return void zp("FileUploadComponent: No valid files provided to handleFiles");let t;try{t=Array.from(e)}catch(e){return jp("FileUploadComponent: Error converting files to array:",e),void y("Error processing selected files. Please try again.")}const r=[...u,...t];d(r);const o=t.length,i=t.map(e=>e.name).join(", ");y(`${o} file${o>1?"s":""} selected: ${i}`),setTimeout(()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)},100),n&&n(r)},b=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?c(!0):"dragleave"===e.type&&c(!1)},k=()=>{try{h.current&&h.current.click()}catch(e){jp("FileUploadComponent: Error in handleButtonClick:",e),y("Error opening file selection dialog. Please try again.")}},x=()=>{p(null)},E=i&&v;return t.createElement("div",{className:`file-upload-container ${s||""}`,style:{padding:"16px",margin:"8px 0"}},E&&t.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},t.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await g();w([e]),y("Screenshot captured successfully")}catch(e){y("Error capturing screenshot. Please try again.")}})()},disabled:m,"aria-describedby":"screenshot-help","aria-label":m?"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:m?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},t.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"},t.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"}),t.createElement("circle",{cx:"12",cy:"13",r:"4"})),m?"Taking screenshot...":"Take screenshot..."),t.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),t.createElement("div",{className:"file-upload-dropzone "+(A?"active":""),onDragEnter:b,onDragLeave:b,onDragOver:b,onDrop:e=>{var t;e.preventDefault(),e.stopPropagation(),c(!1);try{(null===(t=e.dataTransfer)||void 0===t?void 0:t.files)&&e.dataTransfer.files.length>0&&w(e.dataTransfer.files)}catch(e){jp("FileUploadComponent: Error in handleDrop:",e),y("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=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),k())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:A?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},t.createElement("input",{ref:h,type:"file",className:"file-input",onChange:e=>{var t;try{(null===(t=e.target)||void 0===t?void 0:t.files)&&e.target.files.length>0&&w(e.target.files)}catch(e){jp("FileUploadComponent: Error in handleFileSelect:",e),y("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:o}),t.createElement("div",{className:"upload-content",onClick:k,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},t.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},t.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},t.createElement(Eh,null),t.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),t.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)")),u.length>0&&t.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},t.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),u.map((e,r)=>t.createElement("span",{key:r,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:t=>{t.stopPropagation(),(e=>{p(e)})(e)}},t.createElement("span",{onClick:e=>{e.stopPropagation(),(e=>{const t=u.filter((t,n)=>n!==e);d(t),n&&n(t)})(r)},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," (",Dh(e.size),")"))))),(()=>{if(!f)return null;const e=f.type.startsWith("image/"),n=f.type.startsWith("text/"),r="application/pdf"===f.type;return t.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:x},t.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},t.createElement("button",{onClick:x,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"Γ—"),t.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},f.name),e&&t.createElement("img",{src:URL.createObjectURL(f),alt:f.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&t.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(f)),r&&t.createElement("iframe",{src:URL.createObjectURL(f),style:{width:"100%",height:"70vh",border:"none"},title:f.name}),!e&&!n&&!r&&t.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())};function Ih(e,t){if(!t||0===Object.keys(t).length)return e;const n={};for(const[r,o]of Object.entries(e)){let e=Object.assign({},o);if(t.disableOnOptions&&void 0===e.chatDisabled){const t=!(!e.options&&!e.checkboxes);e.chatDisabled=t}n[r]=e}return n}function Th(e){return async t=>{await t.injectMessage(e)}}function Qh(e){return async t=>{const n=await e(t);await t.injectMessage(n)}}const Mh=t.forwardRef((e,n)=>{var{defaultOpen:r}=e,o=b(e,["defaultOpen"]);const[i,l]=t.useState(r||!1),a=t.useRef(null);return t.useImperativeHandle(n,()=>({addMessage:e=>{var t;null===(t=a.current)||void 0===t||t.addMessage(e)},setBotEnabled:e=>{var t;null===(t=a.current)||void 0===t||t.setBotEnabled(e)},openChat:()=>{var e;l(!0),null===(e=a.current)||void 0===e||e.openChat()},closeChat:()=>{var e;l(!1),null===(e=a.current)||void 0===e||e.closeChat()},toggleChat:()=>{var e;l(e=>!e),null===(e=a.current)||void 0===e||e.toggleChat()}}),[]),t.createElement(kh,w({ref:a},o,{open:i,onOpenChange:l}))});function Oh(e){if(!(e.target&&e.target instanceof HTMLElement))return void jp("QA Bot: A valid target DOM element is required");const{target:n}=e,r=b(e,["target"]),o=p.createRoot(n),i={current:null};return o.render(t.createElement(t.StrictMode,null,t.createElement(Mh,w({ref:e=>{i.current=e}},r)))),{addMessage:e=>{var t;return null===(t=i.current)||void 0===t?void 0:t.addMessage(e)},setBotEnabled:e=>{var t;return null===(t=i.current)||void 0===t?void 0:t.setBotEnabled(e)},openChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.openChat()},closeChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.closeChat()},toggleChat:()=>{var e;return null===(e=i.current)||void 0===e?void 0:e.toggleChat()},destroy:()=>{i.current=null,o.unmount()}}}Mh.displayName="ProgrammaticQABot";export{Bh as FileUploadComponent,kh as QABot,Ih as applyFlowSettings,Oh as default,Ph as fileToBase64,Ch as filesToBase64,Dh as formatFileSize,Oh as qaBot,xh as useScreenshotCapture,Sh as validateFileSize,Th as withHistory,Qh as withHistoryFn};
9
9
  //# sourceMappingURL=qa-bot-core.js.map