@eshal-bot/chat-widget 0.2.45 → 0.2.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chat-widget-MarkdownRenderer-DUu9dckR.esm.js → chat-widget-MarkdownRenderer-vumwhHph.esm.js} +1 -1
- package/dist/{chat-widget-index-BMVyeU-x.esm.js → chat-widget-index-MI4rHyOE.esm.js} +2 -2
- package/dist/chat-widget.esm.js +1 -1
- package/dist/chat-widget.js +32 -15
- package/dist/chat-widget.min.js +2 -2
- package/dist/chat-widget.umd.js +2 -2
- package/package.json +1 -1
package/dist/chat-widget.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("react-dom/client"),require("react/jsx-runtime"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom/client","react/jsx-runtime","react-dom"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ChatWidget=t(e.React,e.client,e.jsxRuntime,e.ReactDOM)}(this,function(e,t,n,r){"use strict";function a(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)}function o(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var i=a(e);const s="processing_start",l="text_chunk",c="processing_end",u="complete",d="follow_up_prompts",p="error",f="human_decision_required",g=e=>{if(!e||"string"!=typeof e)return null;if("[DONE]"===e||"[PROCESSING]"===e)return null;try{const t=JSON.parse(e);if(!t||"object"!=typeof t)return null;const n=t.type||t.event_type;if(n===l||t.content){const e=t.content||t.choices?.[0]?.delta?.content||"";return{type:l,content:e,...t}}return n===s||"processing_start"===t.type?{type:s,...t}:n===c||"processing_end"===t.type?{type:c,...t}:n===u||"complete"===t.type?{type:u,finalContent:t.finalContent||t.content||"",...t}:n===p||"error"===t.type?{type:p,error:t.error||t.message||"Unknown error",...t}:n===f||"human_decision_required"===t.type?{type:f,decisionId:t.decisionId||t.decision_id,question:t.question||"",options:t.options||[],context:t.context||{},...t}:n?{type:n,...t}:t}catch(e){return null}};class m extends Error{constructor(e="SSE stream ended before completion"){super(e),this.name="IncompleteStreamError"}}const h=410;class b extends Error{constructor(e="This conversation was erased"){super(e),this.name="ConversationErasedError"}}const y=async(e,t,n,r)=>{const a={"Content-Type":"application/json",Accept:"text/event-stream"};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}const o=await fetch(`${t.replace(/\/$/,"")}/api/v1/support`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify(e),...r?{signal:r}:{}});if(o.status===h)throw new b;if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");return o.body},v=async(e,t,n,r)=>{const a={"Content-Type":"application/json"};if("function"==typeof r){const e=await r();e&&(a.Authorization=`Bearer ${e}`)}const o=await fetch(`${n.replace(/\/$/,"")}/api/v1/support/identity/${e}`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify(t)});let i={};try{i=await o.json()}catch{i={}}return{ok:o.ok,status:o.status,body:i}},w=()=>({id:`skeleton-${Date.now()}`,role:"assistant",content:"",timestamp:new Date,isProcessing:!0,processingStatus:""}),S=e=>{if(!Array.isArray(e)||0===e.length)return;const t=e.map(e=>({type:e.type||"prompt",text:"string"==typeof e.text?e.text:"",submitText:"string"==typeof e.submitText?e.submitText:void 0,promptId:"string"==typeof e.promptId?e.promptId:void 0,confidence:"number"==typeof e.confidence?e.confidence:void 0})).filter(e=>e.text);return t.length?t:void 0},x=(e,t,n={})=>{e(e=>{const r=[...e||[]],a=r[r.length-1];if("assistant"===a?.role){const{prompts:e,...o}=n||{};r[r.length-1]={...a,...o,content:t,isProcessing:!1,...null!=e&&{prompts:S(e)}}}return r})},k=/model.candidates.failed|gateway|502|redis|litellm|openai.*error|Failed to initialize agent|Streaming error:/i,E="I'm having a little trouble right now. Please try again in a moment.";function A(e){return e&&"string"==typeof e?k.test(e)?E:e:E}const T=(e,t,n,r,a)=>{if(e&&e.type)switch(e.type){case s:{const n=e.choices?.[0]?.delta?.content||"";t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&r.isProcessing?t[t.length-1]={...r,processingStatus:n}:n&&t.push({...w(),processingStatus:n}),t});break}case l:a.current||(a.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],w()]}return e}));const o=e.content||e.choices?.[0]?.delta?.content||"";o&&(n.current+=o,r(n.current));break;case c:(e=>{e(e=>{const t=[...e||[]],n=t[t.length-1];return n?.isProcessing&&(t[t.length-1]={...n,isProcessing:!1}),t})})(t);break;case u:{const r=e.finalContent||n.current,a={};"boolean"==typeof e.conclusionDetected?a.conclusionDetected=e.conclusionDetected:"boolean"==typeof e.conclusion_detected&&(a.conclusionDetected=e.conclusion_detected);const o={...a,prompts:e.prompts};x(t,r,o);break}case d:{const n=Array.isArray(e.prompts)?e.prompts:[];n.length>0&&t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&(t[t.length-1]={...r,prompts:S(n)}),t});break}case p:((e,t)=>{t=A(t),e(e=>{const n=[...e||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,content:(r.content||"")+`\n\nError: ${t}`,isProcessing:!1}),n})})(t,e.error||"Unknown error occurred");break;case f:{const n={id:`decision-${Date.now()}`,role:"assistant",content:e.question||"",timestamp:new Date,isProcessing:!1,requiresDecision:!0,decisionData:{decisionId:e.decisionId,question:e.question,options:e.options||[],context:e.context||{}}};t(e=>[...(e||[]).filter(e=>!e.isProcessing||e.content),n]);break}default:console.warn("Unknown stream event type:",e.type)}},C=e=>{const t=e.Sources??e.sources??[];return Array.isArray(t)?t.map(e=>({source_type:e.source_type??e.sourceType??"website",source_id:e.sourceid??e.source_id,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices,effective_date:e.effective_date??e.effectiveDate,stale:e.stale})).filter(e=>e.source_id||e.url||"database"===e.source_type):[]},O=async(e,t,n,r)=>{const a=(e=>{let t=null,n=null,r=0;const a=o=>{if(o-r<16)n=requestAnimationFrame(a);else{if(null!==t){const n=t;t=null,r=o,e(e=>{const t=[...e||[]],r=t[t.length-1];return"assistant"===r?.role&&(t[t.length-1]={...r,content:n}),t})}n=null}},o=e=>{t=e,null===n&&(n=requestAnimationFrame(a))};return o.cancel=()=>{null!==n&&(cancelAnimationFrame(n),n=null,t=null)},o})(t),o=e.getReader(),i=new TextDecoder;let s="";const l={current:""},c={current:!1};let u=!1,d=null;const p=()=>{if(!u&&(u=!0,"function"==typeof n))try{n()}catch(e){console.warn("[chat] onTerminal callback threw:",e)}};try{for(;;){const{value:e,done:n}=await o.read();if(n)break;s+=i.decode(e,{stream:!0});const u=s.split(/\r?\n\r?\n/);s=u.pop()||"";for(const e of u){const n=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===n.length)continue;const o=n.filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trim());if(0===o.length)continue;const i=o.join("\n");if("[DONE]"===i)continue;let s;try{s=JSON.parse(i)}catch(e){continue}if(s){if(s.type){if("processing_start"===s.type){const e=s.choices?.[0]?.delta?.content||"";t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role&&r.isProcessing?n[n.length-1]={...r,processingStatus:e}:e&&n.push({...w(),processingStatus:e}),n});continue}if("processing_end"===s.type)continue;if("human_handoff"===s.type){p(),"function"==typeof r&&r();continue}if("duplicate_suppressed"===s.type){p();continue}if("follow_up_prompts"===s.type){const e=Array.isArray(s.prompts)?s.prompts:[];e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role?null!=d&&r.id!==d?t:(n[n.length-1]={...r,prompts:S(e)},n):t});continue}if("text_chunk"===s.type){c.current||(c.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],w()]}return e}));const e=s.choices?.[0]?.delta?.content||s.content;e&&(l.current+=e,a(l.current));continue}if("sources"===s.type){const e=C(s);e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,sources:e,sourcesPreliminary:!0}),n});continue}if("complete"===s.type){const e=C(s),n=s.finalContent||s.choices?.[0]?.delta?.content||l.current,r={};"boolean"==typeof s.conclusionDetected?r.conclusionDetected=s.conclusionDetected:"boolean"==typeof s.conclusion_detected&&(r.conclusionDetected=s.conclusion_detected);const o={...r,prompts:s.prompts};a.cancel(),x(t,n,o),t(t=>{const r=[...t||[]],a=r[r.length-1];if("assistant"===a?.role&&(d=a.id??null),"assistant"===a?.role&&(e.length>0||a.sourcesPreliminary)){const{sourcesPreliminary:t,...o}=a;r[r.length-1]={...o,sources:e,content:n,isProcessing:!1}}return r}),p();continue}if("error"===s.type){t(e=>{const t=[...e||[]],n=t[t.length-1];return"assistant"===n?.role&&(t[t.length-1]={...n,content:(n.content||"")+`\n\nError: ${A(s.error||"Unknown error occurred")}`,isProcessing:!1}),t});continue}const e=g(i);if(e&&e.type){console.log("🔍 Parsed stream event:",e.type,e),T(e,t,l,a,c);continue}}if("chat.completion.chunk"===s.object&&s.choices?.[0]?.delta?.content)c.current||(c.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],w()]}return e})),l.current+=s.choices[0].delta.content,a(l.current);else if(s.choices?.[0]?.finish_reason&&null!==s.choices[0].finish_reason){const e={prompts:s.prompts};x(t,l.current,e),t(e=>{const t=(e||[])[(e||[]).length-1];return"assistant"===t?.role&&(d=t.id??null),e}),p()}}}}}catch(e){if(e&&"AbortError"===e.name)return void(l.current?x(t,l.current,{stoppedByUser:!0}):t(e=>(e||[]).filter(e=>!e.isProcessing)));throw e}finally{o.releaseLock()}if(!u)throw new m(l.current?"Stream ended mid-response - partial content received":"Stream ended before any content was received")};const I=.025,R=120,N=200,_=40,P=1e3,L=300;function D(e,t){return null!=e?e:t}function M(e,t){const n=e.sampleRate,r=D(e.energyThreshold,I),a=D(e.speechStartMs,R),o=D(e.speechWindowMs,N),i=D(e.onsetGapMs,_),s=D(e.hangoverMs,P),l=D(e.preRollMs,L);let c=!1,u=[],d=0,p=0,f=0,g=0,m=[],h=0;const b=function(){u=[],d=0,p=0,f=0};return{process:function(e){const y=function(e){return e.byteLength/2/n*1e3}(e),v=function(e){const t=new Int16Array(e);if(0===t.length)return 0;let n=0;for(let e=0;e<t.length;e+=1){const r=t[e]/32768;n+=r*r}return Math.sqrt(n/t.length)}(e)>=r;if(c)t.onVoiceFrame(e),v?g=0:(g+=y,g>=s&&(c=!1,b(),g=0,t.onSpeechEnd()));else{for(m.push({pcm:e,durationMs:y}),h+=y;h>l&&m.length>1;){const e=m.shift();h-=e?e.durationMs:0}for(u.push({durationMs:y,voiced:v}),d+=y,v&&(p+=y);d>o&&u.length>1;){const e=u.shift();d-=e.durationMs,e.voiced&&(p-=e.durationMs)}if(v){if(f=0,p>=a){c=!0,g=0,b(),"function"==typeof t.onSpeechStart&&t.onSpeechStart();for(let e=0;e<m.length;e+=1)t.onVoiceFrame(m[e].pcm);m=[],h=0}}else f+=y,f>=i&&b()}},reset:function(){c=!1,b(),g=0,m=[],h=0},isSpeaking:function(){return c}}}function j(e){e&&e.getTracks().forEach(function(e){e.stop()})}async function F(e){if("undefined"==typeof window)throw new Error("Audio recorder can only run in the browser");const t=new AudioContext({sampleRate:16e3}),n=new Blob(["\n class PCMRecorderProcessor extends AudioWorkletProcessor {\n process(inputs) {\n if (!inputs.length || !inputs[0].length) {\n return true;\n }\n const inputChannel = inputs[0][0];\n this.port.postMessage(new Float32Array(inputChannel));\n return true;\n }\n }\n registerProcessor('pcm-recorder-processor', PCMRecorderProcessor);\n "],{type:"application/javascript"}),r=URL.createObjectURL(n);await t.audioWorklet.addModule(r),URL.revokeObjectURL(r);const a=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),o=t.createMediaStreamSource(a),i=new AudioWorkletNode(t,"pcm-recorder-processor");return i.port.onmessage=t=>{const n=function(e){const t=new Int16Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=32767*Math.max(-1,Math.min(1,e[n]));return t.buffer}(t.data);e(n)},o.connect(i),[i,t,a]}const B={connectionError:"Sorry, I'm having trouble connecting right now. Please try again.",micDenied:"We couldn't access your microphone. Please allow access and try again.",micNotFound:"No microphone found. Please connect one and try again.",voiceUnavailable:"Voice isn't available right now. Please try again.",categoryTopicsHeading:"Please ask your **{category}** question below.",quickQuestionsHeadingLabel:"Or ask a quick question:",chooseTopicLabel:"Choose a topic to get started:",typeYourMessage:"Type your message...",agentIsLoading:"Agent is loading...",conversationResolved:"Conversation resolved",howWasYourExperience:"How was your experience?",feedbackPrompt:"Please rate our support to help us improve.",feedbackPlaceholder:"Tell us more about your experience...",submitFeedback:"Submit Feedback",feedbackSendFailed:"We couldn't send your feedback. Please try again.",backToChat:"Back to chat",submitting:"Submitting...",selectRatingFirst:"Please select a rating first",pleaseSubmitRatingFirst:"Please submit your rating first.",completeOnboardingToEnableVoice:"Complete the onboarding to enable voice",sendMessageToCompleteOnboarding:"Send a message to complete onboarding and enable voice.",resolve:"Resolve",scrollLeft:"Scroll left",scrollRight:"Scroll right",sendMessage:"Send message",stopGenerating:"Stop generating",agentJoinedConversation:"{name} has joined the conversation",handedOffToTeam:"Your conversation has been passed to our team",handedOffStatus:"Our team will reply here",chatHere:"Chat here",chooseChannel:"Choose how to chat",sessionExpiringSoon:"Your session will expire soon due to inactivity.",startVoiceInput:"Start voice input",stopVoiceInput:"Stop voice input",voiceSessionLive:"Voice session live - speak or type to converse.",connectingVoice:"Connecting to voice session...",poweredBy:"Powered by",poweredByBefore:"Powered by",poweredByAfter:"",menu:"Menu",close:"Close",openChat:"Open chat",closeChat:"Close chat",lightMode:"Light Mode",nightMode:"Night Mode",refreshChat:"Refresh Chat",copyChat:"Copy Chat",startChat:"Start Chat",startingVoiceSession:"Starting voice session...",allowMicAccess:"Allow microphone access",emailRequired:"Please enter your email address",nameRequired:"Please enter your name",phoneRequired:"Please enter your phone number",fieldRequiredSuffix:"is required",emailInvalid:"Please enter a valid email address",nameInvalid:"Please enter a valid name",phoneInvalid:"Please enter a valid phone number",uploadFile:"Upload file",suggestedQuestions:"Suggested questions",agentIsTyping:"Agent is typing",rate:"Rate",rateExperience:"Rate your experience",thumbsUp:"Thumbs up",thumbsDown:"Thumbs down",submittingFeedback:"Submitting feedback...",cancel:"Cancel",submit:"Submit",messageNotDelivered:"Not delivered",retrySend:"Retry",verifyTitle:"Confirm it's you",verifyEmailLabel:"Your email",verifyPhoneLabel:"Your mobile number",verifySendCode:"Send code",verifySending:"Sending...",verifyEnterCode:"Enter the code we sent to {target}",verifyCodeLabel:"6-digit code",verifyConfirm:"Confirm",verifyResendIn:"Resend in {seconds} s",verifyResend:"Send a new code",verifyDifferent:"Use a different address",verifyDifferentNumber:"Use a different number",verifyCountryNotAllowed:"We can't send codes to numbers in this country. Try another number.",verifyLockedFor:"Try again in {time}",verifyDone:"Verified as {target}",verifyResumeMessage:"I've confirmed it's me.",verifyTriesLeft:"That code doesn't match. {count} tries left.",verifyTryLeft:"That code doesn't match. 1 try left.",verifyGenericError:"Something went wrong. Try again.",verifyInputBlocked:"Enter your code above to continue",verifyCancel:"Cancel",verifyCancelled:"Verification cancelled.",verifyNotDelivered:"We couldn't deliver the code to that number. Check it and send a new code."},U={en:B,ar:{agentJoinedConversation:"انضم {name} إلى المحادثة",handedOffToTeam:"تم تحويل محادثتك إلى فريقنا",handedOffStatus:"سيرد فريقنا هنا",chatHere:"الدردشة هنا",chooseChannel:"اختر طريقة الدردشة",connectionError:"عذرًا، أواجه مشكلة في الاتصال حاليًا. يرجى المحاولة مرة أخرى.",micDenied:"لم نتمكن من الوصول إلى الميكروفون. يرجى السماح بالوصول والمحاولة مرة أخرى.",micNotFound:"لم يتم العثور على ميكروفون. يرجى توصيل ميكروفون والمحاولة مرة أخرى.",voiceUnavailable:"الميزة الصوتية غير متوفرة حاليًا. يرجى المحاولة مرة أخرى.",chooseTopicLabel:"اختر موضوعًا للبدء:",categoryTopicsHeading:"يرجى طرح سؤالك حول **{category}** أدناه.",quickQuestionsHeadingLabel:"أو اطرح سؤالًا سريعًا:",typeYourMessage:"اكتب رسالتك هنا...",agentIsLoading:"جارٍ تحميل الوكيل...",conversationResolved:"تم إنهاء المحادثة",howWasYourExperience:"كيف كانت تجربتك؟",feedbackPrompt:"يرجى تقييم خدمتنا لمساعدتنا على التحسن.",feedbackPlaceholder:"أخبرنا المزيد عن تجربتك...",submitFeedback:"إرسال التقييم",submitting:"جارٍ الإرسال...",selectRatingFirst:"يرجى تحديد التقييم أولاً",pleaseSubmitRatingFirst:"يرجى إرسال تقييمك أولاً.",completeOnboardingToEnableVoice:"أكمل التسجيل لتفعيل الصوت",sendMessageToCompleteOnboarding:"أرسل رسالة لإكمال التسجيل وتفعيل الصوت.",resolve:"إنهاء",scrollLeft:"تمرير لليسار",scrollRight:"تمرير لليمين",sendMessage:"إرسال رسالة",voiceSessionLive:"الجلسة الصوتية نشطة - تحدث أو اكتب للتواصل.",connectingVoice:"جارٍ الاتصال بالجلسة الصوتية...",poweredBy:"مدعوم من",menu:"القائمة",close:"إغلاق",openChat:"فتح المحادثة",closeChat:"إغلاق المحادثة",lightMode:"الوضع الفاتح",nightMode:"الوضع الداكن",refreshChat:"تحديث المحادثة",copyChat:"نسخ المحادثة",startChat:"بدء المحادثة",startingVoiceSession:"جارٍ بدء الجلسة الصوتية...",allowMicAccess:"السماح بالوصول إلى الميكروفون",uploadFile:"رفع ملف",suggestedQuestions:"أسئلة مقترحة",agentIsTyping:"الوكيل يكتب",rate:"تقييم",rateExperience:"قيّم تجربتك",thumbsUp:"إعجاب",thumbsDown:"عدم إعجاب",submittingFeedback:"جارٍ إرسال التقييم...",cancel:"إلغاء",submit:"إرسال",messageNotDelivered:"لم يتم الإرسال",retrySend:"إعادة المحاولة",emailRequired:"الرجاء إدخال بريدك الإلكتروني",nameRequired:"الرجاء إدخال اسمك",phoneRequired:"الرجاء إدخال رقم هاتفك",fieldRequiredSuffix:"مطلوب",emailInvalid:"الرجاء إدخال بريد إلكتروني صالح",nameInvalid:"الرجاء إدخال اسم صالح",phoneInvalid:"الرجاء إدخال رقم هاتف صالح"},es:{agentJoinedConversation:"{name} se ha unido a la conversación",handedOffToTeam:"Tu conversación se ha pasado a nuestro equipo",handedOffStatus:"Nuestro equipo responderá aquí",connectionError:"Lo sentimos, estoy teniendo problemas de conexión en este momento. Inténtalo de nuevo.",micDenied:"No pudimos acceder a tu micrófono. Permite el acceso e inténtalo de nuevo.",micNotFound:"No se encontró ningún micrófono. Conecta uno e inténtalo de nuevo.",voiceUnavailable:"La voz no está disponible en este momento. Inténtalo de nuevo.",chooseTopicLabel:"Elige un tema para empezar:",categoryTopicsHeading:"Por favor, haz tu pregunta sobre **{category}** a continuación.",quickQuestionsHeadingLabel:"O haz una pregunta rápida:",typeYourMessage:"Escribe tu mensaje...",agentIsLoading:"El agente está cargando...",conversationResolved:"Conversación resuelta",howWasYourExperience:"¿Cómo fue tu experiencia?",feedbackPrompt:"Califica nuestro soporte para ayudarnos a mejorar.",feedbackPlaceholder:"Cuéntanos más sobre tu experiencia...",submitFeedback:"Enviar comentarios",submitting:"Enviando...",selectRatingFirst:"Primero selecciona una calificación",pleaseSubmitRatingFirst:"Por favor, envía tu calificación primero.",completeOnboardingToEnableVoice:"Completa la configuración para habilitar la voz",sendMessageToCompleteOnboarding:"Envía un mensaje para completar la configuración y habilitar la voz.",resolve:"Resolver",scrollLeft:"Desplazar a la izquierda",scrollRight:"Desplazar a la derecha",sendMessage:"Enviar mensaje",voiceSessionLive:"Sesión de voz activa - habla o escribe para conversar.",connectingVoice:"Conectando a la sesión de voz...",poweredBy:"Desarrollado por",menu:"Menú",close:"Cerrar",openChat:"Abrir chat",closeChat:"Cerrar chat",lightMode:"Modo claro",nightMode:"Modo oscuro",refreshChat:"Actualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sesión de voz...",allowMicAccess:"Permitir acceso al micrófono",emailRequired:"Introduce tu correo electrónico",nameRequired:"Introduce tu nombre",phoneRequired:"Introduce tu número de teléfono",fieldRequiredSuffix:"es un campo obligatorio",emailInvalid:"Introduce un correo electrónico válido",nameInvalid:"Introduce un nombre válido",phoneInvalid:"Introduce un número de teléfono válido"},be:{connectionError:"Прабачце, зараз узнікаюць праблемы з падключэннем. Паспрабуйце яшчэ раз.",micDenied:"Не ўдалося атрымаць доступ да мікрафона. Дазвольце доступ і паспрабуйце яшчэ раз.",micNotFound:"Мікрафон не знойдзены. Падключыце яго і паспрабуйце яшчэ раз.",voiceUnavailable:"Галасавая функцыя зараз недаступная. Паспрабуйце яшчэ раз.",chooseTopicLabel:"Выберыце тэму, каб пачаць:",categoryTopicsHeading:"Калі ласка, задайце сваё пытанне пра **{category}** ніжэй.",quickQuestionsHeadingLabel:"Або задайце хуткае пытанне:",typeYourMessage:"Увядзіце паведамленне...",agentIsLoading:"Агент загружаецца...",conversationResolved:"Размова завершана",howWasYourExperience:"Як прайшоў ваш досвед?",feedbackPrompt:"Калі ласка, ацаніце нашу падтрымку, каб дапамагчы нам стаць лепш.",feedbackPlaceholder:"Раскажыце нам больш пра свой досвед...",submitFeedback:"Адправіць водгук",submitting:"Адпраўка...",selectRatingFirst:"Спачатку абярыце ацэнку",pleaseSubmitRatingFirst:"Калі ласка, спачатку адпраўце сваю ацэнку.",completeOnboardingToEnableVoice:"Завяршыце ўводны этап, каб уключыць голас",sendMessageToCompleteOnboarding:"Адпраўце паведамленне, каб завяршыць уводны этап і ўключыць голас.",resolve:"Завяршыць",scrollLeft:"Пракруціць улева",scrollRight:"Пракруціць управа",sendMessage:"Адправіць паведамленне",voiceSessionLive:"Галасавая сесія актыўная - гаварыце або пішыце.",connectingVoice:"Злучэнне з галасавой сесіяй...",poweredBy:"Працуе на",menu:"Меню",close:"Закрыць",openChat:"Адкрыць чат",closeChat:"Закрыць чат",lightMode:"Светлы рэжым",nightMode:"Цёмны рэжым",refreshChat:"Абнавіць чат",copyChat:"Капіраваць чат",startChat:"Пачаць чат",startingVoiceSession:"Запуск галасавой сесіі...",allowMicAccess:"Дазволіць доступ да мікрафона",emailRequired:"Калі ласка, увядзіце адрас электроннай пошты",nameRequired:"Калі ласка, увядзіце ваша імя",phoneRequired:"Калі ласка, увядзіце нумар тэлефона",fieldRequiredSuffix:"(абавязковае поле)",emailInvalid:"Калі ласка, увядзіце сапраўдны адрас электроннай пошты",nameInvalid:"Калі ласка, увядзіце сапраўднае імя",phoneInvalid:"Калі ласка, увядзіце сапраўдны нумар тэлефона"},bs:{connectionError:"Izvinite, trenutno imam problema s povezivanjem. Pokušajte ponovo.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dozvolite pristup i pokušajte ponovo.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovo.",voiceUnavailable:"Glasovna funkcija trenutno nije dostupna. Pokušajte ponovo.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** ispod.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite vašu poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o vašem iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite vašu ocjenu.",completeOnboardingToEnableVoice:"Završite registraciju da omogućite glas",sendMessageToCompleteOnboarding:"Pošaljite poruku da završite registraciju i omogućite glas.",resolve:"Završi",scrollLeft:"Pomjeri lijevo",scrollRight:"Pomjeri desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Meni",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Započni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dozvoli pristup mikrofonu",emailRequired:"Unesite svoju email adresu",nameRequired:"Unesite svoje ime",phoneRequired:"Unesite svoj broj telefona",fieldRequiredSuffix:"(obavezno polje)",emailInvalid:"Unesite ispravnu email adresu",nameInvalid:"Unesite ispravno ime",phoneInvalid:"Unesite ispravan broj telefona"},bg:{connectionError:"Съжалявам, в момента имам проблеми с връзката. Опитайте отново.",micDenied:"Не успяхме да получим достъп до микрофона ви. Разрешете достъпа и опитайте отново.",micNotFound:"Не е намерен микрофон. Свържете микрофон и опитайте отново.",voiceUnavailable:"Гласовата функция не е достъпна в момента. Опитайте отново.",chooseTopicLabel:"Изберете тема, за да започнете:",categoryTopicsHeading:"Моля, задайте въпроса си за **{category}** по-долу.",quickQuestionsHeadingLabel:"Или задайте бърз въпрос:",typeYourMessage:"Въведете съобщението си...",agentIsLoading:"Агентът се зарежда...",conversationResolved:"Разговорът е приключен",howWasYourExperience:"Как беше вашето изживяване?",feedbackPrompt:"Моля, оценете нашата поддръжка, за да ни помогнете да се подобрим.",feedbackPlaceholder:"Разкажете ни повече за вашето изживяване...",submitFeedback:"Изпрати отзив",submitting:"Изпращане...",selectRatingFirst:"Първо изберете оценка",pleaseSubmitRatingFirst:"Моля, първо изпратете оценката си.",completeOnboardingToEnableVoice:"Завършете регистрацията, за да активирате гласа",sendMessageToCompleteOnboarding:"Изпратете съобщение, за да завършите регистрацията и активирате гласа.",resolve:"Приключи",scrollLeft:"Превърти наляво",scrollRight:"Превърти надясно",sendMessage:"Изпрати съобщение",voiceSessionLive:"Гласовата сесия е активна - говорете или пишете.",connectingVoice:"Свързване с гласова сесия...",poweredBy:"Задвижвано от",menu:"Меню",close:"Затвори",openChat:"Отвори чат",closeChat:"Затвори чат",lightMode:"Светъл режим",nightMode:"Тъмен режим",refreshChat:"Опресни чата",copyChat:"Копирай чата",startChat:"Започни чат",startingVoiceSession:"Стартиране на гласова сесия...",allowMicAccess:"Позволете достъп до микрофона",emailRequired:"Моля, въведете имейл адреса си",nameRequired:"Моля, въведете вашето име",phoneRequired:"Моля, въведете телефонния си номер",fieldRequiredSuffix:"(задължително поле)",emailInvalid:"Моля, въведете валиден имейл адрес",nameInvalid:"Моля, въведете валидно име",phoneInvalid:"Моля, въведете валиден телефонен номер"},my:{connectionError:"ဝမ်းနည်းပါသည်၊ ယခု ချိတ်ဆက်ရာတွင် အခက်အခဲရှိနေပါသည်။ ထပ်မံကြိုးစားပါ။",micDenied:"သင့်မိုက်ခရိုဖုန်းကို အသုံးပြုခွင့် မရနိုင်ပါ။ ခွင့်ပြုပြီး ထပ်မံကြိုးစားပါ။",micNotFound:"မိုက်ခရိုဖုန်း မတွေ့ပါ။ ချိတ်ဆက်ပြီး ထပ်မံကြိုးစားပါ။",voiceUnavailable:"အသံလုပ်ဆောင်ချက် ယခုအချိန် မရနိုင်ပါ။ ထပ်မံကြိုးစားပါ။",chooseTopicLabel:"စတင်ရန် ခေါင်းစဉ်တစ်ခု ရွေးချယ်ပါ:",categoryTopicsHeading:"ကျေးဇူးပြု၍ သင်၏ **{category}** မေးခွန်းကို အောက်တွင် မေးပါ။",quickQuestionsHeadingLabel:"သို့မဟုတ် မြန်ဆန်သော မေးခွန်းတစ်ခု မေးပါ:",typeYourMessage:"သင့်မက်ဆေ့ချ်ကို ရိုက်ထည့်ပါ...",agentIsLoading:"အေးဂျင့်ကို ဖွင့်နေသည်...",conversationResolved:"စကားဝိုင်း ပြီးစီးပြီ",howWasYourExperience:"သင့်အတွေ့အကြုံ မည်သို့ရှိခဲ့သနည်း?",feedbackPrompt:"ကျွန်ုပ်တို့၏ ဝန်ဆောင်မှုကို အဆင့်သတ်မှတ်ပေးပါ။",feedbackPlaceholder:"သင့်အတွေ့အကြုံအကြောင်း ပိုမိုပြောပြပါ...",submitFeedback:"တုံ့ပြန်ချက် ပေးပို့ရန်",submitting:"ပေးပို့နေသည်...",selectRatingFirst:"အရင်ဆုံး အဆင့်ရွေးပါ",pleaseSubmitRatingFirst:"ကျေးဇူးပြု၍ အဆင့်ကို အရင်ဆုံးပို့ပါ။",completeOnboardingToEnableVoice:"အသံကို ဖွင့်ရန် မိတ်ဆက်ခြင်းကို ပြီးဆုံးပါ",sendMessageToCompleteOnboarding:"မိတ်ဆက်ခြင်းကို ပြီးဆုံးပြီး အသံဖွင့်ရန် မက်ဆေ့ချ်ပို့ပါ။",resolve:"ပြီးဆုံး",scrollLeft:"ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollRight:"ညာဘက်သို့ ရွှေ့ပါ",sendMessage:"မက်ဆေ့ချ်ပို့ရန်",voiceSessionLive:"အသံစီရင်ချက် တက်ကြွနေသည် - ပြောပါ သို့မဟုတ် ရိုက်ပါ။",connectingVoice:"အသံစီရင်ချက်သို့ ချိတ်ဆက်နေသည်...",poweredBy:"လုပ်ဆောင်ပေးသူ",menu:"မီနူး",close:"ပိတ်",openChat:"ချတ်ဖွင့်",closeChat:"ချတ်ပိတ်",lightMode:"အလင်းမုဒ်",nightMode:"အမှောင်မုဒ်",refreshChat:"ချတ်ပြန်လည်ရယူ",copyChat:"ချတ်ကူးယူ",startChat:"ချတ်စတင်",startingVoiceSession:"အသံစီရင်ချက် စတင်နေသည်...",allowMicAccess:"မိုက်ခရိုဖုန်း ဝင်ရောက်ခွင့်ပြုပါ",emailRequired:"ကျေးဇူးပြု၍ သင့်အီးမေးလ်လိပ်စာကို ထည့်ပါ",nameRequired:"ကျေးဇူးပြု၍ သင့်အမည်ကို ထည့်ပါ",phoneRequired:"ကျေးဇူးပြု၍ သင့်ဖုန်းနံပါတ်ကို ထည့်ပါ",fieldRequiredSuffix:"ဖြည့်ရန် လိုအပ်ပါသည်",emailInvalid:"ကျေးဇူးပြု၍ မှန်ကန်သော အီးမေးလ်လိပ်စာကို ထည့်ပါ",nameInvalid:"ကျေးဇူးပြု၍ မှန်ကန်သော အမည်ကို ထည့်ပါ",phoneInvalid:"ကျေးဇူးပြု၍ မှန်ကန်သော ဖုန်းနံပါတ်ကို ထည့်ပါ"},ca:{connectionError:"Ho sentim, ara mateix tinc problemes de connexió. Torna-ho a provar.",micDenied:"No hem pogut accedir al teu micròfon. Permet l'accés i torna-ho a provar.",micNotFound:"No s'ha trobat cap micròfon. Connecta'n un i torna-ho a provar.",voiceUnavailable:"La veu no està disponible ara mateix. Torna-ho a provar.",chooseTopicLabel:"Tria un tema per començar:",categoryTopicsHeading:"Si us plau, fes la teva pregunta sobre **{category}** a continuació.",quickQuestionsHeadingLabel:"O fes una pregunta ràpida:",typeYourMessage:"Escriu el teu missatge...",agentIsLoading:"L'agent està carregant...",conversationResolved:"Conversa resolta",howWasYourExperience:"Com ha estat la teva experiència?",feedbackPrompt:"Si us plau, valora el nostre suport per ajudar-nos a millorar.",feedbackPlaceholder:"Explica'ns més sobre la teva experiència...",submitFeedback:"Enviar comentaris",submitting:"Enviant...",selectRatingFirst:"Primer selecciona una valoració",pleaseSubmitRatingFirst:"Si us plau, envia primer la teva valoració.",completeOnboardingToEnableVoice:"Completa la configuració per activar la veu",sendMessageToCompleteOnboarding:"Envia un missatge per completar la configuració i activar la veu.",resolve:"Resoldre",scrollLeft:"Desplaçar a l'esquerra",scrollRight:"Desplaçar a la dreta",sendMessage:"Enviar missatge",voiceSessionLive:"Sessió de veu activa - parla o escriu per conversar.",connectingVoice:"Connectant a la sessió de veu...",poweredBy:"Impulsat per",menu:"Menú",close:"Tancar",openChat:"Obrir xat",closeChat:"Tancar xat",lightMode:"Mode clar",nightMode:"Mode fosc",refreshChat:"Actualitzar xat",copyChat:"Copiar xat",startChat:"Iniciar xat",startingVoiceSession:"Iniciant sessió de veu...",allowMicAccess:"Permetre accés al micròfon",emailRequired:"Introdueix el teu correu electrònic",nameRequired:"Introdueix el teu nom",phoneRequired:"Introdueix el teu número de telèfon",fieldRequiredSuffix:"és un camp obligatori",emailInvalid:"Introdueix un correu electrònic vàlid",nameInvalid:"Introdueix un nom vàlid",phoneInvalid:"Introdueix un número de telèfon vàlid"},zh:{agentJoinedConversation:"{name} 已加入对话",handedOffToTeam:"您的对话已转交给我们的团队",handedOffStatus:"我们的团队将在此回复",connectionError:"抱歉,我现在连接遇到问题。请重试。",micDenied:"无法访问您的麦克风。请允许访问后重试。",micNotFound:"未检测到麦克风。请连接麦克风后重试。",voiceUnavailable:"语音功能当前不可用。请重试。",chooseTopicLabel:"选择一个主题开始:",categoryTopicsHeading:"请在下方提出您关于 **{category}** 的问题。",quickQuestionsHeadingLabel:"或者提一个快速问题:",typeYourMessage:"输入您的消息...",agentIsLoading:"客服正在加载...",conversationResolved:"对话已结束",howWasYourExperience:"您的体验如何?",feedbackPrompt:"请为我们的支持评分,帮助我们改进。",feedbackPlaceholder:"告诉我们更多关于您的体验...",submitFeedback:"提交反馈",submitting:"提交中...",selectRatingFirst:"请先选择评分",pleaseSubmitRatingFirst:"请先提交您的评分。",completeOnboardingToEnableVoice:"完成引导以启用语音",sendMessageToCompleteOnboarding:"发送消息完成引导并启用语音。",resolve:"结束",scrollLeft:"向左滚动",scrollRight:"向右滚动",sendMessage:"发送消息",voiceSessionLive:"语音会话进行中 - 请说话或输入。",connectingVoice:"正在连接语音会话...",poweredBy:"技术支持",menu:"菜单",close:"关闭",openChat:"打开聊天",closeChat:"关闭聊天",lightMode:"浅色模式",nightMode:"深色模式",refreshChat:"刷新聊天",copyChat:"复制聊天",startChat:"开始聊天",startingVoiceSession:"正在启动语音会话...",allowMicAccess:"允许访问麦克风",emailRequired:"请输入您的电子邮箱地址",nameRequired:"请输入您的姓名",phoneRequired:"请输入您的电话号码",fieldRequiredSuffix:"为必填项",emailInvalid:"请输入有效的电子邮箱地址",nameInvalid:"请输入有效的姓名",phoneInvalid:"请输入有效的电话号码"},hr:{connectionError:"Nažalost, trenutno imam problema s povezivanjem. Pokušajte ponovno.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dopustite pristup i pokušajte ponovno.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovno.",voiceUnavailable:"Glasovna funkcija trenutačno nije dostupna. Pokušajte ponovno.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** u nastavku.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite svoju poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o svom iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite ocjenu.",completeOnboardingToEnableVoice:"Dovršite uvod za omogućavanje glasa",sendMessageToCompleteOnboarding:"Pošaljite poruku da dovršite uvod i omogućite glas.",resolve:"Završi",scrollLeft:"Pomakni lijevo",scrollRight:"Pomakni desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Izbornik",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Pokreni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dopustite pristup mikrofonu",emailRequired:"Unesite svoju adresu e-pošte",nameRequired:"Unesite svoje ime",phoneRequired:"Unesite svoj broj telefona",fieldRequiredSuffix:"(obavezno polje)",emailInvalid:"Unesite valjanu adresu e-pošte",nameInvalid:"Unesite valjano ime",phoneInvalid:"Unesite valjan broj telefona"},cs:{connectionError:"Omlouváme se, momentálně mám problémy s připojením. Zkuste to prosím znovu.",micDenied:"Nepodařilo se získat přístup k mikrofonu. Povolte přístup a zkuste to znovu.",micNotFound:"Mikrofon nebyl nalezen. Připojte jej a zkuste to znovu.",voiceUnavailable:"Hlasová funkce není momentálně dostupná. Zkuste to znovu.",chooseTopicLabel:"Vyberte téma a začněte:",categoryTopicsHeading:"Prosím, položte svou otázku ohledně **{category}** níže.",quickQuestionsHeadingLabel:"Nebo položte rychlou otázku:",typeYourMessage:"Napište zprávu...",agentIsLoading:"Agent se načítá...",conversationResolved:"Konverzace ukončena",howWasYourExperience:"Jaká byla vaše zkušenost?",feedbackPrompt:"Ohodnoťte prosím naši podporu, abychom se mohli zlepšit.",feedbackPlaceholder:"Řekněte nám více o své zkušenosti...",submitFeedback:"Odeslat zpětnou vazbu",submitting:"Odesílání...",selectRatingFirst:"Nejprve vyberte hodnocení",pleaseSubmitRatingFirst:"Nejprve prosím odešlete své hodnocení.",completeOnboardingToEnableVoice:"Dokončete úvod pro povolení hlasu",sendMessageToCompleteOnboarding:"Odešlete zprávu pro dokončení úvodu a povolení hlasu.",resolve:"Dokončit",scrollLeft:"Posunout doleva",scrollRight:"Posunout doprava",sendMessage:"Odeslat zprávu",voiceSessionLive:"Hlasová relace je aktivní - mluvte nebo pište.",connectingVoice:"Připojování k hlasové relaci...",poweredBy:"Používá",menu:"Nabídka",close:"Zavřít",openChat:"Otevřít chat",closeChat:"Zavřít chat",lightMode:"Světlý režim",nightMode:"Tmavý režim",refreshChat:"Obnovit chat",copyChat:"Kopírovat chat",startChat:"Začít chat",startingVoiceSession:"Spouštění hlasové relace...",allowMicAccess:"Povolit přístup k mikrofonu",emailRequired:"Zadejte svou e-mailovou adresu",nameRequired:"Zadejte své jméno",phoneRequired:"Zadejte své telefonní číslo",fieldRequiredSuffix:"(povinné pole)",emailInvalid:"Zadejte platnou e-mailovou adresu",nameInvalid:"Zadejte platné jméno",phoneInvalid:"Zadejte platné telefonní číslo"},da:{connectionError:"Beklager, jeg har problemer med at oprette forbindelse lige nu. Prøv igen.",micDenied:"Vi kunne ikke få adgang til din mikrofon. Tillad adgang og prøv igen.",micNotFound:"Der blev ikke fundet nogen mikrofon. Tilslut en og prøv igen.",voiceUnavailable:"Stemme er ikke tilgængelig lige nu. Prøv igen.",chooseTopicLabel:"Vælg et emne for at komme i gang:",categoryTopicsHeading:"Stil venligst dit spørgsmål om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller stil et hurtigt spørgsmål:",typeYourMessage:"Skriv din besked...",agentIsLoading:"Agenten indlæses...",conversationResolved:"Samtale afsluttet",howWasYourExperience:"Hvordan var din oplevelse?",feedbackPrompt:"Bedøm venligst vores support for at hjælpe os med at blive bedre.",feedbackPlaceholder:"Fortæl os mere om din oplevelse...",submitFeedback:"Indsend feedback",submitting:"Sender...",selectRatingFirst:"Vælg først en vurdering",pleaseSubmitRatingFirst:"Indsend venligst din vurdering først.",completeOnboardingToEnableVoice:"Fuldfør onboarding for at aktivere stemme",sendMessageToCompleteOnboarding:"Send en besked for at fuldføre onboarding og aktivere stemme.",resolve:"Afslut",scrollLeft:"Rul til venstre",scrollRight:"Rul til højre",sendMessage:"Send besked",voiceSessionLive:"Stemmesession aktiv - tal eller skriv for at samtale.",connectingVoice:"Forbinder til stemmesession...",poweredBy:"Drevet af",menu:"Menu",close:"Luk",openChat:"Åbn chat",closeChat:"Luk chat",lightMode:"Lys tilstand",nightMode:"Mørk tilstand",refreshChat:"Opdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter stemmesession...",allowMicAccess:"Tillad mikrofonadgang",emailRequired:"Indtast din e-mailadresse",nameRequired:"Indtast dit navn",phoneRequired:"Indtast dit telefonnummer",fieldRequiredSuffix:"er påkrævet",emailInvalid:"Indtast en gyldig e-mailadresse",nameInvalid:"Indtast et gyldigt navn",phoneInvalid:"Indtast et gyldigt telefonnummer"},nl:{agentJoinedConversation:"{name} neemt deel aan het gesprek",handedOffToTeam:"Uw gesprek is doorgegeven aan ons team",handedOffStatus:"Ons team reageert hier",connectionError:"Sorry, ik heb momenteel verbindingsproblemen. Probeer het opnieuw.",micDenied:"We konden geen toegang krijgen tot je microfoon. Geef toegang en probeer het opnieuw.",micNotFound:"Geen microfoon gevonden. Sluit een microfoon aan en probeer het opnieuw.",voiceUnavailable:"Spraak is momenteel niet beschikbaar. Probeer het opnieuw.",chooseTopicLabel:"Kies een onderwerp om te beginnen:",categoryTopicsHeading:"Stel hieronder uw vraag over **{category}**.",quickQuestionsHeadingLabel:"Of stel een snelle vraag:",typeYourMessage:"Typ je bericht...",agentIsLoading:"Agent wordt geladen...",conversationResolved:"Gesprek beëindigd",howWasYourExperience:"Hoe was je ervaring?",feedbackPrompt:"Beoordeel onze service om ons te helpen verbeteren.",feedbackPlaceholder:"Vertel ons meer over je ervaring...",submitFeedback:"Feedback versturen",submitting:"Versturen...",selectRatingFirst:"Selecteer eerst een beoordeling",pleaseSubmitRatingFirst:"Dien eerst je beoordeling in.",completeOnboardingToEnableVoice:"Voltooi de onboarding om spraak in te schakelen",sendMessageToCompleteOnboarding:"Verstuur een bericht om de onboarding te voltooien en spraak in te schakelen.",resolve:"Afronden",scrollLeft:"Naar links scrollen",scrollRight:"Naar rechts scrollen",sendMessage:"Bericht versturen",voiceSessionLive:"Spraaksessie actief - spreek of typ om te converseren.",connectingVoice:"Verbinden met spraaksessie...",poweredBy:"Mogelijk gemaakt door",menu:"Menu",close:"Sluiten",openChat:"Chat openen",closeChat:"Chat sluiten",lightMode:"Lichte modus",nightMode:"Donkere modus",refreshChat:"Chat vernieuwen",copyChat:"Chat kopiëren",startChat:"Chat starten",startingVoiceSession:"Spraaksessie starten...",allowMicAccess:"Toegang tot microfoon toestaan",emailRequired:"Voer uw e-mailadres in",nameRequired:"Voer uw naam in",phoneRequired:"Voer uw telefoonnummer in",fieldRequiredSuffix:"is verplicht",emailInvalid:"Voer een geldig e-mailadres in",nameInvalid:"Voer een geldige naam in",phoneInvalid:"Voer een geldig telefoonnummer in"},et:{connectionError:"Kahjuks on mul praegu ühendusprobleeme. Palun proovige uuesti.",micDenied:"Mikrofonile ei pääsenud ligi. Lubage juurdepääs ja proovige uuesti.",micNotFound:"Mikrofoni ei leitud. Ühendage mikrofon ja proovige uuesti.",voiceUnavailable:"Hääl ei ole praegu saadaval. Palun proovige uuesti.",chooseTopicLabel:"Vali alustamiseks teema:",categoryTopicsHeading:"Palun esita oma **{category}** küsimus allpool.",quickQuestionsHeadingLabel:"Või esita kiire küsimus:",typeYourMessage:"Sisesta oma sõnum...",agentIsLoading:"Agent laeb...",conversationResolved:"Vestlus lõpetatud",howWasYourExperience:"Kuidas oli teie kogemus?",feedbackPrompt:"Palun hinnake meie tuge, et aidata meil paremaks saada.",feedbackPlaceholder:"Rääkige meile oma kogemusest rohkem...",submitFeedback:"Saada tagasiside",submitting:"Saatmine...",selectRatingFirst:"Vali esmalt hinnang",pleaseSubmitRatingFirst:"Palun esita esmalt oma hinnang.",completeOnboardingToEnableVoice:"Häälefunktsiooni lubamiseks lõpeta sissejuhatus",sendMessageToCompleteOnboarding:"Saada sõnum, et lõpetada sissejuhatus ja lubada hääl.",resolve:"Lõpeta",scrollLeft:"Keri vasakule",scrollRight:"Keri paremale",sendMessage:"Saada sõnum",voiceSessionLive:"Häälseanss aktiivne - rääkige või kirjutage.",connectingVoice:"Ühendamine häälseansiga...",poweredBy:"Võimaldab",menu:"Menüü",close:"Sulge",openChat:"Ava vestlus",closeChat:"Sulge vestlus",lightMode:"Hele režiim",nightMode:"Tume režiim",refreshChat:"Värskenda vestlust",copyChat:"Kopeeri vestlus",startChat:"Alusta vestlust",startingVoiceSession:"Häälseansi käivitamine...",allowMicAccess:"Luba mikrofoni juurdepääs",emailRequired:"Sisestage oma e-posti aadress",nameRequired:"Sisestage oma nimi",phoneRequired:"Sisestage oma telefoninumber",fieldRequiredSuffix:"on kohustuslik",emailInvalid:"Sisestage kehtiv e-posti aadress",nameInvalid:"Sisestage kehtiv nimi",phoneInvalid:"Sisestage kehtiv telefoninumber"},fi:{connectionError:"Pahoittelut, minulla on nyt yhteysongelmia. Yritä uudelleen.",micDenied:"Mikrofoniin ei saatu yhteyttä. Salli käyttöoikeus ja yritä uudelleen.",micNotFound:"Mikrofonia ei löytynyt. Liitä mikrofoni ja yritä uudelleen.",voiceUnavailable:"Ääni ei ole juuri nyt käytettävissä. Yritä uudelleen.",chooseTopicLabel:"Aloita valitsemalla aihe:",categoryTopicsHeading:"Esitä **{category}**-kysymyksesi alla.",quickQuestionsHeadingLabel:"Tai esitä nopea kysymys:",typeYourMessage:"Kirjoita viestisi...",agentIsLoading:"Agenttia ladataan...",conversationResolved:"Keskustelu päättynyt",howWasYourExperience:"Millainen kokemuksesi oli?",feedbackPrompt:"Arvioi tukipalveluamme auttaaksesi meitä kehittymään.",feedbackPlaceholder:"Kerro lisää kokemuksestasi...",submitFeedback:"Lähetä palaute",submitting:"Lähetetään...",selectRatingFirst:"Valitse ensin arvio",pleaseSubmitRatingFirst:"Lähetä arviosi ensin.",completeOnboardingToEnableVoice:"Suorita perehdytys ottaaksesi äänen käyttöön",sendMessageToCompleteOnboarding:"Lähetä viesti suorittaaksesi perehdytyksen ja ottaaksesi äänen käyttöön.",resolve:"Lopeta",scrollLeft:"Vieritä vasemmalle",scrollRight:"Vieritä oikealle",sendMessage:"Lähetä viesti",voiceSessionLive:"Ääni-istunto aktiivinen - puhu tai kirjoita.",connectingVoice:"Yhdistetään ääni-istuntoon...",poweredBy:"Toimittaa",menu:"Valikko",close:"Sulje",openChat:"Avaa chat",closeChat:"Sulje chat",lightMode:"Vaalea tila",nightMode:"Tumma tila",refreshChat:"Päivitä chat",copyChat:"Kopioi chat",startChat:"Aloita chat",startingVoiceSession:"Käynnistetään ääni-istuntoa...",allowMicAccess:"Salli mikrofonin käyttö",emailRequired:"Anna sähköpostiosoitteesi",nameRequired:"Anna nimesi",phoneRequired:"Anna puhelinnumerosi",fieldRequiredSuffix:"on pakollinen",emailInvalid:"Anna kelvollinen sähköpostiosoite",nameInvalid:"Anna kelvollinen nimi",phoneInvalid:"Anna kelvollinen puhelinnumero"},fr:{agentJoinedConversation:"{name} a rejoint la conversation",handedOffToTeam:"Votre conversation a été transmise à notre équipe",handedOffStatus:"Notre équipe vous répondra ici",connectionError:"Désolé, je rencontre des problèmes de connexion en ce moment. Veuillez réessayer.",micDenied:"Nous n'avons pas pu accéder à votre microphone. Autorisez l'accès et réessayez.",micNotFound:"Aucun microphone détecté. Connectez-en un et réessayez.",voiceUnavailable:"La voix n'est pas disponible pour le moment. Veuillez réessayer.",chooseTopicLabel:"Choisissez un sujet pour commencer :",categoryTopicsHeading:"Veuillez poser votre question sur **{category}** ci-dessous.",quickQuestionsHeadingLabel:"Ou posez une question rapide :",typeYourMessage:"Tapez votre message...",agentIsLoading:"L'agent est en cours de chargement...",conversationResolved:"Conversation terminée",howWasYourExperience:"Comment s'est passée votre expérience ?",feedbackPrompt:"Veuillez évaluer notre support pour nous aider à nous améliorer.",feedbackPlaceholder:"Dites-nous en plus sur votre expérience...",submitFeedback:"Envoyer les commentaires",submitting:"Envoi en cours...",selectRatingFirst:"Sélectionnez d'abord une note",pleaseSubmitRatingFirst:"Veuillez d'abord envoyer votre note.",completeOnboardingToEnableVoice:"Terminez l'intégration pour activer la voix",sendMessageToCompleteOnboarding:"Envoyez un message pour terminer l'intégration et activer la voix.",resolve:"Terminer",scrollLeft:"Faire défiler à gauche",scrollRight:"Faire défiler à droite",sendMessage:"Envoyer un message",voiceSessionLive:"Session vocale active - parlez ou tapez pour converser.",connectingVoice:"Connexion à la session vocale...",poweredBy:"Propulsé par",menu:"Menu",close:"Fermer",openChat:"Ouvrir le chat",closeChat:"Fermer le chat",lightMode:"Mode clair",nightMode:"Mode sombre",refreshChat:"Actualiser le chat",copyChat:"Copier le chat",startChat:"Commencer le chat",startingVoiceSession:"Démarrage de la session vocale...",allowMicAccess:"Autoriser l'accès au microphone",emailRequired:"Veuillez saisir votre adresse e-mail",nameRequired:"Veuillez saisir votre nom",phoneRequired:"Veuillez saisir votre numéro de téléphone",fieldRequiredSuffix:"est obligatoire",emailInvalid:"Veuillez saisir une adresse e-mail valide",nameInvalid:"Veuillez saisir un nom valide",phoneInvalid:"Veuillez saisir un numéro de téléphone valide"},de:{agentJoinedConversation:"{name} ist dem Gespräch beigetreten",handedOffToTeam:"Ihr Gespräch wurde an unser Team übergeben",handedOffStatus:"Unser Team antwortet Ihnen hier",connectionError:"Entschuldigung, ich habe gerade Verbindungsprobleme. Bitte versuchen Sie es erneut.",micDenied:"Wir konnten nicht auf Ihr Mikrofon zugreifen. Bitte erlauben Sie den Zugriff und versuchen Sie es erneut.",micNotFound:"Kein Mikrofon gefunden. Bitte schließen Sie eines an und versuchen Sie es erneut.",voiceUnavailable:"Sprache ist derzeit nicht verfügbar. Bitte versuchen Sie es erneut.",chooseTopicLabel:"Wählen Sie ein Thema, um zu beginnen:",categoryTopicsHeading:"Bitte stellen Sie Ihre Frage zu **{category}** unten.",quickQuestionsHeadingLabel:"Oder stellen Sie eine schnelle Frage:",typeYourMessage:"Geben Sie Ihre Nachricht ein...",agentIsLoading:"Agent wird geladen...",conversationResolved:"Gespräch beendet",howWasYourExperience:"Wie war Ihre Erfahrung?",feedbackPrompt:"Bitte bewerten Sie unseren Support, um uns bei der Verbesserung zu helfen.",feedbackPlaceholder:"Erzählen Sie uns mehr über Ihre Erfahrung...",submitFeedback:"Feedback senden",submitting:"Wird gesendet...",selectRatingFirst:"Wählen Sie zuerst eine Bewertung aus",pleaseSubmitRatingFirst:"Bitte senden Sie zuerst Ihre Bewertung.",completeOnboardingToEnableVoice:"Schließen Sie das Onboarding ab, um die Sprache zu aktivieren",sendMessageToCompleteOnboarding:"Senden Sie eine Nachricht, um das Onboarding abzuschließen und die Sprache zu aktivieren.",resolve:"Beenden",scrollLeft:"Nach links scrollen",scrollRight:"Nach rechts scrollen",sendMessage:"Nachricht senden",voiceSessionLive:"Sprachsitzung aktiv - sprechen oder tippen Sie.",connectingVoice:"Verbindung zur Sprachsitzung...",poweredBy:"Bereitgestellt von",menu:"Menü",close:"Schließen",openChat:"Chat öffnen",closeChat:"Chat schließen",lightMode:"Heller Modus",nightMode:"Dunkler Modus",refreshChat:"Chat aktualisieren",copyChat:"Chat kopieren",startChat:"Chat starten",startingVoiceSession:"Sprachsitzung wird gestartet...",allowMicAccess:"Mikrofonzugriff erlauben",emailRequired:"Bitte geben Sie Ihre E-Mail-Adresse ein",nameRequired:"Bitte geben Sie Ihren Namen ein",phoneRequired:"Bitte geben Sie Ihre Telefonnummer ein",fieldRequiredSuffix:"ist erforderlich",emailInvalid:"Bitte geben Sie eine gültige E-Mail-Adresse ein",nameInvalid:"Bitte geben Sie einen gültigen Namen ein",phoneInvalid:"Bitte geben Sie eine gültige Telefonnummer ein"},el:{connectionError:"Συγγνώμη, αντιμετωπίζω πρόβλημα σύνδεσης αυτή τη στιγμή. Δοκιμάστε ξανά.",micDenied:"Δεν μπορέσαμε να αποκτήσουμε πρόσβαση στο μικρόφωνό σας. Επιτρέψτε την πρόσβαση και δοκιμάστε ξανά.",micNotFound:"Δεν βρέθηκε μικρόφωνο. Συνδέστε ένα και δοκιμάστε ξανά.",voiceUnavailable:"Η φωνή δεν είναι διαθέσιμη αυτή τη στιγμή. Δοκιμάστε ξανά.",chooseTopicLabel:"Επιλέξτε ένα θέμα για να ξεκινήσετε:",categoryTopicsHeading:"Παρακαλώ κάντε την ερώτησή σας σχετικά με το **{category}** παρακάτω.",quickQuestionsHeadingLabel:"Ή κάντε μια γρήγορη ερώτηση:",typeYourMessage:"Πληκτρολογήστε το μήνυμά σας...",agentIsLoading:"Ο πράκτορας φορτώνει...",conversationResolved:"Η συζήτηση ολοκληρώθηκε",howWasYourExperience:"Πώς ήταν η εμπειρία σας;",feedbackPrompt:"Παρακαλούμε αξιολογήστε την υποστήριξή μας για να βελτιωθούμε.",feedbackPlaceholder:"Πείτε μας περισσότερα για την εμπειρία σας...",submitFeedback:"Υποβολή σχολίων",submitting:"Υποβολή...",selectRatingFirst:"Επιλέξτε πρώτα μια βαθμολογία",pleaseSubmitRatingFirst:"Υποβάλετε πρώτα τη βαθμολογία σας.",completeOnboardingToEnableVoice:"Ολοκληρώστε την εισαγωγή για ενεργοποίηση φωνής",sendMessageToCompleteOnboarding:"Στείλτε ένα μήνυμα για ολοκλήρωση της εισαγωγής και ενεργοποίηση φωνής.",resolve:"Ολοκλήρωση",scrollLeft:"Κύλιση αριστερά",scrollRight:"Κύλιση δεξιά",sendMessage:"Αποστολή μηνύματος",voiceSessionLive:"Φωνητική συνεδρία ενεργή - μιλήστε ή πληκτρολογήστε.",connectingVoice:"Σύνδεση σε φωνητική συνεδρία...",poweredBy:"Υποστηρίζεται από",menu:"Μενού",close:"Κλείσιμο",openChat:"Άνοιγμα συνομιλίας",closeChat:"Κλείσιμο συνομιλίας",lightMode:"Φωτεινή λειτουργία",nightMode:"Σκοτεινή λειτουργία",refreshChat:"Ανανέωση συνομιλίας",copyChat:"Αντιγραφή συνομιλίας",startChat:"Έναρξη συνομιλίας",startingVoiceSession:"Εκκίνηση φωνητικής συνεδρίας...",allowMicAccess:"Επιτρέψτε πρόσβαση στο μικρόφωνο",emailRequired:"Παρακαλώ εισαγάγετε τη διεύθυνση email σας",nameRequired:"Παρακαλώ εισαγάγετε το όνομά σας",phoneRequired:"Παρακαλώ εισαγάγετε τον αριθμό τηλεφώνου σας",fieldRequiredSuffix:"(υποχρεωτικό πεδίο)",emailInvalid:"Παρακαλώ εισαγάγετε μια έγκυρη διεύθυνση email",nameInvalid:"Παρακαλώ εισαγάγετε ένα έγκυρο όνομα",phoneInvalid:"Παρακαλώ εισαγάγετε έναν έγκυρο αριθμό τηλεφώνου"},hi:{connectionError:"क्षमा करें, मुझे अभी कनेक्ट होने में समस्या हो रही है। कृपया पुनः प्रयास करें।",micDenied:"हम आपके माइक्रोफ़ोन का उपयोग नहीं कर सके। कृपया अनुमति दें और पुनः प्रयास करें।",micNotFound:"कोई माइक्रोफ़ोन नहीं मिला। कृपया एक कनेक्ट करें और पुनः प्रयास करें।",voiceUnavailable:"वॉइस अभी उपलब्ध नहीं है। कृपया पुनः प्रयास करें।",chooseTopicLabel:"शुरू करने के लिए एक विषय चुनें:",categoryTopicsHeading:"कृपया अपना **{category}** प्रश्न नीचे पूछें।",quickQuestionsHeadingLabel:"या एक त्वरित प्रश्न पूछें:",typeYourMessage:"अपना संदेश लिखें...",agentIsLoading:"एजेंट लोड हो रहा है...",conversationResolved:"बातचीत समाप्त हुई",howWasYourExperience:"आपका अनुभव कैसा रहा?",feedbackPrompt:"हमें बेहतर बनाने में मदद के लिए कृपया हमारे समर्थन को रेट करें।",feedbackPlaceholder:"अपने अनुभव के बारे में और बताएं...",submitFeedback:"फीडबैक भेजें",submitting:"भेजा जा रहा है...",selectRatingFirst:"पहले रेटिंग चुनें",pleaseSubmitRatingFirst:"कृपया पहले अपनी रेटिंग जमा करें।",completeOnboardingToEnableVoice:"वॉयस सक्षम करने के लिए ऑनबोर्डिंग पूरी करें",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूरी करने और वॉयस सक्षम करने के लिए संदेश भेजें।",resolve:"समाप्त करें",scrollLeft:"बाएं स्क्रॉल करें",scrollRight:"दाएं स्क्रॉल करें",sendMessage:"संदेश भेजें",voiceSessionLive:"वॉयस सत्र सक्रिय - बात करने के लिए बोलें या टाइप करें।",connectingVoice:"वॉयस सत्र से कनेक्ट हो रहा है...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारा संचालित",menu:"मेनू",close:"बंद करें",openChat:"चैट खोलें",closeChat:"चैट बंद करें",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चैट रीफ्रेश करें",copyChat:"चैट कॉपी करें",startChat:"चैट शुरू करें",startingVoiceSession:"वॉयस सत्र शुरू हो रहा है...",allowMicAccess:"माइक्रोफ़ोन एक्सेस की अनुमति दें",emailRequired:"कृपया अपना ईमेल पता दर्ज करें",nameRequired:"कृपया अपना नाम दर्ज करें",phoneRequired:"कृपया अपना फ़ोन नंबर दर्ज करें",fieldRequiredSuffix:"आवश्यक है",emailInvalid:"कृपया एक मान्य ईमेल पता दर्ज करें",nameInvalid:"कृपया एक मान्य नाम दर्ज करें",phoneInvalid:"कृपया एक मान्य फ़ोन नंबर दर्ज करें"},mr:{connectionError:"क्षमस्व, सध्या कनेक्ट होण्यात अडचण येत आहे. कृपया पुन्हा प्रयत्न करा.",micDenied:"आम्ही तुमचा मायक्रोफोन वापरू शकलो नाही. कृपया परवानगी द्या आणि पुन्हा प्रयत्न करा.",micNotFound:"मायक्रोफोन आढळला नाही. कृपया एक जोडा आणि पुन्हा प्रयत्न करा.",voiceUnavailable:"व्हॉइस सध्या उपलब्ध नाही. कृपया पुन्हा प्रयत्न करा.",chooseTopicLabel:"सुरू करण्यासाठी एक विषय निवडा:",categoryTopicsHeading:"कृपया तुमचा **{category}** प्रश्न खाली विचारा.",quickQuestionsHeadingLabel:"किंवा एक झटपट प्रश्न विचारा:",typeYourMessage:"तुमचा संदेश टाइप करा...",agentIsLoading:"एजंट लोड होत आहे...",conversationResolved:"संभाषण समाप्त",howWasYourExperience:"तुमचा अनुभव कसा होता?",feedbackPrompt:"आम्हाला सुधारण्यास मदत करण्यासाठी कृपया आमच्या समर्थनाला रेट करा.",feedbackPlaceholder:"तुमच्या अनुभवाबद्दल आम्हाला अधिक सांगा...",submitFeedback:"फीडबॅक सबमिट करा",submitting:"सबमिट करत आहे...",selectRatingFirst:"प्रथम रेटिंग निवडा",pleaseSubmitRatingFirst:"कृपया प्रथम आपले रेटिंग सबमिट करा.",completeOnboardingToEnableVoice:"व्हॉइस सक्षम करण्यासाठी ऑनबोर्डिंग पूर्ण करा",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूर्ण करून व्हॉइस सक्षम करण्यासाठी संदेश पाठवा.",resolve:"समाप्त",scrollLeft:"डावीकडे स्क्रोल करा",scrollRight:"उजवीकडे स्क्रोल करा",sendMessage:"संदेश पाठवा",voiceSessionLive:"व्हॉइस सत्र सक्रिय - बोला किंवा टाइप करा.",connectingVoice:"व्हॉइस सत्रास जोडत आहे...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारे समर्थित",menu:"मेनू",close:"बंद करा",openChat:"चॅट उघडा",closeChat:"चॅट बंद करा",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चॅट रीफ्रेश करा",copyChat:"चॅट कॉपी करा",startChat:"चॅट सुरू करा",startingVoiceSession:"व्हॉइस सत्र सुरू होत आहे...",allowMicAccess:"मायक्रोफोन प्रवेशास परवानगी द्या",emailRequired:"कृपया आपला ईमेल पत्ता प्रविष्ट करा",nameRequired:"कृपया आपले नाव प्रविष्ट करा",phoneRequired:"कृपया आपला फोन नंबर प्रविष्ट करा",fieldRequiredSuffix:"आवश्यक आहे",emailInvalid:"कृपया वैध ईमेल पत्ता प्रविष्ट करा",nameInvalid:"कृपया वैध नाव प्रविष्ट करा",phoneInvalid:"कृपया वैध फोन नंबर प्रविष्ट करा"},hu:{connectionError:"Sajnáljuk, jelenleg kapcsolódási problémám van. Kérjük, próbálja újra.",micDenied:"Nem sikerült hozzáférni a mikrofonjához. Engedélyezze a hozzáférést, és próbálja újra.",micNotFound:"Nem található mikrofon. Csatlakoztasson egyet, és próbálja újra.",voiceUnavailable:"A hang jelenleg nem elérhető. Kérjük, próbálja újra.",chooseTopicLabel:"Válassz egy témát a kezdéshez:",categoryTopicsHeading:"Kérjük, tedd fel **{category}** kérdésedet alább.",quickQuestionsHeadingLabel:"Vagy tegyél fel egy gyors kérdést:",typeYourMessage:"Írja be az üzenetét...",agentIsLoading:"Az ügynök betöltődik...",conversationResolved:"Beszélgetés befejezve",howWasYourExperience:"Milyen volt az élménye?",feedbackPrompt:"Kérjük, értékelje támogatásunkat, hogy segítsen nekünk fejlődni.",feedbackPlaceholder:"Meséljen többet az élményéről...",submitFeedback:"Visszajelzés küldése",submitting:"Küldés...",selectRatingFirst:"Először válasszon értékelést",pleaseSubmitRatingFirst:"Kérjük, először küldje el értékelését.",completeOnboardingToEnableVoice:"Fejezze be a beállítást a hang engedélyezéséhez",sendMessageToCompleteOnboarding:"Küldjön üzenetet a beállítás befejezéséhez és a hang engedélyezéséhez.",resolve:"Befejezés",scrollLeft:"Balra görgetés",scrollRight:"Jobbra görgetés",sendMessage:"Üzenet küldése",voiceSessionLive:"Hangmenet aktív - beszéljen vagy írjon.",connectingVoice:"Csatlakozás hangmenet...",poweredBy:"Működteti",menu:"Menü",close:"Bezárás",openChat:"Csevegés megnyitása",closeChat:"Csevegés bezárása",lightMode:"Világos mód",nightMode:"Sötét mód",refreshChat:"Csevegés frissítése",copyChat:"Csevegés másolása",startChat:"Csevegés indítása",startingVoiceSession:"Hangmenet indítása...",allowMicAccess:"Mikrofon hozzáférés engedélyezése",emailRequired:"Adja meg az e-mail-címét",nameRequired:"Adja meg a nevét",phoneRequired:"Adja meg a telefonszámát",fieldRequiredSuffix:"megadása kötelező",emailInvalid:"Adjon meg egy érvényes e-mail-címet",nameInvalid:"Adjon meg egy érvényes nevet",phoneInvalid:"Adjon meg egy érvényes telefonszámot"},is:{connectionError:"Því miður næ ég ekki sambandi núna. Vinsamlegast prófaðu aftur.",micDenied:"Við fengum ekki aðgang að hljóðnemanum þínum. Leyfðu aðgang og prófaðu aftur.",micNotFound:"Enginn hljóðnemi fannst. Tengdu hljóðnema og prófaðu aftur.",voiceUnavailable:"Tal er ekki í boði núna. Vinsamlegast prófaðu aftur.",chooseTopicLabel:"Veldu efni til að byrja:",categoryTopicsHeading:"Vinsamlegast spurðu spurningu þinnar um **{category}** hér að neðan.",quickQuestionsHeadingLabel:"Eða spurðu fljótlegrar spurningar:",typeYourMessage:"Sláðu inn skilaboð...",agentIsLoading:"Fulltrúi hleðst...",conversationResolved:"Samtali lokið",howWasYourExperience:"Hvernig var upplifun þín?",feedbackPrompt:"Vinsamlegast metið þjónustu okkar til að hjálpa okkur að bæta okkur.",feedbackPlaceholder:"Segðu okkur meira um upplifun þína...",submitFeedback:"Senda umsögn",submitting:"Sendir...",selectRatingFirst:"Veldu fyrst einkunn",pleaseSubmitRatingFirst:"Vinsamlegast sendu inn einkunn þína fyrst.",completeOnboardingToEnableVoice:"Ljúktu kynningu til að virkja rödd",sendMessageToCompleteOnboarding:"Sendu skilaboð til að ljúka kynningu og virkja rödd.",resolve:"Ljúka",scrollLeft:"Skruna til vinstri",scrollRight:"Skruna til hægri",sendMessage:"Senda skilaboð",voiceSessionLive:"Raddsamtal virkt - talaðu eða skrifaðu.",connectingVoice:"Tengist raddsamtali...",poweredBy:"Knúið af",menu:"Valmynd",close:"Loka",openChat:"Opna spjall",closeChat:"Loka spjalli",lightMode:"Ljóst þema",nightMode:"Dökkt þema",refreshChat:"Endurnýja spjall",copyChat:"Afrita spjall",startChat:"Byrja spjall",startingVoiceSession:"Byrjar raddsamtal...",allowMicAccess:"Leyfa aðgang að hljóðnema",emailRequired:"Sláðu inn netfangið þitt",nameRequired:"Sláðu inn nafn þitt",phoneRequired:"Sláðu inn símanúmerið þitt",fieldRequiredSuffix:"(nauðsynlegur reitur)",emailInvalid:"Sláðu inn gilt netfang",nameInvalid:"Sláðu inn gilt nafn",phoneInvalid:"Sláðu inn gilt símanúmer"},id:{connectionError:"Maaf, saya sedang mengalami masalah koneksi. Silakan coba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon Anda. Izinkan akses dan coba lagi.",micNotFound:"Mikrofon tidak ditemukan. Hubungkan mikrofon dan coba lagi.",voiceUnavailable:"Fitur suara tidak tersedia saat ini. Silakan coba lagi.",chooseTopicLabel:"Pilih topik untuk memulai:",categoryTopicsHeading:"Silakan ajukan pertanyaan **{category}** Anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan pertanyaan cepat:",typeYourMessage:"Ketik pesan Anda...",agentIsLoading:"Agen sedang dimuat...",conversationResolved:"Percakapan selesai",howWasYourExperience:"Bagaimana pengalaman Anda?",feedbackPrompt:"Silakan nilai dukungan kami untuk membantu kami berkembang.",feedbackPlaceholder:"Ceritakan lebih banyak tentang pengalaman Anda...",submitFeedback:"Kirim umpan balik",submitting:"Mengirim...",selectRatingFirst:"Pilih peringkat terlebih dahulu",pleaseSubmitRatingFirst:"Silakan kirim peringkat Anda terlebih dahulu.",completeOnboardingToEnableVoice:"Selesaikan pengenalan untuk mengaktifkan suara",sendMessageToCompleteOnboarding:"Kirim pesan untuk menyelesaikan pengenalan dan mengaktifkan suara.",resolve:"Selesai",scrollLeft:"Gulir kiri",scrollRight:"Gulir kanan",sendMessage:"Kirim pesan",voiceSessionLive:"Sesi suara aktif - bicara atau ketik untuk berbincang.",connectingVoice:"Menghubungkan ke sesi suara...",poweredBy:"Didukung oleh",menu:"Menu",close:"Tutup",openChat:"Buka obrolan",closeChat:"Tutup obrolan",lightMode:"Mode terang",nightMode:"Mode gelap",refreshChat:"Segarkan obrolan",copyChat:"Salin obrolan",startChat:"Mulai obrolan",startingVoiceSession:"Memulai sesi suara...",allowMicAccess:"Izinkan akses mikrofon",emailRequired:"Masukkan alamat email Anda",nameRequired:"Masukkan nama Anda",phoneRequired:"Masukkan nomor telepon Anda",fieldRequiredSuffix:"wajib diisi",emailInvalid:"Masukkan alamat email yang valid",nameInvalid:"Masukkan nama yang valid",phoneInvalid:"Masukkan nomor telepon yang valid"},it:{connectionError:"Spiacenti, al momento ho problemi di connessione. Riprova.",micDenied:"Non siamo riusciti ad accedere al tuo microfono. Consenti l'accesso e riprova.",micNotFound:"Nessun microfono rilevato. Collegane uno e riprova.",voiceUnavailable:"La voce non è disponibile al momento. Riprova.",chooseTopicLabel:"Scegli un argomento per iniziare:",categoryTopicsHeading:"Per favore, poni la tua domanda su **{category}** qui sotto.",quickQuestionsHeadingLabel:"Oppure fai una domanda rapida:",typeYourMessage:"Scrivi il tuo messaggio...",agentIsLoading:"L'agente sta caricando...",conversationResolved:"Conversazione conclusa",howWasYourExperience:"Com'è stata la tua esperienza?",feedbackPrompt:"Valuta il nostro supporto per aiutarci a migliorare.",feedbackPlaceholder:"Raccontaci di più sulla tua esperienza...",submitFeedback:"Invia feedback",submitting:"Invio in corso...",selectRatingFirst:"Seleziona prima una valutazione",pleaseSubmitRatingFirst:"Invia prima la tua valutazione.",completeOnboardingToEnableVoice:"Completa l'onboarding per abilitare la voce",sendMessageToCompleteOnboarding:"Invia un messaggio per completare l'onboarding e abilitare la voce.",resolve:"Concludi",scrollLeft:"Scorri a sinistra",scrollRight:"Scorri a destra",sendMessage:"Invia messaggio",voiceSessionLive:"Sessione vocale attiva - parla o scrivi per conversare.",connectingVoice:"Connessione alla sessione vocale...",poweredBy:"Fornito da",menu:"Menu",close:"Chiudi",openChat:"Apri chat",closeChat:"Chiudi chat",lightMode:"Modalità chiara",nightMode:"Modalità scura",refreshChat:"Aggiorna chat",copyChat:"Copia chat",startChat:"Inizia chat",startingVoiceSession:"Avvio sessione vocale...",allowMicAccess:"Consenti l'accesso al microfono",emailRequired:"Inserisci il tuo indirizzo email",nameRequired:"Inserisci il tuo nome",phoneRequired:"Inserisci il tuo numero di telefono",fieldRequiredSuffix:"è un campo obbligatorio",emailInvalid:"Inserisci un indirizzo email valido",nameInvalid:"Inserisci un nome valido",phoneInvalid:"Inserisci un numero di telefono valido"},ja:{agentJoinedConversation:"{name}が会話に参加しました",handedOffToTeam:"会話を担当チームに引き継ぎました",handedOffStatus:"担当チームがこちらで返信します",connectionError:"申し訳ありません。現在接続に問題が発生しています。もう一度お試しください。",micDenied:"マイクにアクセスできませんでした。アクセスを許可してもう一度お試しください。",micNotFound:"マイクが見つかりません。マイクを接続してもう一度お試しください。",voiceUnavailable:"音声機能は現在利用できません。もう一度お試しください。",chooseTopicLabel:"始めるにはトピックを選択してください:",categoryTopicsHeading:"**{category}** に関するご質問を以下にお書きください。",quickQuestionsHeadingLabel:"または、簡単な質問をどうぞ:",typeYourMessage:"メッセージを入力してください...",agentIsLoading:"エージェントを読み込んでいます...",conversationResolved:"会話が終了しました",howWasYourExperience:"ご体験はいかがでしたか?",feedbackPrompt:"サポート向上のため、評価をお願いします。",feedbackPlaceholder:"体験について詳しく教えてください...",submitFeedback:"フィードバックを送信",submitting:"送信中...",selectRatingFirst:"最初に評価を選択してください",pleaseSubmitRatingFirst:"最初に評価を送信してください。",completeOnboardingToEnableVoice:"音声を有効にするにはオンボーディングを完了してください",sendMessageToCompleteOnboarding:"オンボーディングを完了して音声を有効にするにはメッセージを送信してください。",resolve:"終了",scrollLeft:"左へスクロール",scrollRight:"右へスクロール",sendMessage:"メッセージを送信",voiceSessionLive:"音声セッション中 - 話すか入力してください。",connectingVoice:"音声セッションに接続中...",poweredBy:"提供元",menu:"メニュー",close:"閉じる",openChat:"チャットを開く",closeChat:"チャットを閉じる",lightMode:"ライトモード",nightMode:"ダークモード",refreshChat:"チャットを更新",copyChat:"チャットをコピー",startChat:"チャットを開始",startingVoiceSession:"音声セッションを開始しています...",allowMicAccess:"マイクへのアクセスを許可",emailRequired:"メールアドレスを入力してください",nameRequired:"お名前を入力してください",phoneRequired:"電話番号を入力してください",fieldRequiredSuffix:"は必須です",emailInvalid:"有効なメールアドレスを入力してください",nameInvalid:"有効なお名前を入力してください",phoneInvalid:"有効な電話番号を入力してください"},ko:{connectionError:"죄송합니다. 현재 연결에 문제가 있습니다. 다시 시도해 주세요.",micDenied:"마이크에 접근할 수 없습니다. 접근을 허용한 후 다시 시도해 주세요.",micNotFound:"마이크를 찾을 수 없습니다. 마이크를 연결한 후 다시 시도해 주세요.",voiceUnavailable:"음성 기능을 현재 사용할 수 없습니다. 다시 시도해 주세요.",chooseTopicLabel:"시작하려면 주제를 선택하세요:",categoryTopicsHeading:"**{category}** 에 대한 질문을 아래에 작성해 주세요.",quickQuestionsHeadingLabel:"또는 간단한 질문을 해보세요:",typeYourMessage:"메시지를 입력하세요...",agentIsLoading:"상담원을 불러오는 중...",conversationResolved:"대화가 종료되었습니다",howWasYourExperience:"경험은 어떠셨나요?",feedbackPrompt:"개선을 위해 저희 지원 서비스를 평가해주세요.",feedbackPlaceholder:"경험에 대해 더 알려주세요...",submitFeedback:"피드백 제출",submitting:"제출 중...",selectRatingFirst:"먼저 평점을 선택해주세요",pleaseSubmitRatingFirst:"먼저 평점을 제출해주세요.",completeOnboardingToEnableVoice:"음성을 사용하려면 온보딩을 완료하세요",sendMessageToCompleteOnboarding:"온보딩을 완료하고 음성을 사용하려면 메시지를 보내세요.",resolve:"종료",scrollLeft:"왼쪽으로 스크롤",scrollRight:"오른쪽으로 스크롤",sendMessage:"메시지 보내기",voiceSessionLive:"음성 세션 활성화 - 말하거나 입력하세요.",connectingVoice:"음성 세션에 연결 중...",poweredBy:"제공",menu:"메뉴",close:"닫기",openChat:"채팅 열기",closeChat:"채팅 닫기",lightMode:"라이트 모드",nightMode:"다크 모드",refreshChat:"채팅 새로고침",copyChat:"채팅 복사",startChat:"채팅 시작",startingVoiceSession:"음성 세션 시작 중...",allowMicAccess:"마이크 액세스 허용",emailRequired:"이메일 주소를 입력해 주세요",nameRequired:"이름을 입력해 주세요",phoneRequired:"전화번호를 입력해 주세요",fieldRequiredSuffix:"항목은 필수입니다",emailInvalid:"유효한 이메일 주소를 입력해 주세요",nameInvalid:"유효한 이름을 입력해 주세요",phoneInvalid:"유효한 전화번호를 입력해 주세요"},lv:{connectionError:"Atvainojiet, šobrīd ir savienojuma problēmas. Lūdzu, mēģiniet vēlreiz.",micDenied:"Neizdevās piekļūt mikrofonam. Lūdzu, atļaujiet piekļuvi un mēģiniet vēlreiz.",micNotFound:"Mikrofons nav atrasts. Lūdzu, pievienojiet mikrofonu un mēģiniet vēlreiz.",voiceUnavailable:"Balss funkcija šobrīd nav pieejama. Lūdzu, mēģiniet vēlreiz.",chooseTopicLabel:"Izvēlieties tēmu, lai sāktu:",categoryTopicsHeading:"Lūdzu, uzdodiet savu jautājumu par **{category}** zemāk.",quickQuestionsHeadingLabel:"Vai uzdodiet ātru jautājumu:",typeYourMessage:"Ierakstiet savu ziņu...",agentIsLoading:"Aģents tiek ielādēts...",conversationResolved:"Saruna pabeigta",howWasYourExperience:"Kāda bija jūsu pieredze?",feedbackPrompt:"Lūdzu, novērtējiet mūsu atbalstu, lai palīdzētu mums uzlabot.",feedbackPlaceholder:"Pastāstiet mums vairāk par savu pieredzi...",submitFeedback:"Nosūtīt atsauksmes",submitting:"Sūta...",selectRatingFirst:"Vispirms izvēlieties vērtējumu",pleaseSubmitRatingFirst:"Lūdzu, vispirms nosūtiet savu vērtējumu.",completeOnboardingToEnableVoice:"Pabeidziet ievadu, lai iespējotu balsi",sendMessageToCompleteOnboarding:"Nosūtiet ziņu, lai pabeigtu ievadu un iespējotu balsi.",resolve:"Pabeigt",scrollLeft:"Ritināt pa kreisi",scrollRight:"Ritināt pa labi",sendMessage:"Nosūtīt ziņu",voiceSessionLive:"Balss sesija aktīva - runājiet vai rakstiet.",connectingVoice:"Pieslēdzas balss sesijai...",poweredBy:"Darbina",menu:"Izvēlne",close:"Aizvērt",openChat:"Atvērt tērzēšanu",closeChat:"Aizvērt tērzēšanu",lightMode:"Gaišais režīms",nightMode:"Tumšais režīms",refreshChat:"Atsvaidzināt tērzēšanu",copyChat:"Kopēt tērzēšanu",startChat:"Sākt tērzēšanu",startingVoiceSession:"Sāk balss sesiju...",allowMicAccess:"Atļaut piekļuvi mikrofonam",emailRequired:"Lūdzu, ievadiet savu e-pasta adresi",nameRequired:"Lūdzu, ievadiet savu vārdu",phoneRequired:"Lūdzu, ievadiet savu tālruņa numuru",fieldRequiredSuffix:"(obligāts lauks)",emailInvalid:"Lūdzu, ievadiet derīgu e-pasta adresi",nameInvalid:"Lūdzu, ievadiet derīgu vārdu",phoneInvalid:"Lūdzu, ievadiet derīgu tālruņa numuru"},lt:{connectionError:"Atsiprašome, šiuo metu kyla ryšio problemų. Bandykite dar kartą.",micDenied:"Nepavyko pasiekti jūsų mikrofono. Leiskite prieigą ir bandykite dar kartą.",micNotFound:"Mikrofonas nerastas. Prijunkite mikrofoną ir bandykite dar kartą.",voiceUnavailable:"Balso funkcija šiuo metu nepasiekiama. Bandykite dar kartą.",chooseTopicLabel:"Pasirinkite temą, kad pradėtumėte:",categoryTopicsHeading:"Prašome užduoti savo klausimą apie **{category}** žemiau.",quickQuestionsHeadingLabel:"Arba užduokite greitą klausimą:",typeYourMessage:"Įveskite pranešimą...",agentIsLoading:"Agentas kraunamas...",conversationResolved:"Pokalbis baigtas",howWasYourExperience:"Kokia buvo jūsų patirtis?",feedbackPrompt:"Įvertinkite mūsų pagalbą, kad padėtumėte mums tobulėti.",feedbackPlaceholder:"Papasakokite daugiau apie savo patirtį...",submitFeedback:"Pateikti atsiliepimą",submitting:"Siunčiama...",selectRatingFirst:"Pirmiausia pasirinkite įvertinimą",pleaseSubmitRatingFirst:"Pirmiausia pateikite įvertinimą.",completeOnboardingToEnableVoice:"Užbaikite įvadą, kad įjungtumėte balsą",sendMessageToCompleteOnboarding:"Išsiųskite pranešimą, kad užbaigtumėte įvadą ir įjungtumėte balsą.",resolve:"Baigti",scrollLeft:"Slinkti į kairę",scrollRight:"Slinkti į dešinę",sendMessage:"Siųsti pranešimą",voiceSessionLive:"Balso sesija aktyvi - kalbėkite arba rašykite.",connectingVoice:"Jungiamasi prie balso sesijos...",poweredBy:"Veikia",menu:"Meniu",close:"Uždaryti",openChat:"Atidaryti pokalbį",closeChat:"Uždaryti pokalbį",lightMode:"Šviesus režimas",nightMode:"Tamsus režimas",refreshChat:"Atnaujinti pokalbį",copyChat:"Kopijuoti pokalbį",startChat:"Pradėti pokalbį",startingVoiceSession:"Pradedama balso sesija...",allowMicAccess:"Leisti prieigą prie mikrofono",emailRequired:"Įveskite savo el. pašto adresą",nameRequired:"Įveskite savo vardą",phoneRequired:"Įveskite savo telefono numerį",fieldRequiredSuffix:"(privalomas laukas)",emailInvalid:"Įveskite galiojantį el. pašto adresą",nameInvalid:"Įveskite tinkamą vardą",phoneInvalid:"Įveskite galiojantį telefono numerį"},mk:{connectionError:"Извинете, моментално имам проблеми со поврзувањето. Обидете се повторно.",micDenied:"Не можевме да пристапиме до вашиот микрофон. Дозволете пристап и обидете се повторно.",micNotFound:"Не е најден микрофон. Поврзете микрофон и обидете се повторно.",voiceUnavailable:"Гласовната функција моментално не е достапна. Обидете се повторно.",chooseTopicLabel:"Изберете тема за да започнете:",categoryTopicsHeading:"Ве молиме поставете го вашето прашање за **{category}** подолу.",quickQuestionsHeadingLabel:"Или поставете брзо прашање:",typeYourMessage:"Напишете ја вашата порака...",agentIsLoading:"Агентот се вчитува...",conversationResolved:"Разговорот е завршен",howWasYourExperience:"Какво беше вашето искуство?",feedbackPrompt:"Оценете ја нашата поддршка за да ни помогнете да се подобриме.",feedbackPlaceholder:"Кажете ни повеќе за вашето искуство...",submitFeedback:"Испрати повратна информација",submitting:"Испраќање...",selectRatingFirst:"Прво изберете оценка",pleaseSubmitRatingFirst:"Прво испратете ја вашата оценка.",completeOnboardingToEnableVoice:"Завршете го воведот за да овозможите глас",sendMessageToCompleteOnboarding:"Испратете порака за да го завршите воведот и овозможите глас.",resolve:"Заврши",scrollLeft:"Скролај лево",scrollRight:"Скролај десно",sendMessage:"Испрати порака",voiceSessionLive:"Гласовната сесија е активна - зборувајте или пишувајте.",connectingVoice:"Поврзување со гласовна сесија...",poweredBy:"Поддржано од",menu:"Мени",close:"Затвори",openChat:"Отвори разговор",closeChat:"Затвори разговор",lightMode:"Светол режим",nightMode:"Темен режим",refreshChat:"Освежи разговор",copyChat:"Копирај разговор",startChat:"Започни разговор",startingVoiceSession:"Започнува гласовна сесија...",allowMicAccess:"Дозволи пристап до микрофонот",emailRequired:"Внесете ја вашата е-пошта",nameRequired:"Внесете го вашето име",phoneRequired:"Внесете го вашиот телефонски број",fieldRequiredSuffix:"(задолжително поле)",emailInvalid:"Внесете важечка е-пошта",nameInvalid:"Внесете важечко име",phoneInvalid:"Внесете важечки телефонски број"},ms:{connectionError:"Maaf, saya menghadapi masalah sambungan sekarang. Sila cuba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon anda. Sila benarkan akses dan cuba lagi.",micNotFound:"Tiada mikrofon ditemui. Sila sambungkan mikrofon dan cuba lagi.",voiceUnavailable:"Ciri suara tidak tersedia sekarang. Sila cuba lagi.",chooseTopicLabel:"Pilih topik untuk memulakan:",categoryTopicsHeading:"Sila ajukan soalan **{category}** anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan soalan ringkas:",typeYourMessage:"Taip mesej anda...",agentIsLoading:"Ejen sedang dimuatkan...",conversationResolved:"Perbualan selesai",howWasYourExperience:"Bagaimanakah pengalaman anda?",feedbackPrompt:"Sila nilaikan sokongan kami untuk membantu kami menambah baik.",feedbackPlaceholder:"Beritahu kami lebih lanjut tentang pengalaman anda...",submitFeedback:"Hantar maklum balas",submitting:"Menghantar...",selectRatingFirst:"Pilih penilaian dahulu",pleaseSubmitRatingFirst:"Sila hantar penilaian anda dahulu.",completeOnboardingToEnableVoice:"Lengkapkan pengenalan untuk mendayakan suara",sendMessageToCompleteOnboarding:"Hantar mesej untuk melengkapkan pengenalan dan mendayakan suara.",resolve:"Selesai",scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan",sendMessage:"Hantar mesej",voiceSessionLive:"Sesi suara aktif - bercakap atau taip untuk berbual.",connectingVoice:"Menyambung ke sesi suara...",poweredBy:"Dikuasakan oleh",menu:"Menu",close:"Tutup",openChat:"Buka sembang",closeChat:"Tutup sembang",lightMode:"Mod terang",nightMode:"Mod gelap",refreshChat:"Muat semula sembang",copyChat:"Salin sembang",startChat:"Mula sembang",startingVoiceSession:"Memulakan sesi suara...",allowMicAccess:"Benarkan akses mikrofon",emailRequired:"Masukkan alamat e-mel anda",nameRequired:"Masukkan nama anda",phoneRequired:"Masukkan nombor telefon anda",fieldRequiredSuffix:"wajib diisi",emailInvalid:"Masukkan alamat e-mel yang sah",nameInvalid:"Masukkan nama yang sah",phoneInvalid:"Masukkan nombor telefon yang sah"},no:{connectionError:"Beklager, jeg har problemer med tilkoblingen akkurat nå. Prøv igjen.",micDenied:"Vi fikk ikke tilgang til mikrofonen din. Gi tilgang og prøv igjen.",micNotFound:"Ingen mikrofon funnet. Koble til en mikrofon og prøv igjen.",voiceUnavailable:"Tale er ikke tilgjengelig akkurat nå. Prøv igjen.",chooseTopicLabel:"Velg et emne for å komme i gang:",categoryTopicsHeading:"Vennligst still spørsmålet ditt om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller still et raskt spørsmål:",typeYourMessage:"Skriv meldingen din...",agentIsLoading:"Agenten laster...",conversationResolved:"Samtale avsluttet",howWasYourExperience:"Hvordan var opplevelsen din?",feedbackPrompt:"Vennligst vurder vår støtte for å hjelpe oss med å bli bedre.",feedbackPlaceholder:"Fortell oss mer om opplevelsen din...",submitFeedback:"Send tilbakemelding",submitting:"Sender...",selectRatingFirst:"Velg en vurdering først",pleaseSubmitRatingFirst:"Vennligst send inn vurderingen din først.",completeOnboardingToEnableVoice:"Fullfør introduksjonen for å aktivere tale",sendMessageToCompleteOnboarding:"Send en melding for å fullføre introduksjonen og aktivere tale.",resolve:"Avslutt",scrollLeft:"Bla til venstre",scrollRight:"Bla til høyre",sendMessage:"Send melding",voiceSessionLive:"Talesesjon aktiv - snakk eller skriv for å samtale.",connectingVoice:"Kobler til talesesjon...",poweredBy:"Drevet av",menu:"Meny",close:"Lukk",openChat:"Åpne chat",closeChat:"Lukk chat",lightMode:"Lys modus",nightMode:"Mørk modus",refreshChat:"Oppdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter talesesjon...",allowMicAccess:"Tillat mikrofontilgang",emailRequired:"Skriv inn e-postadressen din",nameRequired:"Skriv inn navnet ditt",phoneRequired:"Skriv inn telefonnummeret ditt",fieldRequiredSuffix:"er påkrevd",emailInvalid:"Skriv inn en gyldig e-postadresse",nameInvalid:"Skriv inn et gyldig navn",phoneInvalid:"Skriv inn et gyldig telefonnummer"},fa:{connectionError:"متأسفیم، در حال حاضر در اتصال مشکل دارم. لطفاً دوباره تلاش کنید.",micDenied:"نتوانستیم به میکروفون شما دسترسی پیدا کنیم. لطفاً دسترسی را اجازه دهید و دوباره تلاش کنید.",micNotFound:"میکروفونی یافت نشد. لطفاً یک میکروفون وصل کنید و دوباره تلاش کنید.",voiceUnavailable:"قابلیت صدا در حال حاضر در دسترس نیست. لطفاً دوباره تلاش کنید.",chooseTopicLabel:"برای شروع، یک موضوع را انتخاب کنید:",categoryTopicsHeading:"لطفاً سؤال خود درباره **{category}** را در زیر مطرح کنید.",quickQuestionsHeadingLabel:"یا یک سؤال سریع بپرسید:",typeYourMessage:"پیام خود را تایپ کنید...",agentIsLoading:"در حال بارگذاری نماینده...",conversationResolved:"مکالمه به پایان رسید",howWasYourExperience:"تجربه شما چگونه بود؟",feedbackPrompt:"لطفاً برای کمک به بهبود ما، پشتیبانی ما را ارزیابی کنید.",feedbackPlaceholder:"درباره تجربه خود بیشتر به ما بگویید...",submitFeedback:"ارسال بازخورد",submitting:"در حال ارسال...",selectRatingFirst:"ابتدا یک امتیاز انتخاب کنید",pleaseSubmitRatingFirst:"لطفاً ابتدا امتیاز خود را ارسال کنید.",completeOnboardingToEnableVoice:"برای فعالسازی صدا، راهاندازی را تکمیل کنید",sendMessageToCompleteOnboarding:"برای تکمیل راهاندازی و فعالسازی صدا، پیام ارسال کنید.",resolve:"پایان",scrollLeft:"پیمایش به چپ",scrollRight:"پیمایش به راست",sendMessage:"ارسال پیام",voiceSessionLive:"جلسه صوتی فعال - صحبت کنید یا تایپ کنید.",connectingVoice:"اتصال به جلسه صوتی...",poweredBy:"قدرت گرفته از",menu:"منو",close:"بستن",openChat:"باز کردن چت",closeChat:"بستن چت",lightMode:"حالت روشن",nightMode:"حالت تاریک",refreshChat:"تازهسازی چت",copyChat:"کپی چت",startChat:"شروع چت",startingVoiceSession:"شروع جلسه صوتی...",allowMicAccess:"اجازه دسترسی به میکروفون",emailRequired:"لطفاً ایمیل خود را وارد کنید",nameRequired:"لطفاً نام خود را وارد کنید",phoneRequired:"لطفاً شماره تلفن خود را وارد کنید",fieldRequiredSuffix:"الزامی است",emailInvalid:"لطفاً یک ایمیل معتبر وارد کنید",nameInvalid:"لطفاً یک نام معتبر وارد کنید",phoneInvalid:"لطفاً یک شماره تلفن معتبر وارد کنید"},pl:{connectionError:"Przepraszamy, mam teraz problem z połączeniem. Spróbuj ponownie.",micDenied:"Nie udało się uzyskać dostępu do mikrofonu. Zezwól na dostęp i spróbuj ponownie.",micNotFound:"Nie znaleziono mikrofonu. Podłącz mikrofon i spróbuj ponownie.",voiceUnavailable:"Funkcja głosowa jest obecnie niedostępna. Spróbuj ponownie.",chooseTopicLabel:"Wybierz temat, aby rozpocząć:",categoryTopicsHeading:"Proszę zadać pytanie dotyczące **{category}** poniżej.",quickQuestionsHeadingLabel:"Lub zadaj szybkie pytanie:",typeYourMessage:"Wpisz wiadomość...",agentIsLoading:"Agent się ładuje...",conversationResolved:"Rozmowa zakończona",howWasYourExperience:"Jakie było Twoje doświadczenie?",feedbackPrompt:"Oceń proszę naszą obsługę, aby pomóc nam się rozwijać.",feedbackPlaceholder:"Opowiedz nam więcej o swoim doświadczeniu...",submitFeedback:"Wyślij opinię",submitting:"Wysyłanie...",selectRatingFirst:"Najpierw wybierz ocenę",pleaseSubmitRatingFirst:"Najpierw prześlij swoją ocenę.",completeOnboardingToEnableVoice:"Zakończ wprowadzenie, aby włączyć głos",sendMessageToCompleteOnboarding:"Wyślij wiadomość, aby zakończyć wprowadzenie i włączyć głos.",resolve:"Zakończ",scrollLeft:"Przewiń w lewo",scrollRight:"Przewiń w prawo",sendMessage:"Wyślij wiadomość",voiceSessionLive:"Sesja głosowa aktywna - mów lub pisz.",connectingVoice:"Łączenie z sesją głosową...",poweredBy:"Napędzane przez",menu:"Menu",close:"Zamknij",openChat:"Otwórz czat",closeChat:"Zamknij czat",lightMode:"Tryb jasny",nightMode:"Tryb ciemny",refreshChat:"Odśwież czat",copyChat:"Kopiuj czat",startChat:"Rozpocznij czat",startingVoiceSession:"Uruchamianie sesji głosowej...",allowMicAccess:"Zezwól na dostęp do mikrofonu",emailRequired:"Wpisz swój adres e-mail",nameRequired:"Wpisz swoje imię",phoneRequired:"Wpisz swój numer telefonu",fieldRequiredSuffix:"(pole wymagane)",emailInvalid:"Wpisz prawidłowy adres e-mail",nameInvalid:"Wpisz prawidłowe imię",phoneInvalid:"Wpisz prawidłowy numer telefonu"},pt:{connectionError:"Desculpe, estou com problemas de conexão neste momento. Tente novamente.",micDenied:"Não foi possível acessar o seu microfone. Permita o acesso e tente novamente.",micNotFound:"Nenhum microfone encontrado. Conecte um e tente novamente.",voiceUnavailable:"A voz não está disponível neste momento. Tente novamente.",chooseTopicLabel:"Escolha um tópico para começar:",categoryTopicsHeading:"Por favor, faça sua pergunta sobre **{category}** abaixo.",quickQuestionsHeadingLabel:"Ou faça uma pergunta rápida:",typeYourMessage:"Digite sua mensagem...",agentIsLoading:"O agente está carregando...",conversationResolved:"Conversa encerrada",howWasYourExperience:"Como foi sua experiência?",feedbackPrompt:"Avalie nosso suporte para nos ajudar a melhorar.",feedbackPlaceholder:"Conte-nos mais sobre sua experiência...",submitFeedback:"Enviar feedback",submitting:"Enviando...",selectRatingFirst:"Selecione uma avaliação primeiro",pleaseSubmitRatingFirst:"Envie sua avaliação primeiro.",completeOnboardingToEnableVoice:"Complete a integração para ativar a voz",sendMessageToCompleteOnboarding:"Envie uma mensagem para completar a integração e ativar a voz.",resolve:"Encerrar",scrollLeft:"Rolar para a esquerda",scrollRight:"Rolar para a direita",sendMessage:"Enviar mensagem",voiceSessionLive:"Sessão de voz ativa - fale ou digite para conversar.",connectingVoice:"Conectando à sessão de voz...",poweredBy:"Desenvolvido por",menu:"Menu",close:"Fechar",openChat:"Abrir chat",closeChat:"Fechar chat",lightMode:"Modo claro",nightMode:"Modo escuro",refreshChat:"Atualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sessão de voz...",allowMicAccess:"Permitir acesso ao microfone",emailRequired:"Insira o seu endereço de e-mail",nameRequired:"Insira o seu nome",phoneRequired:"Insira o seu número de telefone",fieldRequiredSuffix:"é um campo obrigatório",emailInvalid:"Insira um endereço de e-mail válido",nameInvalid:"Insira um nome válido",phoneInvalid:"Insira um número de telefone válido"},ro:{connectionError:"Ne pare rău, întâmpin probleme de conexiune în acest moment. Încercați din nou.",micDenied:"Nu am putut accesa microfonul. Permiteți accesul și încercați din nou.",micNotFound:"Nu a fost găsit niciun microfon. Conectați unul și încercați din nou.",voiceUnavailable:"Funcția vocală nu este disponibilă momentan. Încercați din nou.",chooseTopicLabel:"Alegeți un subiect pentru a începe:",categoryTopicsHeading:"Vă rugăm să adresați întrebarea dvs. despre **{category}** mai jos.",quickQuestionsHeadingLabel:"Sau puneți o întrebare rapidă:",typeYourMessage:"Scrieți mesajul dvs...",agentIsLoading:"Agentul se încarcă...",conversationResolved:"Conversație încheiată",howWasYourExperience:"Cum a fost experiența dvs.?",feedbackPrompt:"Vă rugăm să evaluați asistența noastră pentru a ne ajuta să ne îmbunătățim.",feedbackPlaceholder:"Spuneți-ne mai multe despre experiența dvs...",submitFeedback:"Trimite feedback",submitting:"Se trimite...",selectRatingFirst:"Selectați mai întâi o evaluare",pleaseSubmitRatingFirst:"Vă rugăm să trimiteți mai întâi evaluarea.",completeOnboardingToEnableVoice:"Finalizați procesul pentru a activa vocea",sendMessageToCompleteOnboarding:"Trimiteți un mesaj pentru a finaliza procesul și a activa vocea.",resolve:"Închide",scrollLeft:"Derulați la stânga",scrollRight:"Derulați la dreapta",sendMessage:"Trimite mesaj",voiceSessionLive:"Sesiune vocală activă - vorbiți sau tastați.",connectingVoice:"Se conectează la sesiunea vocală...",poweredBy:"Oferit de",menu:"Meniu",close:"Închide",openChat:"Deschide chat",closeChat:"Închide chat",lightMode:"Mod luminos",nightMode:"Mod întunecat",refreshChat:"Reîmprospătează chat",copyChat:"Copiază chat",startChat:"Începe chat",startingVoiceSession:"Începe sesiunea vocală...",allowMicAccess:"Permiteți accesul la microfon",emailRequired:"Introduceți adresa dvs. de e-mail",nameRequired:"Introduceți numele dvs.",phoneRequired:"Introduceți numărul dvs. de telefon",fieldRequiredSuffix:"este un câmp obligatoriu",emailInvalid:"Introduceți o adresă de e-mail validă",nameInvalid:"Introduceți un nume valid",phoneInvalid:"Introduceți un număr de telefon valid"},ru:{connectionError:"Извините, сейчас возникли проблемы с подключением. Попробуйте снова.",micDenied:"Не удалось получить доступ к микрофону. Разрешите доступ и попробуйте снова.",micNotFound:"Микрофон не найден. Подключите микрофон и попробуйте снова.",voiceUnavailable:"Голосовая функция сейчас недоступна. Попробуйте снова.",chooseTopicLabel:"Выберите тему, чтобы начать:",categoryTopicsHeading:"Пожалуйста, задайте свой вопрос о **{category}** ниже.",quickQuestionsHeadingLabel:"Или задайте быстрый вопрос:",typeYourMessage:"Введите ваше сообщение...",agentIsLoading:"Агент загружается...",conversationResolved:"Разговор завершен",howWasYourExperience:"Как прошел ваш опыт?",feedbackPrompt:"Пожалуйста, оцените нашу поддержку, чтобы помочь нам улучшиться.",feedbackPlaceholder:"Расскажите нам больше о вашем опыте...",submitFeedback:"Отправить отзыв",submitting:"Отправка...",selectRatingFirst:"Сначала выберите оценку",pleaseSubmitRatingFirst:"Пожалуйста, сначала отправьте свою оценку.",completeOnboardingToEnableVoice:"Завершите знакомство, чтобы включить голос",sendMessageToCompleteOnboarding:"Отправьте сообщение, чтобы завершить знакомство и включить голос.",resolve:"Завершить",scrollLeft:"Прокрутить влево",scrollRight:"Прокрутить вправо",sendMessage:"Отправить сообщение",voiceSessionLive:"Голосовая сессия активна - говорите или пишите.",connectingVoice:"Подключение к голосовой сессии...",poweredBy:"Работает на",menu:"Меню",close:"Закрыть",openChat:"Открыть чат",closeChat:"Закрыть чат",lightMode:"Светлый режим",nightMode:"Темный режим",refreshChat:"Обновить чат",copyChat:"Копировать чат",startChat:"Начать чат",startingVoiceSession:"Запуск голосовой сессии...",allowMicAccess:"Разрешить доступ к микрофону",emailRequired:"Введите адрес электронной почты",nameRequired:"Введите ваше имя",phoneRequired:"Введите номер телефона",fieldRequiredSuffix:"(обязательное поле)",emailInvalid:"Введите действительный адрес электронной почты",nameInvalid:"Введите корректное имя",phoneInvalid:"Введите корректный номер телефона"},sr:{agentJoinedConversation:"{name} se pridružio/la razgovoru",handedOffToTeam:"Vaš razgovor je prosleđen našem timu",handedOffStatus:"Naš tim će odgovoriti ovde",connectionError:"Izvinite, trenutno imam problema sa povezivanjem. Probajte ponovo.",micDenied:"Nismo mogli da pristupimo vašem mikrofonu. Dozvolite pristup i probajte ponovo.",micNotFound:"Mikrofon nije pronađen. Priključite mikrofon i probajte ponovo.",voiceUnavailable:"Glasovna funkcija trenutno nije dostupna. Probajte ponovo.",chooseTopicLabel:"Izaberite temu da biste započeli:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** ispod.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Ukucajte vašu poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocenite našu podršku da bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o svom iskustvu...",submitFeedback:"Pošalji povratne informacije",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite ocenu.",completeOnboardingToEnableVoice:"Završite uvod da omogućite glas",sendMessageToCompleteOnboarding:"Pošaljite poruku da završite uvod i omogućite glas.",resolve:"Završi",scrollLeft:"Skrolovati levo",scrollRight:"Skrolovati desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija aktivna - govorite ili kucajte.",connectingVoice:"Povezivanje sa glasovnom sesijom...",poweredBy:"Pokreće",menu:"Meni",close:"Zatvori",openChat:"Otvori ćaskanje",closeChat:"Zatvori ćaskanje",lightMode:"Svetli režim",nightMode:"Tamni režim",refreshChat:"Osveži ćaskanje",copyChat:"Kopiraj ćaskanje",startChat:"Započni ćaskanje",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dozvoli pristup mikrofonu",emailRequired:"Unesite svoju adresu e-pošte",nameRequired:"Unesite svoje ime",phoneRequired:"Unesite svoj broj telefona",fieldRequiredSuffix:"(obavezno polje)",emailInvalid:"Unesite ispravnu adresu e-pošte",nameInvalid:"Unesite ispravno ime",phoneInvalid:"Unesite ispravan broj telefona"},sk:{connectionError:"Ľutujeme, momentálne mám problém s pripojením. Skúste to znova.",micDenied:"Nepodarilo sa získať prístup k mikrofónu. Povoľte prístup a skúste to znova.",micNotFound:"Mikrofón sa nenašiel. Pripojte ho a skúste to znova.",voiceUnavailable:"Hlasová funkcia momentálne nie je dostupná. Skúste to znova.",chooseTopicLabel:"Vyberte tému, aby ste začali:",categoryTopicsHeading:"Prosím, položte svoju otázku o **{category}** nižšie.",quickQuestionsHeadingLabel:"Alebo položte rýchlu otázku:",typeYourMessage:"Napíšte svoju správu...",agentIsLoading:"Agent sa načítava...",conversationResolved:"Konverzácia ukončená",howWasYourExperience:"Aká bola vaša skúsenosť?",feedbackPrompt:"Ohodnoťte prosím našu podporu, aby sme sa mohli zlepšiť.",feedbackPlaceholder:"Povedzte nám viac o svojej skúsenosti...",submitFeedback:"Odoslať spätnú väzbu",submitting:"Odosielanie...",selectRatingFirst:"Najprv vyberte hodnotenie",pleaseSubmitRatingFirst:"Najprv odošlite svoje hodnotenie.",completeOnboardingToEnableVoice:"Dokončite úvod pre zapnutie hlasu",sendMessageToCompleteOnboarding:"Pošlite správu na dokončenie úvodu a zapnutie hlasu.",resolve:"Ukončiť",scrollLeft:"Posunúť doľava",scrollRight:"Posunúť doprava",sendMessage:"Odoslať správu",voiceSessionLive:"Hlasová relácia aktívna - hovorte alebo píšte.",connectingVoice:"Pripájanie k hlasovej relácii...",poweredBy:"Prevádzkuje",menu:"Ponuka",close:"Zavrieť",openChat:"Otvoriť chat",closeChat:"Zavrieť chat",lightMode:"Svetlý režim",nightMode:"Tmavý režim",refreshChat:"Obnoviť chat",copyChat:"Kopírovať chat",startChat:"Začať chat",startingVoiceSession:"Spúšťanie hlasovej relácie...",allowMicAccess:"Povoliť prístup k mikrofónu",emailRequired:"Zadajte svoju e-mailovú adresu",nameRequired:"Zadajte svoje meno",phoneRequired:"Zadajte svoje telefónne číslo",fieldRequiredSuffix:"(povinné pole)",emailInvalid:"Zadajte platnú e-mailovú adresu",nameInvalid:"Zadajte platné meno",phoneInvalid:"Zadajte platné telefónne číslo"},sl:{connectionError:"Oprostite, trenutno imam težave s povezavo. Poskusite znova.",micDenied:"Do mikrofona ni bilo mogoče dostopati. Dovolite dostop in poskusite znova.",micNotFound:"Mikrofona ni bilo mogoče najti. Priključite ga in poskusite znova.",voiceUnavailable:"Glasovna funkcija trenutno ni na voljo. Poskusite znova.",chooseTopicLabel:"Izberite temo za začetek:",categoryTopicsHeading:"Prosimo, postavite vprašanje o **{category}** spodaj.",quickQuestionsHeadingLabel:"Ali postavite hitro vprašanje:",typeYourMessage:"Vnesite svoje sporočilo...",agentIsLoading:"Agent se nalaga...",conversationResolved:"Pogovor je končan",howWasYourExperience:"Kakšna je bila vaša izkušnja?",feedbackPrompt:"Prosimo, ocenite našo podporo, da nam pomagate izboljšati.",feedbackPlaceholder:"Povejte nam več o svoji izkušnji...",submitFeedback:"Pošlji povratne informacije",submitting:"Pošiljanje...",selectRatingFirst:"Najprej izberite oceno",pleaseSubmitRatingFirst:"Prosimo, najprej pošljite svojo oceno.",completeOnboardingToEnableVoice:"Zaključite uvodne korake za omogočanje glasu",sendMessageToCompleteOnboarding:"Pošljite sporočilo, da zaključite uvod in omogočite glas.",resolve:"Končaj",scrollLeft:"Premakni levo",scrollRight:"Premakni desno",sendMessage:"Pošlji sporočilo",voiceSessionLive:"Glasovna seja aktivna - govorite ali tipkajte.",connectingVoice:"Povezovanje z glasovno sejo...",poweredBy:"Poganja",menu:"Meni",close:"Zapri",openChat:"Odpri klepet",closeChat:"Zapri klepet",lightMode:"Svetli način",nightMode:"Temni način",refreshChat:"Osveži klepet",copyChat:"Kopiraj klepet",startChat:"Začni klepet",startingVoiceSession:"Začetek glasovne seje...",allowMicAccess:"Dovoli dostop do mikrofona",emailRequired:"Vnesite svoj e-poštni naslov",nameRequired:"Vnesite svoje ime",phoneRequired:"Vnesite svojo telefonsko številko",fieldRequiredSuffix:"(obvezno polje)",emailInvalid:"Vnesite veljaven e-poštni naslov",nameInvalid:"Vnesite veljavno ime",phoneInvalid:"Vnesite veljavno telefonsko številko"},sv:{connectionError:"Ursäkta, jag har anslutningsproblem just nu. Försök igen.",micDenied:"Vi kunde inte komma åt din mikrofon. Tillåt åtkomst och försök igen.",micNotFound:"Ingen mikrofon hittades. Anslut en mikrofon och försök igen.",voiceUnavailable:"Röst är inte tillgängligt just nu. Försök igen.",chooseTopicLabel:"Välj ett ämne för att komma igång:",categoryTopicsHeading:"Ställ gärna din **{category}**-fråga nedan.",quickQuestionsHeadingLabel:"Eller ställ en snabb fråga:",typeYourMessage:"Skriv ditt meddelande...",agentIsLoading:"Agenten laddas...",conversationResolved:"Konversation avslutad",howWasYourExperience:"Hur var din upplevelse?",feedbackPrompt:"Betygsätt vår support för att hjälpa oss att bli bättre.",feedbackPlaceholder:"Berätta mer om din upplevelse...",submitFeedback:"Skicka feedback",submitting:"Skickar...",selectRatingFirst:"Välj först ett betyg",pleaseSubmitRatingFirst:"Vänligen skicka in ditt betyg först.",completeOnboardingToEnableVoice:"Slutför introduktionen för att aktivera röst",sendMessageToCompleteOnboarding:"Skicka ett meddelande för att slutföra introduktionen och aktivera röst.",resolve:"Avsluta",scrollLeft:"Bläddra åt vänster",scrollRight:"Bläddra åt höger",sendMessage:"Skicka meddelande",voiceSessionLive:"Röstsession aktiv - tala eller skriv för att samtala.",connectingVoice:"Ansluter till röstsession...",poweredBy:"Drivs av",menu:"Meny",close:"Stäng",openChat:"Öppna chatt",closeChat:"Stäng chatt",lightMode:"Ljust läge",nightMode:"Mörkt läge",refreshChat:"Uppdatera chatt",copyChat:"Kopiera chatt",startChat:"Starta chatt",startingVoiceSession:"Startar röstsession...",allowMicAccess:"Tillåt mikrofonåtkomst",emailRequired:"Ange din e-postadress",nameRequired:"Ange ditt namn",phoneRequired:"Ange ditt telefonnummer",fieldRequiredSuffix:"krävs",emailInvalid:"Ange en giltig e-postadress",nameInvalid:"Ange ett giltigt namn",phoneInvalid:"Ange ett giltigt telefonnummer"},th:{connectionError:"ขออภัย ขณะนี้เกิดปัญหาในการเชื่อมต่อ โปรดลองอีกครั้ง",micDenied:"เราไม่สามารถเข้าถึงไมโครโฟนของคุณได้ โปรดอนุญาตการเข้าถึงแล้วลองอีกครั้ง",micNotFound:"ไม่พบไมโครโฟน โปรดเชื่อมต่อไมโครโฟนแล้วลองอีกครั้ง",voiceUnavailable:"ฟีเจอร์เสียงไม่พร้อมใช้งานในขณะนี้ โปรดลองอีกครั้ง",chooseTopicLabel:"เลือกหัวข้อเพื่อเริ่มต้น:",categoryTopicsHeading:"โปรดถามคำถามเกี่ยวกับ **{category}** ด้านล่าง",quickQuestionsHeadingLabel:"หรือถามคำถามด่วน:",typeYourMessage:"พิมพ์ข้อความของคุณ...",agentIsLoading:"กำลังโหลดตัวแทน...",conversationResolved:"การสนทนาสิ้นสุดลง",howWasYourExperience:"ประสบการณ์ของคุณเป็นอย่างไร?",feedbackPrompt:"โปรดให้คะแนนการสนับสนุนของเราเพื่อช่วยให้เราปรับปรุง",feedbackPlaceholder:"บอกเราเพิ่มเติมเกี่ยวกับประสบการณ์ของคุณ...",submitFeedback:"ส่งความคิดเห็น",submitting:"กำลังส่ง...",selectRatingFirst:"โปรดเลือกคะแนนก่อน",pleaseSubmitRatingFirst:"โปรดส่งคะแนนของคุณก่อน",completeOnboardingToEnableVoice:"ทำการเริ่มต้นให้เสร็จเพื่อเปิดใช้งานเสียง",sendMessageToCompleteOnboarding:"ส่งข้อความเพื่อทำการเริ่มต้นให้เสร็จและเปิดใช้งานเสียง",resolve:"สิ้นสุด",scrollLeft:"เลื่อนไปทางซ้าย",scrollRight:"เลื่อนไปทางขวา",sendMessage:"ส่งข้อความ",voiceSessionLive:"เซสชันเสียงใช้งานอยู่ - พูดหรือพิมพ์เพื่อสนทนา",connectingVoice:"กำลังเชื่อมต่อกับเซสชันเสียง...",poweredBy:"ขับเคลื่อนโดย",menu:"เมนู",close:"ปิด",openChat:"เปิดแชท",closeChat:"ปิดแชท",lightMode:"โหมดสว่าง",nightMode:"โหมดมืด",refreshChat:"รีเฟรชแชท",copyChat:"คัดลอกแชท",startChat:"เริ่มแชท",startingVoiceSession:"กำลังเริ่มเซสชันเสียง...",allowMicAccess:"อนุญาตการเข้าถึงไมโครโฟน",emailRequired:"กรุณากรอกอีเมลของคุณ",nameRequired:"กรุณากรอกชื่อของคุณ",phoneRequired:"กรุณากรอกหมายเลขโทรศัพท์ของคุณ",fieldRequiredSuffix:"จำเป็นต้องกรอก",emailInvalid:"กรุณากรอกอีเมลที่ถูกต้อง",nameInvalid:"กรุณากรอกชื่อที่ถูกต้อง",phoneInvalid:"กรุณากรอกหมายเลขโทรศัพท์ที่ถูกต้อง"},tr:{connectionError:"Üzgünüz, şu anda bağlantı sorunu yaşıyorum. Lütfen tekrar deneyin.",micDenied:"Mikrofonunuza erişemedik. Lütfen erişime izin verin ve tekrar deneyin.",micNotFound:"Mikrofon bulunamadı. Lütfen bir mikrofon bağlayın ve tekrar deneyin.",voiceUnavailable:"Sesli özellik şu anda kullanılamıyor. Lütfen tekrar deneyin.",chooseTopicLabel:"Başlamak için bir konu seçin:",categoryTopicsHeading:"Lütfen **{category}** sorunuzu aşağıya yazın.",quickQuestionsHeadingLabel:"Veya hızlı bir soru sorun:",typeYourMessage:"Mesajınızı yazın...",agentIsLoading:"Temsilci yükleniyor...",conversationResolved:"Görüşme sonlandırıldı",howWasYourExperience:"Deneyiminiz nasıldı?",feedbackPrompt:"Gelişmemize yardımcı olmak için lütfen desteğimizi değerlendirin.",feedbackPlaceholder:"Deneyiminiz hakkında bize daha fazla bilgi verin...",submitFeedback:"Geri bildirim gönder",submitting:"Gönderiliyor...",selectRatingFirst:"Önce bir değerlendirme seçin",pleaseSubmitRatingFirst:"Lütfen önce değerlendirmenizi gönderin.",completeOnboardingToEnableVoice:"Sesi etkinleştirmek için tanıtımı tamamlayın",sendMessageToCompleteOnboarding:"Tanıtımı tamamlamak ve sesi etkinleştirmek için bir mesaj gönderin.",resolve:"Bitir",scrollLeft:"Sola kaydır",scrollRight:"Sağa kaydır",sendMessage:"Mesaj gönder",voiceSessionLive:"Sesli oturum aktif - konuşun veya yazın.",connectingVoice:"Sesli oturuma bağlanılıyor...",poweredBy:"Tarafından sağlandı",menu:"Menü",close:"Kapat",openChat:"Sohbeti aç",closeChat:"Sohbeti kapat",lightMode:"Açık mod",nightMode:"Karanlık mod",refreshChat:"Sohbeti yenile",copyChat:"Sohbeti kopyala",startChat:"Sohbete başla",startingVoiceSession:"Sesli oturum başlatılıyor...",allowMicAccess:"Mikrofon erişimine izin ver",emailRequired:"Lütfen e-posta adresinizi girin",nameRequired:"Lütfen adınızı girin",phoneRequired:"Lütfen telefon numaranızı girin",fieldRequiredSuffix:"alanı zorunludur",emailInvalid:"Lütfen geçerli bir e-posta adresi girin",nameInvalid:"Lütfen geçerli bir ad girin",phoneInvalid:"Lütfen geçerli bir telefon numarası girin"},uk:{connectionError:"Вибачте, зараз виникли проблеми з підключенням. Спробуйте ще раз.",micDenied:"Не вдалося отримати доступ до мікрофона. Дозвольте доступ і спробуйте ще раз.",micNotFound:"Мікрофон не знайдено. Підключіть мікрофон і спробуйте ще раз.",voiceUnavailable:"Голосова функція зараз недоступна. Спробуйте ще раз.",chooseTopicLabel:"Виберіть тему, щоб почати:",categoryTopicsHeading:"Будь ласка, поставте своє запитання щодо **{category}** нижче.",quickQuestionsHeadingLabel:"Або поставте швидке запитання:",typeYourMessage:"Введіть ваше повідомлення...",agentIsLoading:"Агент завантажується...",conversationResolved:"Розмову завершено",howWasYourExperience:"Яким був ваш досвід?",feedbackPrompt:"Будь ласка, оцініть нашу підтримку, щоб допомогти нам вдосконалюватися.",feedbackPlaceholder:"Розкажіть нам більше про свій досвід...",submitFeedback:"Надіслати відгук",submitting:"Надсилання...",selectRatingFirst:"Спочатку оберіть оцінку",pleaseSubmitRatingFirst:"Будь ласка, спочатку надішліть оцінку.",completeOnboardingToEnableVoice:"Завершіть вступ, щоб увімкнути голос",sendMessageToCompleteOnboarding:"Надішліть повідомлення, щоб завершити вступ та увімкнути голос.",resolve:"Завершити",scrollLeft:"Прокрутити ліворуч",scrollRight:"Прокрутити праворуч",sendMessage:"Надіслати повідомлення",voiceSessionLive:"Голосовий сеанс активний - говоріть або пишіть.",connectingVoice:"Підключення до голосового сеансу...",poweredBy:"Працює на",menu:"Меню",close:"Закрити",openChat:"Відкрити чат",closeChat:"Закрити чат",lightMode:"Світлий режим",nightMode:"Темний режим",refreshChat:"Оновити чат",copyChat:"Копіювати чат",startChat:"Почати чат",startingVoiceSession:"Запуск голосового сеансу...",allowMicAccess:"Дозволити доступ до мікрофона",emailRequired:"Введіть вашу адресу електронної пошти",nameRequired:"Введіть ваше ім’я",phoneRequired:"Введіть ваш номер телефону",fieldRequiredSuffix:"(обов’язкове поле)",emailInvalid:"Введіть дійсну адресу електронної пошти",nameInvalid:"Введіть коректне ім’я",phoneInvalid:"Введіть коректний номер телефону"},ur:{connectionError:"معذرت، اس وقت رابطہ قائم کرنے میں دشواری ہو رہی ہے۔ براہ کرم دوبارہ کوشش کریں۔",micDenied:"ہم آپ کے مائیکروفون تک رسائی حاصل نہیں کر سکے۔ براہ کرم رسائی کی اجازت دیں اور دوبارہ کوشش کریں۔",micNotFound:"کوئی مائیکروفون نہیں ملا۔ براہ کرم ایک منسلک کریں اور دوبارہ کوشش کریں۔",voiceUnavailable:"صوتی سہولت اس وقت دستیاب نہیں ہے۔ براہ کرم دوبارہ کوشش کریں۔",chooseTopicLabel:"شروع کرنے کے لیے ایک موضوع منتخب کریں:",categoryTopicsHeading:"براہ کرم اپنا **{category}** سوال نیچے پوچھیں۔",quickQuestionsHeadingLabel:"یا کوئی فوری سوال پوچھیں:",typeYourMessage:"اپنا پیغام ٹائپ کریں...",agentIsLoading:"ایجنٹ لوڈ ہو رہا ہے...",conversationResolved:"گفتگو مکمل",howWasYourExperience:"آپ کا تجربہ کیسا تھا؟",feedbackPrompt:"براہ کرم ہماری بہتری میں مدد کے لیے ہماری معاونت کی درجہ بندی کریں۔",feedbackPlaceholder:"ہمیں اپنے تجربے کے بارے میں مزید بتائیں...",submitFeedback:"رائے جمع کروائیں",submitting:"جمع ہو رہا ہے...",selectRatingFirst:"پہلے درجہ بندی منتخب کریں",pleaseSubmitRatingFirst:"براہ کرم پہلے اپنی درجہ بندی جمع کروائیں۔",completeOnboardingToEnableVoice:"آواز کو فعال کرنے کے لیے ابتدائی مراحل مکمل کریں",sendMessageToCompleteOnboarding:"ابتدائی مراحل مکمل کرنے اور آواز فعال کرنے کے لیے پیغام بھیجیں۔",resolve:"مکمل کریں",scrollLeft:"بائیں اسکرول کریں",scrollRight:"دائیں اسکرول کریں",sendMessage:"پیغام بھیجیں",voiceSessionLive:"صوتی سیشن فعال - بات کریں یا ٹائپ کریں۔",connectingVoice:"صوتی سیشن سے جڑ رہا ہے...",poweredBy:"پاور بذریعہ",menu:"مینو",close:"بند کریں",openChat:"چیٹ کھولیں",closeChat:"چیٹ بند کریں",lightMode:"ہلکا موڈ",nightMode:"تاریک موڈ",refreshChat:"چیٹ ریفریش کریں",copyChat:"چیٹ کاپی کریں",startChat:"چیٹ شروع کریں",startingVoiceSession:"صوتی سیشن شروع ہو رہا ہے...",allowMicAccess:"مائیکروفون تک رسائی کی اجازت دیں",emailRequired:"براہ کرم اپنا ای میل پتہ درج کریں",nameRequired:"براہ کرم اپنا نام درج کریں",phoneRequired:"براہ کرم اپنا فون نمبر درج کریں",fieldRequiredSuffix:"درکار ہے",emailInvalid:"براہ کرم ایک درست ای میل پتہ درج کریں",nameInvalid:"براہ کرم ایک درست نام درج کریں",phoneInvalid:"براہ کرم ایک درست فون نمبر درج کریں"},vi:{connectionError:"Xin lỗi, hiện tôi đang gặp sự cố kết nối. Vui lòng thử lại.",micDenied:"Chúng tôi không thể truy cập micrô của bạn. Vui lòng cho phép truy cập và thử lại.",micNotFound:"Không tìm thấy micrô. Vui lòng kết nối micrô và thử lại.",voiceUnavailable:"Tính năng giọng nói hiện không khả dụng. Vui lòng thử lại.",chooseTopicLabel:"Chọn một chủ đề để bắt đầu:",categoryTopicsHeading:"Vui lòng đặt câu hỏi của bạn về **{category}** bên dưới.",quickQuestionsHeadingLabel:"Hoặc đặt một câu hỏi nhanh:",typeYourMessage:"Nhập tin nhắn của bạn...",agentIsLoading:"Đang tải trợ lý...",conversationResolved:"Cuộc trò chuyện đã kết thúc",howWasYourExperience:"Trải nghiệm của bạn như thế nào?",feedbackPrompt:"Vui lòng đánh giá hỗ trợ của chúng tôi để giúp chúng tôi cải thiện.",feedbackPlaceholder:"Hãy cho chúng tôi biết thêm về trải nghiệm của bạn...",submitFeedback:"Gửi phản hồi",submitting:"Đang gửi...",selectRatingFirst:"Vui lòng chọn đánh giá trước",pleaseSubmitRatingFirst:"Vui lòng gửi đánh giá của bạn trước.",completeOnboardingToEnableVoice:"Hoàn thành hướng dẫn để bật giọng nói",sendMessageToCompleteOnboarding:"Gửi tin nhắn để hoàn thành hướng dẫn và bật giọng nói.",resolve:"Kết thúc",scrollLeft:"Cuộn sang trái",scrollRight:"Cuộn sang phải",sendMessage:"Gửi tin nhắn",voiceSessionLive:"Phiên giọng nói đang hoạt động - hãy nói hoặc gõ.",connectingVoice:"Đang kết nối phiên giọng nói...",poweredBy:"Được cung cấp bởi",menu:"Menu",close:"Đóng",openChat:"Mở trò chuyện",closeChat:"Đóng trò chuyện",lightMode:"Chế độ sáng",nightMode:"Chế độ tối",refreshChat:"Làm mới trò chuyện",copyChat:"Sao chép trò chuyện",startChat:"Bắt đầu trò chuyện",startingVoiceSession:"Đang bắt đầu phiên giọng nói...",allowMicAccess:"Cho phép truy cập micrô",emailRequired:"Vui lòng nhập địa chỉ email của bạn",nameRequired:"Vui lòng nhập tên của bạn",phoneRequired:"Vui lòng nhập số điện thoại của bạn",fieldRequiredSuffix:"là bắt buộc",emailInvalid:"Vui lòng nhập địa chỉ email hợp lệ",nameInvalid:"Vui lòng nhập tên hợp lệ",phoneInvalid:"Vui lòng nhập số điện thoại hợp lệ"}},z={en:{removeAttachment:"Remove attachment",categoryFilter:"Category filter",filterByCategory:"Filter by category",scrollCategoriesLeft:"Scroll categories left",scrollCategoriesRight:"Scroll categories right",scrollTagsLeft:"Scroll tags left",scrollTagsRight:"Scroll tags right",copyMessage:"Copy message",copied:"Copied",like:"Like",dislike:"Dislike",sourcesCited:"{count} sources cited",moreSources:"+{count} more"},ar:{removeAttachment:"إزالة المرفق",categoryFilter:"تصفية الفئات",filterByCategory:"التصفية حسب الفئة",scrollCategoriesLeft:"تمرير الفئات لليسار",scrollCategoriesRight:"تمرير الفئات لليمين",scrollTagsLeft:"تمرير الوسوم لليسار",scrollTagsRight:"تمرير الوسوم لليمين",copyMessage:"نسخ الرسالة",copied:"تم النسخ",like:"أعجبني",dislike:"لم يعجبني",sourcesCited:"{count} مصادر مستشهد بها",moreSources:"+{count} أخرى"},es:{removeAttachment:"Quitar archivo adjunto",categoryFilter:"Filtro de categoría",filterByCategory:"Filtrar por categoría",scrollCategoriesLeft:"Desplazar categorías a la izquierda",scrollCategoriesRight:"Desplazar categorías a la derecha",scrollTagsLeft:"Desplazar etiquetas a la izquierda",scrollTagsRight:"Desplazar etiquetas a la derecha",copyMessage:"Copiar mensaje",copied:"Copiado",like:"Me gusta",dislike:"No me gusta",sourcesCited:"{count} fuentes citadas",moreSources:"+{count} más"},be:{removeAttachment:"Выдаліць улажэнне",categoryFilter:"Фільтр катэгорый",filterByCategory:"Фільтраваць па катэгорыі",scrollCategoriesLeft:"Пракруціць катэгорыі ўлева",scrollCategoriesRight:"Пракруціць катэгорыі ўправа",scrollTagsLeft:"Пракруціць тэгі ўлева",scrollTagsRight:"Пракруціць тэгі ўправа",copyMessage:"Капіраваць паведамленне",copied:"Скапіравана",like:"Падабаецца",dislike:"Не падабаецца",sourcesCited:"Цытаваныя крыніцы: {count}",moreSources:"+{count} яшчэ"},bs:{removeAttachment:"Ukloni prilog",categoryFilter:"Filter kategorija",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Pomjeri kategorije lijevo",scrollCategoriesRight:"Pomjeri kategorije desno",scrollTagsLeft:"Pomjeri oznake lijevo",scrollTagsRight:"Pomjeri oznake desno",copyMessage:"Kopiraj poruku",copied:"Kopirano",like:"Sviđa mi se",dislike:"Ne sviđa mi se",sourcesCited:"Citirani izvori: {count}",moreSources:"+{count} više"},bg:{removeAttachment:"Премахване на прикачения файл",categoryFilter:"Филтър по категория",filterByCategory:"Филтриране по категория",scrollCategoriesLeft:"Превъртане на категориите наляво",scrollCategoriesRight:"Превъртане на категориите надясно",scrollTagsLeft:"Превъртане на етикетите наляво",scrollTagsRight:"Превъртане на етикетите надясно",copyMessage:"Копиране на съобщението",copied:"Копирано",like:"Харесва ми",dislike:"Не ми харесва",sourcesCited:"Цитирани източници: {count}",moreSources:"+{count} още"},my:{removeAttachment:"ပူးတွဲဖိုင်ကို ဖယ်ရှားပါ",categoryFilter:"အမျိုးအစား စစ်ထုတ်မှု",filterByCategory:"အမျိုးအစားအလိုက် စစ်ထုတ်ပါ",scrollCategoriesLeft:"အမျိုးအစားများကို ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollCategoriesRight:"အမျိုးအစားများကို ညာဘက်သို့ ရွှေ့ပါ",scrollTagsLeft:"တဂ်များကို ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollTagsRight:"တဂ်များကို ညာဘက်သို့ ရွှေ့ပါ",copyMessage:"မက်ဆေ့ချ်ကို ကူးယူပါ",copied:"ကူးယူပြီးပါပြီ",like:"နှစ်သက်သည်",dislike:"မနှစ်သက်ပါ",sourcesCited:"ကိုးကားထားသော ရင်းမြစ် {count} ခု",moreSources:"နောက်ထပ် +{count}"},ca:{removeAttachment:"Elimina el fitxer adjunt",categoryFilter:"Filtre de categoria",filterByCategory:"Filtra per categoria",scrollCategoriesLeft:"Desplaça les categories a l'esquerra",scrollCategoriesRight:"Desplaça les categories a la dreta",scrollTagsLeft:"Desplaça les etiquetes a l'esquerra",scrollTagsRight:"Desplaça les etiquetes a la dreta",copyMessage:"Copia el missatge",copied:"Copiat",like:"M'agrada",dislike:"No m'agrada",sourcesCited:"{count} fonts citades",moreSources:"+{count} més"},zh:{removeAttachment:"移除附件",categoryFilter:"类别筛选",filterByCategory:"按类别筛选",scrollCategoriesLeft:"向左滚动类别",scrollCategoriesRight:"向右滚动类别",scrollTagsLeft:"向左滚动标签",scrollTagsRight:"向右滚动标签",copyMessage:"复制消息",copied:"已复制",like:"赞",dislike:"踩",sourcesCited:"引用了 {count} 个来源",moreSources:"另外 {count} 个"},hr:{removeAttachment:"Ukloni privitak",categoryFilter:"Filtar kategorija",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Pomakni kategorije ulijevo",scrollCategoriesRight:"Pomakni kategorije udesno",scrollTagsLeft:"Pomakni oznake ulijevo",scrollTagsRight:"Pomakni oznake udesno",copyMessage:"Kopiraj poruku",copied:"Kopirano",like:"Sviđa mi se",dislike:"Ne sviđa mi se",sourcesCited:"Citirani izvori: {count}",moreSources:"+{count} više"},cs:{removeAttachment:"Odebrat přílohu",categoryFilter:"Filtr kategorií",filterByCategory:"Filtrovat podle kategorie",scrollCategoriesLeft:"Posunout kategorie doleva",scrollCategoriesRight:"Posunout kategorie doprava",scrollTagsLeft:"Posunout štítky doleva",scrollTagsRight:"Posunout štítky doprava",copyMessage:"Kopírovat zprávu",copied:"Zkopírováno",like:"Líbí se mi",dislike:"Nelíbí se mi",sourcesCited:"Citované zdroje: {count}",moreSources:"+{count} další"},da:{removeAttachment:"Fjern vedhæftet fil",categoryFilter:"Kategorifilter",filterByCategory:"Filtrer efter kategori",scrollCategoriesLeft:"Rul kategorier til venstre",scrollCategoriesRight:"Rul kategorier til højre",scrollTagsLeft:"Rul tags til venstre",scrollTagsRight:"Rul tags til højre",copyMessage:"Kopiér besked",copied:"Kopieret",like:"Synes godt om",dislike:"Synes ikke om",sourcesCited:"{count} kilder citeret",moreSources:"+{count} mere"},nl:{removeAttachment:"Bijlage verwijderen",categoryFilter:"Categoriefilter",filterByCategory:"Filteren op categorie",scrollCategoriesLeft:"Categorieën naar links scrollen",scrollCategoriesRight:"Categorieën naar rechts scrollen",scrollTagsLeft:"Tags naar links scrollen",scrollTagsRight:"Tags naar rechts scrollen",copyMessage:"Bericht kopiëren",copied:"Gekopieerd",like:"Vind ik leuk",dislike:"Vind ik niet leuk",sourcesCited:"{count} bronnen geciteerd",moreSources:"+{count} meer"},et:{removeAttachment:"Eemalda manus",categoryFilter:"Kategooriafilter",filterByCategory:"Filtreeri kategooria järgi",scrollCategoriesLeft:"Keri kategooriaid vasakule",scrollCategoriesRight:"Keri kategooriaid paremale",scrollTagsLeft:"Keri silte vasakule",scrollTagsRight:"Keri silte paremale",copyMessage:"Kopeeri sõnum",copied:"Kopeeritud",like:"Meeldib",dislike:"Ei meeldi",sourcesCited:"Viidatud allikaid: {count}",moreSources:"+{count} veel"},fi:{removeAttachment:"Poista liite",categoryFilter:"Luokkasuodatin",filterByCategory:"Suodata luokan mukaan",scrollCategoriesLeft:"Vieritä luokkia vasemmalle",scrollCategoriesRight:"Vieritä luokkia oikealle",scrollTagsLeft:"Vieritä tunnisteita vasemmalle",scrollTagsRight:"Vieritä tunnisteita oikealle",copyMessage:"Kopioi viesti",copied:"Kopioitu",like:"Tykkää",dislike:"En tykkää",sourcesCited:"Lähteitä viitattu: {count}",moreSources:"+{count} lisää"},fr:{removeAttachment:"Supprimer la pièce jointe",categoryFilter:"Filtre de catégorie",filterByCategory:"Filtrer par catégorie",scrollCategoriesLeft:"Faire défiler les catégories vers la gauche",scrollCategoriesRight:"Faire défiler les catégories vers la droite",scrollTagsLeft:"Faire défiler les étiquettes vers la gauche",scrollTagsRight:"Faire défiler les étiquettes vers la droite",copyMessage:"Copier le message",copied:"Copié",like:"J'aime",dislike:"Je n'aime pas",sourcesCited:"{count} sources citées",moreSources:"+{count} de plus"},de:{removeAttachment:"Anhang entfernen",categoryFilter:"Kategoriefilter",filterByCategory:"Nach Kategorie filtern",scrollCategoriesLeft:"Kategorien nach links scrollen",scrollCategoriesRight:"Kategorien nach rechts scrollen",scrollTagsLeft:"Tags nach links scrollen",scrollTagsRight:"Tags nach rechts scrollen",copyMessage:"Nachricht kopieren",copied:"Kopiert",like:"Gefällt mir",dislike:"Gefällt mir nicht",sourcesCited:"{count} Quellen zitiert",moreSources:"+{count} weitere"},el:{removeAttachment:"Αφαίρεση συνημμένου",categoryFilter:"Φίλτρο κατηγορίας",filterByCategory:"Φιλτράρισμα κατά κατηγορία",scrollCategoriesLeft:"Κύλιση κατηγοριών αριστερά",scrollCategoriesRight:"Κύλιση κατηγοριών δεξιά",scrollTagsLeft:"Κύλιση ετικετών αριστερά",scrollTagsRight:"Κύλιση ετικετών δεξιά",copyMessage:"Αντιγραφή μηνύματος",copied:"Αντιγράφηκε",like:"Μου αρέσει",dislike:"Δεν μου αρέσει",sourcesCited:"{count} πηγές αναφέρονται",moreSources:"+{count} ακόμη"},hi:{removeAttachment:"अनुलग्नक हटाएँ",categoryFilter:"श्रेणी फ़िल्टर",filterByCategory:"श्रेणी के अनुसार फ़िल्टर करें",scrollCategoriesLeft:"श्रेणियों को बाईं ओर स्क्रॉल करें",scrollCategoriesRight:"श्रेणियों को दाईं ओर स्क्रॉल करें",scrollTagsLeft:"टैग को बाईं ओर स्क्रॉल करें",scrollTagsRight:"टैग को दाईं ओर स्क्रॉल करें",copyMessage:"संदेश कॉपी करें",copied:"कॉपी किया गया",like:"पसंद",dislike:"नापसंद",sourcesCited:"{count} स्रोत उद्धृत",moreSources:"+{count} और"},mr:{removeAttachment:"संलग्नक काढा",categoryFilter:"श्रेणी फिल्टर",filterByCategory:"श्रेणीनुसार फिल्टर करा",scrollCategoriesLeft:"श्रेण्या डावीकडे स्क्रोल करा",scrollCategoriesRight:"श्रेण्या उजवीकडे स्क्रोल करा",scrollTagsLeft:"टॅग डावीकडे स्क्रोल करा",scrollTagsRight:"टॅग उजवीकडे स्क्रोल करा",copyMessage:"संदेश कॉपी करा",copied:"कॉपी केले",like:"आवडले",dislike:"आवडले नाही",sourcesCited:"{count} स्रोत उद्धृत",moreSources:"+{count} अधिक"},hu:{removeAttachment:"Melléklet eltávolítása",categoryFilter:"Kategóriaszűrő",filterByCategory:"Szűrés kategória szerint",scrollCategoriesLeft:"Kategóriák görgetése balra",scrollCategoriesRight:"Kategóriák görgetése jobbra",scrollTagsLeft:"Címkék görgetése balra",scrollTagsRight:"Címkék görgetése jobbra",copyMessage:"Üzenet másolása",copied:"Másolva",like:"Tetszik",dislike:"Nem tetszik",sourcesCited:"{count} hivatkozott forrás",moreSources:"+{count} további"},is:{removeAttachment:"Fjarlægja viðhengi",categoryFilter:"Flokkasía",filterByCategory:"Sía eftir flokki",scrollCategoriesLeft:"Fletta flokkum til vinstri",scrollCategoriesRight:"Fletta flokkum til hægri",scrollTagsLeft:"Fletta merkjum til vinstri",scrollTagsRight:"Fletta merkjum til hægri",copyMessage:"Afrita skilaboð",copied:"Afritað",like:"Líkar",dislike:"Líkar ekki",sourcesCited:"Heimildir vísað í: {count}",moreSources:"+{count} í viðbót"},id:{removeAttachment:"Hapus lampiran",categoryFilter:"Filter kategori",filterByCategory:"Filter menurut kategori",scrollCategoriesLeft:"Gulir kategori ke kiri",scrollCategoriesRight:"Gulir kategori ke kanan",scrollTagsLeft:"Gulir tag ke kiri",scrollTagsRight:"Gulir tag ke kanan",copyMessage:"Salin pesan",copied:"Disalin",like:"Suka",dislike:"Tidak suka",sourcesCited:"{count} sumber dikutip",moreSources:"+{count} lainnya"},it:{removeAttachment:"Rimuovi allegato",categoryFilter:"Filtro categoria",filterByCategory:"Filtra per categoria",scrollCategoriesLeft:"Scorri le categorie a sinistra",scrollCategoriesRight:"Scorri le categorie a destra",scrollTagsLeft:"Scorri i tag a sinistra",scrollTagsRight:"Scorri i tag a destra",copyMessage:"Copia messaggio",copied:"Copiato",like:"Mi piace",dislike:"Non mi piace",sourcesCited:"{count} fonti citate",moreSources:"+{count} altre"},ja:{removeAttachment:"添付ファイルを削除",categoryFilter:"カテゴリフィルター",filterByCategory:"カテゴリで絞り込む",scrollCategoriesLeft:"カテゴリを左にスクロール",scrollCategoriesRight:"カテゴリを右にスクロール",scrollTagsLeft:"タグを左にスクロール",scrollTagsRight:"タグを右にスクロール",copyMessage:"メッセージをコピー",copied:"コピーしました",like:"いいね",dislike:"よくないね",sourcesCited:"{count} 件の出典",moreSources:"他 {count} 件"},ko:{removeAttachment:"첨부 파일 제거",categoryFilter:"카테고리 필터",filterByCategory:"카테고리별 필터",scrollCategoriesLeft:"카테고리를 왼쪽으로 스크롤",scrollCategoriesRight:"카테고리를 오른쪽으로 스크롤",scrollTagsLeft:"태그를 왼쪽으로 스크롤",scrollTagsRight:"태그를 오른쪽으로 스크롤",copyMessage:"메시지 복사",copied:"복사됨",like:"좋아요",dislike:"싫어요",sourcesCited:"인용된 출처 {count}개",moreSources:"외 {count}개"},lv:{removeAttachment:"Noņemt pielikumu",categoryFilter:"Kategoriju filtrs",filterByCategory:"Filtrēt pēc kategorijas",scrollCategoriesLeft:"Ritināt kategorijas pa kreisi",scrollCategoriesRight:"Ritināt kategorijas pa labi",scrollTagsLeft:"Ritināt birkas pa kreisi",scrollTagsRight:"Ritināt birkas pa labi",copyMessage:"Kopēt ziņojumu",copied:"Nokopēts",like:"Patīk",dislike:"Nepatīk",sourcesCited:"Citēti avoti: {count}",moreSources:"+{count} vēl"},lt:{removeAttachment:"Pašalinti priedą",categoryFilter:"Kategorijų filtras",filterByCategory:"Filtruoti pagal kategoriją",scrollCategoriesLeft:"Slinkti kategorijas į kairę",scrollCategoriesRight:"Slinkti kategorijas į dešinę",scrollTagsLeft:"Slinkti žymes į kairę",scrollTagsRight:"Slinkti žymes į dešinę",copyMessage:"Kopijuoti žinutę",copied:"Nukopijuota",like:"Patinka",dislike:"Nepatinka",sourcesCited:"Cituoti šaltiniai: {count}",moreSources:"+{count} daugiau"},mk:{removeAttachment:"Отстрани прилог",categoryFilter:"Филтер за категории",filterByCategory:"Филтрирај по категорија",scrollCategoriesLeft:"Лизгај ги категориите налево",scrollCategoriesRight:"Лизгај ги категориите надесно",scrollTagsLeft:"Лизгај ги ознаките налево",scrollTagsRight:"Лизгај ги ознаките надесно",copyMessage:"Копирај порака",copied:"Копирано",like:"Ми се допаѓа",dislike:"Не ми се допаѓа",sourcesCited:"Цитирани извори: {count}",moreSources:"+{count} уште"},ms:{removeAttachment:"Alih keluar lampiran",categoryFilter:"Penapis kategori",filterByCategory:"Tapis mengikut kategori",scrollCategoriesLeft:"Tatal kategori ke kiri",scrollCategoriesRight:"Tatal kategori ke kanan",scrollTagsLeft:"Tatal tag ke kiri",scrollTagsRight:"Tatal tag ke kanan",copyMessage:"Salin mesej",copied:"Disalin",like:"Suka",dislike:"Tidak suka",sourcesCited:"{count} sumber dipetik",moreSources:"+{count} lagi"},no:{removeAttachment:"Fjern vedlegg",categoryFilter:"Kategorifilter",filterByCategory:"Filtrer etter kategori",scrollCategoriesLeft:"Bla kategorier til venstre",scrollCategoriesRight:"Bla kategorier til høyre",scrollTagsLeft:"Bla emneknagger til venstre",scrollTagsRight:"Bla emneknagger til høyre",copyMessage:"Kopier melding",copied:"Kopiert",like:"Liker",dislike:"Liker ikke",sourcesCited:"{count} kilder sitert",moreSources:"+{count} til"},fa:{removeAttachment:"حذف پیوست",categoryFilter:"فیلتر دستهبندی",filterByCategory:"فیلتر بر اساس دستهبندی",scrollCategoriesLeft:"پیمایش دستهبندیها به چپ",scrollCategoriesRight:"پیمایش دستهبندیها به راست",scrollTagsLeft:"پیمایش برچسبها به چپ",scrollTagsRight:"پیمایش برچسبها به راست",copyMessage:"کپی پیام",copied:"کپی شد",like:"پسندیدم",dislike:"نپسندیدم",sourcesCited:"{count} منبع ذکر شده",moreSources:"+{count} مورد دیگر"},pl:{removeAttachment:"Usuń załącznik",categoryFilter:"Filtr kategorii",filterByCategory:"Filtruj według kategorii",scrollCategoriesLeft:"Przewiń kategorie w lewo",scrollCategoriesRight:"Przewiń kategorie w prawo",scrollTagsLeft:"Przewiń tagi w lewo",scrollTagsRight:"Przewiń tagi w prawo",copyMessage:"Kopiuj wiadomość",copied:"Skopiowano",like:"Lubię to",dislike:"Nie lubię tego",sourcesCited:"Cytowane źródła: {count}",moreSources:"+{count} więcej"},pt:{removeAttachment:"Remover anexo",categoryFilter:"Filtro de categoria",filterByCategory:"Filtrar por categoria",scrollCategoriesLeft:"Rolar categorias para a esquerda",scrollCategoriesRight:"Rolar categorias para a direita",scrollTagsLeft:"Rolar etiquetas para a esquerda",scrollTagsRight:"Rolar etiquetas para a direita",copyMessage:"Copiar mensagem",copied:"Copiado",like:"Gostei",dislike:"Não gostei",sourcesCited:"{count} fontes citadas",moreSources:"+{count} mais"},ro:{removeAttachment:"Elimină atașamentul",categoryFilter:"Filtru de categorie",filterByCategory:"Filtrează după categorie",scrollCategoriesLeft:"Derulează categoriile la stânga",scrollCategoriesRight:"Derulează categoriile la dreapta",scrollTagsLeft:"Derulează etichetele la stânga",scrollTagsRight:"Derulează etichetele la dreapta",copyMessage:"Copiază mesajul",copied:"Copiat",like:"Îmi place",dislike:"Nu îmi place",sourcesCited:"Surse citate: {count}",moreSources:"+{count} în plus"},ru:{removeAttachment:"Удалить вложение",categoryFilter:"Фильтр категорий",filterByCategory:"Фильтровать по категории",scrollCategoriesLeft:"Прокрутить категории влево",scrollCategoriesRight:"Прокрутить категории вправо",scrollTagsLeft:"Прокрутить теги влево",scrollTagsRight:"Прокрутить теги вправо",copyMessage:"Копировать сообщение",copied:"Скопировано",like:"Нравится",dislike:"Не нравится",sourcesCited:"Цитируемые источники: {count}",moreSources:"+{count} ещё"},sr:{removeAttachment:"Ukloni prilog",categoryFilter:"Filter kategorija",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Skroluj kategorije levo",scrollCategoriesRight:"Skroluj kategorije desno",scrollTagsLeft:"Skroluj oznake levo",scrollTagsRight:"Skroluj oznake desno",copyMessage:"Kopiraj poruku",copied:"Kopirano",like:"Sviđa mi se",dislike:"Ne sviđa mi se",sourcesCited:"Citirani izvori: {count}",moreSources:"+{count} još"},sk:{removeAttachment:"Odstrániť prílohu",categoryFilter:"Filter kategórií",filterByCategory:"Filtrovať podľa kategórie",scrollCategoriesLeft:"Posunúť kategórie doľava",scrollCategoriesRight:"Posunúť kategórie doprava",scrollTagsLeft:"Posunúť štítky doľava",scrollTagsRight:"Posunúť štítky doprava",copyMessage:"Kopírovať správu",copied:"Skopírované",like:"Páči sa mi",dislike:"Nepáči sa mi",sourcesCited:"Citované zdroje: {count}",moreSources:"+{count} ďalšie"},sl:{removeAttachment:"Odstrani prilogo",categoryFilter:"Filter kategorij",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Pomakni kategorije levo",scrollCategoriesRight:"Pomakni kategorije desno",scrollTagsLeft:"Pomakni oznake levo",scrollTagsRight:"Pomakni oznake desno",copyMessage:"Kopiraj sporočilo",copied:"Kopirano",like:"Všeč mi je",dislike:"Ni mi všeč",sourcesCited:"Navedeni viri: {count}",moreSources:"+{count} več"},sv:{removeAttachment:"Ta bort bilaga",categoryFilter:"Kategorifilter",filterByCategory:"Filtrera efter kategori",scrollCategoriesLeft:"Bläddra kategorier åt vänster",scrollCategoriesRight:"Bläddra kategorier åt höger",scrollTagsLeft:"Bläddra taggar åt vänster",scrollTagsRight:"Bläddra taggar åt höger",copyMessage:"Kopiera meddelande",copied:"Kopierat",like:"Gilla",dislike:"Gilla inte",sourcesCited:"{count} källor citerade",moreSources:"+{count} till"},th:{removeAttachment:"นำไฟล์แนบออก",categoryFilter:"ตัวกรองหมวดหมู่",filterByCategory:"กรองตามหมวดหมู่",scrollCategoriesLeft:"เลื่อนหมวดหมู่ไปทางซ้าย",scrollCategoriesRight:"เลื่อนหมวดหมู่ไปทางขวา",scrollTagsLeft:"เลื่อนแท็กไปทางซ้าย",scrollTagsRight:"เลื่อนแท็กไปทางขวา",copyMessage:"คัดลอกข้อความ",copied:"คัดลอกแล้ว",like:"ถูกใจ",dislike:"ไม่ถูกใจ",sourcesCited:"อ้างอิง {count} แหล่ง",moreSources:"อีก +{count}"},tr:{removeAttachment:"Eki kaldır",categoryFilter:"Kategori filtresi",filterByCategory:"Kategoriye göre filtrele",scrollCategoriesLeft:"Kategorileri sola kaydır",scrollCategoriesRight:"Kategorileri sağa kaydır",scrollTagsLeft:"Etiketleri sola kaydır",scrollTagsRight:"Etiketleri sağa kaydır",copyMessage:"Mesajı kopyala",copied:"Kopyalandı",like:"Beğen",dislike:"Beğenme",sourcesCited:"{count} kaynak alıntılandı",moreSources:"+{count} daha"},uk:{removeAttachment:"Видалити вкладення",categoryFilter:"Фільтр категорій",filterByCategory:"Фільтрувати за категорією",scrollCategoriesLeft:"Прокрутити категорії ліворуч",scrollCategoriesRight:"Прокрутити категорії праворуч",scrollTagsLeft:"Прокрутити теги ліворуч",scrollTagsRight:"Прокрутити теги праворуч",copyMessage:"Копіювати повідомлення",copied:"Скопійовано",like:"Подобається",dislike:"Не подобається",sourcesCited:"Цитовані джерела: {count}",moreSources:"+{count} ще"},ur:{removeAttachment:"منسلکہ ہٹائیں",categoryFilter:"زمرہ فلٹر",filterByCategory:"زمرے کے لحاظ سے فلٹر کریں",scrollCategoriesLeft:"زمرے بائیں طرف اسکرول کریں",scrollCategoriesRight:"زمرے دائیں طرف اسکرول کریں",scrollTagsLeft:"ٹیگز بائیں طرف اسکرول کریں",scrollTagsRight:"ٹیگز دائیں طرف اسکرول کریں",copyMessage:"پیغام کاپی کریں",copied:"کاپی ہو گیا",like:"پسند",dislike:"ناپسند",sourcesCited:"{count} حوالہ جاتی ذرائع",moreSources:"+{count} مزید"},vi:{removeAttachment:"Xóa tệp đính kèm",categoryFilter:"Bộ lọc danh mục",filterByCategory:"Lọc theo danh mục",scrollCategoriesLeft:"Cuộn danh mục sang trái",scrollCategoriesRight:"Cuộn danh mục sang phải",scrollTagsLeft:"Cuộn thẻ sang trái",scrollTagsRight:"Cuộn thẻ sang phải",copyMessage:"Sao chép tin nhắn",copied:"Đã sao chép",like:"Thích",dislike:"Không thích",sourcesCited:"Đã trích dẫn {count} nguồn",moreSources:"+{count} nữa"}},$={en:{onboardingNamePlaceholder:"Please enter your name",onboardingEmailPlaceholder:"Please enter your email address",onboardingPhonePlaceholder:"Please enter your phone number"},ar:{onboardingNamePlaceholder:"الرجاء إدخال اسمك",onboardingEmailPlaceholder:"الرجاء إدخال بريدك الإلكتروني",onboardingPhonePlaceholder:"الرجاء إدخال رقم هاتفك"},es:{onboardingNamePlaceholder:"Introduce tu nombre",onboardingEmailPlaceholder:"Introduce tu correo electrónico",onboardingPhonePlaceholder:"Introduce tu número de teléfono"},be:{onboardingNamePlaceholder:"Калі ласка, увядзіце ваша імя",onboardingEmailPlaceholder:"Калі ласка, увядзіце адрас электроннай пошты",onboardingPhonePlaceholder:"Калі ласка, увядзіце нумар тэлефона"},bs:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju email adresu",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},bg:{onboardingNamePlaceholder:"Моля, въведете вашето име",onboardingEmailPlaceholder:"Моля, въведете имейл адреса си",onboardingPhonePlaceholder:"Моля, въведете телефонния си номер"},my:{onboardingNamePlaceholder:"ကျေးဇူးပြု၍ သင့်အမည်ကို ထည့်ပါ",onboardingEmailPlaceholder:"ကျေးဇူးပြု၍ သင့်အီးမေးလ်လိပ်စာကို ထည့်ပါ",onboardingPhonePlaceholder:"ကျေးဇူးပြု၍ သင့်ဖုန်းနံပါတ်ကို ထည့်ပါ"},ca:{onboardingNamePlaceholder:"Introdueix el teu nom",onboardingEmailPlaceholder:"Introdueix el teu correu electrònic",onboardingPhonePlaceholder:"Introdueix el teu número de telèfon"},zh:{onboardingNamePlaceholder:"请输入您的姓名",onboardingEmailPlaceholder:"请输入您的电子邮箱地址",onboardingPhonePlaceholder:"请输入您的电话号码"},hr:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju adresu e-pošte",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},cs:{onboardingNamePlaceholder:"Zadejte své jméno",onboardingEmailPlaceholder:"Zadejte svou e-mailovou adresu",onboardingPhonePlaceholder:"Zadejte své telefonní číslo"},da:{onboardingNamePlaceholder:"Indtast dit navn",onboardingEmailPlaceholder:"Indtast din e-mailadresse",onboardingPhonePlaceholder:"Indtast dit telefonnummer"},nl:{onboardingNamePlaceholder:"Voer uw naam in",onboardingEmailPlaceholder:"Voer uw e-mailadres in",onboardingPhonePlaceholder:"Voer uw telefoonnummer in"},et:{onboardingNamePlaceholder:"Sisestage oma nimi",onboardingEmailPlaceholder:"Sisestage oma e-posti aadress",onboardingPhonePlaceholder:"Sisestage oma telefoninumber"},fi:{onboardingNamePlaceholder:"Anna nimesi",onboardingEmailPlaceholder:"Anna sähköpostiosoitteesi",onboardingPhonePlaceholder:"Anna puhelinnumerosi"},fr:{onboardingNamePlaceholder:"Veuillez saisir votre nom",onboardingEmailPlaceholder:"Veuillez saisir votre adresse e-mail",onboardingPhonePlaceholder:"Veuillez saisir votre numéro de téléphone"},de:{onboardingNamePlaceholder:"Bitte geben Sie Ihren Namen ein",onboardingEmailPlaceholder:"Bitte geben Sie Ihre E-Mail-Adresse ein",onboardingPhonePlaceholder:"Bitte geben Sie Ihre Telefonnummer ein"},el:{onboardingNamePlaceholder:"Παρακαλώ εισαγάγετε το όνομά σας",onboardingEmailPlaceholder:"Παρακαλώ εισαγάγετε τη διεύθυνση email σας",onboardingPhonePlaceholder:"Παρακαλώ εισαγάγετε τον αριθμό τηλεφώνου σας"},hi:{onboardingNamePlaceholder:"कृपया अपना नाम दर्ज करें",onboardingEmailPlaceholder:"कृपया अपना ईमेल पता दर्ज करें",onboardingPhonePlaceholder:"कृपया अपना फ़ोन नंबर दर्ज करें"},mr:{onboardingNamePlaceholder:"कृपया आपले नाव प्रविष्ट करा",onboardingEmailPlaceholder:"कृपया आपला ईमेल पत्ता प्रविष्ट करा",onboardingPhonePlaceholder:"कृपया आपला फोन नंबर प्रविष्ट करा"},hu:{onboardingNamePlaceholder:"Adja meg a nevét",onboardingEmailPlaceholder:"Adja meg az e-mail-címét",onboardingPhonePlaceholder:"Adja meg a telefonszámát"},is:{onboardingNamePlaceholder:"Sláðu inn nafn þitt",onboardingEmailPlaceholder:"Sláðu inn netfangið þitt",onboardingPhonePlaceholder:"Sláðu inn símanúmerið þitt"},id:{onboardingNamePlaceholder:"Masukkan nama Anda",onboardingEmailPlaceholder:"Masukkan alamat email Anda",onboardingPhonePlaceholder:"Masukkan nomor telepon Anda"},it:{onboardingNamePlaceholder:"Inserisci il tuo nome",onboardingEmailPlaceholder:"Inserisci il tuo indirizzo email",onboardingPhonePlaceholder:"Inserisci il tuo numero di telefono"},ja:{onboardingNamePlaceholder:"お名前を入力してください",onboardingEmailPlaceholder:"メールアドレスを入力してください",onboardingPhonePlaceholder:"電話番号を入力してください"},ko:{onboardingNamePlaceholder:"이름을 입력해 주세요",onboardingEmailPlaceholder:"이메일 주소를 입력해 주세요",onboardingPhonePlaceholder:"전화번호를 입력해 주세요"},lv:{onboardingNamePlaceholder:"Lūdzu, ievadiet savu vārdu",onboardingEmailPlaceholder:"Lūdzu, ievadiet savu e-pasta adresi",onboardingPhonePlaceholder:"Lūdzu, ievadiet savu tālruņa numuru"},lt:{onboardingNamePlaceholder:"Įveskite savo vardą",onboardingEmailPlaceholder:"Įveskite savo el. pašto adresą",onboardingPhonePlaceholder:"Įveskite savo telefono numerį"},mk:{onboardingNamePlaceholder:"Внесете го вашето име",onboardingEmailPlaceholder:"Внесете ја вашата е-пошта",onboardingPhonePlaceholder:"Внесете го вашиот телефонски број"},ms:{onboardingNamePlaceholder:"Masukkan nama anda",onboardingEmailPlaceholder:"Masukkan alamat e-mel anda",onboardingPhonePlaceholder:"Masukkan nombor telefon anda"},no:{onboardingNamePlaceholder:"Skriv inn navnet ditt",onboardingEmailPlaceholder:"Skriv inn e-postadressen din",onboardingPhonePlaceholder:"Skriv inn telefonnummeret ditt"},fa:{onboardingNamePlaceholder:"لطفاً نام خود را وارد کنید",onboardingEmailPlaceholder:"لطفاً ایمیل خود را وارد کنید",onboardingPhonePlaceholder:"لطفاً شماره تلفن خود را وارد کنید"},pl:{onboardingNamePlaceholder:"Wpisz swoje imię",onboardingEmailPlaceholder:"Wpisz swój adres e-mail",onboardingPhonePlaceholder:"Wpisz swój numer telefonu"},pt:{onboardingNamePlaceholder:"Insira o seu nome",onboardingEmailPlaceholder:"Insira o seu endereço de e-mail",onboardingPhonePlaceholder:"Insira o seu número de telefone"},ro:{onboardingNamePlaceholder:"Introduceți numele dvs.",onboardingEmailPlaceholder:"Introduceți adresa dvs. de e-mail",onboardingPhonePlaceholder:"Introduceți numărul dvs. de telefon"},ru:{onboardingNamePlaceholder:"Введите ваше имя",onboardingEmailPlaceholder:"Введите адрес электронной почты",onboardingPhonePlaceholder:"Введите номер телефона"},sr:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju adresu e-pošte",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},sk:{onboardingNamePlaceholder:"Zadajte svoje meno",onboardingEmailPlaceholder:"Zadajte svoju e-mailovú adresu",onboardingPhonePlaceholder:"Zadajte svoje telefónne číslo"},sl:{onboardingNamePlaceholder:"Vnesite svoje ime",onboardingEmailPlaceholder:"Vnesite svoj e-poštni naslov",onboardingPhonePlaceholder:"Vnesite svojo telefonsko številko"},sv:{onboardingNamePlaceholder:"Ange ditt namn",onboardingEmailPlaceholder:"Ange din e-postadress",onboardingPhonePlaceholder:"Ange ditt telefonnummer"},th:{onboardingNamePlaceholder:"กรุณากรอกชื่อของคุณ",onboardingEmailPlaceholder:"กรุณากรอกอีเมลของคุณ",onboardingPhonePlaceholder:"กรุณากรอกหมายเลขโทรศัพท์ของคุณ"},tr:{onboardingNamePlaceholder:"Lütfen adınızı girin",onboardingEmailPlaceholder:"Lütfen e-posta adresinizi girin",onboardingPhonePlaceholder:"Lütfen telefon numaranızı girin"},uk:{onboardingNamePlaceholder:"Введіть ваше ім’я",onboardingEmailPlaceholder:"Введіть вашу адресу електронної пошти",onboardingPhonePlaceholder:"Введіть ваш номер телефону"},ur:{onboardingNamePlaceholder:"براہ کرم اپنا نام درج کریں",onboardingEmailPlaceholder:"براہ کرم اپنا ای میل پتہ درج کریں",onboardingPhonePlaceholder:"براہ کرم اپنا فون نمبر درج کریں"},vi:{onboardingNamePlaceholder:"Vui lòng nhập tên của bạn",onboardingEmailPlaceholder:"Vui lòng nhập địa chỉ email của bạn",onboardingPhonePlaceholder:"Vui lòng nhập số điện thoại của bạn"}},q=new Set(["ar","fa","he","ur","iw","prs"]);function G(e){if(!e||"string"!=typeof e)return"en";const t=e.toLowerCase().split(/[-_]/)[0];return U[t]?t:"en"}function H(e){const t=(e||"").toLowerCase().split(/[-_]/)[0];return q.has(t)}const V=/[\u0590-\u05ff\u0600-\u06ff\u0700-\u074f\u0750-\u077f\u08a0-\u08ff\ufb1d-\ufb4f\ufb50-\ufdff\ufe70-\ufeff]/,W=/[A-Za-z\u00c0-\u024f\u0370-\u03ff\u0400-\u04ff]/;function Y(e,t=!1){if("string"!=typeof e||0===e.length)return t;for(const t of e){if(V.test(t))return!0;if(W.test(t))return!1}return t}const K={en:{attachmentLimitReached:"That file is too large. This chat can receive up to {max_mb} MB of files in total.",attachmentLimitReachedUsed:"That file is too large. This chat can receive up to {max_mb} MB of files in total, and {used_mb} MB is already used.",attachmentFileTooLarge:"Sorry, that file is too large. Files must be under {max_mb} MB.",attachmentTypeNotAllowed:"Sorry, we can't accept that type of file. You can send {types}.",attachmentLimitReachedSize:"That file is {file_mb} MB, which is too large. This chat can receive up to {max_mb} MB of files in total.",attachmentLimitReachedUsedSize:"That file is {file_mb} MB, which is too large. This chat can receive up to {max_mb} MB of files in total, and {used_mb} MB is already used.",attachmentFileTooLargeSize:"Sorry, that file is {file_mb} MB, which is too large. Files must be under {max_mb} MB."},ar:{attachmentLimitReached:"حجم الملف كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت.",attachmentLimitReachedUsed:"حجم الملف كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت، وقد تم استخدام {used_mb} ميغابايت.",attachmentFileTooLarge:"عذراً، حجم الملف كبير جداً. يجب أن يكون حجم الملف أقل من {max_mb} ميغابايت.",attachmentTypeNotAllowed:"عذراً، لا يمكننا استقبال هذا النوع من الملفات. يمكنك إرسال: {types}.",attachmentLimitReachedSize:"حجم الملف {file_mb} ميغابايت، وهو كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت.",attachmentLimitReachedUsedSize:"حجم الملف {file_mb} ميغابايت، وهو كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت، وقد تم استخدام {used_mb} ميغابايت.",attachmentFileTooLargeSize:"عذراً، حجم الملف {file_mb} ميغابايت، وهو كبير جداً. يجب أن يكون حجم الملف أقل من {max_mb} ميغابايت."},zh:{attachmentLimitReached:"文件过大。此聊天最多可接收共 {max_mb} MB 的文件。",attachmentLimitReachedUsed:"文件过大。此聊天最多可接收共 {max_mb} MB 的文件,目前已使用 {used_mb} MB。",attachmentFileTooLarge:"抱歉,文件过大。文件大小必须小于 {max_mb} MB。",attachmentTypeNotAllowed:"抱歉,无法接收此类文件。您可以发送:{types}。",attachmentLimitReachedSize:"该文件为 {file_mb} MB,过大。此聊天最多可接收共 {max_mb} MB 的文件。",attachmentLimitReachedUsedSize:"该文件为 {file_mb} MB,过大。此聊天最多可接收共 {max_mb} MB 的文件,目前已使用 {used_mb} MB。",attachmentFileTooLargeSize:"抱歉,该文件为 {file_mb} MB,过大。文件大小必须小于 {max_mb} MB。"},ja:{attachmentLimitReached:"ファイルが大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までです。",attachmentLimitReachedUsed:"ファイルが大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までで、すでに {used_mb} MB を使用しています。",attachmentFileTooLarge:"申し訳ありませんが、ファイルが大きすぎます。ファイルは {max_mb} MB 未満にしてください。",attachmentTypeNotAllowed:"申し訳ありませんが、この種類のファイルは受け付けていません。送信できるファイル: {types}",attachmentLimitReachedSize:"このファイルは {file_mb} MB で、大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までです。",attachmentLimitReachedUsedSize:"このファイルは {file_mb} MB で、大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までで、すでに {used_mb} MB を使用しています。",attachmentFileTooLargeSize:"申し訳ありませんが、このファイルは {file_mb} MB で、大きすぎます。ファイルは {max_mb} MB 未満にしてください。"}};function X(e,t){const n=G(e),r=U[n]||B,a=$[n];return a?.[t]??r[t]??z[n]?.[t]??K[n]?.[t]??$.en[t]??z.en[t]??K.en[t]??B[t]??t}function Z(e){const t=G(e);return e=>X(t,e)}const Q=new Set(["NotAllowedError","PermissionDeniedError","SecurityError"]),J=new Set(["NotFoundError","DevicesNotFoundError","OverconstrainedError"]);function ee(e){try{const t="string"==typeof e?.name?e.name:"";if(Q.has(t))return"micDenied";if(J.has(t))return"micNotFound";const n="string"==typeof e?.message?e.message.toLowerCase():"";if(n.includes("permission denied")||n.includes("permission dismissed"))return"micDenied";if(n.includes("device not found")||n.includes("no microphone"))return"micNotFound"}catch{}return"voiceUnavailable"}function te(e){return"human_reply"===e?.contentType||"handoff_ack"===e?.contentType||"handoff_wait"===e?.contentType||"verification_request"===e?.contentType||!0===e?.staffTurn}function ne(e){if(!e||"user"===e.role)return null;const t=e.metadata?.senderName;return"string"==typeof t&&t.trim()?t.trim():null}const re=e=>e.replace(/([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])\s+([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])/g,"$1$2"),ae=/^(https?|mailto|tel):/i,oe=e=>{const t=(e||"").trim();return t?/^https?:\/\//i.test(t)||ae.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?"":`https://${t.replace(/^\/+/,"")}`:""},ie=(...e)=>e.filter(Boolean).join(" "),se={fullname:0,name:0,username:0,email:1,phone:2,mobileno:2},le=e=>{if(!e)return 99;const t=String(e).toLowerCase();return se[t]??99},ce="eshal_chat_session",ue="eshal_chat_session_messages",de="eshal_chat_handoff_points";function pe(e,t=200,n=50){if(!Array.isArray(e))return[];("number"!=typeof t||t<=0)&&(t=200),("number"!=typeof n||n<=0||n>=t)&&(n=Math.min(50,t-1));let r=e;for(;r.length>t;)r=r.slice(n);return r}function fe(e){if(!e||"object"!=typeof e)return null;const t={};return"string"==typeof e.senderName&&e.senderName&&(t.senderName=e.senderName),"string"==typeof e.contentType&&e.contentType&&(t.contentType=e.contentType),Object.keys(t).length>0?t:null}const ge=(e,t,n,r)=>{if(e&&t)try{const a=r?.cap,o=r?.trimBatch,i=function(e){return Array.isArray(e)?e.filter(e=>e&&!e.isWelcome&&(e.content||Array.isArray(e.sources)&&e.sources.length>0||Array.isArray(e.attachments)&&e.attachments.length>0)).map(e=>({id:e.id,role:e.role,content:e.content,timestamp:e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:(new Date).toISOString(),type:e.type??null,...Array.isArray(e.sources)&&e.sources.length>0?{sources:e.sources}:{},...void 0!==e.feedback?{feedback:e.feedback}:{},...Array.isArray(e.prompts)&&e.prompts.length>0?{prompts:e.prompts}:{},...fe(e.metadata)?{metadata:fe(e.metadata)}:{},...Array.isArray(e.attachments)&&e.attachments.length>0?{attachments:e.attachments.filter(e=>e&&(e.filename||e.storageKey)).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url}))}:{}})):[]}(pe(n,a,o));localStorage.setItem(`${ue}_${e}_${t}`,JSON.stringify(i))}catch{}},me=(e,t)=>{if(e&&t)try{localStorage.removeItem(`${ue}_${e}_${t}`),localStorage.removeItem(`${de}_${e}_${t}`)}catch{}},he=(e,t)=>{if(null==e||!t)return null;const n={MINUTES:6e4,HOURS:36e5,DAYS:864e5}[t.toUpperCase()];return void 0===n?(console.warn(`[Session] Unknown timeout unit: ${t}`),null):Number(e)*n},be=e=>{try{const t=localStorage.getItem(`${ce}_${e}`);return t?JSON.parse(t):null}catch{return null}},ye=(e,t,n)=>{if(!e||!e.lastActivity)return!1;if(null==t||0===t)return!0;if(null!==t&&null!==n){const r=JSON.stringify({value:t,unit:n?.toUpperCase()});if(e.settingsSnapshot&&e.settingsSnapshot!==r)return console.log("[Session] Timeout settings changed - treating session as invalid."),!1}if(null===e.firstInteractionAt)return!0;const r=he(t,n);if(!r)return!0;const a=new Date(e.lastActivity).getTime(),o=Date.now()-a,i=o<r;return i||console.log(`[Session] Session expired. Elapsed: ${Math.floor(o/1e3)}s, Timeout: ${Math.floor(r/1e3)}s`),i},ve=(e,t,n={})=>{try{const r=(new Date).toISOString();console.log(`[Session] Saving new session: ${t} for org: ${e}`),localStorage.setItem(`${ce}_${e}`,JSON.stringify({conversationId:t,lastActivity:r,createdAt:r,firstInteractionAt:null,...n}))}catch{}},we=e=>{try{const t=be(e);if(!t)return;const n=(new Date).toISOString();t.lastActivity=n,t.firstInteractionAt||(t.firstInteractionAt=n),localStorage.setItem(`${ce}_${e}`,JSON.stringify(t))}catch{}},Se=e=>{try{return be(e)?.onboardingName??""}catch{return""}},xe=(e,t)=>{try{if(!e)return;if(!Array.isArray(t)||0===t.length)return void localStorage.removeItem(`${ce}_prompts_${e}`);localStorage.setItem(`${ce}_prompts_${e}`,JSON.stringify(t))}catch{}};function ke(e){return null==e?"":String(e)}function Ee(e,t){const n=ke(e),r=ke(t).trim();if(!r||!n.trim())return n;const a=function(e){return ke(e).trim().split(/\s+/).filter(Boolean).map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" ")}(r);if(new RegExp("^\\s*(?:hi|hey|hello)\\s+"+a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","i").test(n))return n;const o=n.match(/^\s*(hi|hey|hello)(?:\s+there)?\s*([-,!.:;]+)?\s*/i);if(o){const e=o[1],t=void 0!==o[2]?o[2]:",",r=n.slice(o[0].length);return e+" "+a+t+(r?" "+r:"")}return"Hi "+a+", "+n}const Ae=new Set(["fullname","name","username"]);const Te=(e,t)=>{const n=(Array.isArray(t)?t:[]).filter(e=>e&&"string"==typeof e.url&&e.url).map(e=>`[${String(e.filename||"Attachment").replace(/[[\]]/g,"")}](${e.url})`);return 0===n.length?e:[String(e??"").trim(),...n].filter(Boolean).join("\n\n")},Ce=e=>({senderName:e?.senderName,..."string"==typeof e?.contentType&&e.contentType?{contentType:e.contentType}:{}}),Oe=({id:e,role:t,content:n,isProcessing:r=!1,isError:a=!1,metadata:o,attachments:i})=>({id:e,role:t,content:n,timestamp:new Date,isProcessing:r,...a?{isError:!0}:{},metadata:o,...Array.isArray(i)&&i.length>0?{attachments:i}:{}}),Ie=(e,t)=>{const n=[...e.map(e=>({...e,metadata:e.metadata||{source:"sse"}})),...t];return Array.from(new Map(n.map(e=>[e.id,e])).values()).sort((e,t)=>(e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime())-(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime()))};function Re(){return`widget-session-${"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}`}function Ne(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(16)}-${Math.random().toString(16).slice(2,14)}`}const _e=e=>e&&e.length>0?e:[],Pe=({welcomeMessage:t,fallbackMessage:n,quickQuestions:r=[],apiBaseUrl:a,wsBaseUrl:o,apiKey:i,organizationId:s,getAuthToken:l,autoOpen:c,openDelay:u,darkMode:d,enableVoiceInteraction:p=!1,provideCitations:f=!0,onboardingQuestions:g=[],onboardingEnabled:v=!1,collectionPrompt:w,inactivityTimeoutValue:S,inactivityTimeoutUnit:x,messageLimits:k,locale:E="en"})=>{const A=e.useMemo(()=>Z(E),[E]),T=e.useMemo(()=>({cap:"number"==typeof k?.cap&&k.cap>0?k.cap:200,trimBatch:"number"==typeof k?.trimBatch&&k.trimBatch>0?k.trimBatch:50}),[k?.cap,k?.trimBatch]),[C,I]=e.useState(c),[R,N]=e.useState(!1),[_,P]=e.useState(d),[L,D]=e.useState(()=>{try{const e=be(s);if(void 0!==S&&e&&ye(e,S,x))return[]}catch{}if(!t)return[];let e=t;try{e=Ee(t,Se(s))}catch{}return[{...Oe({id:Date.now().toString(),role:"assistant",content:e}),isWelcome:!0}]}),[B,U]=e.useState(""),z=e.useRef(""),$=e.useCallback(e=>{const t="function"==typeof e?e(z.current):e;z.current=t,U(t)},[]),[q,G]=e.useState(!1),H=e.useRef(null),V=e.useRef(null),W=e.useRef(1),[Y,K]=e.useState(null),[X,Q]=e.useState(null),J=e.useRef(null);e.useEffect(()=>{J.current=X},[X]);const[ae,oe]=e.useState(null),ie=e.useRef(null);e.useEffect(()=>{ie.current=ae},[ae]);const[se,fe]=e.useState(!1),[Pe,Le]=e.useState(()=>{try{const e=be(s);if(e&&e.onboardingCompleted)return!0}catch{}return!1}),[De,Me]=e.useState(()=>{try{return Se(s)||""}catch{return""}}),je=e.useMemo(()=>Ee(t,De),[t,De]),[Fe,Be]=e.useState(null),[Ue,ze]=e.useState({}),$e=e.useRef(!1),qe=e.useRef(!1),Ge=e.useRef(0),[He,Ve]=e.useState(!1),[We,Ye]=e.useState(!1),[Ke,Xe]=e.useState([]),[Ze,Qe]=e.useState("idle"),[Je,et]=e.useState(null),[tt,nt]=e.useState(!1),[rt,at]=e.useState(()=>{try{const e=be(s);if(void 0!==S&&e&&ye(e,S,x))return e.conversationId}catch{}return Re()}),ot=e.useRef(()=>{}),it=e.useRef(null),st=e.useRef(null),[lt,ct]=e.useState(!1),[ut,dt]=e.useState(null),[pt,ft]=e.useState([]),gt=e.useRef(L);e.useEffect(()=>{gt.current=L},[L]);const[mt,ht]=e.useState([]),bt=e.useRef(!1),yt=e.useCallback(({recordPoint:e=!0}={})=>{const t=bt.current;if(bt.current=!0,ct(!0),t||!e)return;const n=gt.current||[],r=n.length>0?n[n.length-1].id:null;r&&ht(e=>e.includes(r)?e:[...e,r])},[]),vt=e.useCallback(()=>{bt.current=!1,ct(!1)},[]),wt=e.useRef(null),St=e.useRef(null),xt=e.useRef(null),kt=e.useRef(!1),Et=e.useRef(null),At=e.useCallback(e=>{Et.current&&clearTimeout(Et.current),Et.current=null,kt.current&&(kt.current=!1,St.current?.port.postMessage({command:"resume"===e?"resume":"endOfAudio"}))},[]),Tt=e.useRef(null),Ct=e.useRef(null),Ot=e.useRef(null),It=e.useRef(null),Rt=e.useRef(null),Nt=e.useRef(null),_t=e.useRef(!1),Pt=e.useRef(null),Lt=e.useRef(null),Dt=e.useRef(!1),Mt=e.useRef(!1);e.useRef(null);const jt=e.useRef(null);e.useRef(null);const Ft=e.useRef(!1),Bt=e.useRef(null),Ut=e.useRef(!1),zt=e.useRef(!1),$t=e.useRef(!1),qt=e.useRef(null),Gt=e.useRef(L);Gt.current=L;const Ht=e.useRef(null),Vt=e.useRef(null),Wt=e.useRef(null),Yt=e.useRef(null),Kt=e.useRef(null),Xt=e.useCallback(e=>{if(!e)return;const t=new Date(e).getTime();if(!Number.isFinite(t))return;t>(Kt.current?new Date(Kt.current).getTime():-1/0)&&(Kt.current=new Date(t).toISOString())},[]),Zt=e.useCallback(e=>{if(Array.isArray(e)&&0!==e.length){for(const t of e)Xt(t?.createdAt);D(t=>{const n=new Set(t.map(e=>e.id)),r=e.filter(e=>e&&e.id&&!n.has(e.id)).map(e=>({...Oe({id:e.id,role:e.role||"assistant",content:Te(e.content,e.attachments),isProcessing:!1,metadata:Ce(e)}),timestamp:e.createdAt?new Date(e.createdAt):new Date}));if(0===r.length)return t;const a=e=>{const t=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return Number.isFinite(t)?t:0},o=[...t,...r];return o.sort((e,t)=>a(e)-a(t)),o})}},[Xt]),Qt=e.useCallback(async()=>{if(a&&rt)try{const e={};if("function"==typeof l){const t=await l();t&&(e.Authorization=`Bearer ${t}`)}const t=Kt.current,n=`${a.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(rt)}`+(t?`?since=${encodeURIComponent(t)}`:""),r=await fetch(n,{headers:e,credentials:"include"});if(r.status===h)return void ot.current(null);if(!r.ok)return;const o=await r.json(),i=Array.isArray(o?.messages)?o.messages:[];Zt(i.filter(te)),o?.csatRequest&&dt(o.csatRequest)}catch{}},[a,rt,l,Zt]),Jt=e.useCallback(async e=>{if(st.current)return void(e&&e());if(!a||!rt)return;let t=`${a.replace(/\/$/,"")}/api/v1/widget/events/${encodeURIComponent(rt)}`;if("function"==typeof l)try{const e=await l();e&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(e)}`)}catch{}if(st.current)return void(e&&e());const n=new EventSource(t);n.onmessage=e=>{try{const r=JSON.parse(e.data);if("csat_request"===r.type&&r.csat)return void dt(r.csat);if("agent_joined"===r.type&&r.name){const e=String(r.name).trim();if(!e)return;const t=gt.current||[];if(t.some(t=>ne(t)===e))return;const n=t[t.length-1]?.id||null;return void ft(t=>t.some(t=>t.name===e)?t:[...t,{name:e,afterMessageId:n}])}if("conversation_erased"===r.type)return n.close(),st.current===n&&(st.current=null),void ot.current(null);if("message_created"===r.type&&r.message){Xt(r.message.createdAt);const e=(t=r.message,"ai"===t?.responder||"human"===t?.responder?t.responder:null);"ai"===e?vt():"human"===e&&yt(),D(e=>e.some(e=>e.id===r.message.id)?e:[...e,Oe({id:r.message.id,role:r.message.role||"assistant",content:Te(r.message.content,r.message.attachments),isProcessing:!1,metadata:Ce(r.message)})])}}catch{}var t},n.onopen=()=>{Qt(),e&&e()},n.onerror=()=>{},st.current=n},[a,rt,l,Qt,vt,yt]);e.useEffect(()=>()=>{st.current&&(st.current.close(),st.current=null)},[]);const en=e.useMemo(()=>{if(!s)return null;const e=((e,t)=>{if(t)return t.replace(/\/$/,"");if(!e)return"wss://dev.eshal.ai/voice/ws";try{const t=new URL(e);return t.protocol=t.protocol.replace(/^http/,"ws"),t.pathname="/voice/ws",t.toString().replace(/\/$/,"")}catch(e){return console.error("Invalid API base URL provided for WebSocket:",e),"wss://dev.eshal.ai/voice/ws"}})(a,o);return`${e}/${s}/${rt}`},[a,o,s,rt]),tn=e.useCallback(()=>{const e=`msg-${W.current}`;return W.current+=1,e},[]);e.useEffect(()=>{if(c&&u>0){const e=setTimeout(()=>I(!0),u);return()=>clearTimeout(e)}},[c,u]),e.useEffect(()=>{let e=!1;return(async()=>{try{const{default:t}=await Promise.resolve().then(function(){return Ua}),n=new t({cache:!0,geoFromBrowser:!1,preferredProvider:"ipwho.is",onError:()=>{}}),r=await n.init();if(e)return;if(r?.fingerprintId&&(Wt.current=r.fingerprintId),r?.geo||r?.ip){const e=r.geo||{};Yt.current={ip:r.ip||e.ip||null,country:e.country||null,countryCode:e.countryCode||null,region:e.region||null,city:e.city||null,timezone:e.timezone||null}}}catch{}})(),()=>{e=!0}},[]),e.useEffect(()=>{P(d)},[d]);const nn=e.useRef(!1),rn=e.useRef(!1),an=e.useRef(!1),on=e.useRef({value:null,unit:null}),[sn,ln]=e.useState(!1);e.useEffect(()=>{if(!s||!rt||void 0===S)return;const e=be(s);if(e&&ye(e,S,x)){if(rt!==e.conversationId)return void at(e.conversationId);if(!nn.current){nn.current=!0;const e=((e,t)=>{if(!e||!t)return[];try{const n=localStorage.getItem(`${ue}_${e}_${t}`);if(!n)return[];const r=JSON.parse(n);return Array.isArray(r)?r.map(e=>({...e,timestamp:e.timestamp?new Date(e.timestamp):new Date})):[]}catch{return[]}})(s,rt);if(e.length>0){if(rn.current=!0,t){const t=e[0]?.timestamp,n=t instanceof Date?t.getTime():t?new Date(t).getTime():Date.now(),r={...Oe({id:"welcome-restored",role:"assistant",content:je}),isWelcome:!0,timestamp:new Date(n-1)};D([r,...e])}else D(e);const n=new Set(e.map(e=>e.id)),r=((e,t)=>{if(!e||!t)return[];try{const n=JSON.parse(localStorage.getItem(`${de}_${e}_${t}`)||"[]");return Array.isArray(n)?n.filter(e=>"string"==typeof e&&e).slice(-20):[]}catch{return[]}})(s,rt).filter(e=>n.has(e));r.length>0&&ht(r);if(!e.some(e=>"assistant"===e.role&&Array.isArray(e.prompts)&&e.prompts.length>0)){const e=(e=>{try{const t=localStorage.getItem(`${ce}_prompts_${e}`);return t&&JSON.parse(t)||[]}catch{return[]}})(s);e.length>0&&D(t=>{const n=[...t];for(let t=n.length-1;t>=0;t-=1)if("assistant"===n[t].role){n[t]={...n[t],prompts:e};break}return n})}}}}else if(nn.current||(nn.current=!0),e&&rt===e.conversationId){const e=Re();console.warn(`[Session] Rotating expired ID ${rt} -> ${e}`),me(s,rt),at(e)}else e?.conversationId&&e.conversationId!==rt&&me(s,e.conversationId),e&&e.conversationId===rt||ve(s,rt,{settingsSnapshot:JSON.stringify({value:S,unit:x?.toUpperCase()})})},[s,rt,a,S,x]);const cn=e.useRef(null);e.useEffect(()=>{if(!a||!s||!rt)return;if(cn.current===rt)return;cn.current=rt;let e=!1;return(async()=>{try{const t={};if("function"==typeof l){const e=await l();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${a.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(rt)}`,{headers:t,credentials:"include"});if(e)return;if(n.status===h)return void ot.current(null);if(!n.ok)return;const r=await n.json(),o=(Array.isArray(r?.messages)?r.messages:[]).filter(te);!e&&r?.csatRequest&&dt(r.csatRequest),e||Zt(o),e||"human"!==r?.responder||(yt({recordPoint:!1}),Jt())}catch{}})(),()=>{e=!0}},[a,s,rt,l,Jt,yt,Zt]),e.useEffect(()=>{if(s&&L&&0!==L.length)for(let e=L.length-1;e>=0;e-=1){const t=L[e];if("assistant"===t?.role&&Array.isArray(t.prompts)&&t.prompts.length>0)return void xe(s,t.prompts)}},[L,s]),e.useEffect(()=>{He||q||L.length<=T.cap||D(e=>pe(e,T.cap,T.trimBatch))},[L.length,He,q,T.cap,T.trimBatch]),e.useEffect(()=>{s&&rt&&(He||q||ge(s,rt,Ie(L,Ke),T))},[L,Ke,s,rt,He,q,T]),e.useEffect(()=>{s&&rt&&nn.current&&((e,t,n)=>{if(e&&t)try{const r=(Array.isArray(n)?n:[]).filter(e=>"string"==typeof e&&e).slice(-20);0===r.length?localStorage.removeItem(`${de}_${e}_${t}`):localStorage.setItem(`${de}_${e}_${t}`,JSON.stringify(r))}catch{}})(s,rt,mt)},[mt,s,rt]),e.useEffect(()=>{if(!v||Pe)return;_e(g).length>0&&fe(!0)},[v,Pe,g]),e.useEffect(()=>{t&&!rn.current&&D(e=>{if(!e.length)return[{...Oe({id:Date.now().toString(),role:"assistant",content:je}),isWelcome:!0}];const[t,...n]=e;return t.isWelcome?[{...t,content:je},...n]:e})},[t,je]),e.useCallback(e=>{D(t=>t.map(t=>t.id===e.id?{...t,...e.update(t)}:t))},[]);const un=e.useCallback((e,t={})=>{if(!e)return;const n=t.replaceMarker||null;D(t=>[...n?(t||[]).filter(e=>e?.metadata?.synthesizedKind!==n):t||[],Oe({id:tn(),role:"assistant",content:e,metadata:n?{synthesizedKind:n}:void 0})])},[tn]),dn=e.useCallback(()=>{try{H.current&&H.current.abort()}catch{}},[]),pn=e.useCallback(async(e,t,r)=>{const o=String(e??"").trim(),i=Array.isArray(r?.attachments)?r.attachments:[],c=r?.userMessageId||Ne(),u=r?.assistantMessageId||Ne();if(!o&&0===i.length)return{success:!1,error:"Message cannot be empty"};if(qe.current)return{success:!1,error:"A message is already being sent"};qe.current=!0;const d=Ge.current+=1,p=()=>{Ge.current===d&&(G(!1),qe.current=!1)};if("Connect with a human representative"===o){const e=async()=>{if(a&&rt){const e={"Content-Type":"application/json"};if("function"==typeof l){const t=await l();t&&(e.Authorization=`Bearer ${t}`)}fetch(`${a.replace(/\/$/,"")}/api/v1/widget/handoff/${encodeURIComponent(rt)}`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({reason:"User clicked handoff button"})}).then(e=>{e.status===h&&ot.current(null)}).catch(()=>{})}};yt(),Jt(e)}if(t&&!["inquiry","complaint","technical"].includes((t||"").toLowerCase())||(ie.current=o,oe(o)),!a)return qe.current=!1,D(e=>[...e||[],Oe({id:tn(),role:"assistant",content:A("connectionError"),isProcessing:!1,isError:!0})]),console.error("Chat widget configuration error: apiBaseUrl is required for streaming."),{success:!1,error:"API base URL is required"};const g=["inquiry","complaint","technical","userName","email","phone","fullname","mobileno"];let v="inquiry";if(t){const e=t.toLowerCase();"fullname"===e||"name"===e?v="userName":"email"===e?v="email":"phone"===e||"mobileno"===e?v="phone":g.includes(e)&&(v=e)}let w=null;const S=(e,t)=>{null!=e&&D(n=>(n||[]).map(n=>n.id===e?{...n,status:t}:n))};if("inquiry"===v||"complaint"===v||"technical"===v){w=tn();const e={...Oe({id:w,role:"user",content:o,...i.length?{attachments:i}:{}}),userMessageId:c,assistantMessageId:u};D(t=>{const n=(t||[]).map(e=>"assistant"===e.role&&e.prompts?.length?{...e,prompts:void 0}:e);return r&&r.skipUserAppend?n:[...n,e]}),$(""),bt.current||G(!0)}else $("");try{const e={message:o,type:v,conversationId:rt,userMessageId:c,assistantMessageId:u,enable_citation:f??!0,channel:"WIDGET",...Wt.current?{fingerprintId:Wt.current}:{},...Yt.current?{visitor:Yt.current}:{},...Y&&(Y.category||Y.tags&&Y.tags.length)?{filter:Y}:{},...J.current?{routing:J.current}:{},...i.length?{attachments:i}:{},...r?.toolConfirmation?{tool_confirmation:r.toolConfirmation}:{},...r?.verificationComplete?{verification_complete:r.verificationComplete}:{},messageHistory:L.filter(e=>!e.isProcessing&&e.content&&e.content.trim()&&!["userName","email","phone"].includes(e.type)).map(e=>{let t;return t=e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:e.timestamp?new Date(e.timestamp).toISOString():(new Date).toISOString(),{id:e.id,role:e.role,content:e.content,timestamp:t,isProcessing:!1}})},t=[500,1500];if("userName"===v||"email"===v||"phone"===v){const t=(await y(e,a,l)).getReader(),n=new TextDecoder;for(;;){const{done:e,value:r}=await t.read();if(e)break;n.decode(r)}return{success:!0}}if(bt.current&&("inquiry"===v||"complaint"===v||"technical"===v)){try{const t=(await y(e,a,l)).getReader();for(;;){const{done:e}=await t.read();if(e)break}}catch(e){if(e instanceof b)throw e;return console.error("Error sending message (handed off):",e),S(w,"failed"),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}return S(w,"sent"),we(s),{success:!0}}if("inquiry"===v||"complaint"===v||"technical"===v){let n;for(let r=0;r<=t.length;r+=1)try{H.current=new AbortController;const t=await y(e,a,l,H.current.signal);return await O(t,D,p,()=>{yt(),Jt()}),S(w,"sent"),we(s),{success:!0}}catch(e){if(n=e,e&&"AbortError"===e.name)return D(e=>(e||[]).filter(e=>!e.isProcessing)),S(w,"sent"),{success:!0,stopped:!0};if(e instanceof m&&r<t.length){D(e=>(e||[]).filter(e=>!e.isProcessing));const n=t[r];console.warn(`[chat] stream dropped (attempt ${r+1}); retrying in ${n}ms - ${e.message}`),await new Promise(e=>setTimeout(e,n));continue}throw e}throw n}return await y(e,a,l),we(s),{success:!0}}catch(e){if(e instanceof b){const e="inquiry"===v||"complaint"===v||"technical"===v;return ot.current(e?{text:o,attachments:i,sessionId:rt}:null),{success:!1,error:"conversation_erased",erased:!0}}return console.error("Error sending message:",e),"inquiry"!==v&&"complaint"!==v&&"technical"!==v||(G(!1),S(w,"failed"),console.error("[widget] send failed before any token; showing the org fallback. This is a FAILED TURN, not a knowledge gap."),D(e=>[...(e||[]).filter(e=>!e.isProcessing),Oe({id:tn(),role:"assistant",content:n?.trim()||A("connectionError"),isProcessing:!1,isError:!0})])),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}finally{p()}},[a,i,tn,l,L,rt,X,Y,f]);e.useEffect(()=>{const e=it.current;e&&e.sessionId!==rt&&(it.current=null,pn(e.text,void 0,{attachments:e.attachments}))},[rt,pn]);const fn=e.useCallback(e=>e&&"failed"===e.status?(D(t=>(t||[]).filter(t=>t.id!==e.id)),pn(e.content,void 0,{attachments:e.attachments,userMessageId:e.userMessageId,assistantMessageId:e.assistantMessageId})):Promise.resolve({success:!1,error:"Nothing to retry"}),[pn]),gn=e.useCallback(async e=>{const t=_e(g);if(0===t.length)return;const n=function(e,t){if(!Array.isArray(e)||!t)return"";for(let n=0;n<e.length;n+=1){const r=e[n],a=r?r.fieldType:void 0,o=ke(a).toLowerCase();if(!Ae.has(o))continue;const i=t[null==a?"":a];if("string"!=typeof i)continue;const s=i.trim();if(s)return s}return""}(t,e);fe(!1),Le(!0),((e,t)=>{try{const n=be(e);if(!n)return;n.onboardingCompleted=!0;const r=(t??"").trim();r&&(n.onboardingName=r),localStorage.setItem(`${ce}_${e}`,JSON.stringify(n))}catch{}})(s,n),n&&Me(n),ze(t=>({...t,...e})),Fe&&!$e.current&&($e.current=!0,$(Fe),Be(null));const r=[...t].sort((e,t)=>le(e.fieldType)-le(t.fieldType)),o={};for(const t of r){const n=t.fieldType||"question",r=(e[n]??"").trim();r&&(o[n]=r)}if(Object.keys(o).length>0&&a&&rt)try{await(async(e,{conversationId:t,organizationId:n},r,a)=>{const o={"Content-Type":"application/json"};if("function"==typeof a){const e=await a();e&&(o.Authorization=`Bearer ${e}`)}const i=await fetch(`${r.replace(/\/$/,"")}/api/v1/support/onboarding`,{method:"POST",headers:o,credentials:"include",body:JSON.stringify({conversationId:t,organizationId:n,answers:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()})(o,{conversationId:rt,organizationId:s},a,l)}catch(e){console.error("[onboarding] failed to save onboarding answers",e)}},[g,Fe,s,a,rt,l]),mn=e.useRef(null);e.useEffect(()=>{if(q||qe.current||!mn.current)return;const{text:e,attachments:t}=mn.current;mn.current=null;const n=Array.isArray(t)&&t.length>0;pn(e,void 0,n?{attachments:t}:void 0)},[q,pn]);const hn=e.useCallback(async(e,t)=>{const n=String(e??z.current).trim(),r=Array.isArray(t)&&t.length>0;if(n||r)return qe.current?(mn.current={text:n,attachments:r?t:void 0},void $("")):void await pn(n,void 0,r?{attachments:t}:void 0)},[pn,$]),bn=e.useCallback(async(e,t)=>{await hn(e,t)},[hn]),yn=e.useCallback(async e=>{const t=e?.trim();t&&await pn(t)},[pn]),vn=e.useCallback(async(e,t,n)=>{if(D(t=>t.filter(t=>t.decisionData?.decisionId!==e)),"routing-clarification"===e){const e=String(n||"").toLowerCase(),r="database"===t||"knowledge"===t?t:"database"===e||"knowledge"===e?e:null;if(r){J.current=r,Q(r);const e=ie.current;ie.current=null,oe(null),e&&e.trim()&&setTimeout(()=>{pn(e,"inquiry",{skipUserAppend:!0}).catch(e=>console.warn("[routing-clarification] re-send failed:",e))},0)}return}if("connect_agent"===n){const e=Oe({id:tn(),role:"assistant",content:"Great! I'm setting up a connection with a live customer service agent. Please hold on for a moment while I transfer you."});D(t=>[...t,e])}else if("decline"===n){const e=Oe({id:tn(),role:"assistant",content:"I understand. I apologize that I don't have specific information about your query in my knowledge base. Is there anything else I can help you with?"});D(t=>[...t,e])}},[tn,pn,ae]);e.useCallback(()=>{Pt.current&&(Xe(e=>e.map(e=>e.id===Pt.current?{...e,isProcessing:!1}:e)),Pt.current=null)},[]);const wn=e.useCallback((e,t=!1)=>{if(Ut.current=!0,!e||"string"==typeof e&&!e.trim())return void(t&&Pt.current&&(Xe(e=>e.map(e=>e.id===Pt.current?{...e,isProcessing:!1}:e)),Pt.current=null));const n=re(e);Xe(e=>{const r=e.length;let a=[...e];if(Pt.current){if(a.some(e=>e.id===Pt.current))a=a.map(e=>{if(e.id!==Pt.current)return e;const r=re(`${e.content||""}${n}`);return{...e,content:r,isProcessing:!t,metadata:{...e.metadata,transcriptionType:"input"}}});else{console.error("[BIDI] appendUserTranscription: ERROR - user message not found!",{expectedId:Pt.current,existingIds:a.map(e=>e.id)});const e=`bidi-input-${Date.now()}`;Pt.current=e;const r=Oe({id:e,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});a=[...a,r],console.log("[BIDI] appendUserTranscription: recreated lost user message",{messageId:e})}}else{const r=`bidi-input-${Date.now()}`,o=e.filter(e=>"assistant"===e.role&&"bidi"===e.metadata?.source).sort((e,t)=>{const n=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime())-n})[0];o&&(o.timestamp instanceof Date?o.timestamp.getTime():new Date(o.timestamp).getTime());const i=Oe({id:r,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});a.some(e=>e.id===r)?(console.warn("[BIDI] appendUserTranscription: message already exists, updating instead",{messageId:r}),Pt.current=r,a=a.map(e=>e.id===r?{...e,content:`${e.content||""}${n}`,isProcessing:!t}:e)):(a=[...a,i],Pt.current=r)}return a.length<r?(console.error("[BIDI] appendUserTranscription: CRITICAL ERROR - losing messages!",{prevLength:r,resultLength:a.length,prevIds:e.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)})),resultIds:a.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)}))}),e):a}),t&&(Pt.current=null,G(!0))},[]),Sn=e.useCallback((e,t=!1)=>{if(G(!1),console.log("[BIDI] appendAssistantContent called",{text:e?.substring(0,50),finished:t,currentAssistantId:Lt.current,currentInputId:Pt.current}),!e||"string"==typeof e&&!e.trim())return console.log("[BIDI] appendAssistantContent: skipping empty text"),void(t&&Lt.current&&(Xe(e=>e.map(e=>e.id!==Lt.current?e:{...e,isProcessing:!1})),Lt.current=null,jt.current=null));const n=`${Lt.current||"new"}-${e.substring(0,100)}-${t}`;if(Ft.current&&Bt.current===n)return;Ft.current=!0,Bt.current=n;const r=Pt.current;if(Xe(n=>{const a=n.length;let o=[...n];if(console.log("[BIDI] appendAssistantContent: starting update",{prevLength:a,prevMessageIds:n.map(e=>e.id),inputMessageIdToFinalize:r,currentAssistantId:Lt.current,textLength:e.length}),r){o.some(e=>e.id===r)?o=o.map(e=>e.id===r?{...e,isProcessing:!1}:e):console.warn("[BIDI] appendAssistantContent: input message not found for finalization",{inputMessageId:r,existingIds:o.map(e=>e.id)})}if(Lt.current){if(o.some(e=>e.id===Lt.current))o=o.map(n=>{if(n.id!==Lt.current)return n;const r=`${n.content||""}${e}`;return console.log("[BIDI] appendAssistantContent: updating existing message",{messageId:n.id,oldContentLength:n.content?.length||0,newContentLength:r.length,textLength:e.length}),{...n,content:r,isProcessing:!t,...Array.isArray(Vt.current)&&Vt.current.length>0?{sources:Vt.current}:{}}}),Array.isArray(Vt.current)&&Vt.current.length>0&&(Vt.current=null);else{console.error("[BIDI] appendAssistantContent: ERROR - assistant message not found!",{expectedId:Lt.current,existingIds:o.map(e=>e.id)});const n=`bidi-assistant-${Date.now()}`;Lt.current=n;const r=Oe({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(Vt.current)&&Vt.current.length>0&&(r.sources=Vt.current,Vt.current=null),o=[...o,r],console.log("[BIDI] appendAssistantContent: recreated lost assistant message",{messageId:n})}}else{const n=`bidi-assistant-${Date.now()}`,r=Oe({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(Vt.current)&&Vt.current.length>0&&(r.sources=Vt.current,Vt.current=null);o.some(e=>e.id===n)?(console.error("[BIDI] appendAssistantContent: ERROR - message ID collision!",{messageId:n,existingIds:o.map(e=>e.id)}),o=o.map(r=>r.id===n?{...r,content:`${r.content||""}${e}`,isProcessing:!t,...Array.isArray(Vt.current)&&Vt.current.length>0?{sources:Vt.current}:{}}:r),Array.isArray(Vt.current)&&Vt.current.length>0&&(Vt.current=null),Lt.current=n):(o=[...o,r],Lt.current=n)}return console.log("[BIDI] appendAssistantContent: atomic state update complete",{prevLength:a,newLength:o.length,finished:t,messageIds:o.map(e=>e.id),messageRoles:o.map(e=>e.role)}),o.length<a?(console.error("[BIDI] appendAssistantContent: CRITICAL ERROR - losing messages!",{prevLength:a,resultLength:o.length,prevIds:n.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)})),resultIds:o.map(e=>({id:e.id,role:e.role,content:e.content?.substring(0,30)}))}),n):o}),r&&(Pt.current=null),t)console.log("[BIDI] appendAssistantContent: finalizing message",{messageId:Lt.current}),Lt.current=null,jt.current=null;else{const e=updateKey;Promise.resolve().then(()=>{jt.current===e&&(jt.current=null)})}},[]),xn=e.useCallback((e,t=!1,n=!1)=>{if(console.log("[BIDI] handleContentParts called",{partsCount:e?.length,finished:t,audioOnly:n}),!e||!Array.isArray(e))return void console.warn("[BIDI] handleContentParts: invalid parts",e);let r="";e.forEach((e,t)=>{e.inlineData?.data&&e.inlineData.mimeType?.startsWith("audio/pcm")&&(console.log("[BIDI] handleContentParts: sending audio data to player"),St.current?St.current.port.postMessage((e=>{if("undefined"==typeof window)return new ArrayBuffer(0);let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4!=0;)t+="=";const n=window.atob(t),r=n.length,a=new Uint8Array(r);for(let e=0;e<r;e+=1)a[e]=n.charCodeAt(e);return a.buffer})(e.inlineData.data)):console.warn("[BIDI] handleContentParts: audioPlayerNodeRef is null")),!n&&e.text&&(r+=e.text,console.log("[BIDI] handleContentParts: accumulated text part",{text:e.text.substring(0,50),index:t,totalAccumulated:r.length}))}),r&&(console.log("[BIDI] handleContentParts: calling appendAssistantContent once",{textLength:r.length,finished:t}),Sn(r,t))},[Sn]),kn=e.useCallback(()=>{G(!1),console.log("[BIDI] handleTurnComplete called",{currentAssistantId:Lt.current,currentInputId:Pt.current}),Xe(e=>{const t=e.map(e=>"bidi"===e.metadata?.source&&e.isProcessing?{...e,isProcessing:!1}:e);return console.log("[BIDI] handleTurnComplete: state update",{prevLength:e.length,newLength:t.length,finalizedCount:e.filter(e=>"bidi"===e.metadata?.source&&e.isProcessing).length}),t}),Lt.current=null,Pt.current=null,zt.current=!1,$t.current=!1,Vt.current=null},[]),En=e.useCallback(()=>{G(!1),St.current&&St.current.port.postMessage({command:"endOfAudio"}),Lt.current=null,Pt.current=null,$t.current=!1,Vt.current=null,Xe(e=>e.map(e=>"bidi"===e.metadata?.source?{...e,isProcessing:!1,metadata:{...e.metadata,interrupted:!0}}:e))},[]),An=e.useCallback(()=>{Ye(!1),G(!1),Mt.current=!1,Qe("idle"),et(null),Ut.current=!1,Vt.current=null,Et.current&&clearTimeout(Et.current),Et.current=null,kt.current=!1,Rt.current&&(clearTimeout(Rt.current),Rt.current=null);const e=wt.current;if(wt.current=null,e&&e.readyState!==WebSocket.CLOSED)try{e.close()}catch{}St.current?.disconnect(),xt.current?.close(),St.current=null,xt.current=null,Tt.current?.disconnect(),Ct.current?.close(),Tt.current=null,Ct.current=null,j(Ot.current),Ot.current=null,It.current?.reset(),It.current=null,Dt.current=!1},[]),Tn=e.useCallback(e=>{if(console.log("[BIDI] handleBidiEvent called",{event:e,isVoiceSessionActive:Mt.current,hasTurnComplete:!!e?.turnComplete,hasInterrupted:!!e?.interrupted,hasInputTranscription:!!e?.inputTranscription,hasOutputTranscription:!!e?.outputTranscription,hasContentParts:!!e?.content?.parts}),!e)return void console.warn("[BIDI] handleBidiEvent: received null/undefined event");e.error&&"AI_CREDITS_EXHAUSTED"!==e.code&&(console.warn("[BIDI] voice error from backend",e.error),et("voiceUnavailable"));const t=function(e){if(!e)return null;if(e.interrupted)return"discard";const t=e.inputTranscription;return t?String(t.text??"").trim()?"discard":t.finished?"resume":null:null}(e);t&&At(t);const n=e.conclusion_detected??e.conclusionDetected;if("boolean"==typeof n&&n&&(Ht.current?.(),nt(!0)),"boolean"==typeof n&&n)return An(),void Xe(e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if("assistant"===t[e].role){t[e]={...t[e],conclusionDetected:!0};break}return t});if(e.interrupted)return console.log("[BIDI] handleBidiEvent: processing interrupted"),void En();if(e.inputTranscription){const t=e.inputTranscription.text||"",n=Boolean(e.inputTranscription.finished);console.log("[BIDI] handleBidiEvent: processing inputTranscription",{text:t.substring(0,50),textLength:t.length,finished:n,hasText:!!t}),t||n?(we(s),wn(t,n)):console.warn("[BIDI] handleBidiEvent: inputTranscription event has no text and not finished",e.inputTranscription)}const r=e.sources??e.Sources;if(Array.isArray(r)&&r.length>0){const e=r.map(e=>({source_type:e.source_type??e.sourceType??"file",source_id:e.source_id??e.sourceid??e.sourceId,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices})).filter(e=>e.source_id||e.url||"database"===e.source_type);if(0===e.length)return;Xe(t=>{const n=[...t];let r=!1;for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],sources:e},r=!0;break}return r||(Vt.current=e),n})}const a=e.finalTranscript??e.finaltranscript;if(a&&"string"==typeof a.text){const e=a.text;return void(e&&Xe(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],content:e,isProcessing:!1};break}return n}))}const o=function(e){const t=e?.greeting?.text;if("string"!=typeof t)return null;const n=t.trim();return""===n?null:n}(e);if(o)return $t.current=!0,void Xe(e=>function(e,t,n,r,a){if(n){const r=e.findIndex(e=>e.id===n);if(r>=0){const n=[...e];return n[r]={...n[r],content:t},n}}return[...e,...r||[]].some(e=>"assistant"===e.role&&"string"==typeof e.content&&e.content.trim()===t)?e:[...e,a(t)]}(e,o,qt.current,Gt.current,e=>Oe({id:`bidi-greeting-${Date.now()}`,role:"assistant",content:e,metadata:{source:"bidi"}})));if($t.current&&!Ut.current)return e.content?.parts&&xn(e.content.parts,Boolean(e.content?.finished||e.finished),!0),void(e.turnComplete&&kn());if(Ut.current||!e.outputTranscription?.text&&!e.content?.parts){if(e.outputTranscription?.text&&(zt.current=!0,Sn(e.outputTranscription.text,Boolean(e.outputTranscription.finished))),e.content?.parts){const t=e.content?.finished||e.finished||!1;xn(e.content.parts,t,zt.current)}if(e.prompts&&Array.isArray(e.prompts)&&e.prompts.length>0){console.log("[BIDI] handleBidiEvent: attaching prompts to last assistant message",{count:e.prompts.length}),Xe(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],prompts:e.prompts};break}return n});try{xe(s,e.prompts)}catch(e){}}e.turnComplete?kn():e.interrupted||e.inputTranscription||e.outputTranscription||e.content||e.prompts||console.warn("[BIDI] handleBidiEvent: event had no recognized fields",e)}else e.turnComplete&&kn()},[Sn,wn,xn,En,kn,An,At]),Cn=e.useCallback(e=>{if(!Mt.current)return;const t=It.current;if(t)return void t.process(e);const n=wt.current;n&&n.readyState===WebSocket.OPEN&&n.send(e)},[]),On=e.useCallback(async()=>{if(!Dt.current&&"undefined"!=typeof window)try{const[e,t]=await async function(){if("undefined"==typeof window)throw new Error("Audio player can only be initialized in the browser");const e=new AudioContext({sampleRate:24e3}),t=new Blob(["\n class PCMPlayerProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.bufferSize = 24000 * 180;\n this.buffer = new Float32Array(this.bufferSize);\n this.writeIndex = 0;\n this.readIndex = 0;\n // Paused while the caller may be speaking over the reply (lib/audio/bargeIn.js).\n this.paused = false;\n this.port.onmessage = (event) => {\n const command = event.data?.command;\n if (command === 'endOfAudio') {\n this.readIndex = this.writeIndex;\n this.paused = false;\n return;\n }\n if (command === 'pause') {\n this.paused = true;\n return;\n }\n if (command === 'resume') {\n this.paused = false;\n return;\n }\n const int16Samples = new Int16Array(event.data);\n this.enqueue(int16Samples);\n };\n }\n\n enqueue(samples) {\n for (let i = 0; i < samples.length; i += 1) {\n const floatVal = samples[i] / 32768;\n this.buffer[this.writeIndex] = floatVal;\n this.writeIndex = (this.writeIndex + 1) % this.bufferSize;\n if (this.writeIndex === this.readIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n }\n\n process(inputs, outputs) {\n const output = outputs[0];\n const framesPerBlock = output[0].length;\n for (let frame = 0; frame < framesPerBlock; frame += 1) {\n // Silence when paused or with nothing buffered.\n const playing = !this.paused && this.readIndex !== this.writeIndex;\n const sample = playing ? this.buffer[this.readIndex] : 0;\n output[0][frame] = sample;\n if (output.length > 1) {\n output[1][frame] = sample;\n }\n if (playing) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n return true;\n }\n }\n\n registerProcessor('pcm-player-processor', PCMPlayerProcessor);\n "],{type:"application/javascript"}),n=URL.createObjectURL(t);await e.audioWorklet.addModule(n);const r=new AudioWorkletNode(e,"pcm-player-processor");return r.connect(e.destination),URL.revokeObjectURL(n),[r,e]}();St.current=e,xt.current=t,await t.resume();const n=e=>{const t=wt.current;t&&t.readyState===WebSocket.OPEN&&t.send(e)};It.current=M({sampleRate:16e3},{onSpeechStart:()=>{St.current?.port.postMessage({command:"pause"}),kt.current=!0,Et.current&&clearTimeout(Et.current),Et.current=null;const e=wt.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"interrupt"}))},onVoiceFrame:n,onSpeechEnd:()=>{const e=wt.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"audio_end"})),kt.current&&(Et.current&&clearTimeout(Et.current),Et.current=setTimeout(()=>At("resume"),4e3))}});const[r,a,o]=await F(Cn);Tt.current=r,Ct.current=a,Ot.current=o,await a.resume(),Dt.current=!0}catch(e){throw console.error("Failed to initialize audio pipeline",e),e}},[Cn,At]),In=e.useCallback(async()=>{if("undefined"==typeof window||!en)return;if(wt.current&&wt.current.readyState===WebSocket.OPEN)return;let e;Qe("connecting"),et(null),_t.current=!1;try{const t={"Content-Type":"application/json"};if("function"==typeof l){const e=await l();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${a.replace(/\/$/,"")}/api/v1/widget/voice-ticket`,{method:"POST",headers:t,credentials:"include",body:JSON.stringify({sessionId:rt})});if(!n.ok)throw new Error(`voice-ticket ${n.status}`);if(e=(await n.json())?.ticket,!e)throw new Error("voice-ticket returned no ticket")}catch(e){return console.error("[BIDI] could not obtain a voice session ticket",e),Qe("error"),void et(ee(e))}try{const t=new WebSocket(`${en}?ticket=${encodeURIComponent(e)}`);wt.current=t,t.onopen=()=>{Qe("connected")},t.onmessage=e=>{try{const t="string"==typeof e.data?e.data.substring(0,200):"binary";console.log("[BIDI] WebSocket message received",{dataLength:e.data?.length,dataPreview:t});const n=JSON.parse(e.data);console.log("[BIDI] WebSocket message parsed",{hasTurnComplete:!!n.turnComplete,hasInterrupted:!!n.interrupted,hasInputTranscription:!!n.inputTranscription,hasOutputTranscription:!!n.outputTranscription,hasContentParts:!!n.content?.parts,payload:n}),n&&"AI_CREDITS_EXHAUSTED"===n.code&&"string"==typeof n.fallbackMessage&&n.fallbackMessage.trim()&&(Nt.current=n.fallbackMessage.trim()),n&&"AI_CREDITS_EXHAUSTED"===n.code&&(_t.current=!0),Tn(n)}catch(t){console.error("[BIDI] Failed to parse WebSocket event",{error:t,data:e.data})}},t.onerror=()=>{Qe("error"),_t.current||et("voiceUnavailable"),G(!1)},t.onclose=e=>{if(wt.current===t){if(wt.current=null,Qe("idle"),G(!1),e&&1008===e.code){Mt.current=!1,Ye(!1),Qe("error");return(_t.current||String(e.reason||"").startsWith("AI_CREDITS_EXHAUSTED"))&&Nt.current||et("voiceUnavailable"),void(()=>{const e=Nt.current;Nt.current=null,e&&D(t=>{const n=[...t].reverse().find(e=>"assistant"===e.role);return n&&"string"==typeof n.content&&n.content.trim()===e?t:[...t,Oe({id:tn(),role:"assistant",content:e})]})})()}Mt.current&&(Rt.current&&clearTimeout(Rt.current),Rt.current=setTimeout(()=>{Rt.current=null,In()},5e3))}}}catch(e){console.error("Failed to open voice websocket",e),Qe("error"),et(ee(e))}},[Tn,en,a,rt,l]),Rn=e.useCallback(async()=>{if(p&&s){et(null),Qe(e=>"connected"===e?e:"connecting"),Ye(!0),Mt.current=!0,nt(!1),Ut.current=!1,$t.current=!1,qt.current=null,Xe(e=>{if(e.length>0||L.length>0)return e;if(!t||""===t.trim())return[];const n=Oe({id:`bidi-welcome-${Date.now()}`,role:"assistant",content:je,metadata:{source:"bidi"}});return qt.current=n.id,[n]}),In();try{await On()}catch(e){console.error("Failed to start audio pipeline",e),et(ee(e)),Qe("error")}}},[p,s,t,je,In,On,L]),Nn=e.useCallback(()=>{We?An():"connecting"!==Ze&&Rn()},[We,Rn,An,Ze]),_n=e.useCallback(e=>{const t=e.trim();if(!t)return;Ut.current=!0;const n=wt.current;if(!n||n.readyState!==WebSocket.OPEN)return void(_t.current||et("voiceUnavailable"));n.send(JSON.stringify({type:"text",text:t})),we(s),G(!0);const r=Oe({id:`bidi-user-${Date.now()}`,role:"user",content:t,metadata:{source:"bidi"}});Xe(e=>[...e,r]),$("")},[]);e.useEffect(()=>{Mt.current=We},[We]),e.useEffect(()=>()=>{Mt.current=!1,Rt.current&&(clearTimeout(Rt.current),Rt.current=null);const e=wt.current;if(wt.current=null,e&&e.readyState!==WebSocket.CLOSED)try{e.close()}catch{}It.current?.reset(),It.current=null,St.current?.disconnect(),xt.current?.close(),Tt.current?.disconnect(),Ct.current?.close(),j(Ot.current),Ot.current=null,Dt.current=!1},[]);const Pn=e.useCallback(()=>{(e=>{try{const t=be(e);localStorage.removeItem(`${ce}_${e}`),t?.conversationId&&me(e,t.conversationId)}catch{}})(s),xe(s,[]),K(null),Q(null),oe(null),J.current=null,ie.current=null,D([]),Xe([]),dt(null),ft([]),ht([]),me(s,rt),fe(!1),Le(!1),ze({}),Me(""),Be(null),$e.current=!1,Ut.current=!1,nn.current=!1,rn.current=!1,bt.current=!1,ct(!1),cn.current=null,Kt.current=null,st.current&&(st.current.close(),st.current=null);const e=Re();if(ve(s,e,{settingsSnapshot:JSON.stringify({value:S,unit:x?.toUpperCase()})}),at(e),t&&""!==t.trim()&&D([{...Oe({id:Date.now().toString(),role:"assistant",content:t}),isWelcome:!0}]),v){_e(g).length>0&&fe(!0)}},[s,rt,t,v,g,S,x]),Ln=e.useRef(Pn);e.useEffect(()=>{Ln.current=Pn},[Pn]);const Dn=e.useRef(null);e.useEffect(()=>{ot.current=e=>{if(Dn.current===rt)return;Dn.current=rt;const t=v&&_e(g).length>0;it.current=e&&!t?e:null,Ln.current()}},[rt,v,g]),e.useEffect(()=>{an.current=!1,on.current={value:null,unit:null}},[s]),e.useEffect(()=>{if(!s||!S)return;const e=he(S,x);if(!e)return;const t=on.current,n=an.current&&(t.value!==S||t.unit!==x);if(an.current=!0,on.current={value:S,unit:x},n)return console.warn("[Session] Inactivity timeout config changed - resetting conversation."),ln(!1),void Ln.current();let r=null;const a=()=>{const t=be(s);if(!t)return;if(!t.firstInteractionAt)return void(r=setTimeout(a,e));const n=new Date(t.lastActivity).getTime(),o=Date.now()-n,i=e-o;if(i<=0)return console.warn("[Session] Inactivity timeout reached! Resetting conversation immediately."),ln(!1),void Ln.current();const l=Math.max(1e4,Math.min(12e4,.1*e));ln(i<=l);r=setTimeout(a,i<=l?1e3:i-l)};return a(),()=>{r&&clearTimeout(r)}},[s,S,x,rt]);const Mn=e.useMemo(()=>r,[r]),jn=e.useMemo(()=>Ie(L,Ke),[Ke,L]);e.useEffect(()=>{We&&console.log("[BIDI] bidiMessages state changed",{count:Ke.length,messages:Ke.map(e=>({id:e.id,role:e.role,contentLength:e.content?.length||0,isProcessing:e.isProcessing,hasContent:!!e.content,contentPreview:e.content?.substring(0,50)}))})},[Ke,We]);const Fn=e.useCallback((e,t)=>{D(n=>n.map(n=>"assistant"===n.role&&n.content===e?{...n,feedback:t}:n))},[]);return{conversationId:rt,isOpen:C,isMinimized:R,isDark:_,messages:jn,inputValue:B,isLoading:q,isConversationLoading:He,widgetRef:V,quickQuestions:Mn,isVoiceSessionActive:We,voiceStatus:Ze,voiceError:Je,voiceConclusionForCsat:tt,onboardingQuestions:g,onboardingActive:se,onboardingCompleted:Pe,handleOnboardingFormSubmit:gn,widgetFilter:Y,setWidgetFilter:K,addAssistantMessage:un,setInputValue:$,handleSend:bn,stopGeneration:dn,handleQuickQuestion:yn,sendMessage:pn,retryMessage:fn,toggleChat:()=>{I(e=>!e),N(!1)},toggleTheme:()=>{P(e=>!e)},toggleMinimize:()=>{N(e=>!e)},closeChat:()=>{I(!1)},handleDecision:vn,handleVoiceToggle:Nn,sendBidiTextMessage:_n,sessionExpiringSoon:sn,resetConversation:Pn,updateMessageFeedback:Fn,isHandedOff:lt,handoffPoints:mt,csatRequest:ut,liveJoined:pt}},Le=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),De=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Me=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("react-dom/client"),require("react/jsx-runtime"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom/client","react/jsx-runtime","react-dom"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ChatWidget=t(e.React,e.client,e.jsxRuntime,e.ReactDOM)}(this,function(e,t,n,r){"use strict";function a(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)}function o(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var i=a(e);const s="processing_start",l="text_chunk",c="processing_end",u="complete",d="follow_up_prompts",p="error",f="human_decision_required",g=e=>{if(!e||"string"!=typeof e)return null;if("[DONE]"===e||"[PROCESSING]"===e)return null;try{const t=JSON.parse(e);if(!t||"object"!=typeof t)return null;const n=t.type||t.event_type;if(n===l||t.content){const e=t.content||t.choices?.[0]?.delta?.content||"";return{type:l,content:e,...t}}return n===s||"processing_start"===t.type?{type:s,...t}:n===c||"processing_end"===t.type?{type:c,...t}:n===u||"complete"===t.type?{type:u,finalContent:t.finalContent||t.content||"",...t}:n===p||"error"===t.type?{type:p,error:t.error||t.message||"Unknown error",...t}:n===f||"human_decision_required"===t.type?{type:f,decisionId:t.decisionId||t.decision_id,question:t.question||"",options:t.options||[],context:t.context||{},...t}:n?{type:n,...t}:t}catch(e){return null}};class m extends Error{constructor(e="SSE stream ended before completion"){super(e),this.name="IncompleteStreamError"}}const h=410;class b extends Error{constructor(e="This conversation was erased"){super(e),this.name="ConversationErasedError"}}const y=async(e,t,n,r)=>{const a={"Content-Type":"application/json",Accept:"text/event-stream"};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}const o=await fetch(`${t.replace(/\/$/,"")}/api/v1/support`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify(e),...r?{signal:r}:{}});if(o.status===h)throw new b;if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");return o.body},v=async(e,t,n,r)=>{const a={"Content-Type":"application/json"};if("function"==typeof r){const e=await r();e&&(a.Authorization=`Bearer ${e}`)}const o=await fetch(`${n.replace(/\/$/,"")}/api/v1/support/identity/${e}`,{method:"POST",headers:a,credentials:"include",body:JSON.stringify(t)});let i={};try{i=await o.json()}catch{i={}}return{ok:o.ok,status:o.status,body:i}},w=()=>({id:`skeleton-${Date.now()}`,role:"assistant",content:"",timestamp:new Date,isProcessing:!0,processingStatus:""}),S=e=>{if(!Array.isArray(e)||0===e.length)return;const t=e.map(e=>({type:e.type||"prompt",text:"string"==typeof e.text?e.text:"",submitText:"string"==typeof e.submitText?e.submitText:void 0,promptId:"string"==typeof e.promptId?e.promptId:void 0,confidence:"number"==typeof e.confidence?e.confidence:void 0})).filter(e=>e.text);return t.length?t:void 0},x=(e,t,n={})=>{e(e=>{const r=[...e||[]],a=r[r.length-1];if("assistant"===a?.role){const{prompts:e,...o}=n||{};r[r.length-1]={...a,...o,content:t,isProcessing:!1,...null!=e&&{prompts:S(e)}}}return r})},k=/model.candidates.failed|gateway|502|redis|litellm|openai.*error|Failed to initialize agent|Streaming error:/i,E="I'm having a little trouble right now. Please try again in a moment.";function A(e){return e&&"string"==typeof e?k.test(e)?E:e:E}const T=(e,t,n,r,a)=>{if(e&&e.type)switch(e.type){case s:{const n=e.choices?.[0]?.delta?.content||"";t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&r.isProcessing?t[t.length-1]={...r,processingStatus:n}:n&&t.push({...w(),processingStatus:n}),t});break}case l:a.current||(a.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],w()]}return e}));const o=e.content||e.choices?.[0]?.delta?.content||"";o&&(n.current+=o,r(n.current));break;case c:(e=>{e(e=>{const t=[...e||[]],n=t[t.length-1];return n?.isProcessing&&(t[t.length-1]={...n,isProcessing:!1}),t})})(t);break;case u:{const r=e.finalContent||n.current,a={};"boolean"==typeof e.conclusionDetected?a.conclusionDetected=e.conclusionDetected:"boolean"==typeof e.conclusion_detected&&(a.conclusionDetected=e.conclusion_detected);const o={...a,prompts:e.prompts};x(t,r,o);break}case d:{const n=Array.isArray(e.prompts)?e.prompts:[];n.length>0&&t(e=>{const t=[...e||[]],r=t[t.length-1];return r&&"assistant"===r.role&&(t[t.length-1]={...r,prompts:S(n)}),t});break}case p:((e,t)=>{t=A(t),e(e=>{const n=[...e||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,content:(r.content||"")+`\n\nError: ${t}`,isProcessing:!1}),n})})(t,e.error||"Unknown error occurred");break;case f:{const n={id:`decision-${Date.now()}`,role:"assistant",content:e.question||"",timestamp:new Date,isProcessing:!1,requiresDecision:!0,decisionData:{decisionId:e.decisionId,question:e.question,options:e.options||[],context:e.context||{}}};t(e=>[...(e||[]).filter(e=>!e.isProcessing||e.content),n]);break}default:console.warn("Unknown stream event type:",e.type)}},C=e=>{const t=e.Sources??e.sources??[];return Array.isArray(t)?t.map(e=>({source_type:e.source_type??e.sourceType??"website",source_id:e.sourceid??e.source_id,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices,effective_date:e.effective_date??e.effectiveDate,stale:e.stale})).filter(e=>e.source_id||e.url||"database"===e.source_type):[]},O=async(e,t,n,r)=>{const a=(e=>{let t=null,n=null,r=0;const a=o=>{if(o-r<16)n=requestAnimationFrame(a);else{if(null!==t){const n=t;t=null,r=o,e(e=>{const t=[...e||[]],r=t[t.length-1];return"assistant"===r?.role&&(t[t.length-1]={...r,content:n}),t})}n=null}},o=e=>{t=e,null===n&&(n=requestAnimationFrame(a))};return o.cancel=()=>{null!==n&&(cancelAnimationFrame(n),n=null,t=null)},o})(t),o=e.getReader(),i=new TextDecoder;let s="";const l={current:""},c={current:!1};let u=!1,d=null;const p=()=>{if(!u&&(u=!0,"function"==typeof n))try{n()}catch(e){console.warn("[chat] onTerminal callback threw:",e)}};try{for(;;){const{value:e,done:n}=await o.read();if(n)break;s+=i.decode(e,{stream:!0});const u=s.split(/\r?\n\r?\n/);s=u.pop()||"";for(const e of u){const n=e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===n.length)continue;const o=n.filter(e=>e.startsWith("data:")).map(e=>e.slice(5).trim());if(0===o.length)continue;const i=o.join("\n");if("[DONE]"===i)continue;let s;try{s=JSON.parse(i)}catch(e){continue}if(s){if(s.type){if("processing_start"===s.type){const e=s.choices?.[0]?.delta?.content||"";t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role&&r.isProcessing?n[n.length-1]={...r,processingStatus:e}:e&&n.push({...w(),processingStatus:e}),n});continue}if("processing_end"===s.type)continue;if("human_handoff"===s.type){p(),"function"==typeof r&&r();continue}if("duplicate_suppressed"===s.type){p();continue}if("follow_up_prompts"===s.type){const e=Array.isArray(s.prompts)?s.prompts:[];e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return r&&"assistant"===r.role?null!=d&&r.id!==d?t:(n[n.length-1]={...r,prompts:S(e)},n):t});continue}if("text_chunk"===s.type){c.current||(c.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],w()]}return e}));const e=s.choices?.[0]?.delta?.content||s.content;e&&(l.current+=e,a(l.current));continue}if("sources"===s.type){const e=C(s);e.length>0&&t(t=>{const n=[...t||[]],r=n[n.length-1];return"assistant"===r?.role&&(n[n.length-1]={...r,sources:e,sourcesPreliminary:!0}),n});continue}if("complete"===s.type){const e=C(s),n=s.finalContent||s.choices?.[0]?.delta?.content||l.current,r={};"boolean"==typeof s.conclusionDetected?r.conclusionDetected=s.conclusionDetected:"boolean"==typeof s.conclusion_detected&&(r.conclusionDetected=s.conclusion_detected);const o={...r,prompts:s.prompts};a.cancel(),x(t,n,o),t(t=>{const r=[...t||[]],a=r[r.length-1];if("assistant"===a?.role&&(d=a.id??null),"assistant"===a?.role&&(e.length>0||a.sourcesPreliminary)){const{sourcesPreliminary:t,...o}=a;r[r.length-1]={...o,sources:e,content:n,isProcessing:!1}}return r}),p();continue}if("error"===s.type){t(e=>{const t=[...e||[]],n=t[t.length-1];return"assistant"===n?.role&&(t[t.length-1]={...n,content:(n.content||"")+`\n\nError: ${A(s.error||"Unknown error occurred")}`,isProcessing:!1}),t});continue}const e=g(i);if(e&&e.type){console.log("🔍 Parsed stream event:",e.type,e),T(e,t,l,a,c);continue}}if("chat.completion.chunk"===s.object&&s.choices?.[0]?.delta?.content)c.current||(c.current=!0,t(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role||!t.isProcessing){return[...e||[],w()]}return e})),l.current+=s.choices[0].delta.content,a(l.current);else if(s.choices?.[0]?.finish_reason&&null!==s.choices[0].finish_reason){const e={prompts:s.prompts};x(t,l.current,e),t(e=>{const t=(e||[])[(e||[]).length-1];return"assistant"===t?.role&&(d=t.id??null),e}),p()}}}}}catch(e){if(e&&"AbortError"===e.name)return void(l.current?x(t,l.current,{stoppedByUser:!0}):t(e=>(e||[]).filter(e=>!e.isProcessing)));throw e}finally{o.releaseLock()}if(!u)throw new m(l.current?"Stream ended mid-response - partial content received":"Stream ended before any content was received")};const I=.025,R=120,N=200,_=40,P=1e3,L=300;function D(e,t){return null!=e?e:t}function M(e,t){const n=e.sampleRate,r=D(e.energyThreshold,I),a=D(e.speechStartMs,R),o=D(e.speechWindowMs,N),i=D(e.onsetGapMs,_),s=D(e.hangoverMs,P),l=D(e.preRollMs,L);let c=!1,u=[],d=0,p=0,f=0,g=0,m=[],h=0;const b=function(){u=[],d=0,p=0,f=0};return{process:function(e){const y=function(e){return e.byteLength/2/n*1e3}(e),v=function(e){const t=new Int16Array(e);if(0===t.length)return 0;let n=0;for(let e=0;e<t.length;e+=1){const r=t[e]/32768;n+=r*r}return Math.sqrt(n/t.length)}(e)>=r;if(c)t.onVoiceFrame(e),v?g=0:(g+=y,g>=s&&(c=!1,b(),g=0,t.onSpeechEnd()));else{for(m.push({pcm:e,durationMs:y}),h+=y;h>l&&m.length>1;){const e=m.shift();h-=e?e.durationMs:0}for(u.push({durationMs:y,voiced:v}),d+=y,v&&(p+=y);d>o&&u.length>1;){const e=u.shift();d-=e.durationMs,e.voiced&&(p-=e.durationMs)}if(v){if(f=0,p>=a){c=!0,g=0,b(),"function"==typeof t.onSpeechStart&&t.onSpeechStart();for(let e=0;e<m.length;e+=1)t.onVoiceFrame(m[e].pcm);m=[],h=0}}else f+=y,f>=i&&b()}},reset:function(){c=!1,b(),g=0,m=[],h=0},isSpeaking:function(){return c}}}function j(e){e&&e.getTracks().forEach(function(e){e.stop()})}async function F(e){if("undefined"==typeof window)throw new Error("Audio recorder can only run in the browser");const t=new AudioContext({sampleRate:16e3}),n=new Blob(["\n class PCMRecorderProcessor extends AudioWorkletProcessor {\n process(inputs) {\n if (!inputs.length || !inputs[0].length) {\n return true;\n }\n const inputChannel = inputs[0][0];\n this.port.postMessage(new Float32Array(inputChannel));\n return true;\n }\n }\n registerProcessor('pcm-recorder-processor', PCMRecorderProcessor);\n "],{type:"application/javascript"}),r=URL.createObjectURL(n);await t.audioWorklet.addModule(r),URL.revokeObjectURL(r);const a=await navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),o=t.createMediaStreamSource(a),i=new AudioWorkletNode(t,"pcm-recorder-processor");return i.port.onmessage=t=>{const n=function(e){const t=new Int16Array(e.length);for(let n=0;n<e.length;n+=1)t[n]=32767*Math.max(-1,Math.min(1,e[n]));return t.buffer}(t.data);e(n)},o.connect(i),[i,t,a]}const B={connectionError:"Sorry, I'm having trouble connecting right now. Please try again.",micDenied:"We couldn't access your microphone. Please allow access and try again.",micNotFound:"No microphone found. Please connect one and try again.",voiceUnavailable:"Voice isn't available right now. Please try again.",categoryTopicsHeading:"Please ask your **{category}** question below.",quickQuestionsHeadingLabel:"Or ask a quick question:",chooseTopicLabel:"Choose a topic to get started:",typeYourMessage:"Type your message...",agentIsLoading:"Agent is loading...",conversationResolved:"Conversation resolved",howWasYourExperience:"How was your experience?",feedbackPrompt:"Please rate our support to help us improve.",feedbackPlaceholder:"Tell us more about your experience...",submitFeedback:"Submit Feedback",feedbackSendFailed:"We couldn't send your feedback. Please try again.",backToChat:"Back to chat",submitting:"Submitting...",selectRatingFirst:"Please select a rating first",pleaseSubmitRatingFirst:"Please submit your rating first.",completeOnboardingToEnableVoice:"Complete the onboarding to enable voice",sendMessageToCompleteOnboarding:"Send a message to complete onboarding and enable voice.",resolve:"Resolve",scrollLeft:"Scroll left",scrollRight:"Scroll right",sendMessage:"Send message",stopGenerating:"Stop generating",agentJoinedConversation:"{name} has joined the conversation",handedOffToTeam:"Your conversation has been passed to our team",handedOffStatus:"Our team will reply here",chatHere:"Chat here",chooseChannel:"Choose how to chat",sessionExpiringSoon:"Your session will expire soon due to inactivity.",startVoiceInput:"Start voice input",stopVoiceInput:"Stop voice input",voiceSessionLive:"Voice session live - speak or type to converse.",connectingVoice:"Connecting to voice session...",poweredBy:"Powered by",poweredByBefore:"Powered by",poweredByAfter:"",menu:"Menu",close:"Close",openChat:"Open chat",closeChat:"Close chat",lightMode:"Light Mode",nightMode:"Night Mode",refreshChat:"Refresh Chat",copyChat:"Copy Chat",startChat:"Start Chat",startingVoiceSession:"Starting voice session...",allowMicAccess:"Allow microphone access",emailRequired:"Please enter your email address",nameRequired:"Please enter your name",phoneRequired:"Please enter your phone number",fieldRequiredSuffix:"is required",emailInvalid:"Please enter a valid email address",nameInvalid:"Please enter a valid name",phoneInvalid:"Please enter a valid phone number",uploadFile:"Upload file",suggestedQuestions:"Suggested questions",agentIsTyping:"Agent is typing",rate:"Rate",rateExperience:"Rate your experience",thumbsUp:"Thumbs up",thumbsDown:"Thumbs down",submittingFeedback:"Submitting feedback...",cancel:"Cancel",submit:"Submit",messageNotDelivered:"Not delivered",retrySend:"Retry",verifyTitle:"Confirm it's you",verifyEmailLabel:"Your email",verifyPhoneLabel:"Your mobile number",verifySendCode:"Send code",verifySending:"Sending...",verifyEnterCode:"Enter the code we sent to {target}",verifyCodeLabel:"6-digit code",verifyConfirm:"Confirm",verifyResendIn:"Resend in {seconds} s",verifyResend:"Send a new code",verifyDifferent:"Use a different address",verifyDifferentNumber:"Use a different number",verifyCountryNotAllowed:"We can't send codes to numbers in this country. Try another number.",verifyLockedFor:"Try again in {time}",verifyDone:"Verified as {target}",verifyResumeMessage:"I've confirmed it's me.",verifyTriesLeft:"That code doesn't match. {count} tries left.",verifyTryLeft:"That code doesn't match. 1 try left.",verifyGenericError:"Something went wrong. Try again.",verifyInputBlocked:"Enter your code above to continue",verifyCancel:"Cancel",verifyCancelled:"Verification cancelled.",verifyNotDelivered:"We couldn't deliver the code to that number. Check it and send a new code."},U={en:B,ar:{agentJoinedConversation:"انضم {name} إلى المحادثة",handedOffToTeam:"تم تحويل محادثتك إلى فريقنا",handedOffStatus:"سيرد فريقنا هنا",chatHere:"الدردشة هنا",chooseChannel:"اختر طريقة الدردشة",connectionError:"عذرًا، أواجه مشكلة في الاتصال حاليًا. يرجى المحاولة مرة أخرى.",micDenied:"لم نتمكن من الوصول إلى الميكروفون. يرجى السماح بالوصول والمحاولة مرة أخرى.",micNotFound:"لم يتم العثور على ميكروفون. يرجى توصيل ميكروفون والمحاولة مرة أخرى.",voiceUnavailable:"الميزة الصوتية غير متوفرة حاليًا. يرجى المحاولة مرة أخرى.",chooseTopicLabel:"اختر موضوعًا للبدء:",categoryTopicsHeading:"يرجى طرح سؤالك حول **{category}** أدناه.",quickQuestionsHeadingLabel:"أو اطرح سؤالًا سريعًا:",typeYourMessage:"اكتب رسالتك هنا...",agentIsLoading:"جارٍ تحميل الوكيل...",conversationResolved:"تم إنهاء المحادثة",howWasYourExperience:"كيف كانت تجربتك؟",feedbackPrompt:"يرجى تقييم خدمتنا لمساعدتنا على التحسن.",feedbackPlaceholder:"أخبرنا المزيد عن تجربتك...",submitFeedback:"إرسال التقييم",submitting:"جارٍ الإرسال...",selectRatingFirst:"يرجى تحديد التقييم أولاً",pleaseSubmitRatingFirst:"يرجى إرسال تقييمك أولاً.",completeOnboardingToEnableVoice:"أكمل التسجيل لتفعيل الصوت",sendMessageToCompleteOnboarding:"أرسل رسالة لإكمال التسجيل وتفعيل الصوت.",resolve:"إنهاء",scrollLeft:"تمرير لليسار",scrollRight:"تمرير لليمين",sendMessage:"إرسال رسالة",voiceSessionLive:"الجلسة الصوتية نشطة - تحدث أو اكتب للتواصل.",connectingVoice:"جارٍ الاتصال بالجلسة الصوتية...",poweredBy:"مدعوم من",menu:"القائمة",close:"إغلاق",openChat:"فتح المحادثة",closeChat:"إغلاق المحادثة",lightMode:"الوضع الفاتح",nightMode:"الوضع الداكن",refreshChat:"تحديث المحادثة",copyChat:"نسخ المحادثة",startChat:"بدء المحادثة",startingVoiceSession:"جارٍ بدء الجلسة الصوتية...",allowMicAccess:"السماح بالوصول إلى الميكروفون",uploadFile:"رفع ملف",suggestedQuestions:"أسئلة مقترحة",agentIsTyping:"الوكيل يكتب",rate:"تقييم",rateExperience:"قيّم تجربتك",thumbsUp:"إعجاب",thumbsDown:"عدم إعجاب",submittingFeedback:"جارٍ إرسال التقييم...",cancel:"إلغاء",submit:"إرسال",messageNotDelivered:"لم يتم الإرسال",retrySend:"إعادة المحاولة",emailRequired:"الرجاء إدخال بريدك الإلكتروني",nameRequired:"الرجاء إدخال اسمك",phoneRequired:"الرجاء إدخال رقم هاتفك",fieldRequiredSuffix:"مطلوب",emailInvalid:"الرجاء إدخال بريد إلكتروني صالح",nameInvalid:"الرجاء إدخال اسم صالح",phoneInvalid:"الرجاء إدخال رقم هاتف صالح"},es:{agentJoinedConversation:"{name} se ha unido a la conversación",handedOffToTeam:"Tu conversación se ha pasado a nuestro equipo",handedOffStatus:"Nuestro equipo responderá aquí",connectionError:"Lo sentimos, estoy teniendo problemas de conexión en este momento. Inténtalo de nuevo.",micDenied:"No pudimos acceder a tu micrófono. Permite el acceso e inténtalo de nuevo.",micNotFound:"No se encontró ningún micrófono. Conecta uno e inténtalo de nuevo.",voiceUnavailable:"La voz no está disponible en este momento. Inténtalo de nuevo.",chooseTopicLabel:"Elige un tema para empezar:",categoryTopicsHeading:"Por favor, haz tu pregunta sobre **{category}** a continuación.",quickQuestionsHeadingLabel:"O haz una pregunta rápida:",typeYourMessage:"Escribe tu mensaje...",agentIsLoading:"El agente está cargando...",conversationResolved:"Conversación resuelta",howWasYourExperience:"¿Cómo fue tu experiencia?",feedbackPrompt:"Califica nuestro soporte para ayudarnos a mejorar.",feedbackPlaceholder:"Cuéntanos más sobre tu experiencia...",submitFeedback:"Enviar comentarios",submitting:"Enviando...",selectRatingFirst:"Primero selecciona una calificación",pleaseSubmitRatingFirst:"Por favor, envía tu calificación primero.",completeOnboardingToEnableVoice:"Completa la configuración para habilitar la voz",sendMessageToCompleteOnboarding:"Envía un mensaje para completar la configuración y habilitar la voz.",resolve:"Resolver",scrollLeft:"Desplazar a la izquierda",scrollRight:"Desplazar a la derecha",sendMessage:"Enviar mensaje",voiceSessionLive:"Sesión de voz activa - habla o escribe para conversar.",connectingVoice:"Conectando a la sesión de voz...",poweredBy:"Desarrollado por",menu:"Menú",close:"Cerrar",openChat:"Abrir chat",closeChat:"Cerrar chat",lightMode:"Modo claro",nightMode:"Modo oscuro",refreshChat:"Actualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sesión de voz...",allowMicAccess:"Permitir acceso al micrófono",emailRequired:"Introduce tu correo electrónico",nameRequired:"Introduce tu nombre",phoneRequired:"Introduce tu número de teléfono",fieldRequiredSuffix:"es un campo obligatorio",emailInvalid:"Introduce un correo electrónico válido",nameInvalid:"Introduce un nombre válido",phoneInvalid:"Introduce un número de teléfono válido"},be:{connectionError:"Прабачце, зараз узнікаюць праблемы з падключэннем. Паспрабуйце яшчэ раз.",micDenied:"Не ўдалося атрымаць доступ да мікрафона. Дазвольце доступ і паспрабуйце яшчэ раз.",micNotFound:"Мікрафон не знойдзены. Падключыце яго і паспрабуйце яшчэ раз.",voiceUnavailable:"Галасавая функцыя зараз недаступная. Паспрабуйце яшчэ раз.",chooseTopicLabel:"Выберыце тэму, каб пачаць:",categoryTopicsHeading:"Калі ласка, задайце сваё пытанне пра **{category}** ніжэй.",quickQuestionsHeadingLabel:"Або задайце хуткае пытанне:",typeYourMessage:"Увядзіце паведамленне...",agentIsLoading:"Агент загружаецца...",conversationResolved:"Размова завершана",howWasYourExperience:"Як прайшоў ваш досвед?",feedbackPrompt:"Калі ласка, ацаніце нашу падтрымку, каб дапамагчы нам стаць лепш.",feedbackPlaceholder:"Раскажыце нам больш пра свой досвед...",submitFeedback:"Адправіць водгук",submitting:"Адпраўка...",selectRatingFirst:"Спачатку абярыце ацэнку",pleaseSubmitRatingFirst:"Калі ласка, спачатку адпраўце сваю ацэнку.",completeOnboardingToEnableVoice:"Завяршыце ўводны этап, каб уключыць голас",sendMessageToCompleteOnboarding:"Адпраўце паведамленне, каб завяршыць уводны этап і ўключыць голас.",resolve:"Завяршыць",scrollLeft:"Пракруціць улева",scrollRight:"Пракруціць управа",sendMessage:"Адправіць паведамленне",voiceSessionLive:"Галасавая сесія актыўная - гаварыце або пішыце.",connectingVoice:"Злучэнне з галасавой сесіяй...",poweredBy:"Працуе на",menu:"Меню",close:"Закрыць",openChat:"Адкрыць чат",closeChat:"Закрыць чат",lightMode:"Светлы рэжым",nightMode:"Цёмны рэжым",refreshChat:"Абнавіць чат",copyChat:"Капіраваць чат",startChat:"Пачаць чат",startingVoiceSession:"Запуск галасавой сесіі...",allowMicAccess:"Дазволіць доступ да мікрафона",emailRequired:"Калі ласка, увядзіце адрас электроннай пошты",nameRequired:"Калі ласка, увядзіце ваша імя",phoneRequired:"Калі ласка, увядзіце нумар тэлефона",fieldRequiredSuffix:"(абавязковае поле)",emailInvalid:"Калі ласка, увядзіце сапраўдны адрас электроннай пошты",nameInvalid:"Калі ласка, увядзіце сапраўднае імя",phoneInvalid:"Калі ласка, увядзіце сапраўдны нумар тэлефона"},bs:{connectionError:"Izvinite, trenutno imam problema s povezivanjem. Pokušajte ponovo.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dozvolite pristup i pokušajte ponovo.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovo.",voiceUnavailable:"Glasovna funkcija trenutno nije dostupna. Pokušajte ponovo.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** ispod.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite vašu poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o vašem iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite vašu ocjenu.",completeOnboardingToEnableVoice:"Završite registraciju da omogućite glas",sendMessageToCompleteOnboarding:"Pošaljite poruku da završite registraciju i omogućite glas.",resolve:"Završi",scrollLeft:"Pomjeri lijevo",scrollRight:"Pomjeri desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Meni",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Započni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dozvoli pristup mikrofonu",emailRequired:"Unesite svoju email adresu",nameRequired:"Unesite svoje ime",phoneRequired:"Unesite svoj broj telefona",fieldRequiredSuffix:"(obavezno polje)",emailInvalid:"Unesite ispravnu email adresu",nameInvalid:"Unesite ispravno ime",phoneInvalid:"Unesite ispravan broj telefona"},bg:{connectionError:"Съжалявам, в момента имам проблеми с връзката. Опитайте отново.",micDenied:"Не успяхме да получим достъп до микрофона ви. Разрешете достъпа и опитайте отново.",micNotFound:"Не е намерен микрофон. Свържете микрофон и опитайте отново.",voiceUnavailable:"Гласовата функция не е достъпна в момента. Опитайте отново.",chooseTopicLabel:"Изберете тема, за да започнете:",categoryTopicsHeading:"Моля, задайте въпроса си за **{category}** по-долу.",quickQuestionsHeadingLabel:"Или задайте бърз въпрос:",typeYourMessage:"Въведете съобщението си...",agentIsLoading:"Агентът се зарежда...",conversationResolved:"Разговорът е приключен",howWasYourExperience:"Как беше вашето изживяване?",feedbackPrompt:"Моля, оценете нашата поддръжка, за да ни помогнете да се подобрим.",feedbackPlaceholder:"Разкажете ни повече за вашето изживяване...",submitFeedback:"Изпрати отзив",submitting:"Изпращане...",selectRatingFirst:"Първо изберете оценка",pleaseSubmitRatingFirst:"Моля, първо изпратете оценката си.",completeOnboardingToEnableVoice:"Завършете регистрацията, за да активирате гласа",sendMessageToCompleteOnboarding:"Изпратете съобщение, за да завършите регистрацията и активирате гласа.",resolve:"Приключи",scrollLeft:"Превърти наляво",scrollRight:"Превърти надясно",sendMessage:"Изпрати съобщение",voiceSessionLive:"Гласовата сесия е активна - говорете или пишете.",connectingVoice:"Свързване с гласова сесия...",poweredBy:"Задвижвано от",menu:"Меню",close:"Затвори",openChat:"Отвори чат",closeChat:"Затвори чат",lightMode:"Светъл режим",nightMode:"Тъмен режим",refreshChat:"Опресни чата",copyChat:"Копирай чата",startChat:"Започни чат",startingVoiceSession:"Стартиране на гласова сесия...",allowMicAccess:"Позволете достъп до микрофона",emailRequired:"Моля, въведете имейл адреса си",nameRequired:"Моля, въведете вашето име",phoneRequired:"Моля, въведете телефонния си номер",fieldRequiredSuffix:"(задължително поле)",emailInvalid:"Моля, въведете валиден имейл адрес",nameInvalid:"Моля, въведете валидно име",phoneInvalid:"Моля, въведете валиден телефонен номер"},my:{connectionError:"ဝမ်းနည်းပါသည်၊ ယခု ချိတ်ဆက်ရာတွင် အခက်အခဲရှိနေပါသည်။ ထပ်မံကြိုးစားပါ။",micDenied:"သင့်မိုက်ခရိုဖုန်းကို အသုံးပြုခွင့် မရနိုင်ပါ။ ခွင့်ပြုပြီး ထပ်မံကြိုးစားပါ။",micNotFound:"မိုက်ခရိုဖုန်း မတွေ့ပါ။ ချိတ်ဆက်ပြီး ထပ်မံကြိုးစားပါ။",voiceUnavailable:"အသံလုပ်ဆောင်ချက် ယခုအချိန် မရနိုင်ပါ။ ထပ်မံကြိုးစားပါ။",chooseTopicLabel:"စတင်ရန် ခေါင်းစဉ်တစ်ခု ရွေးချယ်ပါ:",categoryTopicsHeading:"ကျေးဇူးပြု၍ သင်၏ **{category}** မေးခွန်းကို အောက်တွင် မေးပါ။",quickQuestionsHeadingLabel:"သို့မဟုတ် မြန်ဆန်သော မေးခွန်းတစ်ခု မေးပါ:",typeYourMessage:"သင့်မက်ဆေ့ချ်ကို ရိုက်ထည့်ပါ...",agentIsLoading:"အေးဂျင့်ကို ဖွင့်နေသည်...",conversationResolved:"စကားဝိုင်း ပြီးစီးပြီ",howWasYourExperience:"သင့်အတွေ့အကြုံ မည်သို့ရှိခဲ့သနည်း?",feedbackPrompt:"ကျွန်ုပ်တို့၏ ဝန်ဆောင်မှုကို အဆင့်သတ်မှတ်ပေးပါ။",feedbackPlaceholder:"သင့်အတွေ့အကြုံအကြောင်း ပိုမိုပြောပြပါ...",submitFeedback:"တုံ့ပြန်ချက် ပေးပို့ရန်",submitting:"ပေးပို့နေသည်...",selectRatingFirst:"အရင်ဆုံး အဆင့်ရွေးပါ",pleaseSubmitRatingFirst:"ကျေးဇူးပြု၍ အဆင့်ကို အရင်ဆုံးပို့ပါ။",completeOnboardingToEnableVoice:"အသံကို ဖွင့်ရန် မိတ်ဆက်ခြင်းကို ပြီးဆုံးပါ",sendMessageToCompleteOnboarding:"မိတ်ဆက်ခြင်းကို ပြီးဆုံးပြီး အသံဖွင့်ရန် မက်ဆေ့ချ်ပို့ပါ။",resolve:"ပြီးဆုံး",scrollLeft:"ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollRight:"ညာဘက်သို့ ရွှေ့ပါ",sendMessage:"မက်ဆေ့ချ်ပို့ရန်",voiceSessionLive:"အသံစီရင်ချက် တက်ကြွနေသည် - ပြောပါ သို့မဟုတ် ရိုက်ပါ။",connectingVoice:"အသံစီရင်ချက်သို့ ချိတ်ဆက်နေသည်...",poweredBy:"လုပ်ဆောင်ပေးသူ",menu:"မီနူး",close:"ပိတ်",openChat:"ချတ်ဖွင့်",closeChat:"ချတ်ပိတ်",lightMode:"အလင်းမုဒ်",nightMode:"အမှောင်မုဒ်",refreshChat:"ချတ်ပြန်လည်ရယူ",copyChat:"ချတ်ကူးယူ",startChat:"ချတ်စတင်",startingVoiceSession:"အသံစီရင်ချက် စတင်နေသည်...",allowMicAccess:"မိုက်ခရိုဖုန်း ဝင်ရောက်ခွင့်ပြုပါ",emailRequired:"ကျေးဇူးပြု၍ သင့်အီးမေးလ်လိပ်စာကို ထည့်ပါ",nameRequired:"ကျေးဇူးပြု၍ သင့်အမည်ကို ထည့်ပါ",phoneRequired:"ကျေးဇူးပြု၍ သင့်ဖုန်းနံပါတ်ကို ထည့်ပါ",fieldRequiredSuffix:"ဖြည့်ရန် လိုအပ်ပါသည်",emailInvalid:"ကျေးဇူးပြု၍ မှန်ကန်သော အီးမေးလ်လိပ်စာကို ထည့်ပါ",nameInvalid:"ကျေးဇူးပြု၍ မှန်ကန်သော အမည်ကို ထည့်ပါ",phoneInvalid:"ကျေးဇူးပြု၍ မှန်ကန်သော ဖုန်းနံပါတ်ကို ထည့်ပါ"},ca:{connectionError:"Ho sentim, ara mateix tinc problemes de connexió. Torna-ho a provar.",micDenied:"No hem pogut accedir al teu micròfon. Permet l'accés i torna-ho a provar.",micNotFound:"No s'ha trobat cap micròfon. Connecta'n un i torna-ho a provar.",voiceUnavailable:"La veu no està disponible ara mateix. Torna-ho a provar.",chooseTopicLabel:"Tria un tema per començar:",categoryTopicsHeading:"Si us plau, fes la teva pregunta sobre **{category}** a continuació.",quickQuestionsHeadingLabel:"O fes una pregunta ràpida:",typeYourMessage:"Escriu el teu missatge...",agentIsLoading:"L'agent està carregant...",conversationResolved:"Conversa resolta",howWasYourExperience:"Com ha estat la teva experiència?",feedbackPrompt:"Si us plau, valora el nostre suport per ajudar-nos a millorar.",feedbackPlaceholder:"Explica'ns més sobre la teva experiència...",submitFeedback:"Enviar comentaris",submitting:"Enviant...",selectRatingFirst:"Primer selecciona una valoració",pleaseSubmitRatingFirst:"Si us plau, envia primer la teva valoració.",completeOnboardingToEnableVoice:"Completa la configuració per activar la veu",sendMessageToCompleteOnboarding:"Envia un missatge per completar la configuració i activar la veu.",resolve:"Resoldre",scrollLeft:"Desplaçar a l'esquerra",scrollRight:"Desplaçar a la dreta",sendMessage:"Enviar missatge",voiceSessionLive:"Sessió de veu activa - parla o escriu per conversar.",connectingVoice:"Connectant a la sessió de veu...",poweredBy:"Impulsat per",menu:"Menú",close:"Tancar",openChat:"Obrir xat",closeChat:"Tancar xat",lightMode:"Mode clar",nightMode:"Mode fosc",refreshChat:"Actualitzar xat",copyChat:"Copiar xat",startChat:"Iniciar xat",startingVoiceSession:"Iniciant sessió de veu...",allowMicAccess:"Permetre accés al micròfon",emailRequired:"Introdueix el teu correu electrònic",nameRequired:"Introdueix el teu nom",phoneRequired:"Introdueix el teu número de telèfon",fieldRequiredSuffix:"és un camp obligatori",emailInvalid:"Introdueix un correu electrònic vàlid",nameInvalid:"Introdueix un nom vàlid",phoneInvalid:"Introdueix un número de telèfon vàlid"},zh:{agentJoinedConversation:"{name} 已加入对话",handedOffToTeam:"您的对话已转交给我们的团队",handedOffStatus:"我们的团队将在此回复",connectionError:"抱歉,我现在连接遇到问题。请重试。",micDenied:"无法访问您的麦克风。请允许访问后重试。",micNotFound:"未检测到麦克风。请连接麦克风后重试。",voiceUnavailable:"语音功能当前不可用。请重试。",chooseTopicLabel:"选择一个主题开始:",categoryTopicsHeading:"请在下方提出您关于 **{category}** 的问题。",quickQuestionsHeadingLabel:"或者提一个快速问题:",typeYourMessage:"输入您的消息...",agentIsLoading:"客服正在加载...",conversationResolved:"对话已结束",howWasYourExperience:"您的体验如何?",feedbackPrompt:"请为我们的支持评分,帮助我们改进。",feedbackPlaceholder:"告诉我们更多关于您的体验...",submitFeedback:"提交反馈",submitting:"提交中...",selectRatingFirst:"请先选择评分",pleaseSubmitRatingFirst:"请先提交您的评分。",completeOnboardingToEnableVoice:"完成引导以启用语音",sendMessageToCompleteOnboarding:"发送消息完成引导并启用语音。",resolve:"结束",scrollLeft:"向左滚动",scrollRight:"向右滚动",sendMessage:"发送消息",voiceSessionLive:"语音会话进行中 - 请说话或输入。",connectingVoice:"正在连接语音会话...",poweredBy:"技术支持",menu:"菜单",close:"关闭",openChat:"打开聊天",closeChat:"关闭聊天",lightMode:"浅色模式",nightMode:"深色模式",refreshChat:"刷新聊天",copyChat:"复制聊天",startChat:"开始聊天",startingVoiceSession:"正在启动语音会话...",allowMicAccess:"允许访问麦克风",emailRequired:"请输入您的电子邮箱地址",nameRequired:"请输入您的姓名",phoneRequired:"请输入您的电话号码",fieldRequiredSuffix:"为必填项",emailInvalid:"请输入有效的电子邮箱地址",nameInvalid:"请输入有效的姓名",phoneInvalid:"请输入有效的电话号码"},hr:{connectionError:"Nažalost, trenutno imam problema s povezivanjem. Pokušajte ponovno.",micDenied:"Nismo mogli pristupiti vašem mikrofonu. Dopustite pristup i pokušajte ponovno.",micNotFound:"Mikrofon nije pronađen. Priključite ga i pokušajte ponovno.",voiceUnavailable:"Glasovna funkcija trenutačno nije dostupna. Pokušajte ponovno.",chooseTopicLabel:"Odaberite temu za početak:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** u nastavku.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Upišite svoju poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocijenite našu podršku kako bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o svom iskustvu...",submitFeedback:"Pošalji povratnu informaciju",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocjenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite ocjenu.",completeOnboardingToEnableVoice:"Dovršite uvod za omogućavanje glasa",sendMessageToCompleteOnboarding:"Pošaljite poruku da dovršite uvod i omogućite glas.",resolve:"Završi",scrollLeft:"Pomakni lijevo",scrollRight:"Pomakni desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija je aktivna - govorite ili pišite.",connectingVoice:"Povezivanje na glasovnu sesiju...",poweredBy:"Pokreće",menu:"Izbornik",close:"Zatvori",openChat:"Otvori chat",closeChat:"Zatvori chat",lightMode:"Svijetli način",nightMode:"Tamni način",refreshChat:"Osvježi chat",copyChat:"Kopiraj chat",startChat:"Pokreni chat",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dopustite pristup mikrofonu",emailRequired:"Unesite svoju adresu e-pošte",nameRequired:"Unesite svoje ime",phoneRequired:"Unesite svoj broj telefona",fieldRequiredSuffix:"(obavezno polje)",emailInvalid:"Unesite valjanu adresu e-pošte",nameInvalid:"Unesite valjano ime",phoneInvalid:"Unesite valjan broj telefona"},cs:{connectionError:"Omlouváme se, momentálně mám problémy s připojením. Zkuste to prosím znovu.",micDenied:"Nepodařilo se získat přístup k mikrofonu. Povolte přístup a zkuste to znovu.",micNotFound:"Mikrofon nebyl nalezen. Připojte jej a zkuste to znovu.",voiceUnavailable:"Hlasová funkce není momentálně dostupná. Zkuste to znovu.",chooseTopicLabel:"Vyberte téma a začněte:",categoryTopicsHeading:"Prosím, položte svou otázku ohledně **{category}** níže.",quickQuestionsHeadingLabel:"Nebo položte rychlou otázku:",typeYourMessage:"Napište zprávu...",agentIsLoading:"Agent se načítá...",conversationResolved:"Konverzace ukončena",howWasYourExperience:"Jaká byla vaše zkušenost?",feedbackPrompt:"Ohodnoťte prosím naši podporu, abychom se mohli zlepšit.",feedbackPlaceholder:"Řekněte nám více o své zkušenosti...",submitFeedback:"Odeslat zpětnou vazbu",submitting:"Odesílání...",selectRatingFirst:"Nejprve vyberte hodnocení",pleaseSubmitRatingFirst:"Nejprve prosím odešlete své hodnocení.",completeOnboardingToEnableVoice:"Dokončete úvod pro povolení hlasu",sendMessageToCompleteOnboarding:"Odešlete zprávu pro dokončení úvodu a povolení hlasu.",resolve:"Dokončit",scrollLeft:"Posunout doleva",scrollRight:"Posunout doprava",sendMessage:"Odeslat zprávu",voiceSessionLive:"Hlasová relace je aktivní - mluvte nebo pište.",connectingVoice:"Připojování k hlasové relaci...",poweredBy:"Používá",menu:"Nabídka",close:"Zavřít",openChat:"Otevřít chat",closeChat:"Zavřít chat",lightMode:"Světlý režim",nightMode:"Tmavý režim",refreshChat:"Obnovit chat",copyChat:"Kopírovat chat",startChat:"Začít chat",startingVoiceSession:"Spouštění hlasové relace...",allowMicAccess:"Povolit přístup k mikrofonu",emailRequired:"Zadejte svou e-mailovou adresu",nameRequired:"Zadejte své jméno",phoneRequired:"Zadejte své telefonní číslo",fieldRequiredSuffix:"(povinné pole)",emailInvalid:"Zadejte platnou e-mailovou adresu",nameInvalid:"Zadejte platné jméno",phoneInvalid:"Zadejte platné telefonní číslo"},da:{connectionError:"Beklager, jeg har problemer med at oprette forbindelse lige nu. Prøv igen.",micDenied:"Vi kunne ikke få adgang til din mikrofon. Tillad adgang og prøv igen.",micNotFound:"Der blev ikke fundet nogen mikrofon. Tilslut en og prøv igen.",voiceUnavailable:"Stemme er ikke tilgængelig lige nu. Prøv igen.",chooseTopicLabel:"Vælg et emne for at komme i gang:",categoryTopicsHeading:"Stil venligst dit spørgsmål om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller stil et hurtigt spørgsmål:",typeYourMessage:"Skriv din besked...",agentIsLoading:"Agenten indlæses...",conversationResolved:"Samtale afsluttet",howWasYourExperience:"Hvordan var din oplevelse?",feedbackPrompt:"Bedøm venligst vores support for at hjælpe os med at blive bedre.",feedbackPlaceholder:"Fortæl os mere om din oplevelse...",submitFeedback:"Indsend feedback",submitting:"Sender...",selectRatingFirst:"Vælg først en vurdering",pleaseSubmitRatingFirst:"Indsend venligst din vurdering først.",completeOnboardingToEnableVoice:"Fuldfør onboarding for at aktivere stemme",sendMessageToCompleteOnboarding:"Send en besked for at fuldføre onboarding og aktivere stemme.",resolve:"Afslut",scrollLeft:"Rul til venstre",scrollRight:"Rul til højre",sendMessage:"Send besked",voiceSessionLive:"Stemmesession aktiv - tal eller skriv for at samtale.",connectingVoice:"Forbinder til stemmesession...",poweredBy:"Drevet af",menu:"Menu",close:"Luk",openChat:"Åbn chat",closeChat:"Luk chat",lightMode:"Lys tilstand",nightMode:"Mørk tilstand",refreshChat:"Opdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter stemmesession...",allowMicAccess:"Tillad mikrofonadgang",emailRequired:"Indtast din e-mailadresse",nameRequired:"Indtast dit navn",phoneRequired:"Indtast dit telefonnummer",fieldRequiredSuffix:"er påkrævet",emailInvalid:"Indtast en gyldig e-mailadresse",nameInvalid:"Indtast et gyldigt navn",phoneInvalid:"Indtast et gyldigt telefonnummer"},nl:{agentJoinedConversation:"{name} neemt deel aan het gesprek",handedOffToTeam:"Uw gesprek is doorgegeven aan ons team",handedOffStatus:"Ons team reageert hier",connectionError:"Sorry, ik heb momenteel verbindingsproblemen. Probeer het opnieuw.",micDenied:"We konden geen toegang krijgen tot je microfoon. Geef toegang en probeer het opnieuw.",micNotFound:"Geen microfoon gevonden. Sluit een microfoon aan en probeer het opnieuw.",voiceUnavailable:"Spraak is momenteel niet beschikbaar. Probeer het opnieuw.",chooseTopicLabel:"Kies een onderwerp om te beginnen:",categoryTopicsHeading:"Stel hieronder uw vraag over **{category}**.",quickQuestionsHeadingLabel:"Of stel een snelle vraag:",typeYourMessage:"Typ je bericht...",agentIsLoading:"Agent wordt geladen...",conversationResolved:"Gesprek beëindigd",howWasYourExperience:"Hoe was je ervaring?",feedbackPrompt:"Beoordeel onze service om ons te helpen verbeteren.",feedbackPlaceholder:"Vertel ons meer over je ervaring...",submitFeedback:"Feedback versturen",submitting:"Versturen...",selectRatingFirst:"Selecteer eerst een beoordeling",pleaseSubmitRatingFirst:"Dien eerst je beoordeling in.",completeOnboardingToEnableVoice:"Voltooi de onboarding om spraak in te schakelen",sendMessageToCompleteOnboarding:"Verstuur een bericht om de onboarding te voltooien en spraak in te schakelen.",resolve:"Afronden",scrollLeft:"Naar links scrollen",scrollRight:"Naar rechts scrollen",sendMessage:"Bericht versturen",voiceSessionLive:"Spraaksessie actief - spreek of typ om te converseren.",connectingVoice:"Verbinden met spraaksessie...",poweredBy:"Mogelijk gemaakt door",menu:"Menu",close:"Sluiten",openChat:"Chat openen",closeChat:"Chat sluiten",lightMode:"Lichte modus",nightMode:"Donkere modus",refreshChat:"Chat vernieuwen",copyChat:"Chat kopiëren",startChat:"Chat starten",startingVoiceSession:"Spraaksessie starten...",allowMicAccess:"Toegang tot microfoon toestaan",emailRequired:"Voer uw e-mailadres in",nameRequired:"Voer uw naam in",phoneRequired:"Voer uw telefoonnummer in",fieldRequiredSuffix:"is verplicht",emailInvalid:"Voer een geldig e-mailadres in",nameInvalid:"Voer een geldige naam in",phoneInvalid:"Voer een geldig telefoonnummer in"},et:{connectionError:"Kahjuks on mul praegu ühendusprobleeme. Palun proovige uuesti.",micDenied:"Mikrofonile ei pääsenud ligi. Lubage juurdepääs ja proovige uuesti.",micNotFound:"Mikrofoni ei leitud. Ühendage mikrofon ja proovige uuesti.",voiceUnavailable:"Hääl ei ole praegu saadaval. Palun proovige uuesti.",chooseTopicLabel:"Vali alustamiseks teema:",categoryTopicsHeading:"Palun esita oma **{category}** küsimus allpool.",quickQuestionsHeadingLabel:"Või esita kiire küsimus:",typeYourMessage:"Sisesta oma sõnum...",agentIsLoading:"Agent laeb...",conversationResolved:"Vestlus lõpetatud",howWasYourExperience:"Kuidas oli teie kogemus?",feedbackPrompt:"Palun hinnake meie tuge, et aidata meil paremaks saada.",feedbackPlaceholder:"Rääkige meile oma kogemusest rohkem...",submitFeedback:"Saada tagasiside",submitting:"Saatmine...",selectRatingFirst:"Vali esmalt hinnang",pleaseSubmitRatingFirst:"Palun esita esmalt oma hinnang.",completeOnboardingToEnableVoice:"Häälefunktsiooni lubamiseks lõpeta sissejuhatus",sendMessageToCompleteOnboarding:"Saada sõnum, et lõpetada sissejuhatus ja lubada hääl.",resolve:"Lõpeta",scrollLeft:"Keri vasakule",scrollRight:"Keri paremale",sendMessage:"Saada sõnum",voiceSessionLive:"Häälseanss aktiivne - rääkige või kirjutage.",connectingVoice:"Ühendamine häälseansiga...",poweredBy:"Võimaldab",menu:"Menüü",close:"Sulge",openChat:"Ava vestlus",closeChat:"Sulge vestlus",lightMode:"Hele režiim",nightMode:"Tume režiim",refreshChat:"Värskenda vestlust",copyChat:"Kopeeri vestlus",startChat:"Alusta vestlust",startingVoiceSession:"Häälseansi käivitamine...",allowMicAccess:"Luba mikrofoni juurdepääs",emailRequired:"Sisestage oma e-posti aadress",nameRequired:"Sisestage oma nimi",phoneRequired:"Sisestage oma telefoninumber",fieldRequiredSuffix:"on kohustuslik",emailInvalid:"Sisestage kehtiv e-posti aadress",nameInvalid:"Sisestage kehtiv nimi",phoneInvalid:"Sisestage kehtiv telefoninumber"},fi:{connectionError:"Pahoittelut, minulla on nyt yhteysongelmia. Yritä uudelleen.",micDenied:"Mikrofoniin ei saatu yhteyttä. Salli käyttöoikeus ja yritä uudelleen.",micNotFound:"Mikrofonia ei löytynyt. Liitä mikrofoni ja yritä uudelleen.",voiceUnavailable:"Ääni ei ole juuri nyt käytettävissä. Yritä uudelleen.",chooseTopicLabel:"Aloita valitsemalla aihe:",categoryTopicsHeading:"Esitä **{category}**-kysymyksesi alla.",quickQuestionsHeadingLabel:"Tai esitä nopea kysymys:",typeYourMessage:"Kirjoita viestisi...",agentIsLoading:"Agenttia ladataan...",conversationResolved:"Keskustelu päättynyt",howWasYourExperience:"Millainen kokemuksesi oli?",feedbackPrompt:"Arvioi tukipalveluamme auttaaksesi meitä kehittymään.",feedbackPlaceholder:"Kerro lisää kokemuksestasi...",submitFeedback:"Lähetä palaute",submitting:"Lähetetään...",selectRatingFirst:"Valitse ensin arvio",pleaseSubmitRatingFirst:"Lähetä arviosi ensin.",completeOnboardingToEnableVoice:"Suorita perehdytys ottaaksesi äänen käyttöön",sendMessageToCompleteOnboarding:"Lähetä viesti suorittaaksesi perehdytyksen ja ottaaksesi äänen käyttöön.",resolve:"Lopeta",scrollLeft:"Vieritä vasemmalle",scrollRight:"Vieritä oikealle",sendMessage:"Lähetä viesti",voiceSessionLive:"Ääni-istunto aktiivinen - puhu tai kirjoita.",connectingVoice:"Yhdistetään ääni-istuntoon...",poweredBy:"Toimittaa",menu:"Valikko",close:"Sulje",openChat:"Avaa chat",closeChat:"Sulje chat",lightMode:"Vaalea tila",nightMode:"Tumma tila",refreshChat:"Päivitä chat",copyChat:"Kopioi chat",startChat:"Aloita chat",startingVoiceSession:"Käynnistetään ääni-istuntoa...",allowMicAccess:"Salli mikrofonin käyttö",emailRequired:"Anna sähköpostiosoitteesi",nameRequired:"Anna nimesi",phoneRequired:"Anna puhelinnumerosi",fieldRequiredSuffix:"on pakollinen",emailInvalid:"Anna kelvollinen sähköpostiosoite",nameInvalid:"Anna kelvollinen nimi",phoneInvalid:"Anna kelvollinen puhelinnumero"},fr:{agentJoinedConversation:"{name} a rejoint la conversation",handedOffToTeam:"Votre conversation a été transmise à notre équipe",handedOffStatus:"Notre équipe vous répondra ici",connectionError:"Désolé, je rencontre des problèmes de connexion en ce moment. Veuillez réessayer.",micDenied:"Nous n'avons pas pu accéder à votre microphone. Autorisez l'accès et réessayez.",micNotFound:"Aucun microphone détecté. Connectez-en un et réessayez.",voiceUnavailable:"La voix n'est pas disponible pour le moment. Veuillez réessayer.",chooseTopicLabel:"Choisissez un sujet pour commencer :",categoryTopicsHeading:"Veuillez poser votre question sur **{category}** ci-dessous.",quickQuestionsHeadingLabel:"Ou posez une question rapide :",typeYourMessage:"Tapez votre message...",agentIsLoading:"L'agent est en cours de chargement...",conversationResolved:"Conversation terminée",howWasYourExperience:"Comment s'est passée votre expérience ?",feedbackPrompt:"Veuillez évaluer notre support pour nous aider à nous améliorer.",feedbackPlaceholder:"Dites-nous en plus sur votre expérience...",submitFeedback:"Envoyer les commentaires",submitting:"Envoi en cours...",selectRatingFirst:"Sélectionnez d'abord une note",pleaseSubmitRatingFirst:"Veuillez d'abord envoyer votre note.",completeOnboardingToEnableVoice:"Terminez l'intégration pour activer la voix",sendMessageToCompleteOnboarding:"Envoyez un message pour terminer l'intégration et activer la voix.",resolve:"Terminer",scrollLeft:"Faire défiler à gauche",scrollRight:"Faire défiler à droite",sendMessage:"Envoyer un message",voiceSessionLive:"Session vocale active - parlez ou tapez pour converser.",connectingVoice:"Connexion à la session vocale...",poweredBy:"Propulsé par",menu:"Menu",close:"Fermer",openChat:"Ouvrir le chat",closeChat:"Fermer le chat",lightMode:"Mode clair",nightMode:"Mode sombre",refreshChat:"Actualiser le chat",copyChat:"Copier le chat",startChat:"Commencer le chat",startingVoiceSession:"Démarrage de la session vocale...",allowMicAccess:"Autoriser l'accès au microphone",emailRequired:"Veuillez saisir votre adresse e-mail",nameRequired:"Veuillez saisir votre nom",phoneRequired:"Veuillez saisir votre numéro de téléphone",fieldRequiredSuffix:"est obligatoire",emailInvalid:"Veuillez saisir une adresse e-mail valide",nameInvalid:"Veuillez saisir un nom valide",phoneInvalid:"Veuillez saisir un numéro de téléphone valide"},de:{agentJoinedConversation:"{name} ist dem Gespräch beigetreten",handedOffToTeam:"Ihr Gespräch wurde an unser Team übergeben",handedOffStatus:"Unser Team antwortet Ihnen hier",connectionError:"Entschuldigung, ich habe gerade Verbindungsprobleme. Bitte versuchen Sie es erneut.",micDenied:"Wir konnten nicht auf Ihr Mikrofon zugreifen. Bitte erlauben Sie den Zugriff und versuchen Sie es erneut.",micNotFound:"Kein Mikrofon gefunden. Bitte schließen Sie eines an und versuchen Sie es erneut.",voiceUnavailable:"Sprache ist derzeit nicht verfügbar. Bitte versuchen Sie es erneut.",chooseTopicLabel:"Wählen Sie ein Thema, um zu beginnen:",categoryTopicsHeading:"Bitte stellen Sie Ihre Frage zu **{category}** unten.",quickQuestionsHeadingLabel:"Oder stellen Sie eine schnelle Frage:",typeYourMessage:"Geben Sie Ihre Nachricht ein...",agentIsLoading:"Agent wird geladen...",conversationResolved:"Gespräch beendet",howWasYourExperience:"Wie war Ihre Erfahrung?",feedbackPrompt:"Bitte bewerten Sie unseren Support, um uns bei der Verbesserung zu helfen.",feedbackPlaceholder:"Erzählen Sie uns mehr über Ihre Erfahrung...",submitFeedback:"Feedback senden",submitting:"Wird gesendet...",selectRatingFirst:"Wählen Sie zuerst eine Bewertung aus",pleaseSubmitRatingFirst:"Bitte senden Sie zuerst Ihre Bewertung.",completeOnboardingToEnableVoice:"Schließen Sie das Onboarding ab, um die Sprache zu aktivieren",sendMessageToCompleteOnboarding:"Senden Sie eine Nachricht, um das Onboarding abzuschließen und die Sprache zu aktivieren.",resolve:"Beenden",scrollLeft:"Nach links scrollen",scrollRight:"Nach rechts scrollen",sendMessage:"Nachricht senden",voiceSessionLive:"Sprachsitzung aktiv - sprechen oder tippen Sie.",connectingVoice:"Verbindung zur Sprachsitzung...",poweredBy:"Bereitgestellt von",menu:"Menü",close:"Schließen",openChat:"Chat öffnen",closeChat:"Chat schließen",lightMode:"Heller Modus",nightMode:"Dunkler Modus",refreshChat:"Chat aktualisieren",copyChat:"Chat kopieren",startChat:"Chat starten",startingVoiceSession:"Sprachsitzung wird gestartet...",allowMicAccess:"Mikrofonzugriff erlauben",emailRequired:"Bitte geben Sie Ihre E-Mail-Adresse ein",nameRequired:"Bitte geben Sie Ihren Namen ein",phoneRequired:"Bitte geben Sie Ihre Telefonnummer ein",fieldRequiredSuffix:"ist erforderlich",emailInvalid:"Bitte geben Sie eine gültige E-Mail-Adresse ein",nameInvalid:"Bitte geben Sie einen gültigen Namen ein",phoneInvalid:"Bitte geben Sie eine gültige Telefonnummer ein"},el:{connectionError:"Συγγνώμη, αντιμετωπίζω πρόβλημα σύνδεσης αυτή τη στιγμή. Δοκιμάστε ξανά.",micDenied:"Δεν μπορέσαμε να αποκτήσουμε πρόσβαση στο μικρόφωνό σας. Επιτρέψτε την πρόσβαση και δοκιμάστε ξανά.",micNotFound:"Δεν βρέθηκε μικρόφωνο. Συνδέστε ένα και δοκιμάστε ξανά.",voiceUnavailable:"Η φωνή δεν είναι διαθέσιμη αυτή τη στιγμή. Δοκιμάστε ξανά.",chooseTopicLabel:"Επιλέξτε ένα θέμα για να ξεκινήσετε:",categoryTopicsHeading:"Παρακαλώ κάντε την ερώτησή σας σχετικά με το **{category}** παρακάτω.",quickQuestionsHeadingLabel:"Ή κάντε μια γρήγορη ερώτηση:",typeYourMessage:"Πληκτρολογήστε το μήνυμά σας...",agentIsLoading:"Ο πράκτορας φορτώνει...",conversationResolved:"Η συζήτηση ολοκληρώθηκε",howWasYourExperience:"Πώς ήταν η εμπειρία σας;",feedbackPrompt:"Παρακαλούμε αξιολογήστε την υποστήριξή μας για να βελτιωθούμε.",feedbackPlaceholder:"Πείτε μας περισσότερα για την εμπειρία σας...",submitFeedback:"Υποβολή σχολίων",submitting:"Υποβολή...",selectRatingFirst:"Επιλέξτε πρώτα μια βαθμολογία",pleaseSubmitRatingFirst:"Υποβάλετε πρώτα τη βαθμολογία σας.",completeOnboardingToEnableVoice:"Ολοκληρώστε την εισαγωγή για ενεργοποίηση φωνής",sendMessageToCompleteOnboarding:"Στείλτε ένα μήνυμα για ολοκλήρωση της εισαγωγής και ενεργοποίηση φωνής.",resolve:"Ολοκλήρωση",scrollLeft:"Κύλιση αριστερά",scrollRight:"Κύλιση δεξιά",sendMessage:"Αποστολή μηνύματος",voiceSessionLive:"Φωνητική συνεδρία ενεργή - μιλήστε ή πληκτρολογήστε.",connectingVoice:"Σύνδεση σε φωνητική συνεδρία...",poweredBy:"Υποστηρίζεται από",menu:"Μενού",close:"Κλείσιμο",openChat:"Άνοιγμα συνομιλίας",closeChat:"Κλείσιμο συνομιλίας",lightMode:"Φωτεινή λειτουργία",nightMode:"Σκοτεινή λειτουργία",refreshChat:"Ανανέωση συνομιλίας",copyChat:"Αντιγραφή συνομιλίας",startChat:"Έναρξη συνομιλίας",startingVoiceSession:"Εκκίνηση φωνητικής συνεδρίας...",allowMicAccess:"Επιτρέψτε πρόσβαση στο μικρόφωνο",emailRequired:"Παρακαλώ εισαγάγετε τη διεύθυνση email σας",nameRequired:"Παρακαλώ εισαγάγετε το όνομά σας",phoneRequired:"Παρακαλώ εισαγάγετε τον αριθμό τηλεφώνου σας",fieldRequiredSuffix:"(υποχρεωτικό πεδίο)",emailInvalid:"Παρακαλώ εισαγάγετε μια έγκυρη διεύθυνση email",nameInvalid:"Παρακαλώ εισαγάγετε ένα έγκυρο όνομα",phoneInvalid:"Παρακαλώ εισαγάγετε έναν έγκυρο αριθμό τηλεφώνου"},hi:{connectionError:"क्षमा करें, मुझे अभी कनेक्ट होने में समस्या हो रही है। कृपया पुनः प्रयास करें।",micDenied:"हम आपके माइक्रोफ़ोन का उपयोग नहीं कर सके। कृपया अनुमति दें और पुनः प्रयास करें।",micNotFound:"कोई माइक्रोफ़ोन नहीं मिला। कृपया एक कनेक्ट करें और पुनः प्रयास करें।",voiceUnavailable:"वॉइस अभी उपलब्ध नहीं है। कृपया पुनः प्रयास करें।",chooseTopicLabel:"शुरू करने के लिए एक विषय चुनें:",categoryTopicsHeading:"कृपया अपना **{category}** प्रश्न नीचे पूछें।",quickQuestionsHeadingLabel:"या एक त्वरित प्रश्न पूछें:",typeYourMessage:"अपना संदेश लिखें...",agentIsLoading:"एजेंट लोड हो रहा है...",conversationResolved:"बातचीत समाप्त हुई",howWasYourExperience:"आपका अनुभव कैसा रहा?",feedbackPrompt:"हमें बेहतर बनाने में मदद के लिए कृपया हमारे समर्थन को रेट करें।",feedbackPlaceholder:"अपने अनुभव के बारे में और बताएं...",submitFeedback:"फीडबैक भेजें",submitting:"भेजा जा रहा है...",selectRatingFirst:"पहले रेटिंग चुनें",pleaseSubmitRatingFirst:"कृपया पहले अपनी रेटिंग जमा करें।",completeOnboardingToEnableVoice:"वॉयस सक्षम करने के लिए ऑनबोर्डिंग पूरी करें",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूरी करने और वॉयस सक्षम करने के लिए संदेश भेजें।",resolve:"समाप्त करें",scrollLeft:"बाएं स्क्रॉल करें",scrollRight:"दाएं स्क्रॉल करें",sendMessage:"संदेश भेजें",voiceSessionLive:"वॉयस सत्र सक्रिय - बात करने के लिए बोलें या टाइप करें।",connectingVoice:"वॉयस सत्र से कनेक्ट हो रहा है...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारा संचालित",menu:"मेनू",close:"बंद करें",openChat:"चैट खोलें",closeChat:"चैट बंद करें",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चैट रीफ्रेश करें",copyChat:"चैट कॉपी करें",startChat:"चैट शुरू करें",startingVoiceSession:"वॉयस सत्र शुरू हो रहा है...",allowMicAccess:"माइक्रोफ़ोन एक्सेस की अनुमति दें",emailRequired:"कृपया अपना ईमेल पता दर्ज करें",nameRequired:"कृपया अपना नाम दर्ज करें",phoneRequired:"कृपया अपना फ़ोन नंबर दर्ज करें",fieldRequiredSuffix:"आवश्यक है",emailInvalid:"कृपया एक मान्य ईमेल पता दर्ज करें",nameInvalid:"कृपया एक मान्य नाम दर्ज करें",phoneInvalid:"कृपया एक मान्य फ़ोन नंबर दर्ज करें"},mr:{connectionError:"क्षमस्व, सध्या कनेक्ट होण्यात अडचण येत आहे. कृपया पुन्हा प्रयत्न करा.",micDenied:"आम्ही तुमचा मायक्रोफोन वापरू शकलो नाही. कृपया परवानगी द्या आणि पुन्हा प्रयत्न करा.",micNotFound:"मायक्रोफोन आढळला नाही. कृपया एक जोडा आणि पुन्हा प्रयत्न करा.",voiceUnavailable:"व्हॉइस सध्या उपलब्ध नाही. कृपया पुन्हा प्रयत्न करा.",chooseTopicLabel:"सुरू करण्यासाठी एक विषय निवडा:",categoryTopicsHeading:"कृपया तुमचा **{category}** प्रश्न खाली विचारा.",quickQuestionsHeadingLabel:"किंवा एक झटपट प्रश्न विचारा:",typeYourMessage:"तुमचा संदेश टाइप करा...",agentIsLoading:"एजंट लोड होत आहे...",conversationResolved:"संभाषण समाप्त",howWasYourExperience:"तुमचा अनुभव कसा होता?",feedbackPrompt:"आम्हाला सुधारण्यास मदत करण्यासाठी कृपया आमच्या समर्थनाला रेट करा.",feedbackPlaceholder:"तुमच्या अनुभवाबद्दल आम्हाला अधिक सांगा...",submitFeedback:"फीडबॅक सबमिट करा",submitting:"सबमिट करत आहे...",selectRatingFirst:"प्रथम रेटिंग निवडा",pleaseSubmitRatingFirst:"कृपया प्रथम आपले रेटिंग सबमिट करा.",completeOnboardingToEnableVoice:"व्हॉइस सक्षम करण्यासाठी ऑनबोर्डिंग पूर्ण करा",sendMessageToCompleteOnboarding:"ऑनबोर्डिंग पूर्ण करून व्हॉइस सक्षम करण्यासाठी संदेश पाठवा.",resolve:"समाप्त",scrollLeft:"डावीकडे स्क्रोल करा",scrollRight:"उजवीकडे स्क्रोल करा",sendMessage:"संदेश पाठवा",voiceSessionLive:"व्हॉइस सत्र सक्रिय - बोला किंवा टाइप करा.",connectingVoice:"व्हॉइस सत्रास जोडत आहे...",poweredBy:"Powered by",poweredByBefore:"",poweredByAfter:"द्वारे समर्थित",menu:"मेनू",close:"बंद करा",openChat:"चॅट उघडा",closeChat:"चॅट बंद करा",lightMode:"लाइट मोड",nightMode:"डार्क मोड",refreshChat:"चॅट रीफ्रेश करा",copyChat:"चॅट कॉपी करा",startChat:"चॅट सुरू करा",startingVoiceSession:"व्हॉइस सत्र सुरू होत आहे...",allowMicAccess:"मायक्रोफोन प्रवेशास परवानगी द्या",emailRequired:"कृपया आपला ईमेल पत्ता प्रविष्ट करा",nameRequired:"कृपया आपले नाव प्रविष्ट करा",phoneRequired:"कृपया आपला फोन नंबर प्रविष्ट करा",fieldRequiredSuffix:"आवश्यक आहे",emailInvalid:"कृपया वैध ईमेल पत्ता प्रविष्ट करा",nameInvalid:"कृपया वैध नाव प्रविष्ट करा",phoneInvalid:"कृपया वैध फोन नंबर प्रविष्ट करा"},hu:{connectionError:"Sajnáljuk, jelenleg kapcsolódási problémám van. Kérjük, próbálja újra.",micDenied:"Nem sikerült hozzáférni a mikrofonjához. Engedélyezze a hozzáférést, és próbálja újra.",micNotFound:"Nem található mikrofon. Csatlakoztasson egyet, és próbálja újra.",voiceUnavailable:"A hang jelenleg nem elérhető. Kérjük, próbálja újra.",chooseTopicLabel:"Válassz egy témát a kezdéshez:",categoryTopicsHeading:"Kérjük, tedd fel **{category}** kérdésedet alább.",quickQuestionsHeadingLabel:"Vagy tegyél fel egy gyors kérdést:",typeYourMessage:"Írja be az üzenetét...",agentIsLoading:"Az ügynök betöltődik...",conversationResolved:"Beszélgetés befejezve",howWasYourExperience:"Milyen volt az élménye?",feedbackPrompt:"Kérjük, értékelje támogatásunkat, hogy segítsen nekünk fejlődni.",feedbackPlaceholder:"Meséljen többet az élményéről...",submitFeedback:"Visszajelzés küldése",submitting:"Küldés...",selectRatingFirst:"Először válasszon értékelést",pleaseSubmitRatingFirst:"Kérjük, először küldje el értékelését.",completeOnboardingToEnableVoice:"Fejezze be a beállítást a hang engedélyezéséhez",sendMessageToCompleteOnboarding:"Küldjön üzenetet a beállítás befejezéséhez és a hang engedélyezéséhez.",resolve:"Befejezés",scrollLeft:"Balra görgetés",scrollRight:"Jobbra görgetés",sendMessage:"Üzenet küldése",voiceSessionLive:"Hangmenet aktív - beszéljen vagy írjon.",connectingVoice:"Csatlakozás hangmenet...",poweredBy:"Működteti",menu:"Menü",close:"Bezárás",openChat:"Csevegés megnyitása",closeChat:"Csevegés bezárása",lightMode:"Világos mód",nightMode:"Sötét mód",refreshChat:"Csevegés frissítése",copyChat:"Csevegés másolása",startChat:"Csevegés indítása",startingVoiceSession:"Hangmenet indítása...",allowMicAccess:"Mikrofon hozzáférés engedélyezése",emailRequired:"Adja meg az e-mail-címét",nameRequired:"Adja meg a nevét",phoneRequired:"Adja meg a telefonszámát",fieldRequiredSuffix:"megadása kötelező",emailInvalid:"Adjon meg egy érvényes e-mail-címet",nameInvalid:"Adjon meg egy érvényes nevet",phoneInvalid:"Adjon meg egy érvényes telefonszámot"},is:{connectionError:"Því miður næ ég ekki sambandi núna. Vinsamlegast prófaðu aftur.",micDenied:"Við fengum ekki aðgang að hljóðnemanum þínum. Leyfðu aðgang og prófaðu aftur.",micNotFound:"Enginn hljóðnemi fannst. Tengdu hljóðnema og prófaðu aftur.",voiceUnavailable:"Tal er ekki í boði núna. Vinsamlegast prófaðu aftur.",chooseTopicLabel:"Veldu efni til að byrja:",categoryTopicsHeading:"Vinsamlegast spurðu spurningu þinnar um **{category}** hér að neðan.",quickQuestionsHeadingLabel:"Eða spurðu fljótlegrar spurningar:",typeYourMessage:"Sláðu inn skilaboð...",agentIsLoading:"Fulltrúi hleðst...",conversationResolved:"Samtali lokið",howWasYourExperience:"Hvernig var upplifun þín?",feedbackPrompt:"Vinsamlegast metið þjónustu okkar til að hjálpa okkur að bæta okkur.",feedbackPlaceholder:"Segðu okkur meira um upplifun þína...",submitFeedback:"Senda umsögn",submitting:"Sendir...",selectRatingFirst:"Veldu fyrst einkunn",pleaseSubmitRatingFirst:"Vinsamlegast sendu inn einkunn þína fyrst.",completeOnboardingToEnableVoice:"Ljúktu kynningu til að virkja rödd",sendMessageToCompleteOnboarding:"Sendu skilaboð til að ljúka kynningu og virkja rödd.",resolve:"Ljúka",scrollLeft:"Skruna til vinstri",scrollRight:"Skruna til hægri",sendMessage:"Senda skilaboð",voiceSessionLive:"Raddsamtal virkt - talaðu eða skrifaðu.",connectingVoice:"Tengist raddsamtali...",poweredBy:"Knúið af",menu:"Valmynd",close:"Loka",openChat:"Opna spjall",closeChat:"Loka spjalli",lightMode:"Ljóst þema",nightMode:"Dökkt þema",refreshChat:"Endurnýja spjall",copyChat:"Afrita spjall",startChat:"Byrja spjall",startingVoiceSession:"Byrjar raddsamtal...",allowMicAccess:"Leyfa aðgang að hljóðnema",emailRequired:"Sláðu inn netfangið þitt",nameRequired:"Sláðu inn nafn þitt",phoneRequired:"Sláðu inn símanúmerið þitt",fieldRequiredSuffix:"(nauðsynlegur reitur)",emailInvalid:"Sláðu inn gilt netfang",nameInvalid:"Sláðu inn gilt nafn",phoneInvalid:"Sláðu inn gilt símanúmer"},id:{connectionError:"Maaf, saya sedang mengalami masalah koneksi. Silakan coba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon Anda. Izinkan akses dan coba lagi.",micNotFound:"Mikrofon tidak ditemukan. Hubungkan mikrofon dan coba lagi.",voiceUnavailable:"Fitur suara tidak tersedia saat ini. Silakan coba lagi.",chooseTopicLabel:"Pilih topik untuk memulai:",categoryTopicsHeading:"Silakan ajukan pertanyaan **{category}** Anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan pertanyaan cepat:",typeYourMessage:"Ketik pesan Anda...",agentIsLoading:"Agen sedang dimuat...",conversationResolved:"Percakapan selesai",howWasYourExperience:"Bagaimana pengalaman Anda?",feedbackPrompt:"Silakan nilai dukungan kami untuk membantu kami berkembang.",feedbackPlaceholder:"Ceritakan lebih banyak tentang pengalaman Anda...",submitFeedback:"Kirim umpan balik",submitting:"Mengirim...",selectRatingFirst:"Pilih peringkat terlebih dahulu",pleaseSubmitRatingFirst:"Silakan kirim peringkat Anda terlebih dahulu.",completeOnboardingToEnableVoice:"Selesaikan pengenalan untuk mengaktifkan suara",sendMessageToCompleteOnboarding:"Kirim pesan untuk menyelesaikan pengenalan dan mengaktifkan suara.",resolve:"Selesai",scrollLeft:"Gulir kiri",scrollRight:"Gulir kanan",sendMessage:"Kirim pesan",voiceSessionLive:"Sesi suara aktif - bicara atau ketik untuk berbincang.",connectingVoice:"Menghubungkan ke sesi suara...",poweredBy:"Didukung oleh",menu:"Menu",close:"Tutup",openChat:"Buka obrolan",closeChat:"Tutup obrolan",lightMode:"Mode terang",nightMode:"Mode gelap",refreshChat:"Segarkan obrolan",copyChat:"Salin obrolan",startChat:"Mulai obrolan",startingVoiceSession:"Memulai sesi suara...",allowMicAccess:"Izinkan akses mikrofon",emailRequired:"Masukkan alamat email Anda",nameRequired:"Masukkan nama Anda",phoneRequired:"Masukkan nomor telepon Anda",fieldRequiredSuffix:"wajib diisi",emailInvalid:"Masukkan alamat email yang valid",nameInvalid:"Masukkan nama yang valid",phoneInvalid:"Masukkan nomor telepon yang valid"},it:{connectionError:"Spiacenti, al momento ho problemi di connessione. Riprova.",micDenied:"Non siamo riusciti ad accedere al tuo microfono. Consenti l'accesso e riprova.",micNotFound:"Nessun microfono rilevato. Collegane uno e riprova.",voiceUnavailable:"La voce non è disponibile al momento. Riprova.",chooseTopicLabel:"Scegli un argomento per iniziare:",categoryTopicsHeading:"Per favore, poni la tua domanda su **{category}** qui sotto.",quickQuestionsHeadingLabel:"Oppure fai una domanda rapida:",typeYourMessage:"Scrivi il tuo messaggio...",agentIsLoading:"L'agente sta caricando...",conversationResolved:"Conversazione conclusa",howWasYourExperience:"Com'è stata la tua esperienza?",feedbackPrompt:"Valuta il nostro supporto per aiutarci a migliorare.",feedbackPlaceholder:"Raccontaci di più sulla tua esperienza...",submitFeedback:"Invia feedback",submitting:"Invio in corso...",selectRatingFirst:"Seleziona prima una valutazione",pleaseSubmitRatingFirst:"Invia prima la tua valutazione.",completeOnboardingToEnableVoice:"Completa l'onboarding per abilitare la voce",sendMessageToCompleteOnboarding:"Invia un messaggio per completare l'onboarding e abilitare la voce.",resolve:"Concludi",scrollLeft:"Scorri a sinistra",scrollRight:"Scorri a destra",sendMessage:"Invia messaggio",voiceSessionLive:"Sessione vocale attiva - parla o scrivi per conversare.",connectingVoice:"Connessione alla sessione vocale...",poweredBy:"Fornito da",menu:"Menu",close:"Chiudi",openChat:"Apri chat",closeChat:"Chiudi chat",lightMode:"Modalità chiara",nightMode:"Modalità scura",refreshChat:"Aggiorna chat",copyChat:"Copia chat",startChat:"Inizia chat",startingVoiceSession:"Avvio sessione vocale...",allowMicAccess:"Consenti l'accesso al microfono",emailRequired:"Inserisci il tuo indirizzo email",nameRequired:"Inserisci il tuo nome",phoneRequired:"Inserisci il tuo numero di telefono",fieldRequiredSuffix:"è un campo obbligatorio",emailInvalid:"Inserisci un indirizzo email valido",nameInvalid:"Inserisci un nome valido",phoneInvalid:"Inserisci un numero di telefono valido"},ja:{agentJoinedConversation:"{name}が会話に参加しました",handedOffToTeam:"会話を担当チームに引き継ぎました",handedOffStatus:"担当チームがこちらで返信します",connectionError:"申し訳ありません。現在接続に問題が発生しています。もう一度お試しください。",micDenied:"マイクにアクセスできませんでした。アクセスを許可してもう一度お試しください。",micNotFound:"マイクが見つかりません。マイクを接続してもう一度お試しください。",voiceUnavailable:"音声機能は現在利用できません。もう一度お試しください。",chooseTopicLabel:"始めるにはトピックを選択してください:",categoryTopicsHeading:"**{category}** に関するご質問を以下にお書きください。",quickQuestionsHeadingLabel:"または、簡単な質問をどうぞ:",typeYourMessage:"メッセージを入力してください...",agentIsLoading:"エージェントを読み込んでいます...",conversationResolved:"会話が終了しました",howWasYourExperience:"ご体験はいかがでしたか?",feedbackPrompt:"サポート向上のため、評価をお願いします。",feedbackPlaceholder:"体験について詳しく教えてください...",submitFeedback:"フィードバックを送信",submitting:"送信中...",selectRatingFirst:"最初に評価を選択してください",pleaseSubmitRatingFirst:"最初に評価を送信してください。",completeOnboardingToEnableVoice:"音声を有効にするにはオンボーディングを完了してください",sendMessageToCompleteOnboarding:"オンボーディングを完了して音声を有効にするにはメッセージを送信してください。",resolve:"終了",scrollLeft:"左へスクロール",scrollRight:"右へスクロール",sendMessage:"メッセージを送信",voiceSessionLive:"音声セッション中 - 話すか入力してください。",connectingVoice:"音声セッションに接続中...",poweredBy:"提供元",menu:"メニュー",close:"閉じる",openChat:"チャットを開く",closeChat:"チャットを閉じる",lightMode:"ライトモード",nightMode:"ダークモード",refreshChat:"チャットを更新",copyChat:"チャットをコピー",startChat:"チャットを開始",startingVoiceSession:"音声セッションを開始しています...",allowMicAccess:"マイクへのアクセスを許可",emailRequired:"メールアドレスを入力してください",nameRequired:"お名前を入力してください",phoneRequired:"電話番号を入力してください",fieldRequiredSuffix:"は必須です",emailInvalid:"有効なメールアドレスを入力してください",nameInvalid:"有効なお名前を入力してください",phoneInvalid:"有効な電話番号を入力してください"},ko:{connectionError:"죄송합니다. 현재 연결에 문제가 있습니다. 다시 시도해 주세요.",micDenied:"마이크에 접근할 수 없습니다. 접근을 허용한 후 다시 시도해 주세요.",micNotFound:"마이크를 찾을 수 없습니다. 마이크를 연결한 후 다시 시도해 주세요.",voiceUnavailable:"음성 기능을 현재 사용할 수 없습니다. 다시 시도해 주세요.",chooseTopicLabel:"시작하려면 주제를 선택하세요:",categoryTopicsHeading:"**{category}** 에 대한 질문을 아래에 작성해 주세요.",quickQuestionsHeadingLabel:"또는 간단한 질문을 해보세요:",typeYourMessage:"메시지를 입력하세요...",agentIsLoading:"상담원을 불러오는 중...",conversationResolved:"대화가 종료되었습니다",howWasYourExperience:"경험은 어떠셨나요?",feedbackPrompt:"개선을 위해 저희 지원 서비스를 평가해주세요.",feedbackPlaceholder:"경험에 대해 더 알려주세요...",submitFeedback:"피드백 제출",submitting:"제출 중...",selectRatingFirst:"먼저 평점을 선택해주세요",pleaseSubmitRatingFirst:"먼저 평점을 제출해주세요.",completeOnboardingToEnableVoice:"음성을 사용하려면 온보딩을 완료하세요",sendMessageToCompleteOnboarding:"온보딩을 완료하고 음성을 사용하려면 메시지를 보내세요.",resolve:"종료",scrollLeft:"왼쪽으로 스크롤",scrollRight:"오른쪽으로 스크롤",sendMessage:"메시지 보내기",voiceSessionLive:"음성 세션 활성화 - 말하거나 입력하세요.",connectingVoice:"음성 세션에 연결 중...",poweredBy:"제공",menu:"메뉴",close:"닫기",openChat:"채팅 열기",closeChat:"채팅 닫기",lightMode:"라이트 모드",nightMode:"다크 모드",refreshChat:"채팅 새로고침",copyChat:"채팅 복사",startChat:"채팅 시작",startingVoiceSession:"음성 세션 시작 중...",allowMicAccess:"마이크 액세스 허용",emailRequired:"이메일 주소를 입력해 주세요",nameRequired:"이름을 입력해 주세요",phoneRequired:"전화번호를 입력해 주세요",fieldRequiredSuffix:"항목은 필수입니다",emailInvalid:"유효한 이메일 주소를 입력해 주세요",nameInvalid:"유효한 이름을 입력해 주세요",phoneInvalid:"유효한 전화번호를 입력해 주세요"},lv:{connectionError:"Atvainojiet, šobrīd ir savienojuma problēmas. Lūdzu, mēģiniet vēlreiz.",micDenied:"Neizdevās piekļūt mikrofonam. Lūdzu, atļaujiet piekļuvi un mēģiniet vēlreiz.",micNotFound:"Mikrofons nav atrasts. Lūdzu, pievienojiet mikrofonu un mēģiniet vēlreiz.",voiceUnavailable:"Balss funkcija šobrīd nav pieejama. Lūdzu, mēģiniet vēlreiz.",chooseTopicLabel:"Izvēlieties tēmu, lai sāktu:",categoryTopicsHeading:"Lūdzu, uzdodiet savu jautājumu par **{category}** zemāk.",quickQuestionsHeadingLabel:"Vai uzdodiet ātru jautājumu:",typeYourMessage:"Ierakstiet savu ziņu...",agentIsLoading:"Aģents tiek ielādēts...",conversationResolved:"Saruna pabeigta",howWasYourExperience:"Kāda bija jūsu pieredze?",feedbackPrompt:"Lūdzu, novērtējiet mūsu atbalstu, lai palīdzētu mums uzlabot.",feedbackPlaceholder:"Pastāstiet mums vairāk par savu pieredzi...",submitFeedback:"Nosūtīt atsauksmes",submitting:"Sūta...",selectRatingFirst:"Vispirms izvēlieties vērtējumu",pleaseSubmitRatingFirst:"Lūdzu, vispirms nosūtiet savu vērtējumu.",completeOnboardingToEnableVoice:"Pabeidziet ievadu, lai iespējotu balsi",sendMessageToCompleteOnboarding:"Nosūtiet ziņu, lai pabeigtu ievadu un iespējotu balsi.",resolve:"Pabeigt",scrollLeft:"Ritināt pa kreisi",scrollRight:"Ritināt pa labi",sendMessage:"Nosūtīt ziņu",voiceSessionLive:"Balss sesija aktīva - runājiet vai rakstiet.",connectingVoice:"Pieslēdzas balss sesijai...",poweredBy:"Darbina",menu:"Izvēlne",close:"Aizvērt",openChat:"Atvērt tērzēšanu",closeChat:"Aizvērt tērzēšanu",lightMode:"Gaišais režīms",nightMode:"Tumšais režīms",refreshChat:"Atsvaidzināt tērzēšanu",copyChat:"Kopēt tērzēšanu",startChat:"Sākt tērzēšanu",startingVoiceSession:"Sāk balss sesiju...",allowMicAccess:"Atļaut piekļuvi mikrofonam",emailRequired:"Lūdzu, ievadiet savu e-pasta adresi",nameRequired:"Lūdzu, ievadiet savu vārdu",phoneRequired:"Lūdzu, ievadiet savu tālruņa numuru",fieldRequiredSuffix:"(obligāts lauks)",emailInvalid:"Lūdzu, ievadiet derīgu e-pasta adresi",nameInvalid:"Lūdzu, ievadiet derīgu vārdu",phoneInvalid:"Lūdzu, ievadiet derīgu tālruņa numuru"},lt:{connectionError:"Atsiprašome, šiuo metu kyla ryšio problemų. Bandykite dar kartą.",micDenied:"Nepavyko pasiekti jūsų mikrofono. Leiskite prieigą ir bandykite dar kartą.",micNotFound:"Mikrofonas nerastas. Prijunkite mikrofoną ir bandykite dar kartą.",voiceUnavailable:"Balso funkcija šiuo metu nepasiekiama. Bandykite dar kartą.",chooseTopicLabel:"Pasirinkite temą, kad pradėtumėte:",categoryTopicsHeading:"Prašome užduoti savo klausimą apie **{category}** žemiau.",quickQuestionsHeadingLabel:"Arba užduokite greitą klausimą:",typeYourMessage:"Įveskite pranešimą...",agentIsLoading:"Agentas kraunamas...",conversationResolved:"Pokalbis baigtas",howWasYourExperience:"Kokia buvo jūsų patirtis?",feedbackPrompt:"Įvertinkite mūsų pagalbą, kad padėtumėte mums tobulėti.",feedbackPlaceholder:"Papasakokite daugiau apie savo patirtį...",submitFeedback:"Pateikti atsiliepimą",submitting:"Siunčiama...",selectRatingFirst:"Pirmiausia pasirinkite įvertinimą",pleaseSubmitRatingFirst:"Pirmiausia pateikite įvertinimą.",completeOnboardingToEnableVoice:"Užbaikite įvadą, kad įjungtumėte balsą",sendMessageToCompleteOnboarding:"Išsiųskite pranešimą, kad užbaigtumėte įvadą ir įjungtumėte balsą.",resolve:"Baigti",scrollLeft:"Slinkti į kairę",scrollRight:"Slinkti į dešinę",sendMessage:"Siųsti pranešimą",voiceSessionLive:"Balso sesija aktyvi - kalbėkite arba rašykite.",connectingVoice:"Jungiamasi prie balso sesijos...",poweredBy:"Veikia",menu:"Meniu",close:"Uždaryti",openChat:"Atidaryti pokalbį",closeChat:"Uždaryti pokalbį",lightMode:"Šviesus režimas",nightMode:"Tamsus režimas",refreshChat:"Atnaujinti pokalbį",copyChat:"Kopijuoti pokalbį",startChat:"Pradėti pokalbį",startingVoiceSession:"Pradedama balso sesija...",allowMicAccess:"Leisti prieigą prie mikrofono",emailRequired:"Įveskite savo el. pašto adresą",nameRequired:"Įveskite savo vardą",phoneRequired:"Įveskite savo telefono numerį",fieldRequiredSuffix:"(privalomas laukas)",emailInvalid:"Įveskite galiojantį el. pašto adresą",nameInvalid:"Įveskite tinkamą vardą",phoneInvalid:"Įveskite galiojantį telefono numerį"},mk:{connectionError:"Извинете, моментално имам проблеми со поврзувањето. Обидете се повторно.",micDenied:"Не можевме да пристапиме до вашиот микрофон. Дозволете пристап и обидете се повторно.",micNotFound:"Не е најден микрофон. Поврзете микрофон и обидете се повторно.",voiceUnavailable:"Гласовната функција моментално не е достапна. Обидете се повторно.",chooseTopicLabel:"Изберете тема за да започнете:",categoryTopicsHeading:"Ве молиме поставете го вашето прашање за **{category}** подолу.",quickQuestionsHeadingLabel:"Или поставете брзо прашање:",typeYourMessage:"Напишете ја вашата порака...",agentIsLoading:"Агентот се вчитува...",conversationResolved:"Разговорот е завршен",howWasYourExperience:"Какво беше вашето искуство?",feedbackPrompt:"Оценете ја нашата поддршка за да ни помогнете да се подобриме.",feedbackPlaceholder:"Кажете ни повеќе за вашето искуство...",submitFeedback:"Испрати повратна информација",submitting:"Испраќање...",selectRatingFirst:"Прво изберете оценка",pleaseSubmitRatingFirst:"Прво испратете ја вашата оценка.",completeOnboardingToEnableVoice:"Завршете го воведот за да овозможите глас",sendMessageToCompleteOnboarding:"Испратете порака за да го завршите воведот и овозможите глас.",resolve:"Заврши",scrollLeft:"Скролај лево",scrollRight:"Скролај десно",sendMessage:"Испрати порака",voiceSessionLive:"Гласовната сесија е активна - зборувајте или пишувајте.",connectingVoice:"Поврзување со гласовна сесија...",poweredBy:"Поддржано од",menu:"Мени",close:"Затвори",openChat:"Отвори разговор",closeChat:"Затвори разговор",lightMode:"Светол режим",nightMode:"Темен режим",refreshChat:"Освежи разговор",copyChat:"Копирај разговор",startChat:"Започни разговор",startingVoiceSession:"Започнува гласовна сесија...",allowMicAccess:"Дозволи пристап до микрофонот",emailRequired:"Внесете ја вашата е-пошта",nameRequired:"Внесете го вашето име",phoneRequired:"Внесете го вашиот телефонски број",fieldRequiredSuffix:"(задолжително поле)",emailInvalid:"Внесете важечка е-пошта",nameInvalid:"Внесете важечко име",phoneInvalid:"Внесете важечки телефонски број"},ms:{connectionError:"Maaf, saya menghadapi masalah sambungan sekarang. Sila cuba lagi.",micDenied:"Kami tidak dapat mengakses mikrofon anda. Sila benarkan akses dan cuba lagi.",micNotFound:"Tiada mikrofon ditemui. Sila sambungkan mikrofon dan cuba lagi.",voiceUnavailable:"Ciri suara tidak tersedia sekarang. Sila cuba lagi.",chooseTopicLabel:"Pilih topik untuk memulakan:",categoryTopicsHeading:"Sila ajukan soalan **{category}** anda di bawah.",quickQuestionsHeadingLabel:"Atau ajukan soalan ringkas:",typeYourMessage:"Taip mesej anda...",agentIsLoading:"Ejen sedang dimuatkan...",conversationResolved:"Perbualan selesai",howWasYourExperience:"Bagaimanakah pengalaman anda?",feedbackPrompt:"Sila nilaikan sokongan kami untuk membantu kami menambah baik.",feedbackPlaceholder:"Beritahu kami lebih lanjut tentang pengalaman anda...",submitFeedback:"Hantar maklum balas",submitting:"Menghantar...",selectRatingFirst:"Pilih penilaian dahulu",pleaseSubmitRatingFirst:"Sila hantar penilaian anda dahulu.",completeOnboardingToEnableVoice:"Lengkapkan pengenalan untuk mendayakan suara",sendMessageToCompleteOnboarding:"Hantar mesej untuk melengkapkan pengenalan dan mendayakan suara.",resolve:"Selesai",scrollLeft:"Tatal ke kiri",scrollRight:"Tatal ke kanan",sendMessage:"Hantar mesej",voiceSessionLive:"Sesi suara aktif - bercakap atau taip untuk berbual.",connectingVoice:"Menyambung ke sesi suara...",poweredBy:"Dikuasakan oleh",menu:"Menu",close:"Tutup",openChat:"Buka sembang",closeChat:"Tutup sembang",lightMode:"Mod terang",nightMode:"Mod gelap",refreshChat:"Muat semula sembang",copyChat:"Salin sembang",startChat:"Mula sembang",startingVoiceSession:"Memulakan sesi suara...",allowMicAccess:"Benarkan akses mikrofon",emailRequired:"Masukkan alamat e-mel anda",nameRequired:"Masukkan nama anda",phoneRequired:"Masukkan nombor telefon anda",fieldRequiredSuffix:"wajib diisi",emailInvalid:"Masukkan alamat e-mel yang sah",nameInvalid:"Masukkan nama yang sah",phoneInvalid:"Masukkan nombor telefon yang sah"},no:{connectionError:"Beklager, jeg har problemer med tilkoblingen akkurat nå. Prøv igjen.",micDenied:"Vi fikk ikke tilgang til mikrofonen din. Gi tilgang og prøv igjen.",micNotFound:"Ingen mikrofon funnet. Koble til en mikrofon og prøv igjen.",voiceUnavailable:"Tale er ikke tilgjengelig akkurat nå. Prøv igjen.",chooseTopicLabel:"Velg et emne for å komme i gang:",categoryTopicsHeading:"Vennligst still spørsmålet ditt om **{category}** nedenfor.",quickQuestionsHeadingLabel:"Eller still et raskt spørsmål:",typeYourMessage:"Skriv meldingen din...",agentIsLoading:"Agenten laster...",conversationResolved:"Samtale avsluttet",howWasYourExperience:"Hvordan var opplevelsen din?",feedbackPrompt:"Vennligst vurder vår støtte for å hjelpe oss med å bli bedre.",feedbackPlaceholder:"Fortell oss mer om opplevelsen din...",submitFeedback:"Send tilbakemelding",submitting:"Sender...",selectRatingFirst:"Velg en vurdering først",pleaseSubmitRatingFirst:"Vennligst send inn vurderingen din først.",completeOnboardingToEnableVoice:"Fullfør introduksjonen for å aktivere tale",sendMessageToCompleteOnboarding:"Send en melding for å fullføre introduksjonen og aktivere tale.",resolve:"Avslutt",scrollLeft:"Bla til venstre",scrollRight:"Bla til høyre",sendMessage:"Send melding",voiceSessionLive:"Talesesjon aktiv - snakk eller skriv for å samtale.",connectingVoice:"Kobler til talesesjon...",poweredBy:"Drevet av",menu:"Meny",close:"Lukk",openChat:"Åpne chat",closeChat:"Lukk chat",lightMode:"Lys modus",nightMode:"Mørk modus",refreshChat:"Oppdater chat",copyChat:"Kopier chat",startChat:"Start chat",startingVoiceSession:"Starter talesesjon...",allowMicAccess:"Tillat mikrofontilgang",emailRequired:"Skriv inn e-postadressen din",nameRequired:"Skriv inn navnet ditt",phoneRequired:"Skriv inn telefonnummeret ditt",fieldRequiredSuffix:"er påkrevd",emailInvalid:"Skriv inn en gyldig e-postadresse",nameInvalid:"Skriv inn et gyldig navn",phoneInvalid:"Skriv inn et gyldig telefonnummer"},fa:{connectionError:"متأسفیم، در حال حاضر در اتصال مشکل دارم. لطفاً دوباره تلاش کنید.",micDenied:"نتوانستیم به میکروفون شما دسترسی پیدا کنیم. لطفاً دسترسی را اجازه دهید و دوباره تلاش کنید.",micNotFound:"میکروفونی یافت نشد. لطفاً یک میکروفون وصل کنید و دوباره تلاش کنید.",voiceUnavailable:"قابلیت صدا در حال حاضر در دسترس نیست. لطفاً دوباره تلاش کنید.",chooseTopicLabel:"برای شروع، یک موضوع را انتخاب کنید:",categoryTopicsHeading:"لطفاً سؤال خود درباره **{category}** را در زیر مطرح کنید.",quickQuestionsHeadingLabel:"یا یک سؤال سریع بپرسید:",typeYourMessage:"پیام خود را تایپ کنید...",agentIsLoading:"در حال بارگذاری نماینده...",conversationResolved:"مکالمه به پایان رسید",howWasYourExperience:"تجربه شما چگونه بود؟",feedbackPrompt:"لطفاً برای کمک به بهبود ما، پشتیبانی ما را ارزیابی کنید.",feedbackPlaceholder:"درباره تجربه خود بیشتر به ما بگویید...",submitFeedback:"ارسال بازخورد",submitting:"در حال ارسال...",selectRatingFirst:"ابتدا یک امتیاز انتخاب کنید",pleaseSubmitRatingFirst:"لطفاً ابتدا امتیاز خود را ارسال کنید.",completeOnboardingToEnableVoice:"برای فعالسازی صدا، راهاندازی را تکمیل کنید",sendMessageToCompleteOnboarding:"برای تکمیل راهاندازی و فعالسازی صدا، پیام ارسال کنید.",resolve:"پایان",scrollLeft:"پیمایش به چپ",scrollRight:"پیمایش به راست",sendMessage:"ارسال پیام",voiceSessionLive:"جلسه صوتی فعال - صحبت کنید یا تایپ کنید.",connectingVoice:"اتصال به جلسه صوتی...",poweredBy:"قدرت گرفته از",menu:"منو",close:"بستن",openChat:"باز کردن چت",closeChat:"بستن چت",lightMode:"حالت روشن",nightMode:"حالت تاریک",refreshChat:"تازهسازی چت",copyChat:"کپی چت",startChat:"شروع چت",startingVoiceSession:"شروع جلسه صوتی...",allowMicAccess:"اجازه دسترسی به میکروفون",emailRequired:"لطفاً ایمیل خود را وارد کنید",nameRequired:"لطفاً نام خود را وارد کنید",phoneRequired:"لطفاً شماره تلفن خود را وارد کنید",fieldRequiredSuffix:"الزامی است",emailInvalid:"لطفاً یک ایمیل معتبر وارد کنید",nameInvalid:"لطفاً یک نام معتبر وارد کنید",phoneInvalid:"لطفاً یک شماره تلفن معتبر وارد کنید"},pl:{connectionError:"Przepraszamy, mam teraz problem z połączeniem. Spróbuj ponownie.",micDenied:"Nie udało się uzyskać dostępu do mikrofonu. Zezwól na dostęp i spróbuj ponownie.",micNotFound:"Nie znaleziono mikrofonu. Podłącz mikrofon i spróbuj ponownie.",voiceUnavailable:"Funkcja głosowa jest obecnie niedostępna. Spróbuj ponownie.",chooseTopicLabel:"Wybierz temat, aby rozpocząć:",categoryTopicsHeading:"Proszę zadać pytanie dotyczące **{category}** poniżej.",quickQuestionsHeadingLabel:"Lub zadaj szybkie pytanie:",typeYourMessage:"Wpisz wiadomość...",agentIsLoading:"Agent się ładuje...",conversationResolved:"Rozmowa zakończona",howWasYourExperience:"Jakie było Twoje doświadczenie?",feedbackPrompt:"Oceń proszę naszą obsługę, aby pomóc nam się rozwijać.",feedbackPlaceholder:"Opowiedz nam więcej o swoim doświadczeniu...",submitFeedback:"Wyślij opinię",submitting:"Wysyłanie...",selectRatingFirst:"Najpierw wybierz ocenę",pleaseSubmitRatingFirst:"Najpierw prześlij swoją ocenę.",completeOnboardingToEnableVoice:"Zakończ wprowadzenie, aby włączyć głos",sendMessageToCompleteOnboarding:"Wyślij wiadomość, aby zakończyć wprowadzenie i włączyć głos.",resolve:"Zakończ",scrollLeft:"Przewiń w lewo",scrollRight:"Przewiń w prawo",sendMessage:"Wyślij wiadomość",voiceSessionLive:"Sesja głosowa aktywna - mów lub pisz.",connectingVoice:"Łączenie z sesją głosową...",poweredBy:"Napędzane przez",menu:"Menu",close:"Zamknij",openChat:"Otwórz czat",closeChat:"Zamknij czat",lightMode:"Tryb jasny",nightMode:"Tryb ciemny",refreshChat:"Odśwież czat",copyChat:"Kopiuj czat",startChat:"Rozpocznij czat",startingVoiceSession:"Uruchamianie sesji głosowej...",allowMicAccess:"Zezwól na dostęp do mikrofonu",emailRequired:"Wpisz swój adres e-mail",nameRequired:"Wpisz swoje imię",phoneRequired:"Wpisz swój numer telefonu",fieldRequiredSuffix:"(pole wymagane)",emailInvalid:"Wpisz prawidłowy adres e-mail",nameInvalid:"Wpisz prawidłowe imię",phoneInvalid:"Wpisz prawidłowy numer telefonu"},pt:{connectionError:"Desculpe, estou com problemas de conexão neste momento. Tente novamente.",micDenied:"Não foi possível acessar o seu microfone. Permita o acesso e tente novamente.",micNotFound:"Nenhum microfone encontrado. Conecte um e tente novamente.",voiceUnavailable:"A voz não está disponível neste momento. Tente novamente.",chooseTopicLabel:"Escolha um tópico para começar:",categoryTopicsHeading:"Por favor, faça sua pergunta sobre **{category}** abaixo.",quickQuestionsHeadingLabel:"Ou faça uma pergunta rápida:",typeYourMessage:"Digite sua mensagem...",agentIsLoading:"O agente está carregando...",conversationResolved:"Conversa encerrada",howWasYourExperience:"Como foi sua experiência?",feedbackPrompt:"Avalie nosso suporte para nos ajudar a melhorar.",feedbackPlaceholder:"Conte-nos mais sobre sua experiência...",submitFeedback:"Enviar feedback",submitting:"Enviando...",selectRatingFirst:"Selecione uma avaliação primeiro",pleaseSubmitRatingFirst:"Envie sua avaliação primeiro.",completeOnboardingToEnableVoice:"Complete a integração para ativar a voz",sendMessageToCompleteOnboarding:"Envie uma mensagem para completar a integração e ativar a voz.",resolve:"Encerrar",scrollLeft:"Rolar para a esquerda",scrollRight:"Rolar para a direita",sendMessage:"Enviar mensagem",voiceSessionLive:"Sessão de voz ativa - fale ou digite para conversar.",connectingVoice:"Conectando à sessão de voz...",poweredBy:"Desenvolvido por",menu:"Menu",close:"Fechar",openChat:"Abrir chat",closeChat:"Fechar chat",lightMode:"Modo claro",nightMode:"Modo escuro",refreshChat:"Atualizar chat",copyChat:"Copiar chat",startChat:"Iniciar chat",startingVoiceSession:"Iniciando sessão de voz...",allowMicAccess:"Permitir acesso ao microfone",emailRequired:"Insira o seu endereço de e-mail",nameRequired:"Insira o seu nome",phoneRequired:"Insira o seu número de telefone",fieldRequiredSuffix:"é um campo obrigatório",emailInvalid:"Insira um endereço de e-mail válido",nameInvalid:"Insira um nome válido",phoneInvalid:"Insira um número de telefone válido"},ro:{connectionError:"Ne pare rău, întâmpin probleme de conexiune în acest moment. Încercați din nou.",micDenied:"Nu am putut accesa microfonul. Permiteți accesul și încercați din nou.",micNotFound:"Nu a fost găsit niciun microfon. Conectați unul și încercați din nou.",voiceUnavailable:"Funcția vocală nu este disponibilă momentan. Încercați din nou.",chooseTopicLabel:"Alegeți un subiect pentru a începe:",categoryTopicsHeading:"Vă rugăm să adresați întrebarea dvs. despre **{category}** mai jos.",quickQuestionsHeadingLabel:"Sau puneți o întrebare rapidă:",typeYourMessage:"Scrieți mesajul dvs...",agentIsLoading:"Agentul se încarcă...",conversationResolved:"Conversație încheiată",howWasYourExperience:"Cum a fost experiența dvs.?",feedbackPrompt:"Vă rugăm să evaluați asistența noastră pentru a ne ajuta să ne îmbunătățim.",feedbackPlaceholder:"Spuneți-ne mai multe despre experiența dvs...",submitFeedback:"Trimite feedback",submitting:"Se trimite...",selectRatingFirst:"Selectați mai întâi o evaluare",pleaseSubmitRatingFirst:"Vă rugăm să trimiteți mai întâi evaluarea.",completeOnboardingToEnableVoice:"Finalizați procesul pentru a activa vocea",sendMessageToCompleteOnboarding:"Trimiteți un mesaj pentru a finaliza procesul și a activa vocea.",resolve:"Închide",scrollLeft:"Derulați la stânga",scrollRight:"Derulați la dreapta",sendMessage:"Trimite mesaj",voiceSessionLive:"Sesiune vocală activă - vorbiți sau tastați.",connectingVoice:"Se conectează la sesiunea vocală...",poweredBy:"Oferit de",menu:"Meniu",close:"Închide",openChat:"Deschide chat",closeChat:"Închide chat",lightMode:"Mod luminos",nightMode:"Mod întunecat",refreshChat:"Reîmprospătează chat",copyChat:"Copiază chat",startChat:"Începe chat",startingVoiceSession:"Începe sesiunea vocală...",allowMicAccess:"Permiteți accesul la microfon",emailRequired:"Introduceți adresa dvs. de e-mail",nameRequired:"Introduceți numele dvs.",phoneRequired:"Introduceți numărul dvs. de telefon",fieldRequiredSuffix:"este un câmp obligatoriu",emailInvalid:"Introduceți o adresă de e-mail validă",nameInvalid:"Introduceți un nume valid",phoneInvalid:"Introduceți un număr de telefon valid"},ru:{connectionError:"Извините, сейчас возникли проблемы с подключением. Попробуйте снова.",micDenied:"Не удалось получить доступ к микрофону. Разрешите доступ и попробуйте снова.",micNotFound:"Микрофон не найден. Подключите микрофон и попробуйте снова.",voiceUnavailable:"Голосовая функция сейчас недоступна. Попробуйте снова.",chooseTopicLabel:"Выберите тему, чтобы начать:",categoryTopicsHeading:"Пожалуйста, задайте свой вопрос о **{category}** ниже.",quickQuestionsHeadingLabel:"Или задайте быстрый вопрос:",typeYourMessage:"Введите ваше сообщение...",agentIsLoading:"Агент загружается...",conversationResolved:"Разговор завершен",howWasYourExperience:"Как прошел ваш опыт?",feedbackPrompt:"Пожалуйста, оцените нашу поддержку, чтобы помочь нам улучшиться.",feedbackPlaceholder:"Расскажите нам больше о вашем опыте...",submitFeedback:"Отправить отзыв",submitting:"Отправка...",selectRatingFirst:"Сначала выберите оценку",pleaseSubmitRatingFirst:"Пожалуйста, сначала отправьте свою оценку.",completeOnboardingToEnableVoice:"Завершите знакомство, чтобы включить голос",sendMessageToCompleteOnboarding:"Отправьте сообщение, чтобы завершить знакомство и включить голос.",resolve:"Завершить",scrollLeft:"Прокрутить влево",scrollRight:"Прокрутить вправо",sendMessage:"Отправить сообщение",voiceSessionLive:"Голосовая сессия активна - говорите или пишите.",connectingVoice:"Подключение к голосовой сессии...",poweredBy:"Работает на",menu:"Меню",close:"Закрыть",openChat:"Открыть чат",closeChat:"Закрыть чат",lightMode:"Светлый режим",nightMode:"Темный режим",refreshChat:"Обновить чат",copyChat:"Копировать чат",startChat:"Начать чат",startingVoiceSession:"Запуск голосовой сессии...",allowMicAccess:"Разрешить доступ к микрофону",emailRequired:"Введите адрес электронной почты",nameRequired:"Введите ваше имя",phoneRequired:"Введите номер телефона",fieldRequiredSuffix:"(обязательное поле)",emailInvalid:"Введите действительный адрес электронной почты",nameInvalid:"Введите корректное имя",phoneInvalid:"Введите корректный номер телефона"},sr:{agentJoinedConversation:"{name} se pridružio/la razgovoru",handedOffToTeam:"Vaš razgovor je prosleđen našem timu",handedOffStatus:"Naš tim će odgovoriti ovde",connectionError:"Izvinite, trenutno imam problema sa povezivanjem. Probajte ponovo.",micDenied:"Nismo mogli da pristupimo vašem mikrofonu. Dozvolite pristup i probajte ponovo.",micNotFound:"Mikrofon nije pronađen. Priključite mikrofon i probajte ponovo.",voiceUnavailable:"Glasovna funkcija trenutno nije dostupna. Probajte ponovo.",chooseTopicLabel:"Izaberite temu da biste započeli:",categoryTopicsHeading:"Molimo postavite svoje pitanje o **{category}** ispod.",quickQuestionsHeadingLabel:"Ili postavite brzo pitanje:",typeYourMessage:"Ukucajte vašu poruku...",agentIsLoading:"Agent se učitava...",conversationResolved:"Razgovor je završen",howWasYourExperience:"Kakvo je bilo vaše iskustvo?",feedbackPrompt:"Molimo ocenite našu podršku da bismo se poboljšali.",feedbackPlaceholder:"Recite nam više o svom iskustvu...",submitFeedback:"Pošalji povratne informacije",submitting:"Slanje...",selectRatingFirst:"Prvo odaberite ocenu",pleaseSubmitRatingFirst:"Molimo prvo pošaljite ocenu.",completeOnboardingToEnableVoice:"Završite uvod da omogućite glas",sendMessageToCompleteOnboarding:"Pošaljite poruku da završite uvod i omogućite glas.",resolve:"Završi",scrollLeft:"Skrolovati levo",scrollRight:"Skrolovati desno",sendMessage:"Pošalji poruku",voiceSessionLive:"Glasovna sesija aktivna - govorite ili kucajte.",connectingVoice:"Povezivanje sa glasovnom sesijom...",poweredBy:"Pokreće",menu:"Meni",close:"Zatvori",openChat:"Otvori ćaskanje",closeChat:"Zatvori ćaskanje",lightMode:"Svetli režim",nightMode:"Tamni režim",refreshChat:"Osveži ćaskanje",copyChat:"Kopiraj ćaskanje",startChat:"Započni ćaskanje",startingVoiceSession:"Pokretanje glasovne sesije...",allowMicAccess:"Dozvoli pristup mikrofonu",emailRequired:"Unesite svoju adresu e-pošte",nameRequired:"Unesite svoje ime",phoneRequired:"Unesite svoj broj telefona",fieldRequiredSuffix:"(obavezno polje)",emailInvalid:"Unesite ispravnu adresu e-pošte",nameInvalid:"Unesite ispravno ime",phoneInvalid:"Unesite ispravan broj telefona"},sk:{connectionError:"Ľutujeme, momentálne mám problém s pripojením. Skúste to znova.",micDenied:"Nepodarilo sa získať prístup k mikrofónu. Povoľte prístup a skúste to znova.",micNotFound:"Mikrofón sa nenašiel. Pripojte ho a skúste to znova.",voiceUnavailable:"Hlasová funkcia momentálne nie je dostupná. Skúste to znova.",chooseTopicLabel:"Vyberte tému, aby ste začali:",categoryTopicsHeading:"Prosím, položte svoju otázku o **{category}** nižšie.",quickQuestionsHeadingLabel:"Alebo položte rýchlu otázku:",typeYourMessage:"Napíšte svoju správu...",agentIsLoading:"Agent sa načítava...",conversationResolved:"Konverzácia ukončená",howWasYourExperience:"Aká bola vaša skúsenosť?",feedbackPrompt:"Ohodnoťte prosím našu podporu, aby sme sa mohli zlepšiť.",feedbackPlaceholder:"Povedzte nám viac o svojej skúsenosti...",submitFeedback:"Odoslať spätnú väzbu",submitting:"Odosielanie...",selectRatingFirst:"Najprv vyberte hodnotenie",pleaseSubmitRatingFirst:"Najprv odošlite svoje hodnotenie.",completeOnboardingToEnableVoice:"Dokončite úvod pre zapnutie hlasu",sendMessageToCompleteOnboarding:"Pošlite správu na dokončenie úvodu a zapnutie hlasu.",resolve:"Ukončiť",scrollLeft:"Posunúť doľava",scrollRight:"Posunúť doprava",sendMessage:"Odoslať správu",voiceSessionLive:"Hlasová relácia aktívna - hovorte alebo píšte.",connectingVoice:"Pripájanie k hlasovej relácii...",poweredBy:"Prevádzkuje",menu:"Ponuka",close:"Zavrieť",openChat:"Otvoriť chat",closeChat:"Zavrieť chat",lightMode:"Svetlý režim",nightMode:"Tmavý režim",refreshChat:"Obnoviť chat",copyChat:"Kopírovať chat",startChat:"Začať chat",startingVoiceSession:"Spúšťanie hlasovej relácie...",allowMicAccess:"Povoliť prístup k mikrofónu",emailRequired:"Zadajte svoju e-mailovú adresu",nameRequired:"Zadajte svoje meno",phoneRequired:"Zadajte svoje telefónne číslo",fieldRequiredSuffix:"(povinné pole)",emailInvalid:"Zadajte platnú e-mailovú adresu",nameInvalid:"Zadajte platné meno",phoneInvalid:"Zadajte platné telefónne číslo"},sl:{connectionError:"Oprostite, trenutno imam težave s povezavo. Poskusite znova.",micDenied:"Do mikrofona ni bilo mogoče dostopati. Dovolite dostop in poskusite znova.",micNotFound:"Mikrofona ni bilo mogoče najti. Priključite ga in poskusite znova.",voiceUnavailable:"Glasovna funkcija trenutno ni na voljo. Poskusite znova.",chooseTopicLabel:"Izberite temo za začetek:",categoryTopicsHeading:"Prosimo, postavite vprašanje o **{category}** spodaj.",quickQuestionsHeadingLabel:"Ali postavite hitro vprašanje:",typeYourMessage:"Vnesite svoje sporočilo...",agentIsLoading:"Agent se nalaga...",conversationResolved:"Pogovor je končan",howWasYourExperience:"Kakšna je bila vaša izkušnja?",feedbackPrompt:"Prosimo, ocenite našo podporo, da nam pomagate izboljšati.",feedbackPlaceholder:"Povejte nam več o svoji izkušnji...",submitFeedback:"Pošlji povratne informacije",submitting:"Pošiljanje...",selectRatingFirst:"Najprej izberite oceno",pleaseSubmitRatingFirst:"Prosimo, najprej pošljite svojo oceno.",completeOnboardingToEnableVoice:"Zaključite uvodne korake za omogočanje glasu",sendMessageToCompleteOnboarding:"Pošljite sporočilo, da zaključite uvod in omogočite glas.",resolve:"Končaj",scrollLeft:"Premakni levo",scrollRight:"Premakni desno",sendMessage:"Pošlji sporočilo",voiceSessionLive:"Glasovna seja aktivna - govorite ali tipkajte.",connectingVoice:"Povezovanje z glasovno sejo...",poweredBy:"Poganja",menu:"Meni",close:"Zapri",openChat:"Odpri klepet",closeChat:"Zapri klepet",lightMode:"Svetli način",nightMode:"Temni način",refreshChat:"Osveži klepet",copyChat:"Kopiraj klepet",startChat:"Začni klepet",startingVoiceSession:"Začetek glasovne seje...",allowMicAccess:"Dovoli dostop do mikrofona",emailRequired:"Vnesite svoj e-poštni naslov",nameRequired:"Vnesite svoje ime",phoneRequired:"Vnesite svojo telefonsko številko",fieldRequiredSuffix:"(obvezno polje)",emailInvalid:"Vnesite veljaven e-poštni naslov",nameInvalid:"Vnesite veljavno ime",phoneInvalid:"Vnesite veljavno telefonsko številko"},sv:{connectionError:"Ursäkta, jag har anslutningsproblem just nu. Försök igen.",micDenied:"Vi kunde inte komma åt din mikrofon. Tillåt åtkomst och försök igen.",micNotFound:"Ingen mikrofon hittades. Anslut en mikrofon och försök igen.",voiceUnavailable:"Röst är inte tillgängligt just nu. Försök igen.",chooseTopicLabel:"Välj ett ämne för att komma igång:",categoryTopicsHeading:"Ställ gärna din **{category}**-fråga nedan.",quickQuestionsHeadingLabel:"Eller ställ en snabb fråga:",typeYourMessage:"Skriv ditt meddelande...",agentIsLoading:"Agenten laddas...",conversationResolved:"Konversation avslutad",howWasYourExperience:"Hur var din upplevelse?",feedbackPrompt:"Betygsätt vår support för att hjälpa oss att bli bättre.",feedbackPlaceholder:"Berätta mer om din upplevelse...",submitFeedback:"Skicka feedback",submitting:"Skickar...",selectRatingFirst:"Välj först ett betyg",pleaseSubmitRatingFirst:"Vänligen skicka in ditt betyg först.",completeOnboardingToEnableVoice:"Slutför introduktionen för att aktivera röst",sendMessageToCompleteOnboarding:"Skicka ett meddelande för att slutföra introduktionen och aktivera röst.",resolve:"Avsluta",scrollLeft:"Bläddra åt vänster",scrollRight:"Bläddra åt höger",sendMessage:"Skicka meddelande",voiceSessionLive:"Röstsession aktiv - tala eller skriv för att samtala.",connectingVoice:"Ansluter till röstsession...",poweredBy:"Drivs av",menu:"Meny",close:"Stäng",openChat:"Öppna chatt",closeChat:"Stäng chatt",lightMode:"Ljust läge",nightMode:"Mörkt läge",refreshChat:"Uppdatera chatt",copyChat:"Kopiera chatt",startChat:"Starta chatt",startingVoiceSession:"Startar röstsession...",allowMicAccess:"Tillåt mikrofonåtkomst",emailRequired:"Ange din e-postadress",nameRequired:"Ange ditt namn",phoneRequired:"Ange ditt telefonnummer",fieldRequiredSuffix:"krävs",emailInvalid:"Ange en giltig e-postadress",nameInvalid:"Ange ett giltigt namn",phoneInvalid:"Ange ett giltigt telefonnummer"},th:{connectionError:"ขออภัย ขณะนี้เกิดปัญหาในการเชื่อมต่อ โปรดลองอีกครั้ง",micDenied:"เราไม่สามารถเข้าถึงไมโครโฟนของคุณได้ โปรดอนุญาตการเข้าถึงแล้วลองอีกครั้ง",micNotFound:"ไม่พบไมโครโฟน โปรดเชื่อมต่อไมโครโฟนแล้วลองอีกครั้ง",voiceUnavailable:"ฟีเจอร์เสียงไม่พร้อมใช้งานในขณะนี้ โปรดลองอีกครั้ง",chooseTopicLabel:"เลือกหัวข้อเพื่อเริ่มต้น:",categoryTopicsHeading:"โปรดถามคำถามเกี่ยวกับ **{category}** ด้านล่าง",quickQuestionsHeadingLabel:"หรือถามคำถามด่วน:",typeYourMessage:"พิมพ์ข้อความของคุณ...",agentIsLoading:"กำลังโหลดตัวแทน...",conversationResolved:"การสนทนาสิ้นสุดลง",howWasYourExperience:"ประสบการณ์ของคุณเป็นอย่างไร?",feedbackPrompt:"โปรดให้คะแนนการสนับสนุนของเราเพื่อช่วยให้เราปรับปรุง",feedbackPlaceholder:"บอกเราเพิ่มเติมเกี่ยวกับประสบการณ์ของคุณ...",submitFeedback:"ส่งความคิดเห็น",submitting:"กำลังส่ง...",selectRatingFirst:"โปรดเลือกคะแนนก่อน",pleaseSubmitRatingFirst:"โปรดส่งคะแนนของคุณก่อน",completeOnboardingToEnableVoice:"ทำการเริ่มต้นให้เสร็จเพื่อเปิดใช้งานเสียง",sendMessageToCompleteOnboarding:"ส่งข้อความเพื่อทำการเริ่มต้นให้เสร็จและเปิดใช้งานเสียง",resolve:"สิ้นสุด",scrollLeft:"เลื่อนไปทางซ้าย",scrollRight:"เลื่อนไปทางขวา",sendMessage:"ส่งข้อความ",voiceSessionLive:"เซสชันเสียงใช้งานอยู่ - พูดหรือพิมพ์เพื่อสนทนา",connectingVoice:"กำลังเชื่อมต่อกับเซสชันเสียง...",poweredBy:"ขับเคลื่อนโดย",menu:"เมนู",close:"ปิด",openChat:"เปิดแชท",closeChat:"ปิดแชท",lightMode:"โหมดสว่าง",nightMode:"โหมดมืด",refreshChat:"รีเฟรชแชท",copyChat:"คัดลอกแชท",startChat:"เริ่มแชท",startingVoiceSession:"กำลังเริ่มเซสชันเสียง...",allowMicAccess:"อนุญาตการเข้าถึงไมโครโฟน",emailRequired:"กรุณากรอกอีเมลของคุณ",nameRequired:"กรุณากรอกชื่อของคุณ",phoneRequired:"กรุณากรอกหมายเลขโทรศัพท์ของคุณ",fieldRequiredSuffix:"จำเป็นต้องกรอก",emailInvalid:"กรุณากรอกอีเมลที่ถูกต้อง",nameInvalid:"กรุณากรอกชื่อที่ถูกต้อง",phoneInvalid:"กรุณากรอกหมายเลขโทรศัพท์ที่ถูกต้อง"},tr:{connectionError:"Üzgünüz, şu anda bağlantı sorunu yaşıyorum. Lütfen tekrar deneyin.",micDenied:"Mikrofonunuza erişemedik. Lütfen erişime izin verin ve tekrar deneyin.",micNotFound:"Mikrofon bulunamadı. Lütfen bir mikrofon bağlayın ve tekrar deneyin.",voiceUnavailable:"Sesli özellik şu anda kullanılamıyor. Lütfen tekrar deneyin.",chooseTopicLabel:"Başlamak için bir konu seçin:",categoryTopicsHeading:"Lütfen **{category}** sorunuzu aşağıya yazın.",quickQuestionsHeadingLabel:"Veya hızlı bir soru sorun:",typeYourMessage:"Mesajınızı yazın...",agentIsLoading:"Temsilci yükleniyor...",conversationResolved:"Görüşme sonlandırıldı",howWasYourExperience:"Deneyiminiz nasıldı?",feedbackPrompt:"Gelişmemize yardımcı olmak için lütfen desteğimizi değerlendirin.",feedbackPlaceholder:"Deneyiminiz hakkında bize daha fazla bilgi verin...",submitFeedback:"Geri bildirim gönder",submitting:"Gönderiliyor...",selectRatingFirst:"Önce bir değerlendirme seçin",pleaseSubmitRatingFirst:"Lütfen önce değerlendirmenizi gönderin.",completeOnboardingToEnableVoice:"Sesi etkinleştirmek için tanıtımı tamamlayın",sendMessageToCompleteOnboarding:"Tanıtımı tamamlamak ve sesi etkinleştirmek için bir mesaj gönderin.",resolve:"Bitir",scrollLeft:"Sola kaydır",scrollRight:"Sağa kaydır",sendMessage:"Mesaj gönder",voiceSessionLive:"Sesli oturum aktif - konuşun veya yazın.",connectingVoice:"Sesli oturuma bağlanılıyor...",poweredBy:"Tarafından sağlandı",menu:"Menü",close:"Kapat",openChat:"Sohbeti aç",closeChat:"Sohbeti kapat",lightMode:"Açık mod",nightMode:"Karanlık mod",refreshChat:"Sohbeti yenile",copyChat:"Sohbeti kopyala",startChat:"Sohbete başla",startingVoiceSession:"Sesli oturum başlatılıyor...",allowMicAccess:"Mikrofon erişimine izin ver",emailRequired:"Lütfen e-posta adresinizi girin",nameRequired:"Lütfen adınızı girin",phoneRequired:"Lütfen telefon numaranızı girin",fieldRequiredSuffix:"alanı zorunludur",emailInvalid:"Lütfen geçerli bir e-posta adresi girin",nameInvalid:"Lütfen geçerli bir ad girin",phoneInvalid:"Lütfen geçerli bir telefon numarası girin"},uk:{connectionError:"Вибачте, зараз виникли проблеми з підключенням. Спробуйте ще раз.",micDenied:"Не вдалося отримати доступ до мікрофона. Дозвольте доступ і спробуйте ще раз.",micNotFound:"Мікрофон не знайдено. Підключіть мікрофон і спробуйте ще раз.",voiceUnavailable:"Голосова функція зараз недоступна. Спробуйте ще раз.",chooseTopicLabel:"Виберіть тему, щоб почати:",categoryTopicsHeading:"Будь ласка, поставте своє запитання щодо **{category}** нижче.",quickQuestionsHeadingLabel:"Або поставте швидке запитання:",typeYourMessage:"Введіть ваше повідомлення...",agentIsLoading:"Агент завантажується...",conversationResolved:"Розмову завершено",howWasYourExperience:"Яким був ваш досвід?",feedbackPrompt:"Будь ласка, оцініть нашу підтримку, щоб допомогти нам вдосконалюватися.",feedbackPlaceholder:"Розкажіть нам більше про свій досвід...",submitFeedback:"Надіслати відгук",submitting:"Надсилання...",selectRatingFirst:"Спочатку оберіть оцінку",pleaseSubmitRatingFirst:"Будь ласка, спочатку надішліть оцінку.",completeOnboardingToEnableVoice:"Завершіть вступ, щоб увімкнути голос",sendMessageToCompleteOnboarding:"Надішліть повідомлення, щоб завершити вступ та увімкнути голос.",resolve:"Завершити",scrollLeft:"Прокрутити ліворуч",scrollRight:"Прокрутити праворуч",sendMessage:"Надіслати повідомлення",voiceSessionLive:"Голосовий сеанс активний - говоріть або пишіть.",connectingVoice:"Підключення до голосового сеансу...",poweredBy:"Працює на",menu:"Меню",close:"Закрити",openChat:"Відкрити чат",closeChat:"Закрити чат",lightMode:"Світлий режим",nightMode:"Темний режим",refreshChat:"Оновити чат",copyChat:"Копіювати чат",startChat:"Почати чат",startingVoiceSession:"Запуск голосового сеансу...",allowMicAccess:"Дозволити доступ до мікрофона",emailRequired:"Введіть вашу адресу електронної пошти",nameRequired:"Введіть ваше ім’я",phoneRequired:"Введіть ваш номер телефону",fieldRequiredSuffix:"(обов’язкове поле)",emailInvalid:"Введіть дійсну адресу електронної пошти",nameInvalid:"Введіть коректне ім’я",phoneInvalid:"Введіть коректний номер телефону"},ur:{connectionError:"معذرت، اس وقت رابطہ قائم کرنے میں دشواری ہو رہی ہے۔ براہ کرم دوبارہ کوشش کریں۔",micDenied:"ہم آپ کے مائیکروفون تک رسائی حاصل نہیں کر سکے۔ براہ کرم رسائی کی اجازت دیں اور دوبارہ کوشش کریں۔",micNotFound:"کوئی مائیکروفون نہیں ملا۔ براہ کرم ایک منسلک کریں اور دوبارہ کوشش کریں۔",voiceUnavailable:"صوتی سہولت اس وقت دستیاب نہیں ہے۔ براہ کرم دوبارہ کوشش کریں۔",chooseTopicLabel:"شروع کرنے کے لیے ایک موضوع منتخب کریں:",categoryTopicsHeading:"براہ کرم اپنا **{category}** سوال نیچے پوچھیں۔",quickQuestionsHeadingLabel:"یا کوئی فوری سوال پوچھیں:",typeYourMessage:"اپنا پیغام ٹائپ کریں...",agentIsLoading:"ایجنٹ لوڈ ہو رہا ہے...",conversationResolved:"گفتگو مکمل",howWasYourExperience:"آپ کا تجربہ کیسا تھا؟",feedbackPrompt:"براہ کرم ہماری بہتری میں مدد کے لیے ہماری معاونت کی درجہ بندی کریں۔",feedbackPlaceholder:"ہمیں اپنے تجربے کے بارے میں مزید بتائیں...",submitFeedback:"رائے جمع کروائیں",submitting:"جمع ہو رہا ہے...",selectRatingFirst:"پہلے درجہ بندی منتخب کریں",pleaseSubmitRatingFirst:"براہ کرم پہلے اپنی درجہ بندی جمع کروائیں۔",completeOnboardingToEnableVoice:"آواز کو فعال کرنے کے لیے ابتدائی مراحل مکمل کریں",sendMessageToCompleteOnboarding:"ابتدائی مراحل مکمل کرنے اور آواز فعال کرنے کے لیے پیغام بھیجیں۔",resolve:"مکمل کریں",scrollLeft:"بائیں اسکرول کریں",scrollRight:"دائیں اسکرول کریں",sendMessage:"پیغام بھیجیں",voiceSessionLive:"صوتی سیشن فعال - بات کریں یا ٹائپ کریں۔",connectingVoice:"صوتی سیشن سے جڑ رہا ہے...",poweredBy:"پاور بذریعہ",menu:"مینو",close:"بند کریں",openChat:"چیٹ کھولیں",closeChat:"چیٹ بند کریں",lightMode:"ہلکا موڈ",nightMode:"تاریک موڈ",refreshChat:"چیٹ ریفریش کریں",copyChat:"چیٹ کاپی کریں",startChat:"چیٹ شروع کریں",startingVoiceSession:"صوتی سیشن شروع ہو رہا ہے...",allowMicAccess:"مائیکروفون تک رسائی کی اجازت دیں",emailRequired:"براہ کرم اپنا ای میل پتہ درج کریں",nameRequired:"براہ کرم اپنا نام درج کریں",phoneRequired:"براہ کرم اپنا فون نمبر درج کریں",fieldRequiredSuffix:"درکار ہے",emailInvalid:"براہ کرم ایک درست ای میل پتہ درج کریں",nameInvalid:"براہ کرم ایک درست نام درج کریں",phoneInvalid:"براہ کرم ایک درست فون نمبر درج کریں"},vi:{connectionError:"Xin lỗi, hiện tôi đang gặp sự cố kết nối. Vui lòng thử lại.",micDenied:"Chúng tôi không thể truy cập micrô của bạn. Vui lòng cho phép truy cập và thử lại.",micNotFound:"Không tìm thấy micrô. Vui lòng kết nối micrô và thử lại.",voiceUnavailable:"Tính năng giọng nói hiện không khả dụng. Vui lòng thử lại.",chooseTopicLabel:"Chọn một chủ đề để bắt đầu:",categoryTopicsHeading:"Vui lòng đặt câu hỏi của bạn về **{category}** bên dưới.",quickQuestionsHeadingLabel:"Hoặc đặt một câu hỏi nhanh:",typeYourMessage:"Nhập tin nhắn của bạn...",agentIsLoading:"Đang tải trợ lý...",conversationResolved:"Cuộc trò chuyện đã kết thúc",howWasYourExperience:"Trải nghiệm của bạn như thế nào?",feedbackPrompt:"Vui lòng đánh giá hỗ trợ của chúng tôi để giúp chúng tôi cải thiện.",feedbackPlaceholder:"Hãy cho chúng tôi biết thêm về trải nghiệm của bạn...",submitFeedback:"Gửi phản hồi",submitting:"Đang gửi...",selectRatingFirst:"Vui lòng chọn đánh giá trước",pleaseSubmitRatingFirst:"Vui lòng gửi đánh giá của bạn trước.",completeOnboardingToEnableVoice:"Hoàn thành hướng dẫn để bật giọng nói",sendMessageToCompleteOnboarding:"Gửi tin nhắn để hoàn thành hướng dẫn và bật giọng nói.",resolve:"Kết thúc",scrollLeft:"Cuộn sang trái",scrollRight:"Cuộn sang phải",sendMessage:"Gửi tin nhắn",voiceSessionLive:"Phiên giọng nói đang hoạt động - hãy nói hoặc gõ.",connectingVoice:"Đang kết nối phiên giọng nói...",poweredBy:"Được cung cấp bởi",menu:"Menu",close:"Đóng",openChat:"Mở trò chuyện",closeChat:"Đóng trò chuyện",lightMode:"Chế độ sáng",nightMode:"Chế độ tối",refreshChat:"Làm mới trò chuyện",copyChat:"Sao chép trò chuyện",startChat:"Bắt đầu trò chuyện",startingVoiceSession:"Đang bắt đầu phiên giọng nói...",allowMicAccess:"Cho phép truy cập micrô",emailRequired:"Vui lòng nhập địa chỉ email của bạn",nameRequired:"Vui lòng nhập tên của bạn",phoneRequired:"Vui lòng nhập số điện thoại của bạn",fieldRequiredSuffix:"là bắt buộc",emailInvalid:"Vui lòng nhập địa chỉ email hợp lệ",nameInvalid:"Vui lòng nhập tên hợp lệ",phoneInvalid:"Vui lòng nhập số điện thoại hợp lệ"}},z={en:{removeAttachment:"Remove attachment",categoryFilter:"Category filter",filterByCategory:"Filter by category",scrollCategoriesLeft:"Scroll categories left",scrollCategoriesRight:"Scroll categories right",scrollTagsLeft:"Scroll tags left",scrollTagsRight:"Scroll tags right",copyMessage:"Copy message",copied:"Copied",like:"Like",dislike:"Dislike",sourcesCited:"{count} sources cited",moreSources:"+{count} more"},ar:{removeAttachment:"إزالة المرفق",categoryFilter:"تصفية الفئات",filterByCategory:"التصفية حسب الفئة",scrollCategoriesLeft:"تمرير الفئات لليسار",scrollCategoriesRight:"تمرير الفئات لليمين",scrollTagsLeft:"تمرير الوسوم لليسار",scrollTagsRight:"تمرير الوسوم لليمين",copyMessage:"نسخ الرسالة",copied:"تم النسخ",like:"أعجبني",dislike:"لم يعجبني",sourcesCited:"{count} مصادر مستشهد بها",moreSources:"+{count} أخرى"},es:{removeAttachment:"Quitar archivo adjunto",categoryFilter:"Filtro de categoría",filterByCategory:"Filtrar por categoría",scrollCategoriesLeft:"Desplazar categorías a la izquierda",scrollCategoriesRight:"Desplazar categorías a la derecha",scrollTagsLeft:"Desplazar etiquetas a la izquierda",scrollTagsRight:"Desplazar etiquetas a la derecha",copyMessage:"Copiar mensaje",copied:"Copiado",like:"Me gusta",dislike:"No me gusta",sourcesCited:"{count} fuentes citadas",moreSources:"+{count} más"},be:{removeAttachment:"Выдаліць улажэнне",categoryFilter:"Фільтр катэгорый",filterByCategory:"Фільтраваць па катэгорыі",scrollCategoriesLeft:"Пракруціць катэгорыі ўлева",scrollCategoriesRight:"Пракруціць катэгорыі ўправа",scrollTagsLeft:"Пракруціць тэгі ўлева",scrollTagsRight:"Пракруціць тэгі ўправа",copyMessage:"Капіраваць паведамленне",copied:"Скапіравана",like:"Падабаецца",dislike:"Не падабаецца",sourcesCited:"Цытаваныя крыніцы: {count}",moreSources:"+{count} яшчэ"},bs:{removeAttachment:"Ukloni prilog",categoryFilter:"Filter kategorija",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Pomjeri kategorije lijevo",scrollCategoriesRight:"Pomjeri kategorije desno",scrollTagsLeft:"Pomjeri oznake lijevo",scrollTagsRight:"Pomjeri oznake desno",copyMessage:"Kopiraj poruku",copied:"Kopirano",like:"Sviđa mi se",dislike:"Ne sviđa mi se",sourcesCited:"Citirani izvori: {count}",moreSources:"+{count} više"},bg:{removeAttachment:"Премахване на прикачения файл",categoryFilter:"Филтър по категория",filterByCategory:"Филтриране по категория",scrollCategoriesLeft:"Превъртане на категориите наляво",scrollCategoriesRight:"Превъртане на категориите надясно",scrollTagsLeft:"Превъртане на етикетите наляво",scrollTagsRight:"Превъртане на етикетите надясно",copyMessage:"Копиране на съобщението",copied:"Копирано",like:"Харесва ми",dislike:"Не ми харесва",sourcesCited:"Цитирани източници: {count}",moreSources:"+{count} още"},my:{removeAttachment:"ပူးတွဲဖိုင်ကို ဖယ်ရှားပါ",categoryFilter:"အမျိုးအစား စစ်ထုတ်မှု",filterByCategory:"အမျိုးအစားအလိုက် စစ်ထုတ်ပါ",scrollCategoriesLeft:"အမျိုးအစားများကို ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollCategoriesRight:"အမျိုးအစားများကို ညာဘက်သို့ ရွှေ့ပါ",scrollTagsLeft:"တဂ်များကို ဘယ်ဘက်သို့ ရွှေ့ပါ",scrollTagsRight:"တဂ်များကို ညာဘက်သို့ ရွှေ့ပါ",copyMessage:"မက်ဆေ့ချ်ကို ကူးယူပါ",copied:"ကူးယူပြီးပါပြီ",like:"နှစ်သက်သည်",dislike:"မနှစ်သက်ပါ",sourcesCited:"ကိုးကားထားသော ရင်းမြစ် {count} ခု",moreSources:"နောက်ထပ် +{count}"},ca:{removeAttachment:"Elimina el fitxer adjunt",categoryFilter:"Filtre de categoria",filterByCategory:"Filtra per categoria",scrollCategoriesLeft:"Desplaça les categories a l'esquerra",scrollCategoriesRight:"Desplaça les categories a la dreta",scrollTagsLeft:"Desplaça les etiquetes a l'esquerra",scrollTagsRight:"Desplaça les etiquetes a la dreta",copyMessage:"Copia el missatge",copied:"Copiat",like:"M'agrada",dislike:"No m'agrada",sourcesCited:"{count} fonts citades",moreSources:"+{count} més"},zh:{removeAttachment:"移除附件",categoryFilter:"类别筛选",filterByCategory:"按类别筛选",scrollCategoriesLeft:"向左滚动类别",scrollCategoriesRight:"向右滚动类别",scrollTagsLeft:"向左滚动标签",scrollTagsRight:"向右滚动标签",copyMessage:"复制消息",copied:"已复制",like:"赞",dislike:"踩",sourcesCited:"引用了 {count} 个来源",moreSources:"另外 {count} 个"},hr:{removeAttachment:"Ukloni privitak",categoryFilter:"Filtar kategorija",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Pomakni kategorije ulijevo",scrollCategoriesRight:"Pomakni kategorije udesno",scrollTagsLeft:"Pomakni oznake ulijevo",scrollTagsRight:"Pomakni oznake udesno",copyMessage:"Kopiraj poruku",copied:"Kopirano",like:"Sviđa mi se",dislike:"Ne sviđa mi se",sourcesCited:"Citirani izvori: {count}",moreSources:"+{count} više"},cs:{removeAttachment:"Odebrat přílohu",categoryFilter:"Filtr kategorií",filterByCategory:"Filtrovat podle kategorie",scrollCategoriesLeft:"Posunout kategorie doleva",scrollCategoriesRight:"Posunout kategorie doprava",scrollTagsLeft:"Posunout štítky doleva",scrollTagsRight:"Posunout štítky doprava",copyMessage:"Kopírovat zprávu",copied:"Zkopírováno",like:"Líbí se mi",dislike:"Nelíbí se mi",sourcesCited:"Citované zdroje: {count}",moreSources:"+{count} další"},da:{removeAttachment:"Fjern vedhæftet fil",categoryFilter:"Kategorifilter",filterByCategory:"Filtrer efter kategori",scrollCategoriesLeft:"Rul kategorier til venstre",scrollCategoriesRight:"Rul kategorier til højre",scrollTagsLeft:"Rul tags til venstre",scrollTagsRight:"Rul tags til højre",copyMessage:"Kopiér besked",copied:"Kopieret",like:"Synes godt om",dislike:"Synes ikke om",sourcesCited:"{count} kilder citeret",moreSources:"+{count} mere"},nl:{removeAttachment:"Bijlage verwijderen",categoryFilter:"Categoriefilter",filterByCategory:"Filteren op categorie",scrollCategoriesLeft:"Categorieën naar links scrollen",scrollCategoriesRight:"Categorieën naar rechts scrollen",scrollTagsLeft:"Tags naar links scrollen",scrollTagsRight:"Tags naar rechts scrollen",copyMessage:"Bericht kopiëren",copied:"Gekopieerd",like:"Vind ik leuk",dislike:"Vind ik niet leuk",sourcesCited:"{count} bronnen geciteerd",moreSources:"+{count} meer"},et:{removeAttachment:"Eemalda manus",categoryFilter:"Kategooriafilter",filterByCategory:"Filtreeri kategooria järgi",scrollCategoriesLeft:"Keri kategooriaid vasakule",scrollCategoriesRight:"Keri kategooriaid paremale",scrollTagsLeft:"Keri silte vasakule",scrollTagsRight:"Keri silte paremale",copyMessage:"Kopeeri sõnum",copied:"Kopeeritud",like:"Meeldib",dislike:"Ei meeldi",sourcesCited:"Viidatud allikaid: {count}",moreSources:"+{count} veel"},fi:{removeAttachment:"Poista liite",categoryFilter:"Luokkasuodatin",filterByCategory:"Suodata luokan mukaan",scrollCategoriesLeft:"Vieritä luokkia vasemmalle",scrollCategoriesRight:"Vieritä luokkia oikealle",scrollTagsLeft:"Vieritä tunnisteita vasemmalle",scrollTagsRight:"Vieritä tunnisteita oikealle",copyMessage:"Kopioi viesti",copied:"Kopioitu",like:"Tykkää",dislike:"En tykkää",sourcesCited:"Lähteitä viitattu: {count}",moreSources:"+{count} lisää"},fr:{removeAttachment:"Supprimer la pièce jointe",categoryFilter:"Filtre de catégorie",filterByCategory:"Filtrer par catégorie",scrollCategoriesLeft:"Faire défiler les catégories vers la gauche",scrollCategoriesRight:"Faire défiler les catégories vers la droite",scrollTagsLeft:"Faire défiler les étiquettes vers la gauche",scrollTagsRight:"Faire défiler les étiquettes vers la droite",copyMessage:"Copier le message",copied:"Copié",like:"J'aime",dislike:"Je n'aime pas",sourcesCited:"{count} sources citées",moreSources:"+{count} de plus"},de:{removeAttachment:"Anhang entfernen",categoryFilter:"Kategoriefilter",filterByCategory:"Nach Kategorie filtern",scrollCategoriesLeft:"Kategorien nach links scrollen",scrollCategoriesRight:"Kategorien nach rechts scrollen",scrollTagsLeft:"Tags nach links scrollen",scrollTagsRight:"Tags nach rechts scrollen",copyMessage:"Nachricht kopieren",copied:"Kopiert",like:"Gefällt mir",dislike:"Gefällt mir nicht",sourcesCited:"{count} Quellen zitiert",moreSources:"+{count} weitere"},el:{removeAttachment:"Αφαίρεση συνημμένου",categoryFilter:"Φίλτρο κατηγορίας",filterByCategory:"Φιλτράρισμα κατά κατηγορία",scrollCategoriesLeft:"Κύλιση κατηγοριών αριστερά",scrollCategoriesRight:"Κύλιση κατηγοριών δεξιά",scrollTagsLeft:"Κύλιση ετικετών αριστερά",scrollTagsRight:"Κύλιση ετικετών δεξιά",copyMessage:"Αντιγραφή μηνύματος",copied:"Αντιγράφηκε",like:"Μου αρέσει",dislike:"Δεν μου αρέσει",sourcesCited:"{count} πηγές αναφέρονται",moreSources:"+{count} ακόμη"},hi:{removeAttachment:"अनुलग्नक हटाएँ",categoryFilter:"श्रेणी फ़िल्टर",filterByCategory:"श्रेणी के अनुसार फ़िल्टर करें",scrollCategoriesLeft:"श्रेणियों को बाईं ओर स्क्रॉल करें",scrollCategoriesRight:"श्रेणियों को दाईं ओर स्क्रॉल करें",scrollTagsLeft:"टैग को बाईं ओर स्क्रॉल करें",scrollTagsRight:"टैग को दाईं ओर स्क्रॉल करें",copyMessage:"संदेश कॉपी करें",copied:"कॉपी किया गया",like:"पसंद",dislike:"नापसंद",sourcesCited:"{count} स्रोत उद्धृत",moreSources:"+{count} और"},mr:{removeAttachment:"संलग्नक काढा",categoryFilter:"श्रेणी फिल्टर",filterByCategory:"श्रेणीनुसार फिल्टर करा",scrollCategoriesLeft:"श्रेण्या डावीकडे स्क्रोल करा",scrollCategoriesRight:"श्रेण्या उजवीकडे स्क्रोल करा",scrollTagsLeft:"टॅग डावीकडे स्क्रोल करा",scrollTagsRight:"टॅग उजवीकडे स्क्रोल करा",copyMessage:"संदेश कॉपी करा",copied:"कॉपी केले",like:"आवडले",dislike:"आवडले नाही",sourcesCited:"{count} स्रोत उद्धृत",moreSources:"+{count} अधिक"},hu:{removeAttachment:"Melléklet eltávolítása",categoryFilter:"Kategóriaszűrő",filterByCategory:"Szűrés kategória szerint",scrollCategoriesLeft:"Kategóriák görgetése balra",scrollCategoriesRight:"Kategóriák görgetése jobbra",scrollTagsLeft:"Címkék görgetése balra",scrollTagsRight:"Címkék görgetése jobbra",copyMessage:"Üzenet másolása",copied:"Másolva",like:"Tetszik",dislike:"Nem tetszik",sourcesCited:"{count} hivatkozott forrás",moreSources:"+{count} további"},is:{removeAttachment:"Fjarlægja viðhengi",categoryFilter:"Flokkasía",filterByCategory:"Sía eftir flokki",scrollCategoriesLeft:"Fletta flokkum til vinstri",scrollCategoriesRight:"Fletta flokkum til hægri",scrollTagsLeft:"Fletta merkjum til vinstri",scrollTagsRight:"Fletta merkjum til hægri",copyMessage:"Afrita skilaboð",copied:"Afritað",like:"Líkar",dislike:"Líkar ekki",sourcesCited:"Heimildir vísað í: {count}",moreSources:"+{count} í viðbót"},id:{removeAttachment:"Hapus lampiran",categoryFilter:"Filter kategori",filterByCategory:"Filter menurut kategori",scrollCategoriesLeft:"Gulir kategori ke kiri",scrollCategoriesRight:"Gulir kategori ke kanan",scrollTagsLeft:"Gulir tag ke kiri",scrollTagsRight:"Gulir tag ke kanan",copyMessage:"Salin pesan",copied:"Disalin",like:"Suka",dislike:"Tidak suka",sourcesCited:"{count} sumber dikutip",moreSources:"+{count} lainnya"},it:{removeAttachment:"Rimuovi allegato",categoryFilter:"Filtro categoria",filterByCategory:"Filtra per categoria",scrollCategoriesLeft:"Scorri le categorie a sinistra",scrollCategoriesRight:"Scorri le categorie a destra",scrollTagsLeft:"Scorri i tag a sinistra",scrollTagsRight:"Scorri i tag a destra",copyMessage:"Copia messaggio",copied:"Copiato",like:"Mi piace",dislike:"Non mi piace",sourcesCited:"{count} fonti citate",moreSources:"+{count} altre"},ja:{removeAttachment:"添付ファイルを削除",categoryFilter:"カテゴリフィルター",filterByCategory:"カテゴリで絞り込む",scrollCategoriesLeft:"カテゴリを左にスクロール",scrollCategoriesRight:"カテゴリを右にスクロール",scrollTagsLeft:"タグを左にスクロール",scrollTagsRight:"タグを右にスクロール",copyMessage:"メッセージをコピー",copied:"コピーしました",like:"いいね",dislike:"よくないね",sourcesCited:"{count} 件の出典",moreSources:"他 {count} 件"},ko:{removeAttachment:"첨부 파일 제거",categoryFilter:"카테고리 필터",filterByCategory:"카테고리별 필터",scrollCategoriesLeft:"카테고리를 왼쪽으로 스크롤",scrollCategoriesRight:"카테고리를 오른쪽으로 스크롤",scrollTagsLeft:"태그를 왼쪽으로 스크롤",scrollTagsRight:"태그를 오른쪽으로 스크롤",copyMessage:"메시지 복사",copied:"복사됨",like:"좋아요",dislike:"싫어요",sourcesCited:"인용된 출처 {count}개",moreSources:"외 {count}개"},lv:{removeAttachment:"Noņemt pielikumu",categoryFilter:"Kategoriju filtrs",filterByCategory:"Filtrēt pēc kategorijas",scrollCategoriesLeft:"Ritināt kategorijas pa kreisi",scrollCategoriesRight:"Ritināt kategorijas pa labi",scrollTagsLeft:"Ritināt birkas pa kreisi",scrollTagsRight:"Ritināt birkas pa labi",copyMessage:"Kopēt ziņojumu",copied:"Nokopēts",like:"Patīk",dislike:"Nepatīk",sourcesCited:"Citēti avoti: {count}",moreSources:"+{count} vēl"},lt:{removeAttachment:"Pašalinti priedą",categoryFilter:"Kategorijų filtras",filterByCategory:"Filtruoti pagal kategoriją",scrollCategoriesLeft:"Slinkti kategorijas į kairę",scrollCategoriesRight:"Slinkti kategorijas į dešinę",scrollTagsLeft:"Slinkti žymes į kairę",scrollTagsRight:"Slinkti žymes į dešinę",copyMessage:"Kopijuoti žinutę",copied:"Nukopijuota",like:"Patinka",dislike:"Nepatinka",sourcesCited:"Cituoti šaltiniai: {count}",moreSources:"+{count} daugiau"},mk:{removeAttachment:"Отстрани прилог",categoryFilter:"Филтер за категории",filterByCategory:"Филтрирај по категорија",scrollCategoriesLeft:"Лизгај ги категориите налево",scrollCategoriesRight:"Лизгај ги категориите надесно",scrollTagsLeft:"Лизгај ги ознаките налево",scrollTagsRight:"Лизгај ги ознаките надесно",copyMessage:"Копирај порака",copied:"Копирано",like:"Ми се допаѓа",dislike:"Не ми се допаѓа",sourcesCited:"Цитирани извори: {count}",moreSources:"+{count} уште"},ms:{removeAttachment:"Alih keluar lampiran",categoryFilter:"Penapis kategori",filterByCategory:"Tapis mengikut kategori",scrollCategoriesLeft:"Tatal kategori ke kiri",scrollCategoriesRight:"Tatal kategori ke kanan",scrollTagsLeft:"Tatal tag ke kiri",scrollTagsRight:"Tatal tag ke kanan",copyMessage:"Salin mesej",copied:"Disalin",like:"Suka",dislike:"Tidak suka",sourcesCited:"{count} sumber dipetik",moreSources:"+{count} lagi"},no:{removeAttachment:"Fjern vedlegg",categoryFilter:"Kategorifilter",filterByCategory:"Filtrer etter kategori",scrollCategoriesLeft:"Bla kategorier til venstre",scrollCategoriesRight:"Bla kategorier til høyre",scrollTagsLeft:"Bla emneknagger til venstre",scrollTagsRight:"Bla emneknagger til høyre",copyMessage:"Kopier melding",copied:"Kopiert",like:"Liker",dislike:"Liker ikke",sourcesCited:"{count} kilder sitert",moreSources:"+{count} til"},fa:{removeAttachment:"حذف پیوست",categoryFilter:"فیلتر دستهبندی",filterByCategory:"فیلتر بر اساس دستهبندی",scrollCategoriesLeft:"پیمایش دستهبندیها به چپ",scrollCategoriesRight:"پیمایش دستهبندیها به راست",scrollTagsLeft:"پیمایش برچسبها به چپ",scrollTagsRight:"پیمایش برچسبها به راست",copyMessage:"کپی پیام",copied:"کپی شد",like:"پسندیدم",dislike:"نپسندیدم",sourcesCited:"{count} منبع ذکر شده",moreSources:"+{count} مورد دیگر"},pl:{removeAttachment:"Usuń załącznik",categoryFilter:"Filtr kategorii",filterByCategory:"Filtruj według kategorii",scrollCategoriesLeft:"Przewiń kategorie w lewo",scrollCategoriesRight:"Przewiń kategorie w prawo",scrollTagsLeft:"Przewiń tagi w lewo",scrollTagsRight:"Przewiń tagi w prawo",copyMessage:"Kopiuj wiadomość",copied:"Skopiowano",like:"Lubię to",dislike:"Nie lubię tego",sourcesCited:"Cytowane źródła: {count}",moreSources:"+{count} więcej"},pt:{removeAttachment:"Remover anexo",categoryFilter:"Filtro de categoria",filterByCategory:"Filtrar por categoria",scrollCategoriesLeft:"Rolar categorias para a esquerda",scrollCategoriesRight:"Rolar categorias para a direita",scrollTagsLeft:"Rolar etiquetas para a esquerda",scrollTagsRight:"Rolar etiquetas para a direita",copyMessage:"Copiar mensagem",copied:"Copiado",like:"Gostei",dislike:"Não gostei",sourcesCited:"{count} fontes citadas",moreSources:"+{count} mais"},ro:{removeAttachment:"Elimină atașamentul",categoryFilter:"Filtru de categorie",filterByCategory:"Filtrează după categorie",scrollCategoriesLeft:"Derulează categoriile la stânga",scrollCategoriesRight:"Derulează categoriile la dreapta",scrollTagsLeft:"Derulează etichetele la stânga",scrollTagsRight:"Derulează etichetele la dreapta",copyMessage:"Copiază mesajul",copied:"Copiat",like:"Îmi place",dislike:"Nu îmi place",sourcesCited:"Surse citate: {count}",moreSources:"+{count} în plus"},ru:{removeAttachment:"Удалить вложение",categoryFilter:"Фильтр категорий",filterByCategory:"Фильтровать по категории",scrollCategoriesLeft:"Прокрутить категории влево",scrollCategoriesRight:"Прокрутить категории вправо",scrollTagsLeft:"Прокрутить теги влево",scrollTagsRight:"Прокрутить теги вправо",copyMessage:"Копировать сообщение",copied:"Скопировано",like:"Нравится",dislike:"Не нравится",sourcesCited:"Цитируемые источники: {count}",moreSources:"+{count} ещё"},sr:{removeAttachment:"Ukloni prilog",categoryFilter:"Filter kategorija",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Skroluj kategorije levo",scrollCategoriesRight:"Skroluj kategorije desno",scrollTagsLeft:"Skroluj oznake levo",scrollTagsRight:"Skroluj oznake desno",copyMessage:"Kopiraj poruku",copied:"Kopirano",like:"Sviđa mi se",dislike:"Ne sviđa mi se",sourcesCited:"Citirani izvori: {count}",moreSources:"+{count} još"},sk:{removeAttachment:"Odstrániť prílohu",categoryFilter:"Filter kategórií",filterByCategory:"Filtrovať podľa kategórie",scrollCategoriesLeft:"Posunúť kategórie doľava",scrollCategoriesRight:"Posunúť kategórie doprava",scrollTagsLeft:"Posunúť štítky doľava",scrollTagsRight:"Posunúť štítky doprava",copyMessage:"Kopírovať správu",copied:"Skopírované",like:"Páči sa mi",dislike:"Nepáči sa mi",sourcesCited:"Citované zdroje: {count}",moreSources:"+{count} ďalšie"},sl:{removeAttachment:"Odstrani prilogo",categoryFilter:"Filter kategorij",filterByCategory:"Filtriraj po kategoriji",scrollCategoriesLeft:"Pomakni kategorije levo",scrollCategoriesRight:"Pomakni kategorije desno",scrollTagsLeft:"Pomakni oznake levo",scrollTagsRight:"Pomakni oznake desno",copyMessage:"Kopiraj sporočilo",copied:"Kopirano",like:"Všeč mi je",dislike:"Ni mi všeč",sourcesCited:"Navedeni viri: {count}",moreSources:"+{count} več"},sv:{removeAttachment:"Ta bort bilaga",categoryFilter:"Kategorifilter",filterByCategory:"Filtrera efter kategori",scrollCategoriesLeft:"Bläddra kategorier åt vänster",scrollCategoriesRight:"Bläddra kategorier åt höger",scrollTagsLeft:"Bläddra taggar åt vänster",scrollTagsRight:"Bläddra taggar åt höger",copyMessage:"Kopiera meddelande",copied:"Kopierat",like:"Gilla",dislike:"Gilla inte",sourcesCited:"{count} källor citerade",moreSources:"+{count} till"},th:{removeAttachment:"นำไฟล์แนบออก",categoryFilter:"ตัวกรองหมวดหมู่",filterByCategory:"กรองตามหมวดหมู่",scrollCategoriesLeft:"เลื่อนหมวดหมู่ไปทางซ้าย",scrollCategoriesRight:"เลื่อนหมวดหมู่ไปทางขวา",scrollTagsLeft:"เลื่อนแท็กไปทางซ้าย",scrollTagsRight:"เลื่อนแท็กไปทางขวา",copyMessage:"คัดลอกข้อความ",copied:"คัดลอกแล้ว",like:"ถูกใจ",dislike:"ไม่ถูกใจ",sourcesCited:"อ้างอิง {count} แหล่ง",moreSources:"อีก +{count}"},tr:{removeAttachment:"Eki kaldır",categoryFilter:"Kategori filtresi",filterByCategory:"Kategoriye göre filtrele",scrollCategoriesLeft:"Kategorileri sola kaydır",scrollCategoriesRight:"Kategorileri sağa kaydır",scrollTagsLeft:"Etiketleri sola kaydır",scrollTagsRight:"Etiketleri sağa kaydır",copyMessage:"Mesajı kopyala",copied:"Kopyalandı",like:"Beğen",dislike:"Beğenme",sourcesCited:"{count} kaynak alıntılandı",moreSources:"+{count} daha"},uk:{removeAttachment:"Видалити вкладення",categoryFilter:"Фільтр категорій",filterByCategory:"Фільтрувати за категорією",scrollCategoriesLeft:"Прокрутити категорії ліворуч",scrollCategoriesRight:"Прокрутити категорії праворуч",scrollTagsLeft:"Прокрутити теги ліворуч",scrollTagsRight:"Прокрутити теги праворуч",copyMessage:"Копіювати повідомлення",copied:"Скопійовано",like:"Подобається",dislike:"Не подобається",sourcesCited:"Цитовані джерела: {count}",moreSources:"+{count} ще"},ur:{removeAttachment:"منسلکہ ہٹائیں",categoryFilter:"زمرہ فلٹر",filterByCategory:"زمرے کے لحاظ سے فلٹر کریں",scrollCategoriesLeft:"زمرے بائیں طرف اسکرول کریں",scrollCategoriesRight:"زمرے دائیں طرف اسکرول کریں",scrollTagsLeft:"ٹیگز بائیں طرف اسکرول کریں",scrollTagsRight:"ٹیگز دائیں طرف اسکرول کریں",copyMessage:"پیغام کاپی کریں",copied:"کاپی ہو گیا",like:"پسند",dislike:"ناپسند",sourcesCited:"{count} حوالہ جاتی ذرائع",moreSources:"+{count} مزید"},vi:{removeAttachment:"Xóa tệp đính kèm",categoryFilter:"Bộ lọc danh mục",filterByCategory:"Lọc theo danh mục",scrollCategoriesLeft:"Cuộn danh mục sang trái",scrollCategoriesRight:"Cuộn danh mục sang phải",scrollTagsLeft:"Cuộn thẻ sang trái",scrollTagsRight:"Cuộn thẻ sang phải",copyMessage:"Sao chép tin nhắn",copied:"Đã sao chép",like:"Thích",dislike:"Không thích",sourcesCited:"Đã trích dẫn {count} nguồn",moreSources:"+{count} nữa"}},$={en:{onboardingNamePlaceholder:"Please enter your name",onboardingEmailPlaceholder:"Please enter your email address",onboardingPhonePlaceholder:"Please enter your phone number"},ar:{onboardingNamePlaceholder:"الرجاء إدخال اسمك",onboardingEmailPlaceholder:"الرجاء إدخال بريدك الإلكتروني",onboardingPhonePlaceholder:"الرجاء إدخال رقم هاتفك"},es:{onboardingNamePlaceholder:"Introduce tu nombre",onboardingEmailPlaceholder:"Introduce tu correo electrónico",onboardingPhonePlaceholder:"Introduce tu número de teléfono"},be:{onboardingNamePlaceholder:"Калі ласка, увядзіце ваша імя",onboardingEmailPlaceholder:"Калі ласка, увядзіце адрас электроннай пошты",onboardingPhonePlaceholder:"Калі ласка, увядзіце нумар тэлефона"},bs:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju email adresu",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},bg:{onboardingNamePlaceholder:"Моля, въведете вашето име",onboardingEmailPlaceholder:"Моля, въведете имейл адреса си",onboardingPhonePlaceholder:"Моля, въведете телефонния си номер"},my:{onboardingNamePlaceholder:"ကျေးဇူးပြု၍ သင့်အမည်ကို ထည့်ပါ",onboardingEmailPlaceholder:"ကျေးဇူးပြု၍ သင့်အီးမေးလ်လိပ်စာကို ထည့်ပါ",onboardingPhonePlaceholder:"ကျေးဇူးပြု၍ သင့်ဖုန်းနံပါတ်ကို ထည့်ပါ"},ca:{onboardingNamePlaceholder:"Introdueix el teu nom",onboardingEmailPlaceholder:"Introdueix el teu correu electrònic",onboardingPhonePlaceholder:"Introdueix el teu número de telèfon"},zh:{onboardingNamePlaceholder:"请输入您的姓名",onboardingEmailPlaceholder:"请输入您的电子邮箱地址",onboardingPhonePlaceholder:"请输入您的电话号码"},hr:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju adresu e-pošte",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},cs:{onboardingNamePlaceholder:"Zadejte své jméno",onboardingEmailPlaceholder:"Zadejte svou e-mailovou adresu",onboardingPhonePlaceholder:"Zadejte své telefonní číslo"},da:{onboardingNamePlaceholder:"Indtast dit navn",onboardingEmailPlaceholder:"Indtast din e-mailadresse",onboardingPhonePlaceholder:"Indtast dit telefonnummer"},nl:{onboardingNamePlaceholder:"Voer uw naam in",onboardingEmailPlaceholder:"Voer uw e-mailadres in",onboardingPhonePlaceholder:"Voer uw telefoonnummer in"},et:{onboardingNamePlaceholder:"Sisestage oma nimi",onboardingEmailPlaceholder:"Sisestage oma e-posti aadress",onboardingPhonePlaceholder:"Sisestage oma telefoninumber"},fi:{onboardingNamePlaceholder:"Anna nimesi",onboardingEmailPlaceholder:"Anna sähköpostiosoitteesi",onboardingPhonePlaceholder:"Anna puhelinnumerosi"},fr:{onboardingNamePlaceholder:"Veuillez saisir votre nom",onboardingEmailPlaceholder:"Veuillez saisir votre adresse e-mail",onboardingPhonePlaceholder:"Veuillez saisir votre numéro de téléphone"},de:{onboardingNamePlaceholder:"Bitte geben Sie Ihren Namen ein",onboardingEmailPlaceholder:"Bitte geben Sie Ihre E-Mail-Adresse ein",onboardingPhonePlaceholder:"Bitte geben Sie Ihre Telefonnummer ein"},el:{onboardingNamePlaceholder:"Παρακαλώ εισαγάγετε το όνομά σας",onboardingEmailPlaceholder:"Παρακαλώ εισαγάγετε τη διεύθυνση email σας",onboardingPhonePlaceholder:"Παρακαλώ εισαγάγετε τον αριθμό τηλεφώνου σας"},hi:{onboardingNamePlaceholder:"कृपया अपना नाम दर्ज करें",onboardingEmailPlaceholder:"कृपया अपना ईमेल पता दर्ज करें",onboardingPhonePlaceholder:"कृपया अपना फ़ोन नंबर दर्ज करें"},mr:{onboardingNamePlaceholder:"कृपया आपले नाव प्रविष्ट करा",onboardingEmailPlaceholder:"कृपया आपला ईमेल पत्ता प्रविष्ट करा",onboardingPhonePlaceholder:"कृपया आपला फोन नंबर प्रविष्ट करा"},hu:{onboardingNamePlaceholder:"Adja meg a nevét",onboardingEmailPlaceholder:"Adja meg az e-mail-címét",onboardingPhonePlaceholder:"Adja meg a telefonszámát"},is:{onboardingNamePlaceholder:"Sláðu inn nafn þitt",onboardingEmailPlaceholder:"Sláðu inn netfangið þitt",onboardingPhonePlaceholder:"Sláðu inn símanúmerið þitt"},id:{onboardingNamePlaceholder:"Masukkan nama Anda",onboardingEmailPlaceholder:"Masukkan alamat email Anda",onboardingPhonePlaceholder:"Masukkan nomor telepon Anda"},it:{onboardingNamePlaceholder:"Inserisci il tuo nome",onboardingEmailPlaceholder:"Inserisci il tuo indirizzo email",onboardingPhonePlaceholder:"Inserisci il tuo numero di telefono"},ja:{onboardingNamePlaceholder:"お名前を入力してください",onboardingEmailPlaceholder:"メールアドレスを入力してください",onboardingPhonePlaceholder:"電話番号を入力してください"},ko:{onboardingNamePlaceholder:"이름을 입력해 주세요",onboardingEmailPlaceholder:"이메일 주소를 입력해 주세요",onboardingPhonePlaceholder:"전화번호를 입력해 주세요"},lv:{onboardingNamePlaceholder:"Lūdzu, ievadiet savu vārdu",onboardingEmailPlaceholder:"Lūdzu, ievadiet savu e-pasta adresi",onboardingPhonePlaceholder:"Lūdzu, ievadiet savu tālruņa numuru"},lt:{onboardingNamePlaceholder:"Įveskite savo vardą",onboardingEmailPlaceholder:"Įveskite savo el. pašto adresą",onboardingPhonePlaceholder:"Įveskite savo telefono numerį"},mk:{onboardingNamePlaceholder:"Внесете го вашето име",onboardingEmailPlaceholder:"Внесете ја вашата е-пошта",onboardingPhonePlaceholder:"Внесете го вашиот телефонски број"},ms:{onboardingNamePlaceholder:"Masukkan nama anda",onboardingEmailPlaceholder:"Masukkan alamat e-mel anda",onboardingPhonePlaceholder:"Masukkan nombor telefon anda"},no:{onboardingNamePlaceholder:"Skriv inn navnet ditt",onboardingEmailPlaceholder:"Skriv inn e-postadressen din",onboardingPhonePlaceholder:"Skriv inn telefonnummeret ditt"},fa:{onboardingNamePlaceholder:"لطفاً نام خود را وارد کنید",onboardingEmailPlaceholder:"لطفاً ایمیل خود را وارد کنید",onboardingPhonePlaceholder:"لطفاً شماره تلفن خود را وارد کنید"},pl:{onboardingNamePlaceholder:"Wpisz swoje imię",onboardingEmailPlaceholder:"Wpisz swój adres e-mail",onboardingPhonePlaceholder:"Wpisz swój numer telefonu"},pt:{onboardingNamePlaceholder:"Insira o seu nome",onboardingEmailPlaceholder:"Insira o seu endereço de e-mail",onboardingPhonePlaceholder:"Insira o seu número de telefone"},ro:{onboardingNamePlaceholder:"Introduceți numele dvs.",onboardingEmailPlaceholder:"Introduceți adresa dvs. de e-mail",onboardingPhonePlaceholder:"Introduceți numărul dvs. de telefon"},ru:{onboardingNamePlaceholder:"Введите ваше имя",onboardingEmailPlaceholder:"Введите адрес электронной почты",onboardingPhonePlaceholder:"Введите номер телефона"},sr:{onboardingNamePlaceholder:"Unesite svoje ime",onboardingEmailPlaceholder:"Unesite svoju adresu e-pošte",onboardingPhonePlaceholder:"Unesite svoj broj telefona"},sk:{onboardingNamePlaceholder:"Zadajte svoje meno",onboardingEmailPlaceholder:"Zadajte svoju e-mailovú adresu",onboardingPhonePlaceholder:"Zadajte svoje telefónne číslo"},sl:{onboardingNamePlaceholder:"Vnesite svoje ime",onboardingEmailPlaceholder:"Vnesite svoj e-poštni naslov",onboardingPhonePlaceholder:"Vnesite svojo telefonsko številko"},sv:{onboardingNamePlaceholder:"Ange ditt namn",onboardingEmailPlaceholder:"Ange din e-postadress",onboardingPhonePlaceholder:"Ange ditt telefonnummer"},th:{onboardingNamePlaceholder:"กรุณากรอกชื่อของคุณ",onboardingEmailPlaceholder:"กรุณากรอกอีเมลของคุณ",onboardingPhonePlaceholder:"กรุณากรอกหมายเลขโทรศัพท์ของคุณ"},tr:{onboardingNamePlaceholder:"Lütfen adınızı girin",onboardingEmailPlaceholder:"Lütfen e-posta adresinizi girin",onboardingPhonePlaceholder:"Lütfen telefon numaranızı girin"},uk:{onboardingNamePlaceholder:"Введіть ваше ім’я",onboardingEmailPlaceholder:"Введіть вашу адресу електронної пошти",onboardingPhonePlaceholder:"Введіть ваш номер телефону"},ur:{onboardingNamePlaceholder:"براہ کرم اپنا نام درج کریں",onboardingEmailPlaceholder:"براہ کرم اپنا ای میل پتہ درج کریں",onboardingPhonePlaceholder:"براہ کرم اپنا فون نمبر درج کریں"},vi:{onboardingNamePlaceholder:"Vui lòng nhập tên của bạn",onboardingEmailPlaceholder:"Vui lòng nhập địa chỉ email của bạn",onboardingPhonePlaceholder:"Vui lòng nhập số điện thoại của bạn"}},q=new Set(["ar","fa","he","ur","iw","prs"]);function G(e){if(!e||"string"!=typeof e)return"en";const t=e.toLowerCase().split(/[-_]/)[0];return U[t]?t:"en"}function H(e){const t=(e||"").toLowerCase().split(/[-_]/)[0];return q.has(t)}const V=/[\u0590-\u05ff\u0600-\u06ff\u0700-\u074f\u0750-\u077f\u08a0-\u08ff\ufb1d-\ufb4f\ufb50-\ufdff\ufe70-\ufeff]/,W=/[A-Za-z\u00c0-\u024f\u0370-\u03ff\u0400-\u04ff]/;function Y(e,t=!1){if("string"!=typeof e||0===e.length)return t;for(const t of e){if(V.test(t))return!0;if(W.test(t))return!1}return t}const K={en:{attachmentLimitReached:"That file is too large. This chat can receive up to {max_mb} MB of files in total.",attachmentLimitReachedUsed:"That file is too large. This chat can receive up to {max_mb} MB of files in total, and {used_mb} MB is already used.",attachmentFileTooLarge:"Sorry, that file is too large. Files must be under {max_mb} MB.",attachmentTypeNotAllowed:"Sorry, we can't accept that type of file. You can send {types}.",attachmentLimitReachedSize:"That file is {file_mb} MB, which is too large. This chat can receive up to {max_mb} MB of files in total.",attachmentLimitReachedUsedSize:"That file is {file_mb} MB, which is too large. This chat can receive up to {max_mb} MB of files in total, and {used_mb} MB is already used.",attachmentFileTooLargeSize:"Sorry, that file is {file_mb} MB, which is too large. Files must be under {max_mb} MB."},ar:{attachmentLimitReached:"حجم الملف كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت.",attachmentLimitReachedUsed:"حجم الملف كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت، وقد تم استخدام {used_mb} ميغابايت.",attachmentFileTooLarge:"عذراً، حجم الملف كبير جداً. يجب أن يكون حجم الملف أقل من {max_mb} ميغابايت.",attachmentTypeNotAllowed:"عذراً، لا يمكننا استقبال هذا النوع من الملفات. يمكنك إرسال: {types}.",attachmentLimitReachedSize:"حجم الملف {file_mb} ميغابايت، وهو كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت.",attachmentLimitReachedUsedSize:"حجم الملف {file_mb} ميغابايت، وهو كبير جداً. يمكن لهذه المحادثة استقبال ملفات يصل مجموع حجمها إلى {max_mb} ميغابايت، وقد تم استخدام {used_mb} ميغابايت.",attachmentFileTooLargeSize:"عذراً، حجم الملف {file_mb} ميغابايت، وهو كبير جداً. يجب أن يكون حجم الملف أقل من {max_mb} ميغابايت."},zh:{attachmentLimitReached:"文件过大。此聊天最多可接收共 {max_mb} MB 的文件。",attachmentLimitReachedUsed:"文件过大。此聊天最多可接收共 {max_mb} MB 的文件,目前已使用 {used_mb} MB。",attachmentFileTooLarge:"抱歉,文件过大。文件大小必须小于 {max_mb} MB。",attachmentTypeNotAllowed:"抱歉,无法接收此类文件。您可以发送:{types}。",attachmentLimitReachedSize:"该文件为 {file_mb} MB,过大。此聊天最多可接收共 {max_mb} MB 的文件。",attachmentLimitReachedUsedSize:"该文件为 {file_mb} MB,过大。此聊天最多可接收共 {max_mb} MB 的文件,目前已使用 {used_mb} MB。",attachmentFileTooLargeSize:"抱歉,该文件为 {file_mb} MB,过大。文件大小必须小于 {max_mb} MB。"},ja:{attachmentLimitReached:"ファイルが大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までです。",attachmentLimitReachedUsed:"ファイルが大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までで、すでに {used_mb} MB を使用しています。",attachmentFileTooLarge:"申し訳ありませんが、ファイルが大きすぎます。ファイルは {max_mb} MB 未満にしてください。",attachmentTypeNotAllowed:"申し訳ありませんが、この種類のファイルは受け付けていません。送信できるファイル: {types}",attachmentLimitReachedSize:"このファイルは {file_mb} MB で、大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までです。",attachmentLimitReachedUsedSize:"このファイルは {file_mb} MB で、大きすぎます。このチャットで受け取れるファイルは合計 {max_mb} MB までで、すでに {used_mb} MB を使用しています。",attachmentFileTooLargeSize:"申し訳ありませんが、このファイルは {file_mb} MB で、大きすぎます。ファイルは {max_mb} MB 未満にしてください。"}};function X(e,t){const n=G(e),r=U[n]||B,a=$[n];return a?.[t]??r[t]??z[n]?.[t]??K[n]?.[t]??$.en[t]??z.en[t]??K.en[t]??B[t]??t}function Z(e){const t=G(e);return e=>X(t,e)}const Q=new Set(["NotAllowedError","PermissionDeniedError","SecurityError"]),J=new Set(["NotFoundError","DevicesNotFoundError","OverconstrainedError"]);function ee(e){try{const t="string"==typeof e?.name?e.name:"";if(Q.has(t))return"micDenied";if(J.has(t))return"micNotFound";const n="string"==typeof e?.message?e.message.toLowerCase():"";if(n.includes("permission denied")||n.includes("permission dismissed"))return"micDenied";if(n.includes("device not found")||n.includes("no microphone"))return"micNotFound"}catch{}return"voiceUnavailable"}function te(e){return"human_reply"===e?.contentType||"handoff_ack"===e?.contentType||"handoff_wait"===e?.contentType||"verification_request"===e?.contentType||!0===e?.staffTurn}function ne(e){if(!e||"user"===e.role)return null;const t=e.metadata?.senderName;return"string"==typeof t&&t.trim()?t.trim():null}const re=e=>e.replace(/([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])\s+([\u3000-\u303f\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uff00-\uffef])/g,"$1$2"),ae=/^(https?|mailto|tel):/i,oe=e=>{const t=(e||"").trim();return t?/^https?:\/\//i.test(t)||ae.test(t)?t:/^[a-z][a-z0-9+.-]*:/i.test(t)?"":`https://${t.replace(/^\/+/,"")}`:""},ie=(...e)=>e.filter(Boolean).join(" "),se={fullname:0,name:0,username:0,email:1,phone:2,mobileno:2},le=e=>{if(!e)return 99;const t=String(e).toLowerCase();return se[t]??99},ce="eshal_chat_session",ue="eshal_chat_session_messages",de="eshal_chat_handoff_points";function pe(e,t=200,n=50){if(!Array.isArray(e))return[];("number"!=typeof t||t<=0)&&(t=200),("number"!=typeof n||n<=0||n>=t)&&(n=Math.min(50,t-1));let r=e;for(;r.length>t;)r=r.slice(n);return r}function fe(e){if(!e||"object"!=typeof e)return null;const t={};return"string"==typeof e.senderName&&e.senderName&&(t.senderName=e.senderName),"string"==typeof e.contentType&&e.contentType&&(t.contentType=e.contentType),Object.keys(t).length>0?t:null}const ge=(e,t,n,r)=>{if(e&&t)try{const a=r?.cap,o=r?.trimBatch,i=function(e){return Array.isArray(e)?e.filter(e=>e&&!e.isWelcome&&(e.content||Array.isArray(e.sources)&&e.sources.length>0||Array.isArray(e.attachments)&&e.attachments.length>0)).map(e=>({id:e.id,role:e.role,content:e.content,timestamp:e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:(new Date).toISOString(),type:e.type??null,...Array.isArray(e.sources)&&e.sources.length>0?{sources:e.sources}:{},...void 0!==e.feedback?{feedback:e.feedback}:{},...Array.isArray(e.prompts)&&e.prompts.length>0?{prompts:e.prompts}:{},...fe(e.metadata)?{metadata:fe(e.metadata)}:{},...Array.isArray(e.attachments)&&e.attachments.length>0?{attachments:e.attachments.filter(e=>e&&(e.filename||e.storageKey)).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url}))}:{}})):[]}(pe(n,a,o));localStorage.setItem(`${ue}_${e}_${t}`,JSON.stringify(i))}catch{}},me=(e,t)=>{if(e&&t)try{localStorage.removeItem(`${ue}_${e}_${t}`),localStorage.removeItem(`${de}_${e}_${t}`)}catch{}},he=(e,t)=>{if(null==e||!t)return null;const n={MINUTES:6e4,HOURS:36e5,DAYS:864e5}[t.toUpperCase()];return void 0===n?(console.warn(`[Session] Unknown timeout unit: ${t}`),null):Number(e)*n},be=e=>{try{const t=localStorage.getItem(`${ce}_${e}`);return t?JSON.parse(t):null}catch{return null}},ye=(e,t,n)=>{if(!e||!e.lastActivity)return!1;if(null==t||0===t)return!0;if(null!==t&&null!==n){const r=JSON.stringify({value:t,unit:n?.toUpperCase()});if(e.settingsSnapshot&&e.settingsSnapshot!==r)return console.log("[Session] Timeout settings changed - treating session as invalid."),!1}if(null===e.firstInteractionAt)return!0;const r=he(t,n);if(!r)return!0;const a=new Date(e.lastActivity).getTime(),o=Date.now()-a,i=o<r;return i||console.log(`[Session] Session expired. Elapsed: ${Math.floor(o/1e3)}s, Timeout: ${Math.floor(r/1e3)}s`),i},ve=(e,t,n={})=>{try{const r=(new Date).toISOString();console.log(`[Session] Saving new session: ${t} for org: ${e}`),localStorage.setItem(`${ce}_${e}`,JSON.stringify({conversationId:t,lastActivity:r,createdAt:r,firstInteractionAt:null,...n}))}catch{}},we=e=>{try{const t=be(e);if(!t)return;const n=(new Date).toISOString();t.lastActivity=n,t.firstInteractionAt||(t.firstInteractionAt=n),localStorage.setItem(`${ce}_${e}`,JSON.stringify(t))}catch{}},Se=e=>{try{return be(e)?.onboardingName??""}catch{return""}},xe=(e,t)=>{try{if(!e)return;if(!Array.isArray(t)||0===t.length)return void localStorage.removeItem(`${ce}_prompts_${e}`);localStorage.setItem(`${ce}_prompts_${e}`,JSON.stringify(t))}catch{}};function ke(e){return null==e?"":String(e)}function Ee(e,t){const n=ke(e),r=ke(t).trim();if(!r||!n.trim())return n;const a=function(e){return ke(e).trim().split(/\s+/).filter(Boolean).map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join(" ")}(r);if(new RegExp("^\\s*(?:hi|hey|hello)\\s+"+a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\b","i").test(n))return n;const o=n.match(/^\s*(hi|hey|hello)(?:\s+there)?\s*([-,!.:;]+)?\s*/i);if(o){const e=o[1],t=void 0!==o[2]?o[2]:",",r=n.slice(o[0].length);return e+" "+a+t+(r?" "+r:"")}return"Hi "+a+", "+n}const Ae=new Set(["fullname","name","username"]);const Te=(e,t)=>{const n=(Array.isArray(t)?t:[]).filter(e=>e&&"string"==typeof e.url&&e.url).map(e=>`[${String(e.filename||"Attachment").replace(/[[\]]/g,"")}](${e.url})`);return 0===n.length?e:[String(e??"").trim(),...n].filter(Boolean).join("\n\n")},Ce=e=>({senderName:e?.senderName,..."string"==typeof e?.contentType&&e.contentType?{contentType:e.contentType}:{}}),Oe=({id:e,role:t,content:n,isProcessing:r=!1,isError:a=!1,metadata:o,attachments:i})=>({id:e,role:t,content:n,timestamp:new Date,isProcessing:r,...a?{isError:!0}:{},metadata:o,...Array.isArray(i)&&i.length>0?{attachments:i}:{}}),Ie=(e,t)=>{const n=[...e.map(e=>({...e,metadata:e.metadata||{source:"sse"}})),...t];return Array.from(new Map(n.map(e=>[e.id,e])).values()).sort((e,t)=>(e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime())-(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime()))};function Re(){return`widget-session-${"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}`}function Ne(){return"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now().toString(16)}-${Math.random().toString(16).slice(2,14)}`}const _e=e=>e&&e.length>0?e:[],Pe=({welcomeMessage:t,fallbackMessage:n,quickQuestions:r=[],apiBaseUrl:a,wsBaseUrl:o,apiKey:i,organizationId:s,getAuthToken:l,autoOpen:c,openDelay:u,darkMode:d,enableVoiceInteraction:p=!1,provideCitations:f=!0,onboardingQuestions:g=[],onboardingEnabled:v=!1,collectionPrompt:w,inactivityTimeoutValue:S,inactivityTimeoutUnit:x,messageLimits:k,locale:E="en"})=>{const A=e.useMemo(()=>Z(E),[E]),T=e.useMemo(()=>({cap:"number"==typeof k?.cap&&k.cap>0?k.cap:200,trimBatch:"number"==typeof k?.trimBatch&&k.trimBatch>0?k.trimBatch:50}),[k?.cap,k?.trimBatch]),[C,I]=e.useState(c),[R,N]=e.useState(!1),[_,P]=e.useState(d),[L,D]=e.useState(()=>{try{const e=be(s);if(void 0!==S&&e&&ye(e,S,x))return[]}catch{}if(!t)return[];let e=t;try{e=Ee(t,Se(s))}catch{}return[{...Oe({id:Date.now().toString(),role:"assistant",content:e}),isWelcome:!0}]}),[B,U]=e.useState(""),z=e.useRef(""),$=e.useCallback(e=>{const t="function"==typeof e?e(z.current):e;z.current=t,U(t)},[]),[q,G]=e.useState(!1),H=e.useRef(null),V=e.useRef(null),W=e.useRef(1),[Y,K]=e.useState(null),[X,Q]=e.useState(null),J=e.useRef(null);e.useEffect(()=>{J.current=X},[X]);const[ae,oe]=e.useState(null),ie=e.useRef(null);e.useEffect(()=>{ie.current=ae},[ae]);const[se,fe]=e.useState(!1),[Pe,Le]=e.useState(()=>{try{const e=be(s);if(e&&e.onboardingCompleted)return!0}catch{}return!1}),[De,Me]=e.useState(()=>{try{return Se(s)||""}catch{return""}}),je=e.useMemo(()=>Ee(t,De),[t,De]),[Fe,Be]=e.useState(null),[Ue,ze]=e.useState({}),$e=e.useRef(!1),qe=e.useRef(!1),Ge=e.useRef(0),[He,Ve]=e.useState(!1),[We,Ye]=e.useState(!1),[Ke,Xe]=e.useState([]),[Ze,Qe]=e.useState("idle"),[Je,et]=e.useState(null),[tt,nt]=e.useState(!1),[rt,at]=e.useState(()=>{try{const e=be(s);if(void 0!==S&&e&&ye(e,S,x))return e.conversationId}catch{}return Re()}),ot=e.useRef(()=>{}),it=e.useRef(null),st=e.useRef(null),[lt,ct]=e.useState(!1),[ut,dt]=e.useState(null),[pt,ft]=e.useState([]),gt=e.useRef(L);e.useEffect(()=>{gt.current=L},[L]);const[mt,ht]=e.useState([]),bt=e.useRef(!1),yt=e.useCallback(({recordPoint:e=!0}={})=>{const t=bt.current;if(bt.current=!0,ct(!0),t||!e)return;const n=gt.current||[],r=n.length>0?n[n.length-1].id:null;r&&ht(e=>e.includes(r)?e:[...e,r])},[]),vt=e.useCallback(()=>{bt.current=!1,ct(!1)},[]),wt=e.useRef(null),St=e.useRef(null),xt=e.useRef(null),kt=e.useRef(!1),Et=e.useRef(null),At=e.useCallback(e=>{Et.current&&clearTimeout(Et.current),Et.current=null,kt.current&&(kt.current=!1,St.current?.port.postMessage({command:"resume"===e?"resume":"endOfAudio"}))},[]),Tt=e.useRef(null),Ct=e.useRef(null),Ot=e.useRef(null),It=e.useRef(null),Rt=e.useRef(null),Nt=e.useRef(null),_t=e.useRef(!1),Pt=e.useRef(null),Lt=e.useRef(null),Dt=e.useRef(!1),Mt=e.useRef(!1);e.useRef(null);const jt=e.useRef(null);e.useRef(null);const Ft=e.useRef(!1),Bt=e.useRef(null),Ut=e.useRef(!1),zt=e.useRef(!1),$t=e.useRef(!1),qt=e.useRef(null),Gt=e.useRef(L);Gt.current=L;const Ht=e.useRef(null),Vt=e.useRef(null),Wt=e.useRef(null),Yt=e.useRef(null),Kt=e.useRef(null),Xt=e.useCallback(e=>{if(!e)return;const t=new Date(e).getTime();if(!Number.isFinite(t))return;t>(Kt.current?new Date(Kt.current).getTime():-1/0)&&(Kt.current=new Date(t).toISOString())},[]),Zt=e.useCallback(e=>{if(Array.isArray(e)&&0!==e.length){for(const t of e)Xt(t?.createdAt);D(t=>{const n=new Set(t.map(e=>e.id)),r=e.filter(e=>e&&e.id&&!n.has(e.id)).map(e=>({...Oe({id:e.id,role:e.role||"assistant",content:Te(e.content,e.attachments),isProcessing:!1,metadata:Ce(e)}),timestamp:e.createdAt?new Date(e.createdAt):new Date}));if(0===r.length)return t;const a=e=>{const t=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return Number.isFinite(t)?t:0},o=[...t,...r];return o.sort((e,t)=>a(e)-a(t)),o})}},[Xt]),Qt=e.useCallback(async()=>{if(a&&rt)try{const e={};if("function"==typeof l){const t=await l();t&&(e.Authorization=`Bearer ${t}`)}const t=Kt.current,n=`${a.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(rt)}`+(t?`?since=${encodeURIComponent(t)}`:""),r=await fetch(n,{headers:e,credentials:"include"});if(r.status===h)return void ot.current(null);if(!r.ok)return;const o=await r.json(),i=Array.isArray(o?.messages)?o.messages:[];Zt(i.filter(te)),o?.csatRequest&&dt(o.csatRequest)}catch{}},[a,rt,l,Zt]),Jt=e.useCallback(async e=>{if(st.current)return void(e&&e());if(!a||!rt)return;let t=`${a.replace(/\/$/,"")}/api/v1/widget/events/${encodeURIComponent(rt)}`;if("function"==typeof l)try{const e=await l();e&&(t+=`${t.includes("?")?"&":"?"}token=${encodeURIComponent(e)}`)}catch{}if(st.current)return void(e&&e());const n=new EventSource(t);n.onmessage=e=>{try{const r=JSON.parse(e.data);if("csat_request"===r.type&&r.csat)return void dt(r.csat);if("agent_joined"===r.type&&r.name){const e=String(r.name).trim();if(!e)return;const t=gt.current||[];if(t.some(t=>ne(t)===e))return;const n=t[t.length-1]?.id||null;return void ft(t=>t.some(t=>t.name===e)?t:[...t,{name:e,afterMessageId:n}])}if("conversation_erased"===r.type)return n.close(),st.current===n&&(st.current=null),void ot.current(null);if("message_created"===r.type&&r.message){Xt(r.message.createdAt);const e=(t=r.message,"ai"===t?.responder||"human"===t?.responder?t.responder:null);"ai"===e?vt():"human"===e&&yt(),D(e=>e.some(e=>e.id===r.message.id)?e:[...e,Oe({id:r.message.id,role:r.message.role||"assistant",content:Te(r.message.content,r.message.attachments),isProcessing:!1,metadata:Ce(r.message)})])}}catch{}var t},n.onopen=()=>{Qt(),e&&e()},n.onerror=()=>{},st.current=n},[a,rt,l,Qt,vt,yt]);e.useEffect(()=>()=>{st.current&&(st.current.close(),st.current=null)},[]);const en=e.useMemo(()=>{if(!s)return null;const e=((e,t)=>{if(t)return t.replace(/\/$/,"");if(!e)return"wss://dev.eshal.ai/voice/ws";try{const t=new URL(e);return t.protocol=t.protocol.replace(/^http/,"ws"),t.pathname="/voice/ws",t.toString().replace(/\/$/,"")}catch(e){return console.error("Invalid API base URL provided for WebSocket:",e),"wss://dev.eshal.ai/voice/ws"}})(a,o);return`${e}/${s}/${rt}`},[a,o,s,rt]),tn=e.useCallback(()=>{const e=`msg-${W.current}`;return W.current+=1,e},[]);e.useEffect(()=>{if(c&&u>0){const e=setTimeout(()=>I(!0),u);return()=>clearTimeout(e)}},[c,u]),e.useEffect(()=>{let e=!1;return(async()=>{try{const{default:t}=await Promise.resolve().then(function(){return Ua}),n=new t({cache:!0,geoFromBrowser:!1,preferredProvider:"ipwho.is",onError:()=>{}}),r=await n.init();if(e)return;if(r?.fingerprintId&&(Wt.current=r.fingerprintId),r?.geo||r?.ip){const e=r.geo||{};Yt.current={ip:r.ip||e.ip||null,country:e.country||null,countryCode:e.countryCode||null,region:e.region||null,city:e.city||null,timezone:e.timezone||null}}}catch{}})(),()=>{e=!0}},[]),e.useEffect(()=>{P(d)},[d]);const nn=e.useRef(!1),rn=e.useRef(!1),an=e.useRef(!1),on=e.useRef({value:null,unit:null}),[sn,ln]=e.useState(!1);e.useEffect(()=>{if(!s||!rt||void 0===S)return;const e=be(s);if(e&&ye(e,S,x)){if(rt!==e.conversationId)return void at(e.conversationId);if(!nn.current){nn.current=!0;const e=((e,t)=>{if(!e||!t)return[];try{const n=localStorage.getItem(`${ue}_${e}_${t}`);if(!n)return[];const r=JSON.parse(n);return Array.isArray(r)?r.map(e=>({...e,timestamp:e.timestamp?new Date(e.timestamp):new Date})):[]}catch{return[]}})(s,rt);if(e.length>0){if(rn.current=!0,t){const t=e[0]?.timestamp,n=t instanceof Date?t.getTime():t?new Date(t).getTime():Date.now(),r={...Oe({id:"welcome-restored",role:"assistant",content:je}),isWelcome:!0,timestamp:new Date(n-1)};D([r,...e])}else D(e);const n=new Set(e.map(e=>e.id)),r=((e,t)=>{if(!e||!t)return[];try{const n=JSON.parse(localStorage.getItem(`${de}_${e}_${t}`)||"[]");return Array.isArray(n)?n.filter(e=>"string"==typeof e&&e).slice(-20):[]}catch{return[]}})(s,rt).filter(e=>n.has(e));r.length>0&&ht(r);if(!e.some(e=>"assistant"===e.role&&Array.isArray(e.prompts)&&e.prompts.length>0)){const e=(e=>{try{const t=localStorage.getItem(`${ce}_prompts_${e}`);return t&&JSON.parse(t)||[]}catch{return[]}})(s);e.length>0&&D(t=>{const n=[...t];for(let t=n.length-1;t>=0;t-=1)if("assistant"===n[t].role){n[t]={...n[t],prompts:e};break}return n})}}}}else if(nn.current||(nn.current=!0),e&&rt===e.conversationId){const e=Re();console.warn(`[Session] Rotating expired ID ${rt} -> ${e}`),me(s,rt),at(e)}else e?.conversationId&&e.conversationId!==rt&&me(s,e.conversationId),e&&e.conversationId===rt||ve(s,rt,{settingsSnapshot:JSON.stringify({value:S,unit:x?.toUpperCase()})})},[s,rt,a,S,x]);const cn=e.useRef(null);e.useEffect(()=>{if(!a||!s||!rt)return;if(cn.current===rt)return;cn.current=rt;let e=!1;return(async()=>{try{const t={};if("function"==typeof l){const e=await l();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${a.replace(/\/$/,"")}/api/v1/widget/history/${encodeURIComponent(rt)}`,{headers:t,credentials:"include"});if(e)return;if(n.status===h)return void ot.current(null);if(!n.ok)return;const r=await n.json(),o=(Array.isArray(r?.messages)?r.messages:[]).filter(te);!e&&r?.csatRequest&&dt(r.csatRequest),e||Zt(o),e||"human"!==r?.responder||(yt({recordPoint:!1}),Jt())}catch{}})(),()=>{e=!0}},[a,s,rt,l,Jt,yt,Zt]),e.useEffect(()=>{if(s&&L&&0!==L.length)for(let e=L.length-1;e>=0;e-=1){const t=L[e];if("assistant"===t?.role&&Array.isArray(t.prompts)&&t.prompts.length>0)return void xe(s,t.prompts)}},[L,s]),e.useEffect(()=>{He||q||L.length<=T.cap||D(e=>pe(e,T.cap,T.trimBatch))},[L.length,He,q,T.cap,T.trimBatch]),e.useEffect(()=>{s&&rt&&(He||q||ge(s,rt,Ie(L,Ke),T))},[L,Ke,s,rt,He,q,T]),e.useEffect(()=>{s&&rt&&nn.current&&((e,t,n)=>{if(e&&t)try{const r=(Array.isArray(n)?n:[]).filter(e=>"string"==typeof e&&e).slice(-20);0===r.length?localStorage.removeItem(`${de}_${e}_${t}`):localStorage.setItem(`${de}_${e}_${t}`,JSON.stringify(r))}catch{}})(s,rt,mt)},[mt,s,rt]),e.useEffect(()=>{if(!v||Pe)return;_e(g).length>0&&fe(!0)},[v,Pe,g]),e.useEffect(()=>{t&&!rn.current&&D(e=>{if(!e.length)return[{...Oe({id:Date.now().toString(),role:"assistant",content:je}),isWelcome:!0}];const[t,...n]=e;return t.isWelcome?[{...t,content:je},...n]:e})},[t,je]),e.useCallback(e=>{D(t=>t.map(t=>t.id===e.id?{...t,...e.update(t)}:t))},[]);const un=e.useCallback((e,t={})=>{if(!e)return;const n=t.replaceMarker||null;D(t=>[...n?(t||[]).filter(e=>e?.metadata?.synthesizedKind!==n):t||[],Oe({id:tn(),role:"assistant",content:e,metadata:n?{synthesizedKind:n}:void 0})])},[tn]),dn=e.useCallback(()=>{try{H.current&&H.current.abort()}catch{}},[]),pn=e.useCallback(async(e,t,r)=>{const o=String(e??"").trim(),i=Array.isArray(r?.attachments)?r.attachments:[],c=r?.userMessageId||Ne(),u=r?.assistantMessageId||Ne();if(!o&&0===i.length)return{success:!1,error:"Message cannot be empty"};if(qe.current)return{success:!1,error:"A message is already being sent"};qe.current=!0;const d=Ge.current+=1,p=()=>{Ge.current===d&&(G(!1),qe.current=!1)};if("Connect with a human representative"===o){const e=async()=>{if(a&&rt){const e={"Content-Type":"application/json"};if("function"==typeof l){const t=await l();t&&(e.Authorization=`Bearer ${t}`)}fetch(`${a.replace(/\/$/,"")}/api/v1/widget/handoff/${encodeURIComponent(rt)}`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({reason:"User clicked handoff button"})}).then(e=>{e.status===h&&ot.current(null)}).catch(()=>{})}};yt(),Jt(e)}if(t&&!["inquiry","complaint","technical"].includes((t||"").toLowerCase())||(ie.current=o,oe(o)),!a)return qe.current=!1,D(e=>[...e||[],Oe({id:tn(),role:"assistant",content:A("connectionError"),isProcessing:!1,isError:!0})]),console.error("Chat widget configuration error: apiBaseUrl is required for streaming."),{success:!1,error:"API base URL is required"};const g=["inquiry","complaint","technical","userName","email","phone","fullname","mobileno"];let v="inquiry";if(t){const e=t.toLowerCase();"fullname"===e||"name"===e?v="userName":"email"===e?v="email":"phone"===e||"mobileno"===e?v="phone":g.includes(e)&&(v=e)}let w=null;const S=(e,t)=>{null!=e&&D(n=>(n||[]).map(n=>n.id===e?{...n,status:t}:n))};if("inquiry"===v||"complaint"===v||"technical"===v){w=tn();const e={...Oe({id:w,role:"user",content:o,...i.length?{attachments:i}:{}}),userMessageId:c,assistantMessageId:u};D(t=>{const n=(t||[]).map(e=>"assistant"===e.role&&e.prompts?.length?{...e,prompts:void 0}:e);return r&&r.skipUserAppend?n:[...n,e]}),$(""),bt.current||G(!0)}else $("");try{const e={message:o,type:v,conversationId:rt,userMessageId:c,assistantMessageId:u,enable_citation:f??!0,channel:"WIDGET",...Wt.current?{fingerprintId:Wt.current}:{},...Yt.current?{visitor:Yt.current}:{},...Y&&(Y.category||Y.tags&&Y.tags.length)?{filter:Y}:{},...J.current?{routing:J.current}:{},...i.length?{attachments:i}:{},...r?.toolConfirmation?{tool_confirmation:r.toolConfirmation}:{},...r?.verificationComplete?{verification_complete:r.verificationComplete}:{},messageHistory:L.filter(e=>!e.isProcessing&&e.content&&e.content.trim()&&!["userName","email","phone"].includes(e.type)).map(e=>{let t;return t=e.timestamp instanceof Date?e.timestamp.toISOString():"string"==typeof e.timestamp?e.timestamp:e.timestamp?new Date(e.timestamp).toISOString():(new Date).toISOString(),{id:e.id,role:e.role,content:e.content,timestamp:t,isProcessing:!1}})},t=[500,1500];if("userName"===v||"email"===v||"phone"===v){const t=(await y(e,a,l)).getReader(),n=new TextDecoder;for(;;){const{done:e,value:r}=await t.read();if(e)break;n.decode(r)}return{success:!0}}if(bt.current&&("inquiry"===v||"complaint"===v||"technical"===v)){try{const t=(await y(e,a,l)).getReader();for(;;){const{done:e}=await t.read();if(e)break}}catch(e){if(e instanceof b)throw e;return console.error("Error sending message (handed off):",e),S(w,"failed"),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}return S(w,"sent"),we(s),{success:!0}}if("inquiry"===v||"complaint"===v||"technical"===v){let n;for(let r=0;r<=t.length;r+=1)try{H.current=new AbortController;const t=await y(e,a,l,H.current.signal);return await O(t,D,p,()=>{yt(),Jt()}),S(w,"sent"),we(s),{success:!0}}catch(e){if(n=e,e&&"AbortError"===e.name)return D(e=>(e||[]).filter(e=>!e.isProcessing)),S(w,"sent"),{success:!0,stopped:!0};if(e instanceof m&&r<t.length){D(e=>(e||[]).filter(e=>!e.isProcessing));const n=t[r];console.warn(`[chat] stream dropped (attempt ${r+1}); retrying in ${n}ms - ${e.message}`),await new Promise(e=>setTimeout(e,n));continue}throw e}throw n}return await y(e,a,l),we(s),{success:!0}}catch(e){if(e instanceof b){const e="inquiry"===v||"complaint"===v||"technical"===v;return ot.current(e?{text:o,attachments:i,sessionId:rt}:null),{success:!1,error:"conversation_erased",erased:!0}}return console.error("Error sending message:",e),"inquiry"!==v&&"complaint"!==v&&"technical"!==v||(G(!1),S(w,"failed"),console.error("[widget] send failed before any token; showing the org fallback. This is a FAILED TURN, not a knowledge gap."),D(e=>[...(e||[]).filter(e=>!e.isProcessing),Oe({id:tn(),role:"assistant",content:n?.trim()||A("connectionError"),isProcessing:!1,isError:!0})])),{success:!1,error:e instanceof Error?e.message:"Failed to send message"}}finally{p()}},[a,i,tn,l,L,rt,X,Y,f]);e.useEffect(()=>{const e=it.current;e&&e.sessionId!==rt&&(it.current=null,pn(e.text,void 0,{attachments:e.attachments}))},[rt,pn]);const fn=e.useCallback(e=>e&&"failed"===e.status?(D(t=>(t||[]).filter(t=>t.id!==e.id)),pn(e.content,void 0,{attachments:e.attachments,userMessageId:e.userMessageId,assistantMessageId:e.assistantMessageId})):Promise.resolve({success:!1,error:"Nothing to retry"}),[pn]),gn=e.useCallback(async e=>{const t=_e(g);if(0===t.length)return;const n=function(e,t){if(!Array.isArray(e)||!t)return"";for(let n=0;n<e.length;n+=1){const r=e[n],a=r?r.fieldType:void 0,o=ke(a).toLowerCase();if(!Ae.has(o))continue;const i=t[null==a?"":a];if("string"!=typeof i)continue;const s=i.trim();if(s)return s}return""}(t,e);fe(!1),Le(!0),((e,t)=>{try{const n=be(e);if(!n)return;n.onboardingCompleted=!0;const r=(t??"").trim();r&&(n.onboardingName=r),localStorage.setItem(`${ce}_${e}`,JSON.stringify(n))}catch{}})(s,n),n&&Me(n),ze(t=>({...t,...e})),Fe&&!$e.current&&($e.current=!0,$(Fe),Be(null));const r=[...t].sort((e,t)=>le(e.fieldType)-le(t.fieldType)),o={};for(const t of r){const n=t.fieldType||"question",r=(e[n]??"").trim();r&&(o[n]=r)}if(Object.keys(o).length>0&&a&&rt)try{await(async(e,{conversationId:t,organizationId:n},r,a)=>{const o={"Content-Type":"application/json"};if("function"==typeof a){const e=await a();e&&(o.Authorization=`Bearer ${e}`)}const i=await fetch(`${r.replace(/\/$/,"")}/api/v1/support/onboarding`,{method:"POST",headers:o,credentials:"include",body:JSON.stringify({conversationId:t,organizationId:n,answers:e})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return i.json()})(o,{conversationId:rt,organizationId:s},a,l)}catch(e){console.error("[onboarding] failed to save onboarding answers",e)}},[g,Fe,s,a,rt,l]),mn=e.useRef(null);e.useEffect(()=>{if(q||qe.current||!mn.current)return;const{text:e,attachments:t}=mn.current;mn.current=null;const n=Array.isArray(t)&&t.length>0;pn(e,void 0,n?{attachments:t}:void 0)},[q,pn]);const hn=e.useCallback(async(e,t)=>{const n=String(e??z.current).trim(),r=Array.isArray(t)&&t.length>0;if(n||r)return qe.current?(mn.current={text:n,attachments:r?t:void 0},void $("")):void await pn(n,void 0,r?{attachments:t}:void 0)},[pn,$]),bn=e.useCallback(async(e,t)=>{await hn(e,t)},[hn]),yn=e.useCallback(async e=>{const t=e?.trim();t&&await pn(t)},[pn]),vn=e.useCallback(async(e,t,n)=>{if(D(t=>t.filter(t=>t.decisionData?.decisionId!==e)),"routing-clarification"===e){const e=String(n||"").toLowerCase(),r="database"===t||"knowledge"===t?t:"database"===e||"knowledge"===e?e:null;if(r){J.current=r,Q(r);const e=ie.current;ie.current=null,oe(null),e&&e.trim()&&setTimeout(()=>{pn(e,"inquiry",{skipUserAppend:!0}).catch(e=>console.warn("[routing-clarification] re-send failed:",e))},0)}return}if("connect_agent"===n){const e=Oe({id:tn(),role:"assistant",content:"Great! I'm setting up a connection with a live customer service agent. Please hold on for a moment while I transfer you."});D(t=>[...t,e])}else if("decline"===n){const e=Oe({id:tn(),role:"assistant",content:"I understand. I apologize that I don't have specific information about your query in my knowledge base. Is there anything else I can help you with?"});D(t=>[...t,e])}},[tn,pn,ae]);e.useCallback(()=>{Pt.current&&(Xe(e=>e.map(e=>e.id===Pt.current?{...e,isProcessing:!1}:e)),Pt.current=null)},[]);const wn=e.useCallback((e,t=!1)=>{if(Ut.current=!0,!e||"string"==typeof e&&!e.trim())return void(t&&Pt.current&&(Xe(e=>e.map(e=>e.id===Pt.current?{...e,isProcessing:!1}:e)),Pt.current=null));const n=re(e);Xe(e=>{const r=e.length;let a=[...e];if(Pt.current){if(a.some(e=>e.id===Pt.current))a=a.map(e=>{if(e.id!==Pt.current)return e;const r=re(`${e.content||""}${n}`);return{...e,content:r,isProcessing:!t,metadata:{...e.metadata,transcriptionType:"input"}}});else{console.error("[BIDI] appendUserTranscription: ERROR - user message not found!",{expectedId:Pt.current,existingIds:a.map(e=>e.id)});const e=`bidi-input-${Date.now()}`;Pt.current=e;const r=Oe({id:e,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});a=[...a,r],console.log("[BIDI] appendUserTranscription: recreated lost user message",{messageId:e})}}else{const r=`bidi-input-${Date.now()}`,o=e.filter(e=>"assistant"===e.role&&"bidi"===e.metadata?.source).sort((e,t)=>{const n=e.timestamp instanceof Date?e.timestamp.getTime():new Date(e.timestamp).getTime();return(t.timestamp instanceof Date?t.timestamp.getTime():new Date(t.timestamp).getTime())-n})[0];o&&(o.timestamp instanceof Date?o.timestamp.getTime():new Date(o.timestamp).getTime());const i=Oe({id:r,role:"user",content:n,isProcessing:!t,metadata:{source:"bidi",transcriptionType:"input"}});a.some(e=>e.id===r)?(console.warn("[BIDI] appendUserTranscription: message already exists, updating instead",{messageId:r}),Pt.current=r,a=a.map(e=>e.id===r?{...e,content:`${e.content||""}${n}`,isProcessing:!t}:e)):(a=[...a,i],Pt.current=r)}return a.length<r?(console.error("[BIDI] appendUserTranscription: CRITICAL ERROR - losing messages!",{prevLength:r,resultLength:a.length,prevIds:e.map(e=>({id:e.id,role:e.role,contentLength:e.content?.length||0})),resultIds:a.map(e=>({id:e.id,role:e.role,contentLength:e.content?.length||0}))}),e):a}),t&&(Pt.current=null,G(!0))},[]),Sn=e.useCallback((e,t=!1)=>{if(G(!1),console.log("[BIDI] appendAssistantContent called",{textLength:e?.length||0,finished:t,currentAssistantId:Lt.current,currentInputId:Pt.current}),!e||"string"==typeof e&&!e.trim())return console.log("[BIDI] appendAssistantContent: skipping empty text"),void(t&&Lt.current&&(Xe(e=>e.map(e=>e.id!==Lt.current?e:{...e,isProcessing:!1})),Lt.current=null,jt.current=null));const n=`${Lt.current||"new"}-${e.substring(0,100)}-${t}`;if(Ft.current&&Bt.current===n)return;Ft.current=!0,Bt.current=n;const r=Pt.current;if(Xe(n=>{const a=n.length;let o=[...n];if(console.log("[BIDI] appendAssistantContent: starting update",{prevLength:a,prevMessageIds:n.map(e=>e.id),inputMessageIdToFinalize:r,currentAssistantId:Lt.current,textLength:e.length}),r){o.some(e=>e.id===r)?o=o.map(e=>e.id===r?{...e,isProcessing:!1}:e):console.warn("[BIDI] appendAssistantContent: input message not found for finalization",{inputMessageId:r,existingIds:o.map(e=>e.id)})}if(Lt.current){if(o.some(e=>e.id===Lt.current))o=o.map(n=>{if(n.id!==Lt.current)return n;const r=`${n.content||""}${e}`;return console.log("[BIDI] appendAssistantContent: updating existing message",{messageId:n.id,oldContentLength:n.content?.length||0,newContentLength:r.length,textLength:e.length}),{...n,content:r,isProcessing:!t,...Array.isArray(Vt.current)&&Vt.current.length>0?{sources:Vt.current}:{}}}),Array.isArray(Vt.current)&&Vt.current.length>0&&(Vt.current=null);else{console.error("[BIDI] appendAssistantContent: ERROR - assistant message not found!",{expectedId:Lt.current,existingIds:o.map(e=>e.id)});const n=`bidi-assistant-${Date.now()}`;Lt.current=n;const r=Oe({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(Vt.current)&&Vt.current.length>0&&(r.sources=Vt.current,Vt.current=null),o=[...o,r],console.log("[BIDI] appendAssistantContent: recreated lost assistant message",{messageId:n})}}else{const n=`bidi-assistant-${Date.now()}`,r=Oe({id:n,role:"assistant",content:e,isProcessing:!t,metadata:{source:"bidi"}});Array.isArray(Vt.current)&&Vt.current.length>0&&(r.sources=Vt.current,Vt.current=null);o.some(e=>e.id===n)?(console.error("[BIDI] appendAssistantContent: ERROR - message ID collision!",{messageId:n,existingIds:o.map(e=>e.id)}),o=o.map(r=>r.id===n?{...r,content:`${r.content||""}${e}`,isProcessing:!t,...Array.isArray(Vt.current)&&Vt.current.length>0?{sources:Vt.current}:{}}:r),Array.isArray(Vt.current)&&Vt.current.length>0&&(Vt.current=null),Lt.current=n):(o=[...o,r],Lt.current=n)}return console.log("[BIDI] appendAssistantContent: atomic state update complete",{prevLength:a,newLength:o.length,finished:t,messageIds:o.map(e=>e.id),messageRoles:o.map(e=>e.role)}),o.length<a?(console.error("[BIDI] appendAssistantContent: CRITICAL ERROR - losing messages!",{prevLength:a,resultLength:o.length,prevIds:n.map(e=>({id:e.id,role:e.role,contentLength:e.content?.length||0})),resultIds:o.map(e=>({id:e.id,role:e.role,contentLength:e.content?.length||0}))}),n):o}),r&&(Pt.current=null),t)console.log("[BIDI] appendAssistantContent: finalizing message",{messageId:Lt.current}),Lt.current=null,jt.current=null;else{const e=updateKey;Promise.resolve().then(()=>{jt.current===e&&(jt.current=null)})}},[]),xn=e.useCallback((e,t=!1,n=!1)=>{if(console.log("[BIDI] handleContentParts called",{partsCount:e?.length,finished:t,audioOnly:n}),!e||!Array.isArray(e))return void console.warn("[BIDI] handleContentParts: invalid parts",e);let r="";e.forEach((e,t)=>{e.inlineData?.data&&e.inlineData.mimeType?.startsWith("audio/pcm")&&(console.log("[BIDI] handleContentParts: sending audio data to player"),St.current?St.current.port.postMessage((e=>{if("undefined"==typeof window)return new ArrayBuffer(0);let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4!=0;)t+="=";const n=window.atob(t),r=n.length,a=new Uint8Array(r);for(let e=0;e<r;e+=1)a[e]=n.charCodeAt(e);return a.buffer})(e.inlineData.data)):console.warn("[BIDI] handleContentParts: audioPlayerNodeRef is null")),!n&&e.text&&(r+=e.text,console.log("[BIDI] handleContentParts: accumulated text part",{textLength:e.text.length,index:t,totalAccumulated:r.length}))}),r&&(console.log("[BIDI] handleContentParts: calling appendAssistantContent once",{textLength:r.length,finished:t}),Sn(r,t))},[Sn]),kn=e.useCallback(()=>{G(!1),console.log("[BIDI] handleTurnComplete called",{currentAssistantId:Lt.current,currentInputId:Pt.current}),Xe(e=>{const t=e.map(e=>"bidi"===e.metadata?.source&&e.isProcessing?{...e,isProcessing:!1}:e);return console.log("[BIDI] handleTurnComplete: state update",{prevLength:e.length,newLength:t.length,finalizedCount:e.filter(e=>"bidi"===e.metadata?.source&&e.isProcessing).length}),t}),Lt.current=null,Pt.current=null,zt.current=!1,$t.current=!1,Vt.current=null},[]),En=e.useCallback(()=>{G(!1),St.current&&St.current.port.postMessage({command:"endOfAudio"}),Lt.current=null,Pt.current=null,$t.current=!1,Vt.current=null,Xe(e=>e.map(e=>"bidi"===e.metadata?.source?{...e,isProcessing:!1,metadata:{...e.metadata,interrupted:!0}}:e))},[]),An=e.useCallback(()=>{Ye(!1),G(!1),Mt.current=!1,Qe("idle"),et(null),Ut.current=!1,Vt.current=null,Et.current&&clearTimeout(Et.current),Et.current=null,kt.current=!1,Rt.current&&(clearTimeout(Rt.current),Rt.current=null);const e=wt.current;if(wt.current=null,e&&e.readyState!==WebSocket.CLOSED)try{e.close()}catch{}St.current?.disconnect(),xt.current?.close(),St.current=null,xt.current=null,Tt.current?.disconnect(),Ct.current?.close(),Tt.current=null,Ct.current=null,j(Ot.current),Ot.current=null,It.current?.reset(),It.current=null,Dt.current=!1},[]),Tn=e.useCallback(e=>{if(console.log("[BIDI] handleBidiEvent called",{event:e,isVoiceSessionActive:Mt.current,hasTurnComplete:!!e?.turnComplete,hasInterrupted:!!e?.interrupted,hasInputTranscription:!!e?.inputTranscription,hasOutputTranscription:!!e?.outputTranscription,hasContentParts:!!e?.content?.parts}),!e)return void console.warn("[BIDI] handleBidiEvent: received null/undefined event");e.error&&"AI_CREDITS_EXHAUSTED"!==e.code&&(console.warn("[BIDI] voice error from backend",e.error),et("voiceUnavailable"));const t=function(e){if(!e)return null;if(e.interrupted)return"discard";const t=e.inputTranscription;return t?String(t.text??"").trim()?"discard":t.finished?"resume":null:null}(e);t&&At(t);const n=e.conclusion_detected??e.conclusionDetected;if("boolean"==typeof n&&n&&(Ht.current?.(),nt(!0)),"boolean"==typeof n&&n)return An(),void Xe(e=>{const t=[...e];for(let e=t.length-1;e>=0;e--)if("assistant"===t[e].role){t[e]={...t[e],conclusionDetected:!0};break}return t});if(e.interrupted)return console.log("[BIDI] handleBidiEvent: processing interrupted"),void En();if(e.inputTranscription){const t=e.inputTranscription.text||"",n=Boolean(e.inputTranscription.finished);console.log("[BIDI] handleBidiEvent: processing inputTranscription",{textLength:t.length,finished:n,hasText:!!t}),t||n?(we(s),wn(t,n)):console.warn("[BIDI] handleBidiEvent: inputTranscription event has no text and not finished",e.inputTranscription)}const r=e.sources??e.Sources;if(Array.isArray(r)&&r.length>0){const e=r.map(e=>({source_type:e.source_type??e.sourceType??"file",source_id:e.source_id??e.sourceid??e.sourceId,source_name:e.source_name??e.sourceName??"",url:e.url,citation_indices:e.citation_indices??e.citationIndices})).filter(e=>e.source_id||e.url||"database"===e.source_type);if(0===e.length)return;Xe(t=>{const n=[...t];let r=!1;for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],sources:e},r=!0;break}return r||(Vt.current=e),n})}const a=e.finalTranscript??e.finaltranscript;if(a&&"string"==typeof a.text){const e=a.text;return void(e&&Xe(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],content:e,isProcessing:!1};break}return n}))}const o=function(e){const t=e?.greeting?.text;if("string"!=typeof t)return null;const n=t.trim();return""===n?null:n}(e);if(o)return $t.current=!0,void Xe(e=>function(e,t,n,r,a){if(n){const r=e.findIndex(e=>e.id===n);if(r>=0){const n=[...e];return n[r]={...n[r],content:t},n}}return[...e,...r||[]].some(e=>"assistant"===e.role&&"string"==typeof e.content&&e.content.trim()===t)?e:[...e,a(t)]}(e,o,qt.current,Gt.current,e=>Oe({id:`bidi-greeting-${Date.now()}`,role:"assistant",content:e,metadata:{source:"bidi"}})));if($t.current&&!Ut.current)return e.content?.parts&&xn(e.content.parts,Boolean(e.content?.finished||e.finished),!0),void(e.turnComplete&&kn());if(Ut.current||!e.outputTranscription?.text&&!e.content?.parts){if(e.outputTranscription?.text&&(zt.current=!0,Sn(e.outputTranscription.text,Boolean(e.outputTranscription.finished))),e.content?.parts){const t=e.content?.finished||e.finished||!1;xn(e.content.parts,t,zt.current)}if(e.prompts&&Array.isArray(e.prompts)&&e.prompts.length>0){console.log("[BIDI] handleBidiEvent: attaching prompts to last assistant message",{count:e.prompts.length}),Xe(t=>{const n=[...t];for(let t=n.length-1;t>=0;t--)if("assistant"===n[t].role){n[t]={...n[t],prompts:e.prompts};break}return n});try{xe(s,e.prompts)}catch(e){}}e.turnComplete?kn():e.interrupted||e.inputTranscription||e.outputTranscription||e.content||e.prompts||console.warn("[BIDI] handleBidiEvent: event had no recognized fields",e)}else e.turnComplete&&kn()},[Sn,wn,xn,En,kn,An,At]),Cn=e.useCallback(e=>{if(!Mt.current)return;const t=It.current;if(t)return void t.process(e);const n=wt.current;n&&n.readyState===WebSocket.OPEN&&n.send(e)},[]),On=e.useCallback(async()=>{if(!Dt.current&&"undefined"!=typeof window)try{const[e,t]=await async function(){if("undefined"==typeof window)throw new Error("Audio player can only be initialized in the browser");const e=new AudioContext({sampleRate:24e3}),t=new Blob(["\n class PCMPlayerProcessor extends AudioWorkletProcessor {\n constructor() {\n super();\n this.bufferSize = 24000 * 180;\n this.buffer = new Float32Array(this.bufferSize);\n this.writeIndex = 0;\n this.readIndex = 0;\n // Paused while the caller may be speaking over the reply (lib/audio/bargeIn.js).\n this.paused = false;\n this.port.onmessage = (event) => {\n const command = event.data?.command;\n if (command === 'endOfAudio') {\n this.readIndex = this.writeIndex;\n this.paused = false;\n return;\n }\n if (command === 'pause') {\n this.paused = true;\n return;\n }\n if (command === 'resume') {\n this.paused = false;\n return;\n }\n const int16Samples = new Int16Array(event.data);\n this.enqueue(int16Samples);\n };\n }\n\n enqueue(samples) {\n for (let i = 0; i < samples.length; i += 1) {\n const floatVal = samples[i] / 32768;\n this.buffer[this.writeIndex] = floatVal;\n this.writeIndex = (this.writeIndex + 1) % this.bufferSize;\n if (this.writeIndex === this.readIndex) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n }\n\n process(inputs, outputs) {\n const output = outputs[0];\n const framesPerBlock = output[0].length;\n for (let frame = 0; frame < framesPerBlock; frame += 1) {\n // Silence when paused or with nothing buffered.\n const playing = !this.paused && this.readIndex !== this.writeIndex;\n const sample = playing ? this.buffer[this.readIndex] : 0;\n output[0][frame] = sample;\n if (output.length > 1) {\n output[1][frame] = sample;\n }\n if (playing) {\n this.readIndex = (this.readIndex + 1) % this.bufferSize;\n }\n }\n return true;\n }\n }\n\n registerProcessor('pcm-player-processor', PCMPlayerProcessor);\n "],{type:"application/javascript"}),n=URL.createObjectURL(t);await e.audioWorklet.addModule(n);const r=new AudioWorkletNode(e,"pcm-player-processor");return r.connect(e.destination),URL.revokeObjectURL(n),[r,e]}();St.current=e,xt.current=t,await t.resume();const n=e=>{const t=wt.current;t&&t.readyState===WebSocket.OPEN&&t.send(e)};It.current=M({sampleRate:16e3},{onSpeechStart:()=>{$t.current&&!Ut.current||(St.current?.port.postMessage({command:"pause"}),kt.current=!0),Et.current&&clearTimeout(Et.current),Et.current=null;const e=wt.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"interrupt"}))},onVoiceFrame:n,onSpeechEnd:()=>{const e=wt.current;e&&e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({type:"audio_end"})),kt.current&&(Et.current&&clearTimeout(Et.current),Et.current=setTimeout(()=>At("resume"),4e3))}});const[r,a,o]=await F(Cn);Tt.current=r,Ct.current=a,Ot.current=o,await a.resume(),Dt.current=!0}catch(e){throw console.error("Failed to initialize audio pipeline",e),e}},[Cn,At]),In=e.useCallback(async()=>{if("undefined"==typeof window||!en)return;if(wt.current&&wt.current.readyState===WebSocket.OPEN)return;let e;Qe("connecting"),et(null),_t.current=!1;try{const t={"Content-Type":"application/json"};if("function"==typeof l){const e=await l();e&&(t.Authorization=`Bearer ${e}`)}const n=await fetch(`${a.replace(/\/$/,"")}/api/v1/widget/voice-ticket`,{method:"POST",headers:t,credentials:"include",body:JSON.stringify({sessionId:rt})});if(!n.ok)throw new Error(`voice-ticket ${n.status}`);if(e=(await n.json())?.ticket,!e)throw new Error("voice-ticket returned no ticket")}catch(e){return console.error("[BIDI] could not obtain a voice session ticket",e),Qe("error"),void et(ee(e))}try{const t=new WebSocket(`${en}?ticket=${encodeURIComponent(e)}`);wt.current=t,t.onopen=()=>{Qe("connected")},t.onmessage=e=>{try{const t="string"==typeof e.data?e.data.match(/^\{"([^"]+)"/)?.[1]||"text":"binary";console.log("[BIDI] WebSocket message received",{dataLength:e.data?.length,dataPreview:t});const n=JSON.parse(e.data);console.log("[BIDI] WebSocket message parsed",{hasTurnComplete:!!n.turnComplete,hasInterrupted:!!n.interrupted,hasInputTranscription:!!n.inputTranscription,hasOutputTranscription:!!n.outputTranscription,hasContentParts:!!n.content?.parts,payload:n}),n&&"AI_CREDITS_EXHAUSTED"===n.code&&"string"==typeof n.fallbackMessage&&n.fallbackMessage.trim()&&(Nt.current=n.fallbackMessage.trim()),n&&"AI_CREDITS_EXHAUSTED"===n.code&&(_t.current=!0),Tn(n)}catch(t){console.error("[BIDI] Failed to parse WebSocket event",{error:t,data:e.data})}},t.onerror=()=>{Qe("error"),_t.current||et("voiceUnavailable"),G(!1)},t.onclose=e=>{if(wt.current===t){if(wt.current=null,Qe("idle"),G(!1),e&&1008===e.code){Mt.current=!1,Ye(!1),Qe("error");return(_t.current||String(e.reason||"").startsWith("AI_CREDITS_EXHAUSTED"))&&Nt.current||et("voiceUnavailable"),void(()=>{const e=Nt.current;Nt.current=null,e&&D(t=>{const n=[...t].reverse().find(e=>"assistant"===e.role);return n&&"string"==typeof n.content&&n.content.trim()===e?t:[...t,Oe({id:tn(),role:"assistant",content:e})]})})()}Mt.current&&(Rt.current&&clearTimeout(Rt.current),Rt.current=setTimeout(()=>{Rt.current=null,In()},5e3))}}}catch(e){console.error("Failed to open voice websocket",e),Qe("error"),et(ee(e))}},[Tn,en,a,rt,l]),Rn=e.useCallback(async()=>{if(p&&s){et(null),Qe(e=>"connected"===e?e:"connecting"),Ye(!0),Mt.current=!0,nt(!1),Ut.current=!1,$t.current=!1,qt.current=null,Xe(e=>{if(e.length>0||L.length>0)return e;if(!t||""===t.trim())return[];const n=Oe({id:`bidi-welcome-${Date.now()}`,role:"assistant",content:je,metadata:{source:"bidi"}});return qt.current=n.id,[n]}),In();try{await On()}catch(e){console.error("Failed to start audio pipeline",e),et(ee(e)),Qe("error")}}},[p,s,t,je,In,On,L]),Nn=e.useCallback(()=>{We?An():"connecting"!==Ze&&Rn()},[We,Rn,An,Ze]),_n=e.useCallback(e=>{const t=e.trim();if(!t)return;Ut.current=!0;const n=wt.current;if(!n||n.readyState!==WebSocket.OPEN)return void(_t.current||et("voiceUnavailable"));n.send(JSON.stringify({type:"text",text:t})),we(s),G(!0);const r=Oe({id:`bidi-user-${Date.now()}`,role:"user",content:t,metadata:{source:"bidi"}});Xe(e=>[...e,r]),$("")},[]);e.useEffect(()=>{Mt.current=We},[We]),e.useEffect(()=>()=>{Mt.current=!1,Rt.current&&(clearTimeout(Rt.current),Rt.current=null);const e=wt.current;if(wt.current=null,e&&e.readyState!==WebSocket.CLOSED)try{e.close()}catch{}It.current?.reset(),It.current=null,St.current?.disconnect(),xt.current?.close(),Tt.current?.disconnect(),Ct.current?.close(),j(Ot.current),Ot.current=null,Dt.current=!1},[]);const Pn=e.useCallback(()=>{(e=>{try{const t=be(e);localStorage.removeItem(`${ce}_${e}`),t?.conversationId&&me(e,t.conversationId)}catch{}})(s),xe(s,[]),K(null),Q(null),oe(null),J.current=null,ie.current=null,D([]),Xe([]),dt(null),ft([]),ht([]),me(s,rt),fe(!1),Le(!1),ze({}),Me(""),Be(null),$e.current=!1,Ut.current=!1,nn.current=!1,rn.current=!1,bt.current=!1,ct(!1),cn.current=null,Kt.current=null,st.current&&(st.current.close(),st.current=null);const e=Re();if(ve(s,e,{settingsSnapshot:JSON.stringify({value:S,unit:x?.toUpperCase()})}),at(e),t&&""!==t.trim()&&D([{...Oe({id:Date.now().toString(),role:"assistant",content:t}),isWelcome:!0}]),v){_e(g).length>0&&fe(!0)}},[s,rt,t,v,g,S,x]),Ln=e.useRef(Pn);e.useEffect(()=>{Ln.current=Pn},[Pn]);const Dn=e.useRef(null);e.useEffect(()=>{ot.current=e=>{if(Dn.current===rt)return;Dn.current=rt;const t=v&&_e(g).length>0;it.current=e&&!t?e:null,Ln.current()}},[rt,v,g]),e.useEffect(()=>{an.current=!1,on.current={value:null,unit:null}},[s]),e.useEffect(()=>{if(!s||!S)return;const e=he(S,x);if(!e)return;const t=on.current,n=an.current&&(t.value!==S||t.unit!==x);if(an.current=!0,on.current={value:S,unit:x},n)return console.warn("[Session] Inactivity timeout config changed - resetting conversation."),ln(!1),void Ln.current();let r=null;const a=()=>{const t=be(s);if(!t)return;if(!t.firstInteractionAt)return void(r=setTimeout(a,e));const n=new Date(t.lastActivity).getTime(),o=Date.now()-n,i=e-o;if(i<=0)return console.warn("[Session] Inactivity timeout reached! Resetting conversation immediately."),ln(!1),void Ln.current();const l=Math.max(1e4,Math.min(12e4,.1*e));ln(i<=l);r=setTimeout(a,i<=l?1e3:i-l)};return a(),()=>{r&&clearTimeout(r)}},[s,S,x,rt]);const Mn=e.useMemo(()=>r,[r]),jn=e.useMemo(()=>Ie(L,Ke),[Ke,L]);e.useEffect(()=>{We&&console.log("[BIDI] bidiMessages state changed",{count:Ke.length,messages:Ke.map(e=>({id:e.id,role:e.role,contentLength:e.content?.length||0,isProcessing:e.isProcessing,hasContent:!!e.content}))})},[Ke,We]);const Fn=e.useCallback((e,t)=>{D(n=>n.map(n=>"assistant"===n.role&&n.content===e?{...n,feedback:t}:n))},[]);return{conversationId:rt,isOpen:C,isMinimized:R,isDark:_,messages:jn,inputValue:B,isLoading:q,isConversationLoading:He,widgetRef:V,quickQuestions:Mn,isVoiceSessionActive:We,voiceStatus:Ze,voiceError:Je,voiceConclusionForCsat:tt,onboardingQuestions:g,onboardingActive:se,onboardingCompleted:Pe,handleOnboardingFormSubmit:gn,widgetFilter:Y,setWidgetFilter:K,addAssistantMessage:un,setInputValue:$,handleSend:bn,stopGeneration:dn,handleQuickQuestion:yn,sendMessage:pn,retryMessage:fn,toggleChat:()=>{I(e=>!e),N(!1)},toggleTheme:()=>{P(e=>!e)},toggleMinimize:()=>{N(e=>!e)},closeChat:()=>{I(!1)},handleDecision:vn,handleVoiceToggle:Nn,sendBidiTextMessage:_n,sessionExpiringSoon:sn,resetConversation:Pn,updateMessageFeedback:Fn,isHandedOff:lt,handoffPoints:mt,csatRequest:ut,liveJoined:pt}},Le=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),De=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Me=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v0.575.0 - ISC
|
|
4
4
|
*
|
|
@@ -17,7 +17,7 @@ var je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the ISC license.
|
|
19
19
|
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/let bt=null;function yt(t){e.useEffect(()=>{if(!ft||!t)return;const e=t.split(",")[0]?.trim();if(!e||ht.has(e))return;if((e=>{const t=e.trim().toLowerCase();return!t||!!gt.has(t)||mt.some(e=>t.includes(e))})(e))return void ht.add(e);let n=!0;return(async()=>{try{bt||(bt=Promise.resolve().then(function(){return qa}));const t=await bt,r=t&&"default"in t?t.default:t,a=(e=>e.trim().replace(/\s+/g,"+"))(e);r.load({google:{families:[`${a}:300,400,500,600,700`]},fontactive:e=>{n&&ht.add(e)},fontinactive:e=>{n&&ht.add(e),console.warn(`Warning: failed to load Google Font: ${e}`)}})}catch(e){console.error("Warning: WebFont loader error:",e)}})(),()=>{n=!1}},[t])}function vt(e){return"string"==typeof e&&/^https?:\/\//i.test(e)?e:void 0}const wt=/(?:eshal-ui|eshal-chart|chart)\b/;const St=["card","confirmation","alert"];function xt(e){return"string"==typeof e?e.trim():"number"==typeof e&&isFinite(e)?String(e):""}function kt(e){if(!e||"object"!=typeof e)return"";const t=xt(e.value);if(!t)return"";const n=xt(e.label);return n?n+": "+t:t}function Et(e){let t;try{t=JSON.parse(e)}catch(e){return""}if(!t||"object"!=typeof t||Array.isArray(t))return"";const n=function(e){return String(e||"").trim().toLowerCase().replace(/_/g,"-")}(t.type);if(St.indexOf(n)<0)return"";const r=[],a=xt(t.title),o=xt(t.body);if(a&&r.push(a),o&&r.push(o),"card"===n&&Array.isArray(t.fields))for(let e=0;e<t.fields.length;e++){const n=kt(t.fields[e]);n&&r.push(n)}return r.join("\n")}function At(e){return e&&wt.test(e)?e.replace(/```[ \t]*(?:eshal-ui|eshal-chart|chart)\b[ \t]*\r?\n([\s\S]*?)```/g,function(e,t){return Et(t)}).replace(/\n{3,}/g,"\n\n").trim():e}const Tt="__eshalChatWidgetCitationContext",Ct="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0,Ot=Ct?Ct[Tt]||(Ct[Tt]=e.createContext(null)):e.createContext(null);function It(e){return!!e&&(function(e){return!!e&&String(e.source_id||e.sourceid||"").startsWith("attachment:")}(e)?"string"==typeof e.url&&e.url.length>0:!("string"!=typeof(t=e.url)||!t.includes("/api/v1/sharepoint/file/"))||Boolean(e.source_id));var t}function Rt(e,t){return"string"!=typeof e||""===e?"":/^https?:\/\//i.test(e)?e:t?`${String(t).replace(/\/$/,"")}${e.startsWith("/")?"":"/"}${e}`:e}function Nt(e){if(!/%[0-9a-f]{2}/i.test(e))return e;try{return decodeURIComponent(e)}catch{return e}}function _t(e){if(!e)return null;const t=/(?:^|;)\s*filename\*\s*=\s*([^;]+)/i.exec(e);if(t){const e=/^\s*"?([^']*)'[^']*'([^"]*)"?\s*$/.exec(t[1]),n=e?function(e,t){try{return/^utf-8$/i.test(e)?decodeURIComponent(t):t.replace(/%([0-9a-f]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))}catch{return null}}(e[1],e[2]):null;if(n)return n}const n=/(?:^|;)\s*filename\s*=\s*"((?:[^"\\]|\\.)*)"/i.exec(e);if(n)return Nt(n[1].replace(/\\(.)/g,"$1"))||null;const r=/(?:^|;)\s*filename\s*=\s*([^;]+)/i.exec(e);return r&&Nt(r[1].trim())||null}function Pt(){return Promise.resolve().then(function(){return o5})}const Lt=e.lazy(Pt);class Dt extends e.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error("[widget] markdown chunk failed to load, showing plain text:",e)}render(){return this.state.failed?this.props.fallback:this.props.children}}const Mt=/(```|`[^`]+`|(^|\n)\s{0,3}#{1,6}\s|(^|\n)\s*[-*+]\s|(^|\n)\s*\d+\.\s|(^|\n)\s*>\s|\[[^\]]*\]\([^)]*\)|\*\*|__|~~|(^|\n)\s*\||\[\d+\])/;const jt=({content:e,isDark:t,textColor:r,fontFamily:a,fontSize:o})=>n.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0 whitespace-pre-wrap break-words",style:{color:r||(t?"#f3f4f6":"#1A1A1A"),fontFamily:a||"Inter",fontSize:o||"14px",margin:0,lineHeight:"1.6",padding:0,overflowWrap:"break-word"},children:e}),Ft=({content:t,isStreaming:r,isDark:a=!1,isRtl:o=!1,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u=!0})=>{const[d,p]=e.useState(""),[f,g]=e.useState(!1),m=e.useRef(t),h=e.useRef(0),b=e.useRef(null),y=e.useRef(0);e.useEffect(()=>{if(t!==m.current){if(m.current=t,h.current>=t.length)return p(t),void g(!1);t.length<d.length&&(h.current=0,p(""))}if(!r)return p(t),g(!1),void(b.current&&cancelAnimationFrame(b.current));g(!0);const e=n=>{if(n-y.current<16)b.current=requestAnimationFrame(e);else if(y.current=n,h.current<t.length){const n=Math.max(2,Math.floor(4*Math.random())),r=Math.min(h.current+n,t.length);p(t.slice(0,r)),h.current=r,b.current=requestAnimationFrame(e)}else g(!1)};return b.current=requestAnimationFrame(e),()=>{b.current&&cancelAnimationFrame(b.current)}},[t,r]);const v=function(e){return"string"==typeof e&&0!==e.length&&Mt.test(e)}(d);return n.jsxs("div",{className:"relative",dir:"auto",style:{textAlign:o?"right":"left",color:i||(a?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",margin:0,padding:0},children:[v?n.jsx(Dt,{fallback:n.jsx(jt,{content:d,isDark:a,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(e.Suspense,{fallback:n.jsx(jt,{content:d,isDark:a,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(Lt,{content:d,isStreaming:r,isDark:a,isRtl:o,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u})})}):n.jsx(jt,{content:d,isDark:a,textColor:i,fontFamily:s,fontSize:l}),f&&n.jsx("span",{className:"inline-block w-1.5 h-4 bg-blue-500 ms-0.5 animate-pulse align-text-bottom",style:{animationDuration:"0.8s"}})]})},Bt=({isDark:e,t:t})=>n.jsxs("div",{className:"flex gap-1.5",role:"status","aria-label":t("agentIsTyping"),children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"0ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"150ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"300ms"},"aria-hidden":"true"})]}),Ut=({question:e,options:t,onDecision:r,disabled:a,isDark:o=!1})=>n.jsxs("div",{className:"mt-3 p-3 rounded-lg border "+(o?"bg-blue-900/30 border-blue-700/50":"bg-blue-50 border-blue-200"),children:[n.jsx("p",{className:"text-sm font-medium mb-2 "+(o?"text-gray-100":"text-gray-900"),children:e}),n.jsx("div",{className:"space-y-2",children:t.map(e=>n.jsx("button",{onClick:()=>r(e.id,e.label),disabled:a,className:"w-full text-left px-3 py-2 text-sm rounded transition-all "+(o?"bg-gray-800 border border-gray-700 hover:bg-blue-900/50 hover:border-blue-600 disabled:opacity-50 disabled:cursor-not-allowed":"bg-white border border-gray-300 hover:bg-blue-50 hover:border-blue-400 disabled:opacity-50 disabled:cursor-not-allowed"),children:e.label},e.id))})]});function zt({content:t,isDark:r,t:a}){const o=a?a("copyMessage"):"Copy message",i=a?a("copied"):"Copied",[s,l]=e.useState(!1),c=e.useCallback(()=>{t&&(navigator.clipboard?.writeText(t).catch(()=>{}),l(!0),setTimeout(()=>l(!1),1500))},[t]);return n.jsx("button",{type:"button",onClick:c,className:"p-0.5 rounded transition-colors "+(r?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":s?i:o,title:s?i:o,children:s?n.jsx(qe,{className:"w-3 h-3 text-green-500"}):n.jsx(Ye,{className:"w-3 h-3"})})}const $t=({message:t,formatTime:r,isDark:a,primaryColor:o,agentMessageBubbleColor:i,resolvedAgentBubbleColor:s,textColor:l,assistantTextColor:c,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,fontSize:f,isRtl:g,onDecision:m,companyLogo:h,conciergeName:b,companyName:y,apiBaseUrl:v,getAuthToken:w,onPromptSuggestionClick:S,allowFeedback:x=!0,provideCitations:k=!0,onFeedback:E,headerTextColor:A,t:T})=>{const C="string"==typeof t.content?t.content:"",O=e.useMemo(()=>At(C),[C]),I=t.isProcessing&&(!C||0===C.length),R=Y(C,g),[N,_]=e.useState(()=>t?.feedback??null),[P,L]=e.useState(!1),[D,M]=e.useState(null),[j,F]=e.useState(""),B=e.useRef(null),U=e.useCallback(e=>{if(E&&C){if(N===e)return _(null),L(!1),M(null),F(""),void E(C,null);if("like"===e)return _("like"),L(!1),M(null),F(""),void E(C,"like");_(null),M("dislike"),L(!0),F(""),setTimeout(()=>B.current?.focus(),100)}},[N,E,C]),z=e.useCallback(()=>{E&&C&&D&&(_(D),E(C,D,j.trim()||void 0),L(!1),F(""),M(null))},[E,C,D,j]),$=e.useCallback(()=>{L(!1),F(""),M(null)},[]),q=!0===t?.isError,G=q?a?"rgba(239,68,68,0.15)":"#fee2e2":null!=s?s:null!=i?i:a?"#1f2937":"#FFFFFF",H=null!=i&&"#ffffff"!==i&&"#FFFFFF"!==i&&"#1f2937"!==i,V=q?a?"#fca5a5":"#991b1b":null!=c?c:null!=l?l:a?"#f3f4f6":"#1A1A1A",W=null!=d?d:null!=u?u:"Inter",K=null!=p?p:null!=f?f:"14px";yt(W);const{onSourceActivate:X,downloadingKey:Z}=function({apiBaseUrl:t,getAuthToken:n}){const[r,a]=e.useState(null),o=e.useCallback(async e=>{if(!e)return;const r=e.url||e.source_id||e.sourceid||e.source_name||"",o=String(e.source_id||e.sourceid||"").startsWith("attachment:"),i="string"==typeof e.url&&e.url.includes("/api/v1/sharepoint/file/"),s="file"===e.source_type||i||o||!(!e.source_id&&!e.sourceid)&&!e.url;if(!s){const t=vt(e.url);if(t)try{window.open(t,"_blank","noopener,noreferrer")}catch{}return}if(t||o){a(r),console.debug("[widget] citation download starting:",{source_id:e.source_id||e.sourceid,source_name:e.source_name,source_type:e.source_type,isAttachment:o,isSharePointProxy:i,isFileLike:s});try{let r;if(o){if(!e.url)throw new Error("attachment has no URL");const a={};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(Rt(e.url,t),{method:"GET",headers:a,credentials:"include"})}else if(i){const a=Rt(e.url,t),o={};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}r=await fetch(a,{method:"GET",headers:o,credentials:"include"})}else{const a=`${t.replace(/\/$/,"")}/api/v1/support/file-download`,o={"Content-Type":"application/json"};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}r=await fetch(a,{method:"POST",headers:o,credentials:"include",body:JSON.stringify({source_id:e.source_id||e.sourceid,file_name:e.url||"",source_name:e.source_name||""})})}if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.details||e.error||r.statusText)}const a=await r.blob(),s=r.headers.get("content-disposition");let l=e.source_name||"download";o||(l=_t(s)||l);const c=document.createElement("a"),u=URL.createObjectURL(a);c.href=u,c.download=l,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(u)}catch(e){console.error("[widget] source download failed:",e)}finally{a(null)}}else console.warn("[widget] citation download skipped: apiBaseUrl missing and source is not an attachment (no fallback URL to fetch). Source:",e)},[t,n]);return{onSourceActivate:o,downloadingKey:r}}({apiBaseUrl:v,getAuthToken:w}),Q=e.useMemo(()=>({sources:t.sources||[],sourcesPreliminary:!!t.sourcesPreliminary,onSourceActivate:X,downloadingKey:Z,textColor:V,t:T}),[t.sources,t.sourcesPreliminary,X,Z,V,T]);return n.jsx(Ot.Provider,{value:Q,children:n.jsxs("div",{className:"flex gap-3 flex-row animate-in min-w-0",children:[n.jsx("div",{className:"flex-shrink-0 mt-1",children:n.jsx("div",{className:"w-8 h-8 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:o||"#2563eb"},children:h?n.jsx("div",{className:"w-full h-full bg-white/10 flex items-center justify-center",children:n.jsx("img",{src:h,alt:b||y||"Assistant avatar",className:"object-contain rounded-full",style:{width:"100%",height:"100%"}})}):n.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{fontSize:"18px",fontFamily:u||"Inter",color:A||"#FFFFFF"},children:(b||"A").charAt(0).toUpperCase()})})}),n.jsxs("div",{className:"flex flex-col items-start min-w-0 max-w-[75%]",children:[n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-sm border rounded-tl-sm rtl:rounded-tl-2xl rtl:rounded-tr-sm min-w-0 max-w-full overflow-hidden "+(H?"border-transparent":a?"border-gray-700":"border-gray-200"),style:{backgroundColor:G,color:V,fontFamily:W,fontSize:K,direction:R?"rtl":"ltr",textAlign:R?"right":"left",...H?{borderColor:`${G}33`}:{}},children:I?n.jsx(Bt,{isDark:a,t:T}):n.jsx(n.Fragment,{children:t.requiresDecision&&t.decisionData&&m?n.jsxs("div",{children:[C&&n.jsx("div",{className:"mb-3",children:n.jsx(Ft,{content:C,isStreaming:t.isProcessing,isDark:a,isRtl:R,textColor:V,fontFamily:W,fontSize:K,onButtonClick:S,provideCitations:k})}),n.jsx(Ut,{question:t.decisionData.question,options:t.decisionData.options,onDecision:(e,n)=>m(t.decisionData.decisionId,e,n),disabled:!!t.decisionResponse,isDark:a}),t.decisionResponse&&n.jsxs("div",{className:"mt-2 text-xs "+(a?"text-gray-400":"text-gray-500"),children:["Selected: ",t.decisionResponse.selectedOption]})]}):C?n.jsx(n.Fragment,{children:n.jsx(Ft,{content:C,isStreaming:t.isProcessing,isDark:a,isRtl:R,textColor:V,fontFamily:W,fontSize:K,onButtonClick:S,provideCitations:k})}):null})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(a?"text-gray-400":"text-gray-500"),dir:"auto",children:r(t.timestamp)}),!I&&!t.isProcessing&&O&&n.jsx(zt,{content:O,isDark:a,t:T}),!1!==x&&E&&!I&&!t.isProcessing&&C&&"welcome"!==t.type&&!t.isWelcome&&n.jsxs("div",{className:"flex items-center gap-0.5 ms-0.5",children:[n.jsx("button",{type:"button",onClick:()=>U("like"),className:"p-0.5 rounded transition-colors "+("like"===N||"like"===D?"text-green-500":a?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":T("like"),"aria-pressed":"like"===N,children:n.jsx(ut,{className:"w-3 h-3"})}),n.jsx("button",{type:"button",onClick:()=>U("dislike"),className:"p-0.5 rounded transition-colors "+("dislike"===N||"dislike"===D?"text-red-500":a?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":T("dislike"),"aria-pressed":"dislike"===N,children:n.jsx(ct,{className:"w-3 h-3"})})]})]}),P&&"dislike"===D&&n.jsxs("div",{className:"mt-2 w-full rounded-xl border p-3 shadow "+(a?"bg-gray-800 border-gray-700":"bg-white border-gray-200"),style:{direction:g?"rtl":"ltr"},children:[n.jsx("textarea",{ref:B,value:j,onChange:e=>F(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),z()):"Escape"===e.key&&(e.preventDefault(),$())},placeholder:T("feedbackPlaceholder"),"aria-label":T("feedbackPlaceholder"),rows:2,className:"w-full resize-none rounded-lg border px-2 py-1.5 text-xs focus:outline-none focus:ring-1 "+(a?"bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500 focus:ring-gray-600":"bg-white border-gray-200 text-gray-900 placeholder-gray-400 focus:ring-gray-300"),style:{fontFamily:W,textAlign:g?"right":"left"}}),n.jsxs("div",{className:"flex items-center justify-end gap-1.5 mt-1.5",children:[n.jsx("button",{type:"button",onClick:$,className:"text-xs px-2 py-1 rounded transition-colors "+(a?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),style:{border:"none",background:"transparent",cursor:"pointer"},children:T("cancel")}),n.jsx("button",{type:"button",onClick:z,className:"text-xs px-2.5 py-1 rounded text-white transition-opacity hover:opacity-90",style:{backgroundColor:o||"#2563eb",border:"none",cursor:"pointer"},children:T("submit")})]})]})]})]})})},qt=({message:e,formatTime:t,userMessageBoxColor:r,primaryColor:a,resolvedUserMessageColor:o,textColor:i,userTextColor:s,fontFamily:l,userMessageBubbleFontFamily:c,userMessageBubbleFontSize:u,fontSize:d,isDark:p,isRtl:f,t:g,onRetryMessage:m})=>{const h=null!=o?o:null!=r?r:null!=a?a:"#2563eb",b=null!=s?s:null!=i?i:"#FFFFFF",y=null!=c?c:null!=l?l:"Inter",v=null!=u?u:null!=d?d:"14px",w=Y("string"==typeof e?.content?e.content:"",f);yt(y);const S=Array.isArray(e.attachments)?e.attachments:[];return n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsxs("div",{className:"flex flex-col items-end max-w-[75%]",children:[S.length>0&&n.jsx("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:S.map((e,t)=>String(e.mimeType||"").startsWith("image/")&&e.url?n.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-md overflow-hidden",style:{maxWidth:160},title:e.filename,children:n.jsx("img",{src:e.url,alt:e.filename||"attachment",style:{maxWidth:160,maxHeight:160,display:"block"}})},e.storageKey||t):n.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs",style:{backgroundColor:p?"#1f2937":"#f3f4f6",color:p?"#e5e7eb":"#374151",border:"1px solid "+(p?"#374151":"#e5e7eb"),maxWidth:200},title:e.filename,children:[n.jsx(Qe,{size:12}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename})]},e.storageKey||t))}),e.content&&""!==e.content.trim()&&n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg "+(w?"rounded-tl-sm":"rounded-tr-sm"),dir:"auto",style:{background:`linear-gradient(135deg, ${h} 0%, ${h}dd 100%)`,fontFamily:y,direction:w?"rtl":"ltr",textAlign:w?"right":"left"},children:n.jsx("p",{className:"whitespace-pre-wrap break-words",dir:"auto",style:{color:b,fontFamily:y,fontSize:v,lineHeight:"1.5",textAlign:w?"right":"left",overflowWrap:"break-word",margin:0,padding:0},children:e.content})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(p?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),e.content&&""!==e.content.trim()&&n.jsx(zt,{content:e.content,isDark:p,t:g})]}),"failed"===e.status&&n.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1","data-testid":"message-failed-state",children:[n.jsx("span",{className:"text-xs leading-none",style:{color:"#dc2626"},dir:"auto",children:g("messageNotDelivered")}),"function"==typeof m&&n.jsx("button",{type:"button",onClick:()=>m(e),className:"text-xs leading-none font-medium underline",style:{color:"#dc2626"},dir:"auto",children:g("retrySend")})]})]})})},Gt=({message:t,isDark:r,primaryColor:a,agentMessageBubbleColor:o,userMessageBoxColor:i,resolvedUserMessageColor:s,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,userTextColor:d,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,formatTime:y,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:k,apiBaseUrl:E,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:C,provideCitations:O,onFeedback:I,headerTextColor:R,onRetryMessage:N,defaultLanguage:_="en"})=>{const P=e.useMemo(()=>Z(_),[_]);return t?"user"===t.role?n.jsx(qt,{message:t,formatTime:y,userMessageBoxColor:i,primaryColor:a,resolvedUserMessageColor:s,textColor:c,userTextColor:d,fontFamily:p,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,isDark:r,isRtl:v,t:P,onRetryMessage:N}):n.jsx($t,{message:t,formatTime:y,isDark:r,primaryColor:a,agentMessageBubbleColor:o,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,fontSize:b,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:k,apiBaseUrl:E,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:C,provideCitations:O,onFeedback:I,headerTextColor:R,t:P}):null};var Ht=e.memo(Gt);const Vt=(e,t,n)=>Number.isNaN(e)?t:Math.min(Math.max(e,t),n),Wt=e=>{if(!e)return null;const t=(e=>e?.trim().toLowerCase()??"")(e),n=(e=>{const t=e.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!t)return null;let n=t[1];3===n.length&&(n=n.split("").map(e=>`${e}${e}`).join(""));const r=parseInt(n.slice(0,2),16),a=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return[r,a,o].some(e=>Number.isNaN(e))?null:{r:r,g:a,b:o}})(t);if(n)return n;const r=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i);return t?{r:Vt(Number.parseInt(t[1],10),0,255),g:Vt(Number.parseInt(t[2],10),0,255),b:Vt(Number.parseInt(t[3],10),0,255)}:null})(t);return r||null},Yt=({r:e,g:t,b:n})=>{const r=e=>{const t=Vt(Math.round(e),0,255).toString(16);return 1===t.length?`0${t}`:t};return`#${r(e)}${r(t)}${r(n)}`},Kt=(e,t,n)=>{const r=Vt(n,0,1);return{r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)}},Xt=(e,t)=>{const n=Vt(t,0,1);return`rgba(${Vt(Math.round(e.r),0,255)}, ${Vt(Math.round(e.g),0,255)}, ${Vt(Math.round(e.b),0,255)}, ${n})`},Zt={background:"#f8fafc",hoverBackground:"#f1f5f9",border:"#e2e8f0",hoverBorder:"#cbd5f5",shadow:"0 4px 12px rgba(15, 23, 42, 0.08)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.14)"},Qt={background:"#1f2937",hoverBackground:"#27364a",border:"#334155",hoverBorder:"#3b4c63",shadow:"0 4px 12px rgba(15, 23, 42, 0.45)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.55)"},Jt=(e,t)=>{const n=Wt(e);if(!n)return(e=>e?Qt:Zt)(t);const r=(({r:e,g:t,b:n})=>{const r=[e,t,n].map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*r[0]+.7152*r[1]+.0722*r[2]})(n),a=Wt("#0f172a")??{r:15,g:23,b:42},o=Wt(t?"#f8fafc":"#f9fafb")??{r:249,g:250,b:251},i=Wt(t?"#334155":"#e2e8f0")??{r:226,g:232,b:240};let s,l;if(r>=.6){const e=t?.5:.7,r=Math.min(1,e+.15);s=Kt(n,a,e),l=Kt(n,a,r)}else if(r<=.35){const e=t?.9:.8,r=Math.min(1,e+(t?.05:.12));s=Kt(n,o,e),l=Kt(n,o,r)}else{const e=t?.45:.6,r=Math.min(1,e+.1);s=Kt(n,i,e),l=Kt(n,i,r)}const c=Kt(n,s,.65),u=Kt(n,l,.7),d=`0 4px 12px ${Xt(n,t?.28:.12)}`,p=`0 6px 20px ${Xt(n,t?.35:.18)}`;return{background:Yt(s),hoverBackground:Yt(l),border:Yt(c),hoverBorder:Yt(u),shadow:d,hoverShadow:p}},en=({questions:t,isDark:r,palette:a,resolvedTextColor:o,fontFamily:i,fontSize:s,isRtl:l,onQuestionClick:c,applyHoverState:u,headingLabel:d,defaultLanguage:p})=>{const f=e.useRef(null),[g,m]=e.useState(!1),[h,b]=e.useState(!1),y=e.useCallback(()=>{const e=f.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;m(Math.abs(t)>1),b(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{y();const e=f.current;if(!e)return;const t=new ResizeObserver(y);return t.observe(e),()=>t.disconnect()},[y,t]);const v=e.useCallback(e=>{const t=f.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]),w=r?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.85)",S=r?"#e5e7eb":"#374151",x=r?"#4b5563":"#d1d5db";return n.jsxs("div",{className:"px-4 py-4 border-t "+(r?"border-gray-700/50":"border-gray-200/60"),children:[n.jsxs("div",{className:"text-xs mb-3 font-semibold tracking-wide uppercase "+(r?"text-gray-400":"text-gray-500"),children:[d||"Quick questions",":"]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:()=>v("left"),disabled:!g,"aria-label":X(p,"scrollLeft"),className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:w,border:`1px solid ${x}`,color:S,backdropFilter:"blur(4px)",opacity:g?1:.35,cursor:g?"pointer":"default"},children:n.jsx(Ge,{size:16})}),n.jsx("div",{ref:f,onScroll:y,className:"flex-1 flex gap-3 overflow-x-auto pb-2",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map((e,t)=>{const r=Y(e,l);return n.jsxs("button",{onClick:()=>c?.(e),className:"group relative text-sm px-5 py-2.5 rounded-full font-medium transition-all duration-300 hover:scale-105 active:scale-95 whitespace-nowrap flex-shrink-0 overflow-hidden backdrop-blur-sm "+(r?"text-right":"text-left"),style:{direction:r?"rtl":"ltr",backgroundColor:a.background,border:`1.5px solid ${a.border}`,boxShadow:a.shadow},onMouseEnter:e=>{u(e.currentTarget,!0),e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{u(e.currentTarget,!1),e.currentTarget.style.transform="translateY(0)"},children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/0 via-white/5 to-white/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-xl"}),n.jsx("span",{className:"relative z-10",style:{direction:r?"rtl":"ltr",color:o,fontFamily:i,fontSize:s,textAlign:r?"right":"left"},children:e})]},t)})}),n.jsx("button",{onClick:()=>v("right"),disabled:!h,"aria-label":X(p,"scrollRight"),className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:w,border:`1px solid ${x}`,color:S,backdropFilter:"blur(4px)",opacity:h?1:.35,cursor:h?"pointer":"default"},children:n.jsx(He,{size:16})})]})]})},tn=({questions:t=[],isDark:r=!1,primaryColor:a="#2563eb",onQuestionClick:o,isTyping:i=!1,layout:s="vertical",fontFamily:l="Inter",fontSize:c="14px",textColor:u,isRtl:d=!1,questionTextColor:p,questionBoxColor:f,resolvedUserMessageColor:g,userMessageBoxColor:m,userTextColor:h,headingLabel:b,defaultLanguage:y="en"})=>{if(!t.length||i)return null;const v=p??u??(r?"#f3f4f6":"#111827"),w=e.useMemo(()=>Jt(v,r),[v,r]),S=(e,t)=>{e.style.backgroundColor=t?w.hoverBackground:w.background,e.style.borderColor=t?w.hoverBorder:w.border,e.style.boxShadow=t?w.hoverShadow:w.shadow};if("horizontal"===s)return n.jsx(en,{questions:t,isDark:r,palette:w,resolvedTextColor:v,fontFamily:l,fontSize:c,isRtl:d,onQuestionClick:o,applyHoverState:S,headingLabel:b,defaultLanguage:y});const x=g??m??a??"#2563eb",k=h??u??"#FFFFFF";return n.jsxs("div",{style:{paddingInlineStart:"50px"},children:[b?n.jsx("div",{className:"mb-2",style:{color:r?"#9ca3af":"#6b7280",fontFamily:l,fontSize:`calc(${c} - 1px)`},children:b}):null,n.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((e,t)=>{const r=Y(e,d);return n.jsx("button",{onClick:()=>o?.(e),className:"transition-all duration-200 active:scale-[0.97]",style:{direction:r?"rtl":"ltr",fontFamily:l,fontSize:c,color:k,backgroundColor:x,border:"none",borderRadius:"9999px",padding:"5px 14px",fontWeight:500,lineHeight:"1.4",whiteSpace:"normal",textAlign:r?"right":"left"},children:e},t)})})]})},nn=({active:t=!1,processing:r=!1,deviceId:a,barWidth:o=3,barGap:i=1,barRadius:s=1.5,barColor:l,fadeEdges:c=!0,fadeWidth:u=24,barHeight:d=4,height:p=64,sensitivity:f=1,smoothingTimeConstant:g=.8,fftSize:m=256,historySize:h=60,updateRate:b=30,mode:y="static",onError:v,onStreamReady:w,onStreamEnd:S,className:x,...k})=>{const E=e.useRef(null),A=e.useRef(null),T=e.useRef([]),C=e.useRef(null),O=e.useRef(null),I=e.useRef(null),R=e.useRef(0),N=e.useRef(0),_=e.useRef(null),P=e.useRef([]),L=e.useRef(0),D=e.useRef([]),M=e.useRef(!0),j=e.useRef(null),F=e.useRef(0),B="number"==typeof p?`${p}px`:p;return e.useEffect(()=>{const e=E.current,t=A.current;if(!e||!t)return;const n=new ResizeObserver(()=>{const n=t.getBoundingClientRect(),r=window.devicePixelRatio||1;e.width=n.width*r,e.height=n.height*r,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`;const a=e.getContext("2d");a&&a.scale(r,r),j.current=null,F.current=n.width,M.current=!0});return n.observe(t),()=>n.disconnect()},[]),e.useEffect(()=>{if(r&&!t){let e=0;L.current=0;const t=()=>{e+=.03,L.current=Math.min(1,L.current+.02);const n=[],r=Math.floor((A.current?.getBoundingClientRect().width||200)/(o+i));if("static"===y){const t=Math.floor(r/2);for(let a=0;a<r;a++){const r=(a-t)/t,o=1-.4*Math.abs(r),i=(.2+(.25*Math.sin(1.5*e+3*r)+.2*Math.sin(.8*e-2*r)+.15*Math.cos(2*e+r)))*o;let s=i;if(P.current.length>0&&L.current<1){const e=Math.min(a,P.current.length-1);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}}else for(let t=0;t<r;t++){const a=(t-r/2)/(r/2),o=1-.4*Math.abs(a),i=(.2+(.25*Math.sin(1.5*e+.15*t)+.2*Math.sin(.8*e-.1*t)+.15*Math.cos(2*e+.05*t)))*o;let s=i;if(P.current.length>0&&L.current<1){const e=Math.floor(t/r*P.current.length);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}"static"===y?D.current=n:T.current=n,M.current=!0,_.current=requestAnimationFrame(t)};return t(),()=>{_.current&&cancelAnimationFrame(_.current)}}if(!t&&!r){if("static"===y?D.current.length>0:T.current.length>0){let e=0;const t=()=>{e+=.03,e<1?("static"===y?D.current=D.current.map(t=>t*(1-e)):T.current=T.current.map(t=>t*(1-e)),M.current=!0,requestAnimationFrame(t)):"static"===y?D.current=[]:T.current=[]};t()}}},[r,t,o,i,y]),e.useEffect(()=>{if(!t)return I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),O.current&&"closed"!==O.current.state&&(O.current.close(),O.current=null),void(R.current&&(cancelAnimationFrame(R.current),R.current=0));return(async()=>{try{const e=await navigator.mediaDevices.getUserMedia({audio:a?{deviceId:{exact:a},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});I.current=e,w?.(e);const t=new(window.AudioContext||window.webkitAudioContext),n=t.createAnalyser();n.fftSize=m,n.smoothingTimeConstant=g;t.createMediaStreamSource(e).connect(n),O.current=t,C.current=n,T.current=[]}catch(e){v?.(e)}})(),()=>{I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),O.current&&"closed"!==O.current.state&&(O.current.close(),O.current=null),R.current&&(cancelAnimationFrame(R.current),R.current=0)}},[t,a,m,g,v,w,S]),e.useEffect(()=>{const e=E.current;if(!e)return;const n=e.getContext("2d");if(!n)return;let a;const p=g=>{const m=e.getBoundingClientRect();if(t&&g-N.current>b&&(N.current=g,C.current)){const e=new Uint8Array(C.current.frequencyBinCount);if(C.current.getByteFrequencyData(e),"static"===y){const t=Math.floor(.05*e.length),n=Math.floor(.4*e.length),r=e.slice(t,n),a=Math.floor(m.width/(o+i)),s=Math.floor(a/2),l=[];for(let e=s-1;e>=0;e--){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}for(let e=0;e<s;e++){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}D.current=l,P.current=l}else{let t=0;const n=Math.floor(.05*e.length),r=Math.floor(.4*e.length),a=e.slice(n,r);for(let e=0;e<a.length;e++)t+=a[e];const o=t/a.length/255*f;T.current.push(Math.min(1,Math.max(.05,o))),P.current=[...T.current],T.current.length>h&&T.current.shift()}M.current=!0}if(!M.current&&!t)return void(a=requestAnimationFrame(p));M.current=t,n.clearRect(0,0,m.width,m.height);const v=l||getComputedStyle(e).color||"#000",w=o+i,S=Math.floor(m.width/w),x=m.height/2;if("static"===y){const e=r||t||D.current.length>0?D.current:[];for(let t=0;t<S&&t<e.length;t++){const r=e[t]||.1,a=t*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(a,l,o,i,s),n.fill()):n.fillRect(a,l,o,i)}}else for(let e=0;e<S&&e<T.current.length;e++){const t=T.current.length-1-e,r=T.current[t]||.1,a=m.width-(e+1)*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(a,l,o,i,s),n.fill()):n.fillRect(a,l,o,i)}if(c&&u>0&&m.width>0){if(!j.current||F.current!==m.width){const e=n.createLinearGradient(0,0,m.width,0),t=Math.min(.3,u/m.width);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(t,"rgba(255,255,255,0)"),e.addColorStop(1-t,"rgba(255,255,255,0)"),e.addColorStop(1,"rgba(255,255,255,1)"),j.current=e,F.current=m.width}n.globalCompositeOperation="destination-out",n.fillStyle=j.current,n.fillRect(0,0,m.width,m.height),n.globalCompositeOperation="source-over"}n.globalAlpha=1,a=requestAnimationFrame(p)};return a=requestAnimationFrame(p),()=>{a&&cancelAnimationFrame(a)}},[t,r,f,b,h,o,d,i,s,l,c,u,y]),n.jsxs("div",{className:ie("relative h-full w-full",x),ref:A,style:{height:B},"aria-label":t?"Live audio waveform":r?"Processing audio":"Audio waveform idle",role:"img",...k,children:[!t&&!r&&n.jsx("div",{className:"border-muted-foreground/20 absolute top-1/2 right-0 left-0 -translate-y-1/2 border-t-2 border-dotted"}),n.jsx("canvas",{className:"block h-full w-full",ref:E,"aria-hidden":"true"})]})},rn=Object.freeze(["bar","line","area","pie","donut","scatter","bubble","radar","radial-bar","radial","radialbar","treemap","funnel","sankey","composed","waterfall","gauge","histogram","kpi"]);const an=/\b(?:field|fields|column|columns|table|tables|sql|summed?|aggregat\w*|averaged?|counted)\b/i,on=/[A-Za-z_]\w*\.[A-Za-z_]\w*/;function sn(e){if("string"!=typeof e)return"";let t,n=e.trim();do{t=n,n=n.replace(/\s*\(([^()]*)\)\s*$/,function(e,t){return an.test(t)||on.test(t)?"":e}).trim()}while(n!==t);return n}const ln=new Set(["yes","approve","approved","confirm"]),cn=new Set(["no","decline","declined","cancel"]),un=/^[A-Za-z0-9_.:-]{1,128}$/;function dn(e){if("string"!=typeof e)return null;const t=e.trim();return un.test(t)?t:null}function pn(e,t){return null!=e?e:t}function fn(e,t){if(!e||"object"!=typeof e)return null;const n=dn(pn(e.tool_call_id,e.toolCallId));if(!n)return null;const r=function(e){if(!e||"object"!=typeof e)return null;if("boolean"==typeof e.approved)return e.approved;const t=String(pn(e.value,"")).trim().toLowerCase();return!!ln.has(t)||!cn.has(t)&&null}(t);return null===r?null:{tool_call_id:n,invocation_id:dn(pn(e.invocation_id,e.invocationId))||"",approved:r}}const gn=/\[([^\]\n]+)\]\((https?:\/\/[^\s)]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g;function mn(e){return String(pn(e,"")).trim().toLowerCase()}function hn(e,t){const n=e||[];for(let e=t+1;e<n.length;e+=1){const t=n[e];if(t&&"user"===t.role&&!t.sendFailed)return"string"==typeof t.content?t.content:String(pn(t.content,""))}}const bn=e.createContext(void 0),yn=new Set(["handoff_ack","handoff_wait"]),vn=({messages:t=[],liveJoined:r=[],handoffPoints:a=[],isDark:o,primaryColor:i,isLoading:s,agentMessageBubbleColor:l,userMessageBoxColor:c,textColor:u,assistantTextColor:d,userTextColor:p,fontFamily:f,agentMessageBubbleFontFamily:g,agentMessageBubbleFontSize:m,userMessageBubbleFontFamily:h,userMessageBubbleFontSize:b,fontSize:y,formatTime:v,isRtl:S=!1,defaultLanguage:x="en",quickQuestions:k=[],shouldShowQuickQuestions:E=!1,onQuickQuestion:A,quickQuestionsLayout:T="vertical",onDecision:C,disclaimerEnabled:O=!1,disclaimerText:I,disclaimerPosition:R="top",disclaimerLinkUrl:N,disclaimerLinkLabel:_,resolvedAgentBubbleColor:P,resolvedUserMessageColor:L,resolvedTextColor:D,isVoiceSessionActive:M=!1,voiceStatus:j="idle",messagesContainerRef:F,companyLogo:B,chatbotAvatarEnabled:U,chatbotAvatar:z,conciergeName:$,companyName:q,apiBaseUrl:G,getAuthToken:H,onPromptSuggestionClick:V,conversationResetKey:W,allowFeedback:K,provideCitations:Z,onFeedback:Q,headerTextColor:J,onRetryMessage:ee,beforePromptsSlot:te=null,promptsSlot:re=null,quickQuestionsHeadingLabel:ae})=>{const ie=e.useRef(null),se=e.useRef(!0),le=e.useRef(!1),ce=e.useMemo(()=>t.map(e=>`${e.id}:${e.content?.length??0}:${e.isProcessing?1:0}`).join("|"),[t]),ue=e.useCallback(()=>{const e=F?.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight;se.current=t<160},[F]);e.useEffect(()=>{const e=F?.current;if(e)return e.addEventListener("scroll",ue,{passive:!0}),ue(),()=>{e.removeEventListener("scroll",ue)}},[ue,F]),e.useEffect(()=>{W&&(se.current=!0,le.current=!1)},[W]),e.useEffect(()=>{if(le.current||0===t.length||"undefined"==typeof window)return;le.current=!0;let e,n=!1;const r=window.requestAnimationFrame(()=>{n||(e=window.requestAnimationFrame(()=>{n||(ie.current?.scrollIntoView({behavior:"instant",block:"end"}),se.current=!0)}))});return()=>{n=!0,window.cancelAnimationFrame(r),window.cancelAnimationFrame(e)}},[0===t.length]),e.useEffect(()=>{if(!se.current)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||ie.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[ce,s]),e.useEffect(()=>{if(!M||"connected"!==j)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||ie.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[M,j]);const de=e.useMemo(()=>oe(N),[N]),pe=e.useMemo(()=>function(e,t=[]){const n=new Map;if(!Array.isArray(e))return n;const r=new Set((Array.isArray(t)?t:[]).map(e=>e?.name).filter(Boolean));for(const t of e){const e=ne(t);if(!e||!t.id)continue;const a=!r.has(e);r.add(e),n.set(t.id,{name:e,joined:a})}return n}(t,r),[t,r]),fe=e.useMemo(()=>function(e,t=[]){const n=new Map,r=Array.isArray(t)?t:[],a=r[r.length-1]?.id;for(const t of Array.isArray(e)?e:[]){if(!t?.name)continue;const e=t.afterMessageId&&r.some(e=>e.id===t.afterMessageId)?t.afterMessageId:a;if(!e)continue;const o=n.get(e)||[];o.push(t.name),n.set(e,o)}return n}(r,t),[r,t]),ge=(e,t)=>n.jsx("div",{role:"status","data-testid":"agent-joined-line",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0"},children:X(x,"agentJoinedConversation").replace("{name}",e)},t),me=e.useMemo(()=>new Set(a),[a]),he=e=>n.jsx("div",{role:"status","data-testid":"platform-line",dir:Y(e.content,S)?"rtl":"ltr",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0",whiteSpace:"pre-wrap"},children:e.content}),be=e.useMemo(()=>Y(I,S),[I,S]);return n.jsxs(n.Fragment,{children:[O&&I&&"top"===R&&n.jsx("div",{className:"flex justify-center",children:n.jsx("div",{className:"rounded-lg px-2 py-1 ",style:{color:o?"#d1d5db":"#6b7280",fontFamily:null!=f?f:"Inter",fontSize:null!=y?`calc(${y} - 2px)`:"12px",direction:be?"rtl":"ltr",textAlign:"center",borderColor:o?"#374151":"#e5e7eb"},children:n.jsxs("p",{className:"leading-relaxed whitespace-pre-wrap break-words inline",dir:be?"rtl":"ltr",style:{color:o?"#d1d5db":"#6b7280",fontFamily:null!=f?f:"Inter",fontSize:null!=y?`calc(${y} - 2px)`:"12px"},children:[I,de&&_&&n.jsx("a",{href:de,target:"_blank",rel:"noopener noreferrer",title:de,style:{color:o?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:_})]})})}),t.map((e,r)=>{const a=pe.get(e.id),s="assistant"===e.role&&yn.has(e.metadata?.contentType);return n.jsxs(bn.Provider,{value:"assistant"===e.role?hn(t,r):void 0,children:[a?.joined&&ge(a.name),a&&n.jsx("div",{"data-testid":"agent-sender-name",style:{fontSize:"12px",fontWeight:600,opacity:.8,margin:"0 0 2px 4px",textAlign:S?"right":"left"},children:a.name}),s&&he(e),!s&&n.jsx(Ht,{message:e,isDark:o,primaryColor:i,agentMessageBubbleColor:l,userMessageBoxColor:c,resolvedUserMessageColor:L,resolvedAgentBubbleColor:P,textColor:u,assistantTextColor:d,userTextColor:p,fontFamily:f,agentMessageBubbleFontFamily:g,agentMessageBubbleFontSize:m,userMessageBubbleFontFamily:h,userMessageBubbleFontSize:b,fontSize:y,formatTime:v,isRtl:Y(e.content,S),onDecision:C,onPromptSuggestionClick:V,companyLogo:U&&z?z:B,conciergeName:$,companyName:q,apiBaseUrl:G,getAuthToken:H,allowFeedback:K,provideCitations:Z,onFeedback:Q,headerTextColor:J,onRetryMessage:ee,defaultLanguage:x}),me.has(e.id)&&(w=`handoff-${e.id}`,n.jsx("div",{role:"status","data-testid":"handoff-line",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0"},children:X(x,"handedOffToTeam")},w)),(fe.get(e.id)||[]).map(e=>ge(e,`live-join-${e}`))]},e.id);var w}),(()=>{const e=t[t.length-1],r=s&&"user"===e?.role,a=t.some(e=>"assistant"===e.role&&(e.isProcessing||!e.content));return r&&!a?n.jsx(Ht,{message:w(),isDark:o,primaryColor:i,agentMessageBubbleColor:l,resolvedAgentBubbleColor:P,userMessageBoxColor:c,textColor:u,assistantTextColor:d,userTextColor:p,fontFamily:f,agentMessageBubbleFontFamily:g,agentMessageBubbleFontSize:m,userMessageBubbleFontFamily:h,userMessageBubbleFontSize:b,fontSize:y,formatTime:v,isRtl:S,onDecision:C,companyLogo:U&&z?z:B,conciergeName:$,companyName:q,apiBaseUrl:G,getAuthToken:H,headerTextColor:J,defaultLanguage:x},"skeleton-waiting"):null})(),te,re?n.jsx("div",{className:"pt-1",children:re}):E&&k.length>0&&n.jsx("div",{className:"pt-1",children:n.jsx(tn,{questions:k,isDark:o,primaryColor:i,onQuestionClick:A,isTyping:s,layout:T,fontFamily:f,fontSize:y,textColor:u,isRtl:S,questionTextColor:d,questionBoxColor:l,resolvedUserMessageColor:L,userMessageBoxColor:c,userTextColor:p,headingLabel:ae,defaultLanguage:x})}),M&&"connected"===j&&!s&&n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsx("div",{className:"flex flex-col items-end max-w-[75%] w-full",children:n.jsxs("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg rounded-tr-sm w-full",style:{background:`linear-gradient(135deg, ${L||i||"#2563eb"} 0%, ${L||i||"#2563eb"}dd 100%)`,width:"100px"},children:[n.jsx("span",{className:"sr-only",children:"Listening for voice input"}),n.jsx(nn,{active:!0,barWidth:2,barHeight:4,barGap:2,barColor:p||D||"#FFFFFF",height:20,fadeEdges:!0,className:"min-w-[60px]","aria-hidden":"true"})]})})}),n.jsx("div",{ref:ie,className:"h-px"})]})},wn=new Set(["size_exceeded","file_too_large","mime_not_allowed"]),Sn=[["application/pdf","PDF"],["image/jpeg","JPG"],["image/png","PNG"],["image/gif","GIF"],["image/webp","WEBP"],["application/msword","DOC"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","DOCX"],["application/vnd.ms-excel","XLS"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","XLSX"],["text/csv","CSV"],["text/plain","TXT"]];const xn=(e,t)=>e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??""),kn=e=>{const t=Math.max(0,Number(e)||0)/1048576;return String(t>=10?Math.round(t):Math.round(10*t)/10)};function En(e,t,n={}){const r=String(n.fileUploadMaxSizeMB??"");if("mime_not_allowed"===t.code){const t=function(e){const t=new Set((e||[]).map(e=>String(e).toLowerCase()));return Sn.filter(([e])=>t.has(e)).map(([,e])=>e).join(", ")}(n.fileUploadAllowedMimes);return xn(e("attachmentTypeNotAllowed"),{types:t||"PDF"})}const a=Number(t.size)||0,o=e=>a>0?`${e}Size`:e,i=(e=>{const t=Math.max(0,Number(e)||0)/1048576;return String(t>=100?Math.round(t):Math.round(10*t)/10)})(a);if("file_too_large"===t.code)return xn(e(o("attachmentFileTooLarge")),{file_mb:i,max_mb:String(n.fileUploadMaxFileMB??r)});const s=Number(t.usedBytes)||0;return s>0?xn(e(o("attachmentLimitReachedUsed")),{file_mb:i,max_mb:r,used_mb:kn(s)}):xn(e(o("attachmentLimitReached")),{file_mb:i,max_mb:r})}function An(e,t){return String(e||"").replace(/\/+$/,"")+(t.startsWith("/")?t:`/${t}`)}function Tn({apiEndpoint:e,conversationId:t,size:n,authHeader:r}){fetch(An(e,"/api/v1/chat-attachments/release"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,size:n})}).catch(()=>{})}function Cn({orgId:t,conversationId:n,config:r,apiEndpoint:a,authHeader:o,onError:i,onRejected:s}){const[l,c]=e.useState([]),u=e.useRef(new Map),d=e.useRef(0),p=e.useRef(l);p.current=l;const f=e.useRef({conversationId:n,bytes:0});f.current.conversationId!==n&&(f.current={conversationId:n,bytes:0});const g=e.useCallback(()=>(d.current+=1,`att-${Date.now()}-${d.current}`),[]),m=e.useCallback((e,t)=>{c(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),h=e.useCallback((e,t,n)=>{if(s&&wn.has(t)){const n=p.current.find(t=>t.id===e);return c(t=>t.filter(t=>t.id!==e)),void s({code:t,filename:n?.filename,size:n?.size,usedBytes:Math.max(0,f.current.bytes)})}const r={status:"error",error:{code:t,message:n}};c(t=>{const n=t.map(t=>t.id===e?{...t,...r}:t),a=n.find(t=>t.id===e);return a&&i&&i(a),n})},[i,s]),b=e.useCallback((e,t)=>{if(!r?.fileUploadEnabled)return{ok:!1,code:"feature_disabled",message:"File uploads are not enabled for this organization."};if(t>=r.fileUploadMaxFiles)return{ok:!1,code:"too_many_files",message:`Max ${r.fileUploadMaxFiles} files per message.`};const n=1024*r.fileUploadMaxSizeMB*1024;if(f.current.bytes+e.size>n){return{ok:!1,code:"size_exceeded",message:`This conversation has already used ${(f.current.bytes/1048576).toFixed(1)} MB of its ${r.fileUploadMaxSizeMB} MB upload limit - this file won't fit.`}}const a=(e.type||"").toLowerCase(),o=new Set((r.fileUploadAllowedMimes||[]).map(e=>String(e).toLowerCase()));return o.size>0&&!o.has(a)?{ok:!1,code:"mime_not_allowed",message:`File type "${e.type||"unknown"}" is not allowed.`}:{ok:!0}},[r]),y=e.useCallback(async(e,t)=>{let r;try{r=await fetch(An(a,"/api/v1/chat-attachments/presign"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({filename:t.name,mimeType:t.type,size:t.size,conversationId:n})})}catch(n){return f.current.bytes=Math.max(0,f.current.bytes-t.size),void h(e,"network","Network error while requesting upload.")}if(!r.ok){let n="Upload rejected by the server.",a="unknown";try{const e=await r.json();e?.error&&(n=e.error),e?.code&&(a=function(e){switch(e){case"feature_disabled":case"size_exceeded":case"mime_not_allowed":case"storage_unavailable":case"file_too_large":return e;case"session_exceeded":return"size_exceeded";default:return"unknown"}}(e.code))}catch{}return f.current.bytes=Math.max(0,f.current.bytes-t.size),void h(e,a,n)}let i=0;const s=()=>{i>0&&(Tn({apiEndpoint:a,conversationId:n,size:i,authHeader:o}),i=0,m(e,{reservedBytes:0}))},l=()=>{f.current.bytes=Math.max(0,f.current.bytes-t.size)};let c;try{c=await r.json()}catch{return Tn({apiEndpoint:a,conversationId:n,size:t.size,authHeader:o}),l(),m(e,{reservedBytes:0}),void h(e,"unknown","Malformed presign response.")}let d,p;("boolean"==typeof c.reserved?c.reserved:!c.useMultipart)&&(i=t.size,m(e,{reservedBytes:t.size}));try{if(c.useMultipart){const r=await function({url:e,file:t,conversationId:n,authHeader:r,onProgress:a,registerXhr:o}){return new Promise((r,i)=>{const s=new XMLHttpRequest;o(s),s.open("POST",e,!0),s.withCredentials=!0;const l=new FormData;l.append("conversationId",n),l.append("file",t,t.name),s.upload.onprogress=e=>{e.lengthComputable&&a(Math.round(e.loaded/e.total*100))},s.onload=()=>{if(s.status>=200&&s.status<300)try{const e=JSON.parse(s.responseText);r({url:"string"==typeof e?.url?e.url:void 0,storageKey:"string"==typeof e?.storageKey?e.storageKey:void 0})}catch{r({})}else i(new Error(`upload_status_${s.status}`))},s.onerror=()=>i(new Error("network")),s.onabort=()=>i({aborted:!0}),s.send(l)})}({url:An(a,"/api/v1/chat-attachments/multipart"),file:t,conversationId:n,authHeader:o,onProgress:t=>m(e,{progress:t}),registerXhr:t=>u.current.set(e,t)});d=r.url,p=r.storageKey,i=t.size,m(e,{reservedBytes:t.size})}else{if(!c.uploadUrl)throw new Error("presign_missing_target");{await function({url:e,file:t,onProgress:n,registerXhr:r}){return new Promise((a,o)=>{const i=new XMLHttpRequest;r(i),i.open("PUT",e,!0),i.setRequestHeader("x-ms-blob-type","BlockBlob"),t.type&&i.setRequestHeader("Content-Type",t.type),i.upload.onprogress=e=>{e.lengthComputable&&n(Math.round(e.loaded/e.total*100))},i.onload=()=>{i.status>=200&&i.status<300?a():o(new Error(`upload_status_${i.status}`))},i.onerror=()=>o(new Error("network")),i.onabort=()=>o({aborted:!0}),i.send(t)})}({url:c.uploadUrl,file:t,onProgress:t=>m(e,{progress:t}),registerXhr:t=>u.current.set(e,t)});const n=await async function({apiEndpoint:e,storageKey:t,filename:n,mimeType:r,authHeader:a}){let o;try{o=await fetch(An(e,"/api/v1/chat-attachments/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...a?{Authorization:a}:{}},body:JSON.stringify({storageKey:t,filename:n,mimeType:r})})}catch{return{ok:!1,code:"network",message:"Network error while verifying upload."}}if(o.ok)return{ok:!0};let i="Upload rejected - file content did not match its declared type.",s="content_mismatch";try{const e=await o.json();e?.error&&(i=e.error),"password_protected"===e?.code&&(s="password_protected")}catch{}return{ok:!1,code:s,message:i}}({apiEndpoint:a,storageKey:c.storageKey,filename:t.name,mimeType:t.type,authHeader:o});if(!n.ok)return u.current.delete(e),s(),l(),void h(e,n.code,n.message)}}}catch(t){if(u.current.delete(e),t&&t.aborted)return;return s(),l(),void h(e,"network","Upload failed. Please retry.")}u.current.delete(e),m(e,{status:"ready",progress:100,storageKey:p||c.storageKey,...d?{url:d}:{}})},[a,o,n,h,m]),v=e.useCallback(async e=>{const t=Array.from(e);for(const e of t){const t=p.current.filter(e=>"error"!==e.status).length,n=b(e,t),r=g();if(!n.ok&&s&&wn.has(n.code)){s({code:n.code,filename:e.name,size:e.size,usedBytes:Math.max(0,f.current.bytes)});continue}if(!n.ok){const t={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"error",error:{code:n.code,message:n.message}};c(e=>(i&&i(t),[...e,t]));continue}const a={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"uploading",progress:0,reservedBytes:0};c(e=>[...e,a]),f.current.bytes+=e.size,y(r,e)}},[b,y,g,i,s]),w=e.useCallback(e=>{const t=u.current.get(e);t&&(t.abort(),u.current.delete(e));const r=p.current.find(t=>t.id===e);r&&r.reservedBytes>0&&(Tn({apiEndpoint:a,conversationId:n,size:r.reservedBytes,authHeader:o}),f.current.bytes=Math.max(0,f.current.bytes-r.reservedBytes)),c(t=>t.filter(t=>t.id!==e))},[a,o,n]),S=e.useCallback(()=>{for(const e of u.current.values())e.abort();u.current.clear(),c([])},[]),x=e.useMemo(()=>l.some(e=>"validating"===e.status||"uploading"===e.status),[l]),k=e.useCallback(()=>l.filter(e=>"ready"===e.status&&"string"==typeof e.storageKey).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url})),[l]);return{attachments:l,addFiles:v,removeAttachment:w,clearAll:S,isBusy:x,toSendPayload:k}}function On(e){if(!e||e<1024)return`${e||0} B`;const t=["KB","MB","GB"];let n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=10?0:1)} ${t[r]}`}function In({attachment:e,onRemove:t,isDark:r,removeLabel:a="Remove attachment"}){const o="error"===e.status,i="uploading"===e.status,s="ready"===e.status,l=o?r?"rgba(239,68,68,0.15)":"#fee2e2":r?"#1f2937":"#f3f4f6",c=o?r?"#b91c1c":"#fca5a5":r?"#374151":"#e5e7eb",u=o?r?"#fca5a5":"#b91c1c":r?"#e5e7eb":"#374151",d=o?`${e.filename} - ${e.error?.message||"error"}`:i?`${e.filename} - uploading`:`${e.filename} - ready`;return n.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full pl-2 pr-1 py-1 text-xs",style:{backgroundColor:l,border:`1px solid ${c}`,color:u,maxWidth:240},role:"group",title:o?e.error?.message:e.filename,"aria-label":d,children:[o?n.jsx(Ve,{size:12,"aria-hidden":"true"}):i?n.jsx(et,{size:12,className:"animate-spin","aria-hidden":"true"}):n.jsx(Qe,{size:12,"aria-hidden":"true"}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename}),s&&n.jsx("span",{className:"opacity-70 text-chip",children:On(e.size)}),i&&"number"==typeof e.progress&&n.jsxs("span",{className:"opacity-70 text-chip",children:[e.progress,"%"]}),n.jsx("button",{type:"button",onClick:()=>t(e.id),className:"w-4 h-4 rounded-full inline-flex items-center justify-center",style:{backgroundColor:"transparent",border:"none",color:u,cursor:"pointer"},"aria-label":a,children:n.jsx(pt,{size:12})})]})}function Rn({prompts:t,getDisplayText:n,detectDirection:r,ambientIsRtl:a,wrapperProps:o,stackProps:i,getKey:s,getChipProps:l,onChipClick:c,onSelect:u,before:d,after:p}){const f=e.createElement("div",i,t.map((t,o)=>{const i=n(t),d=r(i,a);return e.createElement("button",{key:s(t,o),type:"button",...l({prompt:t,index:o,displayText:i,chipIsRtl:d}),onClick:e=>{c&&c(t,o),u(t,o,e)}},i)}));return null==d&&null==p?e.createElement("div",o,f):e.createElement("div",o,d,f,p)}const Nn=({suggestions:e,onSuggestionClick:t,promptPrimary:r,promptTextColor:a,promptFontFamily:o,promptFontSize:i,isRtl:s,t:l,questionDisplay:c=!0})=>n.jsx(Rn,{prompts:e,getDisplayText:e=>((e,t=!0)=>{if(!e||"string"==typeof e)return e||"";const n="string"==typeof e.text?e.text:"";if(!t)return n;const r="string"==typeof e.submitText?e.submitText.trim():"";return r&&r!==n?r:n})(e,c),detectDirection:Y,ambientIsRtl:s,wrapperProps:{className:"mb-2 px-5"},stackProps:{className:"flex flex-col gap-2",role:"group","aria-label":l("suggestedQuestions")},getKey:(e,t)=>`${e.text||e}-${t}`,getChipProps:({chipIsRtl:e})=>({dir:e?"rtl":"ltr",className:"block w-full rounded-2xl px-4 py-2 border-0 transition-transform duration-150 active:scale-[0.99] "+(e?"text-right":"text-left"),style:{direction:e?"rtl":"ltr",textAlign:e?"right":"left",background:`linear-gradient(135deg, ${r} 0%, ${r}dd 100%)`,color:a,fontFamily:o,fontSize:i}}),onSelect:(e,n)=>t(e.submitText||e.text||e,e,n)}),_n=({onStopGeneration:t,inputValue:a,setInputValue:o,onSend:i,isDark:s,primaryColor:l,isOpen:c,isMinimized:u,isLoading:d,isConversationLoading:p=!1,verificationPending:f=!1,placeholder:g,textColor:m,fontFamily:h,fontSize:b,isRtl:y=!1,csatVisible:v=!1,enableVoiceInteraction:w=!1,isVoiceSessionActive:S=!1,voiceStatus:x="idle",voiceError:k=null,onVoiceToggle:E,onBidiSubmit:A,disclaimerEnabled:T=!1,disclaimerText:C,disclaimerPosition:O="top",disclaimerLinkUrl:I,disclaimerLinkLabel:R,showPoweredBy:N=!0,onboardingQuestions:_=[],onboardingActive:P=!1,onboardingCompleted:L=!1,userMessageBubbleFontFamily:D,onboardingEnabled:M=!1,userMessageBubbleFontSize:j,userMessageBoxColor:F,resolvedUserMessageColor:z,userTextColor:$,promptSuggestions:q,onPromptSuggestionClick:H,autoPromptQuestionDisplay:V=!0,tagSelectorNode:W=null,showResolveButton:K=!1,onResolve:X,defaultLanguage:Q="en",chatFeatures:J,apiEndpoint:ee,organizationId:te,conversationId:ne,onSynthesizeAssistantMessage:re})=>{const ae=e.useMemo(()=>Z(Q),[Q]),se=e.useMemo(()=>function(e){const t=G(e),n=U[t]||B;return{beforeBrand:n.poweredByBefore??n.poweredBy??B.poweredByBefore,afterBrand:n.poweredByAfter??""}}(Q),[Q]),le=e.useMemo(()=>Y(a,y),[a,y]),[ce,ue]=e.useState(!1),[de,pe]=e.useState(!1),fe=e.useMemo(()=>({fileUploadEnabled:J?.fileUploadEnabled??!1,fileUploadMaxSizeMB:J?.fileUploadMaxSizeMB??10,fileUploadMaxFiles:J?.fileUploadMaxFiles??3,fileUploadAllowedMimes:J?.fileUploadAllowedMimes??[]}),[J]),{attachments:ge,addFiles:me,removeAttachment:he,clearAll:be,isBusy:ye,toSendPayload:ve}=Cn({orgId:te,conversationId:ne,config:fe,apiEndpoint:ee,authHeader:void 0,onRejected:re?e=>re(En(ae,e,{...fe,fileUploadMaxFileMB:J?.fileUploadMaxFileMB??25})):void 0}),we=e.useRef(null),Se=e.useRef(new Set);e.useEffect(()=>{if(!S||!ne||!ee)return;const e=ve().filter(e=>e.storageKey&&!Se.current.has(e.storageKey));e.length&&(e.forEach(e=>Se.current.add(e.storageKey)),fetch(`${String(ee).replace(/\/$/,"")}/api/v1/chat-attachments/ingest`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:ne,attachments:e.map(e=>({storageKey:e.storageKey}))})}).catch(()=>{}))},[S,ne,ee,ge,ve]);const xe=!!fe.fileUploadEnabled&&!!ee,ke=ge.length>=fe.fileUploadMaxFiles,Ee=`Max ${fe.fileUploadMaxFiles} files per message.`,Ae=e.useMemo(()=>fe.fileUploadAllowedMimes.length>0?fe.fileUploadAllowedMimes.join(","):void 0,[fe.fileUploadAllowedMimes]),[Te,Ce]=e.useState({top:0,left:0,placement:"top",arrowOffset:0}),[Oe,Ie]=e.useState(!1),Re=e.useRef(null),Ne=e.useRef(null),_e=e.useRef(null),Pe=e.useRef(null);yt(h),yt(D),e.useEffect(()=>{c&&!u&&Ne.current?.focus()},[c,u]),e.useEffect(()=>{const e=Ne.current;if(e){e.style.height="auto";const t=e.scrollHeight,n=a.trim().length>0?20:48,r=Math.max(n,Math.min(t,120));e.style.height=`${r}px`}},[a]);const Le=e.useCallback(()=>{const e=ve();e.length>0?(i(void 0,e),be()):i()},[ve,be,i]),De=ge.some(e=>"ready"===e.status),Me=!a.trim()&&!De||d||p||ye||f,je=s?"#374151":"#e5e7eb",Fe=_&&_.length>0,Be=v||p||M&&(Fe&&!L)||"connecting"===x||f&&!S,Ue=v?ae("pleaseSubmitRatingFirst"):Fe?P?ae("completeOnboardingToEnableVoice"):L?"":ae("sendMessageToCompleteOnboarding"):"",$e=()=>{if(!_e.current)return;const e=_e.current.getBoundingClientRect(),t=220,n=e.top,r=window.innerHeight-e.bottom;let a="top",o=0,i=0;n>=73?(a="top",o=e.top-60-5-8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):r>=68?(a="bottom",o=e.bottom+8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):(a="top",o=Math.max(10,e.top-60-5-8),i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10));return{top:o,left:i,placement:a,arrowOffset:e.left+e.width/2-i}};e.useEffect(()=>{if(de&&Ue){const e=()=>{const e=$e();Ce(e)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[de,Ue]),e.useEffect(()=>()=>{Re.current&&clearTimeout(Re.current)},[]);const qe=null!=z?z:null!=F?F:null!=l?l:"#2563eb",Ge=null!=$?$:null!=m?m:"#FFFFFF",He=null!=D?D:null!=h?h:"Inter",Ve=null!=j?j:null!=b?b:null,We=Ve?`calc(${Ve} - 2px)`:"12px",Ye=oe(I);return n.jsxs("div",{className:"pt-4 pb-1 flex-shrink-0 relative "+(s?"bg-gray-900":"bg-white"),style:{overflow:"visible"},children:[W||q.length>0&&H&&n.jsx(Nn,{suggestions:q,onSuggestionClick:H,questionDisplay:V,promptPrimary:qe,promptTextColor:Ge,promptFontFamily:He,promptFontSize:We,isRtl:y,t:ae}),n.jsx("div",{className:"my-4",style:{height:"1px",backgroundColor:je}}),xe&&ge.length>0&&n.jsx("div",{className:"px-5 mb-2 flex flex-wrap gap-1.5",children:ge.map(e=>n.jsx(In,{attachment:e,onRemove:he,isDark:s,removeLabel:ae("removeAttachment")},e.id))}),n.jsxs("div",{className:"flex items-center px-5 gap-1.5",children:[xe&&n.jsx("input",{ref:we,type:"file",multiple:!0,accept:Ae,"aria-label":ae("uploadFile"),className:"hidden",style:{display:"none"},onChange:e=>{const t=e.target.files;t&&t.length&&!ke&&me(t),e.currentTarget.value=""}}),n.jsxs("div",{className:`flex-1 flex items-center gap-1 px-1 min-h-[48px] ${s?"bg-gray-800":"bg-gray-50"} rounded-2xl transition-all duration-200`,style:{borderStyle:"solid",borderColor:a&&a.trim().length>0?l||"#2563eb":je,borderWidth:a&&a.trim().length>0?"2px":"1px"},children:[xe&&n.jsxs("div",{className:"relative group shrink-0",children:[n.jsx("button",{type:"button",onClick:()=>we.current&&we.current.click(),disabled:v||p||d||ke||f,"aria-label":ke?Ee:"Attach file",title:ke?Ee:"Attach file",className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,style:{border:"none"},children:n.jsx(rt,{className:"w-4 h-4"})}),ke&&n.jsx("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity px-3 py-1.5 text-xs rounded-lg whitespace-nowrap shadow-lg "+(s?"bg-gray-700 text-gray-100":"bg-gray-800 text-white"),children:Ee})]}),n.jsx("div",{className:"relative flex-1 flex items-center min-w-0",children:n.jsx("textarea",{id:"chat-widget-input",ref:Ne,"aria-label":g||ae("typeYourMessage"),value:a,onChange:e=>{o(e.target.value)},onFocus:()=>ue(!0),onBlur:()=>ue(!1),onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(e.preventDefault(),f)return;if(S&&A&&!De)return void A();if(Me)return;Le()}},placeholder:p?ae("agentIsLoading"):f?ae("verifyInputBlocked"):g||ae("typeYourMessage"),rows:1,disabled:v||p||d||f||S&&"connected"!==x,dir:le?"rtl":"ltr",className:`w-full px-3 bg-transparent rounded-xl leading-normal ${s?"text-gray-100":"text-gray-900"} placeholder-gray-400 resize-none outline-none scrollbar-hide break-words`,style:{height:"auto",maxHeight:"120px",minHeight:"48px",paddingTop:a.trim().length>0?"12px":"0px",paddingBottom:a.trim().length>0?"12px":"0px",lineHeight:a.trim().length>0?"1.4":"48px",fontFamily:D||h||"Inter",fontSize:b||"14px",color:s?"#F3F4F6":"#1F2937",textAlign:le?"right":"left",direction:le?"rtl":"ltr",wordSpacing:"0",letterSpacing:"0"}})}),w&&n.jsxs("div",{className:"relative shrink-0",onMouseEnter:()=>{if(Be&&Ue){Re.current&&(clearTimeout(Re.current),Re.current=null);const e=$e();Ce(e),pe(!0)}},onMouseLeave:()=>{Re.current&&(clearTimeout(Re.current),Re.current=null),pe(!1)},children:[n.jsx("button",{style:{border:"none"},ref:_e,type:"button",onClick:E,"aria-label":ae(S?"stopVoiceInput":"startVoiceInput"),className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${S?"bg-red-500 text-white hover:bg-red-600":s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} ${Be?"opacity-60 cursor-not-allowed":""}`,disabled:Be,children:"connecting"===x?n.jsx(et,{className:"w-4 h-4 animate-spin"}):n.jsx(ze,{className:"w-4 h-4"})}),de&&Ue&&"undefined"!=typeof document&&r.createPortal(n.jsxs("div",{ref:Pe,className:"px-3 py-1.5 text-xs shadow-md pointer-events-none",style:{position:"fixed",top:`${Te.top}px`,left:`${Te.left}px`,maxWidth:"220px",whiteSpace:"normal",wordWrap:"break-word",minWidth:"180px",zIndex:999999,backgroundColor:s?"#1f2937":"#ffffff",color:s?"#f3f4f6":"#111827",border:s?"1px solid #374151":"1px solid #e5e7eb",borderRadius:"top"===Te.placement?"6px 6px 6px 6px":"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",overflow:"visible"},children:[n.jsx("div",{className:"text-left leading-relaxed",children:Ue}),"top"===Te.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{position:"absolute",top:"100%",left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:s?"6px solid #374151":"6px solid #e5e7eb",pointerEvents:"none"}}),n.jsx("div",{style:{position:"absolute",top:"100%",left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",marginTop:"-1px",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:s?"5px solid #1f2937":"5px solid #ffffff",pointerEvents:"none"}})]}),"bottom"===Te.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"absolute bottom-full",style:{left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:s?"5px solid #374151":"5px solid #e5e7eb"}}),n.jsx("div",{className:"absolute bottom-full -mb-px",style:{left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:s?"4px solid #1f2937":"4px solid #ffffff"}})]})]}),document.body)]})]}),d&&!S&&"function"==typeof t?n.jsx("button",{onClick:t,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md scale-100",style:{backgroundColor:l,color:"white",border:"none"},"aria-label":ae("stopGenerating"),children:n.jsx(it,{className:"w-3.5 h-3.5",fill:"currentColor"})}):n.jsx("button",{onClick:S&&A&&!De?A:Le,disabled:v||Me||f||S&&"connected"!==x,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none "+(a.trim()?"scale-100":"scale-95"),style:{backgroundColor:a.trim()?l:s?"#374151":"#e5e7eb",color:a.trim()?"white":"#9ca3af",border:"none"},"aria-label":ae("sendMessage"),children:n.jsx(ot,{className:"w-4 h-4 transition-transform",style:y?{transform:"rotate(-90deg)"}:void 0})})]}),S&&n.jsxs("p",{"aria-live":"polite",className:`text-xs mt-2 px-5 ${"connected"===x?"text-status-success":"text-gray-500"} flex items-center gap-1`,children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current inline-flex"}),ae("connected"===x?"voiceSessionLive":"connectingVoice")]}),k&&n.jsx("p",{role:"alert",className:"text-xs mt-1 px-5 text-status-error",children:ae(k)===k?ae("voiceUnavailable"):ae(k)}),T&&C&&"footer"===O&&n.jsxs("p",{className:"text-xs mt-2 px-5 text-center",style:{color:s?"#d1d5db":"#6b7280",fontFamily:h||"Inter",fontSize:b?`calc(${b} - 2px)`:"12px",direction:y?"rtl":"ltr"},dir:y?"rtl":"ltr",children:[C,Ye&&R&&n.jsx("a",{href:Ye,target:"_blank",rel:"noopener noreferrer",title:Ye,style:{color:s?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:R})]}),N&&n.jsx("div",{className:"mt-1.5 flex justify-center",children:n.jsx("a",{href:"https://eshal.ai",target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:n.jsxs("span",{dir:"ltr",className:"inline-flex items-center gap-1.5 py-0.5 px-3",children:[se.beforeBrand&&n.jsx("span",{className:ie("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:se.beforeBrand}),Oe?n.jsx("span",{className:ie("font-sans text-[10px] font-semibold",s?"text-gray-300":"text-gray-600"),children:"ESHAL"}):n.jsx("img",{src:s?"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='white'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='white'/%3e%3c/g%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='black'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='black'/%3e%3c/g%3e%3c/svg%3e",alt:"ESHAL",className:ie("h-3",s?"opacity-60":"opacity-50"),onError:()=>Ie(!0)}),se.afterBrand&&n.jsx("span",{className:ie("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:se.afterBrand})]})})})]})},Pn=["sun","mon","tue","wed","thu","fri","sat"];function Ln(e){if(!e||"string"!=typeof e)return null;const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return Number.isNaN(n)||Number.isNaN(r)?null:60*n+r}function Dn(e,t=new Date,n={}){if(!e||!e.showStatus)return null;const r=n.online||"Online now",a=n.officeOpen||"Online now",o=n.offlineFallback||"Offline";if("officeHours"!==e.statusMode)return{online:!0,label:r};const i=e.officeHours||{},{dayKey:s,minutes:l}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e||void 0,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),r=(n.find(e=>"weekday"===e.type)||{}).value||"";let a=parseInt((n.find(e=>"hour"===e.type)||{}).value||"0",10);const o=parseInt((n.find(e=>"minute"===e.type)||{}).value||"0",10);return 24===a&&(a=0),{dayKey:r.slice(0,3).toLowerCase(),minutes:60*a+o}}catch{return{dayKey:Pn[t.getDay()],minutes:60*t.getHours()+t.getMinutes()}}}(i.timezone,t),c=Array.isArray(i.days)?i.days.map(e=>String(e).slice(0,3).toLowerCase()):[],u=Ln(i.open),d=Ln(i.close);if(c.includes(s)&&(null!=u&&null!=d&&(u<=d?l>=u&&l<d:l>=u||l<d))){return{online:!0,label:(i.onlineMessage||"").trim()||a}}return{online:!1,label:(i.offlineMessage||"").trim()||o}}const Mn='[role="menuitem"]';function jn(e){const t=e&&"function"==typeof e.getRootNode?e.getRootNode():null;return t&&t.activeElement||document.activeElement}function Fn(e,t){return e?Array.from(e.querySelectorAll(t)).filter(e=>!e.disabled&&"true"!==e.getAttribute("aria-disabled")):[]}function Bn(e,t,n=Mn){const{key:r}=e;if("ArrowDown"!==r&&"ArrowUp"!==r&&"Home"!==r&&"End"!==r)return!1;const a=Fn(t,n);if(0===a.length)return!1;e.preventDefault();const o=a.indexOf(jn(t));let i;return i="Home"===r?0:"End"===r?a.length-1:"ArrowDown"===r?o<0?0:(o+1)%a.length:o<0?a.length-1:(o-1+a.length)%a.length,a[i].focus(),!0}const Un=({conciergeName:t,companyName:r,companyLogo:a,primaryColor:o,isDark:i,isMinimized:s=!1,textColor:l,fontFamily:c,fontSize:u,onToggleTheme:d,onMinimize:p,onClose:f,headerTextBold:g=!1,headerTextItalic:m=!1,headerTextColor:h,headerFontFamily:b,headerFontSize:y,subtitle:v=null,showStatus:w=!1,statusMode:S="always",officeHours:x=null,onRefreshChat:k,onCopyChat:E,defaultLanguage:A="en",isHandedOff:T=!1})=>{const C=o,O=h||"#FFFFFF",I=b||c||"Inter",R=y||u,N=T?null:v;yt(I);const _=e.useMemo(()=>Z(A),[A]),P=H(A),L=e.useMemo(()=>Y(N,P),[N,P]),D=e.useMemo(()=>Dn({showStatus:w,statusMode:S,officeHours:x}),[w,S,x]),[M,j]=e.useState(!1),F=e.useRef(null),B=e.useRef(null);e.useEffect(()=>{if(!M)return;const e=e=>{F.current&&!e.composedPath().includes(F.current)&&j(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[M]);const U=e.useRef(!1);e.useEffect(()=>{if(M){U.current=!0;const e=F.current?.querySelector('[role="menuitem"]');e?.focus()}else U.current&&(U.current=!1,B.current?.focus())},[M]);const z=O;return n.jsxs("div",{className:`text-white ${s?"px-4 py-2.5":"px-3 py-4"} flex items-center justify-between relative overflow-visible rounded-t-2xl z-[60]`,style:{background:C,fontFamily:I},children:[n.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 pl-1",children:[n.jsxs("div",{className:"relative w-11 h-11 flex-shrink-0",children:[n.jsx("div",{className:"w-full h-full rounded-full overflow-hidden flex items-center justify-center bg-white/20",children:a?n.jsx("img",{src:a,alt:"Logo",style:{display:"block",width:"100%",height:"100%",objectFit:"contain"},loading:"lazy"}):n.jsx("span",{className:"text-lg font-semibold leading-none",style:{color:z},children:(t||r||"")?.charAt(0)?.toUpperCase()})}),D?n.jsx("span",{title:D.label,className:ie("absolute bottom-0 h-3 w-3 rounded-full ring-2 ring-white",P?"left-0":"right-0"),style:{backgroundColor:D.online?"#22c55e":"#9ca3af",boxShadow:D.online?"0 0 0 3px rgba(34,197,94,0.25)":"none"},"aria-hidden":"true"}):null]}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0",style:{fontFamily:I},children:[n.jsx("h3",{title:t,className:ie("font-semibold leading-snug truncate",g&&"font-bold",m&&"italic"),style:{fontSize:R?`calc(${R} + 2px)`:"15px",color:z},children:t}),T?n.jsx("p",{"data-testid":"handoff-status",role:"status",className:"leading-snug truncate opacity-90",style:{fontSize:"12px",color:z,textAlign:P?"right":"left"},children:_("handedOffStatus")}):null,N?n.jsx("p",{title:N,className:"leading-snug truncate opacity-75",dir:L?"rtl":"ltr",style:{fontSize:"12px",color:z,textAlign:L?"right":"left"},children:N}):null]})]}),n.jsxs("div",{className:"flex items-center gap-0 relative z-10 text-white flex-shrink-0 ml-1",children:[n.jsxs("div",{className:"relative",ref:F,children:[n.jsx("button",{type:"button",ref:B,"aria-label":_("menu"),"aria-expanded":M,"aria-haspopup":"true",onClick:()=>j(e=>!e),onKeyDown:e=>{"Escape"===e.key&&M&&(e.preventDefault(),j(!1))},className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:z},children:n.jsx(Xe,{className:"w-4 h-4",strokeWidth:1.6})}),M&&n.jsxs("div",{role:"menu","aria-label":_("menu"),tabIndex:-1,dir:P?"rtl":"ltr",onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),void j(!1);Bn(e,F.current)||function(e,t,n=Mn){if("Tab"!==e.key)return!1;const r=Fn(t,n);if(0===r.length)return!1;const a=r[0],o=r[r.length-1],i=jn(t);e.shiftKey&&i===a?(e.preventDefault(),o.focus()):!e.shiftKey&&i===o&&(e.preventDefault(),a.focus())}(e,F.current)},className:`absolute top-full mt-1 w-44 rounded-xl border shadow-lg py-1 z-[9999] animate-in fade-in slide-in-from-top-1 duration-150 ${P?"left-0":"right-0"} ${i?"bg-gray-800 border-gray-700":"bg-white border-gray-200"}`,style:{fontFamily:I},children:[n.jsxs("button",{role:"menuitem",onClick:()=>{j(!1),k?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:I,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:P?"right":"left"},children:[n.jsx(at,{className:"w-3.5 h-3.5 flex-shrink-0"}),_("refreshChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{j(!1),E?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:I,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:P?"right":"left"},children:[n.jsx(Ye,{className:"w-3.5 h-3.5 flex-shrink-0"}),_("copyChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{j(!1),d?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:I,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:P?"right":"left"},children:[i?n.jsx(lt,{className:"w-3.5 h-3.5 flex-shrink-0"}):n.jsx(nt,{className:"w-3.5 h-3.5 flex-shrink-0"}),_(i?"lightMode":"nightMode")]})]})]}),n.jsx("button",{type:"button","aria-label":_("close"),onClick:f,className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:z},children:n.jsx(pt,{className:"w-3.5 h-3.5",strokeWidth:1.6})})]})]})},zn=({questions:t=[],collapsiblePrompt:r,onSubmit:a,primaryColor:o="#2563eb",isRtl:i=!1,isDark:s=!1,defaultLanguage:l="en",fontFamily:c})=>{const u=e.useMemo(()=>Z(l),[l]),[d,p]=e.useState({}),[f,g]=e.useState({}),[m,h]=e.useState(!1),b=e.useRef({}),y=[...t].sort((e,t)=>le(e.fieldType)-le(t.fieldType));return n.jsx("div",{className:"flex flex-col items-center justify-center p-6 h-full min-h-0 z-50 relative ",style:{...c?{fontFamily:c}:{},...s?{backgroundColor:"#10141C"}:{}},children:n.jsxs("div",{className:"w-full max-w-sm rounded-2xl shadow-xl border p-8 transition-colors duration-300 bg-white border-gray-100",style:s?{backgroundColor:"#1E232B",border:"1px solid #2A303C"}:void 0,children:[r&&n.jsx("div",{className:"mb-4 text-start",children:n.jsx("h3",{className:"transition-colors duration-300 text-sm font-semibold mb-1 "+(s?"text-white":"text-[#4A5568]"),children:r})}),n.jsxs("form",{onSubmit:async e=>{e.preventDefault();const t=(()=>{const e={};return y.forEach(t=>{const n=t.fieldType||"question",r=(d[n]??"").trim(),a=t.collectionPrompt||t.askToType||t.question||t.label||n,o=!0===t.required||"true"===t.required;r?("fullName"!==n&&"name"!==n||r.length<2&&(e[n]=u("nameInvalid")),"email"!==n||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e[n]=u("emailInvalid")),"phone"!==n&&"mobileno"!==n||/^[+]?[\d\s-]{8,15}$/.test(r)||(e[n]=u("phoneInvalid"))):o&&(e[n]="email"===n?u("emailRequired"):"fullName"===n||"name"===n?u("nameRequired"):"phone"===n||"mobileno"===n?u("phoneRequired"):`${a} ${u("fieldRequiredSuffix")}`)}),g(e),e})();if(Object.keys(t).length>0){const e=y.map((e,t)=>e.fieldType||`question_${t}`).find(e=>t[e]);return void b.current[e]?.focus()}h(!0);try{await a(d)}finally{h(!1)}},className:"space-y-4",noValidate:!0,children:[y.map((e,t)=>{const r=e.fieldType||`question_${t}`,a=e.collectionPrompt||e.askToType||e.question||e.label;if(!a?.trim())return null;let o="text";"email"===r&&(o="email"),"phone"!==r&&"mobileno"!==r||(o="tel");const l=(r||"").toLowerCase(),c="fullname"===l||"name"===l||"username"===l,m="phone"===l||"mobileno"===l,h="email"===l?u("onboardingEmailPlaceholder"):c?u("onboardingNamePlaceholder"):m?u("onboardingPhonePlaceholder"):a,y=f[r],v="w-full h-12 rounded-xl text-base md:text-sm px-3 py-1 outline-none border transition-colors focus:ring-0 "+(s?"text-white placeholder:text-[#A2A9B2] focus:border-[#5A6069]":"bg-gray-50/30 focus:bg-white text-gray-900 placeholder:text-gray-500 focus:border-[#B0B0B0]"),w=y?"!border-status-error focus:!border-status-error":"",S=`onboarding-field-${r}`,x=`${S}-error`;return n.jsxs("div",{children:[n.jsx("label",{htmlFor:S,className:"sr-only",children:a}),n.jsx("input",{id:S,ref:e=>{b.current[r]=e},placeholder:h,type:o,value:d[r]??"",onChange:e=>((e,t)=>{p(n=>({...n,[e]:t})),f[e]&&g(t=>{const n={...t};return delete n[e],n})})(r,e.target.value),className:`${v} ${w}`,"aria-invalid":y?"true":"false","aria-describedby":y?x:void 0,style:{direction:i?"rtl":"ltr",fontFamily:"inherit",...s?{backgroundColor:"#272C35",borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#3F444C"}:{borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#E0E0E0"}}}),y&&n.jsx("p",{id:x,role:"alert",className:"mt-1 text-xs text-status-error px-1",children:f[r]})]},r)}),n.jsx("button",{type:"submit",disabled:m,"aria-busy":m,"aria-label":m?u("submitting"):void 0,className:"w-full h-12 inline-flex items-center justify-center text-sm border-none font-semibold shadow-xl hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all rounded-xl mt-4 text-white",style:{backgroundColor:o,fontFamily:"inherit"},children:m?n.jsx(et,{className:"w-5 h-5 animate-spin","aria-hidden":"true"}):u("startChat")})]})]})})},$n=({categories:t=[],selectedCategoryId:r=null,onSelect:a,isDark:o=!1,primaryColor:i="#2563eb",fontFamily:s="Inter",isRtl:l=!1,defaultLanguage:c="en"})=>{const u=e.useMemo(()=>Z(c),[c]),d=e.useRef(null),[p,f]=e.useState(!1),[g,m]=e.useState(!1),h=e.useCallback(()=>{const e=d.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;f(Math.abs(t)>1),m(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{h();const e=d.current;if(!e)return;const t=new ResizeObserver(h);return t.observe(e),()=>t.disconnect()},[h,t]);const b=e.useCallback(e=>{const t=d.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]);if(!Array.isArray(t)||0===t.length)return null;const y=o?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.95)",v=o?"#e5e7eb":"#374151",w=o?"#4b5563":"#d1d5db",S=o?"#111827":"#ffffff",x=o?"#374151":"#e5e7eb";return n.jsxs("div",{className:"flex-shrink-0 px-2 py-2 border-b flex items-center gap-1",style:{backgroundColor:S,borderColor:x,fontFamily:s,direction:l?"rtl":"ltr"},role:"region","aria-label":u("filterByCategory"),children:[n.jsx("button",{type:"button",onClick:()=>b("left"),disabled:!p,"aria-label":u("scrollCategoriesLeft"),className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:y,border:`1px solid ${w}`,color:v,opacity:p?1:.3,cursor:p?"pointer":"default"},children:n.jsx(Ge,{size:14})}),n.jsx("div",{ref:d,onScroll:h,className:"flex-1 flex gap-2 overflow-x-auto",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map(e=>{const t=r===e.id;return n.jsx("button",{type:"button",onClick:()=>a?.(t?null:e.id),"aria-pressed":t,className:"flex-shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 whitespace-nowrap",style:{backgroundColor:o?"#1f2937":"#ffffff",border:t?`1.5px solid ${i}`:"1px solid "+(o?"#374151":"#e5e7eb"),color:t?i:o?"#e5e7eb":"#374151",fontFamily:s},children:n.jsx("span",{children:e.label})},e.id)})}),n.jsx("button",{type:"button",onClick:()=>b("right"),disabled:!g,"aria-label":u("scrollCategoriesRight"),className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:y,border:`1px solid ${w}`,color:v,opacity:g?1:.3,cursor:g?"pointer":"default"},children:n.jsx(He,{size:14})})]})},qn=({categories:e=[],selectedCategoryId:t=null,onSelect:r,isDark:a=!1,primaryColor:o="#2563eb",fontFamily:i="Inter",fontSize:s="14px",isRtl:l=!1,label:c="Choose a topic to get started:",regionLabel:u="Category filter"})=>{if(!Array.isArray(e)||0===e.length)return null;const d=a?"#9ca3af":"#6b7280";return n.jsxs("div",{className:"pl-[50px] pt-1",style:{direction:l?"rtl":"ltr",paddingLeft:l?0:50,paddingRight:l?50:void 0},role:"region","aria-label":u,children:[n.jsx("div",{className:"mb-2",style:{color:d,fontFamily:i,fontSize:`calc(${s} - 1px)`},children:c}),n.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const l=t===e.id;return n.jsx("button",{type:"button",onClick:()=>r?.(l?null:e.id),"aria-pressed":l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-150 hover:scale-[1.02] active:scale-[0.98]",style:{backgroundColor:a?"#1f2937":"#ffffff",border:l?`1.5px solid ${o}`:"1px solid "+(a?"#374151":"#e5e7eb"),color:l?o:a?"#e5e7eb":"#374151",fontFamily:i,fontSize:`calc(${s} - 1px)`,fontWeight:500},children:e.label},e.id)})})]})};const Gn=[{value:"😡",label:"😡",bg:"bg-red-200"},{value:"😕",label:"😕",bg:"bg-orange-200"},{value:"😐",label:"😐",bg:"bg-yellow-200"},{value:"😊",label:"😊",bg:"bg-green-200"},{value:"😍",label:"😍",bg:"bg-pink-200"}],Hn=[{value:"positive",label:"👍"},{value:"negative",label:"👎"}],Vn=[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],Wn=[{value:"1",label:"⭐"},{value:"2",label:"⭐"},{value:"3",label:"⭐"},{value:"4",label:"⭐"},{value:"5",label:"⭐"}],Yn=({format:t="EMOJI",prompt:r="How was your experience?",onRating:a,disabled:o=!1,isDark:i=!1,primaryColor:s="#2563eb",defaultLanguage:l="en"})=>{const c=e.useMemo(()=>Z(l),[l]),[u,d]=e.useState(null),[p,f]=e.useState(null),[g,m]=e.useState(!1),h=async e=>{if(!o&&!g){d(e),m(!0);try{a&&a(e,t)}finally{m(!1)}}},b=(()=>{switch(t){case"THUMBS":return Hn;case"NUMERIC":return Vn;case"STARS":return Wn;default:return Gn}})();return n.jsxs("div",{className:ie("transition-all duration-200 rounded-xl px-4",i?"bg-slate-800/50":"bg-slate-50/50"),children:[n.jsx("p",{className:ie("text-sm font-semibold text-center mb-3",i?"text-gray-300":"text-gray-500/80"),children:r}),n.jsxs("div",{className:"flex justify-center items-center",children:["EMOJI"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",children:b.map(e=>n.jsx("button",{onClick:()=>h(e.value),disabled:o||g,className:ie("flex items-center justify-center text-2xl transition-transform","bg-transparent border-0 p-0 cursor-pointer","hover:scale-110 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-0","rounded-md focus-visible:ring-2 focus-visible:ring-blue-700",u===e.value?"":"opacity-80"),children:n.jsx("span",{role:"img","aria-label":`${c("rate")} ${e.value}`,children:e.label})},e.value))}),"THUMBS"===t&&n.jsx("div",{className:"flex gap-6 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":1===e.value?c("thumbsUp"):c("thumbsDown"),onClick:()=>h(e.value),disabled:o||g,className:ie("w-10 h-10 rounded-xl border flex items-center justify-center shadow-md text-2xl transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","drop-shadow-md",i?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-100 hover:bg-gray-50",u===e.value&&"ring-2 ring-primary/40 scale-110"),style:{borderColor:u===e.value?s:void 0},children:n.jsx("span",{className:"drop-shadow-md","aria-hidden":"true",children:e.label})},e.value))}),"NUMERIC"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":`${c("rate")} ${e.value}`,onClick:()=>h(e.value),disabled:o||g,className:ie("w-10 h-10 rounded-lg flex items-center justify-center text-sm font-semibold transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",u===e.value?"ring-2 ring-primary/40 scale-110 shadow-md text-white":i?"bg-gray-700 border border-gray-600 text-gray-300 hover:bg-gray-600":"bg-white border border-gray-200 text-gray-700 hover:bg-gray-50"),style:{backgroundColor:u===e.value?s:void 0,borderColor:u===e.value?s:void 0},children:e.label},e.value))}),"STARS"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",onMouseLeave:()=>f(null),children:b.map(e=>{const t=p===e.value;return n.jsx("button",{onClick:()=>h(e.value),onMouseEnter:()=>f(e.value),disabled:o||g,className:ie("flex items-center justify-center text-2xl","bg-transparent border-0 p-0 cursor-pointer focus:outline-none","rounded-md focus-visible:ring-2 focus-visible:ring-blue-700","disabled:opacity-50 disabled:cursor-not-allowed"),style:{transform:t?"scale(1.25)":"scale(1)",filter:t?"brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15))":"none",opacity:t?1:.6,transition:"all 0.2s ease"},"aria-label":`${c("rate")} ${e.value}`,children:n.jsx("span",{"aria-hidden":"true",children:e.label})},e.value)})})]}),g&&n.jsx("p",{"aria-live":"polite",className:ie("text-xs mt-3 text-center",i?"text-slate-400":"text-slate-500"),children:c("submittingFeedback")})]})};async function Kn({apiBaseUrl:e,conversationId:t,chip:n,submitText:r,position:a,source:o="widget",getAuthToken:i,enabled:s=!0}={}){try{if(!1===s)return!1;if(!e||"string"!=typeof e)return!1;if(!t||"string"!=typeof t)return!1;const l=function({chip:e,submitText:t,position:n,conversationId:r,source:a="widget"}={}){const o=e&&"object"==typeof e,i=o&&"string"==typeof e.text?e.text:"",s="string"==typeof t&&t?t:o&&"string"==typeof e.submitText?e.submitText:"string"==typeof e?e:"",l=i||s;if(!l)return null;const c={conversationId:r,chipText:l,submitText:s||void 0,position:Number.isInteger(n)?n:void 0,source:a},u=o?e?.promptId:void 0;return"string"==typeof u&&u&&(c.promptId=u),c}({chip:n,submitText:r,position:a,conversationId:t,source:o});if(!l)return!1;const c=`${e.replace(/\/$/,"")}/api/v1/support/chip-click`,u=JSON.stringify(l);let d;if("function"==typeof i)try{d=await i()}catch{d=void 0}if(!d&&"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob)try{if(navigator.sendBeacon(c,new Blob([u],{type:"application/json"})))return!0}catch{}if("function"!=typeof fetch)return!1;const p={"Content-Type":"application/json"};return d&&(p.Authorization=`Bearer ${d}`),await fetch(c,{method:"POST",headers:p,credentials:"include",keepalive:!0,body:u}),!0}catch{return!1}}const Xn=e.createContext(null),Zn="#2563eb";function Qn(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replace(`{${t}}`,String(n)),String(e))}const Jn=e=>String(e??"").replace(/ /g," ");function er(e){const t=Math.max(0,Math.ceil(e)),n=`${String(Math.floor(t%3600/60)).padStart(t>=3600?2:1,"0")}:${String(t%60).padStart(2,"0")}`;return t>=3600?`${Math.floor(t/3600)}:${n}`:n}function tr(e){return{border:`1px solid ${Zn}`,borderRadius:10,padding:12,marginTop:8,background:e?"#111827":"#ffffff",color:e?"#f3f4f6":"#111827",display:"grid",gap:8,fontSize:13}}function nr(e){return{width:"100%",boxSizing:"border-box",padding:"7px 10px",borderRadius:6,border:"1px solid "+(e?"#374151":"#d1d5db"),background:e?"#1f2937":"#f9fafb",color:"inherit",fontSize:14}}function rr(e){return{padding:"7px 12px",borderRadius:6,border:"none",background:Zn,color:"#ffffff",fontWeight:600,fontSize:13,cursor:e?"default":"pointer",opacity:e?.5:1,justifySelf:"start"}}const ar={background:"none",border:"none",padding:0,color:Zn,fontSize:12,cursor:"pointer",justifySelf:"start"};function or({spec:t,isDark:r,onButtonClick:a}){const o=e.useContext(Xn),i="sms"===t?.mode?"sms":"email",s=o?.t??(e=>e),[l,c]=e.useState("address"),[u,d]=e.useState(()=>("sms"===i?o?.prefillPhone:o?.prefillEmail)||""),[p,f]=e.useState(""),[g,m]=e.useState(""),[h,b]=e.useState(!1),[y,v]=e.useState(null),[w,S]=e.useState(0),[x,k]=e.useState(!1),[E,A]=e.useState(null),[T,C]=e.useState(0),[O,I]=e.useState(null),[R,N]=e.useState(null),_=e.useRef(!1),P=e.useRef(Symbol("verify-card")),L=void 0!==e.useContext(bn),D=Boolean(o)&&!L&&!x&&"done"!==l;if(e.useEffect(()=>{if(!D||!o?.setPending)return;const e=P.current;return o.setPending(e,!0),()=>o.setPending(e,!1)},[D,o]),e.useEffect(()=>{if("sms"!==i||"code"!==l||!o?.status)return;let e=0,t=!1;const n=setInterval(async()=>{if(e+=1,t||e>12)clearInterval(n);else try{const e=await o.status(),t=e?.body?.delivery;"failed"===t?(v(s("verifyNotDelivered")),S(0),clearInterval(n)):"delivered"!==t&&null!==t||clearInterval(n)}catch{}},5e3);return()=>{t=!0,clearInterval(n)}},[i,l,o,s]),e.useEffect(()=>{if("sms"!==i||!o?.config)return;let e=!1;return o.config().then(t=>{const n=t?.body?.sms_calling_codes;!e&&Array.isArray(n)&&N(n.map(String))}).catch(()=>{}),()=>{e=!0}},[i,o]),e.useEffect(()=>{if(!E)return;const e=()=>{const e=(E-Date.now())/1e3;e<=0?(A(null),C(0),v(null)):C(e)};e();const t=setInterval(e,1e3);return()=>clearInterval(t)},[E]),e.useEffect(()=>{if(w<=0)return;const e=setTimeout(()=>S(e=>e-1),1e3);return()=>clearTimeout(e)},[w]),!o)return null;if(x||L&&"done"!==l)return n.jsx("div",{style:{...tr(r),borderColor:r?"#374151":"#d1d5db"},"data-testid":"verify-card",children:n.jsx("div",{style:{fontSize:12,opacity:.7},children:s(x?"verifyCancelled":"verifyTitle")})});const M=async()=>{if(!h&&u.trim()){b(!0),v(null);try{const e=await o.start({method:i,..."sms"===i?{phone:u.trim()}:{email:u.trim()}});e.ok?(m(e.body?.masked||u.trim()),A(null),I(null),e.body?.formatted&&d(String(e.body.formatted)),S(Number(e.body?.resend_after_s)||60),f(""),c("code")):(v(e.body?.error||s("verifyGenericError")),e.body?.resendAfterS&&S(Number(e.body.resendAfterS)),"locked"!==e.body?.code&&"too_many"!==e.body?.code||!e.body?.lockedUntil||(A(Date.parse(e.body.lockedUntil)),I("too_many"===e.body.code?u.trim():null),S(0)))}catch{v(s("verifyGenericError"))}finally{b(!1)}}},j=async()=>{const e=p.replace(/\D/g,"");if(!h&&6===e.length){b(!0),v(null);try{const n=await o.verify({code:e});if(n.ok){if(m(n.body?.masked||g),c("done"),!_.current&&a){_.current=!0;const e=s("verifyResumeMessage");a(e,e,{verificationComplete:{...t?.tool_call_id?{tool_call_id:String(t.tool_call_id)}:{},...t?.invocation_id?{invocation_id:String(t.invocation_id)}:{}}})}}else"wrong_code"===n.body?.code&&"number"==typeof n.body?.triesLeft?(v(Qn(s(1===n.body.triesLeft?"verifyTryLeft":"verifyTriesLeft"),{count:n.body.triesLeft})),f("")):(v(n.body?.error||s("verifyGenericError")),"expired"!==n.body?.code&&"locked"!==n.body?.code||c("address"),"locked"===n.body?.code&&n.body?.lockedUntil&&(A(Date.parse(n.body.lockedUntil)),I(null),S(0)))}catch{v(s("verifyGenericError"))}finally{b(!1)}}};if("done"===l)return n.jsx("div",{style:tr(r),"data-testid":"verify-card",children:n.jsxs("div",{style:{color:"#13703a",fontWeight:600},children:["✓ ",Qn(s("verifyDone"),{target:Jn(g)})]})});const F="sms"===i&&function(e,t){if(!Array.isArray(t)||0===t.length||!String(e).trim().startsWith("+"))return!1;const n=String(e).replace(/\D/g,"");return!!n&&!t.some(e=>n.startsWith(e)||e.startsWith(n))}(u,R),B=e=>e?n.jsx("div",{role:"alert",style:{color:"#b42318",fontSize:13},children:e}):null,U=T>0&&(null===O||O===u.trim()),z=h||!u.trim()||w>0||U||F;return n.jsxs("div",{style:tr(r),"data-testid":"verify-card",children:[n.jsx("div",{style:{fontWeight:600},children:s("verifyTitle")}),"address"===l?n.jsxs(n.Fragment,{children:[n.jsxs("label",{style:{display:"grid",gap:4},children:[n.jsx("span",{style:{fontSize:12,opacity:.8},children:s("sms"===i?"verifyPhoneLabel":"verifyEmailLabel")}),n.jsx("input",{style:nr(r),type:"sms"===i?"tel":"email",autoComplete:"sms"===i?"tel":"email",inputMode:"sms"===i?"tel":"email",placeholder:"sms"===i?"+971 50 123 4567":"name@example.com",value:u,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"!==e.key||z||M()}})]}),B(F?s("verifyCountryNotAllowed"):y),n.jsx("button",{type:"button",style:rr(z),disabled:z,onClick:M,children:h?s("verifySending"):U?Qn(s("verifyLockedFor"),{time:er(T)}):w>0?Qn(s("verifyResendIn"),{seconds:w}):s("verifySendCode")})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{children:Qn(s("verifyEnterCode"),{target:Jn(g)})}),n.jsx("input",{style:{...nr(r),letterSpacing:"0.3em",fontSize:18},"aria-label":s("verifyCodeLabel"),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,value:p,onChange:e=>f(e.target.value.replace(/\D/g,"").slice(0,6)),onKeyDown:e=>{"Enter"===e.key&&j()}}),B(y),n.jsx("button",{type:"button",style:rr(h||6!==p.length),disabled:h||6!==p.length,onClick:j,children:s("verifyConfirm")}),w>0?n.jsx("span",{style:{fontSize:12,opacity:.7},children:Qn(s("verifyResendIn"),{seconds:w})}):n.jsx("button",{type:"button",style:ar,onClick:M,disabled:h,children:s("verifyResend")}),n.jsx("button",{type:"button",style:ar,onClick:()=>{c("address"),v(null),S(0)},children:s("sms"===i?"verifyDifferentNumber":"verifyDifferent")})]}),n.jsx("button",{type:"button",style:{...ar,color:r?"#9ca3af":"#6b7280"},onClick:()=>{o.cancel&&Promise.resolve(o.cancel()).catch(()=>{}),k(!0)},disabled:h,children:s("verifyCancel")})]})}const ir="#ffffff",sr="#f5f5f5",lr="#000000",cr="#1f2937",ur="#f3f4f6",dr="#2563eb",pr="eshal:widget:size",fr=(e,t)=>!e||(e=>e?.trim().toLowerCase())(e)===t,gr=e=>(e instanceof Date?e:new Date(e)).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(/am|pm/i,e=>e.toUpperCase()),mr=e=>{const t=(e||"EMOJI").toString().trim().toUpperCase();return"THUMBS"===t||"THUMB"===t?"THUMBS":"STARS"===t||"STAR"===t?"STARS":"NUMERIC"===t||"NUMBER"===t?"NUMERIC":"EMOJI"},hr=({isOpen:t,isMinimized:r,isDark:a,onStopGeneration:o,primaryColor:i,textColor:s,conciergeName:l,companyName:c,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,messages:f,isLoading:g,isConversationLoading:m=!1,inputValue:h,setInputValue:b,onSend:y,onDirectSend:w,onToggleTheme:S,onMinimize:x,onClose:k,quickQuestions:E=[],quickQuestionsEnabled:A,onQuickQuestion:T,quickQuestionsLayout:C="vertical",agentMessageBubbleColor:O,userMessageBoxColor:I,assistantTextColor:R,userTextColor:N,fontFamily:_="Inter",agentMessageBubbleFontFamily:P,agentMessageBubbleFontSize:L,userMessageBubbleFontFamily:D,userMessageBubbleFontSize:M,fontSize:j="14px",defaultLanguage:F="en",onDecision:B,headerTextBold:U=!1,headerTextItalic:z=!1,headerTextColor:$,headerFontFamily:q,headerFontSize:G,subtitle:V=null,showStatus:W=!1,statusMode:Y="always",officeHours:K=null,enableVoiceInteraction:X=!1,isVoiceSessionActive:Q=!1,voiceStatus:J="idle",voiceError:ee=null,voiceConclusionForCsat:te=!1,onVoiceToggle:ne,onBidiSubmit:re,disclaimerEnabled:ae=!1,disclaimerText:oe,disclaimerPosition:se="top",disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de=!0,apiBaseUrl:pe,apiKey:fe,getAuthToken:ge,conversationId:me,conciergeId:he,onboardingQuestions:ye=[],onboardingActive:ve=!1,onboardingCompleted:we=!1,onOnboardingFormSubmit:Se,collectionPrompt:xe,csatEnabled:ke=!1,csatFormat:Ee="EMOJI",csatPrompt:Ae="How was your experience?",csatRequest:Te=null,liveJoined:Ce=[],isHandedOff:Oe=!1,handoffPoints:Ie=[],onPromptSuggestionClick:Re,onboardingEnabled:Ne=!1,onResetConversation:_e,sessionExpiringSoon:Pe=!1,autoPromptEnabled:Le=!0,autoPromptQuestionDisplay:De=!0,autoPromptClickTelemetry:Me=!0,allowFeedback:je=!0,provideCitations:Fe=!0,onFeedback:Be,onRetryMessage:Ue,onRefreshChat:ze,onCopyChat:$e,filterCategories:qe=[],showFilterStep:Ge=!1,widgetFilter:He=null,onWidgetFilterChange:Ve,onSynthesizeAssistantMessage:We,launcherPosition:Ye="bottom-right",chatFeatures:Ke,organizationId:Xe})=>{yt(_);const Ze=e.useRef(null),Qe=e.useRef(null),Je=e.useMemo(()=>Z(F),[F]),[et,tt]=e.useState(()=>new Set),nt=e.useCallback((e,t)=>{tt(n=>{if(t===n.has(e))return n;const r=new Set(n);return t?r.add(e):r.delete(e),r})},[]),rt=e.useMemo(()=>pe&&me?{t:Je,setPending:nt,start:e=>((e,t,n)=>v("start",e,t,n))({...e,conversationId:me},pe,ge),verify:e=>((e,t,n)=>v("verify",e,t,n))({...e,conversationId:me},pe,ge),status:()=>((e,t,n)=>v("status",e,t,n))({conversationId:me},pe,ge),cancel:()=>((e,t,n)=>v("cancel",e,t,n))({conversationId:me},pe,ge),config:()=>((e,t,n)=>v("config",e,t,n))({conversationId:me},pe,ge)}:null,[Je,pe,me,ge,nt]);e.useEffect(()=>{Qe.current?.focus()},[]);const at=e.useCallback((e,t,n)=>{Kn({apiBaseUrl:pe,conversationId:me,chip:t,submitText:null==e?void 0:String(e),position:n,source:"widget",getAuthToken:ge,enabled:Me})},[pe,ge,me,Me]),ot=e.useCallback((e,t,n)=>{t&&"object"==typeof t&&at(e,t,n);const r=n&&"object"==typeof n&&n.toolConfirmation?n.toolConfirmation:null,a=n&&"object"==typeof n&&n.verificationComplete?n.verificationComplete:null;Re?Re(e):r?w?.(e,void 0,{toolConfirmation:r}):a?w?.(e,void 0,{verificationComplete:a,skipUserAppend:!0}):w?.(e)},[Re,w,at]),it=Ye.includes("right"),lt=Ye.includes("bottom"),[ct,ut]=e.useState(()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(pr);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.width&&"number"==typeof t?.height&&t.width>=320&&t.height>=400)return t}catch{}return null}),dt=e.useRef(null),pt=e.useRef({x:0,y:0}),ft=e.useRef({width:380,height:650});e.useEffect(()=>{const e=e=>{const t=dt.current;if(!t)return;const n=e.clientX-pt.current.x,r=e.clientY-pt.current.y,a={...ft.current},o=.92*window.innerWidth,i=.85*window.innerHeight;if("corner"===t||"horizontal"===t){const e=it?ft.current.width-n:ft.current.width+n;a.width=Math.min(Math.max(320,e),o)}if("corner"===t||"vertical"===t){const e=lt?ft.current.height-r:ft.current.height+r;a.height=Math.min(Math.max(400,e),i)}ut(a)},t=()=>{dt.current&&(dt.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[it,lt]),e.useEffect(()=>{if(ct)try{window.localStorage.setItem(pr,JSON.stringify(ct))}catch{}},[ct]);const gt=(e,t)=>{t.preventDefault(),t.stopPropagation(),dt.current=e,pt.current={x:t.clientX,y:t.clientY},ft.current=ct??{width:380,height:650};const n={corner:it===lt?"nwse-resize":"nesw-resize",horizontal:"ew-resize",vertical:"ns-resize"};document.body.style.cursor=n[e],document.body.style.userSelect="none"},[mt,ht]=e.useState(!1),[bt,vt]=e.useState(()=>{try{return be(Xe)?.csatSubmitted??!1}catch{return!1}}),[wt,St]=e.useState(!1),[xt,kt]=e.useState(!1),[Et,At]=e.useState(0),[Tt,Ct]=e.useState(""),[Ot,It]=e.useState(!1),[Rt,Nt]=e.useState(!1);e.useEffect(()=>{t||(St(!1),At(0),Ct(""),Nt(!1))},[t]),e.useEffect(()=>{St(!1),At(0),Ct(""),Nt(!1)},[me]),e.useEffect(()=>{try{const e=be(Xe)?.csatSubmitted??!1;vt(e),e&&ht(!1)}catch{}},[me]),function(t,n=[],r={}){const{enabled:a=!0,threshold:o=30,behavior:i="smooth",delay:s=0}=r,l=e.useRef(!0);e.useRef(0),e.useEffect(()=>{if(!a||!t.current)return;const e=t.current,n=()=>{const t=e.scrollHeight-e.scrollTop-e.clientHeight;l.current=t<o},r=()=>{n()};e.addEventListener("scroll",r,{passive:!0}),n();const c=setTimeout(()=>{l.current&&e&&e.scrollTo({top:e.scrollHeight,behavior:i})},s);return()=>{e.removeEventListener("scroll",r),clearTimeout(c)}},[t,a,o,i,s,...n])}(Ze,[f,g],{enabled:!0,threshold:30,behavior:"smooth",delay:0});const _t=H(F),Pt=e.useMemo(()=>a?fr(O,ir)?cr:O||cr:O||ir,[O,a]),Lt=e.useMemo(()=>a?fr(s,lr)?ur:s||ur:s||lr,[a,s]),Dt=e.useMemo(()=>a?fr(I,sr)?i||dr:I||i||dr:I||sr,[a,i,I]),Mt=Je(xt?"conversationResolved":"typeYourMessage"),jt=f?.some?.(e=>"user"===e.role),Ft=e.useMemo(()=>(f||[]).filter(e=>"user"===e.role).length,[f]),[Bt,Ut]=e.useState(0),zt=He?.category?(qe||[]).find(e=>e.id===He.category):null,$t=e.useCallback(e=>{if(!Ve)return;const t=He?.category||null;if(e){if(Ve({category:e,tags:[]}),Ut(Ft),!jt&&e!==t&&We){const t=(qe||[]).find(t=>t.id===e),n=t?.label||e,r=Je("categoryTopicsHeading").replace("{category}",n);We(r,{replaceMarker:"category-intro"})}}else Ve(null)},[Ve,He,Ft,qe,jt,We,Je]);e.useCallback(e=>{const t=He?.category||zt?.id;t&&Ve&&Ve({category:t,tags:[e]}),w&&w(e)},[He,zt,Ve,w]);const qt=Array.isArray(qe)&&qe.length>0,Gt=qt&&!jt&&!He?.category,Ht=!jt&&E.length>0&&A&&!He?.category,Vt=ye&&ye.length>0,Wt=Boolean(ke),Yt=Ne&&Vt&&!we,Kt=e.useCallback(async()=>{if(Wt&&!Ot&&!xt&&0!==Et){It(!0),Nt(!1);try{const e={"Content-Type":"application/json"};if("function"==typeof ge){const t=await ge();t&&(e.Authorization=`Bearer ${t}`)}const t=mr(Ee),n=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({conversationId:me,rating:String(Et),ratingFormat:t,conciergeId:he,feedback:Tt||void 0})});n.ok?(St(!1),At(0),Ct(""),Ve&&Ve(null),ze?ze():_e&&_e()):(console.error("Failed to submit resolve feedback:",await n.text()),Nt(!0))}catch(e){console.error("Error submitting resolve feedback:",e),Nt(!0)}finally{It(!1)}}},[Wt,Ot,xt,Et,Tt,me,ge,he,pe,Ee,_e,ze,Ve]),Xt=e.useCallback(()=>{if(!Wt||!me||!jt)return Ve&&Ve(null),ze?ze():_e&&_e(),void k?.();wt?(St(!1),k?.()):xt?k?.():St(!0)},[Wt,me,jt,wt,xt,k,Ve,ze,_e]);e.useEffect(()=>{Wt||(wt&&St(!1),xt&&kt(!1),0!==Et&&At(0),Tt&&Ct(""))},[Wt,wt,xt,Et,Tt]);const Zt=e.useMemo(()=>{if(!f||!Array.isArray(f))return[];for(let e=f.length-1;e>=0;e-=1)if("assistant"===f[e]?.role){const t=f[e].prompts;return Array.isArray(t)?t:[]}return[]},[f]),Qt=e.useRef([]);e.useEffect(()=>{Zt.length>0?Qt.current=Zt:f&&0!==f.length&&f.some(e=>"user"===e.role)||(Qt.current=[])},[Zt,f]);const Jt=e.useRef(Ft);e.useEffect(()=>{Ft!==Jt.current&&(Jt.current=Ft,Qt.current=[])},[Ft]);const en=Array.isArray(f)&&f.some(e=>"user"===e?.role),tn=Zt.length>0?Zt:en?Qt.current:[];e.useEffect(()=>{if(!ke)return;if(!mt)return;if(bt)return;const e=Ze.current;if(!e)return;const t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(t)}},[mt,ke,bt]);const nn=()=>{const e=mr(Ee);if("STARS"===e)return n.jsx("div",{className:"flex justify-center gap-2 mb-5",role:"group","aria-label":Je("rateExperience"),children:[1,2,3,4,5].map(e=>n.jsx("button",{"aria-label":`${Je("rate")} ${e}`,onClick:()=>At(e),className:"transition-all duration-150 hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",disabled:Ot,children:n.jsx(st,{className:ie("w-8 h-8 transition-colors",e<=Et?"text-yellow-400 drop-shadow-sm":a?"text-gray-600":"text-gray-300"),fill:e<=Et?"#FBBF24":"none"})},e))});if("THUMBS"===e)return n.jsx("div",{className:"flex gap-4 justify-center mb-5",role:"group","aria-label":Je("rateExperience"),children:[{value:"positive",emoji:"👍"},{value:"negative",emoji:"👎"}].map(e=>n.jsx("button",{"aria-label":"positive"===e.value?Je("thumbsUp"):Je("thumbsDown"),onClick:()=>At(e.value),disabled:Ot,className:ie("w-12 h-12 rounded-xl border flex items-center justify-center text-2xl transition-all hover:scale-105 active:scale-95",Et===e.value?"ring-2 ring-blue-300 scale-110 shadow-lg":"",a?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-200 hover:bg-gray-50"),children:n.jsx("span",{className:"drop-shadow-md",children:e.emoji})},e.value))});return n.jsx("div",{className:"flex gap-2 justify-center items-center mb-5",role:"group","aria-label":Je("rateExperience"),children:[{value:1,emoji:"😡"},{value:2,emoji:"😕"},{value:3,emoji:"😐"},{value:4,emoji:"😊"},{value:5,emoji:"😍"}].map(e=>n.jsx("button",{"aria-label":`${Je("rate")} ${e.value}`,onClick:()=>At(e.value),disabled:Ot,className:ie("rounded-full w-10 h-10 flex items-center justify-center text-xl transition-all hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",Et===e.value?"ring-2 ring-blue-100 scale-125 bg-gradient-to-b from-yellow-200 to-yellow-400 shadow-md":"grayscale-[0.3] opacity-80 hover:grayscale-0"),children:n.jsx("span",{role:"img","aria-label":`${Je("rate")} ${e.value}`,className:"drop-shadow-sm filter",children:e.emoji})},e.value))})};if(!t)return null;const rn=!r&&ct?{width:ct.width,height:ct.height,maxWidth:"92vw",maxHeight:"85vh"}:void 0;return n.jsx(Xn.Provider,{value:rt,children:n.jsxs("div",{dir:_t?"rtl":"ltr",className:"relative flex-shrink-0 z-50 "+(r?"w-80 h-auto":""),style:rn,children:[!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{onMouseDown:e=>gt("horizontal",e),className:"absolute top-0 h-full w-1.5 cursor-ew-resize hover:bg-blue-500/20 transition-colors z-[70] "+(it?"left-0":"right-0"),"aria-hidden":!0}),n.jsx("div",{onMouseDown:e=>gt("vertical",e),className:"absolute left-0 w-full h-1.5 cursor-ns-resize hover:bg-blue-500/20 transition-colors z-[70] "+(lt?"top-0":"bottom-0"),"aria-hidden":!0})]}),n.jsxs("div",{id:"chat-window-panel",ref:Qe,role:"dialog","aria-modal":"true","aria-label":Je("openChat"),tabIndex:-1,className:`relative focus:outline-none ${ct||r?"":"w-[380px]"} ${ct||r?"":"h-[650px]"} ${r?"w-80 h-auto":""} ${ct&&!r?"w-full h-full":""} max-w-[92vw] border rounded-2xl shadow-2xl bg-white border-gray-200 flex flex-col ${r?"":"max-h-[85vh]"} overflow-hidden ${a?"bg-gray-900 border-gray-700":""}`,children:[!r&&n.jsx("div",{onMouseDown:e=>gt("corner",e),"aria-hidden":"true",className:`absolute w-4 h-4 ${it===lt?"cursor-nwse-resize":"cursor-nesw-resize"} text-gray-400 hover:text-blue-500 transition-colors z-[71] flex p-0.5 ${lt?"top-0 items-start":"bottom-0 items-end"} ${it?"left-0 justify-start":"right-0 justify-end"}`,children:n.jsx("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 "+(lt&&it?"rotate-180":lt?"-rotate-90":it?"rotate-90":""),"aria-hidden":!0,children:n.jsx("path",{d:"M11 1 L1 11 M11 5 L5 11 M11 9 L9 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"})})}),n.jsx(Un,{conciergeName:l,companyName:c,companyLogo:u,primaryColor:i,isDark:a,isMinimized:r,textColor:Lt,fontFamily:_,fontSize:j,onToggleTheme:S,onMinimize:x,onClose:Xt,headerTextBold:U,headerTextItalic:z,headerTextColor:$,headerFontFamily:q,headerFontSize:G,subtitle:V,showStatus:W,statusMode:Y,officeHours:K,onRefreshChat:ze,onCopyChat:$e,defaultLanguage:F,isHandedOff:Oe}),!r&&qt&&!Gt&&!(wt&&!xt)&&!(ve&&!we)&&n.jsx($n,{categories:qe,selectedCategoryId:He?.category||null,onSelect:$t,isDark:a,primaryColor:i,fontFamily:_,isRtl:_t,defaultLanguage:F}),!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{ref:Ze,role:"log","aria-live":"polite",className:`chat-messages flex-1 overflow-y-auto px-3 py-4 space-y-4 ${a?"bg-gray-900":"bg-gradient-to-b from-gray-50/50 to-white"} break-words`,children:wt&&!xt?n.jsx("div",{className:"animate-in slide-in-from-top-4 fade-in duration-300 mt-4 mx-2",children:n.jsxs("div",{className:ie("w-full rounded-3xl p-6 shadow-lg",a?"bg-gray-800 shadow-black/20":"bg-white shadow-gray-200/80"),children:[n.jsx("p",{className:ie("text-sm font-medium text-center mb-5 [font-family:inherit]",a?"text-gray-300":"text-gray-500"),children:Ae||Je("feedbackPrompt")}),nn(),n.jsx("textarea",{"aria-label":Je("feedbackPlaceholder"),value:Tt,onChange:e=>{e.target.value.length<=1e3&&Ct(e.target.value)},maxLength:1e3,placeholder:Je("feedbackPlaceholder"),rows:4,disabled:Ot,className:ie("w-full rounded-xl border px-4 py-3 text-sm [font-family:inherit] resize-none outline-none transition-colors mb-5",a?"bg-gray-700 border-gray-600 text-gray-100 placeholder-gray-400":"bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400")}),n.jsxs("div",{className:"relative group",children:[n.jsx("button",{onClick:Kt,disabled:0===Et||Ot,"aria-describedby":0===Et?"resolve-rating-hint":void 0,className:ie("w-full py-3.5 rounded-xl text-sm font-semibold [font-family:inherit] transition-all duration-200 border-none outline-none focus:outline-none active:outline-none focus:ring-0 active:ring-0","disabled:opacity-50 disabled:cursor-not-allowed","focus-visible:ring-2 focus-visible:ring-blue-700",a?"bg-gray-700 text-gray-100 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:Je(Ot?"submitting":"submitFeedback")}),0===Et&&!Ot&&n.jsx("div",{id:"resolve-rating-hint",role:"tooltip",className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-md text-xs bg-gray-800 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:Je("selectRatingFirst")})]}),Rt&&!Ot&&n.jsxs("div",{role:"alert",className:"mt-3 text-center text-sm",children:[n.jsx("p",{className:a?"text-red-300":"text-red-700",children:Je("feedbackSendFailed")}),n.jsx("button",{type:"button",onClick:()=>{St(!1),Nt(!1)},className:ie("mt-1 underline bg-transparent border-none [font-family:inherit] focus-visible:ring-2 focus-visible:ring-blue-700",a?"text-gray-200":"text-gray-700"),children:Je("backToChat")})]})]})}):ve&&!we&&Se?n.jsx(zn,{questions:ye,onPromptSuggestionClick:ot,collapsiblePrompt:xe,onSubmit:Se,primaryColor:i,isRtl:_t,isDark:a,defaultLanguage:F,fontFamily:_}):n.jsxs(n.Fragment,{children:[Pe&&n.jsx("div",{role:"status",className:"mx-3 mt-1 mb-2 rounded-lg px-3 py-2 text-xs font-medium "+(a?"bg-amber-900/40 text-amber-200 border border-amber-700/50":"bg-amber-50 text-amber-800 border border-amber-200"),children:Je("sessionExpiringSoon")}),n.jsx(vn,{messages:f,liveJoined:Ce,handoffPoints:Ie,isDark:a,primaryColor:i,isLoading:g,agentMessageBubbleColor:O,userMessageBoxColor:I,textColor:s,assistantTextColor:R,userTextColor:N,fontFamily:_,agentMessageBubbleFontFamily:P,agentMessageBubbleFontSize:L,userMessageBubbleFontFamily:D,userMessageBubbleFontSize:M,fontSize:j,formatTime:gr,isRtl:_t,defaultLanguage:F,quickQuestions:E,shouldShowQuickQuestions:Ht,onQuickQuestion:T??w,quickQuestionsLayout:C,onDecision:B,disclaimerEnabled:ae,disclaimerText:oe,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,resolvedAgentBubbleColor:Pt,resolvedUserMessageColor:Dt,resolvedTextColor:Lt,isVoiceSessionActive:Q,voiceStatus:J,messagesContainerRef:Ze,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,conciergeName:l,companyName:c,apiBaseUrl:pe,getAuthToken:ge,onPromptSuggestionClick:ot,conversationResetKey:me,allowFeedback:je,provideCitations:Fe,onFeedback:Be,onRetryMessage:Ue,headerTextColor:$,beforePromptsSlot:Gt?n.jsx(qn,{categories:qe,selectedCategoryId:He?.category||null,onSelect:$t,isDark:a,primaryColor:i,fontFamily:_,fontSize:j,isRtl:_t,label:Je("chooseTopicLabel"),regionLabel:Je("categoryFilter")}):null,quickQuestionsHeadingLabel:qt?Je("quickQuestionsHeadingLabel"):void 0}),(mt&&ke||Te)&&!bt&&n.jsx("div",{className:"","data-testid":"widget-csat-card",children:n.jsx(Yn,{format:mr(Te?.format||Ee),prompt:Te?.prompt||Ae||Je("howWasYourExperience"),onRating:async(e,t)=>{vt(!0),ht(!1),(e=>{try{const t=be(e);if(!t)return;t.csatSubmitted=!0,localStorage.setItem(`${ce}_${e}`,JSON.stringify(t))}catch{}})(Xe);try{const n={"Content-Type":"application/json"};if("function"==typeof ge){const e=await ge();e&&(n.Authorization=`Bearer ${e}`)}const r=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({conversationId:me,rating:e,ratingFormat:t,conciergeId:he})});r.ok||console.error("CSAT submission failed:",await r.text())}catch(e){console.error("CSAT submission error:",e)}},disabled:!1,isDark:a,primaryColor:i,defaultLanguage:F})})]})}),!(ve&&!we)&&n.jsx(_n,{onSynthesizeAssistantMessage:We,onStopGeneration:o,inputValue:h,setInputValue:b,onSend:y,isDark:a,primaryColor:i,isOpen:t,isMinimized:r,isLoading:g,isConversationLoading:m,verificationPending:et.size>0,placeholder:Mt,textColor:Lt,fontFamily:_,userMessageBubbleFontFamily:D,userMessageBubbleFontSize:M,fontSize:j,isRtl:_t,csatVisible:mt&&ke&&!bt||Wt&&(wt||xt),enableVoiceInteraction:X,isVoiceSessionActive:Q,voiceStatus:J,voiceError:ee,onVoiceToggle:ne,onBidiSubmit:re,disclaimerEnabled:ae,disclaimerText:oe,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de,defaultLanguage:F,onboardingQuestions:ye,onboardingActive:ve,onboardingCompleted:we,onboardingEnabled:Ne,userMessageBoxColor:I,resolvedUserMessageColor:Dt,userTextColor:N,promptSuggestions:wt||xt||!1===Le||g?[]:tn,onPromptSuggestionClick:ot,autoPromptQuestionDisplay:De,tagSelectorNode:null,showResolveButton:Wt&&jt&&!xt&&!wt&&!mt&&!Yt,onResolve:()=>{Wt&&St(!0)},chatFeatures:Ke,apiEndpoint:pe,organizationId:Xe,conversationId:me})]})]})]})})},br=new Map;const yr={whatsapp:["wa.me","api.whatsapp.com"],telegram:["t.me"],messenger:["m.me"],instagram:["ig.me","instagram.com","www.instagram.com"]},vr={whatsapp:"WhatsApp",telegram:"Telegram",messenger:"Messenger",instagram:"Instagram"};const wr=e.forwardRef(({isDark:t,primaryColor:r,onToggle:a,textColor:o,headerTextColor:i,defaultLanguage:s="en",isOpen:l=!1,className:c,channelLinks:u},d)=>{const p=e.useMemo(()=>Z(s),[s]),f=e.useMemo(()=>function(e){if(!Array.isArray(e))return[];const t=[];for(let n=0;n<e.length;n+=1){const r=e[n];if(!r||"object"!=typeof r)continue;const a="string"==typeof r.type?r.type.toLowerCase():"",o=Object.prototype.hasOwnProperty.call(yr,a)?yr[a]:void 0;if(!o||"string"!=typeof r.url)continue;let i;try{i=new URL(r.url)}catch(e){continue}"https:"===i.protocol&&-1!==o.indexOf(i.hostname.toLowerCase())&&t.push({type:a,url:i.toString(),label:"string"==typeof r.label&&r.label.trim()?r.label.trim():vr[a]})}return t}(u),[u]),[g,m]=e.useState(!1),h=f.length>0,b=e.useRef(null),y=e.useRef(null),v=e.useCallback(e=>{y.current=e,"function"==typeof d?d(e):d&&(d.current=e)},[d]),w=h&&g&&!l;e.useEffect(()=>{w&&function(e,t=Mn){const[n]=Fn(e,t);n?.focus()}(b.current)},[w]);const S=r,x=i||"#FFFFFF",k={display:"block",width:"100%",padding:"8px 12px",textAlign:"start",fontSize:"14px",color:t?"#F1F5F9":"#0F172A",background:"transparent",border:"none",borderRadius:"6px",textDecoration:"none",cursor:"pointer"};return n.jsxs("div",{className:`relative ${c||""}`,children:[w&&n.jsxs("div",{ref:b,role:"menu","aria-label":p("chooseChannel"),tabIndex:-1,onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),m(!1),void y.current?.focus();Bn(e,b.current)},"data-testid":"channel-picker",style:{position:"absolute",bottom:"76px",right:0,minWidth:"180px",padding:"6px",borderRadius:"8px",border:"1px solid "+(t?"#334155":"#E2E8F0"),background:t?"#1E293B":"#FFFFFF",boxShadow:"0 10px 30px rgba(15, 23, 42, 0.15)"},children:[n.jsx("button",{type:"button",role:"menuitem",style:k,onClick:()=>{m(!1),a?.()},children:p("chatHere")}),f.map(e=>n.jsx("a",{role:"menuitem",href:e.url,target:"_blank",rel:"noopener noreferrer",style:k,onClick:()=>m(!1),children:e.label},`${e.type}-${e.url}`))]}),n.jsxs("button",{ref:v,onClick:()=>{!h||l?a?.():m(e=>!e)},className:"group relative w-16 h-16 rounded-full shadow-2xl transition-all duration-300 flex items-center justify-center text-white overflow-hidden hover:scale-110",style:{background:`linear-gradient(135deg, ${S} 0%, ${S}dd 100%)`,boxShadow:`0 10px 30px ${S}40`,border:"none"},"aria-label":p(l?"closeChat":"openChat"),"aria-expanded":h&&g||l,"aria-haspopup":h?"menu":void 0,"aria-controls":"chat-window-panel",children:[n.jsx("div",{className:"absolute inset-0 rounded-full bg-white/20 scale-0 group-hover:scale-100 transition-transform duration-500"}),n.jsx("div",{className:"relative z-10 transition-transform duration-300",children:n.jsx(tt,{className:"w-7 h-7",style:{color:x}})})]})]})});wr.displayName="ToggleButton";const Sr="0.2.45",xr=function(e){if(null==e)return Er;if("function"==typeof e)return kr(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xr(e[n]);return kr(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 kr(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return kr(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function kr(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Er(){return!0}const Ar=[],Tr=!0,Cr=!1;function Or(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=xr(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Ar;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Tr,e];return null==e?Ar:[e]}(n(a,l)),p[0]===Cr))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Cr)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function Ir(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),Or(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)},a)}let Rr=null;const Nr=new Set;function _r(e,t){if("string"!=typeof e||""===e.trim())return!0;let n;try{n=new URL(e.trim(),t.apiOrigin||"http://relative.invalid")}catch{return!1}return!(!t.apiOrigin||n.origin!==t.apiOrigin)||"https:"===n.protocol&&!n.username&&!n.password&&t.hosts.has(n.hostname.toLowerCase())}function Pr(){return e=>{const t=Rr;t&&Ir(e,"element",(e,n,r)=>{if("img"!==e.tagName||!r||void 0===n)return;const a=e.properties&&e.properties.src;if(_r(a,t))return;if("report"===t.mode){let e=String(a);try{e=new URL(String(a)).host}catch{}return void(Nr.has(e)||(Nr.add(e),console.warn(`[eshal-widget] would block an image from ${e}`)))}const o=e.properties&&"string"==typeof e.properties.alt?e.properties.alt:"";return r.children.splice(n,1,{type:"text",value:o}),n})}}const Lr=({getAuthToken:t,apiBaseUrl:r,darkMode:a,primaryColor:o,position:i,companyName:s,conciergeName:l,companyLogo:c,welcomeMessage:u,quickQuestions:d,quickQuestionsEnabled:p,quickQuestionsLayout:f="vertical",textColor:g,agentMessageBubbleColor:m,userMessageBoxColor:h,assistantTextColor:b,userTextColor:y,fontFamily:v,fontSize:w,defaultLanguage:S,apiKey:x,agentMessageBubbleFontFamily:k,agentMessageBubbleFontSize:E,userMessageBubbleFontFamily:A,userMessageBubbleFontSize:T,autoOpen:C=!1,openDelay:O=0,locale:I,className:R="",headerTextBold:N,headerTextItalic:_,enableVoiceInteraction:P,disclaimerEnabled:L,disclaimerText:D,disclaimerPosition:M,disclaimerLinkUrl:j,disclaimerLinkLabel:F,showPoweredBy:B,onboardingQuestions:U,collectionPrompt:z,allowedDomains:$,onboardingEnabled:q,wsBaseUrl:G,channelLinks:H})=>{const[V,W]=e.useState(null),[Y,K]=e.useState(!0),[X,Z]=e.useState(null),[Q,J]=e.useState(!1),ee=e.useRef(!1);e.useEffect(()=>{if(ee.current)return;(async()=>{if(!r)return Z("apiBaseUrl is required"),void K(!1);try{K(!0);const e=await(async(e,t)=>{if(!e)throw new Error("apiBaseUrl is required");try{const n=e.replace(/\/$/,""),r=Sr?`${n}/api/v1/deploy-agent?wv=${encodeURIComponent(Sr)}`:`${n}/api/v1/deploy-agent`,a={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(a.Authorization=`Bearer ${e}`)}const o=await fetch(r,{method:"GET",headers:a,credentials:"include"});if(404===o.status)return null;if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return await o.json()}catch(e){throw console.error("Failed to fetch agent configuration:",e),e}})(r,t);if(null===e)return ee.current=!0,J(!0),W(null),void Z(null);!function(e,t){if(!e||"report"!==e.mode&&"enforce"!==e.mode)return void(Rr=null);let n="";try{n=new URL(t).origin}catch{n=""}Rr={mode:e.mode,hosts:new Set((Array.isArray(e.hosts)?e.hosts:[]).map(e=>String(e).toLowerCase())),apiOrigin:n}}(e.chatImagePolicy,r),W(e),Z(null)}catch(e){console.error("Failed to load agent configuration:",e),Z(e.message||"Failed to load configuration")}finally{K(!1)}})()},[r,t]);const te=e.useMemo(()=>{if(!V)return null;const e=V.config??{},t=e.identity??{},n=e.branding??{},r=e.typography??{},f=e.messages??{},x=e.voice??{},C=e.onboarding??{},O=e.disclaimer??{},I=e.csat??{},R=e.inactivity??{},G=e.behavior??{},W=e.security??{},Y=e.layout??{},K=function(e,t){return e??t?.defaultLocale??t?.config?.messages?.defaultLocale??"en"}(S,V),X=f.bundles?.[K]??{},Z=f.bundles?.en??{},Q={welcome:X.welcome||Z.welcome,fallback:X.fallback||Z.fallback,quickQuestions:Array.isArray(X.quickQuestions)&&X.quickQuestions.length>0?X.quickQuestions:Z.quickQuestions},J=$??W.allowedDomains??(W.domains??[]).map(e=>"string"==typeof e?e:e.domain).filter(Boolean)??[];return{darkMode:a??!1,primaryColor:o??n.brandColor??"#2563eb",companyName:s??t.companyName??"Support Team",conciergeName:l??t.conciergeName,companyLogo:c??n.avatar??null,chatbotAvatarEnabled:n.chatbotAvatarEnabled??!1,chatbotAvatar:n.chatbotAvatar??null,welcomeMessage:u??Q.welcome??"Hi! How can we help?",fallbackMessage:Q.fallback,quickQuestions:d??Q.quickQuestions??[],quickQuestionsEnabled:p??f.quickQuestionsEnabled,textColor:g??"#000000",agentMessageBubbleColor:m??r.agentMessageBubbleColor,userMessageBoxColor:h??r.userMessageBoxColor,assistantTextColor:b??r.assistantTextColor??"#000000",userTextColor:y??r.userTextColor??"#000000",fontFamily:v??r.agentMessageBubbleFontFamily??"Inter",fontSize:w??r.agentMessageBubbleFontSize??"14px",defaultLanguage:K,headerTextBold:N??r.headerTextBold??!1,headerTextItalic:_??r.headerTextItalic??!1,headerTextColor:r.headerTextColor??"#FFFFFF",headerFontFamily:r.headerFontFamily,headerFontSize:r.headerFontSize,subtitle:t.subtitle??null,showStatus:t.showStatus??!1,statusMode:t.statusMode??"always",officeHours:t.officeHours??null,enableVoiceInteraction:P??x.enableVoiceInteraction??!1,disclaimerEnabled:L??O.enabled??!1,disclaimerText:D??O.text,disclaimerPosition:M??(ee=O.position,ee?ee.toLowerCase():"top"),disclaimerLinkUrl:oe(j??O.linkUrl),disclaimerLinkLabel:F??O.linkLabel,showPoweredBy:B??n.showPoweredBy??!0,onboardingQuestions:U??C.questions??[],collectionPrompt:z??C.collapsiblePrompt??"Before we begin, I need to verify your details.",allowedDomains:J,launcherPosition:i??(e=>e?e.toLowerCase().replace(/_/g,"-"):"bottom-right")(Y.launcherPosition),onboardingEnabled:q??C.enabled??!1,inactivityTimeoutValue:R.timeoutValue??null,inactivityTimeoutUnit:R.timeoutUnit??null,agentMessageBubbleFontFamily:k??r.agentMessageBubbleFontFamily??v??"Inter",agentMessageBubbleFontSize:E??r.agentMessageBubbleFontSize??w??"14px",userMessageBubbleFontFamily:A??r.userMessageBubbleFontFamily??v??"Inter",userMessageBubbleFontSize:T??r.userMessageBubbleFontSize??w??"14px",csatEnabled:I.enabled??!1,csatFormat:I.format??"EMOJI",csatPrompt:I.prompt??"How was your experience?",autoPromptEnabled:G.autoPromptEnabled??!0,autoPromptQuestionDisplay:G.autoPromptQuestionDisplay??!0,autoPromptClickTelemetry:G.autoPromptClickTelemetry??!0,allowFeedback:G.allowFeedback??!0,provideCitations:G.provideCitations??!0,organizationId:V.organizationId??null,chatFeatures:e.chatFeatures??null,channelLinks:H??e.channelLinks??null};var ee},[H,V,a,o,i,s,l,c,u,d,p,g,m,h,b,y,v,w,S,N,_,P,L,D,M,F,j,B,U,q,z,$,k,E,A,T]),ne=e.useMemo(()=>!te||((e=[])=>{if("undefined"==typeof window)return!1;const t=window.location.hostname.toLowerCase(),n=window.location.host.toLowerCase();return!(!e||0===e.length)&&e.some(e=>{const r=e.toLowerCase().trim();return r.includes(":")?n===r:t===r||t.endsWith("."+r)})})(te.allowedDomains),[te]),re=e.useMemo(()=>({welcomeMessage:"Hi! How can we help?",quickQuestions:[],apiBaseUrl:r||"",apiKey:x||"",getAuthToken:t,autoOpen:!1,openDelay:0,darkMode:!1,enableVoiceInteraction:!1,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0}),[r,x,t]),{isOpen:ae,isMinimized:ie,isDark:se,messages:le,inputValue:ce,isLoading:ue,widgetRef:de,setInputValue:pe,handleSend:fe,stopGeneration:ge,handleQuickQuestion:me,sendMessage:he,retryMessage:be,toggleChat:ye,toggleTheme:ve,toggleMinimize:we,closeChat:Se,handleDecision:xe,isVoiceSessionActive:ke,voiceStatus:Ee,voiceError:Ae,voiceConclusionForCsat:Te,handleVoiceToggle:Ce,sendBidiTextMessage:Oe,onboardingActive:Ie,onboardingCompleted:Re,handleOnboardingFormSubmit:Ne,conversationId:_e,resetConversation:Le,sessionExpiringSoon:De,updateMessageFeedback:Me,widgetFilter:je,setWidgetFilter:Fe,addAssistantMessage:Be,csatRequest:Ue,liveJoined:ze,isHandedOff:$e,handoffPoints:qe}=Pe(te?{welcomeMessage:te.welcomeMessage,fallbackMessage:te.fallbackMessage,quickQuestions:te.quickQuestions,apiBaseUrl:r,wsBaseUrl:G??V?.wsBaseUrl,apiKey:x,locale:te.defaultLanguage||I,organizationId:te.organizationId,getAuthToken:t,autoOpen:C,openDelay:O,darkMode:te.darkMode,enableVoiceInteraction:te.enableVoiceInteraction,onboardingQuestions:te.onboardingQuestions,onboardingEnabled:te.onboardingEnabled,collectionPrompt:te.collectionPrompt,provideCitations:te.provideCitations,inactivityTimeoutValue:te.inactivityTimeoutValue,inactivityTimeoutUnit:te.inactivityTimeoutUnit,messageLimits:V?.messageLimits}:re),Ge=e.useRef(null),He=e.useRef(ae);e.useEffect(()=>{He.current&&!ae&&Ge.current?.focus(),He.current=ae},[ae]);const Ve=e.useCallback((e,n,a)=>{if(Me(e,n),!_e||!r)return;const o=r.replace(/\/$/,"");(async()=>{try{const r={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(r.Authorization=`Bearer ${e}`)}await fetch(`${o}/api/v1/support/feedback`,{method:"POST",headers:r,credentials:"include",body:JSON.stringify({messageContent:e,conversationId:_e,feedback:n,feedbackText:a})})}catch(e){console.error("Feedback submission error:",e)}})()},[_e,r,t,Me]),We=e.useCallback(()=>{Le&&Le()},[Le]),{categories:Ye,hasFilters:Ke}=function(t,n){const r=!!t,[a,o]=e.useState({categories:[],loading:r,error:null});e.useEffect(()=>{if(!t)return void o({categories:[],loading:!1,error:null});const e=n?`${t}|__session__`:`${t}|__proxy__`,r=br.get(e);if(r)return void o({categories:r,loading:!1,error:null});let a=!1;o(e=>({...e,loading:!0,error:null}));const i=`${t.replace(/\/$/,"")}/api/v1/widget/filters`;return(async()=>{try{const t={Accept:"application/json"};if("function"==typeof n){const e=await n();e&&(t.Authorization=`Bearer ${e}`)}const r=await fetch(i,{method:"GET",headers:t});if(!r.ok)throw new Error(`filter catalog HTTP ${r.status}`);const s=await r.json(),l=Array.isArray(s?.categories)?s.categories:[];if(a)return;br.set(e,l),o({categories:l,loading:!1,error:null})}catch(e){if(a)return;console.warn("[useFilterCatalog] catalog fetch failed:",e),o({categories:[],loading:!1,error:e})}})(),()=>{a=!0}},[t,n]);const i=e.useMemo(()=>Array.isArray(a.categories)&&a.categories.length>0,[a.categories]);return{...a,hasFilters:i}}(r,t),Xe=e.useCallback(()=>{const e=function(e,t){if(!Array.isArray(e))return"";const n=t||"Assistant",r=[];for(let t=0;t<e.length;t++){const a=e[t];if(!a||"string"!=typeof a.content)continue;const o=At(a.content);o&&""!==o.trim()&&r.push(("user"===a.role?"You":n)+": "+o)}return r.join("\n\n")}(le,te?.conciergeName);e&&navigator.clipboard.writeText(e).catch(()=>{})},[le,te?.conciergeName]);if(e.useEffect(()=>{de.current&&te&&(de.current.style.setProperty("--cw-primary",te.primaryColor),te.fontFamily&&de.current.style.setProperty("--cw-font-family",te.fontFamily),te.textColor&&de.current.style.setProperty("--cw-text-color",te.textColor))},[te,de]),Y)return null;if(Q)return null;if(X||!te)return console.error("ChatWidget configuration error:",X),null;if(!ne)return null;const Ze={"bottom-right":"bottom-5 right-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","top-left":"top-5 left-5"};return n.jsx("div",{id:"chat-widget-root",children:n.jsxs("div",{ref:de,className:`chat-widget-root fixed flex flex-col ${te.launcherPosition?.includes("left")?"items-start":"items-end"} z-[999999] ${se?"dark":""} ${R} ${Ze[te.launcherPosition]||Ze["bottom-right"]}`,children:[n.jsx(hr,{isOpen:ae,isMinimized:ie,isDark:se,launcherPosition:te.launcherPosition,primaryColor:te.primaryColor,textColor:te.textColor,companyName:te.companyName,conciergeName:te.conciergeName,companyLogo:te.companyLogo,chatbotAvatarEnabled:te.chatbotAvatarEnabled,chatbotAvatar:te.chatbotAvatar,messages:le,isLoading:ue,inputValue:ce,setInputValue:pe,onSend:fe,onStopGeneration:ge,onDirectSend:he,onToggleTheme:ve,onMinimize:we,onClose:Se,quickQuestions:te.quickQuestions,quickQuestionsEnabled:te.quickQuestionsEnabled,onQuickQuestion:me,quickQuestionsLayout:f,agentMessageBubbleColor:te.agentMessageBubbleColor,userMessageBoxColor:te.userMessageBoxColor,assistantTextColor:te.assistantTextColor,userTextColor:te.userTextColor,fontFamily:te.fontFamily,agentMessageBubbleFontFamily:te.agentMessageBubbleFontFamily,agentMessageBubbleFontSize:te.agentMessageBubbleFontSize,userMessageBubbleFontFamily:te.userMessageBubbleFontFamily,userMessageBubbleFontSize:te.userMessageBubbleFontSize,fontSize:te.fontSize,defaultLanguage:te.defaultLanguage||I,onDecision:xe,headerTextBold:te.headerTextBold,headerTextItalic:te.headerTextItalic,headerTextColor:te.headerTextColor,headerFontFamily:te.headerFontFamily,headerFontSize:te.headerFontSize,subtitle:te.subtitle,showStatus:te.showStatus,statusMode:te.statusMode,officeHours:te.officeHours,enableVoiceInteraction:te.enableVoiceInteraction,isVoiceSessionActive:ke,voiceStatus:Ee,voiceError:Ae,voiceConclusionForCsat:Te,onVoiceToggle:Ce,onBidiSubmit:()=>Oe(ce),disclaimerEnabled:te.disclaimerEnabled,disclaimerText:te.disclaimerText,disclaimerPosition:te.disclaimerPosition,disclaimerLinkUrl:te.disclaimerLinkUrl,disclaimerLinkLabel:te.disclaimerLinkLabel,showPoweredBy:te.showPoweredBy,apiBaseUrl:r,apiKey:x,getAuthToken:t,conversationId:_e,conciergeId:V?.conciergeId??V?.id,onboardingQuestions:te.onboardingQuestions,onboardingActive:Ie,onboardingCompleted:Re,onOnboardingFormSubmit:Ne,collectionPrompt:te.collectionPrompt,csatEnabled:te.csatEnabled,csatFormat:te.csatFormat,csatPrompt:te.csatPrompt,csatRequest:Ue,liveJoined:ze,isHandedOff:$e,handoffPoints:qe,onboardingEnabled:te.onboardingEnabled,onResetConversation:Le,sessionExpiringSoon:De,autoPromptEnabled:te.autoPromptEnabled,autoPromptQuestionDisplay:te.autoPromptQuestionDisplay,autoPromptClickTelemetry:te.autoPromptClickTelemetry,allowFeedback:te.allowFeedback,provideCitations:te.provideCitations,onFeedback:Ve,onRetryMessage:be,onRefreshChat:We,onCopyChat:Xe,filterCategories:Ye,showFilterStep:Ke,widgetFilter:je,onWidgetFilterChange:Fe,onSynthesizeAssistantMessage:Be,chatFeatures:te.chatFeatures,organizationId:te.organizationId}),n.jsx(wr,{ref:Ge,isDark:se,primaryColor:te.primaryColor,onToggle:ye,textColor:te.textColor,headerTextColor:te.headerTextColor,defaultLanguage:te.defaultLanguage||I,isOpen:ae,className:ae?"hidden":void 0,channelLinks:te.channelLinks})]})})};var Dr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Mr={exports:{}};function jr(e){try{const t=window[e];return t.setItem("__ft__","1"),t.removeItem("__ft__"),"1"}catch{return"0"}}function Fr(){try{return Array.from(navigator.plugins||[]).map(e=>`${e.name}::${e.filename}`).sort().join("|")}catch{return""}}function Br(){try{return Array.from(navigator.mimeTypes||[]).map(e=>e.type).sort().join("|")}catch{return""}}function Ur(){try{const e=document.createElement("canvas");e.width=240,e.height=60;const t=e.getContext("2d");return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-abc",t.fillText("user-trace:canvas,🔍<canvas>",2,15),t.fillStyle="rgba(102,204,0,0.7)",t.font="18pt Arial",t.fillText("user-trace:canvas,🔍<canvas>",4,45),e.toDataURL().slice(-50)}catch{return"nocanvas"}}function zr(){try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return"nowebgl";const n=t.getExtension("WEBGL_debug_renderer_info"),r=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR);return`${r}::${n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}`}catch{return"nowebgl"}}function $r(){const e=["Arial","Courier New","Georgia","Times New Roman","Verdana","Helvetica","Comic Sans MS","Impact","Tahoma","Trebuchet MS","Palatino Linotype","Lucida Console","Lucida Sans Unicode","MS Sans Serif","MS Serif","Symbol","Wingdings","Franklin Gothic Medium","Book Antiqua","Garamond","Calibri","Cambria","Consolas","Candara","Optima","Segoe UI","Gill Sans","Century Gothic","Futura"];try{const t=document.createElement("canvas").getContext("2d"),n="monospace",r="mmmmmmmmmmlli",a="72px";t.font=`${a} ${n}`;const o=t.measureText(r).width;return e.filter(e=>(t.font=`${a} '${e}', ${n}`,t.measureText(r).width!==o)).join(",")}catch{return""}}function qr(){try{return window.OfflineAudioContext||window.webkitOfflineAudioContext?"audio-supported":"noaudio"}catch{return"noaudio"}}var Gr={generateFingerprint:function(){const e=function(){const e=navigator||{},t=screen||{};return{userAgent:e.userAgent||"",language:e.language||"",languages:(e.languages||[]).join(","),platform:e.platform||"",hardwareConcurrency:e.hardwareConcurrency||0,deviceMemory:e.deviceMemory||0,maxTouchPoints:e.maxTouchPoints||0,cookieEnabled:e.cookieEnabled?"1":"0",doNotTrack:e.doNotTrack||"unknown",screenWidth:t.width||0,screenHeight:t.height||0,colorDepth:t.colorDepth||0,pixelDepth:t.pixelDepth||0,devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1,timezoneOffset:(new Date).getTimezoneOffset(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",sessionStorage:jr("sessionStorage"),localStorage:jr("localStorage"),indexedDB:"undefined"!=typeof indexedDB?"1":"0",cpuClass:e.cpuClass||"unknown",oscpu:e.oscpu||"unknown",vendor:e.vendor||"",vendorSub:e.vendorSub||"",productSub:e.productSub||"",plugins:Fr(),mimeTypes:Br(),canvas:Ur(),webgl:zr(),fonts:$r(),audioContext:qr()}}(),t=function(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n),t&=t;return(t>>>0).toString(16).padStart(8,"0")}(Object.values(e).join("|||")),n=["nocanvas"!==e.canvas,"nowebgl"!==e.webgl&&""!==e.webgl,""!==e.fonts,""!==e.plugins,e.hardwareConcurrency>0,""!==e.timezone];return{id:t,signals:e,confidence:Math.round(n.filter(Boolean).length/n.length*100)}}};const Hr=[{url:"https://api.ipify.org?format=json",parse:e=>e.ip},{url:"https://api64.ipify.org?format=json",parse:e=>e.ip},{url:"https://api.my-ip.io/v2/ip.json",parse:e=>e.ip},{url:"https://ipapi.co/json/",parse:e=>e.ip}];async function Vr(e,t=4e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}function Wr(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[0-9a-f:]{2,39}$/i.test(e)}var Yr={detectIP:async function(){for(const e of Hr)try{const t=await Vr(e.url),n=e.parse(t);if(n&&Wr(n))return{ip:n,source:new URL(e.url).hostname}}catch{}return null},getIPVersion:function(e){return e?/^(\d{1,3}\.){3}\d{1,3}$/.test(e)?"v4":/^[0-9a-f:]{2,39}$/i.test(e)?"v6":"unknown":"unknown"}};let Kr={apiKeys:{},preferredProvider:null,timeoutMs:5e3};function Xr(e={}){const t=[e.ipinfo&&{name:"ipinfo.io",tier:"free-with-key",freeLimit:"50,000 req/month",signup:"https://ipinfo.io/signup",buildUrl:t=>`https://ipinfo.io/${t}/json?token=${e.ipinfo}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");const[t,n]=(e.loc||"0,0").split(",").map(Number);return{ip:e.ip||"",country:e.country||"",countryCode:e.country||"",region:e.region||"",regionCode:"",city:e.city||"",zip:e.postal||"",latitude:t,longitude:n,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},e.ipgeolocation&&{name:"ipgeolocation.io",tier:"free-with-key",freeLimit:"1,000 req/day",signup:"https://ipgeolocation.io/signup.html",buildUrl:t=>`https://api.ipgeolocation.io/ipgeo?apiKey=${e.ipgeolocation}&ip=${t}`,parse:e=>{if(e.message)throw new Error(e.message);return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code2||"",region:e.state_prov||"",regionCode:e.state_code||"",city:e.city||"",zip:e.zipcode||"",latitude:parseFloat(e.latitude)||0,longitude:parseFloat(e.longitude)||0,timezone:e.time_zone?.name||"",isp:e.isp||"",org:e.organization||"",proxy:e.security?.is_proxy||!1,hosting:e.security?.is_hosting||!1}}},e.abstractapi&&{name:"abstractapi.com",tier:"free-with-key",freeLimit:"20,000 req/month",signup:"https://app.abstractapi.com/users/signup?target=/api/ip-geolocation",buildUrl:t=>`https://ipgeolocation.abstractapi.com/v1/?api_key=${e.abstractapi}&ip_address=${t}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");return{ip:e.ip_address||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_iso_code||"",city:e.city||"",zip:e.postal_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.name||"",isp:e.connection?.isp_name||"",org:e.connection?.org_name||"",proxy:e.security?.is_vpn||!1,hosting:e.security?.is_hosting||!1}}},e.ip2location&&{name:"ip2location.io",tier:"free-with-key",freeLimit:"30,000 req/month",signup:"https://www.ip2location.io/sign-up",buildUrl:t=>`https://api.ip2location.io/?key=${e.ip2location}&ip=${t}&format=json`,parse:e=>{if(e.error)throw new Error(e.error.error_message||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:"",city:e.city_name||"",zip:e.zip_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone||"",isp:e.isp||"",org:e.domain||"",proxy:e.is_proxy||!1,hosting:!1}}},e.ipstack&&{name:"ipstack.com",tier:"free-with-key",freeLimit:"100 req/month",signup:"https://ipstack.com/product",buildUrl:t=>`https://api.ipstack.com/${t}?access_key=${e.ipstack}`,parse:e=>{if(e.error)throw new Error(e.error.info||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:e.region_code||"",city:e.city||"",zip:e.zip||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone?.id||"",isp:e.connection?.isp||"",org:"",proxy:!1,hosting:!1}}}].filter(Boolean),n=[{name:"ip-api.com",tier:"free",freeLimit:"45 req/min (no key needed)",buildUrl:e=>`https://ip-api.com/json/${e}?fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,proxy,hosting,query`,parse:e=>{if("success"!==e.status)throw new Error(e.message||"Failed");return{ip:e.query||"",country:e.country||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.region||"",city:e.city||"",zip:e.zip||"",latitude:e.lat||0,longitude:e.lon||0,timezone:e.timezone||"",isp:e.isp||"",org:e.org||"",proxy:e.proxy||!1,hosting:e.hosting||!1}}},{name:"ipwho.is",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://ipwho.is/${e}`,parse:e=>{if(!e.success)throw new Error(e.message||"Failed");return{ip:e.ip||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.id||"",isp:e.connection?.isp||"",org:e.connection?.org||"",proxy:!1,hosting:!1}}},{name:"ipapi.co",tier:"free",freeLimit:"1,000 req/day (no key needed)",buildUrl:e=>`https://ipapi.co/${e}/json/`,parse:e=>{if(e.error)throw new Error(e.reason||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},{name:"freeipapi.com",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://freeipapi.com/api/json/${e}`,parse:e=>({ip:e.ipAddress||"",country:e.countryName||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.regionCode||"",city:e.cityName||"",zip:e.zipCode||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timeZone||"",isp:"",org:"",proxy:!1,hosting:!1})}],r=["freeipapi.com","ipwho.is","ipapi.co","ip-api.com"];return n.sort((e,t)=>r.indexOf(e.name)-r.indexOf(t.name)),[...t,...n]}async function Zr(e,t=5e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}const Qr={enableHighAccuracy:!0,timeout:8e3,maximumAge:3e5};function Jr(e={}){return new Promise(t=>"undefined"!=typeof navigator&&navigator.geolocation?"undefined"!=typeof window&&!1===window.isSecureContext?t(null):void navigator.geolocation.getCurrentPosition(e=>t({latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy}),()=>t(null),{...Qr,...e}):t(null))}async function ea(e,t,n={}){if("number"!=typeof e||"number"!=typeof t)return null;const r=n.timeoutMs||Kr.timeoutMs||5e3,a=`https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=${e}&longitude=${t}&localityLanguage=${n.localityLanguage||"en"}`;try{const n=await Zr(a,r),o=n.city||n.locality||"";return o||n.countryName?{city:o,region:n.principalSubdivision||"",regionCode:(n.principalSubdivisionCode||"").split("-").pop()||"",country:n.countryName||"",countryCode:n.countryCode||"",latitude:e,longitude:t}:null}catch{return null}}var ta={configureGeo:function(e={}){e.apiKeys&&(Kr.apiKeys={...Kr.apiKeys,...e.apiKeys}),void 0!==e.preferredProvider&&(Kr.preferredProvider=e.preferredProvider),void 0!==e.timeoutMs&&(Kr.timeoutMs=e.timeoutMs)},resolveLocation:async function(e,t={}){const n={apiKeys:{...Kr.apiKeys,...t.apiKeys||{}},preferredProvider:t.preferredProvider||Kr.preferredProvider,timeoutMs:t.timeoutMs||Kr.timeoutMs};let r=Xr(n.apiKeys);if(n.preferredProvider){const e=r.findIndex(e=>e.name===n.preferredProvider);if(e>0){const[t]=r.splice(e,1);r.unshift(t)}}for(const t of r)try{const r=await Zr(t.buildUrl(e),n.timeoutMs);return{...t.parse(r),source:t.name,tier:t.tier}}catch{}return null},listProviders:function(e={}){return Xr({...Kr.apiKeys,...e}).map(({name:e,tier:t,freeLimit:n,signup:r})=>({name:e,tier:t,freeLimit:n,signup:r||"—"}))},getBrowserGeolocation:Jr,getGeolocationPermission:async function(){try{if("undefined"==typeof navigator||!navigator.permissions||!navigator.permissions.query)return"unsupported";return(await navigator.permissions.query({name:"geolocation"})).state}catch{return"unsupported"}},reverseGeocode:ea,getBrowserLocation:async function(e={}){const t=await Jr(e);if(!t)return null;const n=await ea(t.latitude,t.longitude,e),r=!(!n||!n.city&&!n.country);return{...r?n:{},latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,...r?{source:"gps"}:{}}},toMapsUrl:function(e,t){return`https://www.google.com/maps?q=${e},${t}`}};const na="__ut_sid__",ra="__ut_uid__",aa="__ut_meta__";function oa(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}function ia(e,t){try{return e.getItem(t)}catch{return null}}function sa(e,t,n){try{return e.setItem(t,n),!0}catch{return!1}}var la={getOrCreateUserID:function(){let e=ia(localStorage,ra),t=!1;return e||(e=oa(),t=!0,sa(localStorage,ra,e)),{uid:e,isNew:t}},getOrCreateSessionID:function(){let e=ia(sessionStorage,na),t=!1;return e||(e=oa(),t=!0,sa(sessionStorage,na,e)),{sid:e,isNew:t}},saveSessionMeta:function(e){try{const t=JSON.stringify({...e,savedAt:(new Date).toISOString()});sa(localStorage,aa,t)}catch{}},loadSessionMeta:function(){try{const e=ia(localStorage,aa);return e?JSON.parse(e):null}catch{return null}},clearSession:function(){try{localStorage.removeItem(ra)}catch{}try{localStorage.removeItem(aa)}catch{}try{sessionStorage.removeItem(na)}catch{}},getBrowserContext:function(){return{userAgent:navigator.userAgent,platform:navigator.platform||"unknown",language:navigator.language||"unknown",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenRes:`${screen.width}x${screen.height}`,viewportRes:`${window.innerWidth}x${window.innerHeight}`,colorDepth:screen.colorDepth,touchSupport:navigator.maxTouchPoints>0,cookieEnabled:navigator.cookieEnabled,referrer:document.referrer||null,currentUrl:window.location.href,loadedAt:(new Date).toISOString()}}};const{generateFingerprint:ca}=Gr,{detectIP:ua,getIPVersion:da}=Yr,{configureGeo:pa,resolveLocation:fa,listProviders:ga,getBrowserGeolocation:ma,getGeolocationPermission:ha,reverseGeocode:ba,getBrowserLocation:ya,toMapsUrl:va}=ta,{getOrCreateUserID:wa,getOrCreateSessionID:Sa,saveSessionMeta:xa,loadSessionMeta:ka,clearSession:Ea,getBrowserContext:Aa}=la;Mr.exports=class{constructor(e={}){this._options={onReady:e.onReady||null,onError:e.onError||null,geoFromBrowser:void 0===e.geoFromBrowser||e.geoFromBrowser,geoApiKeys:e.geoApiKeys||null,geoOptions:e.geoOptions||null,cache:!1!==e.cache,maxAgeMs:e.maxAgeMs||3e5,autoInit:e.autoInit||!1,webhookUrl:e.webhookUrl||null},this.profile=null,this._ready=!1,this._options.autoInit&&this.init().catch(()=>{})}async init(){if(this._options.cache){const e=ka();if(e&&e.savedAt){if(Date.now()-new Date(e.savedAt).getTime()<this._options.maxAgeMs)return this.profile=e,this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}}try{const{uid:e,isNew:t}=wa(),{sid:n,isNew:r}=Sa(),{id:a,signals:o,confidence:i}=ca(),s=this._options.geoApiKeys?{apiKeys:this._options.geoApiKeys}:{},[l,c]=await Promise.all([(async()=>{const e=await ua(),t=e?.ip||"unknown",n="unknown"!==t?await fa(t,s):null;return{ip:t,ipVersion:e?da(t):"unknown",geo:n}})(),this._collectBrowserLocation()]),{ip:u,ipVersion:d}=l;let p=l.geo,f=null;c&&(f={latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy},"gps"===c.source&&(p={...p||{},...c}));const g=Aa();return this.profile={uid:e,sid:n,isNewUser:t,isNewSession:r,fingerprintId:a,fingerprintConfidence:i,ip:u,ipVersion:d,geo:p||null,browserGeo:f||null,browser:g,raw:o,createdAt:(new Date).toISOString(),...p?{mapsUrl:va(p.latitude,p.longitude)}:{}},xa(this.profile),this._options.webhookUrl&&this._sendToWebhook(this.profile),this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}catch(e){throw this._options.onError&&this._options.onError(e),e}}async _collectBrowserLocation(){const e=this._options.geoFromBrowser;if(!e)return null;if("auto"===e){if("granted"!==await ha())return null}return ya(this._options.geoOptions||{})}async captureBrowserLocation(e={}){const t=await ya({...this._options.geoOptions||{},...e});return t&&this.profile?(this.profile.browserGeo={latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy},this.profile.mapsUrl=va(t.latitude,t.longitude),"gps"===t.source&&(this.profile.geo={...this.profile.geo||{},...t}),xa(this.profile),this._options.onReady&&this._options.onReady(this.profile),this.profile):this.profile}getProfile(){return this.profile}isKnownUser(e){return this.profile?.uid===e}async refresh(){return Ea(),this.profile=null,this._ready=!1,this.init()}clear(){Ea(),this.profile=null,this._ready=!1}getSummary(){if(!this.profile)return null;const{uid:e,sid:t,fingerprintId:n,ip:r,geo:a,browser:o,createdAt:i}=this.profile;return{uid:e,sid:t,fingerprintId:n,ip:r,country:a?.country||"unknown",city:a?.city||"unknown",isp:a?.isp||"unknown",proxy:a?.proxy||!1,timezone:a?.timezone||o.timezone,userAgent:o.userAgent,language:o.language,createdAt:i}}async _sendToWebhook(e){try{await fetch(this._options.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch{}}};var Ta=Mr.exports.generateFingerprint=ca,Ca=Mr.exports.detectIP=ua,Oa=Mr.exports.configureGeo=pa,Ia=Mr.exports.resolveLocation=fa,Ra=Mr.exports.listProviders=ga,Na=Mr.exports.getBrowserGeolocation=ma,_a=Mr.exports.getGeolocationPermission=ha,Pa=Mr.exports.reverseGeocode=ba,La=Mr.exports.getBrowserLocation=ya,Da=Mr.exports.getOrCreateUserID=wa,Ma=Mr.exports.getOrCreateSessionID=Sa,ja=Mr.exports.clearSession=Ea,Fa=Mr.exports.getBrowserContext=Aa,Ba=Mr.exports,Ua=o({__proto__:null,clearSession:ja,configureGeo:Oa,default:Ba,detectIP:Ca,generateFingerprint:Ta,getBrowserContext:Fa,getBrowserGeolocation:Na,getBrowserLocation:La,getGeolocationPermission:_a,getOrCreateSessionID:Ma,getOrCreateUserID:Da,listProviders:Ra,resolveLocation:Ia,reverseGeocode:Pa},[Ba]),za={exports:{}};!function(e){!function(){function t(e,t,n){return e.call.apply(e.bind,arguments)}function n(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function r(e,a,o){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?t:n).apply(null,arguments)}var a=Date.now||function(){return+new Date};function o(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function s(e,t,n,r){if(t=e.c.createElement(t),n)for(var a in n)n.hasOwnProperty(a)&&("style"==a?t.style.cssText=n[a]:t.setAttribute(a,n[a]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function c(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),a=0;a<t.length;a+=1){for(var o=!1,i=0;i<r.length;i+=1)if(t[a]===r[i]){o=!0;break}o||r.push(t[a])}for(t=[],a=0;a<r.length;a+=1){for(o=!1,i=0;i<n.length;i+=1)if(r[a]===n[i]){o=!0;break}o||t.push(r[a])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(e,t){for(var n=e.className.split(/\s+/),r=0,a=n.length;r<a;r++)if(n[r]==t)return!0;return!1}function p(e,t,n){function r(){u&&a&&o&&(u(c),u=null)}t=s(e,"link",{rel:"stylesheet",href:t,media:"all"});var a=!1,o=!0,c=null,u=n||null;i?(t.onload=function(){a=!0,r()},t.onerror=function(){a=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout(function(){a=!0,r()},0),l(e,"head",t)}function f(e,t,n,r){var a=e.c.getElementsByTagName("head")[0];if(a){var o=s(e,"script",{src:t}),i=!1;return o.onload=o.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,n&&n(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&a.removeChild(o))},a.appendChild(o),setTimeout(function(){i||(i=!0,n&&n(Error("Script load timeout")))},r||5e3),o}return null}function g(){this.a=0,this.c=null}function m(e){return e.a++,function(){e.a--,b(e)}}function h(e,t){e.c=t,b(e)}function b(e){0==e.a&&e.c&&(e.c(),e.c=null)}function y(e){this.a=e||"-"}function v(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function S(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function k(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function E(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new y("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function A(e){if(e.g){var t=d(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),u(e.f,n,r)}T(e,"inactive")}function T(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,S(n)):e.h[t]())}function C(){this.c={}}function O(e,t){this.c=e,this.f=t,this.a=s(this.c,"span",{"aria-hidden":"true"},this.f)}function I(e){l(e.c,"body",e.a)}function R(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function N(e,t,n,r,a,o){this.g=e,this.j=t,this.a=r,this.c=n,this.f=a||3e3,this.h=o||void 0}function _(e,t,n,r,a,o,i){this.v=e,this.B=t,this.c=n,this.a=r,this.s=i||"BESbswy",this.f={},this.w=a||3e3,this.u=o||null,this.m=this.j=this.h=this.g=null,this.g=new O(this.c,this.s),this.h=new O(this.c,this.s),this.j=new O(this.c,this.s),this.m=new O(this.c,this.s),e=R(e=new v(this.a.c+",serif",S(this.a))),this.g.a.style.cssText=e,e=R(e=new v(this.a.c+",sans-serif",S(this.a))),this.h.a.style.cssText=e,e=R(e=new v("serif",S(this.a))),this.j.a.style.cssText=e,e=R(e=new v("sans-serif",S(this.a))),this.m.a.style.cssText=e,I(this.g),I(this.h),I(this.j),I(this.m)}y.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},N.prototype.start=function(){var e=this.c.o.document,t=this,n=a(),r=new Promise(function(r,o){!function i(){a()-n>=t.f?o():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+w(e.c)}(t.a),t.h).then(function(e){1<=e.length?r():setTimeout(i,25)},function(){o()})}()}),o=null,i=new Promise(function(e,n){o=setTimeout(n,t.f)});Promise.race([i,r]).then(function(){o&&(clearTimeout(o),o=null),t.g(t.a)},function(){t.j(t.a)})};var P={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return L}function M(e,t,n){for(var r in P)if(P.hasOwnProperty(r)&&t===e.f[P[r]]&&n===e.f[P[r]])return!0;return!1}function j(e){var t,n=e.g.a.offsetWidth,o=e.h.a.offsetWidth;(t=n===e.f.serif&&o===e.f["sans-serif"])||(t=D()&&M(e,n,o)),t?a()-e.A>=e.w?D()&&M(e,n,o)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?F(e,e.v):F(e,e.B):function(e){setTimeout(r(function(){j(this)},e),50)}(e):F(e,e.v)}function F(e,t){setTimeout(r(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),t(this.a)},e),0)}function B(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}_.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=a(),j(this)};var U=null;function z(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&u(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),T(e,"active")):A(e.a))}function $(e){this.j=e,this.a=new C,this.h=0,this.f=this.g=!0}function q(e,t,n,a,o){var i=0==--e.h;(e.f||e.g)&&setTimeout(function(){var e=o||null,s=a||{};if(0===n.length&&i)A(t.a);else{t.f+=n.length,i&&(t.j=i);var l,c=[];for(l=0;l<n.length;l++){var d=n[l],p=s[d.c],f=t.a,g=d;if(f.g&&u(f.f,[f.a.c("wf",g.c,S(g).toString(),"loading")]),T(f,"fontloading",g),f=null,null===U)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);U=g?42<parseInt(g[1],10):!m}else U=!1;f=U?new N(r(t.g,t),r(t.h,t),t.c,d,t.s,p):new _(r(t.g,t),r(t.h,t),t.c,d,t.s,e,p),c.push(f)}for(l=0;l<c.length;l++)c[l].start()}},0)}function G(e,t){this.c=e,this.a=t}function H(e,t){this.c=e,this.a=t}function V(e,t){this.c=e||W,this.a=[],this.f=[],this.g=t||""}B.prototype.g=function(e){var t=this.a;t.g&&u(t.f,[t.a.c("wf",e.c,S(e).toString(),"active")],[t.a.c("wf",e.c,S(e).toString(),"loading"),t.a.c("wf",e.c,S(e).toString(),"inactive")]),T(t,"fontactive",e),this.m=!0,z(this)},B.prototype.h=function(e){var t=this.a;if(t.g){var n=d(t.f,t.a.c("wf",e.c,S(e).toString(),"active")),r=[],a=[t.a.c("wf",e.c,S(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,S(e).toString(),"inactive")),u(t.f,r,a)}T(t,"fontinactive",e),z(this)},$.prototype.load=function(e){this.c=new o(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],a=n.timeout;!function(e){e.g&&u(e.f,[e.a.c("wf","loading")]),T(e,"loading")}(t);r=function(e,t,n){var r,a=[];for(r in t)if(t.hasOwnProperty(r)){var o=e.c[r];o&&a.push(o(t[r],n))}return a}(e.a,n,e.c);var o=new B(e.c,t,a);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load(function(t,n,r){q(e,o,t,n,r)})}(this,new E(this.c,e),e)},G.prototype.load=function(e){function t(){if(o["__mti_fntLst"+r]){var n,a=o["__mti_fntLst"+r](),i=[];if(a)for(var s=0;s<a.length;s++){var l=a[s].fontfamily;null!=a[s].fontStyle&&null!=a[s].fontWeight?(n=a[s].fontStyle+a[s].fontWeight,i.push(new v(l,n))):i.push(new v(l))}e(i)}else setTimeout(function(){t()},50)}var n=this,r=n.a.projectId,a=n.a.version;if(r){var o=n.c.o;f(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(a?"?v="+a:""),function(a){a?e([]):(o["__MonotypeConfiguration__"+r]=function(){return n.a},t())}).id="__MonotypeAPIScript__"+r}else e([])},H.prototype.load=function(e){var t,n,r=this.a.urls||[],a=this.a.families||[],o=this.a.testStrings||{},i=new g;for(t=0,n=r.length;t<n;t++)p(this.c,r[t],m(i));var s=[];for(t=0,n=a.length;t<n;t++)if((r=a[t].split(":"))[1])for(var l=r[1].split(","),c=0;c<l.length;c+=1)s.push(new v(r[0],l[c]));else s.push(new v(r[0]));h(i,function(){e(s,o)})};var W="https://fonts.googleapis.com/css";function Y(e){this.f=e,this.a=[],this.c={}}var K={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},X={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Z={i:"i",italic:"i",n:"n",normal:"n"},Q=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function J(e,t){this.c=e,this.a=t}var ee={Arimo:!0,Cousine:!0,Tinos:!0};function te(e,t){this.c=e,this.a=t}function ne(e,t){this.c=e,this.f=t,this.a=[]}J.prototype.load=function(e){var t=new g,n=this.c,r=new V(this.a.api,this.a.text),a=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var a=t[r].split(":");3==a.length&&e.f.push(a.pop());var o="";2==a.length&&""!=a[1]&&(o=":"),e.a.push(a.join(o))}}(r,a);var o=new Y(a);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),a=r[0].replace(/\+/g," "),o=["n4"];if(2<=r.length){var i;if(i=[],s=r[1])for(var s,l=(s=s.split(",")).length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(d=Q.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":Z[u],null==(d=d[1])||""==d)d="4";else var d=X[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&i.push(u)}0<i.length&&(o=i),3==r.length&&(i=[],0<(r=(r=r[2])?r.split(","):i).length&&(r=K[r[0]])&&(e.c[a]=r))}for(e.c[a]||(r=K[a])&&(e.c[a]=r),r=0;r<o.length;r+=1)e.a.push(new v(a,o[r]))}}(o),p(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),m(t)),h(t,function(){e(o.a,o.c,ee)})},te.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?f(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],a=0;a<t.length;a+=2)for(var o=t[a],i=t[a+1],s=0;s<i.length;s++)r.push(new v(o,i[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}},2e3):e([])},ne.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var a=0,o=n.fonts.length;a<o;++a){var i=n.fonts[a];r.a.push(new v(i.name,k("font-weight:"+i.weight+";font-style:"+i.style)))}e(r.a)},f(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",function(t){t&&e([])})):e([])};var re=new $(window);re.a.c.custom=function(e,t){return new H(t,e)},re.a.c.fontdeck=function(e,t){return new ne(t,e)},re.a.c.monotype=function(e,t){return new G(t,e)},re.a.c.typekit=function(e,t){return new te(t,e)},re.a.c.google=function(e,t){return new J(t,e)};var ae={load:r(re.load,re)};e.exports?e.exports=ae:(window.WebFont=ae,window.WebFontConfig&&re.load(window.WebFontConfig))}()}(za);var $a=za.exports,qa=o({__proto__:null,default:$a},[$a]);function Ga(){}function Ha(){}const Va=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wa=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ya={};function Ka(e,t){return(Ya.jsx?Wa:Va).test(e)}const Xa=/[ \t\n\f\r]/g;function Za(e){return""===e.replace(Xa,"")}let Qa=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function Ja(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Qa(n,r,t)}function eo(e){return e.toLowerCase()}Qa.prototype.normal={},Qa.prototype.property={},Qa.prototype.space=void 0;let to=class{constructor(e,t){this.attribute=t,this.property=e}};to.prototype.attribute="",to.prototype.booleanish=!1,to.prototype.boolean=!1,to.prototype.commaOrSpaceSeparated=!1,to.prototype.commaSeparated=!1,to.prototype.defined=!1,to.prototype.mustUseProperty=!1,to.prototype.number=!1,to.prototype.overloadedBoolean=!1,to.prototype.property="",to.prototype.spaceSeparated=!1,to.prototype.space=void 0;let no=0;const ro=uo(),ao=uo(),oo=uo(),io=uo(),so=uo(),lo=uo(),co=uo();function uo(){return 2**++no}var po=Object.freeze({__proto__:null,boolean:ro,booleanish:ao,commaOrSpaceSeparated:co,commaSeparated:lo,number:io,overloadedBoolean:oo,spaceSeparated:so});const fo=Object.keys(po);let go=class extends to{constructor(e,t,n,r){let a=-1;if(super(e,t),mo(this,"space",r),"number"==typeof n)for(;++a<fo.length;){const e=fo[a];mo(this,fo[a],(n&po[e])===po[e])}}};function mo(e,t,n){n&&(e[t]=n)}function ho(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new go(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[eo(r)]=r,n[eo(o.attribute)]=r}return new Qa(t,n,e.space)}go.prototype.defined=!0;const bo=ho({properties:{ariaActiveDescendant:null,ariaAtomic:ao,ariaAutoComplete:null,ariaBusy:ao,ariaChecked:ao,ariaColCount:io,ariaColIndex:io,ariaColSpan:io,ariaControls:so,ariaCurrent:null,ariaDescribedBy:so,ariaDetails:null,ariaDisabled:ao,ariaDropEffect:so,ariaErrorMessage:null,ariaExpanded:ao,ariaFlowTo:so,ariaGrabbed:ao,ariaHasPopup:null,ariaHidden:ao,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:so,ariaLevel:io,ariaLive:null,ariaModal:ao,ariaMultiLine:ao,ariaMultiSelectable:ao,ariaOrientation:null,ariaOwns:so,ariaPlaceholder:null,ariaPosInSet:io,ariaPressed:ao,ariaReadOnly:ao,ariaRelevant:null,ariaRequired:ao,ariaRoleDescription:so,ariaRowCount:io,ariaRowIndex:io,ariaRowSpan:io,ariaSelected:ao,ariaSetSize:io,ariaSort:null,ariaValueMax:io,ariaValueMin:io,ariaValueNow:io,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function yo(e,t){return t in e?e[t]:t}function vo(e,t){return yo(e,t.toLowerCase())}const wo=ho({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:lo,acceptCharset:so,accessKey:so,action:null,allow:null,allowFullScreen:ro,allowPaymentRequest:ro,allowUserMedia:ro,alt:null,as:null,async:ro,autoCapitalize:null,autoComplete:so,autoFocus:ro,autoPlay:ro,blocking:so,capture:null,charSet:null,checked:ro,cite:null,className:so,cols:io,colSpan:null,content:null,contentEditable:ao,controls:ro,controlsList:so,coords:io|lo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ro,defer:ro,dir:null,dirName:null,disabled:ro,download:oo,draggable:ao,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ro,formTarget:null,headers:so,height:io,hidden:oo,high:io,href:null,hrefLang:null,htmlFor:so,httpEquiv:so,id:null,imageSizes:null,imageSrcSet:null,inert:ro,inputMode:null,integrity:null,is:null,isMap:ro,itemId:null,itemProp:so,itemRef:so,itemScope:ro,itemType:so,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ro,low:io,manifest:null,max:null,maxLength:io,media:null,method:null,min:null,minLength:io,multiple:ro,muted:ro,name:null,nonce:null,noModule:ro,noValidate:ro,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:ro,optimum:io,pattern:null,ping:so,placeholder:null,playsInline:ro,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ro,referrerPolicy:null,rel:so,required:ro,reversed:ro,rows:io,rowSpan:io,sandbox:so,scope:null,scoped:ro,seamless:ro,selected:ro,shadowRootClonable:ro,shadowRootDelegatesFocus:ro,shadowRootMode:null,shape:null,size:io,sizes:null,slot:null,span:io,spellCheck:ao,src:null,srcDoc:null,srcLang:null,srcSet:null,start:io,step:null,style:null,tabIndex:io,target:null,title:null,translate:null,type:null,typeMustMatch:ro,useMap:null,value:ao,width:io,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:so,axis:null,background:null,bgColor:null,border:io,borderColor:null,bottomMargin:io,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ro,declare:ro,event:null,face:null,frame:null,frameBorder:null,hSpace:io,leftMargin:io,link:null,longDesc:null,lowSrc:null,marginHeight:io,marginWidth:io,noResize:ro,noHref:ro,noShade:ro,noWrap:ro,object:null,profile:null,prompt:null,rev:null,rightMargin:io,rules:null,scheme:null,scrolling:ao,standby:null,summary:null,text:null,topMargin:io,valueType:null,version:null,vAlign:null,vLink:null,vSpace:io,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ro,disableRemotePlayback:ro,prefix:null,property:null,results:io,security:null,unselectable:null},space:"html",transform:vo}),So=ho({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:co,accentHeight:io,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:io,amplitude:io,arabicForm:null,ascent:io,attributeName:null,attributeType:null,azimuth:io,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:io,by:null,calcMode:null,capHeight:io,className:so,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:io,diffuseConstant:io,direction:null,display:null,dur:null,divisor:io,dominantBaseline:null,download:ro,dx:null,dy:null,edgeMode:null,editable:null,elevation:io,enableBackground:null,end:null,event:null,exponent:io,externalResourcesRequired:null,fill:null,fillOpacity:io,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:lo,g2:lo,glyphName:lo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:io,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:io,horizOriginX:io,horizOriginY:io,id:null,ideographic:io,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:io,k:io,k1:io,k2:io,k3:io,k4:io,kernelMatrix:co,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:io,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:io,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:io,overlineThickness:io,paintOrder:null,panose1:null,path:null,pathLength:io,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:so,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:io,pointsAtY:io,pointsAtZ:io,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:co,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:co,rev:co,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:co,requiredFeatures:co,requiredFonts:co,requiredFormats:co,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:io,specularExponent:io,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:io,strikethroughThickness:io,string:null,stroke:null,strokeDashArray:co,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:io,strokeOpacity:io,strokeWidth:null,style:null,surfaceScale:io,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:co,tabIndex:io,tableValues:null,target:null,targetX:io,targetY:io,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:co,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:io,underlineThickness:io,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:io,values:null,vAlphabetic:io,vMathematical:io,vectorEffect:null,vHanging:io,vIdeographic:io,version:null,vertAdvY:io,vertOriginX:io,vertOriginY:io,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:io,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yo}),xo=ho({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),ko=ho({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vo}),Eo=ho({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Ao={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"},To=/[A-Z]/g,Co=/-[a-z]/g,Oo=/^data[-\w.:]+$/i;function Io(e){return"-"+e.toLowerCase()}function Ro(e){return e.charAt(1).toUpperCase()}const No=Ja([bo,wo,xo,ko,Eo],"html"),_o=Ja([bo,So,xo,ko,Eo],"svg");var Po={},Lo=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Do=/\n/g,Mo=/^\s*/,jo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Fo=/^:\s*/,Bo=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Uo=/^[;\s]*/,zo=/^\s+|\s+$/g,$o="";function qo(e){return e?e.replace(zo,$o):$o}var Go=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(Do);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(Mo)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;$o!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,$o===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(jo);if(t){if(d(),!l(Fo))return s("property missing ':'");var n=l(Bo),r=e({type:"declaration",property:qo(t[0].replace(Lo,$o)),value:n?qo(n[0].replace(Lo,$o)):$o});return l(Uo),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},Ho=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Po,"__esModule",{value:!0}),Po.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,Vo.default)(e),a="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)}),n};const Vo=Ho(Go);var Wo={};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.camelCase=void 0;var Yo=/^--[a-zA-Z0-9_-]+$/,Ko=/-([a-z])/g,Xo=/^[^-]+$/,Zo=/^-(webkit|moz|ms|o|khtml)-/,Qo=/^-(ms)-/,Jo=function(e,t){return t.toUpperCase()},ei=function(e,t){return"".concat(t,"-")};Wo.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Xo.test(e)||Yo.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Qo,ei):e.replace(Zo,ei)).replace(Ko,Jo))};var ti=(Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Po),ni=Wo;function ri(e,t){var n={};return e&&"string"==typeof e?((0,ti.default)(e,function(e,r){e&&r&&(n[(0,ni.camelCase)(e,t)]=r)}),n):n}ri.default=ri;var ai=ri;const oi=si("end"),ii=si("start");function si(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 li(e){return e&&"object"==typeof e?"position"in e||"type"in e?ui(e.position):"start"in e||"end"in e?ui(e):"line"in e||"column"in e?ci(e):"":""}function ci(e){return di(e&&e.line)+":"+di(e&&e.column)}function ui(e){return ci(e&&e.start)+"-"+ci(e&&e.end)}function di(e){return e&&"number"==typeof e?e:1}class pi extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=li(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pi.prototype.file="",pi.prototype.name="",pi.prototype.reason="",pi.prototype.message="",pi.prototype.stack="",pi.prototype.column=void 0,pi.prototype.line=void 0,pi.prototype.ancestors=void 0,pi.prototype.cause=void 0,pi.prototype.fatal=void 0,pi.prototype.place=void 0,pi.prototype.ruleId=void 0,pi.prototype.source=void 0;const fi={}.hasOwnProperty,gi=new Map,mi=/[A-Z]/g,hi=new Set(["table","tbody","thead","tfoot","tr"]),bi=new Set(["td","th"]),yi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vi(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,a,o){const i=Array.isArray(a.children),s=ii(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?_o:No,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=wi(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function wi(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=_o,e.schema=a);e.ancestors.push(t);const o=Ai(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&fi.call(t.properties,a)){const o=Ei(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&bi.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=ki(e,t);hi.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Za(t.value):Za(t));var t}));return Si(e,i,o,t),xi(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ti(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=_o,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:Ai(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];Ga(t.type);const a=t.expression;Ga(a.type);const o=a.properties[0];Ga(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Ti(e,t.position);else{const a=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Ga(t.type),o=e.evaluater.evaluateExpression(t.expression)}else Ti(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=ki(e,t);return Si(e,i,o,t),xi(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ti(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return xi(r,ki(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 Si(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ki(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:gi;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=wi(e,o,i);void 0!==s&&n.push(s)}return n}function Ei(e,t,n){const r=function(e,t){const n=eo(t);let r=t,a=to;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Oo.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Co,Ro);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Co.test(e)){let n=e.replace(To,Io);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=go}return new a(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return ai(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new pi("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=yi+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)fi.call(e,n)&&(t[Ci(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Ao[r.property]||r.property:r.attribute,n]}}function Ai(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=Ka(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=Ka(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 fi.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ti(e)}function Ti(e,t){const n=new pi("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=yi+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ci(e){let t=e.replace(mi,Oi);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Oi(e){return"-"+e.toLowerCase()}const Ii={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"]},Ri={};function Ni(e,t){return _i(e,"boolean"!=typeof Ri.includeImageAlt||Ri.includeImageAlt,"boolean"!=typeof Ri.includeHtml||Ri.includeHtml)}function _i(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pi(e.children,t,n)}return Array.isArray(e)?Pi(e,t,n):""}function Pi(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=_i(e[a],t,n);return r.join("")}const Li={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},Di={}.hasOwnProperty;function Mi(e){return!!Di.call(Li,e)&&Li[e]}function ji(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Fi(e,t){return e.length>0?(ji(e,e.length,0,t),e):t}const Bi={}.hasOwnProperty;function Ui(e){const t={};let n=-1;for(;++n<e.length;)zi(t,e[n]);return t}function zi(e,t){let n;for(n in t){const r=(Bi.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Bi.call(r,o)||(r[o]=[]);const e=a[o];$i(r[o],Array.isArray(e)?e:e?[e]:[])}}}function $i(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ji(e,0,0,r)}function qi(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 Gi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hi=rs(/[A-Za-z]/),Vi=rs(/[\dA-Za-z]/),Wi=rs(/[#-'*+\--9=?A-Z^-~]/);function Yi(e){return null!==e&&(e<32||127===e)}const Ki=rs(/\d/),Xi=rs(/[\dA-Fa-f]/),Zi=rs(/[!-/:-@[-`{-~]/);function Qi(e){return null!==e&&e<-2}function Ji(e){return null!==e&&(e<0||32===e)}function es(e){return-2===e||-1===e||32===e}const ts=rs(/\p{P}|\p{S}/u),ns=rs(/\s/);function rs(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function as(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&Vi(e.charCodeAt(n+1))&&Vi(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function os(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(es(r))return e.enter(n),i(r);return t(r)};function i(r){return es(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const is={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"),os(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Qi(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const ss={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}b(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return ji(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return g(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ls,u,d)(a)}function u(e){return r&&y(),b(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,g(e)}function p(n){return t.containerState={},e.attempt(ls,f,g)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function g(n){return null===n?(r&&y(),b(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(h(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):Qi(n)?(e.consume(n),h(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function h(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(b(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;ji(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},ls={tokenize:function(e,t,n){return os(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function cs(e){return null===e||Ji(e)||ns(e)?1:ts(e)?2:void 0}function us(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const ds={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;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[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};ps(d,-s),ps(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Fi(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Fi(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Fi(l,us(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Fi(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Fi(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,ji(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=cs(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=cs(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function ps(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fs={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return Hi(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||Vi(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Vi(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(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||Yi(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Wi(t)?(e.consume(t),l):n(t)}function c(e){return Vi(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Vi(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const gs={partial:!0,tokenize:function(e,t,n){return function(t){return es(t)?os(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Qi(e)?t(e):n(e)}}};const ms={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(es(t))return os(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(ms,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return es(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const hs={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 Zi(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const bs={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=Vi,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Xi,c):(e.enter("characterReferenceValue"),a=7,o=Ki,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==Vi||Mi(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const ys={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},vs={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),es(t)?os(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),es(t)?os(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Qi(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),es(t)?os(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Qi(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(ys,f,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Qi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):es(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),os(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||Qi(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Qi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,y,g)(t)}function g(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&es(t)?os(e,h,"linePrefix",i+1)(t):h(t)}function h(t){return null===t||Qi(t)?e.check(ys,f,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||Qi(t)?(e.exit("codeFlowValue"),h(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}};const ws={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),os(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):Qi(t)?e.attempt(Ss,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Qi(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Ss={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):Qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):os(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Qi(e)?a(e):n(e)}}};const xs={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):Qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Qi(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class ks{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Es(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Es(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Es(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);Es(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Es(this.left,t.reverse())}}}function Es(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 As(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new ks(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Ts(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return ji(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Ts(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,g=0,m=0;const h=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,h.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),p=h.length;p--;){const t=s.slice(h[p],h[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const Cs={resolve:function(e){return As(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):Qi(t)?e.check(Os,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Os={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"),os(e,a,"linePrefix")};function a(a){if(null===a||Qi(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function Is(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||Yi(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Qi(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function g(a){return u||null!==a&&41!==a&&!Ji(a)?u<c&&40===a?(e.consume(a),u++,g):41===a?(e.consume(a),u--,g):null===a||32===a||40===a||Yi(a)?n(a):(e.consume(a),92===a?m:g):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),g):g(t)}}function Rs(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):Qi(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Qi(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!es(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Ns(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):Qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),os(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||Qi(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function _s(e,t){let n;return function r(a){if(Qi(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(es(a))return os(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const Ps={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return Rs.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=Gi(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 Ji(t)?_s(e,s)(t):s(t)}function s(t){return Is(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ls,c,c)(t)}function c(t){return es(t)?os(e,u,"whitespace")(t):u(t)}function u(o){return null===o||Qi(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Ls={partial:!0,tokenize:function(e,t,n){return function(t){return Ji(t)?_s(e,r)(t):n(t)};function r(t){return Ns(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return es(t)?os(e,o,"whitespace")(t):o(t)}function o(e){return null===e||Qi(e)?t(e):n(e)}}};const Ds={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Qi(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Ms={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},ji(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||Ji(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Qi(n)?(e.exit("atxHeading"),t(n)):es(n)?os(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||Ji(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const js=["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"],Fs=["pre","script","style","textarea"],Bs={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):Hi(s)?(e.consume(s),i=String.fromCharCode(s),g):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):Hi(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return Hi(t)?(e.consume(t),i=String.fromCharCode(t),g):n(t)}function g(s){if(null===s||47===s||62===s||Ji(s)){const l=47===s,c=i.toLowerCase();return l||o||!Fs.includes(c)?js.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?h(s):b(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||Vi(s)?(e.consume(s),i+=String.fromCharCode(s),g):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function h(t){return es(t)?(e.consume(t),h):E(t)}function b(t){return 47===t?(e.consume(t),E):58===t||95===t||Hi(t)?(e.consume(t),y):es(t)?(e.consume(t),b):E(t)}function y(t){return 45===t||46===t||58===t||95===t||Vi(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),w):es(t)?(e.consume(t),v):b(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,S):es(t)?(e.consume(t),w):x(t)}function S(t){return t===l?(e.consume(t),l=null,k):null===t||Qi(t)?n(t):(e.consume(t),S)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Ji(t)?v(t):(e.consume(t),x)}function k(e){return 47===e||62===e||es(e)?b(e):n(e)}function E(t){return 62===t?(e.consume(t),A):n(t)}function A(t){return null===t||Qi(t)?T(t):es(t)?(e.consume(t),A):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),R):60===t&&1===a?(e.consume(t),N):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!Qi(t)||6!==a&&7!==a?null===t||Qi(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Us,M,C)(t))}function C(t){return e.check(zs,O,M)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||Qi(t)?C(t):(e.enter("htmlFlowData"),T(t))}function R(t){return 45===t?(e.consume(t),L):T(t)}function N(t){return 47===t?(e.consume(t),i="",_):T(t)}function _(t){if(62===t){const n=i.toLowerCase();return Fs.includes(n)?(e.consume(t),D):T(t)}return Hi(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),_):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||Qi(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},Us={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(gs,t,n)}}},zs={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Qi(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const $s={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),y):Hi(t)?(e.consume(t),k):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):Hi(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Qi(t)?(i=u,_(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?g:f):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),m):Qi(t)?(i=g,_(t)):(e.consume(t),g)}function m(t){return 93===t?(e.consume(t),h):g(t)}function h(t){return 62===t?N(t):93===t?(e.consume(t),h):g(t)}function b(t){return null===t||62===t?N(t):Qi(t)?(i=b,_(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):Qi(t)?(i=y,_(t)):(e.consume(t),y)}function v(e){return 62===e?N(e):y(e)}function w(t){return Hi(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||Vi(t)?(e.consume(t),S):x(t)}function x(t){return Qi(t)?(i=x,_(t)):es(t)?(e.consume(t),x):N(t)}function k(t){return 45===t||Vi(t)?(e.consume(t),k):47===t||62===t||Ji(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),N):58===t||95===t||Hi(t)?(e.consume(t),A):Qi(t)?(i=E,_(t)):es(t)?(e.consume(t),E):N(t)}function A(t){return 45===t||46===t||58===t||95===t||Vi(t)?(e.consume(t),A):T(t)}function T(t){return 61===t?(e.consume(t),C):Qi(t)?(i=T,_(t)):es(t)?(e.consume(t),T):E(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,O):Qi(t)?(i=C,_(t)):es(t)?(e.consume(t),C):(e.consume(t),I)}function O(t){return t===a?(e.consume(t),a=void 0,R):null===t?n(t):Qi(t)?(i=O,_(t)):(e.consume(t),O)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Ji(t)?E(t):(e.consume(t),I)}function R(e){return 47===e||62===e||Ji(e)?E(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return es(t)?os(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const qs={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&ji(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Fi(o,e.slice(r+1,r+s+3)),o=Fi(o,[["enter",u,t]]),o=Fi(o,us(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=Fi(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Fi(o,e.slice(a+1)),o=Fi(o,[["exit",l,t]]),ji(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(Gi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Gs,c,o?c:u)(t):91===t?e.attempt(Hs,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(Vs,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},Gs={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 Ji(t)?_s(e,a)(t):a(t)}function a(t){return 41===t?c(t):Is(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Ji(t)?_s(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Ns(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Ji(t)?_s(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Hs={tokenize:function(e,t,n){const r=this;return function(t){return Rs.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(Gi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},Vs={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 Ws={name:"labelStartImage",resolveAll:qs.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ys={name:"labelStartLink",resolveAll:qs.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ks={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),os(e,t,"linePrefix")}}};const Xs={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||Qi(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),es(t)?os(e,o,"whitespace")(t):o(t))}}};const Zs={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(gs,a,o);function a(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,os(e,t,"listItemIndent",r.containerState.size+1)(n)}function o(n){return r.containerState.furtherBlankLines||!es(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Js,t,i)(n))}function i(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,os(e,e.attempt(Zs,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:Ki(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(Xs,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Ki(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(gs,r.interrupt?n:c,e.attempt(Qs,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return es(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Qs={partial:!0,tokenize:function(e,t,n){const r=this;return os(e,function(e){const a=r.events[r.events.length-1];return!es(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Js={partial:!0,tokenize:function(e,t,n){const r=this;return os(e,function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const el={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),es(t)?os(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Qi(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const tl={tokenize:function(e){const t=this,n=e.attempt(gs,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,os(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Cs,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 nl={resolveAll:il()},rl=ol("string"),al=ol("text");function ol(e){return{resolveAll:il("text"===e?sl:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function il(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function sl(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const ll={42:Zs,43:Zs,45:Zs,48:Zs,49:Zs,50:Zs,51:Zs,52:Zs,53:Zs,54:Zs,55:Zs,56:Zs,57:Zs,62:ms},cl={91:Ps},ul={[-2]:ws,[-1]:ws,32:ws},dl={35:Ms,42:Xs,45:[el,Xs],60:Bs,61:el,95:Xs,96:vs,126:vs},pl={38:bs,92:hs},fl={[-5]:Ks,[-4]:Ks,[-3]:Ks,33:Ws,38:bs,42:ds,60:[fs,$s],91:Ys,92:[Ds,hs],93:qs,95:ds,96:xs},gl={null:[ds,nl]};var ml=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:cl,disable:{null:[]},document:ll,flow:dl,flowInitial:ul,insideSpan:gl,string:pl,text:fl});function hl(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let i=[],s=[];const l={attempt:h(function(e,t){b(e,t.from)}),check:h(m),consume:function(e){Qi(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:h(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=Fi(i,e),f(),null!==i[i.length-1])return[];return b(t,0),c.events=us(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){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;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){u=u(e)}function m(e,t){t.restore()}function h(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return g([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function g(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return b();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,h,b)(n)}}function h(t){return e(d,f),a}function b(e){return f.restore(),++u<i.length?m(i[u]):o}}}function b(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&ji(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const bl=/[\0\t\n\r]/g;const yl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vl(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return qi(n.slice(t?2:1),t?16:10)}return Mi(n)||e}const wl={}.hasOwnProperty;function Sl(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(Z),blockQuote:o(V),characterEscape:A,characterReference:A,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:A,data:A,codeFlowValue:A,definition:o(K),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(X),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:A,htmlText:o(J,i),htmlTextData:A,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:B,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(Z),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:H,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:$,characterReference:q,codeFenced:l(h),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:T,codeIndented:l(b),codeText:l(N),codeTextData:T,data:T,definition:l(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(I),htmlFlowData:T,htmlText:l(R),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:M,resourceTitleString:j,resource:F,setextHeading:l(E),setextHeadingLineSequence:k,setextHeadingText:x,strong:l(),thematicBreak:l()}};kl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];wl.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Al).call(o,void 0,e[0])}for(r.position={start:xl(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:xl(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(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:xl(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+li({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||Al).call(this,e,r[0])}n.position.end=xl(e.end)}function u(){return Ni(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function h(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function S(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 k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function A(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:xl(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=xl(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=xl(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(A.call(this,e),T.call(this,e))}function O(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function _(){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 P(){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 L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(yl,vl)}(t),n.identifier=Gi(t).toLowerCase()}function D(){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 M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=qi(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Mi(t)}this.stack[this.stack.length-1].value+=r}function q(e){this.stack.pop().position.end=xl(e.end)}function G(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function H(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function V(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!As(e););return e}(function(e){const t={constructs:Ui([ml,...(e||{}).extensions||[]]),content:n(is),defined:[],document:n(ss),flow:n(tl),lazy:{},string:n(rl),text:n(al)};return t;function n(e){return function(n){return hl(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(bl.lastIndex=u,l=bl.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function xl(e){return{line:e.line,column:e.column,offset:e.offset}}function kl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?kl(e,r):El(e,r)}}function El(e,t){let n;for(n in t)if(wl.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 Al(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+li({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+li({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+li({start:t.start,end:t.end})+") is still open")}function Tl(e){const t=this;t.parser=function(n){return Sl(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Cl(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function Ol(e){const t=e.spread;return null==t?e.children.length>1:t}function Il(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Rl(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Rl(t.slice(a),a>0,!1)),o.join("")}function Rl(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const Nl={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={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);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(),a=as(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},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 Cl(e,t);const a={src:as(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:as(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 Cl(e,t);const a={href:as(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:as(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ol(n[r])}return t}(n):Ol(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=ii(t.children[1]),i=oi(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Il(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:_l,yaml:_l,definition:_l,footnoteDefinition:_l};function _l(){}const Pl="object"==typeof self?self:globalThis,Ll=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new Pl[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new Pl[o](i),a)};return r})(new Map,e)(0),Dl="",{toString:Ml}={},{keys:jl}=Object,Fl=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Ml.call(e).slice(8,-1);switch(n){case"Array":return[1,Dl];case"Object":return[2,Dl];case"Date":return[3,Dl];case"RegExp":return[4,Dl];case"Map":return[5,Dl];case"Set":return[6,Dl];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Bl=([e,t])=>0===e&&("function"===t||"symbol"===t),Ul=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=Fl(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const t of r)e.push(o(t));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of jl(r))!e&&Bl(Fl(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[n,a]of r)(e||!Bl(Fl(n))&&!Bl(Fl(a)))&&t.push([o(n),o(a)]);return n}case 6:{const t=[],n=a([i,t],r);for(const n of r)!e&&Bl(Fl(n))||t.push(o(n));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r};var zl="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Ll(Ul(e,t)):structuredClone(e):(e,t)=>Ll(Ul(e,t));function $l(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 ql(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Gl={}.hasOwnProperty,Hl={};function Vl(e,t){e.position&&(t.position=function(e){const t=ii(e),n=oi(e);if(t&&n)return{start:t,end:n}}(e))}function Wl(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&a&&Object.assign(n.properties,zl(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Yl(e,t){const n=t.data||{},r=!("value"in t)||Gl.call(n,"hProperties")||Gl.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 Kl(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 Xl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zl(e,t){const n=function(e,t){const n=t||Hl,r=new Map,a=new Map,o=new Map,i={...Nl,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=Xl(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=Xl(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:Wl,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(Gl.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=zl(n);return r.children=s.all(e),r}return zl(e)}return(s.options.unknownHandler||Yl)(s,e,t)},options:n,patch:Vl,wrap:Kl};return Ir(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$l,r=e.options.footnoteBackLabel||ql,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=as(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,g),s.push(g)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...zl(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function Ql(e,t){return e&&"run"in e?async function(n,r){const a=Zl(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Zl(n,{file:r,...e||t})}}function Jl(e){if(e)throw e}var ec=Object.prototype.hasOwnProperty,tc=Object.prototype.toString,nc=Object.defineProperty,rc=Object.getOwnPropertyDescriptor,ac=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===tc.call(e)},oc=function(e){if(!e||"[object Object]"!==tc.call(e))return!1;var t,n=ec.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ec.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ec.call(e,t)},ic=function(e,t){nc&&"__proto__"===t.name?nc(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},sc=function(e,t){if("__proto__"===t){if(!ec.call(e,t))return;if(rc)return rc(e,t).value}return e[t]},lc=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=sc(s,n),s!==(a=sc(t,n))&&(u&&a&&(oc(a)||(o=ac(a)))?(o?(o=!1,i=r&&ac(r)?r:[]):i=r&&oc(r)?r:{},ic(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&ic(s,{name:n,newValue:a}));return s};function cc(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 uc(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(a);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return a(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(o,a):i instanceof Error?a(i):o(i))}function a(e,...r){n||(n=!0,t(e,...r))}function o(e){a(null,e)}}(s,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const dc={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');pc(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(pc(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){pc(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)pc(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){pc(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function pc(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const fc={cwd:function(){return"/"}};function gc(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function mc(e){if("string"==typeof e)e=new URL(e);else if(!gc(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 hc=["history","path","basename","stem","extname","dirname"];class bc{constructor(e){let t;t=e?gc(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":fc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<hc.length;){const e=hc[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)hc.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?dc.basename(this.path):void 0}set basename(e){vc(e,"basename"),yc(e,"basename"),this.path=dc.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?dc.dirname(this.path):void 0}set dirname(e){wc(this.basename,"dirname"),this.path=dc.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?dc.extname(this.path):void 0}set extname(e){if(yc(e,"extname"),wc(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=dc.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){gc(e)&&(e=mc(e)),vc(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?dc.basename(this.path,this.extname):void 0}set stem(e){vc(e,"stem"),yc(e,"stem"),this.path=dc.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 pi(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function yc(e,t){if(e&&e.includes(dc.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dc.sep+"`")}function vc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function wc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Sc=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},xc={}.hasOwnProperty;class kc extends Sc{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=uc()}copy(){const e=new kc;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(lc(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Cc("data",this.frozen),this.namespace[e]=t,this):xc.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Cc("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=Rc(e),n=this.parser||this.Parser;return Ac("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Ac("process",this.parser||this.Parser),Tc("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=Rc(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),Ac("processSync",this.parser||this.Parser),Tc("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Jl(e),t=r}),Ic("processSync","process",n),t}run(e,t,n){Oc(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=Rc(t);r.run(e,i,function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Jl(e),n=t,r=!0}),Ic("runSync","run",r),n}stringify(e,t){this.freeze();const n=Rc(t),r=this.compiler||this.Compiler;return Tc("stringify",r),Oc(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Cc("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(r.settings=lc(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];cc(i)&&cc(r)&&(r=lc(!0,i,r)),n[a]=[e,r,...o]}}}}const Ec=(new kc).freeze();function Ac(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Tc(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cc(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 Oc(e){if(!cc(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ic(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rc(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new bc(e)}const Nc=[],_c={allowDangerousHtml:!0},Pc=/^(https?|ircs?|mailto|xmpp)$/i,Lc=[{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 Dc(e){const t=function(e){const t=e.rehypePlugins||Nc,n=e.remarkPlugins||Nc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._c}:_c,a=Ec().use(Tl).use(n).use(Ql,r).use(t);return a}(e),r=function(e){const t=e.children||"",n=new bc;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const r=t.allowedElements,a=t.allowElement,o=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Mc;for(const e of Lc)Object.hasOwn(t,e.from)&&Ha((e.from,e.to&&e.to,e.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Ir(e,u),vi(e,{Fragment:n.Fragment,components:o,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0});function u(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return s?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ii)if(Object.hasOwn(Ii,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ii[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=c(String(n||""),t,e))}}if("element"===e.type){let o=r?!r.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&a&&"number"==typeof t&&(o=!a(e,t,n)),o&&n&&"number"==typeof t)return l&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}}(t.runSync(t.parse(r),r),e)}function Mc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||Pc.test(e.slice(0,t))?e:""}function jc(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function Fc(e,t,n){const r=xr((n||{}).ignore||[]),a=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Bc(e[0]),Uc(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)Or(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Bc(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Uc(e){return"function"==typeof e?e:function(){return e}}const zc="phrasing",$c=["autolink","link","image","label"];function qc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gc(e){this.config.enter.autolinkProtocol.call(this,e)}function Hc(e){this.config.exit.autolinkProtocol.call(this,e)}function Vc(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Wc(e){this.config.exit.autolinkEmail.call(this,e)}function Yc(e){this.exit(e)}function Kc(e){Fc(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Xc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Zc]],{ignore:["link","linkReference"]})}function Xc(e,t,n,r,a){let o="";if(!Qc(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=jc(e,"(");let o=jc(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function Zc(e,t,n,r){return!(!Qc(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Qc(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||ns(n)||ts(n))&&(!t||47!==n)}function Jc(){this.buffer()}function eu(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tu(){this.buffer()}function nu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ru(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function au(e){this.exit(e)}function ou(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iu(e){this.exit(e)}function su(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function lu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?uu:cu)));return s(),i},footnoteReference:su},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function cu(e,t,n){return 0===t?e:uu(e,t,n)}function uu(e,t,n){return(n?"":" ")+e}su.peek=function(){return"["};const du=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function pu(e){this.enter({type:"delete",children:[]},e)}function fu(e){this.exit(e)}function gu(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function mu(e){return e.length}function hu(e){return null==e?"":String(e)}function bu(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function yu(e,t,n){return">"+(n?"":" ")+e}function vu(e,t){return wu(e,t.inConstruct,!0)&&!wu(e,t.notInConstruct,!1)}function wu(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Su(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&vu(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function xu(e,t,n){return(n?"":" ")+e}function ku(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Eu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Au(e,t,n){const r=cs(e),a=cs(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Tu(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Au(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Eu(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Au(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Eu(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Cu(e){return e.value||""}function Ou(e,t,n,r){const a=ku(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Iu(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ru(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function Nu(e,t){const n=Ni(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function _u(e,t,n,r){const a=ku(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Nu(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Pu(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Lu(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Du(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}gu.peek=function(){return"~"},Tu.peek=function(e,t,n){return n.options.emphasis||"*"},Cu.peek=function(){return"<"},Ou.peek=function(){return"!"},Iu.peek=function(){return"!"},Ru.peek=function(){return"`"},_u.peek=function(e,t,n){return Nu(e,n)?"<":"["},Pu.peek=function(){return"["};const Mu=xr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ju(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Au(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Eu(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Au(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Eu(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}ju.peek=function(e,t,n){return n.options.strong||"*"};const Fu={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),yu);return a(),i},break:Su,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,xu);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=ku(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:Tu,hardBreak:Su,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return Ir(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Cr}),Boolean((!e.depth||e.depth<3)&&Ni(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=Eu(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Cu,image:Ou,imageReference:Iu,inlineCode:Ru,link:_u,linkReference:Pu,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Lu(n);const s=e.ordered?"."===i?")":".":function(e){const t=Lu(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Du(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Lu(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e});return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some(function(e){return Mu(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:ju,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Du(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Bu(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Uu(e){this.exit(e),this.data.inTable=void 0}function zu(e){this.enter({type:"tableRow",children:[]},e)}function $u(e){this.exit(e)}function qu(e){this.enter({type:"tableCell",children:[]},e)}function Gu(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hu));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Hu(e,t){return"|"===t?t:e}function Vu(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Fu.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=l(e,n,r),o=s([a]);return o.slice(0,o.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||mu,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=hu(e[u][o]);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)o[d]=bu(r[d]);else{const e=bu(r);for(;++d<c;)o[d]=e}d=-1;const p=[],f=[];for(;++d<c;){const e=o[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[d]&&(l[d]=a),f[d]=a),p[d]=i}i.splice(1,0,p),s.splice(1,0,f),u=-1;const g=[];for(;++u<i.length;){const e=i[u],t=s[u];d=-1;const r=[];for(;++d<c;){const a=e[d]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=o[d];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}g.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return g.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function Wu(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Yu(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Ku(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=Fu.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+i})),l}const Xu={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},Zu={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(Ju,l,s)(t):null===t||Ji(t)||ns(t)||45!==t&&ts(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},Qu={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(Ju,t,o)(i):null===i||Ji(i)||ns(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},Ju={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||Ji(i)||ns(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||Ji(e)||ns(e)?t(e):r(e)}function o(e){return Hi(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):Hi(t)?(e.consume(t),i):n(t)}},partial:!0},ed={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Vi(e)?n(e):t(e)}},partial:!0},td={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!id.call(r,r.previous)||ud(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xu,e.attempt(Zu,e.attempt(Qu,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:id},nd={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&sd.call(r,r.previous)&&!ud(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(Hi(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||Yi(t)||Ji(t)||ns(t)||ts(t)?n(t):e.attempt(Zu,e.attempt(Qu,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:sd},rd={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!cd(t)||!ld.call(r,r.previous)||ud(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return cd(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(ed,c,l)(t):45===t||95===t||Vi(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&Hi(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:ld},ad={};let od=48;for(;od<123;)ad[od]=rd,od++,58===od?od=65:91===od&&(od=97);function id(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Ji(e)}function sd(e){return!Hi(e)}function ld(e){return!(47===e||cd(e))}function cd(e){return 43===e||45===e||46===e||95===e||Vi(e)}function ud(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}ad[43]=rd,ad[45]=rd,ad[46]=rd,ad[95]=rd,ad[72]=[rd,nd],ad[104]=[rd,nd],ad[87]=[rd,td],ad[119]=[rd,td];const dd={tokenize:function(e,t,n){const r=this;return os(e,function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function pd(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=Gi(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function fd(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function gd(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||Ji(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(Gi(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Ji(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function md(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||Ji(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=Gi(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Ji(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),os(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function hd(e,t,n){return e.check(gs,t,e.attempt(dd,t,n))}function bd(e){e.exit("gfmFootnoteDefinition")}function yd(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=cs(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=cs(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&ji(i,i.length,0,us(s,e.slice(r+1,n),t)),ji(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),ji(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class vd{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function wd(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function Sd(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?w:s;if(o===w&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):Qi(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):es(t)?os(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Ji(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,es(t)?os(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?g(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return es(t)?os(e,g,"whitespace")(t):g(t)}function g(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||Qi(t)?y(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),h(t)):v(t)}function h(t){return 45===t?(e.consume(t),h):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return es(t)?os(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?p(n):(null===n||Qi(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),S(t)}function S(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),S):null===n||Qi(n)?(e.exit("tableRow"),t(n)):es(n)?os(e,S,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||Ji(t)?(e.exit("data"),S(t)):(e.consume(t),92===t?k:x)}function k(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function xd(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new vd;for(;++o<e.length;){const f=e[o],g=f[1];"enter"===f[0]?"tableHead"===g.type?(u=!1,0!==d&&(Ed(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===g.type||"tableDelimiterRow"===g.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===g.type?2:r?3:1):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type?"tableCellDivider"===g.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=kd(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=kd(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===g.type?(u=!0,d=o):"tableRow"===g.type||"tableDelimiterRow"===g.type?(d=o,0!==l[1]?(c[0]=c[1],a=kd(p,t,l,s,o,a)):0!==c[1]&&(a=kd(p,t,c,s,o,a)),s=0):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type||(c[3]=o)}for(0!==d&&Ed(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=wd(t.events,o))}return e}function kd(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},Ad(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Ad(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=Ad(t.events,n[2]),o=Ad(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},Ad(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Ed(e,t,n,r,a){const o=[],i=Ad(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ad(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Td={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return Ji(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return Qi(r)?t(r):es(r)?e.check({tokenize:Cd},t,n)(r):n(r)}}};function Cd(e,t,n){return os(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Od={};function Id(e){const t=e||Od,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Ui([{text:ad},{document:{91:{name:"gfmFootnoteDefinition",tokenize:md,continuation:{tokenize:hd},exit:bd}},text:{91:{name:"gfmFootnoteCall",tokenize:gd},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pd,resolveTo:fd}}},yd(e),{flow:{null:{name:"table",tokenize:Sd,resolveAll:xd}}},{text:{91:Td}}])}(t)),a.push([{transforms:[Kc],enter:{literalAutolink:qc,literalAutolinkEmail:Gc,literalAutolinkHttp:Gc,literalAutolinkWww:Gc},exit:{literalAutolink:Yc,literalAutolinkEmail:Wc,literalAutolinkHttp:Hc,literalAutolinkWww:Vc}},{enter:{gfmFootnoteCallString:Jc,gfmFootnoteCall:eu,gfmFootnoteDefinitionLabelString:tu,gfmFootnoteDefinition:nu},exit:{gfmFootnoteCallString:ru,gfmFootnoteCall:au,gfmFootnoteDefinitionLabelString:ou,gfmFootnoteDefinition:iu}},{canContainEols:["delete"],enter:{strikethrough:pu},exit:{strikethrough:fu}},{enter:{table:Bu,tableData:qu,tableHeader:qu,tableRow:zu},exit:{codeText:Gu,table:Uu,tableData:$u,tableHeader:$u,tableRow:$u}},{exit:{taskListCheckValueChecked:Wu,taskListCheckValueUnchecked:Wu,paragraph:Yu}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zc,notInConstruct:$c},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zc,notInConstruct:$c},{character:":",before:"[ps]",after:"\\/",inConstruct:zc,notInConstruct:$c}]},lu(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:du}],handlers:{delete:gu}},Vu(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ku}}]}}(t))}function Rd(){return{type:"break"}}function Nd(){return function(e){!function(e){Fc(e,[/\r?\n|\r/g,Rd])}(e)}}function _d(){return e=>{Ir(e,"listItem",e=>{Ir(e,"break",(e,t,n)=>{n&&void 0!==t&&(n.children[t]={type:"text",value:"\n"})})})}}function Pd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ld(e){return function(e){if(Array.isArray(e))return Pd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pd(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pd(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dd(e){return Dd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dd(e)}function Md(e){var t=function(e,t){if("object"!=Dd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Dd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Dd(t)?t:t+""}function jd(e,t,n){return(t=Md(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fd(){return Fd=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},Fd.apply(null,arguments)}function Bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ud(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(n),!0).forEach(function(t){jd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var zd={};function $d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return zd[r]||(zd[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),zd[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Ud(Ud({},e),n[t])},t)}function qd(e){return e.join(" ")}function Gd(t){var n=t.node,r=t.stylesheet,a=t.style,o=void 0===a?{}:a,i=t.useInlineStyles,s=t.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,a){return Gd({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(a)})})}}(r,i);if(i){var g=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],h=l.className&&m.concat(l.className.filter(function(e){return!g.includes(e)}));p=Ud(Ud({},l),{},{className:qd(h)||void 0,style:$d(l.className,Object.assign({},l.style,o),r)})}else p=Ud(Ud({},l),{},{className:qd(l.className)});var b=f(n.children);return e.createElement(u,Fd({key:s},p),b)}}var Hd=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vd(Object(n),!0).forEach(function(t){jd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Yd=/\n/g;function Kd(t){var n=t.codeString,r=t.codeStyle,a=t.containerStyle,o=void 0===a?{float:"left",paddingRight:"10px"}:a,i=t.numberStyle,s=void 0===i?{}:i,l=t.startingLineNumber;return e.createElement("code",{style:Object.assign({},r,o)},function(t){var n=t.lines,r=t.startingLineNumber,a=t.style;return n.map(function(t,n){var o=n+r;return e.createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof a?a(o):a},"".concat(o,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function Xd(e){return"".concat(e.toString().length,".25em")}function Zd(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Qd(e,t,n){var r={display:"inline-block",minWidth:Xd(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return Wd(Wd({},r),a)}function Jd(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,a=e.largestLineNumber,o=e.showInlineLineNumbers,i=e.lineProps,s=void 0===i?{}:i,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,f=void 0!==p&&p?Wd({},"function"==typeof s?s(n):s):{};if(f.className=f.className?[].concat(Ld(f.className.trim().split(/\s+/)),Ld(c)):c,n&&o){var g=Qd(r,n,a);t.unshift(Zd(n,g))}return d&u&&(f.style=Wd({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:t}}function ep(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var a=e[r];if("text"===a.type)n.push(Jd({children:[a],className:Ld(new Set(t))}));else if(a.children){var o=t.concat(a.properties.className);ep(a.children,o).forEach(function(e){return n.push(e)})}}return n}function tp(e,t,n,r,a,o,i,s,l){var c,u=ep(e.value),d=[],p=-1,f=0;function g(e,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,o){return Jd({children:e,lineNumber:o,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:a,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,o,c):function(e,t){if(r&&t&&a){var n=Qd(s,t,i);e.unshift(Zd(t,n))}return e}(e,o)}for(var m=function(){var e=u[f],t=e.children[0].value,n=function(e){return e.match(Yd)}(t);if(n){var a=t.split("\n");a.forEach(function(t,n){var i=r&&d.length+o,s={type:"text",value:"".concat(t,"\n")};if(0===n){var l=g(u.slice(p+1,f).concat(Jd({children:[s],className:e.properties.className})),i);d.push(l)}else if(n===a.length-1){var c=u[f+1]&&u[f+1].children&&u[f+1].children[0],m={type:"text",value:"".concat(t)};if(c){var h=Jd({children:[m],className:e.properties.className});u.splice(f+1,0,h)}else{var b=g([m],i,e.properties.className);d.push(b)}}else{var y=g([s],i,e.properties.className);d.push(y)}}),p=f}f++};f<u.length;)m();if(p!==u.length-1){var h=u.slice(p+1,u.length);if(h&&h.length){var b=g(h,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function np(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return Gd({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function rp(e){return e&&void 0!==e.highlightAuto}var ap=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)op.call(n,r)&&(e[r]=n[r])}return e},op=Object.prototype.hasOwnProperty;var ip=lp,sp=lp.prototype;function lp(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}sp.space=null,sp.normal={},sp.property={};var cp=ap,up=ip,dp=function(e){var t,n,r=e.length,a=[],o=[],i=-1;for(;++i<r;)t=e[i],a.push(t.property),o.push(t.normal),n=t.space;return new up(cp.apply(null,a),cp.apply(null,o),n)};var pp=function(e){return e.toLowerCase()};var fp=mp,gp=mp.prototype;function mp(e,t){this.property=e,this.attribute=t}gp.space=null,gp.attribute=null,gp.property=null,gp.boolean=!1,gp.booleanish=!1,gp.overloadedBoolean=!1,gp.number=!1,gp.commaSeparated=!1,gp.spaceSeparated=!1,gp.commaOrSpaceSeparated=!1,gp.mustUseProperty=!1,gp.defined=!1;var hp={},bp=0;function yp(){return Math.pow(2,++bp)}hp.boolean=yp(),hp.booleanish=yp(),hp.overloadedBoolean=yp(),hp.number=yp(),hp.spaceSeparated=yp(),hp.commaSeparated=yp(),hp.commaOrSpaceSeparated=yp();var vp=fp,wp=hp,Sp=Ep;Ep.prototype=new vp,Ep.prototype.defined=!0;var xp=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],kp=xp.length;function Ep(e,t,n,r){var a,o=-1;for(Ap(this,"space",r),vp.call(this,e,t);++o<kp;)Ap(this,a=xp[o],(n&wp[a])===wp[a])}function Ap(e,t,n){n&&(e[t]=n)}var Tp=pp,Cp=ip,Op=Sp,Ip=function(e){var t,n,r=e.space,a=e.mustUseProperty||[],o=e.attributes||{},i=e.properties,s=e.transform,l={},c={};for(t in i)n=new Op(t,s(o,t),i[t],r),-1!==a.indexOf(t)&&(n.mustUseProperty=!0),l[t]=n,c[Tp(t)]=t,c[Tp(n.attribute)]=t;return new Cp(l,c,r)};var Rp=Ip({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Np=Ip({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});var _p=function(e,t){return t in e?e[t]:t};var Pp=_p,Lp=function(e,t){return Pp(e,t.toLowerCase())};var Dp=Ip({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Lp,properties:{xmlns:null,xmlnsXLink:null}}),Mp=hp,jp=Ip,Fp=Mp.booleanish,Bp=Mp.number,Up=Mp.spaceSeparated,zp=jp({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Fp,ariaAutoComplete:null,ariaBusy:Fp,ariaChecked:Fp,ariaColCount:Bp,ariaColIndex:Bp,ariaColSpan:Bp,ariaControls:Up,ariaCurrent:null,ariaDescribedBy:Up,ariaDetails:null,ariaDisabled:Fp,ariaDropEffect:Up,ariaErrorMessage:null,ariaExpanded:Fp,ariaFlowTo:Up,ariaGrabbed:Fp,ariaHasPopup:null,ariaHidden:Fp,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Up,ariaLevel:Bp,ariaLive:null,ariaModal:Fp,ariaMultiLine:Fp,ariaMultiSelectable:Fp,ariaOrientation:null,ariaOwns:Up,ariaPlaceholder:null,ariaPosInSet:Bp,ariaPressed:Fp,ariaReadOnly:Fp,ariaRelevant:null,ariaRequired:Fp,ariaRoleDescription:Up,ariaRowCount:Bp,ariaRowIndex:Bp,ariaRowSpan:Bp,ariaSelected:Fp,ariaSetSize:Bp,ariaSort:null,ariaValueMax:Bp,ariaValueMin:Bp,ariaValueNow:Bp,ariaValueText:null,role:null}});var $p=hp,qp=Ip,Gp=Lp,Hp=$p.boolean,Vp=$p.overloadedBoolean,Wp=$p.booleanish,Yp=$p.number,Kp=$p.spaceSeparated,Xp=$p.commaSeparated,Zp=dp([Np,Rp,Dp,zp,qp({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Gp,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xp,acceptCharset:Kp,accessKey:Kp,action:null,allow:null,allowFullScreen:Hp,allowPaymentRequest:Hp,allowUserMedia:Hp,alt:null,as:null,async:Hp,autoCapitalize:null,autoComplete:Kp,autoFocus:Hp,autoPlay:Hp,capture:Hp,charSet:null,checked:Hp,cite:null,className:Kp,cols:Yp,colSpan:null,content:null,contentEditable:Wp,controls:Hp,controlsList:Kp,coords:Yp|Xp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Hp,defer:Hp,dir:null,dirName:null,disabled:Hp,download:Vp,draggable:Wp,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Hp,formTarget:null,headers:Kp,height:Yp,hidden:Hp,high:Yp,href:null,hrefLang:null,htmlFor:Kp,httpEquiv:Kp,id:null,imageSizes:null,imageSrcSet:Xp,inputMode:null,integrity:null,is:null,isMap:Hp,itemId:null,itemProp:Kp,itemRef:Kp,itemScope:Hp,itemType:Kp,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Hp,low:Yp,manifest:null,max:null,maxLength:Yp,media:null,method:null,min:null,minLength:Yp,multiple:Hp,muted:Hp,name:null,nonce:null,noModule:Hp,noValidate:Hp,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu: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,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:Hp,optimum:Yp,pattern:null,ping:Kp,placeholder:null,playsInline:Hp,poster:null,preload:null,readOnly:Hp,referrerPolicy:null,rel:Kp,required:Hp,reversed:Hp,rows:Yp,rowSpan:Yp,sandbox:Kp,scope:null,scoped:Hp,seamless:Hp,selected:Hp,shape:null,size:Yp,sizes:null,slot:null,span:Yp,spellCheck:Wp,src:null,srcDoc:null,srcLang:null,srcSet:Xp,start:Yp,step:null,style:null,tabIndex:Yp,target:null,title:null,translate:null,type:null,typeMustMatch:Hp,useMap:null,value:Wp,width:Yp,wrap:null,align:null,aLink:null,archive:Kp,axis:null,background:null,bgColor:null,border:Yp,borderColor:null,bottomMargin:Yp,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Hp,declare:Hp,event:null,face:null,frame:null,frameBorder:null,hSpace:Yp,leftMargin:Yp,link:null,longDesc:null,lowSrc:null,marginHeight:Yp,marginWidth:Yp,noResize:Hp,noHref:Hp,noShade:Hp,noWrap:Hp,object:null,profile:null,prompt:null,rev:null,rightMargin:Yp,rules:null,scheme:null,scrolling:Wp,standby:null,summary:null,text:null,topMargin:Yp,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Yp,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Hp,disableRemotePlayback:Hp,prefix:null,property:null,results:Yp,security:null,unselectable:null}})]),Qp=pp,Jp=Sp,ef=fp,tf="data",nf=function(e,t){var n=Qp(t),r=t,a=ef;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===tf&&rf.test(t)&&("-"===t.charAt(4)?r=function(e){var t=e.slice(5).replace(af,lf);return tf+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(af.test(t))return e;t=t.replace(of,sf),"-"!==t.charAt(0)&&(t="-"+t);return tf+t}(t),a=Jp);return new a(r,t)},rf=/^data[-\w.:]+$/i,af=/-[a-z]/g,of=/[A-Z]/g;function sf(e){return"-"+e.toLowerCase()}function lf(e){return e.charAt(1).toUpperCase()}var cf=function(e,t){var n,r,a,o=e||"",i=t||"div",s={},l=0;for(;l<o.length;)uf.lastIndex=l,a=uf.exec(o),(n=o.slice(l,a?a.index:o.length))&&(r?"#"===r?s.id=n:s.className?s.className.push(n):s.className=[n]:i=n,l+=n.length),a&&(r=a[0],l++);return{type:"element",tagName:i,properties:s,children:[]}},uf=/[#.]/g;var df={parse:function(e){var t=String(e||pf).trim();return t===pf?[]:t.split(gf)},stringify:function(e){return e.join(ff).trim()}},pf="",ff=" ",gf=/[ \t\n\r\f]+/g;var mf={parse:function(e){var t,n=[],r=String(e||yf),a=r.indexOf(hf),o=0,i=!1;for(;!i;)-1===a&&(a=r.length,i=!0),!(t=r.slice(o,a).trim())&&i||n.push(t),o=a+1,a=r.indexOf(hf,o);return n},stringify:function(e,t){var n=t||{},r=!1===n.padLeft?yf:bf,a=n.padRight?bf:yf;e[e.length-1]===yf&&(e=e.concat(yf));return e.join(a+hf+r).trim()}},hf=",",bf=" ",yf="";var vf=nf,wf=pp,Sf=cf,xf=df.parse,kf=mf.parse,Ef=function(e,t,n){var r=n?function(e){var t,n=e.length,r=-1,a={};for(;++r<n;)a[(t=e[r]).toLowerCase()]=t;return a}(n):null;return function(e,n){var o,i=Sf(e,t),s=Array.prototype.slice.call(arguments,2),l=i.tagName.toLowerCase();i.tagName=r&&Af.call(r,l)?r[l]:l,n&&function(e,t){return"string"==typeof e||"length"in e||function(e,t){var n=t.type;if("input"===e||!n||"string"!=typeof n)return!1;if("object"==typeof t.children&&"length"in t.children)return!0;if(n=n.toLowerCase(),"button"===e)return"menu"!==n&&"submit"!==n&&"reset"!==n&&"button"!==n;return"value"in t}(t.tagName,e)}(n,i)&&(s.unshift(n),n=null);if(n)for(o in n)a(i.properties,o,n[o]);Tf(i.children,s),"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]);return i};function a(t,n,r){var a,o,i;null!=r&&r==r&&(o=(a=vf(e,n)).property,"string"==typeof(i=r)&&(a.spaceSeparated?i=xf(i):a.commaSeparated?i=kf(i):a.commaOrSpaceSeparated&&(i=xf(kf(i).join(" ")))),"style"===o&&"string"!=typeof r&&(i=function(e){var t,n=[];for(t in e)n.push([t,e[t]].join(": "));return n.join("; ")}(i)),"className"===o&&t.className&&(i=t.className.concat(i)),t[o]=function(e,t,n){var r,a,o;if("object"!=typeof n||!("length"in n))return Cf(e,t,n);a=n.length,r=-1,o=[];for(;++r<a;)o[r]=Cf(e,t,n[r]);return o}(a,o,i))}},Af={}.hasOwnProperty;function Tf(e,t){var n,r;if("string"!=typeof t&&"number"!=typeof t)if("object"==typeof t&&"length"in t)for(n=-1,r=t.length;++n<r;)Tf(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");e.push(t)}else e.push({type:"text",value:String(t)})}function Cf(e,t,n){var r=n;return e.number||e.positiveNumber?isNaN(r)||""===r||(r=Number(r)):(e.boolean||e.overloadedBoolean)&&("string"!=typeof r||""!==r&&wf(n)!==wf(t)||(r=!0)),r}var Of=Ef(Zp,"div");Of.displayName="html";var If=Of,Rf=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57};var Nf=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var _f=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var Pf=_f,Lf=Rf;var Df={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},Mf=function(e){return!!jf.call(Df,e)&&Df[e]},jf={}.hasOwnProperty;var Ff={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},Bf={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},Uf=Rf,zf=Nf,$f=function(e){return Pf(e)||Lf(e)},qf=Mf,Gf=function(e,t){var n,r,a={};t||(t={});for(r in Yf)n=t[r],a[r]=null==n?Yf[r]:n;(a.position.indent||a.position.start)&&(a.indent=a.position.indent||[],a.position=a.position.start);return function(e,t){var n,r,a,o,i,s,l,c,u,d,p,f,g,m,h,b,y,v,w,S=t.additional,x=t.nonTerminated,k=t.text,E=t.reference,A=t.warning,T=t.textContext,C=t.referenceContext,O=t.warningContext,I=t.position,R=t.indent||[],N=e.length,_=0,P=-1,L=I.column||1,D=I.line||1,M="",j=[];"string"==typeof S&&(S=S.charCodeAt(0));b=F(),c=A?B:Wf,_--,N++;for(;++_<N;)if(i===Xf&&(L=R[P]||1),(i=e.charCodeAt(_))===Jf){if((l=e.charCodeAt(_+1))===Kf||l===Xf||l===Zf||l===Qf||l===Jf||l===tg||l!=l||S&&l===S){M+=Vf(i),L++;continue}for(f=g=_+1,w=g,l===rg?(w=++f,(l=e.charCodeAt(w))===ag||l===og?(m=lg,w=++f):m=cg):m=sg,n="",p="",o="",h=dg[m],w--;++w<N&&h(l=e.charCodeAt(w));)o+=Vf(l),m===sg&&Hf.call(Ff,o)&&(n=o,p=Ff[o]);(a=e.charCodeAt(w)===eg)&&(w++,(r=m===sg&&qf(o))&&(n=o,p=r)),v=1+w-g,(a||x)&&(o?m===sg?(a&&!p?c(hg,1):(n!==o&&(v=1+(w=f+n.length)-f,a=!1),a||(u=n?pg:gg,t.attribute?(l=e.charCodeAt(w))===ng?(c(u,v),p=null):$f(l)?p=null:c(u,v):c(u,v))),s=p):(a||c(fg,v),wg(s=parseInt(o,ug[m]))?(c(yg,v),s=Vf(ig)):s in Bf?(c(bg,v),s=Bf[s]):(d="",Sg(s)&&c(bg,v),s>65535&&(d+=Vf((s-=65536)>>>10|55296),s=56320|1023&s),s=d+Vf(s))):m!==sg&&c(mg,v)),s?(U(),b=F(),_=w-1,L+=w-g+1,j.push(s),(y=F()).offset++,E&&E.call(C,s,{start:b,end:y},e.slice(g-1,w)),b=y):(o=e.slice(g-1,w),M+=o,L+=o.length,_=w-1)}else 10===i&&(D++,P++,L=0),i==i?(M+=Vf(i),L++):U();return j.join("");function F(){return{line:D,column:L,offset:_+(I.offset||0)}}function B(e,t){var n=F();n.column+=t,n.offset+=t,A.call(O,vg[e],n,e)}function U(){M&&(j.push(M),k&&k.call(T,M,{start:b,end:F()}),M="")}}(e,a)},Hf={}.hasOwnProperty,Vf=String.fromCharCode,Wf=Function.prototype,Yf={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Kf=9,Xf=10,Zf=12,Qf=32,Jf=38,eg=59,tg=60,ng=61,rg=35,ag=88,og=120,ig=65533,sg="named",lg="hexadecimal",cg="decimal",ug={};ug[lg]=16,ug[cg]=10;var dg={};dg[sg]=$f,dg[cg]=Uf,dg[lg]=zf;var pg=1,fg=2,gg=3,mg=4,hg=5,bg=6,yg=7,vg={};function wg(e){return e>=55296&&e<=57343||e>1114111}function Sg(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}vg[pg]="Named character references must be terminated by a semicolon",vg[fg]="Numeric character references must be terminated by a semicolon",vg[gg]="Named character references cannot be empty",vg[mg]="Numeric character references cannot be empty",vg[hg]="Named character references must be known",vg[bg]="Numeric character references cannot be disallowed",vg[yg]="Numeric character references cannot be outside the permissible Unicode range";var xg={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},a.util.type(t)){case"Object":if(o=a.util.objId(t),n[o])return n[o];for(var i in r={},n[o]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return o=a.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach(function(t,a){r[a]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=a.util.clone(a.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||a.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=r[e];return r[e]=i,a.languages.DFS(a.languages,function(t,n){n===c&&t!=e&&(this[t]=i)}),i},DFS:function e(t,n,r,o){o=o||{};var i=a.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=a.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlightAll:function(e,t){a.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),a.hooks.run("before-all-elements-highlight",r);for(var o,i=0;o=r.elements[i++];)a.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,n,r){var o=a.util.getLanguage(t),i=a.languages[o];a.util.setLanguage(t,o);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&a.util.setLanguage(s,o);var l={element:t,language:o,grammar:i,code:t.textContent};function c(e){l.highlightedCode=e,a.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,a.hooks.run("after-highlight",l),a.hooks.run("complete",l),r&&r.call(l.element)}if(a.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return a.hooks.run("complete",l),void(r&&r.call(l.element));if(a.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(a.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(a.highlight(l.code,l.grammar,l.language));else c(a.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(a.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=a.tokenize(r.code,r.grammar),a.hooks.run("after-tokenize",r),o.stringify(a.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new l;return c(a,a.head,e),s(e,a,t,a.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function s(e,t,n,r,l,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var g=0;g<f.length;++g){if(d&&d.cause==p+","+g)return;var m=f[g],h=m.inside,b=!!m.lookbehind,y=!!m.greedy,v=m.alias;if(y&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var S=m.pattern||m,x=r.next,k=l;x!==t.tail&&!(d&&k>=d.reach);k+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof o)){var A,T=1;if(y){if(!(A=i(S,k,e,b))||A.index>=e.length)break;var C=A.index,O=A.index+A[0].length,I=k;for(I+=x.value.length;C>=I;)I+=(x=x.next).value.length;if(k=I-=x.value.length,x.value instanceof o)continue;for(var R=x;R!==t.tail&&(I<O||"string"==typeof R.value);R=R.next)T++,I+=R.value.length;T--,E=e.slice(k,I),A.index-=k}else if(!(A=i(S,0,E,b)))continue;C=A.index;var N=A[0],_=E.slice(0,C),P=E.slice(C+N.length),L=k+E.length;d&&L>d.reach&&(d.reach=L);var D=x.prev;if(_&&(D=c(t,D,_),k+=_.length),u(t,D,T),x=c(t,D,new o(p,h?a.tokenize(N,h):N,v,N)),P&&c(t,x,P),T>1){var M={cause:p+","+g,reach:L};s(e,t,n,x.prev,k,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}if(e.Prism=a,o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),a.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,i=n.immediateClose;e.postMessage(a.highlight(o,a.languages[r],r)),i&&e.close()},!1),a):a;var d=a.util.currentScript();function p(){a.manual||a.highlightAll()}if(d&&(a.filename=d.src,d.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return a}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
20
|
+
*/let bt=null;function yt(t){e.useEffect(()=>{if(!ft||!t)return;const e=t.split(",")[0]?.trim();if(!e||ht.has(e))return;if((e=>{const t=e.trim().toLowerCase();return!t||!!gt.has(t)||mt.some(e=>t.includes(e))})(e))return void ht.add(e);let n=!0;return(async()=>{try{bt||(bt=Promise.resolve().then(function(){return qa}));const t=await bt,r=t&&"default"in t?t.default:t,a=(e=>e.trim().replace(/\s+/g,"+"))(e);r.load({google:{families:[`${a}:300,400,500,600,700`]},fontactive:e=>{n&&ht.add(e)},fontinactive:e=>{n&&ht.add(e),console.warn(`Warning: failed to load Google Font: ${e}`)}})}catch(e){console.error("Warning: WebFont loader error:",e)}})(),()=>{n=!1}},[t])}function vt(e){return"string"==typeof e&&/^https?:\/\//i.test(e)?e:void 0}const wt=/(?:eshal-ui|eshal-chart|chart)\b/;const St=["card","confirmation","alert"];function xt(e){return"string"==typeof e?e.trim():"number"==typeof e&&isFinite(e)?String(e):""}function kt(e){if(!e||"object"!=typeof e)return"";const t=xt(e.value);if(!t)return"";const n=xt(e.label);return n?n+": "+t:t}function Et(e){let t;try{t=JSON.parse(e)}catch(e){return""}if(!t||"object"!=typeof t||Array.isArray(t))return"";const n=function(e){return String(e||"").trim().toLowerCase().replace(/_/g,"-")}(t.type);if(St.indexOf(n)<0)return"";const r=[],a=xt(t.title),o=xt(t.body);if(a&&r.push(a),o&&r.push(o),"card"===n&&Array.isArray(t.fields))for(let e=0;e<t.fields.length;e++){const n=kt(t.fields[e]);n&&r.push(n)}return r.join("\n")}function At(e){return e&&wt.test(e)?e.replace(/```[ \t]*(?:eshal-ui|eshal-chart|chart)\b[ \t]*\r?\n([\s\S]*?)```/g,function(e,t){return Et(t)}).replace(/\n{3,}/g,"\n\n").trim():e}const Tt="__eshalChatWidgetCitationContext",Ct="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0,Ot=Ct?Ct[Tt]||(Ct[Tt]=e.createContext(null)):e.createContext(null);function It(e){return!!e&&(function(e){return!!e&&String(e.source_id||e.sourceid||"").startsWith("attachment:")}(e)?"string"==typeof e.url&&e.url.length>0:!("string"!=typeof(t=e.url)||!t.includes("/api/v1/sharepoint/file/"))||Boolean(e.source_id));var t}function Rt(e,t){return"string"!=typeof e||""===e?"":/^https?:\/\//i.test(e)?e:t?`${String(t).replace(/\/$/,"")}${e.startsWith("/")?"":"/"}${e}`:e}function Nt(e){if(!/%[0-9a-f]{2}/i.test(e))return e;try{return decodeURIComponent(e)}catch{return e}}function _t(e){if(!e)return null;const t=/(?:^|;)\s*filename\*\s*=\s*([^;]+)/i.exec(e);if(t){const e=/^\s*"?([^']*)'[^']*'([^"]*)"?\s*$/.exec(t[1]),n=e?function(e,t){try{return/^utf-8$/i.test(e)?decodeURIComponent(t):t.replace(/%([0-9a-f]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))}catch{return null}}(e[1],e[2]):null;if(n)return n}const n=/(?:^|;)\s*filename\s*=\s*"((?:[^"\\]|\\.)*)"/i.exec(e);if(n)return Nt(n[1].replace(/\\(.)/g,"$1"))||null;const r=/(?:^|;)\s*filename\s*=\s*([^;]+)/i.exec(e);return r&&Nt(r[1].trim())||null}function Pt(){return Promise.resolve().then(function(){return o5})}const Lt=e.lazy(Pt);class Dt extends e.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error("[widget] markdown chunk failed to load, showing plain text:",e)}render(){return this.state.failed?this.props.fallback:this.props.children}}const Mt=/(```|`[^`]+`|(^|\n)\s{0,3}#{1,6}\s|(^|\n)\s*[-*+]\s|(^|\n)\s*\d+\.\s|(^|\n)\s*>\s|\[[^\]]*\]\([^)]*\)|\*\*|__|~~|(^|\n)\s*\||\[\d+\])/;const jt=({content:e,isDark:t,textColor:r,fontFamily:a,fontSize:o})=>n.jsx("p",{className:"leading-relaxed [&:first-child]:!mt-0 whitespace-pre-wrap break-words",style:{color:r||(t?"#f3f4f6":"#1A1A1A"),fontFamily:a||"Inter",fontSize:o||"14px",margin:0,lineHeight:"1.6",padding:0,overflowWrap:"break-word"},children:e}),Ft=({content:t,isStreaming:r,isDark:a=!1,isRtl:o=!1,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u=!0})=>{const[d,p]=e.useState(""),[f,g]=e.useState(!1),m=e.useRef(t),h=e.useRef(0),b=e.useRef(null),y=e.useRef(0);e.useEffect(()=>{if(t!==m.current){if(m.current=t,h.current>=t.length)return p(t),void g(!1);t.length<d.length&&(h.current=0,p(""))}if(!r)return p(t),g(!1),void(b.current&&cancelAnimationFrame(b.current));g(!0);const e=n=>{if(n-y.current<16)b.current=requestAnimationFrame(e);else if(y.current=n,h.current<t.length){const n=Math.max(2,Math.floor(4*Math.random())),r=Math.min(h.current+n,t.length);p(t.slice(0,r)),h.current=r,b.current=requestAnimationFrame(e)}else g(!1)};return b.current=requestAnimationFrame(e),()=>{b.current&&cancelAnimationFrame(b.current)}},[t,r]);const v=function(e){return"string"==typeof e&&0!==e.length&&Mt.test(e)}(d);return n.jsxs("div",{className:"relative",dir:"auto",style:{textAlign:o?"right":"left",color:i||(a?"#f3f4f6":"#1A1A1A"),fontFamily:s||"Inter",fontSize:l||"14px",margin:0,padding:0},children:[v?n.jsx(Dt,{fallback:n.jsx(jt,{content:d,isDark:a,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(e.Suspense,{fallback:n.jsx(jt,{content:d,isDark:a,textColor:i,fontFamily:s,fontSize:l}),children:n.jsx(Lt,{content:d,isStreaming:r,isDark:a,isRtl:o,textColor:i,fontFamily:s,fontSize:l,onButtonClick:c,provideCitations:u})})}):n.jsx(jt,{content:d,isDark:a,textColor:i,fontFamily:s,fontSize:l}),f&&n.jsx("span",{className:"inline-block w-1.5 h-4 bg-blue-500 ms-0.5 animate-pulse align-text-bottom",style:{animationDuration:"0.8s"}})]})},Bt=({isDark:e,t:t})=>n.jsxs("div",{className:"flex gap-1.5",role:"status","aria-label":t("agentIsTyping"),children:[n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"0ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"150ms"},"aria-hidden":"true"}),n.jsx("div",{className:`w-2 h-2 rounded-full ${e?"bg-gray-500":"bg-gray-400"} animate-bounce`,style:{animationDelay:"300ms"},"aria-hidden":"true"})]}),Ut=({question:e,options:t,onDecision:r,disabled:a,isDark:o=!1})=>n.jsxs("div",{className:"mt-3 p-3 rounded-lg border "+(o?"bg-blue-900/30 border-blue-700/50":"bg-blue-50 border-blue-200"),children:[n.jsx("p",{className:"text-sm font-medium mb-2 "+(o?"text-gray-100":"text-gray-900"),children:e}),n.jsx("div",{className:"space-y-2",children:t.map(e=>n.jsx("button",{onClick:()=>r(e.id,e.label),disabled:a,className:"w-full text-left px-3 py-2 text-sm rounded transition-all "+(o?"bg-gray-800 border border-gray-700 hover:bg-blue-900/50 hover:border-blue-600 disabled:opacity-50 disabled:cursor-not-allowed":"bg-white border border-gray-300 hover:bg-blue-50 hover:border-blue-400 disabled:opacity-50 disabled:cursor-not-allowed"),children:e.label},e.id))})]});function zt({content:t,isDark:r,t:a}){const o=a?a("copyMessage"):"Copy message",i=a?a("copied"):"Copied",[s,l]=e.useState(!1),c=e.useCallback(()=>{t&&(navigator.clipboard?.writeText(t).catch(()=>{}),l(!0),setTimeout(()=>l(!1),1500))},[t]);return n.jsx("button",{type:"button",onClick:c,className:"p-0.5 rounded transition-colors "+(r?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":s?i:o,title:s?i:o,children:s?n.jsx(qe,{className:"w-3 h-3 text-green-500"}):n.jsx(Ye,{className:"w-3 h-3"})})}const $t=({message:t,formatTime:r,isDark:a,primaryColor:o,agentMessageBubbleColor:i,resolvedAgentBubbleColor:s,textColor:l,assistantTextColor:c,fontFamily:u,agentMessageBubbleFontFamily:d,agentMessageBubbleFontSize:p,fontSize:f,isRtl:g,onDecision:m,companyLogo:h,conciergeName:b,companyName:y,apiBaseUrl:v,getAuthToken:w,onPromptSuggestionClick:S,allowFeedback:x=!0,provideCitations:k=!0,onFeedback:E,headerTextColor:A,t:T})=>{const C="string"==typeof t.content?t.content:"",O=e.useMemo(()=>At(C),[C]),I=t.isProcessing&&(!C||0===C.length),R=Y(C,g),[N,_]=e.useState(()=>t?.feedback??null),[P,L]=e.useState(!1),[D,M]=e.useState(null),[j,F]=e.useState(""),B=e.useRef(null),U=e.useCallback(e=>{if(E&&C){if(N===e)return _(null),L(!1),M(null),F(""),void E(C,null);if("like"===e)return _("like"),L(!1),M(null),F(""),void E(C,"like");_(null),M("dislike"),L(!0),F(""),setTimeout(()=>B.current?.focus(),100)}},[N,E,C]),z=e.useCallback(()=>{E&&C&&D&&(_(D),E(C,D,j.trim()||void 0),L(!1),F(""),M(null))},[E,C,D,j]),$=e.useCallback(()=>{L(!1),F(""),M(null)},[]),q=!0===t?.isError,G=q?a?"rgba(239,68,68,0.15)":"#fee2e2":null!=s?s:null!=i?i:a?"#1f2937":"#FFFFFF",H=null!=i&&"#ffffff"!==i&&"#FFFFFF"!==i&&"#1f2937"!==i,V=q?a?"#fca5a5":"#991b1b":null!=c?c:null!=l?l:a?"#f3f4f6":"#1A1A1A",W=null!=d?d:null!=u?u:"Inter",K=null!=p?p:null!=f?f:"14px";yt(W);const{onSourceActivate:X,downloadingKey:Z}=function({apiBaseUrl:t,getAuthToken:n}){const[r,a]=e.useState(null),o=e.useCallback(async e=>{if(!e)return;const r=e.url||e.source_id||e.sourceid||e.source_name||"",o=String(e.source_id||e.sourceid||"").startsWith("attachment:"),i="string"==typeof e.url&&e.url.includes("/api/v1/sharepoint/file/"),s="file"===e.source_type||i||o||!(!e.source_id&&!e.sourceid)&&!e.url;if(!s){const t=vt(e.url);if(t)try{window.open(t,"_blank","noopener,noreferrer")}catch{}return}if(t||o){a(r),console.debug("[widget] citation download starting:",{source_id:e.source_id||e.sourceid,source_name:e.source_name,source_type:e.source_type,isAttachment:o,isSharePointProxy:i,isFileLike:s});try{let r;if(o){if(!e.url)throw new Error("attachment has no URL");const a={};if("function"==typeof n){const e=await n();e&&(a.Authorization=`Bearer ${e}`)}r=await fetch(Rt(e.url,t),{method:"GET",headers:a,credentials:"include"})}else if(i){const a=Rt(e.url,t),o={};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}r=await fetch(a,{method:"GET",headers:o,credentials:"include"})}else{const a=`${t.replace(/\/$/,"")}/api/v1/support/file-download`,o={"Content-Type":"application/json"};if("function"==typeof n){const e=await n();e&&(o.Authorization=`Bearer ${e}`)}r=await fetch(a,{method:"POST",headers:o,credentials:"include",body:JSON.stringify({source_id:e.source_id||e.sourceid,file_name:e.url||"",source_name:e.source_name||""})})}if(!r.ok){const e=await r.json().catch(()=>({}));throw new Error(e.details||e.error||r.statusText)}const a=await r.blob(),s=r.headers.get("content-disposition");let l=e.source_name||"download";o||(l=_t(s)||l);const c=document.createElement("a"),u=URL.createObjectURL(a);c.href=u,c.download=l,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(u)}catch(e){console.error("[widget] source download failed:",e)}finally{a(null)}}else console.warn("[widget] citation download skipped: apiBaseUrl missing and source is not an attachment (no fallback URL to fetch). Source:",e)},[t,n]);return{onSourceActivate:o,downloadingKey:r}}({apiBaseUrl:v,getAuthToken:w}),Q=e.useMemo(()=>({sources:t.sources||[],sourcesPreliminary:!!t.sourcesPreliminary,onSourceActivate:X,downloadingKey:Z,textColor:V,t:T}),[t.sources,t.sourcesPreliminary,X,Z,V,T]);return n.jsx(Ot.Provider,{value:Q,children:n.jsxs("div",{className:"flex gap-3 flex-row animate-in min-w-0",children:[n.jsx("div",{className:"flex-shrink-0 mt-1",children:n.jsx("div",{className:"w-8 h-8 rounded-full overflow-hidden flex items-center justify-center",style:{backgroundColor:o||"#2563eb"},children:h?n.jsx("div",{className:"w-full h-full bg-white/10 flex items-center justify-center",children:n.jsx("img",{src:h,alt:b||y||"Assistant avatar",className:"object-contain rounded-full",style:{width:"100%",height:"100%"}})}):n.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{fontSize:"18px",fontFamily:u||"Inter",color:A||"#FFFFFF"},children:(b||"A").charAt(0).toUpperCase()})})}),n.jsxs("div",{className:"flex flex-col items-start min-w-0 max-w-[75%]",children:[n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-sm border rounded-tl-sm rtl:rounded-tl-2xl rtl:rounded-tr-sm min-w-0 max-w-full overflow-hidden "+(H?"border-transparent":a?"border-gray-700":"border-gray-200"),style:{backgroundColor:G,color:V,fontFamily:W,fontSize:K,direction:R?"rtl":"ltr",textAlign:R?"right":"left",...H?{borderColor:`${G}33`}:{}},children:I?n.jsx(Bt,{isDark:a,t:T}):n.jsx(n.Fragment,{children:t.requiresDecision&&t.decisionData&&m?n.jsxs("div",{children:[C&&n.jsx("div",{className:"mb-3",children:n.jsx(Ft,{content:C,isStreaming:t.isProcessing,isDark:a,isRtl:R,textColor:V,fontFamily:W,fontSize:K,onButtonClick:S,provideCitations:k})}),n.jsx(Ut,{question:t.decisionData.question,options:t.decisionData.options,onDecision:(e,n)=>m(t.decisionData.decisionId,e,n),disabled:!!t.decisionResponse,isDark:a}),t.decisionResponse&&n.jsxs("div",{className:"mt-2 text-xs "+(a?"text-gray-400":"text-gray-500"),children:["Selected: ",t.decisionResponse.selectedOption]})]}):C?n.jsx(n.Fragment,{children:n.jsx(Ft,{content:C,isStreaming:t.isProcessing,isDark:a,isRtl:R,textColor:V,fontFamily:W,fontSize:K,onButtonClick:S,provideCitations:k})}):null})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(a?"text-gray-400":"text-gray-500"),dir:"auto",children:r(t.timestamp)}),!I&&!t.isProcessing&&O&&n.jsx(zt,{content:O,isDark:a,t:T}),!1!==x&&E&&!I&&!t.isProcessing&&C&&"welcome"!==t.type&&!t.isWelcome&&n.jsxs("div",{className:"flex items-center gap-0.5 ms-0.5",children:[n.jsx("button",{type:"button",onClick:()=>U("like"),className:"p-0.5 rounded transition-colors "+("like"===N||"like"===D?"text-green-500":a?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":T("like"),"aria-pressed":"like"===N,children:n.jsx(ut,{className:"w-3 h-3"})}),n.jsx("button",{type:"button",onClick:()=>U("dislike"),className:"p-0.5 rounded transition-colors "+("dislike"===N||"dislike"===D?"text-red-500":a?"text-gray-500 hover:text-gray-300":"text-gray-400 hover:text-gray-600"),style:{border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",cursor:"pointer"},"aria-label":T("dislike"),"aria-pressed":"dislike"===N,children:n.jsx(ct,{className:"w-3 h-3"})})]})]}),P&&"dislike"===D&&n.jsxs("div",{className:"mt-2 w-full rounded-xl border p-3 shadow "+(a?"bg-gray-800 border-gray-700":"bg-white border-gray-200"),style:{direction:g?"rtl":"ltr"},children:[n.jsx("textarea",{ref:B,value:j,onChange:e=>F(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key?(e.preventDefault(),z()):"Escape"===e.key&&(e.preventDefault(),$())},placeholder:T("feedbackPlaceholder"),"aria-label":T("feedbackPlaceholder"),rows:2,className:"w-full resize-none rounded-lg border px-2 py-1.5 text-xs focus:outline-none focus:ring-1 "+(a?"bg-gray-900 border-gray-700 text-gray-100 placeholder-gray-500 focus:ring-gray-600":"bg-white border-gray-200 text-gray-900 placeholder-gray-400 focus:ring-gray-300"),style:{fontFamily:W,textAlign:g?"right":"left"}}),n.jsxs("div",{className:"flex items-center justify-end gap-1.5 mt-1.5",children:[n.jsx("button",{type:"button",onClick:$,className:"text-xs px-2 py-1 rounded transition-colors "+(a?"text-gray-400 hover:text-gray-200":"text-gray-500 hover:text-gray-700"),style:{border:"none",background:"transparent",cursor:"pointer"},children:T("cancel")}),n.jsx("button",{type:"button",onClick:z,className:"text-xs px-2.5 py-1 rounded text-white transition-opacity hover:opacity-90",style:{backgroundColor:o||"#2563eb",border:"none",cursor:"pointer"},children:T("submit")})]})]})]})]})})},qt=({message:e,formatTime:t,userMessageBoxColor:r,primaryColor:a,resolvedUserMessageColor:o,textColor:i,userTextColor:s,fontFamily:l,userMessageBubbleFontFamily:c,userMessageBubbleFontSize:u,fontSize:d,isDark:p,isRtl:f,t:g,onRetryMessage:m})=>{const h=null!=o?o:null!=r?r:null!=a?a:"#2563eb",b=null!=s?s:null!=i?i:"#FFFFFF",y=null!=c?c:null!=l?l:"Inter",v=null!=u?u:null!=d?d:"14px",w=Y("string"==typeof e?.content?e.content:"",f);yt(y);const S=Array.isArray(e.attachments)?e.attachments:[];return n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsxs("div",{className:"flex flex-col items-end max-w-[75%]",children:[S.length>0&&n.jsx("div",{className:"mb-1.5 flex flex-wrap justify-end gap-1.5",children:S.map((e,t)=>String(e.mimeType||"").startsWith("image/")&&e.url?n.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"block rounded-md overflow-hidden",style:{maxWidth:160},title:e.filename,children:n.jsx("img",{src:e.url,alt:e.filename||"attachment",style:{maxWidth:160,maxHeight:160,display:"block"}})},e.storageKey||t):n.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 text-xs",style:{backgroundColor:p?"#1f2937":"#f3f4f6",color:p?"#e5e7eb":"#374151",border:"1px solid "+(p?"#374151":"#e5e7eb"),maxWidth:200},title:e.filename,children:[n.jsx(Qe,{size:12}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename})]},e.storageKey||t))}),e.content&&""!==e.content.trim()&&n.jsx("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg "+(w?"rounded-tl-sm":"rounded-tr-sm"),dir:"auto",style:{background:`linear-gradient(135deg, ${h} 0%, ${h}dd 100%)`,fontFamily:y,direction:w?"rtl":"ltr",textAlign:w?"right":"left"},children:n.jsx("p",{className:"whitespace-pre-wrap break-words",dir:"auto",style:{color:b,fontFamily:y,fontSize:v,lineHeight:"1.5",textAlign:w?"right":"left",overflowWrap:"break-word",margin:0,padding:0},children:e.content})}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-1.5 px-1",children:[n.jsx("p",{className:"text-xs leading-none "+(p?"text-gray-400":"text-gray-500"),dir:"auto",children:t(e.timestamp)}),e.content&&""!==e.content.trim()&&n.jsx(zt,{content:e.content,isDark:p,t:g})]}),"failed"===e.status&&n.jsxs("div",{className:"flex items-center gap-1.5 mt-1 px-1","data-testid":"message-failed-state",children:[n.jsx("span",{className:"text-xs leading-none",style:{color:"#dc2626"},dir:"auto",children:g("messageNotDelivered")}),"function"==typeof m&&n.jsx("button",{type:"button",onClick:()=>m(e),className:"text-xs leading-none font-medium underline",style:{color:"#dc2626"},dir:"auto",children:g("retrySend")})]})]})})},Gt=({message:t,isDark:r,primaryColor:a,agentMessageBubbleColor:o,userMessageBoxColor:i,resolvedUserMessageColor:s,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,userTextColor:d,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,formatTime:y,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:k,apiBaseUrl:E,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:C,provideCitations:O,onFeedback:I,headerTextColor:R,onRetryMessage:N,defaultLanguage:_="en"})=>{const P=e.useMemo(()=>Z(_),[_]);return t?"user"===t.role?n.jsx(qt,{message:t,formatTime:y,userMessageBoxColor:i,primaryColor:a,resolvedUserMessageColor:s,textColor:c,userTextColor:d,fontFamily:p,userMessageBubbleFontFamily:m,userMessageBubbleFontSize:h,fontSize:b,isDark:r,isRtl:v,t:P,onRetryMessage:N}):n.jsx($t,{message:t,formatTime:y,isDark:r,primaryColor:a,agentMessageBubbleColor:o,resolvedAgentBubbleColor:l,textColor:c,assistantTextColor:u,fontFamily:p,agentMessageBubbleFontFamily:f,agentMessageBubbleFontSize:g,fontSize:b,isRtl:v,onDecision:w,companyLogo:S,conciergeName:x,companyName:k,apiBaseUrl:E,getAuthToken:A,onPromptSuggestionClick:T,allowFeedback:C,provideCitations:O,onFeedback:I,headerTextColor:R,t:P}):null};var Ht=e.memo(Gt);const Vt=(e,t,n)=>Number.isNaN(e)?t:Math.min(Math.max(e,t),n),Wt=e=>{if(!e)return null;const t=(e=>e?.trim().toLowerCase()??"")(e),n=(e=>{const t=e.match(/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i);if(!t)return null;let n=t[1];3===n.length&&(n=n.split("").map(e=>`${e}${e}`).join(""));const r=parseInt(n.slice(0,2),16),a=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);return[r,a,o].some(e=>Number.isNaN(e))?null:{r:r,g:a,b:o}})(t);if(n)return n;const r=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})(?:\s*,\s*(\d*\.?\d+))?\s*\)$/i);return t?{r:Vt(Number.parseInt(t[1],10),0,255),g:Vt(Number.parseInt(t[2],10),0,255),b:Vt(Number.parseInt(t[3],10),0,255)}:null})(t);return r||null},Yt=({r:e,g:t,b:n})=>{const r=e=>{const t=Vt(Math.round(e),0,255).toString(16);return 1===t.length?`0${t}`:t};return`#${r(e)}${r(t)}${r(n)}`},Kt=(e,t,n)=>{const r=Vt(n,0,1);return{r:Math.round(e.r+(t.r-e.r)*r),g:Math.round(e.g+(t.g-e.g)*r),b:Math.round(e.b+(t.b-e.b)*r)}},Xt=(e,t)=>{const n=Vt(t,0,1);return`rgba(${Vt(Math.round(e.r),0,255)}, ${Vt(Math.round(e.g),0,255)}, ${Vt(Math.round(e.b),0,255)}, ${n})`},Zt={background:"#f8fafc",hoverBackground:"#f1f5f9",border:"#e2e8f0",hoverBorder:"#cbd5f5",shadow:"0 4px 12px rgba(15, 23, 42, 0.08)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.14)"},Qt={background:"#1f2937",hoverBackground:"#27364a",border:"#334155",hoverBorder:"#3b4c63",shadow:"0 4px 12px rgba(15, 23, 42, 0.45)",hoverShadow:"0 6px 20px rgba(15, 23, 42, 0.55)"},Jt=(e,t)=>{const n=Wt(e);if(!n)return(e=>e?Qt:Zt)(t);const r=(({r:e,g:t,b:n})=>{const r=[e,t,n].map(e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return.2126*r[0]+.7152*r[1]+.0722*r[2]})(n),a=Wt("#0f172a")??{r:15,g:23,b:42},o=Wt(t?"#f8fafc":"#f9fafb")??{r:249,g:250,b:251},i=Wt(t?"#334155":"#e2e8f0")??{r:226,g:232,b:240};let s,l;if(r>=.6){const e=t?.5:.7,r=Math.min(1,e+.15);s=Kt(n,a,e),l=Kt(n,a,r)}else if(r<=.35){const e=t?.9:.8,r=Math.min(1,e+(t?.05:.12));s=Kt(n,o,e),l=Kt(n,o,r)}else{const e=t?.45:.6,r=Math.min(1,e+.1);s=Kt(n,i,e),l=Kt(n,i,r)}const c=Kt(n,s,.65),u=Kt(n,l,.7),d=`0 4px 12px ${Xt(n,t?.28:.12)}`,p=`0 6px 20px ${Xt(n,t?.35:.18)}`;return{background:Yt(s),hoverBackground:Yt(l),border:Yt(c),hoverBorder:Yt(u),shadow:d,hoverShadow:p}},en=({questions:t,isDark:r,palette:a,resolvedTextColor:o,fontFamily:i,fontSize:s,isRtl:l,onQuestionClick:c,applyHoverState:u,headingLabel:d,defaultLanguage:p})=>{const f=e.useRef(null),[g,m]=e.useState(!1),[h,b]=e.useState(!1),y=e.useCallback(()=>{const e=f.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;m(Math.abs(t)>1),b(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{y();const e=f.current;if(!e)return;const t=new ResizeObserver(y);return t.observe(e),()=>t.disconnect()},[y,t]);const v=e.useCallback(e=>{const t=f.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]),w=r?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.85)",S=r?"#e5e7eb":"#374151",x=r?"#4b5563":"#d1d5db";return n.jsxs("div",{className:"px-4 py-4 border-t "+(r?"border-gray-700/50":"border-gray-200/60"),children:[n.jsxs("div",{className:"text-xs mb-3 font-semibold tracking-wide uppercase "+(r?"text-gray-400":"text-gray-500"),children:[d||"Quick questions",":"]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:()=>v("left"),disabled:!g,"aria-label":X(p,"scrollLeft"),className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:w,border:`1px solid ${x}`,color:S,backdropFilter:"blur(4px)",opacity:g?1:.35,cursor:g?"pointer":"default"},children:n.jsx(Ge,{size:16})}),n.jsx("div",{ref:f,onScroll:y,className:"flex-1 flex gap-3 overflow-x-auto pb-2",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map((e,t)=>{const r=Y(e,l);return n.jsxs("button",{onClick:()=>c?.(e),className:"group relative text-sm px-5 py-2.5 rounded-full font-medium transition-all duration-300 hover:scale-105 active:scale-95 whitespace-nowrap flex-shrink-0 overflow-hidden backdrop-blur-sm "+(r?"text-right":"text-left"),style:{direction:r?"rtl":"ltr",backgroundColor:a.background,border:`1.5px solid ${a.border}`,boxShadow:a.shadow},onMouseEnter:e=>{u(e.currentTarget,!0),e.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:e=>{u(e.currentTarget,!1),e.currentTarget.style.transform="translateY(0)"},children:[n.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-white/0 via-white/5 to-white/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-xl"}),n.jsx("span",{className:"relative z-10",style:{direction:r?"rtl":"ltr",color:o,fontFamily:i,fontSize:s,textAlign:r?"right":"left"},children:e})]},t)})}),n.jsx("button",{onClick:()=>v("right"),disabled:!h,"aria-label":X(p,"scrollRight"),className:"flex-shrink-0 flex items-center justify-center w-7 h-7 rounded-full shadow-sm transition-all duration-200 hover:shadow-md active:scale-95",style:{backgroundColor:w,border:`1px solid ${x}`,color:S,backdropFilter:"blur(4px)",opacity:h?1:.35,cursor:h?"pointer":"default"},children:n.jsx(He,{size:16})})]})]})},tn=({questions:t=[],isDark:r=!1,primaryColor:a="#2563eb",onQuestionClick:o,isTyping:i=!1,layout:s="vertical",fontFamily:l="Inter",fontSize:c="14px",textColor:u,isRtl:d=!1,questionTextColor:p,questionBoxColor:f,resolvedUserMessageColor:g,userMessageBoxColor:m,userTextColor:h,headingLabel:b,defaultLanguage:y="en"})=>{if(!t.length||i)return null;const v=p??u??(r?"#f3f4f6":"#111827"),w=e.useMemo(()=>Jt(v,r),[v,r]),S=(e,t)=>{e.style.backgroundColor=t?w.hoverBackground:w.background,e.style.borderColor=t?w.hoverBorder:w.border,e.style.boxShadow=t?w.hoverShadow:w.shadow};if("horizontal"===s)return n.jsx(en,{questions:t,isDark:r,palette:w,resolvedTextColor:v,fontFamily:l,fontSize:c,isRtl:d,onQuestionClick:o,applyHoverState:S,headingLabel:b,defaultLanguage:y});const x=g??m??a??"#2563eb",k=h??u??"#FFFFFF";return n.jsxs("div",{style:{paddingInlineStart:"50px"},children:[b?n.jsx("div",{className:"mb-2",style:{color:r?"#9ca3af":"#6b7280",fontFamily:l,fontSize:`calc(${c} - 1px)`},children:b}):null,n.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((e,t)=>{const r=Y(e,d);return n.jsx("button",{onClick:()=>o?.(e),className:"transition-all duration-200 active:scale-[0.97]",style:{direction:r?"rtl":"ltr",fontFamily:l,fontSize:c,color:k,backgroundColor:x,border:"none",borderRadius:"9999px",padding:"5px 14px",fontWeight:500,lineHeight:"1.4",whiteSpace:"normal",textAlign:r?"right":"left"},children:e},t)})})]})},nn=({active:t=!1,processing:r=!1,deviceId:a,barWidth:o=3,barGap:i=1,barRadius:s=1.5,barColor:l,fadeEdges:c=!0,fadeWidth:u=24,barHeight:d=4,height:p=64,sensitivity:f=1,smoothingTimeConstant:g=.8,fftSize:m=256,historySize:h=60,updateRate:b=30,mode:y="static",onError:v,onStreamReady:w,onStreamEnd:S,className:x,...k})=>{const E=e.useRef(null),A=e.useRef(null),T=e.useRef([]),C=e.useRef(null),O=e.useRef(null),I=e.useRef(null),R=e.useRef(0),N=e.useRef(0),_=e.useRef(null),P=e.useRef([]),L=e.useRef(0),D=e.useRef([]),M=e.useRef(!0),j=e.useRef(null),F=e.useRef(0),B="number"==typeof p?`${p}px`:p;return e.useEffect(()=>{const e=E.current,t=A.current;if(!e||!t)return;const n=new ResizeObserver(()=>{const n=t.getBoundingClientRect(),r=window.devicePixelRatio||1;e.width=n.width*r,e.height=n.height*r,e.style.width=`${n.width}px`,e.style.height=`${n.height}px`;const a=e.getContext("2d");a&&a.scale(r,r),j.current=null,F.current=n.width,M.current=!0});return n.observe(t),()=>n.disconnect()},[]),e.useEffect(()=>{if(r&&!t){let e=0;L.current=0;const t=()=>{e+=.03,L.current=Math.min(1,L.current+.02);const n=[],r=Math.floor((A.current?.getBoundingClientRect().width||200)/(o+i));if("static"===y){const t=Math.floor(r/2);for(let a=0;a<r;a++){const r=(a-t)/t,o=1-.4*Math.abs(r),i=(.2+(.25*Math.sin(1.5*e+3*r)+.2*Math.sin(.8*e-2*r)+.15*Math.cos(2*e+r)))*o;let s=i;if(P.current.length>0&&L.current<1){const e=Math.min(a,P.current.length-1);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}}else for(let t=0;t<r;t++){const a=(t-r/2)/(r/2),o=1-.4*Math.abs(a),i=(.2+(.25*Math.sin(1.5*e+.15*t)+.2*Math.sin(.8*e-.1*t)+.15*Math.cos(2*e+.05*t)))*o;let s=i;if(P.current.length>0&&L.current<1){const e=Math.floor(t/r*P.current.length);s=(P.current[e]||0)*(1-L.current)+i*L.current}n.push(Math.max(.05,Math.min(1,s)))}"static"===y?D.current=n:T.current=n,M.current=!0,_.current=requestAnimationFrame(t)};return t(),()=>{_.current&&cancelAnimationFrame(_.current)}}if(!t&&!r){if("static"===y?D.current.length>0:T.current.length>0){let e=0;const t=()=>{e+=.03,e<1?("static"===y?D.current=D.current.map(t=>t*(1-e)):T.current=T.current.map(t=>t*(1-e)),M.current=!0,requestAnimationFrame(t)):"static"===y?D.current=[]:T.current=[]};t()}}},[r,t,o,i,y]),e.useEffect(()=>{if(!t)return I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),O.current&&"closed"!==O.current.state&&(O.current.close(),O.current=null),void(R.current&&(cancelAnimationFrame(R.current),R.current=0));return(async()=>{try{const e=await navigator.mediaDevices.getUserMedia({audio:a?{deviceId:{exact:a},echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});I.current=e,w?.(e);const t=new(window.AudioContext||window.webkitAudioContext),n=t.createAnalyser();n.fftSize=m,n.smoothingTimeConstant=g;t.createMediaStreamSource(e).connect(n),O.current=t,C.current=n,T.current=[]}catch(e){v?.(e)}})(),()=>{I.current&&(I.current.getTracks().forEach(e=>e.stop()),I.current=null,S?.()),O.current&&"closed"!==O.current.state&&(O.current.close(),O.current=null),R.current&&(cancelAnimationFrame(R.current),R.current=0)}},[t,a,m,g,v,w,S]),e.useEffect(()=>{const e=E.current;if(!e)return;const n=e.getContext("2d");if(!n)return;let a;const p=g=>{const m=e.getBoundingClientRect();if(t&&g-N.current>b&&(N.current=g,C.current)){const e=new Uint8Array(C.current.frequencyBinCount);if(C.current.getByteFrequencyData(e),"static"===y){const t=Math.floor(.05*e.length),n=Math.floor(.4*e.length),r=e.slice(t,n),a=Math.floor(m.width/(o+i)),s=Math.floor(a/2),l=[];for(let e=s-1;e>=0;e--){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}for(let e=0;e<s;e++){const t=Math.floor(e/s*r.length),n=Math.min(1,r[t]/255*f);l.push(Math.max(.05,n))}D.current=l,P.current=l}else{let t=0;const n=Math.floor(.05*e.length),r=Math.floor(.4*e.length),a=e.slice(n,r);for(let e=0;e<a.length;e++)t+=a[e];const o=t/a.length/255*f;T.current.push(Math.min(1,Math.max(.05,o))),P.current=[...T.current],T.current.length>h&&T.current.shift()}M.current=!0}if(!M.current&&!t)return void(a=requestAnimationFrame(p));M.current=t,n.clearRect(0,0,m.width,m.height);const v=l||getComputedStyle(e).color||"#000",w=o+i,S=Math.floor(m.width/w),x=m.height/2;if("static"===y){const e=r||t||D.current.length>0?D.current:[];for(let t=0;t<S&&t<e.length;t++){const r=e[t]||.1,a=t*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(a,l,o,i,s),n.fill()):n.fillRect(a,l,o,i)}}else for(let e=0;e<S&&e<T.current.length;e++){const t=T.current.length-1-e,r=T.current[t]||.1,a=m.width-(e+1)*w,i=Math.max(d,r*m.height*.8),l=x-i/2;n.fillStyle=v,n.globalAlpha=.4+.6*r,s>0?(n.beginPath(),n.roundRect(a,l,o,i,s),n.fill()):n.fillRect(a,l,o,i)}if(c&&u>0&&m.width>0){if(!j.current||F.current!==m.width){const e=n.createLinearGradient(0,0,m.width,0),t=Math.min(.3,u/m.width);e.addColorStop(0,"rgba(255,255,255,1)"),e.addColorStop(t,"rgba(255,255,255,0)"),e.addColorStop(1-t,"rgba(255,255,255,0)"),e.addColorStop(1,"rgba(255,255,255,1)"),j.current=e,F.current=m.width}n.globalCompositeOperation="destination-out",n.fillStyle=j.current,n.fillRect(0,0,m.width,m.height),n.globalCompositeOperation="source-over"}n.globalAlpha=1,a=requestAnimationFrame(p)};return a=requestAnimationFrame(p),()=>{a&&cancelAnimationFrame(a)}},[t,r,f,b,h,o,d,i,s,l,c,u,y]),n.jsxs("div",{className:ie("relative h-full w-full",x),ref:A,style:{height:B},"aria-label":t?"Live audio waveform":r?"Processing audio":"Audio waveform idle",role:"img",...k,children:[!t&&!r&&n.jsx("div",{className:"border-muted-foreground/20 absolute top-1/2 right-0 left-0 -translate-y-1/2 border-t-2 border-dotted"}),n.jsx("canvas",{className:"block h-full w-full",ref:E,"aria-hidden":"true"})]})},rn=Object.freeze(["bar","line","area","pie","donut","scatter","bubble","radar","radial-bar","radial","radialbar","treemap","funnel","sankey","composed","waterfall","gauge","histogram","kpi"]);const an=/\b(?:field|fields|column|columns|table|tables|sql|summed?|aggregat\w*|averaged?|counted)\b/i,on=/[A-Za-z_]\w*\.[A-Za-z_]\w*/;function sn(e){if("string"!=typeof e)return"";let t,n=e.trim();do{t=n,n=n.replace(/\s*\(([^()]*)\)\s*$/,function(e,t){return an.test(t)||on.test(t)?"":e}).trim()}while(n!==t);return n}const ln=new Set(["yes","approve","approved","confirm"]),cn=new Set(["no","decline","declined","cancel"]),un=/^[A-Za-z0-9_.:-]{1,128}$/;function dn(e){if("string"!=typeof e)return null;const t=e.trim();return un.test(t)?t:null}function pn(e,t){return null!=e?e:t}function fn(e,t){if(!e||"object"!=typeof e)return null;const n=dn(pn(e.tool_call_id,e.toolCallId));if(!n)return null;const r=function(e){if(!e||"object"!=typeof e)return null;if("boolean"==typeof e.approved)return e.approved;const t=String(pn(e.value,"")).trim().toLowerCase();return!!ln.has(t)||!cn.has(t)&&null}(t);return null===r?null:{tool_call_id:n,invocation_id:dn(pn(e.invocation_id,e.invocationId))||"",approved:r}}const gn=/\[([^\]\n]+)\]\((https?:\/\/[^\s)]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g;function mn(e){return String(pn(e,"")).trim().toLowerCase()}function hn(e,t){const n=e||[];for(let e=t+1;e<n.length;e+=1){const t=n[e];if(t&&"user"===t.role&&!t.sendFailed)return"string"==typeof t.content?t.content:String(pn(t.content,""))}}const bn=e.createContext(void 0),yn=new Set(["handoff_ack","handoff_wait"]),vn=({messages:t=[],liveJoined:r=[],handoffPoints:a=[],isDark:o,primaryColor:i,isLoading:s,agentMessageBubbleColor:l,userMessageBoxColor:c,textColor:u,assistantTextColor:d,userTextColor:p,fontFamily:f,agentMessageBubbleFontFamily:g,agentMessageBubbleFontSize:m,userMessageBubbleFontFamily:h,userMessageBubbleFontSize:b,fontSize:y,formatTime:v,isRtl:S=!1,defaultLanguage:x="en",quickQuestions:k=[],shouldShowQuickQuestions:E=!1,onQuickQuestion:A,quickQuestionsLayout:T="vertical",onDecision:C,disclaimerEnabled:O=!1,disclaimerText:I,disclaimerPosition:R="top",disclaimerLinkUrl:N,disclaimerLinkLabel:_,resolvedAgentBubbleColor:P,resolvedUserMessageColor:L,resolvedTextColor:D,isVoiceSessionActive:M=!1,voiceStatus:j="idle",messagesContainerRef:F,companyLogo:B,chatbotAvatarEnabled:U,chatbotAvatar:z,conciergeName:$,companyName:q,apiBaseUrl:G,getAuthToken:H,onPromptSuggestionClick:V,conversationResetKey:W,allowFeedback:K,provideCitations:Z,onFeedback:Q,headerTextColor:J,onRetryMessage:ee,beforePromptsSlot:te=null,promptsSlot:re=null,quickQuestionsHeadingLabel:ae})=>{const ie=e.useRef(null),se=e.useRef(!0),le=e.useRef(!1),ce=e.useMemo(()=>t.map(e=>`${e.id}:${e.content?.length??0}:${e.isProcessing?1:0}`).join("|"),[t]),ue=e.useCallback(()=>{const e=F?.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight;se.current=t<160},[F]);e.useEffect(()=>{const e=F?.current;if(e)return e.addEventListener("scroll",ue,{passive:!0}),ue(),()=>{e.removeEventListener("scroll",ue)}},[ue,F]),e.useEffect(()=>{W&&(se.current=!0,le.current=!1)},[W]),e.useEffect(()=>{if(le.current||0===t.length||"undefined"==typeof window)return;le.current=!0;let e,n=!1;const r=window.requestAnimationFrame(()=>{n||(e=window.requestAnimationFrame(()=>{n||(ie.current?.scrollIntoView({behavior:"instant",block:"end"}),se.current=!0)}))});return()=>{n=!0,window.cancelAnimationFrame(r),window.cancelAnimationFrame(e)}},[0===t.length]),e.useEffect(()=>{if(!se.current)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||ie.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[ce,s]),e.useEffect(()=>{if(!M||"connected"!==j)return;if("undefined"==typeof window)return;let e=!1;const t=window.requestAnimationFrame(()=>{e||ie.current?.scrollIntoView({behavior:"smooth",block:"end"})});return()=>{e=!0,window.cancelAnimationFrame(t)}},[M,j]);const de=e.useMemo(()=>oe(N),[N]),pe=e.useMemo(()=>function(e,t=[]){const n=new Map;if(!Array.isArray(e))return n;const r=new Set((Array.isArray(t)?t:[]).map(e=>e?.name).filter(Boolean));for(const t of e){const e=ne(t);if(!e||!t.id)continue;const a=!r.has(e);r.add(e),n.set(t.id,{name:e,joined:a})}return n}(t,r),[t,r]),fe=e.useMemo(()=>function(e,t=[]){const n=new Map,r=Array.isArray(t)?t:[],a=r[r.length-1]?.id;for(const t of Array.isArray(e)?e:[]){if(!t?.name)continue;const e=t.afterMessageId&&r.some(e=>e.id===t.afterMessageId)?t.afterMessageId:a;if(!e)continue;const o=n.get(e)||[];o.push(t.name),n.set(e,o)}return n}(r,t),[r,t]),ge=(e,t)=>n.jsx("div",{role:"status","data-testid":"agent-joined-line",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0"},children:X(x,"agentJoinedConversation").replace("{name}",e)},t),me=e.useMemo(()=>new Set(a),[a]),he=e=>n.jsx("div",{role:"status","data-testid":"platform-line",dir:Y(e.content,S)?"rtl":"ltr",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0",whiteSpace:"pre-wrap"},children:e.content}),be=e.useMemo(()=>Y(I,S),[I,S]);return n.jsxs(n.Fragment,{children:[O&&I&&"top"===R&&n.jsx("div",{className:"flex justify-center",children:n.jsx("div",{className:"rounded-lg px-2 py-1 ",style:{color:o?"#d1d5db":"#6b7280",fontFamily:null!=f?f:"Inter",fontSize:null!=y?`calc(${y} - 2px)`:"12px",direction:be?"rtl":"ltr",textAlign:"center",borderColor:o?"#374151":"#e5e7eb"},children:n.jsxs("p",{className:"leading-relaxed whitespace-pre-wrap break-words inline",dir:be?"rtl":"ltr",style:{color:o?"#d1d5db":"#6b7280",fontFamily:null!=f?f:"Inter",fontSize:null!=y?`calc(${y} - 2px)`:"12px"},children:[I,de&&_&&n.jsx("a",{href:de,target:"_blank",rel:"noopener noreferrer",title:de,style:{color:o?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:_})]})})}),t.map((e,r)=>{const a=pe.get(e.id),s="assistant"===e.role&&yn.has(e.metadata?.contentType);return n.jsxs(bn.Provider,{value:"assistant"===e.role?hn(t,r):void 0,children:[a?.joined&&ge(a.name),a&&n.jsx("div",{"data-testid":"agent-sender-name",style:{fontSize:"12px",fontWeight:600,opacity:.8,margin:"0 0 2px 4px",textAlign:S?"right":"left"},children:a.name}),s&&he(e),!s&&n.jsx(Ht,{message:e,isDark:o,primaryColor:i,agentMessageBubbleColor:l,userMessageBoxColor:c,resolvedUserMessageColor:L,resolvedAgentBubbleColor:P,textColor:u,assistantTextColor:d,userTextColor:p,fontFamily:f,agentMessageBubbleFontFamily:g,agentMessageBubbleFontSize:m,userMessageBubbleFontFamily:h,userMessageBubbleFontSize:b,fontSize:y,formatTime:v,isRtl:Y(e.content,S),onDecision:C,onPromptSuggestionClick:V,companyLogo:U&&z?z:B,conciergeName:$,companyName:q,apiBaseUrl:G,getAuthToken:H,allowFeedback:K,provideCitations:Z,onFeedback:Q,headerTextColor:J,onRetryMessage:ee,defaultLanguage:x}),me.has(e.id)&&(w=`handoff-${e.id}`,n.jsx("div",{role:"status","data-testid":"handoff-line",style:{textAlign:"center",fontSize:"12px",opacity:.7,margin:"8px 0"},children:X(x,"handedOffToTeam")},w)),(fe.get(e.id)||[]).map(e=>ge(e,`live-join-${e}`))]},e.id);var w}),(()=>{const e=t[t.length-1],r=s&&"user"===e?.role,a=t.some(e=>"assistant"===e.role&&(e.isProcessing||!e.content));return r&&!a?n.jsx(Ht,{message:w(),isDark:o,primaryColor:i,agentMessageBubbleColor:l,resolvedAgentBubbleColor:P,userMessageBoxColor:c,textColor:u,assistantTextColor:d,userTextColor:p,fontFamily:f,agentMessageBubbleFontFamily:g,agentMessageBubbleFontSize:m,userMessageBubbleFontFamily:h,userMessageBubbleFontSize:b,fontSize:y,formatTime:v,isRtl:S,onDecision:C,companyLogo:U&&z?z:B,conciergeName:$,companyName:q,apiBaseUrl:G,getAuthToken:H,headerTextColor:J,defaultLanguage:x},"skeleton-waiting"):null})(),te,re?n.jsx("div",{className:"pt-1",children:re}):E&&k.length>0&&n.jsx("div",{className:"pt-1",children:n.jsx(tn,{questions:k,isDark:o,primaryColor:i,onQuestionClick:A,isTyping:s,layout:T,fontFamily:f,fontSize:y,textColor:u,isRtl:S,questionTextColor:d,questionBoxColor:l,resolvedUserMessageColor:L,userMessageBoxColor:c,userTextColor:p,headingLabel:ae,defaultLanguage:x})}),M&&"connected"===j&&!s&&n.jsx("div",{className:"flex gap-3 flex-row-reverse animate-in",children:n.jsx("div",{className:"flex flex-col items-end max-w-[75%] w-full",children:n.jsxs("div",{className:"rounded-2xl px-4 py-2.5 shadow-lg rounded-tr-sm w-full",style:{background:`linear-gradient(135deg, ${L||i||"#2563eb"} 0%, ${L||i||"#2563eb"}dd 100%)`,width:"100px"},children:[n.jsx("span",{className:"sr-only",children:"Listening for voice input"}),n.jsx(nn,{active:!0,barWidth:2,barHeight:4,barGap:2,barColor:p||D||"#FFFFFF",height:20,fadeEdges:!0,className:"min-w-[60px]","aria-hidden":"true"})]})})}),n.jsx("div",{ref:ie,className:"h-px"})]})},wn=new Set(["size_exceeded","file_too_large","mime_not_allowed"]),Sn=[["application/pdf","PDF"],["image/jpeg","JPG"],["image/png","PNG"],["image/gif","GIF"],["image/webp","WEBP"],["application/msword","DOC"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","DOCX"],["application/vnd.ms-excel","XLS"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","XLSX"],["text/csv","CSV"],["text/plain","TXT"]];const xn=(e,t)=>e.replace(/\{(\w+)\}/g,(e,n)=>t[n]??""),kn=e=>{const t=Math.max(0,Number(e)||0)/1048576;return String(t>=10?Math.round(t):Math.round(10*t)/10)};function En(e,t,n={}){const r=String(n.fileUploadMaxSizeMB??"");if("mime_not_allowed"===t.code){const t=function(e){const t=new Set((e||[]).map(e=>String(e).toLowerCase()));return Sn.filter(([e])=>t.has(e)).map(([,e])=>e).join(", ")}(n.fileUploadAllowedMimes);return xn(e("attachmentTypeNotAllowed"),{types:t||"PDF"})}const a=Number(t.size)||0,o=e=>a>0?`${e}Size`:e,i=(e=>{const t=Math.max(0,Number(e)||0)/1048576;return String(t>=100?Math.round(t):Math.round(10*t)/10)})(a);if("file_too_large"===t.code)return xn(e(o("attachmentFileTooLarge")),{file_mb:i,max_mb:String(n.fileUploadMaxFileMB??r)});const s=Number(t.usedBytes)||0;return s>0?xn(e(o("attachmentLimitReachedUsed")),{file_mb:i,max_mb:r,used_mb:kn(s)}):xn(e(o("attachmentLimitReached")),{file_mb:i,max_mb:r})}function An(e,t){return String(e||"").replace(/\/+$/,"")+(t.startsWith("/")?t:`/${t}`)}function Tn({apiEndpoint:e,conversationId:t,size:n,authHeader:r}){fetch(An(e,"/api/v1/chat-attachments/release"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,size:n})}).catch(()=>{})}function Cn({orgId:t,conversationId:n,config:r,apiEndpoint:a,authHeader:o,onError:i,onRejected:s}){const[l,c]=e.useState([]),u=e.useRef(new Map),d=e.useRef(0),p=e.useRef(l);p.current=l;const f=e.useRef({conversationId:n,bytes:0});f.current.conversationId!==n&&(f.current={conversationId:n,bytes:0});const g=e.useCallback(()=>(d.current+=1,`att-${Date.now()}-${d.current}`),[]),m=e.useCallback((e,t)=>{c(n=>n.map(n=>n.id===e?{...n,...t}:n))},[]),h=e.useCallback((e,t,n)=>{if(s&&wn.has(t)){const n=p.current.find(t=>t.id===e);return c(t=>t.filter(t=>t.id!==e)),void s({code:t,filename:n?.filename,size:n?.size,usedBytes:Math.max(0,f.current.bytes)})}const r={status:"error",error:{code:t,message:n}};c(t=>{const n=t.map(t=>t.id===e?{...t,...r}:t),a=n.find(t=>t.id===e);return a&&i&&i(a),n})},[i,s]),b=e.useCallback((e,t)=>{if(!r?.fileUploadEnabled)return{ok:!1,code:"feature_disabled",message:"File uploads are not enabled for this organization."};if(t>=r.fileUploadMaxFiles)return{ok:!1,code:"too_many_files",message:`Max ${r.fileUploadMaxFiles} files per message.`};const n=1024*r.fileUploadMaxSizeMB*1024;if(f.current.bytes+e.size>n){return{ok:!1,code:"size_exceeded",message:`This conversation has already used ${(f.current.bytes/1048576).toFixed(1)} MB of its ${r.fileUploadMaxSizeMB} MB upload limit - this file won't fit.`}}const a=(e.type||"").toLowerCase(),o=new Set((r.fileUploadAllowedMimes||[]).map(e=>String(e).toLowerCase()));return o.size>0&&!o.has(a)?{ok:!1,code:"mime_not_allowed",message:`File type "${e.type||"unknown"}" is not allowed.`}:{ok:!0}},[r]),y=e.useCallback(async(e,t)=>{let r;try{r=await fetch(An(a,"/api/v1/chat-attachments/presign"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...o?{Authorization:o}:{}},body:JSON.stringify({filename:t.name,mimeType:t.type,size:t.size,conversationId:n})})}catch(n){return f.current.bytes=Math.max(0,f.current.bytes-t.size),void h(e,"network","Network error while requesting upload.")}if(!r.ok){let n="Upload rejected by the server.",a="unknown";try{const e=await r.json();e?.error&&(n=e.error),e?.code&&(a=function(e){switch(e){case"feature_disabled":case"size_exceeded":case"mime_not_allowed":case"storage_unavailable":case"file_too_large":return e;case"session_exceeded":return"size_exceeded";default:return"unknown"}}(e.code))}catch{}return f.current.bytes=Math.max(0,f.current.bytes-t.size),void h(e,a,n)}let i=0;const s=()=>{i>0&&(Tn({apiEndpoint:a,conversationId:n,size:i,authHeader:o}),i=0,m(e,{reservedBytes:0}))},l=()=>{f.current.bytes=Math.max(0,f.current.bytes-t.size)};let c;try{c=await r.json()}catch{return Tn({apiEndpoint:a,conversationId:n,size:t.size,authHeader:o}),l(),m(e,{reservedBytes:0}),void h(e,"unknown","Malformed presign response.")}let d,p;("boolean"==typeof c.reserved?c.reserved:!c.useMultipart)&&(i=t.size,m(e,{reservedBytes:t.size}));try{if(c.useMultipart){const r=await function({url:e,file:t,conversationId:n,authHeader:r,onProgress:a,registerXhr:o}){return new Promise((r,i)=>{const s=new XMLHttpRequest;o(s),s.open("POST",e,!0),s.withCredentials=!0;const l=new FormData;l.append("conversationId",n),l.append("file",t,t.name),s.upload.onprogress=e=>{e.lengthComputable&&a(Math.round(e.loaded/e.total*100))},s.onload=()=>{if(s.status>=200&&s.status<300)try{const e=JSON.parse(s.responseText);r({url:"string"==typeof e?.url?e.url:void 0,storageKey:"string"==typeof e?.storageKey?e.storageKey:void 0})}catch{r({})}else i(new Error(`upload_status_${s.status}`))},s.onerror=()=>i(new Error("network")),s.onabort=()=>i({aborted:!0}),s.send(l)})}({url:An(a,"/api/v1/chat-attachments/multipart"),file:t,conversationId:n,authHeader:o,onProgress:t=>m(e,{progress:t}),registerXhr:t=>u.current.set(e,t)});d=r.url,p=r.storageKey,i=t.size,m(e,{reservedBytes:t.size})}else{if(!c.uploadUrl)throw new Error("presign_missing_target");{await function({url:e,file:t,onProgress:n,registerXhr:r}){return new Promise((a,o)=>{const i=new XMLHttpRequest;r(i),i.open("PUT",e,!0),i.setRequestHeader("x-ms-blob-type","BlockBlob"),t.type&&i.setRequestHeader("Content-Type",t.type),i.upload.onprogress=e=>{e.lengthComputable&&n(Math.round(e.loaded/e.total*100))},i.onload=()=>{i.status>=200&&i.status<300?a():o(new Error(`upload_status_${i.status}`))},i.onerror=()=>o(new Error("network")),i.onabort=()=>o({aborted:!0}),i.send(t)})}({url:c.uploadUrl,file:t,onProgress:t=>m(e,{progress:t}),registerXhr:t=>u.current.set(e,t)});const n=await async function({apiEndpoint:e,storageKey:t,filename:n,mimeType:r,authHeader:a}){let o;try{o=await fetch(An(e,"/api/v1/chat-attachments/confirm"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",...a?{Authorization:a}:{}},body:JSON.stringify({storageKey:t,filename:n,mimeType:r})})}catch{return{ok:!1,code:"network",message:"Network error while verifying upload."}}if(o.ok)return{ok:!0};let i="Upload rejected - file content did not match its declared type.",s="content_mismatch";try{const e=await o.json();e?.error&&(i=e.error),"password_protected"===e?.code&&(s="password_protected")}catch{}return{ok:!1,code:s,message:i}}({apiEndpoint:a,storageKey:c.storageKey,filename:t.name,mimeType:t.type,authHeader:o});if(!n.ok)return u.current.delete(e),s(),l(),void h(e,n.code,n.message)}}}catch(t){if(u.current.delete(e),t&&t.aborted)return;return s(),l(),void h(e,"network","Upload failed. Please retry.")}u.current.delete(e),m(e,{status:"ready",progress:100,storageKey:p||c.storageKey,...d?{url:d}:{}})},[a,o,n,h,m]),v=e.useCallback(async e=>{const t=Array.from(e);for(const e of t){const t=p.current.filter(e=>"error"!==e.status).length,n=b(e,t),r=g();if(!n.ok&&s&&wn.has(n.code)){s({code:n.code,filename:e.name,size:e.size,usedBytes:Math.max(0,f.current.bytes)});continue}if(!n.ok){const t={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"error",error:{code:n.code,message:n.message}};c(e=>(i&&i(t),[...e,t]));continue}const a={id:r,filename:e.name,size:e.size,mimeType:e.type,status:"uploading",progress:0,reservedBytes:0};c(e=>[...e,a]),f.current.bytes+=e.size,y(r,e)}},[b,y,g,i,s]),w=e.useCallback(e=>{const t=u.current.get(e);t&&(t.abort(),u.current.delete(e));const r=p.current.find(t=>t.id===e);r&&r.reservedBytes>0&&(Tn({apiEndpoint:a,conversationId:n,size:r.reservedBytes,authHeader:o}),f.current.bytes=Math.max(0,f.current.bytes-r.reservedBytes)),c(t=>t.filter(t=>t.id!==e))},[a,o,n]),S=e.useCallback(()=>{for(const e of u.current.values())e.abort();u.current.clear(),c([])},[]),x=e.useMemo(()=>l.some(e=>"validating"===e.status||"uploading"===e.status),[l]),k=e.useCallback(()=>l.filter(e=>"ready"===e.status&&"string"==typeof e.storageKey).map(e=>({filename:e.filename,mimeType:e.mimeType,size:e.size,storageKey:e.storageKey,url:e.url})),[l]);return{attachments:l,addFiles:v,removeAttachment:w,clearAll:S,isBusy:x,toSendPayload:k}}function On(e){if(!e||e<1024)return`${e||0} B`;const t=["KB","MB","GB"];let n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=10?0:1)} ${t[r]}`}function In({attachment:e,onRemove:t,isDark:r,removeLabel:a="Remove attachment"}){const o="error"===e.status,i="uploading"===e.status,s="ready"===e.status,l=o?r?"rgba(239,68,68,0.15)":"#fee2e2":r?"#1f2937":"#f3f4f6",c=o?r?"#b91c1c":"#fca5a5":r?"#374151":"#e5e7eb",u=o?r?"#fca5a5":"#b91c1c":r?"#e5e7eb":"#374151",d=o?`${e.filename} - ${e.error?.message||"error"}`:i?`${e.filename} - uploading`:`${e.filename} - ready`;return n.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full pl-2 pr-1 py-1 text-xs",style:{backgroundColor:l,border:`1px solid ${c}`,color:u,maxWidth:240},role:"group",title:o?e.error?.message:e.filename,"aria-label":d,children:[o?n.jsx(Ve,{size:12,"aria-hidden":"true"}):i?n.jsx(et,{size:12,className:"animate-spin","aria-hidden":"true"}):n.jsx(Qe,{size:12,"aria-hidden":"true"}),n.jsx("span",{className:"truncate",style:{maxWidth:140,direction:"ltr"},children:e.filename}),s&&n.jsx("span",{className:"opacity-70 text-chip",children:On(e.size)}),i&&"number"==typeof e.progress&&n.jsxs("span",{className:"opacity-70 text-chip",children:[e.progress,"%"]}),n.jsx("button",{type:"button",onClick:()=>t(e.id),className:"w-4 h-4 rounded-full inline-flex items-center justify-center",style:{backgroundColor:"transparent",border:"none",color:u,cursor:"pointer"},"aria-label":a,children:n.jsx(pt,{size:12})})]})}function Rn({prompts:t,getDisplayText:n,detectDirection:r,ambientIsRtl:a,wrapperProps:o,stackProps:i,getKey:s,getChipProps:l,onChipClick:c,onSelect:u,before:d,after:p}){const f=e.createElement("div",i,t.map((t,o)=>{const i=n(t),d=r(i,a);return e.createElement("button",{key:s(t,o),type:"button",...l({prompt:t,index:o,displayText:i,chipIsRtl:d}),onClick:e=>{c&&c(t,o),u(t,o,e)}},i)}));return null==d&&null==p?e.createElement("div",o,f):e.createElement("div",o,d,f,p)}const Nn=({suggestions:e,onSuggestionClick:t,promptPrimary:r,promptTextColor:a,promptFontFamily:o,promptFontSize:i,isRtl:s,t:l,questionDisplay:c=!0})=>n.jsx(Rn,{prompts:e,getDisplayText:e=>((e,t=!0)=>{if(!e||"string"==typeof e)return e||"";const n="string"==typeof e.text?e.text:"";if(!t)return n;const r="string"==typeof e.submitText?e.submitText.trim():"";return r&&r!==n?r:n})(e,c),detectDirection:Y,ambientIsRtl:s,wrapperProps:{className:"mb-2 px-5"},stackProps:{className:"flex flex-col gap-2",role:"group","aria-label":l("suggestedQuestions")},getKey:(e,t)=>`${e.text||e}-${t}`,getChipProps:({chipIsRtl:e})=>({dir:e?"rtl":"ltr",className:"block w-full rounded-2xl px-4 py-2 border-0 transition-transform duration-150 active:scale-[0.99] "+(e?"text-right":"text-left"),style:{direction:e?"rtl":"ltr",textAlign:e?"right":"left",background:`linear-gradient(135deg, ${r} 0%, ${r}dd 100%)`,color:a,fontFamily:o,fontSize:i}}),onSelect:(e,n)=>t(e.submitText||e.text||e,e,n)}),_n=({onStopGeneration:t,inputValue:a,setInputValue:o,onSend:i,isDark:s,primaryColor:l,isOpen:c,isMinimized:u,isLoading:d,isConversationLoading:p=!1,verificationPending:f=!1,placeholder:g,textColor:m,fontFamily:h,fontSize:b,isRtl:y=!1,csatVisible:v=!1,enableVoiceInteraction:w=!1,isVoiceSessionActive:S=!1,voiceStatus:x="idle",voiceError:k=null,onVoiceToggle:E,onBidiSubmit:A,disclaimerEnabled:T=!1,disclaimerText:C,disclaimerPosition:O="top",disclaimerLinkUrl:I,disclaimerLinkLabel:R,showPoweredBy:N=!0,onboardingQuestions:_=[],onboardingActive:P=!1,onboardingCompleted:L=!1,userMessageBubbleFontFamily:D,onboardingEnabled:M=!1,userMessageBubbleFontSize:j,userMessageBoxColor:F,resolvedUserMessageColor:z,userTextColor:$,promptSuggestions:q,onPromptSuggestionClick:H,autoPromptQuestionDisplay:V=!0,tagSelectorNode:W=null,showResolveButton:K=!1,onResolve:X,defaultLanguage:Q="en",chatFeatures:J,apiEndpoint:ee,organizationId:te,conversationId:ne,onSynthesizeAssistantMessage:re})=>{const ae=e.useMemo(()=>Z(Q),[Q]),se=e.useMemo(()=>function(e){const t=G(e),n=U[t]||B;return{beforeBrand:n.poweredByBefore??n.poweredBy??B.poweredByBefore,afterBrand:n.poweredByAfter??""}}(Q),[Q]),le=e.useMemo(()=>Y(a,y),[a,y]),[ce,ue]=e.useState(!1),[de,pe]=e.useState(!1),fe=e.useMemo(()=>({fileUploadEnabled:J?.fileUploadEnabled??!1,fileUploadMaxSizeMB:J?.fileUploadMaxSizeMB??10,fileUploadMaxFiles:J?.fileUploadMaxFiles??3,fileUploadAllowedMimes:J?.fileUploadAllowedMimes??[]}),[J]),{attachments:ge,addFiles:me,removeAttachment:he,clearAll:be,isBusy:ye,toSendPayload:ve}=Cn({orgId:te,conversationId:ne,config:fe,apiEndpoint:ee,authHeader:void 0,onRejected:re?e=>re(En(ae,e,{...fe,fileUploadMaxFileMB:J?.fileUploadMaxFileMB??25})):void 0}),we=e.useRef(null),Se=e.useRef(new Set);e.useEffect(()=>{if(!S||!ne||!ee)return;const e=ve().filter(e=>e.storageKey&&!Se.current.has(e.storageKey));e.length&&(e.forEach(e=>Se.current.add(e.storageKey)),fetch(`${String(ee).replace(/\/$/,"")}/api/v1/chat-attachments/ingest`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:ne,attachments:e.map(e=>({storageKey:e.storageKey}))})}).catch(()=>{}))},[S,ne,ee,ge,ve]);const xe=!!fe.fileUploadEnabled&&!!ee,ke=ge.length>=fe.fileUploadMaxFiles,Ee=`Max ${fe.fileUploadMaxFiles} files per message.`,Ae=e.useMemo(()=>fe.fileUploadAllowedMimes.length>0?fe.fileUploadAllowedMimes.join(","):void 0,[fe.fileUploadAllowedMimes]),[Te,Ce]=e.useState({top:0,left:0,placement:"top",arrowOffset:0}),[Oe,Ie]=e.useState(!1),Re=e.useRef(null),Ne=e.useRef(null),_e=e.useRef(null),Pe=e.useRef(null);yt(h),yt(D),e.useEffect(()=>{c&&!u&&Ne.current?.focus()},[c,u]),e.useEffect(()=>{const e=Ne.current;if(e){e.style.height="auto";const t=e.scrollHeight,n=a.trim().length>0?20:48,r=Math.max(n,Math.min(t,120));e.style.height=`${r}px`}},[a]);const Le=e.useCallback(()=>{const e=ve();e.length>0?(i(void 0,e),be()):i()},[ve,be,i]),De=ge.some(e=>"ready"===e.status),Me=!a.trim()&&!De||d||p||ye||f,je=s?"#374151":"#e5e7eb",Fe=_&&_.length>0,Be=v||p||M&&(Fe&&!L)||"connecting"===x||f&&!S,Ue=v?ae("pleaseSubmitRatingFirst"):Fe?P?ae("completeOnboardingToEnableVoice"):L?"":ae("sendMessageToCompleteOnboarding"):"",$e=()=>{if(!_e.current)return;const e=_e.current.getBoundingClientRect(),t=220,n=e.top,r=window.innerHeight-e.bottom;let a="top",o=0,i=0;n>=73?(a="top",o=e.top-60-5-8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):r>=68?(a="bottom",o=e.bottom+8,i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10)):(a="top",o=Math.max(10,e.top-60-5-8),i=e.right-t,i<10&&(i=10),i+t>window.innerWidth-10&&(i=window.innerWidth-t-10));return{top:o,left:i,placement:a,arrowOffset:e.left+e.width/2-i}};e.useEffect(()=>{if(de&&Ue){const e=()=>{const e=$e();Ce(e)};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}}},[de,Ue]),e.useEffect(()=>()=>{Re.current&&clearTimeout(Re.current)},[]);const qe=null!=z?z:null!=F?F:null!=l?l:"#2563eb",Ge=null!=$?$:null!=m?m:"#FFFFFF",He=null!=D?D:null!=h?h:"Inter",Ve=null!=j?j:null!=b?b:null,We=Ve?`calc(${Ve} - 2px)`:"12px",Ye=oe(I);return n.jsxs("div",{className:"pt-4 pb-1 flex-shrink-0 relative "+(s?"bg-gray-900":"bg-white"),style:{overflow:"visible"},children:[W||q.length>0&&H&&n.jsx(Nn,{suggestions:q,onSuggestionClick:H,questionDisplay:V,promptPrimary:qe,promptTextColor:Ge,promptFontFamily:He,promptFontSize:We,isRtl:y,t:ae}),n.jsx("div",{className:"my-4",style:{height:"1px",backgroundColor:je}}),xe&&ge.length>0&&n.jsx("div",{className:"px-5 mb-2 flex flex-wrap gap-1.5",children:ge.map(e=>n.jsx(In,{attachment:e,onRemove:he,isDark:s,removeLabel:ae("removeAttachment")},e.id))}),n.jsxs("div",{className:"flex items-center px-5 gap-1.5",children:[xe&&n.jsx("input",{ref:we,type:"file",multiple:!0,accept:Ae,"aria-label":ae("uploadFile"),className:"hidden",style:{display:"none"},onChange:e=>{const t=e.target.files;t&&t.length&&!ke&&me(t),e.currentTarget.value=""}}),n.jsxs("div",{className:`flex-1 flex items-center gap-1 px-1 min-h-[48px] ${s?"bg-gray-800":"bg-gray-50"} rounded-2xl transition-all duration-200`,style:{borderStyle:"solid",borderColor:a&&a.trim().length>0?l||"#2563eb":je,borderWidth:a&&a.trim().length>0?"2px":"1px"},children:[xe&&n.jsxs("div",{className:"relative group shrink-0",children:[n.jsx("button",{type:"button",onClick:()=>we.current&&we.current.click(),disabled:v||p||d||ke||f,"aria-label":ke?Ee:"Attach file",title:ke?Ee:"Attach file",className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,style:{border:"none"},children:n.jsx(rt,{className:"w-4 h-4"})}),ke&&n.jsx("div",{role:"tooltip",className:"pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity px-3 py-1.5 text-xs rounded-lg whitespace-nowrap shadow-lg "+(s?"bg-gray-700 text-gray-100":"bg-gray-800 text-white"),children:Ee})]}),n.jsx("div",{className:"relative flex-1 flex items-center min-w-0",children:n.jsx("textarea",{id:"chat-widget-input",ref:Ne,"aria-label":g||ae("typeYourMessage"),value:a,onChange:e=>{o(e.target.value)},onFocus:()=>ue(!0),onBlur:()=>ue(!1),onKeyDown:e=>{if("Enter"===e.key&&!e.shiftKey){if(e.preventDefault(),f)return;if(S&&A&&!De)return void A();if(Me)return;Le()}},placeholder:p?ae("agentIsLoading"):f?ae("verifyInputBlocked"):g||ae("typeYourMessage"),rows:1,disabled:v||p||d||f||S&&"connected"!==x,dir:le?"rtl":"ltr",className:`w-full px-3 bg-transparent rounded-xl leading-normal ${s?"text-gray-100":"text-gray-900"} placeholder-gray-400 resize-none outline-none scrollbar-hide break-words`,style:{height:"auto",maxHeight:"120px",minHeight:"48px",paddingTop:a.trim().length>0?"12px":"0px",paddingBottom:a.trim().length>0?"12px":"0px",lineHeight:a.trim().length>0?"1.4":"48px",fontFamily:D||h||"Inter",fontSize:b||"14px",color:s?"#F3F4F6":"#1F2937",textAlign:le?"right":"left",direction:le?"rtl":"ltr",wordSpacing:"0",letterSpacing:"0"}})}),w&&n.jsxs("div",{className:"relative shrink-0",onMouseEnter:()=>{if(Be&&Ue){Re.current&&(clearTimeout(Re.current),Re.current=null);const e=$e();Ce(e),pe(!0)}},onMouseLeave:()=>{Re.current&&(clearTimeout(Re.current),Re.current=null),pe(!1)},children:[n.jsx("button",{style:{border:"none"},ref:_e,type:"button",onClick:E,"aria-label":ae(S?"stopVoiceInput":"startVoiceInput"),className:`h-8 w-8 rounded-lg flex items-center justify-center transition-colors duration-200 ${S?"bg-red-500 text-white hover:bg-red-600":s?"text-gray-300 hover:bg-gray-700":"text-gray-500 hover:bg-gray-200"} ${Be?"opacity-60 cursor-not-allowed":""}`,disabled:Be,children:"connecting"===x?n.jsx(et,{className:"w-4 h-4 animate-spin"}):n.jsx(ze,{className:"w-4 h-4"})}),de&&Ue&&"undefined"!=typeof document&&r.createPortal(n.jsxs("div",{ref:Pe,className:"px-3 py-1.5 text-xs shadow-md pointer-events-none",style:{position:"fixed",top:`${Te.top}px`,left:`${Te.left}px`,maxWidth:"220px",whiteSpace:"normal",wordWrap:"break-word",minWidth:"180px",zIndex:999999,backgroundColor:s?"#1f2937":"#ffffff",color:s?"#f3f4f6":"#111827",border:s?"1px solid #374151":"1px solid #e5e7eb",borderRadius:"top"===Te.placement?"6px 6px 6px 6px":"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",overflow:"visible"},children:[n.jsx("div",{className:"text-left leading-relaxed",children:Ue}),"top"===Te.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{position:"absolute",top:"100%",left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:s?"6px solid #374151":"6px solid #e5e7eb",pointerEvents:"none"}}),n.jsx("div",{style:{position:"absolute",top:"100%",left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",marginTop:"-1px",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderTop:s?"5px solid #1f2937":"5px solid #ffffff",pointerEvents:"none"}})]}),"bottom"===Te.placement&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"absolute bottom-full",style:{left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"5px solid transparent",borderRight:"5px solid transparent",borderBottom:s?"5px solid #374151":"5px solid #e5e7eb"}}),n.jsx("div",{className:"absolute bottom-full -mb-px",style:{left:`${Te.arrowOffset}px`,transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:s?"4px solid #1f2937":"4px solid #ffffff"}})]})]}),document.body)]})]}),d&&!S&&"function"==typeof t?n.jsx("button",{onClick:t,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md scale-100",style:{backgroundColor:l,color:"white",border:"none"},"aria-label":ae("stopGenerating"),children:n.jsx(it,{className:"w-3.5 h-3.5",fill:"currentColor"})}):n.jsx("button",{onClick:S&&A&&!De?A:Le,disabled:v||Me||f||S&&"connected"!==x,className:"h-10 w-10 flex-shrink-0 rounded-xl transition-all duration-200 flex items-center justify-center shadow-md disabled:opacity-40 disabled:cursor-not-allowed disabled:shadow-none "+(a.trim()?"scale-100":"scale-95"),style:{backgroundColor:a.trim()?l:s?"#374151":"#e5e7eb",color:a.trim()?"white":"#9ca3af",border:"none"},"aria-label":ae("sendMessage"),children:n.jsx(ot,{className:"w-4 h-4 transition-transform",style:y?{transform:"rotate(-90deg)"}:void 0})})]}),S&&n.jsxs("p",{"aria-live":"polite",className:`text-xs mt-2 px-5 ${"connected"===x?"text-status-success":"text-gray-500"} flex items-center gap-1`,children:[n.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current inline-flex"}),ae("connected"===x?"voiceSessionLive":"connectingVoice")]}),k&&n.jsx("p",{role:"alert",className:"text-xs mt-1 px-5 text-status-error",children:ae(k)===k?ae("voiceUnavailable"):ae(k)}),T&&C&&"footer"===O&&n.jsxs("p",{className:"text-xs mt-2 px-5 text-center",style:{color:s?"#d1d5db":"#6b7280",fontFamily:h||"Inter",fontSize:b?`calc(${b} - 2px)`:"12px",direction:y?"rtl":"ltr"},dir:y?"rtl":"ltr",children:[C,Ye&&R&&n.jsx("a",{href:Ye,target:"_blank",rel:"noopener noreferrer",title:Ye,style:{color:s?"#93c5fd":"#2563eb",marginInlineStart:"4px",verticalAlign:"middle",display:"inline-flex",alignItems:"center"},children:R})]}),N&&n.jsx("div",{className:"mt-1.5 flex justify-center",children:n.jsx("a",{href:"https://eshal.ai",target:"_blank",rel:"noopener noreferrer",className:"no-underline",children:n.jsxs("span",{dir:"ltr",className:"inline-flex items-center gap-1.5 py-0.5 px-3",children:[se.beforeBrand&&n.jsx("span",{className:ie("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:se.beforeBrand}),Oe?n.jsx("span",{className:ie("font-sans text-[10px] font-semibold",s?"text-gray-300":"text-gray-600"),children:"ESHAL"}):n.jsx("img",{src:s?"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='white'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='white'/%3e%3c/g%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='219' height='54' xmlns='http://www.w3.org/2000/svg' version='1.0'%3e%3cg class='layer'%3e%3ctitle%3eEshal Logo%3c/title%3e%3cg clip-path='url(%23a)' transform='translate(-.708 -1.076)'%3e%3cg clip-path='url(%23b)'%3e%3cpath d='M21.79 54.75h4.5l3.93-.56 4.49-1.4 3.38-1.97 2.81-2.25 2.24-2.81 2.25-3.93 1.13-3.09v-.85l-3.65-1.12h-.57l-1.96 4.5-1.97 3.09-2.81 2.53-3.93 1.96-3.38.85-2.81.28h-2.81l-4.21-.57-3.94-1.4-2.81-1.97-2.25-2.24-1.96-3.38-1.41-4.21-.56-3.37-.28-3.1v-3.65l.56-5.06 1.12-4.21 1.97-3.94 2.53-2.81 2.25-1.68 2.81-1.41 3.37-.84 2.25-.28H26l4.78.84 4.5 2.25 2.53 2.53 1.4 2.53.56 2.53-.28 3.65-1.12 2.25-1.41 1.69-1.4.55-1.13-4.21-1.68-2.81-1.97-1.97-3.09-1.4-1.12-.28h-5.34l-3.09 1.12-2.25 1.69-1.41 1.97-.84 3.09.28 3.08 1.4 2.82 1.97 1.96 2.81 1.41 2.25.56 4.78.28 3.09-.28.84-.28-1.12 3.09-1.69 1.97-2.25.84h-3.65l-2.81-1.12-1.68-1.41-3.38 2.25.56 1.13 1.13 1.4 2.81 1.69 2.81.84h4.78l2.81-.84 2.53-1.69 1.96-2.25L35 34.8l.84-4.5 3.65-2.24 2.53-2.53 1.69-3.09.56-2.25.28-2.81-.56-3.93-1.12-2.82-2.25-3.09-3.09-2.81-4.22-2.25-4.5-1.12-2.52-.28h-4.5l-3.93.56-4.5 1.41-3.38 1.96-3.37 3.1-2.52 3.65-1.97 4.49-1.13 4.78-.28 2.25v9.27l.84 5.06 1.69 4.78 1.69 3.09 2.25 2.81 2.8 2.53 2.82 1.69 5.06 1.68zm1.12-27.54-2.53-.84-1.4-1.12-.84-1.69.28-2.53 1.12-1.4 2.25-1.13H26l2.81 1.41 1.41 1.97.84 2.8v2.25l-1.12.28zm0 0' fill='black'/%3e%3c/g%3e%3c/g%3e%3cpath d='M82.381 38.435v6.48h-27.06V9.965h26.41v6.5h-18.36v7.57h16.22v6.3h-16.22v8.1zm16.432 7.07c-2.77 0-5.44-.37-8.02-1.11-2.57-.75-4.65-1.72-6.22-2.92l2.75-6.09c1.5 1.09 3.28 1.98 5.34 2.64 2.07.67 4.13 1 6.19 1q3.45 0 5.1-1.02t1.65-2.73c0-.83-.33-1.52-.98-2.06-.65-.55-1.48-1-2.5-1.33-1.01-.33-2.39-.7-4.11-1.1-2.67-.63-4.85-1.26-6.55-1.89s-3.15-1.64-4.37-3.04c-1.21-1.41-1.82-3.27-1.82-5.6 0-2.03.55-3.86 1.64-5.51 1.11-1.66 2.76-2.96 4.97-3.92 2.22-.97 4.93-1.46 8.13-1.46 2.22 0 4.4.27 6.53.8s4 1.3 5.59 2.3l-2.5 6.14c-3.23-1.82-6.45-2.74-9.67-2.74-2.27 0-3.95.37-5.03 1.1-1.07.73-1.61 1.69-1.61 2.89q0 1.8 1.86 2.67c1.25.59 3.16 1.16 5.72 1.72 2.66.63 4.85 1.27 6.55 1.9 1.69.63 3.14 1.63 4.36 2.99 1.21 1.37 1.82 3.21 1.82 5.55 0 2-.56 3.82-1.67 5.46q-1.68 2.475-5.01 3.93c-2.23.95-4.95 1.43-8.14 1.43m50.913-35.54v34.95h-8.08v-14.33h-15.88v14.33h-8.09V9.965h8.09v13.78h15.88V9.965zm29.811 27.47h-16.22l-3.1 7.48h-8.29l15.58-34.95h7.98l15.62 34.95h-8.48zm-2.55-6.15-5.55-13.37-5.53 13.37zm16.274-21.32h8.09v28.36h17.52v6.59h-25.61zm0 0' fill='black'/%3e%3c/g%3e%3c/svg%3e",alt:"ESHAL",className:ie("h-3",s?"opacity-60":"opacity-50"),onError:()=>Ie(!0)}),se.afterBrand&&n.jsx("span",{className:ie("font-sans text-[10px] font-medium",s?"text-gray-400":"text-gray-500"),children:se.afterBrand})]})})})]})},Pn=["sun","mon","tue","wed","thu","fri","sat"];function Ln(e){if(!e||"string"!=typeof e)return null;const t=e.match(/^(\d{1,2}):(\d{2})/);if(!t)return null;const n=parseInt(t[1],10),r=parseInt(t[2],10);return Number.isNaN(n)||Number.isNaN(r)?null:60*n+r}function Dn(e,t=new Date,n={}){if(!e||!e.showStatus)return null;const r=n.online||"Online now",a=n.officeOpen||"Online now",o=n.offlineFallback||"Offline";if("officeHours"!==e.statusMode)return{online:!0,label:r};const i=e.officeHours||{},{dayKey:s,minutes:l}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e||void 0,weekday:"short",hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(t),r=(n.find(e=>"weekday"===e.type)||{}).value||"";let a=parseInt((n.find(e=>"hour"===e.type)||{}).value||"0",10);const o=parseInt((n.find(e=>"minute"===e.type)||{}).value||"0",10);return 24===a&&(a=0),{dayKey:r.slice(0,3).toLowerCase(),minutes:60*a+o}}catch{return{dayKey:Pn[t.getDay()],minutes:60*t.getHours()+t.getMinutes()}}}(i.timezone,t),c=Array.isArray(i.days)?i.days.map(e=>String(e).slice(0,3).toLowerCase()):[],u=Ln(i.open),d=Ln(i.close);if(c.includes(s)&&(null!=u&&null!=d&&(u<=d?l>=u&&l<d:l>=u||l<d))){return{online:!0,label:(i.onlineMessage||"").trim()||a}}return{online:!1,label:(i.offlineMessage||"").trim()||o}}const Mn='[role="menuitem"]';function jn(e){const t=e&&"function"==typeof e.getRootNode?e.getRootNode():null;return t&&t.activeElement||document.activeElement}function Fn(e,t){return e?Array.from(e.querySelectorAll(t)).filter(e=>!e.disabled&&"true"!==e.getAttribute("aria-disabled")):[]}function Bn(e,t,n=Mn){const{key:r}=e;if("ArrowDown"!==r&&"ArrowUp"!==r&&"Home"!==r&&"End"!==r)return!1;const a=Fn(t,n);if(0===a.length)return!1;e.preventDefault();const o=a.indexOf(jn(t));let i;return i="Home"===r?0:"End"===r?a.length-1:"ArrowDown"===r?o<0?0:(o+1)%a.length:o<0?a.length-1:(o-1+a.length)%a.length,a[i].focus(),!0}const Un=({conciergeName:t,companyName:r,companyLogo:a,primaryColor:o,isDark:i,isMinimized:s=!1,textColor:l,fontFamily:c,fontSize:u,onToggleTheme:d,onMinimize:p,onClose:f,headerTextBold:g=!1,headerTextItalic:m=!1,headerTextColor:h,headerFontFamily:b,headerFontSize:y,subtitle:v=null,showStatus:w=!1,statusMode:S="always",officeHours:x=null,onRefreshChat:k,onCopyChat:E,defaultLanguage:A="en",isHandedOff:T=!1})=>{const C=o,O=h||"#FFFFFF",I=b||c||"Inter",R=y||u,N=T?null:v;yt(I);const _=e.useMemo(()=>Z(A),[A]),P=H(A),L=e.useMemo(()=>Y(N,P),[N,P]),D=e.useMemo(()=>Dn({showStatus:w,statusMode:S,officeHours:x}),[w,S,x]),[M,j]=e.useState(!1),F=e.useRef(null),B=e.useRef(null);e.useEffect(()=>{if(!M)return;const e=e=>{F.current&&!e.composedPath().includes(F.current)&&j(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[M]);const U=e.useRef(!1);e.useEffect(()=>{if(M){U.current=!0;const e=F.current?.querySelector('[role="menuitem"]');e?.focus()}else U.current&&(U.current=!1,B.current?.focus())},[M]);const z=O;return n.jsxs("div",{className:`text-white ${s?"px-4 py-2.5":"px-3 py-4"} flex items-center justify-between relative overflow-visible rounded-t-2xl z-[60]`,style:{background:C,fontFamily:I},children:[n.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 pl-1",children:[n.jsxs("div",{className:"relative w-11 h-11 flex-shrink-0",children:[n.jsx("div",{className:"w-full h-full rounded-full overflow-hidden flex items-center justify-center bg-white/20",children:a?n.jsx("img",{src:a,alt:"Logo",style:{display:"block",width:"100%",height:"100%",objectFit:"contain"},loading:"lazy"}):n.jsx("span",{className:"text-lg font-semibold leading-none",style:{color:z},children:(t||r||"")?.charAt(0)?.toUpperCase()})}),D?n.jsx("span",{title:D.label,className:ie("absolute bottom-0 h-3 w-3 rounded-full ring-2 ring-white",P?"left-0":"right-0"),style:{backgroundColor:D.online?"#22c55e":"#9ca3af",boxShadow:D.online?"0 0 0 3px rgba(34,197,94,0.25)":"none"},"aria-hidden":"true"}):null]}),n.jsxs("div",{className:"flex flex-col justify-center min-w-0",style:{fontFamily:I},children:[n.jsx("h3",{title:t,className:ie("font-semibold leading-snug truncate",g&&"font-bold",m&&"italic"),style:{fontSize:R?`calc(${R} + 2px)`:"15px",color:z},children:t}),T?n.jsx("p",{"data-testid":"handoff-status",role:"status",className:"leading-snug truncate opacity-90",style:{fontSize:"12px",color:z,textAlign:P?"right":"left"},children:_("handedOffStatus")}):null,N?n.jsx("p",{title:N,className:"leading-snug truncate opacity-75",dir:L?"rtl":"ltr",style:{fontSize:"12px",color:z,textAlign:L?"right":"left"},children:N}):null]})]}),n.jsxs("div",{className:"flex items-center gap-0 relative z-10 text-white flex-shrink-0 ml-1",children:[n.jsxs("div",{className:"relative",ref:F,children:[n.jsx("button",{type:"button",ref:B,"aria-label":_("menu"),"aria-expanded":M,"aria-haspopup":"true",onClick:()=>j(e=>!e),onKeyDown:e=>{"Escape"===e.key&&M&&(e.preventDefault(),j(!1))},className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:z},children:n.jsx(Xe,{className:"w-4 h-4",strokeWidth:1.6})}),M&&n.jsxs("div",{role:"menu","aria-label":_("menu"),tabIndex:-1,dir:P?"rtl":"ltr",onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),void j(!1);Bn(e,F.current)||function(e,t,n=Mn){if("Tab"!==e.key)return!1;const r=Fn(t,n);if(0===r.length)return!1;const a=r[0],o=r[r.length-1],i=jn(t);e.shiftKey&&i===a?(e.preventDefault(),o.focus()):!e.shiftKey&&i===o&&(e.preventDefault(),a.focus())}(e,F.current)},className:`absolute top-full mt-1 w-44 rounded-xl border shadow-lg py-1 z-[9999] animate-in fade-in slide-in-from-top-1 duration-150 ${P?"left-0":"right-0"} ${i?"bg-gray-800 border-gray-700":"bg-white border-gray-200"}`,style:{fontFamily:I},children:[n.jsxs("button",{role:"menuitem",onClick:()=>{j(!1),k?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:I,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:P?"right":"left"},children:[n.jsx(at,{className:"w-3.5 h-3.5 flex-shrink-0"}),_("refreshChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{j(!1),E?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:I,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:P?"right":"left"},children:[n.jsx(Ye,{className:"w-3.5 h-3.5 flex-shrink-0"}),_("copyChat")]}),n.jsxs("button",{role:"menuitem",onClick:()=>{j(!1),d?.()},className:"flex items-center gap-2.5 w-full px-3 py-2 text-sm leading-5 transition-colors cursor-pointer "+(i?"text-gray-200 hover:bg-gray-700":"text-gray-700 hover:bg-gray-50"),style:{fontFamily:I,fontSize:"14px",border:"none",background:"transparent",appearance:"none",WebkitAppearance:"none",textAlign:P?"right":"left"},children:[i?n.jsx(lt,{className:"w-3.5 h-3.5 flex-shrink-0"}):n.jsx(nt,{className:"w-3.5 h-3.5 flex-shrink-0"}),_(i?"lightMode":"nightMode")]})]})]}),n.jsx("button",{type:"button","aria-label":_("close"),onClick:f,className:"inline-flex h-7 w-7 items-center justify-center cursor-pointer transition-opacity duration-200 hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/40 rounded-full border-0 bg-transparent p-0",style:{color:z},children:n.jsx(pt,{className:"w-3.5 h-3.5",strokeWidth:1.6})})]})]})},zn=({questions:t=[],collapsiblePrompt:r,onSubmit:a,primaryColor:o="#2563eb",isRtl:i=!1,isDark:s=!1,defaultLanguage:l="en",fontFamily:c})=>{const u=e.useMemo(()=>Z(l),[l]),[d,p]=e.useState({}),[f,g]=e.useState({}),[m,h]=e.useState(!1),b=e.useRef({}),y=[...t].sort((e,t)=>le(e.fieldType)-le(t.fieldType));return n.jsx("div",{className:"flex flex-col items-center justify-center p-6 h-full min-h-0 z-50 relative ",style:{...c?{fontFamily:c}:{},...s?{backgroundColor:"#10141C"}:{}},children:n.jsxs("div",{className:"w-full max-w-sm rounded-2xl shadow-xl border p-8 transition-colors duration-300 bg-white border-gray-100",style:s?{backgroundColor:"#1E232B",border:"1px solid #2A303C"}:void 0,children:[r&&n.jsx("div",{className:"mb-4 text-start",children:n.jsx("h3",{className:"transition-colors duration-300 text-sm font-semibold mb-1 "+(s?"text-white":"text-[#4A5568]"),children:r})}),n.jsxs("form",{onSubmit:async e=>{e.preventDefault();const t=(()=>{const e={};return y.forEach(t=>{const n=t.fieldType||"question",r=(d[n]??"").trim(),a=t.collectionPrompt||t.askToType||t.question||t.label||n,o=!0===t.required||"true"===t.required;r?("fullName"!==n&&"name"!==n||r.length<2&&(e[n]=u("nameInvalid")),"email"!==n||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)||(e[n]=u("emailInvalid")),"phone"!==n&&"mobileno"!==n||/^[+]?[\d\s-]{8,15}$/.test(r)||(e[n]=u("phoneInvalid"))):o&&(e[n]="email"===n?u("emailRequired"):"fullName"===n||"name"===n?u("nameRequired"):"phone"===n||"mobileno"===n?u("phoneRequired"):`${a} ${u("fieldRequiredSuffix")}`)}),g(e),e})();if(Object.keys(t).length>0){const e=y.map((e,t)=>e.fieldType||`question_${t}`).find(e=>t[e]);return void b.current[e]?.focus()}h(!0);try{await a(d)}finally{h(!1)}},className:"space-y-4",noValidate:!0,children:[y.map((e,t)=>{const r=e.fieldType||`question_${t}`,a=e.collectionPrompt||e.askToType||e.question||e.label;if(!a?.trim())return null;let o="text";"email"===r&&(o="email"),"phone"!==r&&"mobileno"!==r||(o="tel");const l=(r||"").toLowerCase(),c="fullname"===l||"name"===l||"username"===l,m="phone"===l||"mobileno"===l,h="email"===l?u("onboardingEmailPlaceholder"):c?u("onboardingNamePlaceholder"):m?u("onboardingPhonePlaceholder"):a,y=f[r],v="w-full h-12 rounded-xl text-base md:text-sm px-3 py-1 outline-none border transition-colors focus:ring-0 "+(s?"text-white placeholder:text-[#A2A9B2] focus:border-[#5A6069]":"bg-gray-50/30 focus:bg-white text-gray-900 placeholder:text-gray-500 focus:border-[#B0B0B0]"),w=y?"!border-status-error focus:!border-status-error":"",S=`onboarding-field-${r}`,x=`${S}-error`;return n.jsxs("div",{children:[n.jsx("label",{htmlFor:S,className:"sr-only",children:a}),n.jsx("input",{id:S,ref:e=>{b.current[r]=e},placeholder:h,type:o,value:d[r]??"",onChange:e=>((e,t)=>{p(n=>({...n,[e]:t})),f[e]&&g(t=>{const n={...t};return delete n[e],n})})(r,e.target.value),className:`${v} ${w}`,"aria-invalid":y?"true":"false","aria-describedby":y?x:void 0,style:{direction:i?"rtl":"ltr",fontFamily:"inherit",...s?{backgroundColor:"#272C35",borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#3F444C"}:{borderWidth:"1px",borderStyle:"solid",borderColor:y?void 0:"#E0E0E0"}}}),y&&n.jsx("p",{id:x,role:"alert",className:"mt-1 text-xs text-status-error px-1",children:f[r]})]},r)}),n.jsx("button",{type:"submit",disabled:m,"aria-busy":m,"aria-label":m?u("submitting"):void 0,className:"w-full h-12 inline-flex items-center justify-center text-sm border-none font-semibold shadow-xl hover:shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all rounded-xl mt-4 text-white",style:{backgroundColor:o,fontFamily:"inherit"},children:m?n.jsx(et,{className:"w-5 h-5 animate-spin","aria-hidden":"true"}):u("startChat")})]})]})})},$n=({categories:t=[],selectedCategoryId:r=null,onSelect:a,isDark:o=!1,primaryColor:i="#2563eb",fontFamily:s="Inter",isRtl:l=!1,defaultLanguage:c="en"})=>{const u=e.useMemo(()=>Z(c),[c]),d=e.useRef(null),[p,f]=e.useState(!1),[g,m]=e.useState(!1),h=e.useCallback(()=>{const e=d.current;if(!e)return;const{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;f(Math.abs(t)>1),m(Math.abs(t)+r<n-1)},[]);e.useEffect(()=>{h();const e=d.current;if(!e)return;const t=new ResizeObserver(h);return t.observe(e),()=>t.disconnect()},[h,t]);const b=e.useCallback(e=>{const t=d.current;if(!t)return;const n="left"===e?-150:150;t.scrollBy({left:l?-n:n,behavior:"smooth"})},[l]);if(!Array.isArray(t)||0===t.length)return null;const y=o?"rgba(31,41,55,0.85)":"rgba(255,255,255,0.95)",v=o?"#e5e7eb":"#374151",w=o?"#4b5563":"#d1d5db",S=o?"#111827":"#ffffff",x=o?"#374151":"#e5e7eb";return n.jsxs("div",{className:"flex-shrink-0 px-2 py-2 border-b flex items-center gap-1",style:{backgroundColor:S,borderColor:x,fontFamily:s,direction:l?"rtl":"ltr"},role:"region","aria-label":u("filterByCategory"),children:[n.jsx("button",{type:"button",onClick:()=>b("left"),disabled:!p,"aria-label":u("scrollCategoriesLeft"),className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:y,border:`1px solid ${w}`,color:v,opacity:p?1:.3,cursor:p?"pointer":"default"},children:n.jsx(Ge,{size:14})}),n.jsx("div",{ref:d,onScroll:h,className:"flex-1 flex gap-2 overflow-x-auto",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch",scrollbarWidth:"none",msOverflowStyle:"none"},children:t.map(e=>{const t=r===e.id;return n.jsx("button",{type:"button",onClick:()=>a?.(t?null:e.id),"aria-pressed":t,className:"flex-shrink-0 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-all duration-150 whitespace-nowrap",style:{backgroundColor:o?"#1f2937":"#ffffff",border:t?`1.5px solid ${i}`:"1px solid "+(o?"#374151":"#e5e7eb"),color:t?i:o?"#e5e7eb":"#374151",fontFamily:s},children:n.jsx("span",{children:e.label})},e.id)})}),n.jsx("button",{type:"button",onClick:()=>b("right"),disabled:!g,"aria-label":u("scrollCategoriesRight"),className:"flex-shrink-0 flex items-center justify-center w-6 h-6 rounded-full transition-all duration-200",style:{backgroundColor:y,border:`1px solid ${w}`,color:v,opacity:g?1:.3,cursor:g?"pointer":"default"},children:n.jsx(He,{size:14})})]})},qn=({categories:e=[],selectedCategoryId:t=null,onSelect:r,isDark:a=!1,primaryColor:o="#2563eb",fontFamily:i="Inter",fontSize:s="14px",isRtl:l=!1,label:c="Choose a topic to get started:",regionLabel:u="Category filter"})=>{if(!Array.isArray(e)||0===e.length)return null;const d=a?"#9ca3af":"#6b7280";return n.jsxs("div",{className:"pl-[50px] pt-1",style:{direction:l?"rtl":"ltr",paddingLeft:l?0:50,paddingRight:l?50:void 0},role:"region","aria-label":u,children:[n.jsx("div",{className:"mb-2",style:{color:d,fontFamily:i,fontSize:`calc(${s} - 1px)`},children:c}),n.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(e=>{const l=t===e.id;return n.jsx("button",{type:"button",onClick:()=>r?.(l?null:e.id),"aria-pressed":l,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-150 hover:scale-[1.02] active:scale-[0.98]",style:{backgroundColor:a?"#1f2937":"#ffffff",border:l?`1.5px solid ${o}`:"1px solid "+(a?"#374151":"#e5e7eb"),color:l?o:a?"#e5e7eb":"#374151",fontFamily:i,fontSize:`calc(${s} - 1px)`,fontWeight:500},children:e.label},e.id)})})]})};const Gn=[{value:"😡",label:"😡",bg:"bg-red-200"},{value:"😕",label:"😕",bg:"bg-orange-200"},{value:"😐",label:"😐",bg:"bg-yellow-200"},{value:"😊",label:"😊",bg:"bg-green-200"},{value:"😍",label:"😍",bg:"bg-pink-200"}],Hn=[{value:"positive",label:"👍"},{value:"negative",label:"👎"}],Vn=[{value:"1",label:"1"},{value:"2",label:"2"},{value:"3",label:"3"},{value:"4",label:"4"},{value:"5",label:"5"}],Wn=[{value:"1",label:"⭐"},{value:"2",label:"⭐"},{value:"3",label:"⭐"},{value:"4",label:"⭐"},{value:"5",label:"⭐"}],Yn=({format:t="EMOJI",prompt:r="How was your experience?",onRating:a,disabled:o=!1,isDark:i=!1,primaryColor:s="#2563eb",defaultLanguage:l="en"})=>{const c=e.useMemo(()=>Z(l),[l]),[u,d]=e.useState(null),[p,f]=e.useState(null),[g,m]=e.useState(!1),h=async e=>{if(!o&&!g){d(e),m(!0);try{a&&a(e,t)}finally{m(!1)}}},b=(()=>{switch(t){case"THUMBS":return Hn;case"NUMERIC":return Vn;case"STARS":return Wn;default:return Gn}})();return n.jsxs("div",{className:ie("transition-all duration-200 rounded-xl px-4",i?"bg-slate-800/50":"bg-slate-50/50"),children:[n.jsx("p",{className:ie("text-sm font-semibold text-center mb-3",i?"text-gray-300":"text-gray-500/80"),children:r}),n.jsxs("div",{className:"flex justify-center items-center",children:["EMOJI"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",children:b.map(e=>n.jsx("button",{onClick:()=>h(e.value),disabled:o||g,className:ie("flex items-center justify-center text-2xl transition-transform","bg-transparent border-0 p-0 cursor-pointer","hover:scale-110 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","focus:outline-none focus:ring-0","rounded-md focus-visible:ring-2 focus-visible:ring-blue-700",u===e.value?"":"opacity-80"),children:n.jsx("span",{role:"img","aria-label":`${c("rate")} ${e.value}`,children:e.label})},e.value))}),"THUMBS"===t&&n.jsx("div",{className:"flex gap-6 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":1===e.value?c("thumbsUp"):c("thumbsDown"),onClick:()=>h(e.value),disabled:o||g,className:ie("w-10 h-10 rounded-xl border flex items-center justify-center shadow-md text-2xl transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed","drop-shadow-md",i?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-100 hover:bg-gray-50",u===e.value&&"ring-2 ring-primary/40 scale-110"),style:{borderColor:u===e.value?s:void 0},children:n.jsx("span",{className:"drop-shadow-md","aria-hidden":"true",children:e.label})},e.value))}),"NUMERIC"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",role:"group","aria-label":c("rateExperience"),children:b.map(e=>n.jsx("button",{"aria-label":`${c("rate")} ${e.value}`,onClick:()=>h(e.value),disabled:o||g,className:ie("w-10 h-10 rounded-lg flex items-center justify-center text-sm font-semibold transition-all","hover:scale-105 active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed",u===e.value?"ring-2 ring-primary/40 scale-110 shadow-md text-white":i?"bg-gray-700 border border-gray-600 text-gray-300 hover:bg-gray-600":"bg-white border border-gray-200 text-gray-700 hover:bg-gray-50"),style:{backgroundColor:u===e.value?s:void 0,borderColor:u===e.value?s:void 0},children:e.label},e.value))}),"STARS"===t&&n.jsx("div",{className:"flex gap-2 justify-center items-center",onMouseLeave:()=>f(null),children:b.map(e=>{const t=p===e.value;return n.jsx("button",{onClick:()=>h(e.value),onMouseEnter:()=>f(e.value),disabled:o||g,className:ie("flex items-center justify-center text-2xl","bg-transparent border-0 p-0 cursor-pointer focus:outline-none","rounded-md focus-visible:ring-2 focus-visible:ring-blue-700","disabled:opacity-50 disabled:cursor-not-allowed"),style:{transform:t?"scale(1.25)":"scale(1)",filter:t?"brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.15))":"none",opacity:t?1:.6,transition:"all 0.2s ease"},"aria-label":`${c("rate")} ${e.value}`,children:n.jsx("span",{"aria-hidden":"true",children:e.label})},e.value)})})]}),g&&n.jsx("p",{"aria-live":"polite",className:ie("text-xs mt-3 text-center",i?"text-slate-400":"text-slate-500"),children:c("submittingFeedback")})]})};async function Kn({apiBaseUrl:e,conversationId:t,chip:n,submitText:r,position:a,source:o="widget",getAuthToken:i,enabled:s=!0}={}){try{if(!1===s)return!1;if(!e||"string"!=typeof e)return!1;if(!t||"string"!=typeof t)return!1;const l=function({chip:e,submitText:t,position:n,conversationId:r,source:a="widget"}={}){const o=e&&"object"==typeof e,i=o&&"string"==typeof e.text?e.text:"",s="string"==typeof t&&t?t:o&&"string"==typeof e.submitText?e.submitText:"string"==typeof e?e:"",l=i||s;if(!l)return null;const c={conversationId:r,chipText:l,submitText:s||void 0,position:Number.isInteger(n)?n:void 0,source:a},u=o?e?.promptId:void 0;return"string"==typeof u&&u&&(c.promptId=u),c}({chip:n,submitText:r,position:a,conversationId:t,source:o});if(!l)return!1;const c=`${e.replace(/\/$/,"")}/api/v1/support/chip-click`,u=JSON.stringify(l);let d;if("function"==typeof i)try{d=await i()}catch{d=void 0}if(!d&&"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob)try{if(navigator.sendBeacon(c,new Blob([u],{type:"application/json"})))return!0}catch{}if("function"!=typeof fetch)return!1;const p={"Content-Type":"application/json"};return d&&(p.Authorization=`Bearer ${d}`),await fetch(c,{method:"POST",headers:p,credentials:"include",keepalive:!0,body:u}),!0}catch{return!1}}const Xn=e.createContext(null),Zn="#2563eb";function Qn(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replace(`{${t}}`,String(n)),String(e))}const Jn=e=>String(e??"").replace(/ /g," ");function er(e){const t=Math.max(0,Math.ceil(e)),n=`${String(Math.floor(t%3600/60)).padStart(t>=3600?2:1,"0")}:${String(t%60).padStart(2,"0")}`;return t>=3600?`${Math.floor(t/3600)}:${n}`:n}function tr(e){return{border:`1px solid ${Zn}`,borderRadius:10,padding:12,marginTop:8,background:e?"#111827":"#ffffff",color:e?"#f3f4f6":"#111827",display:"grid",gap:8,fontSize:13}}function nr(e){return{width:"100%",boxSizing:"border-box",padding:"7px 10px",borderRadius:6,border:"1px solid "+(e?"#374151":"#d1d5db"),background:e?"#1f2937":"#f9fafb",color:"inherit",fontSize:14}}function rr(e){return{padding:"7px 12px",borderRadius:6,border:"none",background:Zn,color:"#ffffff",fontWeight:600,fontSize:13,cursor:e?"default":"pointer",opacity:e?.5:1,justifySelf:"start"}}const ar={background:"none",border:"none",padding:0,color:Zn,fontSize:12,cursor:"pointer",justifySelf:"start"};function or({spec:t,isDark:r,onButtonClick:a}){const o=e.useContext(Xn),i="sms"===t?.mode?"sms":"email",s=o?.t??(e=>e),[l,c]=e.useState("address"),[u,d]=e.useState(()=>("sms"===i?o?.prefillPhone:o?.prefillEmail)||""),[p,f]=e.useState(""),[g,m]=e.useState(""),[h,b]=e.useState(!1),[y,v]=e.useState(null),[w,S]=e.useState(0),[x,k]=e.useState(!1),[E,A]=e.useState(null),[T,C]=e.useState(0),[O,I]=e.useState(null),[R,N]=e.useState(null),_=e.useRef(!1),P=e.useRef(Symbol("verify-card")),L=void 0!==e.useContext(bn),D=Boolean(o)&&!L&&!x&&"done"!==l;if(e.useEffect(()=>{if(!D||!o?.setPending)return;const e=P.current;return o.setPending(e,!0),()=>o.setPending(e,!1)},[D,o]),e.useEffect(()=>{if("sms"!==i||"code"!==l||!o?.status)return;let e=0,t=!1;const n=setInterval(async()=>{if(e+=1,t||e>12)clearInterval(n);else try{const e=await o.status(),t=e?.body?.delivery;"failed"===t?(v(s("verifyNotDelivered")),S(0),clearInterval(n)):"delivered"!==t&&null!==t||clearInterval(n)}catch{}},5e3);return()=>{t=!0,clearInterval(n)}},[i,l,o,s]),e.useEffect(()=>{if("sms"!==i||!o?.config)return;let e=!1;return o.config().then(t=>{const n=t?.body?.sms_calling_codes;!e&&Array.isArray(n)&&N(n.map(String))}).catch(()=>{}),()=>{e=!0}},[i,o]),e.useEffect(()=>{if(!E)return;const e=()=>{const e=(E-Date.now())/1e3;e<=0?(A(null),C(0),v(null)):C(e)};e();const t=setInterval(e,1e3);return()=>clearInterval(t)},[E]),e.useEffect(()=>{if(w<=0)return;const e=setTimeout(()=>S(e=>e-1),1e3);return()=>clearTimeout(e)},[w]),!o)return null;if(x||L&&"done"!==l)return n.jsx("div",{style:{...tr(r),borderColor:r?"#374151":"#d1d5db"},"data-testid":"verify-card",children:n.jsx("div",{style:{fontSize:12,opacity:.7},children:s(x?"verifyCancelled":"verifyTitle")})});const M=async()=>{if(!h&&u.trim()){b(!0),v(null);try{const e=await o.start({method:i,..."sms"===i?{phone:u.trim()}:{email:u.trim()}});e.ok?(m(e.body?.masked||u.trim()),A(null),I(null),e.body?.formatted&&d(String(e.body.formatted)),S(Number(e.body?.resend_after_s)||60),f(""),c("code")):(v(e.body?.error||s("verifyGenericError")),e.body?.resendAfterS&&S(Number(e.body.resendAfterS)),"locked"!==e.body?.code&&"too_many"!==e.body?.code||!e.body?.lockedUntil||(A(Date.parse(e.body.lockedUntil)),I("too_many"===e.body.code?u.trim():null),S(0)))}catch{v(s("verifyGenericError"))}finally{b(!1)}}},j=async()=>{const e=p.replace(/\D/g,"");if(!h&&6===e.length){b(!0),v(null);try{const n=await o.verify({code:e});if(n.ok){if(m(n.body?.masked||g),c("done"),!_.current&&a){_.current=!0;const e=s("verifyResumeMessage");a(e,e,{verificationComplete:{...t?.tool_call_id?{tool_call_id:String(t.tool_call_id)}:{},...t?.invocation_id?{invocation_id:String(t.invocation_id)}:{}}})}}else"wrong_code"===n.body?.code&&"number"==typeof n.body?.triesLeft?(v(Qn(s(1===n.body.triesLeft?"verifyTryLeft":"verifyTriesLeft"),{count:n.body.triesLeft})),f("")):(v(n.body?.error||s("verifyGenericError")),"expired"!==n.body?.code&&"locked"!==n.body?.code||c("address"),"locked"===n.body?.code&&n.body?.lockedUntil&&(A(Date.parse(n.body.lockedUntil)),I(null),S(0)))}catch{v(s("verifyGenericError"))}finally{b(!1)}}};if("done"===l)return n.jsx("div",{style:tr(r),"data-testid":"verify-card",children:n.jsxs("div",{style:{color:"#13703a",fontWeight:600},children:["✓ ",Qn(s("verifyDone"),{target:Jn(g)})]})});const F="sms"===i&&function(e,t){if(!Array.isArray(t)||0===t.length||!String(e).trim().startsWith("+"))return!1;const n=String(e).replace(/\D/g,"");return!!n&&!t.some(e=>n.startsWith(e)||e.startsWith(n))}(u,R),B=e=>e?n.jsx("div",{role:"alert",style:{color:"#b42318",fontSize:13},children:e}):null,U=T>0&&(null===O||O===u.trim()),z=h||!u.trim()||w>0||U||F;return n.jsxs("div",{style:tr(r),"data-testid":"verify-card",children:[n.jsx("div",{style:{fontWeight:600},children:s("verifyTitle")}),"address"===l?n.jsxs(n.Fragment,{children:[n.jsxs("label",{style:{display:"grid",gap:4},children:[n.jsx("span",{style:{fontSize:12,opacity:.8},children:s("sms"===i?"verifyPhoneLabel":"verifyEmailLabel")}),n.jsx("input",{style:nr(r),type:"sms"===i?"tel":"email",autoComplete:"sms"===i?"tel":"email",inputMode:"sms"===i?"tel":"email",placeholder:"sms"===i?"+971 50 123 4567":"name@example.com",value:u,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"!==e.key||z||M()}})]}),B(F?s("verifyCountryNotAllowed"):y),n.jsx("button",{type:"button",style:rr(z),disabled:z,onClick:M,children:h?s("verifySending"):U?Qn(s("verifyLockedFor"),{time:er(T)}):w>0?Qn(s("verifyResendIn"),{seconds:w}):s("verifySendCode")})]}):n.jsxs(n.Fragment,{children:[n.jsx("span",{children:Qn(s("verifyEnterCode"),{target:Jn(g)})}),n.jsx("input",{style:{...nr(r),letterSpacing:"0.3em",fontSize:18},"aria-label":s("verifyCodeLabel"),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,value:p,onChange:e=>f(e.target.value.replace(/\D/g,"").slice(0,6)),onKeyDown:e=>{"Enter"===e.key&&j()}}),B(y),n.jsx("button",{type:"button",style:rr(h||6!==p.length),disabled:h||6!==p.length,onClick:j,children:s("verifyConfirm")}),w>0?n.jsx("span",{style:{fontSize:12,opacity:.7},children:Qn(s("verifyResendIn"),{seconds:w})}):n.jsx("button",{type:"button",style:ar,onClick:M,disabled:h,children:s("verifyResend")}),n.jsx("button",{type:"button",style:ar,onClick:()=>{c("address"),v(null),S(0)},children:s("sms"===i?"verifyDifferentNumber":"verifyDifferent")})]}),n.jsx("button",{type:"button",style:{...ar,color:r?"#9ca3af":"#6b7280"},onClick:()=>{o.cancel&&Promise.resolve(o.cancel()).catch(()=>{}),k(!0)},disabled:h,children:s("verifyCancel")})]})}const ir="#ffffff",sr="#f5f5f5",lr="#000000",cr="#1f2937",ur="#f3f4f6",dr="#2563eb",pr="eshal:widget:size",fr=(e,t)=>!e||(e=>e?.trim().toLowerCase())(e)===t,gr=e=>(e instanceof Date?e:new Date(e)).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).replace(/am|pm/i,e=>e.toUpperCase()),mr=e=>{const t=(e||"EMOJI").toString().trim().toUpperCase();return"THUMBS"===t||"THUMB"===t?"THUMBS":"STARS"===t||"STAR"===t?"STARS":"NUMERIC"===t||"NUMBER"===t?"NUMERIC":"EMOJI"},hr=({isOpen:t,isMinimized:r,isDark:a,onStopGeneration:o,primaryColor:i,textColor:s,conciergeName:l,companyName:c,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,messages:f,isLoading:g,isConversationLoading:m=!1,inputValue:h,setInputValue:b,onSend:y,onDirectSend:w,onToggleTheme:S,onMinimize:x,onClose:k,quickQuestions:E=[],quickQuestionsEnabled:A,onQuickQuestion:T,quickQuestionsLayout:C="vertical",agentMessageBubbleColor:O,userMessageBoxColor:I,assistantTextColor:R,userTextColor:N,fontFamily:_="Inter",agentMessageBubbleFontFamily:P,agentMessageBubbleFontSize:L,userMessageBubbleFontFamily:D,userMessageBubbleFontSize:M,fontSize:j="14px",defaultLanguage:F="en",onDecision:B,headerTextBold:U=!1,headerTextItalic:z=!1,headerTextColor:$,headerFontFamily:q,headerFontSize:G,subtitle:V=null,showStatus:W=!1,statusMode:Y="always",officeHours:K=null,enableVoiceInteraction:X=!1,isVoiceSessionActive:Q=!1,voiceStatus:J="idle",voiceError:ee=null,voiceConclusionForCsat:te=!1,onVoiceToggle:ne,onBidiSubmit:re,disclaimerEnabled:ae=!1,disclaimerText:oe,disclaimerPosition:se="top",disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de=!0,apiBaseUrl:pe,apiKey:fe,getAuthToken:ge,conversationId:me,conciergeId:he,onboardingQuestions:ye=[],onboardingActive:ve=!1,onboardingCompleted:we=!1,onOnboardingFormSubmit:Se,collectionPrompt:xe,csatEnabled:ke=!1,csatFormat:Ee="EMOJI",csatPrompt:Ae="How was your experience?",csatRequest:Te=null,liveJoined:Ce=[],isHandedOff:Oe=!1,handoffPoints:Ie=[],onPromptSuggestionClick:Re,onboardingEnabled:Ne=!1,onResetConversation:_e,sessionExpiringSoon:Pe=!1,autoPromptEnabled:Le=!0,autoPromptQuestionDisplay:De=!0,autoPromptClickTelemetry:Me=!0,allowFeedback:je=!0,provideCitations:Fe=!0,onFeedback:Be,onRetryMessage:Ue,onRefreshChat:ze,onCopyChat:$e,filterCategories:qe=[],showFilterStep:Ge=!1,widgetFilter:He=null,onWidgetFilterChange:Ve,onSynthesizeAssistantMessage:We,launcherPosition:Ye="bottom-right",chatFeatures:Ke,organizationId:Xe})=>{yt(_);const Ze=e.useRef(null),Qe=e.useRef(null),Je=e.useMemo(()=>Z(F),[F]),[et,tt]=e.useState(()=>new Set),nt=e.useCallback((e,t)=>{tt(n=>{if(t===n.has(e))return n;const r=new Set(n);return t?r.add(e):r.delete(e),r})},[]),rt=e.useMemo(()=>pe&&me?{t:Je,setPending:nt,start:e=>((e,t,n)=>v("start",e,t,n))({...e,conversationId:me},pe,ge),verify:e=>((e,t,n)=>v("verify",e,t,n))({...e,conversationId:me},pe,ge),status:()=>((e,t,n)=>v("status",e,t,n))({conversationId:me},pe,ge),cancel:()=>((e,t,n)=>v("cancel",e,t,n))({conversationId:me},pe,ge),config:()=>((e,t,n)=>v("config",e,t,n))({conversationId:me},pe,ge)}:null,[Je,pe,me,ge,nt]);e.useEffect(()=>{Qe.current?.focus()},[]);const at=e.useCallback((e,t,n)=>{Kn({apiBaseUrl:pe,conversationId:me,chip:t,submitText:null==e?void 0:String(e),position:n,source:"widget",getAuthToken:ge,enabled:Me})},[pe,ge,me,Me]),ot=e.useCallback((e,t,n)=>{t&&"object"==typeof t&&at(e,t,n);const r=n&&"object"==typeof n&&n.toolConfirmation?n.toolConfirmation:null,a=n&&"object"==typeof n&&n.verificationComplete?n.verificationComplete:null;Re?Re(e):r?w?.(e,void 0,{toolConfirmation:r}):a?w?.(e,void 0,{verificationComplete:a,skipUserAppend:!0}):w?.(e)},[Re,w,at]),it=Ye.includes("right"),lt=Ye.includes("bottom"),[ct,ut]=e.useState(()=>{if("undefined"==typeof window)return null;try{const e=window.localStorage.getItem(pr);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.width&&"number"==typeof t?.height&&t.width>=320&&t.height>=400)return t}catch{}return null}),dt=e.useRef(null),pt=e.useRef({x:0,y:0}),ft=e.useRef({width:380,height:650});e.useEffect(()=>{const e=e=>{const t=dt.current;if(!t)return;const n=e.clientX-pt.current.x,r=e.clientY-pt.current.y,a={...ft.current},o=.92*window.innerWidth,i=.85*window.innerHeight;if("corner"===t||"horizontal"===t){const e=it?ft.current.width-n:ft.current.width+n;a.width=Math.min(Math.max(320,e),o)}if("corner"===t||"vertical"===t){const e=lt?ft.current.height-r:ft.current.height+r;a.height=Math.min(Math.max(400,e),i)}ut(a)},t=()=>{dt.current&&(dt.current=null,document.body.style.cursor="",document.body.style.userSelect="")};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[it,lt]),e.useEffect(()=>{if(ct)try{window.localStorage.setItem(pr,JSON.stringify(ct))}catch{}},[ct]);const gt=(e,t)=>{t.preventDefault(),t.stopPropagation(),dt.current=e,pt.current={x:t.clientX,y:t.clientY},ft.current=ct??{width:380,height:650};const n={corner:it===lt?"nwse-resize":"nesw-resize",horizontal:"ew-resize",vertical:"ns-resize"};document.body.style.cursor=n[e],document.body.style.userSelect="none"},[mt,ht]=e.useState(!1),[bt,vt]=e.useState(()=>{try{return be(Xe)?.csatSubmitted??!1}catch{return!1}}),[wt,St]=e.useState(!1),[xt,kt]=e.useState(!1),[Et,At]=e.useState(0),[Tt,Ct]=e.useState(""),[Ot,It]=e.useState(!1),[Rt,Nt]=e.useState(!1);e.useEffect(()=>{t||(St(!1),At(0),Ct(""),Nt(!1))},[t]),e.useEffect(()=>{St(!1),At(0),Ct(""),Nt(!1)},[me]),e.useEffect(()=>{try{const e=be(Xe)?.csatSubmitted??!1;vt(e),e&&ht(!1)}catch{}},[me]),function(t,n=[],r={}){const{enabled:a=!0,threshold:o=30,behavior:i="smooth",delay:s=0}=r,l=e.useRef(!0);e.useRef(0),e.useEffect(()=>{if(!a||!t.current)return;const e=t.current,n=()=>{const t=e.scrollHeight-e.scrollTop-e.clientHeight;l.current=t<o},r=()=>{n()};e.addEventListener("scroll",r,{passive:!0}),n();const c=setTimeout(()=>{l.current&&e&&e.scrollTo({top:e.scrollHeight,behavior:i})},s);return()=>{e.removeEventListener("scroll",r),clearTimeout(c)}},[t,a,o,i,s,...n])}(Ze,[f,g],{enabled:!0,threshold:30,behavior:"smooth",delay:0});const _t=H(F),Pt=e.useMemo(()=>a?fr(O,ir)?cr:O||cr:O||ir,[O,a]),Lt=e.useMemo(()=>a?fr(s,lr)?ur:s||ur:s||lr,[a,s]),Dt=e.useMemo(()=>a?fr(I,sr)?i||dr:I||i||dr:I||sr,[a,i,I]),Mt=Je(xt?"conversationResolved":"typeYourMessage"),jt=f?.some?.(e=>"user"===e.role),Ft=e.useMemo(()=>(f||[]).filter(e=>"user"===e.role).length,[f]),[Bt,Ut]=e.useState(0),zt=He?.category?(qe||[]).find(e=>e.id===He.category):null,$t=e.useCallback(e=>{if(!Ve)return;const t=He?.category||null;if(e){if(Ve({category:e,tags:[]}),Ut(Ft),!jt&&e!==t&&We){const t=(qe||[]).find(t=>t.id===e),n=t?.label||e,r=Je("categoryTopicsHeading").replace("{category}",n);We(r,{replaceMarker:"category-intro"})}}else Ve(null)},[Ve,He,Ft,qe,jt,We,Je]);e.useCallback(e=>{const t=He?.category||zt?.id;t&&Ve&&Ve({category:t,tags:[e]}),w&&w(e)},[He,zt,Ve,w]);const qt=Array.isArray(qe)&&qe.length>0,Gt=qt&&!jt&&!He?.category,Ht=!jt&&E.length>0&&A&&!He?.category,Vt=ye&&ye.length>0,Wt=Boolean(ke),Yt=Ne&&Vt&&!we,Kt=e.useCallback(async()=>{if(Wt&&!Ot&&!xt&&0!==Et){It(!0),Nt(!1);try{const e={"Content-Type":"application/json"};if("function"==typeof ge){const t=await ge();t&&(e.Authorization=`Bearer ${t}`)}const t=mr(Ee),n=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:e,credentials:"include",body:JSON.stringify({conversationId:me,rating:String(Et),ratingFormat:t,conciergeId:he,feedback:Tt||void 0})});n.ok?(St(!1),At(0),Ct(""),Ve&&Ve(null),ze?ze():_e&&_e()):(console.error("Failed to submit resolve feedback:",await n.text()),Nt(!0))}catch(e){console.error("Error submitting resolve feedback:",e),Nt(!0)}finally{It(!1)}}},[Wt,Ot,xt,Et,Tt,me,ge,he,pe,Ee,_e,ze,Ve]),Xt=e.useCallback(()=>{if(!Wt||!me||!jt)return Ve&&Ve(null),ze?ze():_e&&_e(),void k?.();wt?(St(!1),k?.()):xt?k?.():St(!0)},[Wt,me,jt,wt,xt,k,Ve,ze,_e]);e.useEffect(()=>{Wt||(wt&&St(!1),xt&&kt(!1),0!==Et&&At(0),Tt&&Ct(""))},[Wt,wt,xt,Et,Tt]);const Zt=e.useMemo(()=>{if(!f||!Array.isArray(f))return[];for(let e=f.length-1;e>=0;e-=1)if("assistant"===f[e]?.role){const t=f[e].prompts;return Array.isArray(t)?t:[]}return[]},[f]),Qt=e.useRef([]);e.useEffect(()=>{Zt.length>0?Qt.current=Zt:f&&0!==f.length&&f.some(e=>"user"===e.role)||(Qt.current=[])},[Zt,f]);const Jt=e.useRef(Ft);e.useEffect(()=>{Ft!==Jt.current&&(Jt.current=Ft,Qt.current=[])},[Ft]);const en=Array.isArray(f)&&f.some(e=>"user"===e?.role),tn=Zt.length>0?Zt:en?Qt.current:[];e.useEffect(()=>{if(!ke)return;if(!mt)return;if(bt)return;const e=Ze.current;if(!e)return;const t=window.requestAnimationFrame(()=>{e.scrollTo({top:e.scrollHeight,behavior:"smooth"})});return()=>{window.cancelAnimationFrame(t)}},[mt,ke,bt]);const nn=()=>{const e=mr(Ee);if("STARS"===e)return n.jsx("div",{className:"flex justify-center gap-2 mb-5",role:"group","aria-label":Je("rateExperience"),children:[1,2,3,4,5].map(e=>n.jsx("button",{"aria-label":`${Je("rate")} ${e}`,onClick:()=>At(e),className:"transition-all duration-150 hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",disabled:Ot,children:n.jsx(st,{className:ie("w-8 h-8 transition-colors",e<=Et?"text-yellow-400 drop-shadow-sm":a?"text-gray-600":"text-gray-300"),fill:e<=Et?"#FBBF24":"none"})},e))});if("THUMBS"===e)return n.jsx("div",{className:"flex gap-4 justify-center mb-5",role:"group","aria-label":Je("rateExperience"),children:[{value:"positive",emoji:"👍"},{value:"negative",emoji:"👎"}].map(e=>n.jsx("button",{"aria-label":"positive"===e.value?Je("thumbsUp"):Je("thumbsDown"),onClick:()=>At(e.value),disabled:Ot,className:ie("w-12 h-12 rounded-xl border flex items-center justify-center text-2xl transition-all hover:scale-105 active:scale-95",Et===e.value?"ring-2 ring-blue-300 scale-110 shadow-lg":"",a?"bg-gray-700 border-gray-600 hover:bg-gray-600":"bg-white border-gray-200 hover:bg-gray-50"),children:n.jsx("span",{className:"drop-shadow-md",children:e.emoji})},e.value))});return n.jsx("div",{className:"flex gap-2 justify-center items-center mb-5",role:"group","aria-label":Je("rateExperience"),children:[{value:1,emoji:"😡"},{value:2,emoji:"😕"},{value:3,emoji:"😐"},{value:4,emoji:"😊"},{value:5,emoji:"😍"}].map(e=>n.jsx("button",{"aria-label":`${Je("rate")} ${e.value}`,onClick:()=>At(e.value),disabled:Ot,className:ie("rounded-full w-10 h-10 flex items-center justify-center text-xl transition-all hover:scale-110 active:scale-95 bg-transparent border-0 p-0 cursor-pointer",Et===e.value?"ring-2 ring-blue-100 scale-125 bg-gradient-to-b from-yellow-200 to-yellow-400 shadow-md":"grayscale-[0.3] opacity-80 hover:grayscale-0"),children:n.jsx("span",{role:"img","aria-label":`${Je("rate")} ${e.value}`,className:"drop-shadow-sm filter",children:e.emoji})},e.value))})};if(!t)return null;const rn=!r&&ct?{width:ct.width,height:ct.height,maxWidth:"92vw",maxHeight:"85vh"}:void 0;return n.jsx(Xn.Provider,{value:rt,children:n.jsxs("div",{dir:_t?"rtl":"ltr",className:"relative flex-shrink-0 z-50 "+(r?"w-80 h-auto":""),style:rn,children:[!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{onMouseDown:e=>gt("horizontal",e),className:"absolute top-0 h-full w-1.5 cursor-ew-resize hover:bg-blue-500/20 transition-colors z-[70] "+(it?"left-0":"right-0"),"aria-hidden":!0}),n.jsx("div",{onMouseDown:e=>gt("vertical",e),className:"absolute left-0 w-full h-1.5 cursor-ns-resize hover:bg-blue-500/20 transition-colors z-[70] "+(lt?"top-0":"bottom-0"),"aria-hidden":!0})]}),n.jsxs("div",{id:"chat-window-panel",ref:Qe,role:"dialog","aria-modal":"true","aria-label":Je("openChat"),tabIndex:-1,className:`relative focus:outline-none ${ct||r?"":"w-[380px]"} ${ct||r?"":"h-[650px]"} ${r?"w-80 h-auto":""} ${ct&&!r?"w-full h-full":""} max-w-[92vw] border rounded-2xl shadow-2xl bg-white border-gray-200 flex flex-col ${r?"":"max-h-[85vh]"} overflow-hidden ${a?"bg-gray-900 border-gray-700":""}`,children:[!r&&n.jsx("div",{onMouseDown:e=>gt("corner",e),"aria-hidden":"true",className:`absolute w-4 h-4 ${it===lt?"cursor-nwse-resize":"cursor-nesw-resize"} text-gray-400 hover:text-blue-500 transition-colors z-[71] flex p-0.5 ${lt?"top-0 items-start":"bottom-0 items-end"} ${it?"left-0 justify-start":"right-0 justify-end"}`,children:n.jsx("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 "+(lt&&it?"rotate-180":lt?"-rotate-90":it?"rotate-90":""),"aria-hidden":!0,children:n.jsx("path",{d:"M11 1 L1 11 M11 5 L5 11 M11 9 L9 11",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"})})}),n.jsx(Un,{conciergeName:l,companyName:c,companyLogo:u,primaryColor:i,isDark:a,isMinimized:r,textColor:Lt,fontFamily:_,fontSize:j,onToggleTheme:S,onMinimize:x,onClose:Xt,headerTextBold:U,headerTextItalic:z,headerTextColor:$,headerFontFamily:q,headerFontSize:G,subtitle:V,showStatus:W,statusMode:Y,officeHours:K,onRefreshChat:ze,onCopyChat:$e,defaultLanguage:F,isHandedOff:Oe}),!r&&qt&&!Gt&&!(wt&&!xt)&&!(ve&&!we)&&n.jsx($n,{categories:qe,selectedCategoryId:He?.category||null,onSelect:$t,isDark:a,primaryColor:i,fontFamily:_,isRtl:_t,defaultLanguage:F}),!r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{ref:Ze,role:"log","aria-live":"polite",className:`chat-messages flex-1 overflow-y-auto px-3 py-4 space-y-4 ${a?"bg-gray-900":"bg-gradient-to-b from-gray-50/50 to-white"} break-words`,children:wt&&!xt?n.jsx("div",{className:"animate-in slide-in-from-top-4 fade-in duration-300 mt-4 mx-2",children:n.jsxs("div",{className:ie("w-full rounded-3xl p-6 shadow-lg",a?"bg-gray-800 shadow-black/20":"bg-white shadow-gray-200/80"),children:[n.jsx("p",{className:ie("text-sm font-medium text-center mb-5 [font-family:inherit]",a?"text-gray-300":"text-gray-500"),children:Ae||Je("feedbackPrompt")}),nn(),n.jsx("textarea",{"aria-label":Je("feedbackPlaceholder"),value:Tt,onChange:e=>{e.target.value.length<=1e3&&Ct(e.target.value)},maxLength:1e3,placeholder:Je("feedbackPlaceholder"),rows:4,disabled:Ot,className:ie("w-full rounded-xl border px-4 py-3 text-sm [font-family:inherit] resize-none outline-none transition-colors mb-5",a?"bg-gray-700 border-gray-600 text-gray-100 placeholder-gray-400":"bg-gray-50 border-gray-200 text-gray-900 placeholder-gray-400")}),n.jsxs("div",{className:"relative group",children:[n.jsx("button",{onClick:Kt,disabled:0===Et||Ot,"aria-describedby":0===Et?"resolve-rating-hint":void 0,className:ie("w-full py-3.5 rounded-xl text-sm font-semibold [font-family:inherit] transition-all duration-200 border-none outline-none focus:outline-none active:outline-none focus:ring-0 active:ring-0","disabled:opacity-50 disabled:cursor-not-allowed","focus-visible:ring-2 focus-visible:ring-blue-700",a?"bg-gray-700 text-gray-100 hover:bg-gray-600":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:Je(Ot?"submitting":"submitFeedback")}),0===Et&&!Ot&&n.jsx("div",{id:"resolve-rating-hint",role:"tooltip",className:"absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap px-2 py-1 rounded-md text-xs bg-gray-800 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:Je("selectRatingFirst")})]}),Rt&&!Ot&&n.jsxs("div",{role:"alert",className:"mt-3 text-center text-sm",children:[n.jsx("p",{className:a?"text-red-300":"text-red-700",children:Je("feedbackSendFailed")}),n.jsx("button",{type:"button",onClick:()=>{St(!1),Nt(!1)},className:ie("mt-1 underline bg-transparent border-none [font-family:inherit] focus-visible:ring-2 focus-visible:ring-blue-700",a?"text-gray-200":"text-gray-700"),children:Je("backToChat")})]})]})}):ve&&!we&&Se?n.jsx(zn,{questions:ye,onPromptSuggestionClick:ot,collapsiblePrompt:xe,onSubmit:Se,primaryColor:i,isRtl:_t,isDark:a,defaultLanguage:F,fontFamily:_}):n.jsxs(n.Fragment,{children:[Pe&&n.jsx("div",{role:"status",className:"mx-3 mt-1 mb-2 rounded-lg px-3 py-2 text-xs font-medium "+(a?"bg-amber-900/40 text-amber-200 border border-amber-700/50":"bg-amber-50 text-amber-800 border border-amber-200"),children:Je("sessionExpiringSoon")}),n.jsx(vn,{messages:f,liveJoined:Ce,handoffPoints:Ie,isDark:a,primaryColor:i,isLoading:g,agentMessageBubbleColor:O,userMessageBoxColor:I,textColor:s,assistantTextColor:R,userTextColor:N,fontFamily:_,agentMessageBubbleFontFamily:P,agentMessageBubbleFontSize:L,userMessageBubbleFontFamily:D,userMessageBubbleFontSize:M,fontSize:j,formatTime:gr,isRtl:_t,defaultLanguage:F,quickQuestions:E,shouldShowQuickQuestions:Ht,onQuickQuestion:T??w,quickQuestionsLayout:C,onDecision:B,disclaimerEnabled:ae,disclaimerText:oe,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,resolvedAgentBubbleColor:Pt,resolvedUserMessageColor:Dt,resolvedTextColor:Lt,isVoiceSessionActive:Q,voiceStatus:J,messagesContainerRef:Ze,companyLogo:u,chatbotAvatarEnabled:d,chatbotAvatar:p,conciergeName:l,companyName:c,apiBaseUrl:pe,getAuthToken:ge,onPromptSuggestionClick:ot,conversationResetKey:me,allowFeedback:je,provideCitations:Fe,onFeedback:Be,onRetryMessage:Ue,headerTextColor:$,beforePromptsSlot:Gt?n.jsx(qn,{categories:qe,selectedCategoryId:He?.category||null,onSelect:$t,isDark:a,primaryColor:i,fontFamily:_,fontSize:j,isRtl:_t,label:Je("chooseTopicLabel"),regionLabel:Je("categoryFilter")}):null,quickQuestionsHeadingLabel:qt?Je("quickQuestionsHeadingLabel"):void 0}),(mt&&ke||Te)&&!bt&&n.jsx("div",{className:"","data-testid":"widget-csat-card",children:n.jsx(Yn,{format:mr(Te?.format||Ee),prompt:Te?.prompt||Ae||Je("howWasYourExperience"),onRating:async(e,t)=>{vt(!0),ht(!1),(e=>{try{const t=be(e);if(!t)return;t.csatSubmitted=!0,localStorage.setItem(`${ce}_${e}`,JSON.stringify(t))}catch{}})(Xe);try{const n={"Content-Type":"application/json"};if("function"==typeof ge){const e=await ge();e&&(n.Authorization=`Bearer ${e}`)}const r=await fetch(`${pe.replace(/\/$/,"")}/api/v1/support/csat`,{method:"POST",headers:n,credentials:"include",body:JSON.stringify({conversationId:me,rating:e,ratingFormat:t,conciergeId:he})});r.ok||console.error("CSAT submission failed:",await r.text())}catch(e){console.error("CSAT submission error:",e)}},disabled:!1,isDark:a,primaryColor:i,defaultLanguage:F})})]})}),!(ve&&!we)&&n.jsx(_n,{onSynthesizeAssistantMessage:We,onStopGeneration:o,inputValue:h,setInputValue:b,onSend:y,isDark:a,primaryColor:i,isOpen:t,isMinimized:r,isLoading:g,isConversationLoading:m,verificationPending:et.size>0,placeholder:Mt,textColor:Lt,fontFamily:_,userMessageBubbleFontFamily:D,userMessageBubbleFontSize:M,fontSize:j,isRtl:_t,csatVisible:mt&&ke&&!bt||Wt&&(wt||xt),enableVoiceInteraction:X,isVoiceSessionActive:Q,voiceStatus:J,voiceError:ee,onVoiceToggle:ne,onBidiSubmit:re,disclaimerEnabled:ae,disclaimerText:oe,disclaimerPosition:se,disclaimerLinkUrl:le,disclaimerLinkLabel:ue,showPoweredBy:de,defaultLanguage:F,onboardingQuestions:ye,onboardingActive:ve,onboardingCompleted:we,onboardingEnabled:Ne,userMessageBoxColor:I,resolvedUserMessageColor:Dt,userTextColor:N,promptSuggestions:wt||xt||!1===Le||g?[]:tn,onPromptSuggestionClick:ot,autoPromptQuestionDisplay:De,tagSelectorNode:null,showResolveButton:Wt&&jt&&!xt&&!wt&&!mt&&!Yt,onResolve:()=>{Wt&&St(!0)},chatFeatures:Ke,apiEndpoint:pe,organizationId:Xe,conversationId:me})]})]})]})})},br=new Map;const yr={whatsapp:["wa.me","api.whatsapp.com"],telegram:["t.me"],messenger:["m.me"],instagram:["ig.me","instagram.com","www.instagram.com"]},vr={whatsapp:"WhatsApp",telegram:"Telegram",messenger:"Messenger",instagram:"Instagram"};const wr=e.forwardRef(({isDark:t,primaryColor:r,onToggle:a,textColor:o,headerTextColor:i,defaultLanguage:s="en",isOpen:l=!1,className:c,channelLinks:u},d)=>{const p=e.useMemo(()=>Z(s),[s]),f=e.useMemo(()=>function(e){if(!Array.isArray(e))return[];const t=[];for(let n=0;n<e.length;n+=1){const r=e[n];if(!r||"object"!=typeof r)continue;const a="string"==typeof r.type?r.type.toLowerCase():"",o=Object.prototype.hasOwnProperty.call(yr,a)?yr[a]:void 0;if(!o||"string"!=typeof r.url)continue;let i;try{i=new URL(r.url)}catch(e){continue}"https:"===i.protocol&&-1!==o.indexOf(i.hostname.toLowerCase())&&t.push({type:a,url:i.toString(),label:"string"==typeof r.label&&r.label.trim()?r.label.trim():vr[a]})}return t}(u),[u]),[g,m]=e.useState(!1),h=f.length>0,b=e.useRef(null),y=e.useRef(null),v=e.useCallback(e=>{y.current=e,"function"==typeof d?d(e):d&&(d.current=e)},[d]),w=h&&g&&!l;e.useEffect(()=>{w&&function(e,t=Mn){const[n]=Fn(e,t);n?.focus()}(b.current)},[w]);const S=r,x=i||"#FFFFFF",k={display:"block",width:"100%",padding:"8px 12px",textAlign:"start",fontSize:"14px",color:t?"#F1F5F9":"#0F172A",background:"transparent",border:"none",borderRadius:"6px",textDecoration:"none",cursor:"pointer"};return n.jsxs("div",{className:`relative ${c||""}`,children:[w&&n.jsxs("div",{ref:b,role:"menu","aria-label":p("chooseChannel"),tabIndex:-1,onKeyDown:e=>{if("Escape"===e.key)return e.preventDefault(),m(!1),void y.current?.focus();Bn(e,b.current)},"data-testid":"channel-picker",style:{position:"absolute",bottom:"76px",right:0,minWidth:"180px",padding:"6px",borderRadius:"8px",border:"1px solid "+(t?"#334155":"#E2E8F0"),background:t?"#1E293B":"#FFFFFF",boxShadow:"0 10px 30px rgba(15, 23, 42, 0.15)"},children:[n.jsx("button",{type:"button",role:"menuitem",style:k,onClick:()=>{m(!1),a?.()},children:p("chatHere")}),f.map(e=>n.jsx("a",{role:"menuitem",href:e.url,target:"_blank",rel:"noopener noreferrer",style:k,onClick:()=>m(!1),children:e.label},`${e.type}-${e.url}`))]}),n.jsxs("button",{ref:v,onClick:()=>{!h||l?a?.():m(e=>!e)},className:"group relative w-16 h-16 rounded-full shadow-2xl transition-all duration-300 flex items-center justify-center text-white overflow-hidden hover:scale-110",style:{background:`linear-gradient(135deg, ${S} 0%, ${S}dd 100%)`,boxShadow:`0 10px 30px ${S}40`,border:"none"},"aria-label":p(l?"closeChat":"openChat"),"aria-expanded":h&&g||l,"aria-haspopup":h?"menu":void 0,"aria-controls":"chat-window-panel",children:[n.jsx("div",{className:"absolute inset-0 rounded-full bg-white/20 scale-0 group-hover:scale-100 transition-transform duration-500"}),n.jsx("div",{className:"relative z-10 transition-transform duration-300",children:n.jsx(tt,{className:"w-7 h-7",style:{color:x}})})]})]})});wr.displayName="ToggleButton";const Sr="0.2.47",xr=function(e){if(null==e)return Er;if("function"==typeof e)return kr(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=xr(e[n]);return kr(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 kr(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return kr(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function kr(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function Er(){return!0}const Ar=[],Tr=!0,Cr=!1;function Or(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=xr(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=Ar;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Tr,e];return null==e?Ar:[e]}(n(a,l)),p[0]===Cr))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===Cr)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function Ir(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),Or(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)},a)}let Rr=null;const Nr=new Set;function _r(e,t){if("string"!=typeof e||""===e.trim())return!0;let n;try{n=new URL(e.trim(),t.apiOrigin||"http://relative.invalid")}catch{return!1}return!(!t.apiOrigin||n.origin!==t.apiOrigin)||"https:"===n.protocol&&!n.username&&!n.password&&t.hosts.has(n.hostname.toLowerCase())}function Pr(){return e=>{const t=Rr;t&&Ir(e,"element",(e,n,r)=>{if("img"!==e.tagName||!r||void 0===n)return;const a=e.properties&&e.properties.src;if(_r(a,t))return;if("report"===t.mode){let e=String(a);try{e=new URL(String(a)).host}catch{}return void(Nr.has(e)||(Nr.add(e),console.warn(`[eshal-widget] would block an image from ${e}`)))}const o=e.properties&&"string"==typeof e.properties.alt?e.properties.alt:"";return r.children.splice(n,1,{type:"text",value:o}),n})}}const Lr=({getAuthToken:t,apiBaseUrl:r,darkMode:a,primaryColor:o,position:i,companyName:s,conciergeName:l,companyLogo:c,welcomeMessage:u,quickQuestions:d,quickQuestionsEnabled:p,quickQuestionsLayout:f="vertical",textColor:g,agentMessageBubbleColor:m,userMessageBoxColor:h,assistantTextColor:b,userTextColor:y,fontFamily:v,fontSize:w,defaultLanguage:S,apiKey:x,agentMessageBubbleFontFamily:k,agentMessageBubbleFontSize:E,userMessageBubbleFontFamily:A,userMessageBubbleFontSize:T,autoOpen:C=!1,openDelay:O=0,locale:I,className:R="",headerTextBold:N,headerTextItalic:_,enableVoiceInteraction:P,disclaimerEnabled:L,disclaimerText:D,disclaimerPosition:M,disclaimerLinkUrl:j,disclaimerLinkLabel:F,showPoweredBy:B,onboardingQuestions:U,collectionPrompt:z,allowedDomains:$,onboardingEnabled:q,wsBaseUrl:G,channelLinks:H})=>{const[V,W]=e.useState(null),[Y,K]=e.useState(!0),[X,Z]=e.useState(null),[Q,J]=e.useState(!1),ee=e.useRef(!1);e.useEffect(()=>{if(ee.current)return;(async()=>{if(!r)return Z("apiBaseUrl is required"),void K(!1);try{K(!0);const e=await(async(e,t)=>{if(!e)throw new Error("apiBaseUrl is required");try{const n=e.replace(/\/$/,""),r=Sr?`${n}/api/v1/deploy-agent?wv=${encodeURIComponent(Sr)}`:`${n}/api/v1/deploy-agent`,a={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(a.Authorization=`Bearer ${e}`)}const o=await fetch(r,{method:"GET",headers:a,credentials:"include"});if(404===o.status)return null;if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);return await o.json()}catch(e){throw console.error("Failed to fetch agent configuration:",e),e}})(r,t);if(null===e)return ee.current=!0,J(!0),W(null),void Z(null);!function(e,t){if(!e||"report"!==e.mode&&"enforce"!==e.mode)return void(Rr=null);let n="";try{n=new URL(t).origin}catch{n=""}Rr={mode:e.mode,hosts:new Set((Array.isArray(e.hosts)?e.hosts:[]).map(e=>String(e).toLowerCase())),apiOrigin:n}}(e.chatImagePolicy,r),W(e),Z(null)}catch(e){console.error("Failed to load agent configuration:",e),Z(e.message||"Failed to load configuration")}finally{K(!1)}})()},[r,t]);const te=e.useMemo(()=>{if(!V)return null;const e=V.config??{},t=e.identity??{},n=e.branding??{},r=e.typography??{},f=e.messages??{},x=e.voice??{},C=e.onboarding??{},O=e.disclaimer??{},I=e.csat??{},R=e.inactivity??{},G=e.behavior??{},W=e.security??{},Y=e.layout??{},K=function(e,t){return e??t?.defaultLocale??t?.config?.messages?.defaultLocale??"en"}(S,V),X=f.bundles?.[K]??{},Z=f.bundles?.en??{},Q={welcome:X.welcome||Z.welcome,fallback:X.fallback||Z.fallback,quickQuestions:Array.isArray(X.quickQuestions)&&X.quickQuestions.length>0?X.quickQuestions:Z.quickQuestions},J=$??W.allowedDomains??(W.domains??[]).map(e=>"string"==typeof e?e:e.domain).filter(Boolean)??[];return{darkMode:a??!1,primaryColor:o??n.brandColor??"#2563eb",companyName:s??t.companyName??"Support Team",conciergeName:l??t.conciergeName,companyLogo:c??n.avatar??null,chatbotAvatarEnabled:n.chatbotAvatarEnabled??!1,chatbotAvatar:n.chatbotAvatar??null,welcomeMessage:u??Q.welcome??"Hi! How can we help?",fallbackMessage:Q.fallback,quickQuestions:d??Q.quickQuestions??[],quickQuestionsEnabled:p??f.quickQuestionsEnabled,textColor:g??"#000000",agentMessageBubbleColor:m??r.agentMessageBubbleColor,userMessageBoxColor:h??r.userMessageBoxColor,assistantTextColor:b??r.assistantTextColor??"#000000",userTextColor:y??r.userTextColor??"#000000",fontFamily:v??r.agentMessageBubbleFontFamily??"Inter",fontSize:w??r.agentMessageBubbleFontSize??"14px",defaultLanguage:K,headerTextBold:N??r.headerTextBold??!1,headerTextItalic:_??r.headerTextItalic??!1,headerTextColor:r.headerTextColor??"#FFFFFF",headerFontFamily:r.headerFontFamily,headerFontSize:r.headerFontSize,subtitle:t.subtitle??null,showStatus:t.showStatus??!1,statusMode:t.statusMode??"always",officeHours:t.officeHours??null,enableVoiceInteraction:P??x.enableVoiceInteraction??!1,disclaimerEnabled:L??O.enabled??!1,disclaimerText:D??O.text,disclaimerPosition:M??(ee=O.position,ee?ee.toLowerCase():"top"),disclaimerLinkUrl:oe(j??O.linkUrl),disclaimerLinkLabel:F??O.linkLabel,showPoweredBy:B??n.showPoweredBy??!0,onboardingQuestions:U??C.questions??[],collectionPrompt:z??C.collapsiblePrompt??"Before we begin, I need to verify your details.",allowedDomains:J,launcherPosition:i??(e=>e?e.toLowerCase().replace(/_/g,"-"):"bottom-right")(Y.launcherPosition),onboardingEnabled:q??C.enabled??!1,inactivityTimeoutValue:R.timeoutValue??null,inactivityTimeoutUnit:R.timeoutUnit??null,agentMessageBubbleFontFamily:k??r.agentMessageBubbleFontFamily??v??"Inter",agentMessageBubbleFontSize:E??r.agentMessageBubbleFontSize??w??"14px",userMessageBubbleFontFamily:A??r.userMessageBubbleFontFamily??v??"Inter",userMessageBubbleFontSize:T??r.userMessageBubbleFontSize??w??"14px",csatEnabled:I.enabled??!1,csatFormat:I.format??"EMOJI",csatPrompt:I.prompt??"How was your experience?",autoPromptEnabled:G.autoPromptEnabled??!0,autoPromptQuestionDisplay:G.autoPromptQuestionDisplay??!0,autoPromptClickTelemetry:G.autoPromptClickTelemetry??!0,allowFeedback:G.allowFeedback??!0,provideCitations:G.provideCitations??!0,organizationId:V.organizationId??null,chatFeatures:e.chatFeatures??null,channelLinks:H??e.channelLinks??null};var ee},[H,V,a,o,i,s,l,c,u,d,p,g,m,h,b,y,v,w,S,N,_,P,L,D,M,F,j,B,U,q,z,$,k,E,A,T]),ne=e.useMemo(()=>!te||((e=[])=>{if("undefined"==typeof window)return!1;const t=window.location.hostname.toLowerCase(),n=window.location.host.toLowerCase();return!(!e||0===e.length)&&e.some(e=>{const r=e.toLowerCase().trim();return r.includes(":")?n===r:t===r||t.endsWith("."+r)})})(te.allowedDomains),[te]),re=e.useMemo(()=>({welcomeMessage:"Hi! How can we help?",quickQuestions:[],apiBaseUrl:r||"",apiKey:x||"",getAuthToken:t,autoOpen:!1,openDelay:0,darkMode:!1,enableVoiceInteraction:!1,onboardingQuestions:[],onboardingEnabled:!1,collectionPrompt:void 0}),[r,x,t]),{isOpen:ae,isMinimized:ie,isDark:se,messages:le,inputValue:ce,isLoading:ue,widgetRef:de,setInputValue:pe,handleSend:fe,stopGeneration:ge,handleQuickQuestion:me,sendMessage:he,retryMessage:be,toggleChat:ye,toggleTheme:ve,toggleMinimize:we,closeChat:Se,handleDecision:xe,isVoiceSessionActive:ke,voiceStatus:Ee,voiceError:Ae,voiceConclusionForCsat:Te,handleVoiceToggle:Ce,sendBidiTextMessage:Oe,onboardingActive:Ie,onboardingCompleted:Re,handleOnboardingFormSubmit:Ne,conversationId:_e,resetConversation:Le,sessionExpiringSoon:De,updateMessageFeedback:Me,widgetFilter:je,setWidgetFilter:Fe,addAssistantMessage:Be,csatRequest:Ue,liveJoined:ze,isHandedOff:$e,handoffPoints:qe}=Pe(te?{welcomeMessage:te.welcomeMessage,fallbackMessage:te.fallbackMessage,quickQuestions:te.quickQuestions,apiBaseUrl:r,wsBaseUrl:G??V?.wsBaseUrl,apiKey:x,locale:te.defaultLanguage||I,organizationId:te.organizationId,getAuthToken:t,autoOpen:C,openDelay:O,darkMode:te.darkMode,enableVoiceInteraction:te.enableVoiceInteraction,onboardingQuestions:te.onboardingQuestions,onboardingEnabled:te.onboardingEnabled,collectionPrompt:te.collectionPrompt,provideCitations:te.provideCitations,inactivityTimeoutValue:te.inactivityTimeoutValue,inactivityTimeoutUnit:te.inactivityTimeoutUnit,messageLimits:V?.messageLimits}:re),Ge=e.useRef(null),He=e.useRef(ae);e.useEffect(()=>{He.current&&!ae&&Ge.current?.focus(),He.current=ae},[ae]);const Ve=e.useCallback((e,n,a)=>{if(Me(e,n),!_e||!r)return;const o=r.replace(/\/$/,"");(async()=>{try{const r={"Content-Type":"application/json"};if("function"==typeof t){const e=await t();e&&(r.Authorization=`Bearer ${e}`)}await fetch(`${o}/api/v1/support/feedback`,{method:"POST",headers:r,credentials:"include",body:JSON.stringify({messageContent:e,conversationId:_e,feedback:n,feedbackText:a})})}catch(e){console.error("Feedback submission error:",e)}})()},[_e,r,t,Me]),We=e.useCallback(()=>{Le&&Le()},[Le]),{categories:Ye,hasFilters:Ke}=function(t,n){const r=!!t,[a,o]=e.useState({categories:[],loading:r,error:null});e.useEffect(()=>{if(!t)return void o({categories:[],loading:!1,error:null});const e=n?`${t}|__session__`:`${t}|__proxy__`,r=br.get(e);if(r)return void o({categories:r,loading:!1,error:null});let a=!1;o(e=>({...e,loading:!0,error:null}));const i=`${t.replace(/\/$/,"")}/api/v1/widget/filters`;return(async()=>{try{const t={Accept:"application/json"};if("function"==typeof n){const e=await n();e&&(t.Authorization=`Bearer ${e}`)}const r=await fetch(i,{method:"GET",headers:t});if(!r.ok)throw new Error(`filter catalog HTTP ${r.status}`);const s=await r.json(),l=Array.isArray(s?.categories)?s.categories:[];if(a)return;br.set(e,l),o({categories:l,loading:!1,error:null})}catch(e){if(a)return;console.warn("[useFilterCatalog] catalog fetch failed:",e),o({categories:[],loading:!1,error:e})}})(),()=>{a=!0}},[t,n]);const i=e.useMemo(()=>Array.isArray(a.categories)&&a.categories.length>0,[a.categories]);return{...a,hasFilters:i}}(r,t),Xe=e.useCallback(()=>{const e=function(e,t){if(!Array.isArray(e))return"";const n=t||"Assistant",r=[];for(let t=0;t<e.length;t++){const a=e[t];if(!a||"string"!=typeof a.content)continue;const o=At(a.content);o&&""!==o.trim()&&r.push(("user"===a.role?"You":n)+": "+o)}return r.join("\n\n")}(le,te?.conciergeName);e&&navigator.clipboard.writeText(e).catch(()=>{})},[le,te?.conciergeName]);if(e.useEffect(()=>{de.current&&te&&(de.current.style.setProperty("--cw-primary",te.primaryColor),te.fontFamily&&de.current.style.setProperty("--cw-font-family",te.fontFamily),te.textColor&&de.current.style.setProperty("--cw-text-color",te.textColor))},[te,de]),Y)return null;if(Q)return null;if(X||!te)return console.error("ChatWidget configuration error:",X),null;if(!ne)return null;const Ze={"bottom-right":"bottom-5 right-5","bottom-left":"bottom-5 left-5","top-right":"top-5 right-5","top-left":"top-5 left-5"};return n.jsx("div",{id:"chat-widget-root",children:n.jsxs("div",{ref:de,className:`chat-widget-root fixed flex flex-col ${te.launcherPosition?.includes("left")?"items-start":"items-end"} z-[999999] ${se?"dark":""} ${R} ${Ze[te.launcherPosition]||Ze["bottom-right"]}`,children:[n.jsx(hr,{isOpen:ae,isMinimized:ie,isDark:se,launcherPosition:te.launcherPosition,primaryColor:te.primaryColor,textColor:te.textColor,companyName:te.companyName,conciergeName:te.conciergeName,companyLogo:te.companyLogo,chatbotAvatarEnabled:te.chatbotAvatarEnabled,chatbotAvatar:te.chatbotAvatar,messages:le,isLoading:ue,inputValue:ce,setInputValue:pe,onSend:fe,onStopGeneration:ge,onDirectSend:he,onToggleTheme:ve,onMinimize:we,onClose:Se,quickQuestions:te.quickQuestions,quickQuestionsEnabled:te.quickQuestionsEnabled,onQuickQuestion:me,quickQuestionsLayout:f,agentMessageBubbleColor:te.agentMessageBubbleColor,userMessageBoxColor:te.userMessageBoxColor,assistantTextColor:te.assistantTextColor,userTextColor:te.userTextColor,fontFamily:te.fontFamily,agentMessageBubbleFontFamily:te.agentMessageBubbleFontFamily,agentMessageBubbleFontSize:te.agentMessageBubbleFontSize,userMessageBubbleFontFamily:te.userMessageBubbleFontFamily,userMessageBubbleFontSize:te.userMessageBubbleFontSize,fontSize:te.fontSize,defaultLanguage:te.defaultLanguage||I,onDecision:xe,headerTextBold:te.headerTextBold,headerTextItalic:te.headerTextItalic,headerTextColor:te.headerTextColor,headerFontFamily:te.headerFontFamily,headerFontSize:te.headerFontSize,subtitle:te.subtitle,showStatus:te.showStatus,statusMode:te.statusMode,officeHours:te.officeHours,enableVoiceInteraction:te.enableVoiceInteraction,isVoiceSessionActive:ke,voiceStatus:Ee,voiceError:Ae,voiceConclusionForCsat:Te,onVoiceToggle:Ce,onBidiSubmit:()=>Oe(ce),disclaimerEnabled:te.disclaimerEnabled,disclaimerText:te.disclaimerText,disclaimerPosition:te.disclaimerPosition,disclaimerLinkUrl:te.disclaimerLinkUrl,disclaimerLinkLabel:te.disclaimerLinkLabel,showPoweredBy:te.showPoweredBy,apiBaseUrl:r,apiKey:x,getAuthToken:t,conversationId:_e,conciergeId:V?.conciergeId??V?.id,onboardingQuestions:te.onboardingQuestions,onboardingActive:Ie,onboardingCompleted:Re,onOnboardingFormSubmit:Ne,collectionPrompt:te.collectionPrompt,csatEnabled:te.csatEnabled,csatFormat:te.csatFormat,csatPrompt:te.csatPrompt,csatRequest:Ue,liveJoined:ze,isHandedOff:$e,handoffPoints:qe,onboardingEnabled:te.onboardingEnabled,onResetConversation:Le,sessionExpiringSoon:De,autoPromptEnabled:te.autoPromptEnabled,autoPromptQuestionDisplay:te.autoPromptQuestionDisplay,autoPromptClickTelemetry:te.autoPromptClickTelemetry,allowFeedback:te.allowFeedback,provideCitations:te.provideCitations,onFeedback:Ve,onRetryMessage:be,onRefreshChat:We,onCopyChat:Xe,filterCategories:Ye,showFilterStep:Ke,widgetFilter:je,onWidgetFilterChange:Fe,onSynthesizeAssistantMessage:Be,chatFeatures:te.chatFeatures,organizationId:te.organizationId}),n.jsx(wr,{ref:Ge,isDark:se,primaryColor:te.primaryColor,onToggle:ye,textColor:te.textColor,headerTextColor:te.headerTextColor,defaultLanguage:te.defaultLanguage||I,isOpen:ae,className:ae?"hidden":void 0,channelLinks:te.channelLinks})]})})};var Dr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Mr={exports:{}};function jr(e){try{const t=window[e];return t.setItem("__ft__","1"),t.removeItem("__ft__"),"1"}catch{return"0"}}function Fr(){try{return Array.from(navigator.plugins||[]).map(e=>`${e.name}::${e.filename}`).sort().join("|")}catch{return""}}function Br(){try{return Array.from(navigator.mimeTypes||[]).map(e=>e.type).sort().join("|")}catch{return""}}function Ur(){try{const e=document.createElement("canvas");e.width=240,e.height=60;const t=e.getContext("2d");return t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(125,1,62,20),t.fillStyle="#069",t.font="11pt no-real-font-abc",t.fillText("user-trace:canvas,🔍<canvas>",2,15),t.fillStyle="rgba(102,204,0,0.7)",t.font="18pt Arial",t.fillText("user-trace:canvas,🔍<canvas>",4,45),e.toDataURL().slice(-50)}catch{return"nocanvas"}}function zr(){try{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl");if(!t)return"nowebgl";const n=t.getExtension("WEBGL_debug_renderer_info"),r=n?t.getParameter(n.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR);return`${r}::${n?t.getParameter(n.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}`}catch{return"nowebgl"}}function $r(){const e=["Arial","Courier New","Georgia","Times New Roman","Verdana","Helvetica","Comic Sans MS","Impact","Tahoma","Trebuchet MS","Palatino Linotype","Lucida Console","Lucida Sans Unicode","MS Sans Serif","MS Serif","Symbol","Wingdings","Franklin Gothic Medium","Book Antiqua","Garamond","Calibri","Cambria","Consolas","Candara","Optima","Segoe UI","Gill Sans","Century Gothic","Futura"];try{const t=document.createElement("canvas").getContext("2d"),n="monospace",r="mmmmmmmmmmlli",a="72px";t.font=`${a} ${n}`;const o=t.measureText(r).width;return e.filter(e=>(t.font=`${a} '${e}', ${n}`,t.measureText(r).width!==o)).join(",")}catch{return""}}function qr(){try{return window.OfflineAudioContext||window.webkitOfflineAudioContext?"audio-supported":"noaudio"}catch{return"noaudio"}}var Gr={generateFingerprint:function(){const e=function(){const e=navigator||{},t=screen||{};return{userAgent:e.userAgent||"",language:e.language||"",languages:(e.languages||[]).join(","),platform:e.platform||"",hardwareConcurrency:e.hardwareConcurrency||0,deviceMemory:e.deviceMemory||0,maxTouchPoints:e.maxTouchPoints||0,cookieEnabled:e.cookieEnabled?"1":"0",doNotTrack:e.doNotTrack||"unknown",screenWidth:t.width||0,screenHeight:t.height||0,colorDepth:t.colorDepth||0,pixelDepth:t.pixelDepth||0,devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1,timezoneOffset:(new Date).getTimezoneOffset(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",sessionStorage:jr("sessionStorage"),localStorage:jr("localStorage"),indexedDB:"undefined"!=typeof indexedDB?"1":"0",cpuClass:e.cpuClass||"unknown",oscpu:e.oscpu||"unknown",vendor:e.vendor||"",vendorSub:e.vendorSub||"",productSub:e.productSub||"",plugins:Fr(),mimeTypes:Br(),canvas:Ur(),webgl:zr(),fonts:$r(),audioContext:qr()}}(),t=function(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t^e.charCodeAt(n),t&=t;return(t>>>0).toString(16).padStart(8,"0")}(Object.values(e).join("|||")),n=["nocanvas"!==e.canvas,"nowebgl"!==e.webgl&&""!==e.webgl,""!==e.fonts,""!==e.plugins,e.hardwareConcurrency>0,""!==e.timezone];return{id:t,signals:e,confidence:Math.round(n.filter(Boolean).length/n.length*100)}}};const Hr=[{url:"https://api.ipify.org?format=json",parse:e=>e.ip},{url:"https://api64.ipify.org?format=json",parse:e=>e.ip},{url:"https://api.my-ip.io/v2/ip.json",parse:e=>e.ip},{url:"https://ipapi.co/json/",parse:e=>e.ip}];async function Vr(e,t=4e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}function Wr(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[0-9a-f:]{2,39}$/i.test(e)}var Yr={detectIP:async function(){for(const e of Hr)try{const t=await Vr(e.url),n=e.parse(t);if(n&&Wr(n))return{ip:n,source:new URL(e.url).hostname}}catch{}return null},getIPVersion:function(e){return e?/^(\d{1,3}\.){3}\d{1,3}$/.test(e)?"v4":/^[0-9a-f:]{2,39}$/i.test(e)?"v6":"unknown":"unknown"}};let Kr={apiKeys:{},preferredProvider:null,timeoutMs:5e3};function Xr(e={}){const t=[e.ipinfo&&{name:"ipinfo.io",tier:"free-with-key",freeLimit:"50,000 req/month",signup:"https://ipinfo.io/signup",buildUrl:t=>`https://ipinfo.io/${t}/json?token=${e.ipinfo}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");const[t,n]=(e.loc||"0,0").split(",").map(Number);return{ip:e.ip||"",country:e.country||"",countryCode:e.country||"",region:e.region||"",regionCode:"",city:e.city||"",zip:e.postal||"",latitude:t,longitude:n,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},e.ipgeolocation&&{name:"ipgeolocation.io",tier:"free-with-key",freeLimit:"1,000 req/day",signup:"https://ipgeolocation.io/signup.html",buildUrl:t=>`https://api.ipgeolocation.io/ipgeo?apiKey=${e.ipgeolocation}&ip=${t}`,parse:e=>{if(e.message)throw new Error(e.message);return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code2||"",region:e.state_prov||"",regionCode:e.state_code||"",city:e.city||"",zip:e.zipcode||"",latitude:parseFloat(e.latitude)||0,longitude:parseFloat(e.longitude)||0,timezone:e.time_zone?.name||"",isp:e.isp||"",org:e.organization||"",proxy:e.security?.is_proxy||!1,hosting:e.security?.is_hosting||!1}}},e.abstractapi&&{name:"abstractapi.com",tier:"free-with-key",freeLimit:"20,000 req/month",signup:"https://app.abstractapi.com/users/signup?target=/api/ip-geolocation",buildUrl:t=>`https://ipgeolocation.abstractapi.com/v1/?api_key=${e.abstractapi}&ip_address=${t}`,parse:e=>{if(e.error)throw new Error(e.error.message||"Failed");return{ip:e.ip_address||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_iso_code||"",city:e.city||"",zip:e.postal_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.name||"",isp:e.connection?.isp_name||"",org:e.connection?.org_name||"",proxy:e.security?.is_vpn||!1,hosting:e.security?.is_hosting||!1}}},e.ip2location&&{name:"ip2location.io",tier:"free-with-key",freeLimit:"30,000 req/month",signup:"https://www.ip2location.io/sign-up",buildUrl:t=>`https://api.ip2location.io/?key=${e.ip2location}&ip=${t}&format=json`,parse:e=>{if(e.error)throw new Error(e.error.error_message||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:"",city:e.city_name||"",zip:e.zip_code||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone||"",isp:e.isp||"",org:e.domain||"",proxy:e.is_proxy||!1,hosting:!1}}},e.ipstack&&{name:"ipstack.com",tier:"free-with-key",freeLimit:"100 req/month",signup:"https://ipstack.com/product",buildUrl:t=>`https://api.ipstack.com/${t}?access_key=${e.ipstack}`,parse:e=>{if(e.error)throw new Error(e.error.info||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region_name||"",regionCode:e.region_code||"",city:e.city||"",zip:e.zip||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.time_zone?.id||"",isp:e.connection?.isp||"",org:"",proxy:!1,hosting:!1}}}].filter(Boolean),n=[{name:"ip-api.com",tier:"free",freeLimit:"45 req/min (no key needed)",buildUrl:e=>`https://ip-api.com/json/${e}?fields=status,message,country,countryCode,region,regionName,city,zip,lat,lon,timezone,isp,org,proxy,hosting,query`,parse:e=>{if("success"!==e.status)throw new Error(e.message||"Failed");return{ip:e.query||"",country:e.country||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.region||"",city:e.city||"",zip:e.zip||"",latitude:e.lat||0,longitude:e.lon||0,timezone:e.timezone||"",isp:e.isp||"",org:e.org||"",proxy:e.proxy||!1,hosting:e.hosting||!1}}},{name:"ipwho.is",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://ipwho.is/${e}`,parse:e=>{if(!e.success)throw new Error(e.message||"Failed");return{ip:e.ip||"",country:e.country||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone?.id||"",isp:e.connection?.isp||"",org:e.connection?.org||"",proxy:!1,hosting:!1}}},{name:"ipapi.co",tier:"free",freeLimit:"1,000 req/day (no key needed)",buildUrl:e=>`https://ipapi.co/${e}/json/`,parse:e=>{if(e.error)throw new Error(e.reason||"Failed");return{ip:e.ip||"",country:e.country_name||"",countryCode:e.country_code||"",region:e.region||"",regionCode:e.region_code||"",city:e.city||"",zip:e.postal||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timezone||"",isp:e.org||"",org:e.org||"",proxy:!1,hosting:!1}}},{name:"freeipapi.com",tier:"free",freeLimit:"unlimited (fair use, no key needed)",buildUrl:e=>`https://freeipapi.com/api/json/${e}`,parse:e=>({ip:e.ipAddress||"",country:e.countryName||"",countryCode:e.countryCode||"",region:e.regionName||"",regionCode:e.regionCode||"",city:e.cityName||"",zip:e.zipCode||"",latitude:e.latitude||0,longitude:e.longitude||0,timezone:e.timeZone||"",isp:"",org:"",proxy:!1,hosting:!1})}],r=["freeipapi.com","ipwho.is","ipapi.co","ip-api.com"];return n.sort((e,t)=>r.indexOf(e.name)-r.indexOf(t.name)),[...t,...n]}async function Zr(e,t=5e3){const n=new AbortController,r=setTimeout(()=>n.abort(),t);try{const t=await fetch(e,{signal:n.signal});if(!t.ok)throw new Error(`HTTP ${t.status}`);return await t.json()}finally{clearTimeout(r)}}const Qr={enableHighAccuracy:!0,timeout:8e3,maximumAge:3e5};function Jr(e={}){return new Promise(t=>"undefined"!=typeof navigator&&navigator.geolocation?"undefined"!=typeof window&&!1===window.isSecureContext?t(null):void navigator.geolocation.getCurrentPosition(e=>t({latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy:e.coords.accuracy}),()=>t(null),{...Qr,...e}):t(null))}async function ea(e,t,n={}){if("number"!=typeof e||"number"!=typeof t)return null;const r=n.timeoutMs||Kr.timeoutMs||5e3,a=`https://api.bigdatacloud.net/data/reverse-geocode-client?latitude=${e}&longitude=${t}&localityLanguage=${n.localityLanguage||"en"}`;try{const n=await Zr(a,r),o=n.city||n.locality||"";return o||n.countryName?{city:o,region:n.principalSubdivision||"",regionCode:(n.principalSubdivisionCode||"").split("-").pop()||"",country:n.countryName||"",countryCode:n.countryCode||"",latitude:e,longitude:t}:null}catch{return null}}var ta={configureGeo:function(e={}){e.apiKeys&&(Kr.apiKeys={...Kr.apiKeys,...e.apiKeys}),void 0!==e.preferredProvider&&(Kr.preferredProvider=e.preferredProvider),void 0!==e.timeoutMs&&(Kr.timeoutMs=e.timeoutMs)},resolveLocation:async function(e,t={}){const n={apiKeys:{...Kr.apiKeys,...t.apiKeys||{}},preferredProvider:t.preferredProvider||Kr.preferredProvider,timeoutMs:t.timeoutMs||Kr.timeoutMs};let r=Xr(n.apiKeys);if(n.preferredProvider){const e=r.findIndex(e=>e.name===n.preferredProvider);if(e>0){const[t]=r.splice(e,1);r.unshift(t)}}for(const t of r)try{const r=await Zr(t.buildUrl(e),n.timeoutMs);return{...t.parse(r),source:t.name,tier:t.tier}}catch{}return null},listProviders:function(e={}){return Xr({...Kr.apiKeys,...e}).map(({name:e,tier:t,freeLimit:n,signup:r})=>({name:e,tier:t,freeLimit:n,signup:r||"—"}))},getBrowserGeolocation:Jr,getGeolocationPermission:async function(){try{if("undefined"==typeof navigator||!navigator.permissions||!navigator.permissions.query)return"unsupported";return(await navigator.permissions.query({name:"geolocation"})).state}catch{return"unsupported"}},reverseGeocode:ea,getBrowserLocation:async function(e={}){const t=await Jr(e);if(!t)return null;const n=await ea(t.latitude,t.longitude,e),r=!(!n||!n.city&&!n.country);return{...r?n:{},latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy,...r?{source:"gps"}:{}}},toMapsUrl:function(e,t){return`https://www.google.com/maps?q=${e},${t}`}};const na="__ut_sid__",ra="__ut_uid__",aa="__ut_meta__";function oa(){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;const t=Array.from(e).map(e=>e.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")}function ia(e,t){try{return e.getItem(t)}catch{return null}}function sa(e,t,n){try{return e.setItem(t,n),!0}catch{return!1}}var la={getOrCreateUserID:function(){let e=ia(localStorage,ra),t=!1;return e||(e=oa(),t=!0,sa(localStorage,ra,e)),{uid:e,isNew:t}},getOrCreateSessionID:function(){let e=ia(sessionStorage,na),t=!1;return e||(e=oa(),t=!0,sa(sessionStorage,na,e)),{sid:e,isNew:t}},saveSessionMeta:function(e){try{const t=JSON.stringify({...e,savedAt:(new Date).toISOString()});sa(localStorage,aa,t)}catch{}},loadSessionMeta:function(){try{const e=ia(localStorage,aa);return e?JSON.parse(e):null}catch{return null}},clearSession:function(){try{localStorage.removeItem(ra)}catch{}try{localStorage.removeItem(aa)}catch{}try{sessionStorage.removeItem(na)}catch{}},getBrowserContext:function(){return{userAgent:navigator.userAgent,platform:navigator.platform||"unknown",language:navigator.language||"unknown",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenRes:`${screen.width}x${screen.height}`,viewportRes:`${window.innerWidth}x${window.innerHeight}`,colorDepth:screen.colorDepth,touchSupport:navigator.maxTouchPoints>0,cookieEnabled:navigator.cookieEnabled,referrer:document.referrer||null,currentUrl:window.location.href,loadedAt:(new Date).toISOString()}}};const{generateFingerprint:ca}=Gr,{detectIP:ua,getIPVersion:da}=Yr,{configureGeo:pa,resolveLocation:fa,listProviders:ga,getBrowserGeolocation:ma,getGeolocationPermission:ha,reverseGeocode:ba,getBrowserLocation:ya,toMapsUrl:va}=ta,{getOrCreateUserID:wa,getOrCreateSessionID:Sa,saveSessionMeta:xa,loadSessionMeta:ka,clearSession:Ea,getBrowserContext:Aa}=la;Mr.exports=class{constructor(e={}){this._options={onReady:e.onReady||null,onError:e.onError||null,geoFromBrowser:void 0===e.geoFromBrowser||e.geoFromBrowser,geoApiKeys:e.geoApiKeys||null,geoOptions:e.geoOptions||null,cache:!1!==e.cache,maxAgeMs:e.maxAgeMs||3e5,autoInit:e.autoInit||!1,webhookUrl:e.webhookUrl||null},this.profile=null,this._ready=!1,this._options.autoInit&&this.init().catch(()=>{})}async init(){if(this._options.cache){const e=ka();if(e&&e.savedAt){if(Date.now()-new Date(e.savedAt).getTime()<this._options.maxAgeMs)return this.profile=e,this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}}try{const{uid:e,isNew:t}=wa(),{sid:n,isNew:r}=Sa(),{id:a,signals:o,confidence:i}=ca(),s=this._options.geoApiKeys?{apiKeys:this._options.geoApiKeys}:{},[l,c]=await Promise.all([(async()=>{const e=await ua(),t=e?.ip||"unknown",n="unknown"!==t?await fa(t,s):null;return{ip:t,ipVersion:e?da(t):"unknown",geo:n}})(),this._collectBrowserLocation()]),{ip:u,ipVersion:d}=l;let p=l.geo,f=null;c&&(f={latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy},"gps"===c.source&&(p={...p||{},...c}));const g=Aa();return this.profile={uid:e,sid:n,isNewUser:t,isNewSession:r,fingerprintId:a,fingerprintConfidence:i,ip:u,ipVersion:d,geo:p||null,browserGeo:f||null,browser:g,raw:o,createdAt:(new Date).toISOString(),...p?{mapsUrl:va(p.latitude,p.longitude)}:{}},xa(this.profile),this._options.webhookUrl&&this._sendToWebhook(this.profile),this._ready=!0,this._options.onReady&&this._options.onReady(this.profile),this.profile}catch(e){throw this._options.onError&&this._options.onError(e),e}}async _collectBrowserLocation(){const e=this._options.geoFromBrowser;if(!e)return null;if("auto"===e){if("granted"!==await ha())return null}return ya(this._options.geoOptions||{})}async captureBrowserLocation(e={}){const t=await ya({...this._options.geoOptions||{},...e});return t&&this.profile?(this.profile.browserGeo={latitude:t.latitude,longitude:t.longitude,accuracy:t.accuracy},this.profile.mapsUrl=va(t.latitude,t.longitude),"gps"===t.source&&(this.profile.geo={...this.profile.geo||{},...t}),xa(this.profile),this._options.onReady&&this._options.onReady(this.profile),this.profile):this.profile}getProfile(){return this.profile}isKnownUser(e){return this.profile?.uid===e}async refresh(){return Ea(),this.profile=null,this._ready=!1,this.init()}clear(){Ea(),this.profile=null,this._ready=!1}getSummary(){if(!this.profile)return null;const{uid:e,sid:t,fingerprintId:n,ip:r,geo:a,browser:o,createdAt:i}=this.profile;return{uid:e,sid:t,fingerprintId:n,ip:r,country:a?.country||"unknown",city:a?.city||"unknown",isp:a?.isp||"unknown",proxy:a?.proxy||!1,timezone:a?.timezone||o.timezone,userAgent:o.userAgent,language:o.language,createdAt:i}}async _sendToWebhook(e){try{await fetch(this._options.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch{}}};var Ta=Mr.exports.generateFingerprint=ca,Ca=Mr.exports.detectIP=ua,Oa=Mr.exports.configureGeo=pa,Ia=Mr.exports.resolveLocation=fa,Ra=Mr.exports.listProviders=ga,Na=Mr.exports.getBrowserGeolocation=ma,_a=Mr.exports.getGeolocationPermission=ha,Pa=Mr.exports.reverseGeocode=ba,La=Mr.exports.getBrowserLocation=ya,Da=Mr.exports.getOrCreateUserID=wa,Ma=Mr.exports.getOrCreateSessionID=Sa,ja=Mr.exports.clearSession=Ea,Fa=Mr.exports.getBrowserContext=Aa,Ba=Mr.exports,Ua=o({__proto__:null,clearSession:ja,configureGeo:Oa,default:Ba,detectIP:Ca,generateFingerprint:Ta,getBrowserContext:Fa,getBrowserGeolocation:Na,getBrowserLocation:La,getGeolocationPermission:_a,getOrCreateSessionID:Ma,getOrCreateUserID:Da,listProviders:Ra,resolveLocation:Ia,reverseGeocode:Pa},[Ba]),za={exports:{}};!function(e){!function(){function t(e,t,n){return e.call.apply(e.bind,arguments)}function n(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function r(e,a,o){return(r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?t:n).apply(null,arguments)}var a=Date.now||function(){return+new Date};function o(e,t){this.a=e,this.o=t||e,this.c=this.o.document}var i=!!window.FontFace;function s(e,t,n,r){if(t=e.c.createElement(t),n)for(var a in n)n.hasOwnProperty(a)&&("style"==a?t.style.cssText=n[a]:t.setAttribute(a,n[a]));return r&&t.appendChild(e.c.createTextNode(r)),t}function l(e,t,n){(e=e.c.getElementsByTagName(t)[0])||(e=document.documentElement),e.insertBefore(n,e.lastChild)}function c(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t,n){t=t||[],n=n||[];for(var r=e.className.split(/\s+/),a=0;a<t.length;a+=1){for(var o=!1,i=0;i<r.length;i+=1)if(t[a]===r[i]){o=!0;break}o||r.push(t[a])}for(t=[],a=0;a<r.length;a+=1){for(o=!1,i=0;i<n.length;i+=1)if(r[a]===n[i]){o=!0;break}o||t.push(r[a])}e.className=t.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function d(e,t){for(var n=e.className.split(/\s+/),r=0,a=n.length;r<a;r++)if(n[r]==t)return!0;return!1}function p(e,t,n){function r(){u&&a&&o&&(u(c),u=null)}t=s(e,"link",{rel:"stylesheet",href:t,media:"all"});var a=!1,o=!0,c=null,u=n||null;i?(t.onload=function(){a=!0,r()},t.onerror=function(){a=!0,c=Error("Stylesheet failed to load"),r()}):setTimeout(function(){a=!0,r()},0),l(e,"head",t)}function f(e,t,n,r){var a=e.c.getElementsByTagName("head")[0];if(a){var o=s(e,"script",{src:t}),i=!1;return o.onload=o.onreadystatechange=function(){i||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(i=!0,n&&n(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&a.removeChild(o))},a.appendChild(o),setTimeout(function(){i||(i=!0,n&&n(Error("Script load timeout")))},r||5e3),o}return null}function g(){this.a=0,this.c=null}function m(e){return e.a++,function(){e.a--,b(e)}}function h(e,t){e.c=t,b(e)}function b(e){0==e.a&&e.c&&(e.c(),e.c=null)}function y(e){this.a=e||"-"}function v(e,t){this.c=e,this.f=4,this.a="n";var n=(t||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(e){var t=[];e=e.split(/,\s*/);for(var n=0;n<e.length;n++){var r=e[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?t.push("'"+r+"'"):t.push(r)}return t.join(",")}function S(e){return e.a+e.f}function x(e){var t="normal";return"o"===e.a?t="oblique":"i"===e.a&&(t="italic"),t}function k(e){var t=4,n="n",r=null;return e&&((r=e.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=e.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?t=7:/[1-9]00/.test(r[1])&&(t=parseInt(r[1].substr(0,1),10)))),n+t}function E(e,t){this.c=e,this.f=e.o.document.documentElement,this.h=t,this.a=new y("-"),this.j=!1!==t.events,this.g=!1!==t.classes}function A(e){if(e.g){var t=d(e.f,e.a.c("wf","active")),n=[],r=[e.a.c("wf","loading")];t||n.push(e.a.c("wf","inactive")),u(e.f,n,r)}T(e,"inactive")}function T(e,t,n){e.j&&e.h[t]&&(n?e.h[t](n.c,S(n)):e.h[t]())}function C(){this.c={}}function O(e,t){this.c=e,this.f=t,this.a=s(this.c,"span",{"aria-hidden":"true"},this.f)}function I(e){l(e.c,"body",e.a)}function R(e){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+w(e.c)+";font-style:"+x(e)+";font-weight:"+e.f+"00;"}function N(e,t,n,r,a,o){this.g=e,this.j=t,this.a=r,this.c=n,this.f=a||3e3,this.h=o||void 0}function _(e,t,n,r,a,o,i){this.v=e,this.B=t,this.c=n,this.a=r,this.s=i||"BESbswy",this.f={},this.w=a||3e3,this.u=o||null,this.m=this.j=this.h=this.g=null,this.g=new O(this.c,this.s),this.h=new O(this.c,this.s),this.j=new O(this.c,this.s),this.m=new O(this.c,this.s),e=R(e=new v(this.a.c+",serif",S(this.a))),this.g.a.style.cssText=e,e=R(e=new v(this.a.c+",sans-serif",S(this.a))),this.h.a.style.cssText=e,e=R(e=new v("serif",S(this.a))),this.j.a.style.cssText=e,e=R(e=new v("sans-serif",S(this.a))),this.m.a.style.cssText=e,I(this.g),I(this.h),I(this.j),I(this.m)}y.prototype.c=function(e){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return t.join(this.a)},N.prototype.start=function(){var e=this.c.o.document,t=this,n=a(),r=new Promise(function(r,o){!function i(){a()-n>=t.f?o():e.fonts.load(function(e){return x(e)+" "+e.f+"00 300px "+w(e.c)}(t.a),t.h).then(function(e){1<=e.length?r():setTimeout(i,25)},function(){o()})}()}),o=null,i=new Promise(function(e,n){o=setTimeout(n,t.f)});Promise.race([i,r]).then(function(){o&&(clearTimeout(o),o=null),t.g(t.a)},function(){t.j(t.a)})};var P={D:"serif",C:"sans-serif"},L=null;function D(){if(null===L){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);L=!!e&&(536>parseInt(e[1],10)||536===parseInt(e[1],10)&&11>=parseInt(e[2],10))}return L}function M(e,t,n){for(var r in P)if(P.hasOwnProperty(r)&&t===e.f[P[r]]&&n===e.f[P[r]])return!0;return!1}function j(e){var t,n=e.g.a.offsetWidth,o=e.h.a.offsetWidth;(t=n===e.f.serif&&o===e.f["sans-serif"])||(t=D()&&M(e,n,o)),t?a()-e.A>=e.w?D()&&M(e,n,o)&&(null===e.u||e.u.hasOwnProperty(e.a.c))?F(e,e.v):F(e,e.B):function(e){setTimeout(r(function(){j(this)},e),50)}(e):F(e,e.v)}function F(e,t){setTimeout(r(function(){c(this.g.a),c(this.h.a),c(this.j.a),c(this.m.a),t(this.a)},e),0)}function B(e,t,n){this.c=e,this.a=t,this.f=0,this.m=this.j=!1,this.s=n}_.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.m.a.offsetWidth,this.A=a(),j(this)};var U=null;function z(e){0==--e.f&&e.j&&(e.m?((e=e.a).g&&u(e.f,[e.a.c("wf","active")],[e.a.c("wf","loading"),e.a.c("wf","inactive")]),T(e,"active")):A(e.a))}function $(e){this.j=e,this.a=new C,this.h=0,this.f=this.g=!0}function q(e,t,n,a,o){var i=0==--e.h;(e.f||e.g)&&setTimeout(function(){var e=o||null,s=a||{};if(0===n.length&&i)A(t.a);else{t.f+=n.length,i&&(t.j=i);var l,c=[];for(l=0;l<n.length;l++){var d=n[l],p=s[d.c],f=t.a,g=d;if(f.g&&u(f.f,[f.a.c("wf",g.c,S(g).toString(),"loading")]),T(f,"fontloading",g),f=null,null===U)if(window.FontFace){g=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent);var m=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);U=g?42<parseInt(g[1],10):!m}else U=!1;f=U?new N(r(t.g,t),r(t.h,t),t.c,d,t.s,p):new _(r(t.g,t),r(t.h,t),t.c,d,t.s,e,p),c.push(f)}for(l=0;l<c.length;l++)c[l].start()}},0)}function G(e,t){this.c=e,this.a=t}function H(e,t){this.c=e,this.a=t}function V(e,t){this.c=e||W,this.a=[],this.f=[],this.g=t||""}B.prototype.g=function(e){var t=this.a;t.g&&u(t.f,[t.a.c("wf",e.c,S(e).toString(),"active")],[t.a.c("wf",e.c,S(e).toString(),"loading"),t.a.c("wf",e.c,S(e).toString(),"inactive")]),T(t,"fontactive",e),this.m=!0,z(this)},B.prototype.h=function(e){var t=this.a;if(t.g){var n=d(t.f,t.a.c("wf",e.c,S(e).toString(),"active")),r=[],a=[t.a.c("wf",e.c,S(e).toString(),"loading")];n||r.push(t.a.c("wf",e.c,S(e).toString(),"inactive")),u(t.f,r,a)}T(t,"fontinactive",e),z(this)},$.prototype.load=function(e){this.c=new o(this.j,e.context||this.j),this.g=!1!==e.events,this.f=!1!==e.classes,function(e,t,n){var r=[],a=n.timeout;!function(e){e.g&&u(e.f,[e.a.c("wf","loading")]),T(e,"loading")}(t);r=function(e,t,n){var r,a=[];for(r in t)if(t.hasOwnProperty(r)){var o=e.c[r];o&&a.push(o(t[r],n))}return a}(e.a,n,e.c);var o=new B(e.c,t,a);for(e.h=r.length,t=0,n=r.length;t<n;t++)r[t].load(function(t,n,r){q(e,o,t,n,r)})}(this,new E(this.c,e),e)},G.prototype.load=function(e){function t(){if(o["__mti_fntLst"+r]){var n,a=o["__mti_fntLst"+r](),i=[];if(a)for(var s=0;s<a.length;s++){var l=a[s].fontfamily;null!=a[s].fontStyle&&null!=a[s].fontWeight?(n=a[s].fontStyle+a[s].fontWeight,i.push(new v(l,n))):i.push(new v(l))}e(i)}else setTimeout(function(){t()},50)}var n=this,r=n.a.projectId,a=n.a.version;if(r){var o=n.c.o;f(this.c,(n.a.api||"https://fast.fonts.net/jsapi")+"/"+r+".js"+(a?"?v="+a:""),function(a){a?e([]):(o["__MonotypeConfiguration__"+r]=function(){return n.a},t())}).id="__MonotypeAPIScript__"+r}else e([])},H.prototype.load=function(e){var t,n,r=this.a.urls||[],a=this.a.families||[],o=this.a.testStrings||{},i=new g;for(t=0,n=r.length;t<n;t++)p(this.c,r[t],m(i));var s=[];for(t=0,n=a.length;t<n;t++)if((r=a[t].split(":"))[1])for(var l=r[1].split(","),c=0;c<l.length;c+=1)s.push(new v(r[0],l[c]));else s.push(new v(r[0]));h(i,function(){e(s,o)})};var W="https://fonts.googleapis.com/css";function Y(e){this.f=e,this.a=[],this.c={}}var K={latin:"BESbswy","latin-ext":"çöüğş",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},X={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Z={i:"i",italic:"i",n:"n",normal:"n"},Q=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;function J(e,t){this.c=e,this.a=t}var ee={Arimo:!0,Cousine:!0,Tinos:!0};function te(e,t){this.c=e,this.a=t}function ne(e,t){this.c=e,this.f=t,this.a=[]}J.prototype.load=function(e){var t=new g,n=this.c,r=new V(this.a.api,this.a.text),a=this.a.families;!function(e,t){for(var n=t.length,r=0;r<n;r++){var a=t[r].split(":");3==a.length&&e.f.push(a.pop());var o="";2==a.length&&""!=a[1]&&(o=":"),e.a.push(a.join(o))}}(r,a);var o=new Y(a);!function(e){for(var t=e.f.length,n=0;n<t;n++){var r=e.f[n].split(":"),a=r[0].replace(/\+/g," "),o=["n4"];if(2<=r.length){var i;if(i=[],s=r[1])for(var s,l=(s=s.split(",")).length,c=0;c<l;c++){var u;if((u=s[c]).match(/^[\w-]+$/))if(null==(d=Q.exec(u.toLowerCase())))u="";else{if(u=null==(u=d[2])||""==u?"n":Z[u],null==(d=d[1])||""==d)d="4";else var d=X[d]||(isNaN(d)?"4":d.substr(0,1));u=[u,d].join("")}else u="";u&&i.push(u)}0<i.length&&(o=i),3==r.length&&(i=[],0<(r=(r=r[2])?r.split(","):i).length&&(r=K[r[0]])&&(e.c[a]=r))}for(e.c[a]||(r=K[a])&&(e.c[a]=r),r=0;r<o.length;r+=1)e.a.push(new v(a,o[r]))}}(o),p(n,function(e){if(0==e.a.length)throw Error("No fonts to load!");if(-1!=e.c.indexOf("kit="))return e.c;for(var t=e.a.length,n=[],r=0;r<t;r++)n.push(e.a[r].replace(/ /g,"+"));return t=e.c+"?family="+n.join("%7C"),0<e.f.length&&(t+="&subset="+e.f.join(",")),0<e.g.length&&(t+="&text="+encodeURIComponent(e.g)),t}(r),m(t)),h(t,function(){e(o.a,o.c,ee)})},te.prototype.load=function(e){var t=this.a.id,n=this.c.o;t?f(this.c,(this.a.api||"https://use.typekit.net")+"/"+t+".js",function(t){if(t)e([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){t=n.Typekit.config.fn;for(var r=[],a=0;a<t.length;a+=2)for(var o=t[a],i=t[a+1],s=0;s<i.length;s++)r.push(new v(o,i[s]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(e){}e(r)}},2e3):e([])},ne.prototype.load=function(e){var t=this.f.id,n=this.c.o,r=this;t?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[t]=function(t,n){for(var a=0,o=n.fonts.length;a<o;++a){var i=n.fonts[a];r.a.push(new v(i.name,k("font-weight:"+i.weight+";font-style:"+i.style)))}e(r.a)},f(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+function(e){return e.o.location.hostname||e.a.location.hostname}(this.c)+"/"+t+".js",function(t){t&&e([])})):e([])};var re=new $(window);re.a.c.custom=function(e,t){return new H(t,e)},re.a.c.fontdeck=function(e,t){return new ne(t,e)},re.a.c.monotype=function(e,t){return new G(t,e)},re.a.c.typekit=function(e,t){return new te(t,e)},re.a.c.google=function(e,t){return new J(t,e)};var ae={load:r(re.load,re)};e.exports?e.exports=ae:(window.WebFont=ae,window.WebFontConfig&&re.load(window.WebFontConfig))}()}(za);var $a=za.exports,qa=o({__proto__:null,default:$a},[$a]);function Ga(){}function Ha(){}const Va=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wa=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ya={};function Ka(e,t){return(Ya.jsx?Wa:Va).test(e)}const Xa=/[ \t\n\f\r]/g;function Za(e){return""===e.replace(Xa,"")}let Qa=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function Ja(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Qa(n,r,t)}function eo(e){return e.toLowerCase()}Qa.prototype.normal={},Qa.prototype.property={},Qa.prototype.space=void 0;let to=class{constructor(e,t){this.attribute=t,this.property=e}};to.prototype.attribute="",to.prototype.booleanish=!1,to.prototype.boolean=!1,to.prototype.commaOrSpaceSeparated=!1,to.prototype.commaSeparated=!1,to.prototype.defined=!1,to.prototype.mustUseProperty=!1,to.prototype.number=!1,to.prototype.overloadedBoolean=!1,to.prototype.property="",to.prototype.spaceSeparated=!1,to.prototype.space=void 0;let no=0;const ro=uo(),ao=uo(),oo=uo(),io=uo(),so=uo(),lo=uo(),co=uo();function uo(){return 2**++no}var po=Object.freeze({__proto__:null,boolean:ro,booleanish:ao,commaOrSpaceSeparated:co,commaSeparated:lo,number:io,overloadedBoolean:oo,spaceSeparated:so});const fo=Object.keys(po);let go=class extends to{constructor(e,t,n,r){let a=-1;if(super(e,t),mo(this,"space",r),"number"==typeof n)for(;++a<fo.length;){const e=fo[a];mo(this,fo[a],(n&po[e])===po[e])}}};function mo(e,t,n){n&&(e[t]=n)}function ho(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new go(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[eo(r)]=r,n[eo(o.attribute)]=r}return new Qa(t,n,e.space)}go.prototype.defined=!0;const bo=ho({properties:{ariaActiveDescendant:null,ariaAtomic:ao,ariaAutoComplete:null,ariaBusy:ao,ariaChecked:ao,ariaColCount:io,ariaColIndex:io,ariaColSpan:io,ariaControls:so,ariaCurrent:null,ariaDescribedBy:so,ariaDetails:null,ariaDisabled:ao,ariaDropEffect:so,ariaErrorMessage:null,ariaExpanded:ao,ariaFlowTo:so,ariaGrabbed:ao,ariaHasPopup:null,ariaHidden:ao,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:so,ariaLevel:io,ariaLive:null,ariaModal:ao,ariaMultiLine:ao,ariaMultiSelectable:ao,ariaOrientation:null,ariaOwns:so,ariaPlaceholder:null,ariaPosInSet:io,ariaPressed:ao,ariaReadOnly:ao,ariaRelevant:null,ariaRequired:ao,ariaRoleDescription:so,ariaRowCount:io,ariaRowIndex:io,ariaRowSpan:io,ariaSelected:ao,ariaSetSize:io,ariaSort:null,ariaValueMax:io,ariaValueMin:io,ariaValueNow:io,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function yo(e,t){return t in e?e[t]:t}function vo(e,t){return yo(e,t.toLowerCase())}const wo=ho({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:lo,acceptCharset:so,accessKey:so,action:null,allow:null,allowFullScreen:ro,allowPaymentRequest:ro,allowUserMedia:ro,alt:null,as:null,async:ro,autoCapitalize:null,autoComplete:so,autoFocus:ro,autoPlay:ro,blocking:so,capture:null,charSet:null,checked:ro,cite:null,className:so,cols:io,colSpan:null,content:null,contentEditable:ao,controls:ro,controlsList:so,coords:io|lo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ro,defer:ro,dir:null,dirName:null,disabled:ro,download:oo,draggable:ao,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ro,formTarget:null,headers:so,height:io,hidden:oo,high:io,href:null,hrefLang:null,htmlFor:so,httpEquiv:so,id:null,imageSizes:null,imageSrcSet:null,inert:ro,inputMode:null,integrity:null,is:null,isMap:ro,itemId:null,itemProp:so,itemRef:so,itemScope:ro,itemType:so,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ro,low:io,manifest:null,max:null,maxLength:io,media:null,method:null,min:null,minLength:io,multiple:ro,muted:ro,name:null,nonce:null,noModule:ro,noValidate:ro,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:ro,optimum:io,pattern:null,ping:so,placeholder:null,playsInline:ro,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ro,referrerPolicy:null,rel:so,required:ro,reversed:ro,rows:io,rowSpan:io,sandbox:so,scope:null,scoped:ro,seamless:ro,selected:ro,shadowRootClonable:ro,shadowRootDelegatesFocus:ro,shadowRootMode:null,shape:null,size:io,sizes:null,slot:null,span:io,spellCheck:ao,src:null,srcDoc:null,srcLang:null,srcSet:null,start:io,step:null,style:null,tabIndex:io,target:null,title:null,translate:null,type:null,typeMustMatch:ro,useMap:null,value:ao,width:io,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:so,axis:null,background:null,bgColor:null,border:io,borderColor:null,bottomMargin:io,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ro,declare:ro,event:null,face:null,frame:null,frameBorder:null,hSpace:io,leftMargin:io,link:null,longDesc:null,lowSrc:null,marginHeight:io,marginWidth:io,noResize:ro,noHref:ro,noShade:ro,noWrap:ro,object:null,profile:null,prompt:null,rev:null,rightMargin:io,rules:null,scheme:null,scrolling:ao,standby:null,summary:null,text:null,topMargin:io,valueType:null,version:null,vAlign:null,vLink:null,vSpace:io,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ro,disableRemotePlayback:ro,prefix:null,property:null,results:io,security:null,unselectable:null},space:"html",transform:vo}),So=ho({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:co,accentHeight:io,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:io,amplitude:io,arabicForm:null,ascent:io,attributeName:null,attributeType:null,azimuth:io,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:io,by:null,calcMode:null,capHeight:io,className:so,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:io,diffuseConstant:io,direction:null,display:null,dur:null,divisor:io,dominantBaseline:null,download:ro,dx:null,dy:null,edgeMode:null,editable:null,elevation:io,enableBackground:null,end:null,event:null,exponent:io,externalResourcesRequired:null,fill:null,fillOpacity:io,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:lo,g2:lo,glyphName:lo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:io,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:io,horizOriginX:io,horizOriginY:io,id:null,ideographic:io,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:io,k:io,k1:io,k2:io,k3:io,k4:io,kernelMatrix:co,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:io,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:io,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:io,overlineThickness:io,paintOrder:null,panose1:null,path:null,pathLength:io,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:so,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:io,pointsAtY:io,pointsAtZ:io,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:co,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:co,rev:co,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:co,requiredFeatures:co,requiredFonts:co,requiredFormats:co,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:io,specularExponent:io,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:io,strikethroughThickness:io,string:null,stroke:null,strokeDashArray:co,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:io,strokeOpacity:io,strokeWidth:null,style:null,surfaceScale:io,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:co,tabIndex:io,tableValues:null,target:null,targetX:io,targetY:io,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:co,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:io,underlineThickness:io,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:io,values:null,vAlphabetic:io,vMathematical:io,vectorEffect:null,vHanging:io,vIdeographic:io,version:null,vertAdvY:io,vertOriginX:io,vertOriginY:io,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:io,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yo}),xo=ho({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),ko=ho({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vo}),Eo=ho({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),Ao={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"},To=/[A-Z]/g,Co=/-[a-z]/g,Oo=/^data[-\w.:]+$/i;function Io(e){return"-"+e.toLowerCase()}function Ro(e){return e.charAt(1).toUpperCase()}const No=Ja([bo,wo,xo,ko,Eo],"html"),_o=Ja([bo,So,xo,ko,Eo],"svg");var Po={},Lo=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Do=/\n/g,Mo=/^\s*/,jo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Fo=/^:\s*/,Bo=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Uo=/^[;\s]*/,zo=/^\s+|\s+$/g,$o="";function qo(e){return e?e.replace(zo,$o):$o}var Go=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(Do);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(Mo)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;$o!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,$o===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(jo);if(t){if(d(),!l(Fo))return s("property missing ':'");var n=l(Bo),r=e({type:"declaration",property:qo(t[0].replace(Lo,$o)),value:n?qo(n[0].replace(Lo,$o)):$o});return l(Uo),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},Ho=Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Po,"__esModule",{value:!0}),Po.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,Vo.default)(e),a="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)}),n};const Vo=Ho(Go);var Wo={};Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.camelCase=void 0;var Yo=/^--[a-zA-Z0-9_-]+$/,Ko=/-([a-z])/g,Xo=/^[^-]+$/,Zo=/^-(webkit|moz|ms|o|khtml)-/,Qo=/^-(ms)-/,Jo=function(e,t){return t.toUpperCase()},ei=function(e,t){return"".concat(t,"-")};Wo.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||Xo.test(e)||Yo.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(Qo,ei):e.replace(Zo,ei)).replace(Ko,Jo))};var ti=(Dr&&Dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Po),ni=Wo;function ri(e,t){var n={};return e&&"string"==typeof e?((0,ti.default)(e,function(e,r){e&&r&&(n[(0,ni.camelCase)(e,t)]=r)}),n):n}ri.default=ri;var ai=ri;const oi=si("end"),ii=si("start");function si(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 li(e){return e&&"object"==typeof e?"position"in e||"type"in e?ui(e.position):"start"in e||"end"in e?ui(e):"line"in e||"column"in e?ci(e):"":""}function ci(e){return di(e&&e.line)+":"+di(e&&e.column)}function ui(e){return ci(e&&e.start)+"-"+ci(e&&e.end)}function di(e){return e&&"number"==typeof e?e:1}class pi extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=li(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}pi.prototype.file="",pi.prototype.name="",pi.prototype.reason="",pi.prototype.message="",pi.prototype.stack="",pi.prototype.column=void 0,pi.prototype.line=void 0,pi.prototype.ancestors=void 0,pi.prototype.cause=void 0,pi.prototype.fatal=void 0,pi.prototype.place=void 0,pi.prototype.ruleId=void 0,pi.prototype.source=void 0;const fi={}.hasOwnProperty,gi=new Map,mi=/[A-Z]/g,hi=new Set(["table","tbody","thead","tfoot","tr"]),bi=new Set(["td","th"]),yi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vi(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,a,o){const i=Array.isArray(a.children),s=ii(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?_o:No,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=wi(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function wi(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=_o,e.schema=a);e.ancestors.push(t);const o=Ai(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&fi.call(t.properties,a)){const o=Ei(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&bi.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=ki(e,t);hi.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Za(t.value):Za(t));var t}));return Si(e,i,o,t),xi(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ti(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=_o,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:Ai(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];Ga(t.type);const a=t.expression;Ga(a.type);const o=a.properties[0];Ga(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Ti(e,t.position);else{const a=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];Ga(t.type),o=e.evaluater.evaluateExpression(t.expression)}else Ti(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=ki(e,t);return Si(e,i,o,t),xi(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ti(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return xi(r,ki(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 Si(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function xi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ki(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:gi;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=wi(e,o,i);void 0!==s&&n.push(s)}return n}function Ei(e,t,n){const r=function(e,t){const n=eo(t);let r=t,a=to;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&Oo.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(Co,Ro);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!Co.test(e)){let n=e.replace(To,Io);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=go}return new a(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return ai(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new pi("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=yi+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)fi.call(e,n)&&(t[Ci(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?Ao[r.property]||r.property:r.attribute,n]}}function Ai(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=Ka(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=Ka(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 fi.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ti(e)}function Ti(e,t){const n=new pi("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=yi+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Ci(e){let t=e.replace(mi,Oi);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Oi(e){return"-"+e.toLowerCase()}const Ii={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"]},Ri={};function Ni(e,t){return _i(e,"boolean"!=typeof Ri.includeImageAlt||Ri.includeImageAlt,"boolean"!=typeof Ri.includeHtml||Ri.includeHtml)}function _i(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Pi(e.children,t,n)}return Array.isArray(e)?Pi(e,t,n):""}function Pi(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=_i(e[a],t,n);return r.join("")}const Li={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},Di={}.hasOwnProperty;function Mi(e){return!!Di.call(Li,e)&&Li[e]}function ji(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Fi(e,t){return e.length>0?(ji(e,e.length,0,t),e):t}const Bi={}.hasOwnProperty;function Ui(e){const t={};let n=-1;for(;++n<e.length;)zi(t,e[n]);return t}function zi(e,t){let n;for(n in t){const r=(Bi.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Bi.call(r,o)||(r[o]=[]);const e=a[o];$i(r[o],Array.isArray(e)?e:e?[e]:[])}}}function $i(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ji(e,0,0,r)}function qi(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 Gi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hi=rs(/[A-Za-z]/),Vi=rs(/[\dA-Za-z]/),Wi=rs(/[#-'*+\--9=?A-Z^-~]/);function Yi(e){return null!==e&&(e<32||127===e)}const Ki=rs(/\d/),Xi=rs(/[\dA-Fa-f]/),Zi=rs(/[!-/:-@[-`{-~]/);function Qi(e){return null!==e&&e<-2}function Ji(e){return null!==e&&(e<0||32===e)}function es(e){return-2===e||-1===e||32===e}const ts=rs(/\p{P}|\p{S}/u),ns=rs(/\s/);function rs(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function as(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&Vi(e.charCodeAt(n+1))&&Vi(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function os(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(es(r))return e.enter(n),i(r);return t(r)};function i(r){return es(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const is={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"),os(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):Qi(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const ss={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}b(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return ji(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return g(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ls,u,d)(a)}function u(e){return r&&y(),b(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,g(e)}function p(n){return t.containerState={},e.attempt(ls,f,g)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function g(n){return null===n?(r&&y(),b(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(h(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):Qi(n)?(e.consume(n),h(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function h(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(b(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;ji(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},ls={tokenize:function(e,t,n){return os(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function cs(e){return null===e||Ji(e)||ns(e)?1:ts(e)?2:void 0}function us(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const ds={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;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[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};ps(d,-s),ps(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Fi(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Fi(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Fi(l,us(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Fi(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Fi(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,ji(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=cs(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=cs(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function ps(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fs={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return Hi(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||Vi(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||Vi(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(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||Yi(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):Wi(t)?(e.consume(t),l):n(t)}function c(e){return Vi(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||Vi(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const gs={partial:!0,tokenize:function(e,t,n){return function(t){return es(t)?os(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||Qi(e)?t(e):n(e)}}};const ms={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(es(t))return os(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(ms,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return es(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const hs={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 Zi(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const bs={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=Vi,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=Xi,c):(e.enter("characterReferenceValue"),a=7,o=Ki,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==Vi||Mi(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const ys={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},vs={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),es(t)?os(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),es(t)?os(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||Qi(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),es(t)?os(e,c,"whitespace")(t):c(t))}function c(n){return null===n||Qi(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(ys,f,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||Qi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):es(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),os(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||Qi(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||Qi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,y,g)(t)}function g(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&es(t)?os(e,h,"linePrefix",i+1)(t):h(t)}function h(t){return null===t||Qi(t)?e.check(ys,f,y)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||Qi(t)?(e.exit("codeFlowValue"),h(t)):(e.consume(t),b)}function y(n){return e.exit("codeFenced"),t(n)}}};const ws={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),os(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):Qi(t)?e.attempt(Ss,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||Qi(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Ss={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):Qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):os(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):Qi(e)?a(e):n(e)}}};const xs={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):Qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||Qi(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class ks{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Es(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Es(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Es(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);Es(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Es(this.left,t.reverse())}}}function Es(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 As(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new ks(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Ts(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return ji(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Ts(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,g=0,m=0;const h=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,h.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):h.pop(),p=h.length;p--;){const t=s.slice(h[p],h[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[g+l[p][0]]=g+l[p][1],g+=l[p][1]-l[p][0]-1;return c}const Cs={resolve:function(e){return As(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):Qi(t)?e.check(Os,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Os={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"),os(e,a,"linePrefix")};function a(a){if(null===a||Qi(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function Is(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||Yi(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||Qi(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function g(a){return u||null!==a&&41!==a&&!Ji(a)?u<c&&40===a?(e.consume(a),u++,g):41===a?(e.consume(a),u--,g):null===a||32===a||40===a||Yi(a)?n(a):(e.consume(a),92===a?m:g):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),g):g(t)}}function Rs(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):Qi(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||Qi(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!es(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Ns(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):Qi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),os(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||Qi(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function _s(e,t){let n;return function r(a){if(Qi(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(es(a))return os(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const Ps={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return Rs.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=Gi(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 Ji(t)?_s(e,s)(t):s(t)}function s(t){return Is(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ls,c,c)(t)}function c(t){return es(t)?os(e,u,"whitespace")(t):u(t)}function u(o){return null===o||Qi(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Ls={partial:!0,tokenize:function(e,t,n){return function(t){return Ji(t)?_s(e,r)(t):n(t)};function r(t){return Ns(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return es(t)?os(e,o,"whitespace")(t):o(t)}function o(e){return null===e||Qi(e)?t(e):n(e)}}};const Ds={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return Qi(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Ms={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},ji(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||Ji(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||Qi(n)?(e.exit("atxHeading"),t(n)):es(n)?os(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||Ji(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const js=["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"],Fs=["pre","script","style","textarea"],Bs={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):Hi(s)?(e.consume(s),i=String.fromCharCode(s),g):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):Hi(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return Hi(t)?(e.consume(t),i=String.fromCharCode(t),g):n(t)}function g(s){if(null===s||47===s||62===s||Ji(s)){const l=47===s,c=i.toLowerCase();return l||o||!Fs.includes(c)?js.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?h(s):b(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||Vi(s)?(e.consume(s),i+=String.fromCharCode(s),g):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function h(t){return es(t)?(e.consume(t),h):E(t)}function b(t){return 47===t?(e.consume(t),E):58===t||95===t||Hi(t)?(e.consume(t),y):es(t)?(e.consume(t),b):E(t)}function y(t){return 45===t||46===t||58===t||95===t||Vi(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),w):es(t)?(e.consume(t),v):b(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,S):es(t)?(e.consume(t),w):x(t)}function S(t){return t===l?(e.consume(t),l=null,k):null===t||Qi(t)?n(t):(e.consume(t),S)}function x(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||Ji(t)?v(t):(e.consume(t),x)}function k(e){return 47===e||62===e||es(e)?b(e):n(e)}function E(t){return 62===t?(e.consume(t),A):n(t)}function A(t){return null===t||Qi(t)?T(t):es(t)?(e.consume(t),A):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),R):60===t&&1===a?(e.consume(t),N):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!Qi(t)||6!==a&&7!==a?null===t||Qi(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Us,M,C)(t))}function C(t){return e.check(zs,O,M)(t)}function O(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||Qi(t)?C(t):(e.enter("htmlFlowData"),T(t))}function R(t){return 45===t?(e.consume(t),L):T(t)}function N(t){return 47===t?(e.consume(t),i="",_):T(t)}function _(t){if(62===t){const n=i.toLowerCase();return Fs.includes(n)?(e.consume(t),D):T(t)}return Hi(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),_):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||Qi(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},Us={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(gs,t,n)}}},zs={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(Qi(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const $s={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),y):Hi(t)?(e.consume(t),k):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):Hi(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):Qi(t)?(i=u,_(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?N(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?g:f):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),m):Qi(t)?(i=g,_(t)):(e.consume(t),g)}function m(t){return 93===t?(e.consume(t),h):g(t)}function h(t){return 62===t?N(t):93===t?(e.consume(t),h):g(t)}function b(t){return null===t||62===t?N(t):Qi(t)?(i=b,_(t)):(e.consume(t),b)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):Qi(t)?(i=y,_(t)):(e.consume(t),y)}function v(e){return 62===e?N(e):y(e)}function w(t){return Hi(t)?(e.consume(t),S):n(t)}function S(t){return 45===t||Vi(t)?(e.consume(t),S):x(t)}function x(t){return Qi(t)?(i=x,_(t)):es(t)?(e.consume(t),x):N(t)}function k(t){return 45===t||Vi(t)?(e.consume(t),k):47===t||62===t||Ji(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),N):58===t||95===t||Hi(t)?(e.consume(t),A):Qi(t)?(i=E,_(t)):es(t)?(e.consume(t),E):N(t)}function A(t){return 45===t||46===t||58===t||95===t||Vi(t)?(e.consume(t),A):T(t)}function T(t){return 61===t?(e.consume(t),C):Qi(t)?(i=T,_(t)):es(t)?(e.consume(t),T):E(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,O):Qi(t)?(i=C,_(t)):es(t)?(e.consume(t),C):(e.consume(t),I)}function O(t){return t===a?(e.consume(t),a=void 0,R):null===t?n(t):Qi(t)?(i=O,_(t)):(e.consume(t),O)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||Ji(t)?E(t):(e.consume(t),I)}function R(e){return 47===e||62===e||Ji(e)?E(e):n(e)}function N(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function _(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return es(t)?os(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const qs={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&ji(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Fi(o,e.slice(r+1,r+s+3)),o=Fi(o,[["enter",u,t]]),o=Fi(o,us(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=Fi(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Fi(o,e.slice(a+1)),o=Fi(o,[["exit",l,t]]),ji(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(Gi(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(Gs,c,o?c:u)(t):91===t?e.attempt(Hs,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(Vs,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},Gs={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 Ji(t)?_s(e,a)(t):a(t)}function a(t){return 41===t?c(t):Is(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return Ji(t)?_s(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Ns(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return Ji(t)?_s(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},Hs={tokenize:function(e,t,n){const r=this;return function(t){return Rs.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(Gi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},Vs={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 Ws={name:"labelStartImage",resolveAll:qs.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ys={name:"labelStartLink",resolveAll:qs.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const Ks={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),os(e,t,"linePrefix")}}};const Xs={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||Qi(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),es(t)?os(e,o,"whitespace")(t):o(t))}}};const Zs={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(gs,a,o);function a(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,os(e,t,"listItemIndent",r.containerState.size+1)(n)}function o(n){return r.containerState.furtherBlankLines||!es(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Js,t,i)(n))}function i(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,os(e,e.attempt(Zs,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:Ki(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(Xs,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Ki(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(gs,r.interrupt?n:c,e.attempt(Qs,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return es(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},Qs={partial:!0,tokenize:function(e,t,n){const r=this;return os(e,function(e){const a=r.events[r.events.length-1];return!es(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},Js={partial:!0,tokenize:function(e,t,n){const r=this;return os(e,function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const el={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),es(t)?os(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||Qi(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const tl={tokenize:function(e){const t=this,n=e.attempt(gs,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,os(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Cs,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 nl={resolveAll:il()},rl=ol("string"),al=ol("text");function ol(e){return{resolveAll:il("text"===e?sl:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function il(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function sl(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const ll={42:Zs,43:Zs,45:Zs,48:Zs,49:Zs,50:Zs,51:Zs,52:Zs,53:Zs,54:Zs,55:Zs,56:Zs,57:Zs,62:ms},cl={91:Ps},ul={[-2]:ws,[-1]:ws,32:ws},dl={35:Ms,42:Xs,45:[el,Xs],60:Bs,61:el,95:Xs,96:vs,126:vs},pl={38:bs,92:hs},fl={[-5]:Ks,[-4]:Ks,[-3]:Ks,33:Ws,38:bs,42:ds,60:[fs,$s],91:Ys,92:[Ds,hs],93:qs,95:ds,96:xs},gl={null:[ds,nl]};var ml=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:cl,disable:{null:[]},document:ll,flow:dl,flowInitial:ul,insideSpan:gl,string:pl,text:fl});function hl(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let i=[],s=[];const l={attempt:h(function(e,t){b(e,t.from)}),check:h(m),consume:function(e){Qi(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:h(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=Fi(i,e),f(),null!==i[i.length-1])return[];return b(t,0),c.events=us(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){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;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){u=u(e)}function m(e,t){t.restore()}function h(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?g(n):"tokenize"in n?g([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return g([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function g(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return b();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,h,b)(n)}}function h(t){return e(d,f),a}function b(e){return f.restore(),++u<i.length?m(i[u]):o}}}function b(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&ji(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const bl=/[\0\t\n\r]/g;const yl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vl(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return qi(n.slice(t?2:1),t?16:10)}return Mi(n)||e}const wl={}.hasOwnProperty;function Sl(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(Z),blockQuote:o(V),characterEscape:A,characterReference:A,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:A,data:A,codeFlowValue:A,definition:o(K),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(X),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:A,htmlText:o(J,i),htmlTextData:A,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:B,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(Z),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:H,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:z,characterReferenceMarkerNumeric:z,characterReferenceValue:$,characterReference:q,codeFenced:l(h),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:g,codeFlowValue:T,codeIndented:l(b),codeText:l(N),codeTextData:T,data:T,definition:l(),definitionDestinationString:w,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(O),hardBreakTrailing:l(O),htmlFlow:l(I),htmlFlowData:T,htmlText:l(R),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:M,resourceTitleString:j,resource:F,setextHeading:l(E),setextHeadingLineSequence:k,setextHeadingText:x,strong:l(),thematicBreak:l()}};kl(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];wl.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||Al).call(o,void 0,e[0])}for(r.position={start:xl(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:xl(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(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:xl(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+li({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||Al).call(this,e,r[0])}n.position.end=xl(e.end)}function u(){return Ni(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function g(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function h(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function S(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 k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function A(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:xl(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=xl(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=xl(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(A.call(this,e),T.call(this,e))}function O(){this.data.atHardBreak=!0}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function _(){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 P(){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 L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(yl,vl)}(t),n.identifier=Gi(t).toLowerCase()}function D(){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 M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function j(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function B(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function z(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=qi(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Mi(t)}this.stack[this.stack.length-1].value+=r}function q(e){this.stack.pop().position.end=xl(e.end)}function G(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function H(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function V(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function K(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function X(){return{type:"emphasis",children:[]}}function Z(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!As(e););return e}(function(e){const t={constructs:Ui([ml,...(e||{}).extensions||[]]),content:n(is),defined:[],document:n(ss),flow:n(tl),lazy:{},string:n(rl),text:n(al)};return t;function n(e){return function(n){return hl(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(bl.lastIndex=u,l=bl.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function xl(e){return{line:e.line,column:e.column,offset:e.offset}}function kl(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?kl(e,r):El(e,r)}}function El(e,t){let n;for(n in t)if(wl.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 Al(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+li({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+li({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+li({start:t.start,end:t.end})+") is still open")}function Tl(e){const t=this;t.parser=function(n){return Sl(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Cl(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function Ol(e){const t=e.spread;return null==t?e.children.length>1:t}function Il(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Rl(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Rl(t.slice(a),a>0,!1)),o.join("")}function Rl(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const Nl={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={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);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(),a=as(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},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 Cl(e,t);const a={src:as(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:as(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 Cl(e,t);const a={href:as(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:as(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ol(n[r])}return t}(n):Ol(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=ii(t.children[1]),i=oi(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Il(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:_l,yaml:_l,definition:_l,footnoteDefinition:_l};function _l(){}const Pl="object"==typeof self?self:globalThis,Ll=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new Pl[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new Pl[o](i),a)};return r})(new Map,e)(0),Dl="",{toString:Ml}={},{keys:jl}=Object,Fl=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Ml.call(e).slice(8,-1);switch(n){case"Array":return[1,Dl];case"Object":return[2,Dl];case"Date":return[3,Dl];case"RegExp":return[4,Dl];case"Map":return[5,Dl];case"Set":return[6,Dl];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Bl=([e,t])=>0===e&&("function"===t||"symbol"===t),Ul=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=Fl(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const t of r)e.push(o(t));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of jl(r))!e&&Bl(Fl(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[n,a]of r)(e||!Bl(Fl(n))&&!Bl(Fl(a)))&&t.push([o(n),o(a)]);return n}case 6:{const t=[],n=a([i,t],r);for(const n of r)!e&&Bl(Fl(n))||t.push(o(n));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r};var zl="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Ll(Ul(e,t)):structuredClone(e):(e,t)=>Ll(Ul(e,t));function $l(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 ql(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const Gl={}.hasOwnProperty,Hl={};function Vl(e,t){e.position&&(t.position=function(e){const t=ii(e),n=oi(e);if(t&&n)return{start:t,end:n}}(e))}function Wl(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&a&&Object.assign(n.properties,zl(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Yl(e,t){const n=t.data||{},r=!("value"in t)||Gl.call(n,"hProperties")||Gl.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 Kl(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 Xl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Zl(e,t){const n=function(e,t){const n=t||Hl,r=new Map,a=new Map,o=new Map,i={...Nl,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=Xl(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=Xl(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:Wl,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(Gl.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=zl(n);return r.children=s.all(e),r}return zl(e)}return(s.options.unknownHandler||Yl)(s,e,t)},options:n,patch:Vl,wrap:Kl};return Ir(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$l,r=e.options.footnoteBackLabel||ql,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=as(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,g),s.push(g)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...zl(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function Ql(e,t){return e&&"run"in e?async function(n,r){const a=Zl(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Zl(n,{file:r,...e||t})}}function Jl(e){if(e)throw e}var ec=Object.prototype.hasOwnProperty,tc=Object.prototype.toString,nc=Object.defineProperty,rc=Object.getOwnPropertyDescriptor,ac=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===tc.call(e)},oc=function(e){if(!e||"[object Object]"!==tc.call(e))return!1;var t,n=ec.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ec.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ec.call(e,t)},ic=function(e,t){nc&&"__proto__"===t.name?nc(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},sc=function(e,t){if("__proto__"===t){if(!ec.call(e,t))return;if(rc)return rc(e,t).value}return e[t]},lc=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=sc(s,n),s!==(a=sc(t,n))&&(u&&a&&(oc(a)||(o=ac(a)))?(o?(o=!1,i=r&&ac(r)?r:[]):i=r&&oc(r)?r:{},ic(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&ic(s,{name:n,newValue:a}));return s};function cc(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 uc(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(a);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return a(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(o,a):i instanceof Error?a(i):o(i))}function a(e,...r){n||(n=!0,t(e,...r))}function o(e){a(null,e)}}(s,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const dc={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');pc(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(pc(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){pc(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)pc(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){pc(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function pc(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const fc={cwd:function(){return"/"}};function gc(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function mc(e){if("string"==typeof e)e=new URL(e);else if(!gc(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 hc=["history","path","basename","stem","extname","dirname"];class bc{constructor(e){let t;t=e?gc(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":fc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<hc.length;){const e=hc[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)hc.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?dc.basename(this.path):void 0}set basename(e){vc(e,"basename"),yc(e,"basename"),this.path=dc.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?dc.dirname(this.path):void 0}set dirname(e){wc(this.basename,"dirname"),this.path=dc.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?dc.extname(this.path):void 0}set extname(e){if(yc(e,"extname"),wc(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=dc.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){gc(e)&&(e=mc(e)),vc(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?dc.basename(this.path,this.extname):void 0}set stem(e){vc(e,"stem"),yc(e,"stem"),this.path=dc.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 pi(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function yc(e,t){if(e&&e.includes(dc.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dc.sep+"`")}function vc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function wc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const Sc=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},xc={}.hasOwnProperty;class kc extends Sc{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=uc()}copy(){const e=new kc;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(lc(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Cc("data",this.frozen),this.namespace[e]=t,this):xc.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Cc("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=Rc(e),n=this.parser||this.Parser;return Ac("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Ac("process",this.parser||this.Parser),Tc("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=Rc(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),Ac("processSync",this.parser||this.Parser),Tc("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,Jl(e),t=r}),Ic("processSync","process",n),t}run(e,t,n){Oc(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=Rc(t);r.run(e,i,function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){Jl(e),n=t,r=!0}),Ic("runSync","run",r),n}stringify(e,t){this.freeze();const n=Rc(t),r=this.compiler||this.Compiler;return Tc("stringify",r),Oc(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Cc("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(r.settings=lc(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];cc(i)&&cc(r)&&(r=lc(!0,i,r)),n[a]=[e,r,...o]}}}}const Ec=(new kc).freeze();function Ac(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Tc(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cc(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 Oc(e){if(!cc(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Ic(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Rc(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new bc(e)}const Nc=[],_c={allowDangerousHtml:!0},Pc=/^(https?|ircs?|mailto|xmpp)$/i,Lc=[{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 Dc(e){const t=function(e){const t=e.rehypePlugins||Nc,n=e.remarkPlugins||Nc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._c}:_c,a=Ec().use(Tl).use(n).use(Ql,r).use(t);return a}(e),r=function(e){const t=e.children||"",n=new bc;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const r=t.allowedElements,a=t.allowElement,o=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Mc;for(const e of Lc)Object.hasOwn(t,e.from)&&Ha((e.from,e.to&&e.to,e.id));t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return Ir(e,u),vi(e,{Fragment:n.Fragment,components:o,ignoreInvalidStyle:!0,jsx:n.jsx,jsxs:n.jsxs,passKeys:!0,passNode:!0});function u(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return s?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Ii)if(Object.hasOwn(Ii,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Ii[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=c(String(n||""),t,e))}}if("element"===e.type){let o=r?!r.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&a&&"number"==typeof t&&(o=!a(e,t,n)),o&&n&&"number"==typeof t)return l&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}}(t.runSync(t.parse(r),r),e)}function Mc(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||Pc.test(e.slice(0,t))?e:""}function jc(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function Fc(e,t,n){const r=xr((n||{}).ignore||[]),a=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([Bc(e[0]),Uc(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)Or(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Bc(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Uc(e){return"function"==typeof e?e:function(){return e}}const zc="phrasing",$c=["autolink","link","image","label"];function qc(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Gc(e){this.config.enter.autolinkProtocol.call(this,e)}function Hc(e){this.config.exit.autolinkProtocol.call(this,e)}function Vc(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Wc(e){this.config.exit.autolinkEmail.call(this,e)}function Yc(e){this.exit(e)}function Kc(e){Fc(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Xc],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Zc]],{ignore:["link","linkReference"]})}function Xc(e,t,n,r,a){let o="";if(!Qc(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const i=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=jc(e,"(");let o=jc(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function Zc(e,t,n,r){return!(!Qc(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Qc(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||ns(n)||ts(n))&&(!t||47!==n)}function Jc(){this.buffer()}function eu(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tu(){this.buffer()}function nu(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ru(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function au(e){this.exit(e)}function ou(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Gi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iu(e){this.exit(e)}function su(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function lu(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?uu:cu)));return s(),i},footnoteReference:su},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function cu(e,t,n){return 0===t?e:uu(e,t,n)}function uu(e,t,n){return(n?"":" ")+e}su.peek=function(){return"["};const du=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function pu(e){this.enter({type:"delete",children:[]},e)}function fu(e){this.exit(e)}function gu(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function mu(e){return e.length}function hu(e){return null==e?"":String(e)}function bu(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function yu(e,t,n){return">"+(n?"":" ")+e}function vu(e,t){return wu(e,t.inConstruct,!0)&&!wu(e,t.notInConstruct,!1)}function wu(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Su(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&vu(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function xu(e,t,n){return(n?"":" ")+e}function ku(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Eu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Au(e,t,n){const r=cs(e),a=cs(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function Tu(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Au(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Eu(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Au(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Eu(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function Cu(e){return e.value||""}function Ou(e,t,n,r){const a=ku(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Iu(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ru(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function Nu(e,t){const n=Ni(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function _u(e,t,n,r){const a=ku(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(Nu(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Pu(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Lu(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Du(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}gu.peek=function(){return"~"},Tu.peek=function(e,t,n){return n.options.emphasis||"*"},Cu.peek=function(){return"<"},Ou.peek=function(){return"!"},Iu.peek=function(){return"!"},Ru.peek=function(){return"`"},_u.peek=function(e,t,n){return Nu(e,n)?"<":"["},Pu.peek=function(){return"["};const Mu=xr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function ju(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=Au(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=Eu(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=Au(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+Eu(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}ju.peek=function(e,t,n){return n.options.strong||"*"};const Fu={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),yu);return a(),i},break:Su,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,xu);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=ku(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:Tu,hardBreak:Su,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return Ir(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,Cr}),Boolean((!e.depth||e.depth<3)&&Ni(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=Eu(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:Cu,image:Ou,imageReference:Iu,inlineCode:Ru,link:_u,linkReference:Pu,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Lu(n);const s=e.ordered?"."===i?")":".":function(e){const t=Lu(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Du(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Lu(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e});return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some(function(e){return Mu(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:ju,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Du(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Bu(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function Uu(e){this.exit(e),this.data.inTable=void 0}function zu(e){this.enter({type:"tableRow",children:[]},e)}function $u(e){this.exit(e)}function qu(e){this.enter({type:"tableCell",children:[]},e)}function Gu(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Hu));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Hu(e,t){return"|"===t?t:e}function Vu(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Fu.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=l(e,n,r),o=s([a]);return o.slice(0,o.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||mu,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=hu(e[u][o]);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)o[d]=bu(r[d]);else{const e=bu(r);for(;++d<c;)o[d]=e}d=-1;const p=[],f=[];for(;++d<c;){const e=o[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[d]&&(l[d]=a),f[d]=a),p[d]=i}i.splice(1,0,p),s.splice(1,0,f),u=-1;const g=[];for(;++u<i.length;){const e=i[u],t=s[u];d=-1;const r=[];for(;++d<c;){const a=e[d]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=o[d];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}g.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return g.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function Wu(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Yu(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Ku(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=Fu.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+i})),l}const Xu={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},Zu={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(Ju,l,s)(t):null===t||Ji(t)||ns(t)||45!==t&&ts(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},Qu={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(Ju,t,o)(i):null===i||Ji(i)||ns(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},Ju={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||Ji(i)||ns(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||Ji(e)||ns(e)?t(e):r(e)}function o(e){return Hi(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):Hi(t)?(e.consume(t),i):n(t)}},partial:!0},ed={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return Vi(e)?n(e):t(e)}},partial:!0},td={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!id.call(r,r.previous)||ud(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Xu,e.attempt(Zu,e.attempt(Qu,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:id},nd={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&sd.call(r,r.previous)&&!ud(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(Hi(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||Yi(t)||Ji(t)||ns(t)||ts(t)?n(t):e.attempt(Zu,e.attempt(Qu,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:sd},rd={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!cd(t)||!ld.call(r,r.previous)||ud(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return cd(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(ed,c,l)(t):45===t||95===t||Vi(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&Hi(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:ld},ad={};let od=48;for(;od<123;)ad[od]=rd,od++,58===od?od=65:91===od&&(od=97);function id(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||Ji(e)}function sd(e){return!Hi(e)}function ld(e){return!(47===e||cd(e))}function cd(e){return 43===e||45===e||46===e||95===e||Vi(e)}function ud(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}ad[43]=rd,ad[45]=rd,ad[46]=rd,ad[95]=rd,ad[72]=[rd,nd],ad[104]=[rd,nd],ad[87]=[rd,td],ad[119]=[rd,td];const dd={tokenize:function(e,t,n){const r=this;return os(e,function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function pd(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=Gi(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function fd(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function gd(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||Ji(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(Gi(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return Ji(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function md(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||Ji(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=Gi(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Ji(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),os(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function hd(e,t,n){return e.check(gs,t,e.attempt(dd,t,n))}function bd(e){e.exit("gfmFootnoteDefinition")}function yd(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=cs(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=cs(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&ji(i,i.length,0,us(s,e.slice(r+1,n),t)),ji(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),ji(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class vd{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function wd(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function Sd(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?w:s;if(o===w&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):Qi(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):es(t)?os(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||Ji(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,es(t)?os(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?g(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return es(t)?os(e,g,"whitespace")(t):g(t)}function g(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||Qi(t)?y(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),h(t)):v(t)}function h(t){return 45===t?(e.consume(t),h):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return es(t)?os(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?p(n):(null===n||Qi(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),S(t)}function S(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),S):null===n||Qi(n)?(e.exit("tableRow"),t(n)):es(n)?os(e,S,"whitespace")(n):(e.enter("data"),x(n))}function x(t){return null===t||124===t||Ji(t)?(e.exit("data"),S(t)):(e.consume(t),92===t?k:x)}function k(t){return 92===t||124===t?(e.consume(t),x):x(t)}}function xd(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new vd;for(;++o<e.length;){const f=e[o],g=f[1];"enter"===f[0]?"tableHead"===g.type?(u=!1,0!==d&&(Ed(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===g.type||"tableDelimiterRow"===g.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===g.type?2:r?3:1):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type?"tableCellDivider"===g.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=kd(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=kd(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===g.type?(u=!0,d=o):"tableRow"===g.type||"tableDelimiterRow"===g.type?(d=o,0!==l[1]?(c[0]=c[1],a=kd(p,t,l,s,o,a)):0!==c[1]&&(a=kd(p,t,c,s,o,a)),s=0):!s||"data"!==g.type&&"tableDelimiterMarker"!==g.type&&"tableDelimiterFiller"!==g.type||(c[3]=o)}for(0!==d&&Ed(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=wd(t.events,o))}return e}function kd(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},Ad(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=Ad(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=Ad(t.events,n[2]),o=Ad(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},Ad(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Ed(e,t,n,r,a){const o=[],i=Ad(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function Ad(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const Td={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return Ji(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return Qi(r)?t(r):es(r)?e.check({tokenize:Cd},t,n)(r):n(r)}}};function Cd(e,t,n){return os(e,function(e){return null===e?n(e):t(e)},"whitespace")}const Od={};function Id(e){const t=e||Od,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Ui([{text:ad},{document:{91:{name:"gfmFootnoteDefinition",tokenize:md,continuation:{tokenize:hd},exit:bd}},text:{91:{name:"gfmFootnoteCall",tokenize:gd},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pd,resolveTo:fd}}},yd(e),{flow:{null:{name:"table",tokenize:Sd,resolveAll:xd}}},{text:{91:Td}}])}(t)),a.push([{transforms:[Kc],enter:{literalAutolink:qc,literalAutolinkEmail:Gc,literalAutolinkHttp:Gc,literalAutolinkWww:Gc},exit:{literalAutolink:Yc,literalAutolinkEmail:Wc,literalAutolinkHttp:Hc,literalAutolinkWww:Vc}},{enter:{gfmFootnoteCallString:Jc,gfmFootnoteCall:eu,gfmFootnoteDefinitionLabelString:tu,gfmFootnoteDefinition:nu},exit:{gfmFootnoteCallString:ru,gfmFootnoteCall:au,gfmFootnoteDefinitionLabelString:ou,gfmFootnoteDefinition:iu}},{canContainEols:["delete"],enter:{strikethrough:pu},exit:{strikethrough:fu}},{enter:{table:Bu,tableData:qu,tableHeader:qu,tableRow:zu},exit:{codeText:Gu,table:Uu,tableData:$u,tableHeader:$u,tableRow:$u}},{exit:{taskListCheckValueChecked:Wu,taskListCheckValueUnchecked:Wu,paragraph:Yu}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zc,notInConstruct:$c},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zc,notInConstruct:$c},{character:":",before:"[ps]",after:"\\/",inConstruct:zc,notInConstruct:$c}]},lu(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:du}],handlers:{delete:gu}},Vu(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ku}}]}}(t))}function Rd(){return{type:"break"}}function Nd(){return function(e){!function(e){Fc(e,[/\r?\n|\r/g,Rd])}(e)}}function _d(){return e=>{Ir(e,"listItem",e=>{Ir(e,"break",(e,t,n)=>{n&&void 0!==t&&(n.children[t]={type:"text",value:"\n"})})})}}function Pd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ld(e){return function(e){if(Array.isArray(e))return Pd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Pd(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pd(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dd(e){return Dd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dd(e)}function Md(e){var t=function(e,t){if("object"!=Dd(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Dd(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Dd(t)?t:t+""}function jd(e,t,n){return(t=Md(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fd(){return Fd=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},Fd.apply(null,arguments)}function Bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ud(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(n),!0).forEach(function(t){jd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var zd={};function $d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return zd[r]||(zd[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),zd[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Ud(Ud({},e),n[t])},t)}function qd(e){return e.join(" ")}function Gd(t){var n=t.node,r=t.stylesheet,a=t.style,o=void 0===a?{}:a,i=t.useInlineStyles,s=t.key,l=n.properties,c=n.type,u=n.tagName,d=n.value;if("text"===c)return d;if(u){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,a){return Gd({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(a)})})}}(r,i);if(i){var g=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),m=l.className&&l.className.includes("token")?["token"]:[],h=l.className&&m.concat(l.className.filter(function(e){return!g.includes(e)}));p=Ud(Ud({},l),{},{className:qd(h)||void 0,style:$d(l.className,Object.assign({},l.style,o),r)})}else p=Ud(Ud({},l),{},{className:qd(l.className)});var b=f(n.children);return e.createElement(u,Fd({key:s},p),b)}}var Hd=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Vd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vd(Object(n),!0).forEach(function(t){jd(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Yd=/\n/g;function Kd(t){var n=t.codeString,r=t.codeStyle,a=t.containerStyle,o=void 0===a?{float:"left",paddingRight:"10px"}:a,i=t.numberStyle,s=void 0===i?{}:i,l=t.startingLineNumber;return e.createElement("code",{style:Object.assign({},r,o)},function(t){var n=t.lines,r=t.startingLineNumber,a=t.style;return n.map(function(t,n){var o=n+r;return e.createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof a?a(o):a},"".concat(o,"\n"))})}({lines:n.replace(/\n$/,"").split("\n"),style:s,startingLineNumber:l}))}function Xd(e){return"".concat(e.toString().length,".25em")}function Zd(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Qd(e,t,n){var r={display:"inline-block",minWidth:Xd(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return Wd(Wd({},r),a)}function Jd(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,a=e.largestLineNumber,o=e.showInlineLineNumbers,i=e.lineProps,s=void 0===i?{}:i,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,p=e.wrapLines,f=void 0!==p&&p?Wd({},"function"==typeof s?s(n):s):{};if(f.className=f.className?[].concat(Ld(f.className.trim().split(/\s+/)),Ld(c)):c,n&&o){var g=Qd(r,n,a);t.unshift(Zd(n,g))}return d&u&&(f.style=Wd({display:"flex"},f.style)),{type:"element",tagName:"span",properties:f,children:t}}function ep(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r<e.length;r++){var a=e[r];if("text"===a.type)n.push(Jd({children:[a],className:Ld(new Set(t))}));else if(a.children){var o=t.concat(a.properties.className);ep(a.children,o).forEach(function(e){return n.push(e)})}}return n}function tp(e,t,n,r,a,o,i,s,l){var c,u=ep(e.value),d=[],p=-1,f=0;function g(e,o){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||c.length>0?function(e,o){return Jd({children:e,lineNumber:o,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:a,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:l,wrapLines:t})}(e,o,c):function(e,t){if(r&&t&&a){var n=Qd(s,t,i);e.unshift(Zd(t,n))}return e}(e,o)}for(var m=function(){var e=u[f],t=e.children[0].value,n=function(e){return e.match(Yd)}(t);if(n){var a=t.split("\n");a.forEach(function(t,n){var i=r&&d.length+o,s={type:"text",value:"".concat(t,"\n")};if(0===n){var l=g(u.slice(p+1,f).concat(Jd({children:[s],className:e.properties.className})),i);d.push(l)}else if(n===a.length-1){var c=u[f+1]&&u[f+1].children&&u[f+1].children[0],m={type:"text",value:"".concat(t)};if(c){var h=Jd({children:[m],className:e.properties.className});u.splice(f+1,0,h)}else{var b=g([m],i,e.properties.className);d.push(b)}}else{var y=g([s],i,e.properties.className);d.push(y)}}),p=f}f++};f<u.length;)m();if(p!==u.length-1){var h=u.slice(p+1,u.length);if(h&&h.length){var b=g(h,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function np(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(e,t){return Gd({node:e,stylesheet:n,useInlineStyles:r,key:"code-segment-".concat(t)})})}function rp(e){return e&&void 0!==e.highlightAuto}var ap=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)op.call(n,r)&&(e[r]=n[r])}return e},op=Object.prototype.hasOwnProperty;var ip=lp,sp=lp.prototype;function lp(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}sp.space=null,sp.normal={},sp.property={};var cp=ap,up=ip,dp=function(e){var t,n,r=e.length,a=[],o=[],i=-1;for(;++i<r;)t=e[i],a.push(t.property),o.push(t.normal),n=t.space;return new up(cp.apply(null,a),cp.apply(null,o),n)};var pp=function(e){return e.toLowerCase()};var fp=mp,gp=mp.prototype;function mp(e,t){this.property=e,this.attribute=t}gp.space=null,gp.attribute=null,gp.property=null,gp.boolean=!1,gp.booleanish=!1,gp.overloadedBoolean=!1,gp.number=!1,gp.commaSeparated=!1,gp.spaceSeparated=!1,gp.commaOrSpaceSeparated=!1,gp.mustUseProperty=!1,gp.defined=!1;var hp={},bp=0;function yp(){return Math.pow(2,++bp)}hp.boolean=yp(),hp.booleanish=yp(),hp.overloadedBoolean=yp(),hp.number=yp(),hp.spaceSeparated=yp(),hp.commaSeparated=yp(),hp.commaOrSpaceSeparated=yp();var vp=fp,wp=hp,Sp=Ep;Ep.prototype=new vp,Ep.prototype.defined=!0;var xp=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],kp=xp.length;function Ep(e,t,n,r){var a,o=-1;for(Ap(this,"space",r),vp.call(this,e,t);++o<kp;)Ap(this,a=xp[o],(n&wp[a])===wp[a])}function Ap(e,t,n){n&&(e[t]=n)}var Tp=pp,Cp=ip,Op=Sp,Ip=function(e){var t,n,r=e.space,a=e.mustUseProperty||[],o=e.attributes||{},i=e.properties,s=e.transform,l={},c={};for(t in i)n=new Op(t,s(o,t),i[t],r),-1!==a.indexOf(t)&&(n.mustUseProperty=!0),l[t]=n,c[Tp(t)]=t,c[Tp(n.attribute)]=t;return new Cp(l,c,r)};var Rp=Ip({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var Np=Ip({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});var _p=function(e,t){return t in e?e[t]:t};var Pp=_p,Lp=function(e,t){return Pp(e,t.toLowerCase())};var Dp=Ip({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Lp,properties:{xmlns:null,xmlnsXLink:null}}),Mp=hp,jp=Ip,Fp=Mp.booleanish,Bp=Mp.number,Up=Mp.spaceSeparated,zp=jp({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Fp,ariaAutoComplete:null,ariaBusy:Fp,ariaChecked:Fp,ariaColCount:Bp,ariaColIndex:Bp,ariaColSpan:Bp,ariaControls:Up,ariaCurrent:null,ariaDescribedBy:Up,ariaDetails:null,ariaDisabled:Fp,ariaDropEffect:Up,ariaErrorMessage:null,ariaExpanded:Fp,ariaFlowTo:Up,ariaGrabbed:Fp,ariaHasPopup:null,ariaHidden:Fp,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Up,ariaLevel:Bp,ariaLive:null,ariaModal:Fp,ariaMultiLine:Fp,ariaMultiSelectable:Fp,ariaOrientation:null,ariaOwns:Up,ariaPlaceholder:null,ariaPosInSet:Bp,ariaPressed:Fp,ariaReadOnly:Fp,ariaRelevant:null,ariaRequired:Fp,ariaRoleDescription:Up,ariaRowCount:Bp,ariaRowIndex:Bp,ariaRowSpan:Bp,ariaSelected:Fp,ariaSetSize:Bp,ariaSort:null,ariaValueMax:Bp,ariaValueMin:Bp,ariaValueNow:Bp,ariaValueText:null,role:null}});var $p=hp,qp=Ip,Gp=Lp,Hp=$p.boolean,Vp=$p.overloadedBoolean,Wp=$p.booleanish,Yp=$p.number,Kp=$p.spaceSeparated,Xp=$p.commaSeparated,Zp=dp([Np,Rp,Dp,zp,qp({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Gp,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xp,acceptCharset:Kp,accessKey:Kp,action:null,allow:null,allowFullScreen:Hp,allowPaymentRequest:Hp,allowUserMedia:Hp,alt:null,as:null,async:Hp,autoCapitalize:null,autoComplete:Kp,autoFocus:Hp,autoPlay:Hp,capture:Hp,charSet:null,checked:Hp,cite:null,className:Kp,cols:Yp,colSpan:null,content:null,contentEditable:Wp,controls:Hp,controlsList:Kp,coords:Yp|Xp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Hp,defer:Hp,dir:null,dirName:null,disabled:Hp,download:Vp,draggable:Wp,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Hp,formTarget:null,headers:Kp,height:Yp,hidden:Hp,high:Yp,href:null,hrefLang:null,htmlFor:Kp,httpEquiv:Kp,id:null,imageSizes:null,imageSrcSet:Xp,inputMode:null,integrity:null,is:null,isMap:Hp,itemId:null,itemProp:Kp,itemRef:Kp,itemScope:Hp,itemType:Kp,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Hp,low:Yp,manifest:null,max:null,maxLength:Yp,media:null,method:null,min:null,minLength:Yp,multiple:Hp,muted:Hp,name:null,nonce:null,noModule:Hp,noValidate:Hp,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu: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,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:Hp,optimum:Yp,pattern:null,ping:Kp,placeholder:null,playsInline:Hp,poster:null,preload:null,readOnly:Hp,referrerPolicy:null,rel:Kp,required:Hp,reversed:Hp,rows:Yp,rowSpan:Yp,sandbox:Kp,scope:null,scoped:Hp,seamless:Hp,selected:Hp,shape:null,size:Yp,sizes:null,slot:null,span:Yp,spellCheck:Wp,src:null,srcDoc:null,srcLang:null,srcSet:Xp,start:Yp,step:null,style:null,tabIndex:Yp,target:null,title:null,translate:null,type:null,typeMustMatch:Hp,useMap:null,value:Wp,width:Yp,wrap:null,align:null,aLink:null,archive:Kp,axis:null,background:null,bgColor:null,border:Yp,borderColor:null,bottomMargin:Yp,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Hp,declare:Hp,event:null,face:null,frame:null,frameBorder:null,hSpace:Yp,leftMargin:Yp,link:null,longDesc:null,lowSrc:null,marginHeight:Yp,marginWidth:Yp,noResize:Hp,noHref:Hp,noShade:Hp,noWrap:Hp,object:null,profile:null,prompt:null,rev:null,rightMargin:Yp,rules:null,scheme:null,scrolling:Wp,standby:null,summary:null,text:null,topMargin:Yp,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Yp,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Hp,disableRemotePlayback:Hp,prefix:null,property:null,results:Yp,security:null,unselectable:null}})]),Qp=pp,Jp=Sp,ef=fp,tf="data",nf=function(e,t){var n=Qp(t),r=t,a=ef;if(n in e.normal)return e.property[e.normal[n]];n.length>4&&n.slice(0,4)===tf&&rf.test(t)&&("-"===t.charAt(4)?r=function(e){var t=e.slice(5).replace(af,lf);return tf+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);if(af.test(t))return e;t=t.replace(of,sf),"-"!==t.charAt(0)&&(t="-"+t);return tf+t}(t),a=Jp);return new a(r,t)},rf=/^data[-\w.:]+$/i,af=/-[a-z]/g,of=/[A-Z]/g;function sf(e){return"-"+e.toLowerCase()}function lf(e){return e.charAt(1).toUpperCase()}var cf=function(e,t){var n,r,a,o=e||"",i=t||"div",s={},l=0;for(;l<o.length;)uf.lastIndex=l,a=uf.exec(o),(n=o.slice(l,a?a.index:o.length))&&(r?"#"===r?s.id=n:s.className?s.className.push(n):s.className=[n]:i=n,l+=n.length),a&&(r=a[0],l++);return{type:"element",tagName:i,properties:s,children:[]}},uf=/[#.]/g;var df={parse:function(e){var t=String(e||pf).trim();return t===pf?[]:t.split(gf)},stringify:function(e){return e.join(ff).trim()}},pf="",ff=" ",gf=/[ \t\n\r\f]+/g;var mf={parse:function(e){var t,n=[],r=String(e||yf),a=r.indexOf(hf),o=0,i=!1;for(;!i;)-1===a&&(a=r.length,i=!0),!(t=r.slice(o,a).trim())&&i||n.push(t),o=a+1,a=r.indexOf(hf,o);return n},stringify:function(e,t){var n=t||{},r=!1===n.padLeft?yf:bf,a=n.padRight?bf:yf;e[e.length-1]===yf&&(e=e.concat(yf));return e.join(a+hf+r).trim()}},hf=",",bf=" ",yf="";var vf=nf,wf=pp,Sf=cf,xf=df.parse,kf=mf.parse,Ef=function(e,t,n){var r=n?function(e){var t,n=e.length,r=-1,a={};for(;++r<n;)a[(t=e[r]).toLowerCase()]=t;return a}(n):null;return function(e,n){var o,i=Sf(e,t),s=Array.prototype.slice.call(arguments,2),l=i.tagName.toLowerCase();i.tagName=r&&Af.call(r,l)?r[l]:l,n&&function(e,t){return"string"==typeof e||"length"in e||function(e,t){var n=t.type;if("input"===e||!n||"string"!=typeof n)return!1;if("object"==typeof t.children&&"length"in t.children)return!0;if(n=n.toLowerCase(),"button"===e)return"menu"!==n&&"submit"!==n&&"reset"!==n&&"button"!==n;return"value"in t}(t.tagName,e)}(n,i)&&(s.unshift(n),n=null);if(n)for(o in n)a(i.properties,o,n[o]);Tf(i.children,s),"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]);return i};function a(t,n,r){var a,o,i;null!=r&&r==r&&(o=(a=vf(e,n)).property,"string"==typeof(i=r)&&(a.spaceSeparated?i=xf(i):a.commaSeparated?i=kf(i):a.commaOrSpaceSeparated&&(i=xf(kf(i).join(" ")))),"style"===o&&"string"!=typeof r&&(i=function(e){var t,n=[];for(t in e)n.push([t,e[t]].join(": "));return n.join("; ")}(i)),"className"===o&&t.className&&(i=t.className.concat(i)),t[o]=function(e,t,n){var r,a,o;if("object"!=typeof n||!("length"in n))return Cf(e,t,n);a=n.length,r=-1,o=[];for(;++r<a;)o[r]=Cf(e,t,n[r]);return o}(a,o,i))}},Af={}.hasOwnProperty;function Tf(e,t){var n,r;if("string"!=typeof t&&"number"!=typeof t)if("object"==typeof t&&"length"in t)for(n=-1,r=t.length;++n<r;)Tf(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");e.push(t)}else e.push({type:"text",value:String(t)})}function Cf(e,t,n){var r=n;return e.number||e.positiveNumber?isNaN(r)||""===r||(r=Number(r)):(e.boolean||e.overloadedBoolean)&&("string"!=typeof r||""!==r&&wf(n)!==wf(t)||(r=!0)),r}var Of=Ef(Zp,"div");Of.displayName="html";var If=Of,Rf=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57};var Nf=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57};var _f=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90};var Pf=_f,Lf=Rf;var Df={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrav:"Ì",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",L:"<",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntild:"Ñ",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacut:"Ó",Oacute:"Ó",Ocir:"Ô",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograv:"Ò",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslas:"Ø",Oslash:"Ø",Otild:"Õ",Otilde:"Õ",Otimes:"⨷",Oum:"Ö",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUO:'"',QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",RE:"®",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THOR:"Þ",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacut:"Ú",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucir:"Û",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrav:"Ù",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uum:"Ü",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacut:"Ý",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacut:"á",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acir:"â",acirc:"â",acut:"´",acute:"´",acy:"а",aeli:"æ",aelig:"æ",af:"",afr:"𝔞",agrav:"à",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",am:"&",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",arin:"å",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atild:"ã",atilde:"ã",aum:"ä",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvba:"¦",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedi:"ç",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedi:"¸",cedil:"¸",cemptyv:"⦲",cen:"¢",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",cop:"©",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curre:"¤",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",de:"°",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divid:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacut:"é",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"ê",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrav:"è",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",et:"ð",eth:"ð",eum:"ë",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac1:"¼",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac3:"¾",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",g:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacut:"í",iacute:"í",ic:"",icir:"î",icirc:"î",icy:"и",iecy:"е",iexc:"¡",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrav:"ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iques:"¿",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",ium:"ï",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laqu:"«",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",l:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",mac:"¯",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micr:"µ",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middo:"·",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbs:" ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",no:"¬",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntild:"ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacut:"ó",oacute:"ó",oast:"⊛",ocir:"ô",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograv:"ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"º",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslas:"ø",oslash:"ø",osol:"⊘",otild:"õ",otilde:"õ",otimes:"⊗",otimesas:"⨶",oum:"ö",ouml:"ö",ovbar:"⌽",par:"¶",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusm:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",poun:"£",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quo:'"',quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raqu:"»",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",re:"®",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sec:"§",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",sh:"",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szli:"ß",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thor:"þ",thorn:"þ",tilde:"˜",time:"×",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacut:"ú",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucir:"û",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrav:"ù",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",um:"¨",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uum:"ü",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacut:"ý",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",ye:"¥",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yum:"ÿ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},Mf=function(e){return!!jf.call(Df,e)&&Df[e]},jf={}.hasOwnProperty;var Ff={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},Bf={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},Uf=Rf,zf=Nf,$f=function(e){return Pf(e)||Lf(e)},qf=Mf,Gf=function(e,t){var n,r,a={};t||(t={});for(r in Yf)n=t[r],a[r]=null==n?Yf[r]:n;(a.position.indent||a.position.start)&&(a.indent=a.position.indent||[],a.position=a.position.start);return function(e,t){var n,r,a,o,i,s,l,c,u,d,p,f,g,m,h,b,y,v,w,S=t.additional,x=t.nonTerminated,k=t.text,E=t.reference,A=t.warning,T=t.textContext,C=t.referenceContext,O=t.warningContext,I=t.position,R=t.indent||[],N=e.length,_=0,P=-1,L=I.column||1,D=I.line||1,M="",j=[];"string"==typeof S&&(S=S.charCodeAt(0));b=F(),c=A?B:Wf,_--,N++;for(;++_<N;)if(i===Xf&&(L=R[P]||1),(i=e.charCodeAt(_))===Jf){if((l=e.charCodeAt(_+1))===Kf||l===Xf||l===Zf||l===Qf||l===Jf||l===tg||l!=l||S&&l===S){M+=Vf(i),L++;continue}for(f=g=_+1,w=g,l===rg?(w=++f,(l=e.charCodeAt(w))===ag||l===og?(m=lg,w=++f):m=cg):m=sg,n="",p="",o="",h=dg[m],w--;++w<N&&h(l=e.charCodeAt(w));)o+=Vf(l),m===sg&&Hf.call(Ff,o)&&(n=o,p=Ff[o]);(a=e.charCodeAt(w)===eg)&&(w++,(r=m===sg&&qf(o))&&(n=o,p=r)),v=1+w-g,(a||x)&&(o?m===sg?(a&&!p?c(hg,1):(n!==o&&(v=1+(w=f+n.length)-f,a=!1),a||(u=n?pg:gg,t.attribute?(l=e.charCodeAt(w))===ng?(c(u,v),p=null):$f(l)?p=null:c(u,v):c(u,v))),s=p):(a||c(fg,v),wg(s=parseInt(o,ug[m]))?(c(yg,v),s=Vf(ig)):s in Bf?(c(bg,v),s=Bf[s]):(d="",Sg(s)&&c(bg,v),s>65535&&(d+=Vf((s-=65536)>>>10|55296),s=56320|1023&s),s=d+Vf(s))):m!==sg&&c(mg,v)),s?(U(),b=F(),_=w-1,L+=w-g+1,j.push(s),(y=F()).offset++,E&&E.call(C,s,{start:b,end:y},e.slice(g-1,w)),b=y):(o=e.slice(g-1,w),M+=o,L+=o.length,_=w-1)}else 10===i&&(D++,P++,L=0),i==i?(M+=Vf(i),L++):U();return j.join("");function F(){return{line:D,column:L,offset:_+(I.offset||0)}}function B(e,t){var n=F();n.column+=t,n.offset+=t,A.call(O,vg[e],n,e)}function U(){M&&(j.push(M),k&&k.call(T,M,{start:b,end:F()}),M="")}}(e,a)},Hf={}.hasOwnProperty,Vf=String.fromCharCode,Wf=Function.prototype,Yf={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Kf=9,Xf=10,Zf=12,Qf=32,Jf=38,eg=59,tg=60,ng=61,rg=35,ag=88,og=120,ig=65533,sg="named",lg="hexadecimal",cg="decimal",ug={};ug[lg]=16,ug[cg]=10;var dg={};dg[sg]=$f,dg[cg]=Uf,dg[lg]=zf;var pg=1,fg=2,gg=3,mg=4,hg=5,bg=6,yg=7,vg={};function wg(e){return e>=55296&&e<=57343||e>1114111}function Sg(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||!(65535&~e)||65534==(65535&e)}vg[pg]="Named character references must be terminated by a semicolon",vg[fg]="Numeric character references must be terminated by a semicolon",vg[gg]="Named character references cannot be empty",vg[mg]="Numeric character references cannot be empty",vg[hg]="Named character references must be known",vg[bg]="Numeric character references cannot be disallowed",vg[yg]="Numeric character references cannot be outside the permissible Unicode range";var xg={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,o;switch(n=n||{},a.util.type(t)){case"Object":if(o=a.util.objId(t),n[o])return n[o];for(var i in r={},n[o]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return o=a.util.objId(t),n[o]?n[o]:(r=[],n[o]=r,t.forEach(function(t,a){r[a]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=a.util.clone(a.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var o=(r=r||a.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=r[e];return r[e]=i,a.languages.DFS(a.languages,function(t,n){n===c&&t!=e&&(this[t]=i)}),i},DFS:function e(t,n,r,o){o=o||{};var i=a.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var l=t[s],c=a.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlightAll:function(e,t){a.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),a.hooks.run("before-all-elements-highlight",r);for(var o,i=0;o=r.elements[i++];)a.highlightElement(o,!0===t,r.callback)},highlightElement:function(t,n,r){var o=a.util.getLanguage(t),i=a.languages[o];a.util.setLanguage(t,o);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&a.util.setLanguage(s,o);var l={element:t,language:o,grammar:i,code:t.textContent};function c(e){l.highlightedCode=e,a.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,a.hooks.run("after-highlight",l),a.hooks.run("complete",l),r&&r.call(l.element)}if(a.hooks.run("before-sanity-check",l),(s=l.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!l.code)return a.hooks.run("complete",l),void(r&&r.call(l.element));if(a.hooks.run("before-highlight",l),l.grammar)if(n&&e.Worker){var u=new Worker(a.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else c(a.highlight(l.code,l.grammar,l.language));else c(a.util.encode(l.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(a.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=a.tokenize(r.code,r.grammar),a.hooks.run("after-tokenize",r),o.stringify(a.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new l;return c(a,a.head,e),s(e,a,t,a.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var r,o=0;r=n[o++];)r(t)}},Token:o};function o(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function s(e,t,n,r,l,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var g=0;g<f.length;++g){if(d&&d.cause==p+","+g)return;var m=f[g],h=m.inside,b=!!m.lookbehind,y=!!m.greedy,v=m.alias;if(y&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var S=m.pattern||m,x=r.next,k=l;x!==t.tail&&!(d&&k>=d.reach);k+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof o)){var A,T=1;if(y){if(!(A=i(S,k,e,b))||A.index>=e.length)break;var C=A.index,O=A.index+A[0].length,I=k;for(I+=x.value.length;C>=I;)I+=(x=x.next).value.length;if(k=I-=x.value.length,x.value instanceof o)continue;for(var R=x;R!==t.tail&&(I<O||"string"==typeof R.value);R=R.next)T++,I+=R.value.length;T--,E=e.slice(k,I),A.index-=k}else if(!(A=i(S,0,E,b)))continue;C=A.index;var N=A[0],_=E.slice(0,C),P=E.slice(C+N.length),L=k+E.length;d&&L>d.reach&&(d.reach=L);var D=x.prev;if(_&&(D=c(t,D,_),k+=_.length),u(t,D,T),x=c(t,D,new o(p,h?a.tokenize(N,h):N,v,N)),P&&c(t,x,P),T>1){var M={cause:p+","+g,reach:L};s(e,t,n,x.prev,k,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}if(e.Prism=a,o.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),a.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,i=n.immediateClose;e.postMessage(a.highlight(o,a.languages[r],r)),i&&e.close()},!1),a):a;var d=a.util.currentScript();function p(){a.manual||a.highlightAll()}if(d&&(a.filename=d.src,d.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return a}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
21
21
|
/**
|
|
22
22
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
23
23
|
*
|