(()=>{"use strict";function e(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let t={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function n(e){t=e}const s={exec:()=>null};function o(e,t=""){let n="string"==typeof e?e:e.source;const s={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(i.caret,"$1"),n=n.replace(e,o),s},getRegex:()=>new RegExp(n,t)};return s}const i={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},r=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,a=/(?:[*+-]|\d{1,9}[.)])/,l=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,c=o(l).replace(/bull/g,a).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),p=o(l).replace(/bull/g,a).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),h=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,u=/(?!\s*\])(?:\\.|[^\[\]\\])+/,d=o(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",u).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),g=o(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,a).getRegex(),f="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",m=/|$))/,b=o("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",m).replace("tag",f).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x=o(h).replace("hr",r).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex(),y={blockquote:o(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",x).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:d,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:r,html:b,lheading:c,list:g,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:x,table:s,text:/^[^\n]+/},k=o("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",r).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex(),w={...y,lheading:p,table:k,paragraph:o(h).replace("hr",r).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",k).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",f).getRegex()},A={...y,html:o("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",m).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:o(h).replace("hr",r).replace("heading"," *#{1,6} *[^\n]").replace("lheading",c).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},v=/^( {2,}|\\)\n(?!\s*$)/,S=/[\p{P}\p{S}]/u,C=/[\s\p{P}\p{S}]/u,L=/[^\s\p{P}\p{S}]/u,R=o(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,C).getRegex(),E=/(?!~)[\p{P}\p{S}]/u,O=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,$=o(O,"u").replace(/punct/g,S).getRegex(),T=o(O,"u").replace(/punct/g,E).getRegex(),N="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",j=o(N,"gu").replace(/notPunctSpace/g,L).replace(/punctSpace/g,C).replace(/punct/g,S).getRegex(),P=o(N,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,E).getRegex(),I=o("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,L).replace(/punctSpace/g,C).replace(/punct/g,S).getRegex(),z=o(/\\(punct)/,"gu").replace(/punct/g,S).getRegex(),_=o(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D=o(m).replace("(?:--\x3e|$)","--\x3e").getRegex(),B=o("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",D).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),M=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,F=o(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",M).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),H=o(/^!?\[(label)\]\[(ref)\]/).replace("label",M).replace("ref",u).getRegex(),q=o(/^!?\[(ref)\](?:\[\])?/).replace("ref",u).getRegex(),V={_backpedal:s,anyPunctuation:z,autolink:_,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:v,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,emStrongLDelim:$,emStrongRDelimAst:j,emStrongRDelimUnd:I,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:F,nolink:q,punctuation:R,reflink:H,reflinkSearch:o("reflink|nolink(?!\\()","g").replace("reflink",H).replace("nolink",q).getRegex(),tag:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Y=e=>W[e];function X(e,t){if(t){if(i.escapeTest.test(e))return e.replace(i.escapeReplace,Y)}else if(i.escapeTestNoEncode.test(e))return e.replace(i.escapeReplaceNoEncode,Y);return e}function G(e){try{e=encodeURI(e).replace(i.percentDecode,"%")}catch{return null}return e}function ee(e,t){const n=e.replace(i.findPipe,((e,t,n)=>{let s=!1,o=t;for(;--o>=0&&"\\"===n[o];)s=!s;return s?"|":" |"})).split(i.splitPipe);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:te(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(null===s)return t;const o=s[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[s]=t;return s.length>=o.length?e.slice(o.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=te(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:te(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=te(t[0],"\n").split("\n"),n="",s="";const o=[];for(;e.length>0;){let t=!1;const i=[];let r;for(r=0;r1,o={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let r=!1;for(;e;){let n=!1,s="",a="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],p=!l.trim(),h=0;if(this.options.pedantic?(h=2,a=l.trimStart()):p?h=t[1].length+1:(h=t[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=l.slice(h),h+=t[1].length),p&&this.rules.other.blankLine.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),o=this.rules.other.fencesBeginRegex(h),i=this.rules.other.headingBeginRegex(h),r=this.rules.other.htmlBeginRegex(h);for(;e;){const u=e.split("\n",1)[0];let d;if(c=u,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(r.test(c))break;if(t.test(c))break;if(n.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=h||!c.trim())a+="\n"+d.slice(h);else{if(p)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(l))break;if(i.test(l))break;if(n.test(l))break;a+="\n"+c}p||c.trim()||(p=!0),s+=u+"\n",e=e.substring(u.length+1),l=d.slice(h)}}o.loose||(r?o.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(r=!0));let u,d=null;this.options.gfm&&(d=this.rules.other.listIsTask.exec(a),d&&(u="[ ] "!==d[0],a=a.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:s,task:!!d,checked:u,loose:!1,text:a,tokens:[]}),o.raw+=s}const a=o.items.at(-1);if(!a)return;a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));o.loose=n}if(o.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=te(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let s=0;s0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),ne(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ne(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s)return;if(s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...s[0]].length-1;let o,i,r=n,a=0;const l="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=l.exec(t));){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(i=[...o].length,s[3]||s[4]){r+=i;continue}if((s[5]||s[6])&&n%3&&!((n+i)%3)){a+=i;continue}if(r-=i,r>0)continue;i=Math.min(i,i+r+a);const t=[...s[0]][0].length,l=e.slice(0,n+s.index+t+i);if(Math.min(n,i)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let s;do{s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(s!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class oe{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||t,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:i,block:J.normal,inline:Z.normal};this.options.pedantic?(n.block=J.pedantic,n.inline=Z.pedantic):this.options.gfm&&(n.block=J.gfm,this.options.breaks?n.inline=Z.breaks:n.inline=Z.gfm),this.tokenizer.rules=n}static get rules(){return{block:J,inline:Z}}static lex(e,t){return new oe(t).lex(e)}static lexInline(e,t){return new oe(t).inlineTokens(e)}lex(e){e=e.replace(i.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const n=t.at(-1);1===s.raw.length&&void 0!==n?n.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let o=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){const i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+="\n"+s.raw,i.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(s),n=o.length!==e.length,e=e.substring(s.raw.length)}else if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,s=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,i="";for(;e;){let s;if(o||(i=""),o=!1,this.options.extensions?.inline?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===s.type&&"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s);continue}if(s=this.tokenizer.emStrong(e,n,i)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),t.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),t.push(s);continue}let r=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(s=this.tokenizer.inlineText(r)){e=e.substring(s.raw.length),"_"!==s.raw.slice(-1)&&(i=s.raw.slice(-1)),o=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class ie{options;parser;constructor(e){this.options=e||t}space(e){return""}code({text:e,lang:t,escaped:n}){const s=(t||"").match(i.notSpaceStart)?.[0],o=e.replace(i.endingNewline,"")+"\n";return s?'
'+(n?o:X(o,!0))+"
\n":"
"+(n?o:X(o,!0))+"
\n"}blockquote({tokens:e}){return`
\n${this.parser.parse(e)}
\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)}\n`}hr(e){return"
\n"}list(e){const t=e.ordered,n=e.start;let s="";for(let t=0;t\n"+s+"\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+X(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • \n`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    \n`}table(e){let t="",n="";for(let t=0;t${s}`),"\n\n"+t+"\n"+s+"
    \n"}tablerow({text:e}){return`\n${e}\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`\n`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${X(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),o=G(e);if(null===o)return s;let i='
    ",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));const o=G(e);if(null===o)return X(n);let i=`${n}{const o=e[s].flat(1/0);n=n.concat(this.walkTokens(o,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new ie(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,o=e.renderer[s],i=t[s];t[s]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new se(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,o=e.tokenizer[s],i=t[s];t[s]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new le;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,o=e.hooks[s],i=t[s];le.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then((e=>i.call(t,e)));const n=o.call(t,e);return i.call(t,n)}:t[s]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return oe.lex(e,t??this.defaults)}parser(e,t){return ae.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const s={...n},o={...this.defaults,...s},i=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===s.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const r=o.hooks?o.hooks.provideLexer():e?oe.lex:oe.lexInline,a=o.hooks?o.hooks.provideParser():e?ae.parse:ae.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then((e=>r(e,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>a(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let e=r(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=a(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

    An error occurred:

    "+X(n.message+"",!0)+"
    ";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function pe(e,t){return ce.parse(e,t)}pe.options=pe.setOptions=function(e){return ce.setOptions(e),pe.defaults=ce.defaults,n(pe.defaults),pe},pe.getDefaults=e,pe.defaults=t,pe.use=function(...e){return ce.use(...e),pe.defaults=ce.defaults,n(pe.defaults),pe},pe.walkTokens=function(e,t){return ce.walkTokens(e,t)},pe.parseInline=ce.parseInline,pe.Parser=ae,pe.parser=ae.parse,pe.Renderer=ie,pe.TextRenderer=re,pe.Lexer=oe,pe.lexer=oe.lex,pe.Tokenizer=se,pe.Hooks=le,pe.parse=pe;pe.options,pe.setOptions,pe.use,pe.walkTokens,pe.parseInline,ae.parse,oe.lex;const he=e=>"string"==typeof e,ue=()=>{let e,t;const n=new Promise(((n,s)=>{e=n,t=s}));return n.resolve=e,n.reject=t,n},de=e=>null==e?"":""+e,ge=/###/g,fe=e=>e&&e.indexOf("###")>-1?e.replace(ge,"."):e,me=e=>!e||he(e),be=(e,t,n)=>{const s=he(t)?t.split("."):t;let o=0;for(;o{const{obj:s,k:o}=be(e,t,Object);if(void 0!==s||1===t.length)return void(s[o]=n);let i=t[t.length-1],r=t.slice(0,t.length-1),a=be(e,r,Object);for(;void 0===a.obj&&r.length;)i=`${r[r.length-1]}.${i}`,r=r.slice(0,r.length-1),a=be(e,r,Object),a?.obj&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},ye=(e,t)=>{const{obj:n,k:s}=be(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,s))return n[s]},ke=(e,t,n)=>{for(const s in t)"__proto__"!==s&&"constructor"!==s&&(s in e?he(e[s])||e[s]instanceof String||he(t[s])||t[s]instanceof String?n&&(e[s]=t[s]):ke(e[s],t[s],n):e[s]=t[s]);return e},we=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ae={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ve=e=>he(e)?e.replace(/[&<>"'\/]/g,(e=>Ae[e])):e;const Se=[" ",",","?","!",";"],Ce=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Le=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}const s=t.split(n);let o=e;for(let e=0;e-1&&re?.replace("_","-"),Ee={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class Oe{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ee,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s{let[t,s]=e;for(let e=0;e{let[s,o]=t;for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==s.keySeparator?s.keySeparator:this.options.keySeparator,i=void 0!==s.ignoreJSONStructure?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let r;e.indexOf(".")>-1?r=e.split("."):(r=[e,t],n&&(Array.isArray(n)?r.push(...n):he(n)&&o?r.push(...n.split(o)):r.push(n)));const a=ye(this.data,r);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=r[0],t=r[1],n=r.slice(2).join(".")),!a&&i&&he(n)?Le(this.data?.[e]?.[t],n,o):a}addResource(e,t,n,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let r=[e,t];n&&(r=r.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=e.split("."),s=t,t=r[1]),this.addNamespaces(t),xe(this.data,r,s),o.silent||this.emit("added",e,t,n,s)}addResources(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const s in n)(he(n[s])||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});s.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,s,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},r=[e,t];e.indexOf(".")>-1&&(r=e.split("."),s=n,n=t,t=r[1]),this.addNamespaces(t);let a=ye(this.data,r)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?ke(a,n,o):a={...a,...n},xe(this.data,r,a),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var je={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,s,o){return e.forEach((e=>{t=this.processors[e]?.process(t,n,s,o)??t})),t}};const Pe={},Ie=e=>!he(e)&&"boolean"!=typeof e&&"number"!=typeof e;class ze extends Te{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=$e.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return void 0!==n?.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,r=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const s=Se.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===s.length)return!0;const o=Ce.getRegExp(`(${s.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,s));if(i&&!r){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:he(o)?[o]:o};const i=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(s)}return{key:e,namespaces:he(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof options&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const s=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:r}=this.extractFromKey(e[e.length-1],t),a=r[r.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if("cimode"===l?.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return s?{res:`${a}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:i}const p=this.resolve(e,t);let h=p?.res;const u=p?.usedKey||i,d=p?.exactUsedKey||i,g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,f=!this.i18nFormat||this.i18nFormat.handleAsObject,m=void 0!==t.count&&!he(t.count),b=ze.hasDefaultValue(t),x=m?this.pluralResolver.getSuffix(l,t.count,t):"",y=t.ordinal&&m?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",k=m&&!t.ordinal&&0===t.count,w=k&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${x}`]||t[`defaultValue${y}`]||t.defaultValue;let A=h;f&&!h&&b&&(A=w);const v=Ie(A),S=Object.prototype.toString.apply(A);if(!(f&&A&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(S)<0)||he(g)&&Array.isArray(A))if(f&&he(g)&&Array.isArray(h))h=h.join(g),h&&(h=this.extendTranslation(h,e,t,n));else{let s=!1,r=!1;!this.isValidLookup(h)&&b&&(s=!0,h=w),this.isValidLookup(h)||(r=!0,h=i);const c=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&r?void 0:h,u=b&&w!==h&&this.options.updateMissing;if(r||s||u){if(this.logger.log(u?"updateKey":"missingKey",l,a,i,u?w:h),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t{const o=b&&s!==h?s:c;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,o,u,t):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,a,n,o,u,t),this.emit("missingKey",e,a,n,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);k&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{s([e],i+n,t[`defaultValue${n}`]||w)}))})):s(e,i,w))}h=this.extendTranslation(h,e,t,p,n),r&&h===i&&this.options.appendNamespaceToMissingKey&&(h=`${a}:${i}`),(r||s)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${i}`:i,s?h:void 0))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(u,A,{...t,ns:r}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(p.res=e,p.usedParams=this.getUsedParamsDetails(t),p):e}if(o){const e=Array.isArray(A),n=e?[]:{},s=e?d:u;for(const e in A)if(Object.prototype.hasOwnProperty.call(A,e)){const i=`${s}${o}${e}`;n[e]=b&&!h?this.translate(i,{...t,defaultValue:Ie(w)?w[e]:void 0,joinArrays:!1,ns:r}):this.translate(i,{...t,joinArrays:!1,ns:r}),n[e]===i&&(n[e]=A[e])}h=n}}return s?(p.res=h,p.usedParams=this.getUsedParamsDetails(t),p):h}extendTranslation(e,t,n,s,o){var i=this;if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const r=he(e)&&(void 0!==n?.interpolation?.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(r){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=n.replace&&!he(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||s.usedLng,n),r){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,s=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return he(e)&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,r),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const p=void 0!==r.count&&!he(r.count),h=p&&!r.ordinal&&0===r.count,u=void 0!==r.context&&(he(r.context)||"number"==typeof r.context)&&""!==r.context,d=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);c.forEach((e=>{this.isValidLookup(t)||(i=e,Pe[`${d[0]}-${e}`]||!this.utils?.hasLoadedNamespace||this.utils?.hasLoadedNamespace(i)||(Pe[`${d[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${d.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),d.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,r);else{let e;p&&(e=this.pluralResolver.getSuffix(n,r.count,r));const t=`${this.options.pluralSeparator}zero`,s=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(i.push(l+e),r.ordinal&&0===e.indexOf(s)&&i.push(l+e.replace(s,this.options.pluralSeparator)),h&&i.push(l+t)),u){const n=`${l}${this.options.contextSeparator}${r.context}`;i.push(n),p&&(i.push(n+e),r.ordinal&&0===e.indexOf(s)&&i.push(n+e.replace(s,this.options.pluralSeparator)),h&&i.push(n+t))}}let a;for(;a=i.pop();)this.isValidLookup(t)||(s=a,t=this.getResource(n,e,a,r))})))}))})),{res:t,usedKey:n,exactUsedKey:s,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,s):this.resourceStore.getResource(e,t,n,s)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!he(e.replace);let s=n?e.replace:e;if(n&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const e of t)delete s[e]}return s}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}class _e{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=$e.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Re(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Re(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(he(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;const s=this.getLanguagePartFromCode(e);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find((e=>e===s?e:e.indexOf("-")<0&&s.indexOf("-")<0?void 0:e.indexOf("-")>0&&s.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===s||0===e.indexOf(s)&&s.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),he(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],o=e=>{e&&(this.isSupportedCode(e)?s.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return he(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):he(e)&&o(this.formatLanguageCode(e)),n.forEach((e=>{s.indexOf(e)<0&&o(this.formatLanguageCode(e))})),s}}const De={zero:0,one:1,two:2,few:3,many:4,other:5},Be={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Me{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=$e.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Re("dev"===e?"en":e),s=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:s})}catch(n){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Be;if(!e.match(/-|_/))return Be;const s=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(s,t)}return this.pluralRulesCache[o]=i,i}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort(((e,t)=>De[e]-De[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const Fe=function(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const s=ye(e,n);return void 0!==s?s:ye(t,n)})(e,t,n);return!i&&o&&he(n)&&(i=Le(e,n,s),void 0===i&&(i=Le(t,n,s))),i},He=e=>e.replace(/\$/g,"$$$$");class qe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=$e.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:r,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:p,nestingPrefix:h,nestingPrefixEscaped:u,nestingSuffix:d,nestingSuffixEscaped:g,nestingOptionsSeparator:f,maxReplaces:m,alwaysFormat:b}=e.interpolation;this.escape=void 0!==t?t:ve,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==s&&s,this.prefix=o?we(o):i||"{{",this.suffix=r?we(r):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?we(h):u||we("$t("),this.nestingSuffix=d?we(d):g||we(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==b&&b,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,s){let o,i,r;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Fe(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...s,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),r=o.join(this.formatSeparator).trim();return this.format(Fe(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),r,n,{...s,...t,interpolationkey:i})};this.resetRegExp();const c=s?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=void 0!==s?.interpolation?.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>He(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?He(this.escape(e)):He(e)}].forEach((t=>{for(r=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,s);i=he(t)?t:""}else if(s&&Object.prototype.hasOwnProperty.call(s,n))i="";else{if(p){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else he(i)||this.useRawValueToEscape||(i=de(i));const a=t.safeValue(i);if(e=e.replace(o[0],a),p?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,r++,r>=this.maxReplaces)break}})),e}nest(e,t){let n,s,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const s=e.split(new RegExp(`${n}[ ]*{`));let i=`{${s[1]}`;e=s[0],i=this.interpolate(i,o);const r=i.match(/'/g),a=i.match(/"/g);((r?.length??0)%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];o={...i},o=o.replace&&!he(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),a=e,l=!0}if(s=t(r.call(this,n[1].trim(),o),o),s&&n[0]===e&&!he(s))return s;he(s)||(s=de(s)),s||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),s=""),l&&(s=a.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),s.trim())),e=e.replace(n[0],s),this.regexp.lastIndex=0}return e}}const Ve=e=>{const t={};return(n,s,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const r=s+JSON.stringify(i);let a=t[r];return a||(a=e(Re(s),o),t[r]=a),a(n)}};class Ue{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=$e.create("formatter"),this.options=e,this.formats={number:Ve(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:Ve(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:Ve(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:Ve(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:Ve(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ve(t)}format(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const s=e.split("(");t=s[0].toLowerCase().trim();const o=s[1].substring(0,s[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...s]=e.split(":"),o=s.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const r=s?.formatParams?.[s.interpolationkey]||{},a=r.locale||r.lng||s.locale||s.lng||n;t=this.formats[o](e,a,{...i,...s,...r})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e)}}class Ke extends Te{constructor(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=$e.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,s.backend,s)}queueLoad(e,t,n,s){const o={},i={},r={},a={};return e.forEach((e=>{let s=!0;t.forEach((t=>{const r=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[r]=2:this.state[r]<0||(1===this.state[r]?void 0===i[r]&&(i[r]=!0):(this.state[r]=1,s=!1,void 0===i[r]&&(i[r]=!0),void 0===o[r]&&(o[r]=!0),void 0===a[t]&&(a[t]=!0)))})),s||(r[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(r),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const s=e.split("|"),o=s[0],i=s[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const r={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:s,k:o}=be(e,t,Object);s[o]=s[o]||[],s[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{r[e]||(r[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===r[e][t]&&(r[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",r),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:s,wait:o,callback:i});this.readingCalls++;const r=(r,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}r&&a&&s{this.read.call(this,e,t,n,s+1,2*o,i)}),o):i(r,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,r);try{const n=a(e,t);n&&"function"==typeof n.then?n.then((e=>r(null,e))).catch(r):r(null,n)}catch(e){r(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();he(e)&&(e=this.languageUtils.toResolveHierarchy(e)),he(t)&&(t=[t]);const o=this.queueLoad(e,t,n,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),s=n[0],o=n[1];this.read(s,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${s} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${s}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,s,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(!this.services?.utils?.hasLoadedNamespace||this.services?.utils?.hasLoadedNamespace(t)){if(null!=n&&""!==n){if(this.backend?.create){const a={...i,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let o;o=5===l.length?l(e,t,n,s,a):l(e,t,n,s),o&&"function"==typeof o.then?o.then((e=>r(null,e))).catch(r):r(null,o)}catch(e){r(e)}else l(e,t,n,s,r,a)}e&&e[0]&&this.store.addResource(e[0],t,n,s)}}else this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")}}const Qe=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),he(e[1])&&(t.defaultValue=e[1]),he(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Je=e=>(he(e.ns)&&(e.ns=[e.ns]),he(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),he(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),Ze=()=>{};class We extends Te{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Je(e),this.services={},this.logger=$e,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),null==t.defaultNS&&t.ns&&(he(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=Qe();this.options={...s,...this.options,...Je(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?$e.init(o(this.modules.logger),this.options):$e.init(null,this.options),t=this.modules.formatter?this.modules.formatter:Ue;const n=new _e(this.options);this.store=new Ne(this.options.resources,this.options);const i=this.services;i.logger=$e,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Me(n,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new qe(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ke(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o1?n-1:0),o=1;o{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=Ze),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=ue(),r=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?r():setTimeout(r,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ze;const n=he(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if("cimode"===n?.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],s=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)s(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>s(e)))}this.options.preload?.forEach?.((e=>s(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const s=ue();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Ze),this.services.backendConnector.reload(e,t,(e=>{s.resolve(),n(e)})),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&je.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const s=ue();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,r)=>{r?this.isLanguageChangingTo===e&&(o(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,s.resolve((function(){return n.t(...arguments)})),t&&t(i,(function(){return n.t(...arguments)}))},r=t=>{e||t||!this.services.languageDetector||(t=[]);const n=he(t)?t:t&&t[0],s=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(he(t)?[t]:t);s&&(this.language||o(s),this.translator.language||this.translator.changeLanguage(s),this.services.languageDetector?.cacheUserLanguage?.(s)),this.loadResources(s,(e=>{i(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(r):this.services.languageDetector.detect(r):r(e):r(this.services.languageDetector.detect()),s}getFixedT(e,t,n){var s=this;const o=function(e,t){let i;if("object"!=typeof t){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l`${i.keyPrefix}${c}${e}`)):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,s.t(p,i)};return he(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],s=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||s&&!i(o,e)))}loadNamespaces(e,t){const n=ue();return this.options.ns?(he(e)&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ue();he(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter((e=>s.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=s.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services?.languageUtils||new _e(Qe());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new We(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ze;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new We(s);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));if(["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const e=Object.keys(this.store.data).reduce(((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce(((n,s)=>(n[s]={...e[t][s]},n)),e[t]),e)),{});o.store=new Ne(e,s),o.services.resourceStore=o.store}return o.translator=new ze(o.services,s),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s{St(),Ge&&Ge.removeChild(t)}));const s=document.createElement("p");s.textContent=Xe("support"),s.style.marginTop="0.375rem",s.style.fontSize="1rem",s.style.fontWeight="bold",s.style.color="peru",s.style.lineHeight="2rem",s.style.marginRight="0.75rem",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.style.whiteSpace="nowrap",s.style.marginBottom="0";const o=document.createElement("p");o.innerHTML=e,o.style.overflow="hidden",o.style.lineHeight="1.25rem",o.style.wordBreak="break-word",o.style.color="#7f7f7f",o.style.maxHeight="2.5rem",o.style.fontSize="small",o.style.marginTop="0";const i=document.createElement("button");i.style.width="4rem",i.style.cursor="pointer",i.style.outline="none",i.style.border="none",i.style.background="none";const r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("viewBox","0 0 24 24"),r.setAttribute("stroke-width","2"),r.setAttribute("stroke","rgba(31,41,55)"),r.setAttribute("fill","none"),r.style.width="1.75rem",r.style.height="1.75rem";const a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d","M6 18L18 6M6 6l12 12"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-linecap","round"),r.appendChild(a),i.appendChild(r),n.appendChild(s),n.appendChild(o),t.appendChild(n),t.appendChild(i);const l=document.querySelector("#lsw_chat_popup");Ge&&l&&"none"==l.style.display&&(Ge.appendChild(t),setTimeout((()=>{Ge&&Ge.removeChild(t)}),5e3)),i.addEventListener("click",(()=>{Ge&&Ge.removeChild(t)}))}},tt="https://apid.launchstrategies.ru";let nt,st=!1,ot=new et;const it=new class{report(e){fetch("https://apid.launchstrategies.ru/widget/bug",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})}},rt=document.createElement("div");function at(e,t="",n){let s="";if("object"==typeof t){if(t.date){let e=new Date(t.date);s=`${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}t=t.text||""}const o=document.createElement("div");o.style.position="relative",o.style.marginBottom="2em",o.className="flex";const i=document.createElement("div");i.style.position="relative",i.style.paddingRight="3em",i.classList.add("py-2","px-4","max-w-[70%]"),n?(o.style.justifyContent="flex-end",i.classList.add("me-message")):i.classList.add("you-message"),i.innerHTML=function(e){return e.replace(/\+?\d[\d\-\(\) ]{9,}\d/g,(e=>`
    ${e}`))}(t),o.appendChild(i),e.appendChild(o),e.scrollTop=e.scrollHeight;const r=document.createElement("div");return r.innerHTML=s,r.classList.add("clock"),i.appendChild(r),o}async function lt(e,t){const n=yt;if(n){if(kt&&(kt.value=""),"object"==typeof e&&e instanceof EventSource){let t,s;return e.addEventListener("textCreated",(()=>{t=at(n)})),e.addEventListener("typing",(()=>{s=at(n,rt.outerHTML)})),e.addEventListener("textDelta",(({data:e})=>{const s=t.querySelector("div");s&&(s.innerHTML=pe.parse(s.innerText+e).toString(),n.scrollTop=n.scrollHeight)})),void e.addEventListener("messageDone",(({data:o})=>{if(s?.parentNode&&s.parentNode.removeChild(s),e.close(),o)try{const e=JSON.parse(o);let s="";if(!e?.content?.length)return;(s=e.content[0].text.value)||(s="Что-то пошло не так. Попробуйте позже пожалуйста."),t?.querySelector("div")?t.querySelector("div").innerHTML=pe.parse(s).toString():t=at(n,{text:s,date:(new Date).valueOf()}),ot.newMessageNotify(s),async function(e,t){let n=!1;const s="string"==typeof e?e:e.content,o=localStorage.getItem("aiwi_messages"),i=o?JSON.parse(o):[];i.length&&(n=!0),i.push({role:t?"user":"assistant",content:s,date:"string"==typeof e?(new Date).valueOf():e.date}),localStorage.setItem("aiwi_messages",JSON.stringify(i));const r=localStorage.getItem("aiwi_thread_id");n&&r&&await fetch(`${tt}/widget/chat`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({thread:r})}).then((e=>e.json())).catch((e=>console.error("error chat notify",e.message)))}(s)}catch(e){console.error("error processing message",e)}}))}("string"!=typeof e&&e?e:[{role:t?"user":"assistant",content:e,date:(new Date).valueOf()}]).forEach((t=>{let s="user"==t.role;if(t.content&&at(n,{text:pe.parse(t.content).toString(),date:t.date},s),e){const n=localStorage.getItem("aiwi_messages"),o=n?JSON.parse(n):[];o.push({role:s?"user":"assistant",content:t.content,date:(new Date).valueOf()}),"string"==typeof e&&localStorage.setItem("aiwi_messages",JSON.stringify(o))}}))}else console.log("chatMessages div not found")}async function ct(){if(nt&&nt.readyState!==nt.CLOSED)return;const e=localStorage.getItem("aiwi_thread_id");e&&(nt=new EventSource(`${tt}/widget/listen/`+e),nt.addEventListener("operatorMessage",(({data:e})=>{st=!0,ot.newMessageNotify(e),lt(e)})),nt.addEventListener("operatorDisconnected",(({data:e})=>{st=!1})),nt.onerror=e=>{console.error("tonnel err",e),nt.close(),setTimeout((()=>{ct()}),3e3)})}async function pt(){const e=localStorage.getItem("aiwi_thread_id"),t=localStorage.getItem("aiwi_messages");if(e)return t&&(yt&&(yt.innerHTML=""),lt(JSON.parse(t))),t?null:e;const n=new Headers;n.append("Content-Type","application/json");const s=JSON.stringify({messages:[{role:"assistant",content:"Здравствуйте! Чем я могу помочь?"}],assistant_id:"68dbca64b486669c29a9b038"}),o=await fetch(`${tt}/assistants/threads`,{method:"POST",headers:n,body:s}).then((e=>e.json())).catch((e=>console.log("error",e)));return o?.id?(localStorage.setItem("aiwi_thread_id",o.id),nt&&nt.close(),ct(),o.id):void 0}rt.classList.add("typing-indicator"),rt.classList.add("flex"),rt.classList.add("items-center"),rt.classList.add("space-x-1"),rt.innerHTML='
    \n
    \n
    ';class ht{static sendEvent(e){const t="Ya"in window?window.Ya._metrika.getCounters().map((e=>e.id)):null;t?.length&&t.map((t=>{"ym"in window&&window.ym(t,"reachGoal",e)}))}static openChat(e="LSChat_Client_open_chat"){this.sendEvent(e)}static sendMessage(e="LSChat_Client_send_message"){this.sendEvent(e)}static sendLead(e="LSChat_Client_send_lead"){this.sendEvent(e)}static sendWhatsapp(e="LSChat_Client_click_whatsapp"){this.sendEvent(e)}static sendVk(e="LSChat_Client_click_vk"){this.sendEvent(e)}static sendPhone(e="LSChat_Client_click_phone"){this.sendEvent(e)}static sendTelegram(e="LSChat_Client_click_telegram"){this.sendEvent(e)}async sendPayload(e,t,n={}){const s=JSON.stringify(t),o={"Content-Type":"application/json"};n.projectKey&&n.projectKeyHeaderName&&(o[n.projectKeyHeaderName]=n.projectKey);try{if(n.useBeacon&&navigator.sendBeacon){const t=new Blob([s],{type:"application/json"});return navigator.sendBeacon(e,t),{ok:!0,beacon:!0}}const t=await fetch(e,{method:"POST",body:s,headers:o,keepalive:!!n.keepalive});return{ok:t.ok,status:t.status,text:await t.text().catch((()=>null))}}catch(e){return{ok:!1,error:e||String(e)}}}}let ut=document.createElement("div");const dt="data:image/webp;base64,UklGRq4JAABXRUJQVlA4WAoAAAAgAAAAOwAAOwAASUNDUKACAAAAAAKgbGNtcwQwAABtbnRyUkdCIFhZWiAH6QADABIADAAtADRhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1kZXNjAAABIAAAAEBjcHJ0AAABYAAAADZ3dHB0AAABmAAAABRjaGFkAAABrAAAACxyWFlaAAAB2AAAABRiWFlaAAAB7AAAABRnWFlaAAACAAAAABRyVFJDAAACFAAAACBnVFJDAAACFAAAACBiVFJDAAACFAAAACBjaHJtAAACNAAAACRkbW5kAAACWAAAACRkbWRkAAACfAAAACRtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACQAAAAcAEcASQBNAFAAIABiAHUAaQBsAHQALQBpAG4AIABzAFIARwBCbWx1YwAAAAAAAAABAAAADGVuVVMAAAAaAAAAHABQAHUAYgBsAGkAYwAgAEQAbwBtAGEAaQBuAABYWVogAAAAAAAA9tYAAQAAAADTLXNmMzIAAAAAAAEMQgAABd7///MlAAAHkwAA/ZD///uh///9ogAAA9wAAMBuWFlaIAAAAAAAAG+gAAA49QAAA5BYWVogAAAAAAAAJJ8AAA+EAAC2xFhZWiAAAAAAAABilwAAt4cAABjZcGFyYQAAAAAAAwAAAAJmZgAA8qcAAA1ZAAAT0AAACltjaHJtAAAAAAADAAAAAKPXAABUfAAATM0AAJmaAAAmZwAAD1xtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAEcASQBNAFBtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJWUDgg6AYAAPAfAJ0BKjwAPAA+MRaIQyIhIRULNdAgAwSxAFYc4GnfKXNDv/uzccHT5yB5uPNvOM8wDnMeYDoG+bN1G3oAeXB7Kv91/ID2qrnB4O/hnzP92/JX8btML+I/bD8B9pOoGfzX+7/kp+XnH4gA/JP6r/mfzC/r3Od9ZfRB/HP8t+X3vH4R1AD8p/6T09M7jzl/1v8n8Av8k/o/+z/uP+D/6f7/+LL9o/Zx/XljrYn+C3gEh0ML4rFlX45jHpjObF7XZuatouDySqWL0yYDeRy7zcgGoSjc14cgbzkGpmrXeqUn4ioc+W5ymAfgnX7EsmWIOS6lSFZ7IFtcQgweqID/TWhOER5P9V0vFAD+/N2Mtf68pUjU6PYquQp9/vhWiW2MdULKXrheAsfv53sKXI8TEi/uw+FDiJ55dbJ0a0E0QV+T26+9g7WNaY6hobYNjCMHLEQf7nwidb2qINm2uMsExISPr0p+COa6ZHEYegJegQu2v9c0h52aT9B6x6F7XbtHVvG4fWyKDOucMcIle3NJIt9kk2oqTA0MZrqY7CQmabfUFaYxIlLNtNRzTx9UPMVnTDFmHzM0xRieTHP93jl6UI2pd/D+dHF4Nszbbiv7+/WNHSZa+wf7mZvKrE4dVV1bJXpAHRB0r4Aa2FEbznjaADygVagrTq5CACmqRqgXfXZR9Ibdc+yPGC89+bkZAab/ipLsmonMZXX1KcLOmMuX21rnX4EeZkHRhB41PrhoJjDUzAv/+nX4uso3k0E5UuP99f/7wyw9O57/Iy69fmE43gJFTDFVxYHJDa678ZNymQKqomsRL6IUZF8NYqQ0uz98jHmwfYPlcK1m5TlM3NiuUdd+obhHBx69KDy8SulqP3oGPK/1/8RiFg5I82PixgUPo/XLe7f+Sket5DJBwdvu/77Cev8k41d/8NpR5vhhf8rlXbXQSnJ3SK6SCRVQuHJ4/oR4b3H0UpOO/yA/AL8cjPIks4jlI3iJvYij3eUgTlfCBQrIOiRXIR6hXVjV29lFSBWqzdaQLIHMnmcuck6Csw3DSbMGx+CsQXsY26IvmHhvMGxfzlA2imDwXf8TT7KW+KI4mJQEDGrs6fZB9hQfmYNNzeznJ2tYfaSKV0mJK88kMJV9sB1KD7/oXA2tlRY43GRlQYzo654vNqSpuU8ZgL1PnKSq2gppyiN/eH7A+WoZ7kwulTI1cn9hMvLk0b73lnqYIBg3zEmwOZbW7YLBrXBjWpgw9YvwO7cUJO6U9yehRJ//AuBDgYT+LGV/K9bMfVEv2ippR0fmihzwgBIDqH9k4kirK4ge+giPkbnboXiaQuyWgMzwefJQsCMIQNmNiw4Hzf2FU99gIEO1pg1uPDMI9Yn7xRrMzFMm4e6REtvLfW5/5nrjrazpsM+x04RAAIDciW1McfqpamzToD9xd1NG/3/0dx8FZno+u650V3n5RDaMjo16Credu2LN5yaQ6AolaDv1QGIiw6OuLfccvDSyq7Brj0T62ReARZW11EIsBXo8/l60Jtat09nsCKqwPCJ3W043bV6+oi+X+ntaeTcq8m58qLf4iTd7nnelWHuiisaLMQIedVTHWR/RfcX0L9d/BPSyWDH8h3rlvWL+jTRt3ZqZD84EoWrYvklzrGUUgG7e6UuwQUJq/06jTd1tG2E/jRHPYADqZ5QnaFKkqVZQM1SVIsBjKR49XDFHqxgm0GH1XMNLjp5oDpp6LcGa//Qzz4gAQ7R45Naqa81iPaSbpg/mlHU5Naq5Ns93vx2RWGGiKFYHafKKXRuk/4GS78Sf2Vz6AiRyDgoOo0oeZNTjEPkYN2SKBNQ/nHukbz3KRIQxqDKf9Qj//HGoxYyp1fGih7tbB8nNgke7cC9Dm5db+a3EouDIFhPP9NICiBq3fgD9Pt2H4uZIel7LLA8nDV7NQtNGUSnwfWtJedjtR9Z2QKWyKR7ixmMcTPIqyEe7OERCaWWsOH6pmus1SjGsXpeHqj4UZ1Y8xIvZTlVnAux19HV/w0MUJykUxI/8zuYqP9gKEnsEBeIPZyIX/vueeytWYBuKF/F+LZe69tUPhmNAqG37l7iGRfbuFzAHdF9gFdm0i4pF381+K1XPGYukEq4+taVRab1MIkAOUv+uHYf+CyFZKUTdmvsRnNxPPW6DB6uk0ceq2X11Vn5q5uQfpn/TH/PVSPH8045BRwOOKaFErF2/a1cHaaPiSZFAQ+ptdmSriqLxhd8do3SNP0EViTzu2uEXqQfXvAobtR6EW+InVTwWkMXQCybpFk3nK0eoCTT8etYmwJgVdmJn+v/WvNhEqPjxZ613ljxxcKD7+WL3mR5HCttjhPSXR4WLFUfzZsQWjlS4gAA=";let gt=new et;const ft=[-20,63],mt="#1976d2";let bt;const xt=new Map,yt=document.createElement("div"),kt=document.createElement("textarea"),wt="#F5F7FA";const At=function(){const e=document.createElement("div");Object.assign(e.style,{position:"relative",height:"4em",width:"4em"}),e.classList.add("animate");for(let t=0;t<3;t++){const t=document.createElement("div");t.classList.add("lsw_waves"),e.appendChild(t)}const t=document.createElement("li");let n=window.matchMedia("(hover: none) and (pointer: coarse)").matches,s=!1;t.addEventListener("click",(e=>{if(!n)return St(),void(s=!1);s?(s=!1,St()):(Ct(),s=!0,e.preventDefault())})),Object.assign(t.style,{backgroundColor:mt,borderRadius:"9999px",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",width:"4em",height:"4em",position:"absolute",zIndex:100});const o="http://www.w3.org/2000/svg",i=document.createElementNS(o,"svg");i.setAttribute("xmlns",o),i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("fill","none"),i.setAttribute("stroke","currentColor"),i.setAttribute("stroke-width","2"),Object.assign(i.style,{width:"2.5em",height:"2.5em",color:wt});const r=document.createElementNS(o,"path");r.setAttribute("stroke-linecap","round"),r.setAttribute("stroke-linejoin","round"),r.setAttribute("d","M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"),i.appendChild(r),t.appendChild(i);const a=document.createElement("ul");return a.appendChild(t),Object.assign(a.style,{padding:0,margin:0}),e.appendChild(a),e}(),vt=document.createElement("div");async function St(){if(vt.style.display="none"==vt.style.display?"flex":"none","none"!=vt.style.display){ut.style.display="none",ht.openChat(),At&&At.classList.remove("animate"),kt.focus();const e=await pt();yt.childNodes.length&&!e||(console.log("add message to chat"),lt("Здравствуйте! Чем я могу помочь?"))}else At&&At.classList.add("animate")}function Ct(){if(bt)for(let e=1;e{t.style.opacity="1",t.style.transform="translateY(0) scale(1)"}),10))}function Nt(){const e=vt.querySelector("#extra-contact-fields"),t=vt.querySelector("#contact-name"),n=vt.querySelector("#contact-form-subtitle");t.value.trim()||(e.style.maxHeight="0",e.style.opacity="0",n.style.maxHeight="0",n.style.opacity="0",n.style.marginBottom="0")}function jt(){console.log("hide contact form");const e=vt.querySelector("#contact-form-popup");e.style.opacity="0",e.style.transform="translateY(10px) scale(0.95)",setTimeout((()=>{e.style.display="none";Lt()||(vt.querySelector("#contact-name").value="",vt.querySelector("#contact-email").value="",vt.querySelector("#contact-phone").value="",Nt(),Ot())}),300)}async function Pt(){const e=vt.querySelector("#contact-form-popup button"),t=vt.querySelector("#contact-name"),n=vt.querySelector("#contact-email"),s=vt.querySelector("#contact-phone");e.disabled=!0,e.style.cursor="not-allowed";const o=e.textContent;e.textContent="Отправка...";const i={name:t.value.trim(),email:n.value.trim(),phone:s.value.trim(),timestamp:(new Date).toISOString(),chat:!0};Rt(i);try{(await fetch("https://apid.launchstrategies.ru/widget/lead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({assistant:"68dbca64b486669c29a9b038",...i,url:window.location.origin+window.location.pathname})})).ok&&(console.log("Contact data saved successfully"),jt())}catch(e){console.error("Failed to save contact data:",e),jt()}finally{e.textContent=o,e.disabled=!1,e.style.cursor="pointer"}}const It=[-20,63];const{slice:zt,forEach:_t}=[];const Dt=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Bt={create(e,t,n,s){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),s&&(o.domain=s),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let s=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Dt.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!Dt.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s}(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let e=0;e-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const s=e.substring(1).split("&");for(let e=0;e0){s[e].substring(0,o)===n&&(t=s[e].substring(o+1))}}}return t}};let Ht=null;const qt=()=>{if(null!==Ht)return Ht;try{if(Ht="undefined"!=typeof window&&null!==window.localStorage,!Ht)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){Ht=!1}return Ht};var Vt={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&qt())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&qt()&&window.localStorage.setItem(n,e)}};let Ut=null;const Kt=()=>{if(null!==Ut)return Ut;try{if(Ut="undefined"!=typeof window&&null!==window.sessionStorage,!Ut)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Ut=!1}return Ut};var Qt={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Kt())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Kt()&&window.sessionStorage.setItem(n,e)}},Jt={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:s}=navigator;if(e)for(let n=0;n0?t:void 0}},Zt={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const s=n||("undefined"!=typeof document?document.documentElement:null);return s&&"function"==typeof s.getAttribute&&(t=s.getAttribute("lang")),t}},Wt={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if("undefined"==typeof window)return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;const s="number"==typeof t?t:0;return n[s]?.replace("/","")}},Yt={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n="number"==typeof t?t+1:1,s="undefined"!=typeof window&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[n]}};let Xt=!1;try{document.cookie,Xt=!0}catch(e){}const Gt=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Xt||Gt.splice(1,1);class en{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return _t.call(zt.call(arguments,1),(t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])})),e}(t,this.options||{},{order:Gt,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Mt),this.addDetector(Ft),this.addDetector(Vt),this.addDetector(Qt),this.addDetector(Jt),this.addDetector(Zt),this.addDetector(Wt),this.addDetector(Yt)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach((e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}})),t=t.filter((e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some((e=>e.test(t))));var t})).map((e=>this.options.convertDetectedLanguage(e))),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)})))}}en.type="languageDetector";const tn={value:null};let nn,sn;Ye.use(en).init({resources:{en:{translation:{phone:"Phone",callAsk:"Let us call you back and explain everything",thanks:"Thank you!",waitCall:"Awaiting call!",workTechs:"Powered by technologies",haveQues:"Do you have any questions?",supportChat:"AI Agent",send:"Send",inputMessage:"Enter a message...",callMe:"Call me",support:"Support",online:"On-line",createdAt:"Powered by ls-ai.ru",askNames:"Please introduce yourself",yourName:"Your name"}},ru:{translation:{phone:"Телефон",callAsk:"Давайте мы перезвоним вам и все расскажем",thanks:"Благодарим!",waitCall:"Ожидайте звонка!",workTechs:"Работает на технологиях",haveQues:"У вас есть вопросы?",supportChat:"ИИ агент",online:"В сети",send:"Отправить",inputMessage:"Введите сообщение...",callMe:"Жду звонка",support:"Поддержка",createdAt:"При поддержке ls-ai.ru",askNames:"Представьтесь, пожалуйста",yourName:"Ваше имя",askEmailOrPhone:"Укажите email или телефон",sending:"Отправка..."}},ee:{translation:{telefon:"Telefon",callAsk:"Lubame teile tagasi helistada ja kõik selgeks rääkida",thanks:"Täname!",waitCall:"Oodake kõnet!",workTechs:"Töötab tehnoloogiatel",haveQues:"Kas teil on küsimusi?",supportChat:"Tehisintellekti agent",send:"Saada",inputMessage:"Sisestage sõnum...",callMe:"Helista mulle",support:"Tugi",online:"Veebis",createdAt:"Toetab ls-ai.ru",askNames:"Palun tutvustage ennast",yourName:"Teie nimi"}},es:{translation:{phone:"Teléfono",callAsk:"Déjenos llamarle y explicarle todo",thanks:"¡Gracias!",waitCall:"¡Espere la llamada!",workTechs:"Funciona con tecnologías",haveQues:"¿Tiene preguntas?",supportChat:"Agente IA",online:"En línea",send:"Enviar",inputMessage:"Escriba un mensaje...",callMe:"Espero la llamada",support:"Soporte",createdAt:"Con el apoyo de ls-ai.ru",askNames:"Preséntese, por favor",yourName:"Su nombre"}},de:{translation:{phone:"Telefon",callAsk:"Lassen Sie uns Sie zurückrufen und alles erklären",thanks:"Vielen Dank!",waitCall:"Bitte warten Sie auf den Anruf!",workTechs:"Arbeitet mit Technologien",haveQues:"Haben Sie Fragen?",supportChat:"KI-Agent",online:"Online",send:"Senden",inputMessage:"Nachricht eingeben...",callMe:"Ich warte auf den Anruf",support:"Support",createdAt:"Mit Unterstützung von ls-ai.ru",askNames:"Bitte stellen Sie sich vor",yourName:"Ihr Name"}},fr:{translation:{phone:"Téléphone",callAsk:"Laissez-nous vous rappeler et tout vous expliquer",thanks:"Merci beaucoup !",waitCall:"Attendez l'appel !",workTechs:"Fonctionne avec des technologies",haveQues:"Vous avez des questions ?",supportChat:"Agent IA",online:"En ligne",send:"Envoyer",inputMessage:"Entrez un message...",callMe:"J’attends l’appel",support:"Support",createdAt:"Avec le soutien de ls-ai.ru",askNames:"Veuillez vous présenter",yourName:"Votre nom"}}},detection:{convertDetectedLanguage:e=>/ru/i.test(e)?"ru":/ee|et/i.test(e)?"ee":/es/i.test(e)?"es":/de/i.test(e)?"de":/fr/i.test(e)?"fr":"en"}}),function(){if(Ge)return Ge;const e=[-20,63];e[1]+=73,Ge=document.createElement("div"),Ge.style.display="flex",Ge.style.flexDirection="column",Ge.style[e[0]>0?"left":"right"]=Math.abs(e[0])+"px",Ge.style[e[1]>0?"bottom":"top"]=Math.abs(e[1])+"px",Ge.style.position="fixed",Ge.style.zIndex="500",document.body.appendChild(Ge)}();{let e=function(e,t){const n=document.createElement("button"),s=document.createElement("div");Object.assign(s.style,{[ft[0]>0?"left":"right"]:Math.abs(ft[0])+"px",[ft[1]>0?"bottom":"top"]:Math.abs(ft[1])+"px",color:"black",display:"flex",alignItems:"flex-end",flexDirection:"row",gap:"10px",fontSize:"100%",zIndex:"10000000"}),s.style.position="fixed",document.body.appendChild(s);const o=s.attachShadow({mode:"closed"}),i=(()=>{vt.id="lsw_chat_popup",Object.assign(vt.style,{fontSize:".875em",borderRadius:"24px",backgroundColor:wt,boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",display:"flex",transition:"all 0.3s",overflow:"hidden",WebkitTextSizeAdjust:"100%",fontFamily:'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif',fontWeight:"500",letterSpacing:"-0.01em",lineHeight:"1.3"}),Object.assign(vt.style,{position:"fixed",display:"none"}),ft[0]<=0&&console.log("mainBtnCoords[0]",ft[0]);const e=document.createElement("div");e.id="chat-header",e.style.padding="1em",e.style.display="flex",e.style.justifyContent="space-between",e.style.alignItems="center",e.style.height="4.5em";const t=document.createElement("div");Object.assign(t.style,{position:"absolute",backgroundColor:"white",width:"83%",borderRadius:"28px",height:"70px",color:"black",top:"15px",left:"15px",display:"flex",boxShadow:"0px 0px 12px 0px #00000012"});const s=document.createElement("div");s.textContent=Xe("supportChat"),Object.assign(s.style,{marginTop:"10px",fontSize:"1.125em",lineHeight:"1.75em"});const o=document.createElement("div");o.id="chat-avatar",Object.assign(o.style,{width:"50px",height:"50px",margin:"10px",borderRadius:"50%",backgroundSize:"contain",backgroundImage:`url(${dt})`,cursor:"pointer",transition:"transform 0.2s"}),o.addEventListener("click",(()=>{Lt()&&Tt(!0)})),o.addEventListener("mouseenter",(()=>{o.style.transform="scale(1.05)"})),o.addEventListener("mouseleave",(()=>{o.style.transform="scale(1)"}));const i=document.createElement("div");Object.assign(i.style,{color:"#38E040",fontSize:"x-small"}),i.innerText=Xe("online");const r=document.createElement("div");Object.assign(r.style,{display:"flex",flexDirection:"column"}),r.appendChild(s),r.appendChild(i),t.appendChild(o),t.appendChild(r),function(e){e.style.position="relative",[{top:"0px",right:"8px",background:"#FB7C7E"},{top:"10px",right:"-15px",background:"#C6DCF9"},{top:"38px",right:"-15px",background:"#FB7C7E"},{top:"31px",right:"9px",background:"#C6DCF9"}].forEach((({top:t,right:n,background:s})=>{const o=document.createElement("div");Object.assign(o.style,{position:"absolute",width:"40px",height:"6px",top:t,right:n,background:s,borderRadius:"100px",transform:"rotate(-15deg)"}),e.appendChild(o)}))}(e),e.appendChild(t);{const t=document.createElement("button");t.id="close-popup",Object.assign(t.style,{background:"transparent",position:"absolute",top:"14px",right:"14px",border:"none",color:wt,cursor:"pointer",padding:"0",zIndex:"1",filter:"drop-shadow(2px 2px 2px rgba(0, 0, 0, .8))"}),t.addEventListener("click",(function(){St()}));const n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("fill","none"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2"),n.style.width="1.5rem",n.style.height="1.5rem";const s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d","M6 18L18 6M6 6l12 12"),n.appendChild(s),t.appendChild(n),e.appendChild(t)}yt.classList.add("message-block"),yt.addEventListener("wheel",(e=>{if(!e.target)return;e.preventDefault(),e.stopPropagation();const t=2*e.deltaY;yt.scrollBy(0,t)}),{passive:!1});const a=document.createElement("div");a.id="chat-input-container",Object.assign(a.style,{padding:"1rem",borderTop:"1px solid #e5e7eb",margin:"5px 15px 0",borderRadius:"24px",backgroundColor:"white",boxShadow:"0px 0px 12px 0px #00000012"});const l=document.createElement("div");Object.assign(l.style,{display:"flex",alignItems:"center",gap:"1rem"}),kt.placeholder=Xe("inputMessage"),Object.assign(kt.style,{flex:"1",leadingTrim:"NONE",lineHeight:"16px",letterSpacing:"0%",padding:"0.5rem 1rem",outline:"none",backgroundColor:"white",resize:"none",fontSize:"16px"}),n.classList.add("chat-submit"),n.innerHTML='\n\n\n',Object.assign(n.style,{backgroundColor:mt,color:wt,borderRadius:"100px",cursor:"pointer",border:"none",width:"40px",height:"40px",padding:"14px 6px"}),l.appendChild(kt),l.appendChild(n),a.appendChild(l);const c=document.createElement("div");Object.assign(c.style,{textAlign:"center",padding:"8px 0 5px 0",fontSize:"0.75em",color:"#6b7280",opacity:"0.7"});const p=document.createElement("a");return p.href="https://ls-ai.ru",p.target="_blank",p.textContent=Xe("createdAt"),Object.assign(p.style,{color:"#6b7280",textDecoration:"none",transition:"opacity 0.2s"}),p.addEventListener("mouseenter",(()=>{p.style.opacity="1"})),p.addEventListener("mouseleave",(()=>{p.style.opacity="0.7"})),c.appendChild(p),vt.appendChild(e),vt.appendChild(yt),vt.appendChild(a),vt.appendChild(c),function(e){const t=document.createElement("div");t.id="contact-form-popup",Object.assign(t.style,{position:"absolute",top:"90px",left:"11px",backgroundColor:"white",borderRadius:"16px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",padding:"20px",minWidth:"280px",maxWidth:"320px",display:"none",opacity:"0",transform:"translateY(10px) scale(0.95)",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",zIndex:"1000"});const n=document.createElement("div");Object.assign(n.style,{position:"absolute",top:"-8px",left:"30px",width:"0",height:"0",borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:"8px solid white",filter:"drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1))"}),t.appendChild(n);const s=document.createElement("div");s.textContent=Xe("askNames"),Object.assign(s.style,{fontSize:"1.1em",fontWeight:"600",marginBottom:"5px",color:"#111827"}),t.appendChild(s);const o=document.createElement("div");o.id="contact-form-subtitle",o.textContent="Укажите email или телефон",Object.assign(o.style,{fontSize:"0.85em",color:"#6b7280",marginBottom:"16px",maxHeight:"0",overflow:"hidden",opacity:"0",transition:"max-height 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease"}),t.appendChild(o);const i=document.createElement("div");Object.assign(i.style,{marginBottom:"0",transition:"margin-bottom 0.3s ease"});const r=document.createElement("input");r.type="text",r.placeholder=Xe("yourName"),r.id="contact-name",Object.assign(r.style,{width:"100%",padding:"12px",border:"1px solid #e5e7eb",borderRadius:"12px",fontSize:"14px",outline:"none",transition:"all 0.2s",boxSizing:"border-box"}),r.addEventListener("focus",(()=>{r.style.borderColor="#1976d2",r.style.boxShadow="0 0 0 3px #1976d220",$t()})),r.addEventListener("blur",(()=>{r.style.borderColor="#e5e7eb",r.style.boxShadow="none"})),r.addEventListener("input",Ot),i.appendChild(r),t.appendChild(i);const a=document.createElement("div");a.id="extra-contact-fields",Object.assign(a.style,{maxHeight:"0",overflow:"hidden",transition:"max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease",opacity:"0"});const l=document.createElement("input");l.type="email",l.placeholder="Email",l.id="contact-email",Object.assign(l.style,{width:"100%",padding:"12px",border:"1px solid #e5e7eb",borderRadius:"12px",fontSize:"14px",outline:"none",marginTop:"12px",transition:"all 0.2s",boxSizing:"border-box"}),l.addEventListener("focus",(()=>{l.style.borderColor="#1976d2",l.style.boxShadow="0 0 0 3px #1976d220"})),l.addEventListener("blur",(()=>{l.style.borderColor="#e5e7eb",l.style.boxShadow="none"})),l.addEventListener("input",Ot);const c=document.createElement("input");c.type="tel",c.placeholder=Xe("phone"),c.id="contact-phone",Object.assign(c.style,{width:"100%",padding:"12px",border:"1px solid #e5e7eb",borderRadius:"12px",fontSize:"14px",outline:"none",marginTop:"12px",transition:"all 0.2s",boxSizing:"border-box"}),c.addEventListener("focus",(()=>{c.style.borderColor="#1976d2",c.style.boxShadow="0 0 0 3px #1976d220"})),c.addEventListener("blur",(()=>{c.style.borderColor="#e5e7eb",c.style.boxShadow="none"})),c.addEventListener("input",Ot),a.appendChild(l),a.appendChild(c),t.appendChild(a);const p=document.createElement("button");p.textContent=Xe("send"),p.disabled=!0,Object.assign(p.style,{width:"100%",padding:"12px",backgroundColor:"#d1d5db",color:"white",border:"none",borderRadius:"12px",fontSize:"14px",fontWeight:"600",cursor:"not-allowed",marginTop:"16px",transition:"all 0.2s",opacity:"0.6"}),p.addEventListener("click",Pt),t.appendChild(p),e.appendChild(t),e.addEventListener("click",(t=>{const n=e.querySelector("#contact-form-popup"),s=e.querySelector("#chat-avatar"),o=Lt();n&&"none"!==n.style.display&&o&&t.target instanceof Node&&(n.contains(t.target)||s.contains(t.target)||(console.log("outside form",t.target),jt()))})),kt.addEventListener("focus",(async()=>{const t=e.querySelector("#contact-form-popup"),n=Lt();if(t&&"none"!==t.style.display&&!n){const t=e.querySelector("#contact-email"),n=e.querySelector("#contact-phone");t?.value.trim()||n?.value.trim()?await Et():Nt()}}))}(vt),vt})();At&&o.appendChild(At),o.appendChild(i);const r=document.createElement("ul");if(r.style.listStyle="none",r.style.display="none",r.style.justifyContent="center",r.style.alignItems="center",r.style.flexDirection="column",o.appendChild(r),e?.length&&At){const n=At.querySelector("ul");n&&(e.forEach((e=>{e.element&&n.appendChild(e.element)})),bt=n.querySelectorAll("li"),bt?.length>1&&(n.addEventListener("mouseenter",(()=>{t?.value&&(t.value.element.style.display="none",clearTimeout(t.value.timeout)),Ct()})),n.addEventListener("mouseleave",(()=>{if(bt)for(let e=1;e{bt&&(bt[e].style.transform="translateX(0)")}),500))}))))}return n&&kt&&(n.addEventListener("click",(async function(){const e=kt.value.trim();if(console.log("message",e),!e)return;const t=Lt();console.log("contatct data",t),t||Tt(),ht.sendMessage(),lt(e,!0);const n=await async function(e){let t=localStorage.getItem("aiwi_thread_id")||await pt();if(!t)return"Не могу ответить. Попробуйте позже. ";const n=new Headers;if(n.append("Content-Type","application/json"),st){const s=await fetch(`${tt}/widget/request`,{method:"POST",headers:n,body:JSON.stringify({thread_id:t,message:e})}).then((e=>e.json())).catch((e=>console.log("error",e)));return s&&404!=s.statusCode||(st=!1),""}{lt();let s=`${tt}/assistants/threads/${t}/messages`;const o=JSON.stringify({role:"user",content:e}),i=await fetch(s,{method:"POST",headers:n,body:o}).then((async e=>{if(404==e.status){if(localStorage.removeItem("aiwi_thread_id"),t=await pt(),!t)throw new Error("error update thread");return s=`${tt}/assistants/threads/${t}/messages`,(await fetch(s,{method:"POST",headers:n,body:o})).json()}return e.json()})).catch((e=>console.log("error",e)));if(i?.id)return new EventSource(`${tt}/assistants/threads/${t}/runs/68dbca64b486669c29a9b038`);if(i?.sent_at)return"";it.report({url:s,headers:JSON.stringify(n),body:o,error:i})}return"Что-то идет не так. Попробуйте позже."}(e);n&&("string"==typeof n&>.newMessageNotify(n),lt(n))})),kt.addEventListener("keyup",(function(e){"Enter"===e.key&&n.click()}))),ct(),pt(),[o,ft[0]>0]}([],tn);nn=e[0],function(e){const t=document.createElement("style");t.innerHTML="\n *,\n ::after,\n ::before,\n #lsw_chat_popup *,\n #lsw_chat_popup ::after,\n #lsw_chat_popup ::before {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: currentColor\n }\n .border-t, #lsw_chat_popup .border-t {\n border-top-width: 1px\n }\n .bg-gray-800, #lsw_chat_popup .bg-gray-800{\n --tw-bg-opacity: 1;\n background-color: rgba(31, 41, 55, var(--tw-bg-opacity))\n }\n .text-white, #lsw_chat_popup .text-white {\n --tw-text-opacity: 1;\n color: rgba(255, 255, 255, var(--tw-text-opacity))\n }\n .flex {\n display:flex\n }\n .m-0 {\n margin: 0\n }\n .bg-transparent {\n background-color: transparent\n }\n .h-6 {\n height: 1.5rem\n }\n .flex-1 {\n flex: 1 1 0%\n }\n .p-4 {\n padding: 1rem\n }\n .bg-white {\n --tw-bg-opacity: 1;\n background-color: rgba(255, 255, 255, var(--tw-bg-opacity))\n }\n .justify-center {\n justify-content: center\n }\n .rounded-full, #lsw_chat_popup .rounded-full{\n border-radius: 9999px\n }\n .items-center {\n align-items: center\n }\n .cursor-pointer {\n cursor: pointer\n }\n .absolute {\n position: absolute\n }\n .right-0 {\n right: 0\n }\n .shadow-md {\n --tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n }\n .flex-col {\n flex-direction: column\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n }\n .justify-between {\n justify-content: space-between\n }\n .border-none, #lsw_chat_popup .border-none{\n border-style: none\n }\n .w-6 {\n width: 1.5rem\n }\n .overflow-y-auto {\n overflow-y: auto\n }\n .scroll-smooth {\n scroll-behavior: smooth;\n }\n .border-t {\n border-top-width: 1px\n }\n .border-gray-200, #lsw_chat_popup .border-gray-200{\n --tw-border-opacity: 1;\n border-color: rgba(229, 231, 235, var(--tw-border-opacity))\n }\n .space-x-4>:not([hidden])~:not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(1rem * var(--tw-space-x-reverse));\n margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)))\n }\n .border, #lsw_chat_popup .border{\n border-width: 1px\n }\n .border-gray-300, #lsw_chat_popup .border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgba(209, 213, 219, var(--tw-border-opacity))\n }\n .rounded-md, #lsw_chat_popup .rounded-md {\n border-radius: .375rem\n }\n .px-4, #lsw_chat_popup .px-4 {\n padding-left: 1rem;\n padding-right: 1rem\n }\n .py-2, #lsw_chat_popup .py-2{\n padding-top: .5rem;\n padding-bottom: .5rem\n }\n .outline-none, #lsw_chat_popup .outline-none{\n outline: 2px solid transparent;\n outline-offset: 2px\n }\n .w-3\\/4 {\n width: 75%\n }\n .p-6 {\n padding: 1.5rem\n }\n .rounded-lg, #lsw_lead_catcher .rounded-lg, #lsw_chat_popup .rounded-lg{\n border-radius: .5rem\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)\n }\n .relative {\n position: relative\n }\n .bg-gray-200, #lsw_chat_popup .bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgba(229, 231, 235, var(--tw-bg-opacity))\n }\n .fixed {\n position: fixed\n }\n .inset-0 {\n top: 0;\n right: 0;\n bottom: 0;\n left: 0\n }\n .bg-black {\n --tw-bg-opacity: 1;\n background-color: rgba(0, 0, 0, var(--tw-bg-opacity))\n }\n .bg-opacity-25 {\n --tw-bg-opacity: 0.25\n }\n .mb-3 {\n margin-bottom: .75rem\n }\n \n // #chat-popup button {\n // padding: 0\n // }\n #chat-header button:hover {\n background-color: transparent;\n }\n ",e.append(t);const n="lsw_chat_popup",s=document.createElement("style");s.innerHTML=` \n \n :root{\n /* поменяйте на нужный вам цвет */\n --scrollbar-color: #ff6b6b;\n /* желаемая ширина (по умолчанию ~16px, здесь взято ~8px) */\n --scrollbar-size: 8px;\n }\n \n /* =========================\n WebKit (Chrome, Edge, Safari)\n ========================= */\n ::-webkit-scrollbar {\n width: var(--scrollbar-size);\n height: var(--scrollbar-size);\n }\n \n ::-webkit-scrollbar-track {\n background: transparent; /* прозрачный фон трека */\n border-radius: 999px; /* округлые края трека */\n margin: 2px 0; /* немного отступа, чтобы концы thumb выглядели округлыми */\n }\n \n ::-webkit-scrollbar-thumb {\n background-color: var(--scrollbar-color); /* цвет палки */\n border-radius: 999px; /* полностью округлённый */\n min-height: 24px; /* чтобы маленькие скроллы были удобнее захватывать */\n border: 0; /* без обводки */\n }\n \n /* убрать стрелочки (кнопки) */\n ::-webkit-scrollbar-button {\n display: none;\n width: 0;\n height: 0;\n }\n \n /* =========================\n Firefox\n ========================= */\n * {\n /* 'thin' примерно соответствует ~8px в FF, цвет задаём ниже */\n scrollbar-width: thin;\n scrollbar-color: var(--scrollbar-color) transparent; /* thumb и track */\n }\n \n #${n} {\n flex-direction: column;\n z-index: 10000000;\n width: 28em;\n max-width: 100vw;\n word-break: break-word;\n box-sizing: border-box;\n height: 600px;\n max-height: 100vh;\n ${It[0]>0?"left":"right"}: 15px;\n bottom: 6em;\n font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";\n }\n p, #${n} p {\n margin: 0;\n }\n \n \n @media (max-width: 600px) {\n #${n} {\n // position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: 100%;\n height: auto;\n max-height: 100vh;\n border-radius: 0;\n }\n }\n \n @keyframes lsw_typing {\n 0%, 80%, 100% {\n transform: scale(0);\n }\n 40% {\n transform: scale(1.0);\n }\n }\n \n .clock {\n position: absolute;\n width: 29px;\n height: 16px;\n bottom: -20px;\n font-style: normal;\n font-weight: 400;\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.04em;\n color: #BEBEC2;\n white-space: nowrap\n }\n \n .message-block {\n margin-top: 20px;\n flex: 1;\n padding: 1rem;\n overflow-y: auto;\n scroll-behavior: smooth;\n display: flex;\n flex-direction: column;\n justify-content: safe flex-end;\n scrollbar-color: #5385c799 #ffffff00;\n }\n \n \n .me-message > .clock {\n right: 6px;\n }\n \n textarea {\n font-family: Arial;\n font-weight: 500;\n letter-spacing: -0.01em;\n color: #C2CCD9;\n }\n \n textarea::placeholder {\n color: #C2CCD9;\n opacity: 1;\n }\n \n .me-message {\n border-radius: .5rem;\n color: white;\n border-bottom-right-radius: 0;\n background-color: #1976d2;\n box-shadow: 3px 3px 5px 0px #00000021;\n }\n \n .me-message::after {\n content: "";\n position: absolute;\n bottom: 0;\n right: -10px;\n width: 10px;\n height: 14px;\n background: url("data:image/svg+xml;utf8,") no-repeat;\n }\n \n .you-message {\n border-radius: .5rem;\n color: #7A8799;\n border-bottom-left-radius: 0;\n background-color: #E9ECF2;\n box-shadow: -3px 3px 5px 0px #00000021;\n }\n \n .you-message::after {\n content: "";\n position: absolute;\n bottom: 0;\n left: -10px;\n width: 10px;\n height: 14px;\n background: url("data:image/svg+xml;utf8,") no-repeat;\n }\n \n .lsw_chat_dot {\n width: 6px;\n height: 6px;\n background-color: black;\n }\n \n .typing-indicator .lsw_chat_dot {\n animation: lsw_typing 1.4s infinite ease-in-out both;\n }\n \n .typing-indicator .lsw_chat_dot:nth-child(1) {\n animation-delay: -0.32s;\n }\n \n .typing-indicator .dot:nth-child(2) {\n animation-delay: -0.16s;\n }\n \n .typing-indicator .dot:nth-child(3) {\n animation-delay: 0s;\n }\n \n .hidden {\n display: none;\n }\n\n .lsw_waves {\n position: absolute;\n border-radius: 50%;\n background: rgb(26 56 194);\n \n transform: scale(0);\n }\n \n .animate .lsw_waves {\n animation: wave-animation 4s linear infinite;\n }\n \n .lsw_waves:nth-child(1) {\n left: 50%;\n top: 50%;\n width: 150%;\n height: 150%;\n margin-left: -75%;\n margin-top: -75%;\n animation-delay: 0s;\n }\n \n /* Позиционирование второй волны */\n .lsw_waves:nth-child(2) {\n left: 50%;\n top: 50%;\n width: 150%;\n height: 150%;\n margin-left: -75%;\n margin-top: -75%;\n animation-delay: -1s;\n }\n \n /* Позиционирование третьей волны */\n .lsw_waves:nth-child(3) {\n left: 50%;\n top: 50%;\n width: 150%;\n height: 150%;\n margin-left: -75%;\n margin-top: -75%;\n animation-delay: -2s;\n }\n \n @keyframes wave-animation {\n 0% {\n transform: scale(0);\n opacity: 0.5;\n }\n 100% {\n transform: scale(1);\n opacity: 0.0;\n }\n }\n .chat-submit:hover {\n background-color: rgba(0, 0, 0);\n }\n `,e.append(s)}(nn),function(e){const t=document.createElement("style");t.innerHTML="\n .lsw_contact_btn {\n background-color: #1976d2;\n border-radius: 9999px; \n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: 4em;\n height: 4em;\n position: absolute;\n margin: 0;\n padding: 0;\n transition: transform 0.5s ease;\n }\n \n .lsw_contact_btn > svg {\n width: 2.5em;\n height: 2.5em;\n }\n ",e.append(t)}(nn),sn=e[1]}})();