@snf/access-qa-bot 2.4.8-debug.2 → 2.5.0-debug.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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-dom/client"),n=require("react/jsx-runtime"),r=require("react-dom/server");function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var A=o(e);function i(){return i=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},i.apply(null,arguments)}function a(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}a('.rcb-chat-header-container{border-bottom:1px solid #ccc;color:#fff;display:flex;justify-content:space-between;max-height:55px;padding:12px}.rcb-chat-header{display:flex;flex-direction:row}.rcb-bot-avatar{background-size:cover;border-radius:50%;height:30px;margin-right:12px;width:30px}.rcb-message-prompt-container.visible{align-items:center;animation:rcb-animation-pop-in .3s ease-in-out;bottom:0;display:flex;justify-content:center;margin:auto;opacity:1;pointer-events:auto;position:sticky}.rcb-message-prompt-container.hidden{height:0;opacity:0;pointer-events:none;visibility:hidden}.rcb-message-prompt-text{background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;font-size:12px;padding:6px 12px;transition:color .3s ease,border-color .3s ease;z-index:9999}.rcb-message-prompt-container.hidden .rcb-message-prompt-text{padding:0}.rcb-user-message-container{display:flex;flex-direction:row;justify-content:right}.rcb-user-message{border-radius:22px;font-size:15px;height:fit-content;margin-right:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:right;white-space:pre-wrap;width:fit-content}.rcb-user-message-offset{margin-right:50px}.rcb-user-message-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-message-user-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:-10px;margin-right:6px;margin-top:9px;width:40px}.rcb-bot-message-container{display:flex;flex-direction:row}.rcb-bot-message{border-radius:22px;font-size:15px;height:fit-content;margin-left:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:left;white-space:pre-wrap;width:fit-content}.rcb-bot-message-offset{margin-left:50px}.rcb-bot-message-entry{animation:rcb-animation-bot-message-entry .3s ease-in backwards}.rcb-message-bot-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:6px;margin-right:-10px;margin-top:9px;width:40px}.rcb-typing-indicator{align-items:center;display:flex}.rcb-dot{animation:rcb-animation-bot-typing 1s infinite;background-color:#ccc;border-radius:50%;height:8px;margin-right:4px;width:8px}.rcb-dot:nth-child(2){animation-delay:.2s}.rcb-dot:nth-child(3){animation-delay:.4s}.rcb-chat-body-container{height:100%;overflow-x:hidden;overflow-y:scroll;padding-bottom:16px;position:relative;touch-action:pan-y;width:100%}.rcb-chat-body-container::-webkit-scrollbar-track{background-color:#f1f1f1}.rcb-chat-body-container::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.rcb-chat-body-container::-webkit-scrollbar-thumb:hover{background-color:#cfcfcf}.rcb-chat-body-container::-webkit-scrollbar-corner{background-color:#f1f1f1}.rcb-checkbox-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;padding-top:12px}.rcb-checkbox-offset{margin-left:50px!important}.rcb-checkbox-row-container{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:flex;gap:5px;max-height:32px;min-height:30px;overflow:hidden;width:80%}.rcb-checkbox-row-container:hover{box-shadow:0 0 5px #0003}.rcb-checkbox-row{align-items:center;cursor:pointer;display:inline-flex;margin-left:10px}.rcb-checkbox-mark{align-items:center;background-color:#f2f2f2;border:none;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;margin-right:10px;transition:all .3s ease;width:20px}.rcb-checkbox-mark:hover{background-color:#c2c2c2}.rcb-checkbox-mark:before{content:"✓";transition:all .3s ease}.rcb-checkbox-label{font-size:14px}.rcb-checkbox-next-button{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-block;font-size:24px;max-height:32px;min-height:30px;text-align:center;width:80%}.rcb-checkbox-next-button:before{content:"→"}.rcb-checkbox-next-button:hover{box-shadow:0 0 5px #0003}.rcb-options-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;max-width:70%;padding-top:12px}.rcb-options-offset{margin-left:50px!important}.rcb-options{align-items:center;animation:rcb-animation-options-entry .5s ease-out;border-radius:20px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-flex;font-size:14px;justify-content:center;overflow:hidden;padding:10px 20px;transition:background-color .3s ease}.rcb-options:hover{box-shadow:0 0 5px #0003}.rcb-line-break-container{align-items:center;display:flex;justify-content:center;max-height:45px;padding-bottom:5px;padding-top:10px}.rcb-line-break-text{color:#adadad;font-size:12px;padding:6px 12px}.rcb-spinner-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-spinner{animation:rcb-animation-spin 1s linear infinite;border:4px solid #f3f3f3;border-radius:50%;height:22px;width:22px}.rcb-chat-input{align-items:center;background-color:#fff;border-top:1px solid #ccc;display:flex;padding:8px 16px}.rcb-chat-input::placeholder{color:#999}.rcb-chat-input-textarea{background-color:#fff;border:none;border-radius:4px;color:#000;flex:1;font-family:inherit;font-size:16px;height:auto;min-height:38px;outline:none;overflow-y:scroll;padding:8px;resize:none;touch-action:none}.rcb-chat-input-textarea::-webkit-scrollbar,.rcb-chat-input-textarea::-webkit-scrollbar-thumb{background-color:initial}.rcb-chat-input-textarea::-webkit-scrollbar-thumb:hover{background-color:initial}.rcb-chat-input-char-counter{font-size:14px;margin-left:8px;margin-top:3px}.rcb-chat-footer-container{align-items:flex-end;background-color:#f2f2f2;border-top:1px solid #ccc;color:#000;display:flex;font-size:12px;justify-content:space-between;max-height:55px;padding:12px 16px 8px 10px}.rcb-chat-footer,.rcb-toggle-button{display:flex;flex-direction:row}.rcb-toggle-button{border:none;border-radius:50%;bottom:20px;box-shadow:0 2px 4px #0003;cursor:pointer;height:75px;position:fixed;right:20px;width:75px;z-index:9999}.rcb-toggle-button.rcb-button-hide{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}.rcb-toggle-button.rcb-button-show{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-toggle-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:inherit;height:100%;margin:auto;width:100%}.rcb-badge,.rcb-toggle-icon{align-items:center;display:flex;justify-content:center}.rcb-badge{background-color:red;border-radius:50%;color:#fff;height:25px;position:absolute;right:-6px;top:-6px;width:25px}.rcb-chat-tooltip{border-radius:20px;box-shadow:0 2px 6px #0003;cursor:pointer;font-size:20px;padding:16px;position:fixed;transition:transform .3s ease;white-space:nowrap;z-index:9999}.rcb-chat-tooltip-tail{border-style:solid;border-width:10px 0 10px 10px;content:"";margin-top:-10px;position:absolute;right:-10px;top:50%}.rcb-chat-tooltip.rcb-tooltip-hide{animation:rcb-animation-tooltip-out .5s ease-in-out;opacity:0;visibility:hidden}.rcb-chat-tooltip.rcb-tooltip-show{animation:rcb-animation-tooltip-in .5s ease-in-out;opacity:1;visibility:visible}.rcb-toast-prompt{animation:rcb-animation-pop-in .3s ease-in-out;background-color:#fff;border:.5px solid #7a7a7a;border-radius:5px;color:#7a7a7a;cursor:pointer;font-size:12px;margin-top:6px;padding:6px 12px;text-align:center;transition:color .3s ease,border-color .3s ease;width:100%;z-index:9999}.rcb-toast-prompt-container{align-items:center;animation:popIn .3s ease-in-out;bottom:0;display:flex;flex-direction:column;justify-content:flex-end;left:50%;margin:200 auto auto;opacity:1;pointer-events:auto;position:absolute;transform:translate(-50%)}.rcb-media-display-image-container,.rcb-media-display-video-container{border-radius:22px;margin-right:16px;margin-top:8px;padding:16px;width:fit-content}.rcb-media-display-offset{margin-right:50px!important}.rcb-media-display-image{border-radius:22px;height:auto;object-fit:cover;width:100%}.rcb-media-display-video{background-color:#000;border-radius:22px;height:auto;width:100%}.rcb-media-display-audio{border-radius:22px;height:auto;margin-right:16px;margin-top:8px;width:100%}.rcb-media-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-attach-button-disabled,.rcb-attach-button-enabled{background-size:cover;border-radius:6px;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-attach-button-disabled input[type=file],.rcb-attach-button-enabled input[type=file]{display:none;height:100%;position:absolute;width:100%}.rcb-attach-button-enabled{cursor:pointer}.rcb-attach-button-disabled{opacity:.5}.rcb-attach-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-attach-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-attach-icon-disabled,.rcb-attach-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;height:24px;margin-top:2px;transition:background-image .3s ease;width:24px}.rcb-attach-icon-enabled{cursor:pointer}.rcb-emoji-button-disabled,.rcb-emoji-button-enabled{background-size:cover;border-radius:6px;cursor:pointer;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-emoji-icon-disabled,.rcb-emoji-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;font-size:20px;height:24px;margin-top:2px;position:relative;width:24px}.rcb-emoji-icon-enabled{cursor:pointer}.rcb-emoji-icon-disabled{opacity:.5}.rcb-emoji-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-emoji-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-emoji-button-popup{background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;max-height:200px;overflow-y:auto;padding:8px;position:absolute;transform:translateY(calc(-100% - 30px));width:158px}.rcb-emoji{cursor:pointer;font-size:24px;padding:3px;transition:transform .2s ease-in-out}.rcb-emoji:hover{transform:scale(1.2)}.rcb-audio-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-audio-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-audio-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-close-chat-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-close-chat-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-close-chat-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-notification-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-notification-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-notification-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-voice-button-disabled,.rcb-voice-button-enabled{align-items:center;background-color:#fff;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:all .3s ease;width:32px}.rcb-voice-button-enabled{border:1px solid red;box-shadow:0 0 3px #ff000080}.rcb-voice-button-enabled:hover{border:1px solid #3d0000}.rcb-voice-button-disabled{border:1px;border-color:#0003;border-style:solid}.rcb-voice-button-disabled:hover{box-shadow:0 0 3px #8a0000}.rcb-voice-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:60%;object-fit:cover;width:60%}.rcb-voice-icon.on{animation:rcb-animation-ping 1s infinite}.rcb-send-button{border:none;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:background-color .3s ease;width:51px}.rcb-send-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:50%;object-fit:cover;transform:translateY(20%);width:50%}.rcb-view-history-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-view-history-button{align-items:center;background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;display:inline-flex;font-size:12px;justify-content:center;max-width:60%;padding:6px 12px;transition:color .3s ease,border-color .3s ease}.rcb-view-history-button>p{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rcb-chatbot-global{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.5;z-index:9999}.rcb-chat-window{background-color:#fff;border-radius:10px;bottom:20px;box-shadow:0 2px 4px #0003;display:flex;flex-direction:column;height:550px;overflow:hidden;position:fixed;right:20px;transition:all .3s ease;width:375px}.rcb-window-embedded .rcb-chat-window{bottom:auto;opacity:1;position:relative;right:auto;visibility:visible}.rcb-window-open .rcb-chat-window{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-window-close .rcb-chat-window{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}@keyframes rcb-animation-expand{0%{opacity:0;transform:translate(100%,100%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-collapse{0%{opacity:1;transform:translate(0) scale(1)}to{opacity:0;transform:translate(100%,100%) scale(0)}}@keyframes rcb-animation-ping{0%{filter:brightness(100%);opacity:1}50%{filter:brightness(50%);opacity:.8}}@keyframes rcb-animation-bot-message-entry{0%{opacity:0;transform:translate(-100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-user-message-entry{0%{opacity:0;transform:translate(100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-bot-typing{0%{opacity:.4}50%{opacity:1}to{opacity:.4}}@keyframes rcb-animation-pop-in{0%{opacity:0;transform:scale(.8)}70%{opacity:1;transform:scale(1.1)}to{transform:scale(1)}}@keyframes rcb-animations-checkboxes-entry{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}@keyframes rcb-animation-options-entry{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcb-animation-tooltip-in{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes rcb-animation-tooltip-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-5px)}}@keyframes rcb-animation-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}',{insertAt:"top"});const s={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"},l="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",c=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},A.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"}),A.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"})))),u=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),d=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),p=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),f=e.forwardRef(((e,t)=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},A.createElement("g",{strokeLinecap:"round",strokeWidth:10},A.createElement("path",{d:"m19 19 61 61M80 19 19 80"}))))),h=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"})))),g=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),m=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),b=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),y=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),v=e.forwardRef(((e,t)=>A.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},A.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"})))),w={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:c},header:{title:n.jsx("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/"),children:"Tan Jin"}),showAvatar:!0,avatar:l,buttons:[s.NOTIFICATION_BUTTON,s.AUDIO_BUTTON,s.CLOSE_CHAT_BUTTON],closeChatIcon:f},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:d,iconDisabled:p,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAAgAAAP//AAD+/wAA/f8AAAAA////////AgAAAAcAAQD7/wEA/f8AAAIA//8GAP7//v/+//b/AQD//wQADgD///3/9/8FAPr/6/8EABAACQD9/wIA/P/5/w4A///t/wQA/P8LAB0ACQD5////AQD2/+7/AgD6//r//v/z/xIA9f8oAAMA4f8OANz/EQAdAAAA5P/w/2MAAQDq/w0A1/8bALz/BgDb/+j/lQD9/yMABAACAA0Alf8NAKr/CwCMAPD/QwDq/wkA9v+g/wgAk/8QAD0ABgAWAAQAMwD7/9T/8//f//z/JwAEAOL/DwBxAAwAzf/+/xUA8v+O//H/fAD5/xUA+/9m//P/yf/r/y8ACAAbAEQA3f9AAAcB9f/p/sD/+QHv/8/9EQCv+ez/j+v8/3pS7/83By4AF6Go/7PNjgDMEn7/Sk0NAeEfIv+9DCwAKfuY/9fRAv2A3mjzfQg/Ft3fzTQE703jljkirPskFOdBEUYzORerLDvvDg7C6dcbwNJj/b/CisId8XfblBZS/oYksP1YRdoQJjjDJbwGNSTX66wU48FG8Iu1eM+/5ITdKwGN8jUTGfehN3oUszrBH7kmdhFKB+YNheG6B9fOivltwZ38JMcC66z7o9pJNBnxgTdvCjIvJg+GG7MMlQUJFJL5hCZ61IQap7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/2gA+/88AA8A/v8VAMn/+P+m/+n/r//b/8j/+v/y/x4AIwAqAEgAHQBUAPv/OwDY/yIA1v/m/+T/t/8NAJr/KQCp/ykA6f8NACsA7v9bANv/XgDz/0UABwAQABUA1f8BALH/7/+u/+T/xf/0/+7/GwAfAC4APgAiAFUACABDANr/KgDW//D/4f+6/woAo/8kAKX/KwDh/xQAGQDz/1sA3P9aAOz/QgACACIAAgDn/wIAv//1/6n/6f+///L/3f8VAA4ALgA0ACYAVQAOAEgA6/8wANL/AQDc/8b/+f+k/x0Anf8oAND/HwAMAPf/SADw/2AA8v9KAPX/KgD3//H/+P/F//z/rv/i/7r/6v/Z/wYABwAoADAAKQBOABkATAD0/zQA1P8PANv/0//v/6//FwCi/ywAxP8oAPn//v82APT/WwD4/00A+/8yAPv//f/8/83/+v+w/+T/sf/j/9b/AQACACoAIgAtAEIAHwBPAAEAQADe/xcA0v/k/+X/t/8IAKv/IgC//yEA6/8EACMA9/9PAPf/VAD+/zcA+/8JAPn/1P8AALf/6f+w/+P/zf////j/HAAdAC0APgAfAEsABwBCAOP/IADV/+//2v/B//3/rP8PALv/GADd/xEAFgABAEMABABaAP//QgACABcA+//n/wAAwP/w/67/4v+///3/6f8WABcAKQA0ACIARgAQAEcA8f8pANn/9f/U/87/7f+v/wgAtP8RANP/FgANAAIAOQACAFQA/f9HAAAAIAABAO3//P/E/wEAs//q/7n/9P/i/wYAEQAZADEAJABBABMASAAAADEA3/8CANL/1v/g/7H/AACy/w8Axf8ZAPv/CQAzAAIAVQD//1AAAAAsAAIA9v/7/8r/AwC2//P/tf/m/+H/AwADABEAKQApADoAHgBHAAgAPADr/wkA1//f/93/vP/6/7L/CgDA/x4A7/8hACkAAgBPAPz/UgD1/zIABAAEAPz/0v/5/7f/AACy//H/2f/+/wEAAAAkABUAMwAdADoAEQA9APD/EADU//L/1P/H/+z/tf8LALv/HADk/ygAGgADAEMA//9TAPn/QAAAABAAAQDc//z/wf8DALD/7P/Q//z/9/8HABoAFgA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P/l/+3/z/8BANf/CgDn/wkA/P///xoABwAwAAIAJwACABcAAwABAAIA4f8BAND/AgDd//3/6P8CAAYA/f8YAAwALwAZACUA9v8bAPj/AwDq/+r/7P/S//7/1/8EAOX/CQD6//7/GQAFAC8AAQApAAEAGQACAAMAAgDm/wEAzv8BANv//v/p/wIA//8BABMABQArACAALAABAB4A8f8NAOv/7v/m/9n/+P/R/wMA4f8OAPT/AQATAAMAKwAHACoAAwAbAAMABQADAO7/AQDU/wEA2f8AAOL////3////EgAAACUAGgAvAAUAHQD2/xIA9f/0//T/3P/4/8///f/h/wIA7f8AAAoAAQApAAQALQADACAAAgAPAP//9P///9r//f/T/wAA3f/9//D/AQAQAP//HAAHAC8ACQAfAPv/GAD+//f/+P/j/wEA0v/+/9n/AADq/wIABgD//x0AAQAuAAEAIwAAABQAAwD8/wEA3/8AAM//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:y,iconDisabled:v},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:h,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[s.VOICE_MESSAGE_BUTTON,s.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:l,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:g,iconDisabled:m},footer:{text:n.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com"),children:[n.jsx("span",{children:"Powered By "},0),n.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:n.jsx(c,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),n.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[s.FILE_ATTACHMENT_BUTTON,s.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:u,iconDisabled:u,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:b,iconDisabled:b,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,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}},x=e.createContext({settings:{},setSettings:()=>null}),E=()=>e.useContext(x),k=({children:e,settings:t=w,setSettings:r})=>n.jsx(x.Provider,{value:{settings:t,setSettings:r},children:e}),P={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:{},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:{}},B=e.createContext({styles:{},setStyles:()=>null}),C=()=>e.useContext(B),D=({children:e,styles:t=P,setStyles:r})=>n.jsx(B.Provider,{value:{styles:t,setStyles:r},children:e}),S=({buttons:t})=>{var r,o,A,i,a;const{settings:s}=E(),{styles:l}=C(),c={backgroundImage:`linear-gradient(to right, ${null==(r=s.general)?void 0:r.secondaryColor},\n\t\t\t${null==(o=s.general)?void 0:o.primaryColor})`,...l.headerStyle};return n.jsxs("div",{style:c,className:"rcb-chat-header-container",children:[n.jsxs("div",{className:"rcb-chat-header",children:[(null==(A=s.header)?void 0:A.showAvatar)&&n.jsx("div",{style:{backgroundImage:`url("${null==(i=s.header)?void 0:i.avatar}")`},className:"rcb-bot-avatar"}),null==(a=s.header)?void 0:a.title]}),n.jsx("div",{className:"rcb-chat-header",children:null==t?void 0:t.map(((t,r)=>n.jsx(e.Fragment,{children:t},r)))})]})},I=e.createContext({}),T=()=>e.useContext(I),Q=({children:t,botIdRef:r,flowRef:o})=>{const A=e.useRef(null),i=e.useRef(""),a=e.useRef(null),s=e.useRef(new Map),l=e.useRef(null),c=e.useRef(""),u=e.useRef(!1),d=e.useRef(null),p=e.useRef(null),f=e.useRef(null);return n.jsx(I.Provider,{value:{botIdRef:r,flowRef:o,inputRef:A,timeoutIdRef:a,streamMessageMap:s,chatBodyRef:l,paramsInputRef:c,keepVoiceOnRef:u,audioContextRef:d,audioBufferRef:p,gainNodeRef:f,prevInputRef:i},children:t})},M=t=>{const[n,r]=e.useState(t),o=e.useRef(t);return[n,e=>{const t="function"==typeof e?e(o.current):e;o.current=t,r(t)},o]},O=e.createContext({}),L=()=>e.useContext(O),N=({children:t,settings:r})=>{var o,A,i,a,s,l;const[c,u,d]=M(!1),[p,f,h]=M((null==(o=null==r?void 0:r.chatWindow)?void 0:o.defaultOpen)??!1),[g,m,b]=M((null==(A=null==r?void 0:r.audio)?void 0:A.defaultToggledOn)??!1),[y,v,w]=M((null==(i=null==r?void 0:r.voice)?void 0:i.defaultToggledOn)??!1),[x,E,k]=M((null==(a=null==r?void 0:r.notification)?void 0:a.defaultToggledOn)??!0),[P,B]=e.useState(!1),[C,D]=e.useState(!1),[S,I,T]=M(!1),[Q,L,N]=M(!0),[R,j,H]=M(!1),[F,_]=e.useState(!1),[U,z]=e.useState(!1),[G,Y]=e.useState(0),[q,W]=e.useState(0),[V,X]=e.useState(!1),[K,J]=e.useState((null==(s=window.visualViewport)?void 0:s.height)??window.innerHeight),[Z,$]=e.useState((null==(l=window.visualViewport)?void 0:l.width)??window.innerWidth);return n.jsx(O.Provider,{value:{isBotTyping:c,setSyncedIsBotTyping:u,syncedIsBotTypingRef:d,isChatWindowOpen:p,setSyncedIsChatWindowOpen:f,syncedIsChatWindowOpenRef:h,audioToggledOn:g,setSyncedAudioToggledOn:m,syncedAudioToggledOnRef:b,voiceToggledOn:y,setSyncedVoiceToggledOn:v,syncedVoiceToggledOnRef:w,notificationsToggledOn:x,setSyncedNotificationsToggledOn:E,syncedNotificationsToggledOnRef:k,isLoadingChatHistory:P,setIsLoadingChatHistory:B,hasChatHistoryLoaded:C,setHasChatHistoryLoaded:D,isScrolling:S,setSyncedIsScrolling:I,syncedIsScrollingRef:T,textAreaDisabled:Q,setSyncedTextAreaDisabled:L,syncedTextAreaDisabledRef:N,textAreaSensitiveMode:R,setSyncedTextAreaSensitiveMode:j,syncedTextAreaSensitiveModeRef:H,hasInteractedPage:F,setHasInteractedPage:_,hasFlowStarted:U,setHasFlowStarted:z,unreadCount:G,setUnreadCount:Y,inputLength:q,setInputLength:W,blockAllowsAttachment:V,setBlockAllowsAttachment:X,viewportHeight:K,setViewportHeight:J,viewportWidth:Z,setViewportWidth:$},children:t})};var R=(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.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))(R||{});const j={[R.START_SPEAK_AUDIO]:!0,[R.TOGGLE_AUDIO]:!0,[R.TOGGLE_VOICE]:!0,[R.TOGGLE_NOTIFICATIONS]:!0,[R.TOGGLE_CHAT_WINDOW]:!0,[R.PRE_INJECT_MESSAGE]:!0,[R.POST_INJECT_MESSAGE]:!1,[R.PRE_LOAD_CHATBOT]:!0,[R.POST_LOAD_CHATBOT]:!1,[R.START_SIMULATE_STREAM_MESSAGE]:!0,[R.STOP_SIMULATE_STREAM_MESSAGE]:!1,[R.START_STREAM_MESSAGE]:!0,[R.CHUNK_STREAM_MESSAGE]:!0,[R.STOP_STREAM_MESSAGE]:!0,[R.REMOVE_MESSAGE]:!0,[R.LOAD_CHAT_HISTORY]:!0,[R.CHANGE_PATH]:!0,[R.SHOW_TOAST]:!0,[R.DISMISS_TOAST]:!0,[R.USER_SUBMIT_TEXT]:!0,[R.USER_UPLOAD_FILE]:!0,[R.TEXT_AREA_CHANGE_VALUE]:!0,[R.PRE_PROCESS_BLOCK]:!0,[R.POST_PROCESS_BLOCK]:!0},H=async(e,t,n)=>{const r=new CustomEvent(e,{detail:t,cancelable:j[e]});return r.data=n,r.promises=[],window.dispatchEvent(r),await Promise.all(r.promises),r},F=e.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),_=()=>e.useContext(F),U=({children:e})=>{const[t,r,o]=M([]);return n.jsx(F.Provider,{value:{paths:t,setSyncedPaths:r,syncedPathsRef:o},children:e})},z=()=>{const{botIdRef:t}=T(),{syncedPathsRef:n}=_(),r=e.useCallback((()=>n.current.length>0?n.current.at(-1)??null:null),[]),o=e.useCallback((()=>n.current.length>1?n.current.at(-2)??null:null),[]);return{dispatchRcbEvent:e.useCallback((async(e,n)=>{const A={botId:t.current,currPath:r(),prevPath:o()};return await H(e,A,n)}),[t])}},G=()=>{const{settings:t}=E(),{isChatWindowOpen:n,setSyncedIsChatWindowOpen:r,viewportHeight:o,setViewportHeight:A,viewportWidth:i,setViewportWidth:a,setUnreadCount:s,setSyncedIsBotTyping:l,setSyncedIsScrolling:c,syncedIsBotTypingRef:u,syncedIsChatWindowOpenRef:d}=L(),{chatBodyRef:p}=T(),{dispatchRcbEvent:f}=z(),h=e.useCallback((()=>{if(!p.current)return!1;const e=p.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}),[p]),g=e.useCallback((async e=>{var n;e!==d.current&&(null!=(n=t.event)&&n.rcbToggleChatWindow&&(await f(R.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||r((e=>(e||s(0),!e))))}),[d]),m=e.useCallback((async e=>{e!==u.current&&l((e=>!e))}),[u]),b=e.useCallback(((e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t),[]),y=e.useCallback(((e=0)=>{if(!p.current)return;const t=p.current.scrollHeight-p.current.clientHeight;if(e<=0)return p.current.scrollTop=t,void c(!1);const n=p.current.scrollTop,r=t-n;let o=0;const A=()=>{if(!p.current)return;o+=20;const t=b(o,n,r,e);p.current.scrollTop=t,o<e?requestAnimationFrame(A):c(!1)};A()}),[p]);return{isChatWindowOpen:n,setSyncedIsChatWindowOpen:r,toggleChatWindow:g,viewportHeight:o,setViewportHeight:A,viewportWidth:i,setViewportWidth:a,toggleIsBotTyping:m,scrollToBottom:y,getIsChatBotVisible:h}},Y=()=>{var t,r,o;const{settings:A}=E(),{styles:i}=C(),{unreadCount:a,isScrolling:s}=L(),{chatBodyRef:l}=T(),{scrollToBottom:c}=G(),[u,d]=e.useState(!1),p={color:null==(t=A.general)?void 0:t.primaryColor,borderColor:null==(r=A.general)?void 0:r.primaryColor,...i.chatMessagePromptHoveredStyle};return n.jsx("div",{className:"rcb-message-prompt-container "+(l.current&&(null==(f=A.chatWindow)?void 0:f.showMessagePrompt)&&s&&a>0?"visible":"hidden"),children:n.jsx("div",{onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},style:u?p:{...i.chatMessagePromptStyle},onMouseDown:e=>{e.preventDefault(),c(600)},className:"rcb-message-prompt-text",children:null==(o=A.chatWindow)?void 0:o.messagePromptText})});var f},q=e.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),W=()=>e.useContext(q),V=({children:e})=>{const[t,r,o]=M([]);return n.jsx(q.Provider,{value:{messages:t,setSyncedMessages:r,syncedMessagesRef:o},children:e})},X=({message:e,isNewSender:t})=>{var r,o,A,i,a,s;const{settings:l}=E(),{styles:c}=C(),u="string"==typeof e.content,d=e.content,p=e.contentWrapper?n.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:null==(r=l.general)?void 0:r.primaryColor,color:"#fff",maxWidth:null!=(o=l.userBubble)&&o.showAvatar?"65%":"70%",...c.userBubbleStyle},h=null!=(A=l.userBubble)&&A.animate?"rcb-user-message-entry":"",g=(null==(i=l.userBubble)?void 0:i.showAvatar)&&t,m="rcb-user-message"+(!t&&null!=(a=l.userBubble)&&a.showAvatar?" rcb-user-message-offset":"");return n.jsxs("div",{className:"rcb-user-message-container",children:[u?n.jsx("div",{style:f,className:`${m} ${h}`,children:p}):n.jsx(n.Fragment,{children:p}),g&&n.jsx("div",{style:{backgroundImage:`url("${null==(s=l.userBubble)?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},K=({message:e,isNewSender:t})=>{var r,o,A,i,a,s;const{settings:l}=E(),{styles:c}=C(),u="string"==typeof e.content,d=e.content,p=e.contentWrapper?n.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:null==(r=l.general)?void 0:r.secondaryColor,color:"#fff",maxWidth:null!=(o=l.botBubble)&&o.showAvatar?"65%":"70%",...c.botBubbleStyle},h=null!=(A=l.botBubble)&&A.animate?"rcb-bot-message-entry":"",g=(null==(i=l.botBubble)?void 0:i.showAvatar)&&t,m="rcb-bot-message"+(!t&&null!=(a=l.botBubble)&&a.showAvatar?" rcb-bot-message-offset":"");return n.jsxs("div",{className:"rcb-bot-message-container",children:[g&&n.jsx("div",{style:{backgroundImage:`url("${null==(s=l.botBubble)?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),u?n.jsx("div",{style:f,className:`${m} ${h}`,children:p}):n.jsx(n.Fragment,{children:p})]})},J=()=>{var e,t,r;const{settings:o}=E(),{styles:A}=C(),i=null!=(e=o.botBubble)&&e.animate?"rcb-bot-message-entry":"";return n.jsxs("div",{className:"rcb-bot-message-container",children:[(null==(t=o.botBubble)?void 0:t.showAvatar)&&n.jsx("div",{style:{backgroundImage:`url("${null==(r=o.botBubble)?void 0:r.avatar}")`},className:"rcb-message-bot-avatar"}),n.jsx("div",{onMouseDown:e=>{e.preventDefault()},className:`rcb-bot-message ${i}`,children:n.jsxs("div",{className:"rcb-typing-indicator",style:{...null==A?void 0:A.rcbTypingIndicatorContainerStyle},children:[n.jsx("span",{className:"rcb-dot",style:{...null==A?void 0:A.rcbTypingIndicatorDotStyle}}),n.jsx("span",{className:"rcb-dot",style:{...null==A?void 0:A.rcbTypingIndicatorDotStyle}}),n.jsx("span",{className:"rcb-dot",style:{...null==A?void 0:A.rcbTypingIndicatorDotStyle}})]})})]})},Z=()=>{var t,r,o;const{settings:A}=E(),{styles:i}=C(),{messages:a}=W(),{scrollToBottom:s}=G(),{isBotTyping:l,syncedIsScrollingRef:c}=L(),{chatBodyRef:u}=T(),d={...null==i?void 0:i.bodyStyle,scrollbarWidth:null!=(t=A.chatWindow)&&t.showScrollbar?"auto":"none"};e.useEffect((()=>{c.current||s()}),[null==(r=u.current)?void 0:r.scrollHeight]);return n.jsxs("div",{style:d,className:"rcb-chat-body-container",ref:u,children:[a.map(((e,t)=>{const r=(e=>0===e||a[e].sender!==a[e-1].sender)(t);return"USER"===e.sender.toUpperCase()?n.jsx(X,{message:e,isNewSender:r},t):"BOT"===e.sender.toUpperCase()?n.jsx(K,{message:e,isNewSender:r},t):n.jsx("div",{children:e.content},t)})),l&&(null==(o=A.chatWindow)?void 0:o.showTypingIndicator)&&n.jsx(J,{}),n.jsx(Y,{})]})},$=({checkboxes:t,checkedItems:r,path:o})=>{var A,i,a,s,l,c,u,d,p,f,h;const{settings:g}=E(),{styles:m}=C(),{paths:b}=_(),{handleSubmitText:y}=$e(),[v,w]=e.useState(new Set),[x,k]=e.useState(!1),P={cursor:x?`url("${null==(A=g.general)?void 0:A.actionDisabledIcon}"), auto`:"pointer",color:null==(i=g.general)?void 0:i.primaryColor,borderColor:null==(a=g.general)?void 0:a.primaryColor,...m.botCheckboxRowStyle},B={cursor:x||v.size<t.min?`url("${null==(s=g.general)?void 0:s.actionDisabledIcon}"), auto`:"pointer",color:null==(l=g.general)?void 0:l.primaryColor,borderColor:null==(c=g.general)?void 0:c.primaryColor,...m.botCheckboxNextStyle},D={cursor:x?`url("${null==(u=g.general)?void 0:u.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...m.botCheckMarkStyle},S={cursor:x?`url("${null==(d=g.general)?void 0:d.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:null==(p=g.general)?void 0:p.primaryColor,backgroundColor:null==(f=g.general)?void 0:f.primaryColor,...m.botCheckMarkSelectedStyle};e.useEffect((()=>{b.length>0&&b[b.length-1]!==o&&k(!t.reusable)}),[b]);return n.jsxs("div",{className:"rcb-checkbox-container "+(null!=(h=g.botBubble)&&h.showAvatar?"rcb-checkbox-offset":""),children:[t.items.map((e=>n.jsx("div",{onMouseDown:n=>{n.preventDefault(),(e=>{x||w((n=>{const o=new Set(n);if(o.has(e))r.delete(e),o.delete(e);else{if(v.size==t.max)return n;r.add(e),o.add(e)}return o}))})(e)},style:P,className:"rcb-checkbox-row-container",children:n.jsxs("div",{className:"rcb-checkbox-row",children:[n.jsx("div",{style:v.has(e)?S:D,className:"rcb-checkbox-mark"}),n.jsx("div",{className:"rcb-checkbox-label",children:e})]})},e))),n.jsx("div",{style:B,className:"rcb-checkbox-next-button",onMouseDown:e=>{var n;if(e.preventDefault(),x||v.size<t.min)return;const o=Array.from(r).join(", ");let A;k(!t.reusable),A=null!=t.sendOutput?t.sendOutput:(null==(n=g.chatInput)?void 0:n.sendCheckboxOutput)??!0,y(o,A)}})]})},ee=async(e,t)=>{const r=e.checkboxes;if(!r)return;let o;if("function"==typeof r?(o=r(t),o instanceof Promise&&(o=await o)):o=r,Array.isArray(o)&&(o={items:o}),!("items"in o)||0==o.items.length)return;null==o.min&&(o.min=1),null==o.max&&(o.max=o.items.length),o.min>o.max&&(o.min=o.max),null==o.reusable&&(o.reusable=!1);const A=new Set,i=t.currPath,a=n.jsx($,{checkboxes:o,checkedItems:A,path:i});await t.injectMessage(a)},te=async(e,t)=>{const n=e.function;if(!n)return;const r=n(t);return r instanceof Promise?await r:r},ne=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))},re=({options:t,path:r})=>{var o,A,i,a,s,l;const{settings:c}=E(),{styles:u}=C(),{paths:d}=_(),{handleSubmitText:p}=$e(),[f,h]=e.useState([]),[g,m]=e.useState(!1),b={cursor:g?`url("${null==(o=c.general)?void 0:o.actionDisabledIcon}"), auto`:"pointer",color:null==(A=c.general)?void 0:A.primaryColor,borderColor:null==(i=c.general)?void 0:i.primaryColor,backgroundColor:"#fff",...u.botOptionStyle},y={color:"#fff",borderColor:null==(a=c.general)?void 0:a.primaryColor,backgroundColor:null==(s=c.general)?void 0:s.primaryColor,...u.botOptionHoveredStyle};e.useEffect((()=>{d.length>0&&d[d.length-1]!==r&&m(!t.reusable)}),[d]);return n.jsx("div",{className:"rcb-options-container "+(null!=(l=c.botBubble)&&l.showAvatar?"rcb-options-offset":""),children:t.items.map(((e,r)=>{const o=f[r]&&!g;return n.jsx("div",{className:"rcb-options",style:o?y:b,onMouseEnter:()=>(e=>{h((t=>{const n=[...t];return n[e]=!0,n}))})(r),onMouseLeave:()=>(e=>{h((t=>{const n=[...t];return n[e]=!1,n}))})(r),onMouseDown:n=>{var r;if(n.preventDefault(),g)return;let o;m(!t.reusable),o=null!=t.sendOutput?t.sendOutput:(null==(r=c.chatInput)?void 0:r.sendOptionOutput)??!0,p(e,o)},children:e},e)}))})},oe=async(e,t)=>{const r=e.options;if(!r)return;let o;if("function"==typeof r?(o=r(t),o instanceof Promise&&(o=await o)):o=r,Array.isArray(o)&&(o={items:o}),!("items"in o)||0==o.items.length)return;null==o.reusable&&(o.reusable=!1);const A=t.currPath,i=n.jsx(re,{options:o,path:A});await t.injectMessage(i)},Ae=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)}},ie=async(e,t,n,r)=>{const o=e.transition;let A;if("function"==typeof o?(A=o(t),A instanceof Promise&&(A=await A)):A=o,"number"==typeof A&&(A={duration:A}),!A||A instanceof Promise||null==A.duration||"number"!=typeof A.duration)return;null==A.interruptable&&(A.interruptable=!1);const i=setTimeout((async()=>{const n=await r(e);n&&await le(n,t)}),A.duration);A.interruptable&&(n.current=i)},ae=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)},se=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)},le=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 te(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)},ce=()=>{var e;const{settings:t}=E(),{styles:r}=C();return n.jsx("div",{className:"rcb-line-break-container",children:n.jsx("div",{style:{...r.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:null==(e=t.chatHistory)?void 0:e.chatHistoryLineBreakText})})},ue=()=>{var e;const{settings:t}=E(),{styles:r}=C(),o={borderTop:`4px solid ${null==(e=t.general)?void 0:e.primaryColor}`,...r.loadingSpinnerStyle};return n.jsx("div",{className:"rcb-spinner-container",children:n.jsx("div",{style:o,className:"rcb-spinner"})})},de=()=>{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")}},pe=(e,t)=>({id:de(),content:e,sender:t,type:"string"==typeof e?"string":"object",timestamp:(new Date).toUTCString(),tags:[]});let fe,he=!1,ge="rcb-history",me=30,be=!1,ye=[];const ve=async e=>{if(be||!fe)return;const t=[],n=he?ye.length:0;for(let r=e.length-1;r>=n;r--){const n=e[r];if("SYSTEM"!==n.sender.toUpperCase()&&(""!==n.content&&t.unshift(n),t.length===me))break}let r=t.map(Pe);if(r.length<me){const e=me-r.length;r=[...ye.slice(-e),...r]}Ee(r)},we=()=>ye,xe=e=>{Ee(e),ye=e},Ee=e=>{fe&&fe.setItem(ge,JSON.stringify(e))},ke=e=>{var t,n,r,o,A;fe="SESSION_STORAGE"===(null==(n=null==(t=e.chatHistory)?void 0:t.storageType)?void 0:n.toUpperCase())?sessionStorage:localStorage,ge=null==(r=e.chatHistory)?void 0:r.storageKey,me=null==(o=e.chatHistory)?void 0:o.maxEntries,be=null==(A=e.chatHistory)?void 0:A.disabled,ye=(e=>{if(null!=e)try{return JSON.parse(e)}catch{return[]}return[]})(fe.getItem(ge))},Pe=t=>e.isValidElement(t.content)?structuredClone({id:t.id,content:r.renderToString(t.content),type:t.type,sender:t.sender.toUpperCase(),timestamp:t.timestamp,tags:t.tags}):t,Be=(t,n,r)=>{const o=(new DOMParser).parseFromString(t,"text/html");return Array.from(o.body.childNodes).map(((t,o)=>{var A;if(t.nodeType===Node.TEXT_NODE)return t.textContent;{const i=t.tagName.toLowerCase();let a=Array.from(t.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(a,"class")){const e=t.classList;a.className=e.toString(),delete a.class,null!=(A=n.botBubble)&&A.showAvatar&&(a=Ce(e,a)),a=De(e,a,n,r),a=Se(e,a,n,r),a=Ie(e,a,n,r),a=Te(e,a,n,r)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(i))return e.createElement(i,{key:o,...a});{const A=Be(t.innerHTML,n,r);return e.createElement(i,{key:o,...a},...A)}}}))},Ce=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),De=(e,t,n,r)=>{var o,A,i,a,s;return e.contains("rcb-options")&&(t.style={...t.style,color:(null==(o=r.botOptionStyle)?void 0:o.color)??(null==(A=n.general)?void 0:A.primaryColor),borderColor:(null==(i=r.botOptionStyle)?void 0:i.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botOptionStyle}),t},Se=(e,t,n,r)=>{var o,A,i,a,s;return e.contains("rcb-checkbox-row-container")&&(t.style={...t.style,color:(null==(o=r.botCheckboxRowStyle)?void 0:o.color)??(null==(A=n.general)?void 0:A.primaryColor),borderColor:(null==(i=r.botCheckboxRowStyle)?void 0:i.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botCheckboxRowStyle}),t},Ie=(e,t,n,r)=>{var o,A,i,a,s;return e.contains("rcb-checkbox-next-button")&&(t.style={...t.style,color:(null==(o=r.botCheckboxNextStyle)?void 0:o.color)??(null==(A=n.general)?void 0:A.primaryColor),borderColor:(null==(i=r.botCheckboxNextStyle)?void 0:i.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botCheckboxNextStyle}),t},Te=(e,t,n,r)=>{var o,A;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!=(A=n.userBubble)&&A.showAvatar?"65%":"70%",...r.mediaDisplayContainerStyle}),t},Qe=()=>{const{settings:t}=E(),{notificationsToggledOn:n,setSyncedNotificationsToggledOn:r,hasInteractedPage:o,unreadCount:A,setUnreadCount:i,syncedNotificationsToggledOnRef:a}=L(),{audioBufferRef:s,audioContextRef:l,gainNodeRef:c}=T(),{dispatchRcbEvent:u}=z(),d=e.useCallback((async()=>{var e,n;const r=null==(e=t.notification)?void 0:e.sound;l.current=new AudioContext;const o=l.current.createGain();let A;if(o.gain.value=(null==(n=t.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);A=t}else A=await(await fetch(r)).arrayBuffer();s.current=await l.current.decodeAudioData(A)}),[t.notification]),p=e.useCallback((()=>{var e;if(null!=(e=t.notification)&&e.disabled||!a.current||!o||!l.current||!s.current)return;const n=l.current.createBufferSource();n.buffer=s.current,n.connect(c.current).connect(l.current.destination),n.start()}),[t.notification,a,o,l,s,c]);return{unreadCount:A,setUnreadCount:i,notificationsToggledOn:n,toggleNotifications:e.useCallback((async e=>{var n;e!==a.current&&(null!=(n=t.event)&&n.rcbToggleNotifications&&(await u(R.TOGGLE_NOTIFICATIONS,{currState:a.current,newState:!a.current})).defaultPrevented||r((e=>!e)))}),[a]),playNotificationSound:p,setUpNotifications:d}},Me=(e,t)=>{var n,r,o,A;((e,t,n,r,o)=>{if(!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const A=new window.SpeechSynthesisUtterance;A.text=e,A.lang=t,A.rate=r,A.volume=o;let i=!1;for(const e of n)if(window.speechSynthesis.getVoices().find((t=>{if(t.name===e)return A.voice=t,window.speechSynthesis.speak(A),void(i=!0)})),i)break;i||window.speechSynthesis.speak(A)})(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==(A=e.audio)?void 0:A.volume)},Oe=()=>{const{settings:t}=E(),{audioToggledOn:n,setSyncedAudioToggledOn:r,syncedAudioToggledOnRef:o}=L(),{dispatchRcbEvent:A}=z(),i=e.useCallback((async e=>{var n;e!==o.current&&(null!=(n=t.event)&&n.rcbToggleAudio&&(await A(R.TOGGLE_AUDIO,{currState:o.current,newState:!o.current})).defaultPrevented||r((e=>!e)))}),[o]),a=e.useCallback((async e=>{var n,r;if(null!=(n=t.audio)&&n.disabled||!o.current)return;let i=e;if(null!=(r=t.event)&&r.rcbStartSpeakAudio){const e=await A(R.START_SPEAK_AUDIO,{textToRead:i});if(e.defaultPrevented)return;i=e.data.textToRead}Me(t,i)}),[t,o]);return{audioToggledOn:n,speakAudio:a,toggleAudio:i}},Le=()=>{var t,n;const{settings:r}=E(),{messages:o,setSyncedMessages:A,syncedMessagesRef:i}=W(),{setSyncedIsBotTyping:a,setUnreadCount:s,syncedIsScrollingRef:l,syncedIsChatWindowOpenRef:c}=L(),{streamMessageMap:u,chatBodyRef:d,paramsInputRef:p}=T(),{scrollToBottom:f,getIsChatBotVisible:h}=G(),{dispatchRcbEvent:g}=z(),{speakAudio:m}=Oe(),{playNotificationSound:b}=Qe(),y=e.useCallback(((e,t=!1)=>{var n,o;ve(e);let A=!0;const i=e[e.length-1];if(!i)return;const a=i.sender.toUpperCase();"USER"===a&&(A=!1),null!=(n=r.general)&&n.embedded&&h()&&(A=!1),(c.current&&!l.current||t)&&(A=!1),A&&b(),!t&&("USER"!==a&&null!=(o=r.chatWindow)&&o.autoJumpToBottom||"USER"===a||!l.current)&&setTimeout((()=>f()),1)}),[r,d,c,l,b,f,h]),v=e.useCallback((async(e,t="BOT",n=null)=>{var o,u,d,f,h;if("string"!=typeof e)throw new Error("Content must be of type string to simulate stream.");t=t.toUpperCase();let b=pe(e,t);if(null!=(o=r.event)&&o.rcbStartSimulateStreamMessage){const e=await g(R.START_SIMULATE_STREAM_MESSAGE,{message:b});if(e.defaultPrevented)return null;n=e.data.simulateStreamChunker||n,b=e.data.message}a(!1);let v=30;v="BOT"===t?null==(u=r.botBubble)?void 0:u.streamSpeed:null==(d=r.userBubble)?void 0:d.streamSpeed;const w={...b,content:""};A((e=>[...e,w])),y(i.current);let x=b.content;n&&(x=n(x));let E=0;const k=x.length;"BOT"===b.sender.toUpperCase()&&(c.current||null!=(f=r.general)&&f.embedded)&&"string"==typeof b.content&&""!==b.content.trim()&&m(b.content);const P=new Promise((e=>{const t=setInterval((()=>{if(E>=k)return clearInterval(t),void e();A((e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if(t[e].id===w.id){const n=x[E];n&&(w.content+=n,t[e]=w),E++;break}return t}))}),v)}));return(l.current||!c.current)&&s((e=>e+1)),await P,ve(i.current),null!=(h=r.event)&&h.rcbStopSimulateStreamMessage&&await g(R.STOP_SIMULATE_STREAM_MESSAGE,{message:b}),"USER"===t&&(p.current=e),b}),[r,g,y,i,p,a,s,c,m]),w=e.useCallback((async(e,t="BOT")=>{var n,o,a;t=t.toUpperCase();let u=pe(e,t);if(null!=(n=r.event)&&n.rcbPreInjectMessage){const e=await g(R.PRE_INJECT_MESSAGE,{message:u});if(e.defaultPrevented)return null;u=e.data.message}return"BOT"===u.sender.toUpperCase()&&(c.current||null!=(o=r.general)&&o.embedded)&&"string"==typeof u.content&&""!==u.content.trim()&&m(u.content),(l.current||!c.current)&&s((e=>e+1)),null!=(a=r.event)&&a.rcbPostInjectMessage&&await g(R.POST_INJECT_MESSAGE,{message:u}),A((e=>[...e,u])),y(i.current),"USER"===t&&"string"==typeof e&&(p.current=e),u}),[r,g,y,p,i,c,m,s]),x=e.useCallback((async e=>{var t;const n=i.current.find((t=>t.id===e));return!n||null!=(t=r.event)&&t.rcbRemoveMessage&&(await g(R.REMOVE_MESSAGE,{message:n})).defaultPrevented?null:(A((t=>t.filter((t=>t.id!==e)))),y(i.current),s((e=>Math.max(e-1,0))),n)}),[g,null==(t=r.event)?void 0:t.rcbRemoveMessage,y,i,s]),k=e.useCallback((async(e,t="BOT")=>{var n,o;if(t=t.toUpperCase(),!u.current.has(t)){const o=pe(e,t);return null!=(n=r.event)&&n.rcbStartStreamMessage&&(await g(R.START_STREAM_MESSAGE,{message:o})).defaultPrevented?null:(a(!1),A((e=>[...e,o])),y(i.current),u.current.set(t,o.id),(l.current||!c.current)&&s((e=>e+1)),o)}const d={...pe(e,t),id:u.current.get(t)};return null!=(o=r.event)&&o.rcbChunkStreamMessage&&(await g(R.CHUNK_STREAM_MESSAGE,{message:d})).defaultPrevented?null:(A((e=>e.map((e=>e.id===d.id?d:e)))),y(i.current,!0),d)}),[g,r.event,y,i,a,s,u]),P=e.useCallback((async(e="BOT")=>{var t;if(e=e.toUpperCase(),!u.current.has(e))return!0;const n=u.current.get(e);let o;for(let e=0;e<3;e++){const e=i.current.find((e=>e.id===n));e&&(o=e),await new Promise((e=>setTimeout(e,20)))}return(null==(t=r.event)||!t.rcbStopStreamMessage||!(await g(R.STOP_STREAM_MESSAGE,{message:o})).defaultPrevented)&&(u.current.delete(e),ve(i.current),"USER"===e&&"string"==typeof(null==o?void 0:o.content)&&(p.current=o.content),!0)}),[g,null==(n=r.event)?void 0:n.rcbStopStreamMessage,u,p]);return{simulateStreamMessage:v,injectMessage:w,removeMessage:x,streamMessage:k,endStreamMessage:P,replaceMessages:e.useCallback((e=>{A(e),y(e)}),[y]),messages:o}};let Ne,Re,je,He=!1,Fe=null;const _e=()=>{if(!Ne){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Ne=null!=e?new e:null}return Ne},Ue=(e,t,n,r,o,A)=>{var i,a,s;const l=_e();if(!l)return;if(!He)try{He=!0,l.lang=null==(i=e.voice)?void 0:i.language,l.start()}catch{}const c=null==(a=e.voice)?void 0:a.timeoutPeriod,u=null==(s=e.voice)?void 0:s.autoSendPeriod;l.onresult=i=>{var a,s;clearTimeout(Re),Re=null,clearTimeout(je);const l=i.results[i.results.length-1][0].transcript;if(A.current){const t=null==(a=e.chatInput)?void 0:a.characterLimit,n=A.current.value+l;null!=t&&t>=0&&n.length>t?r(n.slice(0,t)):r(n),o(A.current.value.length)}c&&(Re=setTimeout((async()=>await Ye(t,A)),c)),null!=(s=e.voice)&&s.autoSendDisabled||(je=setTimeout(n,u))},l.onend=()=>{He?(l.start(),!Re&&c&&(Re=setTimeout((async()=>await Ye(t,A)),c))):(clearTimeout(Re),Re=null,clearTimeout(je))},c&&(Re=setTimeout((async()=>await Ye(t,A)),c))},ze=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then((n=>{if(Fe=new MediaRecorder(n),!He)try{He=!0,Fe.start()}catch{}Fe.ondataavailable=e=>{t.current&&t.current.push(e.data)},Fe.onstop=()=>{e(),n.getTracks().forEach((e=>e.stop()))}})).catch((e=>{console.error("Unable to use microphone:",e)}))},Ge=()=>{const e=_e();e&&(He=!1,e&&e.stop(),Fe&&"inactive"!==Fe.state&&(Fe.stop(),Fe=null),clearTimeout(Re),Re=null,clearTimeout(je))},Ye=async(e,t)=>{var n;null!=(n=t.current)&&n.disabled||await e(),Ge()},qe=()=>{const{settings:t}=E(),{voiceToggledOn:n,setSyncedVoiceToggledOn:r,syncedVoiceToggledOnRef:o}=L(),{dispatchRcbEvent:A}=z(),i=e.useCallback((async e=>{var n;e!==o.current&&(null!=(n=t.event)&&n.rcbToggleVoice&&(await A(R.TOGGLE_VOICE,{currState:o.current,newState:!o.current})).defaultPrevented||r((e=>!e)))}),[o]),a=e.useCallback((e=>{((e,t)=>{var n,r,o;const A=_e();null!=(n=t.voice)&&n.disabled||null==(r=t.chatInput)||!r.blockSpam||!A||(e&&!He?(He=!0,null!=(o=t.voice)&&o.sendAsAudio?null==Fe||Fe.start():A.start()):e||Ge())})(e,t)}),[t]);return{voiceToggledOn:n,toggleVoice:i,syncVoice:a}},We=()=>{var t;const{settings:n}=E(),{inputLength:r,setInputLength:o,textAreaDisabled:A,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:l,syncedTextAreaSensitiveModeRef:c}=L(),{inputRef:u,chatBodyRef:d,prevInputRef:p}=T(),{dispatchRcbEvent:f}=z(),{getIsChatBotVisible:h}=G(),g=e.useCallback((async e=>{var t,r,o;if(l.current&&u.current)u.current.value="";else if(u.current&&null!==p.current){const A=null==(t=n.chatInput)?void 0:t.characterLimit,i=(null==(r=n.chatInput)?void 0:r.allowNewline)?e:e.replace(/\n/g," ");if(null!=A&&A>=0&&i.length>A?u.current.value=i.slice(0,A):u.current.value=i,null!=(o=n.event)&&o.rcbTextAreaChangeValue&&(await f(R.TEXT_AREA_CHANGE_VALUE,{currValue:u.current.value,prevValue:p.current})).defaultPrevented)return void(u.current.value=p.current);p.current=u.current.value}}),[l,u,p,n,f]),m=e.useCallback((e=>{var t;null!=(t=u.current)&&t.disabled||setTimeout((()=>{var t,r,o;null!=(t=n.general)&&t.embedded?h()&&(null==(r=u.current)||r.focus()):"start"!==e&&(null==(o=u.current)||o.focus())}),100)}),[u,null==(t=n.general)?void 0:t.embedded,d,h]),b=e.useCallback((()=>{u.current&&u.current.focus()}),[]),y=e.useCallback((()=>{u.current&&u.current.blur()}),[]),v=e.useCallback((()=>u&&u.current?u.current.value:""),[]),w=e.useCallback((e=>{e!==l.current&&i((e=>!e))}),[l]),x=e.useCallback((e=>{e!==c.current&&s((e=>!e))}),[c]);return{textAreaDisabled:A,setSyncedTextAreaDisabled:i,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,inputLength:r,setInputLength:o,getTextAreaValue:v,setTextAreaValue:g,updateTextAreaFocus:m,focusTextArea:b,blurTextArea:y,toggleTextAreaDisabled:w,toggleTextAreaSensitiveMode:x}},Ve=e.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),Xe=()=>e.useContext(Ve),Ke=({children:e})=>{const[t,r,o]=M([]);return n.jsx(Ve.Provider,{value:{toasts:t,setSyncedToasts:r,syncedToastsRef:o},children:e})},Je=()=>{const{settings:t}=E(),{toasts:n,setSyncedToasts:r,syncedToastsRef:o}=Xe(),{dispatchRcbEvent:A}=z(),i=e.useCallback((async(e,n)=>{var i,a,s,l;let c=null;if(o.current.length>=((null==(i=t.toast)?void 0:i.maxCount)??3)){if(null!=(a=t.toast)&&a.forbidOnMax)return null;c=de();let o={id:c,content:e,timeout:n};if(null!=(s=t.event)&&s.rcbShowToast){const e=await A(R.SHOW_TOAST,{toast:o});if(e.defaultPrevented)return null;o=e.data.toast}return r((e=>[...e.slice(1),o])),c}c=de();let u={id:c,content:e,timeout:n};if(null!=(l=t.event)&&l.rcbShowToast){const e=await A(R.SHOW_TOAST,{toast:u});if(e.defaultPrevented)return null;u=e.data.toast}return r((e=>[...e,u])),c}),[t,A]),a=e.useCallback((async e=>{var n;const i=o.current.find((t=>t.id===e));return!i||null!=(n=t.event)&&n.rcbDismissToast&&(await A(R.DISMISS_TOAST,{toast:i})).defaultPrevented?null:(r((t=>t.filter((t=>t.id!==e)))),e)}),[A]);return{showToast:i,dismissToast:a,toasts:n,replaceToasts:e.useCallback((e=>{r(e)}),[])}},Ze=()=>{var t,n,r,o,A;const{settings:i}=E(),{paths:a,setSyncedPaths:s,syncedPathsRef:l}=_(),{flowRef:c,streamMessageMap:u,paramsInputRef:d,keepVoiceOnRef:p,timeoutIdRef:f}=T(),{setSyncedIsBotTyping:h,setSyncedTextAreaDisabled:g,setSyncedTextAreaSensitiveMode:m,blockAllowsAttachment:b,setBlockAllowsAttachment:y}=L(),{dispatchRcbEvent:v}=z(),{endStreamMessage:w,injectMessage:x,removeMessage:k,simulateStreamMessage:P,streamMessage:B}=Le(),{showToast:C,dismissToast:D}=Je(),{toggleChatWindow:S}=G(),{updateTextAreaFocus:I,setTextAreaValue:Q}=We(),{syncVoice:M}=qe(),O=e.useCallback((async e=>{var t;if(null!=(t=i.event)&&t.rcbPostProcessBlock){const t=await v(R.POST_PROCESS_BLOCK,{block:e});if(t.defaultPrevented)return null;e=t.data.block}return e}),[null==(t=i.event)?void 0:t.rcbPostProcessBlock,v]),N=e.useCallback((async(e,t)=>{var n,r,o,A;if(!e)return;let a=c.current[e];if(!a)return void h(!1);if(null!=(n=i.event)&&n.rcbPreProcessBlock){const e=await v(R.PRE_PROCESS_BLOCK,{block:a});if(e.defaultPrevented)return;a=e.data.block}h(!0),null!=(r=i.chatInput)&&r.blockSpam&&g(!0),m(!1);const s={prevPath:t,currPath:e,goToPath:F,setTextAreaValue:Q,userInput:d.current,endStreamMessage:w,injectMessage:x,removeMessage:k,simulateStreamMessage:P,streamMessage:B,toggleChatWindow:S,showToast:C,dismissToast:D};await(async(e,t,n,r,o,A,i)=>{if(!e)throw new Error("Block is not valid.");for(const a of Object.keys(e))switch(a){case"message":await ne(e,t,n);break;case"options":await oe(e,t);break;case"checkboxes":await ee(e,t);break;case"component":await Ae(e,t);break;case"chatDisabled":await ae(e,t,o);break;case"isSensitive":await se(e,t,A);break;case"transition":await ie(e,t,r,i)}})(a,s,(null==(o=i.botBubble)?void 0:o.simulateStream)??!1,f,g,m,O),h(!1),"chatDisabled"in a||g(null==(A=i.chatInput)?void 0:A.disabled),"isSensitive"in a||m(!1),y("function"==typeof a.file),I(e),M(p.current&&!a.chatDisabled),e!==t&&u.current.clear()}),[c,I,M,null==(n=i.botBubble)?void 0:n.simulateStream,null==(r=i.chatInput)?void 0:r.disabled,d,w,x,k,P,B,S,C,D,p,u]),j=e.useCallback((()=>l.current.length>0?l.current.at(-1)??null:null),[]),H=e.useCallback((()=>l.current.length>1?l.current.at(-2)??null:null),[]),F=e.useCallback((async e=>{var t;const n=j(),r=H();return(null==(t=i.event)||!t.rcbChangePath||!(await v(R.CHANGE_PATH,{currPath:n,prevPath:r,nextPath:e})).defaultPrevented)&&(s((t=>[...t,e])),await N(e,n),!0)}),[null==(o=i.chatInput)?void 0:o.blockSpam,null==(A=i.event)?void 0:A.rcbChangePath,N,v]),U=e.useCallback((e=>{s(e)}),[]);return{getCurrPath:j,getPrevPath:H,goToPath:F,blockAllowsAttachment:b,setBlockAllowsAttachment:y,paths:a,replacePaths:U,firePostProcessBlockEvent:O}},$e=()=>{var t,n,r,o;const{settings:A}=E(),{endStreamMessage:i,injectMessage:a,removeMessage:s,simulateStreamMessage:l,streamMessage:c}=Le(),{syncedPathsRef:u}=_(),{getCurrPath:d,getPrevPath:p,goToPath:f,firePostProcessBlockEvent:h}=Ze(),{setSyncedTextAreaSensitiveMode:g,setSyncedTextAreaDisabled:m,setSyncedIsBotTyping:b,setBlockAllowsAttachment:y,setInputLength:v,syncedVoiceToggledOnRef:w,syncedTextAreaSensitiveModeRef:x}=L(),{flowRef:k,inputRef:P,keepVoiceOnRef:B,paramsInputRef:C,timeoutIdRef:D}=T(),{showToast:S,dismissToast:I}=Je(),{dispatchRcbEvent:Q}=z(),{syncVoice:M}=qe(),{setTextAreaValue:O}=We(),{toggleChatWindow:N}=G(),j=e.useCallback((async e=>{var t,n,r,o,i,s;const c=d();if(c&&k.current[c]){if(x.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 l("*".repeat((null==(o=A.sensitiveInput)?void 0:o.asterisksCount)??10),"USER"):await a("*".repeat((null==(i=A.sensitiveInput)?void 0:i.asterisksCount)??10),"USER"))}null!=(s=A.userBubble)&&s.simulateStream?await l(e,"USER"):await a(e,"USER")}}),[k,d,A,a,l,x]),H=e.useCallback((async(e,t=!0)=>{var n,r;if(""===(e=e.trim()))return;t&&await j(e),D.current&&clearTimeout(D.current),P.current&&(O(""),v(0));const o=d();if(!o)return;let x=k.current[o];const E=await h(x);E&&(null!=(n=A.chatInput)&&n.blockSpam&&m(!0),B.current=w.current,M(!1),setTimeout((()=>{b(!0)}),400),g(!1),setTimeout((async()=>{var e;const t={prevPath:p(),currPath:d(),goToPath:f,setTextAreaValue:O,userInput:C.current,injectMessage:a,simulateStreamMessage:l,streamMessage:c,removeMessage:s,endStreamMessage:i,toggleChatWindow:N,showToast:S,dismissToast:I},n=u.current.length;await le(E,t),u.current.length===n&&(m("chatDisabled"in x?!!x.chatDisabled:!(null==(e=A.chatInput)||!e.disabled)),se(x,t,g),y("function"==typeof x.file),M(B.current),b(!1))}),null==(r=A.chatInput)?void 0:r.botDelay))}),[D,null==(t=A.chatInput)?void 0:t.blockSpam,null==(n=A.chatInput)?void 0:n.botDelay,null==(r=A.chatInput)?void 0:r.disabled,B,w,M,j,p,d,f,a,l,c,s,i,N,S,I,k]);return{handleSubmitText:e.useCallback((async(e,t=!0)=>{var n,r;e=e??(null==(n=P.current)?void 0:n.value),!(null!=(r=A.event)&&r.rcbUserSubmitText&&(await Q(R.USER_SUBMIT_TEXT,{inputText:e,sendInChat:t})).defaultPrevented||!d())&&H(e,t)}),[Q,d,H,P,null==(o=A.event)?void 0:o.rcbUserSubmitText])}},et=()=>{var t;const{settings:n}=E();return e.useMemo((()=>{var e;if(typeof window>"u"||!window.navigator)return!1;if(null==(e=n.device)||!e.applyMobileOptimizations)return!0;const t=navigator.userAgent,r=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t),o=window.innerWidth>=768;return r&&o}),[null==(t=n.device)?void 0:t.applyMobileOptimizations])},tt=({buttons:t})=>{var r,o,A,i,a,s,l,c,u,d,p;const f=et(),{settings:h}=E(),{styles:g}=C(),{textAreaDisabled:m,textAreaSensitiveMode:b,inputLength:y,hasFlowStarted:v,setHasFlowStarted:w,setInputLength:x}=L(),{inputRef:k}=T(),[P,B]=e.useState(!1),[D,S]=e.useState(!1),{handleSubmitText:I}=$e(),{setTextAreaValue:Q}=We(),M={boxSizing:f?"content-box":"border-box",...g.chatInputAreaStyle},O={outline:m?"":"none",boxShadow:m?"":`0 0 5px ${null==(r=h.general)?void 0:r.primaryColor}`,boxSizing:f?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaFocusedStyle},N={cursor:`url("${null==(o=h.general)?void 0:o.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:f?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaDisabledStyle},R={color:"#989898",...g.characterLimitStyle},j={color:"#ff0000",...g.characterLimitReachedStyle},H=m?null==(A=h.chatInput)?void 0:A.disabledPlaceholderText:null==(i=h.chatInput)?void 0:i.enabledPlaceholderText,F=()=>{m||B(!0)},_=()=>{B(!1)},U=()=>{S(!0)},z=()=>{S(!1)},G=async e=>{var t;if(!D&&"Enter"===e.key){if(e.shiftKey)return void(null!=(t=h.chatInput)&&t.allowNewline||e.preventDefault());e.preventDefault(),await I()}},Y=e=>{k.current&&(Q(e.target.value),x(k.current.value.length))};return n.jsxs("div",{"aria-label":(null==(a=h.ariaLabel)?void 0:a.inputTextArea)??"input text area",role:"textbox",onMouseDown:e=>{var t;e.stopPropagation(),!v&&"ON_CHATBOT_INTERACT"===(null==(t=h.general)?void 0:t.flowStartTrigger)&&w(!0)},style:{...g.chatInputContainerStyle},className:"rcb-chat-input",children:[b&&null!=(s=h.sensitiveInput)&&s.maskInTextArea?n.jsx("input",{ref:k,type:"password",className:"rcb-chat-input-textarea",style:m?N:P?O:M,placeholder:H,onChange:Y,onKeyDown:G,onFocus:F,onBlur:_,onCompositionStart:U,onCompositionEnd:z}):n.jsx("textarea",{ref:k,style:m?N:P?O:M,rows:1,className:"rcb-chat-input-textarea",placeholder:H,onChange:Y,onKeyDown:G,onFocus:F,onBlur:_,onCompositionStart:U,onCompositionEnd:z}),n.jsxs(n.Fragment,{children:[null==t?void 0:t.map(((t,r)=>n.jsx(e.Fragment,{children:t},r))),(null==(l=h.chatInput)?void 0:l.showCharacterCount)&&null!=(null==(c=h.chatInput)?void 0:c.characterLimit)&&(null==(u=h.chatInput)?void 0:u.characterLimit)>0&&n.jsxs("div",{className:"rcb-chat-input-char-counter",style:y>=(null==(d=h.chatInput)?void 0:d.characterLimit)?j:R,children:[y,"/",null==(p=h.chatInput)?void 0:p.characterLimit]})]})]})},nt=({buttons:t})=>{var r;const{settings:o}=E(),{styles:A}=C();return n.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...A.footerStyle},className:"rcb-chat-footer-container",children:[n.jsx("div",{className:"rcb-chat-footer",children:null==t?void 0:t.map(((t,r)=>n.jsx(e.Fragment,{children:t},r)))}),n.jsx("span",{children:null==(r=o.footer)?void 0:r.text})]})},rt=()=>{var e,t,r,o,A,i,a;const{settings:s}=E(),{styles:l}=C(),{unreadCount:c}=L(),{isChatWindowOpen:u,toggleChatWindow:d}=G(),p={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})`,...l.chatButtonStyle},f={backgroundImage:`url(${null==(r=s.chatButton)?void 0:r.icon})`,fill:"#fff",width:75,height:75,...l.chatIconStyle};return n.jsx(n.Fragment,{children:!(null!=(o=s.general)&&o.embedded)&&n.jsxs("div",{"aria-label":(null==(A=s.ariaLabel)?void 0:A.chatButton)??"open chat",role:"button",style:p,className:"rcb-toggle-button "+(u?"rcb-button-hide":"rcb-button-show"),onClick:()=>d(!0),children:[(()=>{var e;const t=null==(e=s.chatButton)?void 0:e.icon;return t&&"string"!=typeof t?t&&n.jsx("span",{className:"rcb-toggle-icon",children:n.jsx(t,{style:f})}):n.jsx("span",{className:"rcb-toggle-icon",style:f})})(),!(null!=(i=s.notification)&&i.disabled)&&(null==(a=s.notification)?void 0:a.showCount)&&n.jsx("span",{style:{...l.notificationBadgeStyle},className:"rcb-badge",children:c})]})})},ot=()=>{var t,r,o,A;const i=et(),{settings:a}=E(),{styles:s}=C(),{chatBodyRef:l}=T(),{isChatWindowOpen:c,toggleChatWindow:u}=G(),[d,p]=e.useState(!1),[f,h]=e.useState(!1),[g,m]=e.useState(0);e.useEffect((()=>{var e,t,n;const r=null==(e=a.tooltip)?void 0:e.mode;if("ALWAYS"===r)if(i){let e;e=c?((null==(t=l.current)?void 0:t.offsetWidth)??375)-("number"==typeof(null==(n=s.chatButtonStyle)?void 0:n.width)?s.chatButtonStyle.width:75):0,m(e),p(!0)}else p(!c);else"NEVER"===r?p(!1):"START"===r?f?p(!1):(h(!0),p(!0)):"CLOSE"===r&&p(!c)}),[c]);const b={transform:`translateX(-${g}px)`,right:((null==(t=s.chatButtonStyle)?void 0:t.width)??75)+40,bottom:30,backgroundColor:null==(r=a.general)?void 0:r.secondaryColor,color:"#fff",...s.tooltipStyle},y={borderColor:`transparent transparent transparent ${b.backgroundColor}`};return n.jsx(n.Fragment,{children:!(null!=(o=a.general)&&o.embedded)&&n.jsxs("div",{"data-testid":"chat-tooltip",style:b,className:"rcb-chat-tooltip "+(d?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>u(!0),children:[n.jsx("span",{children:null==(A=a.tooltip)?void 0:A.text}),n.jsx("span",{className:"rcb-chat-tooltip-tail",style:y})]})})},At=({id:t,content:r,timeout:o})=>{var A,i;const{settings:a}=E(),{styles:s}=C(),[l]=e.useState({toastPromptStyle:{...s.toastPromptStyle},toastPromptHoveredStyle:{...s.toastPromptHoveredStyle}}),{dismissToast:c}=Je(),[u,d]=e.useState(!1),p={color:null==(A=a.general)?void 0:A.primaryColor,borderColor:null==(i=a.general)?void 0:i.primaryColor,...l.toastPromptHoveredStyle};return e.useEffect((()=>{if(o){const e=setTimeout((()=>{c(t)}),o);return()=>clearTimeout(e)}}),[t,c,o]),"string"==typeof r?n.jsx("div",{onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},style:u?p:l.toastPromptStyle,onMouseDown:async e=>{var n;null!=(n=a.toast)&&n.dismissOnClick&&(e.preventDefault(),await c(t))},className:"rcb-toast-prompt",children:r}):n.jsx(n.Fragment,{children:r})},it=()=>{var e,t,r,o,A,i,a,s,l,c,u,d;const{styles:p}=C(),{toasts:f}=Xe(),h={bottom:`calc(${"number"==typeof(null==(e=p.footerStyle)?void 0:e.height)?`${null==(t=p.footerStyle)?void 0:t.height}px`:(null==(r=p.footerStyle)?void 0:r.height)??"50px"} + ${"number"==typeof(null==(o=p.chatInputContainerStyle)?void 0:o.height)?`${null==(A=p.chatInputContainerStyle)?void 0:A.height}px`:(null==(i=p.chatInputContainerStyle)?void 0:i.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${"number"==typeof(null==(a=p.chatWindowStyle)?void 0:a.width)?`${null==(s=p.chatWindowStyle)?void 0:s.width}px`:(null==(l=p.chatWindowStyle)?void 0:l.width)??"375px"} / 2)`,maxWidth:`calc(${"number"==typeof(null==(c=p.chatWindowStyle)?void 0:c.width)?`${null==(u=p.chatWindowStyle)?void 0:u.width}px`:(null==(d=p.chatWindowStyle)?void 0:d.width)??"375px"} - 50px)`,...p.toastPromptContainerStyle};return n.jsx("div",{className:"rcb-toast-prompt-container",style:h,children:f.map((e=>n.jsx(At,{id:e.id,content:e.content,timeout:e.timeout},e.id)))})},at=({file:e,fileType:t,fileUrl:r})=>{var o,A,i;const{settings:a}=E(),{styles:s}=C(),l={backgroundColor:null==(o=a.general)?void 0:o.primaryColor,maxWidth:null!=(A=a.userBubble)&&A.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return n.jsx(n.Fragment,{children:r?n.jsxs(n.Fragment,{children:["image"===t&&r&&n.jsx("div",{style:l,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:n.jsx("img",{src:r,alt:"Image Display",className:"rcb-media-display-image"})}),"video"===t&&r&&n.jsx("div",{style:l,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:n.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[n.jsx("source",{src:r,type:e.type}),"Your browser does not support the video tag."]})}),"audio"===t&&r&&n.jsxs("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:null!=(i=a.userBubble)&&i.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[n.jsx("source",{src:r,type:e.type}),"Your browser does not support the audio tag."]})]}):n.jsx(n.Fragment,{})})},st=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}}},lt=()=>{var e,t,r,o,A,i;const{settings:a}=E(),{styles:s}=C(),{injectMessage:l,simulateStreamMessage:c,streamMessage:u,removeMessage:d,endStreamMessage:p}=Le(),{getCurrPath:f,getPrevPath:h,goToPath:g,blockAllowsAttachment:m}=Ze(),{flowRef:b,inputRef:y}=T(),v=b.current,{showToast:w,dismissToast:x}=Je(),{dispatchRcbEvent:k}=z(),{toggleChatWindow:P}=G(),{setTextAreaValue:B}=We(),{handleSubmitText:D}=$e(),S={cursor:`url("${null==(e=a.general)?void 0:e.actionDisabledIcon}"), auto`,...s.fileAttachmentButtonStyle,...s.fileAttachmentButtonDisabledStyle},I={backgroundImage:`url(${null==(t=a.fileAttachment)?void 0:t.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle},Q={backgroundImage:`url(${null==(r=a.fileAttachment)?void 0:r.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle,...s.fileAttachmentIconDisabledStyle};return n.jsxs("label",{"aria-label":(null==(o=a.ariaLabel)?void 0:o.fileAttachmentButton)??"upload file",role:"button",className:m?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:m?{...s.fileAttachmentButtonStyle}:S,children:[n.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async e=>{var t,r,o,A;const i=e.target.files;if(!i)return;const s=Array.from(i);if(e.target.value="",null!=(t=a.event)&&t.rcbUserUploadFile&&(await k(R.USER_UPLOAD_FILE,{files:s})).defaultPrevented)return;const m=f();if(!m)return;const b=v[m];if(!b)return;const E=b.file;if(null!=E){const e=[];for(let t=0;t<s.length;t++){if(e.push(s[t].name),null==(r=a.fileAttachment)||!r.showMediaDisplay)continue;const o=await st(s[t]);!o.fileType||!o.fileUrl||await l(n.jsx(at,{file:s[t],fileType:o.fileType,fileUrl:o.fileUrl}),"USER")}await D("📄 "+e.join(", "),null==(o=a.fileAttachment)?void 0:o.sendFileName),await E({userInput:null==(A=y.current)?void 0:A.value,prevPath:h(),currPath:f(),goToPath:g,setTextAreaValue:B,injectMessage:l,simulateStreamMessage:c,streamMessage:u,removeMessage:d,endStreamMessage:p,toggleChatWindow:P,showToast:w,dismissToast:x,files:s})}},multiple:null==(A=a.fileAttachment)?void 0:A.multiple,accept:null==(i=a.fileAttachment)?void 0:i.accept,disabled:!m}),(()=>{var e,t;const r=m?null==(e=a.fileAttachment)?void 0:e.icon:null==(t=a.fileAttachment)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:m?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:n.jsx(r,{style:m?I:Q})}):n.jsx("span",{className:m?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:m?I:Q})})()]})},ct=()=>{var t,r,o,A,i,a;const{settings:s}=E(),{styles:l}=C(),{syncedTextAreaDisabledRef:c}=L(),{inputRef:u}=T(),{textAreaDisabled:d,setTextAreaValue:p}=We(),f=e.useRef(null),h=e.useRef(null),[g,m]=e.useState(!1),b={cursor:`url("${null==(t=s.general)?void 0:t.actionDisabledIcon}"), auto`,...l.emojiButtonStyle,...l.emojiButtonDisabledStyle},y={backgroundImage:`url(${null==(r=s.emoji)?void 0:r.icon})`,fill:"#a6a6a6",...l.emojiIconStyle},v={backgroundImage:`url(${null==(o=s.emoji)?void 0:o.icon})`,fill:"#a6a6a6",...l.emojiIconStyle,...l.emojiIconDisabledStyle};e.useEffect((()=>{const e=e=>{const t=e.composedPath();f.current&&!t.includes(f.current)&&h.current&&!t.includes(h.current)&&m(!1)},t=()=>{(()=>{if(f.current&&h.current){const e=h.current.getBoundingClientRect(),t=f.current.offsetHeight,n=e.top-t-8;f.current.style.left=`${e.left}px`,f.current.style.top=`${n}px`}})()};return document.addEventListener("mousedown",e),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t)}}),[]);return n.jsxs(n.Fragment,{children:[n.jsx("div",{"aria-label":(null==(A=s.ariaLabel)?void 0:A.emojiButton)??"emoji picker",role:"button",ref:h,className:""+(d?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled"),style:d?b:{...l.emojiButtonStyle},onMouseDown:e=>{e.preventDefault(),c.current?m(!1):m((e=>!e))},children:(()=>{var e,t;const r=d?null==(e=s.emoji)?void 0:e.iconDisabled:null==(t=s.emoji)?void 0:t.icon;return r&&"string"!=typeof r?r&&n.jsx("span",{className:""+(d?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),children:n.jsx(r,{style:d?v:y})}):n.jsx("span",{className:""+(d?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),style:d?v:y})})()}),g&&n.jsx("div",{className:"rcb-emoji-button-popup",ref:f,children:null==(a=null==(i=s.emoji)?void 0:i.list)?void 0:a.map(((e,t)=>n.jsx("span",{className:"rcb-emoji",onMouseDown:t=>((e,t)=>{e.preventDefault(),u.current&&(p(u.current.value+t),setTimeout((()=>{const e=u.current;if(e){e.focus();const t=e.value.length;e.setSelectionRange(t,t)}}),50)),m(!1)})(t,e),children:e},t)))})]})},ut=()=>{var e,t,r;const{settings:o}=E(),{styles:A}=C(),{audioToggledOn:i,toggleAudio:a}=Oe(),s={backgroundImage:`url(${null==(e=o.audio)?void 0:e.icon})`,fill:"#fcec3d",...A.audioIconStyle},l={backgroundImage:`url(${null==(t=o.audio)?void 0:t.iconDisabled})`,fill:"#e8eaed",...A.audioIconStyle,...A.audioIconDisabledStyle};return n.jsx("div",{"aria-label":(null==(r=o.ariaLabel)?void 0:r.audioButton)??"toggle audio",role:"button",onMouseDown:async e=>{e.preventDefault(),await a()},style:i?{...A.audioButtonStyle}:{...A.audioButtonStyle,...A.audioButtonDisabledStyle},children:(()=>{var e,t;const r=i?null==(e=o.audio)?void 0:e.icon:null==(t=o.audio)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:n.jsx(r,{style:i?s:l,"data-testid":"rcb-audio-icon-svg"})}):n.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:i?s:l})})()})},dt=()=>{var e,t;const{settings:r}=E(),{styles:o}=C(),{toggleChatWindow:A}=G(),i={backgroundImage:`url(${null==(e=r.header)?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...o.closeChatIconStyle};return n.jsx("div",{"aria-label":(null==(t=r.ariaLabel)?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:e=>{e.stopPropagation(),A(!1)},style:{...o.closeChatButtonStyle},children:(()=>{var e;const t=null==(e=r.header)?void 0:e.closeChatIcon;return t&&"string"!=typeof t?t&&n.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:n.jsx(t,{style:i})}):n.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:i})})()})},pt=()=>{var e,t,r;const{settings:o}=E(),{styles:A}=C(),{notificationsToggledOn:i,toggleNotifications:a}=(()=>{const{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}=Qe();return{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}})(),s={backgroundImage:`url(${null==(e=o.notification)?void 0:e.icon})`,fill:"#fcec3d",...A.notificationIconStyle},l={backgroundImage:`url(${null==(t=o.notification)?void 0:t.iconDisabled})`,fill:"#e8eaed",...A.notificationIconStyle,...A.notificationIconDisabledStyle};return n.jsx("div",{"aria-label":(null==(r=o.ariaLabel)?void 0:r.notificationButton)??"toggle notifications",role:"button",onMouseDown:async e=>{e.preventDefault(),await a()},style:i?{...A.notificationButtonStyle}:{...A.notificationButtonStyle,...A.notificationButtonDisabledStyle},children:(()=>{var e,t;const r=i?null==(e=o.notification)?void 0:e.icon:null==(t=o.notification)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:n.jsx(r,{style:i?s:l,"data-testid":"rcb-notification-icon-svg"})}):n.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:i?s:l})})()})},ft=()=>{var t,r,o;const{settings:A}=E(),{styles:i}=C(),{injectMessage:a}=Le(),{inputRef:s}=T(),{voiceToggledOn:l,toggleVoice:c}=qe(),{setInputLength:u,setTextAreaValue:d,textAreaDisabled:p}=We(),{handleSubmitText:f}=$e(),h=e.useRef([]),[g,m]=e.useState(!1);e.useEffect((()=>{var e;null!=(e=A.voice)&&e.sendAsAudio?(w(),h.current=[]):f()}),[g]),e.useEffect((()=>{l?((e,t,n,r,o,A,i)=>{var a;null!=(a=e.voice)&&a.sendAsAudio?ze(n,A):Ue(e,t,n,r,o,i)})(A,c,v,d,u,h,s):Ge()}),[l]);const b={backgroundImage:`url(${null==(t=A.voice)?void 0:t.icon})`,fill:"#9aa0a6",...i.voiceIconStyle},y={backgroundImage:`url(${null==(r=A.voice)?void 0:r.iconDisabled})`,fill:"#9aa0a6",...i.voiceIconStyle,...i.voiceIconDisabledStyle},v=()=>{m((e=>!e))},w=async()=>{const e=new Blob(h.current,{type:"audio/wav"}),t=new File([e],"voice-input.wav",{type:"audio/wav"}),r=await st(t);!r.fileType||!r.fileUrl||await a(n.jsx(at,{file:t,fileType:r.fileType,fileUrl:r.fileUrl}),"USER")};return n.jsx("div",{"aria-label":(null==(o=A.ariaLabel)?void 0:o.voiceButton)??"toggle voice",role:"button",onMouseDown:async e=>{e.preventDefault(),!p&&await c()},style:l&&!p?{...i.voiceButtonStyle}:{...i.voiceButtonStyle,...i.voiceButtonDisabledStyle},className:l&&!p?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var e,t;const r=l?null==(e=A.voice)?void 0:e.icon:null==(t=A.voice)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:"rcb-voice-icon "+(l&&!p?"on":""),children:n.jsx(r,{style:l&&!p?b:y})}):n.jsx("span",{className:"rcb-voice-icon"+(l&&!p?"-on":""),"data-testid":"rcb-voice-icon",style:l&&!p?b:y})})()})},ht=()=>{var t,r,o,A,i,a,s,l;const{settings:c}=E(),{styles:u}=C(),{textAreaDisabled:d}=L(),[p,f]=e.useState(!1),{handleSubmitText:h}=$e(),g={backgroundColor:null==(t=c.general)?void 0:t.primaryColor,...u.sendButtonStyle},m={cursor:`url("${null==(r=c.general)?void 0:r.actionDisabledIcon}"), auto`,backgroundColor:null==(o=c.general)?void 0:o.primaryColor,...u.sendButtonStyle,...u.sendButtonDisabledStyle},b={backgroundColor:null==(A=c.general)?void 0:A.secondaryColor,...u.sendButtonStyle,...u.sendButtonHoveredStyle},y={backgroundImage:`url(${null==(i=c.chatInput)?void 0:i.sendButtonIcon})`,fill:"#fff",...u.sendIconStyle},v={backgroundImage:`url(${null==(a=c.chatInput)?void 0:a.sendButtonIcon})`,fill:"#fff",...u.sendIconStyle,...u.sendIconDisabledStyle},w={backgroundImage:`url(${null==(s=c.chatInput)?void 0:s.sendButtonIcon})`,fill:"#fff",...u.sendIconStyle,...u.sendIconHoveredStyle};return n.jsx("div",{"aria-label":(null==(l=c.ariaLabel)?void 0:l.sendButton)??"send message",role:"button",onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onMouseDown:async e=>{null==e||e.preventDefault(),!d&&await h()},style:d?m:p?b:g,className:"rcb-send-button",children:(()=>{var e;const t=null==(e=c.chatInput)?void 0:e.sendButtonIcon;return t&&"string"!=typeof t?t&&n.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:n.jsx(t,{style:d?v:p?w:y})}):n.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:d?v:p?w:y})})()})},gt=(e,t)=>{var n,r,o,A,i,a,l,c,u;const d={[s.AUDIO_BUTTON]:null==(n=e.audio)?void 0:n.disabled,[s.CLOSE_CHAT_BUTTON]:null==(r=e.general)?void 0:r.embedded,[s.EMOJI_PICKER_BUTTON]:null==(o=e.emoji)?void 0:o.disabled,[s.FILE_ATTACHMENT_BUTTON]:null==(A=e.fileAttachment)?void 0:A.disabled,[s.NOTIFICATION_BUTTON]:null==(i=e.notification)?void 0:i.disabled,[s.SEND_MESSAGE_BUTTON]:!1,[s.VOICE_MESSAGE_BUTTON]:null==(a=e.voice)?void 0:a.disabled},p={},f=e=>e?e.map((e=>{if("string"==typeof e){if((e=>Object.values(s).includes(e))(e)&&!d[e]){if(p[e])return p[e];const n=t[e];if("function"==typeof n){const t=n();return p[e]=t,t}return null}return null}return e})).filter((e=>null!==e)):[];return{header:f(null==(l=e.header)?void 0:l.buttons),chatInput:f(null==(c=e.chatInput)?void 0:c.buttons),footer:f(null==(u=e.footer)?void 0:u.buttons)}},mt=()=>{const{settings:t}=E(),r=e.useMemo((()=>({[s.CLOSE_CHAT_BUTTON]:()=>n.jsx(dt,{}),[s.AUDIO_BUTTON]:()=>n.jsx(ut,{}),[s.NOTIFICATION_BUTTON]:()=>n.jsx(pt,{}),[s.EMOJI_PICKER_BUTTON]:()=>n.jsx(ct,{}),[s.FILE_ATTACHMENT_BUTTON]:()=>n.jsx(lt,{}),[s.SEND_MESSAGE_BUTTON]:()=>n.jsx(ht,{}),[s.VOICE_MESSAGE_BUTTON]:()=>n.jsx(ft,{})})),[]),{header:o,chatInput:A,footer:i}=e.useMemo((()=>gt(t,r)),[t,r]);return{headerButtons:e.useMemo((()=>o),[o]),chatInputButtons:e.useMemo((()=>A),[A]),footerButtons:e.useMemo((()=>i),[i])}},bt=()=>{const{settings:t}=E(),{styles:r}=C(),{setSyncedMessages:o,syncedMessagesRef:A}=W(),{isLoadingChatHistory:i,setIsLoadingChatHistory:a,hasChatHistoryLoaded:s,setHasChatHistoryLoaded:l}=L(),{chatBodyRef:c}=T(),{dispatchRcbEvent:u}=z(),d=e.useCallback((async()=>{var e,i;const s=we();if(!s||null!=(e=t.event)&&e.rcbLoadChatHistory&&(await u(R.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;a(!0);const d=(null==(i=c.current)?void 0:i.scrollHeight)??0;((e,t,r,o,A,i,a,s,l)=>{var c;if(he=!0,null!=r)try{const c=pe(n.jsx(ue,{}),"SYSTEM"),u=A.current.slice(1);o([c,...u]);const d=r.map((n=>{if("object"===n.type){const r=Be(n.content,e,t);return{...n,content:r}}return n}));setTimeout((()=>{var t;const r=A.current.slice(1);let i=null!=(t=e.chatHistory)&&t.autoLoad?pe(n.jsx(n.Fragment,{}),"SYSTEM"):pe(n.jsx(ce,{}),"SYSTEM");o([...d,i,...r]),l(!0)}),500),setTimeout((()=>{if(!i.current)return;const{scrollHeight:e}=i.current,t=e-a;i.current.scrollTop+=t,s(!1)}),510)}catch{fe.removeItem(null==(c=e.chatHistory)?void 0:c.storageKey)}})(t,r,s,o,A,c,d,a,l)}),[t,r,u,A,c,a,l]);return{isLoadingChatHistory:i,setIsLoadingChatHistory:a,hasChatHistoryLoaded:s,showChatHistory:d}},yt=()=>{var t,r,o;const{settings:A}=E(),{styles:i}=C(),{showChatHistory:a}=bt(),[s,l]=e.useState(!1),c={color:null==(t=A.general)?void 0:t.primaryColor,borderColor:null==(r=A.general)?void 0:r.primaryColor,...i.chatHistoryButtonStyle,...i.chatHistoryButtonHoveredStyle};return n.jsx("div",{className:"rcb-view-history-container",children:n.jsx("div",{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},style:s?c:{...i.chatHistoryButtonStyle},onMouseDown:e=>{e.preventDefault(),a()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:n.jsx("p",{children:null==(o=A.chatHistory)?void 0:o.viewChatHistoryButtonText})})})},vt=()=>{var t,r,o,A;const i=et(),{settings:a}=E(),{replaceMessages:s}=Le(),{isBotTyping:l,isChatWindowOpen:c,setUnreadCount:u,setSyncedIsChatWindowOpen:d,setSyncedTextAreaDisabled:p,setSyncedAudioToggledOn:f,setSyncedVoiceToggledOn:h,setSyncedIsScrolling:g,syncedIsScrollingRef:m,syncedIsChatWindowOpenRef:b}=L(),{chatBodyRef:y}=T(),{viewportHeight:v,setViewportHeight:w,setViewportWidth:x,scrollToBottom:k}=G(),{setUpNotifications:P}=Qe(),{handleFirstInteraction:B}=(()=>{var t;const{settings:n}=E(),{hasInteractedPage:r,setHasInteractedPage:o,hasFlowStarted:A,setHasFlowStarted:i}=L(),a=e.useCallback((()=>{var e;if(o(!0),!A&&"ON_PAGE_INTERACT"===(null==(e=n.general)?void 0:e.flowStartTrigger)&&i(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const t=new window.SpeechSynthesisUtterance;t.text="",t.onend=()=>{window.removeEventListener("click",a),window.removeEventListener("keydown",a),window.removeEventListener("touchstart",a)},window.speechSynthesis.speak(t)}),[A,null==(t=n.general)?void 0:t.flowStartTrigger]);return{hasInteractedPage:r,handleFirstInteraction:a}})(),{showChatHistory:C}=bt(),D=e.useRef(0),S=e.useRef(!1);e.useEffect((()=>(window.addEventListener("click",B),window.addEventListener("keydown",B),window.addEventListener("touchstart",B),()=>{window.removeEventListener("click",B),window.removeEventListener("keydown",B),window.removeEventListener("touchstart",B)})),[]),e.useEffect((()=>{const e=y.current;if(!e)return;const t=()=>{S.current||(S.current=!0,requestAnimationFrame((()=>{var t,n;if(!e)return;const{scrollTop:r,clientHeight:o,scrollHeight:A}=e,i=r+o<A-((null==(t=a.chatWindow)?void 0:t.messagePromptOffset)??30);g(i),m.current=i,i||(r+o>=A-1&&(e.scrollTop=A-o-1),(b.current||null!=(n=a.general)&&n.embedded)&&u(0)),S.current=!1})))};return e.addEventListener("wheel",t,{passive:!0}),e.addEventListener("touchmove",t,{passive:!0}),()=>{e.removeEventListener("wheel",t),e.removeEventListener("touchmove",t)}}),[]),e.useEffect((()=>{var e,t,n;p(null==(e=a.chatInput)?void 0:e.disabled),d(null==(t=a.chatWindow)?void 0:t.defaultOpen),f(null==(n=a.audio)?void 0:n.defaultToggledOn),setTimeout((()=>{var e;h(null==(e=a.voice)?void 0:e.defaultToggledOn)}),1)}),[]),e.useEffect((()=>{var e;null!=(e=a.notification)&&e.disabled||P()}),[null==(t=a.notification)?void 0:t.disabled]),e.useEffect((()=>{!m.current&&null!=y&&y.current&&k()}),[l]),e.useEffect((()=>{var e,t;if(null!=(e=a.chatHistory)&&e.disabled)fe&&fe.removeItem(ge);else if(ke(a),we().length>0){const e=pe(n.jsx(yt,{}),"SYSTEM");s([e]),null!=(t=a.chatHistory)&&t.autoLoad&&C()}}),[null==(r=a.chatHistory)?void 0:r.storageKey,null==(o=a.chatHistory)?void 0:o.maxEntries,null==(A=a.chatHistory)?void 0:A.disabled]),e.useEffect((()=>{var e;i||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;w(null==(e=window.visualViewport)?void 0:e.height)}),101),setTimeout((()=>{var e,t;v!=(null==(e=window.visualViewport)?void 0:e.height)&&w(null==(t=window.visualViewport)?void 0:t.height)}),1001)):setTimeout((()=>{var e;w((null==(e=window.visualViewport)?void 0:e.height)-o)}),101)})))}),[i]),e.useEffect((()=>{var e,t,n,r;if(i)return;c&&(w(null==(e=window.visualViewport)?void 0:e.height),x(null==(t=window.visualViewport)?void 0:t.width));const o=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),A=()=>D.current=window.scrollY,a=()=>{var e,t;w(null==(e=window.visualViewport)?void 0:e.height),x(null==(t=window.visualViewport)?void 0:t.width)},s=()=>{var e;window.removeEventListener("scroll",o),window.removeEventListener("scroll",A),null==(e=window.visualViewport)||e.removeEventListener("resize",a)};return c?(s(),document.body.style.position="fixed",window.addEventListener("scroll",o),null==(n=window.visualViewport)||n.addEventListener("resize",a)):(document.body.style.position="static",s(),window.scrollTo({top:D.current,left:0,behavior:"auto"}),window.addEventListener("scroll",A),null==(r=window.visualViewport)||r.removeEventListener("resize",a)),s}),[c,i])},wt="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",xt="2592000",Et="RCB_THEME_CACHE_DATA",kt=async(e,t)=>{const{id:n,version:r,baseUrl:o=wt,cacheDuration:A=xt}=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,o);if(!i)return console.error(`Unable to find version for theme: ${n}`),{settings:{},inlineStyles:{},cssStylesText:""};const a=((e,t,n)=>{const r=localStorage.getItem(`${Et}_${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,i,A);if(a){const t=Pt(e,a.cssStylesText);return{settings:a.settings,inlineStyles:a.inlineStyles,cssStylesText:t}}const s=`${o}/${n}/${i}/styles.css`,l=`${o}/${n}/${i}/settings.json`,c=`${o}/${n}/${i}/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 p=await fetch(l);let f={};p.ok?f=await p.json():console.info(`Could not fetch settings.json from ${l}`);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 A=(new Date).getTime(),i={settings:n,inlineStyles:r,cssStylesText:o,cacheDate:Math.floor(A/1e3)};localStorage.setItem(`${Et}_${e}_${t}`,JSON.stringify(i))})(n,i,f,g,u);return{settings:f,inlineStyles:g,cssStylesText:Pt(e,u)}},Pt=(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"),Bt=async(e,t,n,r)=>{var o,A;let i=Dt(w),a=Dt(P),s="";if(null!=r)if(Array.isArray(r))for(const t of r){const n=await kt(e,t);i=Ct(n.settings,i),a=Ct(n.inlineStyles,a),s+=n.cssStylesText}else{const t=await kt(e,r);i=Ct(t.settings,i),a=Ct(t.inlineStyles,a),s+=t.cssStylesText}return null!=t&&(i=Ct(t,i)),null!=n&&(a=Ct(n,a)),null!=(null==(o=i.chatInput)?void 0:o.botDelay)&&(null==(A=i.chatInput)?void 0:A.botDelay)<500&&(i.chatInput.botDelay=500),{settings:i,inlineStyles:a,cssStylesText:s}},Ct=(t,n)=>{const r=[{source:t,target:n}];for(;r.length;){const t=r.pop();if(null==t)continue;const{source:n,target:o}=t;for(const t of Object.keys(n)){const A=t;if(e.isValidElement(n[A]))o[A]=n[A];else if("object"!=typeof n[A]||null===n[A]||Array.isArray(n[A]))try{o[A]=n[A]}catch{}else("object"!=typeof o[A]||null===o[A])&&(o[A]={}),r.push({source:n[A],target:o[A]})}}return n},Dt=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 A=t[e];if(A&&"object"==typeof A)if(r.has(A))o[e]=r.get(A);else{const t=Array.isArray(A)?[]:{};r.set(A,t),o[e]=t,n.push({source:A,target:t})}else o[e]=A}}return t},St=()=>{const{settings:t,setSettings:n}=E(),r=e.useCallback((e=>{!e||0===Object.keys(e).length||n(Dt(Ct(e,t)))}),[t]),o=e.useCallback((e=>{n(e)}),[]);return{settings:t,replaceSettings:o,updateSettings:r}},It=()=>{const{styles:t,setStyles:n}=C(),r=e.useCallback((e=>{!e||0===Object.keys(e).length||n(Dt(Ct(e,t)))}),[t]),o=e.useCallback((e=>{n(e)}),[]);return{styles:t,replaceStyles:o,updateStyles:r}},Tt=({plugins:t})=>{var r,o,A,i,a;const s=et(),{settings:l}=E(),{styles:c}=C(),{hasFlowStarted:u,setHasFlowStarted:d}=L(),{inputRef:p}=T(),{viewportHeight:f,viewportWidth:h,isChatWindowOpen:g}=G(),{goToPath:m}=Ze(),{headerButtons:b,chatInputButtons:y,footerButtons:v}=mt();vt(),(t=>{const{updateSettings:n}=St(),{updateStyles:r}=It(),o=null==t?void 0:t.map((e=>e()));e.useEffect((()=>{let e={},t={};null==o||o.forEach((n=>{null!=n&&n.settings&&0!==Object.keys(null==n?void 0:n.settings).length&&(e=Ct(n.settings,e)),null!=n&&n.styles&&0!==Object.keys(null==n?void 0:n.styles).length&&(t=Ct(n.styles,t))})),n(e),r(t)}),[])})(t),e.useEffect((()=>{var e;(u||"ON_LOAD"===(null==(e=l.general)?void 0:e.flowStartTrigger))&&m("start")}),[u,null==(r=l.general)?void 0:r.flowStartTrigger]);const w=e.useMemo((()=>{var e;const t="rcb-chatbot-global ";return null!=(e=l.general)&&e.embedded?t+"rcb-window-embedded":g?t+"rcb-window-open":t+"rcb-window-close"}),[l,g]);return n.jsx(n.Fragment,{children:(s&&(null==(x=l.device)?void 0:x.desktopEnabled)||!s&&(null==(k=l.device)?void 0:k.mobileEnabled))&&n.jsxs("div",{onMouseDown:e=>{var t,n;!u&&"ON_CHATBOT_INTERACT"===(null==(t=l.general)?void 0:t.flowStartTrigger)&&d(!0),s?null==(n=p.current)||n.blur():null==e||e.preventDefault()},className:w,children:[n.jsx(ot,{}),n.jsx(rt,{}),g&&!s&&!(null!=(o=l.general)&&o.embedded)&&n.jsxs(n.Fragment,{children:[n.jsx("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"}),n.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),n.jsxs("div",{style:(()=>{var e,t;return s||null!=(e=l.general)&&e.embedded?null!=(t=l.general)&&t.embedded?{...c.chatWindowStyle}:{...c.chatWindowStyle,zIndex:1e4}:{...c.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${h}px`,height:`${f}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:[(null==(A=l.general)?void 0:A.showHeader)&&n.jsx(S,{buttons:b}),n.jsx(Z,{}),n.jsx(it,{}),(null==(i=l.general)?void 0:i.showInputRow)&&n.jsx(tt,{buttons:y}),(null==(a=l.general)?void 0:a.showFooter)&&n.jsx(nt,{buttons:v})]})]})});var x,k},Qt=e.createContext(void 0),Mt=()=>e.useContext(Qt),Ot=({children:t})=>{var r;const o=e.useRef(""),A=e.useRef({}),[i,a]=e.useState({}),[s,l]=e.useState({}),[c,u]=e.useState(!1);e.useEffect((()=>{u(!0)}),[]);return c?n.jsx("div",{style:{fontFamily:null==(r=i.general)?void 0:r.fontFamily},children:n.jsx(Qt.Provider,{value:{loadConfig:async(e,t,n,r,i,s)=>{o.current=e,A.current=t;const c=await Bt(e,n,r,i);s.current&&(s.current.textContent=c.cssStylesText),a(c.settings),l(c.inlineStyles)}},children:n.jsx(k,{settings:i,setSettings:a,children:n.jsx(D,{styles:s,setStyles:l,children:n.jsx(Ke,{children:n.jsx(Q,{botIdRef:o,flowRef:A,children:n.jsx(U,{children:n.jsx(N,{settings:i,children:n.jsx(V,{children:t})})})})})})})})}):null},Lt=({id:t,flow:n,settings:r,styles:o,themes:A,plugins:i,setConfigLoaded:a,styleRootRef:s})=>{const l=e.useMemo((()=>t),[]),c=Mt(),{flowRef:u}=T();u&&u.current!==n&&(u.current=n);return e.useEffect((()=>{(async()=>{var e,t;null!=(e=r.event)&&e.rcbPreLoadChatBot&&(await H(R.PRE_LOAD_CHATBOT,{botId:l,currPath:null,prevPath:null},{flow:n,settings:r,styles:o,themes:A,plugins:i})).defaultPrevented||(null!=c&&c.loadConfig&&(await c.loadConfig(l,n,r,o,A,s),a(!0)),null!=(t=r.event)&&t.rcbPostLoadChatBot&&H(R.POST_LOAD_CHATBOT,{botId:l,currPath:null,prevPath:null},{flow:n,settings:r,styles:o,themes:A,plugins:i}))})()}),[A]),null},Nt=["Quickstart","API Docs","Examples","Github","Discord"],Rt={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:Nt,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:Nt,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:Nt,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:t,flow:r,settings:o,styles:A,themes:i,plugins:a})=>{const s=e.useMemo((()=>t||"rcb-"+de()),[]),l=r&&0!==Object.keys(r).length?r:Rt,c=o||{},u=A||{},d=a||[],[p,f]=e.useState(!1),h=Mt(),g=e.useRef(null),[m,b]=e.useState(i||[]);e.useEffect((()=>{i&&b(i)}),[i]);const y=()=>n.jsxs(n.Fragment,{children:[n.jsx(Lt,{styleRootRef:g,id:s,flow:l,settings:c,styles:u,themes:m,plugins:d,setConfigLoaded:f}),p&&n.jsx(Tt,{plugins:a})]});return null==h?n.jsxs(Ot,{children:[n.jsx("style",{ref:g}),n.jsx("div",{id:s,children:y()})]}):n.jsxs(n.Fragment,{children:[n.jsx("style",{ref:g}),n.jsx("div",{id:s,children:y()})]})},Ht=()=>{const{getBotId:t}=(()=>{const{botIdRef:t}=T();return{getBotId:e.useCallback((()=>t.current),[t])}})();return{getBotId:t}},Ft=()=>{const{hasFlowStarted:t,restartFlow:n,getFlow:r}=(()=>{const{replaceMessages:t}=Le(),{replacePaths:n,goToPath:r}=Ze(),{replaceToasts:o}=Je(),{hasFlowStarted:A}=L(),{flowRef:i,timeoutIdRef:a}=T(),{settings:s}=E();return{hasFlowStarted:A,restartFlow:e.useCallback((async()=>{ke(s),a.current&&clearTimeout(a.current),t([]),o([]),n([]),await r("start")}),[a,s,t,o,n,ke,r]),getFlow:e.useCallback((()=>(null==i?void 0:i.current)??{}),[i])}})();return{hasFlowStarted:t,restartFlow:n,getFlow:r}},_t=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:A,replaceMessages:i}=Le();return{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:A,replaceMessages:i}},Ut=(t,n)=>{const{getBotId:r}=Ht();e.useEffect((()=>{const e=e=>{e.detail.botId===r()&&n(e)};return window.addEventListener(t,e),()=>{window.removeEventListener(t,e)}}),[r,t,n])},zt=()=>{const{settings:e,replaceSettings:t,updateSettings:n}=St();return{settings:e,replaceSettings:t,updateSettings:n}},Gt=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=bt();return{showChatHistory:e,getHistoryMessages:we,setHistoryMessages:xe,hasChatHistoryLoaded:t}},Yt={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 qt(e){return t=>{Yt[t]={...e,...Yt[t]}}}["address","main","div","figure","p","pre"].forEach(qt({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(qt({content:8,type:73})),["p","pre"].forEach(qt({content:8,type:65})),["s","small","span","del","ins"].forEach(qt({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(qt({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(qt({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(qt({type:89}));const Wt=Object.freeze(Yt),Vt=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Xt=Object.keys(Wt).filter((e=>"canvas"!==e&&"iframe"!==e)),Kt=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}),Jt=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Zt(){return Zt=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},Zt.apply(this,arguments)}function $t({attributes:t={},className:n,children:r=null,selfClose:o=!1,tagName:A}){const i=A;return o?e.createElement(i,Zt({className:n},t)):e.createElement(i,Zt({className:n},t),r)}class en{attribute(e,t){return t}node(e,t){return t}}function tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-dom/client"),n=require("react/jsx-runtime"),r=require("react-dom/server");function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var i=o(e);function A(){return A=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},A.apply(null,arguments)}function a(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}a('.rcb-chat-header-container{border-bottom:1px solid #ccc;color:#fff;display:flex;justify-content:space-between;max-height:55px;padding:12px}.rcb-chat-header{display:flex;flex-direction:row}.rcb-bot-avatar{background-size:cover;border-radius:50%;height:30px;margin-right:12px;width:30px}.rcb-message-prompt-container.visible{align-items:center;animation:rcb-animation-pop-in .3s ease-in-out;bottom:0;display:flex;justify-content:center;margin:auto;opacity:1;pointer-events:auto;position:sticky}.rcb-message-prompt-container.hidden{height:0;opacity:0;pointer-events:none;visibility:hidden}.rcb-message-prompt-text{background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;font-size:12px;padding:6px 12px;transition:color .3s ease,border-color .3s ease;z-index:9999}.rcb-message-prompt-container.hidden .rcb-message-prompt-text{padding:0}.rcb-user-message-container{display:flex;flex-direction:row;justify-content:right}.rcb-user-message{border-radius:22px;font-size:15px;height:fit-content;margin-right:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:right;white-space:pre-wrap;width:fit-content}.rcb-user-message-offset{margin-right:50px}.rcb-user-message-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-message-user-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:-10px;margin-right:6px;margin-top:9px;width:40px}.rcb-bot-message-container{display:flex;flex-direction:row}.rcb-bot-message{border-radius:22px;font-size:15px;height:fit-content;margin-left:16px;margin-top:8px;min-height:20px;overflow:auto;overflow-wrap:anywhere;padding:12px 16px;text-align:left;white-space:pre-wrap;width:fit-content}.rcb-bot-message-offset{margin-left:50px}.rcb-bot-message-entry{animation:rcb-animation-bot-message-entry .3s ease-in backwards}.rcb-message-bot-avatar{background-size:cover;border-radius:50%;height:40px;margin-left:6px;margin-right:-10px;margin-top:9px;width:40px}.rcb-typing-indicator{align-items:center;display:flex}.rcb-dot{animation:rcb-animation-bot-typing 1s infinite;background-color:#ccc;border-radius:50%;height:8px;margin-right:4px;width:8px}.rcb-dot:nth-child(2){animation-delay:.2s}.rcb-dot:nth-child(3){animation-delay:.4s}.rcb-chat-body-container{height:100%;overflow-x:hidden;overflow-y:scroll;padding-bottom:16px;position:relative;touch-action:pan-y;width:100%}.rcb-chat-body-container::-webkit-scrollbar-track{background-color:#f1f1f1}.rcb-chat-body-container::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:4px}.rcb-chat-body-container::-webkit-scrollbar-thumb:hover{background-color:#cfcfcf}.rcb-chat-body-container::-webkit-scrollbar-corner{background-color:#f1f1f1}.rcb-checkbox-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;padding-top:12px}.rcb-checkbox-offset{margin-left:50px!important}.rcb-checkbox-row-container{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:flex;gap:5px;max-height:32px;min-height:30px;overflow:hidden;width:80%}.rcb-checkbox-row-container:hover{box-shadow:0 0 5px #0003}.rcb-checkbox-row{align-items:center;cursor:pointer;display:inline-flex;margin-left:10px}.rcb-checkbox-mark{align-items:center;background-color:#f2f2f2;border:none;border-radius:50%;cursor:pointer;display:flex;height:20px;justify-content:center;margin-right:10px;transition:all .3s ease;width:20px}.rcb-checkbox-mark:hover{background-color:#c2c2c2}.rcb-checkbox-mark:before{content:"✓";transition:all .3s ease}.rcb-checkbox-label{font-size:14px}.rcb-checkbox-next-button{align-items:center;animation:rcb-animations-checkboxes-entry .5s ease-out;background-color:#fff;border-radius:10px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-block;font-size:24px;max-height:32px;min-height:30px;text-align:center;width:80%}.rcb-checkbox-next-button:before{content:"→"}.rcb-checkbox-next-button:hover{box-shadow:0 0 5px #0003}.rcb-options-container{display:flex;flex-wrap:wrap;gap:10px;margin-left:16px;max-width:70%;padding-top:12px}.rcb-options-offset{margin-left:50px!important}.rcb-options{align-items:center;animation:rcb-animation-options-entry .5s ease-out;border-radius:20px;border-style:solid;border-width:.5px;cursor:pointer;display:inline-flex;font-size:14px;justify-content:center;overflow:hidden;padding:10px 20px;transition:background-color .3s ease}.rcb-options:hover{box-shadow:0 0 5px #0003}.rcb-line-break-container{align-items:center;display:flex;justify-content:center;max-height:45px;padding-bottom:5px;padding-top:10px}.rcb-line-break-text{color:#adadad;font-size:12px;padding:6px 12px}.rcb-spinner-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-spinner{animation:rcb-animation-spin 1s linear infinite;border:4px solid #f3f3f3;border-radius:50%;height:22px;width:22px}.rcb-chat-input{align-items:center;background-color:#fff;border-top:1px solid #ccc;display:flex;padding:8px 16px}.rcb-chat-input::placeholder{color:#999}.rcb-chat-input-textarea{background-color:#fff;border:none;border-radius:4px;color:#000;flex:1;font-family:inherit;font-size:16px;height:auto;min-height:38px;outline:none;overflow-y:scroll;padding:8px;resize:none;touch-action:none}.rcb-chat-input-textarea::-webkit-scrollbar,.rcb-chat-input-textarea::-webkit-scrollbar-thumb{background-color:initial}.rcb-chat-input-textarea::-webkit-scrollbar-thumb:hover{background-color:initial}.rcb-chat-input-char-counter{font-size:14px;margin-left:8px;margin-top:3px}.rcb-chat-footer-container{align-items:flex-end;background-color:#f2f2f2;border-top:1px solid #ccc;color:#000;display:flex;font-size:12px;justify-content:space-between;max-height:55px;padding:12px 16px 8px 10px}.rcb-chat-footer,.rcb-toggle-button{display:flex;flex-direction:row}.rcb-toggle-button{border:none;border-radius:50%;bottom:20px;box-shadow:0 2px 4px #0003;cursor:pointer;height:75px;position:fixed;right:20px;width:75px;z-index:9999}.rcb-toggle-button.rcb-button-hide{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}.rcb-toggle-button.rcb-button-show{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-toggle-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;border-radius:inherit;height:100%;margin:auto;width:100%}.rcb-badge,.rcb-toggle-icon{align-items:center;display:flex;justify-content:center}.rcb-badge{background-color:red;border-radius:50%;color:#fff;height:25px;position:absolute;right:-6px;top:-6px;width:25px}.rcb-chat-tooltip{border-radius:20px;box-shadow:0 2px 6px #0003;cursor:pointer;font-size:20px;padding:16px;position:fixed;transition:transform .3s ease;white-space:nowrap;z-index:9999}.rcb-chat-tooltip-tail{border-style:solid;border-width:10px 0 10px 10px;content:"";margin-top:-10px;position:absolute;right:-10px;top:50%}.rcb-chat-tooltip.rcb-tooltip-hide{animation:rcb-animation-tooltip-out .5s ease-in-out;opacity:0;visibility:hidden}.rcb-chat-tooltip.rcb-tooltip-show{animation:rcb-animation-tooltip-in .5s ease-in-out;opacity:1;visibility:visible}.rcb-toast-prompt{animation:rcb-animation-pop-in .3s ease-in-out;background-color:#fff;border:.5px solid #7a7a7a;border-radius:5px;color:#7a7a7a;cursor:pointer;font-size:12px;margin-top:6px;padding:6px 12px;text-align:center;transition:color .3s ease,border-color .3s ease;width:100%;z-index:9999}.rcb-toast-prompt-container{align-items:center;animation:popIn .3s ease-in-out;bottom:0;display:flex;flex-direction:column;justify-content:flex-end;left:50%;margin:200 auto auto;opacity:1;pointer-events:auto;position:absolute;transform:translate(-50%)}.rcb-media-display-image-container,.rcb-media-display-video-container{border-radius:22px;margin-right:16px;margin-top:8px;padding:16px;width:fit-content}.rcb-media-display-offset{margin-right:50px!important}.rcb-media-display-image{border-radius:22px;height:auto;object-fit:cover;width:100%}.rcb-media-display-video{background-color:#000;border-radius:22px;height:auto;width:100%}.rcb-media-display-audio{border-radius:22px;height:auto;margin-right:16px;margin-top:8px;width:100%}.rcb-media-entry{animation:rcb-animation-user-message-entry .3s ease-in backwards}.rcb-attach-button-disabled,.rcb-attach-button-enabled{background-size:cover;border-radius:6px;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-attach-button-disabled input[type=file],.rcb-attach-button-enabled input[type=file]{display:none;height:100%;position:absolute;width:100%}.rcb-attach-button-enabled{cursor:pointer}.rcb-attach-button-disabled{opacity:.5}.rcb-attach-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-attach-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-attach-icon-disabled,.rcb-attach-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;height:24px;margin-top:2px;transition:background-image .3s ease;width:24px}.rcb-attach-icon-enabled{cursor:pointer}.rcb-emoji-button-disabled,.rcb-emoji-button-enabled{background-size:cover;border-radius:6px;cursor:pointer;display:inline-block;height:30px;position:relative;text-align:center;width:30px}.rcb-emoji-icon-disabled,.rcb-emoji-icon-enabled{background-repeat:no-repeat;background-size:cover;display:inline-block;font-size:20px;height:24px;margin-top:2px;position:relative;width:24px}.rcb-emoji-icon-enabled{cursor:pointer}.rcb-emoji-icon-disabled{opacity:.5}.rcb-emoji-button-enabled:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-emoji-button-enabled:hover:after{height:130%;opacity:1;width:130%}.rcb-emoji-button-popup{background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:0 2px 4px #0003;max-height:200px;overflow-y:auto;padding:8px;position:absolute;transform:translateY(calc(-100% - 30px));width:158px}.rcb-emoji{cursor:pointer;font-size:24px;padding:3px;transition:transform .2s ease-in-out}.rcb-emoji:hover{transform:scale(1.2)}.rcb-audio-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-audio-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-audio-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-close-chat-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-close-chat-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-close-chat-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-notification-icon{background-size:cover;border:none;cursor:pointer;display:inline-block;height:30px;margin-left:5px;position:relative;width:30px}.rcb-notification-icon:after{background-color:#0000001a;border-radius:50%;content:"";height:0;left:50%;opacity:0;position:absolute;top:50%;transform:translate(-50%,-50%);transition:width .2s ease-out,height .2s ease-out,opacity .2s ease-out;width:0}.rcb-notification-icon:hover:after{height:130%;opacity:1;width:130%}.rcb-voice-button-disabled,.rcb-voice-button-enabled{align-items:center;background-color:#fff;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:all .3s ease;width:32px}.rcb-voice-button-enabled{border:1px solid red;box-shadow:0 0 3px #ff000080}.rcb-voice-button-enabled:hover{border:1px solid #3d0000}.rcb-voice-button-disabled{border:1px;border-color:#0003;border-style:solid}.rcb-voice-button-disabled:hover{box-shadow:0 0 3px #8a0000}.rcb-voice-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:60%;object-fit:cover;width:60%}.rcb-voice-icon.on{animation:rcb-animation-ping 1s infinite}.rcb-send-button{border:none;border-radius:4px;box-shadow:0 0 3px #0000004d;cursor:pointer;display:inline-flex;height:32px;justify-content:center;margin-left:8px;text-transform:uppercase;transition:background-color .3s ease;width:51px}.rcb-send-icon{background-position:50%;background-repeat:no-repeat;background-size:cover;background-size:contain;height:50%;object-fit:cover;transform:translateY(20%);width:50%}.rcb-view-history-container{align-items:center;display:flex;justify-content:center;max-height:45px;min-height:35px;padding-bottom:5px;padding-top:10px}.rcb-view-history-button{align-items:center;background-color:#fff;border:.5px solid #adadad;border-radius:20px;color:#adadad;cursor:pointer;display:inline-flex;font-size:12px;justify-content:center;max-width:60%;padding:6px 12px;transition:color .3s ease,border-color .3s ease}.rcb-view-history-button>p{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rcb-chatbot-global{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.5;z-index:9999}.rcb-chat-window{background-color:#fff;border-radius:10px;bottom:20px;box-shadow:0 2px 4px #0003;display:flex;flex-direction:column;height:550px;overflow:hidden;position:fixed;right:20px;transition:all .3s ease;width:375px}.rcb-window-embedded .rcb-chat-window{bottom:auto;opacity:1;position:relative;right:auto;visibility:visible}.rcb-window-open .rcb-chat-window{animation:rcb-animation-expand .3s ease-in-out forwards;opacity:1;visibility:visible}.rcb-window-close .rcb-chat-window{animation:rcb-animation-collapse .3s ease-in-out forwards;opacity:0;visibility:hidden}@keyframes rcb-animation-expand{0%{opacity:0;transform:translate(100%,100%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-collapse{0%{opacity:1;transform:translate(0) scale(1)}to{opacity:0;transform:translate(100%,100%) scale(0)}}@keyframes rcb-animation-ping{0%{filter:brightness(100%);opacity:1}50%{filter:brightness(50%);opacity:.8}}@keyframes rcb-animation-bot-message-entry{0%{opacity:0;transform:translate(-100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-user-message-entry{0%{opacity:0;transform:translate(100%,50%) scale(0)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes rcb-animation-bot-typing{0%{opacity:.4}50%{opacity:1}to{opacity:.4}}@keyframes rcb-animation-pop-in{0%{opacity:0;transform:scale(.8)}70%{opacity:1;transform:scale(1.1)}to{transform:scale(1)}}@keyframes rcb-animations-checkboxes-entry{0%{opacity:0;transform:translate(-100%)}to{opacity:1;transform:translate(0)}}@keyframes rcb-animation-options-entry{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes rcb-animation-tooltip-in{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes rcb-animation-tooltip-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-5px)}}@keyframes rcb-animation-spin{0%{transform:rotate(0)}to{transform:rotate(1turn)}}',{insertAt:"top"});const s={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"},l="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",c=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 0 637 637",ref:t,...e},i.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"}),i.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"})))),u=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),d=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),p=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),f=e.forwardRef(((e,t)=>i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",ref:t,...e},i.createElement("g",{strokeLinecap:"round",strokeWidth:10},i.createElement("path",{d:"m19 19 61 61M80 19 19 80"}))))),h=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.createElement("path",{d:"M94-136v-255l351-93-351-92v-253l816 346L94-136Z"})))),g=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),m=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),b=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),y=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),v=e.forwardRef(((e,t)=>i.createElement("svg",{viewBox:"0 -960 960 960",ref:t,...e},i.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"})))),w={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:c},header:{title:n.jsx("div",{style:{cursor:"pointer",margin:0,fontSize:20,fontWeight:"bold"},onClick:()=>window.open("https://github.com/tjtanjin/"),children:"Tan Jin"}),showAvatar:!0,avatar:l,buttons:[s.NOTIFICATION_BUTTON,s.AUDIO_BUTTON,s.CLOSE_CHAT_BUTTON],closeChatIcon:f},notification:{disabled:!1,defaultToggledOn:!0,volume:.2,icon:d,iconDisabled:p,sound:"data:audio/wav;base64,UklGRmaIAABXQVZFZm10IBAAAAABAAIAQB8AAAB9AAAEABAATElTVBoAAABJTkZPSVNGVA4AAABMYXZmNjAuMTYuMTAwAGRhdGEgiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAA//////7/////////AAABAAAAAgABAAEAAQAAAAIAAQABAP//AAD+////AAD+//7////+////AAD//wAA/v8AAAAA/v8AAP//AAAAAAAAAgD////////+////AAABAAEAAgD/////AQABAAAA//8CAP//AAAAAAAA/v8AAAAA//8AAAEA//8EAAAAAAAAAAAA//8BAP//AQABAAEA/////wEA/v///wAAAAACAAAAAAABAAAA//8AAP//AAACAP//////////AAAAAAEAAAAAAAEA//8AAAEAAQADAAIAAgAAAAAA/v///wEAAAAAAAEAAAAAAAEA//8AAAEAAQD//wAA//8AAAEAAAABAAEAAAABAP//AAD//wAAAgAAAP//AQD/////AAAAAP7/AgAAAAIAAAAAAAAAAAABAAAAAQABAP//AAABAP///v8AAP////8AAP//AAD//wAA//8BAP//AAD///7///8BAP7///8AAAIAAgABAAEA/v8AAP//AQADAAEAAAACAAEA/////////v///wEA/v////7/AAD+////AAAAAAAAAgAAAAAAAAD//wEAAAAAAAAAAQABAAIA/v8AAAAA//8AAAEAAAAAAP//AgD//wEA/////wAAAQACAAAAAAAAAP//AQD/////AQAAAAEA/v8AAAEAAQABAAEA///+////AQD//wEAAgD+//7/AAAAAAAAAQAAAAAAAQAAAAAAAAAAAP//AAD//wEAAQD//wAAAQABAP7///8AAP7/AAABAP7/AQABAAEAAAABAAEAAAD+/wIAAAABAAAAAQD/////AQACAP////8AAP//AQD//wEA/v8CAAEAAAAAAAAAAQAAAAIAAQAAAAEAAgD//wEAAAAAAP7///8BAP//AgAAAP///v8CAAAAAgD///////////7/AAACAAEAAgD//wAAAAABAP//AwAAAAMA//8AAAAAAQD+/wAAAAD//wAAAQD//wEA//8BAP7/AAABAAAA//8BAAAA//8AAP//AQADAP3////+////AgD+/////v8BAAEAAQACAAAAAAAAAAAA//8AAP//AAD+/wEA/v8AAP7/AAD//wAAAQACAAAAAQAAAP//AQAAAAAAAAABAAAAAAD+//////8AAAAAAAD//wAAAAABAAEA//8AAAEA//8AAP//AgD+/wAA///+/wAA/v///wAAAQABAAAAAQD//wAA//8AAAEA//8BAAAAAgABAP//AAACAAIAAQABAP//AAAAAAAA//8BAAIAAAABAAAA//8CAAEA/v//////AAAAAAEA////////AQAAAP//AAD//wAAAAAAAP3/AAAAAAEAAAACAAAAAAAAAP//AAD//wAAAAAAAAAAAAAAAP///v///wAAAAABAAAAAAD//wEAAAABAAEAAQD//wAAAAACAAAAAQD+/wAA//8BAAEAAAD+/wAA/////wAAAAABAAAAAAD//////v8AAAAA//8AAAAAAAAAAAIAAAABAAEAAAABAP7/AAD9//////////7///8BAP//AAD///3/AQABAP//AAD//wAAAAABAAAA//8AAP//AAD/////AQABAAEA//8AAAAA//8BAAMA//8AAAAA//8AAP7/AAD//wAAAAAAAP7/AQAAAAAA/v8CAP//AAABAAIAAQABAAAA//8BAAEAAQD///7/AQD//wAAAQABAP//AAD//wEAAAAAAAAAAQAAAAIA//8AAP////8AAP//AQD//////v///wEA/v8AAAIAAgACAAEAAAAAAAEAAAAAAAAAAAAAAAAAAQD//wAA/////wAAAQACAP////8AAAAAAAD//wAAAQD+/wEA//8AAAEAAwD//wEAAQAAAAAAAAABAP////8AAAAAAQAAAAAAAAAAAAEAAQAAAP////////7/AQABAAEAAQD///////8BAAAA//8AAAAAAgABAAEA/v8BAP7///8BAP3/AQABAAIAAAD//wEAAAAAAP//AAABAAIA//8CAAAAAQAAAAEA//8BAAAA/////wAAAAD//wEAAQD//wAAAAAAAP//AAAAAAAAAQABAAAAAQAAAP//AQD//////v8AAAEAAAAAAAAA//8AAAAAAAACAAEAAQAAAP//AAABAAEA/////wAAAgABAAAAAAAAAAEAAAABAP//AQABAP7////+/wEAAAAAAP//AAABAAAAAAABAAEAAAAAAAAA//8BAP///f/+/wEAAQD///7///8AAAAAAQAAAP////8AAAAAAAABAAAAAQD/////AAD//wEA//8AAAIA//8CAAAA//8AAAAAAAD+/wEAAAD+/wAA/////wAA////////AAAAAAAA//8BAAAAAAD//wAAAAD//wEA//8AAP//AQD+/wAAAAAAAP7/AAD+/wEAAQABAP//AAABAAEAAQD//wAA/////wEA//8AAAAAAgAAAAAA//8BAAAAAgAAAAAAAAAAAP7/AQD//wAAAAD+/wAAAAADAAIA/////wAAAQD//wIA//8BAAEA/v8AAAIAAAAAAP3///8AAAAAAAAAAAAAAAABAP///////wAA//8AAAEAAQABAAEAAQABAAAAAQAAAAAAAQABAP7/AQD//wAAAQABAAEA//8BAAAAAgAAAAEAAAABAP//AAD/////AAD//wIA/////wIAAAD///7/AAAAAAAAAAACAP//AAABAP////8AAAAAAAABAAAAAgAAAAAAAQD+/wEA/////wAA/////wAAAAAAAAAA/v//////AAAAAP//AAABAAAAAQAAAAIAAAACAAAA//8AAAAA//8AAP7/AAAAAP//AAACAP//AQABAP//AQABAAAA/////////v8AAP//AQAAAAAA///+/wAAAQD+/wEAAQAAAAEA/////wAAAQD//wAA//8AAAAA/v8BAAEA//8AAP7//v8BAAAAAAAAAAEA//8AAAEA/////wAAAAD//////////wEAAAABAAEA//8CAAEA/f8AAAAA//8BAAAABAABAAEAAQAAAAAAAAAAAP7///8AAAAA/v8BAAAA//8AAAIA//8AAP////8BAP//AAAAAAAAAAD/////AQD///7/////////AQD8////AgABAAIA////////AAD//wAAAAABAAAAAAAAAAEAAgAAAP//AQD//wAAAAAAAP/////+/wAAAAABAAAAAwABAP///////wEAAAADAP//AQACAAAA//8CAAEAAAAAAP///////wIAAAAAAAAAAQAAAAAAAgD//wEAAAABAAAA/v8AAAAAAAAAAAAAAAAAAAEA/v8AAP//AQD//wAA//////7///8AAAAAAAAAAP7/AQD//wAA//8AAAEAAAABAAEAAQD/////AAD//wEAAAD/////AQAAAAEAAAD//wEAAAD/////AgD//wAAAQD//////////wAAAAD//wAAAAABAAAAAAD//wAAAQD///7/AQD//wEAAAD/////AAD//wEA//8AAAEA//8CAAAAAQD//wEAAgAAAAEAAwAAAAAA/v8BAAEAAgD//wEAAAAAAAAAAAD//wEA//8AAAAAAQACAP///////wAAAQABAAEAAAAAAAEAAQD+/wEA/f////////8AAAAA//8AAAEA//8BAAAA/v///wEAAAAAAAEA/////wAAAAAAAP//AAAAAAIAAAABAAAA/////wAAAAD//wAA/v8AAAMAAQD+/wEAAAABAAEA//8BAP//AgAAAAAAAAD//wAA/////wEA/v8CAP3/AAACAP3/AQABAAAAAQACAAEA/v8AAAAA//8BAAAAAgAAAAAAAgACAAEA/v/9/wAAAQABAP7///8AAP//AgD+/////v8CAP////8BAP//AQACAAEAAQABAP//AAD///7/AAABAAEAAgD//wEA//8CAAEAAQABAAEAAAABAAAA/v8AAAEA/v8AAP//AAABAP//AQAAAAEAAgAAAAAA/v///wEAAQAAAAIAAAD/////AgAAAAEA/v8AAP7/AQAAAAAAAQAAAAEAAAACAAEA//8BAP////8AAAIAAAAAAP//AAAAAAIAAAAAAAAAAwABAP///v8BAAAAAAAAAP3/AAABAAEA/v////////////3//v8AAAAAAQABAAIAAAD+/////v8AAAAAAQABAAEAAQAAAP//AAAAAP//AQAAAP//AAABAAAAAAAAAAAA////////AAAAAP//AQD/////AAABAAEA//8CAP7///8AAP7//v8BAAEAAAD+/////////wEAAAAAAAAAAgD//wAAAQAAAP7/AQABAP//AQAAAAAAAAD/////AAACAP////8BAAAAAAD//wAA//8AAAEAAQABAAAAAAABAAAAAQD+/wEA/v8AAAEAAQD/////AAD//wAAAQABAP7//v//////AAACAAAAAAAAAAAAAAACAAAAAQAAAAAA//8BAP//AQD//wAA///+/wIAAQD//wAAAAD//wAA/v8AAP3///8AAAAAAAAAAAAA/f8AAAAA//8CAP7/AAD///7/AAAAAAAAAAD//wEAAAAAAAEAAAAAAAAA//8BAP////8BAP7///8CAAEA//8BAP3///////////8BAAAAAAAAAAEAAgD+//////8BAAMAAQADAAEAAAACAAAAAQD/////AAABAAMAAQAAAP//AQD//wAA//8AAAAA//8CAP7//////wAAAAAAAAIA/v8AAP//AAACAP//AwD//wAA//8AAP//AwD//wEAAQABAAEAAQACAAEAAAD//wAA//8AAAIAAAAAAP///////wAAAQD//wIA//8BAP7/AAD///////8AAAAAAAAAAAEAAAD//wAAAQD//wEA//8BAAAAAAD/////AgABAAIAAAABAAAAAAAAAP//AAAAAAAA//8AAAAAAAD/////AQAAAAAAAQD//wAA///+////AAAAAAEAAgABAAEAAAAAAP//AQAAAAAAAQD+/wAAAAABAAEAAAD/////AQABAP7///8AAAIAAAACAAAA//8AAP//AgACAAAA///+/wAAAAABAAAAAQAAAAEA/v8BAAEA//8CAP//AQD+/////v8AAAAAAAACAP//AAD+/wIA/v8BAAAAAAD/////AAAAAP7///8AAP7//////wEAAAABAAAAAAD//wAAAAAAAAAAAgACAAAAAAABAAAA/f8AAP7/AgAAAAEA//8BAAAAAAD///7/AQD//wAAAAAAAAEAAAAAAAEAAAAAAAAAAQAAAAAA//8AAAAAAAABAP///////wAAAgABAAEA//8AAP//AAACAP//AQABAAEA//8BAAAAAAABAAAA//8AAAEAAAAAAAIA/v8BAP//AQD//wEAAAABAAEAAQACAAEAAAAAAAEAAAABAAAAAAD/////AAABAAEA//8AAAAAAQABAP//AAAAAP//AAD/////AQD//wAAAAABAAEA//8BAAAA//8AAP///f/+/wAA/////wAAAQAAAAIAAAAAAAAAAAD+/wEA/f8CAAAA//8AAAEAAgAAAAMAAAABAAAAAAAAAP//AQAAAAAAAQABAAAAAQAAAP//AAAAAAAA//8AAAAAAAABAAAAAQAAAAAAAAABAAIAAAAAAP7/AQD//wAAAAD+////AAAAAAAAAAABAAAA/////wAA//8AAAAAAAD/////AgD//wAA//8CAP//AQACAAEA/f////////8BAAIAAQABAP//AAD//wAA///+////AAD+/wAAAQD/////AAAAAAAA/////wAAAAABAAAAAQAAAAAA//8AAAIAAAABAP//AQABAAEA//8AAAAAAAADAAEAAAABAP//AgD//wMA//8AAAAAAAD//wAAAAD9/wEA///+/wAA//8BAAEA//8BAAAA//8AAP///v8BAP///////////v8BAAAAAQABAAAAAAAAAAAA//8AAP7/AQAAAAAAAAAAAP7/AQAAAAAAAgABAAEAAAABAAEAAAAAAAAAAAD+/wAAAAD//wEAAAAAAAAAAAAAAP//AgABAAAAAAABAAEAAAD/////AAAAAP//AAABAP////8BAAAAAQABAP7//v/+////AQAAAAAAAQAAAAEAAgAAAAAAAQAAAAEAAAD+/////v8BAP//AAABAP//AQABAAAAAAD//wAA//8CAP//AAAAAAEAAAABAAAAAAAAAP//AAD+////AwAAAAAAAQD//wEAAAACAAEAAAADAAAAAAD/////AAAAAAEAAAABAAAA//8AAAEA//8BAP///v8AAP//AAD//wAAAQABAP//AQAAAAAA/////wEAAQAAAP////8AAAEA//8BAAAAAQAAAP////8AAAAAAQAAAAIAAQAAAAEAAAAAAAEAAAD//wEAAAAAAP////8AAAAA//8BAAEAAAAAAAIA///+/wIA/v8BAAAAAQACAAAAAQAAAP7///8AAP//AAAAAAEAAAAAAP7/AAD+////AAAAAAAAAAD//wAA/v8BAAMAAAABAAIAAgD//wAA//8BAAEA//8BAP7/AAAAAP7///8BAAAAAQAAAP7/AQD/////AAAAAAEAAAABAP//AQABAAAAAgABAAAAAAAAAP///////wEA//8AAAEA//8AAAAAAQAAAAIAAAABAP7//////wAAAQABAAAAAAABAAEA///+/wAA//8BAP///v8AAP///v8BAAAA//8CAAAAAQAAAAEAAQABAAAAAAD+/wAAAAD+/wAAAAAAAAAA/f////////8AAAAAAQABAP///////wEA//8BAAEAAAAAAAAA/////wEA/v//////AAAAAP//AAABAAAAAAD+/wAAAAD9////AQAAAAEAAwD//wEAAQAAAP//AgAAAAAAAAD+/wIAAAAAAAAAAAAAAAIA//8AAAEAAQACAAAAAQD//wAAAAD//wIAAQABAAAAAAD//wEA//8BAAEAAQAAAAAAAQABAP7/AAD//wEAAAACAP7/AQAAAAAAAAD//wIAAQACAAIAAQAAAAAAAAAAAP3///8BAAAAAQACAP//AgD9/wAAAAD//wEA/v////////8AAAAAAAD//wEAAQD//wMAAQAAAAEA//8AAAEA//8AAAAAAAACAAAAAAD//wAAAQD///////8AAAAA//8BAAIA/v8BAAEA/f8AAAAAAAAAAAAAAgD/////AAD+/wAAAAD//wAAAAAAAP//////////AgABAP///v8AAAIAAQAAAP//AAABAAAA/////wAAAAAAAAEAAAABAP///v///wIA//8BAAEAAQAAAAAA///+/wEAAAAAAAAA/////////v8BAP3/AAAAAAAAAAAAAAAA//8AAP//AAAAAP//AAABAAIAAAACAP////8DAAAAAAABAAAAAwABAP//AAABAP//AAAAAP////8BAAAAAgD//wAA///+/wAAAQD//wAA//8AAP7///8AAAAA/v8AAAAAAQD//wEA/v////////8AAAAAAQAAAP//AQACAAAAAAAAAP//AAD//wAAAAD//wAAAAD+/wAAAAAAAP//AQD//wAAAgAAAAAAAQABAAAAAwD+/wAAAAD///7/AQD//wIAAQAAAP//AAD//wAA//8CAAEAAAAAAAAA/////wAAAAD//wEAAQD///////8BAAAA//8BAAEAAAAAAAAA/v///wEAAAAAAAAAAAADAAAAAAAAAAAAAQABAAEAAAD+//7//v8AAP//AQAAAAAAAAABAAEAAgAAAAAAAQD//wAA/f8AAAAAAAABAAAAAQAAAAAAAAAAAAIA//8BAP///////wIA/////wAAAAABAAEA//8BAAAAAAD//wAAAQD//wEAAAAAAAIA/v8BAP//AAAAAAEAAAABAP//AAAAAAAAAQABAP7/AAABAAAAAQD//wIAAAAAAAEA///+/wAA//8AAP//AAAAAAAAAAABAP///////wIAAQAAAAEAAQAAAP7/AQAAAAAAAQAAAAAAAQD/////AQAAAAAA///+//7/AAD+/wEA//8AAAAA///+/wEAAAABAAIAAQABAAAA//8AAP//AAD//wAAAAD//wAAAAAAAP//AQAAAAAA////////AQAAAAAAAQD+////AQABAP7/AAD///7/AgD//wAAAAAAAP//AAAAAAEA//8BAAEAAgAAAAIAAAD//wEA/////wAAAQD///7/AQD//wEAAQD/////AAAAAAEAAgAAAAAAAQD//wEA//8AAP7//////wAA//8BAAEA//8BAAAAAQD/////AAABAP//AAACAP//AQAAAP//AAABAP////8AAAAAAAABAAEAAwABAAAAAgD//wAAAAD//wEAAAABAAAAAAABAAEA/////wAA//8AAAIAAAAAAAEAAQABAAEAAQABAP//AgAAAAAA//8BAP3//v///wAA//8AAAAAAQAAAP//AQD//wEAAAACAAIAAAABAAAA//8BAAEA//8BAP//AAAAAP//AQAAAAIAAAD//wAAAAAAAAEA////////AQAAAP//AQD//wAAAQD+/wEAAAABAP///v///wAAAAAAAP//AAAAAAIAAQD//wAAAgD+/wAAAAD//wAAAAABAP///P//////AAACAP////8AAAIAAAABAAAAAAAAAAAA//8AAAAAAQADAP//AQAAAAAAAAABAAEAAQAAAAAA/v8AAAAAAAD//wAAAQD//wAAAAD//wAA/v////////8CAAEA/v8BAP7/AAAAAAAA//8AAAEAAAD//wIAAQAAAAIAAQAAAAAAAAD///7/AQABAP//AAAAAP//AAACAAEA//8BAAAAAwAAAAAAAAD//wEAAAD//wAA///////////+/wAAAQABAAIAAAABAAEAAAD//wEAAAD/////AAD+/wIAAwABAAEA/v8BAAEAAAD//wAA//8AAP//AAAAAAEAAAAAAP//AAAAAAEAAQABAAEA/v///wAAAAD//wEAAAACAAAA/f/+/wAA/v///wAA//8AAAEAAQD///7/AAAAAAAAAAABAAAAAAACAAAAAAABAAAAAAABAP//AQD//wAA//8BAP7/AgABAAEAAQAAAAAAAQD//wEA/v8AAP////8AAP///////wIAAQD//wAAAAD//wAA/v///wAAAQD//wIA/////wEAAAAAAAIAAAABAAAAAAD//wEA//8AAAAA/////wAAAQAAAAAAAAD//wEAAQAAAAAAAAACAP///////wAAAgD//wAA/v8AAAIAAAAAAAEAAAABAP//AQABAAEAAQAAAP///v8BAAEAAAAAAP////8AAAAAAQD//wIAAQAAAAEAAAAAAAAA//8BAP//AAAAAP7//v///wEAAAAAAAIAAAAAAP//AAD//wEA//8BAAAAAAABAAEAAAABAP7///8AAAIAAAABAP//AAD//wEAAAAAAP//AAAAAAEAAAAAAAAAAAAAAP7/AQD//wAAAQD+/wEA/v8BAP7/AAABAAEAAAACAAIAAAADAAAA//8AAAEAAAABAP//AQD//wIA/////wEA//8AAAEA//8AAAEAAAAAAAAAAQABAAAAAAAAAAAAAAD//////////wAA//8AAP7/AAD+/wAAAQAAAAAA/////wAABAAAAAAA//8AAAEAAAAAAAAA/v8AAP//AAAAAAAAAAD//wAAAAD///////8BAAEAAAD/////AgABAAEA/v/+/wAAAQACAAEAAAD//wAAAwABAP//AgD+/wAA/v8AAAAAAAAAAAEA//8AAAEAAAD+/wEAAAAAAAEAAgAAAAEAAAABAP//AQD+/wIA/////wAAAQD//wAAAQD+/wAAAQABAAAA////////AAACAAAAAQAAAAIA//8BAP///v///wEA//8BAAEAAQD+/wAAAQD9/wAAAQAAAAEAAAABAAAAAgAAAP//AAD+/wAA/f8AAAAA////////AgAAAAcAAQD7/wEA/f8AAAIA//8GAP7//v/+//b/AQD//wQADgD///3/9/8FAPr/6/8EABAACQD9/wIA/P/5/w4A///t/wQA/P8LAB0ACQD5////AQD2/+7/AgD6//r//v/z/xIA9f8oAA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wAAQAQwABAEAA//8VAAIA7P/+/8r/BADP/+v/2v/s/+n/CwAIAA0AHAAjADQAHAAkAP//GQDy/wQA5v/i//b/0P/7/8f/AADh/wMAAAD+/yUAAAA7AAEAOAAAABwAAAD6/wAA1/8CAMr/AADb/+3/5f8BAAIACAAVABcALwAfACgA+/8XAPn/DgDe/+//7v/Q/wMAz/8JAOP/CwDx////EAAHADEAAQArAAIAHQAEAAcAAADr/wEAzv8CANj//f/k/wEA+f/+/xQABwAqAB4ALAD+/x4A8P8SAOb/8//f/9j//f/N/wEA3v8LAO7/AgAMAAQALAAEAC0AAQAdAAQADwABAPP/BADV/wMA0/8AAOH/AQD1/wAAEAADACQAGwAwAAQAHwD0/xUA8f/4/+L/2//7/8z/AwDc/woA6f8AAAQAAwAoAAcANAAAACcAAgAUAAEA+P8CANv/AgDR/wEA4v8BAOz/AgAIAPv/JAAVADMAFAAhAPP/GQDz//7/3P/l/+3/z/8BANf/CgDn/wkA/P///xoABwAwAAIAJwACABcAAwABAAIA4f8BAND/AgDd//3/6P8CAAYA/f8YAAwALwAZACUA9v8bAPj/AwDq/+r/7P/S//7/1/8EAOX/CQD6//7/GQAFAC8AAQApAAEAGQACAAMAAgDm/wEAzv8BANv//v/p/wIA//8BABMABQArACAALAABAB4A8f8NAOv/7v/m/9n/+P/R/wMA4f8OAPT/AQATAAMAKwAHACoAAwAbAAMABQADAO7/AQDU/wEA2f8AAOL////3////EgAAACUAGgAvAAUAHQD2/xIA9f/0//T/3P/4/8///f/h/wIA7f8AAAoAAQApAAQALQADACAAAgAPAP//9P///9r//f/T/wAA3f/9//D/AQAQAP//HAAHAC8ACQAfAPv/GAD+//f/+P/j/wEA0v/+/9n/AADq/wIABgD//x0AAQAuAAEAIwAAABQAAwD8/wEA3/8AAM//AADe////7f8BAAwA//8ZAAMALwAAACEA//8dAP3//v/9/+n////U//z/1v8BAOT/AAD+/wAAGwD+/ywA/v8kAAIAGAD///3////q/wEA0P///97/AADk/wAABAAAABUAAQAqAAEAKQAAABwAAAAFAP//6f8AANr////X/wAA4/8AAPj/AgAUAAAAKgD//ywAAAAcAP7/AQAAAOv/AADU/wAA2v8CAOP/AAABAAAAFgABABsAAAAqAAEAHwAAABQAAgDv/wEA3v///9H////f////7/8BAAoAAQApAAAALgD//yEAAQAIAAAA8P8BANr//v/V////4f8AAPf//v8UAAAAFAAAACYAAQAhAP7/GwD+//T/AADo/wIA1v8CANr/AgDp/wEABgAAAB8AAQAsAAEAJAAAAAwA///z/wEA3/8AANT/AADh/wEA9P///xQAAgASAAAAJQAAACEAAAAaAP//+v8BAOj////W////2P8BAOf///8DAAAAHwAAAC4AAAAlAAAAEgAAAPL/AQDm////0f8CAN3/AADr//7/EQD//xAAAQAhAAIAJQAAAB8AAAABAP//6v8CAN//AQDX/wAA4/8AAPr/AAAXAAAAKgABACgAAAAbAP///f8AAOj/AADU/wAA2v///+f/AQANAAMAEQD+/xwA/v8kAP7/IQABAAgA/v/p////5/8AANf/AQDd/wEA8v8BABMAAQAjAAAALgAAACAAAQADAAEA7f8BANn/AgDY//7/4P/+/wEAAAAXAAIAFAAFACUA/P8jAP//EgAAAO//AQDo////1/8AAN3/AADx//7/DgAAAB0AAQAoAAAAIwAAAAoAAQDv/wMA4f8AANn/AQDi/wEA+v///xgAAAAQAP3/IwD//yUA/v8XAAAA7/8AAOv/AADc/wAA3P/+/+v/AQALAAEAGgACACkAAAAkAP7/EAABAO/////q//7/1/8AANz/AgDw/wEAEgD//w8AAAAcAAIAJQAAAB0AAAD2////7P8AAOP/AgDa/wAA5P8BAAQAAQAWAAAAIgAAACMAAAAaAP//+P///+v/AQDZ/wAA2////+7/AAARAAAADgAAABYAAAAhAAAAIAABAPz/AQDt/wAA5P8AANr/AQDg/wEA/P8BABcAAAAhAP//KQD//xwAAAD8/wEA7v8AAN3////Z/wAA6f8BAA0AAAARAAEAEQAAACMAAAAgAAEA/f8CAO3/AADv/wAA3v8BANv////1////EgAAABkA//8nAAAAIgAAAAMAAADu/wAA6P8CANn/AQDg////BQD//xMAAQAOAP//IAABACYAAAAGAAAA6f////H/AADg/wEA2f8AAO3///8PAAAAFQACACQAAAAkAAEADQABAO//AADp/wAA2////9z/AQD7/wEAFgAAAAwAAQAXAP7/JQD9/xMAAADx/wAA8f8AAOr/AADc/wEA4/8BAAkAAAAVAAAAIQD//yYA//8UAAEA9P8BAOz/AADf/wAA3P8AAPP/AAAQAAAADQABAA0AAAAlAAEAGAD///H//v/0/wEA7v8CAN//AADg//3/BAACABUAAQAfAAAAJwABABgAAQD0//7/7f///+L/AADa/wIA8P///w4A//8SAAMACQAAACAAAQAgAP//+v////P////y/wEA4/8BANr/AQD9/wAAEwD//xkAAQAjAAAAIgABAPz////s/wAA6v8BANX/AQDr//7/BwABABMAAAAHAP//FwAAACYAAAD//wEA9P8BAPb/AQDu////2v8BAPn/AAATAP//FwD//yEAAAAjAAAAAgAAAOn/AQDr//7/2P8CAOT/AAABAP//FgABAAUAAQATAP//IwAAAAEAAgDy/wEA9/8AAPb/AADb/wAA6/8BABAAAAATAP7/IQAAACYA//8UAP//7/8AAPD/AADd/wEA3P/+//7///8OAAAACgAAAAgAAAAhAP//CQACAPT/AQD2/wAA9v///97////m/wIADgABABMAAQAfAP//JwAAABMAAADw/wAA8P///+r/AQDb/wAA9f8AAA8AAAARAAIABAD//wYA/v8HAAAAAQD//wMAAgAGAAAA7f8AAOz/AAALAP//DwACABQA//8bAAAAHgD///f/AADq/wEA6/8BANj//v/t/wAACAD+/xAAAgAEAAAABAABAAcAAQADAAAA//8AAAUA///1/wAA5f///wIAAAAOAAAAEAAAABsAAAAhAAAA/v8BAOj////y////3f8AAOf/AQAGAAEADAAAAAcA//8BAP//CQABAAMA//8BAP//BQAAAAAAAADo/wAA+/8AAAoAAAALAAAAFAAAACAAAQAGAAIA7f8BAPH/AADm/wMA3P8CAP7/AgASAP//CgD//wAAAAAIAP//BQD//wEAAAACAP7/BAAAAPz/AwD8////BAAAAAEA//8HAAAAHQAAAAgA/v/x//7/8f///+f/AQDg/////P///woAAAAMAP//AAABAAYA//8EAAAAAgAAAAUAAAACAAAAAwAAAAIAAAABAAAAAQABAAAAAgAcAP//DgD///T/AQDx/wAA9P8CAOH/AAD3/wAACQAAAAoAAQABAP//AwAAAAcAAAD+/wAAAgACAAEAAAD+////AwD+/wAAAAABAP//+v8BABEAAQATAAAA9f/+//L//f/z/wIA6f8AAPb/AQAFAP//DAAAAAAAAAAFAP//BQD//wEA//8DAAEAAQAAAP7///8AAAAA//8BAAIAAAD+/wAAEAABABYAAgD6/wEA8v8BAPX/AwDp/wAA8////wMA//8JAAEABAABAAEA//8FAAEA//8AAAMAAQACAP//AQAAAAEAAgAFAP//AQABAAAAAQAAAP//EQABAAAAAAD5/wEA+P8AAPr////6/wAA+/8BAAIA//8BAAAA//8CAAUA//8BAP7/AAABAAEAAgAAAAAAAwAAAAEA/v8DAAIAAAACAAQA//8TAAAA/P8BAPr////3//////8AAPz/AQD7/wEAAgD/////AAABAAEABAAAAP//////////AAAAAAAAAAADAAAAAwAAAAAA//8EAP///v/+/xAA//8HAAAA+/////j/AQD8////AAD///n///8AAAAA//8AAP////8DAP//AgAAAAAAAAACAAIAAAD+/wAAAQD//wAA/////wIAAgD9////CQACAAYA///9////+f8BAPr/AQAAAAIA/v///wAA//8AAAAAAAAAAAEAAAABAAAAAgAAAAEAAAAAAAEAAQABAAAAAgABAP//AAD//wEAAAD///////8BAAIAAQAAAAAA/v/+//////8BAAAAAQABAP//AAD///////8BAAAAAQABAP////8CAAEAAQD//wEA/v//////AQAAAAAAAAAAAAAAAAD9/wMA/////wAAAQD+/wEA/v/+//7/AQD//wMAAAAAAAAAAAABAAEA//////7/AAACAP3/AAD//wAAAQAAAP//AQD//wAAAAAAAAEA//8CAP//AAAAAAAA/v8AAAAA//8BAP//AAABAP//AAAAAP//AQD//wAAAQABAAAAAAABAAEA/v///wAAAAD//////////wAAAAAAAP//AAD////////8/wIAAAADAAEA/////wEA/v8BAP7/AgAAAAEAAgAAAP//AgD/////AQD//wEA//////7/AQD//wMAAAAAAAAA//8CAP//AQAAAP//AAACAAAAAAABAP//AQD+/wAA/////wAA/f///wAAAAAAAP7/AAAAAAAAAgD//wEAAQACAP//AAAAAAEAAQD//wAAAAAAAAAA//8BAAMA/v8AAP7/AQAAAAAAAQAAAAAA///+//7/AAAAAAAA//8BAP7/AQAAAP//AQABAAAAAQAAAP//AAD//wIA/v///wAAAQABAP//AAD//wEA//8BAP//AgAAAP///////wAAAQABAP//AwABAAAAAAAAAAAA/////wIAAwACAAAA/v8BAAAAAAAAAAAA//8AAP////8AAAAA/////wAA/////wEA/v8CAAEAAQD//wAAAAABAAAAAAD//wEAAQABAAAA//8CAAAAAAAAAP7/AAABAAAAAQABAAAAAgABAAAAAQD//wEAAwD+/wAA/v8AAAEAAAAAAAAAAAAAAAEAAAD//wMA/v///wAAAAACAAEAAAAAAP7///8DAAEAAQD//wEA/f8BAAEAAQD//wEAAQABAAMAAgAAAAEA//8AAP//BAAAAAIA/v//////AQABAAAAAAD//wEAAAACAAIAAQAAAAAAAgAAAAAAAAABAAIAAAABAAIAAQAAAP////8AAAAAAAD//wAAAQACAP//AAAAAAAAAQAAAAEA//8AAAAAAAD/////AQD//wAAAQD9////AQAAAAAA//8BAAAA///+/////v8BAAAAAQAAAAAAAAAAAAIA//8BAAAAAAACAP//AQD//wAAAAD/////AAD9/wAAAAACAAAAAgAAAAEAAQABAAEAAAAAAAEA//8AAAEAAQACAAAAAQAAAAEA//8BAAIAAAACAP//AAABAAAAAAAAAAAAAAD//wAAAQD/////AAAAAP////8AAAEAAAAAAP7///8BAAIAAQD//wEAAQAAAP//AgAAAAAAAAD//wAA//8CAP7/AQAAAP7/AAD+////AAAAAAAAAQABAAAA//8AAAEAAAABAP7/AAAAAP7/AAD+/wAAAQABAAEA/////////v8BAP///v///wIAAAAAAAAAAQAAAAIAAQAAAAAAAAABAAEAAAAAAAAAAAD//wEAAQD//wAAAQABAAAA/v/+/////////wAAAAD//wAAAAD/////AAAAAP7/AAD//wIA//8CAP//AQAAAP////8AAAAAAQABAP////8AAP//AQACAAAAAQAAAAAAAAAAAAAA//8BAAAAAAD+/wAA/v///wEAAAD+//7///8CAP7/AAABAP3/AwAAAAAAAAABAAIAAAABAAAAAQABAAIAAAAAAP//AAAAAAEAAAACAAEAAAACAAAAAAABAAAAAwAAAAAAAAD+/wAAAQD9//////8BAAAA/v8AAAAAAAAAAAAAAAD//wMA/v8BAAEAAQACAAAA/v8BAP//AwABAAIAAQABAP//AQAAAAEAAAAAAAEA//8AAAAAAAD/////AAABAAEAAAAAAP////8AAAAAAAAAAAAA/v8AAP//AQAAAP//AAABAAIAAQAAAAAAAgABAAAA/////wAAAQABAP//AQABAAEA/////wAAAAAAAAAAAAABAAEAAQAAAAAAAAAAAAAA//8AAP7/AQD9/wAAAgD//wEAAQABAAEA/v8AAAEA/////wAAAAAAAP//AAABAAAAAAAAAAAA//8CAP//AAABAAEAAQABAAAA//8BAAIAAgD//wAA/v8AAAEAAAD///7/AAAAAAEAAAABAAAAAQABAAAAAQACAAAA///+/wAAAQABAP7////+/wAA//8AAAAAAgAAAP//AQD9/wAAAAD//wAA//8AAAAAAQAAAAAAAQD//wAAAAAAAP//AQABAAAA/v8CAP//AAD///////8AAAAAAAACAAEA//8BAP7/AAAAAAEA//8BAAAAAQD//wAAAQD+/wAA/////wAAAAD//wAAAQABAAAA//8AAAEA/////wAA//8AAAAA/v/+/wEAAgABAP//AgD//wIA/////wAA//8AAAEAAQAAAAAAAQAAAAMAAAACAP//",showCount:!0},audio:{disabled:!0,defaultToggledOn:!1,language:"en-US",voiceNames:["Microsoft David - English (United States)","Alex (English - United States)"],rate:1,volume:1,icon:y,iconDisabled:v},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:h,blockSpam:!0,sendOptionOutput:!0,sendCheckboxOutput:!0,buttons:[s.VOICE_MESSAGE_BUTTON,s.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:l,simulateStream:!1,streamSpeed:30},voice:{disabled:!0,defaultToggledOn:!1,language:"en-US",timeoutPeriod:1e4,autoSendDisabled:!1,autoSendPeriod:1e3,sendAsAudio:!1,icon:g,iconDisabled:m},footer:{text:n.jsxs("div",{style:{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",columnGap:3},onClick:()=>window.open("https://react-chatbotify.com"),children:[n.jsx("span",{children:"Powered By "},0),n.jsx("div",{style:{borderRadius:"50%",width:14,height:14,display:"flex",justifyContent:"center",alignItems:"center",background:"linear-gradient(to right, #42b0c5, #491d8d)"},children:n.jsx(c,{style:{width:"80%",height:"80%",fill:"#fff"}})},1),n.jsx("span",{style:{fontWeight:"bold"},children:" React ChatBotify"},2)]}),buttons:[s.FILE_ATTACHMENT_BUTTON,s.EMOJI_PICKER_BUTTON]},fileAttachment:{disabled:!1,multiple:!0,accept:".png",icon:u,iconDisabled:u,sendFileName:!0,showMediaDisplay:!1},emoji:{disabled:!1,icon:b,iconDisabled:b,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,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}},x=e.createContext({settings:{},setSettings:()=>null}),E=()=>e.useContext(x),k=({children:e,settings:t=w,setSettings:r})=>n.jsx(x.Provider,{value:{settings:t,setSettings:r},children:e}),P={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:{},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:{}},B=e.createContext({styles:{},setStyles:()=>null}),C=()=>e.useContext(B),D=({children:e,styles:t=P,setStyles:r})=>n.jsx(B.Provider,{value:{styles:t,setStyles:r},children:e}),S=({buttons:t})=>{var r,o,i,A,a,s,l;const{settings:c}=E(),{styles:u}=C(),d={backgroundImage:`linear-gradient(to right, ${null==(r=c.general)?void 0:r.secondaryColor},\n\t\t\t${null==(o=c.general)?void 0:o.primaryColor})`,...u.headerStyle};return n.jsxs("div",{style:d,className:"rcb-chat-header-container",children:[n.jsxs("div",{className:"rcb-chat-header",children:[(null==(i=c.header)?void 0:i.showAvatar)&&n.jsx("div",{style:{backgroundImage:`url("${null==(A=c.header)?void 0:A.avatar}")`},className:"rcb-bot-avatar"}),e.isValidElement(null==(a=c.header)?void 0:a.title)?null==(s=c.header)?void 0:s.title:n.jsx("div",{style:{margin:0,fontSize:20,fontWeight:"bold"},children:null==(l=c.header)?void 0:l.title})]}),n.jsx("div",{className:"rcb-chat-header",children:null==t?void 0:t.map(((t,r)=>n.jsx(e.Fragment,{children:t},r)))})]})},I=e.createContext({}),T=()=>e.useContext(I),Q=({children:t,botIdRef:r,flowRef:o})=>{const i=e.useRef(null),A=e.useRef(""),a=e.useRef(null),s=e.useRef(new Map),l=e.useRef(null),c=e.useRef(""),u=e.useRef(!1),d=e.useRef(null),p=e.useRef(null),f=e.useRef(null);return n.jsx(I.Provider,{value:{botIdRef:r,flowRef:o,inputRef:i,timeoutIdRef:a,streamMessageMap:s,chatBodyRef:l,paramsInputRef:c,keepVoiceOnRef:u,audioContextRef:d,audioBufferRef:p,gainNodeRef:f,prevInputRef:A},children:t})},M=t=>{const[n,r]=e.useState(t),o=e.useRef(t);return[n,e=>{const t="function"==typeof e?e(o.current):e;o.current=t,r(t)},o]},O=e.createContext({}),L=()=>e.useContext(O),N=({children:t,settings:r})=>{var o,i,A,a,s,l;const[c,u,d]=M(!1),[p,f,h]=M((null==(o=null==r?void 0:r.chatWindow)?void 0:o.defaultOpen)??!1),[g,m,b]=M((null==(i=null==r?void 0:r.audio)?void 0:i.defaultToggledOn)??!1),[y,v,w]=M((null==(A=null==r?void 0:r.voice)?void 0:A.defaultToggledOn)??!1),[x,E,k]=M((null==(a=null==r?void 0:r.notification)?void 0:a.defaultToggledOn)??!0),[P,B]=e.useState(!1),[C,D]=e.useState(!1),[S,I,T]=M(!1),[Q,L,N]=M(!0),[R,j,H]=M(!1),[F,_]=e.useState(!1),[U,z]=e.useState(!1),[G,Y]=e.useState(0),[q,W]=e.useState(0),[V,X]=e.useState(!1),[K,J]=e.useState((null==(s=window.visualViewport)?void 0:s.height)??window.innerHeight),[Z,$]=e.useState((null==(l=window.visualViewport)?void 0:l.width)??window.innerWidth);return n.jsx(O.Provider,{value:{isBotTyping:c,setSyncedIsBotTyping:u,syncedIsBotTypingRef:d,isChatWindowOpen:p,setSyncedIsChatWindowOpen:f,syncedIsChatWindowOpenRef:h,audioToggledOn:g,setSyncedAudioToggledOn:m,syncedAudioToggledOnRef:b,voiceToggledOn:y,setSyncedVoiceToggledOn:v,syncedVoiceToggledOnRef:w,notificationsToggledOn:x,setSyncedNotificationsToggledOn:E,syncedNotificationsToggledOnRef:k,isLoadingChatHistory:P,setIsLoadingChatHistory:B,hasChatHistoryLoaded:C,setHasChatHistoryLoaded:D,isScrolling:S,setSyncedIsScrolling:I,syncedIsScrollingRef:T,textAreaDisabled:Q,setSyncedTextAreaDisabled:L,syncedTextAreaDisabledRef:N,textAreaSensitiveMode:R,setSyncedTextAreaSensitiveMode:j,syncedTextAreaSensitiveModeRef:H,hasInteractedPage:F,setHasInteractedPage:_,hasFlowStarted:U,setHasFlowStarted:z,unreadCount:G,setUnreadCount:Y,inputLength:q,setInputLength:W,blockAllowsAttachment:V,setBlockAllowsAttachment:X,viewportHeight:K,setViewportHeight:J,viewportWidth:Z,setViewportWidth:$},children:t})};var R=(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.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))(R||{});const j={[R.START_SPEAK_AUDIO]:!0,[R.TOGGLE_AUDIO]:!0,[R.TOGGLE_VOICE]:!0,[R.TOGGLE_NOTIFICATIONS]:!0,[R.TOGGLE_CHAT_WINDOW]:!0,[R.PRE_INJECT_MESSAGE]:!0,[R.POST_INJECT_MESSAGE]:!1,[R.PRE_LOAD_CHATBOT]:!0,[R.POST_LOAD_CHATBOT]:!1,[R.START_SIMULATE_STREAM_MESSAGE]:!0,[R.STOP_SIMULATE_STREAM_MESSAGE]:!1,[R.START_STREAM_MESSAGE]:!0,[R.CHUNK_STREAM_MESSAGE]:!0,[R.STOP_STREAM_MESSAGE]:!0,[R.REMOVE_MESSAGE]:!0,[R.LOAD_CHAT_HISTORY]:!0,[R.CHANGE_PATH]:!0,[R.SHOW_TOAST]:!0,[R.DISMISS_TOAST]:!0,[R.USER_SUBMIT_TEXT]:!0,[R.USER_UPLOAD_FILE]:!0,[R.TEXT_AREA_CHANGE_VALUE]:!0,[R.PRE_PROCESS_BLOCK]:!0,[R.POST_PROCESS_BLOCK]:!0},H=async(e,t,n)=>{const r=new CustomEvent(e,{detail:t,cancelable:j[e]});return r.data=n,r.promises=[],window.dispatchEvent(r),await Promise.all(r.promises),r},F=e.createContext({paths:[],setSyncedPaths:()=>{},syncedPathsRef:{current:[]}}),_=()=>e.useContext(F),U=({children:e})=>{const[t,r,o]=M([]);return n.jsx(F.Provider,{value:{paths:t,setSyncedPaths:r,syncedPathsRef:o},children:e})},z=()=>{const{botIdRef:t}=T(),{syncedPathsRef:n}=_(),r=e.useCallback((()=>n.current.length>0?n.current.at(-1)??null:null),[]),o=e.useCallback((()=>n.current.length>1?n.current.at(-2)??null:null),[]);return{dispatchRcbEvent:e.useCallback((async(e,n)=>{const i={botId:t.current,currPath:r(),prevPath:o()};return await H(e,i,n)}),[t])}},G=()=>{const{settings:t}=E(),{isChatWindowOpen:n,setSyncedIsChatWindowOpen:r,viewportHeight:o,setViewportHeight:i,viewportWidth:A,setViewportWidth:a,setUnreadCount:s,setSyncedIsBotTyping:l,setSyncedIsScrolling:c,syncedIsBotTypingRef:u,syncedIsChatWindowOpenRef:d}=L(),{chatBodyRef:p}=T(),{dispatchRcbEvent:f}=z(),h=e.useCallback((()=>{if(!p.current)return!1;const e=p.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}),[p]),g=e.useCallback((async e=>{var n;e!==d.current&&(null!=(n=t.event)&&n.rcbToggleChatWindow&&(await f(R.TOGGLE_CHAT_WINDOW,{currState:d.current,newState:!d.current})).defaultPrevented||r((e=>(e||s(0),!e))))}),[d]),m=e.useCallback((async e=>{e!==u.current&&l((e=>!e))}),[u]),b=e.useCallback(((e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t),[]),y=e.useCallback(((e=0)=>{if(!p.current)return;const t=p.current.scrollHeight-p.current.clientHeight;if(e<=0)return p.current.scrollTop=t,void c(!1);const n=p.current.scrollTop,r=t-n;let o=0;const i=()=>{if(!p.current)return;o+=20;const t=b(o,n,r,e);p.current.scrollTop=t,o<e?requestAnimationFrame(i):c(!1)};i()}),[p]);return{isChatWindowOpen:n,setSyncedIsChatWindowOpen:r,toggleChatWindow:g,viewportHeight:o,setViewportHeight:i,viewportWidth:A,setViewportWidth:a,toggleIsBotTyping:m,scrollToBottom:y,getIsChatBotVisible:h}},Y=()=>{var t,r,o;const{settings:i}=E(),{styles:A}=C(),{unreadCount:a,isScrolling:s}=L(),{chatBodyRef:l}=T(),{scrollToBottom:c}=G(),[u,d]=e.useState(!1),p={color:null==(t=i.general)?void 0:t.primaryColor,borderColor:null==(r=i.general)?void 0:r.primaryColor,...A.chatMessagePromptHoveredStyle};return n.jsx("div",{className:"rcb-message-prompt-container "+(l.current&&(null==(f=i.chatWindow)?void 0:f.showMessagePrompt)&&s&&a>0?"visible":"hidden"),children:n.jsx("div",{onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},style:u?p:{...A.chatMessagePromptStyle},onMouseDown:e=>{e.preventDefault(),c(600)},className:"rcb-message-prompt-text",children:null==(o=i.chatWindow)?void 0:o.messagePromptText})});var f},q=e.createContext({messages:[],setSyncedMessages:()=>{},syncedMessagesRef:{current:[]}}),W=()=>e.useContext(q),V=({children:e})=>{const[t,r,o]=M([]);return n.jsx(q.Provider,{value:{messages:t,setSyncedMessages:r,syncedMessagesRef:o},children:e})},X=({message:e,isNewSender:t})=>{var r,o,i,A,a,s;const{settings:l}=E(),{styles:c}=C(),u="string"==typeof e.content,d=e.content,p=e.contentWrapper?n.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:null==(r=l.general)?void 0:r.primaryColor,color:"#fff",maxWidth:null!=(o=l.userBubble)&&o.showAvatar?"65%":"70%",...c.userBubbleStyle},h=null!=(i=l.userBubble)&&i.animate?"rcb-user-message-entry":"",g=(null==(A=l.userBubble)?void 0:A.showAvatar)&&t,m="rcb-user-message"+(!t&&null!=(a=l.userBubble)&&a.showAvatar?" rcb-user-message-offset":"");return n.jsxs("div",{className:"rcb-user-message-container",children:[u?n.jsx("div",{style:f,className:`${m} ${h}`,children:p}):n.jsx(n.Fragment,{children:p}),g&&n.jsx("div",{style:{backgroundImage:`url("${null==(s=l.userBubble)?void 0:s.avatar}")`},className:"rcb-message-user-avatar"})]})},K=({message:e,isNewSender:t})=>{var r,o,i,A,a,s;const{settings:l}=E(),{styles:c}=C(),u="string"==typeof e.content,d=e.content,p=e.contentWrapper?n.jsx(e.contentWrapper,{children:d}):d,f={backgroundColor:null==(r=l.general)?void 0:r.secondaryColor,color:"#fff",maxWidth:null!=(o=l.botBubble)&&o.showAvatar?"65%":"70%",...c.botBubbleStyle},h=null!=(i=l.botBubble)&&i.animate?"rcb-bot-message-entry":"",g=(null==(A=l.botBubble)?void 0:A.showAvatar)&&t,m="rcb-bot-message"+(!t&&null!=(a=l.botBubble)&&a.showAvatar?" rcb-bot-message-offset":"");return n.jsxs("div",{className:"rcb-bot-message-container",children:[g&&n.jsx("div",{style:{backgroundImage:`url("${null==(s=l.botBubble)?void 0:s.avatar}")`},className:"rcb-message-bot-avatar"}),u?n.jsx("div",{style:f,className:`${m} ${h}`,children:p}):n.jsx(n.Fragment,{children:p})]})},J=()=>{var e,t,r;const{settings:o}=E(),{styles:i}=C(),A=null!=(e=o.botBubble)&&e.animate?"rcb-bot-message-entry":"";return n.jsxs("div",{className:"rcb-bot-message-container",children:[(null==(t=o.botBubble)?void 0:t.showAvatar)&&n.jsx("div",{style:{backgroundImage:`url("${null==(r=o.botBubble)?void 0:r.avatar}")`},className:"rcb-message-bot-avatar"}),n.jsx("div",{onMouseDown:e=>{e.preventDefault()},className:`rcb-bot-message ${A}`,children:n.jsxs("div",{className:"rcb-typing-indicator",style:{...null==i?void 0:i.rcbTypingIndicatorContainerStyle},children:[n.jsx("span",{className:"rcb-dot",style:{...null==i?void 0:i.rcbTypingIndicatorDotStyle}}),n.jsx("span",{className:"rcb-dot",style:{...null==i?void 0:i.rcbTypingIndicatorDotStyle}}),n.jsx("span",{className:"rcb-dot",style:{...null==i?void 0:i.rcbTypingIndicatorDotStyle}})]})})]})},Z=()=>{var t,r,o;const{settings:i}=E(),{styles:A}=C(),{messages:a}=W(),{scrollToBottom:s}=G(),{isBotTyping:l,syncedIsScrollingRef:c}=L(),{chatBodyRef:u}=T(),d={...null==A?void 0:A.bodyStyle,scrollbarWidth:null!=(t=i.chatWindow)&&t.showScrollbar?"auto":"none"};e.useEffect((()=>{c.current||s()}),[null==(r=u.current)?void 0:r.scrollHeight]);return n.jsxs("div",{style:d,className:"rcb-chat-body-container",ref:u,children:[a.map(((e,t)=>{const r=(e=>0===e||a[e].sender!==a[e-1].sender)(t);return"USER"===e.sender.toUpperCase()?n.jsx(X,{message:e,isNewSender:r},t):"BOT"===e.sender.toUpperCase()?n.jsx(K,{message:e,isNewSender:r},t):n.jsx("div",{children:e.content},t)})),l&&(null==(o=i.chatWindow)?void 0:o.showTypingIndicator)&&n.jsx(J,{}),n.jsx(Y,{})]})},$=({checkboxes:t,checkedItems:r,path:o})=>{var i,A,a,s,l,c,u,d,p,f,h;const{settings:g}=E(),{styles:m}=C(),{paths:b}=_(),{handleSubmitText:y}=$e(),[v,w]=e.useState(new Set),[x,k]=e.useState(!1),P={cursor:x?`url("${null==(i=g.general)?void 0:i.actionDisabledIcon}"), auto`:"pointer",color:null==(A=g.general)?void 0:A.primaryColor,borderColor:null==(a=g.general)?void 0:a.primaryColor,...m.botCheckboxRowStyle},B={cursor:x||v.size<t.min?`url("${null==(s=g.general)?void 0:s.actionDisabledIcon}"), auto`:"pointer",color:null==(l=g.general)?void 0:l.primaryColor,borderColor:null==(c=g.general)?void 0:c.primaryColor,...m.botCheckboxNextStyle},D={cursor:x?`url("${null==(u=g.general)?void 0:u.actionDisabledIcon}"), auto`:"pointer",color:"transparent",...m.botCheckMarkStyle},S={cursor:x?`url("${null==(d=g.general)?void 0:d.actionDisabledIcon}"), auto`:"pointer",color:"#fff",borderColor:null==(p=g.general)?void 0:p.primaryColor,backgroundColor:null==(f=g.general)?void 0:f.primaryColor,...m.botCheckMarkSelectedStyle};e.useEffect((()=>{b.length>0&&b[b.length-1]!==o&&k(!t.reusable)}),[b]);return n.jsxs("div",{className:"rcb-checkbox-container "+(null!=(h=g.botBubble)&&h.showAvatar?"rcb-checkbox-offset":""),children:[t.items.map((e=>n.jsx("div",{onMouseDown:n=>{n.preventDefault(),(e=>{x||w((n=>{const o=new Set(n);if(o.has(e))r.delete(e),o.delete(e);else{if(v.size==t.max)return n;r.add(e),o.add(e)}return o}))})(e)},style:P,className:"rcb-checkbox-row-container",children:n.jsxs("div",{className:"rcb-checkbox-row",children:[n.jsx("div",{style:v.has(e)?S:D,className:"rcb-checkbox-mark"}),n.jsx("div",{className:"rcb-checkbox-label",children:e})]})},e))),n.jsx("div",{style:B,className:"rcb-checkbox-next-button",onMouseDown:e=>{var n;if(e.preventDefault(),x||v.size<t.min)return;const o=Array.from(r).join(", ");let i;k(!t.reusable),i=null!=t.sendOutput?t.sendOutput:(null==(n=g.chatInput)?void 0:n.sendCheckboxOutput)??!0,y(o,i)}})]})},ee=async(e,t)=>{const r=e.checkboxes;if(!r)return;let o;if("function"==typeof r?(o=r(t),o instanceof Promise&&(o=await o)):o=r,Array.isArray(o)&&(o={items:o}),!("items"in o)||0==o.items.length)return;null==o.min&&(o.min=1),null==o.max&&(o.max=o.items.length),o.min>o.max&&(o.min=o.max),null==o.reusable&&(o.reusable=!1);const i=new Set,A=t.currPath,a=n.jsx($,{checkboxes:o,checkedItems:i,path:A});await t.injectMessage(a)},te=async(e,t)=>{const n=e.function;if(!n)return;const r=n(t);return r instanceof Promise?await r:r},ne=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))},re=({options:t,path:r})=>{var o,i,A,a,s,l;const{settings:c}=E(),{styles:u}=C(),{paths:d}=_(),{handleSubmitText:p}=$e(),[f,h]=e.useState([]),[g,m]=e.useState(!1),b={cursor:g?`url("${null==(o=c.general)?void 0:o.actionDisabledIcon}"), auto`:"pointer",color:null==(i=c.general)?void 0:i.primaryColor,borderColor:null==(A=c.general)?void 0:A.primaryColor,backgroundColor:"#fff",...u.botOptionStyle},y={color:"#fff",borderColor:null==(a=c.general)?void 0:a.primaryColor,backgroundColor:null==(s=c.general)?void 0:s.primaryColor,...u.botOptionHoveredStyle};e.useEffect((()=>{d.length>0&&d[d.length-1]!==r&&m(!t.reusable)}),[d]);return n.jsx("div",{className:"rcb-options-container "+(null!=(l=c.botBubble)&&l.showAvatar?"rcb-options-offset":""),children:t.items.map(((e,r)=>{const o=f[r]&&!g;return n.jsx("div",{className:"rcb-options",style:o?y:b,onMouseEnter:()=>(e=>{h((t=>{const n=[...t];return n[e]=!0,n}))})(r),onMouseLeave:()=>(e=>{h((t=>{const n=[...t];return n[e]=!1,n}))})(r),onMouseDown:n=>{var r;if(n.preventDefault(),g)return;let o;m(!t.reusable),o=null!=t.sendOutput?t.sendOutput:(null==(r=c.chatInput)?void 0:r.sendOptionOutput)??!0,p(e,o)},children:e},e)}))})},oe=async(e,t)=>{const r=e.options;if(!r)return;let o;if("function"==typeof r?(o=r(t),o instanceof Promise&&(o=await o)):o=r,Array.isArray(o)&&(o={items:o}),!("items"in o)||0==o.items.length)return;null==o.reusable&&(o.reusable=!1);const i=t.currPath,A=n.jsx(re,{options:o,path:i});await t.injectMessage(A)},ie=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)}},Ae=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 A=setTimeout((async()=>{const n=await r(e);n&&await le(n,t)}),i.duration);i.interruptable&&(n.current=A)},ae=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)},se=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)},le=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 te(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)},ce=()=>{var e;const{settings:t}=E(),{styles:r}=C();return n.jsx("div",{className:"rcb-line-break-container",children:n.jsx("div",{style:{...r.chatHistoryLineBreakStyle},className:"rcb-line-break-text","data-testid":"chat-history-line-break-text",children:null==(e=t.chatHistory)?void 0:e.chatHistoryLineBreakText})})},ue=()=>{var e;const{settings:t}=E(),{styles:r}=C(),o={borderTop:`4px solid ${null==(e=t.general)?void 0:e.primaryColor}`,...r.loadingSpinnerStyle};return n.jsx("div",{className:"rcb-spinner-container",children:n.jsx("div",{style:o,className:"rcb-spinner"})})},de=()=>{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")}},pe=(e,t)=>({id:de(),content:e,sender:t,type:"string"==typeof e?"string":"object",timestamp:(new Date).toUTCString(),tags:[]});let fe,he=!1,ge="rcb-history",me=30,be=!1,ye=[];const ve=async e=>{if(be||!fe)return;const t=[],n=he?ye.length:0;for(let r=e.length-1;r>=n;r--){const n=e[r];if("SYSTEM"!==n.sender.toUpperCase()&&(""!==n.content&&t.unshift(n),t.length===me))break}let r=t.map(Pe);if(r.length<me){const e=me-r.length;r=[...ye.slice(-e),...r]}Ee(r)},we=()=>ye,xe=e=>{Ee(e),ye=e},Ee=e=>{fe&&fe.setItem(ge,JSON.stringify(e))},ke=e=>{var t,n,r,o,i;fe="SESSION_STORAGE"===(null==(n=null==(t=e.chatHistory)?void 0:t.storageType)?void 0:n.toUpperCase())?sessionStorage:localStorage,ge=null==(r=e.chatHistory)?void 0:r.storageKey,me=null==(o=e.chatHistory)?void 0:o.maxEntries,be=null==(i=e.chatHistory)?void 0:i.disabled,ye=(e=>{if(null!=e)try{return JSON.parse(e)}catch{return[]}return[]})(fe.getItem(ge))},Pe=t=>e.isValidElement(t.content)?structuredClone({id:t.id,content:r.renderToString(t.content),type:t.type,sender:t.sender.toUpperCase(),timestamp:t.timestamp,tags:t.tags}):t,Be=(t,n,r)=>{const o=(new DOMParser).parseFromString(t,"text/html");return Array.from(o.body.childNodes).map(((t,o)=>{var i;if(t.nodeType===Node.TEXT_NODE)return t.textContent;{const A=t.tagName.toLowerCase();let a=Array.from(t.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"!==A&&"video"!==A||"controls"!==n||""!==t.value?e[n]=t.value:e[n]="true";return e}),{});if(Object.prototype.hasOwnProperty.call(a,"class")){const e=t.classList;a.className=e.toString(),delete a.class,null!=(i=n.botBubble)&&i.showAvatar&&(a=Ce(e,a)),a=De(e,a,n,r),a=Se(e,a,n,r),a=Ie(e,a,n,r),a=Te(e,a,n,r)}if(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"].includes(A))return e.createElement(A,{key:o,...a});{const i=Be(t.innerHTML,n,r);return e.createElement(A,{key:o,...a},...i)}}}))},Ce=(e,t)=>((e.contains("rcb-options-container")||e.contains("rcb-checkbox-container"))&&(t.className=`${e.toString()} rcb-options-offset`),t),De=(e,t,n,r)=>{var o,i,A,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==(A=r.botOptionStyle)?void 0:A.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botOptionStyle}),t},Se=(e,t,n,r)=>{var o,i,A,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==(A=r.botCheckboxRowStyle)?void 0:A.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botCheckboxRowStyle}),t},Ie=(e,t,n,r)=>{var o,i,A,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==(A=r.botCheckboxNextStyle)?void 0:A.color)??(null==(a=n.general)?void 0:a.primaryColor),cursor:`url("${null==(s=n.general)?void 0:s.actionDisabledIcon}"), auto`,...r.botCheckboxNextStyle}),t},Te=(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},Qe=()=>{const{settings:t}=E(),{notificationsToggledOn:n,setSyncedNotificationsToggledOn:r,hasInteractedPage:o,unreadCount:i,setUnreadCount:A,syncedNotificationsToggledOnRef:a}=L(),{audioBufferRef:s,audioContextRef:l,gainNodeRef:c}=T(),{dispatchRcbEvent:u}=z(),d=e.useCallback((async()=>{var e,n;const r=null==(e=t.notification)?void 0:e.sound;l.current=new AudioContext;const o=l.current.createGain();let i;if(o.gain.value=(null==(n=t.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 l.current.decodeAudioData(i)}),[t.notification]),p=e.useCallback((()=>{var e;if(null!=(e=t.notification)&&e.disabled||!a.current||!o||!l.current||!s.current)return;const n=l.current.createBufferSource();n.buffer=s.current,n.connect(c.current).connect(l.current.destination),n.start()}),[t.notification,a,o,l,s,c]);return{unreadCount:i,setUnreadCount:A,notificationsToggledOn:n,toggleNotifications:e.useCallback((async e=>{var n;e!==a.current&&(null!=(n=t.event)&&n.rcbToggleNotifications&&(await u(R.TOGGLE_NOTIFICATIONS,{currState:a.current,newState:!a.current})).defaultPrevented||r((e=>!e)))}),[a]),playNotificationSound:p,setUpNotifications:d}},Me=(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 A=!1;for(const e of n)if(window.speechSynthesis.getVoices().find((t=>{if(t.name===e)return i.voice=t,window.speechSynthesis.speak(i),void(A=!0)})),A)break;A||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)},Oe=()=>{const{settings:t}=E(),{audioToggledOn:n,setSyncedAudioToggledOn:r,syncedAudioToggledOnRef:o}=L(),{dispatchRcbEvent:i}=z(),A=e.useCallback((async e=>{var n;e!==o.current&&(null!=(n=t.event)&&n.rcbToggleAudio&&(await i(R.TOGGLE_AUDIO,{currState:o.current,newState:!o.current})).defaultPrevented||r((e=>!e)))}),[o]),a=e.useCallback((async e=>{var n,r;if(null!=(n=t.audio)&&n.disabled||!o.current)return;let A=e;if(null!=(r=t.event)&&r.rcbStartSpeakAudio){const e=await i(R.START_SPEAK_AUDIO,{textToRead:A});if(e.defaultPrevented)return;A=e.data.textToRead}Me(t,A)}),[t,o]);return{audioToggledOn:n,speakAudio:a,toggleAudio:A}},Le=()=>{var t,n;const{settings:r}=E(),{messages:o,setSyncedMessages:i,syncedMessagesRef:A}=W(),{setSyncedIsBotTyping:a,setUnreadCount:s,syncedIsScrollingRef:l,syncedIsChatWindowOpenRef:c}=L(),{streamMessageMap:u,chatBodyRef:d,paramsInputRef:p}=T(),{scrollToBottom:f,getIsChatBotVisible:h}=G(),{dispatchRcbEvent:g}=z(),{speakAudio:m}=Oe(),{playNotificationSound:b}=Qe(),y=e.useCallback(((e,t=!1)=>{var n,o;ve(e);let i=!0;const A=e[e.length-1];if(!A)return;const a=A.sender.toUpperCase();"USER"===a&&(i=!1),null!=(n=r.general)&&n.embedded&&h()&&(i=!1),(c.current&&!l.current||t)&&(i=!1),i&&b(),!t&&("USER"!==a&&null!=(o=r.chatWindow)&&o.autoJumpToBottom||"USER"===a||!l.current)&&setTimeout((()=>f()),1)}),[r,d,c,l,b,f,h]),v=e.useCallback((async(e,t="BOT",n=null)=>{var o,u,d,f,h;if("string"!=typeof e)throw new Error("Content must be of type string to simulate stream.");t=t.toUpperCase();let b=pe(e,t);if(null!=(o=r.event)&&o.rcbStartSimulateStreamMessage){const e=await g(R.START_SIMULATE_STREAM_MESSAGE,{message:b});if(e.defaultPrevented)return null;n=e.data.simulateStreamChunker||n,b=e.data.message}a(!1);let v=30;v="BOT"===t?null==(u=r.botBubble)?void 0:u.streamSpeed:null==(d=r.userBubble)?void 0:d.streamSpeed;const w={...b,content:""};i((e=>[...e,w])),y(A.current);let x=b.content;n&&(x=n(x));let E=0;const k=x.length;"BOT"===b.sender.toUpperCase()&&(c.current||null!=(f=r.general)&&f.embedded)&&"string"==typeof b.content&&""!==b.content.trim()&&m(b.content);const P=new Promise((e=>{const t=setInterval((()=>{if(E>=k)return clearInterval(t),void e();i((e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if(t[e].id===w.id){const n=x[E];n&&(w.content+=n,t[e]=w),E++;break}return t}))}),v)}));return(l.current||!c.current)&&s((e=>e+1)),await P,ve(A.current),null!=(h=r.event)&&h.rcbStopSimulateStreamMessage&&await g(R.STOP_SIMULATE_STREAM_MESSAGE,{message:b}),"USER"===t&&(p.current=e),b}),[r,g,y,A,p,a,s,c,m]),w=e.useCallback((async(e,t="BOT")=>{var n,o,a;t=t.toUpperCase();let u=pe(e,t);if(null!=(n=r.event)&&n.rcbPreInjectMessage){const e=await g(R.PRE_INJECT_MESSAGE,{message:u});if(e.defaultPrevented)return null;u=e.data.message}return"BOT"===u.sender.toUpperCase()&&(c.current||null!=(o=r.general)&&o.embedded)&&"string"==typeof u.content&&""!==u.content.trim()&&m(u.content),(l.current||!c.current)&&s((e=>e+1)),null!=(a=r.event)&&a.rcbPostInjectMessage&&await g(R.POST_INJECT_MESSAGE,{message:u}),i((e=>[...e,u])),y(A.current),"USER"===t&&"string"==typeof e&&(p.current=e),u}),[r,g,y,p,A,c,m,s]),x=e.useCallback((async e=>{var t;const n=A.current.find((t=>t.id===e));return!n||null!=(t=r.event)&&t.rcbRemoveMessage&&(await g(R.REMOVE_MESSAGE,{message:n})).defaultPrevented?null:(i((t=>t.filter((t=>t.id!==e)))),y(A.current),s((e=>Math.max(e-1,0))),n)}),[g,null==(t=r.event)?void 0:t.rcbRemoveMessage,y,A,s]),k=e.useCallback((async(e,t="BOT")=>{var n,o;if(t=t.toUpperCase(),!u.current.has(t)){const o=pe(e,t);return null!=(n=r.event)&&n.rcbStartStreamMessage&&(await g(R.START_STREAM_MESSAGE,{message:o})).defaultPrevented?null:(a(!1),i((e=>[...e,o])),y(A.current),u.current.set(t,o.id),(l.current||!c.current)&&s((e=>e+1)),o)}const d={...pe(e,t),id:u.current.get(t)};return null!=(o=r.event)&&o.rcbChunkStreamMessage&&(await g(R.CHUNK_STREAM_MESSAGE,{message:d})).defaultPrevented?null:(i((e=>e.map((e=>e.id===d.id?d:e)))),y(A.current,!0),d)}),[g,r.event,y,A,a,s,u]),P=e.useCallback((async(e="BOT")=>{var t;if(e=e.toUpperCase(),!u.current.has(e))return!0;const n=u.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 g(R.STOP_STREAM_MESSAGE,{message:o})).defaultPrevented)&&(u.current.delete(e),ve(A.current),"USER"===e&&"string"==typeof(null==o?void 0:o.content)&&(p.current=o.content),!0)}),[g,null==(n=r.event)?void 0:n.rcbStopStreamMessage,u,p]);return{simulateStreamMessage:v,injectMessage:w,removeMessage:x,streamMessage:k,endStreamMessage:P,replaceMessages:e.useCallback((e=>{i(e),y(e)}),[y]),messages:o}};let Ne,Re,je,He=!1,Fe=null;const _e=()=>{if(!Ne){const e=window.SpeechRecognition||window.webkitSpeechRecognition;Ne=null!=e?new e:null}return Ne},Ue=(e,t,n,r,o,i)=>{var A,a,s;const l=_e();if(!l)return;if(!He)try{He=!0,l.lang=null==(A=e.voice)?void 0:A.language,l.start()}catch{}const c=null==(a=e.voice)?void 0:a.timeoutPeriod,u=null==(s=e.voice)?void 0:s.autoSendPeriod;l.onresult=A=>{var a,s;clearTimeout(Re),Re=null,clearTimeout(je);const l=A.results[A.results.length-1][0].transcript;if(i.current){const t=null==(a=e.chatInput)?void 0:a.characterLimit,n=i.current.value+l;null!=t&&t>=0&&n.length>t?r(n.slice(0,t)):r(n),o(i.current.value.length)}c&&(Re=setTimeout((async()=>await Ye(t,i)),c)),null!=(s=e.voice)&&s.autoSendDisabled||(je=setTimeout(n,u))},l.onend=()=>{He?(l.start(),!Re&&c&&(Re=setTimeout((async()=>await Ye(t,i)),c))):(clearTimeout(Re),Re=null,clearTimeout(je))},c&&(Re=setTimeout((async()=>await Ye(t,i)),c))},ze=(e,t)=>{navigator.mediaDevices.getUserMedia({audio:!0}).then((n=>{if(Fe=new MediaRecorder(n),!He)try{He=!0,Fe.start()}catch{}Fe.ondataavailable=e=>{t.current&&t.current.push(e.data)},Fe.onstop=()=>{e(),n.getTracks().forEach((e=>e.stop()))}})).catch((e=>{console.error("Unable to use microphone:",e)}))},Ge=()=>{const e=_e();e&&(He=!1,e&&e.stop(),Fe&&"inactive"!==Fe.state&&(Fe.stop(),Fe=null),clearTimeout(Re),Re=null,clearTimeout(je))},Ye=async(e,t)=>{var n;null!=(n=t.current)&&n.disabled||await e(),Ge()},qe=()=>{const{settings:t}=E(),{voiceToggledOn:n,setSyncedVoiceToggledOn:r,syncedVoiceToggledOnRef:o}=L(),{dispatchRcbEvent:i}=z(),A=e.useCallback((async e=>{var n;e!==o.current&&(null!=(n=t.event)&&n.rcbToggleVoice&&(await i(R.TOGGLE_VOICE,{currState:o.current,newState:!o.current})).defaultPrevented||r((e=>!e)))}),[o]),a=e.useCallback((e=>{((e,t)=>{var n,r,o;const i=_e();null!=(n=t.voice)&&n.disabled||null==(r=t.chatInput)||!r.blockSpam||!i||(e&&!He?(He=!0,null!=(o=t.voice)&&o.sendAsAudio?null==Fe||Fe.start():i.start()):e||Ge())})(e,t)}),[t]);return{voiceToggledOn:n,toggleVoice:A,syncVoice:a}},We=()=>{var t;const{settings:n}=E(),{inputLength:r,setInputLength:o,textAreaDisabled:i,setSyncedTextAreaDisabled:A,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,syncedTextAreaDisabledRef:l,syncedTextAreaSensitiveModeRef:c}=L(),{inputRef:u,chatBodyRef:d,prevInputRef:p}=T(),{dispatchRcbEvent:f}=z(),{getIsChatBotVisible:h}=G(),g=e.useCallback((async e=>{var t,r,o;if(l.current&&u.current)u.current.value="";else if(u.current&&null!==p.current){const i=null==(t=n.chatInput)?void 0:t.characterLimit,A=(null==(r=n.chatInput)?void 0:r.allowNewline)?e:e.replace(/\n/g," ");if(null!=i&&i>=0&&A.length>i?u.current.value=A.slice(0,i):u.current.value=A,null!=(o=n.event)&&o.rcbTextAreaChangeValue&&(await f(R.TEXT_AREA_CHANGE_VALUE,{currValue:u.current.value,prevValue:p.current})).defaultPrevented)return void(u.current.value=p.current);p.current=u.current.value}}),[l,u,p,n,f]),m=e.useCallback((e=>{var t;null!=(t=u.current)&&t.disabled||setTimeout((()=>{var t,r,o;null!=(t=n.general)&&t.embedded?h()&&(null==(r=u.current)||r.focus()):"start"!==e&&(null==(o=u.current)||o.focus())}),100)}),[u,null==(t=n.general)?void 0:t.embedded,d,h]),b=e.useCallback((()=>{u.current&&u.current.focus()}),[]),y=e.useCallback((()=>{u.current&&u.current.blur()}),[]),v=e.useCallback((()=>u&&u.current?u.current.value:""),[]),w=e.useCallback((e=>{e!==l.current&&A((e=>!e))}),[l]),x=e.useCallback((e=>{e!==c.current&&s((e=>!e))}),[c]);return{textAreaDisabled:i,setSyncedTextAreaDisabled:A,textAreaSensitiveMode:a,setSyncedTextAreaSensitiveMode:s,inputLength:r,setInputLength:o,getTextAreaValue:v,setTextAreaValue:g,updateTextAreaFocus:m,focusTextArea:b,blurTextArea:y,toggleTextAreaDisabled:w,toggleTextAreaSensitiveMode:x}},Ve=e.createContext({toasts:[],setSyncedToasts:()=>{},syncedToastsRef:{current:[]}}),Xe=()=>e.useContext(Ve),Ke=({children:e})=>{const[t,r,o]=M([]);return n.jsx(Ve.Provider,{value:{toasts:t,setSyncedToasts:r,syncedToastsRef:o},children:e})},Je=()=>{const{settings:t}=E(),{toasts:n,setSyncedToasts:r,syncedToastsRef:o}=Xe(),{dispatchRcbEvent:i}=z(),A=e.useCallback((async(e,n)=>{var A,a,s,l;let c=null;if(o.current.length>=((null==(A=t.toast)?void 0:A.maxCount)??3)){if(null!=(a=t.toast)&&a.forbidOnMax)return null;c=de();let o={id:c,content:e,timeout:n};if(null!=(s=t.event)&&s.rcbShowToast){const e=await i(R.SHOW_TOAST,{toast:o});if(e.defaultPrevented)return null;o=e.data.toast}return r((e=>[...e.slice(1),o])),c}c=de();let u={id:c,content:e,timeout:n};if(null!=(l=t.event)&&l.rcbShowToast){const e=await i(R.SHOW_TOAST,{toast:u});if(e.defaultPrevented)return null;u=e.data.toast}return r((e=>[...e,u])),c}),[t,i]),a=e.useCallback((async e=>{var n;const A=o.current.find((t=>t.id===e));return!A||null!=(n=t.event)&&n.rcbDismissToast&&(await i(R.DISMISS_TOAST,{toast:A})).defaultPrevented?null:(r((t=>t.filter((t=>t.id!==e)))),e)}),[i]);return{showToast:A,dismissToast:a,toasts:n,replaceToasts:e.useCallback((e=>{r(e)}),[])}},Ze=()=>{var t,n,r,o,i;const{settings:A}=E(),{paths:a,setSyncedPaths:s,syncedPathsRef:l}=_(),{flowRef:c,streamMessageMap:u,paramsInputRef:d,keepVoiceOnRef:p,timeoutIdRef:f}=T(),{setSyncedIsBotTyping:h,setSyncedTextAreaDisabled:g,setSyncedTextAreaSensitiveMode:m,blockAllowsAttachment:b,setBlockAllowsAttachment:y}=L(),{dispatchRcbEvent:v}=z(),{endStreamMessage:w,injectMessage:x,removeMessage:k,simulateStreamMessage:P,streamMessage:B}=Le(),{showToast:C,dismissToast:D}=Je(),{toggleChatWindow:S}=G(),{updateTextAreaFocus:I,setTextAreaValue:Q}=We(),{syncVoice:M}=qe(),O=e.useCallback((async e=>{var t;if(null!=(t=A.event)&&t.rcbPostProcessBlock){const t=await v(R.POST_PROCESS_BLOCK,{block:e});if(t.defaultPrevented)return null;e=t.data.block}return e}),[null==(t=A.event)?void 0:t.rcbPostProcessBlock,v]),N=e.useCallback((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=A.event)&&n.rcbPreProcessBlock){const e=await v(R.PRE_PROCESS_BLOCK,{block:a});if(e.defaultPrevented)return;a=e.data.block}h(!0),null!=(r=A.chatInput)&&r.blockSpam&&g(!0),m(!1);const s={prevPath:t,currPath:e,goToPath:F,setTextAreaValue:Q,userInput:d.current,endStreamMessage:w,injectMessage:x,removeMessage:k,simulateStreamMessage:P,streamMessage:B,toggleChatWindow:S,showToast:C,dismissToast:D};await(async(e,t,n,r,o,i,A)=>{if(!e)throw new Error("Block is not valid.");for(const a of Object.keys(e))switch(a){case"message":await ne(e,t,n);break;case"options":await oe(e,t);break;case"checkboxes":await ee(e,t);break;case"component":await ie(e,t);break;case"chatDisabled":await ae(e,t,o);break;case"isSensitive":await se(e,t,i);break;case"transition":await Ae(e,t,r,A)}})(a,s,(null==(o=A.botBubble)?void 0:o.simulateStream)??!1,f,g,m,O),h(!1),"chatDisabled"in a||g(null==(i=A.chatInput)?void 0:i.disabled),"isSensitive"in a||m(!1),y("function"==typeof a.file),I(e),M(p.current&&!a.chatDisabled),e!==t&&u.current.clear()}),[c,I,M,null==(n=A.botBubble)?void 0:n.simulateStream,null==(r=A.chatInput)?void 0:r.disabled,d,w,x,k,P,B,S,C,D,p,u]),j=e.useCallback((()=>l.current.length>0?l.current.at(-1)??null:null),[]),H=e.useCallback((()=>l.current.length>1?l.current.at(-2)??null:null),[]),F=e.useCallback((async e=>{var t;const n=j(),r=H();return(null==(t=A.event)||!t.rcbChangePath||!(await v(R.CHANGE_PATH,{currPath:n,prevPath:r,nextPath:e})).defaultPrevented)&&(s((t=>[...t,e])),await N(e,n),!0)}),[null==(o=A.chatInput)?void 0:o.blockSpam,null==(i=A.event)?void 0:i.rcbChangePath,N,v]),U=e.useCallback((e=>{s(e)}),[]);return{getCurrPath:j,getPrevPath:H,goToPath:F,blockAllowsAttachment:b,setBlockAllowsAttachment:y,paths:a,replacePaths:U,firePostProcessBlockEvent:O}},$e=()=>{var t,n,r,o;const{settings:i}=E(),{endStreamMessage:A,injectMessage:a,removeMessage:s,simulateStreamMessage:l,streamMessage:c}=Le(),{syncedPathsRef:u}=_(),{getCurrPath:d,getPrevPath:p,goToPath:f,firePostProcessBlockEvent:h}=Ze(),{setSyncedTextAreaSensitiveMode:g,setSyncedTextAreaDisabled:m,setSyncedIsBotTyping:b,setBlockAllowsAttachment:y,setInputLength:v,syncedVoiceToggledOnRef:w,syncedTextAreaSensitiveModeRef:x}=L(),{flowRef:k,inputRef:P,keepVoiceOnRef:B,paramsInputRef:C,timeoutIdRef:D}=T(),{showToast:S,dismissToast:I}=Je(),{dispatchRcbEvent:Q}=z(),{syncVoice:M}=qe(),{setTextAreaValue:O}=We(),{toggleChatWindow:N}=G(),j=e.useCallback((async e=>{var t,n,r,o,A,s;const c=d();if(c&&k.current[c]){if(x.current){if(null!=(t=null==i?void 0:i.sensitiveInput)&&t.hideInUserBubble)return;if(null!=(n=null==i?void 0:i.sensitiveInput)&&n.maskInUserBubble)return void(null!=(r=i.userBubble)&&r.simulateStream?await l("*".repeat((null==(o=i.sensitiveInput)?void 0:o.asterisksCount)??10),"USER"):await a("*".repeat((null==(A=i.sensitiveInput)?void 0:A.asterisksCount)??10),"USER"))}null!=(s=i.userBubble)&&s.simulateStream?await l(e,"USER"):await a(e,"USER")}}),[k,d,i,a,l,x]),H=e.useCallback((async(e,t=!0)=>{var n,r;if(""===(e=e.trim()))return;t&&await j(e),D.current&&clearTimeout(D.current),P.current&&(O(""),v(0));const o=d();if(!o)return;let x=k.current[o];const E=await h(x);E&&(null!=(n=i.chatInput)&&n.blockSpam&&m(!0),B.current=w.current,M(!1),setTimeout((()=>{b(!0)}),400),g(!1),setTimeout((async()=>{var e;const t={prevPath:p(),currPath:d(),goToPath:f,setTextAreaValue:O,userInput:C.current,injectMessage:a,simulateStreamMessage:l,streamMessage:c,removeMessage:s,endStreamMessage:A,toggleChatWindow:N,showToast:S,dismissToast:I},n=u.current.length;await le(E,t),u.current.length===n&&(m("chatDisabled"in x?!!x.chatDisabled:!(null==(e=i.chatInput)||!e.disabled)),se(x,t,g),y("function"==typeof x.file),M(B.current),b(!1))}),null==(r=i.chatInput)?void 0:r.botDelay))}),[D,null==(t=i.chatInput)?void 0:t.blockSpam,null==(n=i.chatInput)?void 0:n.botDelay,null==(r=i.chatInput)?void 0:r.disabled,B,w,M,j,p,d,f,a,l,c,s,A,N,S,I,k]);return{handleSubmitText:e.useCallback((async(e,t=!0)=>{var n,r;e=e??(null==(n=P.current)?void 0:n.value),!(null!=(r=i.event)&&r.rcbUserSubmitText&&(await Q(R.USER_SUBMIT_TEXT,{inputText:e,sendInChat:t})).defaultPrevented||!d())&&H(e,t)}),[Q,d,H,P,null==(o=i.event)?void 0:o.rcbUserSubmitText])}},et=()=>{var t;const{settings:n}=E();return e.useMemo((()=>{var e;if(typeof window>"u"||!window.navigator)return!1;if(null==(e=n.device)||!e.applyMobileOptimizations)return!0;const t=navigator.userAgent,r=!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t),o=window.innerWidth>=768;return r&&o}),[null==(t=n.device)?void 0:t.applyMobileOptimizations])},tt=({buttons:t})=>{var r,o,i,A,a,s,l,c,u,d,p;const f=et(),{settings:h}=E(),{styles:g}=C(),{textAreaDisabled:m,textAreaSensitiveMode:b,inputLength:y,hasFlowStarted:v,setHasFlowStarted:w,setInputLength:x}=L(),{inputRef:k}=T(),[P,B]=e.useState(!1),[D,S]=e.useState(!1),{handleSubmitText:I}=$e(),{setTextAreaValue:Q}=We(),M={boxSizing:f?"content-box":"border-box",...g.chatInputAreaStyle},O={outline:m?"":"none",boxShadow:m?"":`0 0 5px ${null==(r=h.general)?void 0:r.primaryColor}`,boxSizing:f?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaFocusedStyle},N={cursor:`url("${null==(o=h.general)?void 0:o.actionDisabledIcon}"), auto`,caretColor:"transparent",boxSizing:f?"content-box":"border-box",...g.chatInputAreaStyle,...g.chatInputAreaDisabledStyle},R={color:"#989898",...g.characterLimitStyle},j={color:"#ff0000",...g.characterLimitReachedStyle},H=m?null==(i=h.chatInput)?void 0:i.disabledPlaceholderText:null==(A=h.chatInput)?void 0:A.enabledPlaceholderText,F=()=>{m||B(!0)},_=()=>{B(!1)},U=()=>{S(!0)},z=()=>{S(!1)},G=async e=>{var t;if(!D&&"Enter"===e.key){if(e.shiftKey)return void(null!=(t=h.chatInput)&&t.allowNewline||e.preventDefault());e.preventDefault(),await I()}},Y=e=>{k.current&&(Q(e.target.value),x(k.current.value.length))};return n.jsxs("div",{"aria-label":(null==(a=h.ariaLabel)?void 0:a.inputTextArea)??"input text area",role:"textbox",onMouseDown:e=>{var t;e.stopPropagation(),!v&&"ON_CHATBOT_INTERACT"===(null==(t=h.general)?void 0:t.flowStartTrigger)&&w(!0)},style:{...g.chatInputContainerStyle},className:"rcb-chat-input",children:[b&&null!=(s=h.sensitiveInput)&&s.maskInTextArea?n.jsx("input",{ref:k,type:"password",className:"rcb-chat-input-textarea",style:m?N:P?O:M,placeholder:H,onChange:Y,onKeyDown:G,onFocus:F,onBlur:_,onCompositionStart:U,onCompositionEnd:z}):n.jsx("textarea",{ref:k,style:m?N:P?O:M,rows:1,className:"rcb-chat-input-textarea",placeholder:H,onChange:Y,onKeyDown:G,onFocus:F,onBlur:_,onCompositionStart:U,onCompositionEnd:z}),n.jsxs(n.Fragment,{children:[null==t?void 0:t.map(((t,r)=>n.jsx(e.Fragment,{children:t},r))),(null==(l=h.chatInput)?void 0:l.showCharacterCount)&&null!=(null==(c=h.chatInput)?void 0:c.characterLimit)&&(null==(u=h.chatInput)?void 0:u.characterLimit)>0&&n.jsxs("div",{className:"rcb-chat-input-char-counter",style:y>=(null==(d=h.chatInput)?void 0:d.characterLimit)?j:R,children:[y,"/",null==(p=h.chatInput)?void 0:p.characterLimit]})]})]})},nt=({buttons:t})=>{var r;const{settings:o}=E(),{styles:i}=C();return n.jsxs("div",{"data-testid":"chatbot-footer-container",style:{...i.footerStyle},className:"rcb-chat-footer-container",children:[n.jsx("div",{className:"rcb-chat-footer",children:null==t?void 0:t.map(((t,r)=>n.jsx(e.Fragment,{children:t},r)))}),n.jsx("span",{children:null==(r=o.footer)?void 0:r.text})]})},rt=()=>{var e,t,r,o,i,A,a;const{settings:s}=E(),{styles:l}=C(),{unreadCount:c}=L(),{isChatWindowOpen:u,toggleChatWindow:d}=G(),p={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})`,...l.chatButtonStyle},f={backgroundImage:`url(${null==(r=s.chatButton)?void 0:r.icon})`,fill:"#fff",width:75,height:75,...l.chatIconStyle};return n.jsx(n.Fragment,{children:!(null!=(o=s.general)&&o.embedded)&&n.jsxs("div",{"aria-label":(null==(i=s.ariaLabel)?void 0:i.chatButton)??"open chat",role:"button",style:p,className:"rcb-toggle-button "+(u?"rcb-button-hide":"rcb-button-show"),onClick:()=>d(!0),children:[(()=>{var e;const t=null==(e=s.chatButton)?void 0:e.icon;return t&&"string"!=typeof t?t&&n.jsx("span",{className:"rcb-toggle-icon",children:n.jsx(t,{style:f})}):n.jsx("span",{className:"rcb-toggle-icon",style:f})})(),!(null!=(A=s.notification)&&A.disabled)&&(null==(a=s.notification)?void 0:a.showCount)&&n.jsx("span",{style:{...l.notificationBadgeStyle},className:"rcb-badge",children:c})]})})},ot=()=>{var t,r,o,i;const A=et(),{settings:a}=E(),{styles:s}=C(),{chatBodyRef:l}=T(),{isChatWindowOpen:c,toggleChatWindow:u}=G(),[d,p]=e.useState(!1),[f,h]=e.useState(!1),[g,m]=e.useState(0);e.useEffect((()=>{var e,t,n;const r=null==(e=a.tooltip)?void 0:e.mode;if("ALWAYS"===r)if(A){let e;e=c?((null==(t=l.current)?void 0:t.offsetWidth)??375)-("number"==typeof(null==(n=s.chatButtonStyle)?void 0:n.width)?s.chatButtonStyle.width:75):0,m(e),p(!0)}else p(!c);else"NEVER"===r?p(!1):"START"===r?f?p(!1):(h(!0),p(!0)):"CLOSE"===r&&p(!c)}),[c]);const b={transform:`translateX(-${g}px)`,right:((null==(t=s.chatButtonStyle)?void 0:t.width)??75)+40,bottom:30,backgroundColor:null==(r=a.general)?void 0:r.secondaryColor,color:"#fff",...s.tooltipStyle},y={borderColor:`transparent transparent transparent ${b.backgroundColor}`};return n.jsx(n.Fragment,{children:!(null!=(o=a.general)&&o.embedded)&&n.jsxs("div",{"data-testid":"chat-tooltip",style:b,className:"rcb-chat-tooltip "+(d?"rcb-tooltip-show":"rcb-tooltip-hide"),onClick:()=>u(!0),children:[n.jsx("span",{children:null==(i=a.tooltip)?void 0:i.text}),n.jsx("span",{className:"rcb-chat-tooltip-tail",style:y})]})})},it=({id:t,content:r,timeout:o})=>{var i,A;const{settings:a}=E(),{styles:s}=C(),[l]=e.useState({toastPromptStyle:{...s.toastPromptStyle},toastPromptHoveredStyle:{...s.toastPromptHoveredStyle}}),{dismissToast:c}=Je(),[u,d]=e.useState(!1),p={color:null==(i=a.general)?void 0:i.primaryColor,borderColor:null==(A=a.general)?void 0:A.primaryColor,...l.toastPromptHoveredStyle};return e.useEffect((()=>{if(o){const e=setTimeout((()=>{c(t)}),o);return()=>clearTimeout(e)}}),[t,c,o]),"string"==typeof r?n.jsx("div",{onMouseEnter:()=>{d(!0)},onMouseLeave:()=>{d(!1)},style:u?p:l.toastPromptStyle,onMouseDown:async e=>{var n;null!=(n=a.toast)&&n.dismissOnClick&&(e.preventDefault(),await c(t))},className:"rcb-toast-prompt",children:r}):n.jsx(n.Fragment,{children:r})},At=()=>{var e,t,r,o,i,A,a,s,l,c,u,d;const{styles:p}=C(),{toasts:f}=Xe(),h={bottom:`calc(${"number"==typeof(null==(e=p.footerStyle)?void 0:e.height)?`${null==(t=p.footerStyle)?void 0:t.height}px`:(null==(r=p.footerStyle)?void 0:r.height)??"50px"} + ${"number"==typeof(null==(o=p.chatInputContainerStyle)?void 0:o.height)?`${null==(i=p.chatInputContainerStyle)?void 0:i.height}px`:(null==(A=p.chatInputContainerStyle)?void 0:A.height)??"70px"} + 20px)`,width:300,minWidth:`calc(${"number"==typeof(null==(a=p.chatWindowStyle)?void 0:a.width)?`${null==(s=p.chatWindowStyle)?void 0:s.width}px`:(null==(l=p.chatWindowStyle)?void 0:l.width)??"375px"} / 2)`,maxWidth:`calc(${"number"==typeof(null==(c=p.chatWindowStyle)?void 0:c.width)?`${null==(u=p.chatWindowStyle)?void 0:u.width}px`:(null==(d=p.chatWindowStyle)?void 0:d.width)??"375px"} - 50px)`,...p.toastPromptContainerStyle};return n.jsx("div",{className:"rcb-toast-prompt-container",style:h,children:f.map((e=>n.jsx(it,{id:e.id,content:e.content,timeout:e.timeout},e.id)))})},at=({file:e,fileType:t,fileUrl:r})=>{var o,i,A;const{settings:a}=E(),{styles:s}=C(),l={backgroundColor:null==(o=a.general)?void 0:o.primaryColor,maxWidth:null!=(i=a.userBubble)&&i.showAvatar?"65%":"70%",...s.mediaDisplayContainerStyle};return n.jsx(n.Fragment,{children:r?n.jsxs(n.Fragment,{children:["image"===t&&r&&n.jsx("div",{style:l,className:"rcb-media-display-image-container rcb-media-entry","data-testid":"media-display-image-container",children:n.jsx("img",{src:r,alt:"Image Display",className:"rcb-media-display-image"})}),"video"===t&&r&&n.jsx("div",{style:l,className:"rcb-media-display-video-container rcb-media-entry","data-testid":"media-display-video-container",children:n.jsxs("video",{controls:!0,className:"rcb-media-display-video",children:[n.jsx("source",{src:r,type:e.type}),"Your browser does not support the video tag."]})}),"audio"===t&&r&&n.jsxs("audio",{"data-testid":"media-display-audio-container",style:{maxWidth:null!=(A=a.userBubble)&&A.showAvatar?"65%":"70%"},controls:!0,className:"rcb-media-display-audio rcb-media-entry",children:[n.jsx("source",{src:r,type:e.type}),"Your browser does not support the audio tag."]})]}):n.jsx(n.Fragment,{})})},st=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}}},lt=()=>{var e,t,r,o,i,A;const{settings:a}=E(),{styles:s}=C(),{injectMessage:l,simulateStreamMessage:c,streamMessage:u,removeMessage:d,endStreamMessage:p}=Le(),{getCurrPath:f,getPrevPath:h,goToPath:g,blockAllowsAttachment:m}=Ze(),{flowRef:b,inputRef:y}=T(),v=b.current,{showToast:w,dismissToast:x}=Je(),{dispatchRcbEvent:k}=z(),{toggleChatWindow:P}=G(),{setTextAreaValue:B}=We(),{handleSubmitText:D}=$e(),S={cursor:`url("${null==(e=a.general)?void 0:e.actionDisabledIcon}"), auto`,...s.fileAttachmentButtonStyle,...s.fileAttachmentButtonDisabledStyle},I={backgroundImage:`url(${null==(t=a.fileAttachment)?void 0:t.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle},Q={backgroundImage:`url(${null==(r=a.fileAttachment)?void 0:r.icon})`,fill:"#a6a6a6",...s.fileAttachmentIconStyle,...s.fileAttachmentIconDisabledStyle};return n.jsxs("label",{"aria-label":(null==(o=a.ariaLabel)?void 0:o.fileAttachmentButton)??"upload file",role:"button",className:m?"rcb-attach-button-enabled":"rcb-attach-button-disabled",style:m?{...s.fileAttachmentButtonStyle}:S,children:[n.jsx("input",{className:"rcb-attach-input",role:"file",type:"file",onChange:async e=>{var t,r,o,i;const A=e.target.files;if(!A)return;const s=Array.from(A);if(e.target.value="",null!=(t=a.event)&&t.rcbUserUploadFile&&(await k(R.USER_UPLOAD_FILE,{files:s})).defaultPrevented)return;const m=f();if(!m)return;const b=v[m];if(!b)return;const E=b.file;if(null!=E){const e=[];for(let t=0;t<s.length;t++){if(e.push(s[t].name),null==(r=a.fileAttachment)||!r.showMediaDisplay)continue;const o=await st(s[t]);!o.fileType||!o.fileUrl||await l(n.jsx(at,{file:s[t],fileType:o.fileType,fileUrl:o.fileUrl}),"USER")}await D("📄 "+e.join(", "),null==(o=a.fileAttachment)?void 0:o.sendFileName),await E({userInput:null==(i=y.current)?void 0:i.value,prevPath:h(),currPath:f(),goToPath:g,setTextAreaValue:B,injectMessage:l,simulateStreamMessage:c,streamMessage:u,removeMessage:d,endStreamMessage:p,toggleChatWindow:P,showToast:w,dismissToast:x,files:s})}},multiple:null==(i=a.fileAttachment)?void 0:i.multiple,accept:null==(A=a.fileAttachment)?void 0:A.accept,disabled:!m}),(()=>{var e,t;const r=m?null==(e=a.fileAttachment)?void 0:e.icon:null==(t=a.fileAttachment)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:m?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",children:n.jsx(r,{style:m?I:Q})}):n.jsx("span",{className:m?"rcb-attach-icon-enabled":"rcb-attach-icon-disabled",style:m?I:Q})})()]})},ct=()=>{var t,r,o,i,A,a;const{settings:s}=E(),{styles:l}=C(),{syncedTextAreaDisabledRef:c}=L(),{inputRef:u}=T(),{textAreaDisabled:d,setTextAreaValue:p}=We(),f=e.useRef(null),h=e.useRef(null),[g,m]=e.useState(!1),b={cursor:`url("${null==(t=s.general)?void 0:t.actionDisabledIcon}"), auto`,...l.emojiButtonStyle,...l.emojiButtonDisabledStyle},y={backgroundImage:`url(${null==(r=s.emoji)?void 0:r.icon})`,fill:"#a6a6a6",...l.emojiIconStyle},v={backgroundImage:`url(${null==(o=s.emoji)?void 0:o.icon})`,fill:"#a6a6a6",...l.emojiIconStyle,...l.emojiIconDisabledStyle};e.useEffect((()=>{const e=e=>{const t=e.composedPath();f.current&&!t.includes(f.current)&&h.current&&!t.includes(h.current)&&m(!1)},t=()=>{(()=>{if(f.current&&h.current){const e=h.current.getBoundingClientRect(),t=f.current.offsetHeight,n=e.top-t-8;f.current.style.left=`${e.left}px`,f.current.style.top=`${n}px`}})()};return document.addEventListener("mousedown",e),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t)}}),[]);return n.jsxs(n.Fragment,{children:[n.jsx("div",{"aria-label":(null==(i=s.ariaLabel)?void 0:i.emojiButton)??"emoji picker",role:"button",ref:h,className:""+(d?"rcb-emoji-button-disabled":"rcb-emoji-button-enabled"),style:d?b:{...l.emojiButtonStyle},onMouseDown:e=>{e.preventDefault(),c.current?m(!1):m((e=>!e))},children:(()=>{var e,t;const r=d?null==(e=s.emoji)?void 0:e.iconDisabled:null==(t=s.emoji)?void 0:t.icon;return r&&"string"!=typeof r?r&&n.jsx("span",{className:""+(d?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),children:n.jsx(r,{style:d?v:y})}):n.jsx("span",{className:""+(d?"rcb-emoji-icon-disabled":"rcb-emoji-icon-enabled"),style:d?v:y})})()}),g&&n.jsx("div",{className:"rcb-emoji-button-popup",ref:f,children:null==(a=null==(A=s.emoji)?void 0:A.list)?void 0:a.map(((e,t)=>n.jsx("span",{className:"rcb-emoji",onMouseDown:t=>((e,t)=>{e.preventDefault(),u.current&&(p(u.current.value+t),setTimeout((()=>{const e=u.current;if(e){e.focus();const t=e.value.length;e.setSelectionRange(t,t)}}),50)),m(!1)})(t,e),children:e},t)))})]})},ut=()=>{var e,t,r;const{settings:o}=E(),{styles:i}=C(),{audioToggledOn:A,toggleAudio:a}=Oe(),s={backgroundImage:`url(${null==(e=o.audio)?void 0:e.icon})`,fill:"#fcec3d",...i.audioIconStyle},l={backgroundImage:`url(${null==(t=o.audio)?void 0:t.iconDisabled})`,fill:"#e8eaed",...i.audioIconStyle,...i.audioIconDisabledStyle};return n.jsx("div",{"aria-label":(null==(r=o.ariaLabel)?void 0:r.audioButton)??"toggle audio",role:"button",onMouseDown:async e=>{e.preventDefault(),await a()},style:A?{...i.audioButtonStyle}:{...i.audioButtonStyle,...i.audioButtonDisabledStyle},children:(()=>{var e,t;const r=A?null==(e=o.audio)?void 0:e.icon:null==(t=o.audio)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",children:n.jsx(r,{style:A?s:l,"data-testid":"rcb-audio-icon-svg"})}):n.jsx("span",{className:"rcb-audio-icon","data-testid":"rcb-audio-icon",style:A?s:l})})()})},dt=()=>{var e,t;const{settings:r}=E(),{styles:o}=C(),{toggleChatWindow:i}=G(),A={backgroundImage:`url(${null==(e=r.header)?void 0:e.closeChatIcon})`,fill:"#e8eaed",stroke:"#e8eaed",...o.closeChatIconStyle};return n.jsx("div",{"aria-label":(null==(t=r.ariaLabel)?void 0:t.closeChatButton)??"close chat",role:"button",onMouseDown:e=>{e.stopPropagation(),i(!1)},style:{...o.closeChatButtonStyle},children:(()=>{var e;const t=null==(e=r.header)?void 0:e.closeChatIcon;return t&&"string"!=typeof t?t&&n.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",children:n.jsx(t,{style:A})}):n.jsx("span",{className:"rcb-close-chat-icon","data-testid":"rcb-close-chat-icon",style:A})})()})},pt=()=>{var e,t,r;const{settings:o}=E(),{styles:i}=C(),{notificationsToggledOn:A,toggleNotifications:a}=(()=>{const{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}=Qe();return{notificationsToggledOn:e,toggleNotifications:t,playNotificationSound:n}})(),s={backgroundImage:`url(${null==(e=o.notification)?void 0:e.icon})`,fill:"#fcec3d",...i.notificationIconStyle},l={backgroundImage:`url(${null==(t=o.notification)?void 0:t.iconDisabled})`,fill:"#e8eaed",...i.notificationIconStyle,...i.notificationIconDisabledStyle};return n.jsx("div",{"aria-label":(null==(r=o.ariaLabel)?void 0:r.notificationButton)??"toggle notifications",role:"button",onMouseDown:async e=>{e.preventDefault(),await a()},style:A?{...i.notificationButtonStyle}:{...i.notificationButtonStyle,...i.notificationButtonDisabledStyle},children:(()=>{var e,t;const r=A?null==(e=o.notification)?void 0:e.icon:null==(t=o.notification)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",children:n.jsx(r,{style:A?s:l,"data-testid":"rcb-notification-icon-svg"})}):n.jsx("span",{className:"rcb-notification-icon","data-testid":"rcb-notification-icon",style:A?s:l})})()})},ft=()=>{var t,r,o;const{settings:i}=E(),{styles:A}=C(),{injectMessage:a}=Le(),{inputRef:s}=T(),{voiceToggledOn:l,toggleVoice:c}=qe(),{setInputLength:u,setTextAreaValue:d,textAreaDisabled:p}=We(),{handleSubmitText:f}=$e(),h=e.useRef([]),[g,m]=e.useState(!1);e.useEffect((()=>{var e;null!=(e=i.voice)&&e.sendAsAudio?(w(),h.current=[]):f()}),[g]),e.useEffect((()=>{l?((e,t,n,r,o,i,A)=>{var a;null!=(a=e.voice)&&a.sendAsAudio?ze(n,i):Ue(e,t,n,r,o,A)})(i,c,v,d,u,h,s):Ge()}),[l]);const b={backgroundImage:`url(${null==(t=i.voice)?void 0:t.icon})`,fill:"#9aa0a6",...A.voiceIconStyle},y={backgroundImage:`url(${null==(r=i.voice)?void 0:r.iconDisabled})`,fill:"#9aa0a6",...A.voiceIconStyle,...A.voiceIconDisabledStyle},v=()=>{m((e=>!e))},w=async()=>{const e=new Blob(h.current,{type:"audio/wav"}),t=new File([e],"voice-input.wav",{type:"audio/wav"}),r=await st(t);!r.fileType||!r.fileUrl||await a(n.jsx(at,{file:t,fileType:r.fileType,fileUrl:r.fileUrl}),"USER")};return n.jsx("div",{"aria-label":(null==(o=i.ariaLabel)?void 0:o.voiceButton)??"toggle voice",role:"button",onMouseDown:async e=>{e.preventDefault(),!p&&await c()},style:l&&!p?{...A.voiceButtonStyle}:{...A.voiceButtonStyle,...A.voiceButtonDisabledStyle},className:l&&!p?"rcb-voice-button-enabled":"rcb-voice-button-disabled",children:(()=>{var e,t;const r=l?null==(e=i.voice)?void 0:e.icon:null==(t=i.voice)?void 0:t.iconDisabled;return r&&"string"!=typeof r?r&&n.jsx("span",{className:"rcb-voice-icon "+(l&&!p?"on":""),children:n.jsx(r,{style:l&&!p?b:y})}):n.jsx("span",{className:"rcb-voice-icon"+(l&&!p?"-on":""),"data-testid":"rcb-voice-icon",style:l&&!p?b:y})})()})},ht=()=>{var t,r,o,i,A,a,s,l;const{settings:c}=E(),{styles:u}=C(),{textAreaDisabled:d}=L(),[p,f]=e.useState(!1),{handleSubmitText:h}=$e(),g={backgroundColor:null==(t=c.general)?void 0:t.primaryColor,...u.sendButtonStyle},m={cursor:`url("${null==(r=c.general)?void 0:r.actionDisabledIcon}"), auto`,backgroundColor:null==(o=c.general)?void 0:o.primaryColor,...u.sendButtonStyle,...u.sendButtonDisabledStyle},b={backgroundColor:null==(i=c.general)?void 0:i.secondaryColor,...u.sendButtonStyle,...u.sendButtonHoveredStyle},y={backgroundImage:`url(${null==(A=c.chatInput)?void 0:A.sendButtonIcon})`,fill:"#fff",...u.sendIconStyle},v={backgroundImage:`url(${null==(a=c.chatInput)?void 0:a.sendButtonIcon})`,fill:"#fff",...u.sendIconStyle,...u.sendIconDisabledStyle},w={backgroundImage:`url(${null==(s=c.chatInput)?void 0:s.sendButtonIcon})`,fill:"#fff",...u.sendIconStyle,...u.sendIconHoveredStyle};return n.jsx("div",{"aria-label":(null==(l=c.ariaLabel)?void 0:l.sendButton)??"send message",role:"button",onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onMouseDown:async e=>{null==e||e.preventDefault(),!d&&await h()},style:d?m:p?b:g,className:"rcb-send-button",children:(()=>{var e;const t=null==(e=c.chatInput)?void 0:e.sendButtonIcon;return t&&"string"!=typeof t?t&&n.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",children:n.jsx(t,{style:d?v:p?w:y})}):n.jsx("span",{className:"rcb-send-icon","data-testid":"rcb-send-icon",style:d?v:p?w:y})})()})},gt=(e,t)=>{var n,r,o,i,A,a,l,c,u;const d={[s.AUDIO_BUTTON]:null==(n=e.audio)?void 0:n.disabled,[s.CLOSE_CHAT_BUTTON]:null==(r=e.general)?void 0:r.embedded,[s.EMOJI_PICKER_BUTTON]:null==(o=e.emoji)?void 0:o.disabled,[s.FILE_ATTACHMENT_BUTTON]:null==(i=e.fileAttachment)?void 0:i.disabled,[s.NOTIFICATION_BUTTON]:null==(A=e.notification)?void 0:A.disabled,[s.SEND_MESSAGE_BUTTON]:!1,[s.VOICE_MESSAGE_BUTTON]:null==(a=e.voice)?void 0:a.disabled},p={},f=e=>e?e.map((e=>{if("string"==typeof e){if((e=>Object.values(s).includes(e))(e)&&!d[e]){if(p[e])return p[e];const n=t[e];if("function"==typeof n){const t=n();return p[e]=t,t}return null}return null}return e})).filter((e=>null!==e)):[];return{header:f(null==(l=e.header)?void 0:l.buttons),chatInput:f(null==(c=e.chatInput)?void 0:c.buttons),footer:f(null==(u=e.footer)?void 0:u.buttons)}},mt=()=>{const{settings:t}=E(),r=e.useMemo((()=>({[s.CLOSE_CHAT_BUTTON]:()=>n.jsx(dt,{}),[s.AUDIO_BUTTON]:()=>n.jsx(ut,{}),[s.NOTIFICATION_BUTTON]:()=>n.jsx(pt,{}),[s.EMOJI_PICKER_BUTTON]:()=>n.jsx(ct,{}),[s.FILE_ATTACHMENT_BUTTON]:()=>n.jsx(lt,{}),[s.SEND_MESSAGE_BUTTON]:()=>n.jsx(ht,{}),[s.VOICE_MESSAGE_BUTTON]:()=>n.jsx(ft,{})})),[]),{header:o,chatInput:i,footer:A}=e.useMemo((()=>gt(t,r)),[t,r]);return{headerButtons:e.useMemo((()=>o),[o]),chatInputButtons:e.useMemo((()=>i),[i]),footerButtons:e.useMemo((()=>A),[A])}},bt=()=>{const{settings:t}=E(),{styles:r}=C(),{setSyncedMessages:o,syncedMessagesRef:i}=W(),{isLoadingChatHistory:A,setIsLoadingChatHistory:a,hasChatHistoryLoaded:s,setHasChatHistoryLoaded:l}=L(),{chatBodyRef:c}=T(),{dispatchRcbEvent:u}=z(),d=e.useCallback((async()=>{var e,A;const s=we();if(!s||null!=(e=t.event)&&e.rcbLoadChatHistory&&(await u(R.LOAD_CHAT_HISTORY,{})).defaultPrevented)return;a(!0);const d=(null==(A=c.current)?void 0:A.scrollHeight)??0;((e,t,r,o,i,A,a,s,l)=>{var c;if(he=!0,null!=r)try{const c=pe(n.jsx(ue,{}),"SYSTEM"),u=i.current.slice(1);o([c,...u]);const d=r.map((n=>{if("object"===n.type){const r=Be(n.content,e,t);return{...n,content:r}}return n}));setTimeout((()=>{var t;const r=i.current.slice(1);let A=null!=(t=e.chatHistory)&&t.autoLoad?pe(n.jsx(n.Fragment,{}),"SYSTEM"):pe(n.jsx(ce,{}),"SYSTEM");o([...d,A,...r]),l(!0)}),500),setTimeout((()=>{if(!A.current)return;const{scrollHeight:e}=A.current,t=e-a;A.current.scrollTop+=t,s(!1)}),510)}catch{fe.removeItem(null==(c=e.chatHistory)?void 0:c.storageKey)}})(t,r,s,o,i,c,d,a,l)}),[t,r,u,i,c,a,l]);return{isLoadingChatHistory:A,setIsLoadingChatHistory:a,hasChatHistoryLoaded:s,showChatHistory:d}},yt=()=>{var t,r,o;const{settings:i}=E(),{styles:A}=C(),{showChatHistory:a}=bt(),[s,l]=e.useState(!1),c={color:null==(t=i.general)?void 0:t.primaryColor,borderColor:null==(r=i.general)?void 0:r.primaryColor,...A.chatHistoryButtonStyle,...A.chatHistoryButtonHoveredStyle};return n.jsx("div",{className:"rcb-view-history-container",children:n.jsx("div",{onMouseEnter:()=>{l(!0)},onMouseLeave:()=>{l(!1)},style:s?c:{...A.chatHistoryButtonStyle},onMouseDown:e=>{e.preventDefault(),a()},className:"rcb-view-history-button",role:"button",tabIndex:0,children:n.jsx("p",{children:null==(o=i.chatHistory)?void 0:o.viewChatHistoryButtonText})})})},vt=()=>{var t,r,o,i;const A=et(),{settings:a}=E(),{replaceMessages:s}=Le(),{isBotTyping:l,isChatWindowOpen:c,setUnreadCount:u,setSyncedIsChatWindowOpen:d,setSyncedTextAreaDisabled:p,setSyncedAudioToggledOn:f,setSyncedVoiceToggledOn:h,setSyncedIsScrolling:g,syncedIsScrollingRef:m,syncedIsChatWindowOpenRef:b}=L(),{chatBodyRef:y}=T(),{viewportHeight:v,setViewportHeight:w,setViewportWidth:x,scrollToBottom:k}=G(),{setUpNotifications:P}=Qe(),{handleFirstInteraction:B}=(()=>{var t;const{settings:n}=E(),{hasInteractedPage:r,setHasInteractedPage:o,hasFlowStarted:i,setHasFlowStarted:A}=L(),a=e.useCallback((()=>{var e;if(o(!0),!i&&"ON_PAGE_INTERACT"===(null==(e=n.general)?void 0:e.flowStartTrigger)&&A(!0),!window.SpeechSynthesisUtterance)return void console.info("Speech Synthesis API is not supported in this environment.");const t=new window.SpeechSynthesisUtterance;t.text="",t.onend=()=>{window.removeEventListener("click",a),window.removeEventListener("keydown",a),window.removeEventListener("touchstart",a)},window.speechSynthesis.speak(t)}),[i,null==(t=n.general)?void 0:t.flowStartTrigger]);return{hasInteractedPage:r,handleFirstInteraction:a}})(),{showChatHistory:C}=bt(),D=e.useRef(0),S=e.useRef(!1);e.useEffect((()=>(window.addEventListener("click",B),window.addEventListener("keydown",B),window.addEventListener("touchstart",B),()=>{window.removeEventListener("click",B),window.removeEventListener("keydown",B),window.removeEventListener("touchstart",B)})),[]),e.useEffect((()=>{const e=y.current;if(!e)return;const t=()=>{S.current||(S.current=!0,requestAnimationFrame((()=>{var t,n;if(!e)return;const{scrollTop:r,clientHeight:o,scrollHeight:i}=e,A=r+o<i-((null==(t=a.chatWindow)?void 0:t.messagePromptOffset)??30);g(A),m.current=A,A||(r+o>=i-1&&(e.scrollTop=i-o-1),(b.current||null!=(n=a.general)&&n.embedded)&&u(0)),S.current=!1})))};return e.addEventListener("wheel",t,{passive:!0}),e.addEventListener("touchmove",t,{passive:!0}),()=>{e.removeEventListener("wheel",t),e.removeEventListener("touchmove",t)}}),[]),e.useEffect((()=>{var e,t,n;p(null==(e=a.chatInput)?void 0:e.disabled),d(null==(t=a.chatWindow)?void 0:t.defaultOpen),f(null==(n=a.audio)?void 0:n.defaultToggledOn),setTimeout((()=>{var e;h(null==(e=a.voice)?void 0:e.defaultToggledOn)}),1)}),[]),e.useEffect((()=>{var e;null!=(e=a.notification)&&e.disabled||P()}),[null==(t=a.notification)?void 0:t.disabled]),e.useEffect((()=>{!m.current&&null!=y&&y.current&&k()}),[l]),e.useEffect((()=>{var e,t;if(null!=(e=a.chatHistory)&&e.disabled)fe&&fe.removeItem(ge);else if(ke(a),we().length>0){const e=pe(n.jsx(yt,{}),"SYSTEM");s([e]),null!=(t=a.chatHistory)&&t.autoLoad&&C()}}),[null==(r=a.chatHistory)?void 0:r.storageKey,null==(o=a.chatHistory)?void 0:o.maxEntries,null==(i=a.chatHistory)?void 0:i.disabled]),e.useEffect((()=>{var e;A||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;w(null==(e=window.visualViewport)?void 0:e.height)}),101),setTimeout((()=>{var e,t;v!=(null==(e=window.visualViewport)?void 0:e.height)&&w(null==(t=window.visualViewport)?void 0:t.height)}),1001)):setTimeout((()=>{var e;w((null==(e=window.visualViewport)?void 0:e.height)-o)}),101)})))}),[A]),e.useEffect((()=>{var e,t,n,r;if(A)return;c&&(w(null==(e=window.visualViewport)?void 0:e.height),x(null==(t=window.visualViewport)?void 0:t.width));const o=()=>window.scrollTo({top:0,left:0,behavior:"auto"}),i=()=>D.current=window.scrollY,a=()=>{var e,t;w(null==(e=window.visualViewport)?void 0:e.height),x(null==(t=window.visualViewport)?void 0:t.width)},s=()=>{var e;window.removeEventListener("scroll",o),window.removeEventListener("scroll",i),null==(e=window.visualViewport)||e.removeEventListener("resize",a)};return c?(s(),document.body.style.position="fixed",window.addEventListener("scroll",o),null==(n=window.visualViewport)||n.addEventListener("resize",a)):(document.body.style.position="static",s(),window.scrollTo({top:D.current,left:0,behavior:"auto"}),window.addEventListener("scroll",i),null==(r=window.visualViewport)||r.removeEventListener("resize",a)),s}),[c,A])},wt="https://cdn.jsdelivr.net/gh/react-chatbotify/community-themes/themes",xt="2592000",Et="RCB_THEME_CACHE_DATA",kt=async(e,t)=>{const{id:n,version:r,baseUrl:o=wt,cacheDuration:i=xt}=t,A=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(!A)return console.error(`Unable to find version for theme: ${n}`),{settings:{},inlineStyles:{},cssStylesText:""};const a=((e,t,n)=>{const r=localStorage.getItem(`${Et}_${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,A,i);if(a){const t=Pt(e,a.cssStylesText);return{settings:a.settings,inlineStyles:a.inlineStyles,cssStylesText:t}}const s=`${o}/${n}/${A}/styles.css`,l=`${o}/${n}/${A}/settings.json`,c=`${o}/${n}/${A}/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 p=await fetch(l);let f={};p.ok?f=await p.json():console.info(`Could not fetch settings.json from ${l}`);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(),A={settings:n,inlineStyles:r,cssStylesText:o,cacheDate:Math.floor(i/1e3)};localStorage.setItem(`${Et}_${e}_${t}`,JSON.stringify(A))})(n,A,f,g,u);return{settings:f,inlineStyles:g,cssStylesText:Pt(e,u)}},Pt=(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"),Bt=async(e,t,n,r)=>{var o,i;let A=Dt(w),a=Dt(P),s="";if(null!=r)if(Array.isArray(r))for(const t of r){const n=await kt(e,t);A=Ct(n.settings,A),a=Ct(n.inlineStyles,a),s+=n.cssStylesText}else{const t=await kt(e,r);A=Ct(t.settings,A),a=Ct(t.inlineStyles,a),s+=t.cssStylesText}return null!=t&&(A=Ct(t,A)),null!=n&&(a=Ct(n,a)),null!=(null==(o=A.chatInput)?void 0:o.botDelay)&&(null==(i=A.chatInput)?void 0:i.botDelay)<500&&(A.chatInput.botDelay=500),{settings:A,inlineStyles:a,cssStylesText:s}},Ct=(t,n)=>{const r=[{source:t,target:n}];for(;r.length;){const t=r.pop();if(null==t)continue;const{source:n,target:o}=t;for(const t of Object.keys(n)){const i=t;if(e.isValidElement(n[i]))o[i]=n[i];else if("object"!=typeof n[i]||null===n[i]||Array.isArray(n[i]))try{o[i]=n[i]}catch{}else("object"!=typeof o[i]||null===o[i])&&(o[i]={}),r.push({source:n[i],target:o[i]})}}return n},Dt=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},St=()=>{const{settings:t,setSettings:n}=E(),r=e.useCallback((e=>{!e||0===Object.keys(e).length||n(Dt(Ct(e,t)))}),[t]),o=e.useCallback((e=>{n(e)}),[]);return{settings:t,replaceSettings:o,updateSettings:r}},It=()=>{const{styles:t,setStyles:n}=C(),r=e.useCallback((e=>{!e||0===Object.keys(e).length||n(Dt(Ct(e,t)))}),[t]),o=e.useCallback((e=>{n(e)}),[]);return{styles:t,replaceStyles:o,updateStyles:r}},Tt=({plugins:t,slots:r})=>{var o,i;const A=et(),{settings:a}=E(),{styles:s}=C(),{hasFlowStarted:l,setHasFlowStarted:c}=L(),{inputRef:u}=T(),{viewportHeight:d,viewportWidth:p,isChatWindowOpen:f}=G(),{goToPath:h}=Ze(),{headerButtons:g,chatInputButtons:m,footerButtons:b}=mt();vt(),(t=>{const{updateSettings:n}=St(),{updateStyles:r}=It(),o=null==t?void 0:t.map((e=>e()));e.useEffect((()=>{let e={},t={};null==o||o.forEach((n=>{null!=n&&n.settings&&0!==Object.keys(null==n?void 0:n.settings).length&&(e=Ct(n.settings,e)),null!=n&&n.styles&&0!==Object.keys(null==n?void 0:n.styles).length&&(t=Ct(n.styles,t))})),n(e),r(t)}),[])})(t),e.useEffect((()=>{var e;(l||"ON_LOAD"===(null==(e=a.general)?void 0:e.flowStartTrigger))&&h("start")}),[l,null==(o=a.general)?void 0:o.flowStartTrigger]);const y=e.useMemo((()=>{var e;const t="rcb-chatbot-global ";return null!=(e=a.general)&&e.embedded?t+"rcb-window-embedded":f?t+"rcb-window-open":t+"rcb-window-close"}),[a,f]);return n.jsx(n.Fragment,{children:(()=>{var e,t;return A&&(null==(e=a.device)?void 0:e.desktopEnabled)||!A&&(null==(t=a.device)?void 0:t.mobileEnabled)})()&&n.jsxs("div",{onMouseDown:e=>{var t,n;!l&&"ON_CHATBOT_INTERACT"===(null==(t=a.general)?void 0:t.flowStartTrigger)&&c(!0),A?null==(n=u.current)||n.blur():null==e||e.preventDefault()},className:y,children:[n.jsx(ot,{}),n.jsx(rt,{}),f&&!A&&!(null!=(i=a.general)&&i.embedded)&&n.jsxs(n.Fragment,{children:[n.jsx("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"}),n.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"#fff",zIndex:9999}})]}),n.jsx("div",{style:(()=>{var e,t;return A||null!=(e=a.general)&&e.embedded?null!=(t=a.general)&&t.embedded?{...s.chatWindowStyle}:{...s.chatWindowStyle,zIndex:1e4}:{...s.chatWindowStyle,borderRadius:"0px",left:"0px",right:"auto",top:"0px",bottom:"auto",width:`${p}px`,height:`${d}px`,zIndex:1e4}})(),className:"rcb-chat-window",children:(()=>{var e,t,o;const i=(null==r?void 0:r.chatBotHeader)||S,A=(null==r?void 0:r.chatBotBody)||Z,s=(null==r?void 0:r.chatBotInput)||tt,l=(null==r?void 0:r.chatBotFooter)||nt;return n.jsxs(n.Fragment,{children:[(null==(e=a.general)?void 0:e.showHeader)&&n.jsx(i,{buttons:g}),n.jsx(A,{}),n.jsx(At,{}),(null==(t=a.general)?void 0:t.showInputRow)&&n.jsx(s,{buttons:m}),(null==(o=a.general)?void 0:o.showFooter)&&n.jsx(l,{buttons:b})]})})()})]})})},Qt=e.createContext(void 0),Mt=()=>e.useContext(Qt),Ot=({children:t})=>{var r;const o=e.useRef(""),i=e.useRef({}),[A,a]=e.useState({}),[s,l]=e.useState({}),[c,u]=e.useState(!1);e.useEffect((()=>{u(!0)}),[]);return c?n.jsx("div",{style:{fontFamily:null==(r=A.general)?void 0:r.fontFamily},children:n.jsx(Qt.Provider,{value:{loadConfig:async(e,t,n,r,A,s)=>{o.current=e,i.current=t;const c=await Bt(e,n,r,A);s.current&&(s.current.textContent=c.cssStylesText),a(c.settings),l(c.inlineStyles)}},children:n.jsx(k,{settings:A,setSettings:a,children:n.jsx(D,{styles:s,setStyles:l,children:n.jsx(Ke,{children:n.jsx(Q,{botIdRef:o,flowRef:i,children:n.jsx(U,{children:n.jsx(N,{settings:A,children:n.jsx(V,{children:t})})})})})})})})}):null},Lt=({id:t,flow:n,settings:r,styles:o,themes:i,plugins:A,setConfigLoaded:a,styleRootRef:s})=>{const l=e.useMemo((()=>t),[]),c=Mt(),{flowRef:u}=T();u&&u.current!==n&&(u.current=n);return e.useEffect((()=>{(async()=>{var e,t;null!=(e=r.event)&&e.rcbPreLoadChatBot&&(await H(R.PRE_LOAD_CHATBOT,{botId:l,currPath:null,prevPath:null},{flow:n,settings:r,styles:o,themes:i,plugins:A})).defaultPrevented||(null!=c&&c.loadConfig&&(await c.loadConfig(l,n,r,o,i,s),a(!0)),null!=(t=r.event)&&t.rcbPostLoadChatBot&&H(R.POST_LOAD_CHATBOT,{botId:l,currPath:null,prevPath:null},{flow:n,settings:r,styles:o,themes:i,plugins:A}))})()}),[i]),null},Nt=["Quickstart","API Docs","Examples","Github","Discord"],Rt={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:Nt,path:"process_options"},prompt_again:{message:"Do you need any other help?",options:Nt,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:Nt,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:t,flow:r,settings:o,styles:i,themes:A,plugins:a,slots:s})=>{const l=e.useMemo((()=>t||"rcb-"+de()),[]),c=r&&0!==Object.keys(r).length?r:Rt,u=o||{},d=i||{},p=a||[],[f,h]=e.useState(!1),g=Mt(),m=e.useRef(null),[b,y]=e.useState(A||[]);e.useEffect((()=>{A&&y(A)}),[A]);const v=()=>n.jsxs(n.Fragment,{children:[n.jsx(Lt,{styleRootRef:m,id:l,flow:c,settings:u,styles:d,themes:b,plugins:p,setConfigLoaded:h}),f&&n.jsx(Tt,{plugins:a,slots:s})]});return null==g?n.jsxs(Ot,{children:[n.jsx("style",{ref:m}),n.jsx("div",{id:l,children:v()})]}):n.jsxs(n.Fragment,{children:[n.jsx("style",{ref:m}),n.jsx("div",{id:l,children:v()})]})},Ht=()=>{const{getBotId:t}=(()=>{const{botIdRef:t}=T();return{getBotId:e.useCallback((()=>t.current),[t])}})();return{getBotId:t}},Ft=()=>{const{hasFlowStarted:t,restartFlow:n,getFlow:r}=(()=>{const{replaceMessages:t}=Le(),{replacePaths:n,goToPath:r}=Ze(),{replaceToasts:o}=Je(),{hasFlowStarted:i}=L(),{flowRef:A,timeoutIdRef:a}=T(),{settings:s}=E();return{hasFlowStarted:i,restartFlow:e.useCallback((async()=>{ke(s),a.current&&clearTimeout(a.current),t([]),o([]),n([]),await r("start")}),[a,s,t,o,n,ke,r]),getFlow:e.useCallback((()=>(null==A?void 0:A.current)??{}),[A])}})();return{hasFlowStarted:t,restartFlow:n,getFlow:r}},_t=()=>{const{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:A}=Le();return{endStreamMessage:e,injectMessage:t,removeMessage:n,simulateStreamMessage:r,streamMessage:o,messages:i,replaceMessages:A}},Ut=(t,n)=>{const{getBotId:r}=Ht();e.useEffect((()=>{const e=e=>{e.detail.botId===r()&&n(e)};return window.addEventListener(t,e),()=>{window.removeEventListener(t,e)}}),[r,t,n])},zt=()=>{const{settings:e,replaceSettings:t,updateSettings:n}=St();return{settings:e,replaceSettings:t,updateSettings:n}},Gt=()=>{const{showChatHistory:e,hasChatHistoryLoaded:t}=bt();return{showChatHistory:e,getHistoryMessages:we,setHistoryMessages:xe,hasChatHistoryLoaded:t}},Yt={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 qt(e){return t=>{Yt[t]={...e,...Yt[t]}}}["address","main","div","figure","p","pre"].forEach(qt({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(qt({content:8,type:73})),["p","pre"].forEach(qt({content:8,type:65})),["s","small","span","del","ins"].forEach(qt({content:8,type:9})),["article","aside","footer","header","nav","section","blockquote"].forEach(qt({content:1,type:67})),["h1","h2","h3","h4","h5","h6"].forEach(qt({content:8,type:69})),["audio","canvas","iframe","img","video"].forEach(qt({type:89}));const Wt=Object.freeze(Yt),Vt=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Xt=Object.keys(Wt).filter((e=>"canvas"!==e&&"iframe"!==e)),Kt=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}),Jt=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Zt(){return Zt=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},Zt.apply(this,arguments)}function $t({attributes:t={},className:n,children:r=null,selfClose:o=!1,tagName:i}){const A=i;return o?e.createElement(A,Zt({className:n},t)):e.createElement(A,Zt({className:n},t),r)}class en{attribute(e,t){return t}node(e,t){return t}}function tn(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 nn,rn;const on=tn(function(){if(rn)return nn;rn=1;var e=/["'&<>]/;return nn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,A="",i=0,a=0;for(i=r.index;i<n.length;i++){switch(n.charCodeAt(i)){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!==i&&(A+=n.substring(a,i)),a=i+1,A+=o}return a!==i?A+n.substring(a,i):A}}());function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const an=/(url|image|image-set)\(/i;class sn extends en{attribute(e,t){return"style"===e&&Object.keys(t).forEach((e=>{String(t[e]).match(an)&&delete t[e]})),t}}const ln=/^<(!doctype|(html|head|body)(\s|>))/i,cn=/^(aria-|data-|\w+:)/iu,un=/{{{(\w+)\/?}}}/;function dn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}class pn{constructor(e,t={},n=[],r=[]){var o;if(An(this,"allowed",void 0),An(this,"banned",void 0),An(this,"blocked",void 0),An(this,"container",void 0),An(this,"content",[]),An(this,"props",void 0),An(this,"matchers",void 0),An(this,"filters",void 0),An(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 sn],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:Xt),this.banned=new Set(Vt),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,A=0,i=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 l="";for(;o&&(i=e.match(o));){const{index:t,length:a,match:s,valid:c,void:u,...d}=i,p=e.propName+String(A);t>0&&(l+=o.slice(0,t)),c?(l+=u?`{{{${p}/}}}`:`{{{${p}}}}${s}{{{/${p}}}}`,this.keyIndex+=1,A+=1,n[p]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):l+=s,e.greedy?(o=l+o.slice(t+a),l=""):o=o.slice(t+(a||s.length))}e.greedy||(o=l+o)})),0===A?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||dn)();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(ln)){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?on(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:A,value:i}=o,a=A.toLowerCase(),s=Kt[a]||Kt[A];if(!this.isSafe(e)||!a.match(cn)&&(!t&&(!s||2===s)||a.startsWith("on")||i.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l="style"===a?this.extractStyleAttribute(e):i;4===s?l=!0:3===s?l=Number.parseFloat(String(l)):5!==s&&(l=String(l)),n[Jt[a]||a]=this.applyAttributeFilters(a,l),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 Wt[e]?{...t,...Wt[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(t,n){const{noHtml:r,noHtmlExceptMatchers:o,allowElements:A,transform:i,transformOnlyAllowList:a}=this.props;let s=[],l="";return[...t.childNodes].forEach((t=>{if(1===t.nodeType){const u=t.nodeName.toLowerCase(),d=this.getTagConfig(u);l&&(s.push(l),l="");const p=this.applyNodeFilters(u,t);if(!p)return;let f;if(i&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const t=this.keyIndex;f=this.parseNode(p,d);const n=i(p,f,d);if(null===n)return;if(typeof n<"u")return void s.push(e.cloneElement(n,{key:t}));this.keyIndex=t-1}if(this.banned.has(u))return;if(r||o&&"br"!==u||!this.isTagAllowed(u)||!A&&!this.canRenderChild(n,d))s=[...s,...this.parseNode(p,d.tagName?d:n)];else{var c;this.keyIndex+=1;const t=this.extractAttributes(p),n={tagName:u};t&&(n.attributes=t),d.void&&(n.selfClose=d.void),s.push(e.createElement($t,{...n,key:this.keyIndex},null!==(c=f)&&void 0!==c?c:this.parseNode(p,d)))}}else if(3===t.nodeType){const e=r&&!o?t.textContent:this.applyMatchers(t.textContent||"",n);Array.isArray(e)?s=[...s,...e]:l+=e}})),l&&s.push(l),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(un);){const[e,A]=o,i=o.index,a=e.includes("/");if("production"!==process.env.NODE_ENV&&!t[A])throw new Error(`Token "${A}" found but no matching element to replace with.`);i>0&&(n.push(r.slice(0,i)),r=r.slice(i));const{children:s,matcher:l,props:c}=t[A];let u;if(a)u=e.length,n.push(l.createElement(s,c));else{const o=r.match(new RegExp(`{{{/${A}}}}`));if("production"!==process.env.NODE_ENV&&!o)throw new Error(`Closing token missing for interpolated element "${A}".`);u=o.index+o[0].length,n.push(l.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 fn(t){var n;const{attributes:r,className:o,containerTagName:A,content:i,emptyContent:a,parsedContent:s,tagName:l,noWrap:c}=t,u=null!==(n=A??l)&&void 0!==n?n:"span",d="fragment"===u||c;let p;if(s)p=s;else{const e=new pn(i??"",t).parse();e.length>0&&(p=e)}return p||(p=a),d?e.createElement(e.Fragment,null,p):e.createElement($t,{attributes:r,className:o,tagName:u},p)}function hn(t){const{attributes:n,className:r,content:o="",disableFilters:A=!1,disableMatchers:i=!1,emptyContent:a=null,filters:s=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:p=!1,...f}=t,h=i?[]:l,g=A?[]:s,m=u?[u]:[],b=c?[c]:[];h.forEach((e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&b.push(e.onAfterParse.bind(e))}));const y=m.reduce(((e,n)=>{const r=n(e,t);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r}),o??""),v=new pn(y,f,h,g),w=b.reduce(((e,n)=>{const r=n(e,t);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}),v.parse());return e.createElement(fn,{attributes:n,className:r,containerTagName:t.containerTagName,emptyContent:a,noWrap:p,parsedContent:0===w.length?void 0:w,tagName:d})}const gn=({children:e})=>n.jsx(hn,{content:"string"==typeof e?e:""}),mn={autoConfig:!0},bn=(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)},yn=e=>{const t=[];let n="",r=!1;for(let o=0;o<e.length;o++){const A=e[o];"<"===A?r?(t.push(n),n=A):(r=!0,n=A):">"===A?(n+=A,t.push(n),n="",r=!1):r?n+=A:t.push(A)}return""!==n&&t.push(n),t},vn=t=>{const{getFlow:n}=Ft(),{messages:r,replaceMessages:o}=_t(),{settings:A}=zt(),{hasChatHistoryLoaded:i}=Gt(),a={...t,...mn},s=a.htmlComponent?a.htmlComponent:gn;e.useEffect((()=>{var e,t;if(i){const n=[...r];for(let r=0;r<n.length&&r<((null==(e=A.chatHistory)?void 0:e.maxEntries)??30);r++){const e=n[r];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=s)}o(n)}}),[i]);const l=async e=>{var t;const r=null==(t=e.data.message)?void 0:t.sender.toUpperCase();"string"==typeof e.data.message.content&&bn(e,n(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=yn),e.data.message.contentWrapper=s,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Ut(R.PRE_INJECT_MESSAGE,l),Ut(R.CHUNK_STREAM_MESSAGE,l),Ut(R.START_STREAM_MESSAGE,l),Ut(R.START_SIMULATE_STREAM_MESSAGE,l),Ut(R.START_SPEAK_AUDIO,(async e=>{bn(e,n(),"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!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const wn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,En={};function kn(e,t){return(En.jsx?xn:wn).test(e)}const Pn=/[ \t\n\f\r]/g;function Bn(e){return""===e.replace(Pn,"")}class Cn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Dn(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 Cn(n,r,t)}function Sn(e){return e.toLowerCase()}Cn.prototype.property={},Cn.prototype.normal={},Cn.prototype.space=null;class In{constructor(e,t){this.property=e,this.attribute=t}}In.prototype.space=null,In.prototype.boolean=!1,In.prototype.booleanish=!1,In.prototype.overloadedBoolean=!1,In.prototype.number=!1,In.prototype.commaSeparated=!1,In.prototype.spaceSeparated=!1,In.prototype.commaOrSpaceSeparated=!1,In.prototype.mustUseProperty=!1,In.prototype.defined=!1;let Tn=0;const Qn=Hn(),Mn=Hn(),On=Hn(),Ln=Hn(),Nn=Hn(),Rn=Hn(),jn=Hn();function Hn(){return 2**++Tn}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qn,booleanish:Mn,commaOrSpaceSeparated:jn,commaSeparated:Rn,number:Ln,overloadedBoolean:On,spaceSeparated:Nn},Symbol.toStringTag,{value:"Module"})),_n=Object.keys(Fn);class Un extends In{constructor(e,t,n,r){let o=-1;if(super(e,t),zn(this,"space",r),"number"==typeof n)for(;++o<_n.length;){const e=_n[o];zn(this,_n[o],(n&Fn[e])===Fn[e])}}}function zn(e,t,n){n&&(e[t]=n)}Un.prototype.defined=!0;const Gn={}.hasOwnProperty;function Yn(e){const t={},n={};let r;for(r in e.properties)if(Gn.call(e.properties,r)){const o=e.properties[r],A=new Un(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(A.mustUseProperty=!0),t[r]=A,n[Sn(r)]=r,n[Sn(A.attribute)]=r}return new Cn(t,n,e.space)}const qn=Yn({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}}),Wn=Yn({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Vn(e,t){return t in e?e[t]:t}function Xn(e,t){return Vn(e,t.toLowerCase())}const Kn=Yn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Xn,properties:{xmlns:null,xmlnsXLink:null}}),Jn=Yn({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Mn,ariaAutoComplete:null,ariaBusy:Mn,ariaChecked:Mn,ariaColCount:Ln,ariaColIndex:Ln,ariaColSpan:Ln,ariaControls:Nn,ariaCurrent:null,ariaDescribedBy:Nn,ariaDetails:null,ariaDisabled:Mn,ariaDropEffect:Nn,ariaErrorMessage:null,ariaExpanded:Mn,ariaFlowTo:Nn,ariaGrabbed:Mn,ariaHasPopup:null,ariaHidden:Mn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Nn,ariaLevel:Ln,ariaLive:null,ariaModal:Mn,ariaMultiLine:Mn,ariaMultiSelectable:Mn,ariaOrientation:null,ariaOwns:Nn,ariaPlaceholder:null,ariaPosInSet:Ln,ariaPressed:Mn,ariaReadOnly:Mn,ariaRelevant:null,ariaRequired:Mn,ariaRoleDescription:Nn,ariaRowCount:Ln,ariaRowIndex:Ln,ariaRowSpan:Ln,ariaSelected:Mn,ariaSetSize:Ln,ariaSort:null,ariaValueMax:Ln,ariaValueMin:Ln,ariaValueNow:Ln,ariaValueText:null,role:null}}),Zn=Yn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Xn,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rn,acceptCharset:Nn,accessKey:Nn,action:null,allow:null,allowFullScreen:Qn,allowPaymentRequest:Qn,allowUserMedia:Qn,alt:null,as:null,async:Qn,autoCapitalize:null,autoComplete:Nn,autoFocus:Qn,autoPlay:Qn,blocking:Nn,capture:null,charSet:null,checked:Qn,cite:null,className:Nn,cols:Ln,colSpan:null,content:null,contentEditable:Mn,controls:Qn,controlsList:Nn,coords:Ln|Rn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qn,defer:Qn,dir:null,dirName:null,disabled:Qn,download:On,draggable:Mn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qn,formTarget:null,headers:Nn,height:Ln,hidden:Qn,high:Ln,href:null,hrefLang:null,htmlFor:Nn,httpEquiv:Nn,id:null,imageSizes:null,imageSrcSet:null,inert:Qn,inputMode:null,integrity:null,is:null,isMap:Qn,itemId:null,itemProp:Nn,itemRef:Nn,itemScope:Qn,itemType:Nn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qn,low:Ln,manifest:null,max:null,maxLength:Ln,media:null,method:null,min:null,minLength:Ln,multiple:Qn,muted:Qn,name:null,nonce:null,noModule:Qn,noValidate:Qn,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:Qn,optimum:Ln,pattern:null,ping:Nn,placeholder:null,playsInline:Qn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qn,referrerPolicy:null,rel:Nn,required:Qn,reversed:Qn,rows:Ln,rowSpan:Ln,sandbox:Nn,scope:null,scoped:Qn,seamless:Qn,selected:Qn,shadowRootClonable:Qn,shadowRootDelegatesFocus:Qn,shadowRootMode:null,shape:null,size:Ln,sizes:null,slot:null,span:Ln,spellCheck:Mn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ln,step:null,style:null,tabIndex:Ln,target:null,title:null,translate:null,type:null,typeMustMatch:Qn,useMap:null,value:Mn,width:Ln,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Nn,axis:null,background:null,bgColor:null,border:Ln,borderColor:null,bottomMargin:Ln,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qn,declare:Qn,event:null,face:null,frame:null,frameBorder:null,hSpace:Ln,leftMargin:Ln,link:null,longDesc:null,lowSrc:null,marginHeight:Ln,marginWidth:Ln,noResize:Qn,noHref:Qn,noShade:Qn,noWrap:Qn,object:null,profile:null,prompt:null,rev:null,rightMargin:Ln,rules:null,scheme:null,scrolling:Mn,standby:null,summary:null,text:null,topMargin:Ln,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ln,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qn,disableRemotePlayback:Qn,prefix:null,property:null,results:Ln,security:null,unselectable:null}}),$n=Yn({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:Vn,properties:{about:jn,accentHeight:Ln,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ln,amplitude:Ln,arabicForm:null,ascent:Ln,attributeName:null,attributeType:null,azimuth:Ln,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ln,by:null,calcMode:null,capHeight:Ln,className:Nn,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:Ln,diffuseConstant:Ln,direction:null,display:null,dur:null,divisor:Ln,dominantBaseline:null,download:Qn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ln,enableBackground:null,end:null,event:null,exponent:Ln,externalResourcesRequired:null,fill:null,fillOpacity:Ln,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:Rn,g2:Rn,glyphName:Rn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ln,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ln,horizOriginX:Ln,horizOriginY:Ln,id:null,ideographic:Ln,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ln,k:Ln,k1:Ln,k2:Ln,k3:Ln,k4:Ln,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ln,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:Ln,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:Ln,overlineThickness:Ln,paintOrder:null,panose1:null,path:null,pathLength:Ln,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Nn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ln,pointsAtY:Ln,pointsAtZ:Ln,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,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:Ln,specularExponent:Ln,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ln,strikethroughThickness:Ln,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ln,strokeOpacity:Ln,strokeWidth:null,style:null,surfaceScale:Ln,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:Ln,tableValues:null,target:null,targetX:Ln,targetY:Ln,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ln,underlineThickness:Ln,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ln,values:null,vAlphabetic:Ln,vMathematical:Ln,vectorEffect:null,vHanging:Ln,vIdeographic:Ln,version:null,vertAdvY:Ln,vertOriginX:Ln,vertOriginY:Ln,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ln,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),er=/^data[-\w.:]+$/i,tr=/-[a-z]/g,nr=/[A-Z]/g;function rr(e){return"-"+e.toLowerCase()}function or(e){return e.charAt(1).toUpperCase()}const Ar={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"},ir=Dn([Wn,qn,Kn,Jn,Zn],"html"),ar=Dn([Wn,qn,Kn,Jn,$n],"svg");function sr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lr,cr,ur,dr={};var pr=function(){if(ur)return dr;ur=1;var e=dr&&dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dr,"__esModule",{value:!0}),dr.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),A="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;A?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(cr)return lr;cr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,A=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function l(e){return e?e.replace(a,s):s}return lr=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 p(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:u,column:d};return function(t){return t.position=new h(e),b(),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 p(n),a=a.slice(n.length),t}}function b(){m(n)}function y(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var e=f();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,p(n),a=a.slice(t),d+=2,e({type:"comment",comment:n})}}function w(){var t=f(),n=m(r);if(n){if(v(),!m(o))return g("property missing ':'");var a=m(A),c=t({type:"declaration",property:l(n[0].replace(e,s)),value:a?l(a[0].replace(e,s)):s});return m(i),c}}return h.prototype.content=a,b(),function(){var e,t=[];for(y(t);e=w();)!1!==e&&(t.push(e),y(t));return t}()},lr}());return dr}();const fr=sr(pr),hr=fr.default||fr,gr=br("end"),mr=br("start");function br(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 yr(e){return e&&"object"==typeof e?"position"in e||"type"in e?wr(e.position):"start"in e||"end"in e?wr(e):"line"in e||"column"in e?vr(e):"":""}function vr(e){return xr(e&&e.line)+":"+xr(e&&e.column)}function wr(e){return vr(e&&e.start)+"-"+vr(e&&e.end)}function xr(e){return e&&"number"==typeof e?e:1}class Er extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},A=!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&&(A=!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 i=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=i?i.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=i?i.line:void 0,this.name=yr(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=A&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}Er.prototype.file="",Er.prototype.name="",Er.prototype.reason="",Er.prototype.message="",Er.prototype.stack="",Er.prototype.column=void 0,Er.prototype.line=void 0,Er.prototype.ancestors=void 0,Er.prototype.cause=void 0,Er.prototype.fatal=void 0,Er.prototype.place=void 0,Er.prototype.ruleId=void 0,Er.prototype.source=void 0;const kr={}.hasOwnProperty,Pr=new Map,Br=/[A-Z]/g,Cr=/-([a-z])/g,Dr=new Set(["table","tbody","thead","tfoot","tr"]),Sr=new Set(["td","th"]),Ir="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tr(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,A){const i=Array.isArray(o.children),a=mr(n);return t(r,o,A,i,{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,A){const i=Array.isArray(o.children)?n:t;return A?i(r,o,A):i(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?ar:ir,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},A=Qr(o,e,void 0);return A&&"string"!=typeof A?A:o.create(e,o.Fragment,{children:A||void 0},void 0)}function Qr(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=ar,e.schema=o),e.ancestors.push(t);const A=Rr(e,t.tagName,!1),i=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&kr.call(t.properties,o)){const A=Nr(e,o,t.properties[o]);if(A){const[o,i]=A;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof i&&Sr.has(t.tagName)?r=i:n[o]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Lr(e,t);return Dr.has(t.tagName)&&(a=a.filter((function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&Bn(e.value):Bn(e)}(e)}))),Mr(e,i,A,t),Or(i,a),e.ancestors.pop(),e.schema=r,e.create(t,A,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)}jr(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=ar,e.schema=o),e.ancestors.push(t);const A=null===t.name?e.Fragment:Rr(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 o=t.expression;o.type;const A=o.properties[0];A.type,Object.assign(n,e.evaluater.evaluateExpression(A.argument))}else jr(e,t.position);else{const o=r.name;let A;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,A=e.evaluater.evaluateExpression(t.expression)}else jr(e,t.position);else A=null===r.value||r.value;n[o]=A}return n}(e,t),a=Lr(e,t);return Mr(e,i,A,t),Or(i,a),e.ancestors.pop(),e.schema=r,e.create(t,A,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);jr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Or(r,Lr(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 Mr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Or(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Lr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Pr;for(;++r<t.children.length;){const A=t.children[r];let i;if(e.passKeys){const e="element"===A.type?A.tagName:"mdxJsxFlowElement"===A.type||"mdxJsxTextElement"===A.type?A.name:void 0;if(e){const t=o.get(e)||0;i=e+"-"+t,o.set(e,t+1)}}const a=Qr(e,A,i);void 0!==a&&n.push(a)}return n}function Nr(e,t,n){const r=function(e,t){const n=Sn(t);let r=t,o=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&er.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(tr,or);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!tr.test(e)){let n=e.replace(nr,rr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Un}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{hr(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Er("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=Ir+"#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(Cr,Fr)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)kr.call(e,n)&&(t[Hr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Ar[r.property]||r.property:r.attribute,n]}}function Rr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=kn(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=kn(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 kr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);jr(e)}function jr(e,t){const n=new Er("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=Ir+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Hr(e){let t=e.replace(Br,_r);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Fr(e,t){return t.toUpperCase()}function _r(e){return"-"+e.toLowerCase()}const Ur={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"]},zr={};function Gr(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 Yr(e.children,t,n)}return Array.isArray(e)?Yr(e,t,n):""}function Yr(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Gr(e[o],t,n);return r.join("")}const qr=document.createElement("i");function Wr(e){const t="&"+e+";";qr.innerHTML=t;const n=qr.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function Vr(e,t,n,r){const o=e.length;let A,i=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)A=Array.from(r),A.unshift(t,n),e.splice(...A);else for(n&&e.splice(t,n);i<r.length;)A=r.slice(i,i+1e4),A.unshift(t,0),e.splice(...A),i+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(Vr(e,e.length,0,t),e):t}const Kr={}.hasOwnProperty;function Jr(e){const t={};let n=-1;for(;++n<e.length;)Zr(t,e[n]);return t}function Zr(e,t){let n;for(n in t){const r=(Kr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let A;if(o)for(A in o){Kr.call(r,A)||(r[A]=[]);const e=o[A];$r(r[A],Array.isArray(e)?e:e?[e]:[])}}}function $r(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Vr(e,0,0,r)}function eo(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 to(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const no=ho(/[A-Za-z]/),ro=ho(/[\dA-Za-z]/),oo=ho(/[#-'*+\--9=?A-Z^-~]/);function Ao(e){return null!==e&&(e<32||127===e)}const io=ho(/\d/),ao=ho(/[\dA-Fa-f]/),so=ho(/[!-/:-@[-`{-~]/);function lo(e){return null!==e&&e<-2}function co(e){return null!==e&&(e<0||32===e)}function uo(e){return-2===e||-1===e||32===e}const po=ho(new RegExp("\\p{P}|\\p{S}","u")),fo=ho(/\s/);function ho(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function go(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const A=e.charCodeAt(n);let i="";if(37===A&&ro(e.charCodeAt(n+1))&&ro(e.charCodeAt(n+2)))o=2;else if(A<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(A))||(i=String.fromCharCode(A));else if(A>55295&&A<57344){const t=e.charCodeAt(n+1);A<56320&&t>56319&&t<57344?(i=String.fromCharCode(A,t),o=1):i="�"}else i=String.fromCharCode(A);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+o+1,i=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function mo(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let A=0;return function(r){return uo(r)?(e.enter(n),i(r)):t(r)};function i(r){return uo(r)&&A++<o?(e.consume(r),i):(e.exit(n),t(r))}}const bo={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"),mo(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)):lo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const yo={tokenize:function(e){const t=this,n=[];let r,o,A,i=0;return a;function a(r){if(i<n.length){const o=n[i];return t.containerState=o[1],e.attempt(o[0].continuation,s,l)(r)}return l(r)}function s(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,A=n;for(;A--;)if("exit"===t.events[A][0]&&"chunkFlow"===t.events[A][1].type){o=t.events[A][1].end;break}m(i);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return Vr(t.events,A+1,0,t.events.slice(n)),t.events.length=a,l(e)}return a(e)}function l(o){if(i===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return f(o);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vo,c,u)(o)}function c(e){return r&&b(),m(i),d(e)}function u(e){return t.parser.lazy[t.now().line]=i!==n.length,A=t.now().offset,f(e)}function d(n){return t.containerState={},e.attempt(vo,p,f)(n)}function p(e){return i++,n.push([t.currentConstruct,t.containerState]),d(e)}function f(n){return null===n?(r&&b(),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)):lo(n)?(e.consume(n),g(e.exit("chunkFlow")),i=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<A&&(!r.events[e][1].end||r.events[e][1].end.offset>A))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(i),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;Vr(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 b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},vo={tokenize:function(e,t,n){return mo(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function wo(e){return null===e||co(e)||fo(e)?1:po(e)?2:void 0}function xo(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const A=e[o].resolveAll;A&&!r.includes(A)&&(t=A(t,n),r.push(A))}return t}const Eo={name:"attention",resolveAll:function(e,t){let n,r,o,A,i,a,s,l,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};ko(u,-a),ko(d,a),A={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},i={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:{...A.start},end:{...i.end}},e[n][1].end={...A.start},e[c][1].start={...i.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=Xr(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=Xr(s,[["enter",r,t],["enter",A,t],["exit",A,t],["enter",o,t]]),s=Xr(s,xo(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=Xr(s,[["exit",o,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,s=Xr(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,Vr(e,n-1,c-n+3,s),c=n+s.length-l-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=wo(r);let A;return function(t){return A=t,e.enter("attentionSequence"),i(t)};function i(a){if(a===A)return e.consume(a),i;const s=e.exit("attentionSequence"),l=wo(a),c=!l||2===l&&o||n.includes(a),u=!o||2===o&&l||n.includes(r);return s._open=!!(42===A?c:c&&(o||!u)),s._close=!!(42===A?u:u&&(l||!c)),t(a)}}};function ko(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Po={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 no(t)?(e.consume(t),A):64===t?n(t):s(t)}function A(e){return 43===e||45===e||46===e||ro(e)?(r=1,i(e)):s(e)}function i(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||ro(t))&&r++<32?(e.consume(t),i):(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||Ao(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),l):oo(t)?(e.consume(t),s):n(t)}function l(e){return ro(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,l):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||ro(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const Bo={partial:!0,tokenize:function(e,t,n){return function(t){return uo(t)?mo(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||lo(e)?t(e):n(e)}}};const Co={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return uo(t)?mo(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(Co,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 uo(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Do={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 so(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const So={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,A,i=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,A=ro,l(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,A=ao,l):(e.enter("characterReferenceValue"),o=7,A=io,l(t))}function l(a){if(59===a&&i){const o=e.exit("characterReferenceValue");return A!==ro||Wr(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return A(a)&&i++<o?(e.consume(a),l):n(a)}}};const Io={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)}}},To={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),uo(t)?mo(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===A?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===A?(o++,e.consume(t),c):o>=a?(e.exit("codeFencedFenceSequence"),uo(t)?mo(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||lo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let A,i=0,a=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,A=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),s(t)}(t)};function s(t){return t===A?(a++,e.consume(t),s):a<3?n(t):(e.exit("codeFencedFenceSequence"),uo(t)?mo(e,l,"whitespace")(t):l(t))}function l(n){return null===n||lo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Io,p,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||lo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):uo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mo(e,u,"whitespace")(t)):96===t&&t===A?n(t):(e.consume(t),c)}function u(t){return null===t||lo(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||lo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===A?n(t):(e.consume(t),d)}function p(t){return e.attempt(o,b,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return i>0&&uo(t)?mo(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||lo(t)?e.check(Io,p,b)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||lo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function b(n){return e.exit("codeFenced"),t(n)}}};const Qo={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),mo(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?A(e):n(e)}function A(t){return null===t?a(t):lo(t)?e.attempt(Mo,A,a)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||lo(t)?(e.exit("codeFlowValue"),A(t)):(e.consume(t),i)}function a(n){return e.exit("codeIndented"),t(n)}}},Mo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):lo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):mo(e,A,"linePrefix",5)(t)}function A(e){const A=r.events[r.events.length-1];return A&&"linePrefix"===A[1].type&&A[2].sliceSerialize(A[1],!0).length>=4?t(e):lo(e)?o(e):n(e)}}};const Oo={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,A=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),A++,i):(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,l(t)):lo(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||lo(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function l(n){return 96===n?(e.consume(n),r++,l):r===A?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Lo{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&&No(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),No(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),No(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);No(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);No(this.left,t.reverse())}}}function No(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 Ro(e){const t={};let n,r,o,A,i,a,s,l=-1;const c=new Lo(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(n=c.get(l),l&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(l-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,jo(c,l)),l=t[l],s=!0);else if(n[1]._container){for(o=l,r=void 0;o--;)if(A=c.get(o),"lineEnding"===A[1].type||"lineEndingBlank"===A[1].type)"enter"===A[0]&&(r&&(c.get(r)[1].type="lineEndingBlank"),A[1].type="lineEnding",r=o);else if("linePrefix"!==A[1].type)break;r&&(n[1].end={...c.get(r)[1].start},i=c.slice(r,l),i.unshift(n),c.splice(r,l-r+1,i))}}return Vr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function jo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const A=[],i=n._tokenizer||r.parser[n.contentType](n.start),a=i.events,s=[],l={};let c,u,d=-1,p=n,f=0,h=0;const g=[h];for(;p;){for(;e.get(++o)[1]!==p;);A.push(o),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),u&&i.defineSkip(p.start),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),p._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),u=p,p=p.next}for(p=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),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(i.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),d=g.length;d--;){const t=a.slice(g[d],g[d+1]),n=A.pop();s.push([n,n+t.length-1]),e.splice(n,2,t)}for(s.reverse(),d=-1;++d<s.length;)l[f+s[d][0]]=f+s[d][1],f+=s[d][1]-s[d][0]-1;return l}const Ho={resolve:function(e){return Ro(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):lo(t)?e.check(Fo,A,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function A(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Fo={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"),mo(e,o,"linePrefix")};function o(o){if(null===o||lo(o))return n(o);const A=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&A&&"linePrefix"===A[1].type&&A[2].sliceSerialize(A[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function _o(e,t,n,r,o,A,i,a,s){const l=s||Number.POSITIVE_INFINITY;let c=0;return function(t){return 60===t?(e.enter(r),e.enter(o),e.enter(A),e.consume(t),e.exit(A),u):null===t||32===t||41===t||Ao(t)?n(t):(e.enter(r),e.enter(i),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(t))};function u(n){return 62===n?(e.enter(A),e.consume(n),e.exit(A),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||lo(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function f(o){return c||null!==o&&41!==o&&!co(o)?c<l&&40===o?(e.consume(o),c++,f):41===o?(e.consume(o),c--,f):null===o||32===o||40===o||Ao(o)?n(o):(e.consume(o),92===o?h:f):(e.exit("chunkString"),e.exit(a),e.exit(i),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function Uo(e,t,n,r,o,A){const i=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(A),l};function l(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?n(u):93===u?(e.exit(A),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):lo(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||lo(t)||s++>999?(e.exit("chunkString"),l(t)):(e.consume(t),a||(a=!uo(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function zo(e,t,n,r,o,A){let i;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),i=40===t?41:t,a):n(t)};function a(n){return n===i?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(A),s(n))}function s(t){return t===i?(e.exit(A),a(i)):null===t?n(t):lo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),mo(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===i||null===t||lo(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:l)}function c(t){return t===i||92===t?(e.consume(t),l):l(t)}}function Go(e,t){let n;return function r(o){return lo(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):uo(o)?mo(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Yo={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Uo.call(r,e,A,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function A(t){return o=to(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 co(t)?Go(e,a)(t):a(t)}function a(t){return _o(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(qo,l,l)(t)}function l(t){return uo(t)?mo(e,c,"whitespace")(t):c(t)}function c(A){return null===A||lo(A)?(e.exit("definition"),r.parser.defined.push(o),t(A)):n(A)}}},qo={partial:!0,tokenize:function(e,t,n){return function(t){return co(t)?Go(e,r)(t):n(t)};function r(t){return zo(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return uo(t)?mo(e,A,"whitespace")(t):A(t)}function A(e){return null===e||lo(e)?t(e):n(e)}}};const Wo={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return lo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Vo={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,A=3;return"whitespace"===e[A][1].type&&(A+=2),o-2>A&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(A===o-1||o-4>A&&"whitespace"===e[o-2][1].type)&&(o-=A+1===o?2:4),o>A&&(n={type:"atxHeadingText",start:e[A][1].start,end:e[o][1].end},r={type:"chunkText",start:e[A][1].start,end:e[o][1].end,contentType:"text"},Vr(e,A,o-A+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||co(t)?(e.exit("atxHeadingSequence"),A(t)):n(t)}function A(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||lo(n)?(e.exit("atxHeading"),t(n)):uo(n)?mo(e,A,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),A(t))}function a(t){return null===t||35===t||co(t)?(e.exit("atxHeadingText"),A(t)):(e.consume(t),a)}}};const Xo=["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"],Ko=["pre","script","style","textarea"],Jo={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,A,i,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),A=!0,p):63===a?(e.consume(a),o=3,r.interrupt?t:O):no(a)?(e.consume(a),i=String.fromCharCode(a),f):n(a)}function c(A){return 45===A?(e.consume(A),o=2,u):91===A?(e.consume(A),o=5,a=0,d):no(A)?(e.consume(A),o=4,r.interrupt?t:O):n(A)}function u(o){return 45===o?(e.consume(o),r.interrupt?t:O):n(o)}function d(o){const A="CDATA[";return o===A.charCodeAt(a++)?(e.consume(o),6===a?r.interrupt?t:B:d):n(o)}function p(t){return no(t)?(e.consume(t),i=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||co(a)){const s=47===a,l=i.toLowerCase();return s||A||!Ko.includes(l)?Xo.includes(i.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):B(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):A?g(a):m(a)):(o=1,r.interrupt?t(a):B(a))}return 45===a||ro(a)?(e.consume(a),i+=String.fromCharCode(a),f):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:B):n(o)}function g(t){return uo(t)?(e.consume(t),g):k(t)}function m(t){return 47===t?(e.consume(t),k):58===t||95===t||no(t)?(e.consume(t),b):uo(t)?(e.consume(t),m):k(t)}function b(t){return 45===t||46===t||58===t||95===t||ro(t)?(e.consume(t),b):y(t)}function y(t){return 61===t?(e.consume(t),v):uo(t)?(e.consume(t),y):m(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):uo(t)?(e.consume(t),v):x(t)}function w(t){return t===s?(e.consume(t),s=null,E):null===t||lo(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||co(t)?y(t):(e.consume(t),x)}function E(e){return 47===e||62===e||uo(e)?m(e):n(e)}function k(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||lo(t)?B(t):uo(t)?(e.consume(t),P):n(t)}function B(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):!lo(t)||6!==o&&7!==o?null===t||lo(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),B):(e.exit("htmlFlowData"),e.check(Zo,N,C)(t))}function C(t){return e.check($o,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),S}function S(t){return null===t||lo(t)?C(t):(e.enter("htmlFlowData"),B(t))}function I(t){return 45===t?(e.consume(t),O):B(t)}function T(t){return 47===t?(e.consume(t),i="",Q):B(t)}function Q(t){if(62===t){const n=i.toLowerCase();return Ko.includes(n)?(e.consume(t),L):B(t)}return no(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),Q):B(t)}function M(t){return 93===t?(e.consume(t),O):B(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):B(t)}function L(t){return null===t||lo(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},Zo={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Bo,t,n)}}},$o={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return lo(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 eA={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,A,i;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),v):63===t?(e.consume(t),b):no(t)?(e.consume(t),E):n(t)}function s(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),A=0,p):no(t)?(e.consume(t),m):n(t)}function l(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):lo(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?T(e):45===e?u(e):c(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(A++)?(e.consume(t),6===A?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),h):lo(t)?(i=f,Q(t)):(e.consume(t),f)}function h(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):f(t)}function m(t){return null===t||62===t?T(t):lo(t)?(i=m,Q(t)):(e.consume(t),m)}function b(t){return null===t?n(t):63===t?(e.consume(t),y):lo(t)?(i=b,Q(t)):(e.consume(t),b)}function y(e){return 62===e?T(e):b(e)}function v(t){return no(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||ro(t)?(e.consume(t),w):x(t)}function x(t){return lo(t)?(i=x,Q(t)):uo(t)?(e.consume(t),x):T(t)}function E(t){return 45===t||ro(t)?(e.consume(t),E):47===t||62===t||co(t)?k(t):n(t)}function k(t){return 47===t?(e.consume(t),T):58===t||95===t||no(t)?(e.consume(t),P):lo(t)?(i=k,Q(t)):uo(t)?(e.consume(t),k):T(t)}function P(t){return 45===t||46===t||58===t||95===t||ro(t)?(e.consume(t),P):B(t)}function B(t){return 61===t?(e.consume(t),C):lo(t)?(i=B,Q(t)):uo(t)?(e.consume(t),B):k(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):lo(t)?(i=C,Q(t)):uo(t)?(e.consume(t),C):(e.consume(t),S)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):lo(t)?(i=D,Q(t)):(e.consume(t),D)}function S(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||co(t)?k(t):(e.consume(t),S)}function I(e){return 47===e||62===e||co(e)?k(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 uo(t)?mo(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 tA={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&&Vr(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,A,i=e.length,a=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(o){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=i);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},l={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 A=[["enter",s,t],["enter",l,t]],A=Xr(A,e.slice(r+1,r+a+3)),A=Xr(A,[["enter",c,t]]),A=Xr(A,xo(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),A=Xr(A,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),A=Xr(A,e.slice(o+1)),A=Xr(A,[["exit",s,t]]),Vr(e,r,e.length,A),e},tokenize:function(e,t,n){const r=this;let o,A,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){o=r.events[i][1];break}return function(t){return o?o._inactive?c(t):(A=r.parser.defined.includes(to(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(nA,l,A?l:c)(t):91===t?e.attempt(rA,l,A?s:c)(t):A?l(t):c(t)}function s(t){return e.attempt(oA,l,c)(t)}function l(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},nA={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 co(t)?Go(e,o)(t):o(t)}function o(t){return 41===t?l(t):_o(e,A,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function A(t){return co(t)?Go(e,a)(t):l(t)}function i(e){return n(e)}function a(t){return 34===t||39===t||40===t?zo(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):l(t)}function s(t){return co(t)?Go(e,l)(t):l(t)}function l(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},rA={tokenize:function(e,t,n){const r=this;return function(t){return Uo.call(r,e,o,A,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(to(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function A(e){return n(e)}}},oA={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 AA={name:"labelStartImage",resolveAll:tA.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"),A):n(t)}function A(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const iA={name:"labelStartLink",resolveAll:tA.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 aA={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),mo(e,t,"linePrefix")}}};const sA={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,A(e)}(t)};function A(A){return A===r?(e.enter("thematicBreakSequence"),i(A)):o>=3&&(null===A||lo(A))?(e.exit("thematicBreak"),t(A)):n(A)}function i(t){return t===r?(e.consume(t),o++,i):(e.exit("thematicBreakSequence"),uo(t)?mo(e,A,"whitespace")(t):A(t))}}};const lA={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Bo,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mo(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!uo(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(uA,t,o)(n))}));function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,mo(e,e.attempt(lA,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 A=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,i=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:io(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(sA,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 io(t)&&++i<10?(e.consume(t),a):(!r.interrupt||i<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(Bo,r.interrupt?n:l,e.attempt(cA,u,c))}function l(e){return r.containerState.initialBlankLine=!0,A++,u(e)}function c(t){return uo(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=A+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},cA={partial:!0,tokenize:function(e,t,n){const r=this;return mo(e,(function(e){const o=r.events[r.events.length-1];return!uo(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},uA={partial:!0,tokenize:function(e,t,n){const r=this;return mo(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 dA={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,A=e.length;for(;A--;)if("enter"===e[A][0]){if("content"===e[A][1].type){n=A;break}"paragraph"===e[A][1].type&&(r=A)}else"content"===e[A][1].type&&e.splice(A,1),!o&&"definition"===e[A][1].type&&(o=A);const i={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",i,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=i,e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let i,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){i="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!i?n(t):(e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),A(t)}(t))};function A(t){return t===o?(e.consume(t),A):(e.exit("setextHeadingLineSequence"),uo(t)?mo(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||lo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const pA={tokenize:function(e){const t=this,n=e.attempt(Bo,(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,mo(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ho,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 fA={resolveAll:bA()},hA=mA("string"),gA=mA("text");function mA(e){return{resolveAll:bA("text"===e?yA:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,A,i);return A;function A(e){return s(e)?o(e):i(e)}function i(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 bA(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 yA(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 A,i=o.length,a=-1,s=0;for(;i--;){const e=o[i];if("string"==typeof e){for(a=e.length;32===e.charCodeAt(a-1);)s++,a--;if(a)break;a=-1}else if(-2===e)A=!0,s++;else if(-1!==e){i++;break}}if(s){const o={type:n===e.length||A||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,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 vA={42:lA,43:lA,45:lA,48:lA,49:lA,50:lA,51:lA,52:lA,53:lA,54:lA,55:lA,56:lA,57:lA,62:Co},wA={91:Yo},xA={[-2]:Qo,[-1]:Qo,32:Qo},EA={35:Vo,42:sA,45:[dA,sA],60:Jo,61:dA,95:sA,96:To,126:To},kA={38:So,92:Do},PA={[-5]:aA,[-4]:aA,[-3]:aA,33:AA,38:So,42:Eo,60:[Po,eA],91:iA,92:[Wo,Do],93:tA,95:Eo,96:Oo},BA={null:[Eo,fA]},CA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wA,disable:{null:[]},document:vA,flow:EA,flowInitial:xA,insideSpan:BA,string:kA,text:PA},Symbol.toStringTag,{value:"Module"}));function DA(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={},A=[];let i=[],a=[];const s={attempt:h((function(e,t){g(e,t.from)})),check:h(f),consume:function(e){lo(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++)),l.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),l.events.push(["enter",n,l]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),l.events.push(["exit",t,l]),t},interrupt:h(f,{interrupt:!0})},l={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 A=e[n];let i;if("string"==typeof A)i=A;else switch(A){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&&o)continue;i=" ";break;default:i=String.fromCharCode(A)}o=-2===A,r.push(i)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return i=Xr(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;)p(t.charCodeAt(r._bufferIndex));else p(t)}}(),null!==i[i.length-1]?[]:(g(t,0),l.events=xo(A,l.events,l),l.events)}};let c=t.tokenize.call(l,s);return t.resolveAll&&A.push(t),l;function u(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,A=t.end._bufferIndex;let i;if(n===o)i=[e[n].slice(r,A)];else{if(i=e.slice(n,o),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}A>0&&i.push(e[o].slice(0,A))}return i}(i,e)}function d(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:A}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:A}}function p(e){c=c(e)}function f(e,t){t.restore()}function h(e,t){return function(n,o,A){let i,c,u,p;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function f(e){return i=e,c=0,0===e.length?A:h(e[c])}function h(e){return function(n){return p=function(){const e=d(),t=l.previous,n=l.currentConstruct,o=l.events.length,A=Array.from(a);return{from:o,restore:i};function i(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=o,a=A,m()}}(),u=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(l),t):l,s,g,b)(n)}}function g(t){return e(u,p),o}function b(e){return p.restore(),++c<i.length?h(i[c]):A}}}function g(e,t){e.resolveAll&&!A.includes(e)&&A.push(e),e.resolve&&Vr(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const SA=/[\0\t\n\r]/g;const IA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function TA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return eo(n.slice(t?2:1),t?16:10)}return Wr(n)||e}const QA={}.hasOwnProperty;function MA(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:A(te),autolinkProtocol:P,autolinkEmail:P,atxHeading:A(J),blockQuote:A(q),characterEscape:P,characterReference:P,codeFenced:A(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:A(W,i),codeText:A(V,i),codeTextData:P,data:P,codeFlowValue:P,definition:A(X),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:A(K),hardBreakEscape:A(Z),hardBreakTrailing:A(Z),htmlFlow:A($,i),htmlFlowData:P,htmlText:A($,i),htmlTextData:P,image:A(ee),label:i,link:A(te),listItem:A(re),listItemValue:d,listOrdered:A(ne,u),listUnordered:A(ne),paragraph:A(oe),reference:H,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:A(J),strong:A(Ae),thematicBreak:A(ae)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:Y,autolinkProtocol:G,blockQuote:s(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:_,characterReferenceMarkerNumeric:_,characterReferenceValue:U,characterReference:z,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:f,codeFlowValue:B,codeIndented:s(m),codeText:s(T),codeTextData:B,data:B,definition:s(),definitionDestinationString:v,definitionLabelString:b,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(S),htmlFlowData:B,htmlText:s(I),htmlTextData:B,image:s(M),label:L,labelText:O,lineEnding:C,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:F,resourceDestinationString:N,resourceTitleString:R,resource:j,setextHeading:s(k),setextHeadingLineSequence:E,setextHeadingText:x,strong:s(),thematicBreak:s()}};LA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const A={stack:[r],tokenStack:[],config:t,enter:a,exit:l,buffer:i,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]];QA.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},A),e[u][1])}if(A.tokenStack.length>0){const e=A.tokenStack[A.tokenStack.length-1];(e[1]||RA).call(A,void 0,e[0])}for(r.position={start:OA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:OA(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,A,i,a=t-1,s=-1,l=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!i&&!s&&!A&&(A=a),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=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 i=a;for(o=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",o=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}A&&(!o||A<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++,A=void 0,i=!0}}}return e[t][1]._spread=l,n}function A(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function i(){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:OA(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||RA).call(this,e,r[0])),n.position.end=OA(e.end)}function c(){return function(e){const t=zr;return Gr(e,"boolean"!=typeof t.includeImageAlt||t.includeImageAlt,"boolean"!=typeof t.includeHtml||t.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 p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){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 b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=to(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function v(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function k(){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=ie(),n.position={start:OA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function B(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=OA(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=OA(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),B.call(this,e))}function D(){this.data.atHardBreak=!0}function S(){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(IA,TA)}(t),n.identifier=to(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 j(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=to(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function _(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=eo(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Wr(t);this.stack[this.stack.length-1].value+=r}function z(e){this.stack.pop().position.end=OA(e.end)}function G(e){B.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function Y(e){B.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){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 oe(){return{type:"paragraph",children:[]}}function Ae(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Ro(e););return e}(function(e){const t={constructs:Jr([CA,...(e||{}).extensions||[]]),content:n(bo),defined:[],document:n(yo),flow:n(pA),lazy:{},string:n(hA),text:n(gA)};return t;function n(e){return function(n){return DA(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,A,i){const a=[];let s,l,c,u,d;for(o=n+("string"==typeof o?o.toString():new TextDecoder(A||void 0).decode(o)),c=0,n="",r&&(65279===o.charCodeAt(0)&&c++,r=void 0);c<o.length;){if(SA.lastIndex=c,s=SA.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(l=4*Math.ceil(t/4),a.push(-2);t++<l;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return i&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function OA(e){return{line:e.line,column:e.column,offset:e.offset}}function LA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?LA(e,r):NA(e,r)}}function NA(e,t){let n;for(n in t)if(QA.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 RA(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is still open")}function jA(e){const t=this;t.parser=function(n){return MA(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function HA(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),A=o[0];A&&"text"===A.type?A.value="["+A.value:o.unshift({type:"text",value:"["});const i=o[o.length-1];return i&&"text"===i.type?i.value+=r:o.push({type:"text",value:r}),o}function FA(e){return e.spread??e.children.length>1}const _A=9,UA=32;function zA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const A=[];for(;r;)A.push(GA(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return A.push(GA(t.slice(o),o>0,!1)),A.join("")}function GA(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;t===_A||t===UA;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;t===_A||t===UA;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const YA={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=go(r.toLowerCase()),A=e.footnoteOrder.indexOf(r);let i,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=A+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(i)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)},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 HA(e,t);const o={src:go(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const A={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,A),e.applyData(t,A)},image:function(e,t){const n={src:go(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 HA(e,t);const o={href:go(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const A={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,A),e.applyData(t,A)},link:function(e,t){const n={href:go(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=FA(n[r])}return t}(n):FA(t),A={},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:[]}),A.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const e=r[a];(o||0!==a||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?i.push(e):i.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&i.push({type:"text",value:"\n"});const l={type:"element",tagName:"li",properties:A,children:i};return e.patch(t,l),e.applyData(t,l)},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 A={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,A),e.applyData(t,A)},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)},A=mr(t.children[1]),i=gr(t.children[t.children.length-1]);A&&i&&(r.position={start:A,end:i}),o.push(r)}const A={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,A),e.applyData(t,A)},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",A=n&&"table"===n.type?n.align:void 0,i=A?A.length:t.children.length;let a=-1;const s=[];for(;++a<i;){const n=t.children[a],r={},i=A?A[a]:void 0;i&&(r.align=i);let l={type:"element",tagName:o,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),s.push(l)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const n={type:"text",value:zA(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:qA,yaml:qA,definition:qA,footnoteDefinition:qA};function qA(){}const WA="object"==typeof self?self:globalThis,VA=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[A,i]=t[o];switch(A){case 0:case-1:return n(i,o);case 1:{const e=n([],o);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),o);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new WA[e](t),o)}case 8:return n(BigInt(i),o);case"BigInt":return n(Object(BigInt(i)),o);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 WA[A](i),o)};return r})(new Map,e)(0),XA="",{toString:KA}={},{keys:JA}=Object,ZA=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=KA.call(e).slice(8,-1);switch(n){case"Array":return[1,XA];case"Object":return[2,XA];case"Date":return[3,XA];case"RegExp":return[4,XA];case"Map":return[5,XA];case"Set":return[6,XA];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},$A=([e,t])=>0===e&&("function"===t||"symbol"===t),ei=(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},A=r=>{if(n.has(r))return n.get(r);let[i,a]=ZA(r);switch(i){case 0:{let t=r;switch(a){case"bigint":i=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([i,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([i,e],r);for(const t of r)e.push(A(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 A(r.toJSON());const n=[],s=o([i,n],r);for(const t of JA(r))(e||!$A(ZA(r[t])))&&n.push([A(t),A(r[t])]);return s}case 3:return o([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([i,{source:e,flags:t}],r)}case 5:{const t=[],n=o([i,t],r);for(const[n,o]of r)(e||!$A(ZA(n))&&!$A(ZA(o)))&&t.push([A(n),A(o)]);return n}case 6:{const t=[],n=o([i,t],r);for(const n of r)(e||!$A(ZA(n)))&&t.push(A(n));return n}}const{message:s}=r;return o([i,{name:a,message:s}],r)};return A})(!(t||n),!!t,new Map,r)(e),r},ti="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?VA(ei(e,t)):structuredClone(e):(e,t)=>VA(ei(e,t));function ni(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 ri(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const oi=function(e){if(null==e)return ii;if("function"==typeof e)return Ai(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=oi(e[n]);return Ai(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 Ai(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 Ai(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function Ai(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 ii(){return!0}const ai=[],si=!0,li=!1,ci="skip";function ui(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const A=oi(o),i=r?-1:1;!function e(o,a,s){const l=o&&"object"==typeof o?o:{};if("string"==typeof l.type){const e="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let l,c,u,d=ai;if((!t||A(o,a,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[si,e]:null==e?ai:[e]}(n(o,s)),d[0]===li))return d;if("children"in o&&o.children){const t=o;if(t.children&&d[0]!==ci)for(c=(r?t.children.length:-1)+i,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(l=e(n,c,u)(),l[0]===li)return l;c="number"==typeof l[1]?l[1]:c+i}}return d}}(e,void 0,[])()}function di(e,t,n,r){let o,A,i;"function"==typeof t?(A=void 0,i=t,o=n):(A=t,i=n,o=r),ui(e,A,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),o)}const pi={}.hasOwnProperty,fi={};function hi(e,t){const n=t||fi,r=new Map,o=new Map,A=new Map,i={...YA,...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=vi(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=vi(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:mi,definitionById:r,footnoteById:o,footnoteCounts:A,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=a.handlers[n];if(pi.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=ti(n);return r.children=a.all(e),r}return ti(e)}return(a.options.unknownHandler||bi)(a,e,t)},options:n,patch:gi,wrap:yi};return di(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 gi(e,t){e.position&&(t.position=function(e){const t=mr(e),n=gr(e);if(t&&n)return{start:t,end:n}}(e))}function mi(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,ti(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function bi(e,t){const n=t.data||{},r=!("value"in t)||pi.call(n,"hProperties")||pi.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 yi(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 vi(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function wi(e,t){const n=hi(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||ni,r=e.options.footnoteBackLabel||ri,o=e.options.footnoteLabel||"Footnotes",A=e.options.footnoteLabelTagName||"h2",i=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 A=e.all(o),i=String(o.identifier).toUpperCase(),l=go(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(s,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=A[A.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...u)}else A.push(...u);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(A,!0)};e.patch(o,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:A,properties:{...ti(i),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),A=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&A.children.push({type:"text",value:"\n"},o),A}function xi(e,t){return e&&"run"in e?async function(n,r){const o=wi(n,{file:r,...t});await e.run(o,r)}:function(n,r){return wi(n,{file:r,...e||t})}}function Ei(e){if(e)throw e}var ki,Pi;var Bi=function(){if(Pi)return ki;Pi=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)},A=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),A=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!A)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},a=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return ki=function e(){var t,n,r,s,l,c,u=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=a(u,n),u!==(s=a(t,n))&&(f&&s&&(A(s)||(l=o(s)))?(l?(l=!1,c=r&&o(r)?r:[]):c=r&&A(r)?r:{},i(u,{name:n,newValue:e(f,c,s)})):typeof s<"u"&&i(u,{name:n,newValue:s}));return u},ki}();const Ci=sr(Bi);function Di(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 Si(){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(A,...i){const a=e[++n];let s=-1;if(A)r(A);else{for(;++s<t.length;)(null===i[s]||void 0===i[s])&&(i[s]=t[s]);t=i,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(o);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(A,o):i instanceof Error?o(i):A(i))}function o(e,...r){n||(n=!0,t(e,...r))}function A(e){o(null,e)}}(a,o)(...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 Ii={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Ti(e);let n,r=0,o=-1,A=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;A--;)if(47===e.codePointAt(A)){if(n){r=A+1;break}}else o<0&&(n=!0,o=A+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let i=-1,a=t.length-1;for(;A--;)if(47===e.codePointAt(A)){if(n){r=A+1;break}}else i<0&&(n=!0,i=A+1),a>-1&&(e.codePointAt(A)===t.codePointAt(a--)?a<0&&(o=A):(a=-1,o=i));return r===o?o=i:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(Ti(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){Ti(e);let t,n=e.length,r=-1,o=0,A=-1,i=0;for(;n--;){const a=e.codePointAt(n);if(47!==a)r<0&&(t=!0,r=n+1),46===a?A<0?A=n:1!==i&&(i=1):A>-1&&(i=-1);else if(t){o=n+1;break}}return A<0||r<0||0===i||1===i&&A===r-1&&A===o+1?"":e.slice(A,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Ti(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Ti(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",A=0,i=-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(i!==s-1&&1!==a)if(i!==s-1&&2===a){if(o.length<2||2!==A||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="",A=0):(o=o.slice(0,r),A=o.length-1-o.lastIndexOf("/")),i=s,a=0;continue}}else if(o.length>0){o="",A=0,i=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",A=2)}else o.length>0?o+="/"+e.slice(i+1,s):o=e.slice(i+1,s),A=s-i-1;i=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 Ti(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qi={cwd:function(){return"/"}};function Mi(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Oi(e){if("string"==typeof e)e=new URL(e);else if(!Mi(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 Li=["history","path","basename","stem","extname","dirname"];class Ni{constructor(e){let t;var n;t=e?Mi(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?"":Qi.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<Li.length;){const e=Li[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)Li.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?Ii.basename(this.path):void 0}set basename(e){ji(e,"basename"),Ri(e,"basename"),this.path=Ii.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Ii.dirname(this.path):void 0}set dirname(e){Hi(this.basename,"dirname"),this.path=Ii.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Ii.extname(this.path):void 0}set extname(e){if(Ri(e,"extname"),Hi(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=Ii.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Mi(e)&&(e=Oi(e)),ji(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Ii.basename(this.path,this.extname):void 0}set stem(e){ji(e,"stem"),Ri(e,"stem"),this.path=Ii.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 Er(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 Ri(e,t){if(e&&e.includes(Ii.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ii.sep+"`")}function ji(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Hi(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Fi=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},_i={}.hasOwnProperty;class Ui extends Fi{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=Si()}copy(){const e=new Ui;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Ci(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(qi("data",this.frozen),this.namespace[e]=t,this):_i.call(this.namespace,e)&&this.namespace[e]||void 0:e?(qi("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=Xi(e),n=this.parser||this.Parser;return Gi("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Gi("process",this.parser||this.Parser),Yi("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const A=Xi(e),i=n.parse(A);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(i,A,(function(e,t,r){if(e||!t||!r)return a(e);const o=t,A=n.stringify(o,r);var i;"string"==typeof(i=A)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=A:r.result=A,a(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Gi("processSync",this.parser||this.Parser),Yi("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Ei(e),t=r})),Vi("processSync","process",n),t}run(e,t,n){Wi(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,A){const i=Xi(t);r.run(e,i,(function(t,r,i){const a=r||e;t?A(t):o?o(a):n(void 0,a,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Ei(e),n=t,r=!0})),Vi("runSync","run",r),n}stringify(e,t){this.freeze();const n=Xi(t),r=this.compiler||this.Compiler;return Yi("stringify",r),Wi(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(qi("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)?i(e):A(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 A(e)}}function A(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=Ci(!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;){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,...A]=t;const i=n[o][1];Di(i)&&Di(r)&&(r=Ci(!0,i,r)),n[o]=[e,r,...A]}}}}const zi=(new Ui).freeze();function Gi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Yi(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function qi(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 Wi(e){if(!Di(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Vi(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xi(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Ni(e)}const Ki=[],Ji={allowDangerousHtml:!0},Zi=/^(https?|ircs?|mailto|xmpp)$/i,$i=[{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 ea(e){const t=e.allowedElements,r=e.allowElement,o=e.children||"",A=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||Ki,l=e.remarkPlugins||Ki,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ji}:Ji,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||ta,f=zi().use(jA).use(l).use(xi,c).use(s),h=new Ni;"string"==typeof o&&(h.value=o);for(const t of $i)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const g=f.parse(h);let m=f.runSync(g,h);return A&&(m={type:"element",tagName:"div",properties:{className:A},children:"root"===m.type?m.children:[m]}),di(m,(function(e,n,o){if("raw"===e.type&&o&&"number"==typeof n)return u?o.children.splice(n,1):o.children[n]={type:"text",value:e.value},n;if("element"===e.type){let t;for(t in Ur)if(Object.hasOwn(Ur,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ur[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let A=t?!t.includes(e.tagName):!!a&&a.includes(e.tagName);if(!A&&r&&"number"==typeof n&&(A=!r(e,n,o)),A&&o&&"number"==typeof n)return d&&e.children?o.children.splice(n,1,...e.children):o.children.splice(n,1),n}})),Tr(m,{Fragment:n.Fragment,components:i,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0})}function ta(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||Zi.test(e.slice(0,t))?e:""}const na=({children:e})=>n.jsx("div",{style:{whiteSpace:"normal"},children:n.jsx(ea,{components:{p:({...e})=>n.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>n.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>n.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>n.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?n.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):n.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:n.jsx("code",{children:t})}),blockquote:({...e})=>n.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),ra={autoConfig:!0},oa=t=>()=>(t=>{const{getFlow:n}=Ft(),{messages:r,replaceMessages:o}=_t(),{settings:A}=zt(),{hasChatHistoryLoaded:i}=Gt(),a={...t,...ra},s=a.markdownComponent?a.markdownComponent:na;e.useEffect((()=>{var e,t;if(i){const n=[...r];for(let r=0;r<n.length&&r<((null==(e=A.chatHistory)?void 0:e.maxEntries)??30);r++){const e=n[r];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=s)}o(n)}}),[i]);const l=async e=>{var t;const r=null==(t=e.data.message)?void 0:t.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,n(),r)&&(e.data.message.contentWrapper=s,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Ut(R.PRE_INJECT_MESSAGE,l),Ut(R.CHUNK_STREAM_MESSAGE,l),Ut(R.START_STREAM_MESSAGE,l),Ut(R.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return null!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(t),Aa={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"}},ia=(e,t,n="validateTextInput")=>{var r;if(null==(r=e.detail)||!r.currPath)return;const o=t[e.detail.currPath];if(!o)return;const A=o[n];return"function"==typeof A?A:void 0},aa=t=>{const{showToast:n}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=Je();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:r}=Ft(),{styles:o,updateStyles:A,replaceStyles:i}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=It();return{styles:e,replaceStyles:t,updateStyles:n}})(),a=(e=>({...Aa,...e,promptBaseColors:{...Aa.promptBaseColors},promptHoveredColors:{...Aa.promptHoveredColors},textAreaHighlightColors:{...Aa.textAreaHighlightColors}}))(t),[s,l]=e.useState(0),c=e.useRef({});Ut(R.USER_SUBMIT_TEXT,(e=>{const t=e,i=ia(t,r(),"validateTextInput");if(!i)return;const u=i(t.data.inputText);if(null!=u&&u.success||e.preventDefault(),!u.promptContent)return;0===s&&(c.current=structuredClone(o));const d=((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})(u,a);A(d),n(u.promptContent,u.promptDuration??3e3),l((e=>e+1))})),Ut(R.USER_UPLOAD_FILE,(e=>{var t,o;const A=e,i=null==(o=null==(t=A.data)?void 0:t.files)?void 0:o[0];if(!i)return console.error("No file uploaded."),void e.preventDefault();const a=ia(A,r(),"validateFileInput");if(!a)return void console.error("Validator not found for file input.");const s=a(i);if(!s.success)return console.error("Validation failed:",s),s.promptContent&&n(s.promptContent,s.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",s)})),Ut(R.DISMISS_TOAST,(()=>{l((e=>e-1))})),e.useEffect((()=>{0===s&&setTimeout((()=>{i(c.current)}))}),[s,i]);const u={name:"@rcb-plugins/input-validator"};return a.autoConfig&&(u.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),u},sa=[];for(let e=0;e<256;++e)sa.push((e+256).toString(16).slice(1));let la;const ca=new Uint8Array(16);var ua={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function da(e,t,n){if(ua.randomUUID&&!e)return ua.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!la){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");la=crypto.getRandomValues.bind(crypto)}return la(ca)}();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(sa[e[t+0]]+sa[e[t+1]]+sa[e[t+2]]+sa[e[t+3]]+"-"+sa[e[t+4]]+sa[e[t+5]]+"-"+sa[e[t+6]]+sa[e[t+7]]+"-"+sa[e[t+8]]+sa[e[t+9]]+"-"+sa[e[t+10]]+sa[e[t+11]]+sa[e[t+12]]+sa[e[t+13]]+sa[e[t+14]]+sa[e[t+15]]).toLowerCase()}(r)}const pa={LOGIN_URL:"/login",WELCOME_MESSAGE:"Hello! What can I help you with?",WELCOME_MESSAGE_LOGGED_OUT:"To ask questions, please log in.",WELCOME_MESSAGE_LOGIN_TRANSITION:"Welcome! You are now logged in. What can I help you with?",WELCOME_MESSAGE_LOGOUT_TRANSITION:"You have been logged out.",API_ENDPOINT:"https://access-ai.ccs.uky.edu/api/query",netlifyBaseUrl:"undefined"!=typeof process&&process.env?process.env.REACT_APP_NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",ERRORS:{API_UNAVAILABLE:"Unable to contact the Q&A Bot. Please try again later."},BEHAVIOR:{SHOW_RATING_AFTER_FAILED_QUERY:!0},THEME:{PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",FONT_FAMILY:"Arial, sans-serif"},CHATBOT:{TITLE:"ACCESS Q&A",AVATAR_URL:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",TOOLTIP_TEXT:"Ask me about ACCESS! 😊"}},fa=(e,t)=>t||pa.WELCOME_MESSAGE,ha=e.forwardRef((({embedded:t,isBotLoggedIn:n,currentOpen:r},o)=>{const A=_t(),i=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=G();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),a=e.useRef(r),s=e.useRef(!1);return(t=>{const n=e.useRef(t),{injectMessage:r}=_t();e.useEffect((()=>{const e=n.current!==t,o=!n.current&&t;e&&r(o?pa.WELCOME_MESSAGE_LOGIN_TRANSITION:pa.WELCOME_MESSAGE_LOGOUT_TRANSITION,"bot"),n.current=t}),[t,r])})(n),e.useEffect((()=>{!t&&i&&i.toggleChatWindow&&(a.current===r||s.current||i&&i.toggleChatWindow&&(i.toggleChatWindow(r),a.current=r),s.current=!1)}),[r,t,i]),e.useEffect((()=>{const e=()=>{s.current=!0};o&&(o.current||(o.current={}),o.current._markAsUserInteraction=e)})),e.useImperativeHandle(o,(()=>({addMessage:e=>{A&&A.injectMessage&&A.injectMessage(e)}})),[A]),null}));ha.displayName="BotController";const ga=e.createContext(),ma=({children:t})=>{const[n,r]=e.useState({}),[o,A]=e.useState({}),i={ticketForm:n,feedbackForm:o,updateTicketForm:e=>{r((t=>({...t,...e})))},updateFeedbackForm:e=>{A((t=>({...t,...e})))},resetTicketForm:()=>{r({})},resetFeedbackForm:()=>{A({})},setTicketForm:r,setFeedbackForm:A};return e.createElement(ga.Provider,{value:i},t)},ba=()=>{const t=e.useContext(ga);if(!t)throw new Error("useFormContext must be used within a FormProvider");return t},ya=({width:t=24,height:n=24,color:r="currentColor",children:o,...A})=>e.createElement("svg",i({xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},A),o),va=t=>e.createElement(ya,t,e.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"})),wa=()=>{const{restartFlow:t}=Ft(),{resetTicketForm:n,resetFeedbackForm:r}=ba();return e.createElement("button",{onClick:()=>{n(),r(),t()},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"#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="#0d5f6b"},onMouseLeave:e=>{e.target.style.backgroundColor="#107180"}},e.createElement(va,{width:16,height:16}),"New Chat")},xa=()=>e.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"#1a5b6e",marginRight:"5px"},role:"img","aria-label":"User logged in",title:"User logged in"},e.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"},e.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Ea=({loginUrl:t,className:n="",style:r,isHeaderButton:o=!1})=>{const A=o?{display:"inline-block",padding:"6px 12px",backgroundColor:"transparent",border:"1px solid #ccc",color:"white",textDecoration:"none",borderRadius:"4px",fontWeight:"normal",textAlign:"center",margin:"8px",fontSize:"12px",opacity:"0.8",transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid #107180",color:"#107180",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return e.createElement(e.Fragment,null,o&&e.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 "),e.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${n}`,style:{...A,...r}},"Log In"))},ka=(t,n,r)=>{const o=()=>{try{const e=localStorage.getItem("rcb-history");if(!e)return null;const t=JSON.parse(e);if(!Array.isArray(t))return null;let n=null,r=null;for(const e of t)if("USER"===e.sender){const t=new Date(e.timestamp).getTime();(!r||t>r)&&(r=t,n=e)}return n?n.id:null}catch(e){return console.warn("Error parsing chat history:",e),null}};return e.useCallback((async e=>{const{userInput:A}=e,i=o();i&&r(i);const a={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":t,"X-Session-ID":n,"X-Query-ID":i};try{const t={method:"POST",headers:a,body:JSON.stringify({query:A})},n=await fetch(pa.API_ENDPOINT,t),r=(await n.json()).response;return await e.streamMessage(r),!0}catch(t){return await e.injectMessage(pa.ERRORS.API_UNAVAILABLE),!1}}),[t,r,o,n])},Pa=()=>(e.useEffect((()=>{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 A=[];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];A=Array.from(e.querySelectorAll(".rcb-options"))}}if(0===A.length)return;const i=A.findIndex((e=>e===document.activeElement));switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=i<A.length-1?i+1:0,A[t].setAttribute("tabindex","0"),A.forEach(((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[t].classList.add("keyboard-focused"),A[t].focus();break}case"ArrowUp":case"ArrowLeft":{let t;e.preventDefault(),t=i>0?i-1:A.length-1,A[t].setAttribute("tabindex","0"),A.forEach(((e,n)=>{n!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[t].classList.add("keyboard-focused"),A[t].focus();break}case"Enter":case" ":if(e.preventDefault(),document.activeElement&&A.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",A=e.querySelector(".rcb-checkbox-mark"),i=A&&A.style.backgroundColor?"checked":"unchecked";t(`${o} ${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(),A.length>0&&(A[0].setAttribute("tabindex","0"),A.forEach(((e,t)=>{0!==t&&(e.setAttribute("tabindex","-1"),e.classList.remove("keyboard-focused"))})),A[0].classList.add("keyboard-focused"),A[0].focus());break;case"End":if(e.preventDefault(),A.length>0){const e=A.length-1;A[e].setAttribute("tabindex","0"),A.forEach(((t,n)=>{n!==e&&(t.setAttribute("tabindex","-1"),t.classList.remove("keyboard-focused"))})),A[e].classList.add("keyboard-focused"),A[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=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter((e=>null!==e.offsetParent));if(0===r.length)return;const o=r[r.length-1],A=Array.from(o.querySelectorAll(".rcb-options-container")).filter((e=>null!==e.offsetParent));let i=[];if(A.length>0){const e=A[A.length-1];i=Array.from(e.querySelectorAll(".rcb-options"))}if(0===i.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"),r=[...t];if(n&&null!==n.offsetParent&&r.push(n),r.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((()=>{r[0]&&null!==r[0].offsetParent&&r[0].focus()}),150)}}}if(i.length>0){if(i.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",i.length),0===t?e.classList.add("keyboard-focused"):e.classList.remove("keyboard-focused")})),i.length>1){const e=A.length>0?A[A.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=A.length>0?A[A.length-1]:null;if(e){e.querySelectorAll(".keyboard-nav-hint").forEach((e=>e.remove()))}}setTimeout((()=>{i[0]&&null!==i[0].offsetParent&&(i[0].focus(),i.length>1&&t(`${i.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),Ba=({fetchAndStreamResponse:e,sessionId:t,currentQueryId:n,apiKey:r})=>({go_ahead_and_ask:{message:"Please type your question.",path:"qa_loop"},qa_loop:{message:async t=>{try{return await e(t),"Was this helpful?"}catch(e){return console.error("Error in bot flow:",e),(e=>(console.error("Bot error:",e),e&&e.error||Error,pa.ERRORS.API_UNAVAILABLE))(e)}},renderMarkdown:["BOT"],options:["👍 Yes","👎 No"],chatDisabled:!1,function:async e=>{if(("👍 Yes"===e.userInput||"👎 No"===e.userInput)&&r&&t){const o="👍 Yes"===e.userInput,A={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":r,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o?1:0};try{await fetch(`${pa.API_ENDPOINT}/rating`,{method:"POST",headers:A})}catch(e){console.error("Error sending feedback:",e)}}},path:e=>"👍 Yes"===e.userInput?"qa_positive_feedback":"👎 No"===e.userInput?"qa_negative_feedback":"qa_loop"},qa_positive_feedback:{message:"Thank you for your feedback! It helps us improve this tool.",transition:{duration:1e3},path:"go_ahead_and_ask"},qa_negative_feedback:{message:"Sorry that wasn't useful. Would you like to open a help ticket for assistance?",options:["Open a help ticket","Ask another question"],chatDisabled:!0,path:e=>"Open a help ticket"===e.userInput?"help_ticket":"qa_continue"},qa_continue:{message:"Ask another question, but remember that each question must stand alone.",path:"qa_loop"}}),Ca=t=>e.createElement(ya,t,e.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.createElement("polyline",{points:"17 8 12 3 7 8"}),e.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Da=({onFileUpload:t})=>{const[n,r]=e.useState(!1),[o,A]=e.useState([]),[i,a]=e.useState(null),s=e.useRef(null),{captureScreenshot:l,isCapturing:c,isScreenCaptureAvailable:u}=(()=>{const[t,n]=e.useState(!1),r=()=>"undefined"!=typeof navigator&&navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!r())throw new Error("Screen capture is not available in this environment");try{n(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",logicalSurface:!0,width:{ideal:1920},height:{ideal:1080}},audio:!1}),t=document.createElement("video");t.srcObject=e,await new Promise((e=>{t.onloadedmetadata=()=>{t.play(),e()}}));const r=document.createElement("canvas");r.width=t.videoWidth,r.height=t.videoHeight,r.getContext("2d").drawImage(t,0,0,r.width,r.height);const o=await new Promise((e=>r.toBlob(e,"image/png"))),A=(new Date).toISOString().replace(/[:.]/g,"-"),i=new File([o],`screenshot-${A}.png`,{type:"image/png"});return e.getTracks().forEach((e=>e.stop())),n(!1),i}catch(e){throw console.error("Error capturing screenshot:",e),n(!1),e}},isCapturing:t,isScreenCaptureAvailable:r()}})(),d=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)},p=e=>{if(!e||!e.length||0===e.length)return void console.warn("FileUploadComponent: No valid files provided to handleFiles");let n;try{n=Array.from(e)}catch(e){return console.error("FileUploadComponent: Error converting files to array:",e),void d("Error processing selected files. Please try again.")}const r=[...o,...n];A(r);const i=n.length,a=n.map((e=>e.name)).join(", ");d(`${i} file${i>1?"s":""} selected: ${a}`),setTimeout((()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)}),100),t&&t(r)},f=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?r(!0):"dragleave"===e.type&&r(!1)},h=()=>{try{s.current&&s.current.click()}catch(e){console.error("FileUploadComponent: Error in handleButtonClick:",e),d("Error opening file selection dialog. Please try again.")}},g=()=>{a(null)};return e.createElement("div",{className:"file-upload-container",style:{padding:"16px",margin:"8px 0"}},u&&e.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},e.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await l();p([e]),d("Screenshot captured successfully")}catch(e){d("Error capturing screenshot. Please try again.")}})()},disabled:c,"aria-describedby":"screenshot-help","aria-label":c?"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:c?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},e.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"},e.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"}),e.createElement("circle",{cx:"12",cy:"13",r:"4"})),c?"Taking screenshot...":"Take screenshot..."),e.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),e.createElement("div",{className:"file-upload-dropzone "+(n?"active":""),onDragEnter:f,onDragLeave:f,onDragOver:f,onDrop:e=>{e.preventDefault(),e.stopPropagation(),r(!1);try{e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length>0&&p(e.dataTransfer.files)}catch(e){console.error("FileUploadComponent: Error in handleDrop:",e),d("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(),h())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:n?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},e.createElement("input",{ref:s,type:"file",className:"file-input",onChange:e=>{try{e.target&&e.target.files&&e.target.files.length>0&&p(e.target.files)}catch(e){console.error("FileUploadComponent: Error in handleFileSelect:",e),d("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:"image/*,application/pdf,text/*,.doc,.docx"}),e.createElement("div",{className:"upload-content",onClick:h,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},e.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},e.createElement(Ca,null),e.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),e.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. Accepted: Images, PDFs, Text files (Max 10MB each)")),o.length>0&&e.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},e.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),o.map(((n,r)=>e.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:e=>{e.stopPropagation(),(e=>{a(e)})(n)}},e.createElement("span",{onClick:e=>{e.stopPropagation(),(e=>{const n=o.filter(((t,n)=>n!==e));A(n),t&&t(n)})(r)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${n.name}`},"×"),n.name," (",(n.size/1024).toFixed(1)," KB)")))))),(()=>{if(!i)return null;const t=i.type.startsWith("image/"),n=i.type.startsWith("text/"),r="application/pdf"===i.type;return e.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:g},e.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},e.createElement("button",{onClick:g,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),e.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},i.name),t&&e.createElement("img",{src:URL.createObjectURL(i),alt:i.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&e.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(i)),r&&e.createElement("iframe",{src:URL.createObjectURL(i),style:{width:"100%",height:"70vh",border:"none"},title:i.name}),!t&&!n&&!r&&e.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())},Sa=async(e,t="support",n=[])=>{const r=17,o={support:r,general_help:r,feedback:r,loginAccess:30,loginProvider:31,security:26},A={serviceDeskId:"security"===t?3:2,requestTypeId:o[t]||o.support,requestFieldValues:{...e}};if(n&&n.length>0){const e=await Promise.all(n.map((async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const n=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:n})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)})))));A.attachments=e}return A},Ia=async(e,t)=>{const n=pa.netlifyBaseUrl.replace("/.netlify/functions/","").replace("/.netlify/functions","");let r;r="create-support-ticket"===t?`${n}/api/v1/tickets`:"create-security-incident"===t?`${n}/api/v1/security-incidents`:`${pa.netlifyBaseUrl}/${t}`;try{const t=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e="";try{const n=await t.text();console.error("| ❌ Post data to proxy failed:",t.status,n);try{const t=JSON.parse(n);e=t.message||t.error||n}catch{e=n}}catch{e=`HTTP ${t.status} ${t.statusText}`}return 403===t.status?e="The ticket service is temporarily unavailable. Please try again later or contact support directly.":404===t.status?e="Ticket service not found. Please try again later.":500===t.status?e="Server error. Please try again later.":401===t.status&&(e="Authentication error with the ticket service. Please contact support."),{success:!1,status:t.status,error:e}}return{success:!0,data:await t.json()}}catch(e){return console.error("| ❌ Post data to proxy exception:",e),{success:!1,error:e.message}}},Ta=(t,n)=>{const r=()=>e.createElement(Da,{onFileUpload:e=>t({...n||{},uploadedFiles:e})});return r.displayName="FileUploadWrapper",r},Qa=e=>{let t=null;return{submitTicket:async(n,r,o=[])=>{try{const A=await Sa(n,r,o),i=await Ia(A,"create-support-ticket");i.success?(t={success:!0,ticketKey:i.data.data.ticketKey,ticketUrl:i.data.data.ticketUrl},e((e=>({...e,ticketKey:i.data.data.ticketKey,ticketUrl:i.data.data.ticketUrl})))):(console.error(`| ❌ ${r} ticket creation failed:`,i),t={success:!1,error:i.error||"Unknown error"},e((e=>({...e,submissionError:i.error||"Unknown error"}))))}catch(n){console.error(`| ❌ Error sending ${r} data to proxy:`,n),t={success:!1,error:n.message},e((e=>({...e,submissionError:n.message})))}},getSubmissionResult:()=>t}},Ma=(e,t="ticket")=>e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`Your ${t} has been submitted successfully.\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`We apologize, but there was an error submitting your ${t}: ${e.error||"Unknown error"}\n\nPlease try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.\n\nPlease try again or contact our support team directly.`,Oa=e=>e&&e.length>0?`\nAttachments: ${e.length} file(s) attached`:"";let La=null;const Na=()=>{if(!La)return console.warn("Form context not available, returning empty form"),{};const e=La.ticketForm;return e&&"object"==typeof e?e:{}},Ra=(e={})=>{const t=Na()||{},n=e&&"object"==typeof e?e:{};return{...t,email:n.email||t.email,name:n.name||t.name,accessId:n.accessId||t.accessId}},ja=()=>e=>(e&&""!==e.trim()||setTimeout((()=>{const e=document.querySelector(".rcb-chat-input-textarea");if(e){e.value="Not provided";const t=new Event("input",{bubbles:!0});e.dispatchEvent(t),setTimeout((()=>{const e=document.querySelector('.rcb-send-button, .rcb-chat-send-button, [aria-label*="send"], button[type="submit"]');if(e){const t=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}}),200)}}),100),{success:!0}),Ha=e=>e&&""!==e.trim()?e:"Not provided",Fa=e=>{const t=e?.trim()||"";return t?(e=>!(!e||"string"!=typeof e)&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e.trim()))(t)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address (e.g., user@example.com).",promptDuration:3e3,promptType:"error",highlightTextArea:!0}:{success:!1,promptContent:"Please enter an email address.",promptDuration:3e3,promptType:"error",highlightTextArea:!0}},_a=({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const r=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Qa(t);return{access_help:{message:"If you're having trouble logging into the ACCESS website, here are some common issues:\n\n• Make sure you're using a supported browser (Chrome, Firefox, Safari)\n• Clear your browser cookies and cache\n• Check if you're using the correct identity provider\n\nWould you like to submit a help ticket for ACCESS login issues?",options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,path:e=>"Yes, let's create a ticket"===e.userInput?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:e=>{const r=Na(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],chatDisabled:!0,function:e=>{const n=Na();t({...n,identityProvider:e.userInput})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],chatDisabled:!0,function:e=>{const n=Na();t({...n,browser:e.userInput})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"access_login_upload":(()=>{const e=Ra(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"})()},access_login_upload:{message:"Please upload your screenshot.",component:Ta(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ra(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:e=>Fa(e),function:e=>{const n=Na();t({...n,email:e.userInput})},path:()=>{const e=Ra(n);return e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:e=>{const n=Na();t({...n,name:e.userInput})},path:()=>Ra(n).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Na();t({...n,accessId:Ha(e.userInput)})},path:"access_login_summary"},access_login_summary:{message:e=>{const t=Na(),r=Ra(n),o=Oa(t.uploadedFiles);let A=r.accessId;return"access_login_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"access_login_accessid"!==e.prevPath||(A=e.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nIdentity Provider: ${t.identityProvider||"Not provided"}\nBrowser: ${t.browser||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT","USER"],function:async e=>{if("Submit Ticket"===e.userInput){const e=Na(),t=Ra(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",description:e.description||"",identityProvider:e.identityProvider||"",browser:e.browser||""};await r(o,"loginAccess",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"access_login_success":"start"},access_login_success:{message:()=>Ma(o(),"ACCESS login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),o=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Qa(t);return{affiliated_help:{message:'If you\'re having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:\n\n• Ensure your allocation is active\n• Confirm you have the correct username for that resource\n• Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance\n\nWould you like to submit a help ticket for resource provider login issues?',options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:e=>"Yes, let's create a ticket"===e.userInput?"affiliated_login_resource":"start"},affiliated_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Na();t({...n,resource:e.userInput})},path:"affiliated_login_userid"},affiliated_login_userid:{message:"What is your user ID at the resource?",function:e=>{const n=Na();t({...n,userIdResource:e.userInput})},path:"affiliated_login_description"},affiliated_login_description:{message:"Please describe the issue you're having logging in.",function:e=>{const r=Na(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"affiliated_login_attachment"},affiliated_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"affiliated_login_upload":(()=>{const e=Ra(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"})()},affiliated_login_upload:{message:"Please upload your screenshot.",component:Ta(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ra(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"}},affiliated_login_email:{message:"What is your email?",validateTextInput:e=>Fa(e),function:e=>{const n=Na();t({...n,email:e.userInput})},path:()=>{const e=Ra(n);return e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name"}},affiliated_login_name:{message:"What is your name?",function:e=>{const n=Na();t({...n,name:e.userInput})},path:()=>Ra(n).accessId?"affiliated_login_summary":"affiliated_login_accessid"},affiliated_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Na();t({...n,accessId:Ha(e.userInput)})},path:"affiliated_login_summary"},affiliated_login_summary:{message:e=>{const t=Na(),r=Ra(n),o=Oa(t.uploadedFiles);let A=r.accessId;return"affiliated_login_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"affiliated_login_accessid"!==e.prevPath||(A=e.userInput),`Thank you for providing your resource login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nResource: ${t.resource||"Not provided"}\nResource User ID: ${t.userIdResource||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Na(),t=Ra(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",accessResource:e.resource||"",description:e.description||"",userIdAtResource:e.userIdResource||""};await r(o,"loginProvider",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"affiliated_login_success":"start"},affiliated_login_success:{message:()=>Ma(o(),"resource login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),A=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Qa(t);return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:e=>{const r=Na(),o={...r,summary:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],chatDisabled:!0,function:e=>{const n=Na();t({...n,category:e.userInput})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:e=>{const n=Na();t({...n,description:e.userInput})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:Ta(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na();t({...e,uploadConfirmed:!0})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,involvesResource:e.userInput.toLowerCase()})},path:e=>"Yes"===e.userInput?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Na();t({...n,resourceDetails:e.userInput})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Na();t({...n,userIdAtResource:Ha(e.userInput)})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],min:0,max:5},chatDisabled:!0,function:e=>{const n=Na();t({...n,keywords:e.userInput})},path:e=>e.userInput&&e.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:e=>{const n=Na(),r=n.keywords||[],o=e.userInput,A=Array.isArray(r)?[...r]:r.split(",").map((e=>e.trim())),i=A.filter((e=>"I don't see a relevant keyword"!==e)),a=Array.isArray(i)&&i.length>0?[...i,o].join(", "):o;t({...n,keywords:a,suggestedKeyword:o})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],chatDisabled:!0,function:e=>{const n=Na();t({...n,priority:e.userInput.toLowerCase()})},path:()=>n.email?n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"},general_help_email:{message:"What is your email address?",validateTextInput:e=>Fa(e),function:e=>{const n=Na();t({...n,email:e.userInput})},path:()=>n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"},general_help_name:{message:"What is your name?",function:e=>{const n=Na();t({...n,name:e.userInput})},path:()=>n.accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",required:!1,function:e=>{const n=Na();t({...n,accessId:e.userInput||""})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:e=>{const t=Na(),r=Ra(n),o=Oa(t.uploadedFiles);let A=r.accessId;"general_help_accessid"===e.prevPath&&e.userInput?A=e.userInput:A||"general_help_accessid"!==e.prevPath||(A=e.userInput);let i="";return"yes"===t.involvesResource&&(i=`\nResource: ${t.resourceDetails||"Not specified"}`,t.userIdAtResource&&(i+=`\nUser ID at Resource: ${t.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${A||"Not provided"}\nIssue Summary: ${t.summary||"Not provided"}\nCategory: ${t.category||"Not provided"}\nPriority: ${t.priority||"Not provided"}\nKeywords: ${t.keywords||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${i}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Na(),t=Ra(n),o={email:t.email||"",summary:e.summary||"General Support Ticket",description:e.description||"",priority:e.priority||"medium",accessId:t.accessId||"",name:t.name||"",issueType:e.category||"",hasResourceProblem:"yes"===e.involvesResource?"Yes":"No",userIdAtResource:e.userIdAtResource||"",resourceName:e.resourceDetails||"",keywords:e.keywords||"",noRelevantKeyword:e.suggestedKeyword?"checked":"",suggestedKeyword:e.suggestedKeyword||""};await r(o,"support",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"general_help_success":"start"},general_help_success:{message:()=>Ma(o(),"support ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],chatDisabled:!0,function:n=>{t({...e||{},ticketType:n.userInput})},path:e=>"Logging into ACCESS website"===e.userInput?"access_help":"Logging into a resource"===e.userInput?"affiliated_help":"Another question"===e.userInput?"general_help_summary_subject":"help_ticket"},...r,...o,...A}},Ua=({setTicketForm:t=()=>{},userInfo:n={}})=>{let r=null,o=null;return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:e=>{const r=Na()||{},o={...r,summary:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],chatDisabled:!0,function:e=>{const n=Na()||{};t({...n,priority:e.userInput})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:e=>{const n=Na()||{};t({...n,description:e.userInput})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na()||{};t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"security_upload":"security_contact_info"},security_upload:{message:"Please upload your files.",component:()=>e.createElement(Da,{onFileUpload:e=>{const n=Na()||{};t({...n,uploadedFiles:e})}}),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na()||{};t({...e,uploadConfirmed:!0})},path:"security_contact_info"},security_contact_info:{message:()=>{const e=Ra(n);return e.name&&e.email&&e.accessId?`I have your contact information:\n\nName: ${e.name}\nEmail: ${e.email}\nACCESS ID: ${e.accessId}\n\nIs this correct?`:"I need your contact information. What is your name?"},options:e=>{if(!e)return[];const t=Ra(n);return t.name&&t.email&&t.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:e=>{if(!e)return!1;const t=Ra(n);return t.name&&t.email&&t.accessId},function:e=>{if(!e)return;const n=Na()||{};if(!n.name){const r={...n,name:e.userInput};t(r)}},path:e=>{if(!e)return"security_summary";const t=Ra(n);return"Yes, that's correct"===e.userInput?"security_summary":"Let me update it"===e.userInput?"security_name":t.name&&t.email?t.accessId?"security_summary":"security_accessid":"security_email"}},security_name:{message:"What is your name?",function:e=>{const n=Na()||{};t({...n,name:e.userInput})},path:"security_email"},security_email:{message:"What is your email address?",function:e=>{const n=Na()||{};t({...n,email:e.userInput})},path:"security_accessid"},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Ha(e.userInput);r=n;const o=Na()||{};t({...o,accessId:n})},path:"security_summary"},security_summary:{message:()=>{const e=Na()||{},t=Ra(n),o={...e,name:t.name||e.name,email:t.email||e.email,accessId:r||t.accessId||e.accessId};let A="";e.uploadedFiles&&e.uploadedFiles.length>0&&(A=`\nAttachments: ${e.uploadedFiles.length} file(s) attached`);const i=o.accessId||"Not provided";return`Here's a summary of your security incident report:\n\nSummary: ${o.summary||"Not provided"}\nPriority: ${o.priority||"Not provided"}\nName: ${o.name||"Not provided"}\nEmail: ${o.email||"Not provided"}\nACCESS ID: ${i}\nDescription: ${o.description||"Not provided"}${A}\n\nWould you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Security Report"===e.userInput){const e=Na()||{},A=Ra(n),i={...e,name:A.name||e.name,email:A.email||e.email,accessId:r||A.accessId||e.accessId},a={summary:i.summary||"",priority:i.priority||"",description:i.description||"",name:i.name||"",email:i.email||"",accessId:i.accessId||""};try{const n=await(async(e,t=[])=>{try{const n=await Sa(e,"security",t);return await Ia(n,"create-security-incident")}catch(e){return console.error("| ❌ Security incident submission failed:",e),{success:!1,error:e.message}}})(a,e.uploadedFiles||[]);n.success?(o={success:!0,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl},t((e=>({...e,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl,submissionResult:o})))):(o={success:!1,error:n.error},t((e=>({...e,submissionError:n.error}))))}catch(e){o={success:!1,error:e.message},t((t=>({...t,submissionError:e.message})))}}},path:e=>"Submit Security Report"===e.userInput?"security_success":"start"},security_success:{message:()=>(e=>e&&!e.success?`We apologize, but there was an error submitting your security incident report: ${e.error}\n\nPlease try again or contact our cybersecurity team directly.`:e&&e.success&&e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure.`:(e&&e.success,"Your security incident report has been submitted successfully.\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure."))((Na()||{}).submissionResult||o),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}};function za({welcomeMessage:t,isBotLoggedIn:n,loginUrl:r,handleQuery:o,hasQueryError:A,sessionId:i,currentQueryId:a,ticketForm:s={},setTicketForm:l=()=>{},formContext:c,apiKey:u,userInfo:d={}}){c&&(e=>{La=e})(c);const p=(({welcome:e,setTicketForm:t=()=>{},setFeedbackForm:n=()=>{}})=>({start:{message:e,options:["Ask a question about ACCESS","Open a Help Ticket","Report a security issue"],chatDisabled:!0,path:e=>"Ask a question about ACCESS"===e.userInput?"go_ahead_and_ask":"Open a Help Ticket"===e.userInput?(t({}),"help_ticket"):"Report a security issue"===e.userInput?(t({}),"security_incident"):"start"}}))({welcome:fa(0,t),setTicketForm:l});return{...p||{},...(n?Ba({fetchAndStreamResponse:o,sessionId:i,currentQueryId:a,apiKey:u}):{go_ahead_and_ask:{message:"To ask questions, you need to log in first.",component:()=>e.createElement(Ea,{loginUrl:r}),options:["Back to Main Menu"],chatDisabled:!0,path:e=>"Back to Main Menu"===e.userInput?"start":"go_ahead_and_ask"}})||{},..._a({ticketForm:s,setTicketForm:l,userInfo:d})||{},...Ua({ticketForm:s,setTicketForm:l,userInfo:d})||{},...n&&{loop:{message:async e=>{await o(e)},renderMarkdown:["BOT"],path:()=>A?"start":"loop"}}}}console.info(`%c🤖 ACCESS QA Bot - Function Components Fix Applied [${(new Date).toISOString().slice(0,10)}]`,"background: #107180; color: white; padding: 2px 8px; border-radius: 3px; font-weight: bold;");const Ga=()=>{for(let e=0;e<localStorage.length;e++){const t=localStorage.key(e);if(t&&t.startsWith("qa_bot_session_")){const e=localStorage.getItem(t);if(e)return e}}const e=`qa_bot_session_${da()}`;return localStorage.setItem(e,e),e},Ya=e.forwardRef(((t,n)=>{const{apiKey:r,open:o=!1,onOpenChange:A,embedded:i=!1,isLoggedIn:a,loginUrl:l=pa.LOGIN_URL,ringEffect:c=!1,welcome:u,userEmail:d,userName:p,accessId:f}=t,h=r||("undefined"!=typeof process&&process.env?process.env.REACT_APP_API_KEY:null),[g,m]=e.useState(void 0!==a&&a),b=e.useRef(Ga()).current,[y,v]=e.useState(null),{ticketForm:w,feedbackForm:x,updateTicketForm:E,updateFeedbackForm:k,resetTicketForm:P,resetFeedbackForm:B}=ba();e.useEffect((()=>{void 0!==a&&m(a)}),[a]),e.useEffect((()=>{if(!i&&A){const e=e=>{n&&n.current&&n.current._markAsUserInteraction&&n.current._markAsUserInteraction();const t=e.data.newState;A(t)};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}}),[i,A,n]);const C=fa(0,u),D=e.useRef(null),S=((t,n={})=>e.useMemo((()=>{const e=(e,n)=>{if(t.current){const n=getComputedStyle(t.current).getPropertyValue(e);if(n&&""!==n.trim())return n.trim();if(t.current.parentElement){const n=getComputedStyle(t.current.parentElement).getPropertyValue(e);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:e("--primary-color",n.primaryColor||pa.THEME.PRIMARY_COLOR),secondaryColor:e("--secondary-color",n.secondaryColor||pa.THEME.SECONDARY_COLOR),fontFamily:e("--font-family",n.fontFamily||pa.THEME.FONT_FAMILY)}}),[t,n]))(D),I=(({themeColors:t,embedded:n,defaultOpen:r,isLoggedIn:o,loginUrl:A})=>{const i=o,a=sessionStorage.getItem("qa_bot_tooltip_shown")?"NEVER":"START";return e.useMemo((()=>({general:{...t,embedded:n,primaryColor:t.primaryColor,fontFamily:"Arial, sans-serif",secondaryColor:t.secondaryColor},header:{title:e.createElement("div",{key:"header-title"},e.createElement("h1",{className:"sr-only"},pa.CHATBOT.TITLE),e.createElement("span",{"aria-hidden":"true"},pa.CHATBOT.TITLE)),avatar:pa.CHATBOT.AVATAR_URL,buttons:[()=>i?e.createElement(xa,{key:"user-icon"}):e.createElement(Ea,{key:"login-button",loginUrl:A,isHeaderButton:!0}),s.CLOSE_CHAT_BUTTON]},chatWindow:{defaultOpen:!!n||r},chatInput:{enabledPlaceholderText:"Type your question here...",disabledPlaceholderText:"",disabled:!1,allowNewline:!0,sendButtonStyle:{display:"flex"},characterLimit:1e3,sendButtonAriaLabel:"Send message",showCharacterCount:!1,ariaLabel:"Chat input area",ariaDescribedBy:"chat-input-help"},chatHistory:{disabled:!1},botBubble:{simulateStream:!0,streamSpeed:10,allowNewline:!0,dangerouslySetInnerHTML:!0,renderHtml:!0,ariaLabel:"Bot response",role:"log"},chatButton:{icon:pa.CHATBOT.AVATAR_URL},tooltip:{text:pa.CHATBOT.TOOLTIP_TEXT,mode:a},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0},notification:{disabled:!0},footer:{text:e.createElement("div",{key:"footer-text"},e.createElement("a",{href:"https://support.access-ci.org/tools/access-qa-tool"},"About this tool"),"."),buttons:[e.createElement(wa,{key:"new-chat-button"})]},event:{rcbToggleChatWindow:!0}})),[t,n,r,i,a,A])})({themeColors:S,embedded:i,defaultOpen:o,isLoggedIn:g,loginUrl:l}),T=ka(h,b,v),Q=e.useMemo((()=>({ticketForm:w||{},feedbackForm:x||{},updateTicketForm:E,updateFeedbackForm:k,resetTicketForm:P,resetFeedbackForm:B})),[w,x,E,k,P,B]),M=e.useMemo((()=>za({welcomeMessage:C,isBotLoggedIn:g,loginUrl:l,handleQuery:T,sessionId:b,currentQueryId:y,ticketForm:w,setTicketForm:E,formContext:Q,apiKey:h,userInfo:{email:d||null,name:p||null,accessId:f||null}})),[C,g,l,T,b,y,w,x,E,k,Q,h,d,p,f]);return((t,n)=>{e.useEffect((()=>{n.current&&(t?n.current.classList.add("bot-logged-in"):n.current.classList.remove("bot-logged-in"))}),[t,n])})(g,D),((t,n)=>{e.useEffect((()=>{if(!t||!n.current)return;const e=setTimeout((()=>{const e=n.current?.querySelector(".rcb-tooltip-show");e&&e.classList.add("phone-ring")}),500);return()=>{clearTimeout(e)}}),[t,n])})(c,D),e.useEffect((()=>{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=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)}),[]),Pa(),e.useEffect((()=>{const e=()=>{sessionStorage.setItem("qa_bot_tooltip_shown","true")};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}),[]),e.createElement("div",{className:"qa-bot "+(i?"embedded-qa-bot":""),ref:D,role:"region","aria-label":"Ask ACCESS tool"},e.createElement(Ot,null,e.createElement("main",{role:"main","aria-label":"Chat interface"},e.createElement(ha,{ref:n,embedded:i,isBotLoggedIn:g,currentOpen:o}),e.createElement(jt,{key:`chatbot-${b}-${g}`,settings:I,flow:M,plugins:[()=>vn(L),oa(),()=>aa(O)]}),e.createElement("div",{"aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region"}),e.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."),e.createElement("div",{id:"keyboard-help",className:"sr-only"},"Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs."))));var O,L}));Ya.displayName="QABotInternal";const qa=e.forwardRef(((t,n)=>e.createElement(ma,null,e.createElement(Ya,i({},t,{ref:n})))));qa.displayName="QABot";a('.rcb-toggle-icon{background-color:initial!important;background-position:calc(50% - 1px) calc(50% + 2px);background-repeat:no-repeat;background-size:62%!important}.rcb-chat-window{max-height:600px;max-width:100%;width:550px!important}.rcb-chat-window .rcb-bot-avatar{background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:0}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:#107180}.rcb-chat-window .rcb-bot-message a{color:#fff;text-decoration:none}.rcb-chat-window .rcb-bot-message a:hover{text-decoration:underline}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-tooltip-show.phone-ring{animation:phone-ring 3s ease-out!important;z-index:10000!important}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:#107180!important;border-color:#107180!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:#107180!important;outline:none!important}.rcb-options:active{background-color:#107180!important;border-color:#107180!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:#107180!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=access-qa-tool]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}',{insertAt:"top"});const Wa=e.forwardRef(((t,n)=>{const[r,o]=e.useState(t.isLoggedIn||!1),[A,i]=e.useState(t.defaultOpen||!1),a=e.useRef();return e.useImperativeHandle(n,(()=>({addMessage:e=>{a.current&&a.current.addMessage(e)},setBotIsLoggedIn:e=>{o(e)},openChat:()=>{!t.embedded&&a.current&&i(!0)},closeChat:()=>{!t.embedded&&a.current&&i(!1)},toggleChat:()=>{!t.embedded&&a.current&&i((e=>!e))}})),[t.embedded]),e.createElement(qa,{ref:a,apiKey:t.apiKey,embedded:t.embedded,isLoggedIn:r,open:!!t.embedded||A,onOpenChange:t.embedded?void 0:i,loginUrl:t.loginUrl,ringEffect:t.ringEffect,welcome:t.welcome,userEmail:t.userEmail,userName:t.userName,accessId:t.accessId})}));function Va(n){if(!(n.target&&n.target instanceof HTMLElement))return void console.error("QA Bot: A valid target DOM element is required");const r=t.createRoot(n.target),o={current:null};return r.render(e.createElement(e.StrictMode,null,e.createElement(Wa,{ref:e=>{o.current=e},apiKey:n.apiKey,defaultOpen:n.defaultOpen,embedded:n.embedded,isLoggedIn:n.isLoggedIn,loginUrl:n.loginUrl,ringEffect:n.ringEffect,welcome:n.welcome,userEmail:n.userEmail,userName:n.userName,accessId:n.accessId}))),{addMessage:e=>{var t;return null===(t=o.current)||void 0===t?void 0:t.addMessage(e)},setBotIsLoggedIn:e=>{var t;return null===(t=o.current)||void 0===t?void 0:t.setBotIsLoggedIn(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,r.unmount()}}}Wa.displayName="ProgrammaticQABot",exports.QABot=qa,exports.default=Va,exports.qaBot=Va;
8
+ */var nn,rn;const on=tn(function(){if(rn)return nn;rn=1;var e=/["'&<>]/;return nn=function(t){var n=""+t,r=e.exec(n);if(!r)return n;var o,i="",A=0,a=0;for(A=r.index;A<n.length;A++){switch(n.charCodeAt(A)){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!==A&&(i+=n.substring(a,A)),a=A+1,i+=o}return a!==A?i+n.substring(a,A):i}}());function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const an=/(url|image|image-set)\(/i;class sn extends en{attribute(e,t){return"style"===e&&Object.keys(t).forEach((e=>{String(t[e]).match(an)&&delete t[e]})),t}}const ln=/^<(!doctype|(html|head|body)(\s|>))/i,cn=/^(aria-|data-|\w+:)/iu,un=/{{{(\w+)\/?}}}/;function dn(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}class pn{constructor(e,t={},n=[],r=[]){var o;if(An(this,"allowed",void 0),An(this,"banned",void 0),An(this,"blocked",void 0),An(this,"container",void 0),An(this,"content",[]),An(this,"props",void 0),An(this,"matchers",void 0),An(this,"filters",void 0),An(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 sn],this.keyIndex=-1,this.container=this.createContainer(e||""),this.allowed=new Set(null!==(o=t.allowList)&&void 0!==o?o:Xt),this.banned=new Set(Vt),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,A=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 l="";for(;o&&(A=e.match(o));){const{index:t,length:a,match:s,valid:c,void:u,...d}=A,p=e.propName+String(i);t>0&&(l+=o.slice(0,t)),c?(l+=u?`{{{${p}/}}}`:`{{{${p}}}}${s}{{{/${p}}}}`,this.keyIndex+=1,i+=1,n[p]={children:s,matcher:e,props:{...r,...d,key:this.keyIndex}}):l+=s,e.greedy?(o=l+o.slice(t+a),l=""):o=o.slice(t+(a||s.length))}e.greedy||(o=l+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||dn)();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(ln)){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?on(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:A}=o,a=i.toLowerCase(),s=Kt[a]||Kt[i];if(!this.isSafe(e)||!a.match(cn)&&(!t&&(!s||2===s)||a.startsWith("on")||A.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let l="style"===a?this.extractStyleAttribute(e):A;4===s?l=!0:3===s?l=Number.parseFloat(String(l)):5!==s&&(l=String(l)),n[Jt[a]||a]=this.applyAttributeFilters(a,l),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 Wt[e]?{...t,...Wt[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(t,n){const{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:A,transformOnlyAllowList:a}=this.props;let s=[],l="";return[...t.childNodes].forEach((t=>{if(1===t.nodeType){const u=t.nodeName.toLowerCase(),d=this.getTagConfig(u);l&&(s.push(l),l="");const p=this.applyNodeFilters(u,t);if(!p)return;let f;if(A&&(!a||this.isTagAllowed(u))){this.keyIndex+=1;const t=this.keyIndex;f=this.parseNode(p,d);const n=A(p,f,d);if(null===n)return;if(typeof n<"u")return void s.push(e.cloneElement(n,{key:t}));this.keyIndex=t-1}if(this.banned.has(u))return;if(r||o&&"br"!==u||!this.isTagAllowed(u)||!i&&!this.canRenderChild(n,d))s=[...s,...this.parseNode(p,d.tagName?d:n)];else{var c;this.keyIndex+=1;const t=this.extractAttributes(p),n={tagName:u};t&&(n.attributes=t),d.void&&(n.selfClose=d.void),s.push(e.createElement($t,{...n,key:this.keyIndex},null!==(c=f)&&void 0!==c?c:this.parseNode(p,d)))}}else if(3===t.nodeType){const e=r&&!o?t.textContent:this.applyMatchers(t.textContent||"",n);Array.isArray(e)?s=[...s,...e]:l+=e}})),l&&s.push(l),s}replaceTokens(e,t){if(!e.includes("{{{"))return e;const n=[];let r=e,o=null;for(;o=r.match(un);){const[e,i]=o,A=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.`);A>0&&(n.push(r.slice(0,A)),r=r.slice(A));const{children:s,matcher:l,props:c}=t[i];let u;if(a)u=e.length,n.push(l.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(l.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 fn(t){var n;const{attributes:r,className:o,containerTagName:i,content:A,emptyContent:a,parsedContent:s,tagName:l,noWrap:c}=t,u=null!==(n=i??l)&&void 0!==n?n:"span",d="fragment"===u||c;let p;if(s)p=s;else{const e=new pn(A??"",t).parse();e.length>0&&(p=e)}return p||(p=a),d?e.createElement(e.Fragment,null,p):e.createElement($t,{attributes:r,className:o,tagName:u},p)}function hn(t){const{attributes:n,className:r,content:o="",disableFilters:i=!1,disableMatchers:A=!1,emptyContent:a=null,filters:s=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:p=!1,...f}=t,h=A?[]:l,g=i?[]:s,m=u?[u]:[],b=c?[c]:[];h.forEach((e=>{e.onBeforeParse&&m.push(e.onBeforeParse.bind(e)),e.onAfterParse&&b.push(e.onAfterParse.bind(e))}));const y=m.reduce(((e,n)=>{const r=n(e,t);if("production"!==process.env.NODE_ENV&&"string"!=typeof r)throw new TypeError("Interweave `onBeforeParse` must return a valid HTML string.");return r}),o??""),v=new pn(y,f,h,g),w=b.reduce(((e,n)=>{const r=n(e,t);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}),v.parse());return e.createElement(fn,{attributes:n,className:r,containerTagName:t.containerTagName,emptyContent:a,noWrap:p,parsedContent:0===w.length?void 0:w,tagName:d})}const gn=({children:e})=>n.jsx(hn,{content:"string"==typeof e?e:""}),mn={autoConfig:!0},bn=(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)},yn=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},vn=t=>{const{getFlow:n}=Ft(),{messages:r,replaceMessages:o}=_t(),{settings:i}=zt(),{hasChatHistoryLoaded:A}=Gt(),a={...t,...mn},s=a.htmlComponent?a.htmlComponent:gn;e.useEffect((()=>{var e,t;if(A){const n=[...r];for(let r=0;r<n.length&&r<((null==(e=i.chatHistory)?void 0:e.maxEntries)??30);r++){const e=n[r];null!=(t=e.tags)&&t.includes("rcb-html-renderer-plugin:parsed")&&(e.contentWrapper=s)}o(n)}}),[A]);const l=async e=>{var t;const r=null==(t=e.data.message)?void 0:t.sender.toUpperCase();"string"==typeof e.data.message.content&&bn(e,n(),r)&&("rcb-start-simulate-stream-message"===e.type&&(e.data.simulateStreamChunker=yn),e.data.message.contentWrapper=s,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-html-renderer-plugin:parsed"))};Ut(R.PRE_INJECT_MESSAGE,l),Ut(R.CHUNK_STREAM_MESSAGE,l),Ut(R.START_STREAM_MESSAGE,l),Ut(R.START_SIMULATE_STREAM_MESSAGE,l),Ut(R.START_SPEAK_AUDIO,(async e=>{bn(e,n(),"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!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0,rcbStartSpeakAudio:!0}}),c};const wn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,En={};function kn(e,t){return(En.jsx?xn:wn).test(e)}const Pn=/[ \t\n\f\r]/g;function Bn(e){return""===e.replace(Pn,"")}class Cn{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Dn(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 Cn(n,r,t)}function Sn(e){return e.toLowerCase()}Cn.prototype.property={},Cn.prototype.normal={},Cn.prototype.space=null;class In{constructor(e,t){this.property=e,this.attribute=t}}In.prototype.space=null,In.prototype.boolean=!1,In.prototype.booleanish=!1,In.prototype.overloadedBoolean=!1,In.prototype.number=!1,In.prototype.commaSeparated=!1,In.prototype.spaceSeparated=!1,In.prototype.commaOrSpaceSeparated=!1,In.prototype.mustUseProperty=!1,In.prototype.defined=!1;let Tn=0;const Qn=Hn(),Mn=Hn(),On=Hn(),Ln=Hn(),Nn=Hn(),Rn=Hn(),jn=Hn();function Hn(){return 2**++Tn}const Fn=Object.freeze(Object.defineProperty({__proto__:null,boolean:Qn,booleanish:Mn,commaOrSpaceSeparated:jn,commaSeparated:Rn,number:Ln,overloadedBoolean:On,spaceSeparated:Nn},Symbol.toStringTag,{value:"Module"})),_n=Object.keys(Fn);class Un extends In{constructor(e,t,n,r){let o=-1;if(super(e,t),zn(this,"space",r),"number"==typeof n)for(;++o<_n.length;){const e=_n[o];zn(this,_n[o],(n&Fn[e])===Fn[e])}}}function zn(e,t,n){n&&(e[t]=n)}Un.prototype.defined=!0;const Gn={}.hasOwnProperty;function Yn(e){const t={},n={};let r;for(r in e.properties)if(Gn.call(e.properties,r)){const o=e.properties[r],i=new Un(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Sn(r)]=r,n[Sn(i.attribute)]=r}return new Cn(t,n,e.space)}const qn=Yn({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}}),Wn=Yn({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Vn(e,t){return t in e?e[t]:t}function Xn(e,t){return Vn(e,t.toLowerCase())}const Kn=Yn({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Xn,properties:{xmlns:null,xmlnsXLink:null}}),Jn=Yn({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Mn,ariaAutoComplete:null,ariaBusy:Mn,ariaChecked:Mn,ariaColCount:Ln,ariaColIndex:Ln,ariaColSpan:Ln,ariaControls:Nn,ariaCurrent:null,ariaDescribedBy:Nn,ariaDetails:null,ariaDisabled:Mn,ariaDropEffect:Nn,ariaErrorMessage:null,ariaExpanded:Mn,ariaFlowTo:Nn,ariaGrabbed:Mn,ariaHasPopup:null,ariaHidden:Mn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Nn,ariaLevel:Ln,ariaLive:null,ariaModal:Mn,ariaMultiLine:Mn,ariaMultiSelectable:Mn,ariaOrientation:null,ariaOwns:Nn,ariaPlaceholder:null,ariaPosInSet:Ln,ariaPressed:Mn,ariaReadOnly:Mn,ariaRelevant:null,ariaRequired:Mn,ariaRoleDescription:Nn,ariaRowCount:Ln,ariaRowIndex:Ln,ariaRowSpan:Ln,ariaSelected:Mn,ariaSetSize:Ln,ariaSort:null,ariaValueMax:Ln,ariaValueMin:Ln,ariaValueNow:Ln,ariaValueText:null,role:null}}),Zn=Yn({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Xn,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rn,acceptCharset:Nn,accessKey:Nn,action:null,allow:null,allowFullScreen:Qn,allowPaymentRequest:Qn,allowUserMedia:Qn,alt:null,as:null,async:Qn,autoCapitalize:null,autoComplete:Nn,autoFocus:Qn,autoPlay:Qn,blocking:Nn,capture:null,charSet:null,checked:Qn,cite:null,className:Nn,cols:Ln,colSpan:null,content:null,contentEditable:Mn,controls:Qn,controlsList:Nn,coords:Ln|Rn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Qn,defer:Qn,dir:null,dirName:null,disabled:Qn,download:On,draggable:Mn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Qn,formTarget:null,headers:Nn,height:Ln,hidden:Qn,high:Ln,href:null,hrefLang:null,htmlFor:Nn,httpEquiv:Nn,id:null,imageSizes:null,imageSrcSet:null,inert:Qn,inputMode:null,integrity:null,is:null,isMap:Qn,itemId:null,itemProp:Nn,itemRef:Nn,itemScope:Qn,itemType:Nn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Qn,low:Ln,manifest:null,max:null,maxLength:Ln,media:null,method:null,min:null,minLength:Ln,multiple:Qn,muted:Qn,name:null,nonce:null,noModule:Qn,noValidate:Qn,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:Qn,optimum:Ln,pattern:null,ping:Nn,placeholder:null,playsInline:Qn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Qn,referrerPolicy:null,rel:Nn,required:Qn,reversed:Qn,rows:Ln,rowSpan:Ln,sandbox:Nn,scope:null,scoped:Qn,seamless:Qn,selected:Qn,shadowRootClonable:Qn,shadowRootDelegatesFocus:Qn,shadowRootMode:null,shape:null,size:Ln,sizes:null,slot:null,span:Ln,spellCheck:Mn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ln,step:null,style:null,tabIndex:Ln,target:null,title:null,translate:null,type:null,typeMustMatch:Qn,useMap:null,value:Mn,width:Ln,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Nn,axis:null,background:null,bgColor:null,border:Ln,borderColor:null,bottomMargin:Ln,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Qn,declare:Qn,event:null,face:null,frame:null,frameBorder:null,hSpace:Ln,leftMargin:Ln,link:null,longDesc:null,lowSrc:null,marginHeight:Ln,marginWidth:Ln,noResize:Qn,noHref:Qn,noShade:Qn,noWrap:Qn,object:null,profile:null,prompt:null,rev:null,rightMargin:Ln,rules:null,scheme:null,scrolling:Mn,standby:null,summary:null,text:null,topMargin:Ln,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ln,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Qn,disableRemotePlayback:Qn,prefix:null,property:null,results:Ln,security:null,unselectable:null}}),$n=Yn({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:Vn,properties:{about:jn,accentHeight:Ln,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ln,amplitude:Ln,arabicForm:null,ascent:Ln,attributeName:null,attributeType:null,azimuth:Ln,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ln,by:null,calcMode:null,capHeight:Ln,className:Nn,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:Ln,diffuseConstant:Ln,direction:null,display:null,dur:null,divisor:Ln,dominantBaseline:null,download:Qn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ln,enableBackground:null,end:null,event:null,exponent:Ln,externalResourcesRequired:null,fill:null,fillOpacity:Ln,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:Rn,g2:Rn,glyphName:Rn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ln,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ln,horizOriginX:Ln,horizOriginY:Ln,id:null,ideographic:Ln,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ln,k:Ln,k1:Ln,k2:Ln,k3:Ln,k4:Ln,kernelMatrix:jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ln,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:Ln,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:Ln,overlineThickness:Ln,paintOrder:null,panose1:null,path:null,pathLength:Ln,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Nn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ln,pointsAtY:Ln,pointsAtZ:Ln,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:jn,rev:jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:jn,requiredFeatures:jn,requiredFonts:jn,requiredFormats:jn,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:Ln,specularExponent:Ln,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ln,strikethroughThickness:Ln,string:null,stroke:null,strokeDashArray:jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ln,strokeOpacity:Ln,strokeWidth:null,style:null,surfaceScale:Ln,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:jn,tabIndex:Ln,tableValues:null,target:null,targetX:Ln,targetY:Ln,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ln,underlineThickness:Ln,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ln,values:null,vAlphabetic:Ln,vMathematical:Ln,vectorEffect:null,vHanging:Ln,vIdeographic:Ln,version:null,vertAdvY:Ln,vertOriginX:Ln,vertOriginY:Ln,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ln,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),er=/^data[-\w.:]+$/i,tr=/-[a-z]/g,nr=/[A-Z]/g;function rr(e){return"-"+e.toLowerCase()}function or(e){return e.charAt(1).toUpperCase()}const ir={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"},Ar=Dn([Wn,qn,Kn,Jn,Zn],"html"),ar=Dn([Wn,qn,Kn,Jn,$n],"svg");function sr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lr,cr,ur,dr={};var pr=function(){if(ur)return dr;ur=1;var e=dr&&dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dr,"__esModule",{value:!0}),dr.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(cr)return lr;cr=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,A=/^[;\s]*/,a=/^\s+|\s+$/g,s="";function l(e){return e?e.replace(a,s):s}return lr=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 p(e){var n=e.match(t);n&&(u+=n.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:u,column:d};return function(t){return t.position=new h(e),b(),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 p(n),a=a.slice(n.length),t}}function b(){m(n)}function y(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var e=f();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,p(n),a=a.slice(t),d+=2,e({type:"comment",comment:n})}}function w(){var t=f(),n=m(r);if(n){if(v(),!m(o))return g("property missing ':'");var a=m(i),c=t({type:"declaration",property:l(n[0].replace(e,s)),value:a?l(a[0].replace(e,s)):s});return m(A),c}}return h.prototype.content=a,b(),function(){var e,t=[];for(y(t);e=w();)!1!==e&&(t.push(e),y(t));return t}()},lr}());return dr}();const fr=sr(pr),hr=fr.default||fr,gr=br("end"),mr=br("start");function br(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 yr(e){return e&&"object"==typeof e?"position"in e||"type"in e?wr(e.position):"start"in e||"end"in e?wr(e):"line"in e||"column"in e?vr(e):"":""}function vr(e){return xr(e&&e.line)+":"+xr(e&&e.column)}function wr(e){return vr(e&&e.start)+"-"+vr(e&&e.end)}function xr(e){return e&&"number"==typeof e?e:1}class Er 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 A=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=A?A.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=A?A.line:void 0,this.name=yr(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}}Er.prototype.file="",Er.prototype.name="",Er.prototype.reason="",Er.prototype.message="",Er.prototype.stack="",Er.prototype.column=void 0,Er.prototype.line=void 0,Er.prototype.ancestors=void 0,Er.prototype.cause=void 0,Er.prototype.fatal=void 0,Er.prototype.place=void 0,Er.prototype.ruleId=void 0,Er.prototype.source=void 0;const kr={}.hasOwnProperty,Pr=new Map,Br=/[A-Z]/g,Cr=/-([a-z])/g,Dr=new Set(["table","tbody","thead","tfoot","tr"]),Sr=new Set(["td","th"]),Ir="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Tr(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 A=Array.isArray(o.children),a=mr(n);return t(r,o,i,A,{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 A=Array.isArray(o.children)?n:t;return i?A(r,o,i):A(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?ar:Ar,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=Qr(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Qr(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=ar,e.schema=o),e.ancestors.push(t);const i=Rr(e,t.tagName,!1),A=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&kr.call(t.properties,o)){const i=Nr(e,o,t.properties[o]);if(i){const[o,A]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof A&&Sr.has(t.tagName)?r=A:n[o]=A}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let a=Lr(e,t);return Dr.has(t.tagName)&&(a=a.filter((function(e){return"string"!=typeof e||!function(e){return"object"==typeof e?"text"===e.type&&Bn(e.value):Bn(e)}(e)}))),Mr(e,A,i,t),Or(A,a),e.ancestors.pop(),e.schema=r,e.create(t,i,A,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)}jr(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=ar,e.schema=o),e.ancestors.push(t);const i=null===t.name?e.Fragment:Rr(e,t.name,!0),A=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 jr(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 jr(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),a=Lr(e,t);return Mr(e,A,i,t),Or(A,a),e.ancestors.pop(),e.schema=r,e.create(t,i,A,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);jr(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Or(r,Lr(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 Mr(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Or(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Lr(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Pr;for(;++r<t.children.length;){const i=t.children[r];let A;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;A=e+"-"+t,o.set(e,t+1)}}const a=Qr(e,i,A);void 0!==a&&n.push(a)}return n}function Nr(e,t,n){const r=function(e,t){const n=Sn(t);let r=t,o=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&er.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(tr,or);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!tr.test(e)){let n=e.replace(nr,rr);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=Un}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{hr(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new Er("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=Ir+"#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(Cr,Fr)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)kr.call(e,n)&&(t[Hr(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?ir[r.property]||r.property:r.attribute,n]}}function Rr(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=kn(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=kn(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 kr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);jr(e)}function jr(e,t){const n=new Er("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=Ir+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Hr(e){let t=e.replace(Br,_r);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Fr(e,t){return t.toUpperCase()}function _r(e){return"-"+e.toLowerCase()}const Ur={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"]},zr={};function Gr(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 Yr(e.children,t,n)}return Array.isArray(e)?Yr(e,t,n):""}function Yr(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Gr(e[o],t,n);return r.join("")}const qr=document.createElement("i");function Wr(e){const t="&"+e+";";qr.innerHTML=t;const n=qr.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function Vr(e,t,n,r){const o=e.length;let i,A=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);A<r.length;)i=r.slice(A,A+1e4),i.unshift(t,0),e.splice(...i),A+=1e4,t+=1e4}function Xr(e,t){return e.length>0?(Vr(e,e.length,0,t),e):t}const Kr={}.hasOwnProperty;function Jr(e){const t={};let n=-1;for(;++n<e.length;)Zr(t,e[n]);return t}function Zr(e,t){let n;for(n in t){const r=(Kr.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){Kr.call(r,i)||(r[i]=[]);const e=o[i];$r(r[i],Array.isArray(e)?e:e?[e]:[])}}}function $r(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Vr(e,0,0,r)}function eo(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 to(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const no=ho(/[A-Za-z]/),ro=ho(/[\dA-Za-z]/),oo=ho(/[#-'*+\--9=?A-Z^-~]/);function io(e){return null!==e&&(e<32||127===e)}const Ao=ho(/\d/),ao=ho(/[\dA-Fa-f]/),so=ho(/[!-/:-@[-`{-~]/);function lo(e){return null!==e&&e<-2}function co(e){return null!==e&&(e<0||32===e)}function uo(e){return-2===e||-1===e||32===e}const po=ho(new RegExp("\\p{P}|\\p{S}","u")),fo=ho(/\s/);function ho(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function go(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let A="";if(37===i&&ro(e.charCodeAt(n+1))&&ro(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(A=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(A=String.fromCharCode(i,t),o=1):A="�"}else A=String.fromCharCode(i);A&&(t.push(e.slice(r,n),encodeURIComponent(A)),r=n+o+1,A=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function mo(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){return uo(r)?(e.enter(n),A(r)):t(r)};function A(r){return uo(r)&&i++<o?(e.consume(r),A):(e.exit(n),t(r))}}const bo={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"),mo(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)):lo(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const yo={tokenize:function(e){const t=this,n=[];let r,o,i,A=0;return a;function a(r){if(A<n.length){const o=n[A];return t.containerState=o[1],e.attempt(o[0].continuation,s,l)(r)}return l(r)}function s(e){if(A++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();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(A);let a=n;for(;a<t.events.length;)t.events[a][1].end={...o},a++;return Vr(t.events,i+1,0,t.events.slice(n)),t.events.length=a,l(e)}return a(e)}function l(o){if(A===n.length){if(!r)return d(o);if(r.currentConstruct&&r.currentConstruct.concrete)return f(o);t.interrupt=!(!r.currentConstruct||r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(vo,c,u)(o)}function c(e){return r&&b(),m(A),d(e)}function u(e){return t.parser.lazy[t.now().line]=A!==n.length,i=t.now().offset,f(e)}function d(n){return t.containerState={},e.attempt(vo,p,f)(n)}function p(e){return A++,n.push([t.currentConstruct,t.containerState]),d(e)}function f(n){return null===n?(r&&b(),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)):lo(n)?(e.consume(n),g(e.exit("chunkFlow")),A=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(A),e=n;e<t.events.length;)t.events[e][1].end={...a},e++;Vr(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 b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},vo={tokenize:function(e,t,n){return mo(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function wo(e){return null===e||co(e)||fo(e)?1:po(e)?2:void 0}function xo(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 Eo={name:"attention",resolveAll:function(e,t){let n,r,o,i,A,a,s,l,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};ko(u,-a),ko(d,a),i={type:a>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},A={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:{...A.end}},e[n][1].end={...i.start},e[c][1].start={...A.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=Xr(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=Xr(s,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),s=Xr(s,xo(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),s=Xr(s,[["exit",o,t],["enter",A,t],["exit",A,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(l=2,s=Xr(s,[["enter",e[c][1],t],["exit",e[c][1],t]])):l=0,Vr(e,n-1,c-n+3,s),c=n+s.length-l-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=wo(r);let i;return function(t){return i=t,e.enter("attentionSequence"),A(t)};function A(a){if(a===i)return e.consume(a),A;const s=e.exit("attentionSequence"),l=wo(a),c=!l||2===l&&o||n.includes(a),u=!o||2===o&&l||n.includes(r);return s._open=!!(42===i?c:c&&(o||!u)),s._close=!!(42===i?u:u&&(l||!c)),t(a)}}};function ko(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Po={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 no(t)?(e.consume(t),i):64===t?n(t):s(t)}function i(e){return 43===e||45===e||46===e||ro(e)?(r=1,A(e)):s(e)}function A(t){return 58===t?(e.consume(t),r=0,a):(43===t||45===t||46===t||ro(t))&&r++<32?(e.consume(t),A):(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||io(r)?n(r):(e.consume(r),a)}function s(t){return 64===t?(e.consume(t),l):oo(t)?(e.consume(t),s):n(t)}function l(e){return ro(e)?c(e):n(e)}function c(n){return 46===n?(e.consume(n),r=0,l):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||ro(t))&&r++<63){const n=45===t?u:c;return e.consume(t),n}return n(t)}}};const Bo={partial:!0,tokenize:function(e,t,n){return function(t){return uo(t)?mo(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||lo(e)?t(e):n(e)}}};const Co={continuation:{tokenize:function(e,t,n){const r=this;return function(t){return uo(t)?mo(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):o(t)};function o(r){return e.attempt(Co,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 uo(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Do={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 so(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const So={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,A=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=ro,l(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=ao,l):(e.enter("characterReferenceValue"),o=7,i=Ao,l(t))}function l(a){if(59===a&&A){const o=e.exit("characterReferenceValue");return i!==ro||Wr(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(a),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(a)}return i(a)&&A++<o?(e.consume(a),l):n(a)}}};const Io={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)}}},To={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return A;function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s}function s(t){return e.enter("codeFencedFence"),uo(t)?mo(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(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"),uo(t)?mo(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||lo(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,A=0,a=0;return function(t){return function(t){const n=r.events[r.events.length-1];return A=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"),uo(t)?mo(e,l,"whitespace")(t):l(t))}function l(n){return null===n||lo(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Io,p,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),c(n))}function c(t){return null===t||lo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(t)):uo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),mo(e,u,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),c)}function u(t){return null===t||lo(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),d(t))}function d(t){return null===t||lo(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(t)):96===t&&t===i?n(t):(e.consume(t),d)}function p(t){return e.attempt(o,b,f)(t)}function f(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return A>0&&uo(t)?mo(e,g,"linePrefix",A+1)(t):g(t)}function g(t){return null===t||lo(t)?e.check(Io,p,b)(t):(e.enter("codeFlowValue"),m(t))}function m(t){return null===t||lo(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),m)}function b(n){return e.exit("codeFenced"),t(n)}}};const Qo={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),mo(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):lo(t)?e.attempt(Mo,i,a)(t):(e.enter("codeFlowValue"),A(t))}function A(t){return null===t||lo(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),A)}function a(n){return e.exit("codeIndented"),t(n)}}},Mo={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):lo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):mo(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):lo(e)?o(e):n(e)}}};const Oo={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"),A(t)};function A(t){return 96===t?(e.consume(t),i++,A):(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,l(t)):lo(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||lo(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),s)}function l(n){return 96===n?(e.consume(n),r++,l):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",s(n))}}};class Lo{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&&No(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),No(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),No(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);No(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);No(this.left,t.reverse())}}}function No(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 Ro(e){const t={};let n,r,o,i,A,a,s,l=-1;const c=new Lo(e);for(;++l<c.length;){for(;l in t;)l=t[l];if(n=c.get(l),l&&"chunkFlow"===n[1].type&&"listItemPrefix"===c.get(l-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,jo(c,l)),l=t[l],s=!0);else if(n[1]._container){for(o=l,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},A=c.slice(r,l),A.unshift(n),c.splice(r,l-r+1,A))}}return Vr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!s}function jo(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],A=n._tokenizer||r.parser[n.contentType](n.start),a=A.events,s=[],l={};let c,u,d=-1,p=n,f=0,h=0;const g=[h];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),u&&A.defineSkip(p.start),p._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=!0),A.write(c),p._isInFirstContentOfListItem&&(A._gfmTasklistFirstContentOfListItem=void 0)),u=p,p=p.next}for(p=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),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(A.events=[],p?(p._tokenizer=void 0,p.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;)l[f+s[d][0]]=f+s[d][1],f+=s[d][1]-s[d][0]-1;return l}const Ho={resolve:function(e){return Ro(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):lo(t)?e.check(Fo,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}}},Fo={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"),mo(e,o,"linePrefix")};function o(o){if(null===o||lo(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 _o(e,t,n,r,o,i,A,a,s){const l=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||io(t)?n(t):(e.enter(r),e.enter(A),e.enter(a),e.enter("chunkString",{contentType:"string"}),f(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||lo(t)?n(t):(e.consume(t),92===t?p:d)}function p(t){return 60===t||62===t||92===t?(e.consume(t),d):d(t)}function f(o){return c||null!==o&&41!==o&&!co(o)?c<l&&40===o?(e.consume(o),c++,f):41===o?(e.consume(o),c--,f):null===o||32===o||40===o||io(o)?n(o):(e.consume(o),92===o?h:f):(e.exit("chunkString"),e.exit(a),e.exit(A),e.exit(r),t(o))}function h(t){return 40===t||41===t||92===t?(e.consume(t),f):f(t)}}function Uo(e,t,n,r,o,i){const A=this;let a,s=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),l};function l(u){return s>999||null===u||91===u||93===u&&!a||94===u&&!s&&"_hiddenFootnoteSupport"in A.parser.constructs?n(u):93===u?(e.exit(i),e.enter(o),e.consume(u),e.exit(o),e.exit(r),t):lo(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),c(u))}function c(t){return null===t||91===t||93===t||lo(t)||s++>999?(e.exit("chunkString"),l(t)):(e.consume(t),a||(a=!uo(t)),92===t?u:c)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}}function zo(e,t,n,r,o,i){let A;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(o),e.consume(t),e.exit(o),A=40===t?41:t,a):n(t)};function a(n){return n===A?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),s(n))}function s(t){return t===A?(e.exit(i),a(A)):null===t?n(t):lo(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),mo(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(t))}function l(t){return t===A||null===t||lo(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?c:l)}function c(t){return t===A||92===t?(e.consume(t),l):l(t)}}function Go(e,t){let n;return function r(o){return lo(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):uo(o)?mo(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Yo={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return Uo.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=to(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),A):n(t)}function A(t){return co(t)?Go(e,a)(t):a(t)}function a(t){return _o(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(qo,l,l)(t)}function l(t){return uo(t)?mo(e,c,"whitespace")(t):c(t)}function c(i){return null===i||lo(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},qo={partial:!0,tokenize:function(e,t,n){return function(t){return co(t)?Go(e,r)(t):n(t)};function r(t){return zo(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return uo(t)?mo(e,i,"whitespace")(t):i(t)}function i(e){return null===e||lo(e)?t(e):n(e)}}};const Wo={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return lo(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Vo={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"},Vr(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||co(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),A(n)):null===n||lo(n)?(e.exit("atxHeading"),t(n)):uo(n)?mo(e,i,"whitespace")(n):(e.enter("atxHeadingText"),a(n))}function A(t){return 35===t?(e.consume(t),A):(e.exit("atxHeadingSequence"),i(t))}function a(t){return null===t||35===t||co(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),a)}}};const Xo=["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"],Ko=["pre","script","style","textarea"],Jo={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,A,a,s;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),l}(t)};function l(a){return 33===a?(e.consume(a),c):47===a?(e.consume(a),i=!0,p):63===a?(e.consume(a),o=3,r.interrupt?t:O):no(a)?(e.consume(a),A=String.fromCharCode(a),f):n(a)}function c(i){return 45===i?(e.consume(i),o=2,u):91===i?(e.consume(i),o=5,a=0,d):no(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:B:d):n(o)}function p(t){return no(t)?(e.consume(t),A=String.fromCharCode(t),f):n(t)}function f(a){if(null===a||47===a||62===a||co(a)){const s=47===a,l=A.toLowerCase();return s||i||!Ko.includes(l)?Xo.includes(A.toLowerCase())?(o=6,s?(e.consume(a),h):r.interrupt?t(a):B(a)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(a):i?g(a):m(a)):(o=1,r.interrupt?t(a):B(a))}return 45===a||ro(a)?(e.consume(a),A+=String.fromCharCode(a),f):n(a)}function h(o){return 62===o?(e.consume(o),r.interrupt?t:B):n(o)}function g(t){return uo(t)?(e.consume(t),g):k(t)}function m(t){return 47===t?(e.consume(t),k):58===t||95===t||no(t)?(e.consume(t),b):uo(t)?(e.consume(t),m):k(t)}function b(t){return 45===t||46===t||58===t||95===t||ro(t)?(e.consume(t),b):y(t)}function y(t){return 61===t?(e.consume(t),v):uo(t)?(e.consume(t),y):m(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,w):uo(t)?(e.consume(t),v):x(t)}function w(t){return t===s?(e.consume(t),s=null,E):null===t||lo(t)?n(t):(e.consume(t),w)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||co(t)?y(t):(e.consume(t),x)}function E(e){return 47===e||62===e||uo(e)?m(e):n(e)}function k(t){return 62===t?(e.consume(t),P):n(t)}function P(t){return null===t||lo(t)?B(t):uo(t)?(e.consume(t),P):n(t)}function B(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):!lo(t)||6!==o&&7!==o?null===t||lo(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),B):(e.exit("htmlFlowData"),e.check(Zo,N,C)(t))}function C(t){return e.check($o,D,N)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),S}function S(t){return null===t||lo(t)?C(t):(e.enter("htmlFlowData"),B(t))}function I(t){return 45===t?(e.consume(t),O):B(t)}function T(t){return 47===t?(e.consume(t),A="",Q):B(t)}function Q(t){if(62===t){const n=A.toLowerCase();return Ko.includes(n)?(e.consume(t),L):B(t)}return no(t)&&A.length<8?(e.consume(t),A+=String.fromCharCode(t),Q):B(t)}function M(t){return 93===t?(e.consume(t),O):B(t)}function O(t){return 62===t?(e.consume(t),L):45===t&&2===o?(e.consume(t),O):B(t)}function L(t){return null===t||lo(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),L)}function N(n){return e.exit("htmlFlow"),t(n)}}},Zo={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Bo,t,n)}}},$o={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return lo(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 ei={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,A;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),v):63===t?(e.consume(t),b):no(t)?(e.consume(t),E):n(t)}function s(t){return 45===t?(e.consume(t),l):91===t?(e.consume(t),i=0,p):no(t)?(e.consume(t),m):n(t)}function l(t){return 45===t?(e.consume(t),d):n(t)}function c(t){return null===t?n(t):45===t?(e.consume(t),u):lo(t)?(A=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 p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?f:p):n(t)}function f(t){return null===t?n(t):93===t?(e.consume(t),h):lo(t)?(A=f,Q(t)):(e.consume(t),f)}function h(t){return 93===t?(e.consume(t),g):f(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):f(t)}function m(t){return null===t||62===t?T(t):lo(t)?(A=m,Q(t)):(e.consume(t),m)}function b(t){return null===t?n(t):63===t?(e.consume(t),y):lo(t)?(A=b,Q(t)):(e.consume(t),b)}function y(e){return 62===e?T(e):b(e)}function v(t){return no(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||ro(t)?(e.consume(t),w):x(t)}function x(t){return lo(t)?(A=x,Q(t)):uo(t)?(e.consume(t),x):T(t)}function E(t){return 45===t||ro(t)?(e.consume(t),E):47===t||62===t||co(t)?k(t):n(t)}function k(t){return 47===t?(e.consume(t),T):58===t||95===t||no(t)?(e.consume(t),P):lo(t)?(A=k,Q(t)):uo(t)?(e.consume(t),k):T(t)}function P(t){return 45===t||46===t||58===t||95===t||ro(t)?(e.consume(t),P):B(t)}function B(t){return 61===t?(e.consume(t),C):lo(t)?(A=B,Q(t)):uo(t)?(e.consume(t),B):k(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,D):lo(t)?(A=C,Q(t)):uo(t)?(e.consume(t),C):(e.consume(t),S)}function D(t){return t===o?(e.consume(t),o=void 0,I):null===t?n(t):lo(t)?(A=D,Q(t)):(e.consume(t),D)}function S(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||co(t)?k(t):(e.consume(t),S)}function I(e){return 47===e||62===e||co(e)?k(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 uo(t)?mo(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),A(t)}}};const ti={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&&Vr(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,o,i,A=e.length,a=0;for(;A--;)if(n=e[A][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[A][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[A][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=A,"labelLink"!==n.type)){a=2;break}}else"labelEnd"===n.type&&(o=A);const s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},l={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",l,t]],i=Xr(i,e.slice(r+1,r+a+3)),i=Xr(i,[["enter",c,t]]),i=Xr(i,xo(t.parser.constructs.insideSpan.null,e.slice(r+a+4,o-3),t)),i=Xr(i,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),i=Xr(i,e.slice(o+1)),i=Xr(i,[["exit",s,t]]),Vr(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,A=r.events.length;for(;A--;)if(("labelImage"===r.events[A][1].type||"labelLink"===r.events[A][1].type)&&!r.events[A][1]._balanced){o=r.events[A][1];break}return function(t){return o?o._inactive?c(t):(i=r.parser.defined.includes(to(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(ni,l,i?l:c)(t):91===t?e.attempt(ri,l,i?s:c)(t):i?l(t):c(t)}function s(t){return e.attempt(oi,l,c)(t)}function l(e){return t(e)}function c(e){return o._balanced=!0,n(e)}}},ni={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 co(t)?Go(e,o)(t):o(t)}function o(t){return 41===t?l(t):_o(e,i,A,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return co(t)?Go(e,a)(t):l(t)}function A(e){return n(e)}function a(t){return 34===t||39===t||40===t?zo(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):l(t)}function s(t){return co(t)?Go(e,l)(t):l(t)}function l(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},ri={tokenize:function(e,t,n){const r=this;return function(t){return Uo.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(to(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},oi={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 ii={name:"labelStartImage",resolveAll:ti.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 Ai={name:"labelStartLink",resolveAll:ti.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 ai={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),mo(e,t,"linePrefix")}}};const si={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"),A(i)):o>=3&&(null===i||lo(i))?(e.exit("thematicBreak"),t(i)):n(i)}function A(t){return t===r?(e.consume(t),o++,A):(e.exit("thematicBreakSequence"),uo(t)?mo(e,i,"whitespace")(t):i(t))}}};const li={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Bo,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,mo(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!uo(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(ui,t,o)(n))}));function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,mo(e,e.attempt(li,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,A=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:Ao(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(si,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 Ao(t)&&++A<10?(e.consume(t),a):(!r.interrupt||A<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(Bo,r.interrupt?n:l,e.attempt(ci,u,c))}function l(e){return r.containerState.initialBlankLine=!0,i++,u(e)}function c(t){return uo(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)}}},ci={partial:!0,tokenize:function(e,t,n){const r=this;return mo(e,(function(e){const o=r.events[r.events.length-1];return!uo(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},ui={partial:!0,tokenize:function(e,t,n){const r=this;return mo(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 di={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 A={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",A,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=A,e.push(["exit",A,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let A,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){A="paragraph"===r.events[a][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!A?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"),uo(t)?mo(e,A,"lineSuffix")(t):A(t))}function A(r){return null===r||lo(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const pi={tokenize:function(e){const t=this,n=e.attempt(Bo,(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,mo(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Ho,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 fi={resolveAll:bi()},hi=mi("string"),gi=mi("text");function mi(e){return{resolveAll:bi("text"===e?yi:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,A);return i;function i(e){return s(e)?o(e):A(e)}function A(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 bi(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 yi(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,A=o.length,a=-1,s=0;for(;A--;){const e=o[A];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){A++;break}}if(s){const o={type:n===e.length||i||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:A?a:r.start._bufferIndex+a,_index:r.start._index+A,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 vi={42:li,43:li,45:li,48:li,49:li,50:li,51:li,52:li,53:li,54:li,55:li,56:li,57:li,62:Co},wi={91:Yo},xi={[-2]:Qo,[-1]:Qo,32:Qo},Ei={35:Vo,42:si,45:[di,si],60:Jo,61:di,95:si,96:To,126:To},ki={38:So,92:Do},Pi={[-5]:ai,[-4]:ai,[-3]:ai,33:ii,38:So,42:Eo,60:[Po,ei],91:Ai,92:[Wo,Do],93:ti,95:Eo,96:Oo},Bi={null:[Eo,fi]},Ci=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wi,disable:{null:[]},document:vi,flow:Ei,flowInitial:xi,insideSpan:Bi,string:ki,text:Pi},Symbol.toStringTag,{value:"Module"}));function Di(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 A=[],a=[];const s={attempt:h((function(e,t){g(e,t.from)})),check:h(f),consume:function(e){lo(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===A[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=d(),l.events.push(["enter",n,l]),a.push(n),n},exit:function(e){const t=a.pop();return t.end=d(),l.events.push(["exit",t,l]),t},interrupt:h(f,{interrupt:!0})},l={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 A;if("string"==typeof i)A=i;else switch(i){case-5:A="\r";break;case-4:A="\n";break;case-3:A="\r\n";break;case-2:A=t?" ":"\t";break;case-1:if(!t&&o)continue;A=" ";break;default:A=String.fromCharCode(i)}o=-2===i,r.push(A)}return r.join("")}(u(e),t)},sliceStream:u,write:function(e){return A=Xr(A,e),function(){let e;for(;r._index<A.length;){const t=A[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)}}(),null!==A[A.length-1]?[]:(g(t,0),l.events=xo(i,l.events,l),l.events)}};let c=t.tokenize.call(l,s);return t.resolveAll&&i.push(t),l;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 A;if(n===o)A=[e[n].slice(r,i)];else{if(A=e.slice(n,o),r>-1){const e=A[0];"string"==typeof e?A[0]=e.slice(r):A.shift()}i>0&&A.push(e[o].slice(0,i))}return A}(A,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 p(e){c=c(e)}function f(e,t){t.restore()}function h(e,t){return function(n,o,i){let A,c,u,p;return Array.isArray(n)?f(n):"tokenize"in n?f([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function f(e){return A=e,c=0,0===e.length?i:h(e[c])}function h(e){return function(n){return p=function(){const e=d(),t=l.previous,n=l.currentConstruct,o=l.events.length,i=Array.from(a);return{from:o,restore:A};function A(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=o,a=i,m()}}(),u=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?b():e.tokenize.call(t?Object.assign(Object.create(l),t):l,s,g,b)(n)}}function g(t){return e(u,p),o}function b(e){return p.restore(),++c<A.length?h(A[c]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&Vr(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function m(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const Si=/[\0\t\n\r]/g;const Ii=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ti(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return eo(n.slice(t?2:1),t?16:10)}return Wr(n)||e}const Qi={}.hasOwnProperty;function Mi(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(q),characterEscape:P,characterReference:P,codeFenced:i(W),codeFencedFenceInfo:A,codeFencedFenceMeta:A,codeIndented:i(W,A),codeText:i(V,A),codeTextData:P,data:P,codeFlowValue:P,definition:i(X),definitionDestinationString:A,definitionLabelString:A,definitionTitleString:A,emphasis:i(K),hardBreakEscape:i(Z),hardBreakTrailing:i(Z),htmlFlow:i($,A),htmlFlowData:P,htmlText:i($,A),htmlTextData:P,image:i(ee),label:A,link:i(te),listItem:i(re),listItemValue:d,listOrdered:i(ne,u),listUnordered:i(ne),paragraph:i(oe),reference:H,referenceString:A,resourceDestinationString:A,resourceTitleString:A,setextHeading:i(J),strong:i(ie),thematicBreak:i(ae)},exit:{atxHeading:s(),atxHeadingSequence:w,autolink:s(),autolinkEmail:Y,autolinkProtocol:G,blockQuote:s(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:_,characterReferenceMarkerNumeric:_,characterReferenceValue:U,characterReference:z,codeFenced:s(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:f,codeFlowValue:B,codeIndented:s(m),codeText:s(T),codeTextData:B,data:B,definition:s(),definitionDestinationString:v,definitionLabelString:b,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(D),hardBreakTrailing:s(D),htmlFlow:s(S),htmlFlowData:B,htmlText:s(I),htmlTextData:B,image:s(M),label:L,labelText:O,lineEnding:C,link:s(Q),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:F,resourceDestinationString:N,resourceTitleString:R,resource:j,setextHeading:s(k),setextHeadingLineSequence:E,setextHeadingText:x,strong:s(),thematicBreak:s()}};Li(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:l,buffer:A,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]];Qi.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]||Ri).call(i,void 0,e[0])}for(r.position={start:Oi(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Oi(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,A,a=t-1,s=-1,l=!1;for(;++a<=n;){const t=e[a];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,A=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(r&&!A&&!s&&!i&&(i=a),A=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:A=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 A=a;for(o=void 0;A--;){const t=e[A];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",l=!0),t[1].type="lineEnding",o=A}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,A=!0}}}return e[t][1]._spread=l,n}function i(e,t){return n;function n(n){a.call(this,e(n),n),t&&t.call(this,n)}}function A(){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:Oi(t.start),end:void 0}}function s(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): it’s not open");r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Ri).call(this,e,r[0])),n.position.end=Oi(e.end)}function c(){return function(e){const t=zr;return Gr(e,"boolean"!=typeof t.includeImageAlt||t.includeImageAlt,"boolean"!=typeof t.includeHtml||t.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 p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function f(){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 b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=to(this.sliceSerialize(e)).toLowerCase()}function y(){const e=this.resume();this.stack[this.stack.length-1].title=e}function v(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function x(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function k(){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=Ae(),n.position={start:Oi(e.start),end:void 0},t.push(n)),this.stack.push(n)}function B(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Oi(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Oi(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(P.call(this,e),B.call(this,e))}function D(){this.data.atHardBreak=!0}function S(){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(Ii,Ti)}(t),n.identifier=to(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 j(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=to(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function _(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=eo(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=Wr(t);this.stack[this.stack.length-1].value+=r}function z(e){this.stack.pop().position.end=Oi(e.end)}function G(e){B.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function Y(e){B.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){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 oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function ae(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Ro(e););return e}(function(e){const t={constructs:Jr([Ci,...(e||{}).extensions||[]]),content:n(bo),defined:[],document:n(yo),flow:n(pi),lazy:{},string:n(hi),text:n(gi)};return t;function n(e){return function(n){return Di(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,A){const a=[];let s,l,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(Si.lastIndex=c,s=Si.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(l=4*Math.ceil(t/4),a.push(-2);t++<l;)a.push(-1);break;case 10:a.push(-4),t=1;break;default:e=!0,t=1}c=u+1}return A&&(e&&a.push(-5),n&&a.push(n),a.push(null)),a}}()(e,t,!0))))}function Oi(e){return{line:e.line,column:e.column,offset:e.offset}}function Li(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Li(e,r):Ni(e,r)}}function Ni(e,t){let n;for(n in t)if(Qi.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 Ri(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+yr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+yr({start:t.start,end:t.end})+") is still open")}function ji(e){const t=this;t.parser=function(n){return Mi(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Hi(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 A=o[o.length-1];return A&&"text"===A.type?A.value+=r:o.push({type:"text",value:r}),o}function Fi(e){return e.spread??e.children.length>1}const _i=9,Ui=32;function zi(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Gi(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Gi(t.slice(o),o>0,!1)),i.join("")}function Gi(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;t===_i||t===Ui;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;t===_i||t===Ui;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const Yi={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=go(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let A,a=e.footnoteCounts.get(r);void 0===a?(a=0,e.footnoteOrder.push(r),A=e.footnoteOrder.length):A=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(A)}]};e.patch(t,s);const l={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,l),e.applyData(t,l)},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 Hi(e,t);const o={src:go(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:go(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 Hi(e,t);const o={href:go(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:go(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=Fi(n[r])}return t}(n):Fi(t),i={},A=[];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)&&A.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?A.push(e):A.push(...e.children)}const s=r[r.length-1];s&&(o||"element"!==s.type||"p"!==s.tagName)&&A.push({type:"text",value:"\n"});const l={type:"element",tagName:"li",properties:i,children:A};return e.patch(t,l),e.applyData(t,l)},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=mr(t.children[1]),A=gr(t.children[t.children.length-1]);i&&A&&(r.position={start:i,end:A}),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,A=i?i.length:t.children.length;let a=-1;const s=[];for(;++a<A;){const n=t.children[a],r={},A=i?i[a]:void 0;A&&(r.align=A);let l={type:"element",tagName:o,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),s.push(l)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)},text:function(e,t){const n={type:"text",value:zi(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:qi,yaml:qi,definition:qi,footnoteDefinition:qi};function qi(){}const Wi="object"==typeof self?self:globalThis,Vi=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,A]=t[o];switch(i){case 0:case-1:return n(A,o);case 1:{const e=n([],o);for(const t of A)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of A)e[r(t)]=r(n);return e}case 3:return n(new Date(A),o);case 4:{const{source:e,flags:t}=A;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of A)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of A)e.add(r(t));return e}case 7:{const{name:e,message:t}=A;return n(new Wi[e](t),o)}case 8:return n(BigInt(A),o);case"BigInt":return n(Object(BigInt(A)),o);case"ArrayBuffer":return n(new Uint8Array(A).buffer,A);case"DataView":{const{buffer:e}=new Uint8Array(A);return n(new DataView(e),A)}}return n(new Wi[i](A),o)};return r})(new Map,e)(0),Xi="",{toString:Ki}={},{keys:Ji}=Object,Zi=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Ki.call(e).slice(8,-1);switch(n){case"Array":return[1,Xi];case"Object":return[2,Xi];case"Date":return[3,Xi];case"RegExp":return[4,Xi];case"Map":return[5,Xi];case"Set":return[6,Xi];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},$i=([e,t])=>0===e&&("function"===t||"symbol"===t),eA=(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[A,a]=Zi(r);switch(A){case 0:{let t=r;switch(a){case"bigint":A=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([A,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([A,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([A,n],r);for(const t of Ji(r))(e||!$i(Zi(r[t])))&&n.push([i(t),i(r[t])]);return s}case 3:return o([A,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([A,{source:e,flags:t}],r)}case 5:{const t=[],n=o([A,t],r);for(const[n,o]of r)(e||!$i(Zi(n))&&!$i(Zi(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([A,t],r);for(const n of r)(e||!$i(Zi(n)))&&t.push(i(n));return n}}const{message:s}=r;return o([A,{name:a,message:s}],r)};return i})(!(t||n),!!t,new Map,r)(e),r},tA="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Vi(eA(e,t)):structuredClone(e):(e,t)=>Vi(eA(e,t));function nA(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 rA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const oA=function(e){if(null==e)return AA;if("function"==typeof e)return iA(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=oA(e[n]);return iA(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 iA(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 iA(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function iA(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 AA(){return!0}const aA=[],sA=!0,lA=!1,cA="skip";function uA(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=oA(o),A=r?-1:1;!function e(o,a,s){const l=o&&"object"==typeof o?o:{};if("string"==typeof l.type){const e="string"==typeof l.tagName?l.tagName:"string"==typeof l.name?l.name:void 0;Object.defineProperty(c,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return c;function c(){let l,c,u,d=aA;if((!t||i(o,a,s[s.length-1]||void 0))&&(d=function(e){return Array.isArray(e)?e:"number"==typeof e?[sA,e]:null==e?aA:[e]}(n(o,s)),d[0]===lA))return d;if("children"in o&&o.children){const t=o;if(t.children&&d[0]!==cA)for(c=(r?t.children.length:-1)+A,u=s.concat(t);c>-1&&c<t.children.length;){const n=t.children[c];if(l=e(n,c,u)(),l[0]===lA)return l;c="number"==typeof l[1]?l[1]:c+A}}return d}}(e,void 0,[])()}function dA(e,t,n,r){let o,i,A;"function"==typeof t?(i=void 0,A=t,o=n):(i=t,A=n,o=r),uA(e,i,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return A(e,r,n)}),o)}const pA={}.hasOwnProperty,fA={};function hA(e,t){const n=t||fA,r=new Map,o=new Map,i=new Map,A={...Yi,...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=vA(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=vA(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:mA,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:A,one:function(e,t){const n=e.type,r=a.handlers[n];if(pA.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=tA(n);return r.children=a.all(e),r}return tA(e)}return(a.options.unknownHandler||bA)(a,e,t)},options:n,patch:gA,wrap:yA};return dA(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 gA(e,t){e.position&&(t.position=function(e){const t=mr(e),n=gr(e);if(t&&n)return{start:t,end:n}}(e))}function mA(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,tA(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function bA(e,t){const n=t.data||{},r=!("value"in t)||pA.call(n,"hProperties")||pA.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 yA(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 vA(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function wA(e,t){const n=hA(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||nA,r=e.options.footnoteBackLabel||rA,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",A=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),A=String(o.identifier).toUpperCase(),l=go(A.toLowerCase());let c=0;const u=[],d=e.footnoteCounts.get(A);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-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...u)}else i.push(...u);const f={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(i,!0)};e.patch(o,f),a.push(f)}if(0!==a.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...tA(A),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 xA(e,t){return e&&"run"in e?async function(n,r){const o=wA(n,{file:r,...t});await e.run(o,r)}:function(n,r){return wA(n,{file:r,...e||t})}}function EA(e){if(e)throw e}var kA,PA;var BA=function(){if(PA)return kA;PA=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)},A=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 kA=function e(){var t,n,r,s,l,c,u=arguments[0],d=1,p=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},d=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});d<p;++d)if(null!=(t=arguments[d]))for(n in t)r=a(u,n),u!==(s=a(t,n))&&(f&&s&&(i(s)||(l=o(s)))?(l?(l=!1,c=r&&o(r)?r:[]):c=r&&i(r)?r:{},A(u,{name:n,newValue:e(f,c,s)})):typeof s<"u"&&A(u,{name:n,newValue:s}));return u},kA}();const CA=sr(BA);function DA(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 SA(){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,...A){const a=e[++n];let s=-1;if(i)r(i);else{for(;++s<t.length;)(null===A[s]||void 0===A[s])&&(A[s]=t[s]);t=A,a?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let A;r&&t.push(o);try{A=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(A&&A.then&&"function"==typeof A.then?A.then(i,o):A instanceof Error?o(A):i(A))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(a,o)(...A):r(null,...A)}}(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 IA={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');TA(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 A=-1,a=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else A<0&&(n=!0,A=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(o=i):(a=-1,o=A));return r===o?o=A:o<0&&(o=e.length),e.slice(r,o)},dirname:function(e){if(TA(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){TA(e);let t,n=e.length,r=-1,o=0,i=-1,A=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!==A&&(A=1):i>-1&&(A=-1);else if(t){o=n+1;break}}return i<0||r<0||0===A||1===A&&i===r-1&&i===o+1?"":e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)TA(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){TA(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,A=-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(A!==s-1&&1!==a)if(A!==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("/")),A=s,a=0;continue}}else if(o.length>0){o="",i=0,A=s,a=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(A+1,s):o=e.slice(A+1,s),i=s-A-1;A=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 TA(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QA={cwd:function(){return"/"}};function MA(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function OA(e){if("string"==typeof e)e=new URL(e);else if(!MA(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 LA=["history","path","basename","stem","extname","dirname"];class NA{constructor(e){let t;var n;t=e?MA(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?"":QA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r,o=-1;for(;++o<LA.length;){const e=LA[o];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(r in t)LA.includes(r)||(this[r]=t[r])}get basename(){return"string"==typeof this.path?IA.basename(this.path):void 0}set basename(e){jA(e,"basename"),RA(e,"basename"),this.path=IA.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?IA.dirname(this.path):void 0}set dirname(e){HA(this.basename,"dirname"),this.path=IA.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?IA.extname(this.path):void 0}set extname(e){if(RA(e,"extname"),HA(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=IA.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){MA(e)&&(e=OA(e)),jA(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?IA.basename(this.path,this.extname):void 0}set stem(e){jA(e,"stem"),RA(e,"stem"),this.path=IA.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 Er(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 RA(e,t){if(e&&e.includes(IA.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+IA.sep+"`")}function jA(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function HA(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const FA=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},_A={}.hasOwnProperty;class UA extends FA{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=SA()}copy(){const e=new UA;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(CA(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(qA("data",this.frozen),this.namespace[e]=t,this):_A.call(this.namespace,e)&&this.namespace[e]||void 0:e?(qA("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=XA(e),n=this.parser||this.Parser;return GA("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),GA("process",this.parser||this.Parser),YA("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=XA(e),A=n.parse(i);function a(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(A,i,(function(e,t,r){if(e||!t||!r)return a(e);const o=t,i=n.stringify(o,r);var A;"string"==typeof(A=i)||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(A)?r.value=i:r.result=i,a(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),GA("processSync",this.parser||this.Parser),YA("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,EA(e),t=r})),VA("processSync","process",n),t}run(e,t,n){WA(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 A=XA(t);r.run(e,A,(function(t,r,A){const a=r||e;t?i(t):o?o(a):n(void 0,a,A)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){EA(e),n=t,r=!0})),VA("runSync","run",r),n}stringify(e,t){this.freeze();const n=XA(t),r=this.compiler||this.Compiler;return YA("stringify",r),WA(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(qA("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)?A(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");A(e.plugins),e.settings&&(r.settings=CA(!0,r.settings,e.settings))}function A(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 A=n[o][1];DA(A)&&DA(r)&&(r=CA(!0,A,r)),n[o]=[e,r,...i]}}}}const zA=(new UA).freeze();function GA(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function YA(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function qA(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 WA(e){if(!DA(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function VA(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function XA(e){return function(e){return!!(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new NA(e)}const KA=[],JA={allowDangerousHtml:!0},ZA=/^(https?|ircs?|mailto|xmpp)$/i,$A=[{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 ea(e){const t=e.allowedElements,r=e.allowElement,o=e.children||"",i=e.className,A=e.components,a=e.disallowedElements,s=e.rehypePlugins||KA,l=e.remarkPlugins||KA,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...JA}:JA,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||ta,f=zA().use(ji).use(l).use(xA,c).use(s),h=new NA;"string"==typeof o&&(h.value=o);for(const t of $A)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const g=f.parse(h);let m=f.runSync(g,h);return i&&(m={type:"element",tagName:"div",properties:{className:i},children:"root"===m.type?m.children:[m]}),dA(m,(function(e,n,o){if("raw"===e.type&&o&&"number"==typeof n)return u?o.children.splice(n,1):o.children[n]={type:"text",value:e.value},n;if("element"===e.type){let t;for(t in Ur)if(Object.hasOwn(Ur,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ur[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&r&&"number"==typeof n&&(i=!r(e,n,o)),i&&o&&"number"==typeof n)return d&&e.children?o.children.splice(n,1,...e.children):o.children.splice(n,1),n}})),Tr(m,{Fragment:n.Fragment,components:A,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0})}function ta(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||ZA.test(e.slice(0,t))?e:""}const na=({children:e})=>n.jsx("div",{style:{whiteSpace:"normal"},children:n.jsx(ea,{components:{p:({...e})=>n.jsx("p",{style:{margin:0,marginBottom:"0.5em",lineHeight:1.4,textAlign:"left"},children:e.children}),ul:({...e})=>n.jsx("ul",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),ol:({...e})=>n.jsx("ol",{style:{paddingLeft:"clamp(8px, 3.5vw, 16px)",margin:0,listStylePosition:"inside"},children:e.children}),li:({...e})=>n.jsx("li",{style:{marginBottom:"1px",lineHeight:1.4},children:e.children}),code:({inline:e,children:t})=>e?n.jsx("code",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"2px 4px",borderRadius:"4px",fontFamily:"inherit",fontSize:"0.95em"},children:t}):n.jsx("pre",{style:{backgroundColor:"rgba(0, 0, 0, 0.3)",padding:"8px",borderRadius:"4px",overflowX:"auto",margin:"0.5em 0",whiteSpace:"pre-wrap"},children:n.jsx("code",{children:t})}),blockquote:({...e})=>n.jsx("blockquote",{style:{margin:0,paddingLeft:"10px",borderLeft:"2px solid #ccc",color:"#666",fontStyle:"italic"},children:e.children})},children:"string"==typeof e?e:""})}),ra={autoConfig:!0},oa=t=>()=>(t=>{const{getFlow:n}=Ft(),{messages:r,replaceMessages:o}=_t(),{settings:i}=zt(),{hasChatHistoryLoaded:A}=Gt(),a={...t,...ra},s=a.markdownComponent?a.markdownComponent:na;e.useEffect((()=>{var e,t;if(A){const n=[...r];for(let r=0;r<n.length&&r<((null==(e=i.chatHistory)?void 0:e.maxEntries)??30);r++){const e=n[r];null!=(t=e.tags)&&t.includes("rcb-markdown-renderer-plugin:parsed")&&(e.contentWrapper=s)}o(n)}}),[A]);const l=async e=>{var t;const r=null==(t=e.data.message)?void 0:t.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,n(),r)&&(e.data.message.contentWrapper=s,e.data.message.tags||(e.data.message.tags=[]),e.data.message.tags.push("rcb-markdown-renderer-plugin:parsed"))};Ut(R.PRE_INJECT_MESSAGE,l),Ut(R.CHUNK_STREAM_MESSAGE,l),Ut(R.START_STREAM_MESSAGE,l),Ut(R.START_SIMULATE_STREAM_MESSAGE,l);const c={name:"@rcb-plugins/markdown-renderer"};return null!=a&&a.autoConfig&&(c.settings={event:{rcbPreInjectMessage:!0,rcbChunkStreamMessage:!0,rcbStartSimulateStreamMessage:!0,rcbStartStreamMessage:!0}}),c})(t),ia={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"}},Aa=(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},aa=t=>{const{showToast:n}=(()=>{const{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}=Je();return{showToast:e,dismissToast:t,toasts:n,replaceToasts:r}})(),{getFlow:r}=Ft(),{styles:o,updateStyles:i,replaceStyles:A}=(()=>{const{styles:e,replaceStyles:t,updateStyles:n}=It();return{styles:e,replaceStyles:t,updateStyles:n}})(),a=(e=>({...ia,...e,promptBaseColors:{...ia.promptBaseColors},promptHoveredColors:{...ia.promptHoveredColors},textAreaHighlightColors:{...ia.textAreaHighlightColors}}))(t),[s,l]=e.useState(0),c=e.useRef({});Ut(R.USER_SUBMIT_TEXT,(e=>{const t=e,A=Aa(t,r(),"validateTextInput");if(!A)return;const u=A(t.data.inputText);if(null!=u&&u.success||e.preventDefault(),!u.promptContent)return;0===s&&(c.current=structuredClone(o));const d=((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})(u,a);i(d),n(u.promptContent,u.promptDuration??3e3),l((e=>e+1))})),Ut(R.USER_UPLOAD_FILE,(e=>{var t,o;const i=e,A=null==(o=null==(t=i.data)?void 0:t.files)?void 0:o[0];if(!A)return console.error("No file uploaded."),void e.preventDefault();const a=Aa(i,r(),"validateFileInput");if(!a)return void console.error("Validator not found for file input.");const s=a(A);if(!s.success)return console.error("Validation failed:",s),s.promptContent&&n(s.promptContent,s.promptDuration??3e3),void e.preventDefault();console.log("Validation successful:",s)})),Ut(R.DISMISS_TOAST,(()=>{l((e=>e-1))})),e.useEffect((()=>{0===s&&setTimeout((()=>{A(c.current)}))}),[s,A]);const u={name:"@rcb-plugins/input-validator"};return a.autoConfig&&(u.settings={event:{rcbUserSubmitText:!0,rcbUserUploadFile:!0,rcbDismissToast:!0}}),u},sa=[];for(let e=0;e<256;++e)sa.push((e+256).toString(16).slice(1));let la;const ca=new Uint8Array(16);var ua={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function da(e,t,n){if(ua.randomUUID&&!e)return ua.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!la){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");la=crypto.getRandomValues.bind(crypto)}return la(ca)}();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(sa[e[t+0]]+sa[e[t+1]]+sa[e[t+2]]+sa[e[t+3]]+"-"+sa[e[t+4]]+sa[e[t+5]]+"-"+sa[e[t+6]]+sa[e[t+7]]+"-"+sa[e[t+8]]+sa[e[t+9]]+"-"+sa[e[t+10]]+sa[e[t+11]]+sa[e[t+12]]+sa[e[t+13]]+sa[e[t+14]]+sa[e[t+15]]).toLowerCase()}(r)}const pa={LOGIN_URL:"/login",WELCOME_MESSAGE:"Hello! What can I help you with?",WELCOME_MESSAGE_LOGGED_OUT:"To ask questions, please log in.",WELCOME_MESSAGE_LOGIN_TRANSITION:"Welcome! You are now logged in. What can I help you with?",WELCOME_MESSAGE_LOGOUT_TRANSITION:"You have been logged out.",API_ENDPOINT:"https://access-ai.ccs.uky.edu/api/query",netlifyBaseUrl:"undefined"!=typeof process&&process.env?process.env.REACT_APP_NETLIFY_BASE_URL:"https://access-jsm-api.netlify.app",ERRORS:{API_UNAVAILABLE:"Unable to contact the Q&A Bot. Please try again later."},BEHAVIOR:{SHOW_RATING_AFTER_FAILED_QUERY:!0},THEME:{PRIMARY_COLOR:"#1a5b6e",SECONDARY_COLOR:"#107180",FONT_FAMILY:"Arial, sans-serif"},CHATBOT:{TITLE:"ACCESS Q&A",AVATAR_URL:"https://support.access-ci.org/themes/contrib/asp-theme/images/icons/ACCESS-arrrow.svg",TOOLTIP_TEXT:"Ask me about ACCESS! 😊"}},fa=(e,t)=>t||pa.WELCOME_MESSAGE,ha=e.forwardRef((({embedded:t,isBotLoggedIn:n,currentOpen:r},o)=>{const i=_t(),A=(()=>{const{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}=G();return{isChatWindowOpen:e,toggleChatWindow:t,toggleIsBotTyping:n,scrollToBottom:r,getIsChatBotVisible:o}})(),a=e.useRef(r),s=e.useRef(!1);return(t=>{const n=e.useRef(t),{injectMessage:r}=_t();e.useEffect((()=>{const e=n.current!==t,o=!n.current&&t;e&&r(o?pa.WELCOME_MESSAGE_LOGIN_TRANSITION:pa.WELCOME_MESSAGE_LOGOUT_TRANSITION,"bot"),n.current=t}),[t,r])})(n),e.useEffect((()=>{!t&&A&&A.toggleChatWindow&&(a.current===r||s.current||A&&A.toggleChatWindow&&(A.toggleChatWindow(r),a.current=r),s.current=!1)}),[r,t,A]),e.useEffect((()=>{const e=()=>{s.current=!0};o&&(o.current||(o.current={}),o.current._markAsUserInteraction=e)})),e.useImperativeHandle(o,(()=>({addMessage:e=>{i&&i.injectMessage&&i.injectMessage(e)}})),[i]),null}));ha.displayName="BotController";const ga=e.createContext(),ma=({children:t})=>{const[n,r]=e.useState({}),[o,i]=e.useState({}),A={ticketForm:n,feedbackForm:o,updateTicketForm:e=>{r((t=>({...t,...e})))},updateFeedbackForm:e=>{i((t=>({...t,...e})))},resetTicketForm:()=>{r({})},resetFeedbackForm:()=>{i({})},setTicketForm:r,setFeedbackForm:i};return e.createElement(ga.Provider,{value:A},t)},ba=()=>{const t=e.useContext(ga);if(!t)throw new Error("useFormContext must be used within a FormProvider");return t},ya=({width:t=24,height:n=24,color:r="currentColor",children:o,...i})=>e.createElement("svg",A({xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false"},i),o),va=t=>e.createElement(ya,t,e.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"})),wa=()=>{const{restartFlow:t}=Ft(),{resetTicketForm:n,resetFeedbackForm:r}=ba();return e.createElement("button",{onClick:()=>{n(),r(),t()},tabIndex:0,"aria-label":"New chat conversation",style:{backgroundColor:"#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="#0d5f6b"},onMouseLeave:e=>{e.target.style.backgroundColor="#107180"}},e.createElement(va,{width:16,height:16}),"New Chat")},xa=()=>e.createElement("div",{className:"user-login-icon",style:{alignItems:"center",justifyContent:"center",width:"30px",height:"30px",borderRadius:"50%",backgroundColor:"#1a5b6e",marginRight:"5px"},role:"img","aria-label":"User logged in",title:"User logged in"},e.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"},e.createElement("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),e.createElement("circle",{cx:"12",cy:"7",r:"4"}))),Ea=({loginUrl:t,className:n="",style:r,isHeaderButton:o=!1})=>{const i=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:"0.8",transition:"all 0.2s ease"}:{display:"inline-block",padding:"10px 20px",backgroundColor:"white",border:"1px solid #107180",color:"#107180",textDecoration:"none",borderRadius:"4px",fontWeight:"bold",textAlign:"center",margin:"18px",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"};return e.createElement(e.Fragment,null,o&&e.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 "),e.createElement("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:`qa-bot-login-button ${o?"qa-bot-header-login-button":""} ${n}`,style:{...i,...r}},"Log In"))},ka=(t,n,r)=>{const o=()=>{try{const e=localStorage.getItem("rcb-history");if(!e)return null;const t=JSON.parse(e);if(!Array.isArray(t))return null;let n=null,r=null;for(const e of t)if("USER"===e.sender){const t=new Date(e.timestamp).getTime();(!r||t>r)&&(r=t,n=e)}return n?n.id:null}catch(e){return console.warn("Error parsing chat history:",e),null}};return e.useCallback((async e=>{const{userInput:i}=e,A=o();A&&r(A);const a={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":t,"X-Session-ID":n,"X-Query-ID":A};try{const t={method:"POST",headers:a,body:JSON.stringify({query:i})},n=await fetch(pa.API_ENDPOINT,t),r=(await n.json()).response;return await e.streamMessage(r),!0}catch(t){return await e.injectMessage(pa.ERRORS.API_UNAVAILABLE),!1}}),[t,r,o,n])},Pa=()=>(e.useEffect((()=>{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 A=i.findIndex((e=>e===document.activeElement));switch(e.key){case"ArrowDown":case"ArrowRight":{let t;e.preventDefault(),t=A<i.length-1?A+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=A>0?A-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"),A=i&&i.style.backgroundColor?"checked":"unchecked";t(`${o} ${A}`)}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=Array.from(n.querySelectorAll(".rcb-message-container, .rcb-bot-message-container, .rcb-user-message-container")).filter((e=>null!==e.offsetParent));if(0===r.length)return;const o=r[r.length-1],i=Array.from(o.querySelectorAll(".rcb-options-container")).filter((e=>null!==e.offsetParent));let A=[];if(i.length>0){const e=i[i.length-1];A=Array.from(e.querySelectorAll(".rcb-options"))}if(0===A.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"),r=[...t];if(n&&null!==n.offsetParent&&r.push(n),r.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((()=>{r[0]&&null!==r[0].offsetParent&&r[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=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((()=>{A[0]&&null!==A[0].offsetParent&&(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),Ba=({fetchAndStreamResponse:e,sessionId:t,currentQueryId:n,apiKey:r})=>({go_ahead_and_ask:{message:"Please type your question.",path:"qa_loop"},qa_loop:{message:async t=>{try{return await e(t),"Was this helpful?"}catch(e){return console.error("Error in bot flow:",e),(e=>(console.error("Bot error:",e),e&&e.error||Error,pa.ERRORS.API_UNAVAILABLE))(e)}},renderMarkdown:["BOT"],options:["👍 Yes","👎 No"],chatDisabled:!1,function:async e=>{if(("👍 Yes"===e.userInput||"👎 No"===e.userInput)&&r&&t){const o="👍 Yes"===e.userInput,i={"Content-Type":"application/json","X-Origin":"access","X-API-KEY":r,"X-Session-ID":t,"X-Query-ID":n,"X-Feedback":o?1:0};try{await fetch(`${pa.API_ENDPOINT}/rating`,{method:"POST",headers:i})}catch(e){console.error("Error sending feedback:",e)}}},path:e=>"👍 Yes"===e.userInput?"qa_positive_feedback":"👎 No"===e.userInput?"qa_negative_feedback":"qa_loop"},qa_positive_feedback:{message:"Thank you for your feedback! It helps us improve this tool.",transition:{duration:1e3},path:"go_ahead_and_ask"},qa_negative_feedback:{message:"Sorry that wasn't useful. Would you like to open a help ticket for assistance?",options:["Open a help ticket","Ask another question"],chatDisabled:!0,path:e=>"Open a help ticket"===e.userInput?"help_ticket":"qa_continue"},qa_continue:{message:"Ask another question, but remember that each question must stand alone.",path:"qa_loop"}}),Ca=t=>e.createElement(ya,t,e.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.createElement("polyline",{points:"17 8 12 3 7 8"}),e.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"15"})),Da=({onFileUpload:t})=>{const[n,r]=e.useState(!1),[o,i]=e.useState([]),[A,a]=e.useState(null),s=e.useRef(null),{captureScreenshot:l,isCapturing:c,isScreenCaptureAvailable:u}=(()=>{const[t,n]=e.useState(!1),r=()=>"undefined"!=typeof navigator&&navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia;return{captureScreenshot:async()=>{if(!r())throw new Error("Screen capture is not available in this environment");try{n(!0);const e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",cursor:"always",logicalSurface:!0,width:{ideal:1920},height:{ideal:1080}},audio:!1}),t=document.createElement("video");t.srcObject=e,await new Promise((e=>{t.onloadedmetadata=()=>{t.play(),e()}}));const r=document.createElement("canvas");r.width=t.videoWidth,r.height=t.videoHeight,r.getContext("2d").drawImage(t,0,0,r.width,r.height);const o=await new Promise((e=>r.toBlob(e,"image/png"))),i=(new Date).toISOString().replace(/[:.]/g,"-"),A=new File([o],`screenshot-${i}.png`,{type:"image/png"});return e.getTracks().forEach((e=>e.stop())),n(!1),A}catch(e){throw console.error("Error capturing screenshot:",e),n(!1),e}},isCapturing:t,isScreenCaptureAvailable:r()}})(),d=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)},p=e=>{if(!e||!e.length||0===e.length)return void console.warn("FileUploadComponent: No valid files provided to handleFiles");let n;try{n=Array.from(e)}catch(e){return console.error("FileUploadComponent: Error converting files to array:",e),void d("Error processing selected files. Please try again.")}const r=[...o,...n];i(r);const A=n.length,a=n.map((e=>e.name)).join(", ");d(`${A} file${A>1?"s":""} selected: ${a}`),setTimeout((()=>{const e=document.querySelector(".rcb-chat-content");e&&(e.scrollTop=e.scrollHeight)}),100),t&&t(r)},f=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?r(!0):"dragleave"===e.type&&r(!1)},h=()=>{try{s.current&&s.current.click()}catch(e){console.error("FileUploadComponent: Error in handleButtonClick:",e),d("Error opening file selection dialog. Please try again.")}},g=()=>{a(null)};return e.createElement("div",{className:"file-upload-container",style:{padding:"16px",margin:"8px 0"}},u&&e.createElement("div",{style:{display:"flex",justifyContent:"center",marginBottom:"10px"}},e.createElement("button",{onClick:e=>{e.preventDefault(),(async()=>{try{const e=await l();p([e]),d("Screenshot captured successfully")}catch(e){d("Error capturing screenshot. Please try again.")}})()},disabled:c,"aria-describedby":"screenshot-help","aria-label":c?"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:c?"not-allowed":"pointer",fontSize:"14px",fontWeight:"500",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"}},e.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"},e.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"}),e.createElement("circle",{cx:"12",cy:"13",r:"4"})),c?"Taking screenshot...":"Take screenshot..."),e.createElement("span",{id:"screenshot-help",className:"sr-only"},"Captures the current screen and adds it as an attachment")),e.createElement("div",{className:"file-upload-dropzone "+(n?"active":""),onDragEnter:f,onDragLeave:f,onDragOver:f,onDrop:e=>{e.preventDefault(),e.stopPropagation(),r(!1);try{e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length>0&&p(e.dataTransfer.files)}catch(e){console.error("FileUploadComponent: Error in handleDrop:",e),d("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(),h())},style:{padding:"20px",border:"2px dashed #ccc",borderRadius:"8px",backgroundColor:n?"#f0f8ff":"#fafafa",transition:"all 0.3s ease"}},e.createElement("input",{ref:s,type:"file",className:"file-input",onChange:e=>{try{e.target&&e.target.files&&e.target.files.length>0&&p(e.target.files)}catch(e){console.error("FileUploadComponent: Error in handleFileSelect:",e),d("Error processing selected files. Please try again.")}},multiple:!0,style:{display:"none"},"aria-label":"Select files to upload",accept:"image/*,application/pdf,text/*,.doc,.docx"}),e.createElement("div",{className:"upload-content",onClick:h,style:{cursor:"pointer",flexDirection:"column",alignItems:"center",display:"flex",textAlign:"center",padding:"12px"}},e.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"10px"}},e.createElement(Ca,null),e.createElement("p",{style:{margin:0,fontWeight:"bold"}},"Upload Files")),e.createElement("p",{id:"upload-instructions",style:{margin:0,fontSize:"14px",color:"#666"}},"Drag and drop files here or click to select. Accepted: Images, PDFs, Text files (Max 10MB each)")),o.length>0&&e.createElement("div",{className:"selected-files",style:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"12px",alignItems:"center"}},e.createElement("span",{style:{fontWeight:400,color:"#888",fontSize:"13px",marginRight:"8px",alignSelf:"center"}},"Selected files:"),o.map(((n,r)=>e.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:e=>{e.stopPropagation(),(e=>{a(e)})(n)}},e.createElement("span",{onClick:e=>{e.stopPropagation(),(e=>{const n=o.filter(((t,n)=>n!==e));i(n),t&&t(n)})(r)},style:{cursor:"pointer",color:"#888",fontWeight:"bold",fontSize:"15px",marginRight:"4px",userSelect:"none",lineHeight:1},title:"Remove file","aria-label":`Remove ${n.name}`},"×"),n.name," (",(n.size/1024).toFixed(1)," KB)")))))),(()=>{if(!A)return null;const t=A.type.startsWith("image/"),n=A.type.startsWith("text/"),r="application/pdf"===A.type;return e.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:g},e.createElement("div",{style:{backgroundColor:"white",padding:"20px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",position:"relative"},onClick:e=>e.stopPropagation()},e.createElement("button",{onClick:g,style:{position:"absolute",top:"10px",right:"10px",background:"none",border:"none",fontSize:"24px",cursor:"pointer",color:"#666"}},"×"),e.createElement("h3",{style:{marginTop:0,marginBottom:"16px"}},A.name),t&&e.createElement("img",{src:URL.createObjectURL(A),alt:A.name,style:{maxWidth:"100%",maxHeight:"70vh"}}),n&&e.createElement("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",maxHeight:"70vh",overflow:"auto",padding:"16px",backgroundColor:"#f5f5f5",borderRadius:"4px"}},URL.createObjectURL(A)),r&&e.createElement("iframe",{src:URL.createObjectURL(A),style:{width:"100%",height:"70vh",border:"none"},title:A.name}),!t&&!n&&!r&&e.createElement("div",{style:{padding:"20px",textAlign:"center"}},"Preview not available for this file type")))})())},Sa=async(e,t="support",n=[])=>{const r=17,o={support:r,general_help:r,feedback:r,loginAccess:30,loginProvider:31,security:26},i={serviceDeskId:"security"===t?3:2,requestTypeId:o[t]||o.support,requestFieldValues:{...e}};if(n&&n.length>0){const e=await Promise.all(n.map((async e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=()=>{const n=r.result.split(",")[1];t({fileName:e.name,contentType:e.type,size:e.size,fileData:n})},r.onerror=()=>n(new Error(`Failed to read file ${e.name}`)),r.readAsDataURL(e)})))));i.attachments=e}return i},Ia=async(e,t)=>{const n=pa.netlifyBaseUrl.replace("/.netlify/functions/","").replace("/.netlify/functions","");let r;r="create-support-ticket"===t?`${n}/api/v1/tickets`:"create-security-incident"===t?`${n}/api/v1/security-incidents`:`${pa.netlifyBaseUrl}/${t}`;try{const t=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e="";try{const n=await t.text();console.error("| ❌ Post data to proxy failed:",t.status,n);try{const t=JSON.parse(n);e=t.message||t.error||n}catch{e=n}}catch{e=`HTTP ${t.status} ${t.statusText}`}return 403===t.status?e="The ticket service is temporarily unavailable. Please try again later or contact support directly.":404===t.status?e="Ticket service not found. Please try again later.":500===t.status?e="Server error. Please try again later.":401===t.status&&(e="Authentication error with the ticket service. Please contact support."),{success:!1,status:t.status,error:e}}return{success:!0,data:await t.json()}}catch(e){return console.error("| ❌ Post data to proxy exception:",e),{success:!1,error:e.message}}},Ta=(t,n)=>{const r=()=>e.createElement(Da,{onFileUpload:e=>t({...n||{},uploadedFiles:e})});return r.displayName="FileUploadWrapper",r},Qa=e=>{let t=null;return{submitTicket:async(n,r,o=[])=>{try{const i=await Sa(n,r,o),A=await Ia(i,"create-support-ticket");A.success?(t={success:!0,ticketKey:A.data.data.ticketKey,ticketUrl:A.data.data.ticketUrl},e((e=>({...e,ticketKey:A.data.data.ticketKey,ticketUrl:A.data.data.ticketUrl})))):(console.error(`| ❌ ${r} ticket creation failed:`,A),t={success:!1,error:A.error||"Unknown error"},e((e=>({...e,submissionError:A.error||"Unknown error"}))))}catch(n){console.error(`| ❌ Error sending ${r} data to proxy:`,n),t={success:!1,error:n.message},e((e=>({...e,submissionError:n.message})))}},getSubmissionResult:()=>t}},Ma=(e,t="ticket")=>e?e.success?e.ticketUrl&&e.ticketKey?`Your ${t} has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`Your ${t} has been submitted successfully.\n\nOur support team will review your request and respond accordingly. Thank you for contacting ACCESS.`:`We apologize, but there was an error submitting your ${t}: ${e.error||"Unknown error"}\n\nPlease try again or contact our support team directly.`:`We apologize, but there was an error submitting your ${t}.\n\nPlease try again or contact our support team directly.`,Oa=e=>e&&e.length>0?`\nAttachments: ${e.length} file(s) attached`:"";let La=null;const Na=()=>{if(!La)return console.warn("Form context not available, returning empty form"),{};const e=La.ticketForm;return e&&"object"==typeof e?e:{}},Ra=(e={})=>{const t=Na()||{},n=e&&"object"==typeof e?e:{};return{...t,email:n.email||t.email,name:n.name||t.name,accessId:n.accessId||t.accessId}},ja=()=>e=>(e&&""!==e.trim()||setTimeout((()=>{const e=document.querySelector(".rcb-chat-input-textarea");if(e){e.value="Not provided";const t=new Event("input",{bubbles:!0});e.dispatchEvent(t),setTimeout((()=>{const e=document.querySelector('.rcb-send-button, .rcb-chat-send-button, [aria-label*="send"], button[type="submit"]');if(e){const t=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});e.dispatchEvent(t)}}),200)}}),100),{success:!0}),Ha=e=>e&&""!==e.trim()?e:"Not provided",Fa=e=>{const t=e?.trim()||"";return t?(e=>!(!e||"string"!=typeof e)&&/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e.trim()))(t)?{success:!0}:{success:!1,promptContent:"Please enter a valid email address (e.g., user@example.com).",promptDuration:3e3,promptType:"error",highlightTextArea:!0}:{success:!1,promptContent:"Please enter an email address.",promptDuration:3e3,promptType:"error",highlightTextArea:!0}},_a=({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const r=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Qa(t);return{access_help:{message:"If you're having trouble logging into the ACCESS website, here are some common issues:\n\n• Make sure you're using a supported browser (Chrome, Firefox, Safari)\n• Clear your browser cookies and cache\n• Check if you're using the correct identity provider\n\nWould you like to submit a help ticket for ACCESS login issues?",options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,path:e=>"Yes, let's create a ticket"===e.userInput?"access_login_description":"start"},access_login_description:{message:"Describe your login issue.",function:e=>{const r=Na(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"access_login_identity"},access_login_identity:{message:"Which identity provider were you using?",options:["ACCESS","Github","Google","Institution","Microsoft","ORCID","Other"],chatDisabled:!0,function:e=>{const n=Na();t({...n,identityProvider:e.userInput})},path:"access_login_browser"},access_login_browser:{message:"Which browser were you using?",options:["Chrome","Firefox","Edge","Safari","Other"],chatDisabled:!0,function:e=>{const n=Na();t({...n,browser:e.userInput})},path:"access_login_attachment"},access_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"access_login_upload":(()=>{const e=Ra(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"})()},access_login_upload:{message:"Please upload your screenshot.",component:Ta(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ra(n);return e.email?e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name":"access_login_email"}},access_login_email:{message:"What is your email?",validateTextInput:e=>Fa(e),function:e=>{const n=Na();t({...n,email:e.userInput})},path:()=>{const e=Ra(n);return e.name?e.accessId?"access_login_summary":"access_login_accessid":"access_login_name"}},access_login_name:{message:"What is your name?",function:e=>{const n=Na();t({...n,name:e.userInput})},path:()=>Ra(n).accessId?"access_login_summary":"access_login_accessid"},access_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Na();t({...n,accessId:Ha(e.userInput)})},path:"access_login_summary"},access_login_summary:{message:e=>{const t=Na(),r=Ra(n),o=Oa(t.uploadedFiles);let i=r.accessId;return"access_login_accessid"===e.prevPath&&e.userInput?i=e.userInput:i||"access_login_accessid"!==e.prevPath||(i=e.userInput),`Thank you for providing your ACCESS login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${i||"Not provided"}\nIdentity Provider: ${t.identityProvider||"Not provided"}\nBrowser: ${t.browser||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT","USER"],function:async e=>{if("Submit Ticket"===e.userInput){const e=Na(),t=Ra(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",description:e.description||"",identityProvider:e.identityProvider||"",browser:e.browser||""};await r(o,"loginAccess",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"access_login_success":"start"},access_login_success:{message:()=>Ma(o(),"ACCESS login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),o=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Qa(t);return{affiliated_help:{message:'If you\'re having trouble logging into an affiliated infrastructure or resource provider, here are some common issues:\n\n• Ensure your allocation is active\n• Confirm you have the correct username for that resource\n• Check <a href="https://operations.access-ci.org/infrastructure_news_view">System Status News</a> to see if the resource is undergoing maintenance\n\nWould you like to submit a help ticket for resource provider login issues?',options:["Yes, let's create a ticket","Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:e=>"Yes, let's create a ticket"===e.userInput?"affiliated_login_resource":"start"},affiliated_login_resource:{message:"Which ACCESS Resource are you trying to access?",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Na();t({...n,resource:e.userInput})},path:"affiliated_login_userid"},affiliated_login_userid:{message:"What is your user ID at the resource?",function:e=>{const n=Na();t({...n,userIdResource:e.userInput})},path:"affiliated_login_description"},affiliated_login_description:{message:"Please describe the issue you're having logging in.",function:e=>{const r=Na(),o={...r,description:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"affiliated_login_attachment"},affiliated_login_attachment:{message:"Would you like to attach a screenshot?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"affiliated_login_upload":(()=>{const e=Ra(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"})()},affiliated_login_upload:{message:"Please upload your screenshot.",component:Ta(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na();t({...e,uploadConfirmed:!0})},path:()=>{const e=Ra(n);return e.email?e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name":"affiliated_login_email"}},affiliated_login_email:{message:"What is your email?",validateTextInput:e=>Fa(e),function:e=>{const n=Na();t({...n,email:e.userInput})},path:()=>{const e=Ra(n);return e.name?e.accessId?"affiliated_login_summary":"affiliated_login_accessid":"affiliated_login_name"}},affiliated_login_name:{message:"What is your name?",function:e=>{const n=Na();t({...n,name:e.userInput})},path:()=>Ra(n).accessId?"affiliated_login_summary":"affiliated_login_accessid"},affiliated_login_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Na();t({...n,accessId:Ha(e.userInput)})},path:"affiliated_login_summary"},affiliated_login_summary:{message:e=>{const t=Na(),r=Ra(n),o=Oa(t.uploadedFiles);let i=r.accessId;return"affiliated_login_accessid"===e.prevPath&&e.userInput?i=e.userInput:i||"affiliated_login_accessid"!==e.prevPath||(i=e.userInput),`Thank you for providing your resource login issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${i||"Not provided"}\nResource: ${t.resource||"Not provided"}\nResource User ID: ${t.userIdResource||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Na(),t=Ra(n),o={email:t.email||"",name:t.name||"",accessId:t.accessId||"",accessResource:e.resource||"",description:e.description||"",userIdAtResource:e.userIdResource||""};await r(o,"loginProvider",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"affiliated_login_success":"start"},affiliated_login_success:{message:()=>Ma(o(),"resource login ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n}),i=(({ticketForm:e={},setTicketForm:t=()=>{},userInfo:n={}})=>{const{submitTicket:r,getSubmissionResult:o}=Qa(t);return{general_help_summary_subject:{message:"Provide a short title for your ticket.",function:e=>{const r=Na(),o={...r,summary:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"general_help_category"},general_help_category:{message:"What type of issue are you experiencing?",options:["User Account Question","Allocation Question","User Support Question","CSSN/CCEP Question","Training Question","Metrics Question","OnDemand Question","Pegasus Question","XDMoD Question","Some Other Question"],chatDisabled:!0,function:e=>{const n=Na();t({...n,category:e.userInput})},path:"general_help_description"},general_help_description:{message:"Please describe your issue.",function:e=>{const n=Na();t({...n,description:e.userInput})},path:"general_help_attachment"},general_help_attachment:{message:"Would you like to attach a file to your ticket?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"general_help_upload":"general_help_resource"},general_help_upload:{message:"Please upload your file.",component:Ta(t,e),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na();t({...e,uploadConfirmed:!0})},path:"general_help_resource"},general_help_resource:{message:"Does your problem involve an ACCESS Resource?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na();t({...n,involvesResource:e.userInput.toLowerCase()})},path:e=>"Yes"===e.userInput?"general_help_resource_details":"general_help_keywords"},general_help_resource_details:{message:"Please select the ACCESS Resource involved with your issue:",options:["ACES","Anvil","Bridges-2","DARWIN","Delta","DeltaAI","Derecho","Expanse","FASTER","Granite","Jetstream2","KyRIC","Launch","Neocortex","Ookami","Open Science Grid","Open Storage Network","Ranch","Stampede3"],chatDisabled:!0,function:e=>{const n=Na();t({...n,resourceDetails:e.userInput})},path:"general_help_user_id_at_resource"},general_help_user_id_at_resource:{message:"What is your User ID at the selected resource(s)? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Na();t({...n,userIdAtResource:Ha(e.userInput)})},path:"general_help_keywords"},general_help_keywords:{message:"Please add up to 5 keywords to help route your ticket.",checkboxes:{items:[" C, C++","Abaqus","ACCESS","ACCESS-credits","ACCESS-website","Accounts","ACLS","Adding users","Affiliations","Affinity Groups","AI","Algorithms","Allocation extension","Allocation Management","Allocation proposal","Allocation Time","Allocation users","AMBER","AMIE","Anaconda","Analysis","API","Application Status","ARCGIS","Architecture","Archiving","Astrophysics","ATLAS","Authentication","AWS","AZURE","Backup","BASH","Batch Jobs","Benchmarking","Big Data","Bioinformatics","Biology","Ceph","CFD","cgroups","CHARMM","Checkpoint","cilogon","citation","Cloud","Cloud Computing","Cloud Lab","Cloud Storage","Cluster Management","Cluster Support","CMMC","Community Outreach","Compiling","Composible Systems","Computataional Chemistry","COMSOL","Conda","Condo","Containers","Core dump","Core hours","CP2K","CPU architecture","CPU bound","CUDA","Cybersecurity","CYVERSE","Data","Data Storage","Data-access-protocols","Data-analysis","Data-compliance","Data-lifecycle","Data-management","Data-management-software","Data-provenance","Data-reproducibility","Data-retention","Data-science","Data-sharing","Data-transfer","Data-wrangling","Database-update","Debugging","Debugging, Optimizatio and Profiling","Deep-learning","Dependencies","Deployment","DFT","Distributed-computing","DNS","Docker","Documentation","DOI","DTN","Easybuild","Email","Encryption","Environment-modules","Errors","Extension","FastX","Federated-authentication","File transfers","File-formats","File-limits","File-systems","File-transfer","Finite-element-analysis","Firewall","Fortran","Frameworks and IDE's","GAMESS","Gateways","GATK","Gaussian","GCC","Genomics","GIS","Git","Globus","GPFS","GPU","Gravitational-waves","Gridengine","GROMACS","Hadoop","Hardware","Image-processing","Infiniband","Interactive-mode","Interconnect","IO-Issue","ISILON","Java","Jekyll","Jetstream","Job-accounting","Job-array","Job-charging","Job-failure","Job-sizing","Job-submission","Julia","Jupyterhub","Key-management","Kubernetes","KyRIC","LAMMPS","Library-paths","License","Linear-programming","Linux","LMOD","login","LSF","Lustre","Machine-learning","Management","Materials-science","Mathematica","MATLAB","Memory","Metadata","Modules","Molecular-dynamics","Monte-carlo","MPI","NAMD","NetCDF","Networking","Neural-networks","NFS","NLP","NoMachine","Nvidia","Oceanography","OnDemnad","Open-science-grid","Open-storage-network","OpenCV","Openfoam","OpenMP","OpenMPI","OpenSHIFT","Openstack","Optimization","OS","OSG","Parallelization","Parameter-sweeps","Paraview","Particle-physics","password","PBS","Pegasus","Pending-jobs","Performance-tuning","Permissions","Physiology","PIP","PODMAN","Portals","Pre-emption","Professional and Workforce Development","Professional-development","Profile","Profiling","Programming","Programming Languages","Programming-best-practices","Project-management","Project-renewal","Provisioning","Pthreads","Publication-database","Putty","Python","Pytorch","Quantum-computing","Quantum-mechanics","Quota","R","RDP","React","Reporting","Research-facilitation","Research-grants","Resources","Rstudio-server","S3","Samba","SAS","Scaling","Schedulers","Scheduling","Science DMZ","Science Gateways","Scikit-learn","Scratch","screen","scripting","SDN","Secure Computing and Data","Secure-data-architecture","Serverless-hpc","setup","sftp","SGE","Shell Scripting","Shifter","Singularity","SLURM","SMB","Smrtanalysis","Software Installations","Software-carpentry","SPACK","SPARK","Spectrum-scale","SPSS","SQL","SSH","Stampede2","STATA","Storage","Supplement","Support","TCP","Technical-training-for-hpc","Tensorflow","Terminal-emulation-and-window-management","Tickets","Timing-issue","TMUX","Tools","Training","Transfer SUs","Trinity","Tuning","Unix-environment","Upgrading","Vectorization","Version-control","vim","VNC","VPN","Workflow","Workforce-development","X11","Xalt","XDMoD","XML","XSEDE","I don't see a relevant keyword"],min:0,max:5},chatDisabled:!0,function:e=>{const n=Na();t({...n,keywords:e.userInput})},path:e=>e.userInput&&e.userInput.includes("I don't see a relevant keyword")?"general_help_additional_keywords":"general_help_priority"},general_help_additional_keywords:{message:"Please enter additional keywords, separated by commas:",function:e=>{const n=Na(),r=n.keywords||[],o=e.userInput,i=Array.isArray(r)?[...r]:r.split(",").map((e=>e.trim())),A=i.filter((e=>"I don't see a relevant keyword"!==e)),a=Array.isArray(A)&&A.length>0?[...A,o].join(", "):o;t({...n,keywords:a,suggestedKeyword:o})},path:"general_help_priority"},general_help_priority:{message:"Please select a priority for your issue:",options:["Lowest","Low","Medium","High","Highest"],chatDisabled:!0,function:e=>{const n=Na();t({...n,priority:e.userInput.toLowerCase()})},path:()=>n.email?n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name":"general_help_email"},general_help_email:{message:"What is your email address?",validateTextInput:e=>Fa(e),function:e=>{const n=Na();t({...n,email:e.userInput})},path:()=>n.name?n.accessId?"general_help_ticket_summary":"general_help_accessid":"general_help_name"},general_help_name:{message:"What is your name?",function:e=>{const n=Na();t({...n,name:e.userInput})},path:()=>n.accessId?"general_help_ticket_summary":"general_help_accessid"},general_help_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",required:!1,function:e=>{const n=Na();t({...n,accessId:e.userInput||""})},path:"general_help_ticket_summary"},general_help_ticket_summary:{message:e=>{const t=Na(),r=Ra(n),o=Oa(t.uploadedFiles);let i=r.accessId;"general_help_accessid"===e.prevPath&&e.userInput?i=e.userInput:i||"general_help_accessid"!==e.prevPath||(i=e.userInput);let A="";return"yes"===t.involvesResource&&(A=`\nResource: ${t.resourceDetails||"Not specified"}`,t.userIdAtResource&&(A+=`\nUser ID at Resource: ${t.userIdAtResource}`)),`Thank you for providing your issue details. Here's a summary:\n\nName: ${r.name||"Not provided"}\nEmail: ${r.email||"Not provided"}\nACCESS ID: ${i||"Not provided"}\nIssue Summary: ${t.summary||"Not provided"}\nCategory: ${t.category||"Not provided"}\nPriority: ${t.priority||"Not provided"}\nKeywords: ${t.keywords||"Not provided"}\nIssue Description: ${t.description||"Not provided"}${A}${o}\n\nWould you like to submit this ticket?`},options:["Submit Ticket","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Ticket"===e.userInput){const e=Na(),t=Ra(n),o={email:t.email||"",summary:e.summary||"General Support Ticket",description:e.description||"",priority:e.priority||"medium",accessId:t.accessId||"",name:t.name||"",issueType:e.category||"",hasResourceProblem:"yes"===e.involvesResource?"Yes":"No",userIdAtResource:e.userIdAtResource||"",resourceName:e.resourceDetails||"",keywords:e.keywords||"",noRelevantKeyword:e.suggestedKeyword?"checked":"",suggestedKeyword:e.suggestedKeyword||""};await r(o,"support",e.uploadedFiles||[])}},path:e=>"Submit Ticket"===e.userInput?"general_help_success":"start"},general_help_success:{message:()=>Ma(o(),"support ticket"),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}})({ticketForm:e,setTicketForm:t,userInfo:n});return{help_ticket:{message:"What is your help ticket related to?",options:["Logging into ACCESS website","Logging into a resource","Another question"],chatDisabled:!0,function:n=>{t({...e||{},ticketType:n.userInput})},path:e=>"Logging into ACCESS website"===e.userInput?"access_help":"Logging into a resource"===e.userInput?"affiliated_help":"Another question"===e.userInput?"general_help_summary_subject":"help_ticket"},...r,...o,...i}},Ua=({setTicketForm:t=()=>{},userInfo:n={}})=>{let r=null,o=null;return{security_incident:{message:"You're reporting a security incident. Please provide a brief summary of the security concern.",function:e=>{const r=Na()||{},o={...r,summary:e.userInput,email:n.email||r.email,name:n.name||r.name,accessId:n.accessId||r.accessId};t(o)},path:"security_priority"},security_priority:{message:"What is the priority level of this security incident?",options:["Critical","High","Medium","Low"],chatDisabled:!0,function:e=>{const n=Na()||{};t({...n,priority:e.userInput})},path:"security_description"},security_description:{message:"Please provide a detailed description of the security incident or concern.",function:e=>{const n=Na()||{};t({...n,description:e.userInput})},path:"security_attachment"},security_attachment:{message:"Do you have any files (screenshots, logs, etc.) that would help with this security incident?",options:["Yes","No"],chatDisabled:!0,function:e=>{const n=Na()||{};t({...n,wantsAttachment:e.userInput})},path:e=>"Yes"===e.userInput?"security_upload":"security_contact_info"},security_upload:{message:"Please upload your files.",component:()=>e.createElement(Da,{onFileUpload:e=>{const n=Na()||{};t({...n,uploadedFiles:e})}}),options:["Continue"],chatDisabled:!0,function:()=>{const e=Na()||{};t({...e,uploadConfirmed:!0})},path:"security_contact_info"},security_contact_info:{message:()=>{const e=Ra(n);return e.name&&e.email&&e.accessId?`I have your contact information:\n\nName: ${e.name}\nEmail: ${e.email}\nACCESS ID: ${e.accessId}\n\nIs this correct?`:"I need your contact information. What is your name?"},options:e=>{if(!e)return[];const t=Ra(n);return t.name&&t.email&&t.accessId?["Yes, that's correct","Let me update it"]:[]},chatDisabled:e=>{if(!e)return!1;const t=Ra(n);return t.name&&t.email&&t.accessId},function:e=>{if(!e)return;const n=Na()||{};if(!n.name){const r={...n,name:e.userInput};t(r)}},path:e=>{if(!e)return"security_summary";const t=Ra(n);return"Yes, that's correct"===e.userInput?"security_summary":"Let me update it"===e.userInput?"security_name":t.name&&t.email?t.accessId?"security_summary":"security_accessid":"security_email"}},security_name:{message:"What is your name?",function:e=>{const n=Na()||{};t({...n,name:e.userInput})},path:"security_email"},security_email:{message:"What is your email address?",function:e=>{const n=Na()||{};t({...n,email:e.userInput})},path:"security_accessid"},security_accessid:{message:"What is your ACCESS ID? (Optional - press Enter to skip)",validateTextInput:ja(),function:e=>{const n=Ha(e.userInput);r=n;const o=Na()||{};t({...o,accessId:n})},path:"security_summary"},security_summary:{message:()=>{const e=Na()||{},t=Ra(n),o={...e,name:t.name||e.name,email:t.email||e.email,accessId:r||t.accessId||e.accessId};let i="";e.uploadedFiles&&e.uploadedFiles.length>0&&(i=`\nAttachments: ${e.uploadedFiles.length} file(s) attached`);const A=o.accessId||"Not provided";return`Here's a summary of your security incident report:\n\nSummary: ${o.summary||"Not provided"}\nPriority: ${o.priority||"Not provided"}\nName: ${o.name||"Not provided"}\nEmail: ${o.email||"Not provided"}\nACCESS ID: ${A}\nDescription: ${o.description||"Not provided"}${i}\n\nWould you like to submit this security incident report?`},options:["Submit Security Report","Back to Main Menu"],chatDisabled:!0,function:async e=>{if("Submit Security Report"===e.userInput){const e=Na()||{},i=Ra(n),A={...e,name:i.name||e.name,email:i.email||e.email,accessId:r||i.accessId||e.accessId},a={summary:A.summary||"",priority:A.priority||"",description:A.description||"",name:A.name||"",email:A.email||"",accessId:A.accessId||""};try{const n=await(async(e,t=[])=>{try{const n=await Sa(e,"security",t);return await Ia(n,"create-security-incident")}catch(e){return console.error("| ❌ Security incident submission failed:",e),{success:!1,error:e.message}}})(a,e.uploadedFiles||[]);n.success?(o={success:!0,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl},t((e=>({...e,ticketKey:n.data?.data?.ticketKey,ticketUrl:n.data?.data?.ticketUrl,submissionResult:o})))):(o={success:!1,error:n.error},t((e=>({...e,submissionError:n.error}))))}catch(e){o={success:!1,error:e.message},t((t=>({...t,submissionError:e.message})))}}},path:e=>"Submit Security Report"===e.userInput?"security_success":"start"},security_success:{message:()=>(e=>e&&!e.success?`We apologize, but there was an error submitting your security incident report: ${e.error}\n\nPlease try again or contact our cybersecurity team directly.`:e&&e.success&&e.ticketUrl&&e.ticketKey?`Your security incident report has been submitted successfully.\n\nTicket: <a href="${e.ticketUrl}" target="_blank">${e.ticketKey}</a>\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure.`:(e&&e.success,"Your security incident report has been submitted successfully.\n\nOur cybersecurity team will review your report and respond accordingly. Thank you for helping keep ACCESS secure."))((Na()||{}).submissionResult||o),options:["Back to Main Menu"],chatDisabled:!0,renderHtml:["BOT"],path:"start"}}};function za({welcomeMessage:t,isBotLoggedIn:n,loginUrl:r,handleQuery:o,hasQueryError:i,sessionId:A,currentQueryId:a,ticketForm:s={},setTicketForm:l=()=>{},formContext:c,apiKey:u,userInfo:d={}}){c&&(e=>{La=e})(c);const p=(({welcome:e,setTicketForm:t=()=>{},setFeedbackForm:n=()=>{}})=>({start:{message:e,options:["Ask a question about ACCESS","Open a Help Ticket","Report a security issue"],chatDisabled:!0,path:e=>"Ask a question about ACCESS"===e.userInput?"go_ahead_and_ask":"Open a Help Ticket"===e.userInput?(t({}),"help_ticket"):"Report a security issue"===e.userInput?(t({}),"security_incident"):"start"}}))({welcome:fa(0,t),setTicketForm:l});return{...p||{},...(n?Ba({fetchAndStreamResponse:o,sessionId:A,currentQueryId:a,apiKey:u}):{go_ahead_and_ask:{message:"To ask questions, you need to log in first.",component:()=>e.createElement(Ea,{loginUrl:r}),options:["Back to Main Menu"],chatDisabled:!0,path:e=>"Back to Main Menu"===e.userInput?"start":"go_ahead_and_ask"}})||{},..._a({ticketForm:s,setTicketForm:l,userInfo:d})||{},...Ua({ticketForm:s,setTicketForm:l,userInfo:d})||{},...n&&{loop:{message:async e=>{await o(e)},renderMarkdown:["BOT"],path:()=>i?"start":"loop"}}}}console.info(`%c🤖 ACCESS QA Bot v2.5.0-debug.0 - Function Components + react-chatbotify v2.2.0 [${(new Date).toISOString().slice(0,10)}]`,"background: #107180; color: white; padding: 2px 8px; border-radius: 3px; font-weight: bold;");const Ga=()=>{for(let e=0;e<localStorage.length;e++){const t=localStorage.key(e);if(t&&t.startsWith("qa_bot_session_")){const e=localStorage.getItem(t);if(e)return e}}const e=`qa_bot_session_${da()}`;return localStorage.setItem(e,e),e},Ya=e.forwardRef(((t,n)=>{const{apiKey:r,open:o=!1,onOpenChange:i,embedded:A=!1,isLoggedIn:a,loginUrl:l=pa.LOGIN_URL,ringEffect:c=!1,welcome:u,userEmail:d,userName:p,accessId:f}=t,h=r||("undefined"!=typeof process&&process.env?process.env.REACT_APP_API_KEY:null),[g,m]=e.useState(void 0!==a&&a),b=e.useRef(Ga()).current,[y,v]=e.useState(null),{ticketForm:w,feedbackForm:x,updateTicketForm:E,updateFeedbackForm:k,resetTicketForm:P,resetFeedbackForm:B}=ba();e.useEffect((()=>{void 0!==a&&m(a)}),[a]),e.useEffect((()=>{if(!A&&i){const e=e=>{n&&n.current&&n.current._markAsUserInteraction&&n.current._markAsUserInteraction();const t=e.data.newState;i(t)};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}}),[A,i,n]);const C=fa(0,u),D=e.useRef(null),S=((t,n={})=>e.useMemo((()=>{const e=(e,n)=>{if(t.current){const n=getComputedStyle(t.current).getPropertyValue(e);if(n&&""!==n.trim())return n.trim();if(t.current.parentElement){const n=getComputedStyle(t.current.parentElement).getPropertyValue(e);if(n&&""!==n.trim())return n.trim()}}return n};return{primaryColor:e("--primary-color",n.primaryColor||pa.THEME.PRIMARY_COLOR),secondaryColor:e("--secondary-color",n.secondaryColor||pa.THEME.SECONDARY_COLOR),fontFamily:e("--font-family",n.fontFamily||pa.THEME.FONT_FAMILY)}}),[t,n]))(D),I=(({themeColors:t,embedded:n,defaultOpen:r,isLoggedIn:o,loginUrl:i})=>{const A=o,a=sessionStorage.getItem("qa_bot_tooltip_shown")?"NEVER":"START";return e.useMemo((()=>({general:{...t,embedded:n,primaryColor:t.primaryColor,fontFamily:"Arial, sans-serif",secondaryColor:t.secondaryColor},header:{title:e.createElement("div",{key:"header-title"},e.createElement("h1",{className:"sr-only"},pa.CHATBOT.TITLE),e.createElement("span",{"aria-hidden":"true"},pa.CHATBOT.TITLE)),avatar:pa.CHATBOT.AVATAR_URL,buttons:[()=>A?e.createElement(xa,{key:"user-icon"}):e.createElement(Ea,{key:"login-button",loginUrl:i,isHeaderButton:!0}),s.CLOSE_CHAT_BUTTON]},chatWindow:{defaultOpen:!!n||r},chatInput:{enabledPlaceholderText:"Type your question here...",disabledPlaceholderText:"",disabled:!1,allowNewline:!0,sendButtonStyle:{display:"flex"},characterLimit:1e3,sendButtonAriaLabel:"Send message",showCharacterCount:!1,ariaLabel:"Chat input area",ariaDescribedBy:"chat-input-help"},chatHistory:{disabled:!1},botBubble:{simulateStream:!0,streamSpeed:10,allowNewline:!0,dangerouslySetInnerHTML:!0,renderHtml:!0,ariaLabel:"Bot response",role:"log"},chatButton:{icon:pa.CHATBOT.AVATAR_URL},tooltip:{text:pa.CHATBOT.TOOLTIP_TEXT,mode:a},audio:{disabled:!0},emoji:{disabled:!0},fileAttachment:{disabled:!0},notification:{disabled:!0},footer:{text:e.createElement("div",{key:"footer-text"},e.createElement("a",{href:"https://support.access-ci.org/tools/access-qa-tool"},"About this tool"),"."),buttons:[e.createElement(wa,{key:"new-chat-button"})]},event:{rcbToggleChatWindow:!0}})),[t,n,r,A,a,i])})({themeColors:S,embedded:A,defaultOpen:o,isLoggedIn:g,loginUrl:l}),T=ka(h,b,v),Q=e.useMemo((()=>({ticketForm:w||{},feedbackForm:x||{},updateTicketForm:E,updateFeedbackForm:k,resetTicketForm:P,resetFeedbackForm:B})),[w,x,E,k,P,B]),M=e.useMemo((()=>za({welcomeMessage:C,isBotLoggedIn:g,loginUrl:l,handleQuery:T,sessionId:b,currentQueryId:y,ticketForm:w,setTicketForm:E,formContext:Q,apiKey:h,userInfo:{email:d||null,name:p||null,accessId:f||null}})),[C,g,l,T,b,y,w,x,E,k,Q,h,d,p,f]);return((t,n)=>{e.useEffect((()=>{n.current&&(t?n.current.classList.add("bot-logged-in"):n.current.classList.remove("bot-logged-in"))}),[t,n])})(g,D),((t,n)=>{e.useEffect((()=>{if(!t||!n.current)return;const e=setTimeout((()=>{const e=n.current?.querySelector(".rcb-tooltip-show");e&&e.classList.add("phone-ring")}),500);return()=>{clearTimeout(e)}}),[t,n])})(c,D),e.useEffect((()=>{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=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)}),[]),Pa(),e.useEffect((()=>{const e=()=>{sessionStorage.setItem("qa_bot_tooltip_shown","true")};return window.addEventListener("rcb-toggle-chat-window",e),()=>{window.removeEventListener("rcb-toggle-chat-window",e)}}),[]),e.createElement("div",{className:"qa-bot "+(A?"embedded-qa-bot":""),ref:D,role:"region","aria-label":"Ask ACCESS tool"},e.createElement(Ot,null,e.createElement("main",{role:"main","aria-label":"Chat interface"},e.createElement(ha,{ref:n,embedded:A,isBotLoggedIn:g,currentOpen:o}),e.createElement(jt,{key:`chatbot-${b}-${g}`,settings:I,flow:M,plugins:[()=>vn(L),oa(),()=>aa(O)]}),e.createElement("div",{"aria-live":"polite","aria-label":"Bot response updates",className:"sr-only",id:"bot-live-region"}),e.createElement("div",{id:"chat-input-help",className:"sr-only"},"Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."),e.createElement("div",{id:"keyboard-help",className:"sr-only"},"Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs."))));var O,L}));Ya.displayName="QABotInternal";const qa=e.forwardRef(((t,n)=>e.createElement(ma,null,e.createElement(Ya,A({},t,{ref:n})))));qa.displayName="QABot";a('.rcb-toggle-icon{background-color:initial!important;background-position:calc(50% - 1px) calc(50% + 2px);background-repeat:no-repeat;background-size:62%!important}.rcb-chat-window{max-height:600px;max-width:100%;width:550px!important}.rcb-chat-window .rcb-bot-avatar{background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:0}.rcb-chat-window .rcb-chat-header{align-items:center;display:flex;flex-direction:row;font-weight:700}.rcb-chat-window a{color:#000;font-weight:700;text-decoration:underline}.rcb-chat-window a:hover{color:#107180}.rcb-chat-window .rcb-bot-message a{color:#fff;text-decoration:none}.rcb-chat-window .rcb-bot-message a:hover{text-decoration:underline}.rcb-chat-window .rcb-chat-input-textarea{overflow-y:auto}.rcb-chat-window .rcb-chat-footer-container{font-size:10px}.qa-bot .user-login-icon{display:none!important}.qa-bot.bot-logged-in .user-login-icon{display:flex!important;transform:scale(1.3) translateY(-2px)}.embedded-qa-bot .rcb-chat-window{max-width:100%;width:100%!important}.qa-bot.hidden{display:none}.embedded-qa-bot .rcb-bot-message,.embedded-qa-bot .rcb-user-message{max-width:90%!important;word-break:break-word}.embedded-qa-bot .rcb-chat-input-textarea{width:100%!important}.qa-bot-container{max-width:100%;width:100%}.rcb-tooltip-show.phone-ring{animation:phone-ring 3s ease-out!important;z-index:10000!important}@keyframes phone-ring{0%{transform:translateX(0) translateY(0) rotate(0deg)}2%{transform:translateX(0) translateY(-8px) rotate(-2deg)}4%{transform:translateX(0) translateY(-6px) rotate(2deg)}6%{transform:translateX(0) translateY(-8px) rotate(-1deg)}8%{transform:translateX(0) translateY(-6px) rotate(1deg)}10%{transform:translateX(0) translateY(-8px) rotate(-2deg)}12%{transform:translateX(0) translateY(-6px) rotate(2deg)}20%{transform:translateX(0) translateY(0) rotate(0deg)}30%{transform:translateX(0) translateY(0) rotate(0deg)}40%{transform:translateX(0) translateY(0) rotate(0deg)}49%{transform:translateX(0) translateY(0) rotate(0deg)}50%{transform:translateX(0) translateY(-8px) rotate(-2deg)}52%{transform:translateX(0) translateY(-6px) rotate(2deg)}54%{transform:translateX(0) translateY(-8px) rotate(-1deg)}56%{transform:translateX(0) translateY(-6px) rotate(1deg)}58%{transform:translateX(0) translateY(-8px) rotate(-2deg)}60%{transform:translateX(0) translateY(-6px) rotate(2deg)}70%{transform:translateX(0) translateY(0) rotate(0deg)}to{transform:translateX(0) translateY(0) rotate(0deg)}}@media (max-width:768px){.rcb-chat-window{max-height:calc(100vh - 100px)!important;max-width:calc(100vw - 40px)!important;width:550px!important}.embedded-chat-container.open{height:400px}.embedded-chat-closed{font-size:14px;height:40px}.embedded-chat-open-btn{font-size:12px;padding:3px 10px}.rcb-bot-message,.rcb-user-message{max-width:85%!important}.rcb-chat-input-textarea{font-size:16px!important;min-height:44px!important}.rcb-chat-header{padding:12px 16px!important}}@media (max-width:480px){.rcb-chat-window{bottom:10px!important;left:10px!important;max-height:calc(100vh - 80px)!important;max-width:calc(100vw - 20px)!important;right:10px!important;width:calc(100vw - 20px)!important}.embedded-chat-container.open{height:350px}.rcb-bot-message,.rcb-user-message{margin-bottom:8px!important;max-width:90%!important}.rcb-chat-header{font-size:14px!important;padding:8px 12px!important}.rcb-chat-button{bottom:20px!important;height:50px!important;right:20px!important;width:50px!important}.rcb-chat-footer-container{font-size:9px!important;padding:8px 12px!important}}@media (max-width:360px){.rcb-chat-window{left:5px!important;max-width:calc(100vw - 10px)!important;right:5px!important;width:calc(100vw - 10px)!important}.rcb-chat-header{font-size:13px!important;padding:6px 8px!important}}.rcb-checkbox-container{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-left:16px!important;max-width:100%!important;padding-top:12px!important}.rcb-checkbox-row-container{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-row-container:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-row-container[data-checked=true]{background-color:#107180!important;border-color:#107180!important;color:#fff!important}.rcb-checkbox-row{margin-left:0!important}.rcb-checkbox-mark{height:14px!important;margin-right:6px!important;width:14px!important}.rcb-checkbox-label{font-size:13px!important;margin:0!important;white-space:nowrap!important}.rcb-checkbox-next-button{align-items:center!important;background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;display:flex!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;justify-content:center!important;line-height:24px!important;margin:0!important;max-height:auto!important;min-height:auto!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-checkbox-next-button:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.sr-only{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}.rcb-chat-input-send-button:focus,.rcb-chat-input-textarea:focus{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-user-message{word-wrap:break-word!important;overflow:hidden!important;word-break:break-word!important}:focus-visible{outline:2px solid #107180!important;outline-offset:2px!important}.rcb-options-container{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:8px!important;margin:16px!important;padding:0!important}.rcb-options{background-color:#fff!important;border:1px solid #d0d0d0!important;border-radius:6px!important;box-sizing:border-box!important;color:#107180!important;cursor:pointer!important;flex:0 0 auto!important;font-size:14px!important;font-weight:400!important;outline:none!important;padding:8px 12px!important;text-align:center!important;transition:all .2s ease!important;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:auto!important}.rcb-options:hover{background-color:#e8f4f8!important;border-color:#107180!important;box-shadow:0 2px 4px #10718033!important;transform:translateY(-1px)!important}.rcb-checkbox-next-button.keyboard-focused,.rcb-checkbox-next-button:focus,.rcb-checkbox-next-button:focus-visible,.rcb-checkbox-row-container.keyboard-focused,.rcb-checkbox-row-container:focus,.rcb-checkbox-row-container:focus-visible,.rcb-options.keyboard-focused,.rcb-options:focus,.rcb-options:focus-visible{background-color:#e8f4f8!important;border-color:#107180!important;outline:none!important}.rcb-options:active{background-color:#107180!important;border-color:#107180!important;color:#fff!important;transform:translateY(0)!important}.keyboard-nav-hint{color:#666!important;font-size:12px!important;font-style:italic!important;margin-bottom:8px!important}@media (prefers-reduced-motion:reduce){.keyboard-nav-hint{display:none!important}}.rcb-options-container [role=button][tabindex="0"],.rcb-options-container button[tabindex="0"]{position:relative!important}.rcb-options-container [role=button][tabindex="0"]:after,.rcb-options-container button[tabindex="0"]:after{color:#107180!important;content:"←"!important;font-size:16px!important;opacity:0!important;position:absolute!important;right:12px!important;top:50%!important;transform:translateY(-50%)!important;transition:opacity .2s ease!important}.rcb-options-container [role=button][tabindex="0"]:focus:after,.rcb-options-container button[tabindex="0"]:focus:after{opacity:1!important}.rcb-chat-input-send-button{cursor:pointer!important;opacity:1!important;pointer-events:auto!important;visibility:visible!important}.rcb-chat-input-send-button:not([tabindex]){-webkit-user-select:none;-moz-user-select:none;user-select:none}.rcb-chat-input-container [onclick],.rcb-chat-input-container [role=button],.rcb-chat-input-container div[style*=cursor],.rcb-chat-input-container svg:last-child,.rcb-chat-input-container>div:last-child{tabindex:0!important;cursor:pointer!important}.rcb-chat-footer{margin-top:4px!important;padding-top:0!important}.rcb-chat-footer-container{align-items:center!important;display:flex!important;margin-top:4px!important;padding-top:4px!important}.rcb-chat-footer-container button{order:1!important}.rcb-chat-footer-container a[href*=access-qa-tool]{tab-index:0!important;order:2!important}.rcb-chat-footer-container a[href*=feedback]{tab-index:0!important;order:3!important}@media (prefers-contrast:high){.rcb-chat-window a{background-color:#fff!important;border:1px solid #000!important;color:#000!important}}@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.rcb-chat-input-textarea{user-select:text!important}.rcb-chat-body-container,.rcb-chat-input-textarea,.rcb-chat-window{touch-action:pan-y!important}.embedded-qa-bot,.rcb-chat-window{-webkit-overflow-scrolling:touch!important}.embedded-qa-bot .rcb-chat-input-textarea{touch-action:pan-y!important;user-select:text!important}.embedded-qa-bot .rcb-chat-body-container,.embedded-qa-bot .rcb-chat-window{touch-action:pan-y!important}',{insertAt:"top"});const Wa=e.forwardRef(((t,n)=>{const[r,o]=e.useState(t.isLoggedIn||!1),[i,A]=e.useState(t.defaultOpen||!1),a=e.useRef();return e.useImperativeHandle(n,(()=>({addMessage:e=>{a.current&&a.current.addMessage(e)},setBotIsLoggedIn:e=>{o(e)},openChat:()=>{!t.embedded&&a.current&&A(!0)},closeChat:()=>{!t.embedded&&a.current&&A(!1)},toggleChat:()=>{!t.embedded&&a.current&&A((e=>!e))}})),[t.embedded]),e.createElement(qa,{ref:a,apiKey:t.apiKey,embedded:t.embedded,isLoggedIn:r,open:!!t.embedded||i,onOpenChange:t.embedded?void 0:A,loginUrl:t.loginUrl,ringEffect:t.ringEffect,welcome:t.welcome,userEmail:t.userEmail,userName:t.userName,accessId:t.accessId})}));function Va(n){if(!(n.target&&n.target instanceof HTMLElement))return void console.error("QA Bot: A valid target DOM element is required");const r=t.createRoot(n.target),o={current:null};return r.render(e.createElement(e.StrictMode,null,e.createElement(Wa,{ref:e=>{o.current=e},apiKey:n.apiKey,defaultOpen:n.defaultOpen,embedded:n.embedded,isLoggedIn:n.isLoggedIn,loginUrl:n.loginUrl,ringEffect:n.ringEffect,welcome:n.welcome,userEmail:n.userEmail,userName:n.userName,accessId:n.accessId}))),{addMessage:e=>{var t;return null===(t=o.current)||void 0===t?void 0:t.addMessage(e)},setBotIsLoggedIn:e=>{var t;return null===(t=o.current)||void 0===t?void 0:t.setBotIsLoggedIn(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,r.unmount()}}}Wa.displayName="ProgrammaticQABot",exports.QABot=qa,exports.default=Va,exports.qaBot=Va;
9
9
  //# sourceMappingURL=access-qa-bot.umd.cjs.map