pager-widget 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +138 -0
  2. package/package.json +1 -1
package/dist/index.js ADDED
@@ -0,0 +1,138 @@
1
+ (()=>{let e,t,n,r;function i(e){return e&&e.__esModule?e.default:e}function a(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var o,l=globalThis,s={},c={},d=l.parcelRequire0b29;null==d&&((d=function(e){if(e in s)return s[e].exports;if(e in c){var t=c[e];delete c[e];var n={id:e,exports:{}};return s[e]=n,t.call(n.exports,n,n.exports),n.exports}var r=Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}).register=function(e,t){c[e]=t},l.parcelRequire0b29=d);var u=d.register;u("kQ1rl",function(e,t){"use strict";var n=e.exports&&e.exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var i=(0,r.default)(e),a="function"==typeof t;return i.forEach(function(e){if("declaration"===e.type){var r=e.property,i=e.value;a?t(r,i,e):i&&((n=n||{})[r]=i)}}),n};var r=n(d("EaM59"))}),u("EaM59",function(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,c=/^\s+|\s+$/g;function d(e){return e?e.replace(c,""):""}e.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,u=1;function p(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");u=~n?e.length-n:u+e.length}function f(){var e={line:c,column:u};return function(t){return t.position=new g(e),w(i),t}}function g(e){this.start=e,this.end={line:c,column:u},this.source=t.source}g.prototype.content=e;var h=[];function m(n){var r=Error(t.source+":"+c+":"+u+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=u,r.source=e,t.silent)h.push(r);else throw r}function w(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function x(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return u+=2,p(r),e=e.slice(n),u+=2,t({type:"comment",comment:r})}}w(i);var v,y=[];for(x(y);v=function(){var e=f(),t=w(a);if(t){if(b(),!w(o))return m("property missing ':'");var r=w(l),i=e({type:"declaration",property:d(t[0].replace(n,"")),value:r?d(r[0].replace(n,"")):""});return w(s),i}}();)!1!==v&&(y.push(v),x(y));return y}}),u("bhCSz",function(e,t){!function(n,r){"use strict";var i="function",a="undefined",o="object",l="string",s="major",c="model",d="name",u="type",p="vendor",f="version",g="architecture",h="console",m="mobile",w="tablet",x="smarttv",b="wearable",v="embedded",y="Amazon",_="Apple",C="ASUS",k="BlackBerry",N="Browser",S="Chrome",E="Firefox",T="Google",L="Huawei",I="Microsoft",O="Motorola",A="Opera",D="Samsung",M="Sharp",F="Sony",R="Xiaomi",P="Zebra",z="Facebook",j="Chromium OS",U="Mac OS",B=" Browser",V=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},W=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===l&&-1!==$(t).indexOf($(e))},$=function(e){return e.toLowerCase()},q=function(e,t){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof t===a?e:e.substring(0,500)},Y=function(e,t){for(var n,a,l,s,c,d,u=0;u<t.length&&!c;){var p=t[u],f=t[u+1];for(n=a=0;n<p.length&&!c&&p[n];)if(c=p[n++].exec(e))for(l=0;l<f.length;l++)d=c[++a],typeof(s=f[l])===o&&s.length>0?2===s.length?typeof s[1]==i?this[s[0]]=s[1].call(this,d):this[s[0]]=s[1]:3===s.length?typeof s[1]!==i||s[1].exec&&s[1].test?this[s[0]]=d?d.replace(s[1],s[2]):void 0:this[s[0]]=d?s[1].call(this,d,s[2]):void 0:4===s.length&&(this[s[0]]=d?s[3].call(this,d.replace(s[1],s[2])):r):this[s]=d||r;u+=2}},G=function(e,t){for(var n in t)if(typeof t[n]===o&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(H(t[n][i],e))return"?"===n?r:n}else if(H(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},J={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Z={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,A+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,A+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,A]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+N]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+N]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+N],f],[/\bfocus\/([\w\.]+)/i],[f,[d,E+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,A+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,A+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI"+B]],[/fxios\/([\w\.-]+)/i],[f,[d,E]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+B],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,D+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,z],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,S+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+N]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,G,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,E+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,$]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",$]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,$]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[p,D],[u,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[c,[p,D],[u,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[p,_],[u,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[p,_],[u,w]],[/(macintosh);/i],[c,[p,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[p,M],[u,m]],[/(?:honor)([-\w ]+)[;\)]/i],[c,[p,"Honor"],[u,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[p,L],[u,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[p,L],[u,m]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[c,/_/g," "],[p,R],[u,m]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[p,R],[u,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[p,"OPPO"],[u,m]],[/\b(opd2\d{3}a?) bui/i],[c,[p,"OPPO"],[u,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[p,"Vivo"],[u,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[p,"Realme"],[u,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[p,O],[u,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[p,O],[u,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[p,"LG"],[u,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[p,"LG"],[u,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[p,"Lenovo"],[u,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[p,"Nokia"],[u,m]],[/(pixel c)\b/i],[c,[p,T],[u,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[p,T],[u,m]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[p,F],[u,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[p,F],[u,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[p,"OnePlus"],[u,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[p,y],[u,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[p,y],[u,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,p,[u,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[p,k],[u,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[p,C],[u,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[p,C],[u,m]],[/(nexus 9)/i],[c,[p,"HTC"],[u,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[p,[c,/_/g," "],[u,m]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[c,[p,"TCL"],[u,w]],[/(itel) ((\w+))/i],[[p,$],c,[u,G,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[p,"Acer"],[u,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[p,"Meizu"],[u,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[p,"Ulefone"],[u,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[c,[p,"Energizer"],[u,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[c,[p,"Cat"],[u,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[c,[p,"Smartfren"],[u,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[c,[p,"Nothing"],[u,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[p,c,[u,m]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[p,c,[u,w]],[/(surface duo)/i],[c,[p,I],[u,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[p,"Fairphone"],[u,m]],[/(u304aa)/i],[c,[p,"AT&T"],[u,m]],[/\bsie-(\w*)/i],[c,[p,"Siemens"],[u,m]],[/\b(rct\w+) b/i],[c,[p,"RCA"],[u,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[p,"Dell"],[u,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[p,"Verizon"],[u,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[p,"Barnes & Noble"],[u,w]],[/\b(tm\d{3}\w+) b/i],[c,[p,"NuVision"],[u,w]],[/\b(k88) b/i],[c,[p,"ZTE"],[u,w]],[/\b(nx\d{3}j) b/i],[c,[p,"ZTE"],[u,m]],[/\b(gen\d{3}) b.+49h/i],[c,[p,"Swiss"],[u,m]],[/\b(zur\d{3}) b/i],[c,[p,"Swiss"],[u,w]],[/\b((zeki)?tb.*\b) b/i],[c,[p,"Zeki"],[u,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[p,"Dragon Touch"],c,[u,w]],[/\b(ns-?\w{0,9}) b/i],[c,[p,"Insignia"],[u,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[p,"NextBook"],[u,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[p,"Voice"],c,[u,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[p,"LvTel"],c,[u,m]],[/\b(ph-1) /i],[c,[p,"Essential"],[u,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[p,"Envizen"],[u,w]],[/\b(trio[-\w\. ]+) b/i],[c,[p,"MachSpeed"],[u,w]],[/\btu_(1491) b/i],[c,[p,"Rotor"],[u,w]],[/(shield[\w ]+) b/i],[c,[p,"Nvidia"],[u,w]],[/(sprint) (\w+)/i],[p,c,[u,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[p,I],[u,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[p,P],[u,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[p,P],[u,m]],[/smart-tv.+(samsung)/i],[p,[u,x]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[p,D],[u,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[p,"LG"],[u,x]],[/(apple) ?tv/i],[p,[c,_+" TV"],[u,x]],[/crkey/i],[[c,S+"cast"],[p,T],[u,x]],[/droid.+aft(\w+)( bui|\))/i],[c,[p,y],[u,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[p,M],[u,x]],[/(bravia[\w ]+)( bui|\))/i],[c,[p,F],[u,x]],[/(mitv-\w{5}) bui/i],[c,[p,R],[u,x]],[/Hbbtv.*(technisat) (.*);/i],[p,c,[u,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[p,q],[c,q],[u,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[p,c,[u,h]],[/droid.+; (shield) bui/i],[c,[p,"Nvidia"],[u,h]],[/(playstation [345portablevi]+)/i],[c,[p,F],[u,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[p,I],[u,h]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[c,[p,D],[u,b]],[/((pebble))app/i],[p,c,[u,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[p,_],[u,b]],[/droid.+; (glass) \d/i],[c,[p,T],[u,b]],[/droid.+; (wt63?0{2,3})\)/i],[c,[p,P],[u,b]],[/droid.+; (glass) \d/i],[c,[p,T],[u,b]],[/(pico) (4|neo3(?: link|pro)?)/i],[p,c,[u,b]],[/; (quest( \d| pro)?)/i],[c,[p,z],[u,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[p,[u,v]],[/(aeobc)\b/i],[c,[p,y],[u,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[u,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[u,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[p,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[f,G,J]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,G,J],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,U],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,f],[/\(bb(10);/i],[f,[d,k]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,E+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,j],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},K=function(e,t){if(typeof e===o&&(t=e,e=r),!(this instanceof K))return new K(e,t).getResult();var h=typeof n!==a&&n.navigator?n.navigator:r,x=e||(h&&h.userAgent?h.userAgent:""),b=h&&h.userAgentData?h.userAgentData:r,v=t?V(Z,t):Z,y=h&&h.userAgent==x;return this.getBrowser=function(){var e,t={};return t[d]=r,t[f]=r,Y.call(t,x,v.browser),t[s]=typeof(e=t[f])===l?e.replace(/[^\d\.]/g,"").split(".")[0]:r,y&&h&&h.brave&&typeof h.brave.isBrave==i&&(t[d]="Brave"),t},this.getCPU=function(){var e={};return e[g]=r,Y.call(e,x,v.cpu),e},this.getDevice=function(){var e={};return e[p]=r,e[c]=r,e[u]=r,Y.call(e,x,v.device),y&&!e[u]&&b&&b.mobile&&(e[u]=m),y&&"Macintosh"==e[c]&&h&&typeof h.standalone!==a&&h.maxTouchPoints&&h.maxTouchPoints>2&&(e[c]="iPad",e[u]=w),e},this.getEngine=function(){var e={};return e[d]=r,e[f]=r,Y.call(e,x,v.engine),e},this.getOS=function(){var e={};return e[d]=r,e[f]=r,Y.call(e,x,v.os),y&&!e[d]&&b&&b.platform&&"Unknown"!=b.platform&&(e[d]=b.platform.replace(/chrome os/i,j).replace(/macos/i,U)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return x},this.setUA=function(e){return x=typeof e===l&&e.length>500?q(e,500):e,this},this.setUA(x),this};K.VERSION="1.0.40",K.BROWSER=W([d,f,s]),K.CPU=W([g]),K.DEVICE=W([c,p,u,h,m,x,w,b,v]),K.ENGINE=K.OS=W([d,f]),e.exports&&(t=e.exports=K),t.UAParser=K;var X=typeof n!==a&&(n.jQuery||n.Zepto);if(X&&!X.ua){var Q=new K;X.ua=Q.getResult(),X.ua.get=function(){return Q.getUA()},X.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var n in t)X.ua[n]=t[n]}}}("object"==typeof window?window:this)});var p={};Object.defineProperty(p,"__esModule",{value:!0,configurable:!0}),a(p,"useSyncExternalStore",()=>eA),a(p,"startTransition",()=>eM),a(p,"useDeferredValue",()=>eF),a(p,"useTransition",()=>eR),a(p,"useInsertionEffect",()=>eP),a(p,"PureComponent",()=>ez),a(p,"memo",()=>ej),a(p,"forwardRef",()=>eV),a(p,"Children",()=>eH),a(p,"Suspense",()=>eY),a(p,"lazy",()=>eJ),a(p,"SuspenseList",()=>eZ),a(p,"createPortal",()=>e1),a(p,"render",()=>e6),a(p,"hydrate",()=>e9),a(p,"__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED",()=>tl),a(p,"version",()=>ts),a(p,"createFactory",()=>tc),a(p,"isValidElement",()=>td),a(p,"isFragment",()=>tu),a(p,"isMemo",()=>tp),a(p,"cloneElement",()=>tf),a(p,"unmountComponentAtNode",()=>tg),a(p,"findDOMNode",()=>th),a(p,"unstable_batchedUpdates",()=>tm),a(p,"flushSync",()=>tw),a(p,"StrictMode",()=>tx),a(p,"isElement",()=>tb),a(p,"default",()=>tv),a(p,"Component",()=>F),a(p,"Fragment",()=>M),a(p,"createContext",()=>Z),a(p,"createElement",()=>O),a(p,"createRef",()=>D);var f,g,h,m,w,x,b,v,y,_,C,k,N={},S=[],E=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,T=Array.isArray;function L(e,t){for(var n in t)e[n]=t[n];return e}function I(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function O(e,t,n){var r,i,a,o={};for(a in t)"key"==a?r=t[a]:"ref"==a?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?f.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)null==o[a]&&(o[a]=e.defaultProps[a]);return A(e,o,r,i,null)}function A(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==i?++h:i,__i:-1,__u:0};return null==i&&null!=g.vnode&&g.vnode(a),a}function D(){return{current:null}}function M(e){return e.children}function F(e,t){this.props=e,this.context=t}function R(e,t){if(null==t)return e.__?R(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?R(e):null}function P(e){(!e.__d&&(e.__d=!0)&&m.push(e)&&!z.__r++||w!=g.debounceRendering)&&((w=g.debounceRendering)||x)(z)}function z(){for(var e,t,n,r,i,a,o=1;m.length;)m.length>o&&m.sort(b),e=m.shift(),o=m.length,e.__d&&(t=void 0,r=(n=e.__v).__e,i=[],a=[],e.__P&&((t=L({},n)).__v=n.__v+1,g.vnode&&g.vnode(t),H(e.__P,t,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,i,null==r?R(n):r,!!(32&n.__u),a),t.__v=n.__v,t.__.__k[t.__i]=t,$(i,t,a),t.__e!=r&&function e(t){var n,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,n=0;n<t.__k.length;n++)if(null!=(r=t.__k[n])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return e(t)}}(t)));z.__r=0}function j(e,t,n,r,i,a,o,l,s,c,d){var u,p,f,h,m,w,x=r&&r.__k||S,b=t.length;for(s=function(e,t,n,r,i){var a,o,l,s,c,d=n.length,u=d,p=0;for(e.__k=Array(i),a=0;a<i;a++)null!=(o=t[a])&&"boolean"!=typeof o&&"function"!=typeof o?(s=a+p,(o=e.__k[a]="string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?A(null,o,null,null,null):T(o)?A(M,{children:o},null,null,null):null==o.constructor&&o.__b>0?A(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,l=null,-1!=(c=o.__i=function(e,t,n,r){var i,a,o=e.key,l=e.type,s=t[n];if(null===s&&null==e.key||s&&o==s.key&&l==s.type&&0==(2&s.__u))return n;if(r>+(null!=s&&0==(2&s.__u)))for(i=n-1,a=n+1;i>=0||a<t.length;){if(i>=0){if((s=t[i])&&0==(2&s.__u)&&o==s.key&&l==s.type)return i;i--}if(a<t.length){if((s=t[a])&&0==(2&s.__u)&&o==s.key&&l==s.type)return a;a++}}return -1}(o,n,s,u))&&(u--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(i>d?p--:i<d&&p++),"function"!=typeof o.type&&(o.__u|=4)):c!=s&&(c==s-1?p--:c==s+1?p++:(c>s?p--:p++,o.__u|=4))):e.__k[a]=null;if(u)for(a=0;a<d;a++)null!=(l=n[a])&&0==(2&l.__u)&&(l.__e==r&&(r=R(l)),function e(t,n,r){var i,a;if(g.unmount&&g.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||q(i,null,n)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){g.__e(e,n)}i.base=i.__P=null}if(i=t.__k)for(a=0;a<i.length;a++)i[a]&&e(i[a],n,r||"function"!=typeof t.type);r||I(t.__e),t.__c=t.__=t.__e=void 0}(l,l));return r}(n,t,x,s,b),u=0;u<b;u++)null!=(f=n.__k[u])&&(p=-1==f.__i?N:x[f.__i]||N,f.__i=u,w=H(e,f,p,i,a,o,l,s,c,d),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&q(p.ref,null,f),d.push(f.ref,f.__c||h,f)),null==m&&null!=h&&(m=h),4&f.__u||p.__k===f.__k?s=function e(t,n,r){var i,a;if("function"==typeof t.type){for(i=t.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=t,n=e(i[a],n,r));return n}t.__e!=n&&(n&&t.type&&!r.contains(n)&&(n=R(t)),r.insertBefore(t.__e,n||null),n=t.__e);do n=n&&n.nextSibling;while(null!=n&&8==n.nodeType)return n}(f,s,e):"function"==typeof f.type&&void 0!==w?s=w:h&&(s=h.nextSibling),f.__u&=-7);return n.__e=m,s}function U(e,t){return t=t||[],null==e||"boolean"==typeof e||(T(e)?e.some(function(e){U(e,t)}):t.push(e)),t}function B(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||E.test(t)?n:n+"px"}function V(e,t,n,r,i){var a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||B(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||B(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])a=t!=(t=t.replace(v,"$1")),t=t.toLowerCase()in e||"onFocusOut"==t||"onFocusIn"==t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?r?n.u=r.u:(n.u=y,e.addEventListener(t,a?C:_,a)):e.removeEventListener(t,a?C:_,a);else{if("http://www.w3.org/2000/svg"==i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function W(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=y++;else if(t.t<n.u)return;return n(g.event?g.event(t):t)}}}function H(e,t,n,r,i,a,o,l,s,c){var d,u,p,h,m,w,x,b,v,y,_,C,k,S,E,O,A,D=t.type;if(null!=t.constructor)return null;128&n.__u&&(s=!!(32&n.__u),a=[l=t.__e=n.__e]),(d=g.__b)&&d(t);e:if("function"==typeof D)try{if(b=t.props,v="prototype"in D&&D.prototype.render,y=(d=D.contextType)&&r[d.__c],_=d?y?y.props.value:d.__:r,n.__c?x=(u=t.__c=n.__c).__=u.__E:(v?t.__c=u=new D(b,_):(t.__c=u=new F(b,_),u.constructor=D,u.render=Y),y&&y.sub(u),u.props=b,u.state||(u.state={}),u.context=_,u.__n=r,p=u.__d=!0,u.__h=[],u._sb=[]),v&&null==u.__s&&(u.__s=u.state),v&&null!=D.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=L({},u.__s)),L(u.__s,D.getDerivedStateFromProps(b,u.__s))),h=u.props,m=u.state,u.__v=t,p)v&&null==D.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),v&&null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(v&&null==D.getDerivedStateFromProps&&b!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(b,_),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(b,u.__s,_)||t.__v==n.__v){for(t.__v!=n.__v&&(u.props=b,u.state=u.__s,u.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),C=0;C<u._sb.length;C++)u.__h.push(u._sb[C]);u._sb=[],u.__h.length&&o.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(b,u.__s,_),v&&null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(h,m,w)})}if(u.context=_,u.props=b,u.__P=e,u.__e=!1,k=g.__r,S=0,v){for(u.state=u.__s,u.__d=!1,k&&k(t),d=u.render(u.props,u.state,u.context),E=0;E<u._sb.length;E++)u.__h.push(u._sb[E]);u._sb=[]}else do u.__d=!1,k&&k(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++S<25)u.state=u.__s,null!=u.getChildContext&&(r=L(L({},r),u.getChildContext())),v&&!p&&null!=u.getSnapshotBeforeUpdate&&(w=u.getSnapshotBeforeUpdate(h,m)),O=d,null!=d&&d.type===M&&null==d.key&&(O=function e(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:T(t)?t.map(e):L({},t)}(d.props.children)),l=j(e,T(O)?O:[O],t,n,r,i,a,o,l,s,c),u.base=t.__e,t.__u&=-161,u.__h.length&&o.push(u),x&&(u.__E=u.__=null)}catch(e){if(t.__v=null,s||null!=a)if(e.then){for(t.__u|=s?160:128;l&&8==l.nodeType&&l.nextSibling;)l=l.nextSibling;a[a.indexOf(l)]=null,t.__e=l}else for(A=a.length;A--;)I(a[A]);else t.__e=n.__e,t.__k=n.__k;g.__e(e,t,n)}else null==a&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):l=t.__e=function(e,t,n,r,i,a,o,l,s){var c,d,u,p,h,m,w,x=n.props,b=t.props,v=t.type;if("svg"==v?i="http://www.w3.org/2000/svg":"math"==v?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=a){for(c=0;c<a.length;c++)if((h=a[c])&&"setAttribute"in h==!!v&&(v?h.localName==v:3==h.nodeType)){e=h,a[c]=null;break}}if(null==e){if(null==v)return document.createTextNode(b);e=document.createElementNS(i,v,b.is&&b),l&&(g.__m&&g.__m(t,a),l=!1),a=null}if(null==v)x===b||l&&e.data==b||(e.data=b);else{if(a=a&&f.call(e.childNodes),x=n.props||N,!l&&null!=a)for(x={},c=0;c<e.attributes.length;c++)x[(h=e.attributes[c]).name]=h.value;for(c in x)if(h=x[c],"children"==c);else if("dangerouslySetInnerHTML"==c)u=h;else if(!(c in b)){if("value"==c&&"defaultValue"in b||"checked"==c&&"defaultChecked"in b)continue;V(e,c,null,h,i)}for(c in b)h=b[c],"children"==c?p=h:"dangerouslySetInnerHTML"==c?d=h:"value"==c?m=h:"checked"==c?w=h:l&&"function"!=typeof h||x[c]===h||V(e,c,h,x[c],i);if(d)l||u&&(d.__html==u.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),j("template"==t.type?e.content:e,T(p)?p:[p],t,n,r,"foreignObject"==v?"http://www.w3.org/1999/xhtml":i,a,o,a?a[0]:n.__k&&R(n,0),l,s),null!=a)for(c=a.length;c--;)I(a[c]);l||(c="value","progress"==v&&null==m?e.removeAttribute("value"):null==m||m===e[c]&&("progress"!=v||m)&&("option"!=v||m==x[c])||V(e,c,m,x[c],i),c="checked",null!=w&&w!=e[c]&&V(e,c,w,x[c],i))}return e}(n.__e,t,n,r,i,a,o,s,c);return(d=g.diffed)&&d(t),128&t.__u?void 0:l}function $(e,t,n){for(var r=0;r<n.length;r++)q(n[r],n[++r],n[++r]);g.__c&&g.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){g.__e(e,t.__v)}})}function q(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){g.__e(e,n)}}function Y(e,t,n){return this.constructor(e,n)}function G(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),g.__&&g.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,a=[],o=[],H(t,e=(!r&&n||t).__k=O(M,null,[e]),i||N,N,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?f.call(t.childNodes):null,a,!r&&n?n:i?i.__e:t.firstChild,r,o),$(a,e,o)}function J(e,t,n){var r,i,a,o,l=L({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)"key"==a?r=t[a]:"ref"==a?i=t[a]:l[a]=null==t[a]&&null!=o?o[a]:t[a];return arguments.length>2&&(l.children=arguments.length>3?f.call(arguments,2):n),A(e.type,l,r||e.key,i||e.ref,null)}function Z(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,P(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+k++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}f=S.slice,g={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&null!=a.getDerivedStateFromError&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},h=0,F.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=L({},this.state),"function"==typeof e&&(e=e(L({},n),this.props)),e&&L(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),P(this))},F.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),P(this))},F.prototype.render=M,m=[],x="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b=function(e,t){return e.__v.__b-t.__v.__b},z.__r=0,v=/(PointerCapture)$|Capture$/i,y=0,_=W(!1),C=W(!0),k=0;var K={};a(K,"useState",()=>ep),a(K,"useReducer",()=>ef),a(K,"useEffect",()=>eg),a(K,"useLayoutEffect",()=>eh),a(K,"useRef",()=>em),a(K,"useMemo",()=>ex),a(K,"useImperativeHandle",()=>ew),a(K,"useCallback",()=>eb),a(K,"useContext",()=>ev),a(K,"useDebugValue",()=>ey),a(K,"useErrorBoundary",()=>e_),a(K,"useId",()=>eC);var X,Q,ee,et,en=0,er=[],ei=g,ea=ei.__b,eo=ei.__r,el=ei.diffed,es=ei.__c,ec=ei.unmount,ed=ei.__;function eu(e,t){ei.__h&&ei.__h(Q,e,en||t),en=0;var n=Q.__H||(Q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ep(e){return en=1,ef(eL,e)}function ef(e,t,n){var r=eu(X++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):eL(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=Q,!Q.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a&&a.call(this,e,t,n)||o};Q.__f=!0;var a=Q.shouldComponentUpdate,o=Q.componentWillUpdate;Q.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},Q.shouldComponentUpdate=i}return r.__N||r.__}function eg(e,t){var n=eu(X++,3);!ei.__s&&eT(n.__H,t)&&(n.__=e,n.u=t,Q.__H.__h.push(n))}function eh(e,t){var n=eu(X++,4);!ei.__s&&eT(n.__H,t)&&(n.__=e,n.u=t,Q.__h.push(n))}function em(e){return en=5,ex(function(){return{current:e}},[])}function ew(e,t,n){en=6,eh(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function ex(e,t){var n=eu(X++,7);return eT(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function eb(e,t){return en=8,ex(function(){return e},t)}function ev(e){var t=Q.context[e.__c],n=eu(X++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(Q)),t.props.value):e.__}function ey(e,t){ei.useDebugValue&&ei.useDebugValue(t?t(e):e)}function e_(e){var t=eu(X++,10),n=ep();return t.__=e,Q.componentDidCatch||(Q.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function eC(){var e=eu(X++,11);if(!e.__){for(var t=Q.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function ek(){for(var e;e=er.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(eS),e.__H.__h.forEach(eE),e.__H.__h=[]}catch(t){e.__H.__h=[],ei.__e(t,e.__v)}}ei.__b=function(e){Q=null,ea&&ea(e)},ei.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ed&&ed(e,t)},ei.__r=function(e){eo&&eo(e),X=0;var t=(Q=e.__c).__H;t&&(ee===Q?(t.__h=[],Q.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(eS),t.__h.forEach(eE),t.__h=[],X=0)),ee=Q},ei.diffed=function(e){el&&el(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==er.push(t)&&et===ei.requestAnimationFrame||((et=ei.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),eN&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);eN&&(t=requestAnimationFrame(n))})(ek)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),ee=Q=null},ei.__c=function(e,t){t.some(function(e){try{e.__h.forEach(eS),e.__h=e.__h.filter(function(e){return!e.__||eE(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ei.__e(n,e.__v)}}),es&&es(e,t)},ei.unmount=function(e){ec&&ec(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{eS(e)}catch(e){t=e}}),n.__H=void 0,t&&ei.__e(t,n.__v))};var eN="function"==typeof requestAnimationFrame;function eS(e){var t=Q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),Q=t}function eE(e){var t=Q;e.__c=e.__(),Q=t}function eT(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function eL(e,t){return"function"==typeof t?t(e):t}function eI(e,t){for(var n in t)e[n]=t[n];return e}function eO(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function eA(e,t){var n=t(),r=ep({t:{__:n,u:t}}),i=r[0].t,a=r[1];return eh(function(){i.__=n,i.u=t,eD(i)&&a({t:i})},[e,n,t]),eg(function(){return eD(i)&&a({t:i}),e(function(){eD(i)&&a({t:i})})},[e]),n}function eD(e){var t=e.u,n=e.__;try{var r=t();return(n!==r||0===n&&1/n!=1/r)&&(n==n||r==r)}catch(e){return!0}}function eM(e){e()}function eF(e){return e}function eR(){return[!1,eM]}var eP=eh;function ez(e,t){this.props=e,this.context=t}function ej(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:eO(this.props,e)}function r(t){return this.shouldComponentUpdate=n,O(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ez.prototype=new F).isPureReactComponent=!0,ez.prototype.shouldComponentUpdate=function(e,t){return eO(this.props,e)||eO(this.state,t)};var eU=g.__b;g.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),eU&&eU(e)};var eB="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function eV(e){function t(t){var n=eI({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=eB,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var eW=function(e,t){return null==e?null:U(U(e).map(t))},eH={map:eW,forEach:eW,count:function(e){return e?U(e).length:0},only:function(e){var t=U(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:U},e$=g.__e;g.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}e$(e,t,n,r)};var eq=g.unmount;function eY(){this.__u=0,this.o=null,this.__b=null}function eG(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function eJ(e){var t,n,r;function i(i){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return O(n,i)}return i.displayName="Lazy",i.__f=!0,i}function eZ(){this.i=null,this.l=null}g.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),eq&&eq(e)},(eY.prototype=new F).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var i=eG(r.__v),a=!1,o=function(){a||(a=!0,n.__R=null,i?i(l):l())};n.__R=o;var l=function(){if(!--r.__u){if(r.state.__a){var e,t=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&r&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return e(t,n,r)}),t.__c&&t.__c.__P===n&&(t.__e&&r.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=r)),t}(t,t.__c.__P,t.__c.__O)}for(r.setState({__a:r.__b=null});e=r.o.pop();)e.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},eY.prototype.componentWillUnmount=function(){this.o=[]},eY.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),t.__c.__H=null),null!=(t=eI({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return e(t,n,r)})),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&O(M,null,e.fallback);return i&&(i.__u&=-33),[O(M,null,t.__a?null:e.children),i]};var eK=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function eX(e){return this.getChildContext=function(){return e.context},e.children}function eQ(e){var t=this,n=e.h;t.componentWillUnmount=function(){G(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),t.v||(t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(e){this.childNodes.push(e),t.h.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}),G(O(eX,{context:t.context},e.__v),t.v)}function e1(e,t){var n=O(eQ,{__v:e,h:t});return n.containerInfo=t,n}(eZ.prototype=new F).__a=function(e){var t=this,n=eG(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),eK(t,e,r)):i()};n?n(a):a()}},eZ.prototype.render=function(e){this.i=null,this.l=new Map;var t=U(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},eZ.prototype.componentDidUpdate=eZ.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){eK(e,n,t)})};var e0="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,e2=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,e5=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,e3=/[A-Z0-9]/g,e4="undefined"!=typeof document;function e6(e,t,n){return null==t.__k&&(t.textContent=""),G(e,t),"function"==typeof n&&n(),e?e.__c:null}function e9(e,t,n){return function e(t,n){G(t,n,e)}(e,t),"function"==typeof n&&n(),e?e.__c:null}F.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(F.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var e8=g.event;function e7(){}function te(){return this.cancelBubble}function tt(){return this.defaultPrevented}g.event=function(e){return e8&&(e=e8(e)),e.persist=e7,e.isPropagationStopped=te,e.isDefaultPrevented=tt,e.nativeEvent=e};var tn,tr={enumerable:!1,configurable:!0,get:function(){return this.class}},ti=g.vnode;g.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},i=-1===n.indexOf("-");for(var a in t){var o=t[a];if(!("value"===a&&"defaultValue"in t&&null==o||e4&&"children"===a&&"noscript"===n||"class"===a||"className"===a)){var l,s=a.toLowerCase();"defaultValue"===a&&"value"in t&&null==t.value?a="value":"download"===a&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?a="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||(l=t.type,("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(l))?"onfocus"===s?a="onfocusin":"onblur"===s?a="onfocusout":e5.test(a)&&(a=s):s=a="oninput":i&&e2.test(a)?a=a.replace(e3,"-$&").toLowerCase():null===o&&(o=void 0),"oninput"===s&&r[a=s]&&(a="oninputCapture"),r[a]=o}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=U(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=U(t.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",tr)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=e0,ti&&ti(e)};var ta=g.__r;g.__r=function(e){ta&&ta(e),tn=e.__c};var to=g.diffed;g.diffed=function(e){to&&to(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),tn=null};var tl={ReactCurrentDispatcher:{current:{readContext:function(e){return tn.__n[e.__c].props.value},useCallback:eb,useContext:ev,useDebugValue:ey,useDeferredValue:eF,useEffect:eg,useId:eC,useImperativeHandle:ew,useInsertionEffect:eP,useLayoutEffect:eh,useMemo:ex,useReducer:ef,useRef:em,useState:ep,useSyncExternalStore:eA,useTransition:eR}}},ts="18.3.1";function tc(e){return O.bind(null,e)}function td(e){return!!e&&e.$$typeof===e0}function tu(e){return td(e)&&e.type===M}function tp(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function tf(e){return td(e)?J.apply(null,arguments):e}function tg(e){return!!e.__k&&(G(null,e),!0)}function th(e){return e&&(e.base||1===e.nodeType&&e)||null}var tm=function(e,t){return e(t)},tw=function(e,t){return e(t)},tx=M,tb=td,tv={useState:ep,useId:eC,useReducer:ef,useEffect:eg,useLayoutEffect:eh,useInsertionEffect:eP,useTransition:eR,useDeferredValue:eF,useSyncExternalStore:eA,startTransition:eM,useRef:em,useImperativeHandle:ew,useMemo:ex,useCallback:eb,useContext:ev,useDebugValue:ey,version:"18.3.1",Children:eH,render:e6,hydrate:e9,unmountComponentAtNode:tg,createPortal:e1,createElement:O,createContext:Z,createFactory:tc,cloneElement:tf,createRef:D,Fragment:M,isValidElement:td,isElement:tb,isFragment:tu,isMemo:tp,findDOMNode:th,Component:F,PureComponent:ez,memo:ej,forwardRef:eV,flushSync:tw,unstable_batchedUpdates:tm,StrictMode:tx,Suspense:eY,SuspenseList:eZ,lazy:eJ,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:tl};!function(e,t){Object.keys(t).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})}(p,K);var ty=/["&<]/,t_=0;function tC(e,t,n,r,i,a){t||(t={});var o,l,s=t;if("ref"in s)for(l in s={},t)"ref"==l?o=t[l]:s[l]=t[l];var c={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--t_,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof e&&(o=e.defaultProps))for(l in o)void 0===s[l]&&(s[l]=o[l]);return g.vnode&&g.vnode(c),c}var tk={createRoot:function(e){return{render:function(t){e6(t,e)},unmount:function(){tg(e)}}}},tN={};tN='/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){.pager-widget *,.pager-widget ::backdrop,.pager-widget :after,.pager-widget :before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-duration:initial;--tw-ease:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{.pager-widget :host,.pager-widget :root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--spacing:.25rem;--container-md:28rem;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{.pager-widget *,.pager-widget ::backdrop,.pager-widget :after,.pager-widget :before{box-sizing:border-box;border:0 solid;margin:0;padding:0}.pager-widget ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.pager-widget :host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-variation-settings:normal;tab-size:4;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}.pager-widget hr{color:inherit;border-top-width:1px;height:0}.pager-widget abbr:where([title]){text-decoration:underline dotted}.pager-widget h1,.pager-widget h2,.pager-widget h3,.pager-widget h4,.pager-widget h5,.pager-widget h6{font-size:inherit;font-weight:inherit}.pager-widget a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.pager-widget b,.pager-widget strong{font-weight:bolder}.pager-widget code,.pager-widget kbd,.pager-widget pre,.pager-widget samp{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.pager-widget small{font-size:80%}.pager-widget sub,.pager-widget sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.pager-widget sub{bottom:-.25em}.pager-widget sup{top:-.5em}.pager-widget table{border-collapse:collapse;border-color:inherit;text-indent:0}.pager-widget :-moz-focusring{outline:auto}.pager-widget progress{vertical-align:baseline}.pager-widget summary{display:list-item}.pager-widget menu,.pager-widget ol,.pager-widget ul{list-style:none}.pager-widget audio,.pager-widget canvas,.pager-widget embed,.pager-widget iframe,.pager-widget img,.pager-widget object,.pager-widget svg,.pager-widget video{vertical-align:middle;display:block}.pager-widget img,.pager-widget video{max-width:100%;height:auto}.pager-widget button,.pager-widget input,.pager-widget optgroup,.pager-widget select,.pager-widget textarea{color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1;background-color:#0000;border-radius:0}.pager-widget ::file-selector-button{color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1;background-color:#0000;border-radius:0}.pager-widget :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.pager-widget :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.pager-widget ::file-selector-button{margin-inline-end:4px}.pager-widget ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.pager-widget ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.pager-widget ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.pager-widget textarea{resize:vertical}.pager-widget ::-webkit-search-decoration{-webkit-appearance:none}.pager-widget ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.pager-widget ::-webkit-datetime-edit{display:inline-flex}.pager-widget ::-webkit-datetime-edit-fields-wrapper{padding:0}.pager-widget ::-webkit-datetime-edit{padding-block:0}.pager-widget ::-webkit-datetime-edit-year-field{padding-block:0}.pager-widget ::-webkit-datetime-edit-day-field{padding-block:0}.pager-widget ::-webkit-datetime-edit-month-field{padding-block:0}.pager-widget ::-webkit-datetime-edit-hour-field{padding-block:0}.pager-widget ::-webkit-datetime-edit-minute-field{padding-block:0}.pager-widget ::-webkit-datetime-edit-millisecond-field{padding-block:0}.pager-widget ::-webkit-datetime-edit-second-field{padding-block:0}.pager-widget ::-webkit-datetime-edit-meridiem-field{padding-block:0}.pager-widget :-moz-ui-invalid{box-shadow:none}.pager-widget button,.pager-widget input:where([type=button],[type=reset],[type=submit]){appearance:button}.pager-widget ::file-selector-button{appearance:button}.pager-widget ::-webkit-inner-spin-button{height:auto}.pager-widget ::-webkit-outer-spin-button{height:auto}.pager-widget [hidden]:where(:not([hidden=until-found])){display:none!important}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(fonts/Inter-Regular.woff2)format("woff2")}@font-face{font-family:inter-font;src:local(Inter-VariableFont),url(../src/assets/fonts/Inter-VariableFont.ttf)format("truetype")}@font-face{font-family:Light;font-weight:300;src:local(Inter-VariableFont),url(../src/assets/fonts/Inter-VariableFont.ttf)format("truetype")}@font-face{font-family:Regular;font-weight:400;src:local(Inter-VariableFont),url(../src/assets/fonts/Inter-VariableFont.ttf)format("truetype")}@font-face{font-family:Medium;font-weight:500;src:local(Inter-VariableFont),url(../src/assets/fonts/Inter-VariableFont.ttf)format("truetype")}@font-face{font-family:SemiBold;font-weight:600;src:local(Inter-VariableFont),url(../src/assets/fonts/Inter-VariableFont.ttf)format("truetype")}@font-face{font-family:Bold;font-weight:700;src:local(Inter-VariableFont),url(../src/assets/fonts/Inter-VariableFont.ttf)format("truetype")}.pager-widget *,.pager-widget ::backdrop,.pager-widget :after,.pager-widget :before{border-color:currentColor}.pager-widget ::file-selector-button{border-color:currentColor}}@layer components;@layer utilities{.pager-widget .pointer-events-none{pointer-events:none!important}.pager-widget .visible{visibility:visible!important}.pager-widget .absolute{position:absolute!important}.pager-widget .fixed{position:fixed!important}.pager-widget .relative{position:relative!important}.pager-widget .static{position:static!important}.pager-widget .sticky{position:sticky!important}.pager-widget .inset-0{inset:0!important}.pager-widget .-top-1{top:-.25rem!important}.pager-widget .-top-3{top:-.75rem!important}.pager-widget .top-0{top:0!important}.pager-widget .top-0\\.5{top:.125rem!important}.pager-widget .top-1\\/2{top:50%!important}.pager-widget .top-2\\.5{top:.625rem!important}.pager-widget .top-6{top:1.5rem!important}.pager-widget .top-full{top:100%!important}.pager-widget .-right-1{right:-.25rem!important}.pager-widget .-right-3{right:-.75rem!important}.pager-widget .right-0{right:0!important}.pager-widget .right-1{right:.25rem!important}.pager-widget .right-3{right:.75rem!important}.pager-widget .right-4{right:1rem!important}.pager-widget .right-5{right:1.25rem!important}.pager-widget .right-6{right:1.5rem!important}.pager-widget .right-full{right:100%!important}.pager-widget .-bottom-1{bottom:-.25rem!important}.pager-widget .bottom-0{bottom:0!important}.pager-widget .bottom-20{bottom:5rem!important}.pager-widget .bottom-\\[1\\.2rem\\]{bottom:1.2rem!important}.pager-widget .bottom-full{bottom:100%!important}.pager-widget .-left-1{left:-.25rem!important}.pager-widget .left-0{left:0!important}.pager-widget .left-1\\/2{left:50%!important}.pager-widget .left-3{left:.75rem!important}.pager-widget .left-\\[1\\.5rem\\]{left:1.5rem!important}.pager-widget .left-full{left:100%!important}.pager-widget .z-10{z-index:10!important}.pager-widget .z-50{z-index:50!important}.pager-widget .z-\\[0\\]{z-index:0!important}.pager-widget .z-\\[99999999999999\\]{z-index:2147483647!important}.pager-widget .container{width:100%!important}@media (width>=500px){.pager-widget .container{max-width:500px!important}}@media (width>=640px){.pager-widget .container{max-width:640px!important}}@media (width>=768px){.pager-widget .container{max-width:768px!important}}@media (width>=1024px){.pager-widget .container{max-width:1024px!important}}@media (width>=1050px){.pager-widget .container{max-width:1050px!important}}@media (width>=1300px){.pager-widget .container{max-width:1300px!important}}@media (width>=1500px){.pager-widget .container{max-width:1500px!important}}@media (width>=1536px){.pager-widget .container{max-width:1536px!important}}@media (width>=1700px){.pager-widget .container{max-width:1700px!important}}@media (width>=1920px){.pager-widget .container{max-width:1920px!important}}@media (width>=2160px){.pager-widget .container{max-width:2160px!important}}@media (width>=2560px){.pager-widget .container{max-width:2560px!important}}@media (width>=3840px){.pager-widget .container{max-width:3840px!important}}.pager-widget .container{margin-inline:auto!important;padding-inline:2rem!important}@media (width>=500px){.pager-widget .container{max-width:none!important}}@media (width>=1400px){.pager-widget .container{max-width:1400px!important}}.pager-widget .mx-1{margin-inline:.25rem!important}.pager-widget .mx-auto{margin-inline:auto!important}.pager-widget .-mt-\\[1px\\]{margin-top:-1px!important}.pager-widget .-mt-\\[12px\\]{margin-top:-12px!important}.pager-widget .mt-1{margin-top:.25rem!important}.pager-widget .mt-2{margin-top:.5rem!important}.pager-widget .mt-10{margin-top:2.5rem!important}.pager-widget .mt-\\[-1\\.00px\\],.pager-widget .mt-\\[-1px\\]{margin-top:-1px!important}.pager-widget .mr-2{margin-right:.5rem!important}.pager-widget .mr-4{margin-right:1rem!important}.pager-widget .mb-1{margin-bottom:.25rem!important}.pager-widget .mb-2{margin-bottom:.5rem!important}.pager-widget .mb-4{margin-bottom:1rem!important}.pager-widget .mb-\\[6px\\]{margin-bottom:6px!important}.pager-widget .ml-0\\.5{margin-left:.125rem!important}.pager-widget .ml-2{margin-left:.5rem!important}.pager-widget .block{display:block!important}.pager-widget .flex{display:flex!important}.pager-widget .inline{display:inline!important}.pager-widget .inline-block{display:inline-block!important}.pager-widget .inline-flex{display:inline-flex!important}.pager-widget .table{display:table!important}.pager-widget .\\!h-6{height:1.5rem!important}.pager-widget .\\!h-7{height:1.75rem!important}.pager-widget .h-1{height:.25rem!important}.pager-widget .h-2{height:.5rem!important}.pager-widget .h-2\\.5{height:.625rem!important}.pager-widget .h-3{height:.75rem!important}.pager-widget .h-3\\.5{height:.875rem!important}.pager-widget .h-4{height:1rem!important}.pager-widget .h-5{height:1.25rem!important}.pager-widget .h-6{height:1.5rem!important}.pager-widget .h-7{height:1.75rem!important}.pager-widget .h-8{height:2rem!important}.pager-widget .h-9{height:2.25rem!important}.pager-widget .h-12{height:3rem!important}.pager-widget .h-32{height:8rem!important}.pager-widget .h-\\[10px\\]{height:10px!important}.pager-widget .h-\\[14px\\]{height:14px!important}.pager-widget .h-\\[16px\\]{height:16px!important}.pager-widget .h-\\[18px\\]{height:18px!important}.pager-widget .h-\\[22px\\]{height:22px!important}.pager-widget .h-\\[24px\\]{height:24px!important}.pager-widget .h-\\[30px\\]{height:30px!important}.pager-widget .h-\\[32\\]{height:32px!important}.pager-widget .h-\\[40\\%\\]{height:40%!important}.pager-widget .h-\\[40px\\]{height:40px!important}.pager-widget .h-\\[50px\\]{height:50px!important}.pager-widget .h-\\[58px\\]{height:58px!important}.pager-widget .h-\\[58vh\\]{height:58vh!important}.pager-widget .h-\\[60px\\]{height:60px!important}.pager-widget .h-\\[64vh\\]{height:64vh!important}.pager-widget .h-\\[70vh\\]{height:70vh!important}.pager-widget .h-\\[80px\\]{height:80px!important}.pager-widget .h-\\[90\\%\\]{height:90%!important}.pager-widget .h-\\[93\\%\\]{height:93%!important}.pager-widget .h-\\[94\\%\\]{height:94%!important}.pager-widget .h-\\[100px\\]{height:100px!important}.pager-widget .h-\\[120px\\]{height:120px!important}.pager-widget .h-\\[126px\\]{height:126px!important}.pager-widget .h-\\[140px\\]{height:140px!important}.pager-widget .h-\\[160px\\]{height:160px!important}.pager-widget .h-\\[250px\\]{height:250px!important}.pager-widget .h-\\[300px\\]{height:300px!important}.pager-widget .h-\\[calc\\(100\\%-80px\\)\\]{height:calc(100% - 80px)!important}.pager-widget .h-full{height:100%!important}.pager-widget .h-max{height:max-content!important}.pager-widget .h-px{height:1px!important}.pager-widget .max-h-8{max-height:2rem!important}.pager-widget .max-h-48{max-height:12rem!important}.pager-widget .max-h-\\[200px\\]{max-height:200px!important}.pager-widget .min-h-\\[36px\\]{min-height:36px!important}.pager-widget .min-h-max{min-height:max-content!important}.pager-widget .w-1{width:.25rem!important}.pager-widget .w-2{width:.5rem!important}.pager-widget .w-2\\/3{width:66.6667%!important}.pager-widget .w-3{width:.75rem!important}.pager-widget .w-3\\.5{width:.875rem!important}.pager-widget .w-4{width:1rem!important}.pager-widget .w-5{width:1.25rem!important}.pager-widget .w-6{width:1.5rem!important}.pager-widget .w-8{width:2rem!important}.pager-widget .w-90{width:22.5rem!important}.pager-widget .w-\\[10px\\]{width:10px!important}.pager-widget .w-\\[14px\\]{width:14px!important}.pager-widget .w-\\[16px\\]{width:16px!important}.pager-widget .w-\\[18px\\]{width:18px!important}.pager-widget .w-\\[22px\\]{width:22px!important}.pager-widget .w-\\[24px\\]{width:24px!important}.pager-widget .w-\\[30px\\]{width:30px!important}.pager-widget .w-\\[58px\\]{width:58px!important}.pager-widget .w-\\[60px\\]{width:60px!important}.pager-widget .w-\\[80px\\]{width:80px!important}.pager-widget .w-\\[81\\.86px\\]{width:81.86px!important}.pager-widget .w-\\[86\\%\\]{width:86%!important}.pager-widget .w-\\[90\\%\\]{width:90%!important}.pager-widget .w-\\[91\\%\\]{width:91%!important}.pager-widget .w-\\[93\\%\\]{width:93%!important}.pager-widget .w-\\[100\\%\\]{width:100%!important}.pager-widget .w-\\[100px\\]{width:100px!important}.pager-widget .w-\\[120px\\]{width:120px!important}.pager-widget .w-\\[126px\\]{width:126px!important}.pager-widget .w-\\[140px\\]{width:140px!important}.pager-widget .w-\\[148px\\]{width:148px!important}.pager-widget .w-\\[160px\\]{width:160px!important}.pager-widget .w-\\[250px\\]{width:250px!important}.pager-widget .w-\\[280px\\]{width:280px!important}.pager-widget .w-\\[289px\\]{width:289px!important}.pager-widget .w-\\[300px\\]{width:300px!important}.pager-widget .w-\\[auto\\]{width:auto!important}.pager-widget .w-\\[calc\\(100\\%-40px\\)\\]{width:calc(100% - 40px)!important}.pager-widget .w-\\[calc\\(100vw-80px\\)\\]{width:calc(100vw - 80px)!important}.pager-widget .w-auto{width:auto!important}.pager-widget .w-fit{width:fit-content!important}.pager-widget .w-full{width:100%!important}.pager-widget .w-max{width:max-content!important}.pager-widget .max-w-\\[80\\%\\]{max-width:80%!important}.pager-widget .max-w-\\[280px\\]{max-width:280px!important}.pager-widget .max-w-\\[533px\\]{max-width:533px!important}.pager-widget .max-w-max{max-width:max-content!important}.pager-widget .max-w-md{max-width:28rem!important}.pager-widget .min-w-\\[400px\\]{min-width:400px!important}.pager-widget .min-w-full{min-width:100%!important}.pager-widget .flex-1{flex:1!important}.pager-widget .flex-\\[0_0_auto\\]{flex:none!important}.pager-widget .grow{flex-grow:1!important}.pager-widget .border-collapse{border-collapse:collapse!important}.pager-widget .-translate-x-1{--tw-translate-x:calc(var(--spacing)*-1)!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.pager-widget .-translate-x-1\\/2{--tw-translate-x:-50%!important}.pager-widget .-translate-x-1\\/2,.pager-widget .translate-x-0{translate:var(--tw-translate-x)var(--tw-translate-y)!important}.pager-widget .translate-x-0{--tw-translate-x:calc(var(--spacing)*0)!important}.pager-widget .translate-x-\\[-50\\%\\]{--tw-translate-x:-50%!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.pager-widget .-translate-y-1\\/2{--tw-translate-y:-50%!important}.pager-widget .-translate-y-1\\/2,.pager-widget .translate-y-1{translate:var(--tw-translate-x)var(--tw-translate-y)!important}.pager-widget .translate-y-1{--tw-translate-y:calc(var(--spacing)*1)!important}.pager-widget .translate-y-\\[-50\\%\\]{--tw-translate-y:-50%!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.pager-widget .scale-95{--tw-scale-x:95%!important;--tw-scale-y:95%!important;--tw-scale-z:95%!important}.pager-widget .scale-100,.pager-widget .scale-95{scale:var(--tw-scale-x)var(--tw-scale-y)!important}.pager-widget .scale-100{--tw-scale-x:100%!important;--tw-scale-y:100%!important;--tw-scale-z:100%!important}.pager-widget .rotate-45{rotate:45deg!important}.pager-widget .transform{transform: !important}.pager-widget .cursor-pointer{cursor:pointer!important}.pager-widget .resize{resize:both!important}.pager-widget .appearance-none{appearance:none!important}.pager-widget .flex-col{flex-direction:column!important}.pager-widget .flex-wrap{flex-wrap:wrap!important}.pager-widget .items-baseline{align-items:baseline!important}.pager-widget .items-center{align-items:center!important}.pager-widget .items-end{align-items:flex-end!important}.pager-widget .items-start{align-items:flex-start!important}.pager-widget .justify-between{justify-content:space-between!important}.pager-widget .justify-center{justify-content:center!important}.pager-widget .justify-end{justify-content:flex-end!important}.pager-widget .justify-start{justify-content:flex-start!important}.pager-widget .gap-1{gap:.25rem!important}.pager-widget .gap-1\\.5{gap:.375rem!important}.pager-widget .gap-2{gap:.5rem!important}.pager-widget .gap-2\\.5{gap:.625rem!important}.pager-widget .gap-3{gap:.75rem!important}.pager-widget .gap-4{gap:1rem!important}.pager-widget .gap-5{gap:1.25rem!important}.pager-widget .gap-8{gap:2rem!important}.pager-widget .gap-10{gap:2.5rem!important}.pager-widget .gap-\\[5px\\]{gap:5px!important}.pager-widget .gap-\\[18px\\]{gap:18px!important}.pager-widget :where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0!important;margin-block-start:calc(.5rem*var(--tw-space-y-reverse))!important;margin-block-end:calc(.5rem*(1 - var(--tw-space-y-reverse)))!important}.pager-widget :where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0!important;margin-block-start:calc(1rem*var(--tw-space-y-reverse))!important;margin-block-end:calc(1rem*(1 - var(--tw-space-y-reverse)))!important}.pager-widget .self-stretch{align-self:stretch!important}.pager-widget .truncate{text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important}.pager-widget .overflow-auto{overflow:auto!important}.pager-widget .overflow-hidden{overflow:hidden!important}.pager-widget .overflow-y-auto{overflow-y:auto!important}.pager-widget .overflow-y-scroll{overflow-y:scroll!important}.pager-widget .rounded-2xl{border-radius:1rem!important}.pager-widget .rounded-\\[10px\\]{border-radius:10px!important}.pager-widget .rounded-\\[22px\\]{border-radius:22px!important}.pager-widget .rounded-full{border-radius:3.40282e38px!important}.pager-widget .rounded-lg{border-radius:8px!important}.pager-widget .rounded-md{border-radius:.375rem!important}.pager-widget .rounded-sm{border-radius:.25rem!important}.pager-widget .rounded-xl{border-radius:.75rem!important}.pager-widget .rounded-t-\\[22px\\]{border-top-left-radius:22px!important;border-top-right-radius:22px!important}.pager-widget .rounded-l-lg{border-top-left-radius:8px!important;border-bottom-left-radius:8px!important}.pager-widget .rounded-tl-md{border-top-left-radius:.375rem!important}.pager-widget .rounded-r-lg{border-top-right-radius:8px!important;border-bottom-right-radius:8px!important}.pager-widget .rounded-tr-md{border-top-right-radius:.375rem!important}.pager-widget .border{border-style:var(--tw-border-style)!important;border-width:1px!important}.pager-widget .border-2{border-style:var(--tw-border-style)!important;border-width:2px!important}.pager-widget .border-t{border-top-style:var(--tw-border-style)!important;border-top-width:1px!important}.pager-widget .border-r-0{border-right-style:var(--tw-border-style)!important;border-right-width:0!important}.pager-widget .border-b{border-bottom-style:var(--tw-border-style)!important;border-bottom-width:1px!important}.pager-widget .border-l-4{border-left-style:var(--tw-border-style)!important;border-left-width:4px!important}.pager-widget .border-none{--tw-border-style:none!important;border-style:none!important}.pager-widget .border-solid{--tw-border-style:solid!important;border-style:solid!important}.pager-widget .border-\\[\\#52525C\\]{border-color:#52525c!important}.pager-widget .border-\\[\\#E4E7EC\\]{border-color:#e4e7ec!important}.pager-widget .border-\\[\\#e17100\\]{border-color:#e17100!important}.pager-widget .border-black{border-color:#000!important}.pager-widget .border-gray-200{border-color:#e5e7eb!important}.pager-widget .border-gray-300{border-color:#d1d5dc!important}.pager-widget .border-red-500{border-color:#fb2c36!important}.pager-widget .border-slate-200{border-color:#e2e8f0!important}.pager-widget .border-slate-300{border-color:#cad5e2!important}.pager-widget .border-zinc-100{border-color:#f4f4f5!important}.pager-widget .border-zinc-200{border-color:#e4e4e7!important}.pager-widget .border-zinc-300{border-color:#d4d4d8!important}.pager-widget .\\!bg-white{background-color:#fff!important}.pager-widget .bg-\\[\\#4B2FFF\\],.pager-widget .bg-\\[\\#4b2fff\\]{background-color:#4b2fff!important}.pager-widget .bg-\\[\\#9f9fa9\\]{background-color:#9f9fa9!important}.pager-widget .bg-\\[\\#14161A\\]{background-color:#14161a!important}.pager-widget .bg-\\[\\#F4F4F5\\]{background-color:#f4f4f5!important}.pager-widget .bg-\\[\\#f9fafb\\]{background-color:#f9fafb!important}.pager-widget .bg-\\[\\#fef3c6\\]{background-color:#fef3c6!important}.pager-widget .bg-\\[red\\]{background-color:red!important}.pager-widget .bg-black{background-color:#000!important}.pager-widget .bg-gray-100{background-color:#f3f4f6!important}.pager-widget .bg-gray-200{background-color:#e5e7eb!important}.pager-widget .bg-white{background-color:#fff!important}.pager-widget .bg-zinc-50{background-color:#fafafa!important}.pager-widget .bg-zinc-100{background-color:#f4f4f5!important}.pager-widget .bg-gradient-to-r{--tw-gradient-position:to right in oklab!important;background-image:linear-gradient(var(--tw-gradient-stops))!important}.pager-widget .from-\\[\\#564CFF\\]{--tw-gradient-from:#564cff!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))!important}.pager-widget .via-\\[\\#EB582E\\]{--tw-gradient-via:#eb582e!important;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-via-stops)!important}.pager-widget .to-\\[\\#ECD906\\]{--tw-gradient-to:#ecd906!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))!important}.pager-widget .bg-cover{background-size:cover!important}.pager-widget .bg-\\[100\\%_100\\%\\]{background-position:100% 100%!important}.pager-widget .bg-center{background-position:50%!important}.pager-widget .p-0{padding:0!important}.pager-widget .p-1{padding:.25rem!important}.pager-widget .p-1\\.5{padding:.375rem!important}.pager-widget .p-2{padding:.5rem!important}.pager-widget .p-3{padding:.75rem!important}.pager-widget .p-4{padding:1rem!important}.pager-widget .p-5{padding:1.25rem!important}.pager-widget .p-6{padding:1.5rem!important}.pager-widget .p-\\[3\\.5px\\]{padding:3.5px!important}.pager-widget .p-\\[5px\\]{padding:5px!important}.pager-widget .px-0{padding-inline:0!important}.pager-widget .px-1{padding-inline:.25rem!important}.pager-widget .px-2{padding-inline:.5rem!important}.pager-widget .px-2\\.5{padding-inline:.625rem!important}.pager-widget .px-3\\.5{padding-inline:.875rem!important}.pager-widget .px-4{padding-inline:1rem!important}.pager-widget .px-5{padding-inline:1.25rem!important}.pager-widget .px-8{padding-inline:2rem!important}.pager-widget .px-9{padding-inline:2.25rem!important}.pager-widget .px-\\[26px\\]{padding-inline:26px!important}.pager-widget .py-0{padding-block:0!important}.pager-widget .py-0\\.5{padding-block:.125rem!important}.pager-widget .py-1{padding-block:.25rem!important}.pager-widget .py-1\\.5{padding-block:.375rem!important}.pager-widget .py-2{padding-block:.5rem!important}.pager-widget .py-2\\.5{padding-block:.625rem!important}.pager-widget .py-3{padding-block:.75rem!important}.pager-widget .py-\\[13px\\]{padding-block:13px!important}.pager-widget .py-\\[15px\\]{padding-block:15px!important}.pager-widget .pt-0\\.5{padding-top:.125rem!important}.pager-widget .pt-1{padding-top:.25rem!important}.pager-widget .pt-2{padding-top:.5rem!important}.pager-widget .pt-3{padding-top:.75rem!important}.pager-widget .pt-4{padding-top:1rem!important}.pager-widget .pt-px{padding-top:1px!important}.pager-widget .\\!pr-4{padding-right:1rem!important}.pager-widget .pr-0{padding-right:0!important}.pager-widget .pr-1{padding-right:.25rem!important}.pager-widget .pr-2\\.5{padding-right:.625rem!important}.pager-widget .pr-3{padding-right:.75rem!important}.pager-widget .pr-4{padding-right:1rem!important}.pager-widget .pb-0\\.5{padding-bottom:.125rem!important}.pager-widget .pb-2\\.5{padding-bottom:.625rem!important}.pager-widget .pb-3{padding-bottom:.75rem!important}.pager-widget .pb-7{padding-bottom:1.75rem!important}.pager-widget .pb-8{padding-bottom:2rem!important}.pager-widget .pb-\\[70px\\]{padding-bottom:70px!important}.pager-widget .pl-2{padding-left:.5rem!important}.pager-widget .pl-3{padding-left:.75rem!important}.pager-widget .pl-3\\.5{padding-left:.875rem!important}.pager-widget .pl-5{padding-left:1.25rem!important}.pager-widget .pl-10{padding-left:2.5rem!important}.pager-widget .pl-\\[26px\\]{padding-left:26px!important}.pager-widget .text-center{text-align:center!important}.pager-widget .text-left{text-align:left!important}.pager-widget .text-start{text-align:start!important}.pager-widget .font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.pager-widget .text-2xl{font-size:24px!important}.pager-widget .text-\\[12px\\]{font-size:12px!important}.pager-widget .text-\\[length\\:var\\(--text-md-medium-font-size\\)\\]{font-size:var(--text-md-medium-font-size)!important}.pager-widget .text-base{font-size:16px!important}.pager-widget .text-sm{font-size:14px!important}.pager-widget .text-xs{font-size:12px!important}.pager-widget .text-xss{font-size:10px!important}.pager-widget .leading-5{--tw-leading:calc(var(--spacing)*5)!important;line-height:1.25rem!important}.pager-widget .leading-6{--tw-leading:calc(var(--spacing)*6)!important;line-height:1.5rem!important}.pager-widget .leading-8{--tw-leading:calc(var(--spacing)*8)!important;line-height:2rem!important}.pager-widget .leading-\\[18px\\]{--tw-leading:18px!important;line-height:18px!important}.pager-widget .leading-\\[var\\(--text-md-medium-line-height\\)\\]{--tw-leading:var(--text-md-medium-line-height)!important;line-height:var(--text-md-medium-line-height)!important}.pager-widget .leading-relaxed{--tw-leading:var(--leading-relaxed)!important;line-height:1.625!important}.pager-widget .font-\\[number\\:var\\(--text-md-medium-font-weight\\)\\]{--tw-font-weight:var(--text-md-medium-font-weight)!important;font-weight:var(--text-md-medium-font-weight)!important}.pager-widget .font-bold{--tw-font-weight:var(--font-weight-bold)!important;font-weight:700!important}.pager-widget .font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:500!important}.pager-widget .font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:400!important}.pager-widget .font-semibold{--tw-font-weight:var(--font-weight-semibold)!important;font-weight:600!important}.pager-widget .tracking-\\[0\\]{--tw-tracking:0!important;letter-spacing:0!important}.pager-widget .tracking-\\[0px\\]{--tw-tracking:0px!important;letter-spacing:0!important}.pager-widget .tracking-\\[var\\(--text-md-medium-letter-spacing\\)\\]{--tw-tracking:var(--text-md-medium-letter-spacing)!important;letter-spacing:var(--text-md-medium-letter-spacing)!important}.pager-widget .text-wrap{text-wrap:wrap!important}.pager-widget .text-ellipsis{text-overflow:ellipsis!important}.pager-widget .whitespace-nowrap{white-space:nowrap!important}.pager-widget .whitespace-pre{white-space:pre!important}.pager-widget .whitespace-pre-wrap{white-space:pre-wrap!important}.pager-widget .text-\\[\\#1a1a1a\\]{color:#1a1a1a!important}.pager-widget .text-\\[\\#1d293d\\]{color:#1d293d!important}.pager-widget .text-\\[\\#4B2FFF\\]{color:#4b2fff!important}.pager-widget .text-\\[\\#90A1B9\\]{color:#90a1b9!important}.pager-widget .text-\\[\\#020618\\]{color:#020618!important}.pager-widget .text-\\[\\#45556C\\],.pager-widget .text-\\[\\#45556c\\]{color:#45556c!important}.pager-widget .text-\\[\\#62748E\\],.pager-widget .text-\\[\\#62748e\\]{color:#62748e!important}.pager-widget .text-\\[\\#314158\\]{color:#314158!important}.pager-widget .text-\\[\\#FFFFFF\\],.pager-widget .text-\\[\\#fff\\]{color:#fff!important}.pager-widget .text-amber-700{color:#bb4d00!important}.pager-widget .text-black{color:#000!important}.pager-widget .text-blue-700{color:#1447e6!important}.pager-widget .text-gray-400{color:#99a1af!important}.pager-widget .text-gray-500{color:#6a7282!important}.pager-widget .text-gray-600{color:#4a5565!important}.pager-widget .text-gray-700{color:#364153!important}.pager-widget .text-green-500{color:#00c950!important}.pager-widget .text-green-600{color:#00a63e!important}.pager-widget .text-red-500{color:#fb2c36!important}.pager-widget .text-slate-400{color:#90a1b9!important}.pager-widget .text-slate-500{color:#62748e!important}.pager-widget .text-slate-600{color:#45556c!important}.pager-widget .text-slate-700{color:#314158!important}.pager-widget .text-slate-950{color:#020618!important}.pager-widget .text-white{color:#fff!important}.pager-widget .\\[font-style\\:var\\(--text-md-medium-font-style\\)\\]{font-style:var(--text-md-medium-font-style)!important}.pager-widget .italic{font-style:italic!important}.pager-widget .line-through{text-decoration-line:line-through!important}.pager-widget .underline{text-decoration-line:underline!important}.pager-widget .placeholder-\\[\\#62748e\\]::placeholder{color:#62748e!important}.pager-widget .opacity-0{opacity:0!important}.pager-widget .opacity-50{opacity:.5!important}.pager-widget .opacity-90{opacity:.9!important}.pager-widget .opacity-100{opacity:1!important}.pager-widget .transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pager-widget .transition-all{transition-property:all!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pager-widget .transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pager-widget .transition-transform{transition-property:transform,translate,scale,rotate!important;transition-duration:.15s!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pager-widget .duration-150{--tw-duration:.15s!important;transition-duration:.15s!important}.pager-widget .duration-200{--tw-duration:.2s!important;transition-duration:.2s!important}.pager-widget .duration-300{--tw-duration:.3s!important;transition-duration:.3s!important}.pager-widget .duration-800{--tw-duration:.8s!important;transition-duration:.8s!important}.pager-widget .ease-in-out{--tw-ease:var(--ease-in-out)!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.pager-widget .ease-out{--tw-ease:var(--ease-out)!important;transition-timing-function:cubic-bezier(0,0,.2,1)!important}.pager-widget .outline-none{--tw-outline-style:none!important;outline-style:none!important}@media (hover:hover){.pager-widget .group-hover\\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto!important}.pager-widget .group-hover\\:translate-y-0:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing)*0)!important;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.pager-widget .group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1!important}.pager-widget .hover\\:scale-105:hover{--tw-scale-x:105%!important;--tw-scale-y:105%!important;--tw-scale-z:105%!important;scale:var(--tw-scale-x)var(--tw-scale-y)!important}.pager-widget .hover\\:border-\\[\\#4b2fff\\]:hover{border-color:#4b2fff!important}.pager-widget .hover\\:border-zinc-500:hover{border-color:#71717b!important}.pager-widget .hover\\:bg-\\[\\#3f25e8\\]:hover{background-color:#3f25e8!important}.pager-widget .hover\\:bg-\\[\\#4b2fff\\]\\/90:hover{background-color:oklab(50.6449% .0278989 -.278518/.9)!important}.pager-widget .hover\\:bg-gray-100:hover{background-color:#f3f4f6!important}.pager-widget .hover\\:bg-slate-50:hover{background-color:#f8fafc!important}.pager-widget .hover\\:bg-slate-100:hover{background-color:#f1f5f9!important}.pager-widget .hover\\:bg-white\\/10:hover{background-color:oklab(100% 0 5.96046e-8/.1)!important}.pager-widget .hover\\:bg-zinc-200:hover{background-color:#e4e4e7!important}.pager-widget .hover\\:text-\\[\\#4B2FFF\\]:hover{color:#4b2fff!important}.pager-widget .hover\\:text-\\[\\#3517f7\\]:hover{color:#3517f7!important}.pager-widget .hover\\:text-slate-700:hover{color:#314158!important}.pager-widget .hover\\:text-slate-800:hover{color:#1d293d!important}.pager-widget .hover\\:text-zinc-500:hover{color:#71717b!important}.pager-widget .hover\\:opacity-100:hover{opacity:1!important}}.pager-widget .focus\\:border-transparent:focus{border-color:#0000!important}.pager-widget .focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset, )0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.pager-widget .focus\\:ring-blue-500:focus{--tw-ring-color:#2b7fff!important}.pager-widget .focus\\:ring-red-500:focus{--tw-ring-color:#fb2c36!important}.pager-widget .focus\\:outline-none:focus{--tw-outline-style:none!important;outline-style:none!important}.pager-widget .active\\:scale-95:active{--tw-scale-x:95%!important;--tw-scale-y:95%!important;--tw-scale-z:95%!important;scale:var(--tw-scale-x)var(--tw-scale-y)!important}}.pager-widget{pointer-events:auto;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.pager-widget-root .bg-img-chat{background-position:50%;background-size:cover}.pager-widget-root .bg-gradient-clor{background:linear-gradient(#ffd66e,#4cff94)!important}.pager-widget-root ul{font-size:14px}.pager-widget-root ul ul{margin-top:5px;margin-bottom:5px}.pager-widget-root ul{padding-left:20px;list-style-type:disc}.pager-widget-root ul ul{padding-left:20px;list-style-type:circle}.pager-widget-root ul ul li{list-style-type:circle}.pager-widget-root ol{font-size:14px}.pager-widget-root ol ol{margin-top:5px;margin-bottom:5px}.pager-widget-root ol{padding-left:20px;list-style-type:decimal}.pager-widget-root ol ol{padding-left:20px;list-style-type:lower-alpha}.pager-widget-root ol ol li{padding-bottom:4px;list-style-type:lower-alpha}.pager-widget-root ol li,.pager-widget-root ul li{padding-bottom:4px}.pager-widget-root .three-dot-typing{margin:0;padding:0}.pager-widget-root .typing-dots{justify-content:center;align-items:center;height:auto;margin:0;padding:0;display:flex}.pager-widget-root .dot{background-color:#564cff;border-radius:50%;width:6px;height:6px;margin:0 3px;animation:1.4s infinite both blink}.pager-widget-root .dot:nth-child(2){animation-delay:.2s}.pager-widget-root .dot:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,to{opacity:0}40%{opacity:1}}.pager-widget-root .box-shadow-widget{box-shadow:0 5px 40px #0f0f0f29}.pager-widget-root .widget-expand-animation{transition:all .3s cubic-bezier(.4,0,.2,1)}.pager-widget-root .chat-area-height{height:calc(100% - 60px);max-height:calc(100% - 60px);overflow:hidden}@keyframes slideInRight{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:translate(0)}}@keyframes slideInRightSlow{0%{opacity:0}to{opacity:1}}.pager-widget-root .animate-slide-in-right{opacity:1;animation:.5s cubic-bezier(.23,1,.32,1) .1s backwards slideInRight;transform:translate(0)}.pager-widget-root .animate-slide-in-right-slow{opacity:1;animation:.5s cubic-bezier(.23,1,.32,1) backwards slideInRightSlow;transform:translate(0)}@keyframes slideInLeft{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slideInLeftSlow{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.pager-widget-root .animate-slide-in-left{opacity:1;animation:.5s cubic-bezier(.23,1,.32,1) .1s backwards slideInLeft;transform:translate(0)}.pager-widget-root .animate-slide-in-left-slow{opacity:1;animation:.5s cubic-bezier(.23,1,.32,1) backwards slideInLeftSlow;transform:translate(0)}@keyframes widget-pop-in{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.pager-widget-root .widget-pop-in{opacity:1;animation:.5s cubic-bezier(.23,1,.32,1) backwards widget-pop-in;transform:translateY(0)}.pager-widget-root .chat-popup{opacity:0;pointer-events:none;transform-origin:100% 100%;z-index:2147483000;background:#fff;transition:opacity .15s,transform .3s cubic-bezier(0,1.2,1,1);overflow:hidden;transform:scale(.8);box-shadow:0 5px 40px #0f0f0f29}.pager-widget-root .chat-popup.active{opacity:1;pointer-events:all;transform:scale(1)}.pager-widget-root .maximize-height{height:calc(100vh - 124px)}.pager-widget-root .markdown-parent-container{flex-direction:column;gap:10px;font-size:14px;line-height:20px;display:flex}.pager-widget-root .markdown-parent-container strong{font-weight:700!important}.pager-widget-root .markdown-parent-container em{font-style:italic!important}.pager-widget-root .markdown-parent-container u{text-decoration:underline!important}.pager-widget-root .markdown-parent-container a{color:#353ced!important;text-decoration:underline!important}.pager-widget-root .markdown-parent-container a:hover{color:#262bca!important}.pager-widget-root .markdown-parent-container table{border-collapse:collapse;width:100%;min-width:100%;font-size:.875rem}.pager-widget .markdown-table-wrapper{border:1px solid #d1d5db;border-radius:.5rem;width:100%;height:auto;max-height:300px;overflow:auto}.pager-widget-root .markdown-parent-container .markdown-table-wrapper table thead{z-index:10;background-color:#f3f4f6;position:sticky;top:0}.pager-widget-root .markdown-parent-container .markdown-table-wrapper table th{text-align:left;white-space:nowrap;border-bottom:1px solid #d1d5db;padding:.5rem 1rem;font-size:.875rem}.pager-widget-root .markdown-parent-container .markdown-table-wrapper table tbody tr{background-color:#fff}.pager-widget-root .markdown-parent-container .markdown-table-wrapper table td{white-space:nowrap;border-bottom:1px solid #e5e7eb;padding:.5rem 1rem;font-size:.875rem}.pager-widget-root .bottom-gradient-recent-list{pointer-events:none;text-align:center;z-index:40;background:linear-gradient(#fff0,#fff);border-radius:0 0 6px 6px;justify-content:center;align-items:center;height:90px;display:flex;position:absolute;bottom:58px;left:0;right:0}.pager-widget-root .bg-widget-home-light-top{background:linear-gradient(#0000,#0006,#000c)}.pager-widget-root .bg-widget-home-dark-top{background:linear-gradient(#000c,#0006,#0000)}.pager-widget-root .font-medium{font-weight:500!important}.pager-widget-root .font-regular{font-weight:400!important}.pager-widget-root .font-semiBold{font-weight:600!important}.pager-widget-root .font-bold{font-weight:700!important}.pager-widget-root .no-animation{animation:none!important}.pager-widget .contact-tooltip{cursor:pointer;opacity:0;pointer-events:none;border-radius:8px;width:max-content;transition:all .4s}.pager-widget .contact-tooltip:hover.visible{animation-play-state:paused}.pager-widget .contact-tooltip.visible{opacity:1;pointer-events:all;animation:.4s forwards tooltipPop,.3s .9s both gentleShake,10s linear 1.2s infinite repeatShake}@keyframes repeatShake{0%,to{transform:translateY(-15%)translate(0)}25%{transform:translateY(-20%)translate(-4px)}50%{transform:translateY(-15%)translate(0)}75%{transform:translateY(-20%)translate(4px)}}@keyframes tooltipPop{0%{opacity:0;transform:translateY(-10%)translate(10px)scale(.9)}to{opacity:1;transform:translateY(-20%)translate(0)scale(1)}}@keyframes gentleShake{0%,to{transform:translateY(-15%)translate(0)}25%{transform:translateY(-20%)translate(-4px)}50%{transform:translateY(-15%)translate(0)}75%{transform:translateY(-20%)translate(4px)}}@media (width<=600px){.pager-widget .contact-tooltip{bottom:60%;right:60px}}.pager-widget .floating-chip-hover{filter:drop-shadow(0 8px 18px #00000014);box-shadow:0 3px 7px #00000040}.pager-widget .animated-gradient-bg-thought{background:repeating-linear-gradient(90deg,#43b5ef33,#7173f433 25%,#fc69b733 50%,#fcc76933 75%,#43b5ef33) 0 0/800% 100%;animation:2s linear infinite gradientWave}@keyframes gradientWave{0%{background-position-x:0}to{background-position-x:100%}}.pager-widget .selva-qwer{box-shadow:0 3px 7px #00000040}.pager-widget .custom-tooltip{opacity:0;pointer-events:none;will-change:opacity,transform;transition:opacity .2s cubic-bezier(.22,1,.36,1),transform .2s cubic-bezier(.22,1,.36,1);transform:translateY(6px)scale(.9)}.pager-widget .custom-tooltip.custom-tooltip--visible{opacity:1;transform:translateY(0)scale(1)}.pager-widget .custom-tooltip .rotate-45{pointer-events:none}@media (prefers-reduced-motion:reduce){.pager-widget .custom-tooltip{transition:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}';function tS(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}let[tE,tT,tL,tI,tO,tA,tD]=function({updateComputed:e,notifyEffect:t}){let n=[],r=0,i=0;return[function(e,t){let n=t._depsTail;if(n?.dep===e)return;let r=void 0!==n?n.nextDep:t._deps;if(r?.dep===e){t._depsTail=r;return}let i=e._subsTail;if(!(i?.sub===t&&l(i,t))){var a=e,o=t,s=r,c=n;let i={dep:a,sub:o,nextDep:s,prevSub:void 0,nextSub:void 0};if(void 0===c?o._deps=i:c.nextDep=i,void 0===a._subs)a._subs=i;else{let e=a._subsTail;i.prevSub=e,e.nextSub=i}return o._depsTail=i,a._subsTail=i,i}},function(e){let t,r=e.nextSub,a=0,o=32;t:for(;;){let s=e.sub,c=s._flags,d=!1;if(244&c?16&c&&!(4&c)?(s._flags=-17&c|o|8,d=!0):!(224&c)&&l(e,s)&&(s._flags=16|c|o|8,d=void 0!==s._subs):(s._flags=c|o|8,d=!0),d){let l=s._subs;if(void 0!==l){e=l,void 0!==l.nextSub?(t={target:r,linked:t},++a,r=e.nextSub,o=64):o=2&c?128:64;continue}2&c&&(n[i++]=s)}else c&(4|o)?!(c&o)&&224&c&&l(e,s)&&(s._flags=c|o):(s._flags=c|o|8,(10&c)==2&&(n[i++]=s));if(void 0!==(e=r)){r=e.nextSub,o=a?64:32;continue}for(;a--;)if(e=t.target,t=t.linked,void 0!==e){r=e.nextSub,o=a?64:32;continue t}break}},function(e,t){return a(e._deps)?(e._flags=32|t,!0):(e._flags=-65&t,!1)},function(e){e._depsTail=void 0,e._flags=-249&e._flags|4},function(e){let t=e._depsTail;if(void 0!==t){let e=t.nextDep;void 0!==e&&(s(e),t.nextDep=void 0)}else void 0!==e._deps&&(s(e._deps),e._deps=void 0);e._flags&=-5},function(){for(;r<i;){let e=n[r];n[r++]=void 0,t(e)||(e._flags&=-9)}r=0,i=0},function(t,n){if(32&n||a(t._deps)){if(e(t)){let e=t._subs;void 0!==e&&o(e)}}else t._flags=-65&n},function(e,n){if(128&n){e._flags=-129&n;let r=e._deps;do{let e=r.dep;"_flags"in e&&2&e._flags&&224&e._flags&&t(e),r=r.nextDep}while(void 0!==r)}}];function a(t){let n,r,i=0;t:for(;;){r=!1;let a=t.dep;if(32&t.sub._flags)r=!0;else if("_flags"in a){let l=a._flags;if((33&l)==33){if(e(a)){let e=a._subs;void 0!==e.nextSub&&o(e),r=!0}}else if((65&l)==65){(void 0!==t.nextSub||void 0!==t.prevSub)&&(n={target:t,linked:n}),t=a._deps,++i;continue}}if(!r&&void 0!==t.nextDep){t=t.nextDep;continue}for(;i;){--i;let a=t.sub,l=a._subs;if(r){if(e(a)){void 0!==l.nextSub?(t=n.target,n=n.linked,o(l)):t=l;continue}}else a._flags&=-65;if(void 0!==l.nextSub?(t=n.target,n=n.linked):t=l,void 0!==t.nextDep){t=t.nextDep;continue t}r=!1}return r}}function o(e){do{let t=e.sub,r=t._flags;(96&r)==64&&(t._flags=32|r|8,(10&r)==2&&(n[i++]=t)),e=e.nextSub}while(void 0!==e)}function l(e,t){let n=t._depsTail;if(void 0!==n){let r=t._deps;do{if(r===e)return!0;if(r===n)break;r=r.nextDep}while(void 0!==r)}return!1}function s(e){do{let t=e.dep,n=e.nextDep,r=e.nextSub,i=e.prevSub;if(void 0!==r?r.prevSub=i:t._subsTail=i,void 0!==i?i.nextSub=r:t._subs=r,void 0===t._subs&&"_deps"in t){let r=t._flags;32&r||(t._flags=32|r);let i=t._deps;if(void 0!==i){e=i,t._depsTail.nextDep=n,t._deps=void 0,t._depsTail=void 0;continue}}e=n}while(void 0!==e)}}({updateComputed:e=>e._update(),notifyEffect:e=>(e.notify(),!0)});function tM(e,t){let n="function"==typeof e,i={_snapshot:n?void 0:e,_subs:void 0,_subsTail:void 0,get:()=>(void 0!==r&&tE(i,r),i._snapshot),subscribe(e){let t=tS(e),n={current:!1},a=function(e){let t=()=>{let t=r;r=n,tI(n);try{return e()}finally{r=t,tO(n)}},n={_deps:void 0,_depsTail:void 0,_flags:2,notify(){let e=this._flags;(32&e||64&e&&tL(this,e))&&t()},stop(){tI(this),tO(this)}};return t(),n}(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{a.stop()}}}};return n?Object.assign(i,{_deps:void 0,_depsTail:void 0,_flags:33,get(){let e=this._flags;return 96&e&&tD(i,e),void 0!==r&&tE(i,r),i._snapshot},_update(){let n=r,a=t?.compare??Object.is;r=i,tI(i);try{let t=i._snapshot,n=e(e=>e.get());if(void 0===t||!a(t,n))return i._snapshot=n,!0;return!1}finally{r=n,tO(i)}}}):Object.assign(i,{set(e){let n=t?.compare??Object.is,r="function"==typeof e?e(i._snapshot):e;if(n(i._snapshot,r))return;i._snapshot=r;let{_subs:a}=i;void 0!==a&&(tT(a),tA())}}),i}let tF="function"==typeof Symbol&&Symbol.observable||"@@observable",tR=new WeakMap,tP=function(...[{context:e,on:t,emits:n}]){return function(e,t,n,r){var i,a;let o,l={context:e,status:"active",output:void 0,error:void 0},s=l,c=tM(s),d=e=>{if(!o)return;let t=e.type,n=o.get(t);n&&n.forEach(t=>t(e))},u=(i=t,a=void 0,(e,t)=>{let n=e.context,r=i?.[t.type],o=[],l={emit:new Proxy({},{get:(e,t)=>e=>{o.push({...e,type:t})}}),effect:e=>{o.push(e)}};if(!r)return[e,o];if("function"==typeof r){let e;n=a?a(n,e=>r(e,t,l)):(e=n,Object.assign({},n,r?.(e,t,l)))}else{let e={};for(let i of Object.keys(r)){let a=r[i];e[i]="function"==typeof a?a(n,t,l):a}n=Object.assign({},n,e)}return[{...e,context:n},o]}),p={get _snapshot(){return c._snapshot},on(e,t){o||(o=new Map);let n=o.get(e);n||(n=new Set,o.set(e,n));let r=t.bind(void 0);return n.add(r),{unsubscribe(){n.delete(r)}}},transition:u,sessionId:Math.random().toString(36).slice(6),send(e){let t;tR.get(p)?.forEach(t=>{t.next?.({type:"@xstate.event",event:e,sourceRef:void 0,actorRef:p,rootId:p.sessionId})});for(let r of([s,t]=u(s,e),tR.get(p)?.forEach(t=>{t.next?.({type:"@xstate.snapshot",event:e,snapshot:s,actorRef:p,rootId:p.sessionId})}),c.set(s),t))"function"==typeof r?r():(n?.[r.type]?.(r),d(r))},getSnapshot:()=>s,get:()=>c.get(),getInitialSnapshot:()=>l,subscribe:c.subscribe.bind(c),[tF](){return this},inspect:e=>{let t=tS(e);return tR.set(p,tR.get(p)??new Set),tR.get(p).add(t),t.next?.({type:"@xstate.actor",actorRef:p,rootId:p.sessionId}),t.next?.({type:"@xstate.snapshot",snapshot:l,event:{type:"@xstate.init"},actorRef:p,rootId:p.sessionId}),{unsubscribe:()=>tR.get(p)?.delete(t)}},trigger:new Proxy({},{get:(e,t)=>e=>{p.send({type:t,...e})}}),select:(e,t=Object.is)=>tM(()=>e(p.get().context),{compare:t})};return p}(e,t,n)};function tz(e,t){return e===t}function tj(e,t,n=tz){let r=function(e,t){let n=em(void 0);return r=>{let i=e(r);return n.current&&t(n.current,i)?n.current:n.current=i}}(t,n);return eA(eb(t=>e.subscribe(t).unsubscribe,[e]),()=>r(e.get()),()=>r(e.get()))}let tU=function(e){let t=em(void 0);return t.current||(t.current=tP(e)),t.current},tB=({widget_id:e,user_state:t,events:n})=>{let r=localStorage.getItem("CURRENT_CONVERSATION")??null;console.log("conversation id from current",r),tV({widget_id:e,conversation_id:r,user_state:t,events:n})},tV=({widget_id:e,conversation_id:t,user_state:n,events:r})=>{console.log("DEBUGG :: append event called",r);let i=localStorage.getItem(`CONVERSATION::${e}`),a=Array.isArray(r)?r:[r];if(!i)return void localStorage.setItem(`CONVERSATION::${e}`,JSON.stringify({widget_id:e,conversation_id:t,user_state:n,events:a}));try{let r=JSON.parse(i),o=[...r.conversation_id===t?r.events:[],...a],l=[...new Map(o.map(e=>["received"===e.type&&"message"in e?e.message?.event_id:JSON.stringify(e),e])).values()];localStorage.setItem(`CONVERSATION::${e}`,JSON.stringify({widget_id:e,conversation_id:t,user_state:n,events:l}))}catch(e){console.error("Failed to append event to widget state:",e)}},tW=tP({context:{widget:{status:"NOT_STARTED"}},on:{exitConversation:e=>{if("ALLOW_MESSAGE"===e.widget.status)return tB({widget_id:e.widget.data.id,user_state:"SESSION_EXITED",events:[{type:"SESSION_EXITED"}]}),{widget:{status:"SESSION_EXITED",config:e.widget.config,data:e.widget.data}}},processMessage:e=>{if(("FORM_SUBMITTED"===e.widget.status||"NO_CONSENT_NEEDED"===e.widget.status||"FORM_INPUT_NEEDED"===e.widget.status)&&("new_user"!==e.widget.data.source_id||!e.widget.data.source_id.includes("browser")))return tB({widget_id:e.widget.data.id,user_state:"ALLOW_MESSAGE",events:[{type:"ALLOW_MESSAGE"}]}),{widget:{status:"ALLOW_MESSAGE",config:e.widget.config,data:e.widget.data,form_data:"FORM_SUBMITTED"===e.widget.status?e.widget.form_data:null}}},formSubmitted:(e,t)=>{if(console.log(e,"form submitted context"),"FORM_INPUT_NEEDED"===e.widget.status)return{widget:{status:"FORM_SUBMITTED",config:e.widget.config,data:{...e.widget.data,source_id:t.source_id},form_data:e.widget.form_data}}},processFormSubmission:(e,t,n)=>{if("FORM_INPUT_NEEDED"===e.widget.status){let r=e.widget.config.endpoint,i=e.widget.config.widget_id,a=e.widget.data.workspace,o=e.widget.config,l=e.widget.form_data;n.effect(async()=>{try{let n=await tJ(r,i,a,t.submissionPayload);console.log("CONTEXT",e),tB({widget_id:o.widget_id,user_state:"FORM_SUBMITTED",events:{type:"FORM_SUBMITTED",submissionPayload:t.submissionPayload,form_data:l}}),tW.trigger.formSubmitted({source_id:n.source_id,submissionPayload:t.submissionPayload})}catch(e){console.error("Form submission failed:",e)}})}},loaded:(e,t)=>({widget:{status:"WIDGET_LOADED",config:t.config,data:t.data,form_data:t.form_data}}),setConfig:(e,t,n)=>{if(n.effect(()=>{tW.trigger.setFetchConfig({widget_id:t.config.widget_id,endpoint:t.config.endpoint})}),"NOT_STARTED"===e.widget.status)return{widget:{status:"WIDGET_LOADING",config:t.config}}},shouldShowForm:(e,t)=>{if("CONSENT_GIVEN"===e.widget.status){if(e.widget.data.source_id.includes("browser")&&null==e.widget.data.lead_form_id)return{widget:{status:"ALLOW_MESSAGE",config:e.widget.config,data:e.widget.data,form_data:e.widget.form_data}};if(e.widget.data.source_id.includes("browser")&&e.widget.form_data)return console.log("check here.."),tB({widget_id:e.widget.data.id,user_state:"FORM_INPUT_NEEDED",events:{type:"FORM_INPUT_NEEDED",form_data:e.widget.form_data}}),{widget:{status:"FORM_INPUT_NEEDED",config:e.widget.config,browser_data:t.browser_data,data:e.widget.data,form_data:e.widget.form_data}}}if("WIDGET_LOADED"===e.widget.status){if(e.widget.data.source_id.includes("browser")&&null===e.widget.data.lead_form_id)return{widget:{status:"ALLOW_MESSAGE",data:e.widget.data,config:e.widget.config,form_data:e.widget.form_data}};if(e.widget.data.source_id.includes("browser")&&e.widget.form_data)return tB({widget_id:e.widget.data.id,user_state:"FORM_INPUT_NEEDED",events:{type:"FORM_INPUT_NEEDED",form_data:e.widget.form_data}}),{widget:{status:"FORM_INPUT_NEEDED",config:e.widget.config,data:e.widget.data,form_data:e.widget.form_data}}}},consentGiven:(e,t)=>{if("CONSENT_NEEDED"===e.widget.status)return tB({widget_id:e.widget?.data?.id,user_state:"CONSENT_GIVEN",events:{type:"CONSENT_GIVEN",submissionPayload:t.submissionPayload}}),{widget:{status:"CONSENT_GIVEN",data:{...e.widget.data,source_id:t.source_id},config:e.widget.config,browser_data:t.submissionPayload,form_data:e.widget.form_data}}},processConsent:(e,t,n)=>{if("CONSENT_NEEDED"===e.widget.status){let r=e.widget.config.endpoint,i=e.widget.data.id,a=e.widget.data.workspace;if("DENIED"===t.consentState)return{widget:{status:"CONSENT_DENIED",config:e.widget.config,data:e.widget.data}};"GIVEN"===t.consentState&&n.effect(async()=>{try{let e=await tJ(r,i,a,t?.submissionPayload);tW.trigger.consentGiven({source_id:e.source_id,submissionPayload:t?.submissionPayload,current_conversation_id:"event?.current_conversation_id"})}catch(e){console.error("consent submission failed:",e)}})}},setWidgetError:(e,t)=>{if("WIDGET_LOADING"===e.widget.status)return{widget:{status:"INVALID_STATE",config:e.widget.config,error:t.error}}},setFormData:(e,t)=>(console.log(t.form_data,"form data111"),"FORM_INPUT_NEEDED"===e.widget.status)?(tB({widget_id:e.widget.data.id,user_state:"FORM_INPUT_NEEDED",events:{type:"FORM_INPUT_NEEDED",form_data:t.form_data}}),{widget:{status:"FORM_INPUT_NEEDED",config:e.widget.config,form_data:t.form_data,data:e.widget.data}}):"CONSENT_NEEDED"===e.widget.status?{widget:{status:"CONSENT_NEEDED",config:e.widget.config,form_data:t.form_data,data:e.widget.data,consent:{consent_display_data:t.consent_data}}}:void 0,setWidgetData:(e,t,n)=>{if("WIDGET_LOADING"===e.widget.status){let r=t.data;if(!0===r.user_consent&&r?.source_id==="new_user"){let i=e.widget.config.endpoint,a=r.id,o=r.workspace;return n.effect(async()=>{let e=await tG(i,o,a);tW.trigger.setFormData({form_data:e,consent_data:r.consent_data})}),console.log("check consent needed"),{widget:{status:"CONSENT_NEEDED",config:e.widget.config,data:t.data,consent:r?.consent_data}}}if(r?.user_consent===!1&&r?.lead_form_id!==null){let i=e.widget.config.endpoint,a=r.id,o=r.workspace;return n.effect(async()=>{let e=await tG(i,o,a);tW.trigger.setFormData({form_data:e,consent_data:r.consent_data})}),{widget:{status:"FORM_INPUT_NEEDED",config:e.widget.config,data:t.data}}}if(r?.user_consent===!1)return{widget:{status:"NO_CONSENT_NEEDED",config:e.widget.config,data:t.data}};else if(r?.user_consent===!0&&r.source_id.includes("browser")){let i=e.widget.config,a=e.widget.config.endpoint,o=r.id,l=r.workspace;n.effect(async()=>{let e=await tG(a,l,o);tW.trigger.loaded({config:i,data:t.data,form_data:e})})}else if(r?.source_id!=="new_user"||!r?.source_id.includes("browser"))return{widget:{status:"FORM_SUBMITTED",config:e.widget.config,data:r,form_data:t.form_data}}}},setFetchConfig:(e,t,n)=>{let r=t.widget_id,i=t.endpoint;n.effect(async()=>{let e=await tY(i,r);if("error"===e.status)return void tW.trigger.setWidgetError({error:e.error});let t=await tG(i,e.data.workspace,e.data.id);tW.trigger.setWidgetData({data:e.data,form_data:t})})}}}),tH=()=>tj(tW,e=>e.context.widget),t$=(e,t=!1)=>{console.log(e,"use initializer",e),console.log(e,"use initializer",e),tW.trigger.setConfig({config:e}),t&&tW.inspect(e=>{console.log("INSPECTION:: ",e)})},tq={ok:e=>({status:"success",data:e}),err:e=>({status:"error",error:e})},tY=async(e,t)=>{try{let n=await fetch(`${e}/public/${t}`,{credentials:"include"});if(n.ok){let e=await n.json();return tq.ok(e)}if(404===n.status)return tq.err("Given widget does not exist");return tq.err("Somethig went wrong")}catch(e){return console.error("Fetch error:",e),tq.err("Fetch error")}},tG=async(e,t,n)=>{try{let r=await fetch(`${e}/public/${t}/${n}/form`);if(r.ok)return(await r.json()).form_data;return tq.err("Something went wrong")}catch(e){return console.error("Fetch error:",e),tq.err("Fetch error")}};async function tJ(e,t,n,r){console.log("post widget",e,n,t);let i=`${e}/${n}/${t}/lead`,a=await fetch(i,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!a.ok){let e=await a.text();throw Error(`POST failed: ${a.status} - ${e}`)}let o=await a.json();if(!o||"string"!=typeof o.source_id)throw Error("Invalid response format: source_id missing");return o}var tZ=function(e){return e.HOME="home",e.CHAT="chat",e.RECENT_MESSAGE="recentMessage",e.RECENT_MESSAGE_LIST="recentMessageList",e.RECENT_MESSAGE_DETAIL="recentMessageDetail",e.NEW_RECENT_MESSAGE="newRecentMessage",e}({}),tK=function(e){return e.DEFAULT="default",e.EXPANDED="expanded",e.FULLSCREEN="fullscreen",e}({});let tX={current_conversation_id:null,selected_conversation_id:"",switchTab:"home",isExpanded:"default",user_details:{SYS_FirstName:"",SYS_LastName:"",SYS_Location:"",SYS_Timezone:"",SYS_UserEmail:"",widget_chat_url:""},isChatExit:!1},tQ=localStorage.getItem("widgetContext"),t1=tP({context:tQ?{...tX,...JSON.parse(tQ)}:tX,on:{setCurrentConversation:(e,t)=>{e.current_conversation_id=t.conversation_id},selectConversation:(e,t)=>{e.selected_conversation_id=t.conversation_id,t0()},selectTab:(e,t)=>{e.switchTab=t.tab,t0()},expandWidget:(e,t)=>{e.isExpanded=t.expanded_size,t0()},updateUserDetails:(e,t)=>{e.user_details={...e.user_details,...t.user_details},t0()},handleExitChatState:(e,t)=>{console.log("exit chat called in store"),e.isChatExit=t.value}}}),t0=()=>{let e=t1.getSnapshot().context;localStorage.setItem("widgetContext",JSON.stringify(e))},t2=(e=!1)=>{eg(()=>{e&&t1.inspect(e=>{console.log("CONVERSATION INSPECTION::",e)})},[])},t5=()=>tj(t1,e=>e.context.selected_conversation_id),t3=()=>tj(t1,e=>e.context.switchTab),t4=()=>tj(t1,e=>e.context.isExpanded),t6=()=>tj(t1,e=>e.context.user_details),t9=()=>tj(t1,e=>e.context.isChatExit),t8=e=>{if(console.log(e,"tatatat"),!e)return console.warn("No date string provided to formatTimeAMPM"),"";let t=new Date(e);if(isNaN(t.getTime()))return console.warn(`Invalid date string: ${e}`),"";let n=t.getHours(),r=t.getMinutes(),i=n>=12?"pm":"am";n=n%12||12;let a=r<10?"0"+r:r.toString(),o=`${n}:${a} ${i}`,l=t.getDate(),s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],c=t.getFullYear(),d=`${l} ${s} ${c}`;return`${o} | ${d}`},t7=e=>{let t=!1,n=null,r=localStorage.getItem(`CONVERSATION::${e}`);if(r)try{let e=JSON.parse(r);e&&"object"==typeof e&&(console.log(e,"recent message here"),t=e.events.length>1,n=e,console.log(n,"recent conversation from hook"))}catch(e){console.error("Failed to parse recent chat from localStorage",e)}return{hasRecentConversation:t,recentConversation:n}},ne=()=>{let e=null,t=null,n=tH();if(!n?.data?.id)return console.warn("Widget data not available yet"),{selectedIndex:t,recentConversation:e};let r=localStorage.getItem(`CONVERSATION_LIST::${n.data.id}`),i=localStorage.getItem("SELECTED_INDEX");if(r&&null!==i)try{let n=JSON.parse(r),a=parseInt(i,10);!isNaN(a)&&n[a]&&(t=a,e=n[a],console.log("Selected conversation:",e))}catch(e){console.error("Failed to parse CONVERSATION_LIST from localStorage:",e)}return{selectedIndex:t,recentConversation:e}},nt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nr={};function ni(e,t){return((t||nr).jsx?nn:nt).test(e)}let na=/[ \t\n\f\r]/g;function no(e){return""===e.replace(na,"")}class nl{constructor(e,t){this.attribute=t,this.property=e}}nl.prototype.attribute="",nl.prototype.booleanish=!1,nl.prototype.boolean=!1,nl.prototype.commaOrSpaceSeparated=!1,nl.prototype.commaSeparated=!1,nl.prototype.defined=!1,nl.prototype.mustUseProperty=!1,nl.prototype.number=!1,nl.prototype.overloadedBoolean=!1,nl.prototype.property="",nl.prototype.spaceSeparated=!1,nl.prototype.space=void 0;var ns={};a(ns,"boolean",()=>nd),a(ns,"booleanish",()=>nu),a(ns,"overloadedBoolean",()=>np),a(ns,"number",()=>nf),a(ns,"spaceSeparated",()=>ng),a(ns,"commaSeparated",()=>nh),a(ns,"commaOrSpaceSeparated",()=>nm);let nc=0,nd=nw(),nu=nw(),np=nw(),nf=nw(),ng=nw(),nh=nw(),nm=nw();function nw(){return 2**++nc}let nx=Object.keys(ns);class nb extends nl{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<nx.length;){let e=nx[i];!function(e,t,n){n&&(e[t]=n)}(this,nx[i],(n&ns[e])===ns[e])}}}function nv(e){return e.toLowerCase()}nb.prototype.defined=!0;let ny=/[A-Z]/g,n_=/-[a-z]/g,nC=/^data[-\w.:]+$/i;function nk(e){return"-"+e.toLowerCase()}function nN(e){return e.charAt(1).toUpperCase()}let nS={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};class nE{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function nT(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new nE(n,r,t)}function nL(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new nb(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[nv(r)]=r,n[nv(a.attribute)]=r}return new nE(t,n,e.space)}nE.prototype.normal={},nE.prototype.property={},nE.prototype.space=void 0;let nI=nL({properties:{ariaActiveDescendant:null,ariaAtomic:nu,ariaAutoComplete:null,ariaBusy:nu,ariaChecked:nu,ariaColCount:nf,ariaColIndex:nf,ariaColSpan:nf,ariaControls:ng,ariaCurrent:null,ariaDescribedBy:ng,ariaDetails:null,ariaDisabled:nu,ariaDropEffect:ng,ariaErrorMessage:null,ariaExpanded:nu,ariaFlowTo:ng,ariaGrabbed:nu,ariaHasPopup:null,ariaHidden:nu,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ng,ariaLevel:nf,ariaLive:null,ariaModal:nu,ariaMultiLine:nu,ariaMultiSelectable:nu,ariaOrientation:null,ariaOwns:ng,ariaPlaceholder:null,ariaPosInSet:nf,ariaPressed:nu,ariaReadOnly:nu,ariaRelevant:null,ariaRequired:nu,ariaRoleDescription:ng,ariaRowCount:nf,ariaRowIndex:nf,ariaRowSpan:nf,ariaSelected:nu,ariaSetSize:nf,ariaSort:null,ariaValueMax:nf,ariaValueMin:nf,ariaValueNow:nf,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function nO(e,t){return t in e?e[t]:t}function nA(e,t){return nO(e,t.toLowerCase())}"use strict";"use strict";let nD=nL({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:nh,acceptCharset:ng,accessKey:ng,action:null,allow:null,allowFullScreen:nd,allowPaymentRequest:nd,allowUserMedia:nd,alt:null,as:null,async:nd,autoCapitalize:null,autoComplete:ng,autoFocus:nd,autoPlay:nd,blocking:ng,capture:null,charSet:null,checked:nd,cite:null,className:ng,cols:nf,colSpan:null,content:null,contentEditable:nu,controls:nd,controlsList:ng,coords:nf|nh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:nd,defer:nd,dir:null,dirName:null,disabled:nd,download:np,draggable:nu,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:nd,formTarget:null,headers:ng,height:nf,hidden:np,high:nf,href:null,hrefLang:null,htmlFor:ng,httpEquiv:ng,id:null,imageSizes:null,imageSrcSet:null,inert:nd,inputMode:null,integrity:null,is:null,isMap:nd,itemId:null,itemProp:ng,itemRef:ng,itemScope:nd,itemType:ng,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:nd,low:nf,manifest:null,max:null,maxLength:nf,media:null,method:null,min:null,minLength:nf,multiple:nd,muted:nd,name:null,nonce:null,noModule:nd,noValidate:nd,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:nd,optimum:nf,pattern:null,ping:ng,placeholder:null,playsInline:nd,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:nd,referrerPolicy:null,rel:ng,required:nd,reversed:nd,rows:nf,rowSpan:nf,sandbox:ng,scope:null,scoped:nd,seamless:nd,selected:nd,shadowRootClonable:nd,shadowRootDelegatesFocus:nd,shadowRootMode:null,shape:null,size:nf,sizes:null,slot:null,span:nf,spellCheck:nu,src:null,srcDoc:null,srcLang:null,srcSet:null,start:nf,step:null,style:null,tabIndex:nf,target:null,title:null,translate:null,type:null,typeMustMatch:nd,useMap:null,value:nu,width:nf,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ng,axis:null,background:null,bgColor:null,border:nf,borderColor:null,bottomMargin:nf,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:nd,declare:nd,event:null,face:null,frame:null,frameBorder:null,hSpace:nf,leftMargin:nf,link:null,longDesc:null,lowSrc:null,marginHeight:nf,marginWidth:nf,noResize:nd,noHref:nd,noShade:nd,noWrap:nd,object:null,profile:null,prompt:null,rev:null,rightMargin:nf,rules:null,scheme:null,scrolling:nu,standby:null,summary:null,text:null,topMargin:nf,valueType:null,version:null,vAlign:null,vLink:null,vSpace:nf,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:nd,disableRemotePlayback:nd,prefix:null,property:null,results:nf,security:null,unselectable:null},space:"html",transform:nA}),nM=nL({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:nm,accentHeight:nf,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:nf,amplitude:nf,arabicForm:null,ascent:nf,attributeName:null,attributeType:null,azimuth:nf,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:nf,by:null,calcMode:null,capHeight:nf,className:ng,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:nf,diffuseConstant:nf,direction:null,display:null,dur:null,divisor:nf,dominantBaseline:null,download:nd,dx:null,dy:null,edgeMode:null,editable:null,elevation:nf,enableBackground:null,end:null,event:null,exponent:nf,externalResourcesRequired:null,fill:null,fillOpacity:nf,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:nh,g2:nh,glyphName:nh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:nf,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:nf,horizOriginX:nf,horizOriginY:nf,id:null,ideographic:nf,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:nf,k:nf,k1:nf,k2:nf,k3:nf,k4:nf,kernelMatrix:nm,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:nf,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:nf,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:nf,overlineThickness:nf,paintOrder:null,panose1:null,path:null,pathLength:nf,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ng,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:nf,pointsAtY:nf,pointsAtZ:nf,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nm,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nm,rev:nm,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nm,requiredFeatures:nm,requiredFonts:nm,requiredFormats:nm,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:nf,specularExponent:nf,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:nf,strikethroughThickness:nf,string:null,stroke:null,strokeDashArray:nm,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:nf,strokeOpacity:nf,strokeWidth:null,style:null,surfaceScale:nf,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nm,tabIndex:nf,tableValues:null,target:null,targetX:nf,targetY:nf,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nm,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:nf,underlineThickness:nf,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:nf,values:null,vAlphabetic:nf,vMathematical:nf,vectorEffect:null,vHanging:nf,vIdeographic:nf,version:null,vertAdvY:nf,vertOriginX:nf,vertOriginY:nf,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:nf,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nO}),nF=nL({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),nR=nL({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nA}),nP=nL({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),nz=nT([nI,nD,nF,nR,nP],"html"),nj=nT([nI,nM,nF,nR,nP],"svg");var nU={},nB=(nU&&nU.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(d("kQ1rl")),nV={};Object.defineProperty(nV,"__esModule",{value:!0}),nV.camelCase=void 0;var nW=/^--[a-zA-Z0-9_-]+$/,nH=/-([a-z])/g,n$=/^[^-]+$/,nq=/^-(webkit|moz|ms|o|khtml)-/,nY=/^-(ms)-/,nG=function(e,t){return t.toUpperCase()},nJ=function(e,t){return"".concat(t,"-")};function nZ(e,t){var n={};return e&&"string"==typeof e&&(0,nB.default)(e,function(e,r){e&&r&&(n[(0,nV.camelCase)(e,t)]=r)}),n}nV.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||n$.test(n)||nW.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(nY,nJ):e.replace(nq,nJ)).replace(nH,nG))},nZ.default=nZ,nU=nZ;let nK=nQ("end"),nX=nQ("start");function nQ(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function n1(e){return e&&"object"==typeof e?"position"in e||"type"in e?n2(e.position):"start"in e||"end"in e?n2(e):"line"in e||"column"in e?n0(e):"":""}function n0(e){return n5(e&&e.line)+":"+n5(e&&e.column)}function n2(e){return n0(e&&e.start)+"-"+n0(e&&e.end)}function n5(e){return e&&"number"==typeof e?e:1}class n3 extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},a=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){let e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=o?o.line:void 0,this.name=n1(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}n3.prototype.file="",n3.prototype.name="",n3.prototype.reason="",n3.prototype.message="",n3.prototype.stack="",n3.prototype.column=void 0,n3.prototype.line=void 0,n3.prototype.ancestors=void 0,n3.prototype.cause=void 0,n3.prototype.fatal=void 0,n3.prototype.place=void 0,n3.prototype.ruleId=void 0,n3.prototype.source=void 0;let n4={}.hasOwnProperty,n6=new Map,n9=/[A-Z]/g,n8=new Set(["table","tbody","thead","tfoot","tr"]),n7=new Set(["td","th"]),re="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function rt(e,t,n){var r;return"element"===t.type?function(e,t,n){let r=e.schema,a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(e.schema=nj),e.ancestors.push(t);let o=ra(e,t.tagName,!1),l=function(e,t){let n,r,a={};for(r in t.properties)if("children"!==r&&n4.call(t.properties,r)){let o=function(e,t,n){let r=function(e,t){let n=nv(t),r=t,i=nl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&nC.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(n_,nN);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!n_.test(e)){let n=e.replace(ny,nk);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=nb}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){let n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return i(nU)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new n3("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=re+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)n4.call(e,t)&&(n[function(e){let t=e.replace(n9,rl);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?nS[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(o){let[r,i]=o;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof i&&n7.has(t.tagName)?n=i:a[r]=i}}return n&&((a.style||(a.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),a}(e,t),s=ri(e,t);return n8.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&no(e.value):no(e))})),rn(e,l,o,t),rr(l,s),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ro(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){let r=e.schema,i=r;"svg"===t.name&&"html"===r.space&&(e.schema=nj),e.ancestors.push(t);let a=null===t.name?e.Fragment:ra(e,t.name,!0),o=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ro(e,t.position);else{let i,a=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else ro(e,t.position);else i=null===r.value||r.value;n[a]=i}return n}(e,t),l=ri(e,t);return rn(e,o,a,t),rr(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ro(e,t.position)}(e,t):"root"===t.type?function(e,t,n){let r={};return rr(r,ri(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?(r=0,t.value):void 0}function rn(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function rr(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ri(e,t){let n=[],r=-1,i=e.passKeys?new Map:n6;for(;++r<t.children.length;){let a,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=i.get(e)||0;a=e+"-"+t,i.set(e,t+1)}}let l=rt(e,o,a);void 0!==l&&n.push(l)}return n}function ra(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=ni(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}r=e}else r=ni(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return n4.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ro(e)}function ro(e,t){let n=new n3("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=re+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rl(e){return"-"+e.toLowerCase()}let rs={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},rc={};function rd(e,t){let n=t||rc;return ru(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function ru(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rp(e.children,t,n)}return Array.isArray(e)?rp(e,t,n):""}function rp(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ru(e[i],t,n);return r.join("")}let rf=document.createElement("i");function rg(e){let t="&"+e+";";rf.innerHTML=t;let n=rf.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}function rh(e,t,n,r){let i,a=e.length,o=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function rm(e,t){return e.length>0?(rh(e,e.length,0,t),e):t}let rw={}.hasOwnProperty;function rx(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(rw.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];if(a)for(r in a){rw.call(i,r)||(i[r]=[]);let e=a[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);rh(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}function rb(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let rv={'"':"quot","&":"amp","<":"lt",">":"gt"};function ry(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let r_=rM(/[A-Za-z]/),rC=rM(/[\dA-Za-z]/),rk=rM(/[#-'*+\--9=?A-Z^-~]/);function rN(e){return null!==e&&(e<32||127===e)}let rS=rM(/\d/),rE=rM(/[\dA-Fa-f]/),rT=rM(/[!-/:-@[-`{-~]/);function rL(e){return null!==e&&e<-2}function rI(e){return null!==e&&(e<0||32===e)}function rO(e){return -2===e||-1===e||32===e}let rA=rM(/\p{P}|\p{S}/u),rD=rM(/\s/);function rM(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function rF(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o="";if(37===a&&rC(e.charCodeAt(n+1))&&rC(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function rR(e,t,n,r){let i=r?r-1:Number.POSITIVE_INFINITY,a=0;return function(r){return rO(r)?(e.enter(n),function r(o){return rO(o)&&a++<i?(e.consume(o),r):(e.exit(n),t(o))}(r)):t(r)}}let rP={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),rR(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return rL(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},rz={tokenize:function(e){let t,n,r,i=this,a=[],o=0;return l;function l(t){if(o<a.length){let n=a[o];return i.containerState=n[1],e.attempt(n[0].continuation,s,c)(t)}return c(t)}function s(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&w();let r=i.events.length,a=r;for(;a--;)if("exit"===i.events[a][0]&&"chunkFlow"===i.events[a][1].type){n=i.events[a][1].end;break}m(o);let l=r;for(;l<i.events.length;)i.events[l][1].end={...n},l++;return rh(i.events,a+1,0,i.events.slice(r)),i.events.length=l,c(e)}return l(e)}function c(n){if(o===a.length){if(!t)return p(n);if(t.currentConstruct&&t.currentConstruct.concrete)return g(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(rj,d,u)(n)}function d(e){return t&&w(),m(o),p(e)}function u(e){return i.parser.lazy[i.now().line]=o!==a.length,r=i.now().offset,g(e)}function p(t){return i.containerState={},e.attempt(rj,f,g)(t)}function f(e){return o++,a.push([i.currentConstruct,i.containerState]),p(e)}function g(r){if(null===r){t&&w(),m(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){h(e.exit("chunkFlow"),!0),m(0),e.consume(n);return}return rL(n)?(e.consume(n),h(e.exit("chunkFlow")),o=0,i.interrupt=void 0,l):(e.consume(n),t)}(r)}function h(e,a){let l=i.sliceStream(e);if(a&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),i.parser.lazy[e.start.line]){let e,n,a=t.events.length;for(;a--;)if(t.events[a][1].start.offset<r&&(!t.events[a][1].end||t.events[a][1].end.offset>r))return;let l=i.events.length,s=l;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(m(o),a=l;a<i.events.length;)i.events[a][1].end={...n},a++;rh(i.events,s+1,0,i.events.slice(l)),i.events.length=a}}function m(t){let n=a.length;for(;n-- >t;){let t=a[n];i.containerState=t[1],t[0].exit.call(i,e)}a.length=t}function w(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},rj={tokenize:function(e,t,n){return rR(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},rU={partial:!0,tokenize:function(e,t,n){return function(t){return rO(t)?rR(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||rL(e)?t(e):n(e)}}};class rB{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),Number.POSITIVE_INFINITY);return n&&rV(this.left,n),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),rV(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rV(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,Number.POSITIVE_INFINITY);rV(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);rV(this.left,t.reverse())}}}function rV(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function rW(e){let t,n,r,i,a,o,l,s={},c=-1,d=new rB(e);for(;++c<d.length;){for(;c in s;)c=s[c];if(t=d.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===d.get(c-1)[1].type&&((r=0)<(o=t[1]._tokenizer.events).length&&"lineEndingBlank"===o[r][1].type&&(r+=2),r<o.length&&"content"===o[r][1].type))for(;++r<o.length&&"content"!==o[r][1].type;)"chunkText"===o[r][1].type&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],a=e.get(t)[2],o=t-1,l=[],s=i._tokenizer;!s&&(s=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let c=s.events,d=[],u={},p=-1,f=i,g=0,h=0,m=[0];for(;f;){for(;e.get(++o)[1]!==f;);l.push(o),!f._tokenizer&&(n=a.sliceStream(f),f.next||n.push(null),r&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=f,f=f.next}for(f=i;++p<c.length;)"exit"===c[p][0]&&"enter"===c[p-1][0]&&c[p][1].type===c[p-1][1].type&&c[p][1].start.line!==c[p][1].end.line&&(h=p+1,m.push(h),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),p=m.length;p--;){let t=c.slice(m[p],m[p+1]),n=l.pop();d.push([n,n+t.length-1]),e.splice(n,2,t)}for(d.reverse(),p=-1;++p<d.length;)u[g+d[p][0]]=g+d[p][1],g+=d[p][1]-d[p][0]-1;return u}(d,c)),c=s[c],l=!0);else if(t[1]._container){for(r=c,n=void 0;r--;)if("lineEnding"===(i=d.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(d.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...d.get(n)[1].start},(a=d.slice(n,c)).unshift(t),d.splice(n,c-n+1,a))}}return rh(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!l}let rH={resolve:function(e){return rW(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):rL(t)?e.check(r$,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},r$={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),rR(e,i,"linePrefix")};function i(i){if(null===i||rL(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},rq={tokenize:function(e){let t=this,n=e.attempt(rU,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,rR(e,e.attempt(this.parser.constructs.flow,r,e.attempt(rH,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},rY={resolveAll:rK()},rG=rZ("string"),rJ=rZ("text");function rZ(e){return{resolveAll:rK("text"===e?rX:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return s(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),l)}function l(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),l)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function rK(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function rX(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],a=t.sliceStream(i),o=a.length,l=-1,s=0;for(;o--;){let e=a[o];if("string"==typeof e){for(l=e.length;32===e.charCodeAt(l-1);)s++,l--;if(l)break;l=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let a={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:i.start._bufferIndex+l,_index:i.start._index+o,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}var rQ={};function r1(e){return null===e||rI(e)||rD(e)?1:rA(e)?2:void 0}function r0(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}a(rQ,"document",()=>ik),a(rQ,"contentInitial",()=>iN),a(rQ,"flowInitial",()=>iS),a(rQ,"flow",()=>iE),a(rQ,"string",()=>iT),a(rQ,"text",()=>iL),a(rQ,"insideSpan",()=>iI),a(rQ,"attentionMarkers",()=>iO),a(rQ,"disable",()=>iA);let r2={name:"attention",resolveAll:function(e,t){let n,r,i,a,o,l,s,c,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close){for(n=d;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[d][1]).charCodeAt(0)){if((e[n][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;let u={...e[n][1].end},p={...e[d][1].start};r5(u,-l),r5(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[d][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[d][1].start}},r={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[d][1].start={...o.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=rm(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=rm(s,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),s=rm(s,r0(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),s=rm(s,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(c=2,s=rm(s,[["enter",e[d][1],t],["exit",e[d][1],t]])):c=0,rh(e,n-1,d-n+3,s),d=n+s.length-c-2;break}}for(d=-1;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,a=r1(i);return function(o){return n=o,e.enter("attentionSequence"),function o(l){if(l===n)return e.consume(l),o;let s=e.exit("attentionSequence"),c=r1(l),d=!c||2===c&&a||r.includes(l),u=!a||2===a&&c||r.includes(i);return s._open=!!(42===n?d:d&&(a||!u)),s._close=!!(42===n?u:u&&(c||!d)),t(l)}(o)}}};function r5(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let r3={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return rO(t)?rR(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(r3,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return rO(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},r4={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return rT(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},r6={name:"characterReference",tokenize:function(e,t,n){let r,i,a=this,o=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),l};function l(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=rC,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=rE,c):(e.enter("characterReferenceValue"),r=7,i=rS,c(t))}function c(l){if(59===l&&o){let r=e.exit("characterReferenceValue");return i!==rC||rg(a.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(l),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(l)}return i(l)&&o++<r?(e.consume(l),c):n(l)}}},r9={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},r8={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),rO(t)?rR(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a>=l?(e.exit("codeFencedFenceSequence"),rO(i)?rR(e,c,"whitespace")(i):c(i)):n(i)}(t)):n(t)}function c(r){return null===r||rL(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,l=0;return function(t){var a=t;let c=i.events[i.events.length-1];return o=c&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=a,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(l++,e.consume(i),t):l<3?n(i):(e.exit("codeFencedFenceSequence"),rO(i)?rR(e,s,"whitespace")(i):s(i))}(a)};function s(a){return null===a||rL(a)?(e.exit("codeFencedFence"),i.interrupt?t(a):e.check(r9,d,g)(a)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||rL(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):rO(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rR(e,c,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(a))}function c(t){return null===t||rL(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||rL(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function d(t){return e.attempt(a,g,u)(t)}function u(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),p}function p(t){return o>0&&rO(t)?rR(e,f,"linePrefix",o+1)(t):f(t)}function f(t){return null===t||rL(t)?e.check(r9,d,g)(t):(e.enter("codeFlowValue"),function t(n){return null===n||rL(n)?(e.exit("codeFlowValue"),f(n)):(e.consume(n),t)}(t))}function g(n){return e.exit("codeFenced"),t(n)}}},r7={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),rR(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?a(n):rL(n)?e.attempt(ie,t,a)(n):(e.enter("codeFlowValue"),function n(r){return null===r||rL(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function a(n){return e.exit("codeIndented"),t(n)}}},ie={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):rL(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):rR(e,a,"linePrefix",5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):rL(e)?i(e):n(e)}}};function it(e,t,n,r,i,a,o,l,s){let c=s||Number.POSITIVE_INFINITY,d=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),u):null===t||32===t||41===t||rN(t)?n(t):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),g(t))};function u(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(l),u(t)):null===t||60===t||rL(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function g(i){return!d&&(null===i||41===i||rI(i))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(i)):d<c&&40===i?(e.consume(i),d++,g):41===i?(e.consume(i),d--,g):null===i||32===i||40===i||rN(i)?n(i):(e.consume(i),92===i?h:g)}function h(t){return 40===t||41===t||92===t?(e.consume(t),g):g(t)}}function ir(e,t,n,r,i,a){let o,l=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),c};function c(u){return s>999||null===u||91===u||93===u&&!o||94===u&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(u):93===u?(e.exit(a),e.enter(i),e.consume(u),e.exit(i),e.exit(r),t):rL(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(u))}function d(t){return null===t||91===t||93===t||rL(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),o||(o=!rO(t)),92===t?u:d)}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,d):d(t)}}function ii(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,l):n(t)};function l(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),s(n))}function s(t){return t===o?(e.exit(a),l(o)):null===t?n(t):rL(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),rR(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===o||null===t||rL(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?d:c)}function d(t){return t===o||92===t?(e.consume(t),c):c(t)}}function ia(e,t){let n;return function r(i){return rL(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):rO(i)?rR(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}let io={partial:!0,tokenize:function(e,t,n){return function(t){return rI(t)?ia(e,r)(t):n(t)};function r(t){return ii(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return rO(t)?rR(e,a,"whitespace")(t):a(t)}function a(e){return null===e||rL(e)?t(e):n(e)}}},il=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],is=["pre","script","style","textarea"],ic={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(rU,t,n)}}},id={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return rL(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},iu={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&rh(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,a,o=e.length,l=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(i=o);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},d={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[i-2][1].start}};return a=rm(a=[["enter",s,t],["enter",c,t]],e.slice(r+1,r+l+3)),a=rm(a,[["enter",d,t]]),a=rm(a,r0(t.parser.constructs.insideSpan.null,e.slice(r+l+4,i-3),t)),a=rm(a,[["exit",d,t],e[i-2],e[i-1],["exit",c,t]]),a=rm(a,e.slice(i+1)),a=rm(a,[["exit",s,t]]),rh(e,r,e.length,a),e},tokenize:function(e,t,n){let r,i,a=this,o=a.events.length;for(;o--;)if(("labelImage"===a.events[o][1].type||"labelLink"===a.events[o][1].type)&&!a.events[o][1]._balanced){r=a.events[o][1];break}return function(t){return r?r._inactive?d(t):(i=a.parser.defined.includes(ry(a.sliceSerialize({start:r.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),l):n(t)};function l(t){return 40===t?e.attempt(ip,c,i?c:d)(t):91===t?e.attempt(ig,c,i?s:d)(t):i?c(t):d(t)}function s(t){return e.attempt(ih,c,d)(t)}function c(e){return t(e)}function d(e){return r._balanced=!0,n(e)}}},ip={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return rI(t)?ia(e,i)(t):i(t)}function i(t){return 41===t?c(t):it(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return rI(t)?ia(e,l)(t):c(t)}function o(e){return n(e)}function l(t){return 34===t||39===t||40===t?ii(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return rI(t)?ia(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},ig={tokenize:function(e,t,n){let r=this;return function(t){return ir.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(ry(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},ih={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},im={name:"labelStartImage",resolveAll:iu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},iw={name:"labelStartLink",resolveAll:iu.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},ix={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),rR(e,t,"linePrefix")}}},ib={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(a){var o;return e.enter("thematicBreak"),r=o=a,function a(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),rO(n)?rR(e,a,"whitespace")(n):a(n))}(o)):i>=3&&(null===o||rL(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},iv={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(rU,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rR(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!rO(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(i_,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,rR(e,e.attempt(iv,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:rS(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(ib,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return rS(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),l(i)):n(i)}(t)}return n(t)};function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(rU,r.interrupt?n:s,e.attempt(iy,d,c))}function s(e){return r.containerState.initialBlankLine=!0,a++,d(e)}function c(t){return rO(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},iy={partial:!0,tokenize:function(e,t,n){let r=this;return rR(e,function(e){let i=r.events[r.events.length-1];return!rO(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},i_={partial:!0,tokenize:function(e,t,n){let r=this;return rR(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},iC={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var o;let l,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){l="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||l)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),rO(n)?rR(e,a,"lineSuffix")(n):a(n))}(o)):n(t)};function a(r){return null===r||rL(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},ik={42:iv,43:iv,45:iv,48:iv,49:iv,50:iv,51:iv,52:iv,53:iv,54:iv,55:iv,56:iv,57:iv,62:r3},iN={91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,ir.call(i,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function a(t){return(r=ry(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return rI(t)?ia(e,l)(t):l(t)}function l(t){return it(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(io,c,c)(t)}function c(t){return rO(t)?rR(e,d,"whitespace")(t):d(t)}function d(a){return null===a||rL(a)?(e.exit("definition"),i.parser.defined.push(r),t(a)):n(a)}}}},iS={[-2]:r7,[-1]:r7,32:r7},iE={35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,a=3;return"whitespace"===e[3][1].type&&(a+=2),i-2>a&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4),i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},rh(e,a,i-a+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var a;return e.enter("atxHeading"),a=i,e.enter("atxHeadingSequence"),function i(a){return 35===a&&r++<6?(e.consume(a),i):null===a||rI(a)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||rL(r)?(e.exit("atxHeading"),t(r)):rO(r)?rR(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||rI(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(a)):n(a)}(a)}}},42:ib,45:[iC,ib],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},tokenize:function(e,t,n){let r,i,a,o,l,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(o){return 33===o?(e.consume(o),d):47===o?(e.consume(o),i=!0,f):63===o?(e.consume(o),r=3,s.interrupt?t:A):r_(o)?(e.consume(o),a=String.fromCharCode(o),g):n(o)}function d(i){return 45===i?(e.consume(i),r=2,u):91===i?(e.consume(i),r=5,o=0,p):r_(i)?(e.consume(i),r=4,s.interrupt?t:A):n(i)}function u(r){return 45===r?(e.consume(r),s.interrupt?t:A):n(r)}function p(r){let i="CDATA[";return r===i.charCodeAt(o++)?(e.consume(r),o===i.length)?s.interrupt?t:k:p:n(r)}function f(t){return r_(t)?(e.consume(t),a=String.fromCharCode(t),g):n(t)}function g(o){if(null===o||47===o||62===o||rI(o)){let l=47===o,c=a.toLowerCase();return!l&&!i&&is.includes(c)?(r=1,s.interrupt?t(o):k(o)):il.includes(a.toLowerCase())?(r=6,l)?(e.consume(o),h):s.interrupt?t(o):k(o):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(o):i?function t(n){return rO(n)?(e.consume(n),t):_(n)}(o):m(o))}return 45===o||rC(o)?(e.consume(o),a+=String.fromCharCode(o),g):n(o)}function h(r){return 62===r?(e.consume(r),s.interrupt?t:k):n(r)}function m(t){return 47===t?(e.consume(t),_):58===t||95===t||r_(t)?(e.consume(t),w):rO(t)?(e.consume(t),m):_(t)}function w(t){return 45===t||46===t||58===t||95===t||rC(t)?(e.consume(t),w):x(t)}function x(t){return 61===t?(e.consume(t),b):rO(t)?(e.consume(t),x):m(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,v):rO(t)?(e.consume(t),b):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||rI(n)?x(n):(e.consume(n),t)}(t)}function v(t){return t===l?(e.consume(t),l=null,y):null===t||rL(t)?n(t):(e.consume(t),v)}function y(e){return 47===e||62===e||rO(e)?m(e):n(e)}function _(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||rL(t)?k(t):rO(t)?(e.consume(t),C):n(t)}function k(t){return 45===t&&2===r?(e.consume(t),T):60===t&&1===r?(e.consume(t),L):62===t&&4===r?(e.consume(t),D):63===t&&3===r?(e.consume(t),A):93===t&&5===r?(e.consume(t),O):rL(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(ic,M,N)(t)):null===t||rL(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),k)}function N(t){return e.check(id,S,M)(t)}function S(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),E}function E(t){return null===t||rL(t)?N(t):(e.enter("htmlFlowData"),k(t))}function T(t){return 45===t?(e.consume(t),A):k(t)}function L(t){return 47===t?(e.consume(t),a="",I):k(t)}function I(t){if(62===t){let n=a.toLowerCase();return is.includes(n)?(e.consume(t),D):k(t)}return r_(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),I):k(t)}function O(t){return 93===t?(e.consume(t),A):k(t)}function A(t){return 62===t?(e.consume(t),D):45===t&&2===r?(e.consume(t),A):k(t)}function D(t){return null===t||rL(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},61:iC,95:ib,96:r8,126:r8},iT={38:r6,92:r4},iL={[-5]:ix,[-4]:ix,[-3]:ix,33:im,38:r6,42:r2,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return r_(t)?(e.consume(t),a):64===t?n(t):l(t)}function a(t){return 43===t||45===t||46===t||rC(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||rC(n))&&r++<32?(e.consume(n),t):(r=0,l(n))}(t)):l(t)}function o(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||rN(r)?n(r):(e.consume(r),o)}function l(t){return 64===t?(e.consume(t),s):rk(t)?(e.consume(t),l):n(t)}function s(i){return rC(i)?function i(a){return 46===a?(e.consume(a),r=0,s):62===a?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(a),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(a){if((45===a||rC(a))&&r++<63){let n=45===a?t:i;return e.consume(a),n}return n(a)}(a)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,a,o=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),l};function l(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),v):63===t?(e.consume(t),x):r_(t)?(e.consume(t),_):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):r_(t)?(e.consume(t),w):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function d(t){return null===t?n(t):45===t?(e.consume(t),u):rL(t)?(a=d,I(t)):(e.consume(t),d)}function u(t){return 45===t?(e.consume(t),p):d(t)}function p(e){return 62===e?L(e):45===e?u(e):d(e)}function f(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?g:f):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),h):rL(t)?(a=g,I(t)):(e.consume(t),g)}function h(t){return 93===t?(e.consume(t),m):g(t)}function m(t){return 62===t?L(t):93===t?(e.consume(t),m):g(t)}function w(t){return null===t||62===t?L(t):rL(t)?(a=w,I(t)):(e.consume(t),w)}function x(t){return null===t?n(t):63===t?(e.consume(t),b):rL(t)?(a=x,I(t)):(e.consume(t),x)}function b(e){return 62===e?L(e):x(e)}function v(t){return r_(t)?(e.consume(t),y):n(t)}function y(t){return 45===t||rC(t)?(e.consume(t),y):function t(n){return rL(n)?(a=t,I(n)):rO(n)?(e.consume(n),t):L(n)}(t)}function _(t){return 45===t||rC(t)?(e.consume(t),_):47===t||62===t||rI(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),L):58===t||95===t||r_(t)?(e.consume(t),k):rL(t)?(a=C,I(t)):rO(t)?(e.consume(t),C):L(t)}function k(t){return 45===t||46===t||58===t||95===t||rC(t)?(e.consume(t),k):function t(n){return 61===n?(e.consume(n),N):rL(n)?(a=t,I(n)):rO(n)?(e.consume(n),t):C(n)}(t)}function N(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,S):rL(t)?(a=N,I(t)):rO(t)?(e.consume(t),N):(e.consume(t),E)}function S(t){return t===r?(e.consume(t),r=void 0,T):null===t?n(t):rL(t)?(a=S,I(t)):(e.consume(t),S)}function E(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||rI(t)?C(t):(e.consume(t),E)}function T(e){return 47===e||62===e||rI(e)?C(e):n(e)}function L(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return rO(t)?rR(e,A,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):A(t)}function A(t){return e.enter("htmlTextData"),a(t)}}}],91:iw,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return rL(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},r4],93:iu,95:r2,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,a=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),a++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),o):96===s?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",l(o))}(s)):rL(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(s))}function l(t){return null===t||32===t||96===t||rL(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),l)}}}},iI={null:[r2,rY]},iO={null:[42,95]},iA={null:[]},iD=/[\0\t\n\r]/g,iM=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iF(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return rb(n.slice(t?2:1),t?16:10)}return rg(n)||e}let iR={}.hasOwnProperty;function iP(e){return{line:e.line,column:e.column,offset:e.offset}}function iz(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+n1({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+n1({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+n1({start:t.start,end:t.end})+") is still open")}function ij(e){let t=this;t.parser=function(n){var r,i;let a,o,l,s;return"string"!=typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(w),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(g),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(f),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(f,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:c,data:c,codeFlowValue:c,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(h),hardBreakTrailing:r(h),htmlFlow:r(m,i),htmlFlowData:c,htmlText:r(m,i),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(w),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(x,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(x),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(g),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:o(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=rb(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=rg(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=iP(e.end)},codeFenced:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:d,codeIndented:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:o(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ry(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:o(),hardBreakEscape:o(u),hardBreakTrailing:o(u),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(iM,iF),n.identifier=ry(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=iP(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(c.call(this,e),d.call(this,e))},link:o(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ry(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:o(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:o(),thematicBreak:o()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(iR.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},o={stack:[r],tokenStack:[],config:t,enter:a,exit:l,buffer:i,resume:s,data:n},c=[],d=-1;for(;++d<e.length;)("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)&&("enter"===e[d][0]?c.push(d):d=function(e,t,n){let r,i,a,o,l=t-1,s=-1,c=!1;for(;++l<=n;){let t=e[l];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||s||a||(a=l),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let o=l;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||l,0,["exit",r,t[2]]),l++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(l,0,["enter",i,t[2]]),l++,n++,a=void 0,o=!0}}}return e[t][1]._spread=c,n}(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];iR.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||iz).call(o,void 0,e[0])}for(r.position={start:iP(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:iP(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r};function r(e,t){return function(n){a.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function a(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:iP(t.start),end:void 0}}function o(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||iz).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+n1({start:e.start,end:e.end})+"): it’s not open");n.position.end=iP(e.end)}function s(){return rd(this.stack.pop())}function c(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:iP(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=iP(e.end)}function u(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function g(){return{type:"heading",depth:0,children:[]}}function h(){return{type:"break"}}function m(){return{type:"html",value:""}}function w(){return{type:"link",title:null,url:"",children:[]}}function x(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!rW(e););return e}((function(e){let t={constructs:rx([rQ,...(e||{}).extensions||[]]),content:n(rP),defined:[],document:n(rz),flow:n(rq),lazy:{},string:n(rG),text:n(rJ)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],l=[],s={attempt:g(function(e,t){h(e,t.from)}),check:g(f),consume:function(e){rL(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,m()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,m()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let a,o=e[r];if("string"==typeof o)a=o;else switch(o){case -5:a="\r";break;case -4:a="\n";break;case -3:a="\r\n";break;case -2:a=t?" ":" ";break;case -1:if(!t&&n)continue;a=" ";break;default:a=String.fromCharCode(o)}n=-2===o,i.push(a)}return i.join("")}(u(e),t)},sliceStream:u,write:function(e){return(o=rm(o,e),function(){let e;for(;r._index<o.length;){let n=o[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),d=d(t)}else d=d(n)}}(),null!==o[o.length-1])?[]:(h(t,0),c.events=r0(a,c.events,c),c.events)}},d=t.tokenize.call(c,s);return t.resolveAll&&a.push(t),c;function u(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;if(r===a)n=[e[r].slice(i,o)];else{if(n=e.slice(r,a),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[a].slice(0,o))}return n}(o,e)}function p(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function f(e,t){t.restore()}function g(e,t){return function(n,i,a){var o;let d,u,f,g;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return h([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function h(e){return(d=e,u=0,0===e.length)?a:w(e[u])}function w(e){return function(n){return(g=function(){let e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,a=Array.from(l);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,l=a,m()}}}(),f=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?b(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,x,b)(n)}}function x(t){return e(f,g),i}function b(e){return(g.restore(),++u<d.length)?w(d[u]):a}}}function h(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&rh(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function m(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((o=1,l="",s=!0,function(e,t,n){let r,i,c,d,u,p=[];for(e=l+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),c=0,l="",s&&(65279===e.charCodeAt(0)&&c++,s=void 0);c<e.length;){if(iD.lastIndex=c,d=(r=iD.exec(e))&&void 0!==r.index?r.index:e.length,u=e.charCodeAt(d),!r){l=e.slice(c);break}if(10===u&&c===d&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),c<d&&(p.push(e.slice(c,d)),o+=d-c),u){case 0:p.push(65533),o++;break;case 9:for(i=4*Math.ceil(o/4),p.push(-2);o++<i;)p.push(-1);break;case 10:p.push(-4),o=1;break;default:a=!0,o=1}c=d+1}return n&&(a&&p.push(-5),l&&p.push(l),p.push(null)),p})(n,r,!0))))}}let iU="object"==typeof self?self:globalThis,iB=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case -1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new iU[e](t),i)}case 8:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new iU[a](o),i)};return r},iV=e=>iB(new Map,e)(0),{toString:iW}={},{keys:iH}=Object,i$=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=iW.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},iq=([e,t])=>0===e&&("function"===t||"symbol"===t),iY=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,l]=i$(r);switch(o){case 0:{let t=r;switch(l){case"bigint":o=8,t=r.toString();break;case"function":case"symbol":if(e)throw TypeError("unable to serialize "+l);t=null;break;case"undefined":return i([-1],r)}return i([o,t],r)}case 1:{if(l){let e=r;return"DataView"===l?e=new Uint8Array(r.buffer):"ArrayBuffer"===l&&(e=new Uint8Array(r)),i([l,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(l)switch(l){case"BigInt":return i([l,r.toString()],r);case"Boolean":case"Number":case"String":return i([l,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());let n=[],s=i([o,n],r);for(let t of iH(r))(e||!iq(i$(r[t])))&&n.push([a(t),a(r[t])]);return s}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(iq(i$(n))||iq(i$(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!iq(i$(n)))&&t.push(a(n));return n}}let{message:s}=r;return i([o,{name:l,message:s}],r)};return a},iG=(e,{json:t,lossy:n}={})=>{let r=[];return iY(!(t||n),!!t,new Map,r)(e),r};var iJ="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?iV(iG(e,t)):structuredClone(e):(e,t)=>iV(iG(e,t));function iZ(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function iK(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let iX=function(e){var t,n;if(null==e)return i1;if("function"==typeof e)return iQ(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=iX(e[n]);return iQ(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,iQ(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,iQ(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function iQ(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function i1(){return!0}let i0=[];function i2(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let a=iX(i),o=r?-1:1;(function e(i,l,s){let c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(d,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return d;function d(){var c;let d,u,p,f=i0;if((!t||a(i,l,s[s.length-1]||void 0))&&!1===(f=Array.isArray(c=n(i,s))?c:"number"==typeof c?[!0,c]:null==c?i0:[c])[0])return f;if("children"in i&&i.children&&i.children&&"skip"!==f[0])for(u=(r?i.children.length:-1)+o,p=s.concat(i);u>-1&&u<i.children.length;){if(!1===(d=e(i.children[u],u,p)())[0])return d;u="number"==typeof d[1]?d[1]:u+o}return f}})(e,void 0,[])()}function i5(e,t,n,r){let i,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,i=n):(a=t,o=n,i=r),i2(e,a,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},i)}function i3(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function i4(e){let t=e.spread;return null==t?e.children.length>1:t}function i6(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let i9={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i={type:"element",tagName:"pre",properties:{},children:[i=e.applyData(t,i)]},e.patch(t,i),i},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=rF(i.toLowerCase()),o=e.footnoteOrder.indexOf(i),l=e.footnoteCounts.get(i);void 0===l?(l=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=o+1,l+=1,e.footnoteCounts.set(i,l);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return i3(e,t);let i={src:rF(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){let n={src:rF(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return i3(e,t);let i={href:rF(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){let n={href:rF(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=i4(n[r])}return t}(n):i4(t),a={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){let e=r[l];(i||0!==l||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&o.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=nX(t.children[1]),o=nK(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length,l=-1,s=[];for(;++l<o;){let n=t.children[l],r={},o=a?a[l]:void 0;o&&(r.align=o);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(i6(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(i6(t.slice(i),i>0,!1)),a.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:i8,yaml:i8,definition:i8,footnoteDefinition:i8};function i8(){}let i7={}.hasOwnProperty,ae={};function at(e,t){e.position&&(t.position=function(e){let t=nX(e),n=nK(e);if(t&&n)return{start:t,end:n}}(e))}function an(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,iJ(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function ar(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function ai(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function aa(e,t){let n=function(e,t){let n=t||ae,r=new Map,i=new Map,a={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=ai(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=ai(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:an,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...i9,...n.handlers},one:function(e,t){let n=e.type,r=a.handlers[n];if(i7.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=iJ(n);return r.children=a.all(e),r}return iJ(e)}return(a.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(i7.call(n,"hProperties")||i7.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(a,e,t)},options:n,patch:at,wrap:ar};return i5(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),r=n.one(e,void 0),i=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||iZ,r=e.options.footnoteBackLabel||iK,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),c=rF(o.toLowerCase()),d=0,u=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++d<=p;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,d);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,d),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){let e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...u)}else a.push(...u);let g={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(a,!0)};e.patch(i,g),l.push(g)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...iJ(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:"\n"},i),a}function ao(e,t){return e&&"run"in e?async function(n,r){let i=aa(n,{file:r,...t});await e.run(i,r)}:function(n,r){return aa(n,{file:r,...e||t})}}function al(e){if(e)throw e}"use strict";var as={},ac=Object.prototype.hasOwnProperty,ad=Object.prototype.toString,au=Object.defineProperty,ap=Object.getOwnPropertyDescriptor,af=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ad.call(e)},ag=function(e){if(!e||"[object Object]"!==ad.call(e))return!1;var t,n=ac.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ac.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ac.call(e,t)},ah=function(e,t){au&&"__proto__"===t.name?au(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},am=function(e,t){if("__proto__"===t){if(!ac.call(e,t))return;else if(ap)return ap(e,t).value}return e[t]};function aw(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}as=function e(){var t,n,r,i,a,o,l=arguments[0],s=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<c;++s)if(t=arguments[s],null!=t)for(n in t)r=am(l,n),l!==(i=am(t,n))&&(d&&i&&(ag(i)||(a=af(i)))?(a?(a=!1,o=r&&af(r)?r:[]):o=r&&ag(r)?r:{},ah(l,{name:n,newValue:e(d,o,i)})):void 0!==i&&ah(l,{name:n,newValue:i}));return l};let ax={basename:function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');ab(e);let r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,l=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(i=a):(l=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},dirname:function(e){let t;if(ab(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){let t;ab(e);let n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){let l=e.codePointAt(n);if(47===l){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===l?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1)}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)ab(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){ab(e);let t=47===e.codePointAt(0),n=function(e,t){let n,r,i="",a=0,o=-1,l=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(o===s-1||1===l);else if(o!==s-1&&2===l){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",a=0):a=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=s,l=0;continue}}else if(i.length>0){i="",a=0,o=s,l=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,s):i=e.slice(o+1,s),a=s-o-1;o=s,l=0}else 46===n&&l>-1?l++:l=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function ab(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}let av={cwd:function(){return"/"}};function ay(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let a_=["history","path","basename","stem","extname","dirname"];class aC{constructor(e){let t,n;t=e?ay(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":av.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<a_.length;){let e=a_[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)a_.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?ax.basename(this.path):void 0}set basename(e){aN(e,"basename"),ak(e,"basename"),this.path=ax.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?ax.dirname(this.path):void 0}set dirname(e){aS(this.basename,"dirname"),this.path=ax.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?ax.extname(this.path):void 0}set extname(e){if(ak(e,"extname"),aS(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=ax.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){ay(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!ay(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),aN(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?ax.basename(this.path,this.extname):void 0}set stem(e){aN(e,"stem"),ak(e,"stem"),this.path=ax.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new n3(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function ak(e,t){if(e&&e.includes(ax.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+ax.sep+"`")}function aN(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function aS(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let aE=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},aT={}.hasOwnProperty;class aL extends aE{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(a,...o){let l=e[++n],s=-1;if(a)return void r(a);for(;++s<t.length;)(null===o[s]||void 0===o[s])&&(o[s]=t[s]);t=o,l?(function(e,t){let n;return function(...t){let a,o=e.length>t.length;o&&t.push(r);try{a=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(a&&a.then&&"function"==typeof a.then?a.then(i,r):a instanceof Error?r(a):i(a))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(l,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new aL,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data(i(as)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(aD("data",this.frozen),this.namespace[e]=t,this):aT.call(this.namespace,e)&&this.namespace[e]||void 0:e?(aD("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let t=aR(e),n=this.parser||this.Parser;return aO("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),aO("process",this.parser||this.Parser),aA("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=aR(e),o=n.parse(a);function l(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(o,a,function(e,t,r){var i,a;if(e||!t||!r)return l(e);let o=n.stringify(t,r);"string"==typeof(i=o)||(a=i)&&"object"==typeof a&&"byteLength"in a&&"byteOffset"in a?r.value=o:r.result=o,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),aO("processSync",this.parser||this.Parser),aA("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,al(e),t=r}),aF("processSync","process",n),t}run(e,t,n){aM(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=aR(t);r.run(e,o,function(t,r,o){let l=r||e;t?a(t):i?i(l):n(void 0,l,o)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){al(e),n=t,r=!0}),aF("runSync","run",r),n}stringify(e,t){this.freeze();let n=aR(t),r=this.compiler||this.Compiler;return aA("stringify",r),aM(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(aD("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else if("object"==typeof e)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=i(as)(!0,r.settings,e.settings))}function o(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;){var n=e[t];if("function"==typeof n)l(n,[]);else if("object"==typeof n)if(Array.isArray(n)){let[e,...t]=n;l(e,t)}else a(n);else throw TypeError("Expected usable value, not `"+n+"`")}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function l(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,l=n[a][1];aw(l)&&aw(r)&&(r=i(as)(!0,l,r)),n[a]=[e,r,...o]}}}}let aI=new aL().freeze();function aO(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function aA(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function aD(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function aM(e){if(!aw(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function aF(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function aR(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new aC(e)}let aP=[],az={allowDangerousHtml:!0},aj=/^(https?|ircs?|mailto|xmpp)$/i,aU=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function aB(e){let t=function(e){let t=e.rehypePlugins||aP,n=e.remarkPlugins||aP,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...az}:az;return aI().use(ij).use(n).use(ao,r).use(t)}(e),n=function(e){let t=e.children||"",n=new aC;return"string"==typeof t&&(n.value=t),n}(e);return function(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,s=t.urlTransform||aV;for(let e of aU)Object.hasOwn(t,e.from)&&(e.from,e.to&&e.to,e.id);return i5(e,function(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return o?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in rs)if(Object.hasOwn(rs,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=rs[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=s(String(n||""),t,e))}}if("element"===e.type){let o=n?!n.includes(e.tagName):!!a&&a.includes(e.tagName);if(!o&&r&&"number"==typeof t&&(o=!r(e,t,i)),o&&i&&"number"==typeof t)return l&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}),function(e,t){var n,r,i,a,o;let l;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let s=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=s,r=t.jsxDEV,l=function(e,t,i,a){let o=Array.isArray(i.children),l=nX(e);return r(t,i,a,o,{columnNumber:l?l.column-1:void 0,fileName:n,lineNumber:l?l.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=0,a=t.jsx,o=t.jsxs,l=function(e,t,n,r){let i=Array.isArray(n.children)?o:a;return r?i(t,n,r):i(t,n)}}let c={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:l,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?nj:nz,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},d=rt(c,e,void 0);return d&&"string"!=typeof d?d:c.create(e,c.Fragment,{children:d||void 0},void 0)}(e,{Fragment:M,components:i,ignoreInvalidStyle:!0,jsx:tC,jsxs:tC,passKeys:!0,passNode:!0})}(t.runSync(t.parse(n),n),e)}function aV(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||aj.test(e.slice(0,t))?e:""}function aW(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function aH(e,t,n){let r=iX((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),a=-1;for(;++a<i.length;)i2(e,"text",o);function o(e,t){let n,o=-1;for(;++o<t.length;){let e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],l=0,s=n.children.indexOf(e),c=!1,d=[];r.lastIndex=0;let u=r.exec(e.value);for(;u;){let n=u.index,i={index:u.index,input:u.input,stack:[...t,e]},a=o(...u,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(l!==n&&d.push({type:"text",value:e.value.slice(l,n)}),Array.isArray(a)?d.push(...a):a&&d.push(a),l=n+u[0].length,c=!0),!r.global)break;u=r.exec(e.value)}return c?(l<e.value.length&&d.push({type:"text",value:e.value.slice(l)}),n.children.splice(s,1,...d)):d=[e],s+d.length}(e,t)}}let a$="phrasing",aq=["autolink","link","image","label"];function aY(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function aG(e){this.config.enter.autolinkProtocol.call(this,e)}function aJ(e){this.config.exit.autolinkProtocol.call(this,e)}function aZ(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function aK(e){this.config.exit.autolinkEmail.call(this,e)}function aX(e){this.exit(e)}function aQ(e){aH(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,a1],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,a0]],{ignore:["link","linkReference"]})}function a1(e,t,n,r,i){let a="";if(!a2(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!function(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n)))return!1;let o=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=aW(e,"("),a=aW(e,")");for(;-1!==r&&i>a;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),a++;return[e,n]}(n+r);if(!o[0])return!1;let l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function a0(e,t,n,r){return!(!a2(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function a2(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||rD(n)||rA(n))&&(!t||47!==n)}function a5(){this.buffer()}function a3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function a4(){this.buffer()}function a6(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function a9(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ry(this.sliceSerialize(e)).toLowerCase(),n.label=t}function a8(e){this.exit(e)}function a7(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ry(this.sliceSerialize(e)).toLowerCase(),n.label=t}function oe(e){this.exit(e)}function ot(e,t,n,r){let i=n.createTracker(r),a=i.move("[^"),o=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),o(),a+=i.move("]")}function on(e,t,n){return 0===t?e:or(e,t,n)}function or(e,t,n){return(n?"":" ")+e}ot.peek=function(){return"["};let oi=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function oa(e){this.enter({type:"delete",children:[]},e)}function oo(e){this.exit(e)}function ol(e,t,n,r){let i=n.createTracker(r),a=n.enter("strikethrough"),o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function os(e){return e.length}function oc(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}ol.peek=function(){return"~"};function od(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ou(e){let t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function op(e){return"&#x"+e.toString(16).toUpperCase()+";"}function of(e,t,n){let r=r1(e),i=r1(t);return void 0===r?void 0===i?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function og(e,t,n){let r=e.value||"",i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){let e,t=n.unsafe[a],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}function oh(e,t){let n=rd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}og.peek=function(){return"`"};iX(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let om={inlineCode:og,listItem:function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),a=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let l=n.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);let s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,l.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?a:a+" ".repeat(o-a.length))+e});return s(),c}};function ow(e){let t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function ox(e){this.exit(e),this.data.inTable=void 0}function ob(e){this.enter({type:"tableRow",children:[]},e)}function ov(e){this.exit(e)}function oy(e){this.enter({type:"tableCell",children:[]},e)}function o_(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oC));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oC(e,t){return"|"===t?t:e}function ok(e){let t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function oN(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,a=-1;for(;++a<i.length;){let e=i[a];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function oS(e,t,n,r){let i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(o);let s=om.listItem(e,t,n,{...r,...l.current()});return a&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),s}let oE={tokenize:function(e,t,n){let r=0;return function t(a){return(87===a||119===a)&&r<3?(r++,e.consume(a),t):46===a&&3===r?(e.consume(a),i):n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},oT={tokenize:function(e,t,n){let r,i,a;return o;function o(t){return 46===t||95===t?e.check(oI,s,l)(t):null===t||rI(t)||rD(t)||45!==t&&rA(t)?s(t):(a=!0,e.consume(t),o)}function l(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function s(e){return i||r||!a?n(e):t(e)}},partial:!0},oL={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(oI,t,a)(o):null===o||rI(o)||rD(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},oI={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),a):93===o?(e.consume(o),i):60===o||null===o||rI(o)||rD(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||rI(e)||rD(e)?t(e):r(e)}function a(t){return r_(t)?function t(i){return 59===i?(e.consume(i),r):r_(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},oO={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return rC(e)?n(e):t(e)}},partial:!0},oA={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!oP.call(r,r.previous)||oB(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(oE,e.attempt(oT,e.attempt(oL,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:oP},oD={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",a=!1;return function(t){return(72===t||104===t)&&oz.call(r,r.previous)&&!oB(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o):n(t)};function o(t){if(r_(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),a)?s:(a=!0,l):n(t)}function s(t){return null===t||rN(t)||rI(t)||rD(t)||rA(t)?n(t):e.attempt(oT,e.attempt(oL,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:oz},oM={name:"emailAutolink",tokenize:function(e,t,n){let r,i,a=this;return function(t){return!oU(t)||!oj.call(a,a.previous)||oB(a.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return oU(r)?(e.consume(r),t):64===r?(e.consume(r),o):n(r)}(t))};function o(t){return 46===t?e.check(oO,s,l)(t):45===t||95===t||rC(t)?(i=!0,e.consume(t),o):s(t)}function l(t){return e.consume(t),r=!0,o}function s(o){return i&&r&&r_(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:oj},oF={},oR=48;for(;oR<123;)oF[oR]=oM,58==++oR?oR=65:91===oR&&(oR=97);function oP(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||rI(e)}function oz(e){return!r_(e)}function oj(e){return!(47===e||oU(e))}function oU(e){return 43===e||45===e||46===e||95===e||rC(e)}function oB(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}oF[43]=oM,oF[45]=oM,oF[46]=oM,oF[95]=oM,oF[72]=[oM,oD],oF[104]=[oM,oD],oF[87]=[oM,oA],oF[119]=[oM,oA];function oV(e,t){let n=this.sliceSerialize(e);this.tag('<a href="'+function(e,t){let n=rF(e||"").replace(/["&<>]/g,function(e){return"&"+rv[e]+";"});!0;return n}((t||"")+n)+'">'),this.raw(this.encode(n)),this.tag("</a>")}let oW={tokenize:function(e,t,n){let r=this;return rR(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function oH(e,t,n){let r,i=this,a=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;a--;){let e=i.events[a][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!r||!r._balanced)return n(a);let l=ry(i.sliceSerialize({start:r.end,end:i.now()}));return 94===l.codePointAt(0)&&o.includes(l.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)):n(a)}}function o$(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function oq(e,t,n){let r,i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),l};function l(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(l){if(o>999||93===l&&!r||null===l||91===l||rI(l))return n(l);if(93===l){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return a.includes(ry(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return rI(l)||(r=!0),o++,e.consume(l),92===l?c:s}function c(t){return 91===t||92===t||93===t?(e.consume(t),o++,s):s(t)}}function oY(e,t,n){let r,i,a=this,o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]),l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(l>999||93===t&&!i||null===t||91===t||rI(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=ry(a.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),u}return rI(t)||(i=!0),l++,e.consume(t),92===t?d:c}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}function u(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(r)||o.push(r),rR(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function oG(e,t,n){return e.check(rU,t,e.attempt(oW,t,n))}function oJ(e){e.exit("gfmFootnoteDefinition")}class oZ{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function oK(e,t,n){let r,i=this,a=0,o=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,a="tableHead"===r||"tableRow"===r?x:l;return a===x&&i.parser.lazy[i.now().line]?n(e):a(e)};function l(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,o+=1),s(n)}function s(t){return null===t?n(t):rL(t)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),u):n(t):rO(t)?rR(e,s,"whitespace")(t):(o+=1,r&&(r=!1,a+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),c(t))}function c(t){return null===t||124===t||rI(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?d:c)}function d(t){return 92===t||124===t?(e.consume(t),c):c(t)}function u(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,rO(t))?rR(e,p,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t)}function p(t){return 45===t||58===t?g(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):n(t)}function f(t){return rO(t)?rR(e,g,"whitespace")(t):g(t)}function g(t){return 58===t?(o+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),h):45===t?(o+=1,h(t)):null===t||rL(t)?w(t):n(t)}function h(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),m):(e.exit("tableDelimiterFiller"),m(n))}(t)):n(t)}function m(t){return rO(t)?rR(e,w,"whitespace")(t):w(t)}function w(i){if(124===i)return p(i);if(null===i||rL(i))return r&&a===o?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function x(t){return e.enter("tableRow"),b(t)}function b(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),b):null===n||rL(n)?(e.exit("tableRow"),t(n)):rO(n)?rR(e,b,"whitespace")(n):(e.enter("data"),v(n))}function v(t){return null===t||124===t||rI(t)?(e.exit("data"),b(t)):(e.consume(t),92===t?y:v)}function y(t){return 92===t||124===t?(e.consume(t),v):v(t)}}function oX(e,t){let n,r,i,a=-1,o=!0,l=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,u=0,p=new oZ;for(;++a<e.length;){let f=e[a],g=f[1];"enter"===f[0]?"tableHead"===g.type?(d=!1,0!==u&&(o1(p,t,u,n,r),r=void 0,u=0),n={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(a,0,[["enter",n,t]])):"tableRow"===g.type||"tableDelimiterRow"===g.type?(o=!0,i=void 0,s=[0,0,0,0],c=[0,a+1,0,0],d&&(d=!1,r={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(a,0,[["enter",r,t]])),l="tableDelimiterRow"===g.type?2:r?3:1):l&&("data"===g.type||"tableDelimiterMarker"===g.type||"tableDelimiterFiller"===g.type)?(o=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],i=oQ(p,t,s,l,void 0,i),s=[0,0,0,0]),c[2]=a)):"tableCellDivider"===g.type&&(o?o=!1:(0!==s[1]&&(c[0]=c[1],i=oQ(p,t,s,l,void 0,i)),c=[(s=c)[1],a,0,0])):"tableHead"===g.type?(d=!0,u=a):"tableRow"===g.type||"tableDelimiterRow"===g.type?(u=a,0!==s[1]?(c[0]=c[1],i=oQ(p,t,s,l,a,i)):0!==c[1]&&(i=oQ(p,t,c,l,a,i)),l=0):l&&("data"===g.type||"tableDelimiterMarker"===g.type||"tableDelimiterFiller"===g.type)&&(c[3]=a)}for(0!==u&&o1(p,t,u,n,r),p.consume(t.events),a=-1;++a<t.events.length;){let e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,a))}return e}function oQ(e,t,n,r,i,a){0!==n[0]&&(a.end=Object.assign({},o0(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));let o=o0(t.events,n[1]);if(a={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){let i=o0(t.events,n[2]),a=o0(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},o0(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function o1(e,t,n,r,i){let a=[],o=o0(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function o0(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}RegExp("^"+/<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi.source,"i");let o2={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return rI(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return rL(r)?t(r):rO(r)?e.check({tokenize:o5},t,n)(r):n(r)}}};function o5(e,t,n){return rR(e,function(e){return null===e?n(e):t(e)},"whitespace")}let o3={};function o4(e){let t,n=e||o3,r=this.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(rx([{text:oF},{document:{91:{name:"gfmFootnoteDefinition",tokenize:oY,continuation:{tokenize:oG},exit:oJ}},text:{91:{name:"gfmFootnoteCall",tokenize:oq},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oH,resolveTo:o$}}},function(e){let t=(e||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,a=this.events,o=0;return function(l){return 126===i&&"characterEscape"!==a[a.length-1][1].type?r(l):(e.enter("strikethroughSequenceTemporary"),function a(l){let s=r1(i);if(126===l)return o>1?r(l):(e.consume(l),o++,a);if(o<2&&!t)return r(l);let c=e.exit("strikethroughSequenceTemporary"),d=r1(l);return c._open=!d||2===d&&!!s,c._close=!s||2===s&&!!d,n(l)}(l))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],l=t.parser.constructs.insideSpan.null;l&&rh(o,o.length,0,r0(l,e.slice(r+1,n),t)),rh(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),rh(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}(n),{flow:{null:{name:"table",tokenize:oK,resolveAll:oX}}},{text:{91:o2}}])),a.push([{transforms:[aQ],enter:{literalAutolink:aY,literalAutolinkEmail:aG,literalAutolinkHttp:aG,literalAutolinkWww:aG},exit:{literalAutolink:aX,literalAutolinkEmail:aK,literalAutolinkHttp:aJ,literalAutolinkWww:aZ}},{enter:{gfmFootnoteCallString:a5,gfmFootnoteCall:a3,gfmFootnoteDefinitionLabelString:a4,gfmFootnoteDefinition:a6},exit:{gfmFootnoteCallString:a9,gfmFootnoteCall:a8,gfmFootnoteDefinitionLabelString:a7,gfmFootnoteDefinition:oe}},{canContainEols:["delete"],enter:{strikethrough:oa},exit:{strikethrough:oo}},{enter:{table:ow,tableData:oy,tableHeader:oy,tableRow:ob},exit:{codeText:o_,table:ox,tableData:ov,tableHeader:ov,tableRow:ov}},{exit:{taskListCheckValueChecked:ok,taskListCheckValueUnchecked:ok,paragraph:oN}}]),o.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:a$,notInConstruct:aq},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:a$,notInConstruct:aq},{character:":",before:"[ps]",after:"\\/",inConstruct:a$,notInConstruct:aq}]},(t=!1,n&&n.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){let a=r.createTracker(i),o=a.move("[^"),l=r.enter("footnoteDefinition"),s=r.enter("label");return o+=a.move(r.safe(r.associationId(e),{before:o,after:"]"})),s(),o+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?or:on))),l(),o},footnoteReference:ot},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:oi}],handlers:{delete:ol}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=om.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return l(function(e,t,n){let r=e.children,i=-1,a=[],o=t.enter("table");for(;++i<r.length;)a[i]=s(r[i],t,n);return o(),a}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){let i=l([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),l=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),l}function l(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||os,a=[],o=[],l=[],s=[],c=0,d=-1;for(;++d<e.length;){let t=[],r=[],a=-1;for(e[d].length>c&&(c=e[d].length);++a<e[d].length;){var u;let o=null==(u=e[d][a])?"":String(u);if(!1!==n.alignDelimiters){let e=i(o);r[a]=e,(void 0===s[a]||e>s[a])&&(s[a]=e)}t.push(o)}o[d]=t,l[d]=r}let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)a[p]=oc(r[p]);else{let e=oc(r);for(;++p<c;)a[p]=e}p=-1;let f=[],g=[];for(;++p<c;){let e=a[p],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[p]-t.length-r.length),o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[p]&&(s[p]=i),g[p]=i),f[p]=o}o.splice(1,0,f),l.splice(1,0,g),d=-1;let h=[];for(;++d<o.length;){let e=o[d],t=l[d];p=-1;let r=[];for(;++p<c;){let i=e[p]||"",o="",l="";if(!1!==n.alignDelimiters){let e=s[p]-(t[p]||0),n=a[p];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),l=" ".repeat(e/2-.5)):l=o=" ".repeat(e/2):l=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||p)&&r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(l),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||p!==c-1)&&r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,a=[],l=t.enter("tableRow");for(;++i<r.length;)a[i]=o(r[i],e,t,n);return l(),a}}(n),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oS}}]})}function o6(){return{type:"break"}}function o9(){return function(e){aH(e,[/\r?\n|\r/g,o6])}}let o8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o7=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),le=e=>{let t=o7(e);return t.charAt(0).toUpperCase()+t.slice(1)},lt=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),ln=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var lr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let li=eV(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},s)=>O("svg",{ref:s,...lr,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:lt("lucide",i),...!a&&!ln(l)&&{"aria-hidden":"true"},...l},[...o.map(([e,t])=>O(e,t)),...Array.isArray(a)?a:[a]])),la=(e,t)=>{let n=eV(({className:n,...r},i)=>O(li,{ref:i,iconNode:t,className:lt(`lucide-${o8(le(e))}`,`lucide-${e}`,n),...r}));return n.displayName=le(e),n},lo=la("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);function ll(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M12 2V7M12 7H10C8.13872 7 7.20808 7 6.45492 7.24472C4.93273 7.73931 3.73931 8.93273 3.24472 10.4549C3 11.2081 3 12.1387 3 14C3 15.8613 3 16.7919 3.24472 17.5451C3.73931 19.0673 4.93273 20.2607 6.45492 20.7553C7.20808 21 8.13872 21 10 21H14C15.8613 21 16.7919 21 17.5451 20.7553C19.0673 20.2607 20.2607 19.0673 20.7553 17.5451C21 16.7919 21 15.8613 21 14C21 12.1387 21 11.2081 20.7553 10.4549C20.2607 8.93273 19.0673 7.73931 17.5451 7.24472C16.7919 7 15.8613 7 14 7H12ZM9 14C8.44772 14 8 13.5523 8 13C8 12.4477 8.44772 12 9 12C9.55228 12 10 12.4477 10 13C10 13.5523 9.55228 14 9 14ZM15 14C14.4477 14 14 13.5523 14 13C14 12.4477 14.4477 12 15 12C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ls(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M18 3.99999C18.375 4.92642 18.5815 5.93909 18.5815 6.99999C18.5815 8.06089 18.375 9.07355 18 9.99999M20.8006 2C21.5674 3.50013 22 5.19955 22 6.99999C22 8.80043 21.5674 10.4998 20.8006 12M15 6.99999C15 9.20913 13.2091 11 11 11C8.79086 11 7 9.20913 7 6.99999C7 4.79085 8.79086 2.99999 11 2.99999C13.2091 2.99999 15 4.79085 15 6.99999ZM7 15H15C17.2091 15 19 16.7908 19 19C19 20.1046 18.1046 21 17 21H5C3.89543 21 3 20.1046 3 19C3 16.7908 4.79086 15 7 15Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lc(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M6 9.2C6 8.07989 6 7.51984 6.21799 7.09202C6.40973 6.71569 6.71569 6.40973 7.09202 6.21799C7.51984 6 8.0799 6 9.2 6H14.8C15.9201 6 16.4802 6 16.908 6.21799C17.2843 6.40973 17.5903 6.71569 17.782 7.09202C18 7.51984 18 8.0799 18 9.2V14.8C18 15.9201 18 16.4802 17.782 16.908C17.5903 17.2843 17.2843 17.5903 16.908 17.782C16.4802 18 15.9201 18 14.8 18H9.2C8.07989 18 7.51984 18 7.09202 17.782C6.71569 17.5903 6.40973 17.2843 6.21799 16.908C6 16.4802 6 15.9201 6 14.8V9.2Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ld(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M6 18L12 12M12 12L18 6M12 12L6 6M12 12L18 18",stroke:"currentcolor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function lu(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.8501 12.0001C1.8501 6.39441 6.39441 1.8501 12.0001 1.8501C17.6058 1.8501 22.1501 6.39441 22.1501 12.0001C22.1501 17.6058 17.6058 22.1501 12.0001 22.1501C6.39441 22.1501 1.8501 17.6058 1.8501 12.0001ZM16.0639 10.672C16.52 10.3606 16.6373 9.73836 16.3258 9.28227C16.0144 8.82618 15.3922 8.70892 14.9361 9.02036L14.8348 9.08953C13.1939 10.21 11.7795 11.6244 10.6609 13.2575L9.20673 11.8049C8.816 11.4146 8.18283 11.4149 7.79252 11.8056C7.4022 12.1964 7.40254 12.8295 7.79327 13.2198L10.1345 15.5585C10.3549 15.7787 10.6653 15.8836 10.974 15.8422C11.2828 15.8008 11.5546 15.6179 11.7093 15.3475C12.7601 13.5099 14.2145 11.9349 15.9626 10.7412L16.0639 10.672Z",fill:"currentcolor"})})}function lp(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M16.9018 16.9018C17.1375 16.8669 17.3474 16.8195 17.5451 16.7553C19.0673 16.2607 20.2607 15.0673 20.7553 13.5451C21 12.7919 21 11.8613 21 10C21 8.13872 21 7.20808 20.7553 6.45492C20.2607 4.93273 19.0673 3.73931 17.5451 3.24472C16.7919 3 15.8613 3 14 3C12.1387 3 11.2081 3 10.4549 3.24472C8.93273 3.73931 7.73931 4.93273 7.24472 6.45492C7.18049 6.65258 7.13312 6.86246 7.09819 7.09819M16.9018 16.9018C17 16.2393 17 15.3728 17 14C17 12.1387 17 11.2081 16.7553 10.4549C16.2607 8.93273 15.0673 7.73931 13.5451 7.24472C12.7919 7 11.8613 7 10 7C8.6272 7 7.76066 7 7.09819 7.09819M16.9018 16.9018C16.8669 17.1375 16.8195 17.3474 16.7553 17.5451C16.2607 19.0673 15.0673 20.2607 13.5451 20.7553C12.7919 21 11.8613 21 10 21C8.13872 21 7.20808 21 6.45492 20.7553C4.93273 20.2607 3.73931 19.0673 3.24472 17.5451C3 16.7919 3 15.8613 3 14C3 12.1387 3 11.2081 3.24472 10.4549C3.73931 8.93273 4.93273 7.73931 6.45492 7.24472C6.65258 7.18049 6.86246 7.13312 7.09819 7.09819",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lf(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[tC("path",{d:"M12 6C11.4477 6 11 5.55228 11 5C11 4.44772 11.4477 4 12 4C12.5523 4 13 4.44772 13 5C13 5.55228 12.5523 6 12 6Z",stroke:"currentcolor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),tC("path",{d:"M12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12C13 12.5523 12.5523 13 12 13Z",stroke:"currentcolor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"}),tC("path",{d:"M12 20C11.4477 20 11 19.5523 11 19C11 18.4477 11.4477 18 12 18C12.5523 18 13 18.4477 13 19C13 19.5523 12.5523 20 12 20Z",stroke:"currentcolor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})]})}function lg(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M16 11.0638V12.5C16 13.8807 17.1193 15 18.5 15C19.8807 15 21 13.8807 21 12.5V6.5C21 5.11929 19.8807 4 18.5 4C17.1193 4 16 5.11929 16 6.5V8.26803M16 11.0638C15.9981 11.8772 15.9848 12.3486 15.9004 12.8057C15.812 13.2848 15.6657 13.7513 15.4645 14.1949C15.2378 14.6948 14.9181 15.154 14.2787 16.0725L11.2669 20.3986C11.1903 20.5085 11.1521 20.5634 11.1167 20.6041C10.764 21.0097 10.1537 21.0639 9.73502 20.7268C9.69309 20.6931 9.64573 20.6457 9.55102 20.551C9.38747 20.3874 9.30569 20.3057 9.23586 20.2251C8.55824 19.4437 8.33094 18.3683 8.63439 17.3796C8.66566 17.2777 8.70737 17.1698 8.79074 16.954L8.83852 16.8304C8.97239 16.484 9.03932 16.3108 9.06475 16.1739C9.21585 15.3603 8.67951 14.578 7.86615 14.4256C7.72925 14.4 7.54357 14.4 7.17222 14.4H4.7857C3.82553 14.4 3.34542 14.4 3.00125 14.2049C2.69915 14.0336 2.46584 13.7628 2.34113 13.4387C2.19905 13.0694 2.27007 12.5946 2.4121 11.645L2.94384 8.08995C3.16087 6.63894 3.26938 5.91343 3.62294 5.36807C3.93452 4.88744 4.3772 4.50605 4.89864 4.26899C5.4903 4 6.22388 4 7.69103 4H11.2C12.8802 4 13.7203 4 14.362 4.32698C14.9265 4.6146 15.3854 5.07354 15.673 5.63803C15.9635 6.20815 15.9964 6.93482 16 8.26803M16 11.0638V8.26803",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lh(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[tC("path",{d:"M15.1615 7.17025L15.2093 7.04661C15.2927 6.83088 15.3344 6.72298 15.3656 6.62109C15.6691 5.6323 15.4418 4.55693 14.7642 3.7755C14.6943 3.69498 14.6126 3.6132 14.449 3.44965C14.3543 3.35494 14.3069 3.30758 14.265 3.27382C13.8463 2.93673 13.236 2.99095 12.8833 3.39658C12.848 3.4372 12.8097 3.49217 12.7332 3.60209L9.72134 7.92817C9.08193 8.8466 8.76223 9.30581 8.53555 9.8057C8.33438 10.2494 8.18798 10.7159 8.09959 11.1949C8 11.7347 8 12.2942 8 13.4133V15.2006C8 16.8808 8 17.7209 8.32698 18.3626C8.6146 18.9271 9.07354 19.386 9.63803 19.6737C10.2798 20.0006 11.1198 20.0006 12.8 20.0006H16.309C17.7762 20.0006 18.5097 20.0006 19.1014 19.7317C19.6228 19.4946 20.0655 19.1132 20.3771 18.6326C20.7306 18.0872 20.8392 17.3617 21.0562 15.9107L21.5879 12.3557C21.73 11.4061 21.801 10.9312 21.6589 10.562C21.5342 10.2379 21.3009 9.96707 20.9988 9.79578C20.6546 9.60064 20.1745 9.60064 19.2143 9.60064H16.8278C16.4565 9.60064 16.2708 9.60064 16.1339 9.575C15.3205 9.42264 14.7842 8.64037 14.9353 7.82676C14.9607 7.68983 15.0276 7.51663 15.1615 7.17025Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),tC("path",{d:"M3 11.5006C3 10.1199 4.11929 9.00064 5.5 9.00064C6.88071 9.00064 8 10.1199 8 11.5006V17.5006C8 18.8814 6.88071 20.0006 5.5 20.0006C4.11929 20.0006 3 18.8814 3 17.5006V11.5006Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function lm(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M12.5 19H12.51M11.9 2H13.1C15.3402 2 16.4603 2 17.316 2.43597C18.0686 2.81947 18.6805 3.43139 19.064 4.18404C19.5 5.03968 19.5 6.15979 19.5 8.4V15.6C19.5 17.8402 19.5 18.9603 19.064 19.816C18.6805 20.5686 18.0686 21.1805 17.316 21.564C16.4603 22 15.3402 22 13.1 22H11.9C9.65979 22 8.53968 22 7.68404 21.564C6.93139 21.1805 6.31947 20.5686 5.93597 19.816C5.5 18.9603 5.5 17.8402 5.5 15.6V8.4C5.5 6.15979 5.5 5.03968 5.93597 4.18404C6.31947 3.43139 6.93139 2.81947 7.68404 2.43597C8.53968 2 9.65979 2 11.9 2Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lw(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M10.5 19H14.5M9.9 22H15.1C17.3402 22 18.4603 22 19.316 21.564C20.0686 21.1805 20.6805 20.5686 21.064 19.816C21.5 18.9603 21.5 17.8402 21.5 15.6V8.4C21.5 6.15979 21.5 5.03968 21.064 4.18404C20.6805 3.43139 20.0686 2.81947 19.316 2.43597C18.4603 2 17.3402 2 15.1 2H9.9C7.65979 2 6.53968 2 5.68404 2.43597C4.93139 2.81947 4.31947 3.43139 3.93597 4.18404C3.5 5.03968 3.5 6.15979 3.5 8.4V15.6C3.5 17.8402 3.5 18.9603 3.93597 19.816C4.31947 20.5686 4.93139 21.1805 5.68404 21.564C6.53968 22 7.65979 22 9.9 22Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lx(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M8.5 10H16.5M8.5 14H12.5M21.5 12C21.5 16.9706 17.4706 21 12.5 21C12.0683 21 11.6437 20.9696 11.2283 20.9108C10.0246 20.7406 9.42273 20.6555 9.26429 20.6433C9.0069 20.6234 9.09919 20.6266 8.84105 20.6286C8.68217 20.6298 8.50106 20.6428 8.1393 20.6686L5.98597 20.8224C5.12856 20.8837 4.69982 20.9143 4.37922 20.7623C4.09778 20.6289 3.87113 20.4022 3.7377 20.1208C3.5857 19.8002 3.61632 19.3715 3.67757 18.514L3.83138 16.3607C3.85723 15.9988 3.87015 15.8179 3.87139 15.6589C3.87339 15.4008 3.87659 15.4931 3.85674 15.2357C3.84452 15.0773 3.7594 14.4754 3.58915 13.2717C3.53039 12.8563 3.5 12.4317 3.5 12C3.5 7.02944 7.52944 3 12.5 3C17.4706 3 21.5 7.02944 21.5 12Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lb(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.5 12C2.5 6.47715 6.97715 2 12.5 2C18.0228 2 22.5 6.47715 22.5 12C22.5 17.5228 18.0228 22 12.5 22C12.0213 22 11.55 21.9663 11.0882 21.901L11.0866 21.9008C10.4846 21.8156 10.0362 21.7522 9.71813 21.7085C9.55889 21.6866 9.43528 21.67 9.343 21.6584C9.2969 21.6525 9.26059 21.6481 9.23278 21.645L9.20005 21.6415L9.19071 21.6406L9.18748 21.6403L9.04819 21.6293C9.01913 21.627 9.01635 21.6271 9.01836 21.6271C9.02038 21.6272 9.0176 21.627 8.98845 21.6272L8.84881 21.6286C8.72957 21.6295 8.58696 21.6392 8.21053 21.6661L6.01918 21.8226C5.62316 21.8509 5.26476 21.8765 4.96679 21.8722C4.64953 21.8676 4.2976 21.8303 3.95082 21.6659C3.46091 21.4336 3.06638 21.0391 2.83411 20.5492C2.6697 20.2024 2.63237 19.8505 2.62777 19.5332C2.62345 19.2353 2.64908 18.8769 2.67739 18.4809L2.83392 16.2895C2.86081 15.9129 2.87049 15.7705 2.87142 15.6512L2.87277 15.5115C2.87295 15.4909 2.87285 15.4816 2.87285 15.4816C2.87285 15.4816 2.8723 15.4723 2.8707 15.4518L2.8597 15.3126L2.85958 15.3112L2.85941 15.3093L2.85852 15.2999L2.85501 15.2672C2.85187 15.2394 2.84749 15.2031 2.84165 15.157C2.82996 15.0647 2.81341 14.9411 2.79152 14.7819C2.74776 14.4636 2.68426 14.0145 2.59901 13.4118C2.5337 12.95 2.5 12.4787 2.5 12ZM8.5 9C7.94772 9 7.5 9.44772 7.5 10C7.5 10.5523 7.94772 11 8.5 11H16.5C17.0523 11 17.5 10.5523 17.5 10C17.5 9.44772 17.0523 9 16.5 9H8.5ZM8.5 13C7.94772 13 7.5 13.4477 7.5 14C7.5 14.5523 7.94772 15 8.5 15H12.5C13.0523 15 13.5 14.5523 13.5 14C13.5 13.4477 13.0523 13 12.5 13H8.5Z",fill:"currentcolor"})})}function lv(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M10.0391 14.4609L4.56343 11.4746C3.1344 10.6952 3.14856 8.64068 4.58807 7.90084C8.55782 5.86056 12.779 4.34556 17.1459 3.39374C18.3998 3.12044 19.8328 2.56333 20.8847 3.61527C21.9367 4.66721 21.3796 6.10024 21.1063 7.35412C20.1544 11.721 18.6394 15.9422 16.5992 19.9119C15.8593 21.3514 13.8048 21.3656 13.0254 19.9366L10.0391 14.4609ZM10.0391 14.4609L13.3477 11.1523",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function ly(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M19.0263 2.00948C19.8562 1.95563 20.7989 2.11511 21.5918 2.908C22.3847 3.70089 22.5442 4.64362 22.4903 5.47355C22.4536 6.03967 22.3016 6.66092 22.1823 7.14885C22.1445 7.30352 22.1099 7.44506 22.0833 7.56692C21.113 12.0186 19.5686 16.3218 17.4885 20.3689C16.3748 22.5359 13.3038 22.5355 12.1474 20.4152L10.1593 16.7698C9.94691 16.3803 10.0164 15.8975 10.3301 15.5839L14.0548 11.8592C14.4453 11.4687 14.4453 10.8355 14.0548 10.445C13.6643 10.0545 13.0311 10.0545 12.6406 10.445L8.91589 14.1697C8.60222 14.4833 8.11942 14.5529 7.72998 14.3405L4.0846 12.3524C1.96436 11.196 1.96392 8.12501 4.13093 7.01127C8.17802 4.93125 12.4812 3.38681 16.9329 2.41651C17.0548 2.38994 17.1962 2.35537 17.3509 2.31751C17.8389 2.19817 18.4601 2.04621 19.0263 2.00948Z",fill:"currentcolor"})})}function l_(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M15 20.9999V16C15 14.3431 13.6569 13 12 13C10.3431 13 9 14.3431 9 16V20.9999M15 20.9999C16.9767 20.9983 18.0128 20.9732 18.816 20.564C19.5686 20.1805 20.1805 19.5686 20.564 18.816C21 17.9603 21 16.8402 21 14.6V12.7587C21 11.7418 21 11.2334 20.8813 10.7571C20.7761 10.3349 20.6028 9.93275 20.3681 9.56641C20.1033 9.15313 19.7337 8.80402 18.9944 8.1058L16.3944 5.65025C14.8479 4.18966 14.0746 3.45937 13.1925 3.18385C12.416 2.94132 11.584 2.94132 10.8075 3.18385C9.92537 3.45937 9.15211 4.18966 7.60561 5.65025L5.00561 8.1058C4.26632 8.80402 3.89667 9.15313 3.63191 9.56641C3.39721 9.93275 3.22385 10.3349 3.11866 10.7571C3 11.2334 3 11.7418 3 12.7587V14.6C3 16.8402 3 17.9603 3.43597 18.816C3.81947 19.5686 4.43139 20.1805 5.18404 20.564C5.98717 20.9732 7.0233 20.9983 9 20.9999M15 20.9999C13 21.0014 11 21.0014 9 20.9999",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lC(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[tC("path",{d:"M10.5094 2.22933C11.48 1.92616 12.5201 1.92616 13.4907 2.22933C14.1 2.41965 14.6264 2.7554 15.171 3.19337C15.6991 3.61803 16.3032 4.18862 17.0509 4.89477L19.7673 7.46022C20.4238 8.07983 20.8781 8.50869 21.2102 9.02697C21.5035 9.4849 21.7202 9.98762 21.8517 10.5153C22.0005 11.1126 22.0003 11.7373 22.0001 12.64L22 14.6428C22.0001 15.7266 22.0001 16.6008 21.9422 17.3086C21.8827 18.0375 21.7569 18.6777 21.4551 19.2699C20.9757 20.2108 20.2108 20.9757 19.27 21.455C18.7137 21.7385 18.1161 21.8664 17.4427 21.9303C17.0216 21.9704 16.5438 21.9873 16 21.9945V16C16 13.7909 14.2091 12 12 12C9.79086 12 8 13.7909 8 16V21.9945C7.45622 21.9873 6.97848 21.9704 6.5574 21.9303C5.88404 21.8664 5.28637 21.7385 4.73009 21.455C3.78928 20.9757 3.02438 20.2108 2.54501 19.2699C2.24323 18.6777 2.11741 18.0375 2.05786 17.3086C2.00003 16.6007 2.00004 15.7266 2.00005 14.6428L2.00002 12.6401C1.99975 11.7374 1.99956 11.1126 2.14838 10.5153C2.27986 9.98762 2.49656 9.4849 2.78993 9.02697C3.12196 8.50869 3.57631 8.07984 4.23278 7.46022L6.94916 4.89478C7.69685 4.18862 8.30099 3.61803 8.82906 3.19337C9.37368 2.7554 9.90005 2.41965 10.5094 2.22933Z",fill:"currentcolor"}),tC("path",{d:"M14 22.0005C12.6667 22.0012 11.3333 22.0012 10 22.0005V16C10 14.8954 10.8954 14 12 14C13.1046 14 14 14.8954 14 16V22.0005Z",fill:"currentcolor"})]})}function lk(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M8.5 10.1392C9.56206 11.601 10.8071 12.9104 12.2021 14.0334C12.3774 14.1744 12.6226 14.1744 12.7979 14.0334C14.1929 12.9104 15.4379 11.601 16.5 10.1392",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lN(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M14.6252 8.13916C13.1634 9.20122 11.854 10.4462 10.731 11.8413C10.59 12.0165 10.59 12.2618 10.731 12.437C11.854 13.8321 13.1634 15.0771 14.6252 16.1392",stroke:"currentcolor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})})}function lS(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M8.5 14C9.56206 12.5381 10.8071 11.2287 12.2021 10.1058C12.3774 9.96473 12.6226 9.96473 12.7979 10.1058C14.1929 11.2287 15.4379 12.5381 16.5 14",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lE(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:tC("path",{d:"M9.5 18C11.6808 16.423 13.6364 14.5771 15.3172 12.5101C15.5609 12.2103 15.5609 11.7897 15.3172 11.4899C13.6364 9.42294 11.6808 7.57701 9.5 6",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lT(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",children:[tC("path",{d:"M18.01 1.47027C18.4068 1.47426 18.7637 1.71248 18.9196 2.07739C19.4627 3.34897 19.8386 4.68506 20.0381 6.05218C20.137 6.73026 19.7578 7.38707 19.1211 7.64042C17.8374 8.15121 16.4924 8.49379 15.1196 8.65919C14.7256 8.70665 14.3409 8.51669 14.139 8.17506C13.9372 7.83343 13.9564 7.40476 14.1881 7.08259L14.5456 6.58536C14.7872 6.24933 15.0196 5.907 15.2425 5.55877C12.031 4.18655 8.2276 5.39961 6.43766 8.49987C5.54968 10.0379 5.31163 11.7703 5.63802 13.3844C5.74749 13.9257 5.3974 14.4533 4.85607 14.5627C4.31474 14.6722 3.78717 14.3221 3.6777 13.7808C3.25843 11.7074 3.5647 9.47598 4.70561 7.49987C7.04907 3.44089 12.0768 1.89791 16.252 3.81865C16.4583 3.42411 16.6533 3.02347 16.8366 2.6172L17.0884 2.05897C17.2516 1.69727 17.6132 1.46627 18.01 1.47027Z",fill:"currentcolor"}),tC("path",{d:"M20.2569 9.80398C20.8028 9.72028 21.3132 10.095 21.3969 10.6409C21.6962 12.5926 21.3578 14.6575 20.2941 16.4999C17.9504 20.5592 12.9219 22.1021 8.74654 20.1806C8.54071 20.5742 8.34621 20.9739 8.16334 21.3793L7.91148 21.9375C7.74829 22.2992 7.38668 22.5302 6.9899 22.5262C6.59311 22.5222 6.23622 22.284 6.08034 21.9191C5.53718 20.6475 5.16137 19.3114 4.96187 17.9443C4.86292 17.2662 5.24212 16.6094 5.87883 16.356C7.16254 15.8453 8.50755 15.5027 9.88034 15.3373C10.2743 15.2898 10.6591 15.4798 10.8609 15.8214C11.0628 16.163 11.0435 16.5917 10.8119 16.9139L10.4544 17.4111C10.2121 17.748 9.97919 18.0912 9.75575 18.4404C12.9676 19.8136 16.7718 18.6006 18.562 15.4999C19.3902 14.0654 19.6528 12.4624 19.42 10.944C19.3363 10.3981 19.711 9.88768 20.2569 9.80398Z",fill:"currentcolor"})]})}function lL(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M16 21H11M20.6619 17.5986C20.3362 17.5009 20.1734 17.452 20.0131 17.406C14.7771 15.9005 9.2229 15.9005 3.98686 17.406C3.82662 17.452 3.66379 17.5009 3.33814 17.5986C3.29255 17.6122 3.26975 17.6191 3.25197 17.6237C2.63314 17.7848 2.02416 17.3317 2.00067 16.6927C2 16.6744 2 16.6506 2 16.603V4.39707C2 4.34947 2 4.32567 2.00067 4.30731C2.02416 3.66828 2.63314 3.21518 3.25197 3.37631C3.26975 3.38094 3.29255 3.38778 3.33814 3.40145C3.66379 3.49915 3.82662 3.548 3.98686 3.59407C9.2229 5.09947 14.7771 5.09947 20.0131 3.59407C20.1734 3.548 20.3362 3.49915 20.6619 3.40145C20.7075 3.38778 20.7302 3.38094 20.748 3.37631C21.3669 3.21518 21.9758 3.66828 21.9993 4.30731C22 4.32567 22 4.34947 22 4.39707V16.603C22 16.6506 22 16.6744 21.9993 16.6927C21.9758 17.3317 21.3669 17.7848 20.748 17.6237C20.7302 17.6191 20.7075 17.6122 20.6619 17.5986Z",stroke:"currentcolor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}function lI(e){return tC("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:tC("path",{d:"M12 11.9999V15.9999M12 8.6249V8.62378M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",stroke:"currentcolor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}let lO=({code:e})=>{let[t,n]=ep(!1),[r,i]=ep(!1);return tC("button",{onClick:async()=>{i(!0),setTimeout(()=>{i(!1),n(!0)},150),await navigator.clipboard.writeText(e),setTimeout(()=>n(!1),1500)},className:`absolute top-0 right-0 flex items-center text-xss text-slate-500 hover:text-slate-800 gap-1 px-1 py-0 font-medium cursor-pointer transition-all duration-150 ease-out ${r?"scale-95":"scale-100"}`,"aria-label":"Copy code to clipboard",children:t?tC(M,{children:[tC(lo,{size:10,className:"text-green-500"}),"Copied!"]}):tC(M,{children:[tC(lp,{className:"w-[10px] h-[10px]"}),"Copy"]})})};var lA=({message:e})=>tC("p",{className:"markdown-parent-container",children:tC(aB,{remarkPlugins:[o4,o9],components:{table:({node:e,...t})=>tC("div",{className:"markdown-table-wrapper",children:tC("table",{...t})}),hr:()=>tC("hr",{style:{border:"none",borderTop:"1px solid #D4D4D8",width:"100%"}}),a:({href:e,children:t,...n})=>tC("a",{href:e,target:"_blank",rel:"noopener noreferrer",...n,children:t}),h2:({...e})=>tC("h2",{className:"text-sm font-semibold",...e}),h3:({...e})=>tC("h3",{className:"text-sm font-semibold",...e}),h4:({...e})=>tC("h4",{className:"text-sm font-semibold",...e}),h5:({...e})=>tC("h5",{className:"text-sm font-semibold",...e}),h6:({...e})=>tC("h6",{className:"text-sm font-semibold",...e}),code({inline:e,children:t}){let n=String(t);return e?tC("code",{className:"text-[12px]",children:n}):tC("div",{className:"relative bg-[#f9fafb] text-[12px] rounded-lg font-mono pt-2",children:[tC("div",{className:"absolute top-0.5 right-1 z-10",children:tC(lO,{code:n})}),tC("div",{className:"overflow-auto rounded-lg p-4",children:tC("pre",{className:"text-[12px] font-mono leading-relaxed",children:tC("code",{className:"whitespace-pre",children:function(e){let t=e.split("\n");return t.map((e,n)=>{let r=[],i=e,a=0;for(;i.length>0;){let e=`${n}-${a++}`,t=i.match(/^(\/\/.*)/);if(t){r.push(tC("span",{className:"text-gray-500 italic",children:t[1]},`${e}-comment`)),i=i.slice(t[1].length);continue}let o=i.match(/^(['"`])(?:\\.|[^\\])*?\1/);if(o){r.push(tC("span",{className:"text-green-600",children:o[0]},`${e}-string`)),i=i.slice(o[0].length);continue}let l=i.match(/^(const|let|var|function|return|if|else|for|while|import|from|export|new|await|async|class|extends|super|this)\b/);if(l){r.push(tC("span",{className:"text-blue-700 font-semibold",children:l[0]},`${e}-keyword`)),i=i.slice(l[0].length);continue}let s=i.match(/^(true|false|null|undefined)\b/);if(s){r.push(tC("span",{className:"text-amber-700",children:s[0]},`${e}-literal`)),i=i.slice(s[0].length);continue}let c=i.match(/^(\d+)/);if(c){r.push(tC("span",{className:"text-red-500",children:c[0]},`${e}-number`)),i=i.slice(c[0].length);continue}r.push(tC("span",{children:i[0]},`${e}-char`)),i=i.slice(1)}return tC(tv.Fragment,{children:[r,n<t.length-1?tC("br",{}):null]},`line-${n}`)})}(n)})})})]})}},children:"string"==typeof e?e:JSON.stringify(e)})});"use strict";let lD=()=>{let e=tH(),{hasRecentConversation:t,recentConversation:n}=t7(e?.data?.id),[r,i]=ep(!1),a=n?.events||[],o=a[a.length-1],l=o?.time,s=o?.type==="received"?o.message?.output?.[0]?.value?.value:o?.message?.input?.value;return tC(M,{children:t&&tC("div",{className:"w-full flex items-center gap-2.5 pl-5 pr-4 py-3 rounded-xl bg-white cursor-pointer max-h-[200px]",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:()=>t1.trigger.selectTab({tab:uC.CHAT}),style:{border:`1px solid ${r?e?.data?.brand_color:"#e4e4e7"}`},children:[tC("div",{className:"flex-col items-start gap-1 flex-1 grow flex w-[91%]",children:[tC("div",{className:"flex-col items-start gap-1 self-stretch w-full flex",children:[tC("div",{className:"flex-col items-start gap-[18px] self-stretch w-full flex",children:tC("h3",{className:"w-fit mt-[-1.00px] text-sm font-semibold text-[#020618]",children:"Recent messages"})}),tC("div",{title:"Hello! Thanks for contacting us! all of our team",className:"flex-col items-start gap-[18px] self-stretch w-full flex",children:tC("p",{className:"self-stretch mt-[-1.00px] max-h-8 text-sm text-[#020618] leading-5 whitespace-nowrap overflow-hidden text-ellipsis w-full",children:tC(lA,{message:s})})})]}),tC("div",{className:"items-center gap-1.5 self-stretch w-full flex",children:tC("span",{className:"text-xs text-[#62748e]",children:t8(l)})})]}),tC("div",{className:"inline-flex items-center",children:tC("svg",{style:{color:r?e?.data?.brand_color:"#b8b8b8"},width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:tC("path",{d:"M9 18l6-6-6-6"})})})]})})},lM=()=>{let e=tH(),[t,n]=ep(!1);return tC(M,{children:tC("div",{className:"p-5 ",children:[tC(lD,{}),tC("div",{className:"flex flex-col gap-2 mt-2",children:tC("button",{className:"flex w-full items-center justify-between rounded-xl pl-5 pr-4 py-[13px] text-sm font-medium text-slate-950 cursor-pointer",onClick:()=>{localStorage.setItem("Tab","Chat"),t1.trigger.selectTab({tab:uC.CHAT}),t1.send({type:"handleExitChatState",value:!1})},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),style:{border:`1px solid ${t?e?.data?.brand_color:"#e4e4e7"}`},children:[tC("span",{className:"self-stretch mt-[-1.00px] text-sm text-[#020618]",children:e?.data?.send_message_description}),tC("svg",{style:{color:t?e?.data?.brand_color:"#b8b8b8"},width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:tC("path",{d:"M9 18l6-6-6-6"})})]})})]})})},lF=({children:e,content:t,position:n="top",className:r=""})=>{let[i,a]=ep(!1);return tC("div",{className:`relative inline-block ${r}`,children:[tC("div",{onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onFocus:()=>a(!0),onBlur:()=>a(!1),className:"inline-block",children:e}),tC("div",{role:"tooltip","aria-hidden":!i,className:`custom-tooltip absolute px-2 py-1 leading-[18px] z-50 text-xs text-white bg-black rounded-md shadow-md whitespace-nowrap
2
+ ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"}[n]}
3
+ ${i?"custom-tooltip--visible":""}
4
+ `,style:{transformOrigin:"top"===n?"bottom center":"bottom"===n?"top center":"left"===n?"center right":"center left"},children:[t,tC("div",{className:`absolute w-2 h-2 bg-black rotate-45 ${{top:"left-1/2 -bottom-1 translate-x-[-50%]",bottom:"left-1/2 -top-1 translate-x-[-50%]",left:"-right-1 top-1/2 translate-y-[-50%]",right:"-left-1 top-1/2 translate-y-[-50%]"}[n]}`})]})]})},lR=({switchTab:e,isExpanded:t})=>{let n=tH(),[r,i]=tv.useState(!1),[a,o]=tv.useState(!1);function l(e){3===(e=e.replace(/^#/,"")).length&&(e=e.split("").map(e=>e+e).join(""));let t=parseInt(e,16);return`rgb(${t>>16&255}, ${t>>8&255}, ${255&t}, 0.1)`}let s=()=>{t!==tK.DEFAULT?(t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),setTimeout(()=>{t1.trigger.selectTab({tab:uC.HOME})},300)):t1.trigger.selectTab({tab:uC.HOME})};return tC(M,{children:tC("div",{className:"flex items-center justify-center gap-10 border-t border-zinc-200 bg-white px-8 py-3 z-50",children:[tC(lF,{content:"Home",children:tC("button",{className:"rounded-lg cursor-pointer p-1.5",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:()=>s(),style:{background:"home"==e?n?.data?.brand_color?l(n?.data?.brand_color):"#EBEFFF":"",color:"home"==e||r?n?.data?.brand_color?n?.data?.brand_color:"#45556c":"#62748e"},children:"home"==e?tC(lC,{style:{color:n?.data?.brand_color??"#564CFF"}}):tC(l_,{})})}),tC(lF,{content:"Recent chats",children:tC("button",{className:"rounded-lg cursor-pointer p-1.5",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:()=>t1.trigger.selectTab({tab:uC.RECENT_MESSAGE_LIST}),style:{background:"recentMessageList"==e?n?.data?.brand_color?l(n?.data?.brand_color):"#EBEFFF":"",color:"recentMessageList"==e||a?n?.data?.brand_color?n?.data?.brand_color:"#45556c":"#62748e"},children:"recentMessageList"==e?tC(lb,{style:{color:n?.data?.brand_color??"#564CFF"}}):tC(lx,{})})})]})})},lP=e=>{let t,n,r;if(e?.startsWith("#")){let i=e.slice(1);if(3===i.length&&(i=i.split("").map(e=>e+e).join("")),6===i.length){let e=parseInt(i,16);t=e>>16&255,n=e>>8&255,r=255&e}}else if(e?.startsWith("rgb")){let i=e.match(/\d+/g);i&&i.length>=3&&([t,n,r]=i.map(Number))}return void 0===t||void 0===n||void 0===r?"light":170>Math.sqrt(t*t*.299+n*n*.587+r*r*.114)?"dark":"light"},lz=({toggleWidget:e})=>{let t=tH(),{status:n}=t;return"NOT_STARTED"===n||"WIDGET_LOADING"===n||"INVALID_STATE"===n?null:tC("div",{className:`relative h-[40%] w-full rounded-[22px] ${t?.data?.welcome_text_color&&"light"==lP(t?.data?.welcome_text_color)?"bg-widget-home-light-top":"bg-widget-home-dark-top"}`,children:[tC("div",{className:"absolute top-0 left-0 w-full h-full rounded-[22px]",style:{backgroundColor:t.data?.home_background_color},children:tC("div",{className:"absolute top-0 left-0 w-full h-full z-[0] rounded-[22px] opacity-90",style:{backgroundImage:`url(${t.data?.home_cover_image})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},children:tC("button",{className:"absolute top-6 right-6 hover:bg-white/10 rounded-lg p-1.5 cursor-pointer flex items-start h-max",style:{mixBlendMode:"difference"},onClick:e,children:tC("svg",{style:{mixBlendMode:"difference"},width:"20",height:"20",viewBox:"0 0 24 24",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:tC("path",{d:"M18 6L6 18M6 6l12 12"})})})})}),tC("div",{className:"flex justify-start p-6 z-10 absolute w-2/3",children:tC("img",{className:"h-[32] w-auto cursor-pointer",src:t?.data?.home_header_logo})}),tC("div",{className:"flex flex-col absolute bottom-[1.2rem] left-[1.5rem]",children:[tC("span",{className:"text-2xl font-semibold leading-8 ",style:{color:t?.data?.welcome_text_color},children:t?.data?.home_header_title}),tC("span",{className:"text-base font-medium leading-6",style:{color:t?.data?.welcome_text_color},children:t?.data?.home_header_description})]})]})},lj=({toggleWidget:e,switchTab:t,isExpanded:n})=>tC(M,{children:[tC(lz,{toggleWidget:e}),tC("div",{className:"flex flex-1 flex-col justify-between",children:[tC(lM,{}),tC(lR,{switchTab:t,isExpanded:n})]})]});var lU={};Object.defineProperty(lU,"__esModule",{value:!0});var lB=function(e){return e&&"object"==typeof e&&"default"in e?e.default:e}(p),lV=d("bhCSz"),lW=new lV,lH=lW.getBrowser(),l$=lW.getCPU(),lq=lW.getDevice(),lY=lW.getEngine(),lG=lW.getOS(),lJ=lW.getUA(),lZ=function(e){return lW.setUA(e)},lK=function(e){if(!e)return void console.error("No userAgent string was provided");var t=new lV(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}},lX=Object.freeze({ClientUAInstance:lW,browser:lH,cpu:l$,device:lq,engine:lY,os:lG,ua:lJ,setUa:lZ,parseUserAgent:lK});function lQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l1(e){return(l1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l0(){return(l0=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l2(e){return(l2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l5(e,t){return(l5=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l3(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l4(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l9={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},l8={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},l7={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},se={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},st=function(e){switch(e){case l9.Mobile:return{isMobile:!0};case l9.Tablet:return{isTablet:!0};case l9.SmartTv:return{isSmartTV:!0};case l9.Console:return{isConsole:!0};case l9.Wearable:return{isWearable:!0};case l9.Browser:return{isBrowser:!0};case l9.Embedded:return{isEmbedded:!0};default:return se}},sn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none";return e||t},sr=function(){return!!("undefined"!=typeof window&&(window.navigator||navigator))&&(window.navigator||navigator)},si=function(e){var t=sr();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},sa=function(e){return e.type===l9.Mobile},so=function(e){return e.type===l9.Tablet},sl=function(e){var t=e.type;return t===l9.Mobile||t===l9.Tablet},ss=function(e){return e.type===l9.SmartTv},sc=function(e){return e.type===l9.Browser},sd=function(e){return e.type===l9.Wearable},su=function(e){return e.type===l9.Console},sp=function(e){return e.type===l9.Embedded},sf=function(e){return sn(e.vendor)},sg=function(e){return sn(e.model)},sh=function(e){return sn(e.type,"browser")},sm=function(e){return e.name===l7.Android},sw=function(e){return e.name===l7.Windows},sx=function(e){return e.name===l7.MAC_OS},sb=function(e){return e.name===l7.WindowsPhone},sv=function(e){return e.name===l7.IOS},sy=function(e){return sn(e.version)},s_=function(e){return sn(e.name)},sC=function(e){return e.name===l8.Chrome},sk=function(e){return e.name===l8.Firefox},sN=function(e){return e.name===l8.Chromium},sS=function(e){return e.name===l8.Edge},sE=function(e){return e.name===l8.Yandex},sT=function(e){var t=e.name;return t===l8.Safari||t===l8.MobileSafari},sL=function(e){return e.name===l8.MobileSafari},sI=function(e){return e.name===l8.Opera},sO=function(e){var t=e.name;return t===l8.InternetExplorer||t===l8.Ie},sA=function(e){return e.name===l8.MIUI},sD=function(e){return e.name===l8.SamsungBrowser},sM=function(e){return sn(e.version)},sF=function(e){return sn(e.major)},sR=function(e){return sn(e.name)},sP=function(e){return sn(e.name)},sz=function(e){return sn(e.version)},sj=function(){var e=sr(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},sU=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},sB=function(){var e=sr();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},sV=function(){return si("iPad")},sW=function(){return si("iPhone")},sH=function(){return si("iPod")},s$=function(e){return sn(e)};function sq(e){var t=e||lX,n=t.device,r=t.browser,i=t.os,a=t.engine,o=t.ua;return{isSmartTV:ss(n),isConsole:su(n),isWearable:sd(n),isEmbedded:sp(n),isMobileSafari:sL(r)||sV(),isChromium:sN(r),isMobile:sl(n)||sV(),isMobileOnly:sa(n),isTablet:so(n)||sV(),isBrowser:sc(n),isDesktop:sc(n),isAndroid:sm(i),isWinPhone:sb(i),isIOS:sv(i)||sV(),isChrome:sC(r),isFirefox:sk(r),isSafari:sT(r),isOpera:sI(r),isIE:sO(r),osVersion:sy(i),osName:s_(i),fullBrowserVersion:sM(r),browserVersion:sF(r),browserName:sR(r),mobileVendor:sf(n),mobileModel:sg(n),engineName:sP(a),engineVersion:sz(a),getUA:s$(o),isEdge:sS(r)||sU(o),isYandex:sE(r),deviceType:sh(n),isIOS13:sB(),isIPad13:sV(),isIPhone13:sW(),isIPod13:sH(),isElectron:sj(),isEdgeChromium:sU(o),isLegacyEdge:sS(r)&&!sU(o),isWindows:sw(i),isMacOs:sx(i),isMIUI:sA(r),isSamsungBrowser:sD(r)}}var sY=ss(lq),sG=su(lq),sJ=sd(lq),sZ=sp(lq),sK=sL(lH)||sV(),sX=sN(lH),sQ=sl(lq)||sV(),s1=sa(lq),s0=so(lq)||sV(),s2=sc(lq),s5=sc(lq),s3=sm(lG),s4=sb(lG),s6=sv(lG)||sV(),s9=sC(lH),s8=sk(lH),s7=sT(lH),ce=sI(lH),ct=sO(lH),cn=sy(lG),cr=s_(lG),ci=sM(lH),ca=sF(lH),co=sR(lH),cl=sf(lq),cs=sg(lq),cc=sP(lY),cd=sz(lY),cu=s$(lJ),cp=sS(lH)||sU(lJ),cf=sE(lH),cg=sh(lq),ch=sB(),cm=sV(),cw=sW(),cx=sH(),cb=sj(),cv=sU(lJ),cy=sS(lH)&&!sU(lJ),c_=sw(lG),cC=sx(lG),ck=sA(lH),cN=sD(lH);function cS(e){return lK(e||window.navigator.userAgent)}lU.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return s3?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.BrowserTypes=l8,lU.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return s2?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return sG?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.CustomView=function(e){var t=e.renderWithFragment,n=e.children,r=(e.viewClassName,e.style,e.condition),i=l3(e,["renderWithFragment","children","viewClassName","style","condition"]);return r?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",i,n):null},lU.IEView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return ct?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.IOSView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return s6?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children,r=(e.viewClassName,e.style,l3(e,["renderWithFragment","children","viewClassName","style"]));return s1?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.MobileView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return sQ?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.OsTypes=l7,lU.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return sY?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.TabletView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return s0?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.WearableView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return sJ?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,r=l3(e,["renderWithFragment","children"]);return s4?t?lB.createElement(p.Fragment,null,n):lB.createElement("div",r,n):null},lU.browserName=co,lU.browserVersion=ca,lU.deviceDetect=function(e){var t,n,r,i,a=e?lK(e):lX,o=a.device,l=a.browser,s=a.engine,c=a.os,d=a.ua,u=st(o.type),p=u.isBrowser,f=u.isMobile,g=u.isTablet,h=u.isSmartTV,m=u.isConsole,w=u.isWearable,x=u.isEmbedded;if(p)return{isBrowser:p,browserMajorVersion:sn(l.major),browserFullVersion:sn(l.version),browserName:sn(l.name),engineName:sn(s.name),engineVersion:sn(s.version),osName:sn(c.name),osVersion:sn(c.version),userAgent:sn(d)};if(h)return{isSmartTV:h,engineName:sn(s.name),engineVersion:sn(s.version),osName:sn(c.name),osVersion:sn(c.version),userAgent:sn(d)};if(m)return{isConsole:m,engineName:sn(s.name),engineVersion:sn(s.version),osName:sn(c.name),osVersion:sn(c.version),userAgent:sn(d)};if(f||g){return t=u,n=o,r=c,i=d,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lQ(Object(n),!0).forEach(function(t){var r,i,a;r=e,i=t,a=n[t],i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lQ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},t,{vendor:sn(n.vendor),model:sn(n.model),os:sn(r.name),osVersion:sn(r.version),ua:sn(i)})}return w?{isWearable:w,engineName:sn(s.name),engineVersion:sn(s.version),osName:sn(c.name),osVersion:sn(c.version),userAgent:sn(d)}:x?{isEmbedded:x,vendor:sn(o.vendor),model:sn(o.model),engineName:sn(s.name),engineVersion:sn(s.version),osName:sn(c.name),osVersion:sn(c.version),userAgent:sn(d)}:void 0},lU.deviceType=cg,lU.engineName=cc,lU.engineVersion=cd,lU.fullBrowserVersion=ci,lU.getSelectorsByUserAgent=function(e){if(!e||"string"!=typeof e)return void console.error("No valid user agent string was provided");var t=lK(e);return sq({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})},lU.getUA=cu,lU.isAndroid=s3,lU.isBrowser=s2,lU.isChrome=s9,lU.isChromium=sX,lU.isConsole=sG,lU.isDesktop=s5,lU.isEdge=cp,lU.isEdgeChromium=cv,lU.isElectron=cb,lU.isEmbedded=sZ,lU.isFirefox=s8,lU.isIE=ct,lU.isIOS=s6,lU.isIOS13=ch,lU.isIPad13=cm,lU.isIPhone13=cw,lU.isIPod13=cx,lU.isLegacyEdge=cy,lU.isMIUI=ck,lU.isMacOs=cC,lU.isMobile=sQ,lU.isMobileOnly=s1,lU.isMobileSafari=sK,lU.isOpera=ce,lU.isSafari=s7,lU.isSamsungBrowser=cN,lU.isSmartTV=sY,lU.isTablet=s0,lU.isWearable=sJ,lU.isWinPhone=s4,lU.isWindows=c_,lU.isYandex=cf,lU.mobileModel=cs,lU.mobileVendor=cl,lU.osName=cr,lU.osVersion=cn,lU.parseUserAgent=lK,lU.setUserAgent=function(e){return lZ(e)},lU.useDeviceData=cS,lU.useDeviceSelectors=function(e){var t=cS(e||window.navigator.userAgent);return[sq(t),t]},lU.useMobileOrientation=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=p.useState(function(){var e=90*(window.innerWidth>window.innerHeight);return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}))||function(e,t){var n,r,i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var a=[],o=!0,l=!1;try{for(i=i.call(e);!(o=(n=i.next()).done)&&(a.push(n.value),a.length!==t);o=!0);}catch(e){l=!0,r=e}finally{try{o||null==i.return||i.return()}finally{if(l)throw r}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return l6(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l6(e,t)}}(e,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=t[0],r=t[1],i=p.useCallback(function(){var e=90*(window.innerWidth>window.innerHeight),t={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};n.orientation!==t.orientation&&r(t)},[n.orientation]);return p.useEffect(function(){return("undefined"==typeof window?"undefined":l1(window))!==void 0&&sQ&&(i(),window.addEventListener("load",i,!1),window.addEventListener("resize",i,!1)),function(){window.removeEventListener("resize",i,!1),window.removeEventListener("load",i,!1)}},[i]),n},lU.withOrientationChange=function(e){return function(t){var n;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");function r(e){var t;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return l4(e)}(this,l2(r).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(l4(t)),t.onOrientationChange=t.onOrientationChange.bind(l4(t)),t.onPageLoad=t.onPageLoad.bind(l4(t)),t.state={isLandscape:!1,isPortrait:!1},t}return r.prototype=Object.create(t&&t.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),t&&l5(r,t),n=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=90*(window.innerWidth>window.innerHeight);this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){("undefined"==typeof window?"undefined":l1(window))!==void 0&&sQ&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return lB.createElement(e,l0({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,n),r}(lB.Component)};var cE={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let cT=new Uint8Array(16),cL=[];for(let e=0;e<256;++e)cL.push((e+256).toString(16).slice(1));var cI=function(t,n,r){if(cE.randomUUID&&!n&&!t)return cE.randomUUID();let i=(t=t||{}).random??t.rng?.()??function(){if(!e){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");e=crypto.getRandomValues.bind(crypto)}return e(cT)}();if(i.length<16)throw Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){if((r=r||0)<0||r+16>n.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)n[r+e]=i[e];return n}return function(e,t=0){return(cL[e[t+0]]+cL[e[t+1]]+cL[e[t+2]]+cL[e[t+3]]+"-"+cL[e[t+4]]+cL[e[t+5]]+"-"+cL[e[t+6]]+cL[e[t+7]]+"-"+cL[e[t+8]]+cL[e[t+9]]+"-"+cL[e[t+10]]+cL[e[t+11]]+cL[e[t+12]]+cL[e[t+13]]+cL[e[t+14]]+cL[e[t+15]]).toLowerCase()}(i)};let cO=/https?:\/\/(?:www\.)?[a-zA-Z0-9@:%._+~#=-]{2,256}\.[a-z]{2,6}\b[-a-zA-Z0-9@:%_+.~#?&/=]*/,cA=({text:e})=>tC("span",{style:{whiteSpace:"pre-wrap",fontSize:"clamp(0.875rem, calc(0.625rem + 0.3125vw))",lineHeight:"20px"},children:e}),cD=({text:e})=>{let t=e.split("\n"),n=t[t.length-1];return tC(M,{children:[t.slice(0,-1).map((e,t)=>tC(tv.Fragment,{children:[tC(cA,{text:e}),tC("br",{})]},t)),tC(cA,{text:n})]})},cM=({text:e})=>tC(M,{children:(function(e){let t=[],n=e;for(;n;){let e=n.match(cO);if(!e){t.push({type:"normal_str",value:n});break}if(0!==e.index){t.push({type:"normal_str",value:n.slice(0,e.index)}),t.push({type:"url",value:e[0]}),n=n.slice(e.index+e[0].length);continue}t.push({type:"url",value:e[0]}),n=n.slice(e[0].length)}return t})(e).map(({type:e,value:t},n)=>"url"===e?tC("a",{href:t,target:"_blank",rel:"noreferrer",children:t},n):tC(cD,{text:t},n))});function cF({mdText:e}){return"string"==typeof e?tC(cM,{text:e}):"string"==typeof e.value?tC(cM,{text:e.value}):tC(cV,{mdText:e.value})}let cR=e=>{switch(e){case"strong":return"-mt-[1px] text-sm font-semibold";case"em":return"-mt-[1px] text-sm italic";case"u":return"-mt-[1px] text-sm underline";case"s":return"-mt-[1px] text-sm line-through";default:return""}},cP=e=>{let t=({mdText:t})=>tC(e,{className:cR(e),children:tC(cV,{mdText:t.value})});return t.displayName=`normalWrapper(${e})`,t},cz=e=>{let t=({mdText:t})=>tC(e,{children:t.value.map((e,t)=>tC("li",{children:tC(cV,{mdText:e})},t))});return t.displayName=`listWrapper(${e})`,t};function cj(e,t){let n=cU(e),r=cU(t);return null!==n&&null!==r?`${n}${r}`:null}function cU(e){if("string"==typeof e)return e;if("normal_text"===e.markdown_text)return e.normal_text??null;if("join"===e.markdown_text){let t=e.join?.lhs??null,n=e.join?.rhs??null;return t&&n?cj(t,n):null}return null}let cB={text:cF,bold:cP("strong"),italic:cP("em"),underline:cP("u"),hyperlink:function({mdText:e}){if("object"!=typeof e||!e.href)return null;let t=e.link?.value??e.value??"";return tC("a",{href:e.href,target:"_blank",rel:"noreferrer",className:"text-sm opacity-90 hover:opacity-100 underline cursor-pointer text-[#4B2FFF] hover:text-[#3517f7]",children:tC(cV,{mdText:t})})},order_list:cz("ol"),unorder_list:cz("ul"),new_line:()=>tC("div",{className:"h-2.5 w-full"}),join:function({mdText:e}){let t=cj(e.lhs,e.rhs);return t?tC(cF,{mdText:t}):tC(M,{children:[tC(cV,{mdText:e.lhs}),tC(cV,{mdText:e.rhs})]})}};function cV({mdText:e}){if(console.log(e,"here md text"),"string"==typeof e)return tC(M,{children:e});let t=cB[e?.type];return t?tC(t,{mdText:e}):null}let cW=()=>{let e=tH();if("CONSENT_NEEDED"===e.status){let t,n;if("CONSENT_NEEDED"===e.status){let r=navigator.language,i=Intl.DateTimeFormat().resolvedOptions().timeZone;t=[{field_id:"SYS_browser",value:lU.browserName},{field_id:"SYS_browser_os",value:lU.osName},{field_id:"SYS_browser_language",value:r},{field_id:"SYS_screen_resolution",value:`${window.screen.width} x ${window.screen.height}`},{field_id:"SYS_time_zone",value:i},{field_id:"SYS_device_type",value:lU.deviceType},{field_id:"SYS_From_Page",value:window.location.origin}],n={form_id:e?.form_data?.form_id??"",conversation_id:cI(),lead_data:{name:e?.form_data?.name,fields:t,ws:e?.data?.workspace,user_consent:e?.data.user_consent},type:"browser"}}return console.log("hereconsent",e.consent),tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full flex-col gap-2.5",children:tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-[24px] h-[24px] items-center justify-center rounded-full",children:tC("img",{src:e?.data?.logo_url,className:"w-6 h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex flex-col items-start gap-2 w-full",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:tC("div",{className:"font-inter text-sm font-medium text-[#020618]",children:e?.data?.name})}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(cV,{mdText:e?.consent.consent_display_data})})]}),tC("div",{className:"flex flex-wrap items-start gap-2 relative self-stretch pt-1",children:[tC("button",{onClick:()=>{tW.trigger.processConsent({consentState:"GIVEN",submissionPayload:n})},className:"flex cursor-pointer !h-7 w-max border border-slate-300 leading-5 px-3.5 py-1.5 font-medium text-slate-700 items-center text-sm justify-center bg-white rounded-lg hover:border-[#4b2fff]",children:"Yes, I agree"}),tC("button",{onClick:()=>{t1.trigger.selectTab({tab:tZ.HOME})},className:"flex cursor-pointer !h-7 w-max border border-slate-300 leading-5 px-3.5 py-1.5 font-medium text-slate-700 items-center text-sm justify-center bg-white rounded-lg hover:border-[#4b2fff]",children:"No, I do not agree"})]})]})]})})})}return null};var cH=[{name:"Türkiye",flag:"🇹🇷",code:"TR",dialCode:"+90"},{name:"Afghanistan",flag:"🇦🇫",code:"AF",dialCode:"+93"},{name:"Åland Islands",flag:"🇦🇽",code:"AX",dialCode:"+358"},{name:"Albania",flag:"🇦🇱",code:"AL",dialCode:"+355"},{name:"Algeria",flag:"🇩🇿",code:"DZ",dialCode:"+213"},{name:"American Samoa",flag:"🇦🇸",code:"AS",dialCode:"+1684"},{name:"Andorra",flag:"🇦🇩",code:"AD",dialCode:"+376"},{name:"Angola",flag:"🇦🇴",code:"AO",dialCode:"+244"},{name:"Anguilla",flag:"🇦🇮",code:"AI",dialCode:"+1264"},{name:"Antarctica",flag:"🇦🇶",code:"AQ",dialCode:"+672"},{name:"Antigua and Barbuda",flag:"🇦🇬",code:"AG",dialCode:"+1268"},{name:"Argentina",flag:"🇦🇷",code:"AR",dialCode:"+54"},{name:"Armenia",flag:"🇦🇲",code:"AM",dialCode:"+374"},{name:"Aruba",flag:"🇦🇼",code:"AW",dialCode:"+297"},{name:"Australia",flag:"🇦🇺",code:"AU",dialCode:"+61"},{name:"Austria",flag:"🇦🇹",code:"AT",dialCode:"+43"},{name:"Azerbaijan",flag:"🇦🇿",code:"AZ",dialCode:"+994"},{name:"Bahamas",flag:"🇧🇸",code:"BS",dialCode:"+1242"},{name:"Bahrain",flag:"🇧🇭",code:"BH",dialCode:"+973"},{name:"Bangladesh",flag:"🇧🇩",code:"BD",dialCode:"+880"},{name:"Barbados",flag:"🇧🇧",code:"BB",dialCode:"+1246"},{name:"Belarus",flag:"🇧🇾",code:"BY",dialCode:"+375"},{name:"Belgium",flag:"🇧🇪",code:"BE",dialCode:"+32"},{name:"Belize",flag:"🇧🇿",code:"BZ",dialCode:"+501"},{name:"Benin",flag:"🇧🇯",code:"BJ",dialCode:"+229"},{name:"Bermuda",flag:"🇧🇲",code:"BM",dialCode:"+1441"},{name:"Bhutan",flag:"🇧🇹",code:"BT",dialCode:"+975"},{name:"Bolivia, Plurinational State of Bolivia",flag:"🇧🇴",code:"BO",dialCode:"+591"},{name:"Bosnia and Herzegovina",flag:"🇧🇦",code:"BA",dialCode:"+387"},{name:"Botswana",flag:"🇧🇼",code:"BW",dialCode:"+267"},{name:"Bouvet Island",flag:"🇧🇻",code:"BV",dialCode:"+47"},{name:"Brazil",flag:"🇧🇷",code:"BR",dialCode:"+55"},{name:"British Indian Ocean Territory",flag:"🇮🇴",code:"IO",dialCode:"+246"},{name:"Brunei Darussalam",flag:"🇧🇳",code:"BN",dialCode:"+673"},{name:"Bulgaria",flag:"🇧🇬",code:"BG",dialCode:"+359"},{name:"Burkina Faso",flag:"🇧🇫",code:"BF",dialCode:"+226"},{name:"Burundi",flag:"🇧🇮",code:"BI",dialCode:"+257"},{name:"Cambodia",flag:"🇰🇭",code:"KH",dialCode:"+855"},{name:"Cameroon",flag:"🇨🇲",code:"CM",dialCode:"+237"},{name:"Canada",flag:"🇨🇦",code:"CA",dialCode:"+1"},{name:"Cape Verde",flag:"🇨🇻",code:"CV",dialCode:"+238"},{name:"Cayman Islands",flag:"🇰🇾",code:"KY",dialCode:"+345"},{name:"Central African Republic",flag:"🇨🇫",code:"CF",dialCode:"+236"},{name:"Chad",flag:"🇹🇩",code:"TD",dialCode:"+235"},{name:"Chile",flag:"🇨🇱",code:"CL",dialCode:"+56"},{name:"China",flag:"🇨🇳",code:"CN",dialCode:"+86"},{name:"Christmas Island",flag:"🇨🇽",code:"CX",dialCode:"+61"},{name:"Cocos (Keeling) Islands",flag:"🇨🇨",code:"CC",dialCode:"+61"},{name:"Colombia",flag:"🇨🇴",code:"CO",dialCode:"+57"},{name:"Comoros",flag:"🇰🇲",code:"KM",dialCode:"+269"},{name:"Congo",flag:"🇨🇬",code:"CG",dialCode:"+242"},{name:"Congo, The Democratic Republic of the Congo",flag:"🇨🇩",code:"CD",dialCode:"+243"},{name:"Cook Islands",flag:"🇨🇰",code:"CK",dialCode:"+682"},{name:"Costa Rica",flag:"🇨🇷",code:"CR",dialCode:"+506"},{name:"Cote d'Ivoire",flag:"🇨🇮",code:"CI",dialCode:"+225"},{name:"Croatia",flag:"🇭🇷",code:"HR",dialCode:"+385"},{name:"Cuba",flag:"🇨🇺",code:"CU",dialCode:"+53"},{name:"Cyprus",flag:"🇨🇾",code:"CY",dialCode:"+357"},{name:"Czech Republic",flag:"🇨🇿",code:"CZ",dialCode:"+420"},{name:"Denmark",flag:"🇩🇰",code:"DK",dialCode:"+45"},{name:"Djibouti",flag:"🇩🇯",code:"DJ",dialCode:"+253"},{name:"Dominica",flag:"🇩🇲",code:"DM",dialCode:"+1767"},{name:"Dominican Republic",flag:"🇩🇴",code:"DO",dialCode:"+1849"},{name:"Ecuador",flag:"🇪🇨",code:"EC",dialCode:"+593"},{name:"Egypt",flag:"🇪🇬",code:"EG",dialCode:"+20"},{name:"El Salvador",flag:"🇸🇻",code:"SV",dialCode:"+503"},{name:"Equatorial Guinea",flag:"🇬🇶",code:"GQ",dialCode:"+240"},{name:"Eritrea",flag:"🇪🇷",code:"ER",dialCode:"+291"},{name:"Estonia",flag:"🇪🇪",code:"EE",dialCode:"+372"},{name:"Ethiopia",flag:"🇪🇹",code:"ET",dialCode:"+251"},{name:"Falkland Islands (Malvinas)",flag:"🇫🇰",code:"FK",dialCode:"+500"},{name:"Faroe Islands",flag:"🇫🇴",code:"FO",dialCode:"+298"},{name:"Fiji",flag:"🇫🇯",code:"FJ",dialCode:"+679"},{name:"Finland",flag:"🇫🇮",code:"FI",dialCode:"+358"},{name:"France",flag:"🇫🇷",code:"FR",dialCode:"+33"},{name:"French Guiana",flag:"🇬🇫",code:"GF",dialCode:"+594"},{name:"French Polynesia",flag:"🇵🇫",code:"PF",dialCode:"+689"},{name:"French Southern Territories",flag:"🇹🇫",code:"TF",dialCode:"+262"},{name:"Gabon",flag:"🇬🇦",code:"GA",dialCode:"+241"},{name:"Gambia",flag:"🇬🇲",code:"GM",dialCode:"+220"},{name:"Georgia",flag:"🇬🇪",code:"GE",dialCode:"+995"},{name:"Germany",flag:"🇩🇪",code:"DE",dialCode:"+49"},{name:"Ghana",flag:"🇬🇭",code:"GH",dialCode:"+233"},{name:"Gibraltar",flag:"🇬🇮",code:"GI",dialCode:"+350"},{name:"Greece",flag:"🇬🇷",code:"GR",dialCode:"+30"},{name:"Greenland",flag:"🇬🇱",code:"GL",dialCode:"+299"},{name:"Grenada",flag:"🇬🇩",code:"GD",dialCode:"+1473"},{name:"Guadeloupe",flag:"🇬🇵",code:"GP",dialCode:"+590"},{name:"Guam",flag:"🇬🇺",code:"GU",dialCode:"+1671"},{name:"Guatemala",flag:"🇬🇹",code:"GT",dialCode:"+502"},{name:"Guernsey",flag:"🇬🇬",code:"GG",dialCode:"+44"},{name:"Guinea",flag:"🇬🇳",code:"GN",dialCode:"+224"},{name:"Guinea-Bissau",flag:"🇬🇼",code:"GW",dialCode:"+245"},{name:"Guyana",flag:"🇬🇾",code:"GY",dialCode:"+592"},{name:"Haiti",flag:"🇭🇹",code:"HT",dialCode:"+509"},{name:"Heard Island and Mcdonald Islands",flag:"🇭🇲",code:"HM",dialCode:"+672"},{name:"Holy See (Vatican City State)",flag:"🇻🇦",code:"VA",dialCode:"+379"},{name:"Honduras",flag:"🇭🇳",code:"HN",dialCode:"+504"},{name:"Hong Kong",flag:"🇭🇰",code:"HK",dialCode:"+852"},{name:"Hungary",flag:"🇭🇺",code:"HU",dialCode:"+36"},{name:"Iceland",flag:"🇮🇸",code:"IS",dialCode:"+354"},{name:"India",flag:"🇮🇳",code:"IN",dialCode:"+91"},{name:"Indonesia",flag:"🇮🇩",code:"ID",dialCode:"+62"},{name:"Iran, Islamic Republic of Persian Gulf",flag:"🇮🇷",code:"IR",dialCode:"+98"},{name:"Iraq",flag:"🇮🇶",code:"IQ",dialCode:"+964"},{name:"Ireland",flag:"🇮🇪",code:"IE",dialCode:"+353"},{name:"Isle of Man",flag:"🇮🇲",code:"IM",dialCode:"+44"},{name:"Israel",flag:"🇮🇱",code:"IL",dialCode:"+972"},{name:"Italy",flag:"🇮🇹",code:"IT",dialCode:"+39"},{name:"Jamaica",flag:"🇯🇲",code:"JM",dialCode:"+1876"},{name:"Japan",flag:"🇯🇵",code:"JP",dialCode:"+81"},{name:"Jersey",flag:"🇯🇪",code:"JE",dialCode:"+44"},{name:"Jordan",flag:"🇯🇴",code:"JO",dialCode:"+962"},{name:"Kazakhstan",flag:"🇰🇿",code:"KZ",dialCode:"+7"},{name:"Kenya",flag:"🇰🇪",code:"KE",dialCode:"+254"},{name:"Kiribati",flag:"🇰🇮",code:"KI",dialCode:"+686"},{name:"Korea, Democratic People's Republic of Korea",flag:"🇰🇵",code:"KP",dialCode:"+850"},{name:"Korea, Republic of South Korea",flag:"🇰🇷",code:"KR",dialCode:"+82"},{name:"Kosovo",flag:"🇽🇰",code:"XK",dialCode:"+383"},{name:"Kuwait",flag:"🇰🇼",code:"KW",dialCode:"+965"},{name:"Kyrgyzstan",flag:"🇰🇬",code:"KG",dialCode:"+996"},{name:"Laos",flag:"🇱🇦",code:"LA",dialCode:"+856"},{name:"Latvia",flag:"🇱🇻",code:"LV",dialCode:"+371"},{name:"Lebanon",flag:"🇱🇧",code:"LB",dialCode:"+961"},{name:"Lesotho",flag:"🇱🇸",code:"LS",dialCode:"+266"},{name:"Liberia",flag:"🇱🇷",code:"LR",dialCode:"+231"},{name:"Libyan Arab Jamahiriya",flag:"🇱🇾",code:"LY",dialCode:"+218"},{name:"Liechtenstein",flag:"🇱🇮",code:"LI",dialCode:"+423"},{name:"Lithuania",flag:"🇱🇹",code:"LT",dialCode:"+370"},{name:"Luxembourg",flag:"🇱🇺",code:"LU",dialCode:"+352"},{name:"Macao",flag:"🇲🇴",code:"MO",dialCode:"+853"},{name:"Macedonia",flag:"🇲🇰",code:"MK",dialCode:"+389"},{name:"Madagascar",flag:"🇲🇬",code:"MG",dialCode:"+261"},{name:"Malawi",flag:"🇲🇼",code:"MW",dialCode:"+265"},{name:"Malaysia",flag:"🇲🇾",code:"MY",dialCode:"+60"},{name:"Maldives",flag:"🇲🇻",code:"MV",dialCode:"+960"},{name:"Mali",flag:"🇲🇱",code:"ML",dialCode:"+223"},{name:"Malta",flag:"🇲🇹",code:"MT",dialCode:"+356"},{name:"Marshall Islands",flag:"🇲🇭",code:"MH",dialCode:"+692"},{name:"Martinique",flag:"🇲🇶",code:"MQ",dialCode:"+596"},{name:"Mauritania",flag:"🇲🇷",code:"MR",dialCode:"+222"},{name:"Mauritius",flag:"🇲🇺",code:"MU",dialCode:"+230"},{name:"Mayotte",flag:"🇾🇹",code:"YT",dialCode:"+262"},{name:"Mexico",flag:"🇲🇽",code:"MX",dialCode:"+52"},{name:"Micronesia, Federated States of Micronesia",flag:"🇫🇲",code:"FM",dialCode:"+691"},{name:"Moldova",flag:"🇲🇩",code:"MD",dialCode:"+373"},{name:"Monaco",flag:"🇲🇨",code:"MC",dialCode:"+377"},{name:"Mongolia",flag:"🇲🇳",code:"MN",dialCode:"+976"},{name:"Montenegro",flag:"🇲🇪",code:"ME",dialCode:"+382"},{name:"Montserrat",flag:"🇲🇸",code:"MS",dialCode:"+1664"},{name:"Morocco",flag:"🇲🇦",code:"MA",dialCode:"+212"},{name:"Mozambique",flag:"🇲🇿",code:"MZ",dialCode:"+258"},{name:"Myanmar",flag:"🇲🇲",code:"MM",dialCode:"+95"},{name:"Namibia",flag:"🇳🇦",code:"NA",dialCode:"+264"},{name:"Nauru",flag:"🇳🇷",code:"NR",dialCode:"+674"},{name:"Nepal",flag:"🇳🇵",code:"NP",dialCode:"+977"},{name:"Netherlands",flag:"🇳🇱",code:"NL",dialCode:"+31"},{name:"Netherlands Antilles",flag:"",code:"AN",dialCode:"+599"},{name:"New Caledonia",flag:"🇳🇨",code:"NC",dialCode:"+687"},{name:"New Zealand",flag:"🇳🇿",code:"NZ",dialCode:"+64"},{name:"Nicaragua",flag:"🇳🇮",code:"NI",dialCode:"+505"},{name:"Niger",flag:"🇳🇪",code:"NE",dialCode:"+227"},{name:"Nigeria",flag:"🇳🇬",code:"NG",dialCode:"+234"},{name:"Niue",flag:"🇳🇺",code:"NU",dialCode:"+683"},{name:"Norfolk Island",flag:"🇳🇫",code:"NF",dialCode:"+672"},{name:"Northern Mariana Islands",flag:"🇲🇵",code:"MP",dialCode:"+1670"},{name:"Norway",flag:"🇳🇴",code:"NO",dialCode:"+47"},{name:"Oman",flag:"🇴🇲",code:"OM",dialCode:"+968"},{name:"Pakistan",flag:"🇵🇰",code:"PK",dialCode:"+92"},{name:"Palau",flag:"🇵🇼",code:"PW",dialCode:"+680"},{name:"Palastine",flag:"🇵🇸",code:"PS",dialCode:"+970"},{name:"Panama",flag:"🇵🇦",code:"PA",dialCode:"+507"},{name:"Papua New Guinea",flag:"🇵🇬",code:"PG",dialCode:"+675"},{name:"Paraguay",flag:"🇵🇾",code:"PY",dialCode:"+595"},{name:"Peru",flag:"🇵🇪",code:"PE",dialCode:"+51"},{name:"Philippines",flag:"🇵🇭",code:"PH",dialCode:"+63"},{name:"Pitcairn",flag:"🇵🇳",code:"PN",dialCode:"+64"},{name:"Poland",flag:"🇵🇱",code:"PL",dialCode:"+48"},{name:"Portugal",flag:"🇵🇹",code:"PT",dialCode:"+351"},{name:"Puerto Rico",flag:"🇵🇷",code:"PR",dialCode:"+1939"},{name:"Qatar",flag:"🇶🇦",code:"QA",dialCode:"+974"},{name:"Romania",flag:"🇷🇴",code:"RO",dialCode:"+40"},{name:"Russia",flag:"🇷🇺",code:"RU",dialCode:"+7"},{name:"Rwanda",flag:"🇷🇼",code:"RW",dialCode:"+250"},{name:"Reunion",flag:"🇷🇪",code:"RE",dialCode:"+262"},{name:"Saint Barthelemy",flag:"🇧🇱",code:"BL",dialCode:"+590"},{name:"Saint Helena, Ascension and Tristan Da Cunha",flag:"🇸🇭",code:"SH",dialCode:"+290"},{name:"Saint Kitts and Nevis",flag:"🇰🇳",code:"KN",dialCode:"+1869"},{name:"Saint Lucia",flag:"🇱🇨",code:"LC",dialCode:"+1758"},{name:"Saint Martin",flag:"🇲🇫",code:"MF",dialCode:"+590"},{name:"Saint Pierre and Miquelon",flag:"🇵🇲",code:"PM",dialCode:"+508"},{name:"Saint Vincent and the Grenadines",flag:"🇻🇨",code:"VC",dialCode:"+1784"},{name:"Samoa",flag:"🇼🇸",code:"WS",dialCode:"+685"},{name:"San Marino",flag:"🇸🇲",code:"SM",dialCode:"+378"},{name:"Sao Tome and Principe",flag:"🇸🇹",code:"ST",dialCode:"+239"},{name:"Saudi Arabia",flag:"🇸🇦",code:"SA",dialCode:"+966"},{name:"Senegal",flag:"🇸🇳",code:"SN",dialCode:"+221"},{name:"Serbia",flag:"🇷🇸",code:"RS",dialCode:"+381"},{name:"Seychelles",flag:"🇸🇨",code:"SC",dialCode:"+248"},{name:"Sierra Leone",flag:"🇸🇱",code:"SL",dialCode:"+232"},{name:"Singapore",flag:"🇸🇬",code:"SG",dialCode:"+65"},{name:"Slovakia",flag:"🇸🇰",code:"SK",dialCode:"+421"},{name:"Slovenia",flag:"🇸🇮",code:"SI",dialCode:"+386"},{name:"Solomon Islands",flag:"🇸🇧",code:"SB",dialCode:"+677"},{name:"Somalia",flag:"🇸🇴",code:"SO",dialCode:"+252"},{name:"South Africa",flag:"🇿🇦",code:"ZA",dialCode:"+27"},{name:"South Sudan",flag:"🇸🇸",code:"SS",dialCode:"+211"},{name:"South Georgia and the South Sandwich Islands",flag:"🇬🇸",code:"GS",dialCode:"+500"},{name:"Spain",flag:"🇪🇸",code:"ES",dialCode:"+34"},{name:"Sri Lanka",flag:"🇱🇰",code:"LK",dialCode:"+94"},{name:"Sudan",flag:"🇸🇩",code:"SD",dialCode:"+249"},{name:"Suriname",flag:"🇸🇷",code:"SR",dialCode:"+597"},{name:"Svalbard and Jan Mayen",flag:"🇸🇯",code:"SJ",dialCode:"+47"},{name:"Swaziland",flag:"🇸🇿",code:"SZ",dialCode:"+268"},{name:"Sweden",flag:"🇸🇪",code:"SE",dialCode:"+46"},{name:"Switzerland",flag:"🇨🇭",code:"CH",dialCode:"+41"},{name:"Syrian Arab Republic",flag:"🇸🇾",code:"SY",dialCode:"+963"},{name:"Taiwan",flag:"🇹🇼",code:"TW",dialCode:"+886"},{name:"Tajikistan",flag:"🇹🇯",code:"TJ",dialCode:"+992"},{name:"Tanzania, United Republic of Tanzania",flag:"🇹🇿",code:"TZ",dialCode:"+255"},{name:"Thailand",flag:"🇹🇭",code:"TH",dialCode:"+66"},{name:"Timor-Leste",flag:"🇹🇱",code:"TL",dialCode:"+670"},{name:"Togo",flag:"🇹🇬",code:"TG",dialCode:"+228"},{name:"Tokelau",flag:"🇹🇰",code:"TK",dialCode:"+690"},{name:"Tonga",flag:"🇹🇴",code:"TO",dialCode:"+676"},{name:"Trinidad and Tobago",flag:"🇹🇹",code:"TT",dialCode:"+1868"},{name:"Tunisia",flag:"🇹🇳",code:"TN",dialCode:"+216"},{name:"Turkmenistan",flag:"🇹🇲",code:"TM",dialCode:"+993"},{name:"Turks and Caicos Islands",flag:"🇹🇨",code:"TC",dialCode:"+1649"},{name:"Tuvalu",flag:"🇹🇻",code:"TV",dialCode:"+688"},{name:"Uganda",flag:"🇺🇬",code:"UG",dialCode:"+256"},{name:"Ukraine",flag:"🇺🇦",code:"UA",dialCode:"+380"},{name:"United Arab Emirates",flag:"🇦🇪",code:"AE",dialCode:"+971"},{name:"United Kingdom",flag:"🇬🇧",code:"GB",dialCode:"+44"},{name:"United States",flag:"🇺🇸",code:"US",dialCode:"+1"},{name:"Uruguay",flag:"🇺🇾",code:"UY",dialCode:"+598"},{name:"Uzbekistan",flag:"🇺🇿",code:"UZ",dialCode:"+998"},{name:"Vanuatu",flag:"🇻🇺",code:"VU",dialCode:"+678"},{name:"Venezuela, Bolivarian Republic of Venezuela",flag:"🇻🇪",code:"VE",dialCode:"+58"},{name:"Vietnam",flag:"🇻🇳",code:"VN",dialCode:"+84"},{name:"Virgin Islands, British",flag:"🇻🇬",code:"VG",dialCode:"+1284"},{name:"Virgin Islands, U.S.",flag:"🇻🇮",code:"VI",dialCode:"+1340"},{name:"Wallis and Futuna",flag:"🇼🇫",code:"WF",dialCode:"+681"},{name:"Yemen",flag:"🇾🇪",code:"YE",dialCode:"+967"},{name:"Zambia",flag:"🇿🇲",code:"ZM",dialCode:"+260"},{name:"Zimbabwe",flag:"🇿🇼",code:"ZW",dialCode:"+263"}];let c$=({countries:e,value:t,onChange:n,disabled:r,error:i,placeholder:a="Select a country",label:o="Country"})=>{let[l,s]=ep(!1),[c,d]=ep(""),u=em(null),p=e.filter(e=>e.name.toLowerCase().includes(c.toLowerCase()));return eg(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),tC("div",{className:"w-full",ref:u,children:[tC("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:o}),tC("div",{onClick:()=>{r||s(e=>!e)},className:`w-full flex justify-between items-center px-4 py-2 h-9 text-sm rounded-lg border ${r?"text-slate-400 border-zinc-200 bg-zinc-50":"bg-white"} ${i?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500"} focus:outline-none focus:ring-2 focus:border-transparent`,children:[tC("span",{className:"truncate",children:t||a}),tC("svg",{className:"w-4 h-4 ml-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:tC("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),l&&tC("div",{className:"z-50 mt-1 w-[100%] bg-white border border-gray-300 rounded-md shadow-lg",onMouseDown:e=>e.stopPropagation(),children:[tC("div",{className:"p-2 border-b border-gray-200 bg-white sticky top-0 z-10 rounded-tl-md rounded-tr-md",children:tC("input",{type:"text",placeholder:"Search",value:c,onChange:e=>d(e.target.value),onMouseDown:e=>e.stopPropagation(),className:"w-full px-2 py-1 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})}),tC("div",{className:"max-h-48 overflow-y-auto",children:[p.map(e=>tC("div",{onClick:()=>{n(e.name),s(!1)},className:"px-4 py-2 hover:bg-gray-100 cursor-pointer text-sm",children:e.name},e.code)),0===p.length&&tC("li",{className:"px-4 py-2 text-sm text-gray-500",children:"No results found"})]})]}),i&&tC("p",{className:"text-red-500 text-xs mt-1",children:i})]})},cq=({input:e,handleChange:t,value:n,error:r,disabled:i})=>"short_text"===e.field_type||"email"===e.field_type?tC("div",{className:"w-full",children:[tC("label",{htmlFor:e.name,className:"block text-sm font-medium text-gray-700 mb-1",children:e.dispaly_name?e.dispaly_name:e.name}),tC("input",{type:"short_text"===e.field_type||"email"===e.field_type?"text":e.field_type,id:e._id,name:e.field_id,value:n,onChange:t,formNoValidate:!0,placeholder:e.placeholder,disabled:i,className:`w-full px-4 py-2 h-9 text-sm rounded-lg border ${i?"text-slate-400 border-zinc-200 bg-zinc-50":"bg-white"} ${r?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500"} focus:outline-none focus:ring-2 focus:border-transparent`}),r&&tC("p",{className:"text-red-500 text-xs mt-1",children:r})]}):"country"===e.field_type?tC(c$,{disabled:i,countries:cH,value:n,onChange:n=>{t({target:{name:e.field_id,value:n}})}}):"long_text"===e.field_type?tC(M,{children:[tC("label",{htmlFor:e.name,className:"block text-sm font-medium text-gray-700 mb-1",children:e.dispaly_name?e.dispaly_name:e.name}),tC("textarea",{name:e.field_id,value:n,className:`w-full px-4 py-2 h-32 text-sm rounded-lg border ${i?"text-slate-400 border-zinc-200 bg-zinc-50":"bg-white"} ${r?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500"} focus:outline-none focus:ring-2 focus:border-transparent`,onChange:t}),r&&tC("p",{className:"text-red-500 text-xs mt-1",children:r})]}):"phone_number"===e.field_type?tC("div",{className:"w-full",children:[tC("label",{htmlFor:e.name,className:"block text-sm font-medium text-gray-700 mb-1",children:e.dispaly_name?e.dispaly_name:e.name}),tC("input",{id:e._id,name:e.field_id,value:n,onChange:t,formNoValidate:!0,placeholder:e.placeholder,disabled:i,maxLength:15,className:`w-full px-4 py-2 h-9 text-sm rounded-lg border ${i?"text-slate-400 border-zinc-200 bg-zinc-50":"bg-white"} ${r?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-blue-500"} focus:outline-none focus:ring-2 focus:border-transparent`}),r&&tC("p",{className:"text-red-500 text-xs mt-1",children:r})]}):void 0,cY=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,cG=({conversationId:e})=>{let t=tH(),[n,r]=ep({}),[i,a]=ep({}),[o,l]=ep(!1),s=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t.data.source_id);if(console.log("widget status from form",t),eg(()=>{if("FORM_INPUT_NEEDED"===t.status&&s&&(console.log("Trigger here"),tW.trigger.processMessage()),"FORM_INPUT_NEEDED"===t.status&&t.form_data){let e=`CONVERSATION::${t.data.id}`;try{let n=localStorage.getItem(e),r=n?JSON.parse(n):{widget_id:t.data.id,conversation_id:null,user_state:"FORM_INPUT_NEEDED",events:[]};if(r.events.some(e=>"FORM_INPUT_NEEDED"===e.type&&e.form_data?.form_id===t.form_data.form_id))console.log("ℹ️ FORM_INPUT_NEEDED already present, skipping append.");else{let n={type:"FORM_INPUT_NEEDED",form_data:t.form_data};r.events.push(n),localStorage.setItem(e,JSON.stringify(r)),console.log("✅ FORM_INPUT_NEEDED appended successfully")}}catch(e){console.error("❌ Failed to append FORM_INPUT_NEEDED event:",e)}}},[t.status,t?.form_data,t.data.id]),eg(()=>{switch(t.status){case"WIDGET_LOADING":tW.trigger.setFetchConfig(t.config);break;case"CONSENT_GIVEN":tW.trigger.shouldShowForm({browser_data:t.browser_data??null});break;case"WIDGET_LOADED":tW.trigger.shouldShowForm({browser_data:null});break;case"FORM_SUBMITTED":tW.trigger.processMessage()}},[t.status]),"ALLOW_MESSAGE"!==t.status&&"FORM_INPUT_NEEDED"!==t.status&&"WIDGET_LOADED"!==t.status&&"CONSENT_NEEDED"!==t.status&&"CONSENT_GIVEN"!==t.status&&"FORM_SUBMITTED"!==t.status)return null;let c=(()=>{let e=localStorage.getItem(`CONVERSATION::${t.data.id}`);if(!e)return console.warn('No data found in localStorage under key "DUMMY"'),null;try{let t=JSON.parse(e);console.log("parsed event",t);let n=t.events.find(e=>"FORM_INPUT_NEEDED"===e.type);return console.log("form input needed event",n),n?.form_data||null}catch(e){return console.error("Failed to parse localStorage DUMMY data:",e),null}})(),d=c?.form_template??[];console.log("form template",d);let u=(()=>{try{let e=localStorage.getItem(`CONVERSATION::${t.data.id}`);if(!e)return{};let n=JSON.parse(e).events.find(e=>"FORM_SUBMITTED"===e.type);return(n?.submissionPayload?.lead_data?.fields??[]).reduce((e,{field_id:t,value:n})=>(e[t]=n,e),{})}catch(e){return console.error("Error parsing submitted data:",e),{}}})(),p=(()=>{try{let e=localStorage.getItem(`CONVERSATION::${t.data.id}`);if(!e)return!1;return JSON.parse(e).events.some(e=>"FORM_SUBMITTED"===e.type)}catch(e){return console.error("Error checking form submission:",e),!1}})(),f=e=>{let{name:t,value:n}=e.target;r(e=>({...e,[t]:n})),a(e=>({...e,[t]:""}))},g=()=>{let e={};return d.forEach(t=>{let r=n[t.field_id]?.trim()||"";t.is_mandatory&&!r&&(e[t.field_id]=`${t.dispaly_name||t.name} is required`),"email"===t.field_type&&r&&!cY.test(r)&&(e[t.field_id]="Please enter a valid email address")}),a(e),0===Object.keys(e).length},h="FORM_INPUT_NEEDED"===t.status&&!s||"WIDGET_LOADED"===t.status||"ALLOW_MESSAGE"===t.status&&e===localStorage.getItem("current_conversation");return h?(console.log("should show form ",h,d,e),tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full",children:tC("div",{className:"flex gap-1.5 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-[24px] h-[24px] items-center justify-center rounded-full",children:tC("img",{src:t?.data?.logo_url,className:"w-6 h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:tC("div",{className:"font-inter text-sm font-medium text-[#020618]",children:t?.data?.name})}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:p?tC("div",{className:"py-2.5 px-3.5 flex w-full flex-col items-start gap-4 rounded-lg border border-zinc-200",children:[tC("div",{className:"flex items-center gap-2 rounded-sm w-full justify-between",children:[tC("span",{className:"flex gap-1 items-center text-slate-950 text-sm font-regular leading-5",children:["Form submitted"," ",tC(lu,{className:"h-[18px] w-[18px] text-green-500"})]}),tC("span",{onClick:()=>l(!o),className:"cursor-pointer text-slate-500 hover:text-slate-700 transition-colors hover:bg-slate-100 rounded-full",children:o?tC(lS,{}):tC(lk,{})})]}),o&&tC("div",{className:"flex flex-col items-start gap-4",children:d.map((e,t)=>tC("div",{className:"flex flex-col items-start gap-1.5",children:[tC("span",{className:"text-slate-700 text-sm font-medium leading-5",children:e.dispaly_name||e.name}),tC("span",{className:"text-slate-950 text-sm font-regular leading-5",children:n[e.field_id]??u[e.field_id]??""})]},t))})]}):tC("div",{className:"flex flex-col bg-white w-full gap-2.5 px-3.5 py-2.5 rounded-lg border border-zinc-200",children:tC("form",{onSubmit:r=>{if(r.preventDefault(),!g())return;let i=Object.entries(n).map(([e,t])=>({field_id:e,value:t})),a={form_id:c?.form_id??"",conversation_id:e??cI(),lead_data:{name:c?.name??"",fields:i,ws:c?.ws??"",user_consent:t.data.user_consent},type:"lead"};tW.trigger.processFormSubmission({submissionPayload:a});let o=`form::${t?.data?.id}::${e}`,l={};try{let e=localStorage.getItem(o);l=e?JSON.parse(e):{}}catch(e){console.error(`Failed to parse localStorage for ${o}`,e)}l[c?.form_id]=i;try{localStorage.setItem(o,JSON.stringify(l)),localStorage.setItem("current_conversation",e)}catch(e){console.error(`Failed to save form data to ${o}`,e)}},className:"space-y-4 w-full",children:[d.map(e=>tC(M,{children:tC(cq,{input:e,handleChange:f,value:n[e.field_id]??u[e.field_id]??"",error:i[e.field_id],disabled:p},e.field_id)})),tC("button",{type:"submit",className:`${!p?"hover:bg-[#4b2fff]/90":"opacity-50"} w-full text-sm bg-[#4b2fff] text-white cursor-pointer font-medium py-2 px-4 rounded-lg transition-colors`,disabled:p,children:p?"Submitted":"Submit"})]})})})]})]})})})):null},cJ=({event_id:e,buttons:t,sendFeedback:n,sendMessage:r})=>{let i=()=>{n("satisfied",e)},a=()=>{n("not_satisfied",e)},o=()=>{r("#liveagent")};return tC(M,{children:t.map((e,t)=>"Satisfied"===e.label?tC("button",{className:"inline-flex cursor-pointer items-center justify-center p-1 bg-zinc-100 rounded-full hover:bg-zinc-200 h-6 w-6",onClick:i,children:tC(lh,{className:"w-3.5 h-3.5"})},t):"Not Satisfied"===e.label?tC("button",{className:"inline-flex cursor-pointer items-center justify-center p-1 bg-zinc-100 rounded-full hover:bg-zinc-200 h-6 w-6",onClick:a,children:tC(lg,{className:"w-3.5 h-3.5"})},t):"Hand over to Live agent"===e.label?tC("button",{className:"inline-flex cursor-pointer items-center justify-center p-1 bg-zinc-100 rounded-full hover:bg-zinc-200 h-6 w-6",onClick:o,children:tC(ls,{className:"w-3.5 h-3.5"})},t):void 0)})},cZ=({sendMessage:e,buttons:t})=>tC(M,{children:t.map((t,n)=>"Satisfied"===t.label?tC("button",{className:"flex cursor-pointer !h-7 w-max border border-slate-300 leading-5 px-3.5 py-1.5 font-medium text-slate-700 items-center text-sm justify-center bg-white rounded-lg hover:border-[#4b2fff]",onClick:()=>e("#satisfied"),children:t.label},n):"Not Satisfied"===t.label?tC("button",{className:"flex cursor-pointer !h-7 w-max border border-slate-300 leading-5 px-3.5 py-1.5 font-medium text-slate-700 items-center text-sm justify-center bg-white rounded-lg hover:border-[#4b2fff]",onClick:()=>e("#not_satisfied"),children:t.label},n):void 0)}),cK=({message:e,sendFeedback:t,sendMessage:n,time:r})=>{let i=tH(),[,a]=tv.useState(0);tv.useEffect(()=>{let e=setInterval(()=>{a(e=>e+1)},3e4);return()=>clearInterval(e)},[]);let o=e=>{let t=new Date,n=new Date(e),r=Math.floor((t-n)/6e4);if(r<1)return"Just now";{if(r<=10)return 1==r?`${r} min ago`:`${r} mins ago`;let e=n.getHours(),t=n.getMinutes().toString().padStart(2,"0"),i=e>=12?"PM":"AM";return e=e%12||12,`${e}:${t}${i}`}};if("ai_response"===e.output[0].response_type)return tC("div",{className:"flex flex-col items-start gap-2.5 px-5 py-0 relative self-stretch w-full animate-slide-in-left",children:tC("div",{className:"items-start gap-1.5 self-stretch w-full flex flex-col relative",children:[tC("div",{className:"flex items-center gap-2.5 px-[26px] py-0 relative self-stretch w-full",children:tC("div",{className:"relative w-fit mt-[-1.00px] font-medium text-xs text-[#020618]",children:i?.data?.name})}),tC("div",{className:"inline-flex items-start gap-1 relative",children:[tC("div",{className:"inline-flex items-center justify-center w-[22px] h-[22px] bg-[#4b2fff] rounded-full",children:tC(ll,{className:"relative w-3.5 h-3.5 bg-[100%_100%] text-white"})}),tC("div",{className:"inline-flex flex-col bg-zinc-100 items-start gap-2.5 px-3.5 py-2.5 relative rounded-lg max-w-[80%]",children:tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(lA,{message:e.output[0].text})})})]}),tC("div",{className:"flex w-[86%] items-start gap-1 relative",children:[tC("div",{className:"flex items-center gap-2.5 pl-[26px] pr-0 py-0 relative flex-1 grow",children:tC("div",{className:"relative w-fit mt-[-1.00px] text-xs text-[#45556c]",children:t8(r)})}),tC(cJ,{event_id:e.event_id,buttons:e.output[0].buttons,sendFeedback:t,sendMessage:n})]})]})});if("live_agent_prompt"===e.output[0].response_type&&e.output[0].text)return tC("div",{className:"inline-flex items-start gap-1 relative w-full animate-slide-in-left",children:[tC("div",{className:"inline-flex items-center justify-center w-[22px] h-[22px] bg-[#4b2fff] rounded-full",children:tC(ll,{className:"relative w-3.5 h-3.5 bg-[100%_100%] text-white"})}),tC("div",{className:"inline-flex flex-col bg-zinc-100 items-start gap-2.5 px-3.5 py-2.5 relative rounded-lg max-w-[80%]",children:[tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(cV,{mdText:e.output[0].text})}),tC("div",{className:"flex flex-col items-start gap-2.5 relative self-stretch w-full",children:e.output[0].buttons.map((e,t)=>tC("button",{className:"flex cursor-pointer items-center justify-center gap-2 px-3.5 py-1.5 relative self-stretch w-full bg-white rounded-lg border border-gray-200 hover:border-[#4b2fff]",onClick:()=>n(e.action.send_rly),children:tC("span",{className:"relative w-fit mt-[-1.00px] font-medium text-sm text-[#314158]",children:e.label})},t))})]})]});if("live_agent_prompt"===e.output[0].response_type&&e.output[0].value)return tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full",children:tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-auto h-[24px] items-center justify-center rounded-full",children:tC("img",{src:i?.data?.logo_url,className:"w-auto h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:[tC("div",{className:"text-sm font-medium text-[#020618]",children:i?.data?.name}),tC("div",{className:"text-xs text-[#62748E]",children:t8(r)})]}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(cV,{mdText:e.output[0].value})})]})]})})});if("fallback"===e.output[0].response_type)return tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full",children:tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-auto h-[24px] items-center justify-center rounded-full",children:tC("img",{src:i?.data?.logo_url,className:"w-auto h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:[tC("div",{className:"text-sm font-medium text-[#020618]",children:i?.data?.name}),tC("div",{className:"text-xs text-[#62748E]",children:t8(r)})]}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(cV,{mdText:e.output[0].value})})]})]})})});if("agent"===e.output[0].response_type)return tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full",children:tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-auto h-[24px] items-center justify-center rounded-full",children:tC("img",{src:i?.data?.logo_url,className:"w-auto h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:[tC("div",{className:"text-sm font-medium text-[#020618]",children:i?.data?.name}),tC("div",{className:"text-xs text-[#62748E]",children:t8(r)})]}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(cV,{mdText:e.output[0].value})})]})]})})});else if("agent_feedback"===e.output[0].response_type)return tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full flex-col gap-2.5",children:tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-auto h-[24px] items-center justify-center rounded-full",children:tC("img",{src:i?.data?.logo_url,className:"w-auto h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex flex-col items-start gap-2 w-full",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:[tC("div",{className:"text-sm font-medium text-[#020618]",children:i?.data?.name}),tC("div",{className:"text-xs text-[#62748E]",children:t8(r)})]}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(cV,{mdText:e.output[0].text})})]}),tC("div",{className:"flex flex-wrap items-start gap-2 relative self-stretch pt-1",children:tC(cZ,{sendMessage:n,buttons:e.output[0].buttons})})]})]})})});else if("text"===e.output[0].type)return tC(M,{children:tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full",children:tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-auto h-[24px] items-center justify-center rounded-full",children:tC("img",{src:i?.data?.logo_url,className:"w-auto h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:[tC("div",{className:"text-sm font-medium text-[#020618]",children:i?.data?.name}),tC("div",{className:"text-xs text-[#62748E]",children:o(r)})]}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(lA,{message:e.output[0].value.value})})]})]})})})});else return tC("div",{className:"flex flex-col items-start gap-1.5 w-full px-5 animate-slide-in-left",children:tC("div",{className:"flex items-start w-full",children:tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden",children:[tC("div",{className:"flex items-center gap-2",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-auto h-[24px] items-center justify-center rounded-full",children:tC("img",{src:i?.data?.logo_url,className:"w-auto h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:[tC("div",{className:"flex gap-2 items-baseline pt-0.5",children:[tC("div",{className:"text-sm font-medium text-[#020618]",children:i?.data?.name}),tC("div",{className:"text-xs text-[#62748E]",children:o(r)})]}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC(cV,{mdText:e.output[0].value})})]})]})})})},cX=({messageResponse:e,sendFeedback:t,sendMessage:n,setMessages:r})=>{console.log(e,"messageResponse");let{type:i,time:a,message:o}=e,[l,s]=ep(null),c=tH();eg(()=>{if(console.log("exit check var"),"received"===i&&function(e){return!!(e?.output[0]?.response_type==="session_expired"||e?.output?.[0]?.value?.value?.toLowerCase()?.includes("we are exiting from the conversation now"))}(o)){let e=`CONVERSATION_EXIT_LOCK::${c.data.id}`;if(localStorage.getItem(e))return void console.log("Exit already handled by another tab");localStorage.setItem(e,"true"),t1.trigger.handleExitChatState({value:!0});let t=localStorage.getItem(`CONVERSATION::${c.data.id}`);if(!t)return void console.warn("No data found in CONVERSATION key");try{let n=JSON.parse(t),r=localStorage.getItem(`CONVERSATION_LIST::${c.data.id}`),i=r?JSON.parse(r):[];i.push(n),localStorage.setItem(`CONVERSATION_LIST::${c.data.id}`,JSON.stringify(i)),localStorage.removeItem("CURRENT_CONVERSATION"),localStorage.removeItem(`CONVERSATION::${c.data.id}`),setTimeout(()=>{localStorage.removeItem(e)},100)}catch(e){console.error("Failed to parse localStorage data:",e)}}},[]),eg(()=>{let e=()=>{let e=window.localStorage.getItem(`CONVERSATION::${c.data.id}`);if(e)try{let t=JSON.parse(e).events.filter(e=>"sent"===e.type||"received"===e.type);console.log("event listener called (filtered):",t),r(t)}catch(e){console.error("Failed to parse localStorage on storage event:",e)}};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}},[]),console.log("botStatus",l),eg(()=>{let e=o?.output?.[0]?.type;if(console.log("botStatus",e),["thinking","finalizing_output","progress_done"].includes(e))return void s(e);"received"===i&&s(null)},[o,i]);let d=o?.output?.[0]?.type,u=["thinking","finalizing_output","progress_done"].includes(d);return["thinking","finalizing_output","progress_done"].includes(d),tC(M,{children:[null,"received"!==i||u?"received"!==i?tC("div",{className:"flex flex-col items-end gap-2.5 px-5 py-0 relative self-stretch w-full animate-slide-in-right",children:tC("div",{className:"w-auto max-w-[80%] items-end gap-1 flex flex-col relative",children:tC("div",{className:"flex justify-end items-end w-fit gap-1 relative",children:tC("div",{className:`flex flex-1 grow text-[${c?.data?.user_message_text_color}] items-start gap-2.5 px-3.5 py-2.5 relative rounded-lg`,style:{background:c?.data?.secondary_color,color:c?.data?.user_message_text_color},children:tC("div",{className:"relative mt-[-1px] text-sm",children:tC(cV,{mdText:o.input})})})})})}):null:tC(M,{children:tC(cK,{message:o,sendFeedback:t,sendMessage:n,time:a})})]})},cQ=({messages:e,sendFeedback:t,sendMessage:n,setMessages:r})=>(console.log("DEBUG :: updated messages",e),tC(M,{children:e.map(e=>tC(M,{children:[console.log(e,"messagein"),tC(cX,{messageResponse:e,sendFeedback:t,sendMessage:n,setMessages:r})]}))})),c1=({sendMessage:e})=>{let[t,n]=ep(""),r=tH(),[i,a]=ep(!1),o=()=>{t.trim()&&e(t),n("")};return tC(M,{children:"ALLOW_MESSAGE"===r.status&&tC("div",{className:"flex flex-col items-start p-5 gap-2.5",children:tC("div",{className:"w-full border border-zinc-300 rounded-lg overflow-hidden bg-white",children:tC("div",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[tC("input",{type:"text",placeholder:"Enter message",className:"flex-1 text-sm text-[#1d293d] placeholder-[#62748e] outline-none",value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),o())}}),tC("button",{className:"p-1.5 rounded-full transition-colors cursor-pointer flex items-center justify-center",onClick:()=>o(),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),style:{color:i?r.data?.brand_color||"#4B2FFF":"#62748e"},children:i?tC(ly,{className:"w-5 h-5"}):tC(lv,{className:"w-5 h-5"})})]})})})})},c0=({socket:e,widget_id:t,context:n,msg:r,setMessages:i})=>{let{SYS_FirstName:a,SYS_LastName:o,SYS_UserEmail:l}=n;console.log(n,"contextcontext");let s=cI(),c={conversationId:s,user:l?{user_id:l||cI(),firstName:a,lastName:o,email:l}:void 0},d={type:"sent",message:{input:{type:"text",value:r},system:c},time:new Date};console.log(c,"systemData"),console.log("conversation id emit to greeet",s),e.emit("greeting",{widget_id:t,context:{input:{type:"text",value:r||""},...n,system:c}}),""!==r&&i([d]);let u=`CONVERSATION::${t}`;localStorage.setItem("CURRENT_CONVERSATION",s);let p=localStorage.getItem(u);if(p)console.log("Conversation already exists:",p);else{console.log("No conversation found. Creating new one...");let e=[];""!==r.trim()&&e.push(d),localStorage.setItem(u,JSON.stringify({widget_id:t,conversation_id:s,user_state:"ALLOW_MESSAGE",events:e}))}},c2=({socket:e,widget_id:t,connected:n,context:r,continuseConversation:i,setIsTyping:a,setMessages:o})=>{let l=ev(uT),s=t3();console.log(l,"initialMessage");let c=l?.initialUserMessage||"",[d]=ep(!1);console.log(i,"continuesConversation"),eg(()=>{d||!n||s!==tZ.CHAT||i||(a(!0),c0({socket:e,widget_id:t,context:r,msg:c,setMessages:o}),l?.setInitialUserMessage(""))},[n])},c5=e=>({type:"received",time:new Date,message:{...e}}),c3=({socket:e,messages:t,setMessages:n,setIsTyping:r,setAgentStatus:i})=>{let a=em(t),o=tH();console.log("use message receiver message",t),eg(()=>{a.current=t},[t]),console.log("messages check",t);let l=(e,t)=>{let n=e?.data?.id,r=e?.data?.bot_id,i=t.find(e=>e.message.system.conversationId)?.message.system.conversationId;if(!i)return;let a=`RecentList::${r}::${n}`,o=localStorage.getItem(a),l={};if(o)try{l=JSON.parse(o)}catch(e){console.error(`Failed to parse RecentList for widget_id: ${n}`,e)}l[i]=t,localStorage.setItem(a,JSON.stringify(l)),localStorage.setItem(`${r}::${n}`,JSON.stringify({[n]:t})),console.log("Updated RecentList in localStorage:",a,l)};eg(()=>{if(console.log(e,"socketss"),!e)return;let t=e=>{console.log("on message received called",e);let t=c5(e),r=e?.system?.conversationId;localStorage.setItem("CURRENT_CONVERSATION",r);let a=t.message.output;if(!a||0===a.length)return;let s=a[0].type;i(s),("progress_done"===s||"text"==s)&&i(null),"thinking"!==s&&"finalizing_output"!==s&&"progress_done"!==s&&"searching_kb"!==s&&"action_detected"!==s&&"validating_input_for_action"!==s&&"executing_action"!==s&&"analysing_response"!==s&&n(e=>{let n=[...e,t];return l(o,n),tB({widget_id:o?.data?.id,user_state:"ALLOW_MESSAGE",events:{...t,time:t.time.toString()}}),n})},a=()=>{r(!1)};return e.on("message",t),e.on("typingend",a),()=>{e.off("message",t),e.off("typingend",a)}},[e])},c4=Object.create(null);c4.open="0",c4.close="1",c4.ping="2",c4.pong="3",c4.message="4",c4.upgrade="5",c4.noop="6";let c6=Object.create(null);Object.keys(c4).forEach(e=>{c6[c4[e]]=e});let c9={type:"error",data:"parser error"},c8="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),c7="function"==typeof ArrayBuffer,de=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,dt=({type:e,data:t},n,r)=>{if(c8&&t instanceof Blob)if(n)return r(t);else return dn(t,r);if(c7&&(t instanceof ArrayBuffer||de(t)))if(n)return r(t);else return dn(new Blob([t]),r);return r(c4[e]+(t||""))},dn=(e,t)=>{let n=new FileReader;return n.onload=function(){t("b"+(n.result.split(",")[1]||""))},n.readAsDataURL(e)};function dr(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let di="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",da="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<di.length;e++)da[di.charCodeAt(e)]=e;let dl=e=>{let t=.75*e.length,n=e.length,r,i=0,a,o,l,s;"="===e[e.length-1]&&(t--,"="===e[e.length-2]&&t--);let c=new ArrayBuffer(t),d=new Uint8Array(c);for(r=0;r<n;r+=4)a=da[e.charCodeAt(r)],o=da[e.charCodeAt(r+1)],l=da[e.charCodeAt(r+2)],s=da[e.charCodeAt(r+3)],d[i++]=a<<2|o>>4,d[i++]=(15&o)<<4|l>>2,d[i++]=(3&l)<<6|63&s;return c},ds="function"==typeof ArrayBuffer,dc=(e,t)=>{if("string"!=typeof e)return{type:"message",data:du(e,t)};let n=e.charAt(0);return"b"===n?{type:"message",data:dd(e.substring(1),t)}:c6[n]?e.length>1?{type:c6[n],data:e.substring(1)}:{type:c6[n]}:c9},dd=(e,t)=>ds?du(dl(e),t):{base64:!0,data:e},du=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,dp=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{dt(e,!1,e=>{r[a]=e,++i===n&&t(r.join("\x1e"))})})},df=(e,t)=>{let n=e.split("\x1e"),r=[];for(let e=0;e<n.length;e++){let i=dc(n[e],t);if(r.push(i),"error"===i.type)break}return r};function dg(e){return e.reduce((e,t)=>e+t.length,0)}function dh(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function dm(e){if(e){var t=e;for(var n in dm.prototype)t[n]=dm.prototype[n];return t}}dm.prototype.on=dm.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},dm.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},dm.prototype.off=dm.prototype.removeListener=dm.prototype.removeAllListeners=dm.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},dm.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},dm.prototype.emitReserved=dm.prototype.emit,dm.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},dm.prototype.hasListeners=function(e){return!!this.listeners(e).length};let dw="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),dx="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function db(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}let dv=dx.setTimeout,dy=dx.clearTimeout;function d_(e,t){t.useNativeTimers?(e.setTimeoutFn=dv.bind(dx),e.clearTimeoutFn=dy.bind(dx)):(e.setTimeoutFn=dx.setTimeout.bind(dx),e.clearTimeoutFn=dx.clearTimeout.bind(dx))}function dC(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class dk extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class dN extends dm{constructor(e){super(),this.writable=!1,d_(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new dk(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=dc(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return -1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){let t=function(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}(e);return t.length?"?"+t:""}}class dS extends dN{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){df(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,dp(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=dC()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let dE=!1;try{dE="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}let dT=dE;function dL(){}class dI extends dS{constructor(e){if(super(e),"undefined"!=typeof location){let t="https:"===location.protocol,n=location.port;n||(n=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class dO extends dm{constructor(e,t,n){super(),this.createRequest=e,d_(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=void 0!==n.data?n.data:null,this._create()}_create(){var e;let t=db(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let e in n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&n.setRequestHeader(e,this._opts.extraHeaders[e])}catch(e){}if("POST"===this._method)try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{n.setRequestHeader("Accept","*/*")}catch(e){}null==(e=this._opts.cookieJar)||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var e;3===n.readyState&&(null==(e=this._opts.cookieJar)||e.parseCookies(n.getResponseHeader("set-cookie"))),4===n.readyState&&(200===n.status||1223===n.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof n.status?n.status:0)},0))},n.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}"undefined"!=typeof document&&(this._index=dO.requestsCount++,dO.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=dL,e)try{this._xhr.abort()}catch(e){}"undefined"!=typeof document&&delete dO.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}function dA(){for(let e in dO.requests)dO.requests.hasOwnProperty(e)&&dO.requests[e].abort()}dO.requestsCount=0,dO.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",dA):"function"==typeof addEventListener&&addEventListener("onpagehide"in dx?"pagehide":"unload",dA,!1));let dD=function(){let e=dM({xdomain:!1});return e&&null!==e.responseType}();function dM(e){let t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||dT))return new XMLHttpRequest}catch(e){}if(!t)try{return new dx[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(e){}}let dF="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class dR extends dN{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,n=dF?{}:db(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;dt(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch(e){}r&&dw(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=dC()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}let dP=dx.WebSocket||dx.MozWebSocket,dz={websocket:class extends dR{createSocket(e,t,n){return dF?new dP(e,t,n):t?new dP(e,t):new dP(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends dN{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let r=function(e,t){n||(n=new TextDecoder);let r=[],i=0,a=-1,o=!1;return new TransformStream({transform(l,s){for(r.push(l);;){if(0===i){if(1>dg(r))break;let e=dh(r,1);o=(128&e[0])==128,i=(a=127&e[0])<126?3:126===a?1:2}else if(1===i){if(2>dg(r))break;let e=dh(r,2);a=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),i=3}else if(2===i){if(8>dg(r))break;let e=dh(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),n=t.getUint32(0);if(n>2097151){s.enqueue(c9);break}a=0x100000000*n+t.getUint32(4),i=3}else{if(dg(r)<a)break;let e=dh(r,a);s.enqueue(dc(o?e:n.decode(e),t)),i=0}if(0===a||a>e){s.enqueue(c9);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=e.readable.pipeThrough(r).getReader(),a=new TransformStream({transform(e,n){var r;r=t=>{let r,i=t.length;if(i<126)new DataView((r=new Uint8Array(1)).buffer).setUint8(0,i);else if(i<65536){let e=new DataView((r=new Uint8Array(3)).buffer);e.setUint8(0,126),e.setUint16(1,i)}else{let e=new DataView((r=new Uint8Array(9)).buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(i))}e.data&&"string"!=typeof e.data&&(r[0]|=128),n.enqueue(r),n.enqueue(t)},c8&&e.data instanceof Blob?e.data.arrayBuffer().then(dr).then(r):c7&&(e.data instanceof ArrayBuffer||de(e.data))?r(dr(e.data)):dt(e,!1,e=>{t||(t=new TextEncoder),r(t.encode(e))})}});a.readable.pipeTo(e.writable),this._writer=a.writable.getWriter();let o=()=>{i.read().then(({done:e,value:t})=>{e||(this.onPacket(t),o())}).catch(e=>{})};o();let l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&dw(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null==(e=this._transport)||e.close()}},polling:class extends dI{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=dD&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new dO(dM,this.uri(),e)}}},dj=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,dU=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function dB(e){if(e.length>8e3)throw"URI too long";let t=e,n=e.indexOf("["),r=e.indexOf("]");-1!=n&&-1!=r&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=dj.exec(e||""),a={},o=14;for(;o--;)a[dU[o]]=i[o]||"";return -1!=n&&-1!=r&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(e,t){let n=t.replace(/\/{2,9}/g,"/").split("/");return("/"==t.slice(0,1)||0===t.length)&&n.splice(0,1),"/"==t.slice(-1)&&n.splice(n.length-1,1),n}(0,a.path),a.queryKey=function(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}(0,a.query),a}let dV="function"==typeof addEventListener&&"function"==typeof removeEventListener,dW=[];dV&&addEventListener("offline",()=>{dW.forEach(e=>e())},!1);class dH extends dm{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){let n=dB(e);t.hostname=n.host,t.secure="https"===n.protocol||"wss"===n.protocol,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=dB(t.host).host);d_(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},n=e.split("&");for(let e=0,r=n.length;e<r;e++){let r=n[e].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}(this.opts.query)),dV&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},dW.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let e=this.opts.rememberUpgrade&&dH.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",dH.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let t=Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+="string"==typeof n?function(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)(t=e.charCodeAt(r))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(n):Math.ceil(1.33*(n.byteLength||n.size))),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,dw(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(dH.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),dV&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=dW.indexOf(this._offlineEventListener);-1!==e&&dW.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}dH.protocol=4;class d$ extends dH{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;dH.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!n)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;dH.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{n||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function i(){n||(n=!0,c(),t.close(),t=null)}let a=e=>{let n=Error("probe error: "+e);n.transport=t.name,i(),this.emitReserved("upgradeError",n)};function o(){a("transport closed")}function l(){a("socket closed")}function s(e){t&&e.name!==t.name&&i()}let c=()=>{t.removeListener("open",r),t.removeListener("error",a),t.removeListener("close",o),this.off("close",l),this.off("upgrading",s)};t.once("open",r),t.once("error",a),t.once("close",o),this.once("close",l),this.once("upgrading",s),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}class dq extends d${constructor(e,t={}){let n="object"==typeof e?e:t;(!n.transports||n.transports&&"string"==typeof n.transports[0])&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(e=>dz[e]).filter(e=>!!e)),super(e,n)}}dq.protocol;var dY={};a(dY,"protocol",()=>d0),a(dY,"PacketType",()=>o),a(dY,"Encoder",()=>d2),a(dY,"Decoder",()=>d3);let dG="function"==typeof ArrayBuffer,dJ=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,dZ=Object.prototype.toString,dK="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===dZ.call(Blob),dX="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===dZ.call(File);function dQ(e){return dG&&(e instanceof ArrayBuffer||dJ(e))||dK&&e instanceof Blob||dX&&e instanceof File}let d1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],d0=5;!function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"}(o||(o={}));class d2{constructor(e){this.replacer=e}encode(e){return(e.type===o.EVENT||e.type===o.ACK)&&function e(t,n){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(e(t[n]))return!0;return!1}if(dQ(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1==arguments.length)return e(t.toJSON(),!0);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return!0;return!1}(e)?this.encodeAsBinary({type:e.type===o.EVENT?o.BINARY_EVENT:o.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===o.BINARY_EVENT||e.type===o.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=function(e){let t=[],n=e.data;return e.data=function e(t,n){if(!t)return t;if(dQ(t)){let e={_placeholder:!0,num:n.length};return n.push(t),e}if(Array.isArray(t)){let r=Array(t.length);for(let i=0;i<t.length;i++)r[i]=e(t[i],n);return r}if("object"==typeof t&&!(t instanceof Date)){let r={};for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=e(t[i],n));return r}return t}(n,t),e.attachments=t.length,{packet:e,buffers:t}}(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}}function d5(e){return"[object Object]"===Object.prototype.toString.call(e)}class d3 extends dm{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let n=(t=this.decodeString(e)).type===o.BINARY_EVENT;n||t.type===o.BINARY_ACK?(t.type=n?o.EVENT:o.ACK,this.reconstructor=new d4(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(dQ(e)||e.base64)if(this.reconstructor)(t=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+e)}decodeString(e){let t=0,n={type:Number(e.charAt(0))};if(void 0===o[n.type])throw Error("unknown packet type "+n.type);if(n.type===o.BINARY_EVENT||n.type===o.BINARY_ACK){let r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);let i=e.substring(r,t);if(i!=Number(i)||"-"!==e.charAt(t))throw Error("Illegal attachments");n.attachments=Number(i)}if("/"===e.charAt(t+1)){let r=t+1;for(;++t&&","!==e.charAt(t)&&t!==e.length;);n.nsp=e.substring(r,t)}else n.nsp="/";let r=e.charAt(t+1);if(""!==r&&Number(r)==r){let r=t+1;for(;++t;){let n=e.charAt(t);if(null==n||Number(n)!=n){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){let r=this.tryParse(e.substr(t));if(d3.isPayloadValid(n.type,r))n.data=r;else throw Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}static isPayloadValid(e,t){switch(e){case o.CONNECT:return d5(t);case o.DISCONNECT:return void 0===t;case o.CONNECT_ERROR:return"string"==typeof t||d5(t);case o.EVENT:case o.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===d1.indexOf(t[0]));case o.ACK:case o.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class d4{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t,n;let e=(t=this.reconPack,n=this.buffers,t.data=function e(t,n){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<n.length)return n[t.num];throw Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=e(t[r],n);else if("object"==typeof t)for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=e(t[r],n));return t}(t.data,n),delete t.attachments,t);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function d6(e,t,n){return e.on(t,n),function(){e.off(t,n)}}let d9=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class d8 extends dm{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[d6(e,"open",this.onopen.bind(this)),d6(e,"packet",this.onpacket.bind(this)),d6(e,"error",this.onerror.bind(this)),d6(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var n,r,i;if(d9.hasOwnProperty(e))throw Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let a={type:o.EVENT,data:t};if(a.options={},a.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){let e=this.ids++,n=t.pop();this._registerAckCallback(e,n),a.id=e}let l=null==(r=null==(n=this.io.engine)?void 0:n.transport)?void 0:r.writable,s=this.connected&&!(null==(i=this.io.engine)?void 0:i._hasPingExpired());return this.flags.volatile&&!l||(s?(this.notifyOutgoingListeners(a),this.packet(a)):this.sendBuffer.push(a)),this.flags={},this}_registerAckCallback(e,t){var n;let r=null!=(n=this.flags.timeout)?n:this._opts.ackTimeout;if(void 0===r){this.acks[e]=t;return}let i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error("operation has timed out"))},r),a=(...e)=>{this.io.clearTimeoutFn(i),t.apply(this,e)};a.withError=!0,this.acks[e]=a}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(n===this._queue[0])return null!==e?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue()}),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;let t=this._queue[0];(!t.pending||e)&&(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:o.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case o.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case o.EVENT:case o.BINARY_EVENT:this.onevent(e);break;case o.ACK:case o.BINARY_ACK:this.onack(e);break;case o.DISCONNECT:this.ondisconnect();break;case o.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){let t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length)for(let t of this._anyListeners.slice())t.apply(this,e);super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:o.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:o.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n]){t.splice(n,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n]){t.splice(n,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let t of this._anyOutgoingListeners.slice())t.apply(this,e.data)}}function d7(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}d7.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(1&Math.floor(10*t))==0?e-n:e+n}return 0|Math.min(e,this.max)},d7.prototype.reset=function(){this.attempts=0},d7.prototype.setMin=function(e){this.ms=e},d7.prototype.setMax=function(e){this.max=e},d7.prototype.setJitter=function(e){this.jitter=e};class ue extends dm{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,d_(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(n=t.randomizationFactor)?n:.5),this.backoff=new d7({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;let r=t.parser||dY;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null==(t=this.backoff)||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null==(t=this.backoff)||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null==(t=this.backoff)||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new dq(this.uri,this.opts);let t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let r=d6(t,"open",function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},a=d6(t,"error",i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error("timeout")),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(d6(e,"ping",this.onping.bind(this)),d6(e,"data",this.ondata.bind(this)),d6(e,"error",this.onerror.bind(this)),d6(e,"close",this.onclose.bind(this)),d6(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){dw(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new d8(this,e,t),this.nsps[e]=n),n}_destroy(e){for(let e of Object.keys(this.nsps))if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),null==(n=this.engine)||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{!e.skipReconnect&&(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}let ut={};function un(e,t){let n;"object"==typeof e&&(t=e,e=void 0);let r=function(e,t="",n){let r=e;n=n||"undefined"!=typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),r=dB(e)),!r.port&&(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";let i=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),i=r.source,a=r.id,o=r.path,l=ut[a]&&o in ut[a].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||l?n=new ue(i,t):(ut[a]||(ut[a]=new ue(i,t)),n=ut[a]),r.query&&!t.query&&(t.query=r.queryKey),n.socket(r.path,t)}Object.assign(un,{Manager:ue,Socket:d8,io:un,connect:un});let ur=(e,t)=>un(e,{path:t}),ui=Z(null),ua=e=>e.replace(/\/$/,""),uo=({children:e,endpoint:t})=>{let n=tv.useRef(null),[r,i]=ep(!1);return eg(()=>{let e=ur(new URL(t).origin,`${ua(new URL(t).pathname)}/socket.io`);return n.current=e,e.connect(),e.on("connect",()=>{i(!0),console.log("Socket connected!",e.id)}),e.on("disconnect",()=>{i(!1),console.log("Socket disconnected!")}),()=>{e.disconnect()}},[]),tC(ui.Provider,{value:{socket:n.current,connected:r},children:e})},ul=()=>{let e=ev(ui);if(console.log("DEBUG:: contextValue",e),null==e||e?.socket==null)return{socket:null,connected:!1};let{socket:t,connected:n}=e;return{socket:t,connected:n}},us=({widget_id:e,context:t,userDetails:n,recentConversation:r})=>{let i=tH();console.log("New new context",t),console.log("DEBUG :: recentConversation in widget",i);let[a,o]=ep(()=>r),[l,s]=ep(!1),[c,d]=ep(null),u=void 0,[p]=ep(u),{socket:f,connected:g}=ul();console.log("DEBUG :: recentConversation in useMessages",r,a);let h={SYS_FirstName:"sample",SYS_LastName:"B",SYS_UserEmail:"example@gmail.com",SYS_Location:"India",SYS_Timezone:"Asia/Kolkata"},m=(e,t)=>{console.log("send message to ls called");let n=e.data.id,r=e.data.bot_id,i=t.find(e=>e.message.system.conversationId)?.message.system.conversationId;if(!i)return;let a=`RecentList::${r}::${n}`,o=localStorage.getItem(a),l={};if(o)try{l=JSON.parse(o)}catch(e){console.error(`Failed to parse RecentList for widget_id: ${n}`,e)}l[i]=t,localStorage.setItem(a,JSON.stringify(l)),localStorage.setItem(`${r}::${n}`,JSON.stringify({[n]:t})),console.log("Updated RecentList in localStorage:",a,l)},w=(e,t,{SYS_FirstName:n,SYS_LastName:r,SYS_UserEmail:i},a=null)=>{if(console.log("getUpdatedContext called"),!e.length)return console.log("DEBUG Dhan CONTEXT",t.context,n,r,i),t.context={...t.context},t.system={user:{...t.system?.user,first_name:n,last_name:r,email:i}},t;let o=e[e.length-1].message;return console.log(o,"Message DEBUGGGG",t.context.SYS_FirstName),{context:{...o.context,SYS_UPLOADED_FILE:a,SYS_FirstName:t.context.SYS_FirstName??"",SYS_LastName:t.context.SYS_LastName??"",SYS_UserEmail:t.context.SYS_UserEmail??"",SYS_Location:t.context.SYS_Location??""},system:o.system}},x=(e,t,n,r,i,a,o,l,s=null)=>(console.log("inside message",n),{authToken:i,widget_id:r,context:{...w([...n],t,o,s),input:{type:"text",value:e},for_event:l||null,SYS_UPLOADED_FILE:s,output:[]}}),b=n=>{console.log("event",n);let r=x("",t,a,e,p,i,h);console.log("event la message",x),f.emit(n,r)};return c2({widget_id:e,socket:f,connected:g,context:t,userDetails:n,continuseConversation:r.length>0,setIsTyping:s,messages:a,setMessages:o}),c3({widget_id:e,socket:f,messages:a,setMessages:o,setIsTyping:s,setAgentStatus:d}),{typing:l,connected:g,messages:a,setMessages:o,sendMessage:n=>{console.log("DEBUG :: inside send message",n,t,a),s(!0);let r=x(n,t,a,e,u,i,h);f.emit("message",r);let l={type:"sent",message:r.context,time:new Date};console.log("message array before sentMessage",a),console.log("sentMessage",l,[...a,l]),o([...a,l]),m(i,a),console.log("before set your local",a),console.log("DDD::",[...a,l]),tB({widget_id:i?.data.id,user_state:"ALLOW_MESSAGE",events:[l]}),console.log("after sentMessages messages",a)},sendFeedback:(n,r)=>{console.log("send feed back",n,r),s(!0);let o=x(n,t,a,e,u,i,h,r);f.emit("feedback",o)},restart:()=>{o([]),localStorage.setItem("messages",JSON.stringify([])),b("restart"),s(!0)},exit:()=>{b("exit")},agentStatus:c}},uc=()=>{let e=tH(),{status:t}=e,[n,r]=ep(!1);return"NOT_STARTED"===t||"WIDGET_LOADING"===t||"INVALID_STATE"===t?null:tC(M,{children:e?.data?.onscreen_notification&&!1==n&&tC("div",{className:"flex flex-col items-start gap-2.5 px-5 py-0 relative self-stretch w-full",children:tC("div",{className:"flex items-start gap-2 pl-3 pr-2.5 py-2.5 relative self-stretch w-full rounded-lg border border-solid border-zinc-200 bg-white",children:[tC("div",{className:"inline-flex items-center gap-2.5 relative pt-px",children:tC(lI,{className:"w-3.5 h-3.5 text-slate-600"})}),tC("p",{className:"relative flex-1 mt-[-1.00px] font-regular text-[#1d293d] text-xs tracking-[0] leading-[18px]",children:e?.data?.onscreen_notification}),tC("button",{className:"inline-flex items-center gap-2.5 p-0 h-[18px] w-[18px] justify-center cursor-pointer hover:bg-slate-100 rounded-xl overflow-hidden",onClick:()=>{r(!0)},children:tC(ld,{className:"h-4 w-4 cursor-pointer text-slate-600"})})]})})})},ud=({toggleWidget:e,isExpanded:t,restart:n,exit:r})=>{let i=tH(),[a,o]=tv.useState(!1),[l,s]=tv.useState(!1),c=tv.useRef(null),d=tv.useRef(null),[u,p]=tv.useState(!1),[f,g]=tv.useState(!1),h=()=>{let e=localStorage.getItem(`CONVERSATION::${i.data.id}`);if(!e)return void console.warn("No data found in CONVERSATION key");try{let t=JSON.parse(e),r=localStorage.getItem(`CONVERSATION_LIST::${i.data.id}`),a=r?JSON.parse(r):[];a.push(t),localStorage.setItem(`CONVERSATION_LIST::${i.data.id}`,JSON.stringify(a)),localStorage.removeItem(`CONVERSATION::${i.data.id}`),localStorage.removeItem("CURRENT_CONVERSATION"),n()}catch(e){console.error("Failed to parse localStorage data:",e)}},m=()=>{console.log("exit triggering"),r()},w=[{id:1,icon:tC(lT,{className:"w-[14px] h-[14px] text-slate-600"}),label:"Restart chat",selected:!0,onClick:()=>{h(),o(!1)}},{id:2,icon:tC(lc,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Exit chat",selected:!1,onClick:()=>{m(),o(!1)}}],x=[{id:1,icon:tC(lm,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Default mode",selected:t===tK.DEFAULT,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),p(!1)}},{id:2,icon:tC(lw,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Expanded mode",selected:t===tK.EXPANDED,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.EXPANDED}),p(!1)}},{id:3,icon:tC(lL,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Full screen mode",selected:t===tK.FULLSCREEN,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.FULLSCREEN}),p(!1)}}],b=x.find(e=>e.selected?e.icon:null);return eg(()=>{if(u)return u&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)};function e(e){let t=e.target;d.current&&t instanceof Node&&!d.current.contains(t)&&p(!1)}},[u]),eg(()=>{if(a)return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)};function e(e){let t=e.target;c.current&&t instanceof Node&&!c.current.contains(t)&&(console.log("DEBUG:::: event.target",t),o(!1))}},[a]),tv.useEffect(()=>{if(a)s(!0);else if(l){let e=setTimeout(()=>s(!1),140);return()=>clearTimeout(e)}},[a,l]),tv.useEffect(()=>{if(u)g(!0);else if(f){let e=setTimeout(()=>g(!1),140);return()=>clearTimeout(e)}},[u,f]),tC("header",{className:"flex items-center px-0 py-[15px] border-b border-zinc-300 w-full justify-between h-[60px] bg-white rounded-t-[22px]","data-model-id":"10445:55564",children:[tC("div",{className:"flex items-center gap-2 px-5 py-0 w-full",children:[tC("button",{className:"inline-flex items-center justify-center gap-2.5 p-0 cursor-pointer hover:bg-slate-100 rounded-xl overflow-hidden",onClick:()=>{t!==tK.DEFAULT?(t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),setTimeout(()=>{t1.trigger.selectTab({tab:uC.HOME})},300),t1.trigger.handleExitChatState({value:!1})):(t1.trigger.selectTab({tab:uC.HOME}),t1.send({type:"handleExitChatState",value:!1}))},children:tC(lN,{className:"w-6 h-6 cursor-pointer"})}),tC("img",{className:"w-auto h-[30px]",src:i?.data?.logo_url}),tC("span",{className:"flex flex-col items-start flex-1 grow",children:tC("span",{className:"flex flex-col items-start gap-[18px] flex-[0_0_auto]",children:tC("h1",{className:"w-fit mt-[-1.00px] font-text-md-medium font-[number:var(--text-md-medium-font-weight)] text-[#020618] text-[length:var(--text-md-medium-font-size)] tracking-[var(--text-md-medium-letter-spacing)] leading-[var(--text-md-medium-line-height)] whitespace-nowrap [font-style:var(--text-md-medium-font-style)]",children:i?.data?.name})})})]}),tC("div",{className:"flex items-center gap-2 px-5 py-0 w-max justify-end",onClick:e=>e.stopPropagation(),children:[tC("div",{className:"relative",ref:c,onMouseDown:e=>e.stopPropagation(),children:[tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-100 rounded-lg overflow-hidden",onClick:()=>o(!a),children:tC("div",{className:"inline-flex items-center gap-2.5",children:tC(lf,{className:"w-[16px] h-[16px]"})})}),l&&tC("nav",{className:"flex flex-col w-[126px] h-max absolute items-start gap-1 p-1 right-0 bg-white rounded-lg overflow-hidden border border-solid border-slate-200 z-50",style:{animation:a?"popin 0.18s cubic-bezier(0.4,0,0.2,1)":"popout 0.14s cubic-bezier(0.4,0,0.2,1)"},children:[tC("style",{children:`
5
+ @keyframes popin {
6
+ 0% {
7
+ opacity: 0;
8
+ transform: scale(0.95) translateY(-8px);
9
+ }
10
+ 100% {
11
+ opacity: 1;
12
+ transform: scale(1) translateY(0);
13
+ }
14
+ }
15
+ @keyframes popout {
16
+ 0% {
17
+ opacity: 1;
18
+ transform: scale(1) translateY(0);
19
+ }
20
+ 100% {
21
+ opacity: 0;
22
+ transform: scale(0.95) translateY(-8px);
23
+ }
24
+ }
25
+ `}),w.map(e=>tC("button",{className:`flex items-center gap-1.5 pl-2 pr-3 py-1.5 relative self-stretch w-full cursor-pointer
26
+ hover:bg-slate-100 rounded-md overflow-hidden`,onClick:e.onClick,children:[tC("div",{className:"inline-flex items-center gap-2.5 flex-[0_0_auto]",children:e.icon}),tC("div",{className:"flex flex-col items-start justify-center gap-2 flex-1 self-stretch grow",children:tC("div",{className:"inline-flex flex-col items-start gap-1 flex-[0_0_auto]",children:tC("div",{className:"flex items-center gap-1 flex-[0_0_auto]",children:tC("div",{className:"w-fit whitespace-nowrap text-xs font-medium text-[#020618]",children:e.label})})})})]},e.id))]})]}),tC("div",{className:"relative",ref:d,onMouseDown:e=>e.stopPropagation(),children:[tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-100 rounded-lg overflow-hidden",onClick:()=>p(!u),children:tC("div",{className:"inline-flex items-center gap-2.5",children:b?b.icon:null})}),f&&tC("nav",{className:"flex flex-col w-[148px] h-max absolute items-start gap-1 p-1 right-0 bg-white rounded-lg overflow-hidden border border-solid border-slate-200 z-50",style:{animation:u?"popin 0.18s cubic-bezier(0.4,0,0.2,1)":"popout 0.14s cubic-bezier(0.4,0,0.2,1)"},children:[tC("style",{children:`
27
+ @keyframes popin {
28
+ 0% {
29
+ opacity: 0;
30
+ transform: scale(0.95) translateY(-8px);
31
+ }
32
+ 100% {
33
+ opacity: 1;
34
+ transform: scale(1) translateY(0);
35
+ }
36
+ }
37
+ @keyframes popout {
38
+ 0% {
39
+ opacity: 1;
40
+ transform: scale(1) translateY(0);
41
+ }
42
+ 100% {
43
+ opacity: 0;
44
+ transform: scale(0.95) translateY(-8px);
45
+ }
46
+ }
47
+ `}),x.map(e=>tC("button",{className:`flex items-center gap-1.5 pl-2 pr-3 py-1.5 relative self-stretch w-full cursor-pointer
48
+ hover:bg-slate-100 rounded-md overflow-hidden`,style:{backgroundColor:e.selected?"#f0f0f0":""},onClick:e.onClick,children:[tC("div",{className:"inline-flex items-center gap-2.5 flex-[0_0_auto]",children:e.icon}),tC("div",{className:"flex flex-col items-start justify-center gap-2 flex-1 self-stretch grow",children:tC("div",{className:"inline-flex flex-col items-start gap-1 flex-[0_0_auto]",children:tC("div",{className:"flex items-center gap-1 flex-[0_0_auto]",children:tC("div",{className:"w-fit whitespace-nowrap text-xs font-medium text-[#020618]",children:e.label})})})})]},e.id))]})]}),tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-100 rounded-lg overflow-hidden",onClick:e,children:tC("div",{className:"inline-flex items-center gap-2.5",children:tC(ld,{className:"w-[18px] h-[18px]"})})})]})]})},uu=({toggleWidget:e,isExpanded:t,recentConversation:n})=>{let r=tH(),i=t6(),a=t9(),o=em(null),[l,s]=tv.useState(!1);console.log("DEBUG ::: recentConversation",n);let{messages:c,setMessages:d,sendMessage:u,typing:p,sendFeedback:f,restart:g,exit:h,agentStatus:m}=us({widget_id:r.config.widget_id,endpoint:r.config.endpoint,context:{context:{...i},system:{conversationId:cI(),stack:[]}},userDetails:i,recentConversation:n});console.log("DEBUG ::: messages",c),console.log("agentStatussss",m);let w=c[0]?.message?.system?.conversationId;eg(()=>{!0!==p?s(!1):setTimeout(()=>{s(!0)},500)},[p]),console.log("DEBUG :: Conversation ID:",w),eg(()=>{"NO_CONSENT_NEEDED"===r.status&&tW.trigger.processMessage()},[r.status]);let x=em(c.length);return eg(()=>{o.current&&(c.length>x.current||p&&l)&&o.current.scrollTo({top:o.current.scrollHeight,behavior:"smooth"}),x.current=c.length},[c,p,l]),tC(M,{children:[tC(ud,{toggleWidget:e,isExpanded:t,restart:g,exit:h}),tC("div",{className:"flex flex-col chat-area-height justify-between h-full",children:[tC("div",{className:`flex flex-col items-start gap-4 relative h-full overflow-y-scroll w-full ${a&&"pb-7"} `,ref:o,children:tC("div",{className:"flex flex-col items-start gap-4 relative self-stretch w-full pt-3 ",children:[(r?.data?.onscreen_notification||r?.data?.operating_hours_message)&&tC("div",{className:"flex flex-col items-start gap-4 relative self-stretch w-full",children:tC("div",{className:"flex flex-col items-start gap-4 relative self-stretch w-full",children:[r?.data?.operating_hours_message&&tC("div",{className:"flex items-center justify-center gap-2.5 px-5 py-0 relative self-stretch w-full",children:tC("p",{className:"relative flex-1 mt-[-1.00px] font-regular text-[#62748e] text-xs text-center tracking-[0] leading-[18px]",children:r?.data?.operating_hours_message})}),tC(uc,{})]})}),tC("div",{className:"flex flex-col items-start gap-4 relative self-stretch w-full",children:["CONSENT_NEEDED"===r.status?tC(cW,{}):null,w&&tC(cG,{conversationId:w}),"ALLOW_MESSAGE"===r.status||"SESSION_EXITED"===r.status?tC(M,{children:tC(cQ,{messages:c,typing:p,sendFeedback:f,sendMessage:u,setMessages:d})}):null,l&&p&&tC("div",{className:"flex flex-col items-start gap-2.5 px-5 py-0 relative self-stretch w-full h-5",children:tC("div",{className:"items-start gap-1.5 self-stretch w-full flex flex-col relative",children:tC("div",{className:"inline-flex items-start gap-1 relative",children:[tC("div",{className:"flex w-[auto] h-[24px] items-center justify-center rounded-full",children:tC("img",{src:r?.data?.logo_url,className:"w-auto h-6 text-white"})}),tC("div",{className:"inline-flex flex-col bg-zinc-100 items-start gap-2.5 px-2.5 py-2.5 relative rounded-lg max-w-[80%]",children:tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC("div",{className:"three-dot-typing",children:tC("div",{className:"typing-dots",children:[tC("div",{className:"dot"}),tC("div",{className:"dot"}),tC("div",{className:"dot"})]})})})})]})})}),null!==m&&"ALLOW_MESSAGE"===r.status&&tC("div",{className:"flex flex-col items-start gap-2.5 px-5 py-0 relative self-stretch w-full h-5",children:tC("div",{className:"items-start gap-1.5 self-stretch w-full flex flex-col relative",children:tC("div",{className:"inline-flex items-start gap-1 relative w-full",children:[tC("div",{className:"flex w-[auto] h-[24px] items-center justify-center rounded-full",children:tC("img",{src:r?.data?.logo_url,className:"w-auto h-6 text-white"})}),tC("div",{className:"ml-0.5 w-auto flex-col bg-zinc-100 gap-2.5 px-2 inline-flex items-center justify-center !h-6 relative rounded-md animated-gradient-bg-thought",children:tC("div",{className:"relative mt-[-1.00px] text-xs text-black font-regular w-full whitespace-nowrap",children:"thinking"===m?"Thinking...":"finalizing_output"===m?"Preparing response...":"progress_done"===m?"Almost done...":"searching_kb"===m?"Searching knowledge...":"action_detected"===m?"Processing your request...":"validating_input_for_action"===m?"Validating...":"executing_action"===m?"Executing....":"analysing_response"===m?"Generating response...":null})})]})})})]})]})}),tC("div",{className:`flex flex-col justify-end ${"ALLOW_MESSAGE"!==r.status&&!1==a?"h-12":"ALLOW_MESSAGE"==r.status&&a?"h-[50px]":"h-[126px]"}`,children:[!1==a?tC(c1,{sendMessage:u}):tC("div",{className:"flex flex-col items-start gap-2.5 !bg-white z-10",children:tC("div",{className:"flex flex-col items-center justify-center gap-8 w-full overflow-hidden border border-zinc-100 !bg-white",children:tC("div",{className:"flex items-center gap-2.5 px-4 py-2 w-full bg-white",children:tC("div",{className:"flex items-center justify-center gap-1.5 flex-1",children:tC("div",{className:"inline-flex flex-col items-start justify-center",children:tC("div",{className:"flex items-center w-full gap-1.5",children:tC("span",{className:"font-text-xs-regular text-[#1d293d] text-xs tracking-[0px] leading-[18px] whitespace-nowrap",children:"Your conversation has ended"})})})})})})}),r?.data?.custom_branding==!1?tC("div",{className:"flex flex-col items-start gap-2.5 bg-zinc-100",children:tC("div",{className:"flex flex-col items-center justify-center gap-8 w-full rounded-[10px] overflow-hidden border-none",children:tC("div",{className:"flex items-center gap-2.5 px-4 py-2 w-full bg-zinc-100",children:tC("div",{className:"flex items-center justify-center gap-1.5 flex-1",children:tC("div",{className:"inline-flex flex-col items-start justify-center",children:tC("div",{className:"flex items-center w-full gap-1.5 pb-0.5",children:[tC("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"16",viewBox:"0 0 22 16",fill:"none",children:[tC("path",{d:"M20.5751 1.50389L20.5502 1.47323C19.8159 0.667319 18.8275 0.160706 17.7631 0.0468283C17.0872 -0.00719091 14.7045 -0.00427096 11.894 0.00594889H11.1962C10.1158 0.0103288 8.89086 0.0147087 8.16379 0.00594889H8.14336C7.48345 0.00594889 6.8469 0.0964675 6.25122 0.274585C5.65555 0.452702 5.12412 0.714038 4.67445 1.04983C4.36493 1.28051 4.09484 1.54769 3.86854 1.84406C3.82182 1.87472 3.77656 1.90684 3.73276 1.94042C3.43055 2.16526 3.16191 2.42951 2.93124 2.72735C2.8889 2.75655 2.84802 2.78721 2.79838 2.8237C2.28301 3.20914 1.87859 3.68801 1.59828 4.24864C1.31796 4.80197 1.1632 5.43268 1.13692 6.12033C1.12816 6.31451 1.03619 7.42993 0.896028 8.95853C0.73981 10.6725 0.574833 12.3617 0.446355 13.5925L0.420075 13.8465C0.409855 13.9429 0.399636 14.0378 0.392336 14.1312L0.301817 15.0583C0.294517 15.1196 0.290137 15.178 0.282837 15.251L0.263858 15.4467C0.263858 15.4598 0.260938 15.4744 0.256558 15.5036L0.252178 15.5532C0.249258 15.5708 0.246338 15.6043 0.246338 15.6438C0.246338 15.6832 0.250718 15.7211 0.258018 15.7518C0.263858 15.7781 0.281377 15.8598 0.344156 15.9182C0.396716 15.9708 0.466794 16 0.541253 16C0.560233 16 0.580673 15.9985 0.593812 15.9956C0.605492 15.9956 0.617172 15.9912 0.628852 15.9883C0.675571 15.9723 0.719371 15.946 0.76025 15.9109C0.77485 15.8993 0.787989 15.8861 0.809889 15.8657C0.827409 15.8511 0.842009 15.8365 0.850769 15.8277L2.42608 14.3765C2.42608 14.3765 2.4363 14.3663 2.44068 14.3604L2.64508 14.1706C2.76918 14.0539 2.89182 13.9371 3.01592 13.8217C3.08307 13.7589 3.15023 13.6976 3.21885 13.6319C3.25535 13.5983 3.29039 13.5662 3.32543 13.5326L4.44377 12.4771C4.49049 12.4318 4.53721 12.388 4.58977 12.3398L5.4059 11.5675C5.45116 11.5252 5.49642 11.4828 5.54022 11.4405C5.60008 11.385 5.65993 11.3281 5.71979 11.2726L5.81177 11.185C5.86433 11.1339 5.91689 11.0843 6.04537 10.9631L6.15633 10.8594C7.02209 10.8536 8.83538 10.8536 11.1378 10.858H11.4341C13.1233 10.8594 14.484 10.8609 15.3323 10.858C16.0462 10.8521 16.7222 10.6959 17.3398 10.3922C17.9486 10.0959 18.4698 9.67684 18.8873 9.14687C19.2406 8.89867 19.5575 8.59938 19.8261 8.2592C20.4991 7.78617 21.032 7.12918 21.3708 6.35977C22.0891 4.71876 21.7825 2.8602 20.5721 1.50827L20.5751 1.50389ZM3.72838 2.67917C3.96344 2.56675 4.21602 2.46893 4.47881 2.39009C4.89345 2.26599 5.33728 2.1857 5.80009 2.15358C5.95193 2.14336 6.10961 2.13752 6.26874 2.13752H6.28626C6.97829 2.14336 8.10394 2.14044 9.29382 2.13752H10.0194C12.3014 2.12876 15.1425 2.11854 15.8564 2.17548C16.3791 2.23241 16.8784 2.39009 17.3412 2.64413C17.7354 2.85874 18.0931 3.14052 18.4099 3.48507C18.4143 3.49091 18.4187 3.49675 18.4231 3.50259C18.699 3.80773 18.9297 4.14936 19.1078 4.51436C19.4027 5.12171 19.5458 5.79476 19.521 6.46343C19.502 6.9861 19.3837 7.49855 19.172 7.98327C19.1078 8.12488 19.045 8.25044 18.9793 8.3687C18.8742 8.55558 18.7559 8.73515 18.6245 8.90305C18.2391 9.39798 17.7544 9.79072 17.185 10.0681C16.6141 10.3484 15.9907 10.493 15.3323 10.4973C14.4621 10.5003 13.0036 10.4988 11.4371 10.4973H11.1407C8.8237 10.493 7.00311 10.493 6.14611 10.4988C6.09209 10.4988 6.03807 10.5105 5.99135 10.5338C5.97529 10.5411 5.96069 10.5514 5.94901 10.563L5.80447 10.6988C5.67307 10.8229 5.62051 10.8726 5.56942 10.9222L5.47014 11.0156C5.41466 11.0682 5.35918 11.1208 5.29786 11.1762C5.25406 11.2186 5.21172 11.2595 5.165 11.3018L4.34741 12.0756C4.29777 12.1208 4.24814 12.1676 4.19996 12.2143L3.10497 13.2479C3.06409 13.2874 3.02175 13.3268 2.9692 13.375C2.90496 13.4363 2.84072 13.4961 2.77502 13.556C2.64216 13.6801 2.51222 13.8027 2.38082 13.9268L2.18373 14.1093C2.18373 14.1093 2.17497 14.1195 2.17059 14.1239L0.609872 15.5635V15.5489C0.615712 15.5255 0.617172 15.4992 0.620092 15.47L0.639072 15.2788C0.644912 15.2175 0.649292 15.1576 0.656592 15.0934L0.74711 14.1633C0.75587 14.0685 0.76463 13.9765 0.77485 13.883L0.801129 13.629C0.929607 12.4026 1.09312 10.712 1.2508 8.98919C1.37928 7.59053 1.48294 6.36269 1.49316 6.13201C1.51798 5.49546 1.6596 4.91439 1.91655 4.40632C2.17205 3.89679 2.54434 3.45733 3.02467 3.09818C3.06701 3.06752 3.10935 3.0354 3.15461 3.00474C3.33419 2.8821 3.52691 2.77261 3.72838 2.67771V2.67917ZM19.8787 6.47365C19.9049 5.7495 19.7502 5.01805 19.429 4.35814C19.2392 3.96687 18.9924 3.60187 18.7063 3.28506L18.6756 3.24564C18.334 2.87188 17.9427 2.56383 17.5135 2.33023C17.0113 2.0543 16.4652 1.88202 15.89 1.81924C15.4418 1.78274 14.2402 1.77252 12.6591 1.77252C11.8605 1.77252 10.964 1.77544 10.0209 1.77836H9.29528C8.64559 1.78128 7.94334 1.7842 7.33015 1.7842C6.93303 1.7842 6.57388 1.7842 6.29064 1.78128H6.2702C6.10377 1.78128 5.93879 1.78712 5.77819 1.79734C5.2891 1.83092 4.81899 1.9156 4.37953 2.047C4.2642 2.08204 4.14886 2.12 4.0379 2.16088C4.05688 2.14774 4.07586 2.1346 4.0963 2.12146C4.48027 1.85866 4.92411 1.65134 5.41612 1.50535C5.97529 1.33891 6.58264 1.25423 7.22211 1.25423C8.0908 1.26153 9.65443 1.25715 10.5085 1.25277H11.1494C13.5935 1.24547 16.1221 1.23817 16.7952 1.29365C17.2872 1.34475 17.7631 1.48929 18.2084 1.72288C18.6348 1.9448 19.0173 2.24117 19.3428 2.59595C19.3487 2.60471 19.3545 2.61201 19.3604 2.61931C19.6567 2.9478 19.8991 3.3128 20.0801 3.70407C20.1736 3.90555 20.2509 4.11578 20.3108 4.32748C20.5707 5.24727 20.5006 6.20647 20.1079 7.1029C20.0728 7.1832 20.0349 7.2635 19.9955 7.34234C19.9152 7.49855 19.8246 7.65185 19.7254 7.79931C19.6757 7.87231 19.6232 7.94531 19.5691 8.01538C19.5575 8.03144 19.5443 8.0475 19.5312 8.06356C19.7443 7.55549 19.8626 7.02114 19.883 6.47657L19.8787 6.47365ZM20.4013 3.55515C20.2071 3.13614 19.9502 2.74633 19.6348 2.39447L19.61 2.36381C19.2509 1.97108 18.8333 1.64842 18.3705 1.40607C17.8843 1.15203 17.3646 0.995813 16.8229 0.938874C16.1309 0.880475 13.5964 0.889235 11.1451 0.896535H10.5041C8.99306 0.903835 7.85866 0.905295 7.22211 0.899455H7.20313C6.5403 0.899455 5.90229 0.988514 5.311 1.16663C5.20588 1.19875 5.092 1.23671 4.96644 1.28343L4.95914 1.28635C5.36064 1.00019 5.82929 0.775357 6.35488 0.617679C6.91697 0.449782 7.51849 0.363643 8.14482 0.363643H8.16233C8.89086 0.372403 10.1172 0.368023 11.2005 0.363643H11.9218C14.1935 0.354883 17.0229 0.344664 17.7325 0.401603C18.7048 0.505261 19.6115 0.970994 20.2816 1.70536C20.2874 1.71412 20.2933 1.72288 20.2991 1.72872C21.4248 2.977 21.7124 4.69394 21.0481 6.21085C20.8933 6.56417 20.6948 6.88828 20.4583 7.18174C20.9576 6.00062 20.9371 4.71438 20.3999 3.55515H20.4013Z",fill:"#1D293D"}),tC("path",{d:"M2.33722 6.16568C2.3197 6.65039 1.92697 11.042 1.70067 12.9809C1.69191 13.0553 1.73133 13.1269 1.79849 13.1604C1.82331 13.1721 1.85105 13.1794 1.87879 13.1794C1.92405 13.1794 1.96785 13.1619 2.00143 13.1312L3.08473 12.1092C3.16357 12.0348 3.24241 11.9603 3.32417 11.88L3.36213 11.8435C3.46871 11.7413 3.57674 11.6391 3.68478 11.5384L3.70668 11.518C3.84684 11.3836 3.98554 11.2522 4.11694 11.1281C4.12278 11.1238 4.12862 11.1194 4.14176 11.1077C4.18993 11.061 4.23811 11.0157 4.28921 10.9675C4.45419 10.8099 4.61625 10.6566 4.77247 10.5091C4.79875 10.4858 4.82356 10.4624 4.84838 10.4376L4.87758 10.4084C4.90386 10.385 4.93014 10.3602 4.95496 10.3354L4.9827 10.3091C5.02066 10.2755 5.0557 10.2419 5.08928 10.2098C5.17688 10.1281 5.26302 10.0463 5.34916 9.966L5.50975 9.81416C5.51705 9.80686 5.52435 9.79956 5.53019 9.79226L5.55793 9.76744C5.63239 9.69737 5.73313 9.65795 5.84117 9.65649C6.12732 9.65357 6.66898 9.65065 7.36247 9.64919C8.45307 9.64773 9.92035 9.64919 11.357 9.65065C11.9439 9.65065 12.5191 9.65065 13.052 9.65211C14.0097 9.65211 14.8302 9.65211 15.3325 9.65065C15.9661 9.68423 16.6421 9.46815 17.2334 9.04622C17.4232 8.9119 17.6042 8.75276 17.7721 8.5761C17.8758 8.46515 17.9721 8.34835 18.0597 8.22863L18.0714 8.21987L18.0758 8.20673C18.1094 8.16147 18.1415 8.11475 18.1721 8.06657C18.2437 7.95561 18.3108 7.83735 18.3707 7.71326C18.3897 7.67384 18.4101 7.63296 18.4276 7.59354C18.6014 7.2008 18.689 6.79931 18.689 6.39782C18.689 6.30146 18.6846 6.21094 18.6758 6.13502C18.5955 4.56555 17.3005 3.16689 15.788 3.01651H15.7851C15.3354 2.98585 14.3295 2.97271 12.6184 2.97271C11.7351 2.97271 10.7759 2.97709 9.86195 2.98001H9.77289C8.50855 2.98439 7.08945 2.98877 6.23536 2.98001C5.67619 2.92307 5.0922 3.00483 4.54617 3.21653C4.32279 3.30267 4.1038 3.41362 3.90232 3.54356L3.88626 3.55378C3.73588 3.64868 3.58842 3.75964 3.44681 3.88374C3.30373 4.00783 3.16941 4.14653 3.04823 4.29545C2.82778 4.56847 2.6555 4.86484 2.5387 5.17582C2.41752 5.48971 2.35036 5.82259 2.33576 6.16568H2.33722ZM3.09787 8.37171L3.00735 8.39069L2.95625 8.93234L3.04385 8.9411L2.95479 8.95278C2.83362 10.2419 2.7212 11.334 2.6409 12.0363L2.10801 12.5385C2.34306 10.3967 2.67594 6.63725 2.692 6.17882C2.70368 5.87661 2.76354 5.58169 2.87157 5.30283C2.97523 5.0269 3.12853 4.7641 3.32563 4.52029C3.36067 4.47795 3.39717 4.43561 3.43367 4.39473C3.33585 4.68088 3.28037 4.97726 3.27015 5.28239C3.25993 5.53497 3.14605 6.88837 3.00881 8.36441L3.09641 8.37317L3.09787 8.37171ZM3.49645 6.94823L3.59572 5.76711C3.6074 5.60797 3.61762 5.48241 3.622 5.39335C3.62492 5.35393 3.62638 5.31889 3.62784 5.29407C3.64098 4.9101 3.73442 4.54073 3.90232 4.19617C3.9359 4.12755 3.9724 4.06039 4.01036 3.99615C4.01766 3.98447 4.02496 3.97279 4.03226 3.96257L4.05854 3.9217C4.07752 3.89104 4.09796 3.86038 4.1184 3.83118L4.13008 3.82388C4.17679 3.79468 4.22351 3.7684 4.27023 3.74212C4.28483 3.73482 4.29797 3.72606 4.31257 3.71876C4.25563 3.93922 4.22205 4.16405 4.21329 4.39181C4.19577 4.86776 3.81034 9.19367 3.58258 11.1457L3.44097 11.2814C3.33293 11.3822 3.22489 11.4844 3.11685 11.588L3.08035 11.6231C3.06867 11.6348 3.05553 11.6464 3.04385 11.6581C3.18839 10.3354 3.37381 8.37609 3.49791 6.94969L3.49645 6.94823ZM6.3288 9.04038L6.44414 8.93234C6.45144 8.92504 6.45874 8.91774 6.46458 8.90898L6.48064 8.89438C6.56094 8.81846 6.6646 8.77612 6.77263 8.7732C7.5143 8.76444 10.005 8.7659 12.2052 8.76736H13.9864C14.9441 8.76882 15.7646 8.76882 16.2669 8.76736C16.334 8.77028 16.3997 8.77028 16.4669 8.76882L16.5326 8.7659C16.5764 8.76298 16.6216 8.76006 16.6742 8.75422C16.699 8.7513 16.7224 8.74984 16.7457 8.74546C16.7837 8.73962 16.8217 8.73378 16.8596 8.72648C16.9253 8.7148 16.9896 8.7002 17.0553 8.68414L17.1064 8.671C17.1239 8.66662 17.1399 8.66224 17.1575 8.6564C17.1137 8.69144 17.0699 8.72356 17.0261 8.75422C16.5399 9.10169 15.9763 9.29441 15.442 9.29441H15.4391C15.4245 9.29441 15.4113 9.29441 15.3938 9.29441H15.3325C14.8288 9.29441 14.0097 9.29441 13.052 9.29441C12.5191 9.29295 11.9439 9.29295 11.3555 9.29295C9.91889 9.29149 8.45161 9.29003 7.35955 9.29149C6.81497 9.29295 6.36238 9.29441 6.05287 9.29733C6.1463 9.20973 6.23682 9.12505 6.32588 9.04038H6.3288ZM17.8101 7.96437L17.7984 7.98189C17.7794 7.99357 17.7604 8.00379 17.7414 8.01547L17.6947 8.04321C17.6787 8.05343 17.6626 8.06219 17.6465 8.07095C17.6217 8.08409 17.5969 8.09723 17.5721 8.10891L17.5166 8.13665C17.5005 8.14541 17.4845 8.15271 17.4684 8.16147C17.4436 8.17315 17.4202 8.18337 17.3954 8.19359L17.337 8.21841C17.321 8.22571 17.3049 8.23301 17.2889 8.23885C17.2626 8.24907 17.2378 8.25783 17.2115 8.26659L17.156 8.28557C17.1399 8.29141 17.1239 8.29725 17.1078 8.30163C17.0815 8.30893 17.0567 8.31623 17.0304 8.32353L16.9706 8.33959C16.956 8.34397 16.9399 8.34835 16.9253 8.35127C16.8961 8.35857 16.8669 8.36295 16.8377 8.36879L16.7837 8.37901C16.7706 8.38193 16.756 8.38485 16.7428 8.38631C16.7063 8.39215 16.6698 8.39507 16.6333 8.39945L16.591 8.40383C16.5808 8.40383 16.5705 8.40675 16.5603 8.40675C16.499 8.41113 16.4391 8.41405 16.3778 8.41405C16.3457 8.41405 16.3165 8.41405 16.2683 8.41259C15.7646 8.41405 14.9441 8.41405 13.9878 8.41405H12.2607C10.2211 8.41113 7.93332 8.40821 6.99017 8.41551L7.38728 8.04175C7.38728 8.04175 7.39896 8.02861 7.4048 8.02277L7.4267 8.00233C7.50408 7.92787 7.60774 7.88553 7.71724 7.88407C8.47205 7.87239 11.0606 7.87531 13.233 7.87823H14.9281C15.8858 7.87969 16.7063 7.87969 17.2115 7.87823C17.4363 7.88845 17.6743 7.86655 17.9108 7.81399C17.905 7.82275 17.8991 7.83297 17.8933 7.84173C17.867 7.88261 17.8393 7.92349 17.8101 7.96437ZM17.2086 7.52054C16.7049 7.522 15.8858 7.522 14.9281 7.52054H13.233C11.0679 7.51762 8.48227 7.5147 7.70994 7.52638C7.50992 7.5293 7.32305 7.60522 7.18289 7.741L7.14201 7.7775C7.13471 7.7848 7.12741 7.7921 7.12157 7.80086L6.79745 8.10599C6.61496 8.27681 6.42808 8.45346 6.23828 8.6345L6.20908 8.66224L6.19156 8.6783C6.04703 8.81408 5.90395 8.95132 5.75649 9.09148L5.68349 9.16009C5.56231 9.27543 5.43968 9.39077 5.31704 9.50757L5.25572 9.56597C5.23674 9.58349 5.21776 9.60101 5.2017 9.61853L5.10534 9.71051C5.02066 9.7908 4.93598 9.8711 4.84692 9.95286C4.81334 9.98498 4.77977 10.0156 4.74181 10.0507L4.70823 10.0828C4.68633 10.1047 4.66297 10.1266 4.63669 10.15L4.59581 10.1894C4.57537 10.2084 4.55493 10.2288 4.53157 10.2492C4.37243 10.3996 4.20891 10.5544 4.0454 10.7106C4.02496 10.7296 4.00452 10.7485 3.98554 10.7675C4.22059 8.62866 4.55347 4.8663 4.57099 4.40641C4.58121 4.10711 4.64253 3.81074 4.75203 3.52458C5.12578 3.39026 5.51121 3.32164 5.89811 3.32164C6.00177 3.32164 6.10105 3.32602 6.22076 3.3377H6.24266C7.07777 3.34646 8.44723 3.34354 9.77727 3.3377H9.86633C10.7803 3.33478 11.7395 3.3304 12.6228 3.3304C14.3266 3.3304 15.3237 3.34354 15.7603 3.37274C17.102 3.5056 18.2524 4.7568 18.324 6.16714C18.3313 6.23722 18.3357 6.31606 18.3357 6.39928C18.3357 6.72339 18.267 7.05335 18.1327 7.38038C17.8261 7.4855 17.5166 7.53368 17.2115 7.52054H17.2086Z",fill:"#1D293D"})]}),tC("span",{className:"font-text-xs-regular text-[#1d293d] text-xs tracking-[0px] leading-[18px] whitespace-nowrap",children:"Powered by pagergpt"})]})})})})})}):null]})]})]})},up=({toggleWidget:e,isExpanded:t,recentConversation:n})=>tC(M,{children:tC(uu,{toggleWidget:e,isExpanded:t,recentConversation:n})}),uf=()=>{let e=tH(),{status:t}=e,n=!1,r=null;if("NOT_STARTED"!==t&&"WIDGET_LOADING"!==t&&"INVALID_STATE"!==t){let t=localStorage.getItem(`${e?.data?.bot_id}::${e?.data?.id}`);if(t)try{let i=JSON.parse(t);i&&"object"==typeof i&&i[e?.data?.id]&&(n=!0,r=i,console.log(r,"recent chats"))}catch(e){console.error("Failed to parse recent chat from localStorage",e)}}return{hasRecentChat:n,recentChat:r}},ug=({toggleWidget:e,isExpanded:t})=>{let n=tH(),{recentChat:r}=uf(),i=n?.data?.id,a=(r??{})?.[i]??[],o=tv.useRef(null),[l,s]=tv.useState(!1),[c,d]=tv.useState(!1),u=[{id:1,icon:tC(lm,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Default mode",selected:t===tK.DEFAULT,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),s(!1)}},{id:2,icon:tC(lw,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Expanded mode",selected:t===tK.EXPANDED,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.EXPANDED}),s(!1)}},{id:3,icon:tC(lL,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Full screen mode",selected:t===tK.FULLSCREEN,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.FULLSCREEN}),s(!1)}}],p=u.find(e=>e.selected?e.icon:null);return(eg(()=>{function e(e){o.current&&!o.current.contains(e.target)&&s(!1)}return l&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l]),tv.useEffect(()=>{if(l)d(!0);else if(c){let e=setTimeout(()=>d(!1),140);return()=>clearTimeout(e)}},[l,c]),Array.isArray(a)&&0!==a.length)?tC(M,{children:[tC("header",{className:"flex items-center px-0 py-[15px] border-b border-zinc-300 w-full justify-between h-[60px] bg-white rounded-t-[22px] cursor-pointer",children:[tC("div",{className:"flex items-center gap-2 px-5 w-full",children:[tC("button",{className:"inline-flex items-center justify-center gap-2.5 p-0 cursor-pointer hover:bg-slate-100 rounded-xl overflow-hidden",onClick:()=>{t!==tK.DEFAULT?(t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),setTimeout(()=>{t1.trigger.selectTab({tab:uC.HOME})},300)):t1.trigger.selectTab({tab:uC.HOME})},children:tC(lN,{className:"w-6 h-6"})}),tC("img",{className:"w-auto h-[30px]",src:n?.data?.logo_url,alt:"Bot logo"}),tC("span",{className:"flex flex-col items-start grow",children:tC("span",{className:"flex flex-col items-start gap-[18px] flex-[0_0_auto]",children:tC("h1",{className:"w-fit mt-[-1.00px] font-text-md-medium font-[number:var(--text-md-medium-font-weight)] text-[#020618] text-[length:var(--text-md-medium-font-size)] tracking-[var(--text-md-medium-letter-spacing)] leading-[var(--text-md-medium-line-height)] whitespace-nowrap [font-style:var(--text-md-medium-font-style)]",children:n?.data?.name})})})]}),tC("div",{className:"flex items-center gap-2 px-5",children:[tC("div",{className:"relative",ref:o,children:[tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-100 rounded-lg overflow-hidden",onClick:()=>s(!l),children:tC("div",{className:"inline-flex items-center gap-2.5",children:p?p.icon:null})}),c&&tC("nav",{className:"flex flex-col w-[148px] h-max absolute items-start gap-1 p-1 right-0 bg-white rounded-lg overflow-hidden border border-solid border-slate-200 z-50",style:{animation:l?"popin 0.18s cubic-bezier(0.4,0,0.2,1)":"popout 0.14s cubic-bezier(0.4,0,0.2,1)"},children:[tC("style",{children:`
49
+ @keyframes popin {
50
+ 0% {
51
+ opacity: 0;
52
+ transform: scale(0.95) translateY(-8px);
53
+ }
54
+ 100% {
55
+ opacity: 1;
56
+ transform: scale(1) translateY(0);
57
+ }
58
+ }
59
+ @keyframes popout {
60
+ 0% {
61
+ opacity: 1;
62
+ transform: scale(1) translateY(0);
63
+ }
64
+ 100% {
65
+ opacity: 0;
66
+ transform: scale(0.95) translateY(-8px);
67
+ }
68
+ }
69
+ `}),u.map(e=>tC("button",{className:`flex items-center gap-1.5 pl-2 pr-3 py-1.5 relative self-stretch w-full cursor-pointer
70
+ hover:bg-slate-100 rounded-md overflow-hidden`,style:{backgroundColor:e.selected?"#f0f0f0":""},onClick:e.onClick,children:[tC("div",{className:"inline-flex items-center gap-2.5 flex-[0_0_auto]",children:e.icon}),tC("div",{className:"flex flex-col items-start justify-center gap-2 flex-1 self-stretch grow",children:tC("div",{className:"inline-flex flex-col items-start gap-1 flex-[0_0_auto]",children:tC("div",{className:"flex items-center gap-1 flex-[0_0_auto]",children:tC("div",{className:"w-fit whitespace-nowrap text-xs font-medium text-[#020618]",children:e.label})})})})]},e.id))]})]}),tC("button",{className:"inline-flex items-center p-1 hover:bg-slate-50 rounded-lg cursor-pointer",onClick:e,children:tC(ld,{className:"w-[18px] h-[18px]"})})]})]}),tC("div",{className:"flex flex-col h-[93%] pt-2 justify-between pb-2.5",children:[tC("div",{className:"flex flex-col gap-4 h-full overflow-y-scroll w-full",children:tC("div",{className:"flex flex-col gap-5 w-full pb-3",children:a.map((e,t)=>tC("div",{children:"received"===e.type?tC(cK,{message:e.message,time:e.time,sendFeedback:function(){throw Error("Function not implemented.")},sendMessage:function(){throw Error("Function not implemented.")}}):tC("div",{className:"flex flex-col items-end px-5 animate-slide-in-right",children:tC("div",{className:"w-[300px] flex flex-col items-end gap-1",children:tC("div",{className:"flex flex-1 text-sm px-3.5 py-2.5 rounded-lg",style:{backgroundColor:n?.data?.secondary_color,color:n?.data?.user_message_text_color},children:tC(cV,{mdText:e.message.input??""})})})})},e.message?.event_id??t))})}),tC("div",{className:"flex flex-col items-start gap-2.5 bg-white",children:tC("div",{className:"flex flex-col items-center justify-center gap-8 w-full overflow-hidden border border-zinc-100",children:tC("div",{className:"flex items-center gap-2.5 px-4 py-2 w-full bg-white",children:tC("div",{className:"flex items-center justify-center gap-1.5 flex-1",children:tC("div",{className:"inline-flex flex-col items-start justify-center",children:tC("div",{className:"flex items-center w-full gap-1.5",children:tC("span",{className:"font-text-xs-regular text-[#1d293d] text-xs tracking-[0px] leading-[18px] whitespace-nowrap",children:"Your conversation has ended"})})})})})})})]})]}):tC("div",{className:"p-4 text-center text-gray-500",children:"No recent messages found."})};var uh=({toggleWidget:e,isExpanded:t})=>{let n=tv.useRef(null),[r,i]=tv.useState(!1),[a,o]=tv.useState(!1),l=[{id:1,icon:tC(lm,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Default mode",selected:t===tK.DEFAULT,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),i(!1)}},{id:2,icon:tC(lw,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Expanded mode",selected:t===tK.EXPANDED,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.EXPANDED}),i(!1)}},{id:3,icon:tC(lL,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Full screen mode",selected:t===tK.FULLSCREEN,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.FULLSCREEN}),i(!1)}}],s=l.find(e=>e.selected?e.icon:null);return eg(()=>{function e(e){n.current&&!n.current.contains(e.target)&&i(!1)}return r&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),tv.useEffect(()=>{if(r)o(!0);else if(a){let e=setTimeout(()=>o(!1),140);return()=>clearTimeout(e)}},[r,a]),tC("header",{className:"flex items-center px-0 py-[15px] border-b border-zinc-300 w-full justify-between h-[60px] bg-white rounded-t-[22px]","data-model-id":"10445:55564",children:[tC("div",{className:"flex items-center gap-2 px-5 py-0 w-full",children:[tC("button",{className:"inline-flex items-center justify-center gap-2.5 p-0 cursor-pointer hover:bg-slate-100 rounded-xl overflow-hidden",onClick:()=>{t!==tK.DEFAULT?(t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),setTimeout(()=>{t1.trigger.selectTab({tab:uC.HOME})},300)):t1.trigger.selectTab({tab:uC.HOME})},children:tC(lN,{className:"w-6 h-6 cursor-pointer"})}),tC("span",{className:"text-slate-950 text-base font-medium leading-6",children:"Recent chats"})]}),tC("div",{className:"flex items-center gap-2 px-5 py-0 w-max justify-end",children:[tC("div",{className:"relative",ref:n,children:[tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-100 rounded-lg overflow-hidden",onClick:()=>i(!r),children:tC("div",{className:"inline-flex items-center gap-2.5",children:s?s.icon:null})}),a&&tC("nav",{className:"flex flex-col w-[148px] h-max absolute items-start gap-1 p-1 right-0 bg-white rounded-lg overflow-hidden border border-solid border-slate-200 z-50",style:{animation:r?"popin 0.18s cubic-bezier(0.4,0,0.2,1)":"popout 0.14s cubic-bezier(0.4,0,0.2,1)"},children:[tC("style",{children:`
71
+ @keyframes popin {
72
+ 0% {
73
+ opacity: 0;
74
+ transform: scale(0.95) translateY(-8px);
75
+ }
76
+ 100% {
77
+ opacity: 1;
78
+ transform: scale(1) translateY(0);
79
+ }
80
+ }
81
+ @keyframes popout {
82
+ 0% {
83
+ opacity: 1;
84
+ transform: scale(1) translateY(0);
85
+ }
86
+ 100% {
87
+ opacity: 0;
88
+ transform: scale(0.95) translateY(-8px);
89
+ }
90
+ }
91
+ `}),l.map(e=>tC("button",{className:`flex items-center gap-1.5 pl-2 pr-3 py-1.5 relative self-stretch w-full cursor-pointer
92
+ hover:bg-slate-100 rounded-md overflow-hidden`,style:{backgroundColor:e.selected?"#f0f0f0":""},onClick:e.onClick,children:[tC("div",{className:"inline-flex items-center gap-2.5 flex-[0_0_auto]",children:e.icon}),tC("div",{className:"flex flex-col items-start justify-center gap-2 flex-1 self-stretch grow",children:tC("div",{className:"inline-flex flex-col items-start gap-1 flex-[0_0_auto]",children:tC("div",{className:"flex items-center gap-1 flex-[0_0_auto]",children:tC("div",{className:"w-fit whitespace-nowrap text-xs font-medium text-[#020618]",children:e.label})})})})]},e.id))]})]}),tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-50 rounded-lg overflow-hidden",onClick:e,children:tC("div",{className:"inline-flex items-center gap-2.5",children:tC(ld,{className:"w-[18px] h-[18px]"})})})]})]})},um=({message:e,lastActive:t,onClick:n,animate:r,delay:i=0,brandColor:a})=>{let[o,l]=ep(!1);return tC("div",{className:`flex py-3 pl-5 !pr-4 items-center gap-2.5 rounded-xl w-full justify-between cursor-pointer text-slate-950 hover:text-[#4B2FFF] transition-all duration-800 ease-in-out
93
+ ${r?"opacity-100 translate-x-0":"opacity-0 -translate-x-1"}
94
+ `,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),style:{willChange:"transform, opacity",transitionDelay:`${i}ms`,border:`1px solid ${o?a:"#e4e4e7"}`},onClick:n,children:[tC("div",{className:"flex flex-col items-start gap-1 w-[93%]",children:[tC("span",{className:"text-slate-950 text-sm font-normal leading-5 overflow-hidden text-ellipsis whitespace-nowrap w-full",children:e}),tC("span",{className:"text-slate-600 text-xs font-normal leading-[18px] overflow-hidden text-ellipsis whitespace-nowrap w-full",children:t||"-"})]}),tC("span",{className:`w-3 h-5 transition-all duration-800 ease-in-out ${r?"opacity-100 translate-x-0":"opacity-0 -translate-x-1"}`,style:{color:o?a:"#e4e4e7",willChange:"transform, opacity",transitionDelay:`${i}ms`},children:tC(lE,{className:"w-[18px] h-[18px]"})})]})};let uw=()=>{let e=tH(),{status:t}=e,n=!1,r=null;if("NOT_STARTED"!==t&&"WIDGET_LOADING"!==t&&"INVALID_STATE"!==t){let t=localStorage.getItem(`CONVERSATION_LIST::${e.data.id}`);if(t)try{let e=JSON.parse(t);e&&(n=!0,r=e)}catch(e){console.error("Failed to parse recent chat list from localStorage",e)}}return{hasRecentChatList:n,recentChatList:r}},ux=e=>{let t,n=tH(),{status:r}=n;if("NOT_STARTED"!==r&&"WIDGET_LOADING"!==r&&"INVALID_STATE"!==r){let r=localStorage.getItem(`RecentList::${n?.data?.bot_id}::${n?.data?.id}`);if(r)try{let n=JSON.parse(r);console.log("parsed::",n[e]),t=n[e]}catch(e){console.error("Failed to parse recent chat list from localStorage",e)}}return{chatDetail:t}},ub=({toggleWidget:e,isExpanded:t,switchTab:n})=>{let[r,i]=ep(0),a=tH(),{recentChatList:o}=uw();return eg(()=>{if(r<=(o||[]).length){let e=setTimeout(()=>{i(e=>e+1)},120);return()=>clearTimeout(e)}},[r]),console.log(o,"Inga recent list"),tC(M,{children:[tC(uh,{isExpanded:t,toggleWidget:e}),tC("div",{className:"flex flex-1 flex-col justify-between h-[90%] relative",children:[tC("div",{className:"pt-4 px-5 pb-[70px] overflow-y-scroll h-full flex flex-col items-start gap-3",children:(o||[]).map((e,t)=>({...e,originalIndex:t})).sort((e,t)=>{let n=new Date(e.events?.[e.events.length-1]?.time||0).getTime();return new Date(t.events?.[t.events.length-1]?.time||0).getTime()-n}).map((e,t)=>{let n=e.events,i=n[n.length-1];return tC(um,{lastActive:t8(i?.time),message:i?.message?.output?.[0]?.value?.value??"No message",brandColor:a?.data?.brand_color,animate:t<r,delay:2*t,onClick:()=>{localStorage.setItem("SELECTED_INDEX",`${e.originalIndex}`),t1.trigger.selectTab({tab:uC.NEW_RECENT_MESSAGE})}},t)})}),tC("div",{className:"w-full absolute flex justify-center bottom-20",children:tC("button",{className:`${"light"==lP(a?.data?.brand_color)?"text-black":"text-white"} flex p-2 text-sm z-50 font-medium leading-5 cursor-pointer pl-3.5 pr-3 justify-center items-center gap-1.5 rounded-[10px]`,style:{backgroundColor:a?.data?.brand_color?a?.data?.brand_color:"#4B2FFF",color:"light"==lP(a?.data?.brand_color)?"#000":"#fff"},onClick:()=>{localStorage.setItem("Tab","Chat"),t1.trigger.selectTab({tab:uC.CHAT})},children:[a?.data?.send_message_description?a?.data?.send_message_description:"Send us a message",tC(lv,{className:"w-4 h-4"})]})}),tC("div",{className:"w-full absolute flex justify-center bottom-gradient-recent-list",children:""}),tC(lR,{switchTab:n,isExpanded:t})]})]})},uv=({isExpanded:e})=>{let t=tH(),{status:n}=t,{chatDetail:r}=ux(t5());console.log("chatDetail",r);let i=tv.useRef(null),[a,o]=tv.useState(!1),[l,s]=tv.useState(!1),c=[{id:1,icon:tC(lm,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Default mode",selected:e===tK.DEFAULT,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),o(!1)}},{id:2,icon:tC(lw,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Expanded mode",selected:e===tK.EXPANDED,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.EXPANDED}),o(!1)}},{id:3,icon:tC(lL,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Full screen mode",selected:e===tK.FULLSCREEN,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.FULLSCREEN}),o(!1)}}],d=c.find(e=>e.selected?e.icon:null);return(eg(()=>{function e(e){i.current&&!i.current.contains(e.target)&&o(!1)}return a&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[a]),tv.useEffect(()=>{if(a)s(!0);else if(l){let e=setTimeout(()=>s(!1),140);return()=>clearTimeout(e)}},[a,l]),"NOT_STARTED"===n||"WIDGET_LOADING"===n||"INVALID_STATE"===n)?null:tC(M,{children:[tC("header",{className:"flex items-center px-0 py-[15px] border-b border-zinc-300 w-full justify-between h-[60px] bg-white rounded-t-[22px] cursor-pointer","data-model-id":"10445:55564",children:[tC("div",{className:"flex items-center gap-2 px-5 py-0 w-full",children:[tC("button",{className:"inline-flex items-center justify-center gap-2.5 p-0 cursor-pointer hover:bg-slate-100 rounded-xl overflow-hidden",onClick:()=>{t1.trigger.selectTab({tab:uC.RECENT_MESSAGE_LIST})},children:tC(lN,{className:"w-6 h-6 cursor-pointer"})}),tC("img",{className:"w-auto h-[30px]",src:t?.data?.logo_url}),tC("span",{className:"flex flex-col items-start flex-1 grow",children:tC("span",{className:"flex flex-col items-start gap-[18px] flex-[0_0_auto]",children:tC("h1",{className:"w-fit mt-[-1.00px] font-text-md-medium font-[number:var(--text-md-medium-font-weight)] text-[#020618] text-[length:var(--text-md-medium-font-size)] tracking-[var(--text-md-medium-letter-spacing)] leading-[var(--text-md-medium-line-height)] whitespace-nowrap [font-style:var(--text-md-medium-font-style)]",children:t?.data?.name})})})]}),tC("div",{className:"flex items-center gap-2 px-5 py-0 w-max justify-end",children:[tC("div",{className:"relative"}),tC("div",{className:"relative",ref:i,children:[tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-100 rounded-lg overflow-hidden",onClick:()=>o(!a),children:tC("div",{className:"inline-flex items-center gap-2.5",children:d?d.icon:null})}),l&&tC("nav",{className:"flex flex-col w-[148px] h-max absolute items-start gap-1 p-1 right-0 bg-white rounded-lg overflow-hidden border border-solid border-slate-200 z-50",style:{animation:a?"popin 0.18s cubic-bezier(0.4,0,0.2,1)":"popout 0.14s cubic-bezier(0.4,0,0.2,1)"},children:[tC("style",{children:`
95
+ @keyframes popin {
96
+ 0% {
97
+ opacity: 0;
98
+ transform: scale(0.95) translateY(-8px);
99
+ }
100
+ 100% {
101
+ opacity: 1;
102
+ transform: scale(1) translateY(0);
103
+ }
104
+ }
105
+ @keyframes popout {
106
+ 0% {
107
+ opacity: 1;
108
+ transform: scale(1) translateY(0);
109
+ }
110
+ 100% {
111
+ opacity: 0;
112
+ transform: scale(0.95) translateY(-8px);
113
+ }
114
+ }
115
+ `}),c.map(e=>tC("button",{className:`flex items-center gap-1.5 pl-2 pr-3 py-1.5 relative self-stretch w-full cursor-pointer
116
+ hover:bg-slate-100 rounded-md overflow-hidden`,style:{backgroundColor:e.selected?"#f0f0f0":""},onClick:e.onClick,children:[tC("div",{className:"inline-flex items-center gap-2.5 flex-[0_0_auto]",children:e.icon}),tC("div",{className:"flex flex-col items-start justify-center gap-2 flex-1 self-stretch grow",children:tC("div",{className:"inline-flex flex-col items-start gap-1 flex-[0_0_auto]",children:tC("div",{className:"flex items-center gap-1 flex-[0_0_auto]",children:tC("div",{className:"w-fit whitespace-nowrap text-xs font-medium text-[#020618]",children:e.label})})})})]},e.id))]})]}),tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-50 rounded-lg overflow-hidden",children:tC("div",{className:"inline-flex items-center gap-2.5",children:tC(ld,{className:"w-[18px] h-[18px]"})})})]})]}),tC("div",{className:"flex flex-col h-[94%] pb-8 justify-between",children:tC("div",{className:"flex flex-col items-start gap-4 relative h-full overflow-y-scroll w-full",children:[tC("div",{className:"flex items-center justify-center gap-2.5 px-5 py-0 relative self-stretch w-full"}),tC("div",{className:"flex flex-col gap-5 w-full pb-3",children:r?.map(e=>tC("div",{children:"received"===e.type?tC(cK,{sendFeedback:()=>{},sendMessage:()=>{},message:e.message,time:e.time}):tC(M,{children:tC("div",{className:"flex flex-col items-end gap-2.5 px-5 py-0 relative self-stretch w-full animate-slide-in-right",children:tC("div",{className:"w-[300px] items-end gap-1 flex flex-col relative",children:tC("div",{className:"flex justify-end items-end w-fit gap-1 relative",children:tC("div",{className:`flex flex-1 grow text-[${t?.data?.user_message_text_color}] items-start gap-2.5 px-3.5 py-2.5 relative rounded-lg`,style:{backgroundColor:t?.data?.secondary_color,color:t?.data?.user_message_text_color},children:tC("div",{className:"relative mt-[-1.00px] text-sm",children:tC(cV,{mdText:e.message.input})})})})})})})},e.type))})]})})]})},uy=({toggleWidget:e,isExpanded:t})=>{let n=tH(),{recentConversation:r}=ne(),i=null!=r?r.events.filter(e=>"received"===e.type||"sent"===e.type):[],a=tv.useRef(null),[o,l]=tv.useState(!1),[s,c]=tv.useState(!1),d=[{id:1,icon:tC(lm,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Default mode",selected:t===tK.DEFAULT,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),l(!1)}},{id:2,icon:tC(lw,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Expanded mode",selected:t===tK.EXPANDED,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.EXPANDED}),l(!1)}},{id:3,icon:tC(lL,{className:"w-[16px] h-[16px] text-slate-600"}),label:"Full screen mode",selected:t===tK.FULLSCREEN,onClick:()=>{t1.trigger.expandWidget({expanded_size:tK.FULLSCREEN}),l(!1)}}],u=d.find(e=>e.selected?e.icon:null);if(eg(()=>{function e(e){a.current&&!a.current.contains(e.target)&&l(!1)}return o&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[o]),tv.useEffect(()=>{if(o)c(!0);else if(s){let e=setTimeout(()=>c(!1),140);return()=>clearTimeout(e)}},[o,s]),!Array.isArray(i)||0===i.length)return tC("div",{className:"p-4 text-center text-gray-500",children:"No recent messages found."});let p=r.events.find(e=>"FORM_SUBMITTED"===e.type);return tC(M,{children:[tC("header",{className:"flex items-center px-0 py-[15px] border-b border-zinc-300 w-full justify-between h-[60px] bg-white rounded-t-[22px] cursor-pointer",children:[tC("div",{className:"flex items-center gap-2 px-5 w-full",children:[tC("button",{className:"inline-flex items-center justify-center gap-2.5 p-0 cursor-pointer hover:bg-slate-100 rounded-xl overflow-hidden",onClick:()=>{t?(t1.trigger.expandWidget({expanded_size:tK.DEFAULT}),setTimeout(()=>{t1.trigger.selectTab({tab:tZ.RECENT_MESSAGE_LIST})},300)):t1.trigger.selectTab({tab:tZ.RECENT_MESSAGE_LIST})},children:tC(lN,{className:"w-6 h-6"})}),tC("img",{className:"w-[30px] h-[30px]",src:n?.data?.logo_url,alt:"Bot logo"}),tC("span",{className:"flex flex-col items-start grow",children:tC("span",{className:"flex flex-col items-start gap-[18px] flex-[0_0_auto]",children:tC("h1",{className:"w-fit mt-[-1.00px] font-text-md-medium font-[number:var(--text-md-medium-font-weight)] text-[#020618] text-[length:var(--text-md-medium-font-size)] tracking-[var(--text-md-medium-letter-spacing)] leading-[var(--text-md-medium-line-height)] whitespace-nowrap [font-style:var(--text-md-medium-font-style)]",children:n?.data?.name})})})]}),tC("div",{className:"flex items-center gap-2 px-5",children:[tC("div",{className:"relative",ref:a,children:[tC("button",{className:"inline-flex items-center gap-2.5 p-1 cursor-pointer hover:bg-slate-100 rounded-lg overflow-hidden",onClick:()=>l(!o),children:tC("div",{className:"inline-flex items-center gap-2.5",children:u?u.icon:null})}),s&&tC("nav",{className:"flex flex-col w-[148px] h-max absolute items-start gap-1 p-1 right-0 bg-white rounded-lg overflow-hidden border border-solid border-slate-200 z-50",style:{animation:o?"popin 0.18s cubic-bezier(0.4,0,0.2,1)":"popout 0.14s cubic-bezier(0.4,0,0.2,1)"},children:[tC("style",{children:`
117
+ @keyframes popin {
118
+ 0% {
119
+ opacity: 0;
120
+ transform: scale(0.95) translateY(-8px);
121
+ }
122
+ 100% {
123
+ opacity: 1;
124
+ transform: scale(1) translateY(0);
125
+ }
126
+ }
127
+ @keyframes popout {
128
+ 0% {
129
+ opacity: 1;
130
+ transform: scale(1) translateY(0);
131
+ }
132
+ 100% {
133
+ opacity: 0;
134
+ transform: scale(0.95) translateY(-8px);
135
+ }
136
+ }
137
+ `}),d.map(e=>tC("button",{className:`flex items-center gap-1.5 pl-2 pr-3 py-1.5 relative self-stretch w-full cursor-pointer
138
+ hover:bg-slate-100 rounded-md overflow-hidden`,style:{backgroundColor:e.selected?"#f0f0f0":""},onClick:e.onClick,children:[tC("div",{className:"inline-flex items-center gap-2.5 flex-[0_0_auto]",children:e.icon}),tC("div",{className:"flex flex-col items-start justify-center gap-2 flex-1 self-stretch grow",children:tC("div",{className:"inline-flex flex-col items-start gap-1 flex-[0_0_auto]",children:tC("div",{className:"flex items-center gap-1 flex-[0_0_auto]",children:tC("div",{className:"w-fit whitespace-nowrap text-xs font-medium text-[#020618]",children:e.label})})})})]},e.id))]})]}),tC("button",{className:"inline-flex items-center p-1 hover:bg-slate-50 rounded-lg cursor-pointer",onClick:e,children:tC(ld,{className:"w-[18px] h-[18px]"})})]})]}),tC("div",{className:"flex flex-col h-[calc(100%-80px)] justify-between w-full",children:[tC("div",{className:"flex flex-col gap-4 h-full overflow-y-scroll w-full -mt-[12px] mb-[6px]",children:tC("div",{className:"flex flex-col gap-5 w-full",children:[void 0!=p?tC(u_,{event:p}):null,i.map((e,t)=>tC("div",{children:tC(M,{children:[console.log(e.type,"message type"),"received"===e.type?tC(M,{children:[console.log("message from new recentchat",e),tC(cK,{message:e.message,time:e.time,sendFeedback:function(){throw Error("Function not implemented.")},sendMessage:function(){throw Error("Function not implemented.")}})]}):tC("div",{className:"flex flex-col items-end px-5 animate-slide-in-right",children:tC("div",{className:"w-[300px] flex flex-col items-end gap-1",children:tC("div",{className:"flex flex-1 text-sm px-3.5 py-2.5 rounded-lg",style:{backgroundColor:n?.data?.secondary_color,color:n?.data?.user_message_text_color},children:tC(cV,{mdText:e.message.input??""})})})})]})},t))]})}),tC("div",{className:"flex flex-col items-start gap-2.5 bg-white",children:tC("div",{className:"flex flex-col items-center justify-center gap-8 w-full overflow-hidden border border-zinc-100",children:tC("div",{className:"flex items-center gap-2.5 px-4 py-2 w-full bg-white",children:tC("div",{className:"flex items-center justify-center gap-1.5 flex-1",children:tC("div",{className:"inline-flex flex-col items-start justify-center",children:tC("div",{className:"flex items-center w-full gap-1.5 pb-0.5",children:tC("span",{className:"font-text-xs-regular text-[#1d293d] text-xs tracking-[0px] leading-[18px] whitespace-nowrap",children:"Your conversation has ended"})})})})})})})]})]})},u_=({event:e})=>{let t=(e.submissionPayload?.lead_data?.fields??[]).reduce((e,t)=>(e[t.field_id]=t.value,e),{}),n=e?.form_data?.form_template,r=tH(),[i,a]=ep(!1);return tC("div",{className:"flex gap-2 items-start w-full rounded-lg overflow-hidden px-5",children:[tC("div",{className:"flex items-center gap-2 ",children:tC("div",{className:"flex items-start gap-[5px]",children:tC("div",{className:"flex w-[24px] h-[24px] items-center justify-center rounded-full",children:tC("img",{src:r?.data?.logo_url,className:"w-6 h-6 text-white"})})})}),tC("div",{className:"flex flex-col items-start gap-2 w-[90%]",children:tC("div",{className:"flex-col flex gap-2 items-baseline pt-0.5 w-full",children:[tC("div",{className:"font-inter text-sm font-medium text-[#020618]",children:r?.data?.name}),tC("div",{className:"relative mt-[-1.00px] text-sm text-[#020618] w-full",children:tC("div",{className:"py-2.5 px-3.5 flex w-full flex-col items-start gap-4 rounded-lg border border-zinc-200",children:[tC("div",{className:"py-0.5 pr-1 flex items-center gap-2 rounded-sm w-full justify-between",children:[tC("span",{className:"flex gap-1 items-center text-slate-950 text-sm font-regular leading-5",children:["Form submitted"," ",tC(lu,{className:"h-[18px] w-[18px] text-green-500"})]}),tC("span",{onClick:()=>a(!i),className:"cursor-pointer text-slate-500 hover:text-slate-700 transition-colors hover:bg-slate-100 rounded-full",children:i?tC(lS,{className:""}):tC(lk,{})})]}),i&&tC("div",{className:"flex flex-col items-start gap-4",children:n&&n.map((e,n)=>tC("div",{className:"flex flex-col items-start gap-1.5",children:[tC("span",{className:"text-slate-700 text-sm font-medium leading-5",children:e.dispaly_name?e.dispaly_name:e.name}),tC("span",{className:"text-slate-950 text-sm font-regular leading-5",children:t?.[e.field_id]})]},n))})]})})]})})]})};var uC=function(e){return e.HOME="home",e.CHAT="chat",e.RECENT_MESSAGE="recentMessage",e.RECENT_MESSAGE_LIST="recentMessageList",e.RECENT_MESSAGE_DETAIL="recentMessageDetail",e.NEW_RECENT_MESSAGE="newRecentMessage",e}({}),uk=({toggleWidget:e,widgetToggleState:t,widgetConfig:n})=>{let r=t4(),i=t3(),{connected:a}=ul(),o=tH(),{recentConversation:l}=t7(n.widget_id),s=ev(uT),c=null!=l?l.events.filter(e=>"received"===e.type||"sent"===e.type):[],[d,u]=ep(!1),[p,f]=ep(!1),g=em(null),[h,m]=ep(0),w=5.6/10*h,[x,b]=ep(()=>"undefined"!=typeof window?window.innerHeight:820);if(eg(()=>{let e=g.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e)m(t.contentRect.height)});return t.observe(e),()=>t.disconnect()},[]),eg(()=>{if("undefined"==typeof window)return;let e=()=>b(window.innerHeight);return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),eg(()=>{t&&setTimeout(()=>{u(!0)},10)},[t]),eg(()=>{t&&setTimeout(()=>{f(!0)},400)},[t]),!a)return null;let v="flex w-full h-full flex-col overflow-hidden rounded-[22px] bg-white shadow-lg";return console.log(s,"<----initial message"),eg(()=>{t1.trigger.selectTab({tab:s?.initialUserMessage&&o.data?.widget_starter_flow_enabled?"chat":o.data?.open_homeby_default&&s?.initialUserMessage===null?"home":i})},[]),tC("div",{ref:g,className:`${r===tK.FULLSCREEN?"w-[calc(100vw-80px)]":""} flex absolute ${r!==tK.DEFAULT?"maximize-height":(()=>{switch(n?.widget_size){case"small":return"h-[58vh]";case"medium":default:return"h-[64vh]";case"large":return"h-[70vh]"}})()} overflow-hidden min-w-[400px] right-5 bottom-20 flex-col items-end gap-5 justify-center bg-white box-shadow-widget widget-expand-animation rounded-[22px] ${!p&&"chat-popup"} ${d&&"active"}`,style:{...(()=>{switch(r){case tK.EXPANDED:return{width:"50vw"};case tK.DEFAULT:return{width:`${w}px`};case tK.FULLSCREEN:return{width:"95vw",maxWidth:"95vw"};default:return{width:"400px"}}})(),minHeight:`${Math.round(Math.min(698,Math.max(590,.9*x-40)))}px`},children:["chat"===i&&tC("div",{className:`${v} animate-slide-in-left-slow`,children:tC(up,{toggleWidget:e,isExpanded:r,recentConversation:c})}),"home"===i&&tC("div",{className:`${v} animate-slide-in-right-slow`,children:tC(lj,{toggleWidget:e,switchTab:i,isExpanded:r})}),"recentMessage"===i&&tC("div",{className:v,children:tC(ug,{toggleWidget:e,isExpanded:r})}),"recentMessageList"===i&&tC("div",{className:v,children:tC(ub,{toggleWidget:e,isExpanded:r,switchTab:i})}),"recentMessageDetail"===i&&tC("div",{className:v,children:tC(uv,{isExpanded:r})}),"newRecentMessage"===i&&tC(uy,{toggleWidget:e,isExpanded:r})]})};let uN=({widgetToggleState:e,toggleWidget:t,widgetConfig:n})=>{let r=tH();return console.log("DEBUG:: widget",r),tC(uo,{endpoint:n.endpoint,children:tC(M,{children:"OPEN"===e&&"INVALID_STATE"!==r.status?tC(uk,{toggleWidget:t,widgetToggleState:e,widgetConfig:n}):null})})},uS=la("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),uE=({setUserInitialMessage:e,widgetToggleState:t,toggleWidget:n})=>{let r=tH(),{status:i}=r,[a,o]=tv.useState(!1),[l,s]=tv.useState(null),[c,d]=tv.useState(!0),[u,p]=tv.useState(t),{recentChatList:f}=uw();if("NOT_STARTED"===i||"WIDGET_LOADING"===i||"INVALID_STATE"===i)return null;function g(e){if(!e||"string"!=typeof e)return"rgba(0, 0, 0, 0.2)";3===(e=e.replace(/^#/,"")).length&&(e=e.split("").map(e=>e+e).join(""));let t=parseInt(e,16);return`rgba(${t>>16&255}, ${t>>8&255}, ${255&t}, 0.8)`}let h=ex(()=>r?.data?.launcher_logo_size,[r?.data?.launcher_logo_size]);console.log(h,"size");let m=(()=>{switch(h){case"S":return"w-[60px] h-[60px]";case"M":return"w-[80px] h-[80px]";case"L":default:return"w-[100px] h-[100px]";case"XL":return"w-[120px] h-[120px]";case"XXL":return"w-[140px] h-[140px]";case"XXXL":return"w-[160px] h-[160px]"}})(),w=r?.data?.launcher_logo_shape==="Square"?"rounded-xl":"rounded-full";return eg(()=>{"CLOSE"==t?setTimeout(()=>{p("CLOSE")},0):"OPEN"==t&&setTimeout(()=>{p("OPEN")},200)},[t,c]),tC(M,{children:tC("div",{className:"flex flex-col items-end gap-3",children:[c&&"CLOSE"==t&&!f&&r.data.widget_starter_flow_enabled&&!localStorage.getItem("CURRENT_CONVERSATION")&&tC("span",{className:`relative group flex flex-col gap-3 mr-4 ${"CLOSE"===u?"visible":""}`,children:[tC("button",{onMouseOver:()=>s(3),onMouseLeave:()=>s(null),style:{backgroundColor:r.data.use_brand_color?3===l?g(r.data.brand_color):r.data.brand_color:3===l?"#f0f0f0":"white"},className:"cursor-pointer floating-chip-hover relative flex items-center justify-start rounded-lg min-h-[36px] px-2.5 py-2.5 shadow-md transition-all duration-300 max-w-[280px]",children:tC("div",{className:"flex gap-1.5",children:[tC("img",{src:r?.data?.logo_url,alt:"",className:"w-[22px] h-[22px]"}),tC("div",{className:"flex flex-col gap-1.5 items-start",children:[tC("span",{style:{color:r.data.use_brand_color?"light"==lP(r.data.brand_color)?"#000000":"#FFFFFF":"#000000"},className:"text-xs font-semibold leading-[18px] text-start",children:r?.data?.name}),tC("div",{style:{color:r.data.use_brand_color?"light"==lP(r.data.brand_color)?"#000000":"#FFFFFF":"#000000"},className:"text-sm whitespace-pre-wrap font-regular leading-5 text-start",children:tC(cV,{mdText:r?.data?.widget_greeting})})]})]})}),tC("span",{onClick:()=>d(!1),style:{background:"#FFFFFF",color:"#000000",border:"1px solid #000000"},className:"absolute -top-3 -right-3 p-[3.5px] rounded-full shadow-md border hover:text-zinc-500 hover:border-zinc-500 transform transition-all duration-200 opacity-0 translate-y-1 group-hover:opacity-100 group-hover:translate-y-0 pointer-events-none group-hover:pointer-events-auto cursor-pointer hover:scale-105 active:scale-95",children:tC(uS,{className:"w-3 h-3 transition-transform"})}),tC("div",{className:"w-[280px] flex flex-wrap gap-3 justify-end",children:Array.isArray(r.data.starter_buttons)&&r.data.starter_buttons.map((t,i)=>tC("button",{onMouseOver:()=>s(i),onMouseLeave:()=>s(null),onClick:()=>{e(t),localStorage.setItem("Tab","Chat"),t1.trigger.selectTab({tab:tZ.CHAT}),n()},style:{backgroundColor:r.data.use_brand_color?l===i?g(r.data.brand_color):r.data.brand_color:l===i?"#f0f0f0":"white",color:r.data.use_brand_color?"light"==lP(r.data.brand_color)?"#000000":"#FFFFFF":"#000000"},className:"cursor-pointer floating-chip-hover flex items-center text-sm font-regular leading-5 rounded-[10px] min-h-max px-2.5 py-1.5 shadow-md transition-all duration-300 max-w-max w-max",children:t},i))})]}),tC("button",{onClick:n,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),style:{borderColor:r?.data?.brand_color},className:`relative overflow-hidden flex items-center justify-center cursor-pointer transition ${w} ${"OPEN"===t?"h-[58px] w-[58px]":m} mb-4 mr-4 active:scale-95 duration-200 transition-all`,children:["CLOSE"===u&&r?.data?.launcher_logo&&tC("div",{className:"absolute inset-0 bg-center bg-cover transition-all duration-200",style:{backgroundImage:`url(${r.data.launcher_logo})`}}),"OPEN"===u&&tC(M,{children:[tC("div",{className:"absolute inset-0 transition-all duration-200",style:{backgroundColor:a?g(r?.data?.brand_color):r?.data?.brand_color,opacity:+("OPEN"===t)}}),tC(ld,{style:{color:"light"==lP(r.data.brand_color)?"#000000":"#FFFFFF"},className:"w-8 h-8 relative z-10 transition-all duration-300"})]})]})]})})},uT=Z(null),uL=e=>{let t=tH(),[n,r]=ep(null);if(t?.data?.openby_default===void 0)return null;let[i,a]=function(e){let t=tU({context:{chatWindowStatus:e?"OPEN":"CLOSE"},on:{toggle:e=>({chatWindowStatus:"OPEN"===e.chatWindowStatus?"CLOSE":"OPEN"})}});return[tj(t,e=>e.context.chatWindowStatus),t.trigger.toggle]}(t.data.openby_default);return tC(M,{children:tC("div",{className:"fixed bottom-0 right-4 flex flex-col items-end space-y-2",children:[tC(uT.Provider,{value:{initialUserMessage:n,setInitialUserMessage:r},children:tC(uN,{widgetToggleState:i,toggleWidget:a,widgetConfig:e})}),tC(uE,{setUserInitialMessage:r,widgetToggleState:i,toggleWidget:a})]})})},uI=tP({context:{user_details:{SYS_FirstName:"sample",SYS_LastName:"B",SYS_UserEmail:"example@gmail.com",SYS_Location:"India",SYS_Timezone:"Asia/Kolkata",widget_chat_url:""}},on:{setUserDetails:(e,t)=>({user_details:{SYS_FirstName:t.userDetails?.SYS_FirstName??"sample",SYS_LastName:t.userDetails?.SYS_LastName??"B",SYS_UserEmail:t.userDetails?.SYS_UserEmail??"example@gmail.com",SYS_Location:t.userDetails?.SYS_Location??"India",SYS_Timezone:t.userDetails?.SYS_Timezone??"Asia/Kolkata",widget_chat_url:t.userDetails?.widget_chat_url??""}})}}),uO=(e,t=!1)=>{eg(()=>{uI.trigger.setUserDetails({...e}),t&&uI.inspect(e=>{console.log("USER INSPECTION::",e)})},[])},uA=e=>(t$({endpoint:e.endpoint,widget_id:e.widget_id},!0),console.log("window href",window.location.href),t2(!0),uO(e,!0),t1.send({type:"updateUserDetails",user_details:{SYS_FirstName:e.userDetails?.SYS_FirstName??"",SYS_UserEmail:e.userDetails?.SYS_UserEmail??"",SYS_LastName:e.userDetails?.SYS_LastName??"",SYS_Location:e.userDetails?.SYS_Location??"",SYS_Timezone:e.userDetails?.SYS_Timezone??"",widget_chat_url:window.location.href}}),tC("div",{className:"fixed bottom-0 right-4 pager-widget-root z-[99999999999999]",children:tC("div",{className:"pager-widget-root",children:tC(uL,{...e})})}));window.WAWidget={init:e=>{let t=document.getElementById(e.id);if(!t)return;let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.setAttribute("data-tailwind","true");let a=i(tN).replace("(((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b))))","(display: block)");console.log("widgetCss",i(tN),a),r.textContent=a,n.appendChild(r);let o=document.createElement("div");o.className="pager-widget",n.appendChild(o),tk.createRoot(o).render(tC(tv.StrictMode,{children:tC(uA,{...e})}))}}})();