@botfabrik/engine-webclient 4.98.2 → 4.98.3
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.
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var jg;function G2(){return jg||(jg=1,function(t){function r(z,K){var ee=z.length;z.push(K);e:for(;0<ee;){var Ae=ee-1>>>1,O=z[Ae];if(0<u(O,K))z[Ae]=K,z[ee]=O,ee=Ae;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var K=z[0],ee=z.pop();if(ee!==K){z[0]=ee;e:for(var Ae=0,O=z.length,k=O>>>1;Ae<k;){var $=2*(Ae+1)-1,Y=z[$],te=$+1,re=z[te];if(0>u(Y,ee))te<O&&0>u(re,Y)?(z[Ae]=re,z[te]=ee,Ae=te):(z[Ae]=Y,z[$]=ee,Ae=$);else if(te<O&&0>u(re,ee))z[Ae]=re,z[te]=ee,Ae=te;else break e}}return K}function u(z,K){var ee=z.sortIndex-K.sortIndex;return ee!==0?ee:z.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var m=[],p=[],b=1,E=null,A=3,U=!1,R=!1,q=!1,G=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function H(z){for(var K=i(p);K!==null;){if(K.callback===null)s(p);else if(K.startTime<=z)s(p),K.sortIndex=K.expirationTime,r(m,K);else break;K=i(p)}}function x(z){if(q=!1,H(z),!R)if(i(m)!==null)R=!0,Z||(Z=!0,me());else{var K=i(p);K!==null&&ve(x,K.startTime-z)}}var Z=!1,W=-1,ae=5,ye=-1;function Ee(){return G?!0:!(t.unstable_now()-ye<ae)}function se(){if(G=!1,Z){var z=t.unstable_now();ye=z;var K=!0;try{e:{R=!1,q&&(q=!1,C(W),W=-1),U=!0;var ee=A;try{t:{for(H(z),E=i(m);E!==null&&!(E.expirationTime>z&&Ee());){var Ae=E.callback;if(typeof Ae=="function"){E.callback=null,A=E.priorityLevel;var O=Ae(E.expirationTime<=z);if(z=t.unstable_now(),typeof O=="function"){E.callback=O,H(z),K=!0;break t}E===i(m)&&s(m),H(z)}else s(m);E=i(m)}if(E!==null)K=!0;else{var k=i(p);k!==null&&ve(x,k.startTime-z),K=!1}}break e}finally{E=null,A=ee,U=!1}K=void 0}}finally{K?me():Z=!1}}}var me;if(typeof S=="function")me=function(){S(se)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,Pe=ce.port2;ce.port1.onmessage=se,me=function(){Pe.postMessage(null)}}else me=function(){_(se,0)};function ve(z,K){W=_(function(){z(t.unstable_now())},K)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_next=function(z){switch(A){case 1:case 2:case 3:var K=3;break;default:K=A}var ee=A;A=K;try{return z()}finally{A=ee}},t.unstable_requestPaint=function(){G=!0},t.unstable_runWithPriority=function(z,K){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ee=A;A=z;try{return K()}finally{A=ee}},t.unstable_scheduleCallback=function(z,K,ee){var Ae=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Ae+ee:Ae):ee=Ae,z){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ee+O,z={id:b++,callback:K,priorityLevel:z,startTime:ee,expirationTime:O,sortIndex:-1},ee>Ae?(z.sortIndex=ee,r(p,z),i(m)===null&&z===i(p)&&(q?(C(W),W=-1):q=!0,ve(x,ee-Ae))):(z.sortIndex=O,r(m,z),R||U||(R=!0,Z||(Z=!0,me()))),z},t.unstable_shouldYield=Ee,t.unstable_wrapCallback=function(z){var K=A;return function(){var ee=A;A=K;try{return z.apply(this,arguments)}finally{A=ee}}}}(Hf)),Hf}var Hg;function k2(){return Hg||(Hg=1,jf.exports=G2()),jf.exports}var If={exports:{}},be={};/**
|
|
17
|
+
*/var jg;function G2(){return jg||(jg=1,(function(t){function r(z,K){var ee=z.length;z.push(K);e:for(;0<ee;){var Ae=ee-1>>>1,O=z[Ae];if(0<u(O,K))z[Ae]=K,z[ee]=O,ee=Ae;else break e}}function i(z){return z.length===0?null:z[0]}function s(z){if(z.length===0)return null;var K=z[0],ee=z.pop();if(ee!==K){z[0]=ee;e:for(var Ae=0,O=z.length,k=O>>>1;Ae<k;){var $=2*(Ae+1)-1,Y=z[$],te=$+1,re=z[te];if(0>u(Y,ee))te<O&&0>u(re,Y)?(z[Ae]=re,z[te]=ee,Ae=te):(z[Ae]=Y,z[$]=ee,Ae=$);else if(te<O&&0>u(re,ee))z[Ae]=re,z[te]=ee,Ae=te;else break e}}return K}function u(z,K){var ee=z.sortIndex-K.sortIndex;return ee!==0?ee:z.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var m=[],p=[],b=1,E=null,A=3,U=!1,R=!1,q=!1,G=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function H(z){for(var K=i(p);K!==null;){if(K.callback===null)s(p);else if(K.startTime<=z)s(p),K.sortIndex=K.expirationTime,r(m,K);else break;K=i(p)}}function x(z){if(q=!1,H(z),!R)if(i(m)!==null)R=!0,Z||(Z=!0,me());else{var K=i(p);K!==null&&ve(x,K.startTime-z)}}var Z=!1,W=-1,ae=5,ye=-1;function Ee(){return G?!0:!(t.unstable_now()-ye<ae)}function se(){if(G=!1,Z){var z=t.unstable_now();ye=z;var K=!0;try{e:{R=!1,q&&(q=!1,C(W),W=-1),U=!0;var ee=A;try{t:{for(H(z),E=i(m);E!==null&&!(E.expirationTime>z&&Ee());){var Ae=E.callback;if(typeof Ae=="function"){E.callback=null,A=E.priorityLevel;var O=Ae(E.expirationTime<=z);if(z=t.unstable_now(),typeof O=="function"){E.callback=O,H(z),K=!0;break t}E===i(m)&&s(m),H(z)}else s(m);E=i(m)}if(E!==null)K=!0;else{var k=i(p);k!==null&&ve(x,k.startTime-z),K=!1}}break e}finally{E=null,A=ee,U=!1}K=void 0}}finally{K?me():Z=!1}}}var me;if(typeof S=="function")me=function(){S(se)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,Pe=ce.port2;ce.port1.onmessage=se,me=function(){Pe.postMessage(null)}}else me=function(){_(se,0)};function ve(z,K){W=_(function(){z(t.unstable_now())},K)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return A},t.unstable_next=function(z){switch(A){case 1:case 2:case 3:var K=3;break;default:K=A}var ee=A;A=K;try{return z()}finally{A=ee}},t.unstable_requestPaint=function(){G=!0},t.unstable_runWithPriority=function(z,K){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var ee=A;A=z;try{return K()}finally{A=ee}},t.unstable_scheduleCallback=function(z,K,ee){var Ae=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Ae+ee:Ae):ee=Ae,z){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ee+O,z={id:b++,callback:K,priorityLevel:z,startTime:ee,expirationTime:O,sortIndex:-1},ee>Ae?(z.sortIndex=ee,r(p,z),i(m)===null&&z===i(p)&&(q?(C(W),W=-1):q=!0,ve(x,ee-Ae))):(z.sortIndex=O,r(m,z),R||U||(R=!0,Z||(Z=!0,me()))),z},t.unstable_shouldYield=Ee,t.unstable_wrapCallback=function(z){var K=A;return function(){var ee=A;A=K;try{return z.apply(this,arguments)}finally{A=ee}}}})(Hf)),Hf}var Hg;function k2(){return Hg||(Hg=1,jf.exports=G2()),jf.exports}var If={exports:{}},be={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* react.production.js
|
|
20
20
|
*
|
|
@@ -62,18 +62,18 @@ ${ue.current.stack}
|
|
|
62
62
|
Copyright (c) 2018 Jed Watson.
|
|
63
63
|
Licensed under the MIT License (MIT), see
|
|
64
64
|
http://jedwatson.github.io/classnames
|
|
65
|
-
*/var Wg;function JS(){return Wg||(Wg=1,function(t){(function(){var r={}.hasOwnProperty;function i(){for(var c="",d=0;d<arguments.length;d++){var h=arguments[d];h&&(c=u(c,s(h)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var d="";for(var h in c)r.call(c,h)&&c[h]&&(d=u(d,h));return d}function u(c,d){return d?c?c+" "+d:c+d:c}t.exports?(i.default=i,t.exports=i):window.classNames=i})()}(Ff)),Ff.exports}var eT=JS();const Q=lu(eT);var Vd=function(t,r){return Vd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(i[u]=s[u])},Vd(t,r)};function An(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Vd(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}var ie=function(){return ie=Object.assign||function(r){for(var i,s=1,u=arguments.length;s<u;s++){i=arguments[s];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])}return r},ie.apply(this,arguments)};function uu(t,r){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&r.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(t);u<s.length;u++)r.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(t,s[u])&&(i[s[u]]=t[s[u]]);return i}function Wn(t,r,i){if(i||arguments.length===2)for(var s=0,u=r.length,c;s<u;s++)(c||!(s in r))&&(c||(c=Array.prototype.slice.call(r,0,s)),c[s]=r[s]);return t.concat(c||Array.prototype.slice.call(r))}function Kn(t,r){var i=r&&r.cache?r.cache:lT,s=r&&r.serializer?r.serializer:iT,u=r&&r.strategy?r.strategy:rT;return u(t,{cache:i,serializer:s})}function tT(t){return t==null||typeof t=="number"||typeof t=="boolean"}function nT(t,r,i,s){var u=tT(s)?s:i(s),c=r.get(u);return typeof c>"u"&&(c=t.call(this,s),r.set(u,c)),c}function R1(t,r,i){var s=Array.prototype.slice.call(arguments,3),u=i(s),c=r.get(u);return typeof c>"u"&&(c=t.apply(this,s),r.set(u,c)),c}function w1(t,r,i,s,u){return i.bind(r,t,s,u)}function rT(t,r){var i=t.length===1?nT:R1;return w1(t,this,i,r.cache.create(),r.serializer)}function aT(t,r){return w1(t,this,R1,r.cache.create(),r.serializer)}var iT=function(){return JSON.stringify(arguments)},sT=function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(r){return this.cache[r]},t.prototype.set=function(r,i){this.cache[r]=i},t}(),lT={create:function(){return new sT}},$n={variadic:aT},we;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(we||(we={}));var Ye;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(Ye||(Ye={}));var Ri;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Ri||(Ri={}));function Jg(t){return t.type===Ye.literal}function oT(t){return t.type===Ye.argument}function C1(t){return t.type===Ye.number}function N1(t){return t.type===Ye.date}function M1(t){return t.type===Ye.time}function D1(t){return t.type===Ye.select}function L1(t){return t.type===Ye.plural}function uT(t){return t.type===Ye.pound}function B1(t){return t.type===Ye.tag}function U1(t){return!!(t&&typeof t=="object"&&t.type===Ri.number)}function Pd(t){return!!(t&&typeof t=="object"&&t.type===Ri.dateTime)}var j1=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,cT=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function fT(t){var r={};return t.replace(cT,function(i){var s=i.length;switch(i[0]){case"G":r.era=s===4?"long":s===5?"narrow":"short";break;case"y":r.year=s===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":r.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":r.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":r.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][s-4];break;case"c":if(s<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][s-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][s-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][s-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][s-1];break;case"k":r.hourCycle="h24",r.hour=["numeric","2-digit"][s-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":r.minute=["numeric","2-digit"][s-1];break;case"s":r.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":r.timeZoneName=s<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),r}var dT=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function hT(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var r=t.split(dT).filter(function(A){return A.length>0}),i=[],s=0,u=r;s<u.length;s++){var c=u[s],d=c.split("/");if(d.length===0)throw new Error("Invalid number skeleton");for(var h=d[0],m=d.slice(1),p=0,b=m;p<b.length;p++){var E=b[p];if(E.length===0)throw new Error("Invalid number skeleton")}i.push({stem:h,options:m})}return i}function mT(t){return t.replace(/^(.*?)-/,"")}var ey=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,H1=/^(@+)?(\+|#+)?[rs]?$/g,pT=/(\*)(0+)|(#+)(0+)|(0+)/g,I1=/^(0+)$/;function ty(t){var r={};return t[t.length-1]==="r"?r.roundingPriority="morePrecision":t[t.length-1]==="s"&&(r.roundingPriority="lessPrecision"),t.replace(H1,function(i,s,u){return typeof u!="string"?(r.minimumSignificantDigits=s.length,r.maximumSignificantDigits=s.length):u==="+"?r.minimumSignificantDigits=s.length:s[0]==="#"?r.maximumSignificantDigits=s.length:(r.minimumSignificantDigits=s.length,r.maximumSignificantDigits=s.length+(typeof u=="string"?u.length:0)),""}),r}function z1(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function gT(t){var r;if(t[0]==="E"&&t[1]==="E"?(r={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(r={notation:"scientific"},t=t.slice(1)),r){var i=t.slice(0,2);if(i==="+!"?(r.signDisplay="always",t=t.slice(2)):i==="+?"&&(r.signDisplay="exceptZero",t=t.slice(2)),!I1.test(t))throw new Error("Malformed concise eng/scientific notation");r.minimumIntegerDigits=t.length}return r}function ny(t){var r={},i=z1(t);return i||r}function yT(t){for(var r={},i=0,s=t;i<s.length;i++){var u=s[i];switch(u.stem){case"percent":case"%":r.style="percent";continue;case"%x100":r.style="percent",r.scale=100;continue;case"currency":r.style="currency",r.currency=u.options[0];continue;case"group-off":case",_":r.useGrouping=!1;continue;case"precision-integer":case".":r.maximumFractionDigits=0;continue;case"measure-unit":case"unit":r.style="unit",r.unit=mT(u.options[0]);continue;case"compact-short":case"K":r.notation="compact",r.compactDisplay="short";continue;case"compact-long":case"KK":r.notation="compact",r.compactDisplay="long";continue;case"scientific":r=ie(ie(ie({},r),{notation:"scientific"}),u.options.reduce(function(m,p){return ie(ie({},m),ny(p))},{}));continue;case"engineering":r=ie(ie(ie({},r),{notation:"engineering"}),u.options.reduce(function(m,p){return ie(ie({},m),ny(p))},{}));continue;case"notation-simple":r.notation="standard";continue;case"unit-width-narrow":r.currencyDisplay="narrowSymbol",r.unitDisplay="narrow";continue;case"unit-width-short":r.currencyDisplay="code",r.unitDisplay="short";continue;case"unit-width-full-name":r.currencyDisplay="name",r.unitDisplay="long";continue;case"unit-width-iso-code":r.currencyDisplay="symbol";continue;case"scale":r.scale=parseFloat(u.options[0]);continue;case"rounding-mode-floor":r.roundingMode="floor";continue;case"rounding-mode-ceiling":r.roundingMode="ceil";continue;case"rounding-mode-down":r.roundingMode="trunc";continue;case"rounding-mode-up":r.roundingMode="expand";continue;case"rounding-mode-half-even":r.roundingMode="halfEven";continue;case"rounding-mode-half-down":r.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":r.roundingMode="halfExpand";continue;case"integer-width":if(u.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");u.options[0].replace(pT,function(m,p,b,E,A,U){if(p)r.minimumIntegerDigits=b.length;else{if(E&&A)throw new Error("We currently do not support maximum integer digits");if(U)throw new Error("We currently do not support exact integer digits")}return""});continue}if(I1.test(u.stem)){r.minimumIntegerDigits=u.stem.length;continue}if(ey.test(u.stem)){if(u.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");u.stem.replace(ey,function(m,p,b,E,A,U){return b==="*"?r.minimumFractionDigits=p.length:E&&E[0]==="#"?r.maximumFractionDigits=E.length:A&&U?(r.minimumFractionDigits=A.length,r.maximumFractionDigits=A.length+U.length):(r.minimumFractionDigits=p.length,r.maximumFractionDigits=p.length),""});var c=u.options[0];c==="w"?r=ie(ie({},r),{trailingZeroDisplay:"stripIfInteger"}):c&&(r=ie(ie({},r),ty(c)));continue}if(H1.test(u.stem)){r=ie(ie({},r),ty(u.stem));continue}var d=z1(u.stem);d&&(r=ie(ie({},r),d));var h=gT(u.stem);h&&(r=ie(ie({},r),h))}return r}var bo={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function bT(t,r){for(var i="",s=0;s<t.length;s++){var u=t.charAt(s);if(u==="j"){for(var c=0;s+1<t.length&&t.charAt(s+1)===u;)c++,s++;var d=1+(c&1),h=c<2?1:3+(c>>1),m="a",p=vT(r);for((p=="H"||p=="k")&&(h=0);h-- >0;)i+=m;for(;d-- >0;)i=p+i}else u==="J"?i+="H":i+=u}return i}function vT(t){var r=t.hourCycle;if(r===void 0&&t.hourCycles&&t.hourCycles.length&&(r=t.hourCycles[0]),r)switch(r){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var i=t.language,s;i!=="root"&&(s=t.maximize().region);var u=bo[s||""]||bo[i||""]||bo["".concat(i,"-001")]||bo["001"];return u[0]}var Vf,_T=new RegExp("^".concat(j1.source,"*")),ET=new RegExp("".concat(j1.source,"*$"));function Me(t,r){return{start:t,end:r}}var ST=!!String.prototype.startsWith&&"_a".startsWith("a",1),TT=!!String.fromCodePoint,AT=!!Object.fromEntries,xT=!!String.prototype.codePointAt,OT=!!String.prototype.trimStart,RT=!!String.prototype.trimEnd,wT=!!Number.isSafeInteger,CT=wT?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Yd=!0;try{var NT=k1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Yd=((Vf=NT.exec("a"))===null||Vf===void 0?void 0:Vf[0])==="a"}catch{Yd=!1}var ry=ST?function(r,i,s){return r.startsWith(i,s)}:function(r,i,s){return r.slice(s,s+i.length)===i},Xd=TT?String.fromCodePoint:function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];for(var s="",u=r.length,c=0,d;u>c;){if(d=r[c++],d>1114111)throw RangeError(d+" is not a valid code point");s+=d<65536?String.fromCharCode(d):String.fromCharCode(((d-=65536)>>10)+55296,d%1024+56320)}return s},ay=AT?Object.fromEntries:function(r){for(var i={},s=0,u=r;s<u.length;s++){var c=u[s],d=c[0],h=c[1];i[d]=h}return i},G1=xT?function(r,i){return r.codePointAt(i)}:function(r,i){var s=r.length;if(!(i<0||i>=s)){var u=r.charCodeAt(i),c;return u<55296||u>56319||i+1===s||(c=r.charCodeAt(i+1))<56320||c>57343?u:(u-55296<<10)+(c-56320)+65536}},MT=OT?function(r){return r.trimStart()}:function(r){return r.replace(_T,"")},DT=RT?function(r){return r.trimEnd()}:function(r){return r.replace(ET,"")};function k1(t,r){return new RegExp(t,r)}var Zd;if(Yd){var iy=k1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zd=function(r,i){var s;iy.lastIndex=i;var u=iy.exec(r);return(s=u[1])!==null&&s!==void 0?s:""}}else Zd=function(r,i){for(var s=[];;){var u=G1(r,i);if(u===void 0||q1(u)||jT(u))break;s.push(u),i+=u>=65536?2:1}return Xd.apply(void 0,s)};var LT=function(){function t(r,i){i===void 0&&(i={}),this.message=r,this.position={offset:0,line:1,column:1},this.ignoreTag=!!i.ignoreTag,this.locale=i.locale,this.requiresOtherClause=!!i.requiresOtherClause,this.shouldParseSkeletons=!!i.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(r,i,s){for(var u=[];!this.isEOF();){var c=this.char();if(c===123){var d=this.parseArgument(r,s);if(d.err)return d;u.push(d.val)}else{if(c===125&&r>0)break;if(c===35&&(i==="plural"||i==="selectordinal")){var h=this.clonePosition();this.bump(),u.push({type:Ye.pound,location:Me(h,this.clonePosition())})}else if(c===60&&!this.ignoreTag&&this.peek()===47){if(s)break;return this.error(we.UNMATCHED_CLOSING_TAG,Me(this.clonePosition(),this.clonePosition()))}else if(c===60&&!this.ignoreTag&&Qd(this.peek()||0)){var d=this.parseTag(r,i);if(d.err)return d;u.push(d.val)}else{var d=this.parseLiteral(r,i);if(d.err)return d;u.push(d.val)}}}return{val:u,err:null}},t.prototype.parseTag=function(r,i){var s=this.clonePosition();this.bump();var u=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Ye.literal,value:"<".concat(u,"/>"),location:Me(s,this.clonePosition())},err:null};if(this.bumpIf(">")){var c=this.parseMessage(r+1,i,!0);if(c.err)return c;var d=c.val,h=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Qd(this.char()))return this.error(we.INVALID_TAG,Me(h,this.clonePosition()));var m=this.clonePosition(),p=this.parseTagName();return u!==p?this.error(we.UNMATCHED_CLOSING_TAG,Me(m,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ye.tag,value:u,children:d,location:Me(s,this.clonePosition())},err:null}:this.error(we.INVALID_TAG,Me(h,this.clonePosition())))}else return this.error(we.UNCLOSED_TAG,Me(s,this.clonePosition()))}else return this.error(we.INVALID_TAG,Me(s,this.clonePosition()))},t.prototype.parseTagName=function(){var r=this.offset();for(this.bump();!this.isEOF()&&UT(this.char());)this.bump();return this.message.slice(r,this.offset())},t.prototype.parseLiteral=function(r,i){for(var s=this.clonePosition(),u="";;){var c=this.tryParseQuote(i);if(c){u+=c;continue}var d=this.tryParseUnquoted(r,i);if(d){u+=d;continue}var h=this.tryParseLeftAngleBracket();if(h){u+=h;continue}break}var m=Me(s,this.clonePosition());return{val:{type:Ye.literal,value:u,location:m},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!BT(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(r){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(r==="plural"||r==="selectordinal")break;return null;default:return null}this.bump();var i=[this.char()];for(this.bump();!this.isEOF();){var s=this.char();if(s===39)if(this.peek()===39)i.push(39),this.bump();else{this.bump();break}else i.push(s);this.bump()}return Xd.apply(void 0,i)},t.prototype.tryParseUnquoted=function(r,i){if(this.isEOF())return null;var s=this.char();return s===60||s===123||s===35&&(i==="plural"||i==="selectordinal")||s===125&&r>0?null:(this.bump(),Xd(s))},t.prototype.parseArgument=function(r,i){var s=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(s,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(we.EMPTY_ARGUMENT,Me(s,this.clonePosition()));var u=this.parseIdentifierIfPossible().value;if(!u)return this.error(we.MALFORMED_ARGUMENT,Me(s,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(s,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ye.argument,value:u,location:Me(s,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(s,this.clonePosition())):this.parseArgumentOptions(r,i,u,s);default:return this.error(we.MALFORMED_ARGUMENT,Me(s,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var r=this.clonePosition(),i=this.offset(),s=Zd(this.message,i),u=i+s.length;this.bumpTo(u);var c=this.clonePosition(),d=Me(r,c);return{value:s,location:d}},t.prototype.parseArgumentOptions=function(r,i,s,u){var c,d=this.clonePosition(),h=this.parseIdentifierIfPossible().value,m=this.clonePosition();switch(h){case"":return this.error(we.EXPECT_ARGUMENT_TYPE,Me(d,m));case"number":case"date":case"time":{this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var b=this.clonePosition(),E=this.parseSimpleArgStyleIfPossible();if(E.err)return E;var A=DT(E.val);if(A.length===0)return this.error(we.EXPECT_ARGUMENT_STYLE,Me(this.clonePosition(),this.clonePosition()));var U=Me(b,this.clonePosition());p={style:A,styleLocation:U}}var R=this.tryParseArgumentClose(u);if(R.err)return R;var q=Me(u,this.clonePosition());if(p&&ry(p?.style,"::",0)){var G=MT(p.style.slice(2));if(h==="number"){var E=this.parseNumberSkeletonFromString(G,p.styleLocation);return E.err?E:{val:{type:Ye.number,value:s,location:q,style:E.val},err:null}}else{if(G.length===0)return this.error(we.EXPECT_DATE_TIME_SKELETON,q);var _=G;this.locale&&(_=bT(G,this.locale));var A={type:Ri.dateTime,pattern:_,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?fT(_):{}},C=h==="date"?Ye.date:Ye.time;return{val:{type:C,value:s,location:q,style:A},err:null}}}return{val:{type:h==="number"?Ye.number:h==="date"?Ye.date:Ye.time,value:s,location:q,style:(c=p?.style)!==null&&c!==void 0?c:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(we.EXPECT_SELECT_ARGUMENT_OPTIONS,Me(S,ie({},S)));this.bumpSpace();var H=this.parseIdentifierIfPossible(),x=0;if(h!=="select"&&H.value==="offset"){if(!this.bumpIf(":"))return this.error(we.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Me(this.clonePosition(),this.clonePosition()));this.bumpSpace();var E=this.tryParseDecimalInteger(we.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,we.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(E.err)return E;this.bumpSpace(),H=this.parseIdentifierIfPossible(),x=E.val}var Z=this.tryParsePluralOrSelectOptions(r,h,i,H);if(Z.err)return Z;var R=this.tryParseArgumentClose(u);if(R.err)return R;var W=Me(u,this.clonePosition());return h==="select"?{val:{type:Ye.select,value:s,options:ay(Z.val),location:W},err:null}:{val:{type:Ye.plural,value:s,options:ay(Z.val),offset:x,pluralType:h==="plural"?"cardinal":"ordinal",location:W},err:null}}default:return this.error(we.INVALID_ARGUMENT_TYPE,Me(d,m))}},t.prototype.tryParseArgumentClose=function(r){return this.isEOF()||this.char()!==125?this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(r,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var r=0,i=this.clonePosition();!this.isEOF();){var s=this.char();switch(s){case 39:{this.bump();var u=this.clonePosition();if(!this.bumpUntil("'"))return this.error(we.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Me(u,this.clonePosition()));this.bump();break}case 123:{r+=1,this.bump();break}case 125:{if(r>0)r-=1;else return{val:this.message.slice(i.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(i.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(r,i){var s=[];try{s=hT(r)}catch{return this.error(we.INVALID_NUMBER_SKELETON,i)}return{val:{type:Ri.number,tokens:s,location:i,parsedOptions:this.shouldParseSkeletons?yT(s):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(r,i,s,u){for(var c,d=!1,h=[],m=new Set,p=u.value,b=u.location;;){if(p.length===0){var E=this.clonePosition();if(i!=="select"&&this.bumpIf("=")){var A=this.tryParseDecimalInteger(we.EXPECT_PLURAL_ARGUMENT_SELECTOR,we.INVALID_PLURAL_ARGUMENT_SELECTOR);if(A.err)return A;b=Me(E,this.clonePosition()),p=this.message.slice(E.offset,this.offset())}else break}if(m.has(p))return this.error(i==="select"?we.DUPLICATE_SELECT_ARGUMENT_SELECTOR:we.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,b);p==="other"&&(d=!0),this.bumpSpace();var U=this.clonePosition();if(!this.bumpIf("{"))return this.error(i==="select"?we.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:we.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Me(this.clonePosition(),this.clonePosition()));var R=this.parseMessage(r+1,i,s);if(R.err)return R;var q=this.tryParseArgumentClose(U);if(q.err)return q;h.push([p,{value:R.val,location:Me(U,this.clonePosition())}]),m.add(p),this.bumpSpace(),c=this.parseIdentifierIfPossible(),p=c.value,b=c.location}return h.length===0?this.error(i==="select"?we.EXPECT_SELECT_ARGUMENT_SELECTOR:we.EXPECT_PLURAL_ARGUMENT_SELECTOR,Me(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!d?this.error(we.MISSING_OTHER_CLAUSE,Me(this.clonePosition(),this.clonePosition())):{val:h,err:null}},t.prototype.tryParseDecimalInteger=function(r,i){var s=1,u=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(s=-1);for(var c=!1,d=0;!this.isEOF();){var h=this.char();if(h>=48&&h<=57)c=!0,d=d*10+(h-48),this.bump();else break}var m=Me(u,this.clonePosition());return c?(d*=s,CT(d)?{val:d,err:null}:this.error(i,m)):this.error(r,m)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var r=this.position.offset;if(r>=this.message.length)throw Error("out of bound");var i=G1(this.message,r);if(i===void 0)throw Error("Offset ".concat(r," is at invalid UTF-16 code unit boundary"));return i},t.prototype.error=function(r,i){return{val:null,err:{kind:r,message:this.message,location:i}}},t.prototype.bump=function(){if(!this.isEOF()){var r=this.char();r===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=r<65536?1:2)}},t.prototype.bumpIf=function(r){if(ry(this.message,r,this.offset())){for(var i=0;i<r.length;i++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(r){var i=this.offset(),s=this.message.indexOf(r,i);return s>=0?(this.bumpTo(s),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(r){if(this.offset()>r)throw Error("targetOffset ".concat(r," must be greater than or equal to the current offset ").concat(this.offset()));for(r=Math.min(r,this.message.length);;){var i=this.offset();if(i===r)break;if(i>r)throw Error("targetOffset ".concat(r," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&q1(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var r=this.char(),i=this.offset(),s=this.message.charCodeAt(i+(r>=65536?2:1));return s??null},t}();function Qd(t){return t>=97&&t<=122||t>=65&&t<=90}function BT(t){return Qd(t)||t===47}function UT(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function q1(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function jT(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function Kd(t){t.forEach(function(r){if(delete r.location,D1(r)||L1(r))for(var i in r.options)delete r.options[i].location,Kd(r.options[i].value);else C1(r)&&U1(r.style)||(N1(r)||M1(r))&&Pd(r.style)?delete r.style.location:B1(r)&&Kd(r.children)})}function HT(t,r){r===void 0&&(r={}),r=ie({shouldParseSkeletons:!0,requiresOtherClause:!0},r);var i=new LT(t,r).parse();if(i.err){var s=SyntaxError(we[i.err.kind]);throw s.location=i.err.location,s.originalMessage=i.err.message,s}return r?.captureLocation||Kd(i.val),i.val}var er;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(er||(er={}));var oa=function(t){An(r,t);function r(i,s,u){var c=t.call(this,i)||this;return c.code=s,c.originalMessage=u,c}return r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r}(Error),sy=function(t){An(r,t);function r(i,s,u,c){return t.call(this,'Invalid values for "'.concat(i,'": "').concat(s,'". Options are "').concat(Object.keys(u).join('", "'),'"'),er.INVALID_VALUE,c)||this}return r}(oa),IT=function(t){An(r,t);function r(i,s,u){return t.call(this,'Value for "'.concat(i,'" must be of type ').concat(s),er.INVALID_VALUE,u)||this}return r}(oa),zT=function(t){An(r,t);function r(i,s){return t.call(this,'The intl string context variable "'.concat(i,'" was not provided to the string "').concat(s,'"'),er.MISSING_VALUE,s)||this}return r}(oa),It;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(It||(It={}));function GT(t){return t.length<2?t:t.reduce(function(r,i){var s=r[r.length-1];return!s||s.type!==It.literal||i.type!==It.literal?r.push(i):s.value+=i.value,r},[])}function F1(t){return typeof t=="function"}function Fo(t,r,i,s,u,c,d){if(t.length===1&&Jg(t[0]))return[{type:It.literal,value:t[0].value}];for(var h=[],m=0,p=t;m<p.length;m++){var b=p[m];if(Jg(b)){h.push({type:It.literal,value:b.value});continue}if(uT(b)){typeof c=="number"&&h.push({type:It.literal,value:i.getNumberFormat(r).format(c)});continue}var E=b.value;if(!(u&&E in u))throw new zT(E,d);var A=u[E];if(oT(b)){(!A||typeof A=="string"||typeof A=="number")&&(A=typeof A=="string"||typeof A=="number"?String(A):""),h.push({type:typeof A=="string"?It.literal:It.object,value:A});continue}if(N1(b)){var U=typeof b.style=="string"?s.date[b.style]:Pd(b.style)?b.style.parsedOptions:void 0;h.push({type:It.literal,value:i.getDateTimeFormat(r,U).format(A)});continue}if(M1(b)){var U=typeof b.style=="string"?s.time[b.style]:Pd(b.style)?b.style.parsedOptions:s.time.medium;h.push({type:It.literal,value:i.getDateTimeFormat(r,U).format(A)});continue}if(C1(b)){var U=typeof b.style=="string"?s.number[b.style]:U1(b.style)?b.style.parsedOptions:void 0;U&&U.scale&&(A=A*(U.scale||1)),h.push({type:It.literal,value:i.getNumberFormat(r,U).format(A)});continue}if(B1(b)){var R=b.children,q=b.value,G=u[q];if(!F1(G))throw new IT(q,"function",d);var _=Fo(R,r,i,s,u,c),C=G(_.map(function(x){return x.value}));Array.isArray(C)||(C=[C]),h.push.apply(h,C.map(function(x){return{type:typeof x=="string"?It.literal:It.object,value:x}}))}if(D1(b)){var S=b.options[A]||b.options.other;if(!S)throw new sy(b.value,A,Object.keys(b.options),d);h.push.apply(h,Fo(S.value,r,i,s,u));continue}if(L1(b)){var S=b.options["=".concat(A)];if(!S){if(!Intl.PluralRules)throw new oa(`Intl.PluralRules is not available in this environment.
|
|
65
|
+
*/var Wg;function JS(){return Wg||(Wg=1,(function(t){(function(){var r={}.hasOwnProperty;function i(){for(var c="",d=0;d<arguments.length;d++){var h=arguments[d];h&&(c=u(c,s(h)))}return c}function s(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return i.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var d="";for(var h in c)r.call(c,h)&&c[h]&&(d=u(d,h));return d}function u(c,d){return d?c?c+" "+d:c+d:c}t.exports?(i.default=i,t.exports=i):window.classNames=i})()})(Ff)),Ff.exports}var eT=JS();const Q=lu(eT);var Vd=function(t,r){return Vd=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var u in s)Object.prototype.hasOwnProperty.call(s,u)&&(i[u]=s[u])},Vd(t,r)};function An(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");Vd(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}var ie=function(){return ie=Object.assign||function(r){for(var i,s=1,u=arguments.length;s<u;s++){i=arguments[s];for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])}return r},ie.apply(this,arguments)};function uu(t,r){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&r.indexOf(s)<0&&(i[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(t);u<s.length;u++)r.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(t,s[u])&&(i[s[u]]=t[s[u]]);return i}function Wn(t,r,i){if(i||arguments.length===2)for(var s=0,u=r.length,c;s<u;s++)(c||!(s in r))&&(c||(c=Array.prototype.slice.call(r,0,s)),c[s]=r[s]);return t.concat(c||Array.prototype.slice.call(r))}function Kn(t,r){var i=r&&r.cache?r.cache:lT,s=r&&r.serializer?r.serializer:iT,u=r&&r.strategy?r.strategy:rT;return u(t,{cache:i,serializer:s})}function tT(t){return t==null||typeof t=="number"||typeof t=="boolean"}function nT(t,r,i,s){var u=tT(s)?s:i(s),c=r.get(u);return typeof c>"u"&&(c=t.call(this,s),r.set(u,c)),c}function R1(t,r,i){var s=Array.prototype.slice.call(arguments,3),u=i(s),c=r.get(u);return typeof c>"u"&&(c=t.apply(this,s),r.set(u,c)),c}function w1(t,r,i,s,u){return i.bind(r,t,s,u)}function rT(t,r){var i=t.length===1?nT:R1;return w1(t,this,i,r.cache.create(),r.serializer)}function aT(t,r){return w1(t,this,R1,r.cache.create(),r.serializer)}var iT=function(){return JSON.stringify(arguments)},sT=(function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(r){return this.cache[r]},t.prototype.set=function(r,i){this.cache[r]=i},t})(),lT={create:function(){return new sT}},$n={variadic:aT},we;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(we||(we={}));var Ye;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(Ye||(Ye={}));var Ri;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Ri||(Ri={}));function Jg(t){return t.type===Ye.literal}function oT(t){return t.type===Ye.argument}function C1(t){return t.type===Ye.number}function N1(t){return t.type===Ye.date}function M1(t){return t.type===Ye.time}function D1(t){return t.type===Ye.select}function L1(t){return t.type===Ye.plural}function uT(t){return t.type===Ye.pound}function B1(t){return t.type===Ye.tag}function U1(t){return!!(t&&typeof t=="object"&&t.type===Ri.number)}function Pd(t){return!!(t&&typeof t=="object"&&t.type===Ri.dateTime)}var j1=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,cT=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function fT(t){var r={};return t.replace(cT,function(i){var s=i.length;switch(i[0]){case"G":r.era=s===4?"long":s===5?"narrow":"short";break;case"y":r.year=s===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":r.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":r.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":r.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][s-4];break;case"c":if(s<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");r.weekday=["short","long","narrow","short"][s-4];break;case"a":r.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":r.hourCycle="h12",r.hour=["numeric","2-digit"][s-1];break;case"H":r.hourCycle="h23",r.hour=["numeric","2-digit"][s-1];break;case"K":r.hourCycle="h11",r.hour=["numeric","2-digit"][s-1];break;case"k":r.hourCycle="h24",r.hour=["numeric","2-digit"][s-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":r.minute=["numeric","2-digit"][s-1];break;case"s":r.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":r.timeZoneName=s<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),r}var dT=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function hT(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var r=t.split(dT).filter(function(A){return A.length>0}),i=[],s=0,u=r;s<u.length;s++){var c=u[s],d=c.split("/");if(d.length===0)throw new Error("Invalid number skeleton");for(var h=d[0],m=d.slice(1),p=0,b=m;p<b.length;p++){var E=b[p];if(E.length===0)throw new Error("Invalid number skeleton")}i.push({stem:h,options:m})}return i}function mT(t){return t.replace(/^(.*?)-/,"")}var ey=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,H1=/^(@+)?(\+|#+)?[rs]?$/g,pT=/(\*)(0+)|(#+)(0+)|(0+)/g,I1=/^(0+)$/;function ty(t){var r={};return t[t.length-1]==="r"?r.roundingPriority="morePrecision":t[t.length-1]==="s"&&(r.roundingPriority="lessPrecision"),t.replace(H1,function(i,s,u){return typeof u!="string"?(r.minimumSignificantDigits=s.length,r.maximumSignificantDigits=s.length):u==="+"?r.minimumSignificantDigits=s.length:s[0]==="#"?r.maximumSignificantDigits=s.length:(r.minimumSignificantDigits=s.length,r.maximumSignificantDigits=s.length+(typeof u=="string"?u.length:0)),""}),r}function z1(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function gT(t){var r;if(t[0]==="E"&&t[1]==="E"?(r={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(r={notation:"scientific"},t=t.slice(1)),r){var i=t.slice(0,2);if(i==="+!"?(r.signDisplay="always",t=t.slice(2)):i==="+?"&&(r.signDisplay="exceptZero",t=t.slice(2)),!I1.test(t))throw new Error("Malformed concise eng/scientific notation");r.minimumIntegerDigits=t.length}return r}function ny(t){var r={},i=z1(t);return i||r}function yT(t){for(var r={},i=0,s=t;i<s.length;i++){var u=s[i];switch(u.stem){case"percent":case"%":r.style="percent";continue;case"%x100":r.style="percent",r.scale=100;continue;case"currency":r.style="currency",r.currency=u.options[0];continue;case"group-off":case",_":r.useGrouping=!1;continue;case"precision-integer":case".":r.maximumFractionDigits=0;continue;case"measure-unit":case"unit":r.style="unit",r.unit=mT(u.options[0]);continue;case"compact-short":case"K":r.notation="compact",r.compactDisplay="short";continue;case"compact-long":case"KK":r.notation="compact",r.compactDisplay="long";continue;case"scientific":r=ie(ie(ie({},r),{notation:"scientific"}),u.options.reduce(function(m,p){return ie(ie({},m),ny(p))},{}));continue;case"engineering":r=ie(ie(ie({},r),{notation:"engineering"}),u.options.reduce(function(m,p){return ie(ie({},m),ny(p))},{}));continue;case"notation-simple":r.notation="standard";continue;case"unit-width-narrow":r.currencyDisplay="narrowSymbol",r.unitDisplay="narrow";continue;case"unit-width-short":r.currencyDisplay="code",r.unitDisplay="short";continue;case"unit-width-full-name":r.currencyDisplay="name",r.unitDisplay="long";continue;case"unit-width-iso-code":r.currencyDisplay="symbol";continue;case"scale":r.scale=parseFloat(u.options[0]);continue;case"rounding-mode-floor":r.roundingMode="floor";continue;case"rounding-mode-ceiling":r.roundingMode="ceil";continue;case"rounding-mode-down":r.roundingMode="trunc";continue;case"rounding-mode-up":r.roundingMode="expand";continue;case"rounding-mode-half-even":r.roundingMode="halfEven";continue;case"rounding-mode-half-down":r.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":r.roundingMode="halfExpand";continue;case"integer-width":if(u.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");u.options[0].replace(pT,function(m,p,b,E,A,U){if(p)r.minimumIntegerDigits=b.length;else{if(E&&A)throw new Error("We currently do not support maximum integer digits");if(U)throw new Error("We currently do not support exact integer digits")}return""});continue}if(I1.test(u.stem)){r.minimumIntegerDigits=u.stem.length;continue}if(ey.test(u.stem)){if(u.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");u.stem.replace(ey,function(m,p,b,E,A,U){return b==="*"?r.minimumFractionDigits=p.length:E&&E[0]==="#"?r.maximumFractionDigits=E.length:A&&U?(r.minimumFractionDigits=A.length,r.maximumFractionDigits=A.length+U.length):(r.minimumFractionDigits=p.length,r.maximumFractionDigits=p.length),""});var c=u.options[0];c==="w"?r=ie(ie({},r),{trailingZeroDisplay:"stripIfInteger"}):c&&(r=ie(ie({},r),ty(c)));continue}if(H1.test(u.stem)){r=ie(ie({},r),ty(u.stem));continue}var d=z1(u.stem);d&&(r=ie(ie({},r),d));var h=gT(u.stem);h&&(r=ie(ie({},r),h))}return r}var bo={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function bT(t,r){for(var i="",s=0;s<t.length;s++){var u=t.charAt(s);if(u==="j"){for(var c=0;s+1<t.length&&t.charAt(s+1)===u;)c++,s++;var d=1+(c&1),h=c<2?1:3+(c>>1),m="a",p=vT(r);for((p=="H"||p=="k")&&(h=0);h-- >0;)i+=m;for(;d-- >0;)i=p+i}else u==="J"?i+="H":i+=u}return i}function vT(t){var r=t.hourCycle;if(r===void 0&&t.hourCycles&&t.hourCycles.length&&(r=t.hourCycles[0]),r)switch(r){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var i=t.language,s;i!=="root"&&(s=t.maximize().region);var u=bo[s||""]||bo[i||""]||bo["".concat(i,"-001")]||bo["001"];return u[0]}var Vf,_T=new RegExp("^".concat(j1.source,"*")),ET=new RegExp("".concat(j1.source,"*$"));function Me(t,r){return{start:t,end:r}}var ST=!!String.prototype.startsWith&&"_a".startsWith("a",1),TT=!!String.fromCodePoint,AT=!!Object.fromEntries,xT=!!String.prototype.codePointAt,OT=!!String.prototype.trimStart,RT=!!String.prototype.trimEnd,wT=!!Number.isSafeInteger,CT=wT?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Yd=!0;try{var NT=k1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Yd=((Vf=NT.exec("a"))===null||Vf===void 0?void 0:Vf[0])==="a"}catch{Yd=!1}var ry=ST?function(r,i,s){return r.startsWith(i,s)}:function(r,i,s){return r.slice(s,s+i.length)===i},Xd=TT?String.fromCodePoint:function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];for(var s="",u=r.length,c=0,d;u>c;){if(d=r[c++],d>1114111)throw RangeError(d+" is not a valid code point");s+=d<65536?String.fromCharCode(d):String.fromCharCode(((d-=65536)>>10)+55296,d%1024+56320)}return s},ay=AT?Object.fromEntries:function(r){for(var i={},s=0,u=r;s<u.length;s++){var c=u[s],d=c[0],h=c[1];i[d]=h}return i},G1=xT?function(r,i){return r.codePointAt(i)}:function(r,i){var s=r.length;if(!(i<0||i>=s)){var u=r.charCodeAt(i),c;return u<55296||u>56319||i+1===s||(c=r.charCodeAt(i+1))<56320||c>57343?u:(u-55296<<10)+(c-56320)+65536}},MT=OT?function(r){return r.trimStart()}:function(r){return r.replace(_T,"")},DT=RT?function(r){return r.trimEnd()}:function(r){return r.replace(ET,"")};function k1(t,r){return new RegExp(t,r)}var Zd;if(Yd){var iy=k1("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Zd=function(r,i){var s;iy.lastIndex=i;var u=iy.exec(r);return(s=u[1])!==null&&s!==void 0?s:""}}else Zd=function(r,i){for(var s=[];;){var u=G1(r,i);if(u===void 0||q1(u)||jT(u))break;s.push(u),i+=u>=65536?2:1}return Xd.apply(void 0,s)};var LT=(function(){function t(r,i){i===void 0&&(i={}),this.message=r,this.position={offset:0,line:1,column:1},this.ignoreTag=!!i.ignoreTag,this.locale=i.locale,this.requiresOtherClause=!!i.requiresOtherClause,this.shouldParseSkeletons=!!i.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(r,i,s){for(var u=[];!this.isEOF();){var c=this.char();if(c===123){var d=this.parseArgument(r,s);if(d.err)return d;u.push(d.val)}else{if(c===125&&r>0)break;if(c===35&&(i==="plural"||i==="selectordinal")){var h=this.clonePosition();this.bump(),u.push({type:Ye.pound,location:Me(h,this.clonePosition())})}else if(c===60&&!this.ignoreTag&&this.peek()===47){if(s)break;return this.error(we.UNMATCHED_CLOSING_TAG,Me(this.clonePosition(),this.clonePosition()))}else if(c===60&&!this.ignoreTag&&Qd(this.peek()||0)){var d=this.parseTag(r,i);if(d.err)return d;u.push(d.val)}else{var d=this.parseLiteral(r,i);if(d.err)return d;u.push(d.val)}}}return{val:u,err:null}},t.prototype.parseTag=function(r,i){var s=this.clonePosition();this.bump();var u=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Ye.literal,value:"<".concat(u,"/>"),location:Me(s,this.clonePosition())},err:null};if(this.bumpIf(">")){var c=this.parseMessage(r+1,i,!0);if(c.err)return c;var d=c.val,h=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Qd(this.char()))return this.error(we.INVALID_TAG,Me(h,this.clonePosition()));var m=this.clonePosition(),p=this.parseTagName();return u!==p?this.error(we.UNMATCHED_CLOSING_TAG,Me(m,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Ye.tag,value:u,children:d,location:Me(s,this.clonePosition())},err:null}:this.error(we.INVALID_TAG,Me(h,this.clonePosition())))}else return this.error(we.UNCLOSED_TAG,Me(s,this.clonePosition()))}else return this.error(we.INVALID_TAG,Me(s,this.clonePosition()))},t.prototype.parseTagName=function(){var r=this.offset();for(this.bump();!this.isEOF()&&UT(this.char());)this.bump();return this.message.slice(r,this.offset())},t.prototype.parseLiteral=function(r,i){for(var s=this.clonePosition(),u="";;){var c=this.tryParseQuote(i);if(c){u+=c;continue}var d=this.tryParseUnquoted(r,i);if(d){u+=d;continue}var h=this.tryParseLeftAngleBracket();if(h){u+=h;continue}break}var m=Me(s,this.clonePosition());return{val:{type:Ye.literal,value:u,location:m},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!BT(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(r){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(r==="plural"||r==="selectordinal")break;return null;default:return null}this.bump();var i=[this.char()];for(this.bump();!this.isEOF();){var s=this.char();if(s===39)if(this.peek()===39)i.push(39),this.bump();else{this.bump();break}else i.push(s);this.bump()}return Xd.apply(void 0,i)},t.prototype.tryParseUnquoted=function(r,i){if(this.isEOF())return null;var s=this.char();return s===60||s===123||s===35&&(i==="plural"||i==="selectordinal")||s===125&&r>0?null:(this.bump(),Xd(s))},t.prototype.parseArgument=function(r,i){var s=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(s,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(we.EMPTY_ARGUMENT,Me(s,this.clonePosition()));var u=this.parseIdentifierIfPossible().value;if(!u)return this.error(we.MALFORMED_ARGUMENT,Me(s,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(s,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Ye.argument,value:u,location:Me(s,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(s,this.clonePosition())):this.parseArgumentOptions(r,i,u,s);default:return this.error(we.MALFORMED_ARGUMENT,Me(s,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var r=this.clonePosition(),i=this.offset(),s=Zd(this.message,i),u=i+s.length;this.bumpTo(u);var c=this.clonePosition(),d=Me(r,c);return{value:s,location:d}},t.prototype.parseArgumentOptions=function(r,i,s,u){var c,d=this.clonePosition(),h=this.parseIdentifierIfPossible().value,m=this.clonePosition();switch(h){case"":return this.error(we.EXPECT_ARGUMENT_TYPE,Me(d,m));case"number":case"date":case"time":{this.bumpSpace();var p=null;if(this.bumpIf(",")){this.bumpSpace();var b=this.clonePosition(),E=this.parseSimpleArgStyleIfPossible();if(E.err)return E;var A=DT(E.val);if(A.length===0)return this.error(we.EXPECT_ARGUMENT_STYLE,Me(this.clonePosition(),this.clonePosition()));var U=Me(b,this.clonePosition());p={style:A,styleLocation:U}}var R=this.tryParseArgumentClose(u);if(R.err)return R;var q=Me(u,this.clonePosition());if(p&&ry(p?.style,"::",0)){var G=MT(p.style.slice(2));if(h==="number"){var E=this.parseNumberSkeletonFromString(G,p.styleLocation);return E.err?E:{val:{type:Ye.number,value:s,location:q,style:E.val},err:null}}else{if(G.length===0)return this.error(we.EXPECT_DATE_TIME_SKELETON,q);var _=G;this.locale&&(_=bT(G,this.locale));var A={type:Ri.dateTime,pattern:_,location:p.styleLocation,parsedOptions:this.shouldParseSkeletons?fT(_):{}},C=h==="date"?Ye.date:Ye.time;return{val:{type:C,value:s,location:q,style:A},err:null}}}return{val:{type:h==="number"?Ye.number:h==="date"?Ye.date:Ye.time,value:s,location:q,style:(c=p?.style)!==null&&c!==void 0?c:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(we.EXPECT_SELECT_ARGUMENT_OPTIONS,Me(S,ie({},S)));this.bumpSpace();var H=this.parseIdentifierIfPossible(),x=0;if(h!=="select"&&H.value==="offset"){if(!this.bumpIf(":"))return this.error(we.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Me(this.clonePosition(),this.clonePosition()));this.bumpSpace();var E=this.tryParseDecimalInteger(we.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,we.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(E.err)return E;this.bumpSpace(),H=this.parseIdentifierIfPossible(),x=E.val}var Z=this.tryParsePluralOrSelectOptions(r,h,i,H);if(Z.err)return Z;var R=this.tryParseArgumentClose(u);if(R.err)return R;var W=Me(u,this.clonePosition());return h==="select"?{val:{type:Ye.select,value:s,options:ay(Z.val),location:W},err:null}:{val:{type:Ye.plural,value:s,options:ay(Z.val),offset:x,pluralType:h==="plural"?"cardinal":"ordinal",location:W},err:null}}default:return this.error(we.INVALID_ARGUMENT_TYPE,Me(d,m))}},t.prototype.tryParseArgumentClose=function(r){return this.isEOF()||this.char()!==125?this.error(we.EXPECT_ARGUMENT_CLOSING_BRACE,Me(r,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var r=0,i=this.clonePosition();!this.isEOF();){var s=this.char();switch(s){case 39:{this.bump();var u=this.clonePosition();if(!this.bumpUntil("'"))return this.error(we.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Me(u,this.clonePosition()));this.bump();break}case 123:{r+=1,this.bump();break}case 125:{if(r>0)r-=1;else return{val:this.message.slice(i.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(i.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(r,i){var s=[];try{s=hT(r)}catch{return this.error(we.INVALID_NUMBER_SKELETON,i)}return{val:{type:Ri.number,tokens:s,location:i,parsedOptions:this.shouldParseSkeletons?yT(s):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(r,i,s,u){for(var c,d=!1,h=[],m=new Set,p=u.value,b=u.location;;){if(p.length===0){var E=this.clonePosition();if(i!=="select"&&this.bumpIf("=")){var A=this.tryParseDecimalInteger(we.EXPECT_PLURAL_ARGUMENT_SELECTOR,we.INVALID_PLURAL_ARGUMENT_SELECTOR);if(A.err)return A;b=Me(E,this.clonePosition()),p=this.message.slice(E.offset,this.offset())}else break}if(m.has(p))return this.error(i==="select"?we.DUPLICATE_SELECT_ARGUMENT_SELECTOR:we.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,b);p==="other"&&(d=!0),this.bumpSpace();var U=this.clonePosition();if(!this.bumpIf("{"))return this.error(i==="select"?we.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:we.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Me(this.clonePosition(),this.clonePosition()));var R=this.parseMessage(r+1,i,s);if(R.err)return R;var q=this.tryParseArgumentClose(U);if(q.err)return q;h.push([p,{value:R.val,location:Me(U,this.clonePosition())}]),m.add(p),this.bumpSpace(),c=this.parseIdentifierIfPossible(),p=c.value,b=c.location}return h.length===0?this.error(i==="select"?we.EXPECT_SELECT_ARGUMENT_SELECTOR:we.EXPECT_PLURAL_ARGUMENT_SELECTOR,Me(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!d?this.error(we.MISSING_OTHER_CLAUSE,Me(this.clonePosition(),this.clonePosition())):{val:h,err:null}},t.prototype.tryParseDecimalInteger=function(r,i){var s=1,u=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(s=-1);for(var c=!1,d=0;!this.isEOF();){var h=this.char();if(h>=48&&h<=57)c=!0,d=d*10+(h-48),this.bump();else break}var m=Me(u,this.clonePosition());return c?(d*=s,CT(d)?{val:d,err:null}:this.error(i,m)):this.error(r,m)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var r=this.position.offset;if(r>=this.message.length)throw Error("out of bound");var i=G1(this.message,r);if(i===void 0)throw Error("Offset ".concat(r," is at invalid UTF-16 code unit boundary"));return i},t.prototype.error=function(r,i){return{val:null,err:{kind:r,message:this.message,location:i}}},t.prototype.bump=function(){if(!this.isEOF()){var r=this.char();r===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=r<65536?1:2)}},t.prototype.bumpIf=function(r){if(ry(this.message,r,this.offset())){for(var i=0;i<r.length;i++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(r){var i=this.offset(),s=this.message.indexOf(r,i);return s>=0?(this.bumpTo(s),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(r){if(this.offset()>r)throw Error("targetOffset ".concat(r," must be greater than or equal to the current offset ").concat(this.offset()));for(r=Math.min(r,this.message.length);;){var i=this.offset();if(i===r)break;if(i>r)throw Error("targetOffset ".concat(r," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&q1(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var r=this.char(),i=this.offset(),s=this.message.charCodeAt(i+(r>=65536?2:1));return s??null},t})();function Qd(t){return t>=97&&t<=122||t>=65&&t<=90}function BT(t){return Qd(t)||t===47}function UT(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function q1(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function jT(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function Kd(t){t.forEach(function(r){if(delete r.location,D1(r)||L1(r))for(var i in r.options)delete r.options[i].location,Kd(r.options[i].value);else C1(r)&&U1(r.style)||(N1(r)||M1(r))&&Pd(r.style)?delete r.style.location:B1(r)&&Kd(r.children)})}function HT(t,r){r===void 0&&(r={}),r=ie({shouldParseSkeletons:!0,requiresOtherClause:!0},r);var i=new LT(t,r).parse();if(i.err){var s=SyntaxError(we[i.err.kind]);throw s.location=i.err.location,s.originalMessage=i.err.message,s}return r?.captureLocation||Kd(i.val),i.val}var er;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(er||(er={}));var oa=(function(t){An(r,t);function r(i,s,u){var c=t.call(this,i)||this;return c.code=s,c.originalMessage=u,c}return r.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},r})(Error),sy=(function(t){An(r,t);function r(i,s,u,c){return t.call(this,'Invalid values for "'.concat(i,'": "').concat(s,'". Options are "').concat(Object.keys(u).join('", "'),'"'),er.INVALID_VALUE,c)||this}return r})(oa),IT=(function(t){An(r,t);function r(i,s,u){return t.call(this,'Value for "'.concat(i,'" must be of type ').concat(s),er.INVALID_VALUE,u)||this}return r})(oa),zT=(function(t){An(r,t);function r(i,s){return t.call(this,'The intl string context variable "'.concat(i,'" was not provided to the string "').concat(s,'"'),er.MISSING_VALUE,s)||this}return r})(oa),It;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(It||(It={}));function GT(t){return t.length<2?t:t.reduce(function(r,i){var s=r[r.length-1];return!s||s.type!==It.literal||i.type!==It.literal?r.push(i):s.value+=i.value,r},[])}function F1(t){return typeof t=="function"}function Fo(t,r,i,s,u,c,d){if(t.length===1&&Jg(t[0]))return[{type:It.literal,value:t[0].value}];for(var h=[],m=0,p=t;m<p.length;m++){var b=p[m];if(Jg(b)){h.push({type:It.literal,value:b.value});continue}if(uT(b)){typeof c=="number"&&h.push({type:It.literal,value:i.getNumberFormat(r).format(c)});continue}var E=b.value;if(!(u&&E in u))throw new zT(E,d);var A=u[E];if(oT(b)){(!A||typeof A=="string"||typeof A=="number")&&(A=typeof A=="string"||typeof A=="number"?String(A):""),h.push({type:typeof A=="string"?It.literal:It.object,value:A});continue}if(N1(b)){var U=typeof b.style=="string"?s.date[b.style]:Pd(b.style)?b.style.parsedOptions:void 0;h.push({type:It.literal,value:i.getDateTimeFormat(r,U).format(A)});continue}if(M1(b)){var U=typeof b.style=="string"?s.time[b.style]:Pd(b.style)?b.style.parsedOptions:s.time.medium;h.push({type:It.literal,value:i.getDateTimeFormat(r,U).format(A)});continue}if(C1(b)){var U=typeof b.style=="string"?s.number[b.style]:U1(b.style)?b.style.parsedOptions:void 0;U&&U.scale&&(A=A*(U.scale||1)),h.push({type:It.literal,value:i.getNumberFormat(r,U).format(A)});continue}if(B1(b)){var R=b.children,q=b.value,G=u[q];if(!F1(G))throw new IT(q,"function",d);var _=Fo(R,r,i,s,u,c),C=G(_.map(function(x){return x.value}));Array.isArray(C)||(C=[C]),h.push.apply(h,C.map(function(x){return{type:typeof x=="string"?It.literal:It.object,value:x}}))}if(D1(b)){var S=b.options[A]||b.options.other;if(!S)throw new sy(b.value,A,Object.keys(b.options),d);h.push.apply(h,Fo(S.value,r,i,s,u));continue}if(L1(b)){var S=b.options["=".concat(A)];if(!S){if(!Intl.PluralRules)throw new oa(`Intl.PluralRules is not available in this environment.
|
|
66
66
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
67
|
-
`,er.MISSING_INTL_API,d);var H=i.getPluralRules(r,{type:b.pluralType}).select(A-(b.offset||0));S=b.options[H]||b.options.other}if(!S)throw new sy(b.value,A,Object.keys(b.options),d);h.push.apply(h,Fo(S.value,r,i,s,u,A-(b.offset||0)));continue}}return GT(h)}function kT(t,r){return r?ie(ie(ie({},t||{}),r||{}),Object.keys(t).reduce(function(i,s){return i[s]=ie(ie({},t[s]),r[s]||{}),i},{})):t}function qT(t,r){return r?Object.keys(t).reduce(function(i,s){return i[s]=kT(t[s],r[s]),i},ie({},t)):t}function Pf(t){return{create:function(){return{get:function(r){return t[r]},set:function(r,i){t[r]=i}}}}}function FT(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Kn(function(){for(var r,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return new((r=Intl.NumberFormat).bind.apply(r,Wn([void 0],i,!1)))},{cache:Pf(t.number),strategy:$n.variadic}),getDateTimeFormat:Kn(function(){for(var r,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return new((r=Intl.DateTimeFormat).bind.apply(r,Wn([void 0],i,!1)))},{cache:Pf(t.dateTime),strategy:$n.variadic}),getPluralRules:Kn(function(){for(var r,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return new((r=Intl.PluralRules).bind.apply(r,Wn([void 0],i,!1)))},{cache:Pf(t.pluralRules),strategy:$n.variadic})}}var V1=function(){function t(r,i,s,u){i===void 0&&(i=t.defaultLocale);var c=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(m){var p=c.formatToParts(m);if(p.length===1)return p[0].value;var b=p.reduce(function(E,A){return!E.length||A.type!==It.literal||typeof E[E.length-1]!="string"?E.push(A.value):E[E.length-1]+=A.value,E},[]);return b.length<=1?b[0]||"":b},this.formatToParts=function(m){return Fo(c.ast,c.locales,c.formatters,c.formats,m,void 0,c.message)},this.resolvedOptions=function(){var m;return{locale:((m=c.resolvedLocale)===null||m===void 0?void 0:m.toString())||Intl.NumberFormat.supportedLocalesOf(c.locales)[0]}},this.getAst=function(){return c.ast},this.locales=i,this.resolvedLocale=t.resolveLocale(i),typeof r=="string"){if(this.message=r,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var d=u||{};d.formatters;var h=uu(d,["formatters"]);this.ast=t.__parse(r,ie(ie({},h),{locale:this.resolvedLocale}))}else this.ast=r;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=qT(t.formats,s),this.formatters=u&&u.formatters||FT(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(r){if(!(typeof Intl.Locale>"u")){var i=Intl.NumberFormat.supportedLocalesOf(r);return i.length>0?new Intl.Locale(i[0]):new Intl.Locale(typeof r=="string"?r:r[0])}},t.__parse=HT,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}(),za;(function(t){t.FORMAT_ERROR="FORMAT_ERROR",t.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",t.INVALID_CONFIG="INVALID_CONFIG",t.MISSING_DATA="MISSING_DATA",t.MISSING_TRANSLATION="MISSING_TRANSLATION"})(za||(za={}));var tl=function(t){An(r,t);function r(i,s,u){var c=this,d=u?u instanceof Error?u:new Error(String(u)):void 0;return c=t.call(this,"[@formatjs/intl Error ".concat(i,"] ").concat(s,`
|
|
67
|
+
`,er.MISSING_INTL_API,d);var H=i.getPluralRules(r,{type:b.pluralType}).select(A-(b.offset||0));S=b.options[H]||b.options.other}if(!S)throw new sy(b.value,A,Object.keys(b.options),d);h.push.apply(h,Fo(S.value,r,i,s,u,A-(b.offset||0)));continue}}return GT(h)}function kT(t,r){return r?ie(ie(ie({},t||{}),r||{}),Object.keys(t).reduce(function(i,s){return i[s]=ie(ie({},t[s]),r[s]||{}),i},{})):t}function qT(t,r){return r?Object.keys(t).reduce(function(i,s){return i[s]=kT(t[s],r[s]),i},ie({},t)):t}function Pf(t){return{create:function(){return{get:function(r){return t[r]},set:function(r,i){t[r]=i}}}}}function FT(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Kn(function(){for(var r,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return new((r=Intl.NumberFormat).bind.apply(r,Wn([void 0],i,!1)))},{cache:Pf(t.number),strategy:$n.variadic}),getDateTimeFormat:Kn(function(){for(var r,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return new((r=Intl.DateTimeFormat).bind.apply(r,Wn([void 0],i,!1)))},{cache:Pf(t.dateTime),strategy:$n.variadic}),getPluralRules:Kn(function(){for(var r,i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return new((r=Intl.PluralRules).bind.apply(r,Wn([void 0],i,!1)))},{cache:Pf(t.pluralRules),strategy:$n.variadic})}}var V1=(function(){function t(r,i,s,u){i===void 0&&(i=t.defaultLocale);var c=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(m){var p=c.formatToParts(m);if(p.length===1)return p[0].value;var b=p.reduce(function(E,A){return!E.length||A.type!==It.literal||typeof E[E.length-1]!="string"?E.push(A.value):E[E.length-1]+=A.value,E},[]);return b.length<=1?b[0]||"":b},this.formatToParts=function(m){return Fo(c.ast,c.locales,c.formatters,c.formats,m,void 0,c.message)},this.resolvedOptions=function(){var m;return{locale:((m=c.resolvedLocale)===null||m===void 0?void 0:m.toString())||Intl.NumberFormat.supportedLocalesOf(c.locales)[0]}},this.getAst=function(){return c.ast},this.locales=i,this.resolvedLocale=t.resolveLocale(i),typeof r=="string"){if(this.message=r,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var d=u||{};d.formatters;var h=uu(d,["formatters"]);this.ast=t.__parse(r,ie(ie({},h),{locale:this.resolvedLocale}))}else this.ast=r;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=qT(t.formats,s),this.formatters=u&&u.formatters||FT(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(r){if(!(typeof Intl.Locale>"u")){var i=Intl.NumberFormat.supportedLocalesOf(r);return i.length>0?new Intl.Locale(i[0]):new Intl.Locale(typeof r=="string"?r:r[0])}},t.__parse=HT,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t})(),za;(function(t){t.FORMAT_ERROR="FORMAT_ERROR",t.UNSUPPORTED_FORMATTER="UNSUPPORTED_FORMATTER",t.INVALID_CONFIG="INVALID_CONFIG",t.MISSING_DATA="MISSING_DATA",t.MISSING_TRANSLATION="MISSING_TRANSLATION"})(za||(za={}));var tl=(function(t){An(r,t);function r(i,s,u){var c=this,d=u?u instanceof Error?u:new Error(String(u)):void 0;return c=t.call(this,"[@formatjs/intl Error ".concat(i,"] ").concat(s,`
|
|
68
68
|
`).concat(d?`
|
|
69
69
|
`.concat(d.message,`
|
|
70
|
-
`).concat(d.stack):""))||this,c.code=i,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(c,r),c}return r}(Error),VT=function(t){An(r,t);function r(i,s){return t.call(this,za.UNSUPPORTED_FORMATTER,i,s)||this}return r}(tl),PT=function(t){An(r,t);function r(i,s){return t.call(this,za.INVALID_CONFIG,i,s)||this}return r}(tl),ly=function(t){An(r,t);function r(i,s){return t.call(this,za.MISSING_DATA,i,s)||this}return r}(tl),xn=function(t){An(r,t);function r(i,s,u){var c=t.call(this,za.FORMAT_ERROR,"".concat(i,`
|
|
70
|
+
`).concat(d.stack):""))||this,c.code=i,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(c,r),c}return r})(Error),VT=(function(t){An(r,t);function r(i,s){return t.call(this,za.UNSUPPORTED_FORMATTER,i,s)||this}return r})(tl),PT=(function(t){An(r,t);function r(i,s){return t.call(this,za.INVALID_CONFIG,i,s)||this}return r})(tl),ly=(function(t){An(r,t);function r(i,s){return t.call(this,za.MISSING_DATA,i,s)||this}return r})(tl),xn=(function(t){An(r,t);function r(i,s,u){var c=t.call(this,za.FORMAT_ERROR,"".concat(i,`
|
|
71
71
|
Locale: `).concat(s,`
|
|
72
|
-
`),u)||this;return c.locale=s,c}return r}(tl),Yf=function(t){An(r,t);function r(i,s,u,c){var d=t.call(this,"".concat(i,`
|
|
72
|
+
`),u)||this;return c.locale=s,c}return r})(tl),Yf=(function(t){An(r,t);function r(i,s,u,c){var d=t.call(this,"".concat(i,`
|
|
73
73
|
MessageID: `).concat(u?.id,`
|
|
74
74
|
Default Message: `).concat(u?.defaultMessage,`
|
|
75
75
|
Description: `).concat(u?.description,`
|
|
76
|
-
`),s,c)||this;return d.descriptor=u,d.locale=s,d}return r}(xn),YT=function(t){An(r,t);function r(i,s){var u=t.call(this,za.MISSING_TRANSLATION,'Missing message: "'.concat(i.id,'" for locale "').concat(s,'", using ').concat(i.defaultMessage?"default message (".concat(typeof i.defaultMessage=="string"?i.defaultMessage:i.defaultMessage.map(function(c){var d;return(d=c.value)!==null&&d!==void 0?d:JSON.stringify(c)}).join(),")"):"id"," as fallback."))||this;return u.descriptor=i,u}return r}(tl);function XT(t,r,i){if(i===void 0&&(i=Error),!t)throw new i(r)}function Ni(t,r,i){return i===void 0&&(i={}),r.reduce(function(s,u){return u in t?s[u]=t[u]:u in i&&(s[u]=i[u]),s},{})}var ZT=function(t){},QT=function(t){},P1={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:ZT,onWarn:QT};function Y1(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Na(t){return{create:function(){return{get:function(r){return t[r]},set:function(r,i){t[r]=i}}}}}function KT(t){t===void 0&&(t=Y1());var r=Intl.RelativeTimeFormat,i=Intl.ListFormat,s=Intl.DisplayNames,u=Kn(function(){for(var h,m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return new((h=Intl.DateTimeFormat).bind.apply(h,Wn([void 0],m,!1)))},{cache:Na(t.dateTime),strategy:$n.variadic}),c=Kn(function(){for(var h,m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return new((h=Intl.NumberFormat).bind.apply(h,Wn([void 0],m,!1)))},{cache:Na(t.number),strategy:$n.variadic}),d=Kn(function(){for(var h,m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return new((h=Intl.PluralRules).bind.apply(h,Wn([void 0],m,!1)))},{cache:Na(t.pluralRules),strategy:$n.variadic});return{getDateTimeFormat:u,getNumberFormat:c,getMessageFormat:Kn(function(h,m,p,b){return new V1(h,m,p,ie({formatters:{getNumberFormat:c,getDateTimeFormat:u,getPluralRules:d}},b||{}))},{cache:Na(t.message),strategy:$n.variadic}),getRelativeTimeFormat:Kn(function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return new(r.bind.apply(r,Wn([void 0],h,!1)))},{cache:Na(t.relativeTime),strategy:$n.variadic}),getPluralRules:d,getListFormat:Kn(function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return new(i.bind.apply(i,Wn([void 0],h,!1)))},{cache:Na(t.list),strategy:$n.variadic}),getDisplayNames:Kn(function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return new(s.bind.apply(s,Wn([void 0],h,!1)))},{cache:Na(t.displayNames),strategy:$n.variadic})}}function Eh(t,r,i,s){var u=t&&t[r],c;if(u&&(c=u[i]),c)return c;s(new VT("No ".concat(r," format named: ").concat(i)))}function vo(t,r){return Object.keys(t).reduce(function(i,s){return i[s]=ie({timeZone:r},t[s]),i},{})}function oy(t,r){var i=Object.keys(ie(ie({},t),r));return i.reduce(function(s,u){return s[u]=ie(ie({},t[u]||{}),r[u]||{}),s},{})}function uy(t,r){if(!r)return t;var i=V1.formats;return ie(ie(ie({},i),t),{date:oy(vo(i.date,r),vo(t.date||{},r)),time:oy(vo(i.time,r),vo(t.time||{},r))})}var $d=function(t,r,i,s,u){var c=t.locale,d=t.formats,h=t.messages,m=t.defaultLocale,p=t.defaultFormats,b=t.fallbackOnEmptyString,E=t.onError,A=t.timeZone,U=t.defaultRichTextElements;i===void 0&&(i={id:""});var R=i.id,q=i.defaultMessage;XT(!!R,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var G=String(R),_=h&&Object.prototype.hasOwnProperty.call(h,G)&&h[G];if(Array.isArray(_)&&_.length===1&&_[0].type===Ye.literal)return _[0].value;if(!s&&_&&typeof _=="string"&&!U)return _.replace(/'\{(.*?)\}'/gi,"{$1}");if(s=ie(ie({},U),s||{}),d=uy(d,A),p=uy(p,A),!_){if(b===!1&&_==="")return _;if((!q||c&&c.toLowerCase()!==m.toLowerCase())&&E(new YT(i,c)),q)try{var C=r.getMessageFormat(q,m,p,u);return C.format(s)}catch(S){return E(new Yf('Error formatting default message for: "'.concat(G,'", rendering default message verbatim'),c,i,S)),typeof q=="string"?q:G}return G}try{var C=r.getMessageFormat(_,c,d,ie({formatters:r},u||{}));return C.format(s)}catch(S){E(new Yf('Error formatting message: "'.concat(G,'", using ').concat(q?"default message":"id"," as fallback."),c,i,S))}if(q)try{var C=r.getMessageFormat(q,m,p,u);return C.format(s)}catch(S){E(new Yf('Error formatting the default message for: "'.concat(G,'", rendering message verbatim'),c,i,S))}return typeof _=="string"?_:typeof q=="string"?q:G},$T=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function nl(t,r,i,s){var u=t.locale,c=t.formats,d=t.onError,h=t.timeZone;s===void 0&&(s={});var m=s.format,p=ie(ie({},h&&{timeZone:h}),m&&Eh(c,r,m,d)),b=Ni(s,$T,p);return r==="time"&&!b.hour&&!b.minute&&!b.second&&!b.timeStyle&&!b.dateStyle&&(b=ie(ie({},b),{hour:"numeric",minute:"numeric"})),i(u,b)}function WT(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"date",r,d).format(h)}catch(m){t.onError(new xn("Error formatting date.",t.locale,m))}return String(h)}function JT(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"time",r,d).format(h)}catch(m){t.onError(new xn("Error formatting time.",t.locale,m))}return String(h)}function eA(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=i[2],h=d===void 0?{}:d,m=typeof u=="string"?new Date(u||0):u,p=typeof c=="string"?new Date(c||0):c;try{return nl(t,"dateTimeRange",r,h).formatRange(m,p)}catch(b){t.onError(new xn("Error formatting date time range.",t.locale,b))}return String(m)}function tA(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"date",r,d).formatToParts(h)}catch(m){t.onError(new xn("Error formatting date.",t.locale,m))}return[]}function nA(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"time",r,d).formatToParts(h)}catch(m){t.onError(new xn("Error formatting time.",t.locale,m))}return[]}var rA=["style","type","fallback","languageDisplay"];function aA(t,r,i,s){var u=t.locale,c=t.onError,d=Intl.DisplayNames;d||c(new oa(`Intl.DisplayNames is not available in this environment.
|
|
76
|
+
`),s,c)||this;return d.descriptor=u,d.locale=s,d}return r})(xn),YT=(function(t){An(r,t);function r(i,s){var u=t.call(this,za.MISSING_TRANSLATION,'Missing message: "'.concat(i.id,'" for locale "').concat(s,'", using ').concat(i.defaultMessage?"default message (".concat(typeof i.defaultMessage=="string"?i.defaultMessage:i.defaultMessage.map(function(c){var d;return(d=c.value)!==null&&d!==void 0?d:JSON.stringify(c)}).join(),")"):"id"," as fallback."))||this;return u.descriptor=i,u}return r})(tl);function XT(t,r,i){if(i===void 0&&(i=Error),!t)throw new i(r)}function Ni(t,r,i){return i===void 0&&(i={}),r.reduce(function(s,u){return u in t?s[u]=t[u]:u in i&&(s[u]=i[u]),s},{})}var ZT=function(t){},QT=function(t){},P1={formats:{},messages:{},timeZone:void 0,defaultLocale:"en",defaultFormats:{},fallbackOnEmptyString:!0,onError:ZT,onWarn:QT};function Y1(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function Na(t){return{create:function(){return{get:function(r){return t[r]},set:function(r,i){t[r]=i}}}}}function KT(t){t===void 0&&(t=Y1());var r=Intl.RelativeTimeFormat,i=Intl.ListFormat,s=Intl.DisplayNames,u=Kn(function(){for(var h,m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return new((h=Intl.DateTimeFormat).bind.apply(h,Wn([void 0],m,!1)))},{cache:Na(t.dateTime),strategy:$n.variadic}),c=Kn(function(){for(var h,m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return new((h=Intl.NumberFormat).bind.apply(h,Wn([void 0],m,!1)))},{cache:Na(t.number),strategy:$n.variadic}),d=Kn(function(){for(var h,m=[],p=0;p<arguments.length;p++)m[p]=arguments[p];return new((h=Intl.PluralRules).bind.apply(h,Wn([void 0],m,!1)))},{cache:Na(t.pluralRules),strategy:$n.variadic});return{getDateTimeFormat:u,getNumberFormat:c,getMessageFormat:Kn(function(h,m,p,b){return new V1(h,m,p,ie({formatters:{getNumberFormat:c,getDateTimeFormat:u,getPluralRules:d}},b||{}))},{cache:Na(t.message),strategy:$n.variadic}),getRelativeTimeFormat:Kn(function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return new(r.bind.apply(r,Wn([void 0],h,!1)))},{cache:Na(t.relativeTime),strategy:$n.variadic}),getPluralRules:d,getListFormat:Kn(function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return new(i.bind.apply(i,Wn([void 0],h,!1)))},{cache:Na(t.list),strategy:$n.variadic}),getDisplayNames:Kn(function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];return new(s.bind.apply(s,Wn([void 0],h,!1)))},{cache:Na(t.displayNames),strategy:$n.variadic})}}function Eh(t,r,i,s){var u=t&&t[r],c;if(u&&(c=u[i]),c)return c;s(new VT("No ".concat(r," format named: ").concat(i)))}function vo(t,r){return Object.keys(t).reduce(function(i,s){return i[s]=ie({timeZone:r},t[s]),i},{})}function oy(t,r){var i=Object.keys(ie(ie({},t),r));return i.reduce(function(s,u){return s[u]=ie(ie({},t[u]||{}),r[u]||{}),s},{})}function uy(t,r){if(!r)return t;var i=V1.formats;return ie(ie(ie({},i),t),{date:oy(vo(i.date,r),vo(t.date||{},r)),time:oy(vo(i.time,r),vo(t.time||{},r))})}var $d=function(t,r,i,s,u){var c=t.locale,d=t.formats,h=t.messages,m=t.defaultLocale,p=t.defaultFormats,b=t.fallbackOnEmptyString,E=t.onError,A=t.timeZone,U=t.defaultRichTextElements;i===void 0&&(i={id:""});var R=i.id,q=i.defaultMessage;XT(!!R,"[@formatjs/intl] An `id` must be provided to format a message. You can either:\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\nto autofix this issue");var G=String(R),_=h&&Object.prototype.hasOwnProperty.call(h,G)&&h[G];if(Array.isArray(_)&&_.length===1&&_[0].type===Ye.literal)return _[0].value;if(!s&&_&&typeof _=="string"&&!U)return _.replace(/'\{(.*?)\}'/gi,"{$1}");if(s=ie(ie({},U),s||{}),d=uy(d,A),p=uy(p,A),!_){if(b===!1&&_==="")return _;if((!q||c&&c.toLowerCase()!==m.toLowerCase())&&E(new YT(i,c)),q)try{var C=r.getMessageFormat(q,m,p,u);return C.format(s)}catch(S){return E(new Yf('Error formatting default message for: "'.concat(G,'", rendering default message verbatim'),c,i,S)),typeof q=="string"?q:G}return G}try{var C=r.getMessageFormat(_,c,d,ie({formatters:r},u||{}));return C.format(s)}catch(S){E(new Yf('Error formatting message: "'.concat(G,'", using ').concat(q?"default message":"id"," as fallback."),c,i,S))}if(q)try{var C=r.getMessageFormat(q,m,p,u);return C.format(s)}catch(S){E(new Yf('Error formatting the default message for: "'.concat(G,'", rendering message verbatim'),c,i,S))}return typeof _=="string"?_:typeof q=="string"?q:G},$T=["formatMatcher","timeZone","hour12","weekday","era","year","month","day","hour","minute","second","timeZoneName","hourCycle","dateStyle","timeStyle","calendar","numberingSystem","fractionalSecondDigits"];function nl(t,r,i,s){var u=t.locale,c=t.formats,d=t.onError,h=t.timeZone;s===void 0&&(s={});var m=s.format,p=ie(ie({},h&&{timeZone:h}),m&&Eh(c,r,m,d)),b=Ni(s,$T,p);return r==="time"&&!b.hour&&!b.minute&&!b.second&&!b.timeStyle&&!b.dateStyle&&(b=ie(ie({},b),{hour:"numeric",minute:"numeric"})),i(u,b)}function WT(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"date",r,d).format(h)}catch(m){t.onError(new xn("Error formatting date.",t.locale,m))}return String(h)}function JT(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"time",r,d).format(h)}catch(m){t.onError(new xn("Error formatting time.",t.locale,m))}return String(h)}function eA(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=i[2],h=d===void 0?{}:d,m=typeof u=="string"?new Date(u||0):u,p=typeof c=="string"?new Date(c||0):c;try{return nl(t,"dateTimeRange",r,h).formatRange(m,p)}catch(b){t.onError(new xn("Error formatting date time range.",t.locale,b))}return String(m)}function tA(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"date",r,d).formatToParts(h)}catch(m){t.onError(new xn("Error formatting date.",t.locale,m))}return[]}function nA(t,r){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var u=i[0],c=i[1],d=c===void 0?{}:c,h=typeof u=="string"?new Date(u||0):u;try{return nl(t,"time",r,d).formatToParts(h)}catch(m){t.onError(new xn("Error formatting time.",t.locale,m))}return[]}var rA=["style","type","fallback","languageDisplay"];function aA(t,r,i,s){var u=t.locale,c=t.onError,d=Intl.DisplayNames;d||c(new oa(`Intl.DisplayNames is not available in this environment.
|
|
77
77
|
Try polyfilling it using "@formatjs/intl-displaynames"
|
|
78
78
|
`,er.MISSING_INTL_API));var h=Ni(s,rA);try{return r(u,h).of(i)}catch(m){c(new xn("Error formatting display name.",u,m))}}var iA=["type","style"],cy=Date.now();function sA(t){return"".concat(cy,"_").concat(t,"_").concat(cy)}function lA(t,r,i,s){s===void 0&&(s={});var u=X1(t,r,i,s).reduce(function(c,d){var h=d.value;return typeof h!="string"?c.push(h):typeof c[c.length-1]=="string"?c[c.length-1]+=h:c.push(h),c},[]);return u.length===1?u[0]:u.length===0?"":u}function X1(t,r,i,s){var u=t.locale,c=t.onError;s===void 0&&(s={});var d=Intl.ListFormat;d||c(new oa(`Intl.ListFormat is not available in this environment.
|
|
79
79
|
Try polyfilling it using "@formatjs/intl-listformat"
|
|
@@ -90,23 +90,23 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the MIT license found in the
|
|
92
92
|
* LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/var fy;function xA(){if(fy)return Be;fy=1;var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,i=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,u=t?Symbol.for("react.strict_mode"):60108,c=t?Symbol.for("react.profiler"):60114,d=t?Symbol.for("react.provider"):60109,h=t?Symbol.for("react.context"):60110,m=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,b=t?Symbol.for("react.forward_ref"):60112,E=t?Symbol.for("react.suspense"):60113,A=t?Symbol.for("react.suspense_list"):60120,U=t?Symbol.for("react.memo"):60115,R=t?Symbol.for("react.lazy"):60116,q=t?Symbol.for("react.block"):60121,G=t?Symbol.for("react.fundamental"):60117,_=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function S(x){if(typeof x=="object"&&x!==null){var Z=x.$$typeof;switch(Z){case r:switch(x=x.type,x){case m:case p:case s:case c:case u:case E:return x;default:switch(x=x&&x.$$typeof,x){case h:case b:case R:case U:case d:return x;default:return Z}}case i:return Z}}}function H(x){return S(x)===p}return Be.AsyncMode=m,Be.ConcurrentMode=p,Be.ContextConsumer=h,Be.ContextProvider=d,Be.Element=r,Be.ForwardRef=b,Be.Fragment=s,Be.Lazy=R,Be.Memo=U,Be.Portal=i,Be.Profiler=c,Be.StrictMode=u,Be.Suspense=E,Be.isAsyncMode=function(x){return H(x)||S(x)===m},Be.isConcurrentMode=H,Be.isContextConsumer=function(x){return S(x)===h},Be.isContextProvider=function(x){return S(x)===d},Be.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},Be.isForwardRef=function(x){return S(x)===b},Be.isFragment=function(x){return S(x)===s},Be.isLazy=function(x){return S(x)===R},Be.isMemo=function(x){return S(x)===U},Be.isPortal=function(x){return S(x)===i},Be.isProfiler=function(x){return S(x)===c},Be.isStrictMode=function(x){return S(x)===u},Be.isSuspense=function(x){return S(x)===E},Be.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===s||x===p||x===c||x===u||x===E||x===A||typeof x=="object"&&x!==null&&(x.$$typeof===R||x.$$typeof===U||x.$$typeof===d||x.$$typeof===h||x.$$typeof===b||x.$$typeof===G||x.$$typeof===_||x.$$typeof===C||x.$$typeof===q)},Be.typeOf=S,Be}var dy;function OA(){return dy||(dy=1,Xf.exports=xA()),Xf.exports}var Zf,hy;function RA(){if(hy)return Zf;hy=1;var t=OA(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[t.ForwardRef]=s,c[t.Memo]=u;function d(R){return t.isMemo(R)?u:c[R.$$typeof]||r}var h=Object.defineProperty,m=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,b=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,A=Object.prototype;function U(R,q,G){if(typeof q!="string"){if(A){var _=E(q);_&&_!==A&&U(R,_,G)}var C=m(q);p&&(C=C.concat(p(q)));for(var S=d(R),H=d(q),x=0;x<C.length;++x){var Z=C[x];if(!i[Z]&&!(G&&G[Z])&&!(H&&H[Z])&&!(S&&S[Z])){var W=b(q,Z);try{h(R,Z,W)}catch{}}}}return R}return Zf=U,Zf}RA();var Sh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=B.createContext(null)):B.createContext(null);Sh.Consumer;var wA=Sh.Provider,CA=wA,NA=Sh;function cu(){var t=B.useContext(NA);return Q1(t),t}var Wd;(function(t){t.formatDate="FormattedDate",t.formatTime="FormattedTime",t.formatNumber="FormattedNumber",t.formatList="FormattedList",t.formatDisplayName="FormattedDisplayName"})(Wd||(Wd={}));var Jd;(function(t){t.formatDate="FormattedDateParts",t.formatTime="FormattedTimeParts",t.formatNumber="FormattedNumberParts",t.formatList="FormattedListParts"})(Jd||(Jd={}));function $1(t){var r=function(i){var s=cu(),u=i.value,c=i.children,d=uu(i,["value","children"]),h=typeof u=="string"?new Date(u||0):u,m=t==="formatDate"?s.formatDateToParts(h,d):s.formatTimeToParts(h,d);return c(m)};return r.displayName=Jd[t],r}function rl(t){var r=function(i){var s=cu(),u=i.value,c=i.children,d=uu(i,["value","children"]),h=s[t](u,d);if(typeof c=="function")return c(h);var m=s.textComponent||B.Fragment;return B.createElement(m,null,h)};return r.displayName=Wd[t],r}function W1(t){return t&&Object.keys(t).reduce(function(r,i){var s=t[i];return r[i]=F1(s)?TA(s):s,r},{})}var my=function(t,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var d=W1(s),h=$d.apply(void 0,Wn([t,r,i,d],u,!1));return Array.isArray(h)?SA(h):h},py=function(t,r){var i=t.defaultRichTextElements,s=uu(t,["defaultRichTextElements"]),u=W1(i),c=bA(ie(ie(ie({},K1),s),{defaultRichTextElements:u}),r),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:u};return ie(ie({},c),{formatMessage:my.bind(null,d,c.formatters),$t:my.bind(null,d,c.formatters)})};function Qf(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}var MA=function(t){An(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;return i.cache=Y1(),i.state={cache:i.cache,intl:py(Qf(i.props),i.cache),prevConfig:Qf(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,d=Qf(i);return AA(u,d)?null:{intl:py(d,c),prevConfig:d}},r.prototype.render=function(){return Q1(this.state.intl),B.createElement(CA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=K1,r}(B.PureComponent);rl("formatDate");rl("formatTime");rl("formatNumber");rl("formatList");rl("formatDisplayName");$1("formatDate");$1("formatTime");const DA="_app_1rj0t_1",LA={app:DA},Nr=QS,st=WS,J1="%[a-f0-9]{2}",gy=new RegExp("("+J1+")|([^%]+?)","gi"),yy=new RegExp("("+J1+")+","gi");function eh(t,r){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;r=r||1;const i=t.slice(0,r),s=t.slice(r);return Array.prototype.concat.call([],eh(i),eh(s))}function BA(t){try{return decodeURIComponent(t)}catch{let r=t.match(gy)||[];for(let i=1;i<r.length;i++)t=eh(r,i).join(""),r=t.match(gy)||[];return t}}function UA(t){const r={"%FE%FF":"��","%FF%FE":"��"};let i=yy.exec(t);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=BA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=yy.exec(t)}r["%C2"]="�";const s=Object.keys(r);for(const u of s)t=t.replace(new RegExp(u,"g"),r[u]);return t}function jA(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return decodeURIComponent(t)}catch{return UA(t)}}function HA(t,r){const i={};if(Array.isArray(r))for(const s of r){const u=Object.getOwnPropertyDescriptor(t,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(t)){const u=Object.getOwnPropertyDescriptor(t,s);if(u.enumerable){const c=t[s];r(s,c,t)&&Object.defineProperty(i,s,u)}}return i}function ev(t,r){if(!(typeof t=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t===""||r==="")return[];const i=t.indexOf(r);return i===-1?[]:[t.slice(0,i),t.slice(i+r.length)]}const IA=t=>t==null,zA=t=>encodeURIComponent(t).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),th=Symbol("encodeFragmentIdentifier");function GA(t){switch(t.arrayFormat){case"index":return r=>(i,s)=>{const u=i.length;return s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[",u,"]"].join("")]:[...i,[ft(r,t),"[",ft(u,t),"]=",ft(s,t)].join("")]};case"bracket":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[]"].join("")]:[...i,[ft(r,t),"[]=",ft(s,t)].join("")];case"colon-list-separator":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),":list="].join("")]:[...i,[ft(r,t),":list=",ft(s,t)].join("")];case"comma":case"separator":case"bracket-separator":{const r=t.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||t.skipNull&&u===null||t.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[ft(i,t),r,ft(u,t)].join("")]:[[s,ft(u,t)].join(t.arrayFormatSeparator)])}default:return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,ft(r,t)]:[...i,[ft(r,t),"=",ft(s,t)].join("")]}}function kA(t){let r;switch(t.arrayFormat){case"index":return(i,s,u)=>{if(r=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!r){u[i]=s;return}u[i]===void 0&&(u[i]={}),u[i][r[1]]=s};case"bracket":return(i,s,u)=>{if(r=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"colon-list-separator":return(i,s,u)=>{if(r=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"comma":case"separator":return(i,s,u)=>{const c=typeof s=="string"&&s.includes(t.arrayFormatSeparator),d=typeof s=="string"&&!c&&Ar(s,t).includes(t.arrayFormatSeparator);s=d?Ar(s,t):s;const h=c||d?s.split(t.arrayFormatSeparator).map(m=>Ar(m,t)):s===null?s:Ar(s,t);u[i]=h};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Ar(s,t);return}const d=s===null?[]:Ar(s,t).split(t.arrayFormatSeparator);if(u[i]===void 0){u[i]=d;return}u[i]=[...u[i],...d]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function tv(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ft(t,r){return r.encode?r.strict?zA(t):encodeURIComponent(t):t}function Ar(t,r){return r.decode?jA(t):t}function nv(t){return Array.isArray(t)?t.sort():typeof t=="object"?nv(Object.keys(t)).sort((r,i)=>Number(r)-Number(i)).map(r=>t[r]):t}function rv(t){const r=t.indexOf("#");return r!==-1&&(t=t.slice(0,r)),t}function qA(t){let r="";const i=t.indexOf("#");return i!==-1&&(r=t.slice(i)),r}function by(t,r,i){return i==="string"&&typeof t=="string"?t:typeof i=="function"&&typeof t=="string"?i(t):i==="boolean"&&t===null?!0:i==="boolean"&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":i==="boolean"&&t!==null&&(t.toLowerCase()==="1"||t.toLowerCase()==="0")?t.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof t=="string"?[t]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?[Number(t)]:i==="number"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):r.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):t}function Th(t){t=rv(t);const r=t.indexOf("?");return r===-1?"":t.slice(r+1)}function Ah(t,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},tv(r.arrayFormatSeparator);const i=kA(r),s=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return s;for(const u of t.split("&")){if(u==="")continue;const c=r.decode?u.replaceAll("+"," "):u;let[d,h]=ev(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?h:Ar(h,r),i(Ar(d,r),h,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[d,h]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[d]=by(h,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=by(c,r,r.types[u]);return r.sort===!1?s:(r.sort===!0?Object.keys(s).sort():Object.keys(s).sort(r.sort)).reduce((u,c)=>{const d=s[c];return u[c]=d&&typeof d=="object"&&!Array.isArray(d)?nv(d):d,u},Object.create(null))}function av(t,r){if(!t)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},tv(r.arrayFormatSeparator);const i=d=>r.skipNull&&IA(t[d])||r.skipEmptyString&&t[d]==="",s=GA(r),u={};for(const[d,h]of Object.entries(t))i(d)||(u[d]=h);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(d=>{const h=t[d];return h===void 0?"":h===null?ft(d,r):Array.isArray(h)?h.length===0&&r.arrayFormat==="bracket-separator"?ft(d,r)+"[]":h.reduce(s(d),[]).join("&"):ft(d,r)+"="+ft(h,r)}).filter(d=>d.length>0).join("&")}function iv(t,r){r={decode:!0,...r};let[i,s]=ev(t,"#");return i===void 0&&(i=t),{url:i?.split("?")?.[0]??"",query:Ah(Th(t),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Ar(s,r)}:{}}}function sv(t,r){r={encode:!0,strict:!0,[th]:!0,...r};const i=rv(t.url).split("?")[0]||"",s=Th(t.url),u={...Ah(s,{sort:!1,...r}),...t.query};let c=av(u,r);c&&=`?${c}`;let d=qA(t.url);if(typeof t.fragmentIdentifier=="string"){const h=new URL(i);h.hash=t.fragmentIdentifier,d=r[th]?h.hash:`#${t.fragmentIdentifier}`}return`${i}${c}${d}`}function lv(t,r,i){i={parseFragmentIdentifier:!0,[th]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=iv(t,i);return sv({url:s,query:HA(u,r),fragmentIdentifier:c},i)}function FA(t,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return lv(t,s,i)}const fu=Object.freeze(Object.defineProperty({__proto__:null,exclude:FA,extract:Th,parse:Ah,parseUrl:iv,pick:lv,stringify:av,stringifyUrl:sv},Symbol.toStringTag,{value:"Module"}));var Ln={},Bn={},Ie={},_o={},pe={},vy;function fn(){return vy||(vy=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.GUEST_LOCALE_CHANGED=pe.DRAWER_CLOSE=pe.DRAWER_OPEN=pe.CONVERSATION_RATING_FROM_GUEST=pe.TRANSCRIPT_ITEM_GUEST_REACTION=pe.TRANSCRIPT_MAIL_REQUEST=pe.INBOX_CONNECT_REQUEST=pe.RESTART_CHAT_REQUEST=pe.EVENT_TO_GUEST=pe.NLU_REQUEST_EVENT=pe.EXPERTS_DISCONNECTED=pe.EXPERTS_DISCONNECT_REQUEST=pe.EXPERTS_CONNECTED=pe.EXPERTS_CONNECT_REQUEST=pe.MESSAGE_TO_GUEST=pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=pe.MESSAGE_FROM_GUEST=pe.GUEST_FEEDBACK_RESPONSE=pe.GUEST_DISCONNECTED=pe.GUEST_CONNECTED=pe.TYPING_OFF=pe.TYPING_ON=void 0,pe.TYPING_ON="core.typing.on",pe.TYPING_OFF="core.typing.off",pe.GUEST_CONNECTED="core.guest.connected",pe.GUEST_DISCONNECTED="core.guest.disconnected",pe.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",pe.MESSAGE_FROM_GUEST="core.message.from.guest",pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",pe.MESSAGE_TO_GUEST="core.message.to.guest",pe.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",pe.EXPERTS_CONNECTED="core.experts.connected",pe.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",pe.EXPERTS_DISCONNECTED="core.experts.disconnected",pe.NLU_REQUEST_EVENT="core.nlu.request.event",pe.EVENT_TO_GUEST="core.event.to.guest",pe.RESTART_CHAT_REQUEST="core.chat.restart.request",pe.INBOX_CONNECT_REQUEST="core.inbox.connect.request",pe.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",pe.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",pe.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",pe.DRAWER_OPEN="core.drawer.open",pe.DRAWER_CLOSE="core.drawer.close",pe.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),pe}var _y;function VA(){if(_y)return _o;_y=1,Object.defineProperty(_o,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.DRAWER_CLOSE});return _o.default=r,_o}var Eo={},Ey;function PA(){if(Ey)return Eo;Ey=1,Object.defineProperty(Eo,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return Eo.default=r,Eo}var So={},Sy;function YA(){if(Sy)return So;Sy=1,Object.defineProperty(So,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_CONNECTED,payload:{sessionId:i}});return So.default=r,So}var To={},Ty;function XA(){if(Ty)return To;Ty=1,Object.defineProperty(To,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_DISCONNECTED,payload:{sessionId:i}});return To.default=r,To}var Ao={},Ay;function ZA(){if(Ay)return Ao;Ay=1,Object.defineProperty(Ao,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return Ao.default=r,Ao}var xo={},xy;function QA(){if(xy)return xo;xy=1,Object.defineProperty(xo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return xo.default=r,xo}var Oo={},$e={},Oy;function xh(){if(Oy)return $e;Oy=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.getStringRepresentationFromMessage=$e.MessageTypeEnum=$e.AudioMessage=$e.FileMessage=$e.ImageMessage=$e.VideoMessage=$e.MarkdownMessage=$e.DetailMessage=$e.TextMessage=$e.Message=void 0;class t{type;sender;sources;quickReplies;constructor(E,A,U=[],R=[]){this.type=E,this.sender=A,this.sources=U,this.quickReplies=R}addQuickReply(E,A){this.quickReplies.push({label:E,payload:A})}}$e.Message=t;class r extends t{text;constructor(E,A,U=[],R=[]){super(m.TEXT,A,U,R),this.text=E}}$e.TextMessage=r;class i extends t{title;text;imageUrl;itemUrl;buttons;constructor(E,A){super(m.DETAIL,A),this.title=E,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(E){this.imageUrl=E}setItemUrl(E){this.itemUrl=E}setText(E){this.text=E}addButton(E){this.buttons.push(E)}}$e.DetailMessage=i;class s extends t{markdown;constructor(E,A,U=[],R=[]){super(m.MARKDOWN,A,U,R),this.markdown=E}}$e.MarkdownMessage=s;class u extends t{url;constructor(E,A){super(m.VIDEO,A),this.url=E}}$e.VideoMessage=u;class c extends t{url;constructor(E,A){super(m.IMAGE,A),this.url=E}}$e.ImageMessage=c;class d extends t{url;constructor(E,A){super(m.FILE,A),this.url=E}}$e.FileMessage=d;class h extends t{url;constructor(E,A){super(m.AUDIO,A),this.url=E}}$e.AudioMessage=h;var m;(function(b){b.TEXT="TEXT",b.DETAIL="DETAIL",b.MARKDOWN="MARKDOWN",b.VIDEO="VIDEO",b.IMAGE="IMAGE",b.FILE="FILE",b.AUDIO="AUDIO"})(m||($e.MessageTypeEnum=m={}));const p=b=>{switch(b.type){case m.TEXT:return b.text;case m.DETAIL:return`${b.title}`;case m.MARKDOWN:return b.markdown;case m.VIDEO:return`Video Url: ${b.url}`;case m.IMAGE:return`Image Url: ${b.url}`;case m.FILE:return`File Url: ${b.url}`;case m.AUDIO:return`Audio Url: ${b.url}`;default:throw new Error("Unknown message type "+b.type)}};return $e.getStringRepresentationFromMessage=p,$e}var sn={},Ry;function Oh(){if(Ry)return sn;Ry=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.UserType=sn.PersonUser=sn.GuestUser=sn.BotUser=sn.User=void 0;class t{type;id;name;avatar;constructor(d,h,m,p){this.type=d,this.id=h,this.name=m,this.avatar=p}}sn.User=t;class r extends t{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}sn.BotUser=r;class i extends t{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}sn.GuestUser=i;class s extends t{constructor(d,h,m){super(u.PERSON,d,h,m)}}sn.PersonUser=s;var u;return function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"}(u||(sn.UserType=u={})),sn}var wy;function KA(){if(wy)return Oo;wy=1,Object.defineProperty(Oo,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=u=>{const c=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return Oo.default=s,Oo}var Ro={},Cy;function $A(){if(Cy)return Ro;Cy=1,Object.defineProperty(Ro,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=(u,c={})=>{const d=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return Ro.default=s,Ro}var wo={},Ny;function WA(){if(Ny)return wo;Ny=1,Object.defineProperty(wo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.NLU_REQUEST_EVENT,event:i});return wo.default=r,wo}var Co={},My;function JA(){if(My)return Co;My=1,Object.defineProperty(Co,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.RESTART_CHAT_REQUEST});return Co.default=r,Co}var No={},Dy;function ex(){if(Dy)return No;Dy=1,Object.defineProperty(No,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.MESSAGE_TO_GUEST,message:i});return No.default=r,No}var Mo={},Ly;function tx(){if(Ly)return Mo;Ly=1,Object.defineProperty(Mo,"__esModule",{value:!0});const t=fn(),r=(i,s,u=null,c=null)=>({type:t.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s,category:u,comment:c}});return Mo.default=r,Mo}var By;function nx(){if(By)return Ie;By=1;var t=Ie&&Ie.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.transcriptItemGuestReaction=Ie.sendMessageToGuest=Ie.restartChatRequest=Ie.requestNLUEvent=Ie.receiveTextMessageWithoutAnalysisFromGuest=Ie.receiveTextMessageFromGuest=Ie.openDrawer=Ie.guestLocaleChanged=Ie.guestDisconnected=Ie.guestConnected=Ie.feedbackFromGuestResponse=Ie.closeDrawer=void 0;const r=t(VA());Ie.closeDrawer=r.default;const i=t(PA());Ie.feedbackFromGuestResponse=i.default;const s=t(YA());Ie.guestConnected=s.default;const u=t(XA());Ie.guestDisconnected=u.default;const c=t(ZA());Ie.guestLocaleChanged=c.default;const d=t(QA());Ie.openDrawer=d.default;const h=t(KA());Ie.receiveTextMessageFromGuest=h.default;const m=t($A());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const p=t(WA());Ie.requestNLUEvent=p.default;const b=t(JA());Ie.restartChatRequest=b.default;const E=t(ex());Ie.sendMessageToGuest=E.default;const A=t(tx());return Ie.transcriptItemGuestReaction=A.default,Ie}var Kf={},Uy;function rx(){return Uy||(Uy=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var jy;function ax(){return jy||(jy=1,function(t){var r=Bn&&Bn.__createBinding||(Object.create?function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}:function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]}),i=Bn&&Bn.__setModuleDefault||(Object.create?function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}:function(c,d){c.default=d}),s=Bn&&Bn.__importStar||function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}}(),u=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=t.Actions=void 0,t.Actions=s(nx()),t.ActionTypes=s(fn()),u(rx(),t)}(Bn)),Bn}var ln={},$f={},Hy;function ix(){return Hy||(Hy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Us={},Iy;function sx(){if(Iy)return Us;Iy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.NullableKnowledgeBaseAdapter=void 0;class t{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,s){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,s,u){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryByUriAlias(i,s){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,s){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,s,u,c){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async setIndexingStatus(i,s){throw new Error("Method not implemented.")}async subscribeToReindex(i,s){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,s){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}}return Us.NullableKnowledgeBaseAdapter=t,Us}var zy;function lx(){if(zy)return ln;zy=1;var t=ln&&ln.__createBinding||(Object.create?function(u,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(u,h,m)}:function(u,c,d,h){h===void 0&&(h=d),u[h]=c[d]}),r=ln&&ln.__setModuleDefault||(Object.create?function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}:function(u,c){u.default=c}),i=ln&&ln.__importStar||function(){var u=function(c){return u=Object.getOwnPropertyNames||function(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},u(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=u(c),m=0;m<h.length;m++)h[m]!=="default"&&t(d,c,h[m]);return r(d,c),d}}();Object.defineProperty(ln,"__esModule",{value:!0}),ln.NullableCmsAdapter=ln.KnowledgeBase=void 0,ln.KnowledgeBase=i(ix());const s=sx();return ln.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},ln}var Ma={},Wf={},Gy;function ox(){return Gy||(Gy=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Jf={},ky;function ux(){return ky||(ky=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var ed={},qy;function cx(){return qy||(qy=1,Object.defineProperty(ed,"__esModule",{value:!0})),ed}var td={},Fy;function fx(){return Fy||(Fy=1,Object.defineProperty(td,"__esModule",{value:!0})),td}var js={},Vy;function dx(){if(Vy)return js;Vy=1,Object.defineProperty(js,"__esModule",{value:!0}),js.checkMiddlewareCondition=void 0;const t=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,d)=>await c?await d(i,s):!1,Promise.resolve(!0));return js.checkMiddlewareCondition=t,js}var nd={},Py;function hx(){return Py||(Py=1,Object.defineProperty(nd,"__esModule",{value:!0})),nd}var rd={},Yy;function mx(){return Yy||(Yy=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var ad={},Xy;function px(){return Xy||(Xy=1,Object.defineProperty(ad,"__esModule",{value:!0})),ad}var Zy;function gx(){return Zy||(Zy=1,function(t){var r=Ma&&Ma.__createBinding||(Object.create?function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}:function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]}),i=Ma&&Ma.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(ox(),t),i(ux(),t),i(cx(),t),i(fx(),t),i(dx(),t),i(hx(),t),i(mx(),t),i(px(),t)}(Ma)),Ma}var Da={},Un={},Qy;function yx(){if(Qy)return Un;Qy=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.ButtonTypeEnum=Un.PostbackButton=Un.UrlButton=Un.Button=void 0;class t{title;type;constructor(c,d){this.title=c,this.type=d}}Un.Button=t;class r extends t{url;constructor(c,d){super(c,s.WEB_URL),this.url=d}}Un.UrlButton=r;class i extends t{payload;constructor(c,d){super(c,s.POSTBACK),this.payload=d}}Un.PostbackButton=i;var s;return function(u){u.WEB_URL="web_url",u.POSTBACK="postback"}(s||(Un.ButtonTypeEnum=s={})),Un}var id={},Ky;function bx(){return Ky||(Ky=1,Object.defineProperty(id,"__esModule",{value:!0})),id}var Hs={},$y;function vx(){if($y)return Hs;$y=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.SatisfactionEnum=void 0;var t;return function(r){r.GOOD="GOOD",r.BAD="BAD"}(t||(Hs.SatisfactionEnum=t={})),Hs}var Wy;function Jy(){return Wy||(Wy=1,function(t){var r=Da&&Da.__createBinding||(Object.create?function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}:function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]}),i=Da&&Da.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(yx(),t),i(bx(),t),i(vx(),t),i(xh(),t),i(Oh(),t)}(Da)),Da}var eb;function _x(){return eb||(eb=1,function(t){var r=Ln&&Ln.__createBinding||(Object.create?function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}:function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]}),i=Ln&&Ln.__setModuleDefault||(Object.create?function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}:function(c,d){c.default=d}),s=Ln&&Ln.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)},u=Ln&&Ln.__importStar||function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}}();Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.CMS=void 0,s(ax(),t),t.CMS=u(lx()),s(gx(),t),t.Model=u(Jy()),s(Jy(),t)}(Ln)),Ln}var Te=_x();const ov=t=>r=>(t.payload.type!==Te.ActionTypes.MESSAGE_FROM_GUEST&&r(Te.Actions.receiveTextMessageWithoutAnalysisFromGuest(t.label,t.payload)),r(t.payload)),uv=t=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>t.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?ov({...u,label:t}):JSON.parse(JSON.stringify(Te.Actions.receiveTextMessageFromGuest(t))))},Rh="MESSAGE_TO_PARENT_PAGE",wh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ch="AUDIO_MESSAGE_FROM_USER",Nh="RECEIVE_SPEECH_TRANSCRIPTION",Mh="ENABLE_CONVERSATION_RATING",cv="LOAD_SOURCE_INFOS_RESPONSE",Dh="LOAD_SOURCE_INFOS_ERROR",Lh="LOAD_SOURCE_INFOS_REQUEST",Bh="CLOSE_SOURCE_INFOS",Ex="webclient.get.started",fv="webclient.window.expand",dv="webclient.window.close",hv="webclient.transcript.pdf.download",Sx=[Rh,wh,Ch,Nh,Mh,Lh,Bh],Tx=t=>({type:Ch,buffer:t}),Ax=t=>({type:Nh,transcription:t}),xx=t=>({type:Te.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:t}}}),Ox=()=>({type:hv}),Rx=({rating:t})=>({type:Mh,payload:{rating:t}}),wx=(t,r)=>({type:Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:t,feedback:r}}),mv=t=>Te.Actions.requestNLUEvent(t),Cx=t=>({type:wh,messages:t}),Nx=t=>{switch(t.type){case Te.ButtonTypeEnum.WEB_URL:return gv(t.url);case Te.ButtonTypeEnum.POSTBACK:return t.payload;default:throw new Error(`unknown button type ${t.type}`)}},pv=t=>gv(t),gv=t=>({type:Rh,message:{type:"webclient.change.url",url:t}});/*! js-cookie v3.0.5 | MIT */function Do(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)t[s]=i[s]}return t}var Mx={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function nh(t,r){function i(u,c,d){if(!(typeof document>"u")){d=Do({},r,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=u+"="+t.write(c,u)+h}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),p=m.slice(1).join("=");try{var b=decodeURIComponent(m[0]);if(d[b]=t.read(p,b),u===b)break}catch{}}return u?d[u]:d}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Do({},c,{expires:-1}))},withAttributes:function(u){return nh(this.converter,Do({},this.attributes,u))},withConverter:function(u){return nh(Do({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}var Lo=nh(Mx,{path:"/"});const wt=[];for(let t=0;t<256;++t)wt.push((t+256).toString(16).slice(1));function Dx(t,r=0){return(wt[t[r+0]]+wt[t[r+1]]+wt[t[r+2]]+wt[t[r+3]]+"-"+wt[t[r+4]]+wt[t[r+5]]+"-"+wt[t[r+6]]+wt[t[r+7]]+"-"+wt[t[r+8]]+wt[t[r+9]]+"-"+wt[t[r+10]]+wt[t[r+11]]+wt[t[r+12]]+wt[t[r+13]]+wt[t[r+14]]+wt[t[r+15]]).toLowerCase()}let sd;const Lx=new Uint8Array(16);function Bx(){if(!sd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sd=crypto.getRandomValues.bind(crypto)}return sd(Lx)}const Ux=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tb={randomUUID:Ux};function Wo(t,r,i){if(tb.randomUUID&&!t)return tb.randomUUID();t=t||{};const s=t.random??t.rng?.()??Bx();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Dx(s)}function Ct(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var jx=typeof Symbol=="function"&&Symbol.observable||"@@observable",nb=jx,ld=()=>Math.random().toString(36).substring(7).split("").join("."),Hx={INIT:`@@redux/INIT${ld()}`,REPLACE:`@@redux/REPLACE${ld()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ld()}`},Jo=Hx;function Uh(t){if(typeof t!="object"||t===null)return!1;let r=t;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r||Object.getPrototypeOf(t)===null}function yv(t,r,i){if(typeof t!="function")throw new Error(Ct(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Ct(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Ct(1));return i(yv)(t,r)}let s=t,u=r,c=new Map,d=c,h=0,m=!1;function p(){d===c&&(d=new Map,c.forEach((G,_)=>{d.set(_,G)}))}function b(){if(m)throw new Error(Ct(3));return u}function E(G){if(typeof G!="function")throw new Error(Ct(4));if(m)throw new Error(Ct(5));let _=!0;p();const C=h++;return d.set(C,G),function(){if(_){if(m)throw new Error(Ct(6));_=!1,p(),d.delete(C),c=null}}}function A(G){if(!Uh(G))throw new Error(Ct(7));if(typeof G.type>"u")throw new Error(Ct(8));if(typeof G.type!="string")throw new Error(Ct(17));if(m)throw new Error(Ct(9));try{m=!0,u=s(u,G)}finally{m=!1}return(c=d).forEach(C=>{C()}),G}function U(G){if(typeof G!="function")throw new Error(Ct(10));s=G,A({type:Jo.REPLACE})}function R(){const G=E;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Ct(11));function C(){const H=_;H.next&&H.next(b())}return C(),{unsubscribe:G(C)}},[nb](){return this}}}return A({type:Jo.INIT}),{dispatch:A,subscribe:E,getState:b,replaceReducer:U,[nb]:R}}function Ix(t){Object.keys(t).forEach(r=>{const i=t[r];if(typeof i(void 0,{type:Jo.INIT})>"u")throw new Error(Ct(12));if(typeof i(void 0,{type:Jo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ct(13))})}function bv(t){const r=Object.keys(t),i={};for(let c=0;c<r.length;c++){const d=r[c];typeof t[d]=="function"&&(i[d]=t[d])}const s=Object.keys(i);let u;try{Ix(i)}catch(c){u=c}return function(d={},h){if(u)throw u;let m=!1;const p={};for(let b=0;b<s.length;b++){const E=s[b],A=i[E],U=d[E],R=A(U,h);if(typeof R>"u")throw h&&h.type,new Error(Ct(14));p[E]=R,m=m||R!==U}return m=m||s.length!==Object.keys(d).length,m?p:d}}function eu(...t){return t.length===0?r=>r:t.length===1?t[0]:t.reduce((r,i)=>(...s)=>r(i(...s)))}function zx(...t){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Ct(15))};const d={getState:u.getState,dispatch:(m,...p)=>c(m,...p)},h=t.map(m=>m(d));return c=eu(...h)(u.dispatch),{...u,dispatch:c}}}function Gx(t){return Uh(t)&&"type"in t&&typeof t.type=="string"}var vv=Symbol.for("immer-nothing"),rb=Symbol.for("immer-draftable"),un=Symbol.for("immer-state");function zn(t,...r){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var wi=Object.getPrototypeOf;function Ga(t){return!!t&&!!t[un]}function Cr(t){return t?_v(t)||Array.isArray(t)||!!t[rb]||!!t.constructor?.[rb]||hu(t)||mu(t):!1}var kx=Object.prototype.constructor.toString();function _v(t){if(!t||typeof t!="object")return!1;const r=wi(t);if(r===null)return!0;const i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===kx}function tu(t,r){du(t)===0?Reflect.ownKeys(t).forEach(i=>{r(i,t[i],t)}):t.forEach((i,s)=>r(s,i,t))}function du(t){const r=t[un];return r?r.type_:Array.isArray(t)?1:hu(t)?2:mu(t)?3:0}function rh(t,r){return du(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function Ev(t,r,i){const s=du(t);s===2?t.set(r,i):s===3?t.add(i):t[r]=i}function qx(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}function hu(t){return t instanceof Map}function mu(t){return t instanceof Set}function ja(t){return t.copy_||t.base_}function ah(t,r){if(hu(t))return new Map(t);if(mu(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const i=_v(t);if(r===!0||r==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(t);delete s[un];let u=Reflect.ownKeys(s);for(let c=0;c<u.length;c++){const d=u[c],h=s[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(s[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:t[d]})}return Object.create(wi(t),s)}else{const s=wi(t);if(s!==null&&i)return{...t};const u=Object.create(s);return Object.assign(u,t)}}function jh(t,r=!1){return pu(t)||Ga(t)||!Cr(t)||(du(t)>1&&(t.set=t.add=t.clear=t.delete=Fx),Object.freeze(t),r&&Object.entries(t).forEach(([i,s])=>jh(s,!0))),t}function Fx(){zn(2)}function pu(t){return Object.isFrozen(t)}var Vx={};function ka(t){const r=Vx[t];return r||zn(0,t),r}var Ws;function Sv(){return Ws}function Px(t,r){return{drafts_:[],parent_:t,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ab(t,r){r&&(ka("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=r)}function ih(t){sh(t),t.drafts_.forEach(Yx),t.drafts_=null}function sh(t){t===Ws&&(Ws=t.parent_)}function ib(t){return Ws=Px(Ws,t)}function Yx(t){const r=t[un];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function sb(t,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return t!==void 0&&t!==i?(i[un].modified_&&(ih(r),zn(4)),Cr(t)&&(t=nu(r,t),r.parent_||ru(r,t)),r.patches_&&ka("Patches").generateReplacementPatches_(i[un].base_,t,r.patches_,r.inversePatches_)):t=nu(r,i,[]),ih(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),t!==vv?t:void 0}function nu(t,r,i){if(pu(r))return r;const s=r[un];if(!s)return tu(r,(u,c)=>lb(t,s,r,u,c,i)),r;if(s.scope_!==t)return r;if(!s.modified_)return ru(t,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,d=!1;s.type_===3&&(c=new Set(u),u.clear(),d=!0),tu(c,(h,m)=>lb(t,s,u,h,m,i,d)),ru(t,u,!1),i&&t.patches_&&ka("Patches").generatePatches_(s,i,t.patches_,t.inversePatches_)}return s.copy_}function lb(t,r,i,s,u,c,d){if(Ga(u)){const h=c&&r&&r.type_!==3&&!rh(r.assigned_,s)?c.concat(s):void 0,m=nu(t,u,h);if(Ev(i,s,m),Ga(m))t.canAutoFreeze_=!1;else return}else d&&i.add(u);if(Cr(u)&&!pu(u)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;nu(t,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&ru(t,u)}}function ru(t,r,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&jh(r,i)}function Xx(t,r){const i=Array.isArray(t),s={type_:i?1:0,scope_:r?r.scope_:Sv(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Hh;i&&(u=[s],c=Js);const{revoke:d,proxy:h}=Proxy.revocable(u,c);return s.draft_=h,s.revoke_=d,h}var Hh={get(t,r){if(r===un)return t;const i=ja(t);if(!rh(i,r))return Zx(t,i,r);const s=i[r];return t.finalized_||!Cr(s)?s:s===od(t.base_,r)?(ud(t),t.copy_[r]=oh(s,t)):s},has(t,r){return r in ja(t)},ownKeys(t){return Reflect.ownKeys(ja(t))},set(t,r,i){const s=Tv(ja(t),r);if(s?.set)return s.set.call(t.draft_,i),!0;if(!t.modified_){const u=od(ja(t),r),c=u?.[un];if(c&&c.base_===i)return t.copy_[r]=i,t.assigned_[r]=!1,!0;if(qx(i,u)&&(i!==void 0||rh(t.base_,r)))return!0;ud(t),lh(t)}return t.copy_[r]===i&&(i!==void 0||r in t.copy_)||Number.isNaN(i)&&Number.isNaN(t.copy_[r])||(t.copy_[r]=i,t.assigned_[r]=!0),!0},deleteProperty(t,r){return od(t.base_,r)!==void 0||r in t.base_?(t.assigned_[r]=!1,ud(t),lh(t)):delete t.assigned_[r],t.copy_&&delete t.copy_[r],!0},getOwnPropertyDescriptor(t,r){const i=ja(t),s=Reflect.getOwnPropertyDescriptor(i,r);return s&&{writable:!0,configurable:t.type_!==1||r!=="length",enumerable:s.enumerable,value:i[r]}},defineProperty(){zn(11)},getPrototypeOf(t){return wi(t.base_)},setPrototypeOf(){zn(12)}},Js={};tu(Hh,(t,r)=>{Js[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Js.deleteProperty=function(t,r){return Js.set.call(this,t,r,void 0)};Js.set=function(t,r,i){return Hh.set.call(this,t[0],r,i,t[0])};function od(t,r){const i=t[un];return(i?ja(i):t)[r]}function Zx(t,r,i){const s=Tv(r,i);return s?"value"in s?s.value:s.get?.call(t.draft_):void 0}function Tv(t,r){if(!(r in t))return;let i=wi(t);for(;i;){const s=Object.getOwnPropertyDescriptor(i,r);if(s)return s;i=wi(i)}}function lh(t){t.modified_||(t.modified_=!0,t.parent_&&lh(t.parent_))}function ud(t){t.copy_||(t.copy_=ah(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Qx=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,s)=>{if(typeof r=="function"&&typeof i!="function"){const c=i;i=r;const d=this;return function(m=c,...p){return d.produce(m,b=>i.call(this,b,...p))}}typeof i!="function"&&zn(6),s!==void 0&&typeof s!="function"&&zn(7);let u;if(Cr(r)){const c=ib(this),d=oh(r,void 0);let h=!0;try{u=i(d),h=!1}finally{h?ih(c):sh(c)}return ab(c,s),sb(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===vv&&(u=void 0),this.autoFreeze_&&jh(u,!0),s){const c=[],d=[];ka("Patches").generateReplacementPatches_(r,u,c,d),s(c,d)}return u}else zn(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(d,...h)=>this.produceWithPatches(d,m=>r(m,...h));let s,u;return[this.produce(r,i,(d,h)=>{s=d,u=h}),s,u]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Cr(t)||zn(8),Ga(t)&&(t=Kx(t));const r=ib(this),i=oh(t,void 0);return i[un].isManual_=!0,sh(r),i}finishDraft(t,r){const i=t&&t[un];(!i||!i.isManual_)&&zn(9);const{scope_:s}=i;return ab(s,r),sb(void 0,s)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){t=u.value;break}}i>-1&&(r=r.slice(i+1));const s=ka("Patches").applyPatches_;return Ga(t)?s(t,r):this.produce(t,u=>s(u,r))}};function oh(t,r){const i=hu(t)?ka("MapSet").proxyMap_(t,r):mu(t)?ka("MapSet").proxySet_(t,r):Xx(t,r);return(r?r.scope_:Sv()).drafts_.push(i),i}function Kx(t){return Ga(t)||zn(10,t),Av(t)}function Av(t){if(!Cr(t)||pu(t))return t;const r=t[un];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=ah(t,r.scope_.immer_.useStrictShallowCopy_)}else i=ah(t,!0);return tu(i,(s,u)=>{Ev(i,s,Av(u))}),r&&(r.finalized_=!1),i}var cn=new Qx,xv=cn.produce;cn.produceWithPatches.bind(cn);cn.setAutoFreeze.bind(cn);cn.setUseStrictShallowCopy.bind(cn);cn.applyPatches.bind(cn);cn.createDraft.bind(cn);cn.finishDraft.bind(cn);function Ov(t){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,t):u(c)}var $x=Ov(),Wx=Ov,Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?eu:eu.apply(null,arguments)};function ob(t,r){function i(...s){if(r){let u=r(...s);if(!u)throw new Error(xr(0));return{type:t,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:t,payload:s[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=s=>Gx(s)&&s.type===t,i}var Rv=class Zs extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Zs.prototype)}static get[Symbol.species](){return Zs}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Zs(...r[0].concat(this)):new Zs(...r.concat(this))}};function ub(t){return Cr(t)?xv(t,()=>{}):t}function Bo(t,r,i){return t.has(r)?t.get(r):t.set(r,i(r)).get(r)}function eO(t){return typeof t=="boolean"}var tO=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let d=new Rv;return i&&(eO(i)?d.push($x):d.push(Wx(i.extraArgument))),d},nO="RTK_autoBatch",cb=t=>r=>{setTimeout(r,t)},rO=(t={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,d=!1;const h=new Set,m=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cb(10):t.type==="callback"?t.queueNotification:cb(t.timeout),p=()=>{d=!1,c&&(c=!1,h.forEach(b=>b()))};return Object.assign({},s,{subscribe(b){const E=()=>u&&b(),A=s.subscribe(E);return h.add(b),()=>{A(),h.delete(b)}},dispatch(b){try{return u=!b?.meta?.[nO],c=!u,c&&(d||(d=!0,m(p))),s.dispatch(b)}finally{u=!0}}})},aO=t=>function(i){const{autoBatch:s=!0}=i??{};let u=new Rv(t);return s&&u.push(rO(typeof s=="object"?s:void 0)),u};function iO(t){const r=tO(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:d=void 0}=t||{};let h;if(typeof i=="function")h=i;else if(Uh(i))h=bv(i);else throw new Error(xr(1));let m;typeof s=="function"?m=s(r):m=r();let p=eu;u&&(p=Jx({trace:!1,...typeof u=="object"&&u}));const b=zx(...m),E=aO(b);let A=typeof d=="function"?d(E):E();const U=p(...A);return yv(h,c,U)}function wv(t){const r={},i=[];let s;const u={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(xr(28));if(h in r)throw new Error(xr(29));return r[h]=d,u},addMatcher(c,d){return i.push({matcher:c,reducer:d}),u},addDefaultCase(c){return s=c,u}};return t(u),[r,i,s]}function sO(t){return typeof t=="function"}function lO(t,r){let[i,s,u]=wv(r),c;if(sO(t))c=()=>ub(t());else{const h=ub(t);c=()=>h}function d(h=c(),m){let p=[i[m.type],...s.filter(({matcher:b})=>b(m)).map(({reducer:b})=>b)];return p.filter(b=>!!b).length===0&&(p=[u]),p.reduce((b,E)=>{if(E)if(Ga(b)){const U=E(b,m);return U===void 0?b:U}else{if(Cr(b))return xv(b,A=>E(A,m));{const A=E(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}}return b},h)}return d.getInitialState=c,d}var oO=Symbol.for("rtk-slice-createasyncthunk");function uO(t,r){return`${t}/${r}`}function cO({creators:t}={}){const r=t?.asyncThunk?.[oO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(xr(11));const d=(typeof s.reducers=="function"?s.reducers(dO()):s.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(S,H){const x=typeof S=="string"?S:S.type;if(!x)throw new Error(xr(12));if(x in m.sliceCaseReducersByType)throw new Error(xr(13));return m.sliceCaseReducersByType[x]=H,p},addMatcher(S,H){return m.sliceMatchers.push({matcher:S,reducer:H}),p},exposeAction(S,H){return m.actionCreators[S]=H,p},exposeCaseReducer(S,H){return m.sliceCaseReducersByName[S]=H,p}};h.forEach(S=>{const H=d[S],x={reducerName:S,type:uO(u,S),createNotation:typeof s.reducers=="function"};mO(H)?gO(x,H,p,r):hO(x,H,p)});function b(){const[S={},H=[],x=void 0]=typeof s.extraReducers=="function"?wv(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return lO(s.initialState,W=>{for(let ae in Z)W.addCase(ae,Z[ae]);for(let ae of m.sliceMatchers)W.addMatcher(ae.matcher,ae.reducer);for(let ae of H)W.addMatcher(ae.matcher,ae.reducer);x&&W.addDefaultCase(x)})}const E=S=>S,A=new Map,U=new WeakMap;let R;function q(S,H){return R||(R=b()),R(S,H)}function G(){return R||(R=b()),R.getInitialState()}function _(S,H=!1){function x(W){let ae=W[S];return typeof ae>"u"&&H&&(ae=Bo(U,x,G)),ae}function Z(W=E){const ae=Bo(A,H,()=>new WeakMap);return Bo(ae,W,()=>{const ye={};for(const[Ee,se]of Object.entries(s.selectors??{}))ye[Ee]=fO(se,W,()=>Bo(U,W,G),H);return ye})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(x)},selectSlice:x}}const C={name:u,reducer:q,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:G,..._(c),injectInto(S,{reducerPath:H,...x}={}){const Z=H??c;return S.inject({reducerPath:Z,reducer:q},x),{...C,..._(Z,!0)}}};return C}}function fO(t,r,i,s){function u(c,...d){let h=r(c);return typeof h>"u"&&s&&(h=i()),t(h,...d)}return u.unwrapped=t,u}var Ih=cO();function dO(){function t(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return t.withTypes=()=>t,{reducer(r){return Object.assign({[r.name](...i){return r(...i)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:i}},asyncThunk:t}}function hO({type:t,reducerName:r,createNotation:i},s,u){let c,d;if("reducer"in s){if(i&&!pO(s))throw new Error(xr(17));c=s.reducer,d=s.prepare}else c=s;u.addCase(t,c).exposeCaseReducer(r,c).exposeAction(r,d?ob(t,d):ob(t))}function mO(t){return t._reducerDefinitionType==="asyncThunk"}function pO(t){return t._reducerDefinitionType==="reducerWithPrepare"}function gO({type:t,reducerName:r},i,s,u){if(!u)throw new Error(xr(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:p,options:b}=i,E=u(t,c,b);s.exposeAction(r,E),d&&s.addCase(E.fulfilled,d),h&&s.addCase(E.pending,h),m&&s.addCase(E.rejected,m),p&&s.addMatcher(E.settled,p),s.exposeCaseReducer(r,{fulfilled:d||Uo,pending:h||Uo,rejected:m||Uo,settled:p||Uo})}function Uo(){}function xr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}const yO={formValues:{}},Cv=Ih({name:"start-screen",initialState:yO,reducers:{showStartScreen(t){t.startScreenStatus="VISIBLE",t.formValues={}},startChat(t,r){t.startScreenStatus="HIDDEN",t.formValues=r.payload.formValues},startAuthenticatedChat(t,r){t.startScreenStatus="HIDDEN",t.loginToken=r.payload.loginToken,t.loginRequestToken=void 0},requestLogin(t,r){t.loginRequestToken=r.payload.loginRequestToken,t.formValues=r.payload.formValues},loginWindowClosed(t){t.loginRequestToken=void 0}}}),{startChat:bO,startAuthenticatedChat:vO,showStartScreen:_O,requestLogin:EO,loginWindowClosed:SO}=Cv.actions,TO=Cv.reducer,Nv="RESET_CHAT_STATE",Mv="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",Dv="SHOW_CONVERSATION_RATING_OVERLAY",Lv="HIDE_CONVERSATION_RATING_OVERLAY",Bv=()=>({type:dv}),AO=()=>({type:Nv}),Uv=()=>({type:Mv}),zh=(t,r=void 0)=>({type:Dv,payload:{opener:t,defaultRating:r}}),xO=()=>({type:Lv}),fb=(t,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Lh,payload:{chunkId:i}}),db(t,c,r,i,!1,s),db(t,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Dh})}},db=(t,r,i,s,u,c)=>{const d=`/${t}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(d,{headers:{"x-bubble-chat-session-id":r}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:s,highlighted:u};c({type:cv,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:Dh,payload:{highlighted:u}})})},OO=()=>({type:Bh}),Gh="CONNECT",kh="CONNECTING",qh="CONNECTED",Fh="DISCONNECTED",Vh="RECONNECTED",Ph="RESTORE_SESSION_ID",gu="START",yu="CLEAR_SESSION_ID",RO=[Gh,kh,qh,Fh,Vh,Ph],wO=(t,r)=>({type:Gh,clientName:t,querystrings:r}),CO=t=>({type:Ph,sessionId:t}),NO=()=>({type:kh}),MO=()=>({type:qh}),DO=()=>({type:Fh}),LO=()=>({type:Vh}),jv=(t,r)=>(i,s)=>{const u=s().connection,{formValues:c,loginToken:d}=s().startScreen;let h=u.sessionId;h===void 0&&(h=Wo());let m=u.userId;if(m===void 0){const p=Lo.get("bubble-chat-user-id")||Lo.get("bubble-chat-userId")||Lo.get("bf-webclient-userId");m=p||Wo(),Lo.set("bubble-chat-user-id",m)}i({type:gu,payload:{sessionId:h,userId:m,clientName:t,loginToken:d,querystrings:{...r,...c}}})},bu=(t,r)=>(i,s)=>{const u=s().connection.sessionId||"";if(i(BO(u)),i(AO()),s().settings.enableStartScreen)i(_O());else return i(jv(t,r))},BO=t=>({type:yu,payload:{sessionId:t}}),Ze=()=>{const t=cu();return i=>{const s=t.formatMessage({id:i});return s===i?void 0:s}};var Ia=(t=>(t[t.CONNECTING=0]="CONNECTING",t[t.CONNECTED=1]="CONNECTED",t[t.RECONNECTED=2]="RECONNECTED",t[t.DISCONNECTED=3]="DISCONNECTED",t))(Ia||{}),au=(t=>(t.GUEST="GUEST",t.BOT="BOT",t.PERSON="PERSON",t))(au||{});const UO="_container_q2uun_1",jO="_chatcontent_q2uun_6",HO="_accessabilityHidden_q2uun_12",cd={container:UO,chatcontent:jO,accessabilityHidden:HO},IO="_messageContainer_ofi0g_1",zO="_messages_ofi0g_12",hb={messageContainer:IO,messages:zO};function Ha(){return Ha=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},Ha.apply(this,arguments)}const GO=["children","options"],kO={footnoteReference:"7"},mb=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,r)=>(t[r.toLowerCase()]=r,t),{class:"className",for:"htmlFor"}),pb={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},qO=["style","script","pre"],FO=["src","href","data","formAction","srcDoc","action"],VO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,PO=/mailto:/i,YO=/\n{2,}$/,gb=/^(\s*>[\s\S]*?)(?=\n\n|$)/,XO=/^ *> ?/gm,ZO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,QO=/^ {2,}\n/,KO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,yb=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,bb=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,$O=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,WO=/^(?:\n *)*\n/,JO=/\r\n?/g,eR=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,tR=/^\[\^([^\]]+)]/,nR=/\f/g,rR=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,aR=/^\s*?\[(x|\s)\]/,vb=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,_b=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Eb=/^([^\n]+)\n *(=|-){3,} *\n/,fd=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,iR=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Sb=/^<!--[\s\S]*?(?:-->)/,sR=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,dd=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,lR=/^\{.*\}$/,oR=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,uR=/^<([^ >]+@[^ >]+)>/,cR=/^<([^ >]+:\/[^ >]+)>/,fR=/-([a-z])?/gi,Tb=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,dR=/^[^\n]+(?: \n|\n{2,})/,hR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,mR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,pR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,gR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,yR=/\t/g,bR=/(^ *\||\| *$)/g,vR=/^ *:-+: *$/,_R=/^ *:-+ *$/,ER=/^ *-+: *$/,vu=t=>`(?=[\\s\\S]+?\\1${t?"\\1":""})`,_u="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",SR=RegExp(`^([*_])\\1${vu(1)}${_u}\\1\\1(?!\\1)`),TR=RegExp(`^([*_])${vu(0)}${_u}\\1(?!\\1)`),AR=RegExp(`^(==)${vu(0)}${_u}\\1`),xR=RegExp(`^(~~)${vu(0)}${_u}\\1`),OR=/^(:[a-zA-Z0-9-_]+:)/,RR=/^\\([^0-9A-Za-z\s])/,wR=/\\([^0-9A-Za-z\s])/g,CR=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,NR=/^\n+/,MR=/^([ \t]*)/,DR=/(?:^|\n)( *)$/,Yh="(?:\\d+\\.)",Xh="(?:[*+-])";function Hv(t){return"( *)("+(t===1?Yh:Xh)+") +"}const Iv=Hv(1),zv=Hv(2);function Gv(t){return RegExp("^"+(t===1?Iv:zv))}const LR=Gv(1),BR=Gv(2);function kv(t){return RegExp("^"+(t===1?Iv:zv)+"[^\\n]*(?:\\n(?!\\1"+(t===1?Yh:Xh)+" )[^\\n]*)*(\\n|$)","gm")}const UR=kv(1),jR=kv(2);function qv(t){const r=t===1?Yh:Xh;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const Fv=qv(1),Vv=qv(2);function Ab(t,r){const i=r===1,s=i?Fv:Vv,u=i?UR:jR,c=i?LR:BR;return{t:d=>c.test(d),o:Ci(function(d,h){const m=DR.exec(h.prevCapture);return m&&(h.list||!h.inline&&!h.simple)?s.exec(d=m[1]+d):null}),i:1,u(d,h,m){const p=i?+d[2]:void 0,b=d[0].replace(YO,`
|
|
93
|
+
*/var fy;function xA(){if(fy)return Be;fy=1;var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,i=t?Symbol.for("react.portal"):60106,s=t?Symbol.for("react.fragment"):60107,u=t?Symbol.for("react.strict_mode"):60108,c=t?Symbol.for("react.profiler"):60114,d=t?Symbol.for("react.provider"):60109,h=t?Symbol.for("react.context"):60110,m=t?Symbol.for("react.async_mode"):60111,p=t?Symbol.for("react.concurrent_mode"):60111,b=t?Symbol.for("react.forward_ref"):60112,E=t?Symbol.for("react.suspense"):60113,A=t?Symbol.for("react.suspense_list"):60120,U=t?Symbol.for("react.memo"):60115,R=t?Symbol.for("react.lazy"):60116,q=t?Symbol.for("react.block"):60121,G=t?Symbol.for("react.fundamental"):60117,_=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function S(x){if(typeof x=="object"&&x!==null){var Z=x.$$typeof;switch(Z){case r:switch(x=x.type,x){case m:case p:case s:case c:case u:case E:return x;default:switch(x=x&&x.$$typeof,x){case h:case b:case R:case U:case d:return x;default:return Z}}case i:return Z}}}function H(x){return S(x)===p}return Be.AsyncMode=m,Be.ConcurrentMode=p,Be.ContextConsumer=h,Be.ContextProvider=d,Be.Element=r,Be.ForwardRef=b,Be.Fragment=s,Be.Lazy=R,Be.Memo=U,Be.Portal=i,Be.Profiler=c,Be.StrictMode=u,Be.Suspense=E,Be.isAsyncMode=function(x){return H(x)||S(x)===m},Be.isConcurrentMode=H,Be.isContextConsumer=function(x){return S(x)===h},Be.isContextProvider=function(x){return S(x)===d},Be.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===r},Be.isForwardRef=function(x){return S(x)===b},Be.isFragment=function(x){return S(x)===s},Be.isLazy=function(x){return S(x)===R},Be.isMemo=function(x){return S(x)===U},Be.isPortal=function(x){return S(x)===i},Be.isProfiler=function(x){return S(x)===c},Be.isStrictMode=function(x){return S(x)===u},Be.isSuspense=function(x){return S(x)===E},Be.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===s||x===p||x===c||x===u||x===E||x===A||typeof x=="object"&&x!==null&&(x.$$typeof===R||x.$$typeof===U||x.$$typeof===d||x.$$typeof===h||x.$$typeof===b||x.$$typeof===G||x.$$typeof===_||x.$$typeof===C||x.$$typeof===q)},Be.typeOf=S,Be}var dy;function OA(){return dy||(dy=1,Xf.exports=xA()),Xf.exports}var Zf,hy;function RA(){if(hy)return Zf;hy=1;var t=OA(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};c[t.ForwardRef]=s,c[t.Memo]=u;function d(R){return t.isMemo(R)?u:c[R.$$typeof]||r}var h=Object.defineProperty,m=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,b=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,A=Object.prototype;function U(R,q,G){if(typeof q!="string"){if(A){var _=E(q);_&&_!==A&&U(R,_,G)}var C=m(q);p&&(C=C.concat(p(q)));for(var S=d(R),H=d(q),x=0;x<C.length;++x){var Z=C[x];if(!i[Z]&&!(G&&G[Z])&&!(H&&H[Z])&&!(S&&S[Z])){var W=b(q,Z);try{h(R,Z,W)}catch{}}}}return R}return Zf=U,Zf}RA();var Sh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=B.createContext(null)):B.createContext(null);Sh.Consumer;var wA=Sh.Provider,CA=wA,NA=Sh;function cu(){var t=B.useContext(NA);return Q1(t),t}var Wd;(function(t){t.formatDate="FormattedDate",t.formatTime="FormattedTime",t.formatNumber="FormattedNumber",t.formatList="FormattedList",t.formatDisplayName="FormattedDisplayName"})(Wd||(Wd={}));var Jd;(function(t){t.formatDate="FormattedDateParts",t.formatTime="FormattedTimeParts",t.formatNumber="FormattedNumberParts",t.formatList="FormattedListParts"})(Jd||(Jd={}));function $1(t){var r=function(i){var s=cu(),u=i.value,c=i.children,d=uu(i,["value","children"]),h=typeof u=="string"?new Date(u||0):u,m=t==="formatDate"?s.formatDateToParts(h,d):s.formatTimeToParts(h,d);return c(m)};return r.displayName=Jd[t],r}function rl(t){var r=function(i){var s=cu(),u=i.value,c=i.children,d=uu(i,["value","children"]),h=s[t](u,d);if(typeof c=="function")return c(h);var m=s.textComponent||B.Fragment;return B.createElement(m,null,h)};return r.displayName=Wd[t],r}function W1(t){return t&&Object.keys(t).reduce(function(r,i){var s=t[i];return r[i]=F1(s)?TA(s):s,r},{})}var my=function(t,r,i,s){for(var u=[],c=4;c<arguments.length;c++)u[c-4]=arguments[c];var d=W1(s),h=$d.apply(void 0,Wn([t,r,i,d],u,!1));return Array.isArray(h)?SA(h):h},py=function(t,r){var i=t.defaultRichTextElements,s=uu(t,["defaultRichTextElements"]),u=W1(i),c=bA(ie(ie(ie({},K1),s),{defaultRichTextElements:u}),r),d={locale:c.locale,timeZone:c.timeZone,fallbackOnEmptyString:c.fallbackOnEmptyString,formats:c.formats,defaultLocale:c.defaultLocale,defaultFormats:c.defaultFormats,messages:c.messages,onError:c.onError,defaultRichTextElements:u};return ie(ie({},c),{formatMessage:my.bind(null,d,c.formatters),$t:my.bind(null,d,c.formatters)})};function Qf(t){return{locale:t.locale,timeZone:t.timeZone,fallbackOnEmptyString:t.fallbackOnEmptyString,formats:t.formats,textComponent:t.textComponent,messages:t.messages,defaultLocale:t.defaultLocale,defaultFormats:t.defaultFormats,onError:t.onError,onWarn:t.onWarn,wrapRichTextChunksInFragment:t.wrapRichTextChunksInFragment,defaultRichTextElements:t.defaultRichTextElements}}var MA=(function(t){An(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;return i.cache=Y1(),i.state={cache:i.cache,intl:py(Qf(i.props),i.cache),prevConfig:Qf(i.props)},i}return r.getDerivedStateFromProps=function(i,s){var u=s.prevConfig,c=s.cache,d=Qf(i);return AA(u,d)?null:{intl:py(d,c),prevConfig:d}},r.prototype.render=function(){return Q1(this.state.intl),B.createElement(CA,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=K1,r})(B.PureComponent);rl("formatDate");rl("formatTime");rl("formatNumber");rl("formatList");rl("formatDisplayName");$1("formatDate");$1("formatTime");const DA="_app_1rj0t_1",LA={app:DA},Nr=QS,st=WS,J1="%[a-f0-9]{2}",gy=new RegExp("("+J1+")|([^%]+?)","gi"),yy=new RegExp("("+J1+")+","gi");function eh(t,r){try{return[decodeURIComponent(t.join(""))]}catch{}if(t.length===1)return t;r=r||1;const i=t.slice(0,r),s=t.slice(r);return Array.prototype.concat.call([],eh(i),eh(s))}function BA(t){try{return decodeURIComponent(t)}catch{let r=t.match(gy)||[];for(let i=1;i<r.length;i++)t=eh(r,i).join(""),r=t.match(gy)||[];return t}}function UA(t){const r={"%FE%FF":"��","%FF%FE":"��"};let i=yy.exec(t);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=BA(i[0]);u!==i[0]&&(r[i[0]]=u)}i=yy.exec(t)}r["%C2"]="�";const s=Object.keys(r);for(const u of s)t=t.replace(new RegExp(u,"g"),r[u]);return t}function jA(t){if(typeof t!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return decodeURIComponent(t)}catch{return UA(t)}}function HA(t,r){const i={};if(Array.isArray(r))for(const s of r){const u=Object.getOwnPropertyDescriptor(t,s);u?.enumerable&&Object.defineProperty(i,s,u)}else for(const s of Reflect.ownKeys(t)){const u=Object.getOwnPropertyDescriptor(t,s);if(u.enumerable){const c=t[s];r(s,c,t)&&Object.defineProperty(i,s,u)}}return i}function ev(t,r){if(!(typeof t=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t===""||r==="")return[];const i=t.indexOf(r);return i===-1?[]:[t.slice(0,i),t.slice(i+r.length)]}const IA=t=>t==null,zA=t=>encodeURIComponent(t).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),th=Symbol("encodeFragmentIdentifier");function GA(t){switch(t.arrayFormat){case"index":return r=>(i,s)=>{const u=i.length;return s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[",u,"]"].join("")]:[...i,[ft(r,t),"[",ft(u,t),"]=",ft(s,t)].join("")]};case"bracket":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),"[]"].join("")]:[...i,[ft(r,t),"[]=",ft(s,t)].join("")];case"colon-list-separator":return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,[ft(r,t),":list="].join("")]:[...i,[ft(r,t),":list=",ft(s,t)].join("")];case"comma":case"separator":case"bracket-separator":{const r=t.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(s,u)=>u===void 0||t.skipNull&&u===null||t.skipEmptyString&&u===""?s:(u=u===null?"":u,s.length===0?[[ft(i,t),r,ft(u,t)].join("")]:[[s,ft(u,t)].join(t.arrayFormatSeparator)])}default:return r=>(i,s)=>s===void 0||t.skipNull&&s===null||t.skipEmptyString&&s===""?i:s===null?[...i,ft(r,t)]:[...i,[ft(r,t),"=",ft(s,t)].join("")]}}function kA(t){let r;switch(t.arrayFormat){case"index":return(i,s,u)=>{if(r=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!r){u[i]=s;return}u[i]===void 0&&(u[i]={}),u[i][r[1]]=s};case"bracket":return(i,s,u)=>{if(r=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"colon-list-separator":return(i,s,u)=>{if(r=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!r){u[i]=s;return}if(u[i]===void 0){u[i]=[s];return}u[i]=[...u[i],s]};case"comma":case"separator":return(i,s,u)=>{const c=typeof s=="string"&&s.includes(t.arrayFormatSeparator),d=typeof s=="string"&&!c&&Ar(s,t).includes(t.arrayFormatSeparator);s=d?Ar(s,t):s;const h=c||d?s.split(t.arrayFormatSeparator).map(m=>Ar(m,t)):s===null?s:Ar(s,t);u[i]=h};case"bracket-separator":return(i,s,u)=>{const c=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!c){u[i]=s&&Ar(s,t);return}const d=s===null?[]:Ar(s,t).split(t.arrayFormatSeparator);if(u[i]===void 0){u[i]=d;return}u[i]=[...u[i],...d]};default:return(i,s,u)=>{if(u[i]===void 0){u[i]=s;return}u[i]=[...[u[i]].flat(),s]}}}function tv(t){if(typeof t!="string"||t.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function ft(t,r){return r.encode?r.strict?zA(t):encodeURIComponent(t):t}function Ar(t,r){return r.decode?jA(t):t}function nv(t){return Array.isArray(t)?t.sort():typeof t=="object"?nv(Object.keys(t)).sort((r,i)=>Number(r)-Number(i)).map(r=>t[r]):t}function rv(t){const r=t.indexOf("#");return r!==-1&&(t=t.slice(0,r)),t}function qA(t){let r="";const i=t.indexOf("#");return i!==-1&&(r=t.slice(i)),r}function by(t,r,i){return i==="string"&&typeof t=="string"?t:typeof i=="function"&&typeof t=="string"?i(t):i==="boolean"&&t===null?!0:i==="boolean"&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":i==="boolean"&&t!==null&&(t.toLowerCase()==="1"||t.toLowerCase()==="0")?t.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof t=="string"?[t]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?[Number(t)]:i==="number"&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):r.parseBooleans&&t!==null&&(t.toLowerCase()==="true"||t.toLowerCase()==="false")?t.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(t))&&typeof t=="string"&&t.trim()!==""?Number(t):t}function Th(t){t=rv(t);const r=t.indexOf("?");return r===-1?"":t.slice(r+1)}function Ah(t,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},tv(r.arrayFormatSeparator);const i=kA(r),s=Object.create(null);if(typeof t!="string"||(t=t.trim().replace(/^[?#&]/,""),!t))return s;for(const u of t.split("&")){if(u==="")continue;const c=r.decode?u.replaceAll("+"," "):u;let[d,h]=ev(c,"=");d===void 0&&(d=c),h=h===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?h:Ar(h,r),i(Ar(d,r),h,s)}for(const[u,c]of Object.entries(s))if(typeof c=="object"&&c!==null&&r.types[u]!=="string")for(const[d,h]of Object.entries(c)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;c[d]=by(h,r,m)}else typeof c=="object"&&c!==null&&r.types[u]==="string"?s[u]=Object.values(c).join(r.arrayFormatSeparator):s[u]=by(c,r,r.types[u]);return r.sort===!1?s:(r.sort===!0?Object.keys(s).sort():Object.keys(s).sort(r.sort)).reduce((u,c)=>{const d=s[c];return u[c]=d&&typeof d=="object"&&!Array.isArray(d)?nv(d):d,u},Object.create(null))}function av(t,r){if(!t)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},tv(r.arrayFormatSeparator);const i=d=>r.skipNull&&IA(t[d])||r.skipEmptyString&&t[d]==="",s=GA(r),u={};for(const[d,h]of Object.entries(t))i(d)||(u[d]=h);const c=Object.keys(u);return r.sort!==!1&&c.sort(r.sort),c.map(d=>{const h=t[d];return h===void 0?"":h===null?ft(d,r):Array.isArray(h)?h.length===0&&r.arrayFormat==="bracket-separator"?ft(d,r)+"[]":h.reduce(s(d),[]).join("&"):ft(d,r)+"="+ft(h,r)}).filter(d=>d.length>0).join("&")}function iv(t,r){r={decode:!0,...r};let[i,s]=ev(t,"#");return i===void 0&&(i=t),{url:i?.split("?")?.[0]??"",query:Ah(Th(t),r),...r&&r.parseFragmentIdentifier&&s?{fragmentIdentifier:Ar(s,r)}:{}}}function sv(t,r){r={encode:!0,strict:!0,[th]:!0,...r};const i=rv(t.url).split("?")[0]||"",s=Th(t.url),u={...Ah(s,{sort:!1,...r}),...t.query};let c=av(u,r);c&&=`?${c}`;let d=qA(t.url);if(typeof t.fragmentIdentifier=="string"){const h=new URL(i);h.hash=t.fragmentIdentifier,d=r[th]?h.hash:`#${t.fragmentIdentifier}`}return`${i}${c}${d}`}function lv(t,r,i){i={parseFragmentIdentifier:!0,[th]:!1,...i};const{url:s,query:u,fragmentIdentifier:c}=iv(t,i);return sv({url:s,query:HA(u,r),fragmentIdentifier:c},i)}function FA(t,r,i){const s=Array.isArray(r)?u=>!r.includes(u):(u,c)=>!r(u,c);return lv(t,s,i)}const fu=Object.freeze(Object.defineProperty({__proto__:null,exclude:FA,extract:Th,parse:Ah,parseUrl:iv,pick:lv,stringify:av,stringifyUrl:sv},Symbol.toStringTag,{value:"Module"}));var Ln={},Bn={},Ie={},_o={},pe={},vy;function fn(){return vy||(vy=1,Object.defineProperty(pe,"__esModule",{value:!0}),pe.GUEST_LOCALE_CHANGED=pe.DRAWER_CLOSE=pe.DRAWER_OPEN=pe.CONVERSATION_RATING_FROM_GUEST=pe.TRANSCRIPT_ITEM_GUEST_REACTION=pe.TRANSCRIPT_MAIL_REQUEST=pe.INBOX_CONNECT_REQUEST=pe.RESTART_CHAT_REQUEST=pe.EVENT_TO_GUEST=pe.NLU_REQUEST_EVENT=pe.EXPERTS_DISCONNECTED=pe.EXPERTS_DISCONNECT_REQUEST=pe.EXPERTS_CONNECTED=pe.EXPERTS_CONNECT_REQUEST=pe.MESSAGE_TO_GUEST=pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=pe.MESSAGE_FROM_GUEST=pe.GUEST_FEEDBACK_RESPONSE=pe.GUEST_DISCONNECTED=pe.GUEST_CONNECTED=pe.TYPING_OFF=pe.TYPING_ON=void 0,pe.TYPING_ON="core.typing.on",pe.TYPING_OFF="core.typing.off",pe.GUEST_CONNECTED="core.guest.connected",pe.GUEST_DISCONNECTED="core.guest.disconnected",pe.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",pe.MESSAGE_FROM_GUEST="core.message.from.guest",pe.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",pe.MESSAGE_TO_GUEST="core.message.to.guest",pe.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",pe.EXPERTS_CONNECTED="core.experts.connected",pe.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",pe.EXPERTS_DISCONNECTED="core.experts.disconnected",pe.NLU_REQUEST_EVENT="core.nlu.request.event",pe.EVENT_TO_GUEST="core.event.to.guest",pe.RESTART_CHAT_REQUEST="core.chat.restart.request",pe.INBOX_CONNECT_REQUEST="core.inbox.connect.request",pe.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",pe.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",pe.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",pe.DRAWER_OPEN="core.drawer.open",pe.DRAWER_CLOSE="core.drawer.close",pe.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),pe}var _y;function VA(){if(_y)return _o;_y=1,Object.defineProperty(_o,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.DRAWER_CLOSE});return _o.default=r,_o}var Eo={},Ey;function PA(){if(Ey)return Eo;Ey=1,Object.defineProperty(Eo,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:s}});return Eo.default=r,Eo}var So={},Sy;function YA(){if(Sy)return So;Sy=1,Object.defineProperty(So,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_CONNECTED,payload:{sessionId:i}});return So.default=r,So}var To={},Ty;function XA(){if(Ty)return To;Ty=1,Object.defineProperty(To,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.GUEST_DISCONNECTED,payload:{sessionId:i}});return To.default=r,To}var Ao={},Ay;function ZA(){if(Ay)return Ao;Ay=1,Object.defineProperty(Ao,"__esModule",{value:!0});const t=fn(),r=(i,s)=>({type:t.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:s}});return Ao.default=r,Ao}var xo={},xy;function QA(){if(xy)return xo;xy=1,Object.defineProperty(xo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return xo.default=r,xo}var Oo={},$e={},Oy;function xh(){if(Oy)return $e;Oy=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.getStringRepresentationFromMessage=$e.MessageTypeEnum=$e.AudioMessage=$e.FileMessage=$e.ImageMessage=$e.VideoMessage=$e.MarkdownMessage=$e.DetailMessage=$e.TextMessage=$e.Message=void 0;class t{type;sender;sources;quickReplies;constructor(E,A,U=[],R=[]){this.type=E,this.sender=A,this.sources=U,this.quickReplies=R}addQuickReply(E,A){this.quickReplies.push({label:E,payload:A})}}$e.Message=t;class r extends t{text;constructor(E,A,U=[],R=[]){super(m.TEXT,A,U,R),this.text=E}}$e.TextMessage=r;class i extends t{title;text;imageUrl;itemUrl;buttons;constructor(E,A){super(m.DETAIL,A),this.title=E,this.text="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(E){this.imageUrl=E}setItemUrl(E){this.itemUrl=E}setText(E){this.text=E}addButton(E){this.buttons.push(E)}}$e.DetailMessage=i;class s extends t{markdown;constructor(E,A,U=[],R=[]){super(m.MARKDOWN,A,U,R),this.markdown=E}}$e.MarkdownMessage=s;class u extends t{url;constructor(E,A){super(m.VIDEO,A),this.url=E}}$e.VideoMessage=u;class c extends t{url;constructor(E,A){super(m.IMAGE,A),this.url=E}}$e.ImageMessage=c;class d extends t{url;constructor(E,A){super(m.FILE,A),this.url=E}}$e.FileMessage=d;class h extends t{url;constructor(E,A){super(m.AUDIO,A),this.url=E}}$e.AudioMessage=h;var m;(function(b){b.TEXT="TEXT",b.DETAIL="DETAIL",b.MARKDOWN="MARKDOWN",b.VIDEO="VIDEO",b.IMAGE="IMAGE",b.FILE="FILE",b.AUDIO="AUDIO"})(m||($e.MessageTypeEnum=m={}));const p=b=>{switch(b.type){case m.TEXT:return b.text;case m.DETAIL:return`${b.title}`;case m.MARKDOWN:return b.markdown;case m.VIDEO:return`Video Url: ${b.url}`;case m.IMAGE:return`Image Url: ${b.url}`;case m.FILE:return`File Url: ${b.url}`;case m.AUDIO:return`Audio Url: ${b.url}`;default:throw new Error("Unknown message type "+b.type)}};return $e.getStringRepresentationFromMessage=p,$e}var sn={},Ry;function Oh(){if(Ry)return sn;Ry=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.UserType=sn.PersonUser=sn.GuestUser=sn.BotUser=sn.User=void 0;class t{type;id;name;avatar;constructor(d,h,m,p){this.type=d,this.id=h,this.name=m,this.avatar=p}}sn.User=t;class r extends t{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}sn.BotUser=r;class i extends t{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}sn.GuestUser=i;class s extends t{constructor(d,h,m){super(u.PERSON,d,h,m)}}sn.PersonUser=s;var u;return(function(c){c.GUEST="GUEST",c.BOT="BOT",c.PERSON="PERSON"})(u||(sn.UserType=u={})),sn}var wy;function KA(){if(wy)return Oo;wy=1,Object.defineProperty(Oo,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=u=>{const c=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:c}};return Oo.default=s,Oo}var Ro={},Cy;function $A(){if(Cy)return Ro;Cy=1,Object.defineProperty(Ro,"__esModule",{value:!0});const t=xh(),r=Oh(),i=fn(),s=(u,c={})=>{const d=new t.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:d,payload:c}};return Ro.default=s,Ro}var wo={},Ny;function WA(){if(Ny)return wo;Ny=1,Object.defineProperty(wo,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.NLU_REQUEST_EVENT,event:i});return wo.default=r,wo}var Co={},My;function JA(){if(My)return Co;My=1,Object.defineProperty(Co,"__esModule",{value:!0});const t=fn(),r=()=>({type:t.RESTART_CHAT_REQUEST});return Co.default=r,Co}var No={},Dy;function ex(){if(Dy)return No;Dy=1,Object.defineProperty(No,"__esModule",{value:!0});const t=fn(),r=i=>({type:t.MESSAGE_TO_GUEST,message:i});return No.default=r,No}var Mo={},Ly;function tx(){if(Ly)return Mo;Ly=1,Object.defineProperty(Mo,"__esModule",{value:!0});const t=fn(),r=(i,s,u=null,c=null)=>({type:t.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:s,category:u,comment:c}});return Mo.default=r,Mo}var By;function nx(){if(By)return Ie;By=1;var t=Ie&&Ie.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.transcriptItemGuestReaction=Ie.sendMessageToGuest=Ie.restartChatRequest=Ie.requestNLUEvent=Ie.receiveTextMessageWithoutAnalysisFromGuest=Ie.receiveTextMessageFromGuest=Ie.openDrawer=Ie.guestLocaleChanged=Ie.guestDisconnected=Ie.guestConnected=Ie.feedbackFromGuestResponse=Ie.closeDrawer=void 0;const r=t(VA());Ie.closeDrawer=r.default;const i=t(PA());Ie.feedbackFromGuestResponse=i.default;const s=t(YA());Ie.guestConnected=s.default;const u=t(XA());Ie.guestDisconnected=u.default;const c=t(ZA());Ie.guestLocaleChanged=c.default;const d=t(QA());Ie.openDrawer=d.default;const h=t(KA());Ie.receiveTextMessageFromGuest=h.default;const m=t($A());Ie.receiveTextMessageWithoutAnalysisFromGuest=m.default;const p=t(WA());Ie.requestNLUEvent=p.default;const b=t(JA());Ie.restartChatRequest=b.default;const E=t(ex());Ie.sendMessageToGuest=E.default;const A=t(tx());return Ie.transcriptItemGuestReaction=A.default,Ie}var Kf={},Uy;function rx(){return Uy||(Uy=1,Object.defineProperty(Kf,"__esModule",{value:!0})),Kf}var jy;function ax(){return jy||(jy=1,(function(t){var r=Bn&&Bn.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Bn&&Bn.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),s=Bn&&Bn.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}})(),u=Bn&&Bn.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTypes=t.Actions=void 0,t.Actions=s(nx()),t.ActionTypes=s(fn()),u(rx(),t)})(Bn)),Bn}var ln={},$f={},Hy;function ix(){return Hy||(Hy=1,Object.defineProperty($f,"__esModule",{value:!0})),$f}var Us={},Iy;function sx(){if(Iy)return Us;Iy=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.NullableKnowledgeBaseAdapter=void 0;class t{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,s){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,s,u){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,s){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryByUriAlias(i,s){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,s){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,s){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,s,u,c){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,s,u){throw new Error("Method not implemented.")}async setIndexingStatus(i,s){throw new Error("Method not implemented.")}async subscribeToReindex(i,s){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,s){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}}return Us.NullableKnowledgeBaseAdapter=t,Us}var zy;function lx(){if(zy)return ln;zy=1;var t=ln&&ln.__createBinding||(Object.create?(function(u,c,d,h){h===void 0&&(h=d);var m=Object.getOwnPropertyDescriptor(c,d);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[d]}}),Object.defineProperty(u,h,m)}):(function(u,c,d,h){h===void 0&&(h=d),u[h]=c[d]})),r=ln&&ln.__setModuleDefault||(Object.create?(function(u,c){Object.defineProperty(u,"default",{enumerable:!0,value:c})}):function(u,c){u.default=c}),i=ln&&ln.__importStar||(function(){var u=function(c){return u=Object.getOwnPropertyNames||function(d){var h=[];for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(h[h.length]=m);return h},u(c)};return function(c){if(c&&c.__esModule)return c;var d={};if(c!=null)for(var h=u(c),m=0;m<h.length;m++)h[m]!=="default"&&t(d,c,h[m]);return r(d,c),d}})();Object.defineProperty(ln,"__esModule",{value:!0}),ln.NullableCmsAdapter=ln.KnowledgeBase=void 0,ln.KnowledgeBase=i(ix());const s=sx();return ln.NullableCmsAdapter={knowledgeBase:new s.NullableKnowledgeBaseAdapter},ln}var Ma={},Wf={},Gy;function ox(){return Gy||(Gy=1,Object.defineProperty(Wf,"__esModule",{value:!0})),Wf}var Jf={},ky;function ux(){return ky||(ky=1,Object.defineProperty(Jf,"__esModule",{value:!0})),Jf}var ed={},qy;function cx(){return qy||(qy=1,Object.defineProperty(ed,"__esModule",{value:!0})),ed}var td={},Fy;function fx(){return Fy||(Fy=1,Object.defineProperty(td,"__esModule",{value:!0})),td}var js={},Vy;function dx(){if(Vy)return js;Vy=1,Object.defineProperty(js,"__esModule",{value:!0}),js.checkMiddlewareCondition=void 0;const t=async(r,i,s)=>(Array.isArray(r)?r:[r]).reduce(async(c,d)=>await c?await d(i,s):!1,Promise.resolve(!0));return js.checkMiddlewareCondition=t,js}var nd={},Py;function hx(){return Py||(Py=1,Object.defineProperty(nd,"__esModule",{value:!0})),nd}var rd={},Yy;function mx(){return Yy||(Yy=1,Object.defineProperty(rd,"__esModule",{value:!0})),rd}var ad={},Xy;function px(){return Xy||(Xy=1,Object.defineProperty(ad,"__esModule",{value:!0})),ad}var Zy;function gx(){return Zy||(Zy=1,(function(t){var r=Ma&&Ma.__createBinding||(Object.create?(function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}):(function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]})),i=Ma&&Ma.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(ox(),t),i(ux(),t),i(cx(),t),i(fx(),t),i(dx(),t),i(hx(),t),i(mx(),t),i(px(),t)})(Ma)),Ma}var Da={},Un={},Qy;function yx(){if(Qy)return Un;Qy=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.ButtonTypeEnum=Un.PostbackButton=Un.UrlButton=Un.Button=void 0;class t{title;type;constructor(c,d){this.title=c,this.type=d}}Un.Button=t;class r extends t{url;constructor(c,d){super(c,s.WEB_URL),this.url=d}}Un.UrlButton=r;class i extends t{payload;constructor(c,d){super(c,s.POSTBACK),this.payload=d}}Un.PostbackButton=i;var s;return(function(u){u.WEB_URL="web_url",u.POSTBACK="postback"})(s||(Un.ButtonTypeEnum=s={})),Un}var id={},Ky;function bx(){return Ky||(Ky=1,Object.defineProperty(id,"__esModule",{value:!0})),id}var Hs={},$y;function vx(){if($y)return Hs;$y=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.SatisfactionEnum=void 0;var t;return(function(r){r.GOOD="GOOD",r.BAD="BAD"})(t||(Hs.SatisfactionEnum=t={})),Hs}var Wy;function Jy(){return Wy||(Wy=1,(function(t){var r=Da&&Da.__createBinding||(Object.create?(function(s,u,c,d){d===void 0&&(d=c);var h=Object.getOwnPropertyDescriptor(u,c);(!h||("get"in h?!u.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(s,d,h)}):(function(s,u,c,d){d===void 0&&(d=c),s[d]=u[c]})),i=Da&&Da.__exportStar||function(s,u){for(var c in s)c!=="default"&&!Object.prototype.hasOwnProperty.call(u,c)&&r(u,s,c)};Object.defineProperty(t,"__esModule",{value:!0}),i(yx(),t),i(bx(),t),i(vx(),t),i(xh(),t),i(Oh(),t)})(Da)),Da}var eb;function _x(){return eb||(eb=1,(function(t){var r=Ln&&Ln.__createBinding||(Object.create?(function(c,d,h,m){m===void 0&&(m=h);var p=Object.getOwnPropertyDescriptor(d,h);(!p||("get"in p?!d.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return d[h]}}),Object.defineProperty(c,m,p)}):(function(c,d,h,m){m===void 0&&(m=h),c[m]=d[h]})),i=Ln&&Ln.__setModuleDefault||(Object.create?(function(c,d){Object.defineProperty(c,"default",{enumerable:!0,value:d})}):function(c,d){c.default=d}),s=Ln&&Ln.__exportStar||function(c,d){for(var h in c)h!=="default"&&!Object.prototype.hasOwnProperty.call(d,h)&&r(d,c,h)},u=Ln&&Ln.__importStar||(function(){var c=function(d){return c=Object.getOwnPropertyNames||function(h){var m=[];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(m[m.length]=p);return m},c(d)};return function(d){if(d&&d.__esModule)return d;var h={};if(d!=null)for(var m=c(d),p=0;p<m.length;p++)m[p]!=="default"&&r(h,d,m[p]);return i(h,d),h}})();Object.defineProperty(t,"__esModule",{value:!0}),t.Model=t.CMS=void 0,s(ax(),t),t.CMS=u(lx()),s(gx(),t),t.Model=u(Jy()),s(Jy(),t)})(Ln)),Ln}var Te=_x();const ov=t=>r=>(t.payload.type!==Te.ActionTypes.MESSAGE_FROM_GUEST&&r(Te.Actions.receiveTextMessageWithoutAnalysisFromGuest(t.label,t.payload)),r(t.payload)),uv=t=>(r,i)=>{const{quickReplies:s}=i().chat,u=s.find(c=>t.toLocaleLowerCase().indexOf(c.label.toLocaleLowerCase())>-1);return r(u?ov({...u,label:t}):JSON.parse(JSON.stringify(Te.Actions.receiveTextMessageFromGuest(t))))},Rh="MESSAGE_TO_PARENT_PAGE",wh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ch="AUDIO_MESSAGE_FROM_USER",Nh="RECEIVE_SPEECH_TRANSCRIPTION",Mh="ENABLE_CONVERSATION_RATING",cv="LOAD_SOURCE_INFOS_RESPONSE",Dh="LOAD_SOURCE_INFOS_ERROR",Lh="LOAD_SOURCE_INFOS_REQUEST",Bh="CLOSE_SOURCE_INFOS",Ex="webclient.get.started",fv="webclient.window.expand",dv="webclient.window.close",hv="webclient.transcript.pdf.download",Sx=[Rh,wh,Ch,Nh,Mh,Lh,Bh],Tx=t=>({type:Ch,buffer:t}),Ax=t=>({type:Nh,transcription:t}),xx=t=>({type:Te.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:t}}}),Ox=()=>({type:hv}),Rx=({rating:t})=>({type:Mh,payload:{rating:t}}),wx=(t,r)=>({type:Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:t,feedback:r}}),mv=t=>Te.Actions.requestNLUEvent(t),Cx=t=>({type:wh,messages:t}),Nx=t=>{switch(t.type){case Te.ButtonTypeEnum.WEB_URL:return gv(t.url);case Te.ButtonTypeEnum.POSTBACK:return t.payload;default:throw new Error(`unknown button type ${t.type}`)}},pv=t=>gv(t),gv=t=>({type:Rh,message:{type:"webclient.change.url",url:t}});/*! js-cookie v3.0.5 | MIT */function Do(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)t[s]=i[s]}return t}var Mx={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function nh(t,r){function i(u,c,d){if(!(typeof document>"u")){d=Do({},r,d),typeof d.expires=="number"&&(d.expires=new Date(Date.now()+d.expires*864e5)),d.expires&&(d.expires=d.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var h="";for(var m in d)d[m]&&(h+="; "+m,d[m]!==!0&&(h+="="+d[m].split(";")[0]));return document.cookie=u+"="+t.write(c,u)+h}}function s(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var c=document.cookie?document.cookie.split("; "):[],d={},h=0;h<c.length;h++){var m=c[h].split("="),p=m.slice(1).join("=");try{var b=decodeURIComponent(m[0]);if(d[b]=t.read(p,b),u===b)break}catch{}}return u?d[u]:d}}return Object.create({set:i,get:s,remove:function(u,c){i(u,"",Do({},c,{expires:-1}))},withAttributes:function(u){return nh(this.converter,Do({},this.attributes,u))},withConverter:function(u){return nh(Do({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}var Lo=nh(Mx,{path:"/"});const wt=[];for(let t=0;t<256;++t)wt.push((t+256).toString(16).slice(1));function Dx(t,r=0){return(wt[t[r+0]]+wt[t[r+1]]+wt[t[r+2]]+wt[t[r+3]]+"-"+wt[t[r+4]]+wt[t[r+5]]+"-"+wt[t[r+6]]+wt[t[r+7]]+"-"+wt[t[r+8]]+wt[t[r+9]]+"-"+wt[t[r+10]]+wt[t[r+11]]+wt[t[r+12]]+wt[t[r+13]]+wt[t[r+14]]+wt[t[r+15]]).toLowerCase()}let sd;const Lx=new Uint8Array(16);function Bx(){if(!sd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sd=crypto.getRandomValues.bind(crypto)}return sd(Lx)}const Ux=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),tb={randomUUID:Ux};function Wo(t,r,i){if(tb.randomUUID&&!t)return tb.randomUUID();t=t||{};const s=t.random??t.rng?.()??Bx();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Dx(s)}function Ct(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var jx=typeof Symbol=="function"&&Symbol.observable||"@@observable",nb=jx,ld=()=>Math.random().toString(36).substring(7).split("").join("."),Hx={INIT:`@@redux/INIT${ld()}`,REPLACE:`@@redux/REPLACE${ld()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ld()}`},Jo=Hx;function Uh(t){if(typeof t!="object"||t===null)return!1;let r=t;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(t)===r||Object.getPrototypeOf(t)===null}function yv(t,r,i){if(typeof t!="function")throw new Error(Ct(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(Ct(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(Ct(1));return i(yv)(t,r)}let s=t,u=r,c=new Map,d=c,h=0,m=!1;function p(){d===c&&(d=new Map,c.forEach((G,_)=>{d.set(_,G)}))}function b(){if(m)throw new Error(Ct(3));return u}function E(G){if(typeof G!="function")throw new Error(Ct(4));if(m)throw new Error(Ct(5));let _=!0;p();const C=h++;return d.set(C,G),function(){if(_){if(m)throw new Error(Ct(6));_=!1,p(),d.delete(C),c=null}}}function A(G){if(!Uh(G))throw new Error(Ct(7));if(typeof G.type>"u")throw new Error(Ct(8));if(typeof G.type!="string")throw new Error(Ct(17));if(m)throw new Error(Ct(9));try{m=!0,u=s(u,G)}finally{m=!1}return(c=d).forEach(C=>{C()}),G}function U(G){if(typeof G!="function")throw new Error(Ct(10));s=G,A({type:Jo.REPLACE})}function R(){const G=E;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Ct(11));function C(){const H=_;H.next&&H.next(b())}return C(),{unsubscribe:G(C)}},[nb](){return this}}}return A({type:Jo.INIT}),{dispatch:A,subscribe:E,getState:b,replaceReducer:U,[nb]:R}}function Ix(t){Object.keys(t).forEach(r=>{const i=t[r];if(typeof i(void 0,{type:Jo.INIT})>"u")throw new Error(Ct(12));if(typeof i(void 0,{type:Jo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ct(13))})}function bv(t){const r=Object.keys(t),i={};for(let c=0;c<r.length;c++){const d=r[c];typeof t[d]=="function"&&(i[d]=t[d])}const s=Object.keys(i);let u;try{Ix(i)}catch(c){u=c}return function(d={},h){if(u)throw u;let m=!1;const p={};for(let b=0;b<s.length;b++){const E=s[b],A=i[E],U=d[E],R=A(U,h);if(typeof R>"u")throw h&&h.type,new Error(Ct(14));p[E]=R,m=m||R!==U}return m=m||s.length!==Object.keys(d).length,m?p:d}}function eu(...t){return t.length===0?r=>r:t.length===1?t[0]:t.reduce((r,i)=>(...s)=>r(i(...s)))}function zx(...t){return r=>(i,s)=>{const u=r(i,s);let c=()=>{throw new Error(Ct(15))};const d={getState:u.getState,dispatch:(m,...p)=>c(m,...p)},h=t.map(m=>m(d));return c=eu(...h)(u.dispatch),{...u,dispatch:c}}}function Gx(t){return Uh(t)&&"type"in t&&typeof t.type=="string"}var vv=Symbol.for("immer-nothing"),rb=Symbol.for("immer-draftable"),un=Symbol.for("immer-state");function zn(t,...r){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var wi=Object.getPrototypeOf;function Ga(t){return!!t&&!!t[un]}function Cr(t){return t?_v(t)||Array.isArray(t)||!!t[rb]||!!t.constructor?.[rb]||hu(t)||mu(t):!1}var kx=Object.prototype.constructor.toString();function _v(t){if(!t||typeof t!="object")return!1;const r=wi(t);if(r===null)return!0;const i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===kx}function tu(t,r){du(t)===0?Reflect.ownKeys(t).forEach(i=>{r(i,t[i],t)}):t.forEach((i,s)=>r(s,i,t))}function du(t){const r=t[un];return r?r.type_:Array.isArray(t)?1:hu(t)?2:mu(t)?3:0}function rh(t,r){return du(t)===2?t.has(r):Object.prototype.hasOwnProperty.call(t,r)}function Ev(t,r,i){const s=du(t);s===2?t.set(r,i):s===3?t.add(i):t[r]=i}function qx(t,r){return t===r?t!==0||1/t===1/r:t!==t&&r!==r}function hu(t){return t instanceof Map}function mu(t){return t instanceof Set}function ja(t){return t.copy_||t.base_}function ah(t,r){if(hu(t))return new Map(t);if(mu(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const i=_v(t);if(r===!0||r==="class_only"&&!i){const s=Object.getOwnPropertyDescriptors(t);delete s[un];let u=Reflect.ownKeys(s);for(let c=0;c<u.length;c++){const d=u[c],h=s[d];h.writable===!1&&(h.writable=!0,h.configurable=!0),(h.get||h.set)&&(s[d]={configurable:!0,writable:!0,enumerable:h.enumerable,value:t[d]})}return Object.create(wi(t),s)}else{const s=wi(t);if(s!==null&&i)return{...t};const u=Object.create(s);return Object.assign(u,t)}}function jh(t,r=!1){return pu(t)||Ga(t)||!Cr(t)||(du(t)>1&&(t.set=t.add=t.clear=t.delete=Fx),Object.freeze(t),r&&Object.entries(t).forEach(([i,s])=>jh(s,!0))),t}function Fx(){zn(2)}function pu(t){return Object.isFrozen(t)}var Vx={};function ka(t){const r=Vx[t];return r||zn(0,t),r}var Ws;function Sv(){return Ws}function Px(t,r){return{drafts_:[],parent_:t,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ab(t,r){r&&(ka("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=r)}function ih(t){sh(t),t.drafts_.forEach(Yx),t.drafts_=null}function sh(t){t===Ws&&(Ws=t.parent_)}function ib(t){return Ws=Px(Ws,t)}function Yx(t){const r=t[un];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function sb(t,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return t!==void 0&&t!==i?(i[un].modified_&&(ih(r),zn(4)),Cr(t)&&(t=nu(r,t),r.parent_||ru(r,t)),r.patches_&&ka("Patches").generateReplacementPatches_(i[un].base_,t,r.patches_,r.inversePatches_)):t=nu(r,i,[]),ih(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),t!==vv?t:void 0}function nu(t,r,i){if(pu(r))return r;const s=r[un];if(!s)return tu(r,(u,c)=>lb(t,s,r,u,c,i)),r;if(s.scope_!==t)return r;if(!s.modified_)return ru(t,s.base_,!0),s.base_;if(!s.finalized_){s.finalized_=!0,s.scope_.unfinalizedDrafts_--;const u=s.copy_;let c=u,d=!1;s.type_===3&&(c=new Set(u),u.clear(),d=!0),tu(c,(h,m)=>lb(t,s,u,h,m,i,d)),ru(t,u,!1),i&&t.patches_&&ka("Patches").generatePatches_(s,i,t.patches_,t.inversePatches_)}return s.copy_}function lb(t,r,i,s,u,c,d){if(Ga(u)){const h=c&&r&&r.type_!==3&&!rh(r.assigned_,s)?c.concat(s):void 0,m=nu(t,u,h);if(Ev(i,s,m),Ga(m))t.canAutoFreeze_=!1;else return}else d&&i.add(u);if(Cr(u)&&!pu(u)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;nu(t,u),(!r||!r.scope_.parent_)&&typeof s!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,s)&&ru(t,u)}}function ru(t,r,i=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&jh(r,i)}function Xx(t,r){const i=Array.isArray(t),s={type_:i?1:0,scope_:r?r.scope_:Sv(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=s,c=Hh;i&&(u=[s],c=Js);const{revoke:d,proxy:h}=Proxy.revocable(u,c);return s.draft_=h,s.revoke_=d,h}var Hh={get(t,r){if(r===un)return t;const i=ja(t);if(!rh(i,r))return Zx(t,i,r);const s=i[r];return t.finalized_||!Cr(s)?s:s===od(t.base_,r)?(ud(t),t.copy_[r]=oh(s,t)):s},has(t,r){return r in ja(t)},ownKeys(t){return Reflect.ownKeys(ja(t))},set(t,r,i){const s=Tv(ja(t),r);if(s?.set)return s.set.call(t.draft_,i),!0;if(!t.modified_){const u=od(ja(t),r),c=u?.[un];if(c&&c.base_===i)return t.copy_[r]=i,t.assigned_[r]=!1,!0;if(qx(i,u)&&(i!==void 0||rh(t.base_,r)))return!0;ud(t),lh(t)}return t.copy_[r]===i&&(i!==void 0||r in t.copy_)||Number.isNaN(i)&&Number.isNaN(t.copy_[r])||(t.copy_[r]=i,t.assigned_[r]=!0),!0},deleteProperty(t,r){return od(t.base_,r)!==void 0||r in t.base_?(t.assigned_[r]=!1,ud(t),lh(t)):delete t.assigned_[r],t.copy_&&delete t.copy_[r],!0},getOwnPropertyDescriptor(t,r){const i=ja(t),s=Reflect.getOwnPropertyDescriptor(i,r);return s&&{writable:!0,configurable:t.type_!==1||r!=="length",enumerable:s.enumerable,value:i[r]}},defineProperty(){zn(11)},getPrototypeOf(t){return wi(t.base_)},setPrototypeOf(){zn(12)}},Js={};tu(Hh,(t,r)=>{Js[t]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});Js.deleteProperty=function(t,r){return Js.set.call(this,t,r,void 0)};Js.set=function(t,r,i){return Hh.set.call(this,t[0],r,i,t[0])};function od(t,r){const i=t[un];return(i?ja(i):t)[r]}function Zx(t,r,i){const s=Tv(r,i);return s?"value"in s?s.value:s.get?.call(t.draft_):void 0}function Tv(t,r){if(!(r in t))return;let i=wi(t);for(;i;){const s=Object.getOwnPropertyDescriptor(i,r);if(s)return s;i=wi(i)}}function lh(t){t.modified_||(t.modified_=!0,t.parent_&&lh(t.parent_))}function ud(t){t.copy_||(t.copy_=ah(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Qx=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,s)=>{if(typeof r=="function"&&typeof i!="function"){const c=i;i=r;const d=this;return function(m=c,...p){return d.produce(m,b=>i.call(this,b,...p))}}typeof i!="function"&&zn(6),s!==void 0&&typeof s!="function"&&zn(7);let u;if(Cr(r)){const c=ib(this),d=oh(r,void 0);let h=!0;try{u=i(d),h=!1}finally{h?ih(c):sh(c)}return ab(c,s),sb(u,c)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===vv&&(u=void 0),this.autoFreeze_&&jh(u,!0),s){const c=[],d=[];ka("Patches").generateReplacementPatches_(r,u,c,d),s(c,d)}return u}else zn(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(d,...h)=>this.produceWithPatches(d,m=>r(m,...h));let s,u;return[this.produce(r,i,(d,h)=>{s=d,u=h}),s,u]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){Cr(t)||zn(8),Ga(t)&&(t=Kx(t));const r=ib(this),i=oh(t,void 0);return i[un].isManual_=!0,sh(r),i}finishDraft(t,r){const i=t&&t[un];(!i||!i.isManual_)&&zn(9);const{scope_:s}=i;return ab(s,r),sb(void 0,s)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){t=u.value;break}}i>-1&&(r=r.slice(i+1));const s=ka("Patches").applyPatches_;return Ga(t)?s(t,r):this.produce(t,u=>s(u,r))}};function oh(t,r){const i=hu(t)?ka("MapSet").proxyMap_(t,r):mu(t)?ka("MapSet").proxySet_(t,r):Xx(t,r);return(r?r.scope_:Sv()).drafts_.push(i),i}function Kx(t){return Ga(t)||zn(10,t),Av(t)}function Av(t){if(!Cr(t)||pu(t))return t;const r=t[un];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=ah(t,r.scope_.immer_.useStrictShallowCopy_)}else i=ah(t,!0);return tu(i,(s,u)=>{Ev(i,s,Av(u))}),r&&(r.finalized_=!1),i}var cn=new Qx,xv=cn.produce;cn.produceWithPatches.bind(cn);cn.setAutoFreeze.bind(cn);cn.setUseStrictShallowCopy.bind(cn);cn.applyPatches.bind(cn);cn.createDraft.bind(cn);cn.finishDraft.bind(cn);function Ov(t){return({dispatch:i,getState:s})=>u=>c=>typeof c=="function"?c(i,s,t):u(c)}var $x=Ov(),Wx=Ov,Jx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?eu:eu.apply(null,arguments)};function ob(t,r){function i(...s){if(r){let u=r(...s);if(!u)throw new Error(xr(0));return{type:t,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:t,payload:s[0]}}return i.toString=()=>`${t}`,i.type=t,i.match=s=>Gx(s)&&s.type===t,i}var Rv=class Zs extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,Zs.prototype)}static get[Symbol.species](){return Zs}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new Zs(...r[0].concat(this)):new Zs(...r.concat(this))}};function ub(t){return Cr(t)?xv(t,()=>{}):t}function Bo(t,r,i){return t.has(r)?t.get(r):t.set(r,i(r)).get(r)}function eO(t){return typeof t=="boolean"}var tO=()=>function(r){const{thunk:i=!0,immutableCheck:s=!0,serializableCheck:u=!0,actionCreatorCheck:c=!0}=r??{};let d=new Rv;return i&&(eO(i)?d.push($x):d.push(Wx(i.extraArgument))),d},nO="RTK_autoBatch",cb=t=>r=>{setTimeout(r,t)},rO=(t={type:"raf"})=>r=>(...i)=>{const s=r(...i);let u=!0,c=!1,d=!1;const h=new Set,m=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cb(10):t.type==="callback"?t.queueNotification:cb(t.timeout),p=()=>{d=!1,c&&(c=!1,h.forEach(b=>b()))};return Object.assign({},s,{subscribe(b){const E=()=>u&&b(),A=s.subscribe(E);return h.add(b),()=>{A(),h.delete(b)}},dispatch(b){try{return u=!b?.meta?.[nO],c=!u,c&&(d||(d=!0,m(p))),s.dispatch(b)}finally{u=!0}}})},aO=t=>function(i){const{autoBatch:s=!0}=i??{};let u=new Rv(t);return s&&u.push(rO(typeof s=="object"?s:void 0)),u};function iO(t){const r=tO(),{reducer:i=void 0,middleware:s,devTools:u=!0,preloadedState:c=void 0,enhancers:d=void 0}=t||{};let h;if(typeof i=="function")h=i;else if(Uh(i))h=bv(i);else throw new Error(xr(1));let m;typeof s=="function"?m=s(r):m=r();let p=eu;u&&(p=Jx({trace:!1,...typeof u=="object"&&u}));const b=zx(...m),E=aO(b);let A=typeof d=="function"?d(E):E();const U=p(...A);return yv(h,c,U)}function wv(t){const r={},i=[];let s;const u={addCase(c,d){const h=typeof c=="string"?c:c.type;if(!h)throw new Error(xr(28));if(h in r)throw new Error(xr(29));return r[h]=d,u},addMatcher(c,d){return i.push({matcher:c,reducer:d}),u},addDefaultCase(c){return s=c,u}};return t(u),[r,i,s]}function sO(t){return typeof t=="function"}function lO(t,r){let[i,s,u]=wv(r),c;if(sO(t))c=()=>ub(t());else{const h=ub(t);c=()=>h}function d(h=c(),m){let p=[i[m.type],...s.filter(({matcher:b})=>b(m)).map(({reducer:b})=>b)];return p.filter(b=>!!b).length===0&&(p=[u]),p.reduce((b,E)=>{if(E)if(Ga(b)){const U=E(b,m);return U===void 0?b:U}else{if(Cr(b))return xv(b,A=>E(A,m));{const A=E(b,m);if(A===void 0){if(b===null)return b;throw Error("A case reducer on a non-draftable value must not return undefined")}return A}}return b},h)}return d.getInitialState=c,d}var oO=Symbol.for("rtk-slice-createasyncthunk");function uO(t,r){return`${t}/${r}`}function cO({creators:t}={}){const r=t?.asyncThunk?.[oO];return function(s){const{name:u,reducerPath:c=u}=s;if(!u)throw new Error(xr(11));const d=(typeof s.reducers=="function"?s.reducers(dO()):s.reducers)||{},h=Object.keys(d),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(S,H){const x=typeof S=="string"?S:S.type;if(!x)throw new Error(xr(12));if(x in m.sliceCaseReducersByType)throw new Error(xr(13));return m.sliceCaseReducersByType[x]=H,p},addMatcher(S,H){return m.sliceMatchers.push({matcher:S,reducer:H}),p},exposeAction(S,H){return m.actionCreators[S]=H,p},exposeCaseReducer(S,H){return m.sliceCaseReducersByName[S]=H,p}};h.forEach(S=>{const H=d[S],x={reducerName:S,type:uO(u,S),createNotation:typeof s.reducers=="function"};mO(H)?gO(x,H,p,r):hO(x,H,p)});function b(){const[S={},H=[],x=void 0]=typeof s.extraReducers=="function"?wv(s.extraReducers):[s.extraReducers],Z={...S,...m.sliceCaseReducersByType};return lO(s.initialState,W=>{for(let ae in Z)W.addCase(ae,Z[ae]);for(let ae of m.sliceMatchers)W.addMatcher(ae.matcher,ae.reducer);for(let ae of H)W.addMatcher(ae.matcher,ae.reducer);x&&W.addDefaultCase(x)})}const E=S=>S,A=new Map,U=new WeakMap;let R;function q(S,H){return R||(R=b()),R(S,H)}function G(){return R||(R=b()),R.getInitialState()}function _(S,H=!1){function x(W){let ae=W[S];return typeof ae>"u"&&H&&(ae=Bo(U,x,G)),ae}function Z(W=E){const ae=Bo(A,H,()=>new WeakMap);return Bo(ae,W,()=>{const ye={};for(const[Ee,se]of Object.entries(s.selectors??{}))ye[Ee]=fO(se,W,()=>Bo(U,W,G),H);return ye})}return{reducerPath:S,getSelectors:Z,get selectors(){return Z(x)},selectSlice:x}}const C={name:u,reducer:q,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:G,..._(c),injectInto(S,{reducerPath:H,...x}={}){const Z=H??c;return S.inject({reducerPath:Z,reducer:q},x),{...C,..._(Z,!0)}}};return C}}function fO(t,r,i,s){function u(c,...d){let h=r(c);return typeof h>"u"&&s&&(h=i()),t(h,...d)}return u.unwrapped=t,u}var Ih=cO();function dO(){function t(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return t.withTypes=()=>t,{reducer(r){return Object.assign({[r.name](...i){return r(...i)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:i}},asyncThunk:t}}function hO({type:t,reducerName:r,createNotation:i},s,u){let c,d;if("reducer"in s){if(i&&!pO(s))throw new Error(xr(17));c=s.reducer,d=s.prepare}else c=s;u.addCase(t,c).exposeCaseReducer(r,c).exposeAction(r,d?ob(t,d):ob(t))}function mO(t){return t._reducerDefinitionType==="asyncThunk"}function pO(t){return t._reducerDefinitionType==="reducerWithPrepare"}function gO({type:t,reducerName:r},i,s,u){if(!u)throw new Error(xr(18));const{payloadCreator:c,fulfilled:d,pending:h,rejected:m,settled:p,options:b}=i,E=u(t,c,b);s.exposeAction(r,E),d&&s.addCase(E.fulfilled,d),h&&s.addCase(E.pending,h),m&&s.addCase(E.rejected,m),p&&s.addMatcher(E.settled,p),s.exposeCaseReducer(r,{fulfilled:d||Uo,pending:h||Uo,rejected:m||Uo,settled:p||Uo})}function Uo(){}function xr(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}const yO={formValues:{}},Cv=Ih({name:"start-screen",initialState:yO,reducers:{showStartScreen(t){t.startScreenStatus="VISIBLE",t.formValues={}},startChat(t,r){t.startScreenStatus="HIDDEN",t.formValues=r.payload.formValues},startAuthenticatedChat(t,r){t.startScreenStatus="HIDDEN",t.loginToken=r.payload.loginToken,t.loginRequestToken=void 0},requestLogin(t,r){t.loginRequestToken=r.payload.loginRequestToken,t.formValues=r.payload.formValues},loginWindowClosed(t){t.loginRequestToken=void 0}}}),{startChat:bO,startAuthenticatedChat:vO,showStartScreen:_O,requestLogin:EO,loginWindowClosed:SO}=Cv.actions,TO=Cv.reducer,Nv="RESET_CHAT_STATE",Mv="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",Dv="SHOW_CONVERSATION_RATING_OVERLAY",Lv="HIDE_CONVERSATION_RATING_OVERLAY",Bv=()=>({type:dv}),AO=()=>({type:Nv}),Uv=()=>({type:Mv}),zh=(t,r=void 0)=>({type:Dv,payload:{opener:t,defaultRating:r}}),xO=()=>({type:Lv}),fb=(t,r,i)=>(s,u)=>{try{const c=u().connection.sessionId;if(!c)throw new Error("Session ID is not available");s({type:Lh,payload:{chunkId:i}}),db(t,c,r,i,!1,s),db(t,c,r,i,!0,s)}catch(c){console.error("Error loading source infos:",c),s({type:Dh})}},db=(t,r,i,s,u,c)=>{const d=`/${t}/me/chat-widget/transcript/${i}/chunks/${s}?highlight=${u}`;fetch(d,{headers:{"x-bubble-chat-session-id":r}}).then(h=>{if(!h.ok)throw new Error(`HTTP error! Status: ${h.status}`);return h.json()}).then(h=>{const m={...h,chunkId:s,highlighted:u};c({type:cv,payload:m})}).catch(h=>{console.error("Error fetching source infos:",h),c({type:Dh,payload:{highlighted:u}})})},OO=()=>({type:Bh}),Gh="CONNECT",kh="CONNECTING",qh="CONNECTED",Fh="DISCONNECTED",Vh="RECONNECTED",Ph="RESTORE_SESSION_ID",gu="START",yu="CLEAR_SESSION_ID",RO=[Gh,kh,qh,Fh,Vh,Ph],wO=(t,r)=>({type:Gh,clientName:t,querystrings:r}),CO=t=>({type:Ph,sessionId:t}),NO=()=>({type:kh}),MO=()=>({type:qh}),DO=()=>({type:Fh}),LO=()=>({type:Vh}),jv=(t,r)=>(i,s)=>{const u=s().connection,{formValues:c,loginToken:d}=s().startScreen;let h=u.sessionId;h===void 0&&(h=Wo());let m=u.userId;if(m===void 0){const p=Lo.get("bubble-chat-user-id")||Lo.get("bubble-chat-userId")||Lo.get("bf-webclient-userId");m=p||Wo(),Lo.set("bubble-chat-user-id",m)}i({type:gu,payload:{sessionId:h,userId:m,clientName:t,loginToken:d,querystrings:{...r,...c}}})},bu=(t,r)=>(i,s)=>{const u=s().connection.sessionId||"";if(i(BO(u)),i(AO()),s().settings.enableStartScreen)i(_O());else return i(jv(t,r))},BO=t=>({type:yu,payload:{sessionId:t}}),Ze=()=>{const t=cu();return i=>{const s=t.formatMessage({id:i});return s===i?void 0:s}};var Ia=(t=>(t[t.CONNECTING=0]="CONNECTING",t[t.CONNECTED=1]="CONNECTED",t[t.RECONNECTED=2]="RECONNECTED",t[t.DISCONNECTED=3]="DISCONNECTED",t))(Ia||{}),au=(t=>(t.GUEST="GUEST",t.BOT="BOT",t.PERSON="PERSON",t))(au||{});const UO="_container_q2uun_1",jO="_chatcontent_q2uun_6",HO="_accessabilityHidden_q2uun_12",cd={container:UO,chatcontent:jO,accessabilityHidden:HO},IO="_messageContainer_ofi0g_1",zO="_messages_ofi0g_12",hb={messageContainer:IO,messages:zO};function Ha(){return Ha=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},Ha.apply(this,arguments)}const GO=["children","options"],kO={footnoteReference:"7"},mb=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((t,r)=>(t[r.toLowerCase()]=r,t),{class:"className",for:"htmlFor"}),pb={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},qO=["style","script","pre"],FO=["src","href","data","formAction","srcDoc","action"],VO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,PO=/mailto:/i,YO=/\n{2,}$/,gb=/^(\s*>[\s\S]*?)(?=\n\n|$)/,XO=/^ *> ?/gm,ZO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,QO=/^ {2,}\n/,KO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,yb=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,bb=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,$O=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,WO=/^(?:\n *)*\n/,JO=/\r\n?/g,eR=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,tR=/^\[\^([^\]]+)]/,nR=/\f/g,rR=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,aR=/^\s*?\[(x|\s)\]/,vb=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,_b=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,Eb=/^([^\n]+)\n *(=|-){3,} *\n/,fd=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,iR=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Sb=/^<!--[\s\S]*?(?:-->)/,sR=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,dd=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,lR=/^\{.*\}$/,oR=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,uR=/^<([^ >]+@[^ >]+)>/,cR=/^<([^ >]+:\/[^ >]+)>/,fR=/-([a-z])?/gi,Tb=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,dR=/^[^\n]+(?: \n|\n{2,})/,hR=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,mR=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,pR=/^\[([^\]]*)\] ?\[([^\]]*)\]/,gR=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,yR=/\t/g,bR=/(^ *\||\| *$)/g,vR=/^ *:-+: *$/,_R=/^ *:-+ *$/,ER=/^ *-+: *$/,vu=t=>`(?=[\\s\\S]+?\\1${t?"\\1":""})`,_u="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",SR=RegExp(`^([*_])\\1${vu(1)}${_u}\\1\\1(?!\\1)`),TR=RegExp(`^([*_])${vu(0)}${_u}\\1(?!\\1)`),AR=RegExp(`^(==)${vu(0)}${_u}\\1`),xR=RegExp(`^(~~)${vu(0)}${_u}\\1`),OR=/^(:[a-zA-Z0-9-_]+:)/,RR=/^\\([^0-9A-Za-z\s])/,wR=/\\([^0-9A-Za-z\s])/g,CR=/^[\s\S](?:(?! \n|[0-9]\.|http)[^=*_~\-\n:<`\\\[!])*/,NR=/^\n+/,MR=/^([ \t]*)/,DR=/(?:^|\n)( *)$/,Yh="(?:\\d+\\.)",Xh="(?:[*+-])";function Hv(t){return"( *)("+(t===1?Yh:Xh)+") +"}const Iv=Hv(1),zv=Hv(2);function Gv(t){return RegExp("^"+(t===1?Iv:zv))}const LR=Gv(1),BR=Gv(2);function kv(t){return RegExp("^"+(t===1?Iv:zv)+"[^\\n]*(?:\\n(?!\\1"+(t===1?Yh:Xh)+" )[^\\n]*)*(\\n|$)","gm")}const UR=kv(1),jR=kv(2);function qv(t){const r=t===1?Yh:Xh;return RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const Fv=qv(1),Vv=qv(2);function Ab(t,r){const i=r===1,s=i?Fv:Vv,u=i?UR:jR,c=i?LR:BR;return{t:d=>c.test(d),o:Ci(function(d,h){const m=DR.exec(h.prevCapture);return m&&(h.list||!h.inline&&!h.simple)?s.exec(d=m[1]+d):null}),i:1,u(d,h,m){const p=i?+d[2]:void 0,b=d[0].replace(YO,`
|
|
94
94
|
`).match(u);let E=!1;return{items:b.map(function(A,U){const R=c.exec(A)[0].length,q=RegExp("^ {1,"+R+"}","gm"),G=A.replace(q,"").replace(c,""),_=U===b.length-1,C=G.indexOf(`
|
|
95
95
|
|
|
96
96
|
`)!==-1||_&&E;E=C;const S=m.inline,H=m.list;let x;m.list=!0,C?(m.inline=!1,x=$s(G)+`
|
|
97
97
|
|
|
98
|
-
`):(m.inline=!0,x=$s(G));const Z=h(x,m);return m.inline=S,m.list=H,Z}),ordered:i,start:p}},l:(d,h,m)=>t(d.ordered?"ol":"ul",{key:m.key,start:d.type==="20"?d.start:void 0},d.items.map(function(p,b){return t("li",{key:b},h(p,m))}))}}const HR=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),IR=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $s(t){let r=t.length;for(;r>0&&t[r-1]<=" ";)r--;return t.slice(0,r)}function Vo(t,r){return t.startsWith(r)}function zR(t,r,i){if(Array.isArray(i)){for(let s=0;s<i.length;s++)if(Vo(t,i[s]))return!0;return!1}return i(t,r)}function Is(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function GR(t){return ER.test(t)?"right":vR.test(t)?"center":_R.test(t)?"left":null}function xb(t,r,i,s){const u=i.inTable;i.inTable=!0;let c=[[]],d="";function h(){if(!d)return;const m=c[c.length-1];m.push.apply(m,r(d,i)),d=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((m,p,b)=>{m.trim()==="|"&&(h(),s)?p!==0&&p!==b.length-1&&c.push([]):d+=m}),h(),i.inTable=u,c}function kR(t,r,i){i.inline=!0;const s=t[2]?t[2].replace(bR,"").split("|").map(GR):[],u=t[3]?function(d,h,m){return d.trim().split(`
|
|
99
|
-
`).map(function(p){return xb(p,h,m,!0)})}(t[3],r,i):[],c=xb(t[1],r,i,!!u.length);return i.inline=!1,u.length?{align:s,cells:u,header:c,type:"25"}:{children:c,type:"21"}}function Ob(t,r){return t.align[r]==null?{}:{textAlign:t.align[r]}}function Ci(t){return t.inline=1,t}function aa(t){return Ci(function(r,i){return i.inline?t.exec(r):null})}function ia(t){return Ci(function(r,i){return i.inline||i.simple?t.exec(r):null})}function Sr(t){return function(r,i){return i.inline||i.simple?null:t.exec(r)}}function jo(t){return Ci(function(r){return t.exec(r)})}const qR=/(javascript|vbscript|data(?!:image)):/i;function FR(t){try{const r=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(qR.test(r))return null}catch{return null}return t}function Qn(t){return t&&t.replace(wR,"$1")}function Po(t,r,i){const s=i.inline||!1,u=i.simple||!1;i.inline=!0,i.simple=!0;const c=t(r,i);return i.inline=s,i.simple=u,c}function VR(t,r,i){const s=i.inline||!1,u=i.simple||!1;i.inline=!1,i.simple=!0;const c=t(r,i);return i.inline=s,i.simple=u,c}function PR(t,r,i){const s=i.inline||!1;i.inline=!1;const u=t(r,i);return i.inline=s,u}const hd=(t,r,i)=>({children:Po(r,t[2],i)});function md(){return{}}function pd(){return null}function YR(...t){return t.filter(Boolean).join(" ")}function gd(t,r,i){let s=t;const u=r.split(".");for(;u.length&&(s=s[u[0]],s!==void 0);)u.shift();return s||i}function XR(t="",r={}){r.overrides=r.overrides||{},r.namedCodesToUnicode=r.namedCodesToUnicode?Ha({},pb,r.namedCodesToUnicode):pb;const i=r.slugify||Is,s=r.sanitizer||FR,u=r.createElement||B.createElement,c=[gb,yb,bb,r.enforceAtxHeadings?_b:vb,Eb,Tb,Fv,Vv],d=[...c,dR,fd,Sb,dd];function h(_,C,...S){const H=gd(r.overrides,_+".props",{});return u(function(x,Z){const W=gd(Z,x);return W?typeof W=="function"||typeof W=="object"&&"render"in W?W:gd(Z,x+".component",x):x}(_,r.overrides),Ha({},C,H,{className:YR(C?.className,H.className)||void 0}),...S)}function m(_){_=_.replace(rR,"");let C=!1;r.forceInline?C=!0:r.forceBlock||(C=gR.test(_)===!1);const S=R(U(C?_:$s(_).replace(NR,"")+`
|
|
98
|
+
`):(m.inline=!0,x=$s(G));const Z=h(x,m);return m.inline=S,m.list=H,Z}),ordered:i,start:p}},l:(d,h,m)=>t(d.ordered?"ol":"ul",{key:m.key,start:d.type==="20"?d.start:void 0},d.items.map(function(p,b){return t("li",{key:b},h(p,m))}))}}const HR=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),IR=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/;function $s(t){let r=t.length;for(;r>0&&t[r-1]<=" ";)r--;return t.slice(0,r)}function Vo(t,r){return t.startsWith(r)}function zR(t,r,i){if(Array.isArray(i)){for(let s=0;s<i.length;s++)if(Vo(t,i[s]))return!0;return!1}return i(t,r)}function Is(t){return t.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function GR(t){return ER.test(t)?"right":vR.test(t)?"center":_R.test(t)?"left":null}function xb(t,r,i,s){const u=i.inTable;i.inTable=!0;let c=[[]],d="";function h(){if(!d)return;const m=c[c.length-1];m.push.apply(m,r(d,i)),d=""}return t.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((m,p,b)=>{m.trim()==="|"&&(h(),s)?p!==0&&p!==b.length-1&&c.push([]):d+=m}),h(),i.inTable=u,c}function kR(t,r,i){i.inline=!0;const s=t[2]?t[2].replace(bR,"").split("|").map(GR):[],u=t[3]?(function(d,h,m){return d.trim().split(`
|
|
99
|
+
`).map(function(p){return xb(p,h,m,!0)})})(t[3],r,i):[],c=xb(t[1],r,i,!!u.length);return i.inline=!1,u.length?{align:s,cells:u,header:c,type:"25"}:{children:c,type:"21"}}function Ob(t,r){return t.align[r]==null?{}:{textAlign:t.align[r]}}function Ci(t){return t.inline=1,t}function aa(t){return Ci(function(r,i){return i.inline?t.exec(r):null})}function ia(t){return Ci(function(r,i){return i.inline||i.simple?t.exec(r):null})}function Sr(t){return function(r,i){return i.inline||i.simple?null:t.exec(r)}}function jo(t){return Ci(function(r){return t.exec(r)})}const qR=/(javascript|vbscript|data(?!:image)):/i;function FR(t){try{const r=decodeURIComponent(t).replace(/[^A-Za-z0-9/:]/g,"");if(qR.test(r))return null}catch{return null}return t}function Qn(t){return t&&t.replace(wR,"$1")}function Po(t,r,i){const s=i.inline||!1,u=i.simple||!1;i.inline=!0,i.simple=!0;const c=t(r,i);return i.inline=s,i.simple=u,c}function VR(t,r,i){const s=i.inline||!1,u=i.simple||!1;i.inline=!1,i.simple=!0;const c=t(r,i);return i.inline=s,i.simple=u,c}function PR(t,r,i){const s=i.inline||!1;i.inline=!1;const u=t(r,i);return i.inline=s,u}const hd=(t,r,i)=>({children:Po(r,t[2],i)});function md(){return{}}function pd(){return null}function YR(...t){return t.filter(Boolean).join(" ")}function gd(t,r,i){let s=t;const u=r.split(".");for(;u.length&&(s=s[u[0]],s!==void 0);)u.shift();return s||i}function XR(t="",r={}){r.overrides=r.overrides||{},r.namedCodesToUnicode=r.namedCodesToUnicode?Ha({},pb,r.namedCodesToUnicode):pb;const i=r.slugify||Is,s=r.sanitizer||FR,u=r.createElement||B.createElement,c=[gb,yb,bb,r.enforceAtxHeadings?_b:vb,Eb,Tb,Fv,Vv],d=[...c,dR,fd,Sb,dd];function h(_,C,...S){const H=gd(r.overrides,_+".props",{});return u((function(x,Z){const W=gd(Z,x);return W?typeof W=="function"||typeof W=="object"&&"render"in W?W:gd(Z,x+".component",x):x})(_,r.overrides),Ha({},C,H,{className:YR(C?.className,H.className)||void 0}),...S)}function m(_){_=_.replace(rR,"");let C=!1;r.forceInline?C=!0:r.forceBlock||(C=gR.test(_)===!1);const S=R(U(C?_:$s(_).replace(NR,"")+`
|
|
100
100
|
|
|
101
|
-
`,{inline:C}));for(;typeof S[S.length-1]=="string"&&!S[S.length-1].trim();)S.pop();if(r.wrapper===null)return S;const H=r.wrapper||(C?"span":"div");let x;if(S.length>1||r.forceWrapper)x=S;else{if(S.length===1)return x=S[0],typeof x=="string"?h("span",{key:"outer"},x):x;x=null}return u(H,{key:"outer"},x)}function p(_,C){if(!C||!C.trim())return null;const S=C.match(VO);return S?S.reduce(function(H,x){const Z=x.indexOf("=");if(Z!==-1){const W=function(se){return se.indexOf("-")!==-1&&se.match(sR)===null&&(se=se.replace(fR,function(me,ce){return ce.toUpperCase()})),se}(x.slice(0,Z)).trim(),ae=function(se){const me=se[0];return(me==='"'||me==="'")&&se.length>=2&&se[se.length-1]===me?se.slice(1,-1):se}(x.slice(Z+1).trim()),ye=mb[W]||W;if(ye==="ref")return H;const Ee=H[ye]=function(se,me,ce,Pe){return me==="style"?function(ve){const z=[];let K="",ee=!1,Ae=!1,O="";if(!ve)return z;for(let $=0;$<ve.length;$++){const Y=ve[$];if(Y!=='"'&&Y!=="'"||ee||(Ae?Y===O&&(Ae=!1,O=""):(Ae=!0,O=Y)),Y==="("&&K.endsWith("url")?ee=!0:Y===")"&&ee&&(ee=!1),Y!==";"||Ae||ee)K+=Y;else{const te=K.trim();if(te){const re=te.indexOf(":");if(re>0){const ue=te.slice(0,re).trim(),We=te.slice(re+1).trim();z.push([ue,We])}}K=""}}const k=K.trim();if(k){const $=k.indexOf(":");if($>0){const Y=k.slice(0,$).trim(),te=k.slice($+1).trim();z.push([Y,te])}}return z}(ce).reduce(function(ve,[z,K]){return ve[z.replace(/(-[a-z])/g,ee=>ee[1].toUpperCase())]=Pe(K,se,z),ve},{}):FO.indexOf(me)!==-1?Pe(Qn(ce),se,me):(ce.match(lR)&&(ce=Qn(ce.slice(1,ce.length-1))),ce==="true"||ce!=="false"&&ce)}(_,W,ae,s);typeof Ee=="string"&&(fd.test(Ee)||dd.test(Ee))&&(H[ye]=m(Ee.trim()))}else x!=="style"&&(H[mb[x]||x]=!0);return H},{}):null}const b=[],E={},A={0:{t:[">"],o:Sr(gb),i:1,u(_,C,S){const[,H,x]=_[0].replace(XO,"").match(ZO);return{alert:H,children:C(x,S)}},l(_,C,S){const H={key:S.key};return _.alert&&(H.className="markdown-alert-"+i(_.alert.toLowerCase(),Is),_.children.unshift({attrs:{},children:[{type:"27",text:_.alert}],noInnerParse:!0,type:"11",tag:"header"})),h("blockquote",H,C(_.children,S))}},1:{o:jo(QO),i:1,u:md,l:(_,C,S)=>h("br",{key:S.key})},2:{t:_=>{const C=_[0];return C==="-"||C==="*"||C==="_"},o:Sr(KO),i:1,u:md,l:(_,C,S)=>h("hr",{key:S.key})},3:{t:[" "],o:Sr(bb),i:0,u:_=>({lang:void 0,text:Qn($s(_[0].replace(/^ {4}/gm,"")))}),l:(_,C,S)=>h("pre",{key:S.key},h("code",Ha({},_.attrs,{className:_.lang?"lang-"+_.lang:""}),_.text))},4:{t:["```","~~~"],o:Sr(yb),i:0,u:_=>({attrs:p("code",_[3]||""),lang:_[2]||void 0,text:_[4],type:"3"})},5:{t:["`"],o:ia($O),i:3,u:_=>({text:Qn(_[2])}),l:(_,C,S)=>h("code",{key:S.key},_.text)},6:{t:["[^"],o:Sr(eR),i:0,u:_=>(b.push({footnote:_[2],identifier:_[1]}),{}),l:pd},7:{t:["[^"],o:aa(tR),i:1,u:_=>({target:"#"+i(_[1],Is),text:_[1]}),l:(_,C,S)=>h("a",{key:S.key,href:s(_.target,"a","href")},h("sup",{key:S.key},_.text))},8:{t:["[ ]","[x]"],o:aa(aR),i:1,u:_=>({completed:_[1].toLowerCase()==="x"}),l:(_,C,S)=>h("input",{checked:_.completed,key:S.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Sr(r.enforceAtxHeadings?_b:vb),i:1,u:(_,C,S)=>({children:Po(C,_[2],S),id:i(_[2],Is),level:_[1].length}),l:(_,C,S)=>h("h"+_.level,{id:_.id,key:S.key},C(_.children,S))},10:{o:Sr(Eb),i:0,u:(_,C,S)=>({children:Po(C,_[1],S),level:_[2]==="="?1:2,type:"9"})},11:{t:["<"],o:jo(fd),i:1,u(_,C,S){const[,H]=_[3].match(MR),x=RegExp("^"+H,"gm"),Z=_[3].replace(x,""),W=(ae=Z,d.some(ce=>ce.test(ae))?PR:Po);var ae;const ye=_[1].toLowerCase(),Ee=qO.indexOf(ye)!==-1,se=(Ee?ye:_[1]).trim(),me={attrs:p(se,_[2]),noInnerParse:Ee,tag:se};if(S.inAnchor=S.inAnchor||ye==="a",Ee)me.text=_[3];else{const ce=S.inHTML;S.inHTML=!0,me.children=W(C,Z,S),S.inHTML=ce}return S.inAnchor=!1,me},l:(_,C,S)=>h(_.tag,Ha({key:S.key},_.attrs),_.text||(_.children?C(_.children,S):""))},13:{t:["<"],o:jo(dd),i:1,u(_){const C=_[1].trim();return{attrs:p(C,_[2]||""),tag:C}},l:(_,C,S)=>h(_.tag,Ha({},_.attrs,{key:S.key}))},12:{t:["<!--"],o:jo(Sb),i:1,u:()=>({}),l:pd},14:{t:["!["],o:ia(IR),i:1,u:_=>({alt:Qn(_[1]),target:Qn(_[2]),title:Qn(_[3])}),l:(_,C,S)=>h("img",{key:S.key,alt:_.alt||void 0,title:_.title||void 0,src:s(_.target,"img","src")})},15:{t:["["],o:aa(HR),i:3,u:(_,C,S)=>({children:VR(C,_[1],S),target:Qn(_[2]),title:Qn(_[3])}),l:(_,C,S)=>h("a",{key:S.key,href:s(_.target,"a","href"),title:_.title},C(_.children,S))},16:{t:["<"],o:aa(cR),i:0,u:_=>({children:[{text:_[1],type:"27"}],target:_[1],type:"15"})},17:{t:(_,C)=>!C.inAnchor&&!r.disableAutoLink&&(Vo(_,"http://")||Vo(_,"https://")),o:aa(oR),i:0,u:_=>({children:[{text:_[1],type:"27"}],target:_[1],title:void 0,type:"15"})},18:{t:["<"],o:aa(uR),i:0,u(_){let C=_[1],S=_[1];return PO.test(S)||(S="mailto:"+S),{children:[{text:C.replace("mailto:",""),type:"27"}],target:S,type:"15"}}},20:Ab(h,1),33:Ab(h,2),19:{o:Sr(WO),i:3,u:md,l:()=>`
|
|
101
|
+
`,{inline:C}));for(;typeof S[S.length-1]=="string"&&!S[S.length-1].trim();)S.pop();if(r.wrapper===null)return S;const H=r.wrapper||(C?"span":"div");let x;if(S.length>1||r.forceWrapper)x=S;else{if(S.length===1)return x=S[0],typeof x=="string"?h("span",{key:"outer"},x):x;x=null}return u(H,{key:"outer"},x)}function p(_,C){if(!C||!C.trim())return null;const S=C.match(VO);return S?S.reduce(function(H,x){const Z=x.indexOf("=");if(Z!==-1){const W=(function(se){return se.indexOf("-")!==-1&&se.match(sR)===null&&(se=se.replace(fR,function(me,ce){return ce.toUpperCase()})),se})(x.slice(0,Z)).trim(),ae=(function(se){const me=se[0];return(me==='"'||me==="'")&&se.length>=2&&se[se.length-1]===me?se.slice(1,-1):se})(x.slice(Z+1).trim()),ye=mb[W]||W;if(ye==="ref")return H;const Ee=H[ye]=(function(se,me,ce,Pe){return me==="style"?(function(ve){const z=[];let K="",ee=!1,Ae=!1,O="";if(!ve)return z;for(let $=0;$<ve.length;$++){const Y=ve[$];if(Y!=='"'&&Y!=="'"||ee||(Ae?Y===O&&(Ae=!1,O=""):(Ae=!0,O=Y)),Y==="("&&K.endsWith("url")?ee=!0:Y===")"&&ee&&(ee=!1),Y!==";"||Ae||ee)K+=Y;else{const te=K.trim();if(te){const re=te.indexOf(":");if(re>0){const ue=te.slice(0,re).trim(),We=te.slice(re+1).trim();z.push([ue,We])}}K=""}}const k=K.trim();if(k){const $=k.indexOf(":");if($>0){const Y=k.slice(0,$).trim(),te=k.slice($+1).trim();z.push([Y,te])}}return z})(ce).reduce(function(ve,[z,K]){return ve[z.replace(/(-[a-z])/g,ee=>ee[1].toUpperCase())]=Pe(K,se,z),ve},{}):FO.indexOf(me)!==-1?Pe(Qn(ce),se,me):(ce.match(lR)&&(ce=Qn(ce.slice(1,ce.length-1))),ce==="true"||ce!=="false"&&ce)})(_,W,ae,s);typeof Ee=="string"&&(fd.test(Ee)||dd.test(Ee))&&(H[ye]=m(Ee.trim()))}else x!=="style"&&(H[mb[x]||x]=!0);return H},{}):null}const b=[],E={},A={0:{t:[">"],o:Sr(gb),i:1,u(_,C,S){const[,H,x]=_[0].replace(XO,"").match(ZO);return{alert:H,children:C(x,S)}},l(_,C,S){const H={key:S.key};return _.alert&&(H.className="markdown-alert-"+i(_.alert.toLowerCase(),Is),_.children.unshift({attrs:{},children:[{type:"27",text:_.alert}],noInnerParse:!0,type:"11",tag:"header"})),h("blockquote",H,C(_.children,S))}},1:{o:jo(QO),i:1,u:md,l:(_,C,S)=>h("br",{key:S.key})},2:{t:_=>{const C=_[0];return C==="-"||C==="*"||C==="_"},o:Sr(KO),i:1,u:md,l:(_,C,S)=>h("hr",{key:S.key})},3:{t:[" "],o:Sr(bb),i:0,u:_=>({lang:void 0,text:Qn($s(_[0].replace(/^ {4}/gm,"")))}),l:(_,C,S)=>h("pre",{key:S.key},h("code",Ha({},_.attrs,{className:_.lang?"lang-"+_.lang:""}),_.text))},4:{t:["```","~~~"],o:Sr(yb),i:0,u:_=>({attrs:p("code",_[3]||""),lang:_[2]||void 0,text:_[4],type:"3"})},5:{t:["`"],o:ia($O),i:3,u:_=>({text:Qn(_[2])}),l:(_,C,S)=>h("code",{key:S.key},_.text)},6:{t:["[^"],o:Sr(eR),i:0,u:_=>(b.push({footnote:_[2],identifier:_[1]}),{}),l:pd},7:{t:["[^"],o:aa(tR),i:1,u:_=>({target:"#"+i(_[1],Is),text:_[1]}),l:(_,C,S)=>h("a",{key:S.key,href:s(_.target,"a","href")},h("sup",{key:S.key},_.text))},8:{t:["[ ]","[x]"],o:aa(aR),i:1,u:_=>({completed:_[1].toLowerCase()==="x"}),l:(_,C,S)=>h("input",{checked:_.completed,key:S.key,readOnly:!0,type:"checkbox"})},9:{t:["#"],o:Sr(r.enforceAtxHeadings?_b:vb),i:1,u:(_,C,S)=>({children:Po(C,_[2],S),id:i(_[2],Is),level:_[1].length}),l:(_,C,S)=>h("h"+_.level,{id:_.id,key:S.key},C(_.children,S))},10:{o:Sr(Eb),i:0,u:(_,C,S)=>({children:Po(C,_[1],S),level:_[2]==="="?1:2,type:"9"})},11:{t:["<"],o:jo(fd),i:1,u(_,C,S){const[,H]=_[3].match(MR),x=RegExp("^"+H,"gm"),Z=_[3].replace(x,""),W=(ae=Z,d.some(ce=>ce.test(ae))?PR:Po);var ae;const ye=_[1].toLowerCase(),Ee=qO.indexOf(ye)!==-1,se=(Ee?ye:_[1]).trim(),me={attrs:p(se,_[2]),noInnerParse:Ee,tag:se};if(S.inAnchor=S.inAnchor||ye==="a",Ee)me.text=_[3];else{const ce=S.inHTML;S.inHTML=!0,me.children=W(C,Z,S),S.inHTML=ce}return S.inAnchor=!1,me},l:(_,C,S)=>h(_.tag,Ha({key:S.key},_.attrs),_.text||(_.children?C(_.children,S):""))},13:{t:["<"],o:jo(dd),i:1,u(_){const C=_[1].trim();return{attrs:p(C,_[2]||""),tag:C}},l:(_,C,S)=>h(_.tag,Ha({},_.attrs,{key:S.key}))},12:{t:["<!--"],o:jo(Sb),i:1,u:()=>({}),l:pd},14:{t:["!["],o:ia(IR),i:1,u:_=>({alt:Qn(_[1]),target:Qn(_[2]),title:Qn(_[3])}),l:(_,C,S)=>h("img",{key:S.key,alt:_.alt||void 0,title:_.title||void 0,src:s(_.target,"img","src")})},15:{t:["["],o:aa(HR),i:3,u:(_,C,S)=>({children:VR(C,_[1],S),target:Qn(_[2]),title:Qn(_[3])}),l:(_,C,S)=>h("a",{key:S.key,href:s(_.target,"a","href"),title:_.title},C(_.children,S))},16:{t:["<"],o:aa(cR),i:0,u:_=>({children:[{text:_[1],type:"27"}],target:_[1],type:"15"})},17:{t:(_,C)=>!C.inAnchor&&!r.disableAutoLink&&(Vo(_,"http://")||Vo(_,"https://")),o:aa(oR),i:0,u:_=>({children:[{text:_[1],type:"27"}],target:_[1],title:void 0,type:"15"})},18:{t:["<"],o:aa(uR),i:0,u(_){let C=_[1],S=_[1];return PO.test(S)||(S="mailto:"+S),{children:[{text:C.replace("mailto:",""),type:"27"}],target:S,type:"15"}}},20:Ab(h,1),33:Ab(h,2),19:{o:Sr(WO),i:3,u:md,l:()=>`
|
|
102
102
|
`},21:{o:Ci(function(_,C){if(C.inline||C.simple||C.inHTML&&_.indexOf(`
|
|
103
103
|
|
|
104
104
|
`)===-1&&C.prevCapture.indexOf(`
|
|
105
105
|
|
|
106
106
|
`)===-1)return null;let S="";_.split(`
|
|
107
107
|
`).every(x=>(x+=`
|
|
108
|
-
`,!c.some(Z=>Z.test(x))&&(S+=x,!!x.trim())));const H=$s(S);return H===""?null:[S,,H]}),i:3,u:hd,l:(_,C,S)=>h("p",{key:S.key},C(_.children,S))},22:{t:["["],o:aa(hR),i:0,u:_=>(E[_[1]]={target:_[2],title:_[4]},{}),l:pd},23:{t:["!["],o:ia(mR),i:0,u:_=>({alt:_[1]?Qn(_[1]):void 0,ref:_[2]}),l:(_,C,S)=>E[_.ref]?h("img",{key:S.key,alt:_.alt,src:s(E[_.ref].target,"img","src"),title:E[_.ref].title}):null},24:{t:_=>_[0]==="["&&_.indexOf("](")===-1,o:aa(pR),i:0,u:(_,C,S)=>({children:C(_[1],S),fallbackChildren:_[0],ref:_[2]}),l:(_,C,S)=>E[_.ref]?h("a",{key:S.key,href:s(E[_.ref].target,"a","href"),title:E[_.ref].title},C(_.children,S)):h("span",{key:S.key},_.fallbackChildren)},25:{t:["|"],o:Sr(Tb),i:1,u:kR,l(_,C,S){const H=_;return h("table",{key:S.key},h("thead",null,h("tr",null,H.header.map(function(x,Z){return h("th",{key:Z,style:Ob(H,Z)},C(x,S))}))),h("tbody",null,H.cells.map(function(x,Z){return h("tr",{key:Z},x.map(function(W,ae){return h("td",{key:ae,style:Ob(H,ae)},C(W,S))}))})))}},27:{o:Ci(function(_,C){let S;return Vo(_,":")&&(S=OR.exec(_)),S||CR.exec(_)}),i:4,u(_){const C=_[0];return{text:C.indexOf("&")===-1?C:C.replace(iR,(S,H)=>r.namedCodesToUnicode[H]||S)}},l:_=>_.text},28:{t:["**","__"],o:ia(SR),i:2,u:(_,C,S)=>({children:C(_[2],S)}),l:(_,C,S)=>h("strong",{key:S.key},C(_.children,S))},29:{t:_=>{const C=_[0];return(C==="*"||C==="_")&&_[1]!==C},o:ia(TR),i:3,u:(_,C,S)=>({children:C(_[2],S)}),l:(_,C,S)=>h("em",{key:S.key},C(_.children,S))},30:{t:["\\"],o:ia(RR),i:1,u:_=>({text:_[1],type:"27"})},31:{t:["=="],o:ia(AR),i:3,u:hd,l:(_,C,S)=>h("mark",{key:S.key},C(_.children,S))},32:{t:["~~"],o:ia(xR),i:3,u:hd,l:(_,C,S)=>h("del",{key:S.key},C(_.children,S))}};r.disableParsingRawHTML===!0&&(delete A[11],delete A[13]);const U=function(_){var C=Object.keys(_);function S(H,x){var Z=[];if(x.prevCapture=x.prevCapture||"",H.trim())for(;H;)for(var W=0;W<C.length;){var ae=C[W],ye=_[ae];if(!ye.t||zR(H,x,ye.t)){var Ee=ye.o(H,x);if(Ee&&Ee[0]){H=H.substring(Ee[0].length);var se=ye.u(Ee,S,x);x.prevCapture+=Ee[0],se.type||(se.type=ae),Z.push(se);break}W++}else W++}return x.prevCapture="",Z}return C.sort(function(H,x){return _[H].i-_[x].i||(H<x?-1:1)}),function(H,x){return S(function(Z){return Z.replace(JO,`
|
|
109
|
-
`).replace(nR,"").replace(yR," ")}(H),x)}}(A),R=(q=function(_,C){return function(S,H,x){const Z=_[S.type].l;return C?C(()=>Z(S,H,x),S,H,x):Z(S,H,x)}}(A,r.renderRule),function _(C,S={}){if(Array.isArray(C)){const H=S.key,x=[];let Z=!1;for(let W=0;W<C.length;W++){S.key=W;const ae=_(C[W],S),ye=typeof ae=="string";ye&&Z?x[x.length-1]+=ae:ae!==null&&x.push(ae),Z=ye}return S.key=H,x}return q(C,_,S)});var q;const G=m(t);return b.length?h("div",null,G,h("footer",{key:"footer"},b.map(function(_){return h("div",{id:i(_.identifier,Is),key:_.identifier},_.identifier,R(U(_.footnote,{inline:!0})))}))):G}const Or=t=>{let{children:r="",options:i}=t,s=function(u,c){if(u==null)return{};var d,h,m={},p=Object.keys(u);for(h=0;h<p.length;h++)c.indexOf(d=p[h])>=0||(m[d]=u[d]);return m}(t,GO);return B.cloneElement(XR(r,i),s)},ZR="_generalConditionsContainer_55hjg_1",QR="_generalConditions_55hjg_1",KR="_generalConditionsHeader_55hjg_15",$R="_generalConditionsBody_55hjg_26",WR="_generalConditionsAccept_55hjg_35",zs={generalConditionsContainer:ZR,generalConditions:QR,generalConditionsHeader:KR,generalConditionsBody:$R,generalConditionsAccept:WR},JR=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"})}),ew=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"})}),tw="general-conditions.header",nw="general-conditions.body",Rb="general-conditions.accept-conditions-note",rw=()=>{const t=Ze(),[r,i]=B.useState(!1),s=()=>i(!r),u=h=>{h.key==="ArrowDown"||h.key==="ArrowRight"?i(!0):h.key==="ArrowUp"||h.key==="ArrowLeft"||h.key==="Escape"?i(!1):(h.key==="Enter"||h.key==="Space"||h.key===" ")&&s()},c=t(tw),d=t(Rb);return y.jsxs("div",{className:Q(zs.generalConditionsContainer,"chat__generalConditions"),children:[!!c?.length&&y.jsxs("div",{className:zs.generalConditions,children:[y.jsxs("div",{role:"button",onClick:s,onKeyDown:u,tabIndex:0,className:Q(zs.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":r?"true":"false","aria-pressed":r?"true":"false",children:[y.jsx(Or,{children:c}),r?y.jsx(ew,{}):y.jsx(JR,{})]}),y.jsx("div",{className:Q(zs.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:r&&y.jsx(Or,{children:t(nw)||""})})]}),!!d?.length&&y.jsx("div",{className:Q(zs.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:y.jsx(Or,{children:t(Rb)||""})})]})},aw="_messageContainer_1rxi5_1",iw="_message_1rxi5_1",sw="_messageBot_1rxi5_14",lw="_messageBotLast_1rxi5_45",ow="_avatar_1rxi5_45",uw="_messageBotFirst_1rxi5_54",cw="_messageBotAnimated_1rxi5_67",fw="_messageGuest_1rxi5_78",dw="_messageGuestFirst_1rxi5_84",hw="_messageGuestLast_1rxi5_90",mw="_botAvatar_1rxi5_104",pw="_agentAvatar_1rxi5_108",gw="_bubble_1rxi5_112",yw="_bubbleContent_1rxi5_118",bw="_bubbleLeft_1rxi5_132",vw="_leftText_1rxi5_143",_w="_bubbleRight_1rxi5_150",Ew="_rightText_1rxi5_160",Sw="_sourceInfoReference_1rxi5_192",Tw="_sourceInfoReferenceActive_1rxi5_204",ge={messageContainer:aw,message:iw,messageBot:sw,messageBotLast:lw,avatar:ow,messageBotFirst:uw,messageBotAnimated:cw,messageGuest:fw,messageGuestFirst:dw,messageGuestLast:hw,botAvatar:mw,agentAvatar:pw,bubble:gw,bubbleContent:yw,bubbleLeft:bw,leftText:vw,bubbleRight:_w,rightText:Ew,sourceInfoReference:Sw,sourceInfoReferenceActive:Tw},Zh=(t,r)=>{B.useEffect(()=>{const i=s=>{t.current&&!t.current.contains(s.target)&&r()};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t,r])};var yd,wb;function Qh(){if(wb)return yd;wb=1;function t(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return yd=t,yd}var bd,Cb;function Aw(){if(Cb)return bd;Cb=1;var t=typeof yo=="object"&&yo&&yo.Object===Object&&yo;return bd=t,bd}var vd,Nb;function Pv(){if(Nb)return vd;Nb=1;var t=Aw(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=t||r||Function("return this")();return vd=i,vd}var _d,Mb;function xw(){if(Mb)return _d;Mb=1;var t=Pv(),r=function(){return t.Date.now()};return _d=r,_d}var Ed,Db;function Ow(){if(Db)return Ed;Db=1;var t=/\s/;function r(i){for(var s=i.length;s--&&t.test(i.charAt(s)););return s}return Ed=r,Ed}var Sd,Lb;function Rw(){if(Lb)return Sd;Lb=1;var t=Ow(),r=/^\s+/;function i(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return Sd=i,Sd}var Td,Bb;function Yv(){if(Bb)return Td;Bb=1;var t=Pv(),r=t.Symbol;return Td=r,Td}var Ad,Ub;function ww(){if(Ub)return Ad;Ub=1;var t=Yv(),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,u=t?t.toStringTag:void 0;function c(d){var h=i.call(d,u),m=d[u];try{d[u]=void 0;var p=!0}catch{}var b=s.call(d);return p&&(h?d[u]=m:delete d[u]),b}return Ad=c,Ad}var xd,jb;function Cw(){if(jb)return xd;jb=1;var t=Object.prototype,r=t.toString;function i(s){return r.call(s)}return xd=i,xd}var Od,Hb;function Nw(){if(Hb)return Od;Hb=1;var t=Yv(),r=ww(),i=Cw(),s="[object Null]",u="[object Undefined]",c=t?t.toStringTag:void 0;function d(h){return h==null?h===void 0?u:s:c&&c in Object(h)?r(h):i(h)}return Od=d,Od}var Rd,Ib;function Mw(){if(Ib)return Rd;Ib=1;function t(r){return r!=null&&typeof r=="object"}return Rd=t,Rd}var wd,zb;function Dw(){if(zb)return wd;zb=1;var t=Nw(),r=Mw(),i="[object Symbol]";function s(u){return typeof u=="symbol"||r(u)&&t(u)==i}return wd=s,wd}var Cd,Gb;function Lw(){if(Gb)return Cd;Gb=1;var t=Rw(),r=Qh(),i=Dw(),s=NaN,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt;function m(p){if(typeof p=="number")return p;if(i(p))return s;if(r(p)){var b=typeof p.valueOf=="function"?p.valueOf():p;p=r(b)?b+"":b}if(typeof p!="string")return p===0?p:+p;p=t(p);var E=c.test(p);return E||d.test(p)?h(p.slice(2),E?2:8):u.test(p)?s:+p}return Cd=m,Cd}var Nd,kb;function Xv(){if(kb)return Nd;kb=1;var t=Qh(),r=xw(),i=Lw(),s="Expected a function",u=Math.max,c=Math.min;function d(h,m,p){var b,E,A,U,R,q,G=0,_=!1,C=!1,S=!0;if(typeof h!="function")throw new TypeError(s);m=i(m)||0,t(p)&&(_=!!p.leading,C="maxWait"in p,A=C?u(i(p.maxWait)||0,m):A,S="trailing"in p?!!p.trailing:S);function H(ce){var Pe=b,ve=E;return b=E=void 0,G=ce,U=h.apply(ve,Pe),U}function x(ce){return G=ce,R=setTimeout(ae,m),_?H(ce):U}function Z(ce){var Pe=ce-q,ve=ce-G,z=m-Pe;return C?c(z,A-ve):z}function W(ce){var Pe=ce-q,ve=ce-G;return q===void 0||Pe>=m||Pe<0||C&&ve>=A}function ae(){var ce=r();if(W(ce))return ye(ce);R=setTimeout(ae,Z(ce))}function ye(ce){return R=void 0,S&&b?H(ce):(b=E=void 0,U)}function Ee(){R!==void 0&&clearTimeout(R),G=0,b=q=E=R=void 0}function se(){return R===void 0?U:ye(r())}function me(){var ce=r(),Pe=W(ce);if(b=arguments,E=this,q=ce,Pe){if(R===void 0)return x(q);if(C)return clearTimeout(R),R=setTimeout(ae,m),H(q)}return R===void 0&&(R=setTimeout(ae,m)),U}return me.cancel=Ee,me.flush=se,me}return Nd=d,Nd}var Bw=Xv();const Uw=lu(Bw),jw="_container_131ib_1",Hw="_categoryContainer_131ib_13",Iw="_categoryButton_131ib_20",zw="_active_131ib_35",Gw="_commentTextarea_131ib_44",Gs={container:jw,categoryContainer:Hw,categoryButton:Iw,active:zw,commentTextarea:Gw},kw=(t,r,i)=>{B.useEffect(()=>{if(t){const s=()=>{const c=["button:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"a[href]","input:not([disabled])","select:not([disabled])"].join(","),d=r.current?Array.from(r.current.querySelectorAll(c)):[],h=i.current?Array.from(i.current.querySelectorAll(c)):[];return[...d,...h]},u=c=>{if(c.key==="Tab"){const d=s();if(d.length>0){const h=d[0],m=d[d.length-1],p=document.activeElement;!c.shiftKey&&p===m?(c.preventDefault(),h.focus()):c.shiftKey&&p===h&&(c.preventDefault(),m.focus())}}};return document.addEventListener("keydown",u,!0),()=>{document.removeEventListener("keydown",u,!0)}}},[t,r,i])},qw=({open:t,actionsRef:r,reaction:i,onReaction:s})=>{const u=Ze(),c=B.useRef(null),d=B.useRef(Uw(p=>{s({...i,comment:p})},300));B.useEffect(()=>{const p=d.current;return()=>p.flush()},[]),kw(t,r,c);const h=p=>{s({...i,category:i.category===p?void 0:p})},m=p=>d.current(p.target.value);return t?y.jsxs("div",{ref:c,className:Gs.container,role:"dialog","aria-modal":"true","aria-labelledby":"bad-reaction-title",children:[y.jsx("h2",{id:"bad-reaction-title",children:u("bot-bubble.reaction.say-more")}),y.jsx("div",{className:Gs.categoryContainer,role:"radiogroup",children:["WRONG_INFORMATION","MISSING_INFORMATION","OLD_INFORMATION","UNCLEAR","OFF_TOPIC"].map(p=>y.jsx("button",{className:Q(Gs.categoryButton,i?.category===p&&Gs.active),onClick:()=>h(p),"aria-pressed":i?.category===p,"aria-label":u(`bot-bubble.reaction.category.${p}`),tabIndex:0,role:"radio",children:u(`bot-bubble.reaction.category.${p}`)},p))}),y.jsx("textarea",{id:"comment",name:"comment",placeholder:u("bot-bubble.reaction.comment"),defaultValue:i?.comment,onChange:m,className:Gs.commentTextarea,rows:3,"aria-label":u("bot-bubble.reaction.comment")})]}):null},Fw="_botMessageActionContainer_18fjb_1",Vw="_alwaysVisible_18fjb_15",Pw="_active_18fjb_19",Yw="_botMessageActionInnerContainer_18fjb_27",Xw="_header_18fjb_52",Zw="_botMessageActions_18fjb_57",Qw="_reported_18fjb_68",Kw="_action_18fjb_72",$w="_wave_18fjb_86",Ww="_anyReport_18fjb_156",Jw="_closeButton_18fjb_172",nt={botMessageActionContainer:Fw,alwaysVisible:Vw,active:Pw,botMessageActionInnerContainer:Yw,header:Xw,botMessageActions:Zw,reported:Qw,action:Kw,wave:$w,anyReport:Ww,closeButton:Jw},e6=({isSubmitting:t,onClick:r})=>{const i=Ze();return y.jsx("button",{className:Q(nt.action,nt.closeButton,"tooltip--bottom-left"),"aria-label":i("bot-bubble.reaction.close"),"data-title":i("bot-bubble.reaction.close"),tabIndex:0,onClick:r,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:t?y.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):y.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})})},t6=({alwaysVisible:t,senderType:r,reaction:i,botMessageRef:s,message:u,onReaction:c})=>{const d=Ze(),[h,m]=B.useState(!1),[p,b]=B.useState(!1),[E,A]=B.useState(!1),U=B.useRef(null),R=B.useRef(null);Zh(U,()=>{A(!1)});const q=x=>{x.key==="Escape"&&A(!1)};B.useEffect(()=>(document.addEventListener("keydown",q),()=>{document.removeEventListener("keydown",q)}),[]),B.useEffect(()=>{E&&U.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[E]);const G=x=>{R.current&&clearTimeout(R.current),b(!0),c(x),R.current=setTimeout(()=>{b(!1)},1e3)},_=B.useCallback(async()=>{if(s.current)try{m(!0);const x=s.current.innerHTML,Z=s.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([x],{type:"text/html"}),"text/plain":new Blob([Z],{type:"text/plain"})})]),await new Promise(W=>setTimeout(W,1500))}finally{m(!1)}},[s]),C=()=>{A(!1),c(i?.type==="GOOD"?null:{type:"GOOD"})},S=()=>{c({...u.reaction,type:"BAD"}),A(!E)},H=x=>Z=>{(Z.key==="Enter"||Z.key===" ")&&x()};return y.jsx("div",{ref:U,className:Q(nt.botMessageActionContainer,t&&nt.alwaysVisible,E&&nt.active),children:y.jsxs("div",{className:Q(nt.botMessageActionInnerContainer,t&&nt.alwaysVisible,E&&nt.active,i&&nt.reported),role:"group",children:[y.jsxs("div",{className:nt.header,children:[y.jsxs("div",{className:Q(nt.botMessageActions,i&&nt.reported),children:[r===au.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="GOOD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),"aria-pressed":i?.type==="GOOD","data-title":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),onPointerDown:C,onKeyDown:H(C),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="GOOD"?y.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"}):y.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"})})}),r===au.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="BAD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d("bot-bubble.reaction.bad"),"aria-pressed":i?.type==="BAD","data-title":d("bot-bubble.reaction.bad"),onPointerDown:S,onKeyDown:H(S),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="BAD"?y.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z"}):y.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"})})}),y.jsx("button",{className:Q(nt.action,nt.wave,"tooltip--top-right"),style:{visibility:E?"hidden":"visible"},tabIndex:0,"aria-label":d("bot-bubble.copy"),"data-title":d("bot-bubble.copy"),onClick:_,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:h?y.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):y.jsx("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"})})})]}),E&&y.jsx(e6,{isSubmitting:p,onClick:()=>A(!1)})]}),u.reaction&&y.jsx(qw,{open:E,actionsRef:U,reaction:u.reaction,onReaction:G})]})})},Zv=B.forwardRef(({message:t,isAnimated:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,children:c,onReaction:d},h)=>{const m=Ze(),p=B.useRef(null),b=t.sender.type===Te.UserType.BOT;return y.jsxs("li",{ref:h,className:Q(ge.message,ge.messageBot,i&&ge.lastMessage,s&&ge.messageBotFirst,u&&ge.messageBotLast,"chat__bubbleContainer",r&&ge.messageBotAnimated,r&&"chat__bubbleContainer--animated",b?"chat__botBubbleContainer":"chat__agentBubbleContainer",s&&"chat__bubbleContainer--first",u&&"chat__bubbleContainer--last"),children:[y.jsx("img",{className:Q(ge.avatar,b?ge.botAvatar:ge.agentAvatar,"chat__avatar",b?"chat__botAvatar":"chat__agentAvatar"),src:`${t.sender.avatar}`,alt:b?"Bot":"Agent",referrerPolicy:"no-referrer"}),y.jsxs("div",{className:ge.messageContainer,children:[y.jsx("div",{ref:p,className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble",b?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":m(b?"bot-bubble.label":"agent-bubble.label"),children:y.jsx("div",{className:Q(ge.leftText),children:c})}),d&&y.jsx(t6,{alwaysVisible:i&&u,senderType:t.sender.type,reaction:t.reaction,message:t,botMessageRef:p,onReaction:d})]})]})}),n6="_sourceList_1n31h_1",r6="_source_1n31h_1",a6="_label_1n31h_37",Md={sourceList:n6,source:r6,label:a6},Qv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),Kv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"})}),$v=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"})}),Wv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"})}),i6=({type:t,...r})=>{switch(t){case"WEBSITE":return y.jsx(Wv,{...r});case"PDF":return y.jsx($v,{...r});case"DOCX":return y.jsx(Qv,{...r});default:return y.jsx(Kv,{...r})}},Kh=({sources:t,onLinkClick:r})=>{const i=Ze(),s=c=>()=>{r(c.url)},u=c=>d=>{(d.key==="Enter"||d.key===" ")&&r(c.url)};return t.length?y.jsx("ul",{className:Md.sourceList,"aria-label":i("bot-bubble.sources"),children:t.map(c=>y.jsx("li",{className:Md.source,children:y.jsxs("a",{role:"button",tabIndex:0,"aria-label":`${i("bot-bubble.source.open")}: ${c.label}`,onClick:s(c),onKeyDown:u(c),children:[y.jsx(i6,{type:c.type,"aria-hidden":"true"}),y.jsx("div",{className:Md.label,children:c.label})]})},c.url))}):null},s6="_button_3ui4g_1",l6="_buttonDefault_3ui4g_13",o6="_buttonPrimary_3ui4g_28",el={button:s6,buttonDefault:l6,buttonPrimary:o6},Eu=({className:t,children:r,...i})=>y.jsx("button",{className:Q(el.button,t),type:"button",role:"button",...i,children:r}),u6="_title_137pi_1",c6="_buttons_137pi_6",f6="_button_137pi_6",d6="_imageContainer_137pi_29",h6="_image_137pi_29",m6="_video_container_137pi_44",p6="_video_137pi_44",g6="_only_137pi_58",on={title:u6,buttons:c6,button:f6,imageContainer:d6,image:h6,video_container:m6,video:p6,only:g6},y6=({buttons:t,onButtonClick:r})=>y.jsx("div",{className:Q(on.buttons,"chat__bubbleButtons"),children:t.map((i,s)=>y.jsx(Eu,{className:Q(on.button,"chat__bubbleButton"),onClick:()=>r(i),children:i.title},s))}),qb="newtab#",Jv=({markdown:t,markdownOptions:r={},onLinkClick:i})=>{const s=c=>d=>(d.preventDefault(),c&&i(c),!1),u=({title:c,href:d,children:h})=>d.indexOf(qb)===0?y.jsx("a",{href:d.slice(qb.length),title:c,target:"_blank",rel:"noopener noreferrer",children:h}):y.jsx("a",{onClick:s(d),title:c,href:d,children:h});return y.jsx(Or,{options:{...r,overrides:{a:u}},children:t})},b6=({text:t,onLinkClick:r})=>t?y.jsx("div",{children:y.jsx(Jv,{markdown:t,onLinkClick:r})}):null,v6=({title:t})=>t?y.jsx("h1",{className:on.title,children:t}):null,_6=({title:t,text:r,buttons:i,onButtonClick:s,onLinkClick:u})=>t?.length||r?.length||i?.length?y.jsxs("div",{className:Q(ge.bubbleContent),children:[y.jsx(v6,{title:t}),y.jsx(b6,{text:r,onLinkClick:u}),y.jsx(y6,{buttons:i,onButtonClick:s})]}):null,E6=({alt:t,imageUrl:r,itemUrl:i,hasBody:s})=>r?i?i.indexOf("youtube.com")>-1?y.jsx("div",{className:on.video_container,children:y.jsx("iframe",{className:Q(on.video,{[on.only]:!s}),title:"Youtube",width:"100%",src:i+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):y.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})})}):y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})}):null,S6=({title:t,text:r,imageUrl:i,itemUrl:s,buttons:u,sources:c,onButtonClick:d,onLinkClick:h})=>{const m=!!t?.length||!!r?.length||!!u?.length;return y.jsxs("div",{className:Q(on.detailMessage),children:[y.jsx(E6,{hasBody:m,imageUrl:i,itemUrl:s,alt:t||""}),m&&y.jsx(_6,{title:t,text:r,buttons:u,onLinkClick:h,onButtonClick:d}),y.jsx(Kh,{sources:c,onLinkClick:h})]})},T6=B.forwardRef(({isFirstMessageBySender:t,isLastMessageBySender:r,children:i},s)=>{const u=Ze();return y.jsx("li",{ref:s,className:Q(ge.message,ge.messageGuest,t&&ge.messageGuestFirst,r&&ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",t&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:y.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":u("guest-bubble.label"),children:y.jsx("div",{className:Q(ge.rightText),children:i})})})}),A6="_markdown_nw7vg_1",e_={markdown:A6},t_=()=>x6(window.location.pathname),x6=t=>{const r=t.split("/"),i=t.endsWith("/");return r[r.length-(i?2:1)]},Su=()=>B.useMemo(()=>t_(),[]),Ho="source-info-reference",O6=({actionId:t,markdown:r,sources:i,onLinkClick:s})=>{const u=Su(),c=Nr(),d=R6(),h=st(b=>{const E=b.chat.sourceInfos;if(E?.type==="loaded"||E?.type==="loading")return E.chunkId}),m=b=>E=>{const A=E.key;(A==="ArrowDown"||A==="ArrowRight"||A==="Enter"||A===" "||A==="Space")&&(E.stopPropagation(),c(fb(u,t,b)))},p=b=>()=>{c(fb(u,t,b))};return B.useLayoutEffect(()=>{document.querySelectorAll(`.${Ho}`).forEach(b=>{const E=b.previousSibling;E&&E.nodeType===Node.TEXT_NODE&&E.textContent?.endsWith(" ")&&E.textContent?.trim().length&&b.classList.add(`${Ho}--before-space`);const A=b.nextSibling;A&&A.nodeType===Node.TEXT_NODE&&A.textContent?.startsWith(" ")&&A.textContent?.trim().length&&b.classList.add(`${Ho}--after-space`)})},[r]),y.jsxs("div",{className:ge.bubbleContent,children:[y.jsx("div",{className:e_.markdown,children:y.jsx(Jv,{markdown:r,onLinkClick:s,markdownOptions:{renderRule(b,E,A,U){if(E.type===kO.footnoteReference){const R=E.text===h;return y.jsx("span",{className:Q(ge.sourceInfoReference,R&&ge.sourceInfoReferenceActive,Ho),children:y.jsx("a",{type:"button",tabIndex:0,onClick:p(E.text),onKeyDown:m(E.text),children:d(E.text)})},U.key)}return b()}}})}),y.jsx(Kh,{sources:i,onLinkClick:s})]})},R6=()=>{const t=[];return i=>{const s=t.indexOf(i);return s>-1?s+1:(t.push(i),t.length)}},w6="_text_gp0s0_1",C6="_command_gp0s0_5",Fb={text:w6,command:C6},N6=({text:t,commands:r=[]})=>{const i=r.find(u=>t.startsWith(`/${u}`)),s=i?t.slice(i.length+1):t;return y.jsxs("div",{children:[i&&y.jsxs("code",{className:Fb.command,children:["/",i]}),s.split(`
|
|
108
|
+
`,!c.some(Z=>Z.test(x))&&(S+=x,!!x.trim())));const H=$s(S);return H===""?null:[S,,H]}),i:3,u:hd,l:(_,C,S)=>h("p",{key:S.key},C(_.children,S))},22:{t:["["],o:aa(hR),i:0,u:_=>(E[_[1]]={target:_[2],title:_[4]},{}),l:pd},23:{t:["!["],o:ia(mR),i:0,u:_=>({alt:_[1]?Qn(_[1]):void 0,ref:_[2]}),l:(_,C,S)=>E[_.ref]?h("img",{key:S.key,alt:_.alt,src:s(E[_.ref].target,"img","src"),title:E[_.ref].title}):null},24:{t:_=>_[0]==="["&&_.indexOf("](")===-1,o:aa(pR),i:0,u:(_,C,S)=>({children:C(_[1],S),fallbackChildren:_[0],ref:_[2]}),l:(_,C,S)=>E[_.ref]?h("a",{key:S.key,href:s(E[_.ref].target,"a","href"),title:E[_.ref].title},C(_.children,S)):h("span",{key:S.key},_.fallbackChildren)},25:{t:["|"],o:Sr(Tb),i:1,u:kR,l(_,C,S){const H=_;return h("table",{key:S.key},h("thead",null,h("tr",null,H.header.map(function(x,Z){return h("th",{key:Z,style:Ob(H,Z)},C(x,S))}))),h("tbody",null,H.cells.map(function(x,Z){return h("tr",{key:Z},x.map(function(W,ae){return h("td",{key:ae,style:Ob(H,ae)},C(W,S))}))})))}},27:{o:Ci(function(_,C){let S;return Vo(_,":")&&(S=OR.exec(_)),S||CR.exec(_)}),i:4,u(_){const C=_[0];return{text:C.indexOf("&")===-1?C:C.replace(iR,(S,H)=>r.namedCodesToUnicode[H]||S)}},l:_=>_.text},28:{t:["**","__"],o:ia(SR),i:2,u:(_,C,S)=>({children:C(_[2],S)}),l:(_,C,S)=>h("strong",{key:S.key},C(_.children,S))},29:{t:_=>{const C=_[0];return(C==="*"||C==="_")&&_[1]!==C},o:ia(TR),i:3,u:(_,C,S)=>({children:C(_[2],S)}),l:(_,C,S)=>h("em",{key:S.key},C(_.children,S))},30:{t:["\\"],o:ia(RR),i:1,u:_=>({text:_[1],type:"27"})},31:{t:["=="],o:ia(AR),i:3,u:hd,l:(_,C,S)=>h("mark",{key:S.key},C(_.children,S))},32:{t:["~~"],o:ia(xR),i:3,u:hd,l:(_,C,S)=>h("del",{key:S.key},C(_.children,S))}};r.disableParsingRawHTML===!0&&(delete A[11],delete A[13]);const U=(function(_){var C=Object.keys(_);function S(H,x){var Z=[];if(x.prevCapture=x.prevCapture||"",H.trim())for(;H;)for(var W=0;W<C.length;){var ae=C[W],ye=_[ae];if(!ye.t||zR(H,x,ye.t)){var Ee=ye.o(H,x);if(Ee&&Ee[0]){H=H.substring(Ee[0].length);var se=ye.u(Ee,S,x);x.prevCapture+=Ee[0],se.type||(se.type=ae),Z.push(se);break}W++}else W++}return x.prevCapture="",Z}return C.sort(function(H,x){return _[H].i-_[x].i||(H<x?-1:1)}),function(H,x){return S((function(Z){return Z.replace(JO,`
|
|
109
|
+
`).replace(nR,"").replace(yR," ")})(H),x)}})(A),R=(q=(function(_,C){return function(S,H,x){const Z=_[S.type].l;return C?C(()=>Z(S,H,x),S,H,x):Z(S,H,x)}})(A,r.renderRule),function _(C,S={}){if(Array.isArray(C)){const H=S.key,x=[];let Z=!1;for(let W=0;W<C.length;W++){S.key=W;const ae=_(C[W],S),ye=typeof ae=="string";ye&&Z?x[x.length-1]+=ae:ae!==null&&x.push(ae),Z=ye}return S.key=H,x}return q(C,_,S)});var q;const G=m(t);return b.length?h("div",null,G,h("footer",{key:"footer"},b.map(function(_){return h("div",{id:i(_.identifier,Is),key:_.identifier},_.identifier,R(U(_.footnote,{inline:!0})))}))):G}const Or=t=>{let{children:r="",options:i}=t,s=(function(u,c){if(u==null)return{};var d,h,m={},p=Object.keys(u);for(h=0;h<p.length;h++)c.indexOf(d=p[h])>=0||(m[d]=u[d]);return m})(t,GO);return B.cloneElement(XR(r,i),s)},ZR="_generalConditionsContainer_55hjg_1",QR="_generalConditions_55hjg_1",KR="_generalConditionsHeader_55hjg_15",$R="_generalConditionsBody_55hjg_26",WR="_generalConditionsAccept_55hjg_35",zs={generalConditionsContainer:ZR,generalConditions:QR,generalConditionsHeader:KR,generalConditionsBody:$R,generalConditionsAccept:WR},JR=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"})}),ew=()=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"})}),tw="general-conditions.header",nw="general-conditions.body",Rb="general-conditions.accept-conditions-note",rw=()=>{const t=Ze(),[r,i]=B.useState(!1),s=()=>i(!r),u=h=>{h.key==="ArrowDown"||h.key==="ArrowRight"?i(!0):h.key==="ArrowUp"||h.key==="ArrowLeft"||h.key==="Escape"?i(!1):(h.key==="Enter"||h.key==="Space"||h.key===" ")&&s()},c=t(tw),d=t(Rb);return y.jsxs("div",{className:Q(zs.generalConditionsContainer,"chat__generalConditions"),children:[!!c?.length&&y.jsxs("div",{className:zs.generalConditions,children:[y.jsxs("div",{role:"button",onClick:s,onKeyDown:u,tabIndex:0,className:Q(zs.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":r?"true":"false","aria-pressed":r?"true":"false",children:[y.jsx(Or,{children:c}),r?y.jsx(ew,{}):y.jsx(JR,{})]}),y.jsx("div",{className:Q(zs.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:r&&y.jsx(Or,{children:t(nw)||""})})]}),!!d?.length&&y.jsx("div",{className:Q(zs.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:y.jsx(Or,{children:t(Rb)||""})})]})},aw="_messageContainer_1rxi5_1",iw="_message_1rxi5_1",sw="_messageBot_1rxi5_14",lw="_messageBotLast_1rxi5_45",ow="_avatar_1rxi5_45",uw="_messageBotFirst_1rxi5_54",cw="_messageBotAnimated_1rxi5_67",fw="_messageGuest_1rxi5_78",dw="_messageGuestFirst_1rxi5_84",hw="_messageGuestLast_1rxi5_90",mw="_botAvatar_1rxi5_104",pw="_agentAvatar_1rxi5_108",gw="_bubble_1rxi5_112",yw="_bubbleContent_1rxi5_118",bw="_bubbleLeft_1rxi5_132",vw="_leftText_1rxi5_143",_w="_bubbleRight_1rxi5_150",Ew="_rightText_1rxi5_160",Sw="_sourceInfoReference_1rxi5_192",Tw="_sourceInfoReferenceActive_1rxi5_204",ge={messageContainer:aw,message:iw,messageBot:sw,messageBotLast:lw,avatar:ow,messageBotFirst:uw,messageBotAnimated:cw,messageGuest:fw,messageGuestFirst:dw,messageGuestLast:hw,botAvatar:mw,agentAvatar:pw,bubble:gw,bubbleContent:yw,bubbleLeft:bw,leftText:vw,bubbleRight:_w,rightText:Ew,sourceInfoReference:Sw,sourceInfoReferenceActive:Tw},Zh=(t,r)=>{B.useEffect(()=>{const i=s=>{t.current&&!t.current.contains(s.target)&&r()};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t,r])};var yd,wb;function Qh(){if(wb)return yd;wb=1;function t(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return yd=t,yd}var bd,Cb;function Aw(){if(Cb)return bd;Cb=1;var t=typeof yo=="object"&&yo&&yo.Object===Object&&yo;return bd=t,bd}var vd,Nb;function Pv(){if(Nb)return vd;Nb=1;var t=Aw(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=t||r||Function("return this")();return vd=i,vd}var _d,Mb;function xw(){if(Mb)return _d;Mb=1;var t=Pv(),r=function(){return t.Date.now()};return _d=r,_d}var Ed,Db;function Ow(){if(Db)return Ed;Db=1;var t=/\s/;function r(i){for(var s=i.length;s--&&t.test(i.charAt(s)););return s}return Ed=r,Ed}var Sd,Lb;function Rw(){if(Lb)return Sd;Lb=1;var t=Ow(),r=/^\s+/;function i(s){return s&&s.slice(0,t(s)+1).replace(r,"")}return Sd=i,Sd}var Td,Bb;function Yv(){if(Bb)return Td;Bb=1;var t=Pv(),r=t.Symbol;return Td=r,Td}var Ad,Ub;function ww(){if(Ub)return Ad;Ub=1;var t=Yv(),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,u=t?t.toStringTag:void 0;function c(d){var h=i.call(d,u),m=d[u];try{d[u]=void 0;var p=!0}catch{}var b=s.call(d);return p&&(h?d[u]=m:delete d[u]),b}return Ad=c,Ad}var xd,jb;function Cw(){if(jb)return xd;jb=1;var t=Object.prototype,r=t.toString;function i(s){return r.call(s)}return xd=i,xd}var Od,Hb;function Nw(){if(Hb)return Od;Hb=1;var t=Yv(),r=ww(),i=Cw(),s="[object Null]",u="[object Undefined]",c=t?t.toStringTag:void 0;function d(h){return h==null?h===void 0?u:s:c&&c in Object(h)?r(h):i(h)}return Od=d,Od}var Rd,Ib;function Mw(){if(Ib)return Rd;Ib=1;function t(r){return r!=null&&typeof r=="object"}return Rd=t,Rd}var wd,zb;function Dw(){if(zb)return wd;zb=1;var t=Nw(),r=Mw(),i="[object Symbol]";function s(u){return typeof u=="symbol"||r(u)&&t(u)==i}return wd=s,wd}var Cd,Gb;function Lw(){if(Gb)return Cd;Gb=1;var t=Rw(),r=Qh(),i=Dw(),s=NaN,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt;function m(p){if(typeof p=="number")return p;if(i(p))return s;if(r(p)){var b=typeof p.valueOf=="function"?p.valueOf():p;p=r(b)?b+"":b}if(typeof p!="string")return p===0?p:+p;p=t(p);var E=c.test(p);return E||d.test(p)?h(p.slice(2),E?2:8):u.test(p)?s:+p}return Cd=m,Cd}var Nd,kb;function Xv(){if(kb)return Nd;kb=1;var t=Qh(),r=xw(),i=Lw(),s="Expected a function",u=Math.max,c=Math.min;function d(h,m,p){var b,E,A,U,R,q,G=0,_=!1,C=!1,S=!0;if(typeof h!="function")throw new TypeError(s);m=i(m)||0,t(p)&&(_=!!p.leading,C="maxWait"in p,A=C?u(i(p.maxWait)||0,m):A,S="trailing"in p?!!p.trailing:S);function H(ce){var Pe=b,ve=E;return b=E=void 0,G=ce,U=h.apply(ve,Pe),U}function x(ce){return G=ce,R=setTimeout(ae,m),_?H(ce):U}function Z(ce){var Pe=ce-q,ve=ce-G,z=m-Pe;return C?c(z,A-ve):z}function W(ce){var Pe=ce-q,ve=ce-G;return q===void 0||Pe>=m||Pe<0||C&&ve>=A}function ae(){var ce=r();if(W(ce))return ye(ce);R=setTimeout(ae,Z(ce))}function ye(ce){return R=void 0,S&&b?H(ce):(b=E=void 0,U)}function Ee(){R!==void 0&&clearTimeout(R),G=0,b=q=E=R=void 0}function se(){return R===void 0?U:ye(r())}function me(){var ce=r(),Pe=W(ce);if(b=arguments,E=this,q=ce,Pe){if(R===void 0)return x(q);if(C)return clearTimeout(R),R=setTimeout(ae,m),H(q)}return R===void 0&&(R=setTimeout(ae,m)),U}return me.cancel=Ee,me.flush=se,me}return Nd=d,Nd}var Bw=Xv();const Uw=lu(Bw),jw="_container_131ib_1",Hw="_categoryContainer_131ib_13",Iw="_categoryButton_131ib_20",zw="_active_131ib_35",Gw="_commentTextarea_131ib_44",Gs={container:jw,categoryContainer:Hw,categoryButton:Iw,active:zw,commentTextarea:Gw},kw=(t,r,i)=>{B.useEffect(()=>{if(t){const s=()=>{const c=["button:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"a[href]","input:not([disabled])","select:not([disabled])"].join(","),d=r.current?Array.from(r.current.querySelectorAll(c)):[],h=i.current?Array.from(i.current.querySelectorAll(c)):[];return[...d,...h]},u=c=>{if(c.key==="Tab"){const d=s();if(d.length>0){const h=d[0],m=d[d.length-1],p=document.activeElement;!c.shiftKey&&p===m?(c.preventDefault(),h.focus()):c.shiftKey&&p===h&&(c.preventDefault(),m.focus())}}};return document.addEventListener("keydown",u,!0),()=>{document.removeEventListener("keydown",u,!0)}}},[t,r,i])},qw=({open:t,actionsRef:r,reaction:i,onReaction:s})=>{const u=Ze(),c=B.useRef(null),d=B.useRef(Uw(p=>{s({...i,comment:p})},300));B.useEffect(()=>{const p=d.current;return()=>p.flush()},[]),kw(t,r,c);const h=p=>{s({...i,category:i.category===p?void 0:p})},m=p=>d.current(p.target.value);return t?y.jsxs("div",{ref:c,className:Gs.container,role:"dialog","aria-modal":"true","aria-labelledby":"bad-reaction-title",children:[y.jsx("h2",{id:"bad-reaction-title",children:u("bot-bubble.reaction.say-more")}),y.jsx("div",{className:Gs.categoryContainer,role:"radiogroup",children:["WRONG_INFORMATION","MISSING_INFORMATION","OLD_INFORMATION","UNCLEAR","OFF_TOPIC"].map(p=>y.jsx("button",{className:Q(Gs.categoryButton,i?.category===p&&Gs.active),onClick:()=>h(p),"aria-pressed":i?.category===p,"aria-label":u(`bot-bubble.reaction.category.${p}`),tabIndex:0,role:"radio",children:u(`bot-bubble.reaction.category.${p}`)},p))}),y.jsx("textarea",{id:"comment",name:"comment",placeholder:u("bot-bubble.reaction.comment"),defaultValue:i?.comment,onChange:m,className:Gs.commentTextarea,rows:3,"aria-label":u("bot-bubble.reaction.comment")})]}):null},Fw="_botMessageActionContainer_18fjb_1",Vw="_alwaysVisible_18fjb_15",Pw="_active_18fjb_19",Yw="_botMessageActionInnerContainer_18fjb_27",Xw="_header_18fjb_52",Zw="_botMessageActions_18fjb_57",Qw="_reported_18fjb_68",Kw="_action_18fjb_72",$w="_wave_18fjb_86",Ww="_anyReport_18fjb_156",Jw="_closeButton_18fjb_172",nt={botMessageActionContainer:Fw,alwaysVisible:Vw,active:Pw,botMessageActionInnerContainer:Yw,header:Xw,botMessageActions:Zw,reported:Qw,action:Kw,wave:$w,anyReport:Ww,closeButton:Jw},e6=({isSubmitting:t,onClick:r})=>{const i=Ze();return y.jsx("button",{className:Q(nt.action,nt.closeButton,"tooltip--bottom-left"),"aria-label":i("bot-bubble.reaction.close"),"data-title":i("bot-bubble.reaction.close"),tabIndex:0,onClick:r,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:t?y.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):y.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})})},t6=({alwaysVisible:t,senderType:r,reaction:i,botMessageRef:s,message:u,onReaction:c})=>{const d=Ze(),[h,m]=B.useState(!1),[p,b]=B.useState(!1),[E,A]=B.useState(!1),U=B.useRef(null),R=B.useRef(null);Zh(U,()=>{A(!1)});const q=x=>{x.key==="Escape"&&A(!1)};B.useEffect(()=>(document.addEventListener("keydown",q),()=>{document.removeEventListener("keydown",q)}),[]),B.useEffect(()=>{E&&U.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[E]);const G=x=>{R.current&&clearTimeout(R.current),b(!0),c(x),R.current=setTimeout(()=>{b(!1)},1e3)},_=B.useCallback(async()=>{if(s.current)try{m(!0);const x=s.current.innerHTML,Z=s.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([x],{type:"text/html"}),"text/plain":new Blob([Z],{type:"text/plain"})})]),await new Promise(W=>setTimeout(W,1500))}finally{m(!1)}},[s]),C=()=>{A(!1),c(i?.type==="GOOD"?null:{type:"GOOD"})},S=()=>{c({...u.reaction,type:"BAD"}),A(!E)},H=x=>Z=>{(Z.key==="Enter"||Z.key===" ")&&x()};return y.jsx("div",{ref:U,className:Q(nt.botMessageActionContainer,t&&nt.alwaysVisible,E&&nt.active),children:y.jsxs("div",{className:Q(nt.botMessageActionInnerContainer,t&&nt.alwaysVisible,E&&nt.active,i&&nt.reported),role:"group",children:[y.jsxs("div",{className:nt.header,children:[y.jsxs("div",{className:Q(nt.botMessageActions,i&&nt.reported),children:[r===au.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="GOOD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),"aria-pressed":i?.type==="GOOD","data-title":d(i?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),onPointerDown:C,onKeyDown:H(C),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="GOOD"?y.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"}):y.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"})})}),r===au.BOT&&y.jsx("button",{className:Q(nt.action,nt.wave,i?.type&&nt.anyReport,i?.type==="BAD"&&nt.reported,"tooltip--top-right"),tabIndex:0,"aria-label":d("bot-bubble.reaction.bad"),"aria-pressed":i?.type==="BAD","data-title":d("bot-bubble.reaction.bad"),onPointerDown:S,onKeyDown:H(S),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:i?.type==="BAD"?y.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z"}):y.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"})})}),y.jsx("button",{className:Q(nt.action,nt.wave,"tooltip--top-right"),style:{visibility:E?"hidden":"visible"},tabIndex:0,"aria-label":d("bot-bubble.copy"),"data-title":d("bot-bubble.copy"),onClick:_,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:h?y.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):y.jsx("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"})})})]}),E&&y.jsx(e6,{isSubmitting:p,onClick:()=>A(!1)})]}),u.reaction&&y.jsx(qw,{open:E,actionsRef:U,reaction:u.reaction,onReaction:G})]})})},Zv=B.forwardRef(({message:t,isAnimated:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,children:c,onReaction:d},h)=>{const m=Ze(),p=B.useRef(null),b=t.sender.type===Te.UserType.BOT;return y.jsxs("li",{ref:h,className:Q(ge.message,ge.messageBot,i&&ge.lastMessage,s&&ge.messageBotFirst,u&&ge.messageBotLast,"chat__bubbleContainer",r&&ge.messageBotAnimated,r&&"chat__bubbleContainer--animated",b?"chat__botBubbleContainer":"chat__agentBubbleContainer",s&&"chat__bubbleContainer--first",u&&"chat__bubbleContainer--last"),children:[y.jsx("img",{className:Q(ge.avatar,b?ge.botAvatar:ge.agentAvatar,"chat__avatar",b?"chat__botAvatar":"chat__agentAvatar"),src:`${t.sender.avatar}`,alt:b?"Bot":"Agent",referrerPolicy:"no-referrer"}),y.jsxs("div",{className:ge.messageContainer,children:[y.jsx("div",{ref:p,className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble",b?"chat__botBubble":"chat__agentBubble"),tabIndex:0,"aria-label":m(b?"bot-bubble.label":"agent-bubble.label"),children:y.jsx("div",{className:Q(ge.leftText),children:c})}),d&&y.jsx(t6,{alwaysVisible:i&&u,senderType:t.sender.type,reaction:t.reaction,message:t,botMessageRef:p,onReaction:d})]})]})}),n6="_sourceList_1n31h_1",r6="_source_1n31h_1",a6="_label_1n31h_37",Md={sourceList:n6,source:r6,label:a6},Qv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),Kv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"})}),$v=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"})}),Wv=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"})}),i6=({type:t,...r})=>{switch(t){case"WEBSITE":return y.jsx(Wv,{...r});case"PDF":return y.jsx($v,{...r});case"DOCX":return y.jsx(Qv,{...r});default:return y.jsx(Kv,{...r})}},Kh=({sources:t,onLinkClick:r})=>{const i=Ze(),s=c=>()=>{r(c.url)},u=c=>d=>{(d.key==="Enter"||d.key===" ")&&r(c.url)};return t.length?y.jsx("ul",{className:Md.sourceList,"aria-label":i("bot-bubble.sources"),children:t.map(c=>y.jsx("li",{className:Md.source,children:y.jsxs("a",{role:"button",tabIndex:0,"aria-label":`${i("bot-bubble.source.open")}: ${c.label}`,onClick:s(c),onKeyDown:u(c),children:[y.jsx(i6,{type:c.type,"aria-hidden":"true"}),y.jsx("div",{className:Md.label,children:c.label})]})},c.url))}):null},s6="_button_3ui4g_1",l6="_buttonDefault_3ui4g_13",o6="_buttonPrimary_3ui4g_28",el={button:s6,buttonDefault:l6,buttonPrimary:o6},Eu=({className:t,children:r,...i})=>y.jsx("button",{className:Q(el.button,t),type:"button",role:"button",...i,children:r}),u6="_title_137pi_1",c6="_buttons_137pi_6",f6="_button_137pi_6",d6="_imageContainer_137pi_29",h6="_image_137pi_29",m6="_video_container_137pi_44",p6="_video_137pi_44",g6="_only_137pi_58",on={title:u6,buttons:c6,button:f6,imageContainer:d6,image:h6,video_container:m6,video:p6,only:g6},y6=({buttons:t,onButtonClick:r})=>y.jsx("div",{className:Q(on.buttons,"chat__bubbleButtons"),children:t.map((i,s)=>y.jsx(Eu,{className:Q(on.button,"chat__bubbleButton"),onClick:()=>r(i),children:i.title},s))}),qb="newtab#",Jv=({markdown:t,markdownOptions:r={},onLinkClick:i})=>{const s=c=>d=>(d.preventDefault(),c&&i(c),!1),u=({title:c,href:d,children:h})=>d.indexOf(qb)===0?y.jsx("a",{href:d.slice(qb.length),title:c,target:"_blank",rel:"noopener noreferrer",children:h}):y.jsx("a",{onClick:s(d),title:c,href:d,children:h});return y.jsx(Or,{options:{...r,overrides:{a:u}},children:t})},b6=({text:t,onLinkClick:r})=>t?y.jsx("div",{children:y.jsx(Jv,{markdown:t,onLinkClick:r})}):null,v6=({title:t})=>t?y.jsx("h1",{className:on.title,children:t}):null,_6=({title:t,text:r,buttons:i,onButtonClick:s,onLinkClick:u})=>t?.length||r?.length||i?.length?y.jsxs("div",{className:Q(ge.bubbleContent),children:[y.jsx(v6,{title:t}),y.jsx(b6,{text:r,onLinkClick:u}),y.jsx(y6,{buttons:i,onButtonClick:s})]}):null,E6=({alt:t,imageUrl:r,itemUrl:i,hasBody:s})=>r?i?i.indexOf("youtube.com")>-1?y.jsx("div",{className:on.video_container,children:y.jsx("iframe",{className:Q(on.video,{[on.only]:!s}),title:"Youtube",width:"100%",src:i+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):y.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})})}):y.jsx("div",{className:on.imageContainer,children:y.jsx("img",{className:Q(on.image,{[on.only]:!s}),src:r,alt:t})}):null,S6=({title:t,text:r,imageUrl:i,itemUrl:s,buttons:u,sources:c,onButtonClick:d,onLinkClick:h})=>{const m=!!t?.length||!!r?.length||!!u?.length;return y.jsxs("div",{className:Q(on.detailMessage),children:[y.jsx(E6,{hasBody:m,imageUrl:i,itemUrl:s,alt:t||""}),m&&y.jsx(_6,{title:t,text:r,buttons:u,onLinkClick:h,onButtonClick:d}),y.jsx(Kh,{sources:c,onLinkClick:h})]})},T6=B.forwardRef(({isFirstMessageBySender:t,isLastMessageBySender:r,children:i},s)=>{const u=Ze();return y.jsx("li",{ref:s,className:Q(ge.message,ge.messageGuest,t&&ge.messageGuestFirst,r&&ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",t&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:y.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,"aria-label":u("guest-bubble.label"),children:y.jsx("div",{className:Q(ge.rightText),children:i})})})}),A6="_markdown_nw7vg_1",e_={markdown:A6},t_=()=>x6(window.location.pathname),x6=t=>{const r=t.split("/"),i=t.endsWith("/");return r[r.length-(i?2:1)]},Su=()=>B.useMemo(()=>t_(),[]),Ho="source-info-reference",O6=({actionId:t,markdown:r,sources:i,onLinkClick:s})=>{const u=Su(),c=Nr(),d=R6(),h=st(b=>{const E=b.chat.sourceInfos;if(E?.type==="loaded"||E?.type==="loading")return E.chunkId}),m=b=>E=>{const A=E.key;(A==="ArrowDown"||A==="ArrowRight"||A==="Enter"||A===" "||A==="Space")&&(E.stopPropagation(),c(fb(u,t,b)))},p=b=>()=>{c(fb(u,t,b))};return B.useLayoutEffect(()=>{document.querySelectorAll(`.${Ho}`).forEach(b=>{const E=b.previousSibling;E&&E.nodeType===Node.TEXT_NODE&&E.textContent?.endsWith(" ")&&E.textContent?.trim().length&&b.classList.add(`${Ho}--before-space`);const A=b.nextSibling;A&&A.nodeType===Node.TEXT_NODE&&A.textContent?.startsWith(" ")&&A.textContent?.trim().length&&b.classList.add(`${Ho}--after-space`)})},[r]),y.jsxs("div",{className:ge.bubbleContent,children:[y.jsx("div",{className:e_.markdown,children:y.jsx(Jv,{markdown:r,onLinkClick:s,markdownOptions:{renderRule(b,E,A,U){if(E.type===kO.footnoteReference){const R=E.text===h;return y.jsx("span",{className:Q(ge.sourceInfoReference,R&&ge.sourceInfoReferenceActive,Ho),children:y.jsx("a",{type:"button",tabIndex:0,onClick:p(E.text),onKeyDown:m(E.text),children:d(E.text)})},U.key)}return b()}}})}),y.jsx(Kh,{sources:i,onLinkClick:s})]})},R6=()=>{const t=[];return i=>{const s=t.indexOf(i);return s>-1?s+1:(t.push(i),t.length)}},w6="_text_gp0s0_1",C6="_command_gp0s0_5",Fb={text:w6,command:C6},N6=({text:t,commands:r=[]})=>{const i=r.find(u=>t.startsWith(`/${u}`)),s=i?t.slice(i.length+1):t;return y.jsxs("div",{children:[i&&y.jsxs("code",{className:Fb.command,children:["/",i]}),s.split(`
|
|
110
110
|
`).map((u,c)=>y.jsxs("span",{className:Fb.text,children:[u,y.jsx("br",{})]},c))]})},M6=({text:t,commands:r,sources:i,onLinkClick:s})=>y.jsxs("div",{className:ge.bubbleContent,children:[y.jsx(N6,{text:t,commands:r}),y.jsx(Kh,{sources:i,onLinkClick:s})]}),D6=B.forwardRef(({message:t,commands:r,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:c,onButtonClick:d,onLinkClick:h},m)=>{const p=L6(t._id,t,r,d,h),b=E=>{c(t._id,E)};switch(t.sender.type){case Te.UserType.GUEST:return y.jsx(T6,{ref:m,isFirstMessageBySender:s,isLastMessageBySender:u,children:p});default:return y.jsx(Zv,{ref:m,message:t,isAnimated:!1,isLastMessage:i,isFirstMessageBySender:s,isLastMessageBySender:u,onReaction:b,children:p})}}),L6=(t,r,i,s,u)=>{switch(r.type){case Te.MessageTypeEnum.TEXT:{const c=r;return y.jsx(M6,{text:c.text,commands:i,sources:r.sources||[],onLinkClick:u})}case Te.MessageTypeEnum.DETAIL:{const c=r;return y.jsx(S6,{title:c.title,text:c.text,imageUrl:c.imageUrl,itemUrl:c.itemUrl,buttons:c.buttons,sources:r.sources||[],onButtonClick:s,onLinkClick:u})}case Te.MessageTypeEnum.MARKDOWN:{const c=r;return y.jsx(O6,{actionId:t,markdown:c.markdown,sources:c.sources||[],onLinkClick:u})}}},B6=(t,r)=>t.message._id===r.message._id&&t.message.reaction===r.message.reaction&&t.isLastMessage===r.isLastMessage&&t.isFirstMessageBySender===r.isFirstMessageBySender&&t.isLastMessageBySender===r.isLastMessageBySender,U6=_1.memo(D6,B6),j6="_ticontainer_xg0dn_1",H6="_tiblock_xg0dn_5",I6="_tidot_xg0dn_12",ks={ticontainer:j6,tiblock:H6,tidot:I6},z6=({isTyping:t=!1})=>y.jsx("div",{className:ks.ticontainer,children:y.jsx("div",{className:ks.tiblock,children:t?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")}),y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")}),y.jsx("div",{className:Q(ks.tidot,"chat__typingIndicator")})]}):null})}),G6=Object.assign({_id:"typing-indicator"},new Te.TextMessage("",new Te.BotUser)),k6=({messages:t,isBotTyping:r,commands:i,onTranscriptItemReaction:s,onButtonClick:u,onLinkClick:c})=>{const d=B.useRef(0),h=B.useRef(!0),m=B.useRef(null),p=B.useRef(null),b=B.useRef(null),E=st(R=>R.settings.enableGeneralConditions);B.useLayoutEffect(()=>{if(t.length&&m.current&&(d.current<t.length||r)){if(p.current){const R=p.current.offsetTop;m.current.scrollTop=R}else if(b.current){const R=b.current.offsetTop;m.current.scrollTop=R}h.current&&(h.current=!1),d.current=t.length}},[t,h,r]);let A;const U=t.length;return y.jsxs("div",{ref:m,className:Q(hb.messageContainer,"chat__messageContainer"),style:{scrollBehavior:t.length&&h.current?"auto":"smooth"},id:"MessageContainer",role:"log","aria-live":"polite",children:[E&&y.jsx(rw,{}),y.jsxs("ul",{className:hb.messages,children:[t.map((R,q)=>{const G=q6(R,A),_=F6(R,q,t,r);A=R.sender.type;const C=q+1===U,S=R._id||`added-${q}`;return y.jsx(U6,{ref:C?b:null,message:R,commands:i,isLastMessage:C,isFirstMessageBySender:G,isLastMessageBySender:_,onButtonClick:u,onLinkClick:c,onReaction:s},C&&!r?"last":S)}),r&&y.jsx(Zv,{ref:p,message:G6,isLastMessage:!1,isAnimated:!0,isFirstMessageBySender:A!==Te.UserType.BOT,isLastMessageBySender:!0,children:y.jsx(z6,{isTyping:!0})},"last")]})]})},q6=(t,r)=>!r||r!==t.sender.type,F6=(t,r,i,s)=>{const u=t.sender.type,c=i.length;return r+1===c?!(u===Te.UserType.BOT&&s):u!==i.at(r+1)?.sender.type},V6="_bottomSheet_jp8dl_1",P6="_bottomSheetOpen_jp8dl_15",Y6="_bottomSheetClose_jp8dl_20",Rr={bottomSheet:V6,bottomSheetOpen:P6,bottomSheetClose:Y6},X6="_container_xc2nx_1",Vb={container:X6},Z6=({contentUrl:t})=>{const r=st(c=>c.connection.sessionId),[i,s]=B.useState(!1);B.useEffect(()=>{s(c=>c||!!t)},[t]);const u=B.useMemo(()=>{if(t&&r){const c=new URL(t,document.baseURI);return c.searchParams.set("sessionId",r),c.toString()}else return},[t,r]);return y.jsx("div",{className:Q(Vb.container,Rr.bottomSheet,{[Rr.bottomSheetOpen]:!!t,[Rr.bottomSheetClose]:i&&!t}),children:u&&y.jsx("iframe",{title:"Drawer",src:u,className:Vb.iframe})})},Q6="_container_z787n_1",K6={container:Q6},$6=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),W6=()=>{const r=Ze()("powered-by");return r&&r.length?y.jsx("div",{className:Q(K6.container,"chat__poweredBy"),children:y.jsx(Or,{options:{overrides:{a:$6}},children:r})}):null},n_=({className:t,children:r,...i})=>y.jsx(Eu,{className:Q(el.buttonDefault,t),type:"button",...i,children:r}),iu=({className:t,children:r,...i})=>y.jsx(Eu,{className:Q(el.buttonPrimary,t),...i,children:r}),J6="_container_h23mk_1",eC="_formContainer_h23mk_17",tC="_emailInput_h23mk_22",nC="_description_h23mk_52",rC="_actions_h23mk_57",aC="_validationError_h23mk_67",iC="_submitted_h23mk_74",La={container:J6,formContainer:eC,emailInput:tC,description:nC,actions:rC,validationError:aC,submitted:iC},sC=({visible:t,onEmailExport:r,onClose:i})=>{const s=Ze(),[u,c]=B.useState(void 0),[d,h]=B.useState(!1),[m,p]=B.useState(void 0),b=B.useRef(null);B.useEffect(()=>{t?(b.current?.focus(),h(!1),c(t)):u===!0&&c(!1)},[t,u]);const E=U=>{U.preventDefault(),m&&m.length>0&&(r(m),h(!0),setTimeout(i,3*1e3))},A=U=>{const R=U.target.value.trim(),q=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(R);p(q?R:"")};return y.jsxs("div",{className:Q(La.container,Rr.bottomSheet,{[Rr.bottomSheetOpen]:u===!0,[Rr.bottomSheetClose]:u===!1}),children:[y.jsx("h2",{children:s("export-transcript.email.title")}),y.jsx(Or,{className:La.description,children:s("export-transcript.email.description")||""}),y.jsxs("form",{onSubmit:E,className:La.formContainer,children:[y.jsxs("div",{children:[y.jsx("input",{disabled:d,ref:b,type:"email",placeholder:s("export-transcript.email.placeholder"),className:La.emailInput,onChange:A}),m?.length===0?y.jsx("div",{className:La.validationError,children:s("export-transcript.email.invalid")}):null]}),y.jsxs("div",{className:La.actions,children:[y.jsx(n_,{onClick:i,children:s("export-transcript.email.cancel")}),y.jsx(iu,{type:"submit",disabled:d||m===void 0||m.length===0,children:s("export-transcript.email.send")})]})]}),d&&y.jsx("div",{className:La.submitted,children:s("export-transcript.email.success")})]})},lC="_inputContainer_fi5ao_1",oC={inputContainer:lC},uC="_blockUserInput_pot9c_1",cC={blockUserInput:uC},fC=({visible:t})=>{const r=Ze();return t?y.jsx("div",{className:Q(cC.blockUserInput,"chat__blockUserInput"),children:r("block-user-input.title")}):null},dC="_commandsDropdown_5ytuv_1",hC="_commands_5ytuv_1",mC="_command_5ytuv_1",pC="_commandActive_5ytuv_46",gC="_commandsSelections_5ytuv_55",Qs={commandsDropdown:dC,commands:hC,command:mC,commandActive:pC,commandsSelections:gC},yC=(t,r,i,s,u)=>{B.useEffect(()=>{const c=d=>{if(t.length)switch(d.key){case"Enter":i(t[r]);break;case"ArrowUp":s(h=>h>0?h-1:t.length-1);break;case"ArrowDown":s(h=>h<t.length-1?h+1:0);break;case"Escape":u([]);break}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[t,r,i,s,u])},bC=({text:t,commands:r,onSelectCommand:i,onVisibilityChange:s})=>{const u=B.useRef(null),c=Ze(),[d,h]=B.useState([]),[m,p]=B.useState(Pb(r)),[b,E]=B.useState(0),A=U=>i(`/${U}`);return Zh(u,()=>h([])),yC(d,b,A,E,h),B.useEffect(()=>{p(Pb(r))},[r]),B.useEffect(()=>{const U=t.length||0;U===0||U>m||!t.startsWith("/")?h([]):h(r.filter(vC(t))),E(0)},[r,t,m]),B.useEffect(()=>{s(!!d.length)},[d,s]),d.length?y.jsx("div",{ref:u,className:Qs.commandsDropdown,children:y.jsx("ul",{id:"command-list",className:Qs.commands,role:"listbox",children:d.map((U,R)=>y.jsxs("li",{className:Q([Qs.command,b===R&&Qs.commandActive]),role:"option",onClick:()=>A(U),onMouseOver:()=>E(R),children:[y.jsxs("h1",{children:["/",U]}),y.jsx("p",{children:c(`commands.${U}`)})]},U))})}):null},Pb=t=>Math.max(...t.map(r=>r.length+1)),vC=t=>r=>{const i=`/${r}`;return i.startsWith(t)&&i.length>=t.length},Yb=3,_C=({commands:t,onSelectCommand:r})=>{const i=Ze(),[s,u]=B.useState(!1),c=p=>()=>{r(`/${p}`),u(!1)},d=()=>{u(!0)},h=()=>{u(!1)},m=s?t:t.slice(0,Yb);return y.jsxs("div",{className:Qs.commandsSelections,children:[m.map(p=>y.jsxs("button",{className:"tooltip--top-center","aria-label":i(`commands.${p}`),"data-title":i(`commands.${p}`),tabIndex:0,onClick:c(p),children:["/",p]},p)),m.length<t.length?y.jsx("button",{"aria-label":i("commands.show-more.tooltip"),"data-title":i("commands.show-more.tooltip"),tabIndex:0,onClick:d,children:i("commands.show-more.action")},"show-more"):m.length>Yb?y.jsx("button",{"aria-label":i("commands.show-less.tooltip"),"data-title":i("commands.show-less.tooltip"),tabIndex:0,onClick:h,children:i("commands.show-less.action")},"show-less"):null]})},EC="_callToActionContainer_d8izj_1",SC="_callToActionTitle_d8izj_23",TC="_rateOverlay_d8izj_30",AC="_body_d8izj_52",xC="_footer_d8izj_60",OC="_actions_d8izj_75",RC="_bubbles_d8izj_89",wC="_stars_d8izj_191",CC="_starsSmall_d8izj_205",NC="_starsLarge_d8izj_211",MC="_star_d8izj_191",DC="_starReadonly_d8izj_225",LC="_starIcon_d8izj_235",BC="_starsDescriptionContainer_d8izj_253",UC="_starsDescription_d8izj_253",zt={callToActionContainer:EC,callToActionTitle:SC,rateOverlay:TC,body:AC,footer:xC,actions:OC,bubbles:RC,stars:wC,starsSmall:CC,starsLarge:NC,star:MC,starReadonly:DC,starIcon:LC,starsDescriptionContainer:BC,starsDescription:UC},jC=({value:t,index:r,count:i,readonly:s,onHover:u,onClick:c})=>{const d=h=>{c&&h.key==="Enter"&&c()};return y.jsx("li",{className:Q(zt.star,{[zt.starReadonly]:s},"chat__conversationRating__star"),children:y.jsx("div",{role:"radio","aria-checked":t>r?"true":"false","aria-posinset":r+1,"aria-setsize":i,tabIndex:0,onMouseOver:u,onKeyDown:d,onClick:c,children:y.jsx("span",{role:"img","aria-label":"Star",className:Q(zt.starIcon),children:y.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:y.jsx("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"})})})})})},Xb=5,r_=({value:t,size:r,readonly:i=!1,onChange:s})=>{const[u,c]=B.useState(void 0),d=()=>{c(void 0)},h=p=>()=>{if(!i){const b=p+1;c(b)}},m=p=>()=>{s&&!i&&(s(p===0&&t===1?0:p+1),c(void 0))};return y.jsx("ul",{tabIndex:0,role:"radiogroup",className:Q(zt.stars,{[zt.starsSmall]:r==="small",[zt.starsLarge]:r==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:r==="small",chat__conversationRating__stars__large:r==="large"}),onMouseOut:d,children:Array(Xb).fill(0).map((p,b)=>y.jsx(jC,{value:u===void 0?t:u,index:b,count:Xb,readonly:i,onHover:h(b),onClick:m(b)},b))})},HC=({visible:t,onRate:r})=>{const i=Ze();return t?y.jsxs("div",{className:Q(zt.callToActionContainer,"chat__conversationRating__callToAction"),children:[y.jsx("div",{className:Q(zt.callToActionTitle,"chat__conversationRating__callToAction__title"),children:i("conversation-rating.call-to-action.title")}),y.jsx(r_,{value:0,size:"small",onChange:r})]}):null},Dd=({isFirstMessageBySender:t,isLastMessageBySender:r,children:i})=>y.jsxs("div",{className:Q(ge.message,ge.messageBot,t&&ge.messageBotFirst,r&&ge.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",t&&"chat__bubbleContainer--first",r&&"chat__bubbleContainer--last"),children:[y.jsx("img",{className:Q(ge.avatar,ge.botAvatar),src:"bot.svg",alt:"Bot"}),y.jsx("div",{className:Q(ge.bubble,ge.bubbleLeft,"chat__bubble","chat__botBubble"),children:y.jsx("div",{className:Q(ge.leftText,ge.bubbleContent),children:i})})]}),IC=({children:t})=>y.jsx("div",{className:Q(ge.message,ge.messageGuest,ge.messageGuestFirst,ge.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:y.jsx("div",{className:Q(ge.bubble,ge.bubbleRight,"chat__bubble","chat__guestBubble"),children:y.jsx("div",{className:Q(ge.rightText,ge.bubbleContent),children:t})})}),zC=()=>{const t=Ze(),r=Nr(),i=st(G=>G.chat.conversationRating),[s,u]=B.useState(i.rating?.value||0),[c,d]=B.useState(void 0),[h,m]=B.useState(void 0),[p,b]=B.useState({submitted:!1,feedback:""}),[E,A]=B.useState(!1),U=B.useRef(null);B.useEffect(()=>{i.opener?(b({submitted:!1,feedback:""}),m(!0)):h===!0&&m(!1)},[i.opener,h]),B.useEffect(()=>{u(i.rating?.value||0)},[i.rating?.value,i.opener]),B.useEffect(()=>{U.current&&(U.current.value=i.rating?.feedback||"")},[i.rating?.feedback]),B.useEffect(()=>{const G=s>0?t(`conversation-rating.overlay.bot-message.rate-feedback.value-${s}`):void 0;d(G?.length?G:void 0)},[s,t]),B.useEffect(()=>{p.submitted?setTimeout(()=>A(!0),p.feedback.length?500:0):A(!1)},[p]);const R=G=>{G.preventDefault();const _=U.current?.value?.trim()||"";r(wx(s,_)),b({submitted:!0,feedback:_})},q=()=>{i.opener==="CLOSE_CHAT"?r(Bv()):r(xO())};return y.jsx("div",{className:Q(zt.rateOverlay,Rr.bottomSheet,"chat__conversationRating__overlay",{[Rr.bottomSheetOpen]:h===!0,[Rr.bottomSheetClose]:h===!1}),children:y.jsxs("form",{onSubmit:R,children:[y.jsxs("div",{className:Q(zt.body,"chat__conversationRating__overlay__body"),children:[y.jsx("div",{}),y.jsx("div",{className:Q(zt.bubbles),children:i.opener&&y.jsxs(y.Fragment,{children:[y.jsxs(Dd,{isFirstMessageBySender:!0,isLastMessageBySender:!c,children:[y.jsx("h2",{children:t("conversation-rating.overlay.title")}),y.jsxs("div",{className:Q(zt.starsDescriptionContainer),children:[y.jsx(r_,{value:s,size:"large",readonly:p.submitted,onChange:u}),y.jsxs("div",{className:Q(zt.starsDescription),children:[y.jsx("div",{children:t("conversation-rating.overlay.star.very-bad")}),y.jsx("div",{children:t("conversation-rating.overlay.star.very-good")})]})]})]}),c&&y.jsx(Dd,{isFirstMessageBySender:!1,isLastMessageBySender:!E||!!p.feedback.length,children:y.jsx("div",{children:c})}),!!p.feedback.length&&y.jsx(IC,{children:p.feedback}),E&&y.jsx(Dd,{isFirstMessageBySender:!!p.feedback.length,isLastMessageBySender:!0,children:y.jsx("div",{children:t("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),y.jsxs("div",{className:Q(zt.footer,"chat__conversationRating__overlay__footer"),children:[!p.submitted&&y.jsx("input",{ref:U,defaultValue:i.rating?.feedback||"",placeholder:t("conversation-rating.overlay.guest-feedback.input-placeholder")}),y.jsxs("div",{className:Q(zt.actions,"chat__conversationRating__overlay__footer__actions"),children:[p.submitted?y.jsx(iu,{type:"button",disabled:!s,onClick:q,children:i.opener==="CLOSE_CHAT"?t("conversation-rating.overlay.action.close-chat"):t("conversation-rating.overlay.action.back-to-chat")},"close-button"):y.jsx(iu,{type:"submit",disabled:!s,children:t("conversation-rating.overlay.action.submit")},"submit-button"),i.opener!=="CHAT"&&!p.submitted&&y.jsx(n_,{onClick:q,children:i.opener==="CLOSE_CHAT"?t("conversation-rating.overlay.action.close-chat"):t("conversation-rating.overlay.action.cancel")})]})]})]})})},GC=({numberOfMessagesFromGuest:t})=>{const r=Nr(),i=st(c=>c.chat.conversationRating),s=c=>{r(zh("CHAT",c))},u=!i.rating?.value&&t>=1;return i.enabled?y.jsxs(y.Fragment,{children:[y.jsx(HC,{visible:u,onRate:s}),y.jsx(zC,{})]}):null},kC=B.memo(GC),qC="_inputWrapper_e3h44_1",FC="_withOpenCommands_e3h44_14",VC="_messageInputWrapper_e3h44_20",PC="_messageInput_e3h44_20",YC="_buttons_e3h44_44",XC="_button_e3h44_44",xi={inputWrapper:qC,withOpenCommands:FC,messageInputWrapper:VC,messageInput:PC,buttons:YC,button:XC},ZC="_audioRecorder_g845f_1",QC="_audioButton_g845f_6",KC="_recorderIcon_g845f_37",$C="_spinning_g845f_60",Ba={audioRecorder:ZC,audioButton:QC,recorderIcon:KC,spinning:$C},Zb=2048,su=16e3;class WC extends _1.Component{audioInput=null;volume=null;leftchannel=[];recorder=null;recordingLength=0;sampleRate=null;mediaStream=null;constructor(r){super(r),this.state={recordingState:"none"},this.triggerAudioRecording=this.triggerAudioRecording.bind(this),this.triggerAudioRecordingSuccess=this.triggerAudioRecordingSuccess.bind(this),this.initRecording=this.initRecording.bind(this),this.processRecordingInput=this.processRecordingInput.bind(this),this.handleClickSubmitAudio=this.handleClickSubmitAudio.bind(this),this.handleClickStopAudio=this.handleClickStopAudio.bind(this)}triggerAudioRecording(){this.setState({recordingState:"connecting"}),navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(this.triggerAudioRecordingSuccess)}triggerAudioRecordingSuccess(r){this.mediaStream=r,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(r)}initRecording(r){const i=window.AudioContext||window.webkitAudioContext,s=new i;this.sampleRate=s.sampleRate,this.volume=s.createGain(),this.audioInput=s.createMediaStreamSource(r),this.audioInput.connect(this.volume),this.recorder=s.createScriptProcessor(Zb,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(s.destination)}processRecordingInput(r){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const i=r.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(i)),this.recordingLength+=Zb}}handleClickSubmitAudio(){const r=eN(this.leftchannel,this.recordingLength),i=tN(r,this.sampleRate||0),s=JC(i);this.props.onAudioRecorded(s),this.handleClickStopAudio()}handleClickStopAudio(){this.setState({recordingState:"none"}),this.audioInput?.disconnect(),this.volume?.disconnect(),this.recorder?.disconnect(),this.mediaStream&&this.mediaStream?.getAudioTracks().forEach(r=>{r.stop()})}render(){return y.jsxs("div",{className:Ba.audioRecorder,children:[this.state.recordingState==="none"&&y.jsx("button",{className:Q(Ba.audioButton,"chat__button"),type:"submit","aria-label":this.props.translate("message-input.actions.start-audio-recording.label"),"data-title":this.props.translate("message-input.actions.start-audio-recording.label"),tabIndex:0,onClick:this.triggerAudioRecording,children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&y.jsxs("svg",{className:Ba.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&y.jsxs("div",{className:Ba.audioRecorder,children:[y.jsx("button",{className:Q(Ba.audioButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),y.jsx("div",{className:Ba.recorderIcon}),y.jsx("button",{className:Q(Ba.audioButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[y.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),y.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const JC=t=>{const r=new ArrayBuffer(44+t.length*2),i=new DataView(r);Io(i,0,"RIFF"),i.setUint32(4,44+t.length*2,!0),Io(i,8,"WAVE"),Io(i,12,"fmt "),i.setUint32(16,16,!0),i.setUint16(20,1,!0),i.setUint16(22,1,!0),i.setUint32(24,su,!0),i.setUint32(28,su*4,!0),i.setUint16(32,4,!0),i.setUint16(34,16,!0),Io(i,36,"data"),i.setUint32(40,t.length*2,!0);const s=t.length;let u=44;const c=1;for(let d=0;d<s;d++)i.setInt16(u,t[d]*(32767*c),!0),u+=2;return new Blob([i],{type:"audio/wav"})},Io=(t,r,i)=>{for(let s=0;s<i.length;s++)t.setUint8(r+s,i.charCodeAt(s))},eN=(t,r)=>{const i=new Float32Array(r);let s=0;const u=t.length;for(let c=0;c<u;c++){const d=t[c];i.set(d,s),s+=d.length}return i},tN=(t,r)=>{if(su===r)return t;const i=r/su,s=Math.round(t.length/i),u=new Float32Array(s);let c=0,d=0;for(;c<u.length;){const h=Math.round((c+1)*i);let m=0,p=0;for(let b=d;b<h&&b<t.length;b++)m+=t[b],p++;u[c]=m/p,c++,d=h}return u},nN=({disabled:t,textInput:r,commandsVisible:i,hasCommands:s,onTextInput:u,onTextInputSubmit:c,onAudioRecorded:d})=>{const h=Ze(),m=B.useRef(null),{enableSpeechSupport:p}=st(R=>R.settings);B.useEffect(()=>{m.current?.focus()},[r]);const b=()=>{const R=m.current;R&&r.trim().length>=1&&c(r.trim())&&(R.value="",R.style.height="",R.focus())},E=R=>{R.preventDefault(),b()},A=R=>{const q=R.target.value;u(q),R.target.style.height="";const{scrollHeight:G}=R.target;R.target.style.height=`${G>150?150:G}px`},U=R=>{R.code==="Enter"&&!R.shiftKey?(R.repeat||b(),R.preventDefault()):i&&(R.code==="ArrowUp"||R.code==="ArrowDown")&&R.preventDefault()};return y.jsxs("form",{className:Q(xi.inputWrapper,i&&xi.withOpenCommands,"chat__textInput"),onSubmit:E,children:[y.jsx("div",{className:xi.messageInputWrapper,children:y.jsx("textarea",{id:"user_input",ref:m,className:xi.messageInput,tabIndex:0,placeholder:h("message-input-placeholder"),value:r,onChange:A,onKeyDown:U,"aria-label":h("message-input-label"),"aria-controls":s?"command-list":void 0,"aria-haspopup":s?"listbox":void 0})}),y.jsx("div",{className:Q(xi.buttons,"chat__buttons"),children:r.length||!p||navigator.mediaDevices===void 0?y.jsx("button",{className:Q(xi.button,"chat__button"),type:"submit","aria-label":h("message-input.actions.submit.label"),"data-title":h("message-input.actions.submit.label"),tabIndex:0,disabled:t,children:y.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:y.jsx("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})}):p&&navigator.mediaDevices!==void 0&&y.jsx(WC,{translate:h,onAudioRecorded:d})})]})},rN="_quickReplies_83npe_1",aN="_quickReply_83npe_9",Qb={quickReplies:rN,quickReply:aN},iN=({quickReplies:t,onQuickReplyClick:r})=>t.length?y.jsx("div",{className:Q(Qb.quickReplies,"chat__quickReplies"),children:t.map(i=>y.jsx(Eu,{tabIndex:0,className:Q(Qb.quickReply,"chat__button","chat__quickReply"),onClick:()=>r(i),children:i.label},i.label))}):null,Kb=5e3,sN=1e3,lN=({isBotTyping:t,quickReplies:r,numberOfMessagesFromGuest:i,commands:s,onTextInput:u,onQuickReplyClick:c,onAudioRecorded:d})=>{const[h,m]=B.useState(""),[p,b]=B.useState(!1),[E,A]=B.useState(!1),U=B.useRef(0),R=B.useRef(0);B.useEffect(()=>{if(p&&!t){const _=U.current?Date.now()-U.current:0;_>Kb?b(!1):setTimeout(()=>{b(!1)},Kb-_)}},[p,t]),B.useEffect(()=>{p&&(U.current=Date.now())},[p]);const q=_=>{const C=Date.now()-R.current<sN;return E?!1:t||C?(b(!0),!1):(u(_),m(""),R.current=Date.now(),!0)},G=_=>{m(_+" ")};return y.jsxs("div",{className:Q(oC.inputContainer),children:[y.jsx(iN,{quickReplies:r,onQuickReplyClick:c}),y.jsx(fC,{visible:p}),!p&&y.jsx(kC,{numberOfMessagesFromGuest:i}),!!s?.length&&y.jsx(bC,{text:h,commands:s,onSelectCommand:G,onVisibilityChange:A}),y.jsx(nN,{textInput:h,disabled:p,commandsVisible:E,hasCommands:!!s?.length,onTextInput:m,onTextInputSubmit:q,onAudioRecorded:d}),!!s?.length&&y.jsx(_C,{commands:s,onSelectCommand:m})]})},oN=({clientName:t,messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u,onMessageFromUser:c,onQuickReplyClick:d,onButtonClick:h,onLinkClick:m,onAudioRecorded:p,onTranscriptExport:b,onTranscriptItemReaction:E})=>{const A=Nr(),U=st(H=>H.connection.connectionState),{enableTranscriptExportEmail:R,commands:q}=st(H=>H.settings),{showTranscriptMailOverlay:G,conversationRating:_}=st(H=>H.chat),C=r.filter(H=>H.sender.type===au.GUEST).length;B.useEffect(()=>{if(U===Ia.CONNECTED){const H=fu.parse(window.location.search);A(jv(t,H))}},[t,U,A]);const S=()=>{A(Uv())};return y.jsxs("div",{className:cd.container,children:[y.jsxs("div",{className:Q([cd.chatcontent,(G||_?.opener)&&cd.accessabilityHidden]),children:[y.jsx(k6,{messages:r,isBotTyping:s,commands:q,onButtonClick:h,onLinkClick:m,onTranscriptItemReaction:E}),y.jsx(lN,{isBotTyping:s,quickReplies:s?[]:i,numberOfMessagesFromGuest:C,commands:q,onQuickReplyClick:d,onTextInput:c,onAudioRecorded:p}),y.jsx(W6,{})]}),R&&y.jsx(sC,{visible:!!G,onEmailExport:b,onClose:S}),y.jsx(Z6,{contentUrl:u})]})},uN=t=>{const{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u}=t.chat;return{messages:r,quickReplies:i,isBotTyping:s,drawerContentUrl:u}},cN=t=>({onRestartChat:(r,i)=>t(bu(r,i)),onMessageFromUser:r=>t(uv(r)),onAudioRecorded:r=>t(Tx(r)),onActionFromUser:r=>t(r),onQuickReplyClick:r=>t(ov(r)),onNluEvent:r=>t(mv(r)),onButtonClick:r=>t(Nx(r)),onLinkClick:r=>t(pv(r)),onTranscriptExport:r=>t(xx(r)),onTranscriptItemReaction:(r,i)=>{t(Te.Actions.transcriptItemGuestReaction(r,i?.type||null,i?.category,i?.comment))}}),fN=VS(uN,cN)(oN),a_=()=>{const[t,r]=B.useState(!1);return B.useEffect(()=>{r((()=>{try{return window.self!==window.top}catch{return!0}})())},[]),t},dN=t=>r=>{const i=r.key;(i==="ArrowDown"||i==="ArrowRight"||i==="Enter"||i===" "||i==="Space")&&(r.stopPropagation(),t())},hN=({onClick:t})=>{const r=Ze();return a_()?y.jsx("button",{className:"tooltip--bottom-left","aria-label":r("header.close-chat"),"data-title":r("header.close-chat"),tabIndex:0,onClick:t,onKeyDown:dN(t),children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"})})}):null},mN="_header_3gvbz_1",pN="_logoContainer_3gvbz_14",gN="_logo_3gvbz_14",yN="_actions_3gvbz_28",bN="_active_3gvbz_43",vN="_menuContainer_3gvbz_56",_N="_menu_3gvbz_56",EN="_divider_3gvbz_86",sa={header:mN,logoContainer:pN,logo:gN,actions:yN,active:bN,menuContainer:vN,menu:_N,divider:EN},SN=({icon:t})=>{switch(t){case"arrow-counter-clockwise":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"})});case"download":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"})});case"expand":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z"})});case"mail":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"})});case"phone":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M144.27,45.93a8,8,0,0,1,9.8-5.66,86.22,86.22,0,0,1,61.66,61.66,8,8,0,0,1-5.66,9.8A8.23,8.23,0,0,1,208,112a8,8,0,0,1-7.73-5.94,70.35,70.35,0,0,0-50.33-50.33A8,8,0,0,1,144.27,45.93Zm-2.33,41.8c13.79,3.68,22.65,12.54,26.33,26.33A8,8,0,0,0,176,120a8.23,8.23,0,0,0,2.07-.27,8,8,0,0,0,5.66-9.8c-5.12-19.16-18.5-32.54-37.66-37.66a8,8,0,1,0-4.13,15.46Zm81.94,95.35A56.26,56.26,0,0,1,168,232C88.6,232,24,167.4,24,88A56.26,56.26,0,0,1,72.92,32.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,109.39,104c-.18.27-.37.52-.57.77L88,129.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,223.88,183.08Zm-15.88-2s-.07,0-.11,0h0l-47-21.05-24.35,20.71a8.44,8.44,0,0,1-.74.56,16,16,0,0,1-15.75,1.14c-18.73-9.05-37.4-27.58-46.46-46.11a16,16,0,0,1,1-15.7,6.13,6.13,0,0,1,.57-.77L96,95.15l-21-47a.61.61,0,0,1,0-.12A40.2,40.2,0,0,0,40,88,128.14,128.14,0,0,0,168,216,40.21,40.21,0,0,0,208,181.07Z"})});case"scroll":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z"})});case"star":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"})});case"link":return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"})});default:return y.jsx("div",{})}},TN=B.forwardRef(({selected:t,item:r,onClick:i},s)=>{const u=Ze(),c=d=>{d.preventDefault(),i()};return y.jsx("li",{"aria-selected":t,role:"option",className:r.withDivider?sa.divider:void 0,children:y.jsxs("a",{ref:s,type:"button",role:"button",tabIndex:-1,onClick:c,children:[y.jsx(SN,{icon:r.icon}),y.jsx("span",{children:u(`header.menu.${r.id}`)})]})})}),AN=(t,r)=>{const i=a_(),{menuItems:s,enableStandaloneView:u,enableTranscriptExportPdf:c,enableTranscriptExportEmail:d}=st(p=>p.settings),h=st(p=>p.chat.conversationRating.enabled);return B.useMemo(()=>{const p=[],b=s.filter(({visibility:E})=>t?E==="always"||E==="chat-only":E==="always"||E==="start-screen-only");if(t&&(p.push({id:"restart-chat",type:"restart-chat",icon:"arrow-counter-clockwise",visibility:"chat-only"}),i&&u&&p.push({id:"expand-chat-window",type:"expand-chat-window",icon:"expand",visibility:"always"}),r&&c&&p.push({id:"download-transcript",type:"download-transcript",icon:"download",visibility:"chat-only"}),r&&d&&p.push({id:"send-transcript",type:"send-transcript",icon:"mail",visibility:"chat-only"}),r&&h&&p.push({id:"rate-conversation",type:"rate-conversation",icon:"star",visibility:"chat-only"}),p.length>0&&b.length)){const E=p.pop();E&&s.length&&p.push({...E,withDivider:!0})}return p.push(...b),p},[t,r,c,d,u,h,i,s])},xN=({chatStarted:t,hasGuestMessages:r})=>{const i=Nr(),s=Su(),u=Ze(),[c,d]=B.useState(!1),[h,m]=B.useState(-1),p=B.useRef(null),b=B.useRef(null),E=B.useRef([]),A=AN(t,r);B.useEffect(()=>{E.current[h]?.focus()},[h]);const U=B.useCallback(()=>{const _=fu.parse(window.location.search);i(bu(s,_)),d(!1),m(0)},[i,s]),R=B.useCallback(_=>{switch(_.type){case"restart-chat":U();break;case"expand-chat-window":window.open(window.location.href,"_blank");break;case"download-transcript":i(Ox());break;case"send-transcript":i(Uv());break;case"rate-conversation":i(zh("MENU"));break;case"link":i(pv(_.url));break;case"action":i(JSON.parse(JSON.stringify(_.action)));break}d(!1)},[i,U,d]);B.useEffect(()=>{const _=C=>{if(c)switch(C.key){case"Enter":C.preventDefault(),R(A[h]);break;case"ArrowUp":m(S=>S>0?S-1:A.length-1);break;case"ArrowDown":m(S=>S<A.length-1?S+1:0);break;case"Escape":d(!1);break;case"Tab":h>-1&&d(!1);break}};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[c,h,A,m,d,R]),B.useEffect(()=>{c||m(-1)},[c,h]),Zh(b,()=>d(!1));const q=()=>{d(_=>!_)},G=()=>{setTimeout(()=>{const _=document.activeElement;b.current&&!b.current.contains(_)&&d(!1)},0)};return A.length?y.jsxs("div",{className:Q(sa.menuContainer),ref:b,children:[y.jsx("button",{ref:p,className:Q(c&&sa.active,c?"tooltip-hidden":"tooltip--bottom-left"),"aria-label":u("header.menu.title"),"data-title":u("header.menu.title"),onClick:q,onBlur:G,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"})})}),c&&y.jsx("nav",{className:sa.menu,"aria-label":u("header.menu.title"),children:y.jsx("ul",{tabIndex:0,children:A.map((_,C)=>y.jsx(TN,{ref:S=>{E.current[C]=S},selected:h===C,item:_,onClick:()=>R(_)},_.id))})})]}):null},$b=({className:t,chatStarted:r,...i})=>{const s=Nr(),u=st(h=>h.chat.conversationRating),c=st(h=>h.chat.messages.some(m=>m.sender.type===Te.UserType.GUEST)),d=()=>{u.enabled&&!u.opener&&c?s(zh("CLOSE_CHAT")):s(Bv())};return y.jsxs("div",{className:Q([sa.header,t]),...i,children:[y.jsx("div",{className:sa.logoContainer,children:y.jsx("div",{className:sa.logo})}),y.jsxs("div",{className:sa.actions,children:[y.jsx(xN,{chatStarted:r,hasGuestMessages:c}),y.jsx(hN,{onClick:d})]})]})},ON="_chatwindow_rkbir_1",RN="_chatwindowWithAside_rkbir_21",Wb={chatwindow:ON,chatwindowWithAside:RN},i_=()=>{const[t,r]=B.useState(!1);return B.useEffect(()=>{const i=window.matchMedia("(max-width: 1023px)"),s=()=>r(i.matches);return s(),i.addEventListener("change",s),()=>i.removeEventListener("change",s)},[]),t},wN="_sourceInfos_vei0l_1",CN="_waitForLoading_vei0l_24",NN="_loadingContent_vei0l_28",MN="_sourceHeader_vei0l_37",DN="_sourceHeaderIcon_vei0l_57",LN="_sourceContent_vei0l_61",BN="_openSourceButton_vei0l_69",UN="_sourceButtonLabel_vei0l_79",jN="_closeSourceInfosButton_vei0l_101",HN="_loadingSourceInfos_vei0l_125",IN="_loading_vei0l_28",zN="_loadingError_vei0l_139",GN="_highlightLoadingInfo_vei0l_155",kN="_highlightLoadingInfoInnerContainer_vei0l_169",qN="_highlightLoadingInfoContent_vei0l_178",FN="_highlightLoadingInfoCloseIcon_vei0l_198",VN="_highlightLoader_vei0l_203",PN="_highlightLoaderLoading_vei0l_210",Et={sourceInfos:wN,waitForLoading:CN,loadingContent:NN,sourceHeader:MN,sourceHeaderIcon:DN,sourceContent:LN,openSourceButton:BN,sourceButtonLabel:UN,closeSourceInfosButton:jN,loadingSourceInfos:HN,loading:IN,loadingError:zN,highlightLoadingInfo:GN,highlightLoadingInfoInnerContainer:kN,highlightLoadingInfoContent:qN,highlightLoadingInfoCloseIcon:FN,highlightLoader:VN,highlightLoaderLoading:PN},YN=({onClick:t})=>{const r=Ze();return y.jsx("button",{className:Q(Et.closeSourceInfosButton,"tooltip--bottom-left"),"aria-label":r("source-infos.close"),"data-title":r("source-infos.close"),tabIndex:0,onClick:t,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})})},XN=B.forwardRef(({sourceInfos:t,onClose:r,...i},s)=>y.jsxs("div",{className:Et.sourceHeader,...i,ref:s,children:[y.jsx("div",{children:t?y.jsx("p",{id:"source-info-title",children:t.title}):y.jsx("p",{children:" "})}),y.jsx(YN,{onClick:r})]})),ZN=({loading:t})=>y.jsx("div",{className:Et.highlightLoader,children:t&&y.jsx("div",{className:Et.highlightLoaderLoading})});/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:s_,setPrototypeOf:Jb,isFrozen:QN,getPrototypeOf:KN,getOwnPropertyDescriptor:$N}=Object;let{freeze:Gt,seal:Tn,create:l_}=Object,{apply:uh,construct:ch}=typeof Reflect<"u"&&Reflect;Gt||(Gt=function(r){return r});Tn||(Tn=function(r){return r});uh||(uh=function(r,i,s){return r.apply(i,s)});ch||(ch=function(r,i){return new r(...i)});const zo=kt(Array.prototype.forEach),WN=kt(Array.prototype.lastIndexOf),e1=kt(Array.prototype.pop),qs=kt(Array.prototype.push),JN=kt(Array.prototype.splice),Yo=kt(String.prototype.toLowerCase),Ld=kt(String.prototype.toString),t1=kt(String.prototype.match),Fs=kt(String.prototype.replace),e3=kt(String.prototype.indexOf),t3=kt(String.prototype.trim),Hn=kt(Object.prototype.hasOwnProperty),Ht=kt(RegExp.prototype.test),Vs=n3(TypeError);function kt(t){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var i=arguments.length,s=new Array(i>1?i-1:0),u=1;u<i;u++)s[u-1]=arguments[u];return uh(t,r,s)}}function n3(t){return function(){for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return ch(t,i)}}function Re(t,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Yo;Jb&&Jb(t,null);let s=r.length;for(;s--;){let u=r[s];if(typeof u=="string"){const c=i(u);c!==u&&(QN(r)||(r[s]=c),u=c)}t[u]=!0}return t}function r3(t){for(let r=0;r<t.length;r++)Hn(t,r)||(t[r]=null);return t}function Tr(t){const r=l_(null);for(const[i,s]of s_(t))Hn(t,i)&&(Array.isArray(s)?r[i]=r3(s):s&&typeof s=="object"&&s.constructor===Object?r[i]=Tr(s):r[i]=s);return r}function Ps(t,r){for(;t!==null;){const s=$N(t,r);if(s){if(s.get)return kt(s.get);if(typeof s.value=="function")return kt(s.value)}t=KN(t)}function i(){return null}return i}const n1=Gt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bd=Gt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ud=Gt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),a3=Gt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jd=Gt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),i3=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),r1=Gt(["#text"]),a1=Gt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Hd=Gt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),i1=Gt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Go=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),s3=Tn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),l3=Tn(/<%[\w\W]*|[\w\W]*%>/gm),o3=Tn(/\$\{[\w\W]*/gm),u3=Tn(/^data-[\-\w.\u00B7-\uFFFF]+$/),c3=Tn(/^aria-[\-\w]+$/),o_=Tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),f3=Tn(/^(?:\w+script|data):/i),d3=Tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),u_=Tn(/^html$/i),h3=Tn(/^[a-z][.\w]*(-[.\w]+)+$/i);var s1=Object.freeze({__proto__:null,ARIA_ATTR:c3,ATTR_WHITESPACE:d3,CUSTOM_ELEMENT:h3,DATA_ATTR:u3,DOCTYPE_NAME:u_,ERB_EXPR:l3,IS_ALLOWED_URI:o_,IS_SCRIPT_OR_DATA:f3,MUSTACHE_EXPR:s3,TMPLIT_EXPR:o3});const Ys={element:1,text:3,progressingInstruction:7,comment:8,document:9},m3=function(){return typeof window>"u"?null:window},p3=function(r,i){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let s=null;const u="data-tt-policy-suffix";i&&i.hasAttribute(u)&&(s=i.getAttribute(u));const c="dompurify"+(s?"#"+s:"");try{return r.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},l1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function c_(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m3();const r=le=>c_(le);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==Ys.document||!t.Element)return r.isSupported=!1,r;let{document:i}=t;const s=i,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:d,Node:h,Element:m,NodeFilter:p,NamedNodeMap:b=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:E,DOMParser:A,trustedTypes:U}=t,R=m.prototype,q=Ps(R,"cloneNode"),G=Ps(R,"remove"),_=Ps(R,"nextSibling"),C=Ps(R,"childNodes"),S=Ps(R,"parentNode");if(typeof d=="function"){const le=i.createElement("template");le.content&&le.content.ownerDocument&&(i=le.content.ownerDocument)}let H,x="";const{implementation:Z,createNodeIterator:W,createDocumentFragment:ae,getElementsByTagName:ye}=i,{importNode:Ee}=s;let se=l1();r.isSupported=typeof s_=="function"&&typeof S=="function"&&Z&&Z.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:me,ERB_EXPR:ce,TMPLIT_EXPR:Pe,DATA_ATTR:ve,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:Ae}=s1;let{IS_ALLOWED_URI:O}=s1,k=null;const $=Re({},[...n1,...Bd,...Ud,...jd,...r1]);let Y=null;const te=Re({},[...a1,...Hd,...i1,...Go]);let re=Object.seal(l_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ue=null,We=null,Ue=!0,St=!0,Gn=!1,Mr=!0,Qe=!1,qt=!0,On=!1,Di=!1,Li=!1,Tt=!1,qa=!1,ua=!1,Bi=!0,ca=!1;const xu="user-content-";let Fa=!0,fa=!1,Dr={},dn=null;const Nt=Re({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rn=null;const Mt=Re({},["audio","video","img","source","image","track"]);let Ui=null;const al=Re({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Va="http://www.w3.org/1998/Math/MathML",nr="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let Vt=Ft,Lr=!1,rr=null;const Ou=Re({},[Va,nr,Ft],Ld);let da=Re({},["mi","mo","mn","ms","mtext"]),ha=Re({},["annotation-xml"]);const ji=Re({},["title","style","font","a","script"]);let wn=null;const Ru=["application/xhtml+xml","text/html"],il="text/html";let rt=null,kn=null;const Hi=i.createElement("form"),Ii=function(N){return N instanceof RegExp||N instanceof Function},zi=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kn&&kn===N)){if((!N||typeof N!="object")&&(N={}),N=Tr(N),wn=Ru.indexOf(N.PARSER_MEDIA_TYPE)===-1?il:N.PARSER_MEDIA_TYPE,rt=wn==="application/xhtml+xml"?Ld:Yo,k=Hn(N,"ALLOWED_TAGS")?Re({},N.ALLOWED_TAGS,rt):$,Y=Hn(N,"ALLOWED_ATTR")?Re({},N.ALLOWED_ATTR,rt):te,rr=Hn(N,"ALLOWED_NAMESPACES")?Re({},N.ALLOWED_NAMESPACES,Ld):Ou,Ui=Hn(N,"ADD_URI_SAFE_ATTR")?Re(Tr(al),N.ADD_URI_SAFE_ATTR,rt):al,Rn=Hn(N,"ADD_DATA_URI_TAGS")?Re(Tr(Mt),N.ADD_DATA_URI_TAGS,rt):Mt,dn=Hn(N,"FORBID_CONTENTS")?Re({},N.FORBID_CONTENTS,rt):Nt,ue=Hn(N,"FORBID_TAGS")?Re({},N.FORBID_TAGS,rt):Tr({}),We=Hn(N,"FORBID_ATTR")?Re({},N.FORBID_ATTR,rt):Tr({}),Dr=Hn(N,"USE_PROFILES")?N.USE_PROFILES:!1,Ue=N.ALLOW_ARIA_ATTR!==!1,St=N.ALLOW_DATA_ATTR!==!1,Gn=N.ALLOW_UNKNOWN_PROTOCOLS||!1,Mr=N.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qe=N.SAFE_FOR_TEMPLATES||!1,qt=N.SAFE_FOR_XML!==!1,On=N.WHOLE_DOCUMENT||!1,Tt=N.RETURN_DOM||!1,qa=N.RETURN_DOM_FRAGMENT||!1,ua=N.RETURN_TRUSTED_TYPE||!1,Li=N.FORCE_BODY||!1,Bi=N.SANITIZE_DOM!==!1,ca=N.SANITIZE_NAMED_PROPS||!1,Fa=N.KEEP_CONTENT!==!1,fa=N.IN_PLACE||!1,O=N.ALLOWED_URI_REGEXP||o_,Vt=N.NAMESPACE||Ft,da=N.MATHML_TEXT_INTEGRATION_POINTS||da,ha=N.HTML_INTEGRATION_POINTS||ha,re=N.CUSTOM_ELEMENT_HANDLING||{},N.CUSTOM_ELEMENT_HANDLING&&Ii(N.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=N.CUSTOM_ELEMENT_HANDLING.tagNameCheck),N.CUSTOM_ELEMENT_HANDLING&&Ii(N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=N.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),N.CUSTOM_ELEMENT_HANDLING&&typeof N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=N.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qe&&(St=!1),qa&&(Tt=!0),Dr&&(k=Re({},r1),Y=[],Dr.html===!0&&(Re(k,n1),Re(Y,a1)),Dr.svg===!0&&(Re(k,Bd),Re(Y,Hd),Re(Y,Go)),Dr.svgFilters===!0&&(Re(k,Ud),Re(Y,Hd),Re(Y,Go)),Dr.mathMl===!0&&(Re(k,jd),Re(Y,i1),Re(Y,Go))),N.ADD_TAGS&&(k===$&&(k=Tr(k)),Re(k,N.ADD_TAGS,rt)),N.ADD_ATTR&&(Y===te&&(Y=Tr(Y)),Re(Y,N.ADD_ATTR,rt)),N.ADD_URI_SAFE_ATTR&&Re(Ui,N.ADD_URI_SAFE_ATTR,rt),N.FORBID_CONTENTS&&(dn===Nt&&(dn=Tr(dn)),Re(dn,N.FORBID_CONTENTS,rt)),Fa&&(k["#text"]=!0),On&&Re(k,["html","head","body"]),k.table&&(Re(k,["tbody"]),delete ue.tbody),N.TRUSTED_TYPES_POLICY){if(typeof N.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof N.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=N.TRUSTED_TYPES_POLICY,x=H.createHTML("")}else H===void 0&&(H=p3(U,u)),H!==null&&typeof x=="string"&&(x=H.createHTML(""));Gt&&Gt(N),kn=N}},Cn=Re({},[...Bd,...Ud,...a3]),ht=Re({},[...jd,...i3]),Dt=function(N){let X=S(N);(!X||!X.tagName)&&(X={namespaceURI:Vt,tagName:"template"});const J=Yo(N.tagName),Fe=Yo(X.tagName);return rr[N.namespaceURI]?N.namespaceURI===nr?X.namespaceURI===Ft?J==="svg":X.namespaceURI===Va?J==="svg"&&(Fe==="annotation-xml"||da[Fe]):!!Cn[J]:N.namespaceURI===Va?X.namespaceURI===Ft?J==="math":X.namespaceURI===nr?J==="math"&&ha[Fe]:!!ht[J]:N.namespaceURI===Ft?X.namespaceURI===nr&&!ha[Fe]||X.namespaceURI===Va&&!da[Fe]?!1:!ht[J]&&(ji[J]||!Cn[J]):!!(wn==="application/xhtml+xml"&&rr[N.namespaceURI]):!1},At=function(N){qs(r.removed,{element:N});try{S(N).removeChild(N)}catch{G(N)}},qn=function(N,X){try{qs(r.removed,{attribute:X.getAttributeNode(N),from:X})}catch{qs(r.removed,{attribute:null,from:X})}if(X.removeAttribute(N),N==="is")if(Tt||qa)try{At(X)}catch{}else try{X.setAttribute(N,"")}catch{}},sl=function(N){let X=null,J=null;if(Li)N="<remove></remove>"+N;else{const Je=t1(N,/^[\r\n\t ]+/);J=Je&&Je[0]}wn==="application/xhtml+xml"&&Vt===Ft&&(N='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+N+"</body></html>");const Fe=H?H.createHTML(N):N;if(Vt===Ft)try{X=new A().parseFromString(Fe,wn)}catch{}if(!X||!X.documentElement){X=Z.createDocument(Vt,"template",null);try{X.documentElement.innerHTML=Lr?x:Fe}catch{}}const mt=X.body||X.documentElement;return N&&J&&mt.insertBefore(i.createTextNode(J),mt.childNodes[0]||null),Vt===Ft?ye.call(X,On?"html":"body")[0]:On?X.documentElement:mt},ll=function(N){return W.call(N.ownerDocument||N,N,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Pa=function(N){return N instanceof E&&(typeof N.nodeName!="string"||typeof N.textContent!="string"||typeof N.removeChild!="function"||!(N.attributes instanceof b)||typeof N.removeAttribute!="function"||typeof N.setAttribute!="function"||typeof N.namespaceURI!="string"||typeof N.insertBefore!="function"||typeof N.hasChildNodes!="function")},Br=function(N){return typeof h=="function"&&N instanceof h};function Kt(le,N,X){zo(le,J=>{J.call(r,N,X,kn)})}const ar=function(N){let X=null;if(Kt(se.beforeSanitizeElements,N,null),Pa(N))return At(N),!0;const J=rt(N.nodeName);if(Kt(se.uponSanitizeElement,N,{tagName:J,allowedTags:k}),qt&&N.hasChildNodes()&&!Br(N.firstElementChild)&&Ht(/<[/\w!]/g,N.innerHTML)&&Ht(/<[/\w!]/g,N.textContent)||N.nodeType===Ys.progressingInstruction||qt&&N.nodeType===Ys.comment&&Ht(/<[/\w]/g,N.data))return At(N),!0;if(!k[J]||ue[J]){if(!ue[J]&&Ur(J)&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J)))return!1;if(Fa&&!dn[J]){const Fe=S(N)||N.parentNode,mt=C(N)||N.childNodes;if(mt&&Fe){const Je=mt.length;for(let Lt=Je-1;Lt>=0;--Lt){const Pt=q(mt[Lt],!0);Pt.__removalCount=(N.__removalCount||0)+1,Fe.insertBefore(Pt,_(N))}}}return At(N),!0}return N instanceof m&&!Dt(N)||(J==="noscript"||J==="noembed"||J==="noframes")&&Ht(/<\/no(script|embed|frames)/i,N.innerHTML)?(At(N),!0):(Qe&&N.nodeType===Ys.text&&(X=N.textContent,zo([me,ce,Pe],Fe=>{X=Fs(X,Fe," ")}),N.textContent!==X&&(qs(r.removed,{element:N.cloneNode()}),N.textContent=X)),Kt(se.afterSanitizeElements,N,null),!1)},ir=function(N,X,J){if(Bi&&(X==="id"||X==="name")&&(J in i||J in Hi))return!1;if(!(St&&!We[X]&&Ht(ve,X))){if(!(Ue&&Ht(z,X))){if(!Y[X]||We[X]){if(!(Ur(N)&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,N)||re.tagNameCheck instanceof Function&&re.tagNameCheck(N))&&(re.attributeNameCheck instanceof RegExp&&Ht(re.attributeNameCheck,X)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(X))||X==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&Ht(re.tagNameCheck,J)||re.tagNameCheck instanceof Function&&re.tagNameCheck(J))))return!1}else if(!Ui[X]){if(!Ht(O,Fs(J,ee,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&N!=="script"&&e3(J,"data:")===0&&Rn[N])){if(!(Gn&&!Ht(K,Fs(J,ee,"")))){if(J)return!1}}}}}}return!0},Ur=function(N){return N!=="annotation-xml"&&t1(N,Ae)},sr=function(N){Kt(se.beforeSanitizeAttributes,N,null);const{attributes:X}=N;if(!X||Pa(N))return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let Fe=X.length;for(;Fe--;){const mt=X[Fe],{name:Je,namespaceURI:Lt,value:Pt}=mt,Fn=rt(Je),$t=Pt;let ot=Je==="value"?$t:t3($t);if(J.attrName=Fn,J.attrValue=ot,J.keepAttr=!0,J.forceKeepAttr=void 0,Kt(se.uponSanitizeAttribute,N,J),ot=J.attrValue,ca&&(Fn==="id"||Fn==="name")&&(qn(Je,N),ot=xu+ot),qt&&Ht(/((--!?|])>)|<\/(style|title)/i,ot)){qn(Je,N);continue}if(J.forceKeepAttr)continue;if(!J.keepAttr){qn(Je,N);continue}if(!Mr&&Ht(/\/>/i,ot)){qn(Je,N);continue}Qe&&zo([me,ce,Pe],lr=>{ot=Fs(ot,lr," ")});const Gi=rt(N.nodeName);if(!ir(Gi,Fn,ot)){qn(Je,N);continue}if(H&&typeof U=="object"&&typeof U.getAttributeType=="function"&&!Lt)switch(U.getAttributeType(Gi,Fn)){case"TrustedHTML":{ot=H.createHTML(ot);break}case"TrustedScriptURL":{ot=H.createScriptURL(ot);break}}if(ot!==$t)try{Lt?N.setAttributeNS(Lt,Je,ot):N.setAttribute(Je,ot),Pa(N)?At(N):e1(r.removed)}catch{qn(Je,N)}}Kt(se.afterSanitizeAttributes,N,null)},lt=function le(N){let X=null;const J=ll(N);for(Kt(se.beforeSanitizeShadowDOM,N,null);X=J.nextNode();)Kt(se.uponSanitizeShadowNode,X,null),ar(X),sr(X),X.content instanceof c&&le(X.content);Kt(se.afterSanitizeShadowDOM,N,null)};return r.sanitize=function(le){let N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,J=null,Fe=null,mt=null;if(Lr=!le,Lr&&(le="<!-->"),typeof le!="string"&&!Br(le))if(typeof le.toString=="function"){if(le=le.toString(),typeof le!="string")throw Vs("dirty is not a string, aborting")}else throw Vs("toString is not a function");if(!r.isSupported)return le;if(Di||zi(N),r.removed=[],typeof le=="string"&&(fa=!1),fa){if(le.nodeName){const Pt=rt(le.nodeName);if(!k[Pt]||ue[Pt])throw Vs("root node is forbidden and cannot be sanitized in-place")}}else if(le instanceof h)X=sl("<!---->"),J=X.ownerDocument.importNode(le,!0),J.nodeType===Ys.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?X=J:X.appendChild(J);else{if(!Tt&&!Qe&&!On&&le.indexOf("<")===-1)return H&&ua?H.createHTML(le):le;if(X=sl(le),!X)return Tt?null:ua?x:""}X&&Li&&At(X.firstChild);const Je=ll(fa?le:X);for(;Fe=Je.nextNode();)ar(Fe),sr(Fe),Fe.content instanceof c&<(Fe.content);if(fa)return le;if(Tt){if(qa)for(mt=ae.call(X.ownerDocument);X.firstChild;)mt.appendChild(X.firstChild);else mt=X;return(Y.shadowroot||Y.shadowrootmode)&&(mt=Ee.call(s,mt,!0)),mt}let Lt=On?X.outerHTML:X.innerHTML;return On&&k["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Ht(u_,X.ownerDocument.doctype.name)&&(Lt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
111
111
|
`+Lt),Qe&&zo([me,ce,Pe],Pt=>{Lt=Fs(Lt,Pt," ")}),H&&ua?H.createHTML(Lt):Lt},r.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zi(le),Di=!0},r.clearConfig=function(){kn=null,Di=!1},r.isValidAttribute=function(le,N,X){kn||zi({});const J=rt(le),Fe=rt(N);return ir(J,Fe,X)},r.addHook=function(le,N){typeof N=="function"&&qs(se[le],N)},r.removeHook=function(le,N){if(N!==void 0){const X=WN(se[le],N);return X===-1?void 0:JN(se[le],X,1)[0]}return e1(se[le])},r.removeHooks=function(le){se[le]=[]},r.removeAllHooks=function(){se=l1()},r}var g3=c_();const y3=({onClose:t})=>{const r=Ze();return y.jsxs("div",{className:Et.highlightLoadingInfo,onClick:t,children:[y.jsx("div",{className:Et.highlightLoadingInfoCloseIcon,children:y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})}),y.jsxs("div",{className:Et.highlightLoadingInfoInnerContainer,children:[y.jsxs("div",{className:Et.highlightLoadingInfoContent,children:[y.jsx("h3",{children:r("source-infos.highlight-loading.title")}),y.jsx("p",{children:r("source-infos.highlight-loading.description")})]}),y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#000000",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M253.66,106.34a8,8,0,0,0-11.32,0L192,156.69,107.31,72l50.35-50.34a8,8,0,1,0-11.32-11.32L96,60.69A16,16,0,0,0,93.18,79.5L72,100.69a16,16,0,0,0,0,22.62L76.69,128,18.34,186.34a8,8,0,0,0,3.13,13.25l72,24A7.88,7.88,0,0,0,96,224a8,8,0,0,0,5.66-2.34L136,187.31l4.69,4.69a16,16,0,0,0,22.62,0l21.19-21.18A16,16,0,0,0,203.31,168l50.35-50.34A8,8,0,0,0,253.66,106.34ZM93.84,206.85l-55-18.35L88,139.31,124.69,176ZM152,180.69,83.31,112,104,91.31,172.69,160Z"})})]})]})},b3=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),v3=({className:t,children:r,...i})=>y.jsx("a",{className:Q(el.button,el.buttonDefault,t),type:"button",role:"button",...i,children:r}),_3=t=>y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...t,children:y.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),E3=({type:t,...r})=>{switch(t){case"WEBSITE":return y.jsx(Wv,{...r});case"PDF":return y.jsx($v,{...r});case"DOCX":return y.jsx(Qv,{...r});case"TEXT":return y.jsx(_3,{...r});default:return y.jsx(Kv,{...r})}},S3=({url:t,knowledgeBaseType:r})=>{const i=Ze();return y.jsx(v3,{className:Et.openSourceButton,href:t,target:"_blank",children:y.jsxs("div",{className:Et.sourceButtonLabel,children:[y.jsx("div",{className:Et.sourceHeaderIcon,children:y.jsx(E3,{type:r})}),y.jsx("p",{children:i("source-infos.open-source")})]})})},T3=({sourceInfos:{content:t,url:r,knowledgeBaseType:i,highlighted:s}})=>{const[u,c]=B.useState(!s);B.useEffect(()=>{s&&c(!1)},[s]);const d=g3.sanitize(t,{USE_PROFILES:{html:!0}});return y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Q(Et.sourceContent,e_.markdown),children:[y.jsx(Or,{options:{overrides:{a:b3}},children:d}),u&&y.jsx(y3,{onClose:()=>c(!1)})]}),y.jsx(S3,{url:r,knowledgeBaseType:i})]})},A3=""+new URL("undraw_fixing-bugs-D_eYxJc6.svg",import.meta.url).href,x3=()=>{const t=Ze();return y.jsxs("div",{className:Et.loadingError,children:[y.jsx("h1",{children:t("source-infos.error.title")}),y.jsx("img",{src:A3,title:t("source-infos.error.title")}),y.jsx("p",{children:t("source-infos.error.info")})]})},O3=()=>y.jsx("div",{className:Et.loadingSourceInfos,children:y.jsx("svg",{className:Et.loading,xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:y.jsx("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"})})});function R3({sourceInfos:t,onClose:r,threshold:i=100}){const s=B.useRef(null),[u,c]=B.useState(0),[d,h]=B.useState(!1),m=B.useRef(null),p=B.useRef(null),b=B.useCallback(R=>{m.current=R,h(!0)},[]),E=B.useCallback(R=>{if(m.current!==null&&d){const q=R-m.current;q>0&&c(q)}},[d]),A=B.useCallback(()=>{h(!1),u>i&&r(),c(0),m.current=null},[u,i,r]),U=B.useCallback(R=>{const q=x=>b(x.touches[0].clientY),G=x=>E(x.touches[0].clientY),_=()=>A(),C=x=>{x.preventDefault(),b(x.clientY),window.addEventListener("mousemove",S),window.addEventListener("mouseup",H)},S=x=>E(x.clientY),H=()=>{A(),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",H)};R.addEventListener("touchstart",q),R.addEventListener("touchmove",G),R.addEventListener("touchend",_),R.addEventListener("mousedown",C),p.current=()=>{R.removeEventListener("touchstart",q),R.removeEventListener("touchmove",G),R.removeEventListener("touchend",_),R.removeEventListener("mousedown",C),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",H)}},[b,E,A]);return B.useEffect(()=>{let R;return(()=>{s.current?(p.current?.(),U(s.current)):(R=new MutationObserver(()=>{s.current&&(p.current?.(),U(s.current),R?.disconnect())}),R.observe(document.body,{childList:!0,subtree:!0}))})(),()=>{R?.disconnect(),p.current?.()}},[U,t]),{ref:s,dragOffsetY:u,isDragging:d}}const w3=t=>{const[r,i]=B.useState(!0);return B.useEffect(()=>{let s=null;return t?.type==="loading"?(i(!0),s=setTimeout(()=>{i(!1)},300)):i(!t),()=>{s&&clearTimeout(s)}},[t]),r},C3=()=>{const t=Nr(),r=st(m=>m.chat.sourceInfos),i=i_(),s=B.useRef(null),u=w3(r);B.useEffect(()=>{s.current&&r?.type==="loading"&&(i?s.current.showModal():(s.current.setAttribute("open","true"),s.current?.focus()))},[r,i]);const c=B.useCallback(()=>{s.current&&(i?s.current.close():s.current.removeAttribute("open"),t(OO()))},[t,i]),{ref:d,dragOffsetY:h}=R3({onClose:c,sourceInfos:r});return r?y.jsx("dialog",{ref:s,className:Q(Et.sourceInfos,u?Et.waitForLoading:r.type==="loading"?Et.loadingContent:""),style:i&&h?{transform:`translateY(${h}px)`}:{},onClose:c,autoFocus:!0,role:"dialog","aria-labelledby":"source-info-title",children:u?null:y.jsxs(y.Fragment,{children:[y.jsx(XN,{ref:d,tabIndex:-1,sourceInfos:r.type==="loaded"?r:void 0,onClose:c}),r.type==="loading"?y.jsx(O3,{}):r.type==="loading-error"?y.jsx(x3,{}):y.jsxs(y.Fragment,{children:[y.jsx(ZN,{loading:!r.highlighted}),y.jsx(T3,{sourceInfos:r})]})]})}):null},N3="_container_1aof3_1",M3="_body_1aof3_7",D3="_intro_1aof3_14",L3="_footer_1aof3_39",B3="_footnote_1aof3_43",U3="_containerWithFootnote_1aof3_58",j3="_startChatButton_1aof3_73",H3="_spinner_1aof3_88",I3="_formFields_1aof3_92",z3="_formField_1aof3_92",G3="_radio_1aof3_104",k3="_checkbox_1aof3_111",q3="_input_1aof3_119",F3="_inputLabel_1aof3_153",V3="_selectWrapper_1aof3_157",P3="_select_1aof3_157",Y3="_selectLabel_1aof3_203",_t={container:N3,body:M3,intro:D3,footer:L3,footnote:B3,containerWithFootnote:U3,startChatButton:j3,spinner:H3,formFields:I3,formField:z3,radio:G3,checkbox:k3,input:q3,inputLabel:F3,selectWrapper:V3,select:P3,selectLabel:Y3},X3=({name:t,label:r,defaultValue:i,required:s,onChange:u})=>{const c=d=>{u(d.currentTarget.checked?"true":"false")};return y.jsxs("label",{className:Q(_t.checkbox,"chat__startScreen__checkbox"),htmlFor:t,children:[y.jsx("input",{type:"checkbox",id:t,name:t,defaultChecked:i==="true",required:s,onChange:c}),y.jsx("div",{children:r})]})},Z3=({type:t,name:r,label:i,defaultValue:s,placeholder:u,required:c,multiple:d,min:h,max:m,pattern:p,onChange:b})=>{const E=A=>{b(A.target.value)};return y.jsxs("label",{className:Q(_t.input,"chat__startScreen__input"),htmlFor:r,children:[y.jsx("div",{className:Q(_t.inputLabel),children:i}),y.jsx("input",{type:t,id:r,name:r,defaultValue:s,placeholder:u,required:c,multiple:d,min:h,max:m,pattern:p,onChange:E})]})},Q3=({name:t,value:r,label:i,defaultChecked:s,required:u,onChange:c})=>{const d=`${t}-${r}`,h=m=>{c(m.target.value)};return y.jsxs("label",{className:Q(_t.radio,"chat__startScreen__radio"),htmlFor:d,children:[y.jsx("input",{id:d,type:"radio",name:t,value:r,defaultChecked:s,required:u,onChange:h}),y.jsx("span",{className:Q(_t.label),children:i})]})},K3=({name:t,label:r,defaultValue:i,required:s,multiple:u,options:c,onChange:d})=>{const h=m=>{d(m.target.value)};return y.jsxs("label",{className:Q(_t.select,"chat__startScreen__select"),htmlFor:t,children:[y.jsx("div",{className:Q(_t.selectLabel),children:r}),y.jsx("div",{className:Q(_t.selectWrapper),children:y.jsx("select",{id:t,name:t,defaultValue:i,required:s,multiple:u,onChange:h,children:Object.entries(c||{}).map(([m,p])=>y.jsx("option",{value:m,selected:p===i,children:p}))})})]})},$3="start-screen.intro",W3="start-screen.start-chat",J3="start-screen.waiting-for-login",e8="start-screen.footnote",jn="start-screen.form",o1=`${jn}.fields`,t8=()=>{const t=Ze(),r=Nr(),i=Su(),s=st(R=>R.startScreen.loginRequestToken),u=st(R=>R.settings.requiresUserAuthentication);B.useEffect(()=>{let R;if(s){const _=window.screenX+(window.outerWidth-600)/2,C=window.screenY+(window.outerHeight-700)/2,S=window.open(`/${i}/auth/login?loginRequestToken=${s}`,"Login",`width=600,height=700,left=${_},top=${C},resizable=yes,scrollbars=yes`);R=setInterval(()=>{S?.closed&&(r(SO()),clearInterval(R))},500)}return()=>{R&&clearInterval(R)}},[i,s,r]);const[c,d]=B.useState({}),h=()=>{const R=Object.entries(c).reduce((q,[G,_])=>({...q,[G]:_.value}),{});r(u?EO({loginRequestToken:Wo(),formValues:R}):bO({formValues:R}))},m=t($3),p=t(s?J3:W3),b=t(e8),E=B.useMemo(()=>t(o1)?.split(";").map(R=>R.trim())??[],[t(o1)]);B.useEffect(()=>{E.length&&Object.keys(c).length===0&&d(E.reduce((R,q)=>({...R,[q]:n8(q,t)}),{}))},[t,E,c]);const A=R=>{R.preventDefault(),h()},U=R=>q=>{d(G=>({...G,[R]:{...G[R],value:q}}))};return y.jsxs("form",{onSubmit:A,className:Q(_t.container,b&&_t.containerWithFootnote,"chat__startScreen"),children:[y.jsxs("div",{className:Q(_t.body,"chat__startScreen__body"),children:[m&&y.jsx("div",{className:Q(_t.intro,"chat__startScreen__intro"),children:y.jsx(Or,{options:{overrides:{a:u1}},children:m})}),y.jsx("div",{className:Q(_t.formFields,"chat__startScreen__fields"),children:Object.values(c).map(({type:R,name:q,label:G,placeholder:_,defaultValue:C,options:S,required:H,multiple:x,min:Z,max:W,pattern:ae})=>y.jsx("div",{className:Q(_t.formField,"chat__startScreen__field"),children:(()=>{switch(R){case"radio":return y.jsxs(y.Fragment,{children:[y.jsx("div",{children:G}),Object.entries(S||{}).map(([ye,Ee])=>y.jsx(Q3,{name:q,value:ye,label:Ee,defaultChecked:ye===C,required:H,onChange:U(q)},ye))]});case"checkbox":return y.jsx(X3,{name:q,label:G,defaultValue:C,required:H,onChange:U(q)});case"select":return y.jsx(K3,{name:q,label:G,defaultValue:C,required:H,multiple:x,options:S,onChange:U(q)});default:return y.jsx(Z3,{type:R,name:q,label:G,placeholder:_,defaultValue:C,required:H,multiple:x,min:Z,max:W,pattern:ae,onChange:U(q)})}})()},q))})]}),y.jsxs("div",{className:Q(_t.footer,"chat__startScreen__footer"),children:[y.jsxs(iu,{type:"submit",className:_t.startChatButton,disabled:!!s,children:[!!s&&y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",className:_t.spinner,children:y.jsx("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"})}),y.jsx("div",{children:p})]}),b&&y.jsx("div",{className:_t.footnote,children:y.jsx(Or,{options:{overrides:{a:u1}},children:b})})]})]})},u1=({title:t,href:r,children:i})=>y.jsx("a",{href:r,title:t,target:"_blank",rel:"noopener noreferrer",children:i}),n8=(t,r)=>{const i=r(`${jn}.${t}.type`)||"text",s=r(`${jn}.${t}.required`)==="true",u=r(`${jn}.${t}.multiple`)==="true",c=r(`${jn}.${t}.placeholder`),d=r(`${jn}.${t}.label`)||"",h=r(`${jn}.${t}.defaultValue`),m=r(`${jn}.${t}.min`),p=r(`${jn}.${t}.max`),b=r(`${jn}.${t}.pattern`),E=a8(r(`${jn}.${t}.options`));return{name:t,label:d,placeholder:c,value:r8(i,h,E)||"",defaultValue:h,options:E,type:i,required:s,multiple:u,min:m,max:p,pattern:b}},r8=(t,r,i)=>r||t==="select"&&Object.keys(i)[0]||"",a8=(t="")=>t.split(";").map(r=>r.trim()).reduce((r,i)=>{const[s,u]=i.split(":").map(c=>c.trim());return{...r,[s]:u}},{}),i8=()=>{const t=cu();B.useEffect(()=>{window.document.documentElement.lang=t.locale},[t.locale])},Oi={TRIGGER_ACTION:"TRIGGER_ACTION",TRIGGER_STORY:"TRIGGER_STORY",CHAT_MESSAGE_FROM_GUEST:"CHAT_MESSAGE_FROM_GUEST",ON_CHAT_WINDOW_OPEN:"ON_CHAT_WINDOW_OPEN",ON_CHAT_WINDOW_CLOSE:"ON_CHAT_WINDOW_CLOSE",RESTART_CHAT:"RESTART_CHAT"},s8=({clientName:t})=>{i8();const r=Nr(),i=st(b=>b.intl.messages),s=Ze(),u=st(b=>b.settings.enableStartScreen),c=st(b=>b.startScreen.startScreenStatus),[d,h]=B.useState(void 0);B.useEffect(()=>{const b=fu.parse(window.location.search);b.cssClassName&&h(b.cssClassName);const E=A=>{switch(A.data.type){case Oi.TRIGGER_ACTION:r(A.data.action);break;case Oi.TRIGGER_STORY:r(mv(A.data.story));break;case Oi.ON_CHAT_WINDOW_OPEN:r({type:"webclient.chatwindow.opened"});break;case Oi.ON_CHAT_WINDOW_CLOSE:r({type:"webclient.chatwindow.closed"});break;case Oi.CHAT_MESSAGE_FROM_GUEST:r(uv(A.data.text));break;case Oi.RESTART_CHAT:r(bu(t,b));break}};return r(wO(t,b)),window.addEventListener("message",A=>E(A),!1),()=>window.removeEventListener("message",E)},[t,r]),B.useEffect(()=>{const b=s("page.title");b&&document&&(document.title=b)},[i,s]);const m=u===void 0,p=u===!1||c==="HIDDEN";return y.jsx("div",{className:Q(Wb.chatwindow,p&&Wb.chatwindowWithAside,"chat__chatwindow",d),children:m?null:p?y.jsxs(y.Fragment,{children:[y.jsx("header",{children:y.jsx($b,{chatStarted:!0})}),y.jsx("main",{children:y.jsx(fN,{clientName:t})}),y.jsx("aside",{children:y.jsx(C3,{})})]}):y.jsxs(y.Fragment,{children:[y.jsx("header",{children:y.jsx($b,{chatStarted:!1})}),y.jsx("main",{children:y.jsx(t8,{})})]})})},l8=()=>{const t=Su(),r=i_(),i=st(u=>u.intl.locale),s=st(u=>u.intl.messages);return y.jsx(MA,{locale:i,messages:s,onError:()=>{},children:y.jsx("div",{className:Q([LA.app,r?"chat__small":"chat__large"]),children:y.jsx(s8,{clientName:t})})})};var Id,c1;function o8(){if(c1)return Id;c1=1;var t=Xv(),r=Qh(),i="Expected a function";function s(u,c,d){var h=!0,m=!0;if(typeof u!="function")throw new TypeError(i);return r(d)&&(h="leading"in d?!!d.leading:h,m="trailing"in d?!!d.trailing:m),t(u,c,{leading:h,maxWait:c,trailing:m})}return Id=s,Id}var u8=o8();const c8=lu(u8);function f8(t){return t&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function d8(t){return t}function h8(t,r){r=r||{};const i=r.delimiter||".",s=r.maxDepth,u=r.transformKey||d8,c={};function d(h,m,p){p=p||1,Object.keys(h).forEach(function(b){const E=h[b],A=r.safe&&Array.isArray(E),U=Object.prototype.toString.call(E),R=f8(E),q=U==="[object Object]"||U==="[object Array]",G=m?m+i+u(b):u(b);if(!A&&!R&&q&&Object.keys(E).length&&(!r.maxDepth||p<s))return d(E,G,p+1);c[G]=E})}return d(t),c}const f_={"page.title":"Bubble Chat Chatbot","message-input-label":"Benutzereingabe","message-input-placeholder":"Nachricht eingeben","message-input.actions.submit.label":"Nachricht senden","message-input.actions.start-audio-recording.label":"Spracheingabe starten","message-input.actions.stop-audio-recording.label":"Spracheingabe stoppen","message-input.actions.submit-audio-recording.label":"Spracheingabe übermitteln","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","bot-bubble.reaction.good":"Gefällt mir","bot-bubble.reaction.bad":"Gefällt mir nicht","bot-bubble.reaction.remove":"Markierung entfernen","bot-bubble.reaction.say-more":"Erzähle mir bitte mehr","bot-bubble.reaction.category.WRONG_INFORMATION":"Falsch","bot-bubble.reaction.category.MISSING_INFORMATION":"Unvollständig","bot-bubble.reaction.category.OLD_INFORMATION":"Veraltet","bot-bubble.reaction.category.UNCLEAR":"Unklar","bot-bubble.reaction.category.OFF_TOPIC":"Nicht zur Frage passend","bot-bubble.reaction.comment":"Gedanken mit mir teilen...","bot-bubble.reaction.close":"Schliessen","bot-bubble.copy":"Kopieren","bot-bubble.sources":"Quellenliste","bot-bubble.source.open":"Quelle öffnen","agent-bubble.label":"Nachricht des Live-Agenten","export-transcript.email.title":"Chatverlauf per E-Mail versenden","export-transcript.email.description":"Bitte E-Mail-Adresse angeben, an die der Chatverlauf gesendet werden soll.","export-transcript.email.cancel":"Abbrechen","export-transcript.email.send":"Senden","export-transcript.email.placeholder":"E-Mail-Adresse","export-transcript.email.invalid":"Bitte gültige E-Mail-Adresse eingeben.","export-transcript.email.success":"Der Chatverlauf wurde an die hinterlegte E-Mail-Adresse übermittelt.","general-conditions.header":"**Nutzungsbedingungen**","general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
|
|
112
112
|
|
|
@@ -120,5 +120,5 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
120
120
|
- Ne saisissez aucune information personnelle dans la fenêtre de chat (mots de passe, date de naissance, etc.).`,"general-conditions.accept-conditions-note":"En utilisant le chat, vous acceptez les conditions d'utilisation.","block-user-input.title":"Veuillez attendre la réponse du chatbot.","conversation-rating.call-to-action.title":"Notez ce chat","conversation-rating.overlay.title":"Dans quelle mesure êtes-vous satisfait de ce chat ?","conversation-rating.overlay.guest-feedback.input-placeholder":"Veuillez saisir vos commentaires ici (facultatif)","conversation-rating.overlay.star.very-bad":"Très mauvais","conversation-rating.overlay.star.very-good":"Très bien","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La moyenne n'est pas mon objectif, que puis-je encore améliorer ?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Le rater de peu, c'est le rater aussi. Que puis-je encore améliorer pour obtenir toutes les étoiles la prochaine fois ?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Parfait ! Alors j'espère pouvoir vous conseiller aussi bien une fois de plus.","conversation-rating.overlay.bot-message.submit-feedback":"Merci beaucoup pour votre feed-back. Je m'efforce de m'améliorer en permanence.","conversation-rating.overlay.action.submit":"Envoyer","conversation-rating.overlay.action.back-to-chat":"Fermer","conversation-rating.overlay.action.close-chat":"Minimiser le chat","conversation-rating.overlay.action.cancel":"Annuler","start-screen.intro":"","start-screen.start-chat":"Démarrer le chat","start-screen.waiting-for-login":"En attente de connexion ...","header.close-chat":"Minimiser le chat","header.menu.title":"Menu","header.menu.restart-chat":"Redémarrer le chat","header.menu.expand-chat-window":"Agrandir la fenêtre","header.menu.download-transcript":"Télécharger l'historique du chat","header.menu.send-transcript":"Envoyer l'historique du chat","header.menu.export-transcript":"Exporter l'historique du chat","header.menu.rate-conversation":"Évaluer le chat","source-infos.close":"Fermer","source-infos.open-source":"Ouvrir source","source-infos.error.title":"Erreur","source-infos.error.info":"Oups ! Quelque chose s'est mal passé. Merci de réessayer ou de contacter le support si le problème persiste.","source-infos.highlight-loading.title":"Contenus pertinents en surbrillance...","source-infos.highlight-loading.description":"Un instant - la source est analysée","commands.show-more.action":"Plus","commands.show-more.tooltip":"Afficher plus de commandes","commands.show-less.action":"Moins","commands.show-less.tooltip":"Afficher moins de commandes"},g8={"page.title":"Bubble Chat Chatbot","message-input-label":"Input dell'utente","message-input-placeholder":"Inserire un messaggio","message-input.actions.submit.label":"Invia messaggio","message-input.actions.start-audio-recording.label":"Avviare l'input vocale","message-input.actions.stop-audio-recording.label":"Interrompere l'input vocale","message-input.actions.submit-audio-recording.label":"Trasmettere l'input vocale","guest-bubble.label":"Il tuo messaggio","bot-bubble.label":"Messaggio del chatbot","bot-bubble.reaction.good":"Mi piace","bot-bubble.reaction.bad":"Non mi piace","bot-bubble.reaction.remove":"Rimuovere il marcatore","bot-bubble.reaction.say-more":"Disci più, per favore","bot-bubble.reaction.category.WRONG_INFORMATION":"Errate","bot-bubble.reaction.category.MISSING_INFORMATION":"Incompleto","bot-bubble.reaction.category.OLD_INFORMATION":"Obsoleta","bot-bubble.reaction.category.UNCLEAR":"Poco chiaro","bot-bubble.reaction.category.OFF_TOPIC":"Non pertinente alla domanda","bot-bubble.reaction.comment":"Condividete con noi i vostri pensieri...","bot-bubble.reaction.close":"Chiudere","bot-bubble.copy":"Copia","bot-bubble.sources":"Elenco delle fonti","bot-bubble.source.open":"Fonte aperta","agent-bubble.label":"Messaggio dell'agente dal vivo","export-transcript.email.title":"Ricevere la cronologia della chat","export-transcript.email.description":"Inserire l'indirizzo e-mail a cui inviare la cronologia della chat.","export-transcript.email.cancel":"Annulla","export-transcript.email.send":"Invia","export-transcript.email.placeholder":"E-mail","export-transcript.email.invalid":"Inserire un indirizzo e-mail valido.","export-transcript.email.success":"La cronologia della chat è stata inviata all'indirizzo e-mail fornito.","general-conditions.header":"**Condizioni di utilizzo**","general-conditions.body":`Si prega di considerare i seguenti punti:
|
|
121
121
|
|
|
122
122
|
- La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
|
|
123
|
-
- Non inserire dati personali nella finestra di chat (password, data di nascita, ecc.).`,"general-conditions.accept-conditions-note":"Utilizzando la chat si accettano le condizioni d'uso.","block-user-input.title":"Attendere la risposta del chatbot.","conversation-rating.call-to-action.title":"Valuta questa chat","conversation-rating.overlay.title":"Quanto sei soddisfatto di questa chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Inserisci qui il tuo feedback (opzionale)","conversation-rating.overlay.star.very-bad":"Molto male","conversation-rating.overlay.star.very-good":"Molto buono","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La media non è il mio obiettivo, cosa posso ancora migliorare?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfetto! Allora spero di potervi consigliare ancora una volta bene.","conversation-rating.overlay.bot-message.submit-feedback":"Grazie mille per il feedback. Mi impegno costantemente per migliorare.","conversation-rating.overlay.action.submit":"Invia","conversation-rating.overlay.action.back-to-chat":"Chiudere","conversation-rating.overlay.action.close-chat":"Minimizzare la chat","conversation-rating.overlay.action.cancel":"Annulla","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","start-screen.waiting-for-login":"In attesa di login ...","header.close-chat":"Minimizzare la chat","header.menu.title":"Menu","header.menu.restart-chat":"Riavviare la chat","header.menu.expand-chat-window":"Espandere la finestra","header.menu.download-transcript":"Scaricare la trascrizione","header.menu.send-transcript":"Inviare la trascrizione","header.menu.export-transcript":"Esportare la trascrizione","header.menu.rate-conversation":"Valutare la conversazione","source-infos.close":"Chiudere","source-infos.open-source":"Fonte aperta","source-infos.error.title":"Errore","source-infos.error.info":"Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.","source-infos.highlight-loading.title":"Il contenuto rilevante è evidenziato...","source-infos.highlight-loading.description":"Un momento - la fonte è in fase di analisi","commands.show-more.action":"Di più","commands.show-more.tooltip":"Mostra più comandi","commands.show-less.action":"Meno","commands.show-less.tooltip":"Mostra meno comandi"},y8=["de","en","fr","it"],d_={locale:"de",messages:f_},b8=(t,r)=>{if(y8.includes(t)){const i=v8(t),s=h8(r);return{...i,...s}}return r},v8=t=>{switch(t.toString()){case"en":return m8;case"fr":return p8;case"it":return g8;default:return f_}},_8=(t=E8,r)=>{switch(r.type){case kh:return Object.assign({},t,{connectionState:Ia.CONNECTING});case qh:return Object.assign({},t,{connectionState:Ia.CONNECTED});case Fh:return Object.assign({},t,{connectionState:Ia.DISCONNECTED});case Vh:return Object.assign({},t,{connectionState:Ia.RECONNECTED});case Ph:return Object.assign({},t,{sessionId:r.sessionId});case gu:return Object.assign({},t,{sessionId:r.payload.sessionId,userId:r.payload.userId});case yu:return Object.assign({},t,{sessionId:void 0});default:return t}},E8={connectionState:Ia.DISCONNECTED,sessionId:void 0,userId:void 0},S8=(t=d1,r)=>{switch(r.type){case Nv:return d1;case gu:return Ua({type:"webclient.chat.started"}),t;case yu:return Ua({type:"webclient.chat.ended"}),t;case Te.ActionTypes.TYPING_ON:return Object.assign({},t,{isBotTyping:!0});case Te.ActionTypes.TYPING_OFF:return Object.assign({},t,{isBotTyping:!1});case Te.ActionTypes.MESSAGE_FROM_GUEST:case Te.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return f1(t,r.message);case Te.ActionTypes.MESSAGE_TO_GUEST:{Ua(r);const i=Object.assign({},r.message,{_id:r.meta.actionId}),s=t.messages.filter(u=>u._id===r.meta.actionId).length>0;return Object.assign({},t,{isBotTyping:!1,messages:s?t.messages:t.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case wh:{const i=r.messages,s=i.length?i[i.length-1]:void 0;return Object.assign({},t,{isBotTyping:!1,messages:i,quickReplies:s?.quickReplies||[]})}case Rh:return Ua(r.message),t;case Te.ActionTypes.EVENT_TO_GUEST:return Ua(r.event),t;case Te.ActionTypes.DRAWER_OPEN:return Object.assign({},t,{drawerContentUrl:r.payload.parameters.contentUrl});case Te.ActionTypes.DRAWER_CLOSE:return Object.assign({},t,{drawerContentUrl:void 0});case Te.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},t,{locale:r.payload.locale});case fv:return Ua(r),t;case dv:return Ua(r),{...t,conversationRating:{...t.conversationRating,opener:void 0}};case Nh:{const i=new Te.TextMessage(r.transcription,new Te.GuestUser),s=Object.assign({},i,{_id:Wo()});return f1(t,s)}case Te.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=t.messages.map(s=>s._id===r.payload.actionId?Object.assign({},s,r.payload.reaction?{reaction:{type:r.payload.reaction,category:r.payload.category,comment:r.payload.comment}}:{reaction:void 0}):s);return Object.assign({},t,{messages:i})}case Mh:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},t,{conversationRating:i})}case Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...t.conversationRating,rating:r.payload};return Object.assign({},t,{conversationRating:i})}case Dv:{const i={...t.conversationRating,opener:r.payload.opener,...r.payload.defaultRating?{rating:{value:r.payload.defaultRating,feedback:t.conversationRating.rating?.feedback||""}}:{}};return Object.assign({},t,{conversationRating:i})}case Lv:{const i={...t.conversationRating,opener:void 0};return Object.assign({},t,{conversationRating:i})}case Lh:return{...t,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Dh:{const{highlighted:i}=r.payload;return t.sourceInfos?.type==="loaded"&&i?{...t,sourceInfos:{...t.sourceInfos,highlighted:!0}}:{...t,sourceInfos:{type:"loading-error"}}}case cv:{const i=t.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}=r.payload,p=t.sourceInfos?.type==="loading"||t.sourceInfos?.type==="loaded"?t.sourceInfos?.chunkId:void 0;return p&&p!==s?t:i==="loading"||i==="loaded"&&h?{...t,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}}:t}case Bh:return{...t,sourceInfos:void 0};case Mv:return{...t,showTranscriptMailOverlay:!t.showTranscriptMailOverlay,conversationRating:{...t.conversationRating,opener:void 0}};default:return t}},f1=(t,r)=>{const i=t.messages[t.messages.length-1],s=i?.text===r.text;return i&&i.sender.type===r.sender.type&&s?t:Object.assign({},t,{messages:t.messages.concat([r]),quickReplies:[]})},Ua=t=>{T8()?window.top?.postMessage(t,"*"):t.type==="webclient.change.url"&&window.open(t.url)},T8=()=>typeof window<"u"&&window.self!==window.top,d1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},h_=Ih({name:"intl",initialState:d_,reducers:{updateIntl:(t,r)=>{t.locale=r.payload.language,t.messages=r.payload.messages}}}),{updateIntl:A8}=h_.actions,x8=h_.reducer,O8={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},m_=Ih({name:"settings",initialState:O8,reducers:{setSettings(t,r){t.version&&t.version!==r.payload.version?(console.log("version changed, reloading chat window"),window.location.reload()):(t.version=r.payload.version,t.requiresUserAuthentication=r.payload.requiresUserAuthentication,t.enableStartScreen=r.payload.enableStartScreen,t.enableStandaloneView=r.payload.enableStandaloneView,t.enableTranscriptExportEmail=r.payload.enableTranscriptExportEmail,t.enableTranscriptExportPdf=r.payload.enableTranscriptExportPdf,t.enableGeneralConditions=r.payload.enableGeneralConditions,t.enableSpeechSupport=r.payload.enableSpeechSupport,t.commands=r.payload.commands,t.menuItems=r.payload.menuItems||[])}}}),{setSettings:R8}=m_.actions,w8=m_.reducer,C8=bv({settings:w8,chat:S8,startScreen:TO,connection:_8,intl:x8}),N8="bubble-chat",p_="state-last-saved-at",g_="state",M8=t=>{try{if(!B8())return;const r=h1(t,p_);if(L8(r))return;{const i=h1(t,g_);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},D8=(t,r)=>{try{const i=JSON.stringify(r);m1(t,g_,i);const s=new Date().toISOString();m1(t,p_,s)}catch(i){console.error(i)}},L8=t=>{if(t===null)return!1;const r=new Date(t);return r.setHours(r.getHours()+12),new Date>r},B8=()=>typeof localStorage<"u",h1=(t,r)=>{const i=y_(t,r);return localStorage.getItem(i)},m1=(t,r,i)=>{const s=y_(t,r);return localStorage.setItem(s,i)},y_=(t,r)=>`${N8}-${t}-${r}`,tr=Object.create(null);tr.open="0";tr.close="1";tr.ping="2";tr.pong="3";tr.message="4";tr.upgrade="5";tr.noop="6";const Xo=Object.create(null);Object.keys(tr).forEach(t=>{Xo[tr[t]]=t});const fh={type:"error",data:"parser error"},b_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v_=typeof ArrayBuffer=="function",__=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,$h=({type:t,data:r},i,s)=>b_&&r instanceof Blob?i?s(r):p1(r,s):v_&&(r instanceof ArrayBuffer||__(r))?i?s(r):p1(new Blob([r]),s):s(tr[t]+(r||"")),p1=(t,r)=>{const i=new FileReader;return i.onload=function(){const s=i.result.split(",")[1];r("b"+(s||""))},i.readAsDataURL(t)};function g1(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let zd;function U8(t,r){if(b_&&t.data instanceof Blob)return t.data.arrayBuffer().then(g1).then(r);if(v_&&(t.data instanceof ArrayBuffer||__(t.data)))return r(g1(t.data));$h(t,!1,i=>{zd||(zd=new TextEncoder),r(zd.encode(i))})}const y1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<y1.length;t++)Ks[y1.charCodeAt(t)]=t;const j8=t=>{let r=t.length*.75,i=t.length,s,u=0,c,d,h,m;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);const p=new ArrayBuffer(r),b=new Uint8Array(p);for(s=0;s<i;s+=4)c=Ks[t.charCodeAt(s)],d=Ks[t.charCodeAt(s+1)],h=Ks[t.charCodeAt(s+2)],m=Ks[t.charCodeAt(s+3)],b[u++]=c<<2|d>>4,b[u++]=(d&15)<<4|h>>2,b[u++]=(h&3)<<6|m&63;return p},H8=typeof ArrayBuffer=="function",Wh=(t,r)=>{if(typeof t!="string")return{type:"message",data:E_(t,r)};const i=t.charAt(0);return i==="b"?{type:"message",data:I8(t.substring(1),r)}:Xo[i]?t.length>1?{type:Xo[i],data:t.substring(1)}:{type:Xo[i]}:fh},I8=(t,r)=>{if(H8){const i=j8(t);return E_(i,r)}else return{base64:!0,data:t}},E_=(t,r)=>{switch(r){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},S_="",z8=(t,r)=>{const i=t.length,s=new Array(i);let u=0;t.forEach((c,d)=>{$h(c,!1,h=>{s[d]=h,++u===i&&r(s.join(S_))})})},G8=(t,r)=>{const i=t.split(S_),s=[];for(let u=0;u<i.length;u++){const c=Wh(i[u],r);if(s.push(c),c.type==="error")break}return s};function k8(){return new TransformStream({transform(t,r){U8(t,i=>{const s=i.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const c=new DataView(u.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{u=new Uint8Array(9);const c=new DataView(u.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(i)})}})}let Gd;function ko(t){return t.reduce((r,i)=>r+i.length,0)}function qo(t,r){if(t[0].length===r)return t.shift();const i=new Uint8Array(r);let s=0;for(let u=0;u<r;u++)i[u]=t[0][s++],s===t[0].length&&(t.shift(),s=0);return t.length&&s<t[0].length&&(t[0]=t[0].slice(s)),i}function q8(t,r){Gd||(Gd=new TextDecoder);const i=[];let s=0,u=-1,c=!1;return new TransformStream({transform(d,h){for(i.push(d);;){if(s===0){if(ko(i)<1)break;const m=qo(i,1);c=(m[0]&128)===128,u=m[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(ko(i)<2)break;const m=qo(i,2);u=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(ko(i)<8)break;const m=qo(i,8),p=new DataView(m.buffer,m.byteOffset,m.length),b=p.getUint32(0);if(b>Math.pow(2,21)-1){h.enqueue(fh);break}u=b*Math.pow(2,32)+p.getUint32(4),s=3}else{if(ko(i)<u)break;const m=qo(i,u);h.enqueue(Wh(c?m:Gd.decode(m),r)),s=0}if(u===0||u>t){h.enqueue(fh);break}}}})}const T_=4;function dt(t){if(t)return F8(t)}function F8(t){for(var r in dt.prototype)t[r]=dt.prototype[r];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this};dt.prototype.once=function(t,r){function i(){this.off(t,i),r.apply(this,arguments)}return i.fn=r,this.on(t,i),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,u=0;u<i.length;u++)if(s=i[u],s===r||s.fn===r){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),i=this._callbacks["$"+t],s=1;s<arguments.length;s++)r[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,u=i.length;s<u;++s)i[s].apply(this,r)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Tu=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,i)=>i(r,0),Sn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V8="arraybuffer";function A_(t,...r){return r.reduce((i,s)=>(t.hasOwnProperty(s)&&(i[s]=t[s]),i),{})}const P8=Sn.setTimeout,Y8=Sn.clearTimeout;function Au(t,r){r.useNativeTimers?(t.setTimeoutFn=P8.bind(Sn),t.clearTimeoutFn=Y8.bind(Sn)):(t.setTimeoutFn=Sn.setTimeout.bind(Sn),t.clearTimeoutFn=Sn.clearTimeout.bind(Sn))}const X8=1.33;function Z8(t){return typeof t=="string"?Q8(t):Math.ceil((t.byteLength||t.size)*X8)}function Q8(t){let r=0,i=0;for(let s=0,u=t.length;s<u;s++)r=t.charCodeAt(s),r<128?i+=1:r<2048?i+=2:r<55296||r>=57344?i+=3:(s++,i+=4);return i}function x_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function K8(t){let r="";for(let i in t)t.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return r}function $8(t){let r={},i=t.split("&");for(let s=0,u=i.length;s<u;s++){let c=i[s].split("=");r[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return r}class W8 extends Error{constructor(r,i,s){super(r),this.description=i,this.context=s,this.type="TransportError"}}class Jh extends dt{constructor(r){super(),this.writable=!1,Au(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,i,s){return super.emitReserved("error",new W8(r,i,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const i=Wh(r,this.socket.binaryType);this.onPacket(i)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,i={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const i=K8(r);return i.length?"?"+i:""}}class J8 extends Jh{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const i=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||i()})),this.writable||(s++,this.once("drain",function(){--s||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const i=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};G8(r,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,z8(r,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=x_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let O_=!1;try{O_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const eM=O_;function tM(){}class nM extends J8{constructor(r){if(super(r),typeof location<"u"){const i=location.protocol==="https:";let s=location.port;s||(s=i?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||s!==r.port}}doWrite(r,i){const s=this.request({method:"POST",data:r});s.on("success",i),s.on("error",(u,c)=>{this.onError("xhr post error",u,c)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(i,s)=>{this.onError("xhr poll error",i,s)}),this.pollXhr=r}}class Jn extends dt{constructor(r,i,s){super(),this.createRequest=r,Au(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var r;const i=A_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=Jn.requestsCount++,Jn.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=tM,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Jn.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Jn.requestsCount=0;Jn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",b1);else if(typeof addEventListener=="function"){const t="onpagehide"in Sn?"pagehide":"unload";addEventListener(t,b1,!1)}}function b1(){for(let t in Jn.requests)Jn.requests.hasOwnProperty(t)&&Jn.requests[t].abort()}const rM=function(){const t=R_({xdomain:!1});return t&&t.responseType!==null}();class aM extends nM{constructor(r){super(r);const i=r&&r.forceBase64;this.supportsBinary=rM&&!i}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new Jn(R_,this.uri(),r)}}function R_(t){const r=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||eM))return new XMLHttpRequest}catch{}if(!r)try{return new Sn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const w_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class iM extends Jh{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,s=w_?{}:A_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,i,s)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;$h(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=x_()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const kd=Sn.WebSocket||Sn.MozWebSocket;class sM extends iM{createSocket(r,i,s){return w_?new kd(r,i,s):i?new kd(r,i):new kd(r)}doWrite(r,i){this.ws.send(i)}}class lM extends Jh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const i=q8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=r.readable.pipeThrough(i).getReader(),u=k8();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const c=()=>{s.read().then(({done:h,value:m})=>{h||(this.onPacket(m),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;this._writer.write(s).then(()=>{u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const oM={websocket:sM,webtransport:lM,polling:aM},uM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function dh(t){if(t.length>8e3)throw"URI too long";const r=t,i=t.indexOf("["),s=t.indexOf("]");i!=-1&&s!=-1&&(t=t.substring(0,i)+t.substring(i,s).replace(/:/g,";")+t.substring(s,t.length));let u=uM.exec(t||""),c={},d=14;for(;d--;)c[cM[d]]=u[d]||"";return i!=-1&&s!=-1&&(c.source=r,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=fM(c,c.path),c.queryKey=dM(c,c.query),c}function fM(t,r){const i=/\/{2,9}/g,s=r.replace(i,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&s.splice(0,1),r.slice(-1)=="/"&&s.splice(s.length-1,1),s}function dM(t,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,c){u&&(i[u]=c)}),i}const hh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Zo=[];hh&&addEventListener("offline",()=>{Zo.forEach(t=>t())},!1);class la extends dt{constructor(r,i){if(super(),this.binaryType=V8,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(i=r,r=null),r){const s=dh(r);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=dh(i.host).host);Au(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{const u=s.prototype.name;this.transports.push(u),this._transportsByName[u]=s}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$8(this.opts.query)),hh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Zo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=T_,i.transport=r,this.id&&(i.sid=this.id);const s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&la.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(r);i.open(),this.setTransport(i)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",la.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=r.data,this._onError(i);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){const u=this.writeBuffer[s].data;if(u&&(i+=Z8(u)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,Tu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,i,s){return this._sendPacket("message",r,i,s),this}send(r,i,s){return this._sendPacket("message",r,i,s),this}_sendPacket(r,i,s,u){if(typeof i=="function"&&(u=i,i=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const c={type:r,data:i,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),u&&this.once("flush",u),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),r()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():r()}):this.upgrading?s():r()),this}_onError(r){if(la.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),hh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Zo.indexOf(this._offlineEventListener);s!==-1&&Zo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}la.protocol=T_;class hM extends la{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let i=this.createTransport(r),s=!1;la.priorWebsocketSuccess=!1;const u=()=>{s||(i.send([{type:"ping",data:"probe"}]),i.once("packet",E=>{if(!s)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;la.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(b(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const A=new Error("probe error");A.transport=i.name,this.emitReserved("upgradeError",A)}}))};function c(){s||(s=!0,b(),i.close(),i=null)}const d=E=>{const A=new Error("probe error: "+E);A.transport=i.name,c(),this.emitReserved("upgradeError",A)};function h(){d("transport closed")}function m(){d("socket closed")}function p(E){i&&E.name!==i.name&&c()}const b=()=>{i.removeListener("open",u),i.removeListener("error",d),i.removeListener("close",h),this.off("close",m),this.off("upgrading",p)};i.once("open",u),i.once("error",d),i.once("close",h),this.once("close",m),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{s||i.open()},200):i.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const i=[];for(let s=0;s<r.length;s++)~this.transports.indexOf(r[s])&&i.push(r[s]);return i}}let mM=class extends hM{constructor(r,i={}){const s=typeof r=="object"?r:i;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(u=>oM[u]).filter(u=>!!u)),super(r,s)}};function pM(t,r="",i){let s=t;i=i||typeof location<"u"&&location,t==null&&(t=i.protocol+"//"+i.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=i.protocol+t:t=i.host+t),/^(https?|wss?):\/\//.test(t)||(typeof i<"u"?t=i.protocol+"//"+t:t="https://"+t),s=dh(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const c=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+c+":"+s.port+r,s.href=s.protocol+"://"+c+(i&&i.port===s.port?"":":"+s.port),s}const gM=typeof ArrayBuffer=="function",yM=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,C_=Object.prototype.toString,bM=typeof Blob=="function"||typeof Blob<"u"&&C_.call(Blob)==="[object BlobConstructor]",vM=typeof File=="function"||typeof File<"u"&&C_.call(File)==="[object FileConstructor]";function em(t){return gM&&(t instanceof ArrayBuffer||yM(t))||bM&&t instanceof Blob||vM&&t instanceof File}function Qo(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let i=0,s=t.length;i<s;i++)if(Qo(t[i]))return!0;return!1}if(em(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Qo(t.toJSON(),!0);for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&Qo(t[i]))return!0;return!1}function _M(t){const r=[],i=t.data,s=t;return s.data=mh(i,r),s.attachments=r.length,{packet:s,buffers:r}}function mh(t,r){if(!t)return t;if(em(t)){const i={_placeholder:!0,num:r.length};return r.push(t),i}else if(Array.isArray(t)){const i=new Array(t.length);for(let s=0;s<t.length;s++)i[s]=mh(t[s],r);return i}else if(typeof t=="object"&&!(t instanceof Date)){const i={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=mh(t[s],r));return i}return t}function EM(t,r){return t.data=ph(t.data,r),delete t.attachments,t}function ph(t,r){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<r.length)return r[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=ph(t[i],r);else if(typeof t=="object")for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=ph(t[i],r));return t}const SM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],TM=5;var Ce;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class AM{constructor(r){this.replacer=r}encode(r){return(r.type===Ce.EVENT||r.type===Ce.ACK)&&Qo(r)?this.encodeAsBinary({type:r.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let i=""+r.type;return(r.type===Ce.BINARY_EVENT||r.type===Ce.BINARY_ACK)&&(i+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(i+=r.nsp+","),r.id!=null&&(i+=r.id),r.data!=null&&(i+=JSON.stringify(r.data,this.replacer)),i}encodeAsBinary(r){const i=_M(r),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function v1(t){return Object.prototype.toString.call(t)==="[object Object]"}class tm extends dt{constructor(r){super(),this.reviver=r}add(r){let i;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(r);const s=i.type===Ce.BINARY_EVENT;s||i.type===Ce.BINARY_ACK?(i.type=s?Ce.EVENT:Ce.ACK,this.reconstructor=new xM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(em(r)||r.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(r),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let i=0;const s={type:Number(r.charAt(0))};if(Ce[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Ce.BINARY_EVENT||s.type===Ce.BINARY_ACK){const c=i+1;for(;r.charAt(++i)!=="-"&&i!=r.length;);const d=r.substring(c,i);if(d!=Number(d)||r.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(d)}if(r.charAt(i+1)==="/"){const c=i+1;for(;++i&&!(r.charAt(i)===","||i===r.length););s.nsp=r.substring(c,i)}else s.nsp="/";const u=r.charAt(i+1);if(u!==""&&Number(u)==u){const c=i+1;for(;++i;){const d=r.charAt(i);if(d==null||Number(d)!=d){--i;break}if(i===r.length)break}s.id=Number(r.substring(c,i+1))}if(r.charAt(++i)){const c=this.tryParse(r.substr(i));if(tm.isPayloadValid(s.type,c))s.data=c;else throw new Error("invalid payload")}return s}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,i){switch(r){case Ce.CONNECT:return v1(i);case Ce.DISCONNECT:return i===void 0;case Ce.CONNECT_ERROR:return typeof i=="string"||v1(i);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&SM.indexOf(i[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xM{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const i=EM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const OM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:tm,Encoder:AM,get PacketType(){return Ce},protocol:TM},Symbol.toStringTag,{value:"Module"}));function In(t,r,i){return t.on(r,i),function(){t.off(r,i)}}const RM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N_ extends dt{constructor(r,i,s){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=r,this.nsp=i,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[In(r,"open",this.onopen.bind(this)),In(r,"packet",this.onpacket.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...i){var s,u,c;if(RM.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(i.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const d={type:Ce.EVENT,data:i};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const b=this.ids++,E=i.pop();this._registerAckCallback(b,E),d.id=b}const h=(u=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||u===void 0?void 0:u.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(r,i){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[r]=i;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===r&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},u),d=(...h)=>{this.io.clearTimeoutFn(c),i.apply(this,h)};d.withError=!0,this.acks[r]=d}emitWithAck(r,...i){return new Promise((s,u)=>{const c=(d,h)=>d?u(d):s(h);c.withError=!0,i.push(c),this.emit(r,...i)})}_addToQueue(r){let i;typeof r[r.length-1]=="function"&&(i=r.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...c)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!r||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(s=>String(s.id)===r)){const s=this.acks[r];delete this.acks[r],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Ce.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new 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 Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(r);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(r);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const s=new Error(r.data.message);s.data=r.data.data,this.emitReserved("connect_error",s);break}}onevent(r){const i=r.data||[];r.id!=null&&i.push(this.ack(r.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const s of i)s.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const i=this;let s=!1;return function(...u){s||(s=!0,i.packet({type:Ce.ACK,id:r,data:u}))}}onack(r){const i=this.acks[r.id];typeof i=="function"&&(delete this.acks[r.id],i.withError&&r.data.unshift(null),i.apply(this,r.data))}onconnect(r,i){this.id=r,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const i=this._anyListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const i=this._anyOutgoingListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const s of i)s.apply(this,r.data)}}}function Mi(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mi.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),i=Math.floor(r*this.jitter*t);t=(Math.floor(r*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};Mi.prototype.reset=function(){this.attempts=0};Mi.prototype.setMin=function(t){this.ms=t};Mi.prototype.setMax=function(t){this.max=t};Mi.prototype.setJitter=function(t){this.jitter=t};class gh extends dt{constructor(r,i){var s;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(i=r,r=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Au(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((s=i.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Mi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=r;const u=i.parser||OM;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var i;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(i=this.backoff)===null||i===void 0||i.setMin(r),this)}randomizationFactor(r){var i;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(i=this.backoff)===null||i===void 0||i.setJitter(r),this)}reconnectionDelayMax(r){var i;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(i=this.backoff)===null||i===void 0||i.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new mM(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=In(i,"open",function(){s.onopen(),r&&r()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),r?r(h):this.maybeReconnectOnOpen()},d=In(i,"error",c);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{u(),c(new Error("timeout")),i.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(d),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(In(r,"ping",this.onping.bind(this)),In(r,"data",this.ondata.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"close",this.onclose.bind(this)),In(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(i){this.onclose("parse error",i)}}ondecoded(r){Tu(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,i){let s=this.nsps[r];return s?this._autoConnect&&!s.active&&s.connect():(s=new N_(this,r,i),this.nsps[r]=s),s}_destroy(r){const i=Object.keys(this.nsps);for(const s of i)if(this.nsps[s].active)return;this._close()}_packet(r){const i=this.encoder.encode(r);for(let s=0;s<i.length;s++)this.engine.write(i[s],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,i){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(u=>{u?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",u)):r.onreconnect()}))},i);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Xs={};function Ko(t,r){typeof t=="object"&&(r=t,t=void 0),r=r||{};const i=pM(t,r.path||"/socket.io"),s=i.source,u=i.id,c=i.path,d=Xs[u]&&c in Xs[u].nsps,h=r.forceNew||r["force new connection"]||r.multiplex===!1||d;let m;return h?m=new gh(s,r):(Xs[u]||(Xs[u]=new gh(s,r)),m=Xs[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign(Ko,{Manager:gh,Socket:N_,io:Ko,connect:Ko});const wM=[Te.ActionTypes.MESSAGE_TO_GUEST,Te.ActionTypes.EVENT_TO_GUEST,Te.ActionTypes.TYPING_ON,Te.ActionTypes.TYPING_OFF,Te.ActionTypes.RESTART_CHAT_REQUEST,...RO,...Sx,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],CM=({dispatch:t,getState:r})=>i=>{let s=null;return u=>{const c=i(u);if(u.type===Gh){s?.disconnect(),t(NO());const d=`/chat?${fu.stringify(u.querystrings)}`;s=Ko(`/${u.clientName}${d}`),s.on("action",t),s.on("connect",()=>t(MO())),s.on("disconnect",()=>t(DO())),s.on("reconnect",()=>t(LO())),s.on("set-translations",(h,m)=>{t(A8({language:h,messages:b8(h,m)}))}),s.on("set-settings",h=>{t(R8(h))}),s.on("enable-conversation-rating",h=>t(Rx(h))),s.on("speech-transcription",h=>t(Ax(h))),s.on("restore-client-state",h=>{t(CO(h.sessionId)),t(Cx(h.messages))}),s.on("expand-window",({devices:h,initial:m=!1})=>{t({type:fv,devices:h,initial:m})}),s.on("restart-chat",()=>{t(bu(u.clientName,u.querystrings))}),s.on("login-success",h=>{t(vO({loginToken:h.loginToken}))})}else if(u.type==="start-screen/requestLogin")s?.emit("login-requested",u.payload);else if(u.type===gu)s?.emit("start-chat",u.payload);else if(u.type===yu)s?.emit("terminate-session",u.payload);else if(u.type===Ex)s?.emit("get-started",JSON.stringify(u));else if(u.type===Ch)s?.emit("audio-message",u.buffer);else if(u.type===Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST)s?.emit("conversation-rating",u.payload);else if(u.type===hv){const{connection:{sessionId:d}}=r();window.location.href=`/transcript-pdf/${d}`}else wM.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return c}},M_=t_(),NM={...M8(M_),intl:d_},yh=iO({middleware:t=>t().concat(CM),reducer:C8,preloadedState:NM});yh.subscribe(c8(()=>{const t=yh.getState();D8(M_,{connection:t.connection,startScreen:t.startScreen})},1e3));const MM=document.getElementById("root"),DM=X2.createRoot(MM);DM.render(y.jsx(YS,{store:yh,children:y.jsx(l8,{})}));
|
|
124
|
-
//# sourceMappingURL=index-
|
|
123
|
+
- Non inserire dati personali nella finestra di chat (password, data di nascita, ecc.).`,"general-conditions.accept-conditions-note":"Utilizzando la chat si accettano le condizioni d'uso.","block-user-input.title":"Attendere la risposta del chatbot.","conversation-rating.call-to-action.title":"Valuta questa chat","conversation-rating.overlay.title":"Quanto sei soddisfatto di questa chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Inserisci qui il tuo feedback (opzionale)","conversation-rating.overlay.star.very-bad":"Molto male","conversation-rating.overlay.star.very-good":"Molto buono","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La media non è il mio obiettivo, cosa posso ancora migliorare?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfetto! Allora spero di potervi consigliare ancora una volta bene.","conversation-rating.overlay.bot-message.submit-feedback":"Grazie mille per il feedback. Mi impegno costantemente per migliorare.","conversation-rating.overlay.action.submit":"Invia","conversation-rating.overlay.action.back-to-chat":"Chiudere","conversation-rating.overlay.action.close-chat":"Minimizzare la chat","conversation-rating.overlay.action.cancel":"Annulla","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","start-screen.waiting-for-login":"In attesa di login ...","header.close-chat":"Minimizzare la chat","header.menu.title":"Menu","header.menu.restart-chat":"Riavviare la chat","header.menu.expand-chat-window":"Espandere la finestra","header.menu.download-transcript":"Scaricare la trascrizione","header.menu.send-transcript":"Inviare la trascrizione","header.menu.export-transcript":"Esportare la trascrizione","header.menu.rate-conversation":"Valutare la conversazione","source-infos.close":"Chiudere","source-infos.open-source":"Fonte aperta","source-infos.error.title":"Errore","source-infos.error.info":"Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.","source-infos.highlight-loading.title":"Il contenuto rilevante è evidenziato...","source-infos.highlight-loading.description":"Un momento - la fonte è in fase di analisi","commands.show-more.action":"Di più","commands.show-more.tooltip":"Mostra più comandi","commands.show-less.action":"Meno","commands.show-less.tooltip":"Mostra meno comandi"},y8=["de","en","fr","it"],d_={locale:"de",messages:f_},b8=(t,r)=>{if(y8.includes(t)){const i=v8(t),s=h8(r);return{...i,...s}}return r},v8=t=>{switch(t.toString()){case"en":return m8;case"fr":return p8;case"it":return g8;default:return f_}},_8=(t=E8,r)=>{switch(r.type){case kh:return Object.assign({},t,{connectionState:Ia.CONNECTING});case qh:return Object.assign({},t,{connectionState:Ia.CONNECTED});case Fh:return Object.assign({},t,{connectionState:Ia.DISCONNECTED});case Vh:return Object.assign({},t,{connectionState:Ia.RECONNECTED});case Ph:return Object.assign({},t,{sessionId:r.sessionId});case gu:return Object.assign({},t,{sessionId:r.payload.sessionId,userId:r.payload.userId});case yu:return Object.assign({},t,{sessionId:void 0});default:return t}},E8={connectionState:Ia.DISCONNECTED,sessionId:void 0,userId:void 0},S8=(t=d1,r)=>{switch(r.type){case Nv:return d1;case gu:return Ua({type:"webclient.chat.started"}),t;case yu:return Ua({type:"webclient.chat.ended"}),t;case Te.ActionTypes.TYPING_ON:return Object.assign({},t,{isBotTyping:!0});case Te.ActionTypes.TYPING_OFF:return Object.assign({},t,{isBotTyping:!1});case Te.ActionTypes.MESSAGE_FROM_GUEST:case Te.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return f1(t,r.message);case Te.ActionTypes.MESSAGE_TO_GUEST:{Ua(r);const i=Object.assign({},r.message,{_id:r.meta.actionId}),s=t.messages.filter(u=>u._id===r.meta.actionId).length>0;return Object.assign({},t,{isBotTyping:!1,messages:s?t.messages:t.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case wh:{const i=r.messages,s=i.length?i[i.length-1]:void 0;return Object.assign({},t,{isBotTyping:!1,messages:i,quickReplies:s?.quickReplies||[]})}case Rh:return Ua(r.message),t;case Te.ActionTypes.EVENT_TO_GUEST:return Ua(r.event),t;case Te.ActionTypes.DRAWER_OPEN:return Object.assign({},t,{drawerContentUrl:r.payload.parameters.contentUrl});case Te.ActionTypes.DRAWER_CLOSE:return Object.assign({},t,{drawerContentUrl:void 0});case Te.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},t,{locale:r.payload.locale});case fv:return Ua(r),t;case dv:return Ua(r),{...t,conversationRating:{...t.conversationRating,opener:void 0}};case Nh:{const i=new Te.TextMessage(r.transcription,new Te.GuestUser),s=Object.assign({},i,{_id:Wo()});return f1(t,s)}case Te.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=t.messages.map(s=>s._id===r.payload.actionId?Object.assign({},s,r.payload.reaction?{reaction:{type:r.payload.reaction,category:r.payload.category,comment:r.payload.comment}}:{reaction:void 0}):s);return Object.assign({},t,{messages:i})}case Mh:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},t,{conversationRating:i})}case Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...t.conversationRating,rating:r.payload};return Object.assign({},t,{conversationRating:i})}case Dv:{const i={...t.conversationRating,opener:r.payload.opener,...r.payload.defaultRating?{rating:{value:r.payload.defaultRating,feedback:t.conversationRating.rating?.feedback||""}}:{}};return Object.assign({},t,{conversationRating:i})}case Lv:{const i={...t.conversationRating,opener:void 0};return Object.assign({},t,{conversationRating:i})}case Lh:return{...t,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Dh:{const{highlighted:i}=r.payload;return t.sourceInfos?.type==="loaded"&&i?{...t,sourceInfos:{...t.sourceInfos,highlighted:!0}}:{...t,sourceInfos:{type:"loading-error"}}}case cv:{const i=t.sourceInfos?.type,{chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}=r.payload,p=t.sourceInfos?.type==="loading"||t.sourceInfos?.type==="loaded"?t.sourceInfos?.chunkId:void 0;return p&&p!==s?t:i==="loading"||i==="loaded"&&h?{...t,sourceInfos:{type:"loaded",chunkId:s,knowledgeBaseType:u,title:c,content:d,highlighted:h,url:m}}:t}case Bh:return{...t,sourceInfos:void 0};case Mv:return{...t,showTranscriptMailOverlay:!t.showTranscriptMailOverlay,conversationRating:{...t.conversationRating,opener:void 0}};default:return t}},f1=(t,r)=>{const i=t.messages[t.messages.length-1],s=i?.text===r.text;return i&&i.sender.type===r.sender.type&&s?t:Object.assign({},t,{messages:t.messages.concat([r]),quickReplies:[]})},Ua=t=>{T8()?window.top?.postMessage(t,"*"):t.type==="webclient.change.url"&&window.open(t.url)},T8=()=>typeof window<"u"&&window.self!==window.top,d1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},h_=Ih({name:"intl",initialState:d_,reducers:{updateIntl:(t,r)=>{t.locale=r.payload.language,t.messages=r.payload.messages}}}),{updateIntl:A8}=h_.actions,x8=h_.reducer,O8={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},m_=Ih({name:"settings",initialState:O8,reducers:{setSettings(t,r){t.version&&t.version!==r.payload.version?(console.log("version changed, reloading chat window"),window.location.reload()):(t.version=r.payload.version,t.requiresUserAuthentication=r.payload.requiresUserAuthentication,t.enableStartScreen=r.payload.enableStartScreen,t.enableStandaloneView=r.payload.enableStandaloneView,t.enableTranscriptExportEmail=r.payload.enableTranscriptExportEmail,t.enableTranscriptExportPdf=r.payload.enableTranscriptExportPdf,t.enableGeneralConditions=r.payload.enableGeneralConditions,t.enableSpeechSupport=r.payload.enableSpeechSupport,t.commands=r.payload.commands,t.menuItems=r.payload.menuItems||[])}}}),{setSettings:R8}=m_.actions,w8=m_.reducer,C8=bv({settings:w8,chat:S8,startScreen:TO,connection:_8,intl:x8}),N8="bubble-chat",p_="state-last-saved-at",g_="state",M8=t=>{try{if(!B8())return;const r=h1(t,p_);if(L8(r))return;{const i=h1(t,g_);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},D8=(t,r)=>{try{const i=JSON.stringify(r);m1(t,g_,i);const s=new Date().toISOString();m1(t,p_,s)}catch(i){console.error(i)}},L8=t=>{if(t===null)return!1;const r=new Date(t);return r.setHours(r.getHours()+12),new Date>r},B8=()=>typeof localStorage<"u",h1=(t,r)=>{const i=y_(t,r);return localStorage.getItem(i)},m1=(t,r,i)=>{const s=y_(t,r);return localStorage.setItem(s,i)},y_=(t,r)=>`${N8}-${t}-${r}`,tr=Object.create(null);tr.open="0";tr.close="1";tr.ping="2";tr.pong="3";tr.message="4";tr.upgrade="5";tr.noop="6";const Xo=Object.create(null);Object.keys(tr).forEach(t=>{Xo[tr[t]]=t});const fh={type:"error",data:"parser error"},b_=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",v_=typeof ArrayBuffer=="function",__=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,$h=({type:t,data:r},i,s)=>b_&&r instanceof Blob?i?s(r):p1(r,s):v_&&(r instanceof ArrayBuffer||__(r))?i?s(r):p1(new Blob([r]),s):s(tr[t]+(r||"")),p1=(t,r)=>{const i=new FileReader;return i.onload=function(){const s=i.result.split(",")[1];r("b"+(s||""))},i.readAsDataURL(t)};function g1(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let zd;function U8(t,r){if(b_&&t.data instanceof Blob)return t.data.arrayBuffer().then(g1).then(r);if(v_&&(t.data instanceof ArrayBuffer||__(t.data)))return r(g1(t.data));$h(t,!1,i=>{zd||(zd=new TextEncoder),r(zd.encode(i))})}const y1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ks=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<y1.length;t++)Ks[y1.charCodeAt(t)]=t;const j8=t=>{let r=t.length*.75,i=t.length,s,u=0,c,d,h,m;t[t.length-1]==="="&&(r--,t[t.length-2]==="="&&r--);const p=new ArrayBuffer(r),b=new Uint8Array(p);for(s=0;s<i;s+=4)c=Ks[t.charCodeAt(s)],d=Ks[t.charCodeAt(s+1)],h=Ks[t.charCodeAt(s+2)],m=Ks[t.charCodeAt(s+3)],b[u++]=c<<2|d>>4,b[u++]=(d&15)<<4|h>>2,b[u++]=(h&3)<<6|m&63;return p},H8=typeof ArrayBuffer=="function",Wh=(t,r)=>{if(typeof t!="string")return{type:"message",data:E_(t,r)};const i=t.charAt(0);return i==="b"?{type:"message",data:I8(t.substring(1),r)}:Xo[i]?t.length>1?{type:Xo[i],data:t.substring(1)}:{type:Xo[i]}:fh},I8=(t,r)=>{if(H8){const i=j8(t);return E_(i,r)}else return{base64:!0,data:t}},E_=(t,r)=>{switch(r){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},S_="",z8=(t,r)=>{const i=t.length,s=new Array(i);let u=0;t.forEach((c,d)=>{$h(c,!1,h=>{s[d]=h,++u===i&&r(s.join(S_))})})},G8=(t,r)=>{const i=t.split(S_),s=[];for(let u=0;u<i.length;u++){const c=Wh(i[u],r);if(s.push(c),c.type==="error")break}return s};function k8(){return new TransformStream({transform(t,r){U8(t,i=>{const s=i.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const c=new DataView(u.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{u=new Uint8Array(9);const c=new DataView(u.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(i)})}})}let Gd;function ko(t){return t.reduce((r,i)=>r+i.length,0)}function qo(t,r){if(t[0].length===r)return t.shift();const i=new Uint8Array(r);let s=0;for(let u=0;u<r;u++)i[u]=t[0][s++],s===t[0].length&&(t.shift(),s=0);return t.length&&s<t[0].length&&(t[0]=t[0].slice(s)),i}function q8(t,r){Gd||(Gd=new TextDecoder);const i=[];let s=0,u=-1,c=!1;return new TransformStream({transform(d,h){for(i.push(d);;){if(s===0){if(ko(i)<1)break;const m=qo(i,1);c=(m[0]&128)===128,u=m[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(ko(i)<2)break;const m=qo(i,2);u=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),s=3}else if(s===2){if(ko(i)<8)break;const m=qo(i,8),p=new DataView(m.buffer,m.byteOffset,m.length),b=p.getUint32(0);if(b>Math.pow(2,21)-1){h.enqueue(fh);break}u=b*Math.pow(2,32)+p.getUint32(4),s=3}else{if(ko(i)<u)break;const m=qo(i,u);h.enqueue(Wh(c?m:Gd.decode(m),r)),s=0}if(u===0||u>t){h.enqueue(fh);break}}}})}const T_=4;function dt(t){if(t)return F8(t)}function F8(t){for(var r in dt.prototype)t[r]=dt.prototype[r];return t}dt.prototype.on=dt.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this};dt.prototype.once=function(t,r){function i(){this.off(t,i),r.apply(this,arguments)}return i.fn=r,this.on(t,i),this};dt.prototype.off=dt.prototype.removeListener=dt.prototype.removeAllListeners=dt.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,u=0;u<i.length;u++)if(s=i[u],s===r||s.fn===r){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+t],this};dt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),i=this._callbacks["$"+t],s=1;s<arguments.length;s++)r[s-1]=arguments[s];if(i){i=i.slice(0);for(var s=0,u=i.length;s<u;++s)i[s].apply(this,r)}return this};dt.prototype.emitReserved=dt.prototype.emit;dt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};dt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Tu=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,i)=>i(r,0),Sn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V8="arraybuffer";function A_(t,...r){return r.reduce((i,s)=>(t.hasOwnProperty(s)&&(i[s]=t[s]),i),{})}const P8=Sn.setTimeout,Y8=Sn.clearTimeout;function Au(t,r){r.useNativeTimers?(t.setTimeoutFn=P8.bind(Sn),t.clearTimeoutFn=Y8.bind(Sn)):(t.setTimeoutFn=Sn.setTimeout.bind(Sn),t.clearTimeoutFn=Sn.clearTimeout.bind(Sn))}const X8=1.33;function Z8(t){return typeof t=="string"?Q8(t):Math.ceil((t.byteLength||t.size)*X8)}function Q8(t){let r=0,i=0;for(let s=0,u=t.length;s<u;s++)r=t.charCodeAt(s),r<128?i+=1:r<2048?i+=2:r<55296||r>=57344?i+=3:(s++,i+=4);return i}function x_(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function K8(t){let r="";for(let i in t)t.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(t[i]));return r}function $8(t){let r={},i=t.split("&");for(let s=0,u=i.length;s<u;s++){let c=i[s].split("=");r[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return r}class W8 extends Error{constructor(r,i,s){super(r),this.description=i,this.context=s,this.type="TransportError"}}class Jh extends dt{constructor(r){super(),this.writable=!1,Au(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,i,s){return super.emitReserved("error",new W8(r,i,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const i=Wh(r,this.socket.binaryType);this.onPacket(i)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,i={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const i=K8(r);return i.length?"?"+i:""}}class J8 extends Jh{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const i=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||i()})),this.writable||(s++,this.once("drain",function(){--s||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const i=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};G8(r,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,z8(r,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=x_()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let O_=!1;try{O_=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const eM=O_;function tM(){}class nM extends J8{constructor(r){if(super(r),typeof location<"u"){const i=location.protocol==="https:";let s=location.port;s||(s=i?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||s!==r.port}}doWrite(r,i){const s=this.request({method:"POST",data:r});s.on("success",i),s.on("error",(u,c)=>{this.onError("xhr post error",u,c)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(i,s)=>{this.onError("xhr poll error",i,s)}),this.pollXhr=r}}class Jn extends dt{constructor(r,i,s){super(),this.createRequest=r,Au(this,s),this._opts=s,this._method=s.method||"GET",this._uri=i,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var r;const i=A_(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(i);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=Jn.requestsCount++,Jn.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=tM,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Jn.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Jn.requestsCount=0;Jn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",b1);else if(typeof addEventListener=="function"){const t="onpagehide"in Sn?"pagehide":"unload";addEventListener(t,b1,!1)}}function b1(){for(let t in Jn.requests)Jn.requests.hasOwnProperty(t)&&Jn.requests[t].abort()}const rM=(function(){const t=R_({xdomain:!1});return t&&t.responseType!==null})();class aM extends nM{constructor(r){super(r);const i=r&&r.forceBase64;this.supportsBinary=rM&&!i}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new Jn(R_,this.uri(),r)}}function R_(t){const r=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||eM))return new XMLHttpRequest}catch{}if(!r)try{return new Sn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const w_=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class iM extends Jh{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,s=w_?{}:A_(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,i,s)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;$h(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=x_()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const kd=Sn.WebSocket||Sn.MozWebSocket;class sM extends iM{createSocket(r,i,s){return w_?new kd(r,i,s):i?new kd(r,i):new kd(r)}doWrite(r,i){this.ws.send(i)}}class lM extends Jh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const i=q8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=r.readable.pipeThrough(i).getReader(),u=k8();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const c=()=>{s.read().then(({done:h,value:m})=>{h||(this.onPacket(m),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const s=r[i],u=i===r.length-1;this._writer.write(s).then(()=>{u&&Tu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const oM={websocket:sM,webtransport:lM,polling:aM},uM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function dh(t){if(t.length>8e3)throw"URI too long";const r=t,i=t.indexOf("["),s=t.indexOf("]");i!=-1&&s!=-1&&(t=t.substring(0,i)+t.substring(i,s).replace(/:/g,";")+t.substring(s,t.length));let u=uM.exec(t||""),c={},d=14;for(;d--;)c[cM[d]]=u[d]||"";return i!=-1&&s!=-1&&(c.source=r,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=fM(c,c.path),c.queryKey=dM(c,c.query),c}function fM(t,r){const i=/\/{2,9}/g,s=r.replace(i,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&s.splice(0,1),r.slice(-1)=="/"&&s.splice(s.length-1,1),s}function dM(t,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,c){u&&(i[u]=c)}),i}const hh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Zo=[];hh&&addEventListener("offline",()=>{Zo.forEach(t=>t())},!1);class la extends dt{constructor(r,i){if(super(),this.binaryType=V8,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(i=r,r=null),r){const s=dh(r);i.hostname=s.host,i.secure=s.protocol==="https"||s.protocol==="wss",i.port=s.port,s.query&&(i.query=s.query)}else i.host&&(i.hostname=dh(i.host).host);Au(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(s=>{const u=s.prototype.name;this.transports.push(u),this._transportsByName[u]=s}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=$8(this.opts.query)),hh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Zo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=T_,i.transport=r,this.id&&(i.sid=this.id);const s=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&la.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(r);i.open(),this.setTransport(i)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",la.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=r.data,this._onError(i);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let s=0;s<this.writeBuffer.length;s++){const u=this.writeBuffer[s].data;if(u&&(i+=Z8(u)),s>0&&i>this._maxPayload)return this.writeBuffer.slice(0,s);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,Tu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,i,s){return this._sendPacket("message",r,i,s),this}send(r,i,s){return this._sendPacket("message",r,i,s),this}_sendPacket(r,i,s,u){if(typeof i=="function"&&(u=i,i=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const c={type:r,data:i,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),u&&this.once("flush",u),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),r()},s=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():r()}):this.upgrading?s():r()),this}_onError(r){if(la.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),hh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Zo.indexOf(this._offlineEventListener);s!==-1&&Zo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}la.protocol=T_;class hM extends la{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let i=this.createTransport(r),s=!1;la.priorWebsocketSuccess=!1;const u=()=>{s||(i.send([{type:"ping",data:"probe"}]),i.once("packet",E=>{if(!s)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;la.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(b(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const A=new Error("probe error");A.transport=i.name,this.emitReserved("upgradeError",A)}}))};function c(){s||(s=!0,b(),i.close(),i=null)}const d=E=>{const A=new Error("probe error: "+E);A.transport=i.name,c(),this.emitReserved("upgradeError",A)};function h(){d("transport closed")}function m(){d("socket closed")}function p(E){i&&E.name!==i.name&&c()}const b=()=>{i.removeListener("open",u),i.removeListener("error",d),i.removeListener("close",h),this.off("close",m),this.off("upgrading",p)};i.once("open",u),i.once("error",d),i.once("close",h),this.once("close",m),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{s||i.open()},200):i.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const i=[];for(let s=0;s<r.length;s++)~this.transports.indexOf(r[s])&&i.push(r[s]);return i}}let mM=class extends hM{constructor(r,i={}){const s=typeof r=="object"?r:i;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(u=>oM[u]).filter(u=>!!u)),super(r,s)}};function pM(t,r="",i){let s=t;i=i||typeof location<"u"&&location,t==null&&(t=i.protocol+"//"+i.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=i.protocol+t:t=i.host+t),/^(https?|wss?):\/\//.test(t)||(typeof i<"u"?t=i.protocol+"//"+t:t="https://"+t),s=dh(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const c=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+c+":"+s.port+r,s.href=s.protocol+"://"+c+(i&&i.port===s.port?"":":"+s.port),s}const gM=typeof ArrayBuffer=="function",yM=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,C_=Object.prototype.toString,bM=typeof Blob=="function"||typeof Blob<"u"&&C_.call(Blob)==="[object BlobConstructor]",vM=typeof File=="function"||typeof File<"u"&&C_.call(File)==="[object FileConstructor]";function em(t){return gM&&(t instanceof ArrayBuffer||yM(t))||bM&&t instanceof Blob||vM&&t instanceof File}function Qo(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let i=0,s=t.length;i<s;i++)if(Qo(t[i]))return!0;return!1}if(em(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Qo(t.toJSON(),!0);for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&Qo(t[i]))return!0;return!1}function _M(t){const r=[],i=t.data,s=t;return s.data=mh(i,r),s.attachments=r.length,{packet:s,buffers:r}}function mh(t,r){if(!t)return t;if(em(t)){const i={_placeholder:!0,num:r.length};return r.push(t),i}else if(Array.isArray(t)){const i=new Array(t.length);for(let s=0;s<t.length;s++)i[s]=mh(t[s],r);return i}else if(typeof t=="object"&&!(t instanceof Date)){const i={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=mh(t[s],r));return i}return t}function EM(t,r){return t.data=ph(t.data,r),delete t.attachments,t}function ph(t,r){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<r.length)return r[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let i=0;i<t.length;i++)t[i]=ph(t[i],r);else if(typeof t=="object")for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=ph(t[i],r));return t}const SM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],TM=5;var Ce;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class AM{constructor(r){this.replacer=r}encode(r){return(r.type===Ce.EVENT||r.type===Ce.ACK)&&Qo(r)?this.encodeAsBinary({type:r.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let i=""+r.type;return(r.type===Ce.BINARY_EVENT||r.type===Ce.BINARY_ACK)&&(i+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(i+=r.nsp+","),r.id!=null&&(i+=r.id),r.data!=null&&(i+=JSON.stringify(r.data,this.replacer)),i}encodeAsBinary(r){const i=_M(r),s=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(s),u}}function v1(t){return Object.prototype.toString.call(t)==="[object Object]"}class tm extends dt{constructor(r){super(),this.reviver=r}add(r){let i;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(r);const s=i.type===Ce.BINARY_EVENT;s||i.type===Ce.BINARY_ACK?(i.type=s?Ce.EVENT:Ce.ACK,this.reconstructor=new xM(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(em(r)||r.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(r),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let i=0;const s={type:Number(r.charAt(0))};if(Ce[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Ce.BINARY_EVENT||s.type===Ce.BINARY_ACK){const c=i+1;for(;r.charAt(++i)!=="-"&&i!=r.length;);const d=r.substring(c,i);if(d!=Number(d)||r.charAt(i)!=="-")throw new Error("Illegal attachments");s.attachments=Number(d)}if(r.charAt(i+1)==="/"){const c=i+1;for(;++i&&!(r.charAt(i)===","||i===r.length););s.nsp=r.substring(c,i)}else s.nsp="/";const u=r.charAt(i+1);if(u!==""&&Number(u)==u){const c=i+1;for(;++i;){const d=r.charAt(i);if(d==null||Number(d)!=d){--i;break}if(i===r.length)break}s.id=Number(r.substring(c,i+1))}if(r.charAt(++i)){const c=this.tryParse(r.substr(i));if(tm.isPayloadValid(s.type,c))s.data=c;else throw new Error("invalid payload")}return s}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,i){switch(r){case Ce.CONNECT:return v1(i);case Ce.DISCONNECT:return i===void 0;case Ce.CONNECT_ERROR:return typeof i=="string"||v1(i);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&SM.indexOf(i[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xM{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const i=EM(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const OM=Object.freeze(Object.defineProperty({__proto__:null,Decoder:tm,Encoder:AM,get PacketType(){return Ce},protocol:TM},Symbol.toStringTag,{value:"Module"}));function In(t,r,i){return t.on(r,i),function(){t.off(r,i)}}const RM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N_ extends dt{constructor(r,i,s){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=r,this.nsp=i,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[In(r,"open",this.onopen.bind(this)),In(r,"packet",this.onpacket.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...i){var s,u,c;if(RM.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(i.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const d={type:Ce.EVENT,data:i};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const b=this.ids++,E=i.pop();this._registerAckCallback(b,E),d.id=b}const h=(u=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||u===void 0?void 0:u.writable,m=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(r,i){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[r]=i;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===r&&this.sendBuffer.splice(h,1);i.call(this,new Error("operation has timed out"))},u),d=(...h)=>{this.io.clearTimeoutFn(c),i.apply(this,h)};d.withError=!0,this.acks[r]=d}emitWithAck(r,...i){return new Promise((s,u)=>{const c=(d,h)=>d?u(d):s(h);c.withError=!0,i.push(c),this.emit(r,...i)})}_addToQueue(r){let i;typeof r[r.length-1]=="function"&&(i=r.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...c)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...c)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!r||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(s=>String(s.id)===r)){const s=this.acks[r];delete this.acks[r],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Ce.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new 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 Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(r);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(r);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const s=new Error(r.data.message);s.data=r.data.data,this.emitReserved("connect_error",s);break}}onevent(r){const i=r.data||[];r.id!=null&&i.push(this.ack(r.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const s of i)s.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const i=this;let s=!1;return function(...u){s||(s=!0,i.packet({type:Ce.ACK,id:r,data:u}))}}onack(r){const i=this.acks[r.id];typeof i=="function"&&(delete this.acks[r.id],i.withError&&r.data.unshift(null),i.apply(this,r.data))}onconnect(r,i){this.id=r,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const i=this._anyListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const i=this._anyOutgoingListeners;for(let s=0;s<i.length;s++)if(r===i[s])return i.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const s of i)s.apply(this,r.data)}}}function Mi(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Mi.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),i=Math.floor(r*this.jitter*t);t=(Math.floor(r*10)&1)==0?t-i:t+i}return Math.min(t,this.max)|0};Mi.prototype.reset=function(){this.attempts=0};Mi.prototype.setMin=function(t){this.ms=t};Mi.prototype.setMax=function(t){this.max=t};Mi.prototype.setJitter=function(t){this.jitter=t};class gh extends dt{constructor(r,i){var s;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(i=r,r=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Au(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((s=i.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Mi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=r;const u=i.parser||OM;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var i;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(i=this.backoff)===null||i===void 0||i.setMin(r),this)}randomizationFactor(r){var i;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(i=this.backoff)===null||i===void 0||i.setJitter(r),this)}reconnectionDelayMax(r){var i;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(i=this.backoff)===null||i===void 0||i.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new mM(this.uri,this.opts);const i=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=In(i,"open",function(){s.onopen(),r&&r()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),r?r(h):this.maybeReconnectOnOpen()},d=In(i,"error",c);if(this._timeout!==!1){const h=this._timeout,m=this.setTimeoutFn(()=>{u(),c(new Error("timeout")),i.close()},h);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(d),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(In(r,"ping",this.onping.bind(this)),In(r,"data",this.ondata.bind(this)),In(r,"error",this.onerror.bind(this)),In(r,"close",this.onclose.bind(this)),In(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(i){this.onclose("parse error",i)}}ondecoded(r){Tu(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,i){let s=this.nsps[r];return s?this._autoConnect&&!s.active&&s.connect():(s=new N_(this,r,i),this.nsps[r]=s),s}_destroy(r){const i=Object.keys(this.nsps);for(const s of i)if(this.nsps[s].active)return;this._close()}_packet(r){const i=this.encoder.encode(r);for(let s=0;s<i.length;s++)this.engine.write(i[s],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,i){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(u=>{u?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",u)):r.onreconnect()}))},i);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Xs={};function Ko(t,r){typeof t=="object"&&(r=t,t=void 0),r=r||{};const i=pM(t,r.path||"/socket.io"),s=i.source,u=i.id,c=i.path,d=Xs[u]&&c in Xs[u].nsps,h=r.forceNew||r["force new connection"]||r.multiplex===!1||d;let m;return h?m=new gh(s,r):(Xs[u]||(Xs[u]=new gh(s,r)),m=Xs[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign(Ko,{Manager:gh,Socket:N_,io:Ko,connect:Ko});const wM=[Te.ActionTypes.MESSAGE_TO_GUEST,Te.ActionTypes.EVENT_TO_GUEST,Te.ActionTypes.TYPING_ON,Te.ActionTypes.TYPING_OFF,Te.ActionTypes.RESTART_CHAT_REQUEST,...RO,...Sx,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],CM=({dispatch:t,getState:r})=>i=>{let s=null;return u=>{const c=i(u);if(u.type===Gh){s?.disconnect(),t(NO());const d=`/chat?${fu.stringify(u.querystrings)}`;s=Ko(`/${u.clientName}${d}`),s.on("action",t),s.on("connect",()=>t(MO())),s.on("disconnect",()=>t(DO())),s.on("reconnect",()=>t(LO())),s.on("set-translations",(h,m)=>{t(A8({language:h,messages:b8(h,m)}))}),s.on("set-settings",h=>{t(R8(h))}),s.on("enable-conversation-rating",h=>t(Rx(h))),s.on("speech-transcription",h=>t(Ax(h))),s.on("restore-client-state",h=>{t(CO(h.sessionId)),t(Cx(h.messages))}),s.on("expand-window",({devices:h,initial:m=!1})=>{t({type:fv,devices:h,initial:m})}),s.on("restart-chat",()=>{t(bu(u.clientName,u.querystrings))}),s.on("login-success",h=>{t(vO({loginToken:h.loginToken}))})}else if(u.type==="start-screen/requestLogin")s?.emit("login-requested",u.payload);else if(u.type===gu)s?.emit("start-chat",u.payload);else if(u.type===yu)s?.emit("terminate-session",u.payload);else if(u.type===Ex)s?.emit("get-started",JSON.stringify(u));else if(u.type===Ch)s?.emit("audio-message",u.buffer);else if(u.type===Te.ActionTypes.CONVERSATION_RATING_FROM_GUEST)s?.emit("conversation-rating",u.payload);else if(u.type===hv){const{connection:{sessionId:d}}=r();window.location.href=`/transcript-pdf/${d}`}else wM.indexOf(u.type)===-1&&u.meta===void 0&&s&&s.emit("action",JSON.stringify(u));return c}},M_=t_(),NM={...M8(M_),intl:d_},yh=iO({middleware:t=>t().concat(CM),reducer:C8,preloadedState:NM});yh.subscribe(c8(()=>{const t=yh.getState();D8(M_,{connection:t.connection,startScreen:t.startScreen})},1e3));const MM=document.getElementById("root"),DM=X2.createRoot(MM);DM.render(y.jsx(YS,{store:yh,children:y.jsx(l8,{})}));
|
|
124
|
+
//# sourceMappingURL=index-ftNt4iKK.js.map
|