@memori.ai/memori-webcomponent 7.8.4 → 7.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/memori-webcomponent.js +2 -2
- package/package.json +2 -2
|
@@ -250,9 +250,9 @@ const $f="144",em={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},tm={ROTATE:0,
|
|
|
250
250
|
* @author George Michael Brower
|
|
251
251
|
* @license MIT
|
|
252
252
|
*/
|
|
253
|
-
class PB{constructor(e,t,n,r,i="div"){this.parent=e,this.object=t,this.property=n,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(i),this.domElement.classList.add("controller"),this.domElement.classList.add(r),this.$name=document.createElement("div"),this.$name.classList.add("name"),PB.nextNameID=PB.nextNameID||0,this.$name.id="lil-gui-name-"+ ++PB.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(e=>e.stopPropagation())),this.domElement.addEventListener("keyup",(e=>e.stopPropagation())),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(n)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled||(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e)),this}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class NB extends PB{constructor(e,t,n){super(e,t,n,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",(()=>{this.setValue(this.$input.checked),this._callOnFinishChange()})),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function OB(e){let t,n;return(t=e.match(/(#|0x)?([a-f0-9]{6})/i))?n=t[2]:(t=e.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?n=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=e.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),!!n&&"#"+n}const kB={isPrimitive:!0,match:e=>"number"==typeof e,fromHexString:e=>parseInt(e.substring(1),16),toHexString:e=>"#"+e.toString(16).padStart(6,0)},LB={isPrimitive:!1,match:e=>Array.isArray(e),fromHexString(e,t,n=1){const r=kB.fromHexString(e);t[0]=(r>>16&255)/255*n,t[1]=(r>>8&255)/255*n,t[2]=(255&r)/255*n},toHexString:([e,t,n],r=1)=>kB.toHexString(e*(r=255/r)<<16^t*r<<8^n*r<<0)},DB={isPrimitive:!1,match:e=>Object(e)===e,fromHexString(e,t,n=1){const r=kB.fromHexString(e);t.r=(r>>16&255)/255*n,t.g=(r>>8&255)/255*n,t.b=(255&r)/255*n},toHexString:({r:e,g:t,b:n},r=1)=>kB.toHexString(e*(r=255/r)<<16^t*r<<8^n*r<<0)},BB=[{isPrimitive:!0,match:e=>"string"==typeof e,fromHexString:OB,toHexString:OB},kB,LB,DB];class zB extends PB{constructor(e,t,n,r){var i;super(e,t,n,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(i=this.initialValue,BB.find((e=>e.match(i)))),this._rgbScale=r,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",(()=>{this._setValueFromHexString(this.$input.value)})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$text.addEventListener("input",(()=>{const e=OB(this.$text.value);e&&this._setValueFromHexString(e)})),this.$text.addEventListener("focus",(()=>{this._textFocused=!0,this.$text.select()})),this.$text.addEventListener("blur",(()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()})),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class FB extends PB{constructor(e,t,n){super(e,t,n,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",(e=>{e.preventDefault(),this.getValue().call(this.object),this._callOnChange()})),this.$button.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$disable=this.$button}}class UB extends PB{constructor(e,t,n,r,i,o){super(e,t,n,"number"),this._initInput(),this.min(r),this.max(i);const s=void 0!==o;this.step(s?o:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=100*t+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const e=e=>{const t=parseFloat(this.$input.value);isNaN(t)||(this._snapClampSetValue(t+e),this.$input.value=this.getValue())};let t,n,r,i,o,s=!1;const a=e=>{if(s){const r=e.clientX-t,i=e.clientY-n;Math.abs(i)>5?(e.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(r)>5&&l()}if(!s){const t=e.clientY-r;o-=t*this._step*this._arrowKeyMultiplier(e),i+o>this._max?o=this._max-i:i+o<this._min&&(o=this._min-i),this._snapClampSetValue(i+o)}r=e.clientY},l=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",l)};this.$input.addEventListener("input",(()=>{let e=parseFloat(this.$input.value);isNaN(e)||(this._stepExplicit&&(e=this._snap(e)),this.setValue(this._clamp(e)))})),this.$input.addEventListener("keydown",(t=>{"Enter"===t.key&&this.$input.blur(),"ArrowUp"===t.code&&(t.preventDefault(),e(this._step*this._arrowKeyMultiplier(t))),"ArrowDown"===t.code&&(t.preventDefault(),e(this._step*this._arrowKeyMultiplier(t)*-1))})),this.$input.addEventListener("wheel",(t=>{this._inputFocused&&(t.preventDefault(),e(this._step*this._normalizeMouseWheel(t)))}),{passive:!1}),this.$input.addEventListener("mousedown",(e=>{t=e.clientX,n=r=e.clientY,s=!0,i=this.getValue(),o=0,window.addEventListener("mousemove",a),window.addEventListener("mouseup",l)})),this.$input.addEventListener("focus",(()=>{this._inputFocused=!0})),this.$input.addEventListener("blur",(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()}))}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const e=e=>{const t=this.$slider.getBoundingClientRect();let n=((e,t,n,r,i)=>(e-t)/(n-t)*(i-r)+r)(e,t.left,t.right,this._min,this._max);this._snapClampSetValue(n)},t=t=>{e(t.clientX)},n=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};let r,i,o=!1;const s=t=>{t.preventDefault(),this._setDraggingStyle(!0),e(t.touches[0].clientX),o=!1},a=t=>{if(o){const e=t.touches[0].clientX-r,n=t.touches[0].clientY-i;Math.abs(e)>Math.abs(n)?s(t):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",l))}else t.preventDefault(),e(t.touches[0].clientX)},l=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",l)},c=this._callOnFinishChange.bind(this);let u;this.$slider.addEventListener("mousedown",(r=>{this._setDraggingStyle(!0),e(r.clientX),window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)})),this.$slider.addEventListener("touchstart",(e=>{e.touches.length>1||(this._hasScrollBar?(r=e.touches[0].clientX,i=e.touches[0].clientY,o=!0):s(e),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",l))}),{passive:!1}),this.$slider.addEventListener("wheel",(e=>{if(Math.abs(e.deltaX)<Math.abs(e.deltaY)&&this._hasScrollBar)return;e.preventDefault();const t=this._normalizeMouseWheel(e)*this._step;this._snapClampSetValue(this.getValue()+t),this.$input.value=this.getValue(),clearTimeout(u),u=setTimeout(c,400)}),{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${t}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:n}=e;Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,n=-e.wheelDelta/120,n*=this._stepExplicit?1:10);return t+-n}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){const t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class jB extends PB{constructor(e,t,n,r){super(e,t,n,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",(()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()})),this.$select.addEventListener("focus",(()=>{this.$display.classList.add("focus")})),this.$select.addEventListener("blur",(()=>{this.$display.classList.remove("focus")})),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(r)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach((e=>{const t=document.createElement("option");t.textContent=e,this.$select.appendChild(t)})),this.updateDisplay(),this}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.textContent=-1===t?e:this._names[t],this}}class HB extends PB{constructor(e,t,n){super(e,t,n,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",(()=>{this.setValue(this.$input.value)})),this.$input.addEventListener("keydown",(e=>{"Enter"===e.code&&this.$input.blur()})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let GB=!1;class VB{constructor({parent:e,autoPlace:t=void 0===e,container:n,width:r,title:i="Controls",closeFolders:o=!1,injectStyles:s=!0,touchStyles:a=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",(()=>this.openAnimated(this._closed))),this.$title.addEventListener("keydown",(e=>{"Enter"!==e.code&&"Space"!==e.code||(e.preventDefault(),this.$title.click())})),this.$title.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(i),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),a&&this.domElement.classList.add("allow-touch-styles"),!GB&&s&&(!function(e){const t=document.createElement("style");t.innerHTML=e;const n=document.querySelector("head link[rel=stylesheet], head style");n?document.head.insertBefore(t,n):document.head.appendChild(t)}('.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "↕";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "▾";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "▸";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "✓";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),GB=!0),n?n.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),r&&this.domElement.style.setProperty("--width",r+"px"),this._closeFolders=o}add(e,t,n,r,i){if(Object(n)===n)return new jB(this,e,t,n);const o=e[t];switch(typeof o){case"number":return new UB(this,e,t,n,r,i);case"boolean":return new NB(this,e,t);case"string":return new HB(this,e,t);case"function":return new FB(this,e,t)}console.error("gui.add failed\n\tproperty:",t,"\n\tobject:",e,"\n\tvalue:",o)}addColor(e,t,n=1){return new zB(this,e,t,n)}addFolder(e){const t=new VB({parent:this,title:e});return this.root._closeFolders&&t.close(),t}load(e,t=!0){return e.controllers&&this.controllers.forEach((t=>{t instanceof FB||t._name in e.controllers&&t.load(e.controllers[t._name])})),t&&e.folders&&this.folders.forEach((t=>{t._title in e.folders&&t.load(e.folders[t._title])})),this}save(e=!0){const t={controllers:{},folders:{}};return this.controllers.forEach((e=>{if(!(e instanceof FB)){if(e._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${e._name}"`);t.controllers[e._name]=e.save()}})),e&&this.folders.forEach((e=>{if(e._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${e._title}"`);t.folders[e._title]=e.save()})),t}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((()=>{const t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");const n=e=>{e.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",n))};this.$children.addEventListener("transitionend",n);const r=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame((()=>{this.$children.style.height=r+"px"}))})),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach((e=>e.reset())),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),void 0!==this._onChange&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),void 0!==this._onOpenClose&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((e=>e.destroy()))}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach((t=>{e=e.concat(t.controllersRecursive())})),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach((t=>{e=e.concat(t.foldersRecursive())})),e}}var WB=VB;var qB=({onBaseActionChange:e,baseActions:t,modifyTimeScale:n,onMorphTargetInfluencesChange:r,onMorphTargetDictionaryChange:i,morphTargetDictionary:o,timeScale:s})=>{const a=(0,c.useRef)(null),l=(0,c.useRef)({"modify time scale":s}),u=(0,c.useRef)([]);return(0,c.useEffect)((()=>{const i=new WB({width:310});a.current=i;const s=i.addFolder("Base Actions"),c=i.addFolder("Additive Action Weights"),d=i.addFolder("General Speed");return["None",...Object.keys(t)].forEach((n=>{t[n];l.current[n]=()=>{e(n)};const r=s.add(l.current,n);u.current.push(r)})),Object.entries(o).forEach((([e,t])=>{l.current[e]=t/100,c.add(l.current,e,-1,1,.01).listen().onChange((t=>{r({[e]:t})}))})),d.add(l.current,"modify time scale",0,1.5,.01).onChange((e=>{n(e)})),s.open(),c.open(),d.open(),()=>{i.destroy()}}),[e,r,i,n,t,o,s]),null};c=o("85Hg2"),c=o("85Hg2");function KB(e,t){const n=c.useRef(),[r]=c.useState((()=>t?t instanceof rS?{current:t}:t:n)),[i]=c.useState((()=>new NI(void 0))),o=c.useRef({}),[s]=c.useState((()=>{const t={};return e.forEach((e=>Object.defineProperty(t,e.name,{enumerable:!0,get(){if(r.current)return o.current[e.name]||(o.current[e.name]=i.clipAction(e,r.current))}}))),{ref:r,clips:e,actions:t,names:e.map((e=>e.name)),mixer:i}}));return eB(((e,t)=>i.update(t))),c.useEffect((()=>{const e=r.current;return()=>{o.current={},Object.values(s.actions).forEach((t=>{e&&i.uncacheAction(t,e)}))}}),[e]),s}const JB=new WeakMap;class YB extends fT{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,r){const i=new vT(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,(e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)}),n,r)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const e in t.attributeTypes){const n=t.attributeTypes[e];void 0!==n.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=n.name)}const n=JSON.stringify(t);if(JB.has(e)){const t=JB.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const i=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(i,o).then((n=>(r=n,new Promise(((n,o)=>{r._callbacks[i]={resolve:n,reject:o},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return s.catch((()=>!0)).then((()=>{r&&i&&this._releaseTask(r,i)})),JB.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new zS;e.index&&t.setIndex(new SS(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],i=r.name,o=r.array,s=r.itemSize;t.setAttribute(i,new SS(o,s))}return t}_loadLibrary(e,t){const n=new vT(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise(((t,r)=>{n.load(e,t,void 0,r)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=XB.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case"decode":e._callbacks[n.id].resolve(n);break;case"error":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function XB(){let e,t;function n(e,t,n,r,i,o){const s=o.num_components(),a=n.num_points()*s,l=a*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,o,c,l,u);const d=new i(e.HEAPF32.buffer,u,a).slice();return e._free(u),{name:r,array:d,itemSize:s}}onmessage=function(r){const i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const r=i.buffer,o=i.taskConfig;t.then((e=>{const t=e.draco,s=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const o=i.attributeIDs,s=i.attributeTypes;let a,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)a=new e.Mesh,l=t.DecodeBufferToMesh(r,a);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");a=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,a)}if(!l.ok()||0===a.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const u={index:null,attributes:[]};for(const r in o){const l=self[s[r]];let c,d;if(i.useUniqueIDs)d=o[r],c=t.GetAttributeByUniqueId(a,d);else{if(d=t.GetAttributeId(a,e[o[r]]),-1===d)continue;c=t.GetAttribute(a,d)}u.attributes.push(n(e,t,a,r,l,c))}c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){const r=n.num_faces(),i=3*r,o=4*i,s=e._malloc(o);t.GetTrianglesUInt32Array(n,o,s);const a=new Uint32Array(e.HEAPF32.buffer,s,i).slice();return e._free(s),{array:a,itemSize:1}}(e,t,a));return e.destroy(a),u}(t,s,a,o),r=e.attributes.map((e=>e.array.buffer));e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(e){console.error(e),self.postMessage({type:"error",id:i.id,error:e.message})}finally{t.destroy(a),t.destroy(s)}}))}}}let QB;const ZB=()=>{if(QB)return QB;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let n,r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(r="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const i=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t<e.length;++t){const r=e.charCodeAt(t);n[t]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i<e.length;++i)n[r++]=n[i]<60?t[n[i]]:64*(n[i]-60)+n[++i];return n.buffer.slice(0,r)}(r),{}).then((e=>{n=e.instance,n.exports.__wasm_call_ctors()}));function o(e,t,r,i,o,s){const a=n.exports.sbrk,l=r+3&-4,c=a(l*i),u=a(o.length),d=new Uint8Array(n.exports.memory.buffer);d.set(o,u);const h=e(c,r,i,u,o.length);if(0===h&&s&&s(c,l,i),t.set(d.subarray(c,c+r*i)),a(c-a(0)),0!==h)throw new Error(`Malformed buffer data: ${h}`)}const s={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},a={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return QB={ready:i,supported:!0,decodeVertexBuffer(e,t,r,i,a){o(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[s[a]])},decodeIndexBuffer(e,t,r,i){o(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){o(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,l,c){o(n.exports[a[l]],e,t,r,i,n.exports[s[c]])}},QB};class $B extends fT{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new oz(e)})),this.register((function(e){return new hz(e)})),this.register((function(e){return new pz(e)})),this.register((function(e){return new az(e)})),this.register((function(e){return new lz(e)})),this.register((function(e){return new cz(e)})),this.register((function(e){return new uz(e)})),this.register((function(e){return new iz(e)})),this.register((function(e){return new dz(e)})),this.register((function(e){return new sz(e)})),this.register((function(e){return new nz(e)})),this.register((function(e){return new fz(e)}))}load(e,t,n,r){const i=this;let o;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:VT.extractUrlBase(e),this.manager.itemStart(e);const s=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},a=new vT(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{i.parse(n,o,(function(n){t(n),i.manager.itemEnd(e)}),s)}catch(e){s(e)}}),n,s)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i;const o={},s={};if("string"==typeof e)i=e;else{if(VT.decodeText(new Uint8Array(e,0,4))===mz){try{o[tz.KHR_BINARY_GLTF]=new yz(e)}catch(e){return void(r&&r(e))}i=o[tz.KHR_BINARY_GLTF].content}else i=VT.decodeText(new Uint8Array(e))}const a=JSON.parse(i);if(void 0===a.asset||a.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const l=new Xz(a,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](l);s[t.name]=t,o[t.name]=!0}if(a.extensionsUsed)for(let e=0;e<a.extensionsUsed.length;++e){const t=a.extensionsUsed[e],n=a.extensionsRequired||[];switch(t){case tz.KHR_MATERIALS_UNLIT:o[t]=new rz;break;case tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:o[t]=new _z;break;case tz.KHR_DRACO_MESH_COMPRESSION:o[t]=new bz(a,this.dracoLoader);break;case tz.KHR_TEXTURE_TRANSFORM:o[t]=new Sz;break;case tz.KHR_MESH_QUANTIZATION:o[t]=new wz;break;default:n.indexOf(t)>=0&&void 0===s[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}l.setExtensions(o),l.setPlugins(s),l.parse(n,r)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function ez(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const tz={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression"};class nz{constructor(e){this.parser=e,this.name=tz.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const i=t.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let s;const a=new Uy(16777215);void 0!==o.color&&a.fromArray(o.color);const l=void 0!==o.range?o.range:0;switch(o.type){case"directional":s=new zT(a),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new DT(a),s.distance=l;break;case"spot":s=new PT(a),s.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,s.angle=o.spot.outerConeAngle,s.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return s.position.set(0,0,0),s.decay=2,void 0!==o.intensity&&(s.intensity=o.intensity),s.name=t.createUniqueName(o.name||"light_"+e),r=Promise.resolve(s),t.cache.add(n,r),r}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))}}class rz{constructor(){this.name=tz.KHR_MATERIALS_UNLIT}getMaterialType(){return vS}extendParams(e,t,n){const r=[];e.color=new Uy(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture,Tv))}return Promise.all(r)}}class iz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name].emissiveStrength;return void 0!==r&&(t.emissiveIntensity=r),Promise.resolve()}}class oz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){const e=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Cy(e,e)}return Promise.all(i)}}class sz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];return void 0!==o.iridescenceFactor&&(t.iridescence=o.iridescenceFactor),void 0!==o.iridescenceTexture&&i.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),void 0!==o.iridescenceIor&&(t.iridescenceIOR=o.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==o.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),void 0!==o.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),void 0!==o.iridescenceThicknessTexture&&i.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(i)}}class az{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new Uy(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];return void 0!==o.sheenColorFactor&&t.sheenColor.fromArray(o.sheenColorFactor),void 0!==o.sheenRoughnessFactor&&(t.sheenRoughness=o.sheenRoughnessFactor),void 0!==o.sheenColorTexture&&i.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,Tv)),void 0!==o.sheenRoughnessTexture&&i.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(i)}}class lz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(i)}}class cz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.thickness=void 0!==o.thicknessFactor?o.thicknessFactor:0,void 0!==o.thicknessTexture&&i.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const s=o.attenuationColor||[1,1,1];return t.attenuationColor=new Uy(s[0],s[1],s[2]),Promise.all(i)}}class uz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class dz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.specularIntensity=void 0!==o.specularFactor?o.specularFactor:1,void 0!==o.specularTexture&&i.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const s=o.specularColorFactor||[1,1,1];return t.specularColor=new Uy(s[0],s[1],s[2]),void 0!==o.specularColorTexture&&i.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,Tv)),Promise.all(i)}}class hz{constructor(e){this.parser=e,this.name=tz.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const i=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,o)}}class pz{constructor(e){this.parser=e,this.name=tz.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const o=i.extensions[t],s=r.images[o.source];let a=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(a=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class fz{constructor(e){this.name=tz.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,o=e.count,s=e.byteStride,a=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(o,s,a,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(o*s);return i.decodeGltfBuffer(new Uint8Array(t),o,s,a,e.mode,e.filter),t}))}))}return null}}const mz="glTF",gz=1313821514,vz=5130562;class yz{constructor(e){this.name=tz.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:VT.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==mz)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-12,r=new DataView(e,12);let i=0;for(;i<n;){const t=r.getUint32(i,!0);i+=4;const n=r.getUint32(i,!0);if(i+=4,n===gz){const n=new Uint8Array(e,12+i,t);this.content=VT.decodeText(n)}else if(n===vz){const n=12+i;this.body=e.slice(n,n+t)}i+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class bz{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=tz.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,s={},a={},l={};for(const e in o){const t=zz[e]||e.toLowerCase();s[t]=o[e]}for(const t in e.attributes){const r=zz[t]||t.toLowerCase();if(void 0!==o[t]){const i=n.accessors[e.attributes[t]],o=kz[i.componentType];l[r]=o.name,a[r]=!0===i.normalized}}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],r=a[t];void 0!==r&&(n.normalized=r)}t(e)}),s,l)}))}))}}class Sz{constructor(){this.name=tz.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),void 0===t.offset&&void 0===t.rotation&&void 0===t.scale||(e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class xz extends DE{constructor(e){super(),this.isGLTFSpecularGlossinessMaterial=!0;const t=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),n=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),r=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),i=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.roughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.roughness += geometryRoughness;","material.roughness = min( material.roughness, 1.0 );","material.specularColor = specularFactor;"].join("\n"),s={specular:{value:(new Uy).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(e){for(const t in s)e.uniforms[t]=s[t];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",n).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",i).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(e){s.specular.value=e}},specularMap:{get:function(){return s.specularMap.value},set:function(e){s.specularMap.value=e,e?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return s.glossiness.value},set:function(e){s.glossiness.value=e}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(e){s.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class _z{constructor(){this.name=tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"]}getMaterialType(){return xz}extendParams(e,t,n){const r=t.extensions[this.name];e.color=new Uy(1,1,1),e.opacity=1;const i=[];if(Array.isArray(r.diffuseFactor)){const t=r.diffuseFactor;e.color.fromArray(t),e.opacity=t[3]}if(void 0!==r.diffuseTexture&&i.push(n.assignTexture(e,"map",r.diffuseTexture,Tv)),e.emissive=new Uy(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new Uy(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){const t=r.specularGlossinessTexture;i.push(n.assignTexture(e,"glossinessMap",t)),i.push(n.assignTexture(e,"specularMap",t,Tv))}return Promise.all(i)}createMaterial(e){const t=new xz(e);return t.fog=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=void 0===e.emissiveIntensity?1:e.emissiveIntensity,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,t.normalMapType=Rv,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}class wz{constructor(){this.name=tz.KHR_MESH_QUANTIZATION}}class Cz extends QE{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let e=0;e!==r;e++)t[e]=n[i+e];return t}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=2*s,l=3*s,c=r-t,u=(n-t)/c,d=u*u,h=d*u,p=e*l,f=p-l,m=-2*h+3*d,g=h-d,v=1-m,y=g-d+u;for(let e=0;e!==s;e++){const t=o[f+e+s],n=o[f+e+a]*c,r=o[p+e+s],l=o[p+e]*c;i[e]=v*t+y*n+m*r+g*l}return i}}const Az=new eb;class Ez extends Cz{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return Az.fromArray(i).normalize().toArray(i),i}}const Tz=0,Iz=1,Mz=2,Rz=3,Pz=4,Nz=5,Oz=6,kz={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Lz={9728:ag,9729:hg,9984:lg,9985:pg,9986:ug,9987:mg},Dz={33071:og,33648:sg,10497:ig},Bz={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},zz={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Fz={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Uz={CUBICSPLINE:void 0,LINEAR:gv,STEP:mv},jz="OPAQUE",Hz="MASK",Gz="BLEND";function Vz(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function Wz(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function qz(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Kz(e){const t=e.extensions&&e.extensions[tz.KHR_DRACO_MESH_COMPRESSION];let n;return n=t?"draco:"+t.bufferView+":"+t.indices+":"+Jz(t.attributes):e.indices+":"+Jz(e.attributes)+":"+e.mode,n}function Jz(e){let t="";const n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function Yz(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}class Xz{constructor(e={},t={}){var n,r;this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new ez,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};const i="undefined"!=typeof navigator&&!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o="undefined"!=typeof navigator&&(null===(n=navigator.userAgent)||void 0===n?void 0:n.indexOf("Firefox"))>-1,s="undefined"!=typeof navigator&&o?null===(r=navigator.userAgent)||void 0===r?void 0:r.match(/Firefox\/([0-9]+)\./)[1]:-1;"undefined"==typeof createImageBitmap||i||o&&s<98?this.textureLoader=new wT(this.options.manager):this.textureLoader=new QT(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new vT(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};Vz(i,o,r),Wz(o,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(o)}))).then((function(){e(o)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n].joints;for(let t=0,n=r.length;t<n;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){const r=e[t];void 0!==r.mesh&&(this._addNodeRef(this.meshCache,r.mesh),void 0!==r.skin&&(n[r.mesh].isSkinnedMesh=!0)),void 0!==r.camera&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),i=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[tz.KHR_BINARY_GLTF].body);const r=this.options;return new Promise((function(e,i){n.load(VT.resolveURL(t.uri,r.path),e,void 0,(function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse)return Promise.resolve(null);const i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){const i=e[0],o=Bz[r.type],s=kz[r.componentType],a=s.BYTES_PER_ELEMENT,l=a*o,c=r.byteOffset||0,u=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,d=!0===r.normalized;let h,p;if(u&&u!==l){const e=Math.floor(c/u),n="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+e+":"+r.count;let l=t.cache.get(n);l||(h=new s(i,e*u,r.count*u/a),l=new iC(h,u/a),t.cache.add(n,l)),p=new sC(l,o,c%u/a,d)}else h=null===i?new s(r.count*o):new s(i,c,r.count*o),p=new SS(h,o,d);if(void 0!==r.sparse){const t=Bz.SCALAR,n=kz[r.sparse.indices.componentType],a=r.sparse.indices.byteOffset||0,l=r.sparse.values.byteOffset||0,c=new n(e[1],a,r.sparse.count*t),u=new s(e[2],l,r.sparse.count*o);null!==i&&(p=new SS(p.array.slice(),p.itemSize,p.normalized));for(let e=0,t=c.length;e<t;e++){const t=c[e];if(p.setX(t,u[e*o]),o>=2&&p.setY(t,u[e*o+1]),o>=3&&p.setZ(t,u[e*o+2]),o>=4&&p.setW(t,u[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let o=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(o=e)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){const r=this,i=this.json,o=i.textures[e],s=i.images[t],a=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[a])return this.textureCache[a];const l=this.loadImageSource(t,n).then((function(t){t.flipY=!1,o.name&&(t.name=o.name);const n=(i.samplers||{})[o.sampler]||{};return t.magFilter=Lz[n.magFilter]||hg,t.minFilter=Lz[n.minFilter]||mg,t.wrapS=Dz[n.wrapS]||ig,t.wrapT=Dz[n.wrapT]||ig,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[a]=l,l}loadImageSource(e,t){const n=this.json,r=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const i=n.images[e],o=self.URL||self.webkitURL;let s=i.uri||"",a=!1;if(void 0!==i.bufferView)s=this.getDependency("bufferView",i.bufferView).then((function(e){a=!0;const t=new Blob([e],{type:i.mimeType});return s=o.createObjectURL(t),s}));else if(void 0===i.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const l=Promise.resolve(s).then((function(e){return new Promise((function(n,i){let o=n;!0===t.isImageBitmapLoader&&(o=function(e){const t=new qy(e);t.needsUpdate=!0,n(t)}),t.load(VT.resolveURL(e,r.path),o,void 0,i)}))})).then((function(e){var t;return!0===a&&o.revokeObjectURL(s),e.userData.mimeType=i.mimeType||((t=i.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),e}));return this.sourceCache[e]=l,l}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(o){if(void 0===n.texCoord||0==n.texCoord||"aoMap"===t&&1==n.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+t+" not yet supported."),i.extensions[tz.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[tz.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(o);o=i.extensions[tz.KHR_TEXTURE_TRANSFORM].extendTexture(o,e),i.associations.set(o,t)}}return void 0!==r&&(o.encoding=r),e[t]=o,o}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new eA,gS.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new GC,gS.prototype.copy.call(t,n),t.color.copy(n.color),this.cache.add(e,t)),n=t}if(r||i||o){let e="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(e+="specular-glossiness:"),r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),o&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=n}getMaterialType(){return DE}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let o;const s={},a=i.extensions||{},l=[];if(a[tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const e=r[tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];o=e.getMaterialType(),l.push(e.extendParams(s,i,t))}else if(a[tz.KHR_MATERIALS_UNLIT]){const e=r[tz.KHR_MATERIALS_UNLIT];o=e.getMaterialType(),l.push(e.extendParams(s,i,t))}else{const n=i.pbrMetallicRoughness||{};if(s.color=new Uy(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;s.color.fromArray(e),s.opacity=e[3]}void 0!==n.baseColorTexture&&l.push(t.assignTexture(s,"map",n.baseColorTexture,Tv)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(l.push(t.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),l.push(t.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),o=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),l.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===i.doubleSided&&(s.side=hm);const c=i.alphaMode||jz;if(c===Gz?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===Hz&&(s.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&o!==vS&&(l.push(t.assignTexture(s,"normalMap",i.normalTexture)),s.normalScale=new Cy(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;s.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&o!==vS&&(l.push(t.assignTexture(s,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(s.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&o!==vS&&(s.emissive=(new Uy).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&o!==vS&&l.push(t.assignTexture(s,"emissiveMap",i.emissiveTexture,Tv)),Promise.all(l).then((function(){let n;return n=o===xz?r[tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):new o(s),i.name&&(n.name=i.name),Wz(n,i),t.associations.set(n,{materials:e}),i.extensions&&Vz(r,n,i),n}))}createUniqueName(e){const t=II.sanitizeNodeName(e||"");let n=t;for(let e=1;this.nodeNamesUsed[n];++e)n=t+"_"+e;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[tz.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return Zz(n,e,t)}))}const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n],a=Kz(s),l=r[a];if(l)o.push(l.promise);else{let e;e=s.extensions&&s.extensions[tz.KHR_DRACO_MESH_COMPRESSION]?i(s):Zz(new zS,s,t),r[a]={primitive:s,promise:e},o.push(e)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,r=this.extensions,i=n.meshes[e],o=i.primitives,s=[];for(let e=0,t=o.length;e<t;e++){const t=void 0===o[e].material?(void 0===(a=this.cache).DefaultMaterial&&(a.DefaultMaterial=new DE({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:um})),a.DefaultMaterial):this.getDependency("material",o[e].material);s.push(t)}var a;return s.push(t.loadGeometries(o)),Promise.all(s).then((function(n){const s=n.slice(0,n.length-1),a=n[n.length-1],l=[];for(let n=0,c=a.length;n<c;n++){const c=a[n],u=o[n];let d;const h=s[n];if(u.mode===Pz||u.mode===Nz||u.mode===Oz||void 0===u.mode)d=!0===i.isSkinnedMesh?new PC(c,h):new nx(c,h),!0!==d.isSkinnedMesh||d.geometry.attributes.skinWeight.normalized||d.normalizeSkinWeights(),u.mode===Nz?d.geometry=$z(d.geometry,Cv):u.mode===Oz&&(d.geometry=$z(d.geometry,Av));else if(u.mode===Iz)d=new ZC(c,h);else if(u.mode===Rz)d=new YC(c,h);else if(u.mode===Mz)d=new $C(c,h);else{if(u.mode!==Tz)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+u.mode);d=new oA(c,h)}Object.keys(d.geometry.morphAttributes).length>0&&qz(d,i),d.name=t.createUniqueName(i.name||"mesh_"+e),Wz(d,i),u.extensions&&Vz(r,d,u),t.assignFinalMaterial(d),l.push(d)}for(let n=0,r=l.length;n<r;n++)t.associations.set(l[n],{meshes:e,primitives:n});if(1===l.length)return l[0];const c=new qw;t.associations.set(c,{meshes:e});for(let e=0,t=l.length;e<t;e++)c.add(l[e]);return c}))}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new ux(wy.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new kx(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Wz(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],n={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return n.inverseBindMatrices=e,n}))}loadAnimation(e){const t=this.json.animations[e],n=[],r=[],i=[],o=[],s=[];for(let e=0,a=t.channels.length;e<a;e++){const a=t.channels[e],l=t.samplers[a.sampler],c=a.target,u=c.node,d=void 0!==t.parameters?t.parameters[l.input]:l.input,h=void 0!==t.parameters?t.parameters[l.output]:l.output;n.push(this.getDependency("node",u)),r.push(this.getDependency("accessor",d)),i.push(this.getDependency("accessor",h)),o.push(l),s.push(c)}return Promise.all([Promise.all(n),Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(s)]).then((function(n){const r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=[];for(let e=0,t=r.length;e<t;e++){const t=r[e],n=i[e],c=o[e],u=s[e],d=a[e];if(void 0===t)continue;let h;switch(t.updateMatrix(),Fz[d.path]){case Fz.weights:h=iT;break;case Fz.rotation:h=sT;break;default:h=lT}const p=t.name?t.name:t.uuid,f=void 0!==u.interpolation?Uz[u.interpolation]:gv,m=[];Fz[d.path]===Fz.weights?t.traverse((function(e){e.morphTargetInfluences&&m.push(e.name?e.name:e.uuid)})):m.push(p);let g=c.array;if(c.normalized){const e=Yz(g.constructor),t=new Float32Array(g.length);for(let n=0,r=g.length;n<r;n++)t[n]=g[n]*e;g=t}for(let e=0,t=m.length;e<t;e++){const t=new h(m[e]+"."+Fz[d.path],n.array,g,f);"CUBICSPLINE"===u.interpolation&&(t.createInterpolant=function(e){return new(this instanceof sT?Ez:Cz)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(t)}}const c=t.name?t.name:"animation_"+e;return new cT(c,void 0,l)}))}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return void 0===r.mesh?null:n.getDependency("mesh",r.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]})),t}))}loadNode(e){const t=this.json,n=this.extensions,r=this,i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"";return function(){const t=[],n=r._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return n&&t.push(n),void 0!==i.camera&&t.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){let s;if(s=!0===i.isBone?new NC:t.length>1?new qw:1===t.length?t[0]:new rS,s!==t[0])for(let e=0,n=t.length;e<n;e++)s.add(t[e]);if(i.name&&(s.userData.name=i.name,s.name=o),Wz(s,i),i.extensions&&Vz(n,s,i),void 0!==i.matrix){const e=new Nb;e.fromArray(i.matrix),s.applyMatrix4(e)}else void 0!==i.translation&&s.position.fromArray(i.translation),void 0!==i.rotation&&s.quaternion.fromArray(i.rotation),void 0!==i.scale&&s.scale.fromArray(i.scale);return r.associations.has(s)||r.associations.set(s,{}),r.associations.get(s).nodes=e,s}))}loadScene(e){const t=this.json,n=this.extensions,r=this.json.scenes[e],i=this,o=new qw;r.name&&(o.name=i.createUniqueName(r.name)),Wz(o,r),r.extensions&&Vz(n,o,r);const s=r.nodes||[],a=[];for(let e=0,n=s.length;e<n;e++)a.push(Qz(s[e],o,t,i));return Promise.all(a).then((function(){return i.associations=(e=>{const t=new Map;for(const[e,n]of i.associations)(e instanceof gS||e instanceof qy)&&t.set(e,n);return e.traverse((e=>{const n=i.associations.get(e);null!=n&&t.set(e,n)})),t})(o),o}))}}function Qz(e,t,n,r){const i=n.nodes[e];return r.getDependency("node",e).then((function(e){if(void 0===i.skin)return e;let t;return r.getDependency("skin",i.skin).then((function(e){t=e;const n=[];for(let e=0,i=t.joints.length;e<i;e++)n.push(r.getDependency("node",t.joints[e]));return Promise.all(n)})).then((function(n){return e.traverse((function(e){if(!e.isMesh)return;const r=[],i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e];if(o){r.push(o);const n=new Nb;void 0!==t.inverseBindMatrices&&n.fromArray(t.inverseBindMatrices.array,16*e),i.push(n)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}e.bind(new DC(r,i),e.matrixWorld)})),e}))})).then((function(e){t.add(e);const o=[];if(i.children){const t=i.children;for(let i=0,s=t.length;i<s;i++){const s=t[i];o.push(Qz(s,e,n,r))}}return Promise.all(o)}))}function Zz(e,t,n){const r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in r){const n=zz[t]||t.toLowerCase();n in e.attributes||i.push(o(r[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(r)}return Wz(e,t),function(e,t,n){const r=t.attributes,i=new ib;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new tb(t[0],t[1],t[2]),new tb(o[0],o[1],o[2])),e.normalized){const t=Yz(kz[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const o=t.targets;if(void 0!==o){const e=new tb,t=new tb;for(let r=0,i=o.length;r<i;r++){const i=o[r];if(void 0!==i.POSITION){const r=n.json.accessors[i.POSITION],o=r.min,s=r.max;if(void 0!==o&&void 0!==s){if(t.setX(Math.max(Math.abs(o[0]),Math.abs(s[0]))),t.setY(Math.max(Math.abs(o[1]),Math.abs(s[1]))),t.setZ(Math.max(Math.abs(o[2]),Math.abs(s[2]))),r.normalized){const e=Yz(kz[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(e)}e.boundingBox=i;const s=new wb;i.getCenter(s.center),s.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=s}(e,t,n),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,n){let r=!1,i=!1,o=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(void 0!==n.POSITION&&(r=!0),void 0!==n.NORMAL&&(i=!0),void 0!==n.COLOR_0&&(o=!0),r&&i&&o)break}if(!r&&!i&&!o)return Promise.resolve(e);const s=[],a=[],l=[];for(let c=0,u=t.length;c<u;c++){const u=t[c];if(r){const t=void 0!==u.POSITION?n.getDependency("accessor",u.POSITION):e.attributes.position;s.push(t)}if(i){const t=void 0!==u.NORMAL?n.getDependency("accessor",u.NORMAL):e.attributes.normal;a.push(t)}if(o){const t=void 0!==u.COLOR_0?n.getDependency("accessor",u.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(l)]).then((function(t){const n=t[0],s=t[1],a=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=s),o&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}function $z(e,t){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const r=n.count-2,i=[];if(t===Av)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=e.clone();return o.setIndex(i),o}let eF=null;function tF(e,t,n){return r=>{n&&n(r),e&&(eF||(eF=new YB),eF.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.4.3/"),r.setDRACOLoader(eF)),t&&r.setMeshoptDecoder(ZB())}}function nF(e,t=!0,n=!0,r){return rB($B,e,tF(t,n,r))}nF.preload=(e,t=!0,n=!0,r)=>rB.preload($B,e,tF(t,n,r)),nF.clear=e=>rB.clear($B,e);const rF=new tb(0,-1,0),iF=new Hb(.175,0,0),oF=new tb(0,-1.45,0),sF={MALE:"https://assets.memori.ai/api/v2/asset/2c5e88a4-cf62-408b-9ef0-518b099dfcb2.glb",FEMALE:"https://assets.memori.ai/api/v2/asset/8d1a5853-f05a-4a34-9f99-6eff64986081.glb"},aF=1e3,lF=5e3,cF=150;function uF({url:e,sex:t,currentBaseAction:n,timeScale:r,isZoomed:i,eyeBlink:o,updateCurrentViseme:a,setMorphTargetDictionary:l,setMorphTargetInfluences:u,emotionMorphTargets:d}){const{scene:h}=nF(e),{animations:p}=nF(sF[t]),{actions:f}=KB(p,h),m=(0,c.useRef)(),g=(0,c.useRef)(),v=(0,c.useRef)(null),y=(0,c.useRef)(!1),b=(0,c.useRef)(0),S=(0,c.useRef)(0),x=(0,c.useRef)(!1),_=(0,c.useRef)(0),w=(0,c.useRef)({}),C=(0,c.useRef)(new Set),A=(0,c.useMemo)((()=>{let e;return h.traverse((t=>{t instanceof PC&&("GBNL__Head"===t.name||"Wolf3D_Avatar"===t.name)&&(e=t)})),e}),[h]);(0,c.useEffect)((()=>{if(A&&(g.current=A,A.morphTargetDictionary&&A.morphTargetInfluences)){l(A.morphTargetDictionary);const e=Object.keys(A.morphTargetDictionary).reduce(((e,t)=>({...e,[t]:0})),{});u(e)}m.current=new NI(h)}),[A,h,l,u]);const E=(0,c.useCallback)((()=>{if(!f||!n.action)return;const e=f[n.action];if(!e)return void console.warn(`Animation "${n.action}" not found in actions.`);v.current&&v.current.fadeOut(.8),e.reset().fadeIn(.8).play(),v.current=e,e.timeScale=r,(n.action.startsWith("Gioia")||n.action.startsWith("Rabbia")||n.action.startsWith("Sorpresa")||n.action.startsWith("Timore")||n.action.startsWith("Tristezza"))&&(e.setLoop(hv,1),e.clampWhenFinished=!0,y.current=!0)}),[f,n,r]);(0,c.useEffect)((()=>{E()}),[E]);const T=(0,c.useCallback)((e=>{var t;if(!g.current||!g.current.morphTargetDictionary||!g.current.morphTargetInfluences)return;let n=0;if(o&&(e>=S.current&&!x.current&&(x.current=!0,_.current=e,b.current=e,S.current=e+Math.random()*(lF-aF)+aF),x.current)){const t=(e-_.current)/cF;t<=.5?n=2*t:t<=1?n=2-2*t:(x.current=!1,n=0)}const r=a(e/1e3),i=new Set(Object.keys(d));if(Object.entries(g.current.morphTargetDictionary).forEach((([e,t])=>{if("number"==typeof t){let s=0;if(i.has(e)){const t=d[e],n=w.current[e]||0,r=wy.lerp(n,2.5*t,.3);w.current[e]=r,s+=r}r&&e===r.name&&(s+=r.weight),"eyesClosed"===e&&o&&(s+=n),s=wy.clamp(s,0,1),g.current&&g.current.morphTargetInfluences&&(g.current.morphTargetInfluences[t]=wy.lerp(g.current.morphTargetInfluences[t],s,.5))}})),C.current=i,y.current&&v.current&&v.current.time>=v.current.getClip().duration){const e=Math.floor(5*Math.random())+1,t=f[`Idle${3===e?4:e}`];t&&(v.current.fadeOut(.5),t.reset().fadeIn(.5).play(),v.current=t,y.current=!1)}null===(t=m.current)||void 0===t||t.update(.01)}),[f,d,o,a]);return eB((e=>{T(1e3*e.clock.elapsedTime)})),(0,s.jsx)("group",{position:i?oF:rF,rotation:iF,children:(0,s.jsx)("primitive",{object:h})})}c=o("85Hg2");const dF=new tb(0,-.6,0),hF=1e3,pF=5e3,fF=150;function mF({url:e,setMorphTargetInfluences:t,setMorphTargetDictionary:n,eyeBlink:r,onLoaded:i,morphTargetSmoothing:o=.5,updateCurrentViseme:a}){const{scene:l}=nF(e),{nodes:u,materials:d}=(h=l,c.useMemo((()=>tB(h)),[h]));var h;const p=(0,c.useRef)(new NI(l)),f=((0,c.useRef)(null),(0,c.useRef)(0)),m=(0,c.useRef)(0),g=(0,c.useRef)(!1),v=(0,c.useRef)(0),y=(0,c.useRef)();return(0,c.useEffect)((()=>(pR(d),l.traverse((e=>{if(e instanceof PC&&("GBNL__Head"===e.name||"Wolf3D_Avatar"===e.name)&&(y.current=e,e.morphTargetDictionary&&e.morphTargetInfluences)){n(e.morphTargetDictionary);const r=Object.keys(e.morphTargetDictionary).reduce(((e,t)=>({...e,[t]:0})),{});t(r)}})),null==i||i(),()=>{Object.values(d).forEach((e=>e.dispose())),Object.values(u).filter(fR).forEach((e=>e.geometry.dispose()))})),[d,u,e,i,l]),eB((e=>{if(y.current&&y.current.morphTargetDictionary&&y.current.morphTargetInfluences){const t=1e3*e.clock.getElapsedTime();let n=0;if(r&&(t>=m.current&&!g.current&&(g.current=!0,v.current=t,f.current=t,m.current=t+Math.random()*(pF-hF)+hF),g.current)){const e=(t-v.current)/fF;e<=.5?n=2*e:e<=1?n=2-2*e:(g.current=!1,n=0)}const i=a(t/1e3);Object.entries(y.current.morphTargetDictionary).forEach((([e,t])=>{if("number"==typeof t){let s=0;i&&e===i.name&&(s+=1.3*i.weight),"eyesClosed"===e&&r&&(s+=n),s=wy.clamp(s,0,1),y.current&&y.current.morphTargetInfluences&&(y.current.morphTargetInfluences[t]=wy.lerp(y.current.morphTargetInfluences[t],s,o))}})),p.current.update(.01)}})),(0,s.jsx)("group",{position:dF,children:(0,s.jsx)("primitive",{object:l})})}const gF={Gioia1:{weight:0},Gioia2:{weight:0},Gioia3:{weight:0},Idle1:{weight:1},Idle2:{weight:0},Idle3:{weight:0},Idle4:{weight:0},Idle5:{weight:0},Rabbia1:{weight:0},Rabbia2:{weight:0},Rabbia3:{weight:0},Sorpresa1:{weight:0},Sorpresa2:{weight:0},Sorpresa3:{weight:0},Timore1:{weight:0},Timore2:{weight:0},Timore3:{weight:0},Tristezza1:{weight:0},Tristezza2:{weight:0},Tristezza3:{weight:0},Loading1:{weight:0},Loading2:{weight:0},Loading3:{weight:0}},vF=({stopProcessing:e,chatEmission:t,showControls:n,animation:r,url:i,sex:o,eyeBlink:a,headMovement:l,speaking:u,halfBody:d,loading:h,isZoomed:p,updateCurrentViseme:f,resetVisemeQueue:m})=>{const[g,v]=(0,c.useState)({action:r||"Idle1",weight:1}),[y,b]=(0,c.useState)({}),[S,x]=(0,c.useState)({}),[_,w]=(0,c.useState)({}),[C,A]=(0,c.useState)(.8),E=(0,c.useCallback)((e=>{if("Loading1"===e||"Loading2"===e||"Loading3"===e)return;const t={Gioia:{Gioria:1},Rabbia:{Rabbia:1},Sorpresa:{Sorpresa:1},Tristezza:{Tristezza:1},Timore:{Timore:1}},n=Object.keys(t).reduce(((e,t)=>(e[t]=0,e)),{}),r=Object.keys(t).find((t=>e.startsWith(t)))||"default",i="default"===r?n:t[r];w((e=>({...n,...i})))}),[]),T=(0,c.useCallback)((e=>{E(e),v({action:e,weight:1})}),[]),I=(0,c.useCallback)((e=>{b((t=>({...t,...e})))}),[]),M=(0,c.useCallback)((e=>{x(e)}),[]),R=(0,c.useCallback)((e=>{A(e)}),[]);return(0,c.useEffect)((()=>{var e,n;const r=(null==t?void 0:t.includes('<output class="memori-emotion">'))?null===(n=null===(e=null==t?void 0:t.split('<output class="memori-emotion">')[1])||void 0===e?void 0:e.split("</output>")[0])||void 0===n?void 0:n.trim():null;if(r){const e=Math.floor(3*Math.random())+1;T(`${r}${e}`)}else{const e=Math.floor(5*Math.random())+1;T(`Idle${3===e?4:e}`)}}),[t]),(0,c.useEffect)((()=>{if(h){const e=Math.floor(3*Math.random())+1;T(`Loading${e}`)}}),[h]),(0,s.jsxs)(s.Fragment,{children:[n&&(0,s.jsx)(qB,{timeScale:C,morphTargetDictionary:S,onBaseActionChange:T,onMorphTargetInfluencesChange:I,onMorphTargetDictionaryChange:M,baseActions:gF,currentBaseAction:g,modifyTimeScale:R}),d?(0,s.jsx)(mF,{url:i,headMovement:l,speaking:u,eyeBlink:a,morphTargetInfluences:y,setMorphTargetInfluences:b,setMorphTargetDictionary:x,updateCurrentViseme:f}):(0,s.jsx)(uF,{url:i,sex:o,resetVisemeQueue:m,eyeBlink:a,currentBaseAction:g,timeScale:C,morphTargetInfluences:y,isZoomed:p,updateCurrentViseme:f,stopProcessing:e,setMorphTargetDictionary:x,setMorphTargetInfluences:b,emotionMorphTargets:_})]})};c=o("85Hg2");const yF=new tb,bF=new tb,SF=new tb;function xF(e,t,n){const r=yF.setFromMatrixPosition(e.matrixWorld);r.project(t);const i=n.width/2,o=n.height/2;return[r.x*i+i,-r.y*o+o]}const _F=e=>Math.abs(e)<1e-10?0:e;function wF(e,t,n=""){let r="matrix3d(";for(let n=0;16!==n;n++)r+=_F(t[n]*e.elements[n])+(15!==n?",":")");return n+r}const CF=(AF=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>wF(e,AF));var AF;const EF=(e,t)=>{return wF(e,[1/(n=t),1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1],"translate(-50%,-50%)");var n},TF=c.forwardRef((({children:e,eps:t=.001,style:n,className:r,prepend:i,center:o,fullscreen:s,portal:l,distanceFactor:u,sprite:d=!1,transform:h=!1,occlude:p,onOcclude:f,zIndexRange:m=[16777271,0],calculatePosition:g=xF,as:v="div",wrapperClass:y,pointerEvents:b="auto",...S},x)=>{var _;const w=$D((({gl:e})=>e)),C=$D((({camera:e})=>e)),A=$D((({scene:e})=>e)),E=$D((({size:e})=>e)),T=$D((({raycaster:e})=>e)),[I]=c.useState((()=>document.createElement(v))),M=c.useRef(null),R=c.useRef(0),P=c.useRef([0,0]),N=c.useRef(null),O=c.useRef(null),k=null!==(_=null==l?void 0:l.current)&&void 0!==_?_:w.domElement.parentNode;c.useEffect((()=>{if(M.current){if(A.updateMatrixWorld(),h)I.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const e=g(M.current,C,E);I.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return k&&(i?k.prepend(I):k.appendChild(I)),()=>{k&&k.removeChild(I),a.unmountComponentAtNode(I)}}}),[k,h]),c.useLayoutEffect((()=>{y&&(I.className=y)}),[y]);const L=c.useMemo((()=>h?{position:"absolute",top:0,left:0,width:E.width,height:E.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:o?"translate3d(-50%,-50%,0)":"none",...s&&{top:-E.height/2,left:-E.width/2,width:E.width,height:E.height},...n}),[n,o,s,E,h]),D=c.useMemo((()=>({position:"absolute",pointerEvents:b})),[b]);c.useLayoutEffect((()=>{h?a.render(c.createElement("div",{ref:N,style:L},c.createElement("div",{ref:O,style:D},c.createElement("div",{ref:x,className:r,style:n,children:e}))),I):a.render(c.createElement("div",{ref:x,style:L,className:r,children:e}),I)}));const B=c.useRef(!0);return eB((()=>{if(M.current){C.updateMatrixWorld(),M.current.updateWorldMatrix(!0,!1);const e=h?P.current:g(M.current,C,E);if(h||Math.abs(R.current-C.zoom)>t||Math.abs(P.current[0]-e[0])>t||Math.abs(P.current[1]-e[1])>t){const t=function(e,t){const n=yF.setFromMatrixPosition(e.matrixWorld),r=bF.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),o=t.getWorldDirection(SF);return i.angleTo(o)>Math.PI/2}(M.current,C);let n=!1;"boolean"==typeof p?!0===p&&(n=[A]):Array.isArray(p)&&(n=p.map((e=>e.current)));const r=B.current;if(n){const e=function(e,t,n,r){const i=yF.setFromMatrixPosition(e.matrixWorld),o=i.clone();o.project(t),n.setFromCamera(o,t);const s=n.intersectObjects(r,!0);if(s.length){const e=s[0].distance;return i.distanceTo(n.ray.origin)<e}return!0}(M.current,C,T,n);B.current=e&&!t}else B.current=!t;if(r!==B.current&&(f?f(!B.current):I.style.display=B.current?"block":"none"),I.style.zIndex=`${function(e,t,n){if(t instanceof ux||t instanceof kx){const r=yF.setFromMatrixPosition(e.matrixWorld),i=bF.setFromMatrixPosition(t.matrixWorld),o=r.distanceTo(i),s=(n[1]-n[0])/(t.far-t.near),a=n[1]-s*t.far;return Math.round(s*o+a)}}(M.current,C,m)}`,h){const[e,t]=[E.width/2,E.height/2],n=C.projectionMatrix.elements[5]*t,{isOrthographicCamera:r,top:i,left:o,bottom:s,right:a}=C,l=CF(C.matrixWorldInverse),c=r?`scale(${n})translate(${_F(-(a+o)/2)}px,${_F((i+s)/2)}px)`:`translateZ(${n}px)`;let h=M.current.matrixWorld;d&&(h=C.matrixWorldInverse.clone().transpose().copyPosition(h).scale(M.current.scale),h.elements[3]=h.elements[7]=h.elements[11]=0,h.elements[15]=1),I.style.width=E.width+"px",I.style.height=E.height+"px",I.style.perspective=r?"":`${n}px`,N.current&&O.current&&(N.current.style.transform=`${c}${l}translate(${e}px,${t}px)`,O.current.style.transform=EF(h,1/((u||10)/400)))}else{const t=void 0===u?1:function(e,t){if(t instanceof kx)return t.zoom;if(t instanceof ux){const n=yF.setFromMatrixPosition(e.matrixWorld),r=bF.setFromMatrixPosition(t.matrixWorld),i=t.fov*Math.PI/180,o=n.distanceTo(r);return 1/(2*Math.tan(i/2)*o)}return 1}(M.current,C)*u;I.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}P.current=e,R.current=C.zoom}}})),c.createElement("group",pB({},S,{ref:M}))}));let IF=0;const MF=t(hD)((e=>(pT.onStart=(t,n,r)=>{e({active:!0,item:t,loaded:n,total:r,progress:(n-IF)/(r-IF)*100})},pT.onLoad=()=>{e({active:!1})},pT.onError=t=>e((e=>({errors:[...e.errors,t]}))),pT.onProgress=(t,n,r)=>{n===r&&(IF=r),e({active:!0,item:t,loaded:n,total:r,progress:(n-IF)/(r-IF)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})));var RF=({fallbackImg:e})=>{const{progress:t}=MF();return(0,s.jsx)(TF,{center:!0,className:"avatar-loader",children:(0,s.jsx)(xf,{spinning:!0,children:e?(0,s.jsxs)("figure",{children:[(0,s.jsx)("img",{src:e,alt:`${Math.round(t)}% loaded`,title:`${Math.round(t)}% loaded`}),(0,s.jsx)("figcaption",{children:`${Math.round(t)}%`})]}):(0,s.jsxs)(s.Fragment,{children:[Math.round(t)," % loaded"]})})})};const PF={halfBody:{width:"100%",height:"100%",minHeight:"500px",backgroundColor:"white",borderRadius:"100%"},fullBody:{width:"500px",height:"500px",backgroundColor:"white"}},NF=(e,t)=>e?{fov:40,position:[0,0,.6]}:!e&&t?{fov:44,position:[0,0,1.25]}:{fov:40,position:[0,175e-7,3]},OF=()=>{return"android"===((null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgentData)||void 0===e?void 0:e.platform)||(null===navigator||void 0===navigator?void 0:navigator.platform)||"unknown").toLowerCase()||navigator.userAgent.includes("Android")||$M()?(0,s.jsx)(gB,{distance:100,position:[-.3,.2,1.25],angle:Math.PI/2,attenuation:5,anglePower:5}):(0,s.jsx)(SB,{files:"https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/venice_sunset_1k.hdr"});var e};function kF({url:e,sex:t,style:n,rotateAvatar:r,eyeBlink:i,headMovement:o,speaking:a,fallback:l,fallbackImg:u,halfBody:d=!0,loading:h,animation:p,showControls:f=!1,isZoomed:m,chatEmission:g,stopProcessing:v,resetVisemeQueue:y,updateCurrentViseme:b}){return(0,s.jsx)(QD,{style:n||(d?PF.halfBody:PF.fullBody),camera:NF(d,m),children:(0,s.jsxs)(c.Suspense,{fallback:l||(0,s.jsx)(RF,{fallbackImg:u}),children:[OF(),r&&(0,s.jsx)(RB,{enablePan:!1,enableZoom:!1}),(0,s.jsx)(vF,{url:e,sex:t,showControls:f,loading:h||!1,animation:p,isZoomed:m||!1,eyeBlink:i||!1,headMovement:o||!1,speaking:a||!1,halfBody:d||!1,chatEmission:g,updateCurrentViseme:b,stopProcessing:v,resetVisemeQueue:y})]})})}const LF=(0,(c=o("85Hg2")).createContext)(void 0),DF={0:"viseme_sil",1:"viseme_PP",2:"viseme_FF",3:"viseme_TH",4:"viseme_DD",5:"viseme_kk",6:"viseme_CH",7:"viseme_SS",8:"viseme_nn",9:"viseme_RR",10:"viseme_aa",11:"viseme_E",12:"viseme_I",13:"viseme_O",14:"viseme_U",15:"viseme_kk",16:"viseme_CH",17:"viseme_SS",18:"viseme_TH",19:"viseme_RR",20:"viseme_kk",21:"viseme_PP"},{DEFAULT_VISEME_DURATION:BF,VISEME_OVERLAP:zF,SMOOTHING_FACTOR:FF,LOG_INTERVAL:UF,PRELOAD:jF,WEIGHT_MULTIPLIER:HF}={DEFAULT_VISEME_DURATION:.1,VISEME_OVERLAP:.01,SMOOTHING_FACTOR:.35,LOG_INTERVAL:60,PRELOAD:.5,WEIGHT_MULTIPLIER:.8},GF=(e,t)=>e.endTime<t-zF,VF=e=>Math.sin(Math.PI*Math.min(e,1))*HF,WF=(e,t)=>e+(t-e)*FF,qF=e=>(t,n)=>{console.log(`%c[VisemeContext] ${t}`,{event:"color: #4CAF50; font-weight: bold;",error:"color: #f44336; font-weight: bold;",debug:"color: #2196F3; font-weight: bold;"}[e],n)},KF=qF("event"),JF=qF("error"),YF=qF("debug"),XF=({children:e})=>{const t=(0,c.useRef)([]),n=(0,c.useRef)(null),r=(0,c.useRef)(null),[i,o]=(0,c.useState)(!1),[a,l]=(0,c.useState)("idle"),u=(0,c.useRef)(null),d=(0,c.useRef)(0),h=(0,c.useRef)(null),p=(0,c.useCallback)((e=>{n.current=e,e.onstatechange=()=>{switch(KF("Audio Context State Change",{state:e.state,currentTime:e.currentTime}),e.state){case"running":l("active");break;case"suspended":l("paused");break;case"closed":l("finished"),g()}}}),[]),f=(0,c.useCallback)(((e,n)=>{if("finished"===a)return;const r=DF[e]||"viseme_sil",i=n/1e7;null===h.current&&(h.current=i);const o=i-(h.current||0),s={name:r,weight:0,startTime:o,endTime:o+BF};t.current.push(s),"idle"===a&&l("preparing")}),[a]),m=(0,c.useCallback)((e=>{e?(n.current=e,r.current=e.currentTime,d.current=0,o(!0),l("active"),KF("Started Processing",{audioTime:e.currentTime,queueLength:t.current.length,state:a})):JF("No audio context provided",{state:a})}),[]),g=(0,c.useCallback)((()=>{o(!1),l("finished"),r.current=null,u.current=null,d.current=0,n.current=null,KF("Stopped Processing",{queueLength:t.current.length,state:a})}),[]),v=(0,c.useCallback)((e=>{if(!i||!n.current)return null;const o=n.current.currentTime-(r.current||0)+jF;t.current=t.current.filter((e=>!GF(e,o)));const s=t.current.find((e=>e.startTime<=o&&e.endTime>o-zF));if(d.current%UF==60&&YF("Current Viseme",{currentViseme:s,audioTime:o,visemeQueue:t.current}),s){const e=(o-s.startTime)/(s.endTime-s.startTime),t=VF(e),n=u.current?WF(u.current.weight,t):t,r={...s,weight:n};return u.current=r,r}if(u.current){const e=u.current.weight*(1-FF);u.current={...u.current,weight:e}}return u.current=null,null}),[i]),y=(0,c.useCallback)((()=>{t.current=[],u.current=null,r.current=null,h.current=null,d.current=0,l("idle"),KF("Reset Viseme Queue",{previousState:a})}),[a]),b=(0,c.useCallback)((e=>{KF("Reset And Start Processing",{previousState:a,queueLength:t.current.length}),g(),y(),m(e)}),[g,y,m,a]),S=(0,c.useMemo)((()=>({addViseme:f,updateCurrentViseme:v,startProcessing:m,stopProcessing:g,resetAndStartProcessing:b,resetVisemeQueue:y,isProcessing:i,setAudioContext:p})),[f,v,m,g,b,y,i,p]);return(0,s.jsx)(LF.Provider,{value:S,children:e})},QF=()=>{const e=(0,c.useContext)(LF);if(!e)throw new Error("useVisemeContext must be used within a VisemeProvider");return e};var ZF=(0,c.memo)((({memori:e,integration:n,integrationConfig:r,tenant:i,instruct:o=!1,avatar3dVisible:a=!1,setAvatar3dVisible:l,hasUserActivatedSpeak:u=!1,isPlayingAudio:d=!1,loading:h=!1,baseUrl:p,apiUrl:f,animation:m,isZoomed:g=!1,chatProps:v})=>{const{t:y}=_e(),[b,S]=(0,c.useState)(!1),{stopProcessing:x,updateCurrentViseme:_,resetVisemeQueue:w}=QF();(0,c.useEffect)((()=>{S(!0)}),[]);const C=()=>{if("userAvatar"===(null==r?void 0:r.avatar)&&e.avatarURL&&e.avatarURL.length>0)return xN({type:"avatar",tenantID:null==i?void 0:i.id,resourceURI:e.avatarURL,baseURL:p,apiURL:f})},A=()=>{var t;return b?"readyplayerme"===(null==r?void 0:r.avatar)||"readyplayerme-full"===(null==r?void 0:r.avatar)||"customrpm"===(null==r?void 0:r.avatar)?(0,s.jsx)(aD,{fallback:(0,s.jsx)("div",{className:"memori--blob-container",children:b&&(0,s.jsx)(lD,{speaking:d,avatar:C()})}),children:(0,s.jsx)(kF,{updateCurrentViseme:_,url:r.avatarURL,sex:"FEMALE"===e.voiceType?"FEMALE":"MALE",fallbackImg:C(),headMovement:!0,eyeBlink:!0,animation:m,halfBody:"readyplayerme"===r.avatar,speaking:d,loading:h,style:T(),stopProcessing:x,resetVisemeQueue:w,isZoomed:g,chatEmission:null===(t=null==v?void 0:v.dialogState)||void 0===t?void 0:t.emission})}):"customglb"===(null==r?void 0:r.avatar)?(0,s.jsx)(CL,{poster:C()||"",src:r.avatarURL,alt:""}):null:null},E=()=>(0,s.jsx)("div",{className:"memori--avatar-toggle",children:(0,s.jsx)(_f,{ghost:!0,onClick:()=>l(!a),icon:a?(0,s.jsx)(uD,{}):(0,s.jsx)(cD,{}),children:(0,s.jsx)("span",{className:"memori--avatar-toggle-text",children:y(a?"hide":"show")})})}),T=()=>"readyplayerme"===(null==r?void 0:r.avatar)?{width:"300px",height:"300px",backgroundColor:"none",borderRadius:"100%",boxShadow:"none"}:{width:"100%",height:"100%",backgroundColor:"none"};return(0,s.jsxs)(s.Fragment,{children:["readyplayerme"!==(null==r?void 0:r.avatar)&&"readyplayerme-full"!==(null==r?void 0:r.avatar)&&"customglb"!==(null==r?void 0:r.avatar)&&"customrpm"!==(null==r?void 0:r.avatar)||!(null==r?void 0:r.avatarURL)?(0,s.jsx)("div",{className:"memori--blob-container",children:b&&(0,s.jsx)(lD,{speaking:d,avatar:C()})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:t(ws)("memori--avatar-wrapper",`memori--avatar-${(null==r?void 0:r.avatar)||"default"}`,{hidden:!a}),children:A()}),E()]}),(()=>{if(!o||u||!e.isGiver||!(null==i?void 0:i.id))return null;const t=`https://${i.id}/${"it-IT"===e.culture?"it":"en"}/${e.ownerUserName}/${e.name}/integrations${(null==n?void 0:n.integrationID)?`?integration=${n.integrationID}&openAvatarModal=true`:""}`;return(0,s.jsx)("div",{className:"memori--avatar-link-to-integrations",children:(0,s.jsx)("a",{className:"memori-button memori-button--circle memori-button--outlined",href:t,children:(0,s.jsx)(AN,{content:y("widgetgoToIntegrationsToCustomizeAvatar"),children:(0,s.jsx)("span",{className:"memori-button--icon",children:(0,s.jsx)(dD,{})})})})})})()]})}),((e,t)=>JSON.stringify(e)===JSON.stringify(t)));c=o("85Hg2"),c=o("85Hg2");function $F(e=0){let[t,n]=(0,c.useState)(e),r=(0,c.useCallback)((e=>n((t=>t|e))),[t]),i=(0,c.useCallback)((e=>Boolean(t&e)),[t]),o=(0,c.useCallback)((e=>n((t=>t&~e))),[n]),s=(0,c.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:s}}let eU=(0,(c=o("85Hg2")).createContext)(null);function tU(){let e=(0,c.useContext)(eU);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,tU),e}return e}function nU(){let[e,n]=(0,c.useState)([]);return[e.length>0?e.join(" "):void 0,(0,c.useMemo)((()=>function(e){let r=_h((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,c.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return t(c).createElement(eU.Provider,{value:i},e.children)}),[n])]}let rU=gh((function(e,t){let{passive:n=!1,...r}=e,i=tU(),o=`headlessui-label-${kh()}`,s=Ah(t);Sh((()=>i.register(o)),[o,i.register]);let a={ref:s,...i.props,id:o};return n&&("onClick"in a&&delete a.onClick,"onClick"in r&&delete r.onClick),ph({ourProps:a,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));var iU,oU=((iU=oU||{})[iU.RegisterOption=0]="RegisterOption",iU[iU.UnregisterOption=1]="UnregisterOption",iU);let sU={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Zh(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},aU=(0,c.createContext)(null);function lU(e){let t=(0,c.useContext)(aU);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,lU),t}return t}function cU(e,t){return ch(t.type,sU,e,t)}aU.displayName="RadioGroupContext";let uU=gh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,...u}=e,d=_h("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),[h,p]=(0,c.useReducer)(cU,{options:[]}),f=h.options,[m,g]=nU(),[v,y]=Ep(),b=`headlessui-radiogroup-${kh()}`,S=(0,c.useRef)(null),x=Ah(S,n),[_,w]=AR(r,s,i),C=(0,c.useMemo)((()=>f.find((e=>!e.propsRef.current.disabled))),[f]),A=(0,c.useMemo)((()=>f.some((e=>d(e.propsRef.current.value,_)))),[f,_]),E=_h((e=>{var t;if(l||d(e,_))return!1;let n=null==(t=f.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==w||w(e),!0)}));yR({container:S.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=_h((e=>{let t=S.current;if(!t)return;let n=Fh(t),r=f.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case Th.Enter:CR(e.currentTarget);break;case Th.ArrowLeft:case Th.ArrowUp:if(e.preventDefault(),e.stopPropagation(),ep(r,Gh.Previous|Gh.WrapAround)===Vh.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Th.ArrowRight:case Th.ArrowDown:if(e.preventDefault(),e.stopPropagation(),ep(r,Gh.Next|Gh.WrapAround)===Vh.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Th.Space:{e.preventDefault(),e.stopPropagation();let t=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),I=_h((e=>(p({type:0,...e}),()=>p({type:1,id:e.id})))),M=(0,c.useMemo)((()=>({registerOption:I,firstOption:C,containsCheckedOption:A,change:E,disabled:l,value:_,compare:d})),[I,C,A,E,l,_,d]),R={ref:x,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:T},P=(0,c.useMemo)((()=>({value:_})),[_]);return t(c).createElement(y,{name:"RadioGroup.Description"},t(c).createElement(g,{name:"RadioGroup.Label"},t(c).createElement(aU.Provider,{value:M},null!=o&&null!=_&&xR({[o]:_}).map((([e,n])=>t(c).createElement(Dh,{features:Lh.Hidden,...vh({key:e,as:"input",type:"radio",checked:null!=n,hidden:!0,readOnly:!0,name:e,value:n})}))),ph({ourProps:R,theirProps:u,slot:P,defaultTag:"div",name:"RadioGroup"}))))}));var dU=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(dU||{});let hU=gh((function(e,n){let r=(0,c.useRef)(null),i=Ah(r,n),o=`headlessui-radiogroup-option-${kh()}`,[s,a]=nU(),[l,u]=Ep(),{addFlag:d,removeFlag:h,hasFlag:p}=$F(1),{value:f,disabled:m=!1,...g}=e,v=(0,c.useRef)({value:f,disabled:m});Sh((()=>{v.current.value=f}),[f,v]),Sh((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:S,firstOption:x,containsCheckedOption:_,value:w,compare:C}=lU("RadioGroup.Option");Sh((()=>y({id:o,element:r,propsRef:v})),[o,y,r,e]);let A=_h((e=>{var t;if(Ih(e.currentTarget))return e.preventDefault();!S(f)||(d(2),null==(t=r.current)||t.focus())})),E=_h((e=>{if(Ih(e.currentTarget))return e.preventDefault();d(2)})),T=_h((()=>h(2))),I=(null==x?void 0:x.id)===o,M=b||m,R=C(w,f),P={ref:i,id:o,role:"radio","aria-checked":R?"true":"false","aria-labelledby":s,"aria-describedby":l,"aria-disabled":!!M||void 0,tabIndex:M?-1:R||!_&&I?0:-1,onClick:M?void 0:A,onFocus:M?void 0:E,onBlur:M?void 0:T},N=(0,c.useMemo)((()=>({checked:R,disabled:M,active:p(2)})),[R,M,p]);return t(c).createElement(u,{name:"RadioGroup.Description"},t(c).createElement(a,{name:"RadioGroup.Label"},ph({ourProps:P,theirProps:g,slot:N,defaultTag:"div",name:"RadioGroup.Option"})))})),pU=Object.assign(uU,{Option:hU,Label:rU,Description:Tp});var fU=({instruct:e,canInstruct:t,onChangeMode:n})=>{const{t:r}=_e();return t?(0,s.jsx)("div",{className:"memori--changeMode-instruct",children:(0,s.jsxs)(pU,{name:"instruct",value:e?"instruct":"test",defaultValue:e?"instruct":"test",className:"memori--changeMode-instruct-radio",onChange:n,children:[(0,s.jsx)(pU.Option,{value:"instruct",className:"memori--changeMode-instruct-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,children:r("widget.instruct")||"Instruct"})}),(0,s.jsx)(pU.Option,{value:"test",className:"memori--changeMode-instruct-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,children:r("widget.test")||"Test"})})]})}):null};c=o("85Hg2");var mU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",viewBox:"0 0 40 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M25.085.277c-.264 0-.531.071-.777.236L8.482 10.857H1.161a.716.716 0 00-.715.714V24.43c0 .392.322.714.715.714h7.321l15.826 10.344c.246.16.518.236.777.236.745 0 1.433-.593 1.433-1.433V1.71c0-.84-.688-1.433-1.433-1.433zM23.304 30.99l-13.063-8.54-.803-.522H3.66V14.07h5.777l.799-.522 13.067-8.54V30.99zM39.534 15.148L36.967 18l2.567 2.852a1.09 1.09 0 010 1.427l-1.283 1.426a.845.845 0 01-1.284 0L34.4 20.852l-2.567 2.852a.845.845 0 01-1.283 0l-1.284-1.426a1.09 1.09 0 010-1.426L31.833 18l-2.567-2.852a1.09 1.09 0 010-1.426l1.283-1.427a.845.845 0 011.284 0l2.567 2.853 2.567-2.853a.845.845 0 011.284 0l1.283 1.427a1.09 1.09 0 010 1.426z",fill:"currentColor"})});var gU,vU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z"})}),yU=(c=o("85Hg2"),(gU=yU||{})[gU.Open=0]="Open",gU[gU.Closed=1]="Closed",gU),bU=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(bU||{});let SU={0:e=>({...e,popoverState:ch(e.popoverState,{0:1,1:0})}),1:e=>1===e.popoverState?e:{...e,popoverState:1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},xU=(0,c.createContext)(null);function _U(e){let t=(0,c.useContext)(xU);if(null===t){let t=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,_U),t}return t}xU.displayName="PopoverContext";let wU=(0,c.createContext)(null);function CU(e){let t=(0,c.useContext)(wU);if(null===t){let t=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,CU),t}return t}wU.displayName="PopoverAPIContext";let AU=(0,c.createContext)(null);function EU(){return(0,c.useContext)(AU)}AU.displayName="PopoverGroupContext";let TU=(0,c.createContext)(null);function IU(e,t){return ch(t.type,SU,e,t)}TU.displayName="PopoverPanelContext";let MU=gh((function(e,n){var r;let i=`headlessui-popover-button-${kh()}`,o=`headlessui-popover-panel-${kh()}`,s=(0,c.useRef)(null),a=Ah(n,Ch((e=>{s.current=e}))),l=(0,c.useReducer)(IU,{popoverState:1,button:null,buttonId:i,panel:null,panelId:o,beforePanelSentinel:(0,c.createRef)(),afterPanelSentinel:(0,c.createRef)()}),[{popoverState:u,button:d,panel:h,beforePanelSentinel:p,afterPanelSentinel:f},m]=l,g=op(null!=(r=s.current)?r:d);(0,c.useEffect)((()=>m({type:3,buttonId:i})),[i,m]),(0,c.useEffect)((()=>m({type:5,panelId:o})),[o,m]);let v=(0,c.useMemo)((()=>{if(!d||!h)return!1;for(let e of document.querySelectorAll("body > *"))if(Number(null==e?void 0:e.contains(d))^Number(null==e?void 0:e.contains(h)))return!0;let e=qh(),t=e.indexOf(d),n=(t+e.length-1)%e.length,r=(t+1)%e.length,i=e[n],o=e[r];return!h.contains(i)&&!h.contains(o)}),[d,h]),y=(0,c.useMemo)((()=>({buttonId:i,panelId:o,close:()=>m({type:1})})),[i,o,m]),b=EU(),S=null==b?void 0:b.registerPopover,x=_h((()=>{var e;return null!=(e=null==b?void 0:b.isFocusWithinPopoverGroup())?e:(null==g?void 0:g.activeElement)&&((null==d?void 0:d.contains(g.activeElement))||(null==h?void 0:h.contains(g.activeElement)))}));(0,c.useEffect)((()=>null==S?void 0:S(y)),[S,y]),sp(null==g?void 0:g.defaultView,"focus",(e=>{var t,n,r,i;0===u&&(x()||!d||!h||null!=(n=null==(t=p.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(i=null==(r=f.current)?void 0:r.contains)&&i.call(r,e.target)||m({type:1}))}),!0),Dp([d,h],((e,t)=>{m({type:1}),Jh(t,Kh.Loose)||(e.preventDefault(),null==d||d.focus())}),0===u);let _=_h((e=>{m({type:1});let t=e?e instanceof HTMLElement?e:"current"in e&&e.current instanceof HTMLElement?e.current:d:d;null==t||t.focus()})),w=(0,c.useMemo)((()=>({close:_,isPortalled:v})),[_,v]),C=(0,c.useMemo)((()=>({open:0===u,close:_})),[u,_]),A=e,E={ref:a};return t(c).createElement(xU.Provider,{value:l},t(c).createElement(wU.Provider,{value:w},t(c).createElement(Pp,{value:ch(u,{0:Mp.Open,1:Mp.Closed})},ph({ourProps:E,theirProps:A,slot:C,defaultTag:"div",name:"Popover"}))))})),RU=gh((function(e,n){let[r,i]=_U("Popover.Button"),{isPortalled:o}=CU("Popover.Button"),s=(0,c.useRef)(null),a=`headlessui-focus-sentinel-${kh()}`,l=EU(),u=null==l?void 0:l.closeOthers,d=(0,c.useContext)(TU),h=null!==d&&d===r.panelId,p=Ah(s,n,h?null:e=>e&&i({type:2,button:e})),f=Ah(s,n),m=op(s),g=_h((e=>{var t,n,o;if(h){if(1===r.popoverState)return;switch(e.key){case Th.Space:case Th.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),i({type:1}),null==(o=r.button)||o.focus()}}else switch(e.key){case Th.Space:case Th.Enter:e.preventDefault(),e.stopPropagation(),1===r.popoverState&&(null==u||u(r.buttonId)),i({type:0});break;case Th.Escape:if(0!==r.popoverState)return null==u?void 0:u(r.buttonId);if(!s.current||(null==m?void 0:m.activeElement)&&!s.current.contains(m.activeElement))return;e.preventDefault(),e.stopPropagation(),i({type:1})}})),v=_h((e=>{h||e.key===Th.Space&&e.preventDefault()})),y=_h((t=>{var n,o;Ih(t.currentTarget)||e.disabled||(h?(i({type:1}),null==(n=r.button)||n.focus()):(t.preventDefault(),t.stopPropagation(),1===r.popoverState&&(null==u||u(r.buttonId)),i({type:0}),null==(o=r.button)||o.focus()))})),b=_h((e=>{e.preventDefault(),e.stopPropagation()})),S=0===r.popoverState,x=(0,c.useMemo)((()=>({open:S})),[S]),_=vR(e,s),w=e,C=h?{ref:f,type:_,onKeyDown:g,onClick:y}:{ref:p,id:r.buttonId,type:_,"aria-expanded":e.disabled?void 0:0===r.popoverState,"aria-controls":r.panel?r.panelId:void 0,onKeyDown:g,onKeyUp:v,onClick:y,onMouseDown:b},A=rp(),E=_h((()=>{let e=r.panel;e&&ch(A.current,{[np.Forwards]:()=>ep(e,Gh.First),[np.Backwards]:()=>ep(e,Gh.Last)})}));return t(c).createElement(t(c).Fragment,null,ph({ourProps:C,theirProps:w,slot:x,defaultTag:"button",name:"Popover.Button"}),S&&!h&&o&&t(c).createElement(Dh,{id:a,features:Lh.Focusable,as:"button",type:"button",onFocus:E}))})),PU=dh.RenderStrategy|dh.Static,NU=gh((function(e,t){let[{popoverState:n},r]=_U("Popover.Overlay"),i=Ah(t),o=`headlessui-popover-overlay-${kh()}`,s=Rp(),a=null!==s?s===Mp.Open:0===n;return ph({ourProps:{ref:i,id:o,"aria-hidden":!0,onClick:_h((e=>{if(Ih(e.currentTarget))return e.preventDefault();r({type:1})}))},theirProps:e,slot:(0,c.useMemo)((()=>({open:0===n})),[n]),defaultTag:"div",features:PU,visible:a,name:"Popover.Overlay"})})),OU=dh.RenderStrategy|dh.Static,kU=gh((function(e,n){let{focus:r=!1,...i}=e,[o,s]=_U("Popover.Panel"),{close:a,isPortalled:l}=CU("Popover.Panel"),u=`headlessui-focus-sentinel-before-${kh()}`,d=`headlessui-focus-sentinel-after-${kh()}`,h=(0,c.useRef)(null),p=Ah(h,n,(e=>{s({type:4,panel:e})})),f=op(h),m=Rp(),g=null!==m?m===Mp.Open:0===o.popoverState,v=_h((e=>{var t;if(e.key===Th.Escape){if(0!==o.popoverState||!h.current||(null==f?void 0:f.activeElement)&&!h.current.contains(f.activeElement))return;e.preventDefault(),e.stopPropagation(),s({type:1}),null==(t=o.button)||t.focus()}}));(0,c.useEffect)((()=>{var t;e.static||1===o.popoverState&&(null==(t=e.unmount)||t)&&s({type:4,panel:null})}),[o.popoverState,e.unmount,e.static,s]),(0,c.useEffect)((()=>{if(!r||0!==o.popoverState||!h.current)return;let e=null==f?void 0:f.activeElement;h.current.contains(e)||ep(h.current,Gh.First)}),[r,h,o.popoverState]);let y=(0,c.useMemo)((()=>({open:0===o.popoverState,close:a})),[o,a]),b={ref:p,id:o.panelId,onKeyDown:v,onBlur:r&&0===o.popoverState?e=>{var t,n,r,i,a;let l=e.relatedTarget;!l||!h.current||null!=(t=h.current)&&t.contains(l)||(s({type:1}),((null==(r=null==(n=o.beforePanelSentinel.current)?void 0:n.contains)?void 0:r.call(n,l))||(null==(a=null==(i=o.afterPanelSentinel.current)?void 0:i.contains)?void 0:a.call(i,l)))&&l.focus({preventScroll:!0}))}:void 0,tabIndex:-1},S=rp(),x=_h((()=>{let e=h.current;e&&ch(S.current,{[np.Forwards]:()=>{ep(e,Gh.First)},[np.Backwards]:()=>{var e;null==(e=o.button)||e.focus({preventScroll:!0})}})})),_=_h((()=>{let e=h.current;e&&ch(S.current,{[np.Forwards]:()=>{var e,t,n;if(!o.button)return;let r=qh(),i=r.indexOf(o.button),s=r.slice(0,i+1),a=[...r.slice(i+1),...s];for(let r of a.slice())if((null==(t=null==(e=null==r?void 0:r.id)?void 0:e.startsWith)?void 0:t.call(e,"headlessui-focus-sentinel-"))||(null==(n=o.panel)?void 0:n.contains(r))){let e=a.indexOf(r);-1!==e&&a.splice(e,1)}ep(a,Gh.First,!1)},[np.Backwards]:()=>ep(e,Gh.Last)})}));return t(c).createElement(TU.Provider,{value:o.panelId},g&&l&&t(c).createElement(Dh,{id:u,ref:o.beforePanelSentinel,features:Lh.Focusable,as:"button",type:"button",onFocus:x}),ph({ourProps:b,theirProps:i,slot:y,defaultTag:"div",features:OU,visible:g,name:"Popover.Panel"}),g&&l&&t(c).createElement(Dh,{id:d,ref:o.afterPanelSentinel,features:Lh.Focusable,as:"button",type:"button",onFocus:_}))})),LU=gh((function(e,n){let r=(0,c.useRef)(null),i=Ah(r,n),[o,s]=(0,c.useState)([]),a=_h((e=>{s((t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t}))})),l=_h((e=>(s((t=>[...t,e])),()=>a(e)))),u=_h((()=>{var e;let t=Fh(r);if(!t)return!1;let n=t.activeElement;return!(null==(e=r.current)||!e.contains(n))||o.some((e=>{var r,i;return(null==(r=t.getElementById(e.buttonId))?void 0:r.contains(n))||(null==(i=t.getElementById(e.panelId))?void 0:i.contains(n))}))})),d=_h((e=>{for(let t of o)t.buttonId!==e&&t.close()})),h=(0,c.useMemo)((()=>({registerPopover:l,unregisterPopover:a,isFocusWithinPopoverGroup:u,closeOthers:d})),[l,a,u,d]),p=(0,c.useMemo)((()=>({})),[]),f=e,m={ref:i};return t(c).createElement(AU.Provider,{value:h},ph({ourProps:m,theirProps:f,slot:p,defaultTag:"div",name:"Popover.Group"}))})),DU=Object.assign(MU,{Button:RU,Overlay:NU,Panel:kU,Group:LU});var BU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"})});var zU=({history:e,memori:n,className:r,buttonClassName:i,icon:o,disabled:a=!1,align:l="right",filename:c})=>{const{t:u}=_e(),d=`${u("write_and_speak.conversationStartedLabel")} ${new Intl.DateTimeFormat("it",{dateStyle:"short",timeStyle:"short"}).format(new Date)}\n\n`.concat(e.map((e=>`${e.fromUser?"YOU":n.name}: ${e.text}`)).join("\n"));return(0,s.jsx)(DU,{title:u("write_and_speak.exportChatHistoryMessage"),className:t(ws)("memori-export-history-button",r,{"memori-export-history-button--align-left":"left"===l}),children:({close:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(DU.Button,{disabled:a,className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only",i,{"memori-button--disabled":a,"memori-button--primary":!a}),children:(0,s.jsx)("div",{className:"memori-button--icon",children:o||(0,s.jsx)(BU,{})})}),(0,s.jsxs)(DU.Panel,{className:"memori-export-history-button--panel",children:[(0,s.jsx)("p",{children:u("write_and_speak.exportChatHistory")}),(0,s.jsx)(_f,{primary:!0,onClick:()=>((e,t="export-chat.txt")=>{const n=new Blob([e],{type:"text/plain"}),r=URL.createObjectURL(n),i=document.createElement("a");i.setAttribute("href",r),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)})(d,c||`${n.name.replace(/\W+/g,"-")}-export-chat.txt`),children:u("yes")||"Yes"}),(0,s.jsx)(_f,{onClick:()=>e(),children:u("no")||"No"})]})]})})};var FU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"})});c=o("85Hg2");var UU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-32 736H663.9V602.2h104l15.6-120.7H663.9v-77.1c0-35 9.7-58.8 59.8-58.8h63.9v-108c-11.1-1.5-49-4.8-93.2-4.8-92.2 0-155.3 56.3-155.3 159.6v89H434.9v120.7h104.3V848H176V176h672v672z"})});var jU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0 0 75-94 336.64 336.64 0 0 1-108.2 41.2A170.1 170.1 0 0 0 672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 0 0-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 0 1-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 0 1-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"})});var HU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M847.7 112H176.3c-35.5 0-64.3 28.8-64.3 64.3v671.4c0 35.5 28.8 64.3 64.3 64.3h671.4c35.5 0 64.3-28.8 64.3-64.3V176.3c0-35.5-28.8-64.3-64.3-64.3zm0 736c-447.8-.1-671.7-.2-671.7-.3.1-447.8.2-671.7.3-671.7 447.8.1 671.7.2 671.7.3-.1 447.8-.2 671.7-.3 671.7zM230.6 411.9h118.7v381.8H230.6zm59.4-52.2c37.9 0 68.8-30.8 68.8-68.8a68.8 68.8 0 1 0-137.6 0c-.1 38 30.7 68.8 68.8 68.8zm252.3 245.1c0-49.8 9.5-98 71.2-98 60.8 0 61.7 56.9 61.7 101.2v185.7h118.6V584.3c0-102.8-22.2-181.9-142.3-181.9-57.7 0-96.4 31.7-112.3 61.7h-1.6v-52.2H423.7v381.8h118.6V604.8z"})});var GU=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M713.5 599.9c-10.9-5.6-65.2-32.2-75.3-35.8-10.1-3.8-17.5-5.6-24.8 5.6-7.4 11.1-28.4 35.8-35 43.3-6.4 7.4-12.9 8.3-23.8 2.8-64.8-32.4-107.3-57.8-150-131.1-11.3-19.5 11.3-18.1 32.4-60.2 3.6-7.4 1.8-13.7-1-19.3-2.8-5.6-24.8-59.8-34-81.9-8.9-21.5-18.1-18.5-24.8-18.9-6.4-.4-13.7-.4-21.1-.4-7.4 0-19.3 2.8-29.4 13.7-10.1 11.1-38.6 37.8-38.6 92s39.5 106.7 44.9 114.1c5.6 7.4 77.7 118.6 188.4 166.5 70 30.2 97.4 32.8 132.4 27.6 21.3-3.2 65.2-26.6 74.3-52.5 9.1-25.8 9.1-47.9 6.4-52.5-2.7-4.9-10.1-7.7-21-13z"}),(0,s.jsx)("path",{d:"M925.2 338.4c-22.6-53.7-55-101.9-96.3-143.3-41.3-41.3-89.5-73.8-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9-53.3 22.8-101.1 55.2-142 96.5-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9.3 69.4 16.9 138.3 48 199.9v152c0 25.4 20.6 46 46 46h152.1c61.6 31.1 130.5 47.7 199.9 48h2.1c59.9 0 118-11.6 172.7-34.3 53.5-22.3 101.6-54.3 142.8-95.2 41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"})]});var VU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0 0 68.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"})});var WU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 0 0 0-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"})});var qU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"})});var KU,JU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm121.8 169.9l-40.7 191.8c-3 13.6-11.1 16.9-22.4 10.5l-62-45.7-29.9 28.8c-3.3 3.3-6.1 6.1-12.5 6.1l4.4-63.1 114.9-103.8c5-4.4-1.1-6.9-7.7-2.5l-142 89.4-61.2-19.1c-13.3-4.2-13.6-13.3 2.8-19.7l239.1-92.2c11.1-4 20.8 2.7 17.2 19.5z"})}),YU=(c=o("85Hg2"),Object.defineProperty),XU=Object.getOwnPropertySymbols,QU=Object.prototype.hasOwnProperty,ZU=Object.prototype.propertyIsEnumerable,$U=(e,t,n)=>t in e?YU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ej=(e,t)=>{for(var n in t||(t={}))QU.call(t,n)&&$U(e,n,t[n]);if(XU)for(var n of XU(t))ZU.call(t,n)&&$U(e,n,t[n]);return e},tj=(e,t)=>{var n={};for(var r in e)QU.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&XU)for(var r of XU(e))t.indexOf(r)<0&&ZU.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(r);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,r){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,n,i=1,s=40,l=-1,c=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,d;for(u=i;;u++){const r=8*t.getNumDataCodewords(u,n),i=a.getTotalBits(e,u);if(i<=r){d=i;break}if(u>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const p=8*t.getNumDataCodewords(u,n);o(h.length<=p),r(0,Math.min(4,p-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<p;e^=253)r(e,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,n,f,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);o(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(r,e));this.setFunctionModule(8,7,i(r,6)),this.setFunctionModule(8,8,i(r,7)),this.setFunctionModule(7,8,i(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),r=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(r,o,n),this.setFunctionModule(o,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),o=e+r,s=t+n;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],s=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),l=i-a%i,c=Math.floor(a/i);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let n=0,r=0;n<i;n++){let i=e.slice(r,r+c-s+(n<l?0:1));r+=i.length;const o=t.reedSolomonComputeRemainder(i,d);n<l&&i.push(0),u.push(i.concat(o))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,n)=>{(e!=c-s||n>=l)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const s=t-o,a=0==(t+1&2)?this.size-1-r:r;!this.isFunction[a][s]&&n<8*e.length&&(this.modules[a][s]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[n][s]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[n][s],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][n]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[s][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*r)/r)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const s=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);r(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(i,11,n)}return t<e.length&&r(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new s(s.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(KU||(KU={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(KU||(KU={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(KU||(KU={}));var nj=KU,rj={L:nj.QrCode.Ecc.LOW,M:nj.QrCode.Ecc.MEDIUM,Q:nj.QrCode.Ecc.QUARTILE,H:nj.QrCode.Ecc.HIGH},ij=128,oj="L",sj="#FFFFFF",aj="#000000",lj=!1;
|
|
253
|
+
class PB{constructor(e,t,n,r,i="div"){this.parent=e,this.object=t,this.property=n,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(i),this.domElement.classList.add("controller"),this.domElement.classList.add(r),this.$name=document.createElement("div"),this.$name.classList.add("name"),PB.nextNameID=PB.nextNameID||0,this.$name.id="lil-gui-name-"+ ++PB.nextNameID,this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",(e=>e.stopPropagation())),this.domElement.addEventListener("keyup",(e=>e.stopPropagation())),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(n)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),void 0!==this._onChange&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),void 0!==this._onFinishChange&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled||(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e)),this}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){const t=this.parent.add(this.object,this.property,e);return t.name(this._name),this.destroy(),t}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,void 0!==this._listenCallbackID&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);const e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}}class NB extends PB{constructor(e,t,n){super(e,t,n,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",(()=>{this.setValue(this.$input.checked),this._callOnFinishChange()})),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}}function OB(e){let t,n;return(t=e.match(/(#|0x)?([a-f0-9]{6})/i))?n=t[2]:(t=e.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?n=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=e.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(n=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),!!n&&"#"+n}const kB={isPrimitive:!0,match:e=>"number"==typeof e,fromHexString:e=>parseInt(e.substring(1),16),toHexString:e=>"#"+e.toString(16).padStart(6,0)},LB={isPrimitive:!1,match:e=>Array.isArray(e),fromHexString(e,t,n=1){const r=kB.fromHexString(e);t[0]=(r>>16&255)/255*n,t[1]=(r>>8&255)/255*n,t[2]=(255&r)/255*n},toHexString:([e,t,n],r=1)=>kB.toHexString(e*(r=255/r)<<16^t*r<<8^n*r<<0)},DB={isPrimitive:!1,match:e=>Object(e)===e,fromHexString(e,t,n=1){const r=kB.fromHexString(e);t.r=(r>>16&255)/255*n,t.g=(r>>8&255)/255*n,t.b=(255&r)/255*n},toHexString:({r:e,g:t,b:n},r=1)=>kB.toHexString(e*(r=255/r)<<16^t*r<<8^n*r<<0)},BB=[{isPrimitive:!0,match:e=>"string"==typeof e,fromHexString:OB,toHexString:OB},kB,LB,DB];class zB extends PB{constructor(e,t,n,r){var i;super(e,t,n,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=(i=this.initialValue,BB.find((e=>e.match(i)))),this._rgbScale=r,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",(()=>{this._setValueFromHexString(this.$input.value)})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$text.addEventListener("input",(()=>{const e=OB(this.$text.value);e&&this._setValueFromHexString(e)})),this.$text.addEventListener("focus",(()=>{this._textFocused=!0,this.$text.select()})),this.$text.addEventListener("blur",(()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()})),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){const t=this._format.fromHexString(e);this.setValue(t)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}}class FB extends PB{constructor(e,t,n){super(e,t,n,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",(e=>{e.preventDefault(),this.getValue().call(this.object),this._callOnChange()})),this.$button.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$disable=this.$button}}class UB extends PB{constructor(e,t,n,r,i,o){super(e,t,n,"number"),this._initInput(),this.min(r),this.max(i);const s=void 0!==o;this.step(s?o:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,t=!0){return this._step=e,this._stepExplicit=t,this}updateDisplay(){const e=this.getValue();if(this._hasSlider){let t=(e-this._min)/(this._max-this._min);t=Math.max(0,Math.min(t,1)),this.$fill.style.width=100*t+"%"}return this._inputFocused||(this.$input.value=void 0===this._decimals?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id);window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;const e=e=>{const t=parseFloat(this.$input.value);isNaN(t)||(this._snapClampSetValue(t+e),this.$input.value=this.getValue())};let t,n,r,i,o,s=!1;const a=e=>{if(s){const r=e.clientX-t,i=e.clientY-n;Math.abs(i)>5?(e.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(r)>5&&l()}if(!s){const t=e.clientY-r;o-=t*this._step*this._arrowKeyMultiplier(e),i+o>this._max?o=this._max-i:i+o<this._min&&(o=this._min-i),this._snapClampSetValue(i+o)}r=e.clientY},l=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",l)};this.$input.addEventListener("input",(()=>{let e=parseFloat(this.$input.value);isNaN(e)||(this._stepExplicit&&(e=this._snap(e)),this.setValue(this._clamp(e)))})),this.$input.addEventListener("keydown",(t=>{"Enter"===t.key&&this.$input.blur(),"ArrowUp"===t.code&&(t.preventDefault(),e(this._step*this._arrowKeyMultiplier(t))),"ArrowDown"===t.code&&(t.preventDefault(),e(this._step*this._arrowKeyMultiplier(t)*-1))})),this.$input.addEventListener("wheel",(t=>{this._inputFocused&&(t.preventDefault(),e(this._step*this._normalizeMouseWheel(t)))}),{passive:!1}),this.$input.addEventListener("mousedown",(e=>{t=e.clientX,n=r=e.clientY,s=!0,i=this.getValue(),o=0,window.addEventListener("mousemove",a),window.addEventListener("mouseup",l)})),this.$input.addEventListener("focus",(()=>{this._inputFocused=!0})),this.$input.addEventListener("blur",(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()}))}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");const e=e=>{const t=this.$slider.getBoundingClientRect();let n=((e,t,n,r,i)=>(e-t)/(n-t)*(i-r)+r)(e,t.left,t.right,this._min,this._max);this._snapClampSetValue(n)},t=t=>{e(t.clientX)},n=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",n)};let r,i,o=!1;const s=t=>{t.preventDefault(),this._setDraggingStyle(!0),e(t.touches[0].clientX),o=!1},a=t=>{if(o){const e=t.touches[0].clientX-r,n=t.touches[0].clientY-i;Math.abs(e)>Math.abs(n)?s(t):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",l))}else t.preventDefault(),e(t.touches[0].clientX)},l=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",l)},c=this._callOnFinishChange.bind(this);let u;this.$slider.addEventListener("mousedown",(r=>{this._setDraggingStyle(!0),e(r.clientX),window.addEventListener("mousemove",t),window.addEventListener("mouseup",n)})),this.$slider.addEventListener("touchstart",(e=>{e.touches.length>1||(this._hasScrollBar?(r=e.touches[0].clientX,i=e.touches[0].clientY,o=!0):s(e),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",l))}),{passive:!1}),this.$slider.addEventListener("wheel",(e=>{if(Math.abs(e.deltaX)<Math.abs(e.deltaY)&&this._hasScrollBar)return;e.preventDefault();const t=this._normalizeMouseWheel(e)*this._step;this._snapClampSetValue(this.getValue()+t),this.$input.value=this.getValue(),clearTimeout(u),u=setTimeout(c,400)}),{passive:!1})}_setDraggingStyle(e,t="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle(`lil-gui-${t}`,e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:t,deltaY:n}=e;Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(t=0,n=-e.wheelDelta/120,n*=this._stepExplicit?1:10);return t+-n}_arrowKeyMultiplier(e){let t=this._stepExplicit?1:10;return e.shiftKey?t*=10:e.altKey&&(t/=10),t}_snap(e){const t=Math.round(e/this._step)*this._step;return parseFloat(t.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){const e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return void 0!==this._min}get _hasMax(){return void 0!==this._max}}class jB extends PB{constructor(e,t,n,r){super(e,t,n,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",(()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()})),this.$select.addEventListener("focus",(()=>{this.$display.classList.add("focus")})),this.$select.addEventListener("blur",(()=>{this.$display.classList.remove("focus")})),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(r)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach((e=>{const t=document.createElement("option");t.textContent=e,this.$select.appendChild(t)})),this.updateDisplay(),this}updateDisplay(){const e=this.getValue(),t=this._values.indexOf(e);return this.$select.selectedIndex=t,this.$display.textContent=-1===t?e:this._names[t],this}}class HB extends PB{constructor(e,t,n){super(e,t,n,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",(()=>{this.setValue(this.$input.value)})),this.$input.addEventListener("keydown",(e=>{"Enter"===e.code&&this.$input.blur()})),this.$input.addEventListener("blur",(()=>{this._callOnFinishChange()})),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}}let GB=!1;class VB{constructor({parent:e,autoPlace:t=void 0===e,container:n,width:r,title:i="Controls",closeFolders:o=!1,injectStyles:s=!0,touchStyles:a=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",(()=>this.openAnimated(this._closed))),this.$title.addEventListener("keydown",(e=>{"Enter"!==e.code&&"Space"!==e.code||(e.preventDefault(),this.$title.click())})),this.$title.addEventListener("touchstart",(()=>{}),{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(i),this.parent)return this.parent.children.push(this),this.parent.folders.push(this),void this.parent.$children.appendChild(this.domElement);this.domElement.classList.add("root"),a&&this.domElement.classList.add("allow-touch-styles"),!GB&&s&&(!function(e){const t=document.createElement("style");t.innerHTML=e;const n=document.querySelector("head link[rel=stylesheet], head style");n?document.head.insertBefore(t,n):document.head.appendChild(t)}('.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "↕";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "▾";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "▸";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "✓";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}'),GB=!0),n?n.appendChild(this.domElement):t&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),r&&this.domElement.style.setProperty("--width",r+"px"),this._closeFolders=o}add(e,t,n,r,i){if(Object(n)===n)return new jB(this,e,t,n);const o=e[t];switch(typeof o){case"number":return new UB(this,e,t,n,r,i);case"boolean":return new NB(this,e,t);case"string":return new HB(this,e,t);case"function":return new FB(this,e,t)}console.error("gui.add failed\n\tproperty:",t,"\n\tobject:",e,"\n\tvalue:",o)}addColor(e,t,n=1){return new zB(this,e,t,n)}addFolder(e){const t=new VB({parent:this,title:e});return this.root._closeFolders&&t.close(),t}load(e,t=!0){return e.controllers&&this.controllers.forEach((t=>{t instanceof FB||t._name in e.controllers&&t.load(e.controllers[t._name])})),t&&e.folders&&this.folders.forEach((t=>{t._title in e.folders&&t.load(e.folders[t._title])})),this}save(e=!0){const t={controllers:{},folders:{}};return this.controllers.forEach((e=>{if(!(e instanceof FB)){if(e._name in t.controllers)throw new Error(`Cannot save GUI with duplicate property "${e._name}"`);t.controllers[e._name]=e.save()}})),e&&this.folders.forEach((e=>{if(e._title in t.folders)throw new Error(`Cannot save GUI with duplicate folder "${e._title}"`);t.folders[e._title]=e.save()})),t}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame((()=>{const t=this.$children.clientHeight;this.$children.style.height=t+"px",this.domElement.classList.add("transition");const n=e=>{e.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",n))};this.$children.addEventListener("transitionend",n);const r=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame((()=>{this.$children.style.height=r+"px"}))})),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach((e=>e.reset())),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),void 0!==this._onChange&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),void 0!==this._onFinishChange&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),void 0!==this._onOpenClose&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach((e=>e.destroy()))}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach((t=>{e=e.concat(t.controllersRecursive())})),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach((t=>{e=e.concat(t.foldersRecursive())})),e}}var WB=VB;var qB=({onBaseActionChange:e,baseActions:t,modifyTimeScale:n,onMorphTargetInfluencesChange:r,onMorphTargetDictionaryChange:i,morphTargetDictionary:o,timeScale:s})=>{const a=(0,c.useRef)(null),l=(0,c.useRef)({"modify time scale":s}),u=(0,c.useRef)([]);return(0,c.useEffect)((()=>{const i=new WB({width:310});a.current=i;const s=i.addFolder("Base Actions"),c=i.addFolder("Additive Action Weights"),d=i.addFolder("General Speed");return["None",...Object.keys(t)].forEach((n=>{t[n];l.current[n]=()=>{e(n)};const r=s.add(l.current,n);u.current.push(r)})),Object.entries(o).forEach((([e,t])=>{l.current[e]=t/100,c.add(l.current,e,-1,1,.01).listen().onChange((t=>{r({[e]:t})}))})),d.add(l.current,"modify time scale",0,1.5,.01).onChange((e=>{n(e)})),s.open(),c.open(),d.open(),()=>{i.destroy()}}),[e,r,i,n,t,o,s]),null};c=o("85Hg2"),c=o("85Hg2");function KB(e,t){const n=c.useRef(),[r]=c.useState((()=>t?t instanceof rS?{current:t}:t:n)),[i]=c.useState((()=>new NI(void 0))),o=c.useRef({}),[s]=c.useState((()=>{const t={};return e.forEach((e=>Object.defineProperty(t,e.name,{enumerable:!0,get(){if(r.current)return o.current[e.name]||(o.current[e.name]=i.clipAction(e,r.current))}}))),{ref:r,clips:e,actions:t,names:e.map((e=>e.name)),mixer:i}}));return eB(((e,t)=>i.update(t))),c.useEffect((()=>{const e=r.current;return()=>{o.current={},Object.values(s.actions).forEach((t=>{e&&i.uncacheAction(t,e)}))}}),[e]),s}const JB=new WeakMap;class YB extends fT{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,r){const i=new vT(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,(e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)}),n,r)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const e in t.attributeTypes){const n=t.attributeTypes[e];void 0!==n.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=n.name)}const n=JSON.stringify(t);if(JB.has(e)){const t=JB.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const i=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(i,o).then((n=>(r=n,new Promise(((n,o)=>{r._callbacks[i]={resolve:n,reject:o},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return s.catch((()=>!0)).then((()=>{r&&i&&this._releaseTask(r,i)})),JB.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new zS;e.index&&t.setIndex(new SS(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],i=r.name,o=r.array,s=r.itemSize;t.setAttribute(i,new SS(o,s))}return t}_loadLibrary(e,t){const n=new vT(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise(((t,r)=>{n.load(e,t,void 0,r)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=XB.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case"decode":e._callbacks[n.id].resolve(n);break;case"error":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function XB(){let e,t;function n(e,t,n,r,i,o){const s=o.num_components(),a=n.num_points()*s,l=a*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,o,c,l,u);const d=new i(e.HEAPF32.buffer,u,a).slice();return e._free(u),{name:r,array:d,itemSize:s}}onmessage=function(r){const i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const r=i.buffer,o=i.taskConfig;t.then((e=>{const t=e.draco,s=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const o=i.attributeIDs,s=i.attributeTypes;let a,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)a=new e.Mesh,l=t.DecodeBufferToMesh(r,a);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");a=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,a)}if(!l.ok()||0===a.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const u={index:null,attributes:[]};for(const r in o){const l=self[s[r]];let c,d;if(i.useUniqueIDs)d=o[r],c=t.GetAttributeByUniqueId(a,d);else{if(d=t.GetAttributeId(a,e[o[r]]),-1===d)continue;c=t.GetAttribute(a,d)}u.attributes.push(n(e,t,a,r,l,c))}c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){const r=n.num_faces(),i=3*r,o=4*i,s=e._malloc(o);t.GetTrianglesUInt32Array(n,o,s);const a=new Uint32Array(e.HEAPF32.buffer,s,i).slice();return e._free(s),{array:a,itemSize:1}}(e,t,a));return e.destroy(a),u}(t,s,a,o),r=e.attributes.map((e=>e.array.buffer));e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(e){console.error(e),self.postMessage({type:"error",id:i.id,error:e.message})}finally{t.destroy(a),t.destroy(s)}}))}}}let QB;const ZB=()=>{if(QB)return QB;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let n,r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(r="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const i=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t<e.length;++t){const r=e.charCodeAt(t);n[t]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i<e.length;++i)n[r++]=n[i]<60?t[n[i]]:64*(n[i]-60)+n[++i];return n.buffer.slice(0,r)}(r),{}).then((e=>{n=e.instance,n.exports.__wasm_call_ctors()}));function o(e,t,r,i,o,s){const a=n.exports.sbrk,l=r+3&-4,c=a(l*i),u=a(o.length),d=new Uint8Array(n.exports.memory.buffer);d.set(o,u);const h=e(c,r,i,u,o.length);if(0===h&&s&&s(c,l,i),t.set(d.subarray(c,c+r*i)),a(c-a(0)),0!==h)throw new Error(`Malformed buffer data: ${h}`)}const s={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},a={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return QB={ready:i,supported:!0,decodeVertexBuffer(e,t,r,i,a){o(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[s[a]])},decodeIndexBuffer(e,t,r,i){o(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){o(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,l,c){o(n.exports[a[l]],e,t,r,i,n.exports[s[c]])}},QB};class $B extends fT{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new oz(e)})),this.register((function(e){return new hz(e)})),this.register((function(e){return new pz(e)})),this.register((function(e){return new az(e)})),this.register((function(e){return new lz(e)})),this.register((function(e){return new cz(e)})),this.register((function(e){return new uz(e)})),this.register((function(e){return new iz(e)})),this.register((function(e){return new dz(e)})),this.register((function(e){return new sz(e)})),this.register((function(e){return new nz(e)})),this.register((function(e){return new fz(e)}))}load(e,t,n,r){const i=this;let o;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:VT.extractUrlBase(e),this.manager.itemStart(e);const s=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},a=new vT(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{i.parse(n,o,(function(n){t(n),i.manager.itemEnd(e)}),s)}catch(e){s(e)}}),n,s)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){let i;const o={},s={};if("string"==typeof e)i=e;else{if(VT.decodeText(new Uint8Array(e,0,4))===mz){try{o[tz.KHR_BINARY_GLTF]=new yz(e)}catch(e){return void(r&&r(e))}i=o[tz.KHR_BINARY_GLTF].content}else i=VT.decodeText(new Uint8Array(e))}const a=JSON.parse(i);if(void 0===a.asset||a.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const l=new Xz(a,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](l);s[t.name]=t,o[t.name]=!0}if(a.extensionsUsed)for(let e=0;e<a.extensionsUsed.length;++e){const t=a.extensionsUsed[e],n=a.extensionsRequired||[];switch(t){case tz.KHR_MATERIALS_UNLIT:o[t]=new rz;break;case tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:o[t]=new _z;break;case tz.KHR_DRACO_MESH_COMPRESSION:o[t]=new bz(a,this.dracoLoader);break;case tz.KHR_TEXTURE_TRANSFORM:o[t]=new Sz;break;case tz.KHR_MESH_QUANTIZATION:o[t]=new wz;break;default:n.indexOf(t)>=0&&void 0===s[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}l.setExtensions(o),l.setPlugins(s),l.parse(n,r)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function ez(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const tz={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression"};class nz{constructor(e){this.parser=e,this.name=tz.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let r=t.cache.get(n);if(r)return r;const i=t.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let s;const a=new Uy(16777215);void 0!==o.color&&a.fromArray(o.color);const l=void 0!==o.range?o.range:0;switch(o.type){case"directional":s=new zT(a),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new DT(a),s.distance=l;break;case"spot":s=new PT(a),s.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,s.angle=o.spot.outerConeAngle,s.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return s.position.set(0,0,0),s.decay=2,void 0!==o.intensity&&(s.intensity=o.intensity),s.name=t.createUniqueName(o.name||"light_"+e),r=Promise.resolve(s),t.cache.add(n,r),r}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))}}class rz{constructor(){this.name=tz.KHR_MATERIALS_UNLIT}getMaterialType(){return vS}extendParams(e,t,n){const r=[];e.color=new Uy(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture,Tv))}return Promise.all(r)}}class iz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name].emissiveStrength;return void 0!==r&&(t.emissiveIntensity=r),Promise.resolve()}}class oz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){const e=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Cy(e,e)}return Promise.all(i)}}class sz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];return void 0!==o.iridescenceFactor&&(t.iridescence=o.iridescenceFactor),void 0!==o.iridescenceTexture&&i.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),void 0!==o.iridescenceIor&&(t.iridescenceIOR=o.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==o.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),void 0!==o.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),void 0!==o.iridescenceThicknessTexture&&i.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(i)}}class az{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[];t.sheenColor=new Uy(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=r.extensions[this.name];return void 0!==o.sheenColorFactor&&t.sheenColor.fromArray(o.sheenColorFactor),void 0!==o.sheenRoughnessFactor&&(t.sheenRoughness=o.sheenRoughnessFactor),void 0!==o.sheenColorTexture&&i.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,Tv)),void 0!==o.sheenRoughnessTexture&&i.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(i)}}class lz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(i)}}class cz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.thickness=void 0!==o.thicknessFactor?o.thicknessFactor:0,void 0!==o.thicknessTexture&&i.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const s=o.attenuationColor||[1,1,1];return t.attenuationColor=new Uy(s[0],s[1],s[2]),Promise.all(i)}}class uz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class dz{constructor(e){this.parser=e,this.name=tz.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?BE:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],o=r.extensions[this.name];t.specularIntensity=void 0!==o.specularFactor?o.specularFactor:1,void 0!==o.specularTexture&&i.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const s=o.specularColorFactor||[1,1,1];return t.specularColor=new Uy(s[0],s[1],s[2]),void 0!==o.specularColorTexture&&i.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,Tv)),Promise.all(i)}}class hz{constructor(e){this.parser=e,this.name=tz.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const i=r.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,o)}}class pz{constructor(e){this.parser=e,this.name=tz.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const o=i.extensions[t],s=r.images[o.source];let a=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(a=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class fz{constructor(e){this.name=tz.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,o=e.count,s=e.byteStride,a=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(o,s,a,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(o*s);return i.decodeGltfBuffer(new Uint8Array(t),o,s,a,e.mode,e.filter),t}))}))}return null}}const mz="glTF",gz=1313821514,vz=5130562;class yz{constructor(e){this.name=tz.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:VT.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==mz)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-12,r=new DataView(e,12);let i=0;for(;i<n;){const t=r.getUint32(i,!0);i+=4;const n=r.getUint32(i,!0);if(i+=4,n===gz){const n=new Uint8Array(e,12+i,t);this.content=VT.decodeText(n)}else if(n===vz){const n=12+i;this.body=e.slice(n,n+t)}i+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class bz{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=tz.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,s={},a={},l={};for(const e in o){const t=zz[e]||e.toLowerCase();s[t]=o[e]}for(const t in e.attributes){const r=zz[t]||t.toLowerCase();if(void 0!==o[t]){const i=n.accessors[e.attributes[t]],o=kz[i.componentType];l[r]=o.name,a[r]=!0===i.normalized}}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],r=a[t];void 0!==r&&(n.normalized=r)}t(e)}),s,l)}))}))}}class Sz{constructor(){this.name=tz.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),void 0===t.offset&&void 0===t.rotation&&void 0===t.scale||(e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class xz extends DE{constructor(e){super(),this.isGLTFSpecularGlossinessMaterial=!0;const t=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),n=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),r=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),i=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.roughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.roughness += geometryRoughness;","material.roughness = min( material.roughness, 1.0 );","material.specularColor = specularFactor;"].join("\n"),s={specular:{value:(new Uy).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(e){for(const t in s)e.uniforms[t]=s[t];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",n).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",i).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(e){s.specular.value=e}},specularMap:{get:function(){return s.specularMap.value},set:function(e){s.specularMap.value=e,e?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return s.glossiness.value},set:function(e){s.glossiness.value=e}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(e){s.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}copy(e){return super.copy(e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this}}class _z{constructor(){this.name=tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,this.specularGlossinessParams=["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"]}getMaterialType(){return xz}extendParams(e,t,n){const r=t.extensions[this.name];e.color=new Uy(1,1,1),e.opacity=1;const i=[];if(Array.isArray(r.diffuseFactor)){const t=r.diffuseFactor;e.color.fromArray(t),e.opacity=t[3]}if(void 0!==r.diffuseTexture&&i.push(n.assignTexture(e,"map",r.diffuseTexture,Tv)),e.emissive=new Uy(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new Uy(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){const t=r.specularGlossinessTexture;i.push(n.assignTexture(e,"glossinessMap",t)),i.push(n.assignTexture(e,"specularMap",t,Tv))}return Promise.all(i)}createMaterial(e){const t=new xz(e);return t.fog=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=void 0===e.emissiveIntensity?1:e.emissiveIntensity,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,t.normalMapType=Rv,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}class wz{constructor(){this.name=tz.KHR_MESH_QUANTIZATION}}class Cz extends QE{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let e=0;e!==r;e++)t[e]=n[i+e];return t}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=2*s,l=3*s,c=r-t,u=(n-t)/c,d=u*u,h=d*u,p=e*l,f=p-l,m=-2*h+3*d,g=h-d,v=1-m,y=g-d+u;for(let e=0;e!==s;e++){const t=o[f+e+s],n=o[f+e+a]*c,r=o[p+e+s],l=o[p+e]*c;i[e]=v*t+y*n+m*r+g*l}return i}}const Az=new eb;class Ez extends Cz{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return Az.fromArray(i).normalize().toArray(i),i}}const Tz=0,Iz=1,Mz=2,Rz=3,Pz=4,Nz=5,Oz=6,kz={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Lz={9728:ag,9729:hg,9984:lg,9985:pg,9986:ug,9987:mg},Dz={33071:og,33648:sg,10497:ig},Bz={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},zz={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Fz={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Uz={CUBICSPLINE:void 0,LINEAR:gv,STEP:mv},jz="OPAQUE",Hz="MASK",Gz="BLEND";function Vz(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function Wz(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function qz(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Kz(e){const t=e.extensions&&e.extensions[tz.KHR_DRACO_MESH_COMPRESSION];let n;return n=t?"draco:"+t.bufferView+":"+t.indices+":"+Jz(t.attributes):e.indices+":"+Jz(e.attributes)+":"+e.mode,n}function Jz(e){let t="";const n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function Yz(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}class Xz{constructor(e={},t={}){var n,r;this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new ez,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};const i="undefined"!=typeof navigator&&!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),o="undefined"!=typeof navigator&&(null===(n=navigator.userAgent)||void 0===n?void 0:n.indexOf("Firefox"))>-1,s="undefined"!=typeof navigator&&o?null===(r=navigator.userAgent)||void 0===r?void 0:r.match(/Firefox\/([0-9]+)\./)[1]:-1;"undefined"==typeof createImageBitmap||i||o&&s<98?this.textureLoader=new wT(this.options.manager):this.textureLoader=new QT(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new vT(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};Vz(i,o,r),Wz(o,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(o)}))).then((function(){e(o)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n].joints;for(let t=0,n=r.length;t<n;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){const r=e[t];void 0!==r.mesh&&(this._addNodeRef(this.meshCache,r.mesh),void 0!==r.skin&&(n[r.mesh].isSkinnedMesh=!0)),void 0!==r.camera&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),i=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[tz.KHR_BINARY_GLTF].body);const r=this.options;return new Promise((function(e,i){n.load(VT.resolveURL(t.uri,r.path),e,void 0,(function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))}loadAccessor(e){const t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse)return Promise.resolve(null);const i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){const i=e[0],o=Bz[r.type],s=kz[r.componentType],a=s.BYTES_PER_ELEMENT,l=a*o,c=r.byteOffset||0,u=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,d=!0===r.normalized;let h,p;if(u&&u!==l){const e=Math.floor(c/u),n="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+e+":"+r.count;let l=t.cache.get(n);l||(h=new s(i,e*u,r.count*u/a),l=new iC(h,u/a),t.cache.add(n,l)),p=new sC(l,o,c%u/a,d)}else h=null===i?new s(r.count*o):new s(i,c,r.count*o),p=new SS(h,o,d);if(void 0!==r.sparse){const t=Bz.SCALAR,n=kz[r.sparse.indices.componentType],a=r.sparse.indices.byteOffset||0,l=r.sparse.values.byteOffset||0,c=new n(e[1],a,r.sparse.count*t),u=new s(e[2],l,r.sparse.count*o);null!==i&&(p=new SS(p.array.slice(),p.itemSize,p.normalized));for(let e=0,t=c.length;e<t;e++){const t=c[e];if(p.setX(t,u[e*o]),o>=2&&p.setY(t,u[e*o+1]),o>=3&&p.setZ(t,u[e*o+2]),o>=4&&p.setW(t,u[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let o=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(o=e)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){const r=this,i=this.json,o=i.textures[e],s=i.images[t],a=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[a])return this.textureCache[a];const l=this.loadImageSource(t,n).then((function(t){t.flipY=!1,o.name&&(t.name=o.name);const n=(i.samplers||{})[o.sampler]||{};return t.magFilter=Lz[n.magFilter]||hg,t.minFilter=Lz[n.minFilter]||mg,t.wrapS=Dz[n.wrapS]||ig,t.wrapT=Dz[n.wrapT]||ig,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[a]=l,l}loadImageSource(e,t){const n=this.json,r=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const i=n.images[e],o=self.URL||self.webkitURL;let s=i.uri||"",a=!1;if(void 0!==i.bufferView)s=this.getDependency("bufferView",i.bufferView).then((function(e){a=!0;const t=new Blob([e],{type:i.mimeType});return s=o.createObjectURL(t),s}));else if(void 0===i.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const l=Promise.resolve(s).then((function(e){return new Promise((function(n,i){let o=n;!0===t.isImageBitmapLoader&&(o=function(e){const t=new qy(e);t.needsUpdate=!0,n(t)}),t.load(VT.resolveURL(e,r.path),o,void 0,i)}))})).then((function(e){var t;return!0===a&&o.revokeObjectURL(s),e.userData.mimeType=i.mimeType||((t=i.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),e}));return this.sourceCache[e]=l,l}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(o){if(void 0===n.texCoord||0==n.texCoord||"aoMap"===t&&1==n.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+t+" not yet supported."),i.extensions[tz.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[tz.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(o);o=i.extensions[tz.KHR_TEXTURE_TRANSFORM].extendTexture(o,e),i.associations.set(o,t)}}return void 0!==r&&(o.encoding=r),e[t]=o,o}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new eA,gS.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new GC,gS.prototype.copy.call(t,n),t.color.copy(n.color),this.cache.add(e,t)),n=t}if(r||i||o){let e="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(e+="specular-glossiness:"),r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),o&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=n}getMaterialType(){return DE}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let o;const s={},a=i.extensions||{},l=[];if(a[tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){const e=r[tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];o=e.getMaterialType(),l.push(e.extendParams(s,i,t))}else if(a[tz.KHR_MATERIALS_UNLIT]){const e=r[tz.KHR_MATERIALS_UNLIT];o=e.getMaterialType(),l.push(e.extendParams(s,i,t))}else{const n=i.pbrMetallicRoughness||{};if(s.color=new Uy(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;s.color.fromArray(e),s.opacity=e[3]}void 0!==n.baseColorTexture&&l.push(t.assignTexture(s,"map",n.baseColorTexture,Tv)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(l.push(t.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),l.push(t.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),o=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),l.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===i.doubleSided&&(s.side=hm);const c=i.alphaMode||jz;if(c===Gz?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===Hz&&(s.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&o!==vS&&(l.push(t.assignTexture(s,"normalMap",i.normalTexture)),s.normalScale=new Cy(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;s.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&o!==vS&&(l.push(t.assignTexture(s,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(s.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&o!==vS&&(s.emissive=(new Uy).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&o!==vS&&l.push(t.assignTexture(s,"emissiveMap",i.emissiveTexture,Tv)),Promise.all(l).then((function(){let n;return n=o===xz?r[tz.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):new o(s),i.name&&(n.name=i.name),Wz(n,i),t.associations.set(n,{materials:e}),i.extensions&&Vz(r,n,i),n}))}createUniqueName(e){const t=II.sanitizeNodeName(e||"");let n=t;for(let e=1;this.nodeNamesUsed[n];++e)n=t+"_"+e;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[tz.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return Zz(n,e,t)}))}const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n],a=Kz(s),l=r[a];if(l)o.push(l.promise);else{let e;e=s.extensions&&s.extensions[tz.KHR_DRACO_MESH_COMPRESSION]?i(s):Zz(new zS,s,t),r[a]={primitive:s,promise:e},o.push(e)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,r=this.extensions,i=n.meshes[e],o=i.primitives,s=[];for(let e=0,t=o.length;e<t;e++){const t=void 0===o[e].material?(void 0===(a=this.cache).DefaultMaterial&&(a.DefaultMaterial=new DE({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:um})),a.DefaultMaterial):this.getDependency("material",o[e].material);s.push(t)}var a;return s.push(t.loadGeometries(o)),Promise.all(s).then((function(n){const s=n.slice(0,n.length-1),a=n[n.length-1],l=[];for(let n=0,c=a.length;n<c;n++){const c=a[n],u=o[n];let d;const h=s[n];if(u.mode===Pz||u.mode===Nz||u.mode===Oz||void 0===u.mode)d=!0===i.isSkinnedMesh?new PC(c,h):new nx(c,h),!0!==d.isSkinnedMesh||d.geometry.attributes.skinWeight.normalized||d.normalizeSkinWeights(),u.mode===Nz?d.geometry=$z(d.geometry,Cv):u.mode===Oz&&(d.geometry=$z(d.geometry,Av));else if(u.mode===Iz)d=new ZC(c,h);else if(u.mode===Rz)d=new YC(c,h);else if(u.mode===Mz)d=new $C(c,h);else{if(u.mode!==Tz)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+u.mode);d=new oA(c,h)}Object.keys(d.geometry.morphAttributes).length>0&&qz(d,i),d.name=t.createUniqueName(i.name||"mesh_"+e),Wz(d,i),u.extensions&&Vz(r,d,u),t.assignFinalMaterial(d),l.push(d)}for(let n=0,r=l.length;n<r;n++)t.associations.set(l[n],{meshes:e,primitives:n});if(1===l.length)return l[0];const c=new qw;t.associations.set(c,{meshes:e});for(let e=0,t=l.length;e<t;e++)c.add(l[e]);return c}))}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new ux(wy.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new kx(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Wz(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],n={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return n.inverseBindMatrices=e,n}))}loadAnimation(e){const t=this.json.animations[e],n=[],r=[],i=[],o=[],s=[];for(let e=0,a=t.channels.length;e<a;e++){const a=t.channels[e],l=t.samplers[a.sampler],c=a.target,u=c.node,d=void 0!==t.parameters?t.parameters[l.input]:l.input,h=void 0!==t.parameters?t.parameters[l.output]:l.output;n.push(this.getDependency("node",u)),r.push(this.getDependency("accessor",d)),i.push(this.getDependency("accessor",h)),o.push(l),s.push(c)}return Promise.all([Promise.all(n),Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(s)]).then((function(n){const r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=[];for(let e=0,t=r.length;e<t;e++){const t=r[e],n=i[e],c=o[e],u=s[e],d=a[e];if(void 0===t)continue;let h;switch(t.updateMatrix(),Fz[d.path]){case Fz.weights:h=iT;break;case Fz.rotation:h=sT;break;default:h=lT}const p=t.name?t.name:t.uuid,f=void 0!==u.interpolation?Uz[u.interpolation]:gv,m=[];Fz[d.path]===Fz.weights?t.traverse((function(e){e.morphTargetInfluences&&m.push(e.name?e.name:e.uuid)})):m.push(p);let g=c.array;if(c.normalized){const e=Yz(g.constructor),t=new Float32Array(g.length);for(let n=0,r=g.length;n<r;n++)t[n]=g[n]*e;g=t}for(let e=0,t=m.length;e<t;e++){const t=new h(m[e]+"."+Fz[d.path],n.array,g,f);"CUBICSPLINE"===u.interpolation&&(t.createInterpolant=function(e){return new(this instanceof sT?Ez:Cz)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(t)}}const c=t.name?t.name:"animation_"+e;return new cT(c,void 0,l)}))}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return void 0===r.mesh?null:n.getDependency("mesh",r.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]})),t}))}loadNode(e){const t=this.json,n=this.extensions,r=this,i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"";return function(){const t=[],n=r._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return n&&t.push(n),void 0!==i.camera&&t.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){let s;if(s=!0===i.isBone?new NC:t.length>1?new qw:1===t.length?t[0]:new rS,s!==t[0])for(let e=0,n=t.length;e<n;e++)s.add(t[e]);if(i.name&&(s.userData.name=i.name,s.name=o),Wz(s,i),i.extensions&&Vz(n,s,i),void 0!==i.matrix){const e=new Nb;e.fromArray(i.matrix),s.applyMatrix4(e)}else void 0!==i.translation&&s.position.fromArray(i.translation),void 0!==i.rotation&&s.quaternion.fromArray(i.rotation),void 0!==i.scale&&s.scale.fromArray(i.scale);return r.associations.has(s)||r.associations.set(s,{}),r.associations.get(s).nodes=e,s}))}loadScene(e){const t=this.json,n=this.extensions,r=this.json.scenes[e],i=this,o=new qw;r.name&&(o.name=i.createUniqueName(r.name)),Wz(o,r),r.extensions&&Vz(n,o,r);const s=r.nodes||[],a=[];for(let e=0,n=s.length;e<n;e++)a.push(Qz(s[e],o,t,i));return Promise.all(a).then((function(){return i.associations=(e=>{const t=new Map;for(const[e,n]of i.associations)(e instanceof gS||e instanceof qy)&&t.set(e,n);return e.traverse((e=>{const n=i.associations.get(e);null!=n&&t.set(e,n)})),t})(o),o}))}}function Qz(e,t,n,r){const i=n.nodes[e];return r.getDependency("node",e).then((function(e){if(void 0===i.skin)return e;let t;return r.getDependency("skin",i.skin).then((function(e){t=e;const n=[];for(let e=0,i=t.joints.length;e<i;e++)n.push(r.getDependency("node",t.joints[e]));return Promise.all(n)})).then((function(n){return e.traverse((function(e){if(!e.isMesh)return;const r=[],i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e];if(o){r.push(o);const n=new Nb;void 0!==t.inverseBindMatrices&&n.fromArray(t.inverseBindMatrices.array,16*e),i.push(n)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}e.bind(new DC(r,i),e.matrixWorld)})),e}))})).then((function(e){t.add(e);const o=[];if(i.children){const t=i.children;for(let i=0,s=t.length;i<s;i++){const s=t[i];o.push(Qz(s,e,n,r))}}return Promise.all(o)}))}function Zz(e,t,n){const r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in r){const n=zz[t]||t.toLowerCase();n in e.attributes||i.push(o(r[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(r)}return Wz(e,t),function(e,t,n){const r=t.attributes,i=new ib;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new tb(t[0],t[1],t[2]),new tb(o[0],o[1],o[2])),e.normalized){const t=Yz(kz[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const o=t.targets;if(void 0!==o){const e=new tb,t=new tb;for(let r=0,i=o.length;r<i;r++){const i=o[r];if(void 0!==i.POSITION){const r=n.json.accessors[i.POSITION],o=r.min,s=r.max;if(void 0!==o&&void 0!==s){if(t.setX(Math.max(Math.abs(o[0]),Math.abs(s[0]))),t.setY(Math.max(Math.abs(o[1]),Math.abs(s[1]))),t.setZ(Math.max(Math.abs(o[2]),Math.abs(s[2]))),r.normalized){const e=Yz(kz[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(e)}e.boundingBox=i;const s=new wb;i.getCenter(s.center),s.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=s}(e,t,n),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,n){let r=!1,i=!1,o=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(void 0!==n.POSITION&&(r=!0),void 0!==n.NORMAL&&(i=!0),void 0!==n.COLOR_0&&(o=!0),r&&i&&o)break}if(!r&&!i&&!o)return Promise.resolve(e);const s=[],a=[],l=[];for(let c=0,u=t.length;c<u;c++){const u=t[c];if(r){const t=void 0!==u.POSITION?n.getDependency("accessor",u.POSITION):e.attributes.position;s.push(t)}if(i){const t=void 0!==u.NORMAL?n.getDependency("accessor",u.NORMAL):e.attributes.normal;a.push(t)}if(o){const t=void 0!==u.COLOR_0?n.getDependency("accessor",u.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(s),Promise.all(a),Promise.all(l)]).then((function(t){const n=t[0],s=t[1],a=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=s),o&&(e.morphAttributes.color=a),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}function $z(e,t){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const r=n.count-2,i=[];if(t===Av)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=e.clone();return o.setIndex(i),o}let eF=null;function tF(e,t,n){return r=>{n&&n(r),e&&(eF||(eF=new YB),eF.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.4.3/"),r.setDRACOLoader(eF)),t&&r.setMeshoptDecoder(ZB())}}function nF(e,t=!0,n=!0,r){return rB($B,e,tF(t,n,r))}var rF,iF;nF.preload=(e,t=!0,n=!0,r)=>rB.preload($B,e,tF(t,n,r)),nF.clear=e=>rB.clear($B,e),(iF=rF||(rF={})).LOADING="LOADING",iF.EMOTION="EMOTION",iF.IDLE="IDLE";const oF=new tb(0,-1,0),sF=new Hb(.175,0,0),aF=new tb(0,-1.45,0),lF={MALE:"https://assets.memori.ai/api/v2/asset/2c5e88a4-cf62-408b-9ef0-518b099dfcb2.glb",FEMALE:"https://assets.memori.ai/api/v2/asset/2adc934b-24b2-45bd-94ad-ffec58d3cb32.glb"},cF={minInterval:1e3,maxInterval:5e3,blinkDuration:150},uF={fadeInDuration:.8,fadeOutDuration:.8,idleCount:5,timeScale:1};class dF{constructor(e,t,n=uF){this.currentState=rF.LOADING,this.currentAction=null,this.lastIdleIndex=-1,this.isTransitioning=!1,this.currentIdleLoopCount=0,this.MAX_IDLE_LOOPS=5,this.lastAnimationTime=0,this.isChatAlreadyStarted=!1,this.mixer=e,this.actions=t,this.config=n}checkForLoop(){if(!this.currentAction||this.currentState!==rF.IDLE)return;this.currentAction.getClip();const e=this.currentAction.time;e<this.lastAnimationTime&&(this.currentIdleLoopCount++,this.currentIdleLoopCount>=this.MAX_IDLE_LOOPS&&this.forceIdleChange()),this.lastAnimationTime=e}forceIdleChange(){this.currentIdleLoopCount=0,this.lastAnimationTime=0,this.transitionTo(rF.IDLE)}getNextIdleAnimation(){let e;do{e=Math.floor(Math.random()*this.config.idleCount)+1}while(e===this.lastIdleIndex);this.isChatAlreadyStarted&&3===e&&(e=4!==this.lastIdleIndex?4:2),this.lastIdleIndex=e;const t=this.actions[`Idle${e}`];if(!t)throw new Error(`Idle animation ${e} not found`);return t}transitionTo(e,t){if(!this.isTransitioning){this.isTransitioning=!0;try{let n=null;switch(e){case rF.LOADING:n=this.actions[t||"Loading1"],this.currentIdleLoopCount=0,this.lastAnimationTime=0;break;case rF.EMOTION:n=this.actions[t||"Timore1"],this.currentIdleLoopCount=0,this.lastAnimationTime=0;break;case rF.IDLE:n=this.getNextIdleAnimation(),this.currentState!==rF.IDLE&&(this.currentIdleLoopCount=0,this.lastAnimationTime=0)}if(!n)throw new Error(`No animation found for state: ${e}`);this.currentAction&&this.currentAction.fadeOut(this.config.fadeOutDuration),n.reset().fadeIn(this.config.fadeInDuration).play(),n.timeScale=this.config.timeScale,e!==rF.IDLE?(n.setLoop(hv,1),n.clampWhenFinished=!0):n.setLoop(1/0,1/0),this.currentAction=n,this.currentState=e}catch(t){console.error("[AnimationController] Error during animation transition:",t),e!==rF.IDLE&&this.transitionTo(rF.IDLE)}finally{this.isTransitioning=!1}}}update(e){this.currentAction&&(this.checkForLoop(),this.currentState!==rF.IDLE&&this.currentAction.time>=.9*this.currentAction.getClip().duration&&this.transitionTo(rF.IDLE),this.mixer.update(e))}getCurrentState(){return this.currentState}getLoopCount(){return this.currentIdleLoopCount}setTimeScale(e){this.config.timeScale=e,this.currentAction&&(this.currentAction.timeScale=e)}updateIsChatAlreadyStarted(e){this.isChatAlreadyStarted=e}getDebugInfo(){var e;return{currentState:this.currentState,currentIdleIndex:this.lastIdleIndex,loopCount:this.currentIdleLoopCount,currentTime:(null===(e=this.currentAction)||void 0===e?void 0:e.time)||0,lastTime:this.lastAnimationTime,isTransitioning:this.isTransitioning,isChatAlreadyStarted:this.isChatAlreadyStarted}}}class hF{constructor(e){this.currentEmotionValues={},this.previousEmotionKeys=new Set,this.headMesh=e}updateMorphTargets(e,t,n,r,i){if(!this.headMesh.morphTargetDictionary||!this.headMesh.morphTargetInfluences)return;const o=this.calculateBlinkValue(e,i,r),s=new Set(Object.keys(t));Object.entries(this.headMesh.morphTargetDictionary).forEach((([e,i])=>{if("number"!=typeof i)return;let a=0;if(s.has(e)){const n=t[e],r=this.currentEmotionValues[e]||0,i=wy.lerp(r,2.5*n,.3);this.currentEmotionValues[e]=i,a+=i}n&&e===n.name&&(a+=n.weight),"eyesClosed"===e&&r&&(a+=o),a=wy.clamp(a,0,1),this.headMesh.morphTargetInfluences&&(this.headMesh.morphTargetInfluences[i]=wy.lerp(this.headMesh.morphTargetInfluences[i]||0,a,.5))})),this.previousEmotionKeys=s}calculateBlinkValue(e,t,n){if(!n)return 0;let r=0;if(e>=t.nextBlinkTime&&!t.isBlinking&&(t.isBlinking=!0,t.blinkStartTime=e,t.lastBlinkTime=e,t.nextBlinkTime=e+Math.random()*(cF.maxInterval-cF.minInterval)+cF.minInterval),t.isBlinking){const n=(e-t.blinkStartTime)/cF.blinkDuration;n<=.5?r=2*n:n<=1?r=2-2*n:(t.isBlinking=!1,r=0)}return r}}function pF({url:e,sex:t,currentBaseAction:n,timeScale:r,isZoomed:i,eyeBlink:o,updateCurrentViseme:a,setMorphTargetDictionary:l,setMorphTargetInfluences:u,emotionMorphTargets:d}){const{scene:h}=nF(e),{animations:p}=nF(lF[t]),{actions:f}=KB(p,h),m=(0,c.useRef)(),g=(0,c.useRef)(),v=(0,c.useRef)({isBlinking:!1,lastBlinkTime:0,nextBlinkTime:0,blinkStartTime:0}),y=(0,c.useMemo)((()=>{let e;return h.traverse((t=>{t instanceof PC&&("GBNL__Head"===t.name||"Wolf3D_Avatar"===t.name)&&(e=t)})),e}),[h]);return(0,c.useEffect)((()=>{if(!f||!y)return;const e=new NI(h);if(m.current=new dF(e,f,{...uF}),g.current=new hF(y),y.morphTargetDictionary&&y.morphTargetInfluences){l(y.morphTargetDictionary);const e=Object.keys(y.morphTargetDictionary).reduce(((e,t)=>({...e,[t]:0})),{});u(e)}}),[f,y,h,l,u,r]),(0,c.useEffect)((()=>{m.current&&(n.action.startsWith("Loading")?m.current.transitionTo(rF.LOADING,n.action):n.action.startsWith("Idle")?m.current.transitionTo(rF.IDLE):(m.current.updateIsChatAlreadyStarted(!0),m.current.transitionTo(rF.EMOTION,n.action)))}),[n]),(0,c.useEffect)((()=>{var e;null===(e=m.current)||void 0===e||e.setTimeScale(r)}),[r]),eB((e=>{var t;const n=1e3*e.clock.elapsedTime;if(null===(t=m.current)||void 0===t||t.update(e.clock.getDelta()),g.current){const e=a(n/1e3);g.current.updateMorphTargets(n,d,e,o||!1,v.current)}})),(0,s.jsx)("group",{position:i?aF:oF,rotation:sF,children:(0,s.jsx)("primitive",{object:h})})}c=o("85Hg2");const fF=new tb(0,-.6,0),mF=1e3,gF=5e3,vF=150;function yF({url:e,setMorphTargetInfluences:t,setMorphTargetDictionary:n,eyeBlink:r,onLoaded:i,morphTargetSmoothing:o=.5,updateCurrentViseme:a}){const{scene:l}=nF(e),{nodes:u,materials:d}=(h=l,c.useMemo((()=>tB(h)),[h]));var h;const p=(0,c.useRef)(new NI(l)),f=((0,c.useRef)(null),(0,c.useRef)(0)),m=(0,c.useRef)(0),g=(0,c.useRef)(!1),v=(0,c.useRef)(0),y=(0,c.useRef)();return(0,c.useEffect)((()=>(pR(d),l.traverse((e=>{if(e instanceof PC&&("GBNL__Head"===e.name||"Wolf3D_Avatar"===e.name)&&(y.current=e,e.morphTargetDictionary&&e.morphTargetInfluences)){n(e.morphTargetDictionary);const r=Object.keys(e.morphTargetDictionary).reduce(((e,t)=>({...e,[t]:0})),{});t(r)}})),null==i||i(),()=>{Object.values(d).forEach((e=>e.dispose())),Object.values(u).filter(fR).forEach((e=>e.geometry.dispose()))})),[d,u,e,i,l]),eB((e=>{if(y.current&&y.current.morphTargetDictionary&&y.current.morphTargetInfluences){const t=1e3*e.clock.getElapsedTime();let n=0;if(r&&(t>=m.current&&!g.current&&(g.current=!0,v.current=t,f.current=t,m.current=t+Math.random()*(gF-mF)+mF),g.current)){const e=(t-v.current)/vF;e<=.5?n=2*e:e<=1?n=2-2*e:(g.current=!1,n=0)}const i=a(t/1e3);Object.entries(y.current.morphTargetDictionary).forEach((([e,t])=>{if("number"==typeof t){let s=0;i&&e===i.name&&(s+=1.3*i.weight),"eyesClosed"===e&&r&&(s+=n),s=wy.clamp(s,0,1),y.current&&y.current.morphTargetInfluences&&(y.current.morphTargetInfluences[t]=wy.lerp(y.current.morphTargetInfluences[t],s,o))}})),p.current.update(.01)}})),(0,s.jsx)("group",{position:fF,children:(0,s.jsx)("primitive",{object:l})})}const bF={Gioia1:{weight:0},Gioia2:{weight:0},Gioia3:{weight:0},Idle1:{weight:1},Idle2:{weight:0},Idle3:{weight:0},Idle4:{weight:0},Idle5:{weight:0},Rabbia1:{weight:0},Rabbia2:{weight:0},Rabbia3:{weight:0},Sorpresa1:{weight:0},Sorpresa2:{weight:0},Sorpresa3:{weight:0},Timore1:{weight:0},Timore2:{weight:0},Timore3:{weight:0},Tristezza1:{weight:0},Tristezza2:{weight:0},Tristezza3:{weight:0},Loading1:{weight:0},Loading2:{weight:0},Loading3:{weight:0}},SF=({stopProcessing:e,chatEmission:t,showControls:n,animation:r,url:i,sex:o,eyeBlink:a,headMovement:l,speaking:u,halfBody:d,loading:h,isZoomed:p,updateCurrentViseme:f,resetVisemeQueue:m})=>{const[g,v]=(0,c.useState)({action:r||"Idle1",weight:1}),[y,b]=(0,c.useState)({}),[S,x]=(0,c.useState)({}),[_,w]=(0,c.useState)({}),[C,A]=(0,c.useState)(.8),E=(0,c.useCallback)((e=>{if("Loading1"===e||"Loading2"===e||"Loading3"===e)return;const t={Gioia:{Gioria:1},Rabbia:{Rabbia:1},Sorpresa:{Sorpresa:1},Tristezza:{Tristezza:1},Timore:{Timore:1}},n=Object.keys(t).reduce(((e,t)=>(e[t]=0,e)),{}),r=Object.keys(t).find((t=>e.startsWith(t)))||"default",i="default"===r?n:t[r];w((e=>({...n,...i})))}),[]),T=(0,c.useCallback)((e=>{E(e),v({action:e,weight:1})}),[]),I=(0,c.useCallback)((e=>{b((t=>({...t,...e})))}),[]),M=(0,c.useCallback)((e=>{x(e)}),[]),R=(0,c.useCallback)((e=>{A(e)}),[]);return(0,c.useEffect)((()=>{var e,n;const r=(null==t?void 0:t.includes('<output class="memori-emotion">'))?null===(n=null===(e=null==t?void 0:t.split('<output class="memori-emotion">')[1])||void 0===e?void 0:e.split("</output>")[0])||void 0===n?void 0:n.trim():null;if(r){const e=Math.floor(3*Math.random())+1;T(`${r}${e}`)}else{const e=Math.floor(5*Math.random())+1;T(`Idle${3===e?4:e}`)}}),[t]),(0,c.useEffect)((()=>{if(h){const e=Math.floor(3*Math.random())+1;T(`Loading${e}`)}}),[h]),(0,s.jsxs)(s.Fragment,{children:[n&&(0,s.jsx)(qB,{timeScale:C,morphTargetDictionary:S,onBaseActionChange:T,onMorphTargetInfluencesChange:I,onMorphTargetDictionaryChange:M,baseActions:bF,currentBaseAction:g,modifyTimeScale:R}),d?(0,s.jsx)(yF,{url:i,headMovement:l,speaking:u,eyeBlink:a,morphTargetInfluences:y,setMorphTargetInfluences:b,setMorphTargetDictionary:x,updateCurrentViseme:f}):(0,s.jsx)(pF,{url:i,sex:o,resetVisemeQueue:m,eyeBlink:a,currentBaseAction:g,timeScale:C,morphTargetInfluences:y,isZoomed:p,updateCurrentViseme:f,stopProcessing:e,setMorphTargetDictionary:x,setMorphTargetInfluences:b,emotionMorphTargets:_})]})};let xF=0;const _F=t(hD)((e=>(pT.onStart=(t,n,r)=>{e({active:!0,item:t,loaded:n,total:r,progress:(n-xF)/(r-xF)*100})},pT.onLoad=()=>{e({active:!1})},pT.onError=t=>e((e=>({errors:[...e.errors,t]}))),pT.onProgress=(t,n,r)=>{n===r&&(xF=r),e({active:!0,item:t,loaded:n,total:r,progress:(n-xF)/(r-xF)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})));c=o("85Hg2");const wF=new tb,CF=new tb,AF=new tb;function EF(e,t,n){const r=wF.setFromMatrixPosition(e.matrixWorld);r.project(t);const i=n.width/2,o=n.height/2;return[r.x*i+i,-r.y*o+o]}const TF=e=>Math.abs(e)<1e-10?0:e;function IF(e,t,n=""){let r="matrix3d(";for(let n=0;16!==n;n++)r+=TF(t[n]*e.elements[n])+(15!==n?",":")");return n+r}const MF=(RF=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>IF(e,RF));var RF;const PF=(e,t)=>{return IF(e,[1/(n=t),1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1],"translate(-50%,-50%)");var n},NF=c.forwardRef((({children:e,eps:t=.001,style:n,className:r,prepend:i,center:o,fullscreen:s,portal:l,distanceFactor:u,sprite:d=!1,transform:h=!1,occlude:p,onOcclude:f,zIndexRange:m=[16777271,0],calculatePosition:g=EF,as:v="div",wrapperClass:y,pointerEvents:b="auto",...S},x)=>{var _;const w=$D((({gl:e})=>e)),C=$D((({camera:e})=>e)),A=$D((({scene:e})=>e)),E=$D((({size:e})=>e)),T=$D((({raycaster:e})=>e)),[I]=c.useState((()=>document.createElement(v))),M=c.useRef(null),R=c.useRef(0),P=c.useRef([0,0]),N=c.useRef(null),O=c.useRef(null),k=null!==(_=null==l?void 0:l.current)&&void 0!==_?_:w.domElement.parentNode;c.useEffect((()=>{if(M.current){if(A.updateMatrixWorld(),h)I.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const e=g(M.current,C,E);I.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return k&&(i?k.prepend(I):k.appendChild(I)),()=>{k&&k.removeChild(I),a.unmountComponentAtNode(I)}}}),[k,h]),c.useLayoutEffect((()=>{y&&(I.className=y)}),[y]);const L=c.useMemo((()=>h?{position:"absolute",top:0,left:0,width:E.width,height:E.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:o?"translate3d(-50%,-50%,0)":"none",...s&&{top:-E.height/2,left:-E.width/2,width:E.width,height:E.height},...n}),[n,o,s,E,h]),D=c.useMemo((()=>({position:"absolute",pointerEvents:b})),[b]);c.useLayoutEffect((()=>{h?a.render(c.createElement("div",{ref:N,style:L},c.createElement("div",{ref:O,style:D},c.createElement("div",{ref:x,className:r,style:n,children:e}))),I):a.render(c.createElement("div",{ref:x,style:L,className:r,children:e}),I)}));const B=c.useRef(!0);return eB((()=>{if(M.current){C.updateMatrixWorld(),M.current.updateWorldMatrix(!0,!1);const e=h?P.current:g(M.current,C,E);if(h||Math.abs(R.current-C.zoom)>t||Math.abs(P.current[0]-e[0])>t||Math.abs(P.current[1]-e[1])>t){const t=function(e,t){const n=wF.setFromMatrixPosition(e.matrixWorld),r=CF.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),o=t.getWorldDirection(AF);return i.angleTo(o)>Math.PI/2}(M.current,C);let n=!1;"boolean"==typeof p?!0===p&&(n=[A]):Array.isArray(p)&&(n=p.map((e=>e.current)));const r=B.current;if(n){const e=function(e,t,n,r){const i=wF.setFromMatrixPosition(e.matrixWorld),o=i.clone();o.project(t),n.setFromCamera(o,t);const s=n.intersectObjects(r,!0);if(s.length){const e=s[0].distance;return i.distanceTo(n.ray.origin)<e}return!0}(M.current,C,T,n);B.current=e&&!t}else B.current=!t;if(r!==B.current&&(f?f(!B.current):I.style.display=B.current?"block":"none"),I.style.zIndex=`${function(e,t,n){if(t instanceof ux||t instanceof kx){const r=wF.setFromMatrixPosition(e.matrixWorld),i=CF.setFromMatrixPosition(t.matrixWorld),o=r.distanceTo(i),s=(n[1]-n[0])/(t.far-t.near),a=n[1]-s*t.far;return Math.round(s*o+a)}}(M.current,C,m)}`,h){const[e,t]=[E.width/2,E.height/2],n=C.projectionMatrix.elements[5]*t,{isOrthographicCamera:r,top:i,left:o,bottom:s,right:a}=C,l=MF(C.matrixWorldInverse),c=r?`scale(${n})translate(${TF(-(a+o)/2)}px,${TF((i+s)/2)}px)`:`translateZ(${n}px)`;let h=M.current.matrixWorld;d&&(h=C.matrixWorldInverse.clone().transpose().copyPosition(h).scale(M.current.scale),h.elements[3]=h.elements[7]=h.elements[11]=0,h.elements[15]=1),I.style.width=E.width+"px",I.style.height=E.height+"px",I.style.perspective=r?"":`${n}px`,N.current&&O.current&&(N.current.style.transform=`${c}${l}translate(${e}px,${t}px)`,O.current.style.transform=PF(h,1/((u||10)/400)))}else{const t=void 0===u?1:function(e,t){if(t instanceof kx)return t.zoom;if(t instanceof ux){const n=wF.setFromMatrixPosition(e.matrixWorld),r=CF.setFromMatrixPosition(t.matrixWorld),i=t.fov*Math.PI/180,o=n.distanceTo(r);return 1/(2*Math.tan(i/2)*o)}return 1}(M.current,C)*u;I.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}P.current=e,R.current=C.zoom}}})),c.createElement("group",pB({},S,{ref:M}))}));var OF=({fallbackImg:e})=>{const{progress:t}=_F();return(0,s.jsx)(NF,{center:!0,className:"avatar-loader",children:(0,s.jsx)(xf,{spinning:!0,children:e?(0,s.jsxs)("figure",{children:[(0,s.jsx)("img",{src:e,alt:`${Math.round(t)}% loaded`,title:`${Math.round(t)}% loaded`}),(0,s.jsx)("figcaption",{children:`${Math.round(t)}%`})]}):(0,s.jsxs)(s.Fragment,{children:[Math.round(t)," % loaded"]})})})};const kF={halfBody:{width:"100%",height:"100%",minHeight:"500px",backgroundColor:"white",borderRadius:"100%"},fullBody:{width:"500px",height:"500px",backgroundColor:"white"}},LF=(e,t)=>e?{fov:40,position:[0,0,.6]}:!e&&t?{fov:44,position:[0,0,1.25]}:{fov:40,position:[0,175e-7,3]},DF=()=>{return"android"===((null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgentData)||void 0===e?void 0:e.platform)||(null===navigator||void 0===navigator?void 0:navigator.platform)||"unknown").toLowerCase()||navigator.userAgent.includes("Android")||$M()?(0,s.jsx)(gB,{distance:100,position:[-.3,.2,1.25],angle:Math.PI/2,attenuation:5,anglePower:5}):(0,s.jsx)(SB,{files:"https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/venice_sunset_1k.hdr"});var e};function BF({url:e,sex:t,style:n,rotateAvatar:r,eyeBlink:i,headMovement:o,speaking:a,fallback:l,fallbackImg:u,halfBody:d=!0,loading:h,animation:p,showControls:f=!1,isZoomed:m,chatEmission:g,stopProcessing:v,resetVisemeQueue:y,updateCurrentViseme:b}){return(0,s.jsx)(QD,{style:n||(d?kF.halfBody:kF.fullBody),camera:LF(d,m),children:(0,s.jsxs)(c.Suspense,{fallback:l||(0,s.jsx)(OF,{fallbackImg:u}),children:[DF(),r&&(0,s.jsx)(RB,{enablePan:!1,enableZoom:!1}),(0,s.jsx)(SF,{url:e,sex:t,showControls:f,loading:h||!1,animation:p,isZoomed:m||!1,eyeBlink:i||!1,headMovement:o||!1,speaking:a||!1,halfBody:d||!1,chatEmission:g,updateCurrentViseme:b,stopProcessing:v,resetVisemeQueue:y})]})})}const zF=(0,(c=o("85Hg2")).createContext)(void 0),FF={0:"viseme_sil",1:"viseme_PP",2:"viseme_FF",3:"viseme_TH",4:"viseme_DD",5:"viseme_kk",6:"viseme_CH",7:"viseme_SS",8:"viseme_nn",9:"viseme_RR",10:"viseme_aa",11:"viseme_E",12:"viseme_I",13:"viseme_O",14:"viseme_U",15:"viseme_kk",16:"viseme_CH",17:"viseme_SS",18:"viseme_TH",19:"viseme_RR",20:"viseme_kk",21:"viseme_PP"},{DEFAULT_VISEME_DURATION:UF,VISEME_OVERLAP:jF,SMOOTHING_FACTOR:HF,LOG_INTERVAL:GF,PRELOAD:VF,WEIGHT_MULTIPLIER:WF}={DEFAULT_VISEME_DURATION:.1,VISEME_OVERLAP:.02,SMOOTHING_FACTOR:.4,LOG_INTERVAL:60,PRELOAD:.5,WEIGHT_MULTIPLIER:.8},qF=(e,t)=>e.endTime<t-jF,KF=e=>Math.sin(Math.PI*Math.min(e,1))*WF,JF=(e,t)=>e+(t-e)*HF,YF=e=>(t,n)=>{console.log(`%c[VisemeContext] ${t}`,{event:"color: #4CAF50; font-weight: bold;",error:"color: #f44336; font-weight: bold;",debug:"color: #2196F3; font-weight: bold;"}[e],n)},XF=YF("event"),QF=YF("error"),ZF=YF("debug"),$F=({children:e})=>{const t=(0,c.useRef)([]),n=(0,c.useRef)(null),r=(0,c.useRef)(null),[i,o]=(0,c.useState)(!1),[a,l]=(0,c.useState)("idle"),u=(0,c.useRef)(null),d=(0,c.useRef)(0),h=(0,c.useRef)(null),p=(0,c.useCallback)((e=>{n.current=e,e.onstatechange=()=>{switch(XF("Audio Context State Change",{state:e.state,currentTime:e.currentTime}),e.state){case"running":l("active");break;case"suspended":l("paused");break;case"closed":l("finished"),g()}}}),[]),f=(0,c.useCallback)(((e,n)=>{if("finished"===a)return;const r=FF[e]||"viseme_sil",i=n/1e7;null===h.current&&(h.current=i);const o=i-(h.current||0),s={name:r,weight:0,startTime:o,endTime:o+UF};t.current.push(s),"idle"===a&&l("preparing")}),[a]),m=(0,c.useCallback)((e=>{e?(n.current=e,r.current=e.currentTime,d.current=0,o(!0),l("active"),XF("Started Processing",{audioTime:e.currentTime,queueLength:t.current.length,state:a})):QF("No audio context provided",{state:a})}),[]),g=(0,c.useCallback)((()=>{o(!1),l("finished"),r.current=null,u.current=null,d.current=0,n.current=null,XF("Stopped Processing",{queueLength:t.current.length,state:a})}),[]),v=(0,c.useCallback)((e=>{if(!i||!n.current)return null;const o=n.current.currentTime-(r.current||0)+VF;t.current=t.current.filter((e=>!qF(e,o)));const s=t.current.find((e=>e.startTime<=o&&e.endTime>o-jF));if(d.current%GF==60&&ZF("Current Viseme",{currentViseme:s,audioTime:o,visemeQueue:t.current}),s){const e=(o-s.startTime)/(s.endTime-s.startTime),t=KF(e),n=u.current?JF(u.current.weight,t):t,r={...s,weight:n};return u.current=r,r}if(u.current){const e=u.current.weight*(1-HF);u.current={...u.current,weight:e}}return u.current=null,null}),[i]),y=(0,c.useCallback)((()=>{t.current=[],u.current=null,r.current=null,h.current=null,d.current=0,l("idle"),XF("Reset Viseme Queue",{previousState:a})}),[a]),b=(0,c.useCallback)((e=>{XF("Reset And Start Processing",{previousState:a,queueLength:t.current.length}),g(),y(),m(e)}),[g,y,m,a]),S=(0,c.useMemo)((()=>({addViseme:f,updateCurrentViseme:v,startProcessing:m,stopProcessing:g,resetAndStartProcessing:b,resetVisemeQueue:y,isProcessing:i,setAudioContext:p})),[f,v,m,g,b,y,i,p]);return(0,s.jsx)(zF.Provider,{value:S,children:e})},eU=()=>{const e=(0,c.useContext)(zF);if(!e)throw new Error("useVisemeContext must be used within a VisemeProvider");return e};var tU=(0,c.memo)((({memori:e,integration:n,integrationConfig:r,tenant:i,instruct:o=!1,avatar3dVisible:a=!1,setAvatar3dVisible:l,hasUserActivatedSpeak:u=!1,isPlayingAudio:d=!1,loading:h=!1,baseUrl:p,apiUrl:f,animation:m,isZoomed:g=!1,chatProps:v})=>{const{t:y}=_e(),[b,S]=(0,c.useState)(!1),{stopProcessing:x,updateCurrentViseme:_,resetVisemeQueue:w}=eU();(0,c.useEffect)((()=>{S(!0)}),[]);const C=()=>{if("userAvatar"===(null==r?void 0:r.avatar)&&e.avatarURL&&e.avatarURL.length>0)return xN({type:"avatar",tenantID:null==i?void 0:i.id,resourceURI:e.avatarURL,baseURL:p,apiURL:f})},A=()=>{var t;return b?"readyplayerme"===(null==r?void 0:r.avatar)||"readyplayerme-full"===(null==r?void 0:r.avatar)||"customrpm"===(null==r?void 0:r.avatar)?(0,s.jsx)(aD,{fallback:(0,s.jsx)("div",{className:"memori--blob-container",children:b&&(0,s.jsx)(lD,{speaking:d,avatar:C()})}),children:(0,s.jsx)(BF,{updateCurrentViseme:_,url:r.avatarURL,sex:"FEMALE"===e.voiceType?"FEMALE":"MALE",fallbackImg:C(),headMovement:!0,eyeBlink:!0,animation:m,halfBody:"readyplayerme"===r.avatar,speaking:d,loading:h,style:T(),stopProcessing:x,resetVisemeQueue:w,isZoomed:g,chatEmission:null===(t=null==v?void 0:v.dialogState)||void 0===t?void 0:t.emission})}):"customglb"===(null==r?void 0:r.avatar)?(0,s.jsx)(CL,{poster:C()||"",src:r.avatarURL,alt:""}):null:null},E=()=>(0,s.jsx)("div",{className:"memori--avatar-toggle",children:(0,s.jsx)(_f,{ghost:!0,onClick:()=>l(!a),icon:a?(0,s.jsx)(uD,{}):(0,s.jsx)(cD,{}),children:(0,s.jsx)("span",{className:"memori--avatar-toggle-text",children:y(a?"hide":"show")})})}),T=()=>"readyplayerme"===(null==r?void 0:r.avatar)?{width:"300px",height:"300px",backgroundColor:"none",borderRadius:"100%",boxShadow:"none"}:{width:"100%",height:"100%",backgroundColor:"none"};return(0,s.jsxs)(s.Fragment,{children:["readyplayerme"!==(null==r?void 0:r.avatar)&&"readyplayerme-full"!==(null==r?void 0:r.avatar)&&"customglb"!==(null==r?void 0:r.avatar)&&"customrpm"!==(null==r?void 0:r.avatar)||!(null==r?void 0:r.avatarURL)?(0,s.jsx)("div",{className:"memori--blob-container",children:b&&(0,s.jsx)(lD,{speaking:d,avatar:C()})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:t(ws)("memori--avatar-wrapper",`memori--avatar-${(null==r?void 0:r.avatar)||"default"}`,{hidden:!a}),children:A()}),E()]}),(()=>{if(!o||u||!e.isGiver||!(null==i?void 0:i.id))return null;const t=`https://${i.id}/${"it-IT"===e.culture?"it":"en"}/${e.ownerUserName}/${e.name}/integrations${(null==n?void 0:n.integrationID)?`?integration=${n.integrationID}&openAvatarModal=true`:""}`;return(0,s.jsx)("div",{className:"memori--avatar-link-to-integrations",children:(0,s.jsx)("a",{className:"memori-button memori-button--circle memori-button--outlined",href:t,children:(0,s.jsx)(AN,{content:y("widgetgoToIntegrationsToCustomizeAvatar"),children:(0,s.jsx)("span",{className:"memori-button--icon",children:(0,s.jsx)(dD,{})})})})})})()]})}),((e,t)=>JSON.stringify(e)===JSON.stringify(t)));c=o("85Hg2"),c=o("85Hg2");function nU(e=0){let[t,n]=(0,c.useState)(e),r=(0,c.useCallback)((e=>n((t=>t|e))),[t]),i=(0,c.useCallback)((e=>Boolean(t&e)),[t]),o=(0,c.useCallback)((e=>n((t=>t&~e))),[n]),s=(0,c.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:s}}let rU=(0,(c=o("85Hg2")).createContext)(null);function iU(){let e=(0,c.useContext)(rU);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,iU),e}return e}function oU(){let[e,n]=(0,c.useState)([]);return[e.length>0?e.join(" "):void 0,(0,c.useMemo)((()=>function(e){let r=_h((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,c.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return t(c).createElement(rU.Provider,{value:i},e.children)}),[n])]}let sU=gh((function(e,t){let{passive:n=!1,...r}=e,i=iU(),o=`headlessui-label-${kh()}`,s=Ah(t);Sh((()=>i.register(o)),[o,i.register]);let a={ref:s,...i.props,id:o};return n&&("onClick"in a&&delete a.onClick,"onClick"in r&&delete r.onClick),ph({ourProps:a,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));var aU,lU=((aU=lU||{})[aU.RegisterOption=0]="RegisterOption",aU[aU.UnregisterOption=1]="UnregisterOption",aU);let cU={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Zh(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},uU=(0,c.createContext)(null);function dU(e){let t=(0,c.useContext)(uU);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,dU),t}return t}function hU(e,t){return ch(t.type,cU,e,t)}uU.displayName="RadioGroupContext";let pU=gh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,...u}=e,d=_h("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),[h,p]=(0,c.useReducer)(hU,{options:[]}),f=h.options,[m,g]=oU(),[v,y]=Ep(),b=`headlessui-radiogroup-${kh()}`,S=(0,c.useRef)(null),x=Ah(S,n),[_,w]=AR(r,s,i),C=(0,c.useMemo)((()=>f.find((e=>!e.propsRef.current.disabled))),[f]),A=(0,c.useMemo)((()=>f.some((e=>d(e.propsRef.current.value,_)))),[f,_]),E=_h((e=>{var t;if(l||d(e,_))return!1;let n=null==(t=f.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==w||w(e),!0)}));yR({container:S.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=_h((e=>{let t=S.current;if(!t)return;let n=Fh(t),r=f.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case Th.Enter:CR(e.currentTarget);break;case Th.ArrowLeft:case Th.ArrowUp:if(e.preventDefault(),e.stopPropagation(),ep(r,Gh.Previous|Gh.WrapAround)===Vh.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Th.ArrowRight:case Th.ArrowDown:if(e.preventDefault(),e.stopPropagation(),ep(r,Gh.Next|Gh.WrapAround)===Vh.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case Th.Space:{e.preventDefault(),e.stopPropagation();let t=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),I=_h((e=>(p({type:0,...e}),()=>p({type:1,id:e.id})))),M=(0,c.useMemo)((()=>({registerOption:I,firstOption:C,containsCheckedOption:A,change:E,disabled:l,value:_,compare:d})),[I,C,A,E,l,_,d]),R={ref:x,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:T},P=(0,c.useMemo)((()=>({value:_})),[_]);return t(c).createElement(y,{name:"RadioGroup.Description"},t(c).createElement(g,{name:"RadioGroup.Label"},t(c).createElement(uU.Provider,{value:M},null!=o&&null!=_&&xR({[o]:_}).map((([e,n])=>t(c).createElement(Dh,{features:Lh.Hidden,...vh({key:e,as:"input",type:"radio",checked:null!=n,hidden:!0,readOnly:!0,name:e,value:n})}))),ph({ourProps:R,theirProps:u,slot:P,defaultTag:"div",name:"RadioGroup"}))))}));var fU=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(fU||{});let mU=gh((function(e,n){let r=(0,c.useRef)(null),i=Ah(r,n),o=`headlessui-radiogroup-option-${kh()}`,[s,a]=oU(),[l,u]=Ep(),{addFlag:d,removeFlag:h,hasFlag:p}=nU(1),{value:f,disabled:m=!1,...g}=e,v=(0,c.useRef)({value:f,disabled:m});Sh((()=>{v.current.value=f}),[f,v]),Sh((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:S,firstOption:x,containsCheckedOption:_,value:w,compare:C}=dU("RadioGroup.Option");Sh((()=>y({id:o,element:r,propsRef:v})),[o,y,r,e]);let A=_h((e=>{var t;if(Ih(e.currentTarget))return e.preventDefault();!S(f)||(d(2),null==(t=r.current)||t.focus())})),E=_h((e=>{if(Ih(e.currentTarget))return e.preventDefault();d(2)})),T=_h((()=>h(2))),I=(null==x?void 0:x.id)===o,M=b||m,R=C(w,f),P={ref:i,id:o,role:"radio","aria-checked":R?"true":"false","aria-labelledby":s,"aria-describedby":l,"aria-disabled":!!M||void 0,tabIndex:M?-1:R||!_&&I?0:-1,onClick:M?void 0:A,onFocus:M?void 0:E,onBlur:M?void 0:T},N=(0,c.useMemo)((()=>({checked:R,disabled:M,active:p(2)})),[R,M,p]);return t(c).createElement(u,{name:"RadioGroup.Description"},t(c).createElement(a,{name:"RadioGroup.Label"},ph({ourProps:P,theirProps:g,slot:N,defaultTag:"div",name:"RadioGroup.Option"})))})),gU=Object.assign(pU,{Option:mU,Label:sU,Description:Tp});var vU=({instruct:e,canInstruct:t,onChangeMode:n})=>{const{t:r}=_e();return t?(0,s.jsx)("div",{className:"memori--changeMode-instruct",children:(0,s.jsxs)(gU,{name:"instruct",value:e?"instruct":"test",defaultValue:e?"instruct":"test",className:"memori--changeMode-instruct-radio",onChange:n,children:[(0,s.jsx)(gU.Option,{value:"instruct",className:"memori--changeMode-instruct-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,children:r("widget.instruct")||"Instruct"})}),(0,s.jsx)(gU.Option,{value:"test",className:"memori--changeMode-instruct-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,children:r("widget.test")||"Test"})})]})}):null};c=o("85Hg2");var yU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",viewBox:"0 0 40 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M25.085.277c-.264 0-.531.071-.777.236L8.482 10.857H1.161a.716.716 0 00-.715.714V24.43c0 .392.322.714.715.714h7.321l15.826 10.344c.246.16.518.236.777.236.745 0 1.433-.593 1.433-1.433V1.71c0-.84-.688-1.433-1.433-1.433zM23.304 30.99l-13.063-8.54-.803-.522H3.66V14.07h5.777l.799-.522 13.067-8.54V30.99zM39.534 15.148L36.967 18l2.567 2.852a1.09 1.09 0 010 1.427l-1.283 1.426a.845.845 0 01-1.284 0L34.4 20.852l-2.567 2.852a.845.845 0 01-1.283 0l-1.284-1.426a1.09 1.09 0 010-1.426L31.833 18l-2.567-2.852a1.09 1.09 0 010-1.426l1.283-1.427a.845.845 0 011.284 0l2.567 2.853 2.567-2.853a.845.845 0 011.284 0l1.283 1.427a1.09 1.09 0 010 1.426z",fill:"currentColor"})});var bU,SU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M625.9 115c-5.9 0-11.9 1.6-17.4 5.3L254 352H90c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h164l354.5 231.7c5.5 3.6 11.6 5.3 17.4 5.3 16.7 0 32.1-13.3 32.1-32.1V147.1c0-18.8-15.4-32.1-32.1-32.1zM586 803L293.4 611.7l-18-11.7H146V424h129.4l17.9-11.7L586 221v582zm348-327H806c-8.8 0-16 7.2-16 16v40c0 8.8 7.2 16 16 16h128c8.8 0 16-7.2 16-16v-40c0-8.8-7.2-16-16-16zm-41.9 261.8l-110.3-63.7a15.9 15.9 0 00-21.7 5.9l-19.9 34.5c-4.4 7.6-1.8 17.4 5.8 21.8L856.3 800a15.9 15.9 0 0021.7-5.9l19.9-34.5c4.4-7.6 1.7-17.4-5.8-21.8zM760 344a15.9 15.9 0 0021.7 5.9L892 286.2c7.6-4.4 10.2-14.2 5.8-21.8L878 230a15.9 15.9 0 00-21.7-5.9L746 287.8a15.99 15.99 0 00-5.8 21.8L760 344z"})}),xU=(c=o("85Hg2"),(bU=xU||{})[bU.Open=0]="Open",bU[bU.Closed=1]="Closed",bU),_U=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(_U||{});let wU={0:e=>({...e,popoverState:ch(e.popoverState,{0:1,1:0})}),1:e=>1===e.popoverState?e:{...e,popoverState:1},2:(e,t)=>e.button===t.button?e:{...e,button:t.button},3:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},4:(e,t)=>e.panel===t.panel?e:{...e,panel:t.panel},5:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},CU=(0,c.createContext)(null);function AU(e){let t=(0,c.useContext)(CU);if(null===t){let t=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,AU),t}return t}CU.displayName="PopoverContext";let EU=(0,c.createContext)(null);function TU(e){let t=(0,c.useContext)(EU);if(null===t){let t=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,TU),t}return t}EU.displayName="PopoverAPIContext";let IU=(0,c.createContext)(null);function MU(){return(0,c.useContext)(IU)}IU.displayName="PopoverGroupContext";let RU=(0,c.createContext)(null);function PU(e,t){return ch(t.type,wU,e,t)}RU.displayName="PopoverPanelContext";let NU=gh((function(e,n){var r;let i=`headlessui-popover-button-${kh()}`,o=`headlessui-popover-panel-${kh()}`,s=(0,c.useRef)(null),a=Ah(n,Ch((e=>{s.current=e}))),l=(0,c.useReducer)(PU,{popoverState:1,button:null,buttonId:i,panel:null,panelId:o,beforePanelSentinel:(0,c.createRef)(),afterPanelSentinel:(0,c.createRef)()}),[{popoverState:u,button:d,panel:h,beforePanelSentinel:p,afterPanelSentinel:f},m]=l,g=op(null!=(r=s.current)?r:d);(0,c.useEffect)((()=>m({type:3,buttonId:i})),[i,m]),(0,c.useEffect)((()=>m({type:5,panelId:o})),[o,m]);let v=(0,c.useMemo)((()=>{if(!d||!h)return!1;for(let e of document.querySelectorAll("body > *"))if(Number(null==e?void 0:e.contains(d))^Number(null==e?void 0:e.contains(h)))return!0;let e=qh(),t=e.indexOf(d),n=(t+e.length-1)%e.length,r=(t+1)%e.length,i=e[n],o=e[r];return!h.contains(i)&&!h.contains(o)}),[d,h]),y=(0,c.useMemo)((()=>({buttonId:i,panelId:o,close:()=>m({type:1})})),[i,o,m]),b=MU(),S=null==b?void 0:b.registerPopover,x=_h((()=>{var e;return null!=(e=null==b?void 0:b.isFocusWithinPopoverGroup())?e:(null==g?void 0:g.activeElement)&&((null==d?void 0:d.contains(g.activeElement))||(null==h?void 0:h.contains(g.activeElement)))}));(0,c.useEffect)((()=>null==S?void 0:S(y)),[S,y]),sp(null==g?void 0:g.defaultView,"focus",(e=>{var t,n,r,i;0===u&&(x()||!d||!h||null!=(n=null==(t=p.current)?void 0:t.contains)&&n.call(t,e.target)||null!=(i=null==(r=f.current)?void 0:r.contains)&&i.call(r,e.target)||m({type:1}))}),!0),Dp([d,h],((e,t)=>{m({type:1}),Jh(t,Kh.Loose)||(e.preventDefault(),null==d||d.focus())}),0===u);let _=_h((e=>{m({type:1});let t=e?e instanceof HTMLElement?e:"current"in e&&e.current instanceof HTMLElement?e.current:d:d;null==t||t.focus()})),w=(0,c.useMemo)((()=>({close:_,isPortalled:v})),[_,v]),C=(0,c.useMemo)((()=>({open:0===u,close:_})),[u,_]),A=e,E={ref:a};return t(c).createElement(CU.Provider,{value:l},t(c).createElement(EU.Provider,{value:w},t(c).createElement(Pp,{value:ch(u,{0:Mp.Open,1:Mp.Closed})},ph({ourProps:E,theirProps:A,slot:C,defaultTag:"div",name:"Popover"}))))})),OU=gh((function(e,n){let[r,i]=AU("Popover.Button"),{isPortalled:o}=TU("Popover.Button"),s=(0,c.useRef)(null),a=`headlessui-focus-sentinel-${kh()}`,l=MU(),u=null==l?void 0:l.closeOthers,d=(0,c.useContext)(RU),h=null!==d&&d===r.panelId,p=Ah(s,n,h?null:e=>e&&i({type:2,button:e})),f=Ah(s,n),m=op(s),g=_h((e=>{var t,n,o;if(h){if(1===r.popoverState)return;switch(e.key){case Th.Space:case Th.Enter:e.preventDefault(),null==(n=(t=e.target).click)||n.call(t),i({type:1}),null==(o=r.button)||o.focus()}}else switch(e.key){case Th.Space:case Th.Enter:e.preventDefault(),e.stopPropagation(),1===r.popoverState&&(null==u||u(r.buttonId)),i({type:0});break;case Th.Escape:if(0!==r.popoverState)return null==u?void 0:u(r.buttonId);if(!s.current||(null==m?void 0:m.activeElement)&&!s.current.contains(m.activeElement))return;e.preventDefault(),e.stopPropagation(),i({type:1})}})),v=_h((e=>{h||e.key===Th.Space&&e.preventDefault()})),y=_h((t=>{var n,o;Ih(t.currentTarget)||e.disabled||(h?(i({type:1}),null==(n=r.button)||n.focus()):(t.preventDefault(),t.stopPropagation(),1===r.popoverState&&(null==u||u(r.buttonId)),i({type:0}),null==(o=r.button)||o.focus()))})),b=_h((e=>{e.preventDefault(),e.stopPropagation()})),S=0===r.popoverState,x=(0,c.useMemo)((()=>({open:S})),[S]),_=vR(e,s),w=e,C=h?{ref:f,type:_,onKeyDown:g,onClick:y}:{ref:p,id:r.buttonId,type:_,"aria-expanded":e.disabled?void 0:0===r.popoverState,"aria-controls":r.panel?r.panelId:void 0,onKeyDown:g,onKeyUp:v,onClick:y,onMouseDown:b},A=rp(),E=_h((()=>{let e=r.panel;e&&ch(A.current,{[np.Forwards]:()=>ep(e,Gh.First),[np.Backwards]:()=>ep(e,Gh.Last)})}));return t(c).createElement(t(c).Fragment,null,ph({ourProps:C,theirProps:w,slot:x,defaultTag:"button",name:"Popover.Button"}),S&&!h&&o&&t(c).createElement(Dh,{id:a,features:Lh.Focusable,as:"button",type:"button",onFocus:E}))})),kU=dh.RenderStrategy|dh.Static,LU=gh((function(e,t){let[{popoverState:n},r]=AU("Popover.Overlay"),i=Ah(t),o=`headlessui-popover-overlay-${kh()}`,s=Rp(),a=null!==s?s===Mp.Open:0===n;return ph({ourProps:{ref:i,id:o,"aria-hidden":!0,onClick:_h((e=>{if(Ih(e.currentTarget))return e.preventDefault();r({type:1})}))},theirProps:e,slot:(0,c.useMemo)((()=>({open:0===n})),[n]),defaultTag:"div",features:kU,visible:a,name:"Popover.Overlay"})})),DU=dh.RenderStrategy|dh.Static,BU=gh((function(e,n){let{focus:r=!1,...i}=e,[o,s]=AU("Popover.Panel"),{close:a,isPortalled:l}=TU("Popover.Panel"),u=`headlessui-focus-sentinel-before-${kh()}`,d=`headlessui-focus-sentinel-after-${kh()}`,h=(0,c.useRef)(null),p=Ah(h,n,(e=>{s({type:4,panel:e})})),f=op(h),m=Rp(),g=null!==m?m===Mp.Open:0===o.popoverState,v=_h((e=>{var t;if(e.key===Th.Escape){if(0!==o.popoverState||!h.current||(null==f?void 0:f.activeElement)&&!h.current.contains(f.activeElement))return;e.preventDefault(),e.stopPropagation(),s({type:1}),null==(t=o.button)||t.focus()}}));(0,c.useEffect)((()=>{var t;e.static||1===o.popoverState&&(null==(t=e.unmount)||t)&&s({type:4,panel:null})}),[o.popoverState,e.unmount,e.static,s]),(0,c.useEffect)((()=>{if(!r||0!==o.popoverState||!h.current)return;let e=null==f?void 0:f.activeElement;h.current.contains(e)||ep(h.current,Gh.First)}),[r,h,o.popoverState]);let y=(0,c.useMemo)((()=>({open:0===o.popoverState,close:a})),[o,a]),b={ref:p,id:o.panelId,onKeyDown:v,onBlur:r&&0===o.popoverState?e=>{var t,n,r,i,a;let l=e.relatedTarget;!l||!h.current||null!=(t=h.current)&&t.contains(l)||(s({type:1}),((null==(r=null==(n=o.beforePanelSentinel.current)?void 0:n.contains)?void 0:r.call(n,l))||(null==(a=null==(i=o.afterPanelSentinel.current)?void 0:i.contains)?void 0:a.call(i,l)))&&l.focus({preventScroll:!0}))}:void 0,tabIndex:-1},S=rp(),x=_h((()=>{let e=h.current;e&&ch(S.current,{[np.Forwards]:()=>{ep(e,Gh.First)},[np.Backwards]:()=>{var e;null==(e=o.button)||e.focus({preventScroll:!0})}})})),_=_h((()=>{let e=h.current;e&&ch(S.current,{[np.Forwards]:()=>{var e,t,n;if(!o.button)return;let r=qh(),i=r.indexOf(o.button),s=r.slice(0,i+1),a=[...r.slice(i+1),...s];for(let r of a.slice())if((null==(t=null==(e=null==r?void 0:r.id)?void 0:e.startsWith)?void 0:t.call(e,"headlessui-focus-sentinel-"))||(null==(n=o.panel)?void 0:n.contains(r))){let e=a.indexOf(r);-1!==e&&a.splice(e,1)}ep(a,Gh.First,!1)},[np.Backwards]:()=>ep(e,Gh.Last)})}));return t(c).createElement(RU.Provider,{value:o.panelId},g&&l&&t(c).createElement(Dh,{id:u,ref:o.beforePanelSentinel,features:Lh.Focusable,as:"button",type:"button",onFocus:x}),ph({ourProps:b,theirProps:i,slot:y,defaultTag:"div",features:DU,visible:g,name:"Popover.Panel"}),g&&l&&t(c).createElement(Dh,{id:d,ref:o.afterPanelSentinel,features:Lh.Focusable,as:"button",type:"button",onFocus:_}))})),zU=gh((function(e,n){let r=(0,c.useRef)(null),i=Ah(r,n),[o,s]=(0,c.useState)([]),a=_h((e=>{s((t=>{let n=t.indexOf(e);if(-1!==n){let e=t.slice();return e.splice(n,1),e}return t}))})),l=_h((e=>(s((t=>[...t,e])),()=>a(e)))),u=_h((()=>{var e;let t=Fh(r);if(!t)return!1;let n=t.activeElement;return!(null==(e=r.current)||!e.contains(n))||o.some((e=>{var r,i;return(null==(r=t.getElementById(e.buttonId))?void 0:r.contains(n))||(null==(i=t.getElementById(e.panelId))?void 0:i.contains(n))}))})),d=_h((e=>{for(let t of o)t.buttonId!==e&&t.close()})),h=(0,c.useMemo)((()=>({registerPopover:l,unregisterPopover:a,isFocusWithinPopoverGroup:u,closeOthers:d})),[l,a,u,d]),p=(0,c.useMemo)((()=>({})),[]),f=e,m={ref:i};return t(c).createElement(IU.Provider,{value:h},ph({ourProps:m,theirProps:f,slot:p,defaultTag:"div",name:"Popover.Group"}))})),FU=Object.assign(NU,{Button:OU,Overlay:LU,Panel:BU,Group:zU});var UU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"})});var jU=({history:e,memori:n,className:r,buttonClassName:i,icon:o,disabled:a=!1,align:l="right",filename:c})=>{const{t:u}=_e(),d=`${u("write_and_speak.conversationStartedLabel")} ${new Intl.DateTimeFormat("it",{dateStyle:"short",timeStyle:"short"}).format(new Date)}\n\n`.concat(e.map((e=>`${e.fromUser?"YOU":n.name}: ${e.text}`)).join("\n"));return(0,s.jsx)(FU,{title:u("write_and_speak.exportChatHistoryMessage"),className:t(ws)("memori-export-history-button",r,{"memori-export-history-button--align-left":"left"===l}),children:({close:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(FU.Button,{disabled:a,className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only",i,{"memori-button--disabled":a,"memori-button--primary":!a}),children:(0,s.jsx)("div",{className:"memori-button--icon",children:o||(0,s.jsx)(UU,{})})}),(0,s.jsxs)(FU.Panel,{className:"memori-export-history-button--panel",children:[(0,s.jsx)("p",{children:u("write_and_speak.exportChatHistory")}),(0,s.jsx)(_f,{primary:!0,onClick:()=>((e,t="export-chat.txt")=>{const n=new Blob([e],{type:"text/plain"}),r=URL.createObjectURL(n),i=document.createElement("a");i.setAttribute("href",r),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)})(d,c||`${n.name.replace(/\W+/g,"-")}-export-chat.txt`),children:u("yes")||"Yes"}),(0,s.jsx)(_f,{onClick:()=>e(),children:u("no")||"No"})]})]})})};var HU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"})});c=o("85Hg2");var GU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-32 736H663.9V602.2h104l15.6-120.7H663.9v-77.1c0-35 9.7-58.8 59.8-58.8h63.9v-108c-11.1-1.5-49-4.8-93.2-4.8-92.2 0-155.3 56.3-155.3 159.6v89H434.9v120.7h104.3V848H176V176h672v672z"})});var VU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M928 254.3c-30.6 13.2-63.9 22.7-98.2 26.4a170.1 170.1 0 0 0 75-94 336.64 336.64 0 0 1-108.2 41.2A170.1 170.1 0 0 0 672 174c-94.5 0-170.5 76.6-170.5 170.6 0 13.2 1.6 26.4 4.2 39.1-141.5-7.4-267.7-75-351.6-178.5a169.32 169.32 0 0 0-23.2 86.1c0 59.2 30.1 111.4 76 142.1a172 172 0 0 1-77.1-21.7v2.1c0 82.9 58.6 151.6 136.7 167.4a180.6 180.6 0 0 1-44.9 5.8c-11.1 0-21.6-1.1-32.2-2.6C211 652 273.9 701.1 348.8 702.7c-58.6 45.9-132 72.9-211.7 72.9-14.3 0-27.5-.5-41.2-2.1C171.5 822 261.2 850 357.8 850 671.4 850 843 590.2 843 364.7c0-7.4 0-14.8-.5-22.2 33.2-24.3 62.3-54.4 85.5-88.2z"})});var WU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M847.7 112H176.3c-35.5 0-64.3 28.8-64.3 64.3v671.4c0 35.5 28.8 64.3 64.3 64.3h671.4c35.5 0 64.3-28.8 64.3-64.3V176.3c0-35.5-28.8-64.3-64.3-64.3zm0 736c-447.8-.1-671.7-.2-671.7-.3.1-447.8.2-671.7.3-671.7 447.8.1 671.7.2 671.7.3-.1 447.8-.2 671.7-.3 671.7zM230.6 411.9h118.7v381.8H230.6zm59.4-52.2c37.9 0 68.8-30.8 68.8-68.8a68.8 68.8 0 1 0-137.6 0c-.1 38 30.7 68.8 68.8 68.8zm252.3 245.1c0-49.8 9.5-98 71.2-98 60.8 0 61.7 56.9 61.7 101.2v185.7h118.6V584.3c0-102.8-22.2-181.9-142.3-181.9-57.7 0-96.4 31.7-112.3 61.7h-1.6v-52.2H423.7v381.8h118.6V604.8z"})});var qU=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M713.5 599.9c-10.9-5.6-65.2-32.2-75.3-35.8-10.1-3.8-17.5-5.6-24.8 5.6-7.4 11.1-28.4 35.8-35 43.3-6.4 7.4-12.9 8.3-23.8 2.8-64.8-32.4-107.3-57.8-150-131.1-11.3-19.5 11.3-18.1 32.4-60.2 3.6-7.4 1.8-13.7-1-19.3-2.8-5.6-24.8-59.8-34-81.9-8.9-21.5-18.1-18.5-24.8-18.9-6.4-.4-13.7-.4-21.1-.4-7.4 0-19.3 2.8-29.4 13.7-10.1 11.1-38.6 37.8-38.6 92s39.5 106.7 44.9 114.1c5.6 7.4 77.7 118.6 188.4 166.5 70 30.2 97.4 32.8 132.4 27.6 21.3-3.2 65.2-26.6 74.3-52.5 9.1-25.8 9.1-47.9 6.4-52.5-2.7-4.9-10.1-7.7-21-13z"}),(0,s.jsx)("path",{d:"M925.2 338.4c-22.6-53.7-55-101.9-96.3-143.3-41.3-41.3-89.5-73.8-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9-53.3 22.8-101.1 55.2-142 96.5-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9.3 69.4 16.9 138.3 48 199.9v152c0 25.4 20.6 46 46 46h152.1c61.6 31.1 130.5 47.7 199.9 48h2.1c59.9 0 118-11.6 172.7-34.3 53.5-22.3 101.6-54.3 142.8-95.2 41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"})]});var KU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0 0 68.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"})});var JU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M752 664c-28.5 0-54.8 10-75.4 26.7L469.4 540.8a160.68 160.68 0 0 0 0-57.6l207.2-149.9C697.2 350 723.5 360 752 360c66.2 0 120-53.8 120-120s-53.8-120-120-120-120 53.8-120 120c0 11.6 1.6 22.7 4.7 33.3L439.9 415.8C410.7 377.1 364.3 352 312 352c-88.4 0-160 71.6-160 160s71.6 160 160 160c52.3 0 98.7-25.1 127.9-63.8l196.8 142.5c-3.1 10.6-4.7 21.8-4.7 33.3 0 66.2 53.8 120 120 120s120-53.8 120-120-53.8-120-120-120zm0-476c28.7 0 52 23.3 52 52s-23.3 52-52 52-52-23.3-52-52 23.3-52 52-52zM312 600c-48.5 0-88-39.5-88-88s39.5-88 88-88 88 39.5 88 88-39.5 88-88 88zm440 236c-28.7 0-52-23.3-52-52s23.3-52 52-52 52 23.3 52 52-23.3 52-52 52z"})});var YU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"})});var XU,QU=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 496 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm121.8 169.9l-40.7 191.8c-3 13.6-11.1 16.9-22.4 10.5l-62-45.7-29.9 28.8c-3.3 3.3-6.1 6.1-12.5 6.1l4.4-63.1 114.9-103.8c5-4.4-1.1-6.9-7.7-2.5l-142 89.4-61.2-19.1c-13.3-4.2-13.6-13.3 2.8-19.7l239.1-92.2c11.1-4 20.8 2.7 17.2 19.5z"})}),ZU=(c=o("85Hg2"),Object.defineProperty),$U=Object.getOwnPropertySymbols,ej=Object.prototype.hasOwnProperty,tj=Object.prototype.propertyIsEnumerable,nj=(e,t,n)=>t in e?ZU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rj=(e,t)=>{for(var n in t||(t={}))ej.call(t,n)&&nj(e,n,t[n]);if($U)for(var n of $U(t))tj.call(t,n)&&nj(e,n,t[n]);return e},ij=(e,t)=>{var n={};for(var r in e)ej.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&$U)for(var r of $U(e))t.indexOf(r)<0&&tj.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(r);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,r){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,r)}static encodeBinary(n,r){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],r)}static encodeSegments(e,n,i=1,s=40,l=-1,c=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,d;for(u=i;;u++){const r=8*t.getNumDataCodewords(u,n),i=a.getTotalBits(e,u);if(i<=r){d=i;break}if(u>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const p=8*t.getNumDataCodewords(u,n);o(h.length<=p),r(0,Math.min(4,p-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<p;e^=253)r(e,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,n,f,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);o(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(r,e));this.setFunctionModule(8,7,i(r,6)),this.setFunctionModule(8,8,i(r,7)),this.setFunctionModule(7,8,i(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),r=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(r,o,n),this.setFunctionModule(o,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(n)),o=e+r,s=t+n;0<=o&&o<this.size&&0<=s&&s<this.size&&this.setFunctionModule(o,s,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],s=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),l=i-a%i,c=Math.floor(a/i);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let n=0,r=0;n<i;n++){let i=e.slice(r,r+c-s+(n<l?0:1));r+=i.length;const o=t.reedSolomonComputeRemainder(i,d);n<l&&i.push(0),u.push(i.concat(o))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,n)=>{(e!=c-s||n>=l)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let o=0;o<2;o++){const s=t-o,a=0==(t+1&2)?this.size-1-r:r;!this.isFunction[a][s]&&n<8*e.length&&(this.modules[a][s]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[n][s]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[n][s],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,o=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][n]==r?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),r||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),r=this.modules[s][n],i=1);e+=this.finderPenaltyTerminateAndCount(r,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*r)/r)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const i of e){const e=i^r.shift();r.push(0),n.forEach(((n,i)=>r[i]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const s=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new s(s.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!s.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);r(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new s(s.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!s.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(i,11,n)}return t<e.length&&r(s.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new s(s.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:s.isNumeric(e)?[s.makeNumeric(e)]:s.isAlphanumeric(e)?[s.makeAlphanumeric(e)]:[s.makeBytes(s.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new s(s.Mode.ECI,0,t)}static isNumeric(e){return s.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return s.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=s;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(XU||(XU={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(XU||(XU={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(XU||(XU={}));var oj=XU,sj={L:oj.QrCode.Ecc.LOW,M:oj.QrCode.Ecc.MEDIUM,Q:oj.QrCode.Ecc.QUARTILE,H:oj.QrCode.Ecc.HIGH},aj=128,lj="L",cj="#FFFFFF",uj="#000000",dj=!1;
|
|
254
254
|
/**
|
|
255
255
|
* @license qrcode.react
|
|
256
256
|
* Copyright (c) Paul O'Shannessy
|
|
257
257
|
* SPDX-License-Identifier: ISC
|
|
258
|
-
*/function cj(e,t=0){const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return n.push(`M${i+t} ${r+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}function uj(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function dj(e,t,n,r){if(null==r)return null;const i=n?4:0,o=e.length+2*i,s=Math.floor(.1*t),a=o/t,l=(r.width||s)*a,c=(r.height||s)*a,u=null==r.x?e.length/2-l/2:r.x*a,d=null==r.y?e.length/2-c/2:r.y*a;let h=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+d-t)}}return{x:u,y:d,h:c,w:l,excavation:h}}var hj=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function pj(e){const n=e,{value:r,size:i=ij,level:o=oj,bgColor:s=sj,fgColor:a=aj,includeMargin:l=lj,style:u,imageSettings:d}=n,h=tj(n,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),p=null==d?void 0:d.src,f=(0,c.useRef)(null),m=(0,c.useRef)(null),[g,v]=(0,c.useState)(!1);(0,c.useEffect)((()=>{if(null!=f.current){const e=f.current,t=e.getContext("2d");if(!t)return;let n=nj.QrCode.encodeText(r,rj[o]).getModules();const c=l?4:0,u=n.length+2*c,h=dj(n,i,l,d),p=m.current,g=null!=h&&null!==p&&p.complete&&0!==p.naturalHeight&&0!==p.naturalWidth;g&&null!=h.excavation&&(n=uj(n,h.excavation));const v=window.devicePixelRatio||1;e.height=e.width=i*v;const y=i/u*v;t.scale(y,y),t.fillStyle=s,t.fillRect(0,0,u,u),t.fillStyle=a,hj?t.fill(new Path2D(cj(n,c))):n.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+c,n+c,1,1)}))})),g&&t.drawImage(p,h.x+c,h.y+c,h.w,h.h)}})),(0,c.useEffect)((()=>{v(!1)}),[p]);const y=ej({height:i,width:i},u);let b=null;return null!=p&&(b=t(c).createElement("img",{src:p,key:p,style:{display:"none"},onLoad:()=>{v(!0)},ref:m})),t(c).createElement(t(c).Fragment,null,t(c).createElement("canvas",ej({style:y,height:i,width:i,ref:f},h)),b)}var fj=({tenant:e,url:n,title:r="",className:i,baseUrl:o,primary:a=!0,showQrCode:l=!0,align:u="right"})=>{const{t:d}=_e(),[h,p]=(0,c.useState)(n),f=(0,c.useMemo)((()=>(null==e?void 0:e.theme)?`${null!=o?o:"https://aisuru.com"}/images/${e.theme}/square_logo.png`:`${null!=o?o:"https://aisuru.com"}/images/memori_logo.png`),[e,o]);(0,c.useEffect)((()=>{n||p(window.location.href)}),[n]);const m=[{id:"facebook",title:"Facebook",url:`https://www.facebook.com/sharer/sharer.php?u=${h}`,icon:UU},{id:"twitter",title:"Twitter",url:`https://twitter.com/intent/tweet?url=${h}`,icon:jU},{id:"linkedin",title:"LinkedIn",url:`https://www.linkedin.com/shareArticle?mini=true&title=${r}&url=${h}`,icon:HU},{id:"whatsapp",title:"Whatsapp",url:`https://api.whatsapp.com/send?phone=&text=${h}`,icon:GU},{id:"telegram",title:"Telegram",url:`https://t.me/share/url?text=${r}&url=${h}`,icon:JU},{id:"email",title:"Email",url:`mailto:?subject=${(null==r?void 0:r.length)>0?r:n}&body=${h}`,icon:VU}];return(0,s.jsxs)(jN,{as:"div",className:t(ws)("memori-share-button",{"memori-share-button--align-left":"left"===u}),children:[(0,s.jsx)(jN.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button",i,{"memori-button--primary":a}),title:d("widget.share")||void 0,children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(WU,{})})}),(0,s.jsxs)(jN.Items,{className:"memori-share-button--overlay",as:"ul",children:[(0,s.jsx)(jN.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsx)(_f,{className:"memori-share-button--link",ghost:!0,icon:(0,s.jsx)(vL,{}),onClick:()=>{h&&navigator.clipboard.writeText(h)},children:d("copyToClipboard")||void 0})},"copy"),m.map((e=>{var n;return(0,s.jsx)(jN.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsxs)("a",{className:t(ws)("memori-button","memori-button--with-icon","memori-button--ghost","memori-button--padded","memori-share-button--link"),href:null!==(n=e.url)&&void 0!==n?n:"",target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(e.icon,{})}),e.title]})},e.id)})),l&&(0,s.jsxs)(jN.Item,{as:"li",className:"memori-share-button--li-qr-code",children:[(0,s.jsx)(pj,{id:"qr-canvas",value:null!=h?h:"",size:128,bgColor:"#ffffff",fgColor:"#000000",level:"H",includeMargin:!1,imageSettings:{src:f,x:void 0,y:void 0,height:32,width:32,excavate:!0}}),(0,s.jsx)("div",{children:(0,s.jsx)(_f,{onClick:()=>{const e=document.getElementById("qr-canvas");if(!e)return;const t=document.createElement("a");t.href=e.toDataURL(),t.download=`memori-${r}-share.png`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},icon:(0,s.jsx)(qU,{}),title:"Download QR",children:"Download"})})]},"qrcode")]})]})};var mj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M290 236.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0 0 13.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 0 0 0 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 0 0-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"})});var gj=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",focusable:"false",role:"img",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2","aria-label":t,children:[(0,s.jsx)("path",{d:"M23 4L23 10 17 10"}),(0,s.jsx)("path",{d:"M1 20L1 14 7 14"}),(0,s.jsx)("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})]});var vj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6c-.3 1.5-.4 3-.4 4.4 0 14.4 11.6 26 26 26h723c1.5 0 3-.1 4.4-.4 14.2-2.4 23.7-15.9 21.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"})});var yj=({className:e,memori:n,tenant:r,history:i,position:o,setShowPositionDrawer:a,setShowSettingsDrawer:l,setShowKnownFactsDrawer:u,setShowExpertsDrawer:d,enableAudio:h=!0,speakerMuted:p,setSpeakerMuted:f,hasUserActivatedSpeak:m=!1,showShare:g=!0,showSettings:v=!0,showSpeaker:y=!0,showReload:b=!1,showClear:S=!1,showLogin:x=!0,setShowLoginDrawer:_,clearHistory:w,loginToken:C,user:A,sessionID:E})=>{const{t:T}=_e(),[I,M]=(0,c.useState)(!1),[R,P]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{document.fullscreenEnabled&&M(!0)}),[]),(0,s.jsxs)("div",{className:t(ws)("memori-header",e),children:[n.needsPosition&&o&&(0,s.jsxs)("div",{className:"memori-header--position",children:[0!==o.latitude&&0!==o.longitude&&(0,s.jsx)("span",{className:"memori-header--position-placeName",children:o.placeName}),(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--position",title:T("widget.position")||"Position",icon:(0,s.jsx)(tD,{}),onClick:()=>a(!0)})]}),b&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--reload",title:T("reload")||"Reload",icon:(0,s.jsx)(gj,{}),onClick:()=>{window.location.reload()}}),S&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--clear",title:T("clearHistory")||"Clear chat",icon:(0,s.jsx)(vj,{}),onClick:w}),I&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--fullscreen",title:R?T("fullscreenExit")||"Exit fullscreen":T("fullscreenEnter")||"Enter fullscreen",icon:R?(0,s.jsx)(UL,{}):(0,s.jsx)(mj,{}),onClick:()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),P(!1)):(document.documentElement.requestFullscreen(),P(!0))}}),n.enableDeepThought&&!!C&&(null==A?void 0:A.pAndCUAccepted)&&(0,s.jsx)(_f,{primary:!!E&&!!m,shape:"circle",icon:(0,s.jsx)($L,{}),className:"memori-header--button memori-header--button--knownfacts",disabled:!m||!E,onClick:()=>u(!0),title:T("knownFacts.title")||"Known facts"}),n.enableBoardOfExperts&&(0,s.jsx)(_f,{primary:!0,shape:"circle",icon:(0,s.jsx)(ZL,{}),className:"memori-header--button memori-header--button--experts",disabled:!m||!E,onClick:()=>d(!0),title:T("widget.showExpertsInTheBoard")||"Experts in this board"}),h&&y&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--speaker",icon:p?(0,s.jsx)(mU,{}):(0,s.jsx)(vU,{}),onClick:()=>f(!p),title:T("widget.sound")||"Sound"}),(0,s.jsx)(zU,{history:i,memori:n,className:"memori-header--button memori-header--button--export",disabled:!m||0===i.length}),v&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-settings",icon:(0,s.jsx)(FU,{}),onClick:()=>l(!0),title:T("widget.settings")||"Settings"}),g&&(0,s.jsx)(fj,{className:"memori-header--button memori-header--button-share",title:n.name,tenant:r,showQrCode:!0,align:"left"}),x&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-login",icon:(0,s.jsx)(_N,{}),onClick:()=>_(!0),title:C?T("login.user")||"User":T("login.login")||"Login"})]})};var bj=({tenant:e,userLang:t="en",integrationID:n,memoriHash:r})=>{const i="memorytwin"===(null==e?void 0:e.theme)?"memorytwin":"twincreator"===(null==e?void 0:e.theme)?"twincreator":"aisuru";return(0,s.jsxs)("div",{className:"memori--powered-by",children:[(0,s.jsx)("img",{src:`https://aisuru.com/images/${i}/logo.png`,alt:""}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"sr-only",children:"Powered by"}),(0,s.jsx)("a",{href:`https://memori.ai/${"it"===(null==t?void 0:t.toLowerCase())?"it":"en"}${n?`?integrationID=${n}`:""}${r?`${n?"&":"?"}memori=${r}`:""}`,target:"_blank",rel:"noopener noreferrer",children:"Memori.AI"})]})]})},Sj=(c=o("85Hg2"),c=o("85Hg2"),(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Sj||{})),xj=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(xj||{}),_j=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(_j||{}),wj=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.SetOrientation=3]="SetOrientation",e[e.GoToOption=4]="GoToOption",e[e.Search=5]="Search",e[e.ClearSearch=6]="ClearSearch",e[e.RegisterOption=7]="RegisterOption",e[e.UnregisterOption=8]="UnregisterOption",e))(wj||{});function Cj(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Zh(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Aj={1:e=>e.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{value:n,mode:r,compare:i}=e.propsRef.current,o=e.options.findIndex((e=>{let t=e.dataRef.current.value;return ch(r,{1:()=>n.some((e=>i(e,t))),0:()=>i(n,t)})}));return-1!==o&&(t=o),{...e,listboxState:0,activeOptionIndex:t}},2:(e,t)=>e.disabled===t.disabled?e:{...e,disabled:t.disabled},3:(e,t)=>e.orientation===t.orientation?e:{...e,orientation:t.orientation},4(e,t){var n;if(e.disabled||1===e.listboxState)return e;let r=Cj(e),i=SR(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},5:(e,t)=>{if(e.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},6:e=>e.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},7:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Cj(e,(e=>[...e,n]));if(null===e.activeOptionIndex){let{value:i,mode:o,compare:s}=e.propsRef.current,a=t.dataRef.current.value;ch(o,{1:()=>i.some((e=>s(e,a))),0:()=>s(i,a)})&&(r.activeOptionIndex=r.options.indexOf(n))}return{...e,...r}},8:(e,t)=>{let n=Cj(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},Ej=(0,c.createContext)(null);function Tj(e){let t=(0,c.useContext)(Ej);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Tj),t}return t}function Ij(e,t){return ch(t.type,Aj,e,t)}Ej.displayName="ListboxContext";let Mj=c.Fragment,Rj=gh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,horizontal:u=!1,multiple:d=!1,...h}=e;const p=u?"horizontal":"vertical";let f=Ah(n),[m,g]=AR(r,s,i),v=(0,c.useReducer)(Ij,{listboxState:1,propsRef:{current:{value:m,onChange:g,mode:d?1:0,compare:_h("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a)}},labelRef:(0,c.createRef)(),buttonRef:(0,c.createRef)(),optionsRef:(0,c.createRef)(),disabled:l,orientation:p,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1}),[{listboxState:y,propsRef:b,optionsRef:S,buttonRef:x},_]=v;b.current.value=m,b.current.mode=d?1:0,Sh((()=>{b.current.onChange=e=>ch(b.current.mode,{0:()=>g(e),1(){let t=b.current.value.slice(),{compare:n}=b.current,r=t.findIndex((t=>n(t,e)));return-1===r?t.push(e):t.splice(r,1),g(t)}})}),[g,b]),Sh((()=>_({type:2,disabled:l})),[l]),Sh((()=>_({type:3,orientation:p})),[p]),Dp([x,S],((e,t)=>{var n;_({type:1}),Jh(t,Kh.Loose)||(e.preventDefault(),null==(n=x.current)||n.focus())}),0===y);let w=(0,c.useMemo)((()=>({open:0===y,disabled:l,value:m})),[y,l,m]),C={ref:f};return t(c).createElement(Ej.Provider,{value:v},t(c).createElement(Pp,{value:ch(y,{0:Mp.Open,1:Mp.Closed})},null!=o&&null!=m&&xR({[o]:m}).map((([e,n])=>t(c).createElement(Dh,{features:Lh.Hidden,...vh({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:n})}))),ph({ourProps:C,theirProps:h,slot:w,defaultTag:Mj,name:"Listbox"})))})),Pj=gh((function(e,t){var n;let[r,i]=Tj("Listbox.Button"),o=Ah(r.buttonRef,t),s=`headlessui-listbox-button-${kh()}`,a=nf(),l=_h((e=>{switch(e.key){case Th.Space:case Th.Enter:case Th.ArrowDown:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:bR.First})}));break;case Th.ArrowUp:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:bR.Last})}))}})),u=_h((e=>{if(e.key===Th.Space)e.preventDefault()})),d=_h((e=>{if(Ih(e.currentTarget))return e.preventDefault();0===r.listboxState?(i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),i({type:0}))})),h=mR((()=>{if(r.labelRef.current)return[r.labelRef.current.id,s].join(" ")}),[r.labelRef.current,s]),p=(0,c.useMemo)((()=>({open:0===r.listboxState,disabled:r.disabled,value:r.propsRef.current.value})),[r]),f=e;return ph({ourProps:{ref:o,id:s,type:vR(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.optionsRef.current)?void 0:n.id,"aria-expanded":r.disabled?void 0:0===r.listboxState,"aria-labelledby":h,disabled:r.disabled,onKeyDown:l,onKeyUp:u,onClick:d},theirProps:f,slot:p,defaultTag:"button",name:"Listbox.Button"})})),Nj=gh((function(e,t){let[n]=Tj("Listbox.Label"),r=`headlessui-listbox-label-${kh()}`;return ph({ourProps:{ref:Ah(n.labelRef,t),id:r,onClick:_h((()=>{var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))},theirProps:e,slot:(0,c.useMemo)((()=>({open:0===n.listboxState,disabled:n.disabled})),[n]),defaultTag:"label",name:"Listbox.Label"})})),Oj=dh.RenderStrategy|dh.Static,kj=gh((function(e,t){var n;let[r,i]=Tj("Listbox.Options"),o=Ah(r.optionsRef,t),s=`headlessui-listbox-options-${kh()}`,a=nf(),l=nf(),u=Rp(),d=null!==u?u===Mp.Open:0===r.listboxState;(0,c.useEffect)((()=>{var e;let t=r.optionsRef.current;!t||0===r.listboxState&&t!==(null==(e=Fh(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})}),[r.listboxState,r.optionsRef]);let h=_h((e=>{switch(l.dispose(),e.key){case Th.Space:if(""!==r.searchQuery)return e.preventDefault(),e.stopPropagation(),i({type:5,value:e.key});case Th.Enter:if(e.preventDefault(),e.stopPropagation(),null!==r.activeOptionIndex){let{dataRef:e}=r.options[r.activeOptionIndex];r.propsRef.current.onChange(e.current.value)}0===r.propsRef.current.mode&&(i({type:1}),zh().nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})})));break;case ch(r.orientation,{vertical:Th.ArrowDown,horizontal:Th.ArrowRight}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.Next});case ch(r.orientation,{vertical:Th.ArrowUp,horizontal:Th.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.Previous});case Th.Home:case Th.PageUp:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.First});case Th.End:case Th.PageDown:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.Last});case Th.Escape:return e.preventDefault(),e.stopPropagation(),i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case Th.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(i({type:5,value:e.key}),l.setTimeout((()=>i({type:6})),350))}})),p=mR((()=>{var e,t,n;return null!=(n=null==(e=r.labelRef.current)?void 0:e.id)?n:null==(t=r.buttonRef.current)?void 0:t.id}),[r.labelRef.current,r.buttonRef.current]),f=(0,c.useMemo)((()=>({open:0===r.listboxState})),[r]),m=e;return ph({ourProps:{"aria-activedescendant":null===r.activeOptionIndex||null==(n=r.options[r.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===r.propsRef.current.mode||void 0,"aria-labelledby":p,"aria-orientation":r.orientation,id:s,onKeyDown:h,role:"listbox",tabIndex:0,ref:o},theirProps:m,slot:f,defaultTag:"ul",features:Oj,visible:d,name:"Listbox.Options"})})),Lj=gh((function(e,t){let{disabled:n=!1,value:r,...i}=e,[o,s]=Tj("Listbox.Option"),a=`headlessui-listbox-option-${kh()}`,l=null!==o.activeOptionIndex&&o.options[o.activeOptionIndex].id===a,{value:u,compare:d}=o.propsRef.current,h=ch(o.propsRef.current.mode,{1:()=>u.some((e=>d(e,r))),0:()=>d(u,r)}),p=(0,c.useRef)(null),f=Ah(t,p);Sh((()=>{if(0!==o.listboxState||!l||0===o.activationTrigger)return;let e=zh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[p,l,o.listboxState,o.activationTrigger,o.activeOptionIndex]);let m=(0,c.useRef)({disabled:n,value:r,domRef:p});Sh((()=>{m.current.disabled=n}),[m,n]),Sh((()=>{m.current.value=r}),[m,r]),Sh((()=>{var e,t;m.current.textValue=null==(t=null==(e=p.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[m,p]);let g=_h((()=>o.propsRef.current.onChange(r)));Sh((()=>(s({type:7,id:a,dataRef:m}),()=>s({type:8,id:a}))),[m,a]);let v=_h((e=>{if(n)return e.preventDefault();g(),0===o.propsRef.current.mode&&(s({type:1}),zh().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})))})),y=_h((()=>{if(n)return s({type:4,focus:bR.Nothing});s({type:4,focus:bR.Specific,id:a})})),b=_h((()=>{n||l||s({type:4,focus:bR.Specific,id:a,trigger:0})})),S=_h((()=>{n||!l||s({type:4,focus:bR.Nothing})})),x=(0,c.useMemo)((()=>({active:l,selected:h,disabled:n})),[l,h,n]);return ph({ourProps:{id:a,ref:f,role:"option",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,"aria-selected":h,disabled:void 0,onClick:v,onFocus:y,onPointerMove:b,onMouseMove:b,onPointerLeave:S,onMouseLeave:S},theirProps:i,slot:x,defaultTag:"li",name:"Listbox.Option"})})),Dj=Object.assign(Rj,{Button:Pj,Label:Nj,Options:kj,Option:Lj});var Bj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",focusable:"false",role:"img",className:e,fill:"currentColor","aria-label":t,children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z",clipRule:"evenodd"})});const zj={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},Fj=(0,c.memo)((({defaultDate:e,onChange:t,disabled:n=!1})=>{const{t:r,i18n:i}=_e(),[o,a]=(0,c.useState)(e?"string"==typeof e?Cs.DateTime.fromISO(e):Cs.DateTime.fromJSDate(e):Cs.DateTime.now());return(0,c.useEffect)((()=>{t(o)}),[o,t]),(0,s.jsxs)("div",{className:"memori--date-selector",children:[(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Dj,{value:o,onChange:e=>{a(e)},disabled:n,name:"day",children:[(0,s.jsxs)(Dj.Label,{className:"memori--date-selector__select-label",children:[r("day"),":"]}),(0,s.jsxs)(Dj.Button,{"aria-label":r("day"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.day}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(Bj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Dj.Options,{className:"memori--date-selector__select-options",children:[...Array(31).keys()].map((e=>(0,s.jsx)(Dj.Option,{value:o.set({day:e+1}),className:"memori--date-selector__select-option",children:e+1},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Dj,{value:o,onChange:e=>{a(e)},disabled:n,name:"month",children:[(0,s.jsxs)(Dj.Label,{className:"memori--date-selector__select-label",children:[r("month"),":"]}),(0,s.jsxs)(Dj.Button,{"aria-label":r("month"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:zj["it"===i.language?"it":"en"][o.month-1]}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(Bj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Dj.Options,{className:"memori--date-selector__select-options",children:zj["it"===i.language?"it":"en"].map((e=>(0,s.jsx)(Dj.Option,{className:"memori--date-selector__select-option",value:o.set({month:zj["it"===i.language?"it":"en"].findIndex((t=>t===e))+1}),children:e},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Dj,{value:o,onChange:e=>{a(e)},disabled:n,name:"year",children:[(0,s.jsxs)(Dj.Label,{className:"memori--date-selector__select-label",children:[r("year"),":"]}),(0,s.jsxs)(Dj.Button,{"aria-label":r("year"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.year}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(Bj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Dj.Options,{className:"memori--date-selector__select-options",children:[...Array(Cs.DateTime.now().year-1899).keys()].sort(((e,t)=>t-e)).map((e=>(0,s.jsx)(Dj.Option,{value:o.set({year:e+1900}),className:"memori--date-selector__select-option",children:e+1900},e)))})})]})})]})}));Fj.displayName="DateSelector";var Uj=Fj;c=o("85Hg2");var jj=({visible:e=!1,onClose:n,minAge:r})=>{const{t:i}=_e(),[o,a]=(0,c.useState)(),[l,u]=(0,c.useState)(),[d,h]=(0,c.useState)(!1),p=(0,c.useCallback)((()=>{if(h(!0),!o)return t(Yu).error(i("requiredField")),u(i("requiredField")||"Required field"),void h(!1);if(Cs.DateTime.now().diff(o,"years").years<r)return t(Yu).error(i("underageTwinSession",{age:r})),u(i("underageTwinSession",{age:r})||`You must be at least ${r} years old to interact with this Twin`),void h(!1);n(o.toJSDate().toISOString())}),[o,r,n,i]);return(0,s.jsxs)(ZR,{open:e,title:i("ageVerification"),className:"age-verification-modal",closable:!0,onClose:()=>n(),children:[(0,s.jsx)("p",{children:i("ageVerificationText",{minAge:r})}),(0,s.jsxs)("form",{className:"age-verification-form",onSubmit:e=>{e.preventDefault(),p()},children:[(0,s.jsx)("div",{className:"form-item",children:(0,s.jsxs)("fieldset",{name:"birthDate",children:[(0,s.jsx)("legend",{className:"sr-only",children:i("birthDate")}),(0,s.jsx)(Uj,{defaultDate:new Date(Date.now()),onChange:e=>{a(e)}}),(0,s.jsx)("p",{className:"form-item-help",children:i("birthDateHelper")}),l&&(0,s.jsx)("p",{className:"form-item-error",children:l})]})}),(0,s.jsx)("div",{className:"form-item form-submit",children:(0,s.jsx)(_f,{primary:!0,htmlType:"submit",className:"age-verification-submit",loading:d,disabled:!o,children:i("confirm")})})]})]})};c=o("85Hg2");var Hj=({label:e,className:n,disabled:r=!1,indeterminate:i=!1,checked:o,children:a,onChange:l,name:u,...d})=>{const h=(0,c.useRef)(null);return(0,c.useEffect)((()=>{h.current&&(h.current.indeterminate=i)}),[h,i]),(0,s.jsxs)("label",{className:t(ws)("memori-checkbox",n,{"memori-checkbox--disabled":r,"memori-checkbox--indeterminate":i}),children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{ref:h,type:"checkbox",...d,name:u,disabled:r,checked:o||i,className:"memori-checkbox--input",onChange:l}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),!!(null==e?void 0:e.length)&&(0,s.jsx)("span",{className:"memori-checkbox--text",children:e})]})};c=o("85Hg2");var Gj=({className:e,value:n,name:r,displayValue:i,options:o,onChange:a,disabled:l=!1,label:u,placeholder:d})=>(0,s.jsx)("div",{className:t(ws)("memori-select",e),children:(0,s.jsxs)(Dj,{value:n,onChange:e=>{a(e)},disabled:l,name:r,children:[u&&(0,s.jsxs)(Dj.Label,{className:"memori-select--label",children:[u,":"]}),(0,s.jsxs)(Dj.Button,{"aria-label":u,className:"memori-select--button",children:[(0,s.jsx)("span",{className:t(ws)("memori-select--value",{"memori-select--value-placeholder":!n}),children:n?i||n:d}),(0,s.jsx)("span",{className:"memori-select--icon",children:(0,s.jsx)(Bj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Dj.Options,{className:"memori-select--options",children:o.map((e=>(0,s.jsx)(Dj.Option,{value:e.value,className:"memori-select--option",children:e.label},e.value)))})})]})});const Vj={muteSpeaker:"@memori:muteSpeaker",microphoneMode:"@memori:microphoneMode",continuousSpeechTimeout:"@memori:continuousSpeechTimeout",birthDate:"@memori:birthDate",controlsPosition:"@memori:controlsPosition",hideEmissions:"@memori:hideEmissions",loginToken:"@memori:loginToken",location:"@memori:location"},Wj=(e,t)=>{var n;try{const r=window.localStorage.getItem(null!==(n=Vj[e])&&void 0!==n?n:e);if(!r)return t;try{return JSON.parse(r)}catch(e){return r}}catch(e){return console.error("error",e),t}},qj=(e,t)=>{var n;try{window.localStorage.setItem(null!==(n=Vj[e])&&void 0!==n?n:e,t.toString())}catch(e){console.error("error",e)}},Kj=e=>{var t;try{window.localStorage.removeItem(null!==(t=Vj[e])&&void 0!==t?t:e)}catch(e){console.error("error",e)}},Jj=[2,3,5,10,15,20,30,60];var Yj=({open:e,layout:t="DEFAULT",onClose:n,microphoneMode:r="HOLD_TO_TALK",continuousSpeechTimeout:i,setMicrophoneMode:o,setContinuousSpeechTimeout:a,controlsPosition:l,setControlsPosition:c,hideEmissions:u,setHideEmissions:d,additionalSettings:h})=>{const{t:p}=_e();return(0,s.jsxs)(Cf,{className:"memori-settings-drawer",open:e,onClose:n,title:p("widget.settings")||"Settings",description:p("write_and_speak.settingsHeaderLabel"),children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#microphoneMode",children:[p("write_and_speak.microphoneMode")||"Microphone mode",":"]}),(0,s.jsxs)(pU,{id:"microphoneMode",name:"microphoneMode",value:r,defaultValue:r,className:"memori-settings-drawer--microphoneMode-radio",onChange:e=>{let t="CONTINUOUS"===e?"CONTINUOUS":"HOLD_TO_TALK";o(t),qj("microphoneMode",t)},children:[(0,s.jsx)(pU.Option,{value:"HOLD_TO_TALK",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("write_and_speak.holdToSpeak")||"Hold to speak"})}),(0,s.jsx)(pU.Option,{value:"CONTINUOUS",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("write_and_speak.continuousSpeechLabel")||"Continuous speech"})})]})]}),"CONTINUOUS"===r&&(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(Gj,{label:p("write_and_speak.secondsLabel")||"Seconds",placeholder:p("write_and_speak.secondsLabel")||"Seconds",options:Jj.map((e=>({value:e,label:e}))),value:i,onChange:e=>{a(e),qj("continuousSpeechTimeout",e)}})}),"TOTEM"===t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#controlsPosition",children:[p("write_and_speak.controlsPosition")||"Controls",":"]}),(0,s.jsxs)(pU,{id:"controlsPosition",name:"controlsPosition",value:l,defaultValue:l,className:"memori-settings-drawer--controlsposition-radio",onChange:e=>{c(e),qj("controlsPosition",e)},children:[(0,s.jsx)(pU.Option,{value:"center",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("center")||"Center"})}),(0,s.jsx)(pU.Option,{value:"bottom",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("bottom")||"Bottom"})})]})]}),(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(Hj,{label:p("write_and_speak.hideEmissionsLabel")||"Hide emissions",name:"hideControls",checked:u,onChange:e=>{d(e.target.checked),qj("hideEmissions",e.target.checked)}})})]}),h&&(0,s.jsx)("div",{className:"memori-settings-drawer--field controls",children:h})]})};c=o("85Hg2");var Xj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"})});var Qj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M15 18L9 12 15 6"})});var Zj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M9 18L15 12 9 6"})});var $j=({apiURL:e,sessionID:n,memori:r,visible:i=!0,initialKnownFacts:o=[],closeDrawer:a})=>{var l;const{t:u}=_e(),d=Q(e),{getKnownFactsPaginated:h,deleteKnownFact:p}=d.knownFacts,[f,m]=(0,c.useState)(o),[g,v]=(0,c.useState)(25),[y,b]=(0,c.useState)(0),[S,x]=(0,c.useState)(null!==(l=null==o?void 0:o.length)&&void 0!==l?l:0),[_,w]=(0,c.useState)(!1),C=async(e,r,i)=>{if(n||e){w(!0);try{const{knownFacts:o,count:s,...a}=await h(null!=e?e:n,null!=r?r:y,null!=i?i:g);m(null!=o?o:[]),x(null!=s?s:0),0!==a.resultCode&&(console.error(a),t(Yu).error(u(eO(a.resultCode))))}catch(e){console.error("KNOWN_FACTS/FETCH",e),m(null!=o?o:[])}w(!1)}};(0,c.useEffect)((()=>{C()}),[]);const[A,E]=(0,c.useState)(!1),[T,I]=(0,c.useState)(),[M,R]=(0,c.useState)([]);return(0,s.jsxs)(Cf,{open:i,width:"80%",className:"memori-known-facts-drawer",onClose:()=>a(),title:u("knownFacts.title"),children:[(0,s.jsx)("p",{children:u("knownFacts.description",{memoriName:r.name})}),(0,s.jsxs)(xf,{spinning:_,children:[(0,s.jsxs)("div",{className:"memori-known-facts-actions",children:[(0,s.jsxs)(_f,{primary:!0,danger:!0,onClick:()=>{E(!0)},className:"memori-known-facts-delete-selected",disabled:0===(null==M?void 0:M.length),icon:(0,s.jsx)(Xj,{}),loading:_,children:[u("selected")," (",null==M?void 0:M.length,")"]}),(0,s.jsx)(ZR,{className:"memori-known-facts-modal",open:A,closable:!0,title:M.length>1?u("knownFacts.deleteSelectedConfirmTitle"):u("knownFacts.deleteConfirmTitle"),description:M.length>1?u("knownFacts.deleteSelectedConfirmMessage",{number:M.length}):u("knownFacts.deleteConfirmMessage"),onClose:()=>{E(!1)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_f,{ghost:!0,onClick:()=>{E(!1)},children:u("cancel")}),(0,s.jsx)(_f,{primary:!0,danger:!0,onClick:async()=>{try{const e=M.map((e=>p(n,e)));Promise.all(e).then((e=>{if(e.every((e=>0===e.resultCode)))t(Yu).success(u("knownFacts.deleteSuccess")),R([]),C(),E(!1);else{let n=e.find((e=>0!==e.resultCode));console.error(n),void 0!==(null==n?void 0:n.resultCode)&&t(Yu).error(u(eO(null==n?void 0:n.resultCode)))}}))}catch(e){let n=e;t(Yu).error(u("Error")+n.message)}},children:u("confirm")})]})})]}),S>25&&(0,s.jsxs)("nav",{className:"memori--table--pagination",children:[S>g&&(0,s.jsxs)("div",{className:"memori--table--pagination--pages",children:[(0,s.jsx)(_f,{shape:"circle",disabled:0===y||y<g,padded:!1,title:u("previous")||"Previous",icon:(0,s.jsx)(Qj,{}),onClick:()=>{let e=(y/g-1)*g;b(e),C(void 0,e,g)}}),(0,s.jsxs)("span",{className:"memori--table--pagination--pages--current",children:[Math.ceil(y/g)+1," /"," ",Math.ceil(S/g)]}),(0,s.jsx)(_f,{shape:"circle",padded:!1,title:u("next")||"Next",icon:(0,s.jsx)(Zj,{}),disabled:(y/g+1)*g>=S,onClick:()=>{let e=(y/g+1)*g;b(e),C(void 0,e,g)}})]}),(0,s.jsx)(Gj,{options:[{label:`25 / ${u("page")||"page"}`,value:25},{label:`50 / ${u("page")||"page"}`,value:50},{label:`100 / ${u("page")||"page"}`,value:100}],value:g,displayValue:`${g} / ${u("page")||"page"}`,onChange:e=>{v(e),b(0),C(void 0,0,e)}})]}),(0,s.jsxs)("table",{className:"memori--table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Hj,{checked:!!(null==f?void 0:f.length)&&(null==M?void 0:M.length)===f.length,indeterminate:!!(null==f?void 0:f.length)&&!!(null==M?void 0:M.length)&&(null==M?void 0:M.length)!==(null==f?void 0:f.length),onChange:e=>{e.target.checked?R(f.map((e=>e.knownFactID))):R([])}})}),(0,s.jsx)("th",{children:u("knownFacts.text")}),(0,s.jsx)("th",{className:"mobile-hidden",children:u("createdAt")}),(0,s.jsx)("th",{className:"memori--table--column-right",children:u("actions")})]})}),(0,s.jsx)("tbody",{children:f.map((e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Hj,{checked:null==M?void 0:M.includes(e.knownFactID),onChange:t=>{t.target.checked?R((t=>[...new Set([...t,e.knownFactID])])):R((t=>t.filter((t=>t!==e.knownFactID))))}})}),(0,s.jsx)("td",{children:e.text}),(0,s.jsx)("td",{className:"mobile-hidden",children:(0,s.jsx)("span",{className:"memori--table--date",children:e.creationTimestamp?new Intl.DateTimeFormat("it",{dateStyle:"short",timeStyle:"short"}).format(new Date(e.creationTimestamp)):"-"})}),(0,s.jsx)("td",{className:"memori--table--column-right",children:(0,s.jsxs)("div",{className:"memori--table--action-column",children:[(0,s.jsx)(_f,{danger:!0,ghost:!0,shape:"circle",icon:(0,s.jsx)(Xj,{}),disabled:(null==M?void 0:M.length)>0,title:u("delete")||"Delete",onClick:()=>I(e.knownFactID)}),(0,s.jsx)(ZR,{className:"memori-known-facts-modal",open:T===e.knownFactID,closable:!0,title:u("knownFacts.deleteConfirmTitle"),description:u("knownFacts.deleteConfirmMessage"),onClose:()=>{I(void 0)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_f,{ghost:!0,onClick:()=>{I(void 0)},children:u("cancel")}),(0,s.jsx)(_f,{primary:!0,danger:!0,onClick:async()=>{try{const r=await p(n,e.knownFactID);0===r.resultCode?(t(Yu).success(u("knownFacts.deleteSuccess")),R([]),C(),I(void 0)):(console.error(r),t(Yu).error(u(eO(r.resultCode),{ns:"common"})))}catch(e){let n=e;t(Yu).error(u("Error")+n.message)}},children:u("confirm")})]})})]})})]},e.knownFactID)))})]})]})]})};var eH=({open:e=!1,baseUrl:t,apiUrl:n,tenant:r,experts:i,onClose:o})=>{const{t:a}=_e();return(0,s.jsx)(Cf,{open:e,onClose:o,className:"memori--experts-drawer",title:(0,s.jsx)("h2",{className:"memori--experts-drawer--title",children:a("widget.expertsInTheBoard")}),children:(0,s.jsx)("ul",{className:"memori--experts-drawer--list",children:i.map((e=>(0,s.jsxs)("li",{className:"memori--experts-drawer--item",children:[(0,s.jsx)("figure",{className:"memori--experts-drawer--avatar",children:(0,s.jsx)("img",{src:`${n}/api/v1/memoriai/memori/avatar/${e.expertMemoriID}`,alt:e.name,onError:e=>{e.currentTarget.src=xN({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:t}),e.currentTarget.onerror=null}})}),(0,s.jsxs)("div",{className:"memori--experts-drawer--content",children:[(0,s.jsx)("h3",{className:"memori--experts-drawer--name",children:e.name}),(0,s.jsx)("p",{className:"memori--experts-drawer--description",children:e.description})]})]},e.expertID)))})})};c=o("85Hg2"),c=o("85Hg2");const tH=["memori","private","public","api","404","500","it","en","account","auth","logout","privacy_and_cookie","unauthorized","users","virtual_spaces"];var nH=({tenant:e,apiUrl:n,onLogin:r,goToLogin:i,__TEST__waitingForOtp:o=!1})=>{const{t:a,i18n:l}=_e(),u="it"===l.language?"it":"en",d=Q(n),{userSignUp:h,userConfirmSignUp:p,resendVerificationCode:f}=d.backend,[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),[b,S]=(0,c.useState)(),[x,_]=(0,c.useState)(),w=!b||b&&eR.test(b),C=w&&b&&b.length>=24,A=!b||0===b.length,E=!w||A?0:b.length<8?15:b.length>=32?100:(b.length-8)*(50/24)+50,[T,I]=(0,c.useState)(!1),[M,R]=(0,c.useState)(!1),[P,N]=(0,c.useState)(o),[O,k]=(0,c.useState)(null),[L,D]=(0,c.useState)();(0,c.useEffect)((()=>{D(window.location.href)}),[]);return P?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var i,o,s;n.preventDefault();const l=n.currentTarget,c=null!==(i=l.tenant.value)&&void 0!==i?i:e.id,u=null!==(o=l.userName.value)&&void 0!==o?o:v,d=null!==(s=l.password.value)&&void 0!==s?s:b,h=l.verificationCode.value;I(!0),k(null);try{const{user:e,token:n,...i}=await p({tenant:c,userName:u,password:d,verificationCode:h});0!==i.resultCode?(console.error(i),t(Yu).error(a(eO(i.resultCode)))):e&&n&&(t(Yu).success(a("success")),r(e,n))}catch(e){let n=e;console.error("[validate otp]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{I(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"userName",value:v}),(0,s.jsx)("input",{type:"hidden",name:"password",value:b}),(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsxs)("label",{htmlFor:"#verificationCode",children:[a("login.otpCode"),(0,s.jsx)("input",{id:"verificationCode",name:"verificationCode",type:"text",required:!0,autoComplete:"one-time-code",placeholder:a("login.otpCode")||"OTP"})]}),(0,s.jsx)("p",{children:(0,s.jsx)(_f,{outlined:!0,onClick:async n=>{if(n.preventDefault(),v){R(!0);try{const n=await f({tenant:null==e?void 0:e.id,userName:v});0===n.resultCode?t(Yu).success(a("resentVerificationCode")):(console.error(n),t(Yu).error(a(eO(n.resultCode))))}catch(e){let n=e;console.error("[resend otp]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{R(!1)}}},loading:M,children:a("login.resendVerificationCode")})}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:T,children:a("confirm")})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var r,i,o,s,l,c,u;n.preventDefault();const d=n.currentTarget,p=null!==(r=d.tenant.value)&&void 0!==r?r:e.id,f=(null!==(i=d.eMail.value)&&void 0!==i?i:m).toLowerCase(),g=null!==(o=d.userName.value)&&void 0!==o?o:v,y=d.password.value,b=new Date(null===(s=d.birthDate)||void 0===s?void 0:s.value).toISOString(),S=null===(l=d.tnCAndPPAccepted)||void 0===l?void 0:l.checked,x=null===(c=d.pAndCUAccepted)||void 0===c?void 0:c.checked,_=null===(u=d.referral)||void 0===u?void 0:u.value;if(!(f&&g&&y&&b&&S))return void k(a("missingData"));I(!0),k(null);if(((new Date).getTime()-new Date(b).getTime())/1e3/60/60/24/365<14)return t(Yu).error(a("login.underage",{age:14})),void k(a("login.underage",{age:14}));try{const{user:e,...n}=await h({tenant:p,eMail:f,userName:g,password:y,birthDate:b,tnCAndPPAccepted:S,tnCAndPPAcceptanceDate:(new Date).toISOString(),pAndCUAccepted:x,pAndCUAcceptanceDate:(new Date).toISOString(),referral:_});0!==n.resultCode?(console.error(n),t(Yu).error(a(eO(n.resultCode)))):e&&(t(Yu).success(a("success")),N(!0))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{I(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsx)("input",{type:"hidden",name:"referral",value:L}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[a("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",required:!0,autoComplete:"email",placeholder:a("login.email")||"Email",onChange:e=>g(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!tR.test(m)})]}),!!(null==m?void 0:m.length)&&!tR.test(m)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.emailFormatError")}),(0,s.jsxs)("label",{htmlFor:"userName",children:[a("login.username"),(0,s.jsx)("input",{type:"text",name:"userName",id:"userName",required:!0,autoComplete:"username",placeholder:a("login.username")||"Username",onFocus:()=>{if(!(null==v?void 0:v.length)&&(null==m?void 0:m.length)){let e=(e=>e.split("@")[0].replace(/[^a-zA-Z0-9]/g,""))(m);const t=document.getElementById("userName");t&&(t.value=e,y(e))}},onChange:e=>y(e.target.value),"aria-invalid":!!(null==v?void 0:v.length)&&(tH.includes(v.toLowerCase())||!nR.test(v))})]}),!!(null==v?void 0:v.length)&&tH.includes(v.toLowerCase())&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameContainsReservedWord")}),!!(null==v?void 0:v.length)&&!nR.test(v)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameFormatError")}),(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[a("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.birthDateHelper")})}),(0,s.jsxs)("label",{htmlFor:"#password",children:[a("login.password"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.password")||"Password",onChange:e=>S(e.target.value),"aria-invalid":!w})]}),!w&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[a("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.confirmPassword")||"Password",onChange:e=>_(e.target.value),"aria-invalid":!!(null==b?void 0:b.length)&&!!(null==x?void 0:x.length)&&b!==x})]}),!!(null==b?void 0:b.length)&&!!(null==x?void 0:x.length)&&b!==x&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:E,id:"password-strength-meter"}),(0,s.jsx)("small",{children:a("login.pwd"+(C?"Strong":w?"Acceptable":"Weak"))}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",required:!0,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:a("login.privacyAndCookiePolicy")})," ",a("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/tos`,target:"_blank",rel:"noopener noreferrer",children:a("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",a("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.deepThoughtExplaination")})}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:T,children:a("login.signUp")}),(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[a("login.alreadyHaveAnAccount")," ",(0,s.jsx)(_f,{outlined:!0,onClick:i,children:a("login.backToLogin")})]})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]})};c=o("85Hg2");const rH=["image/jpeg","image/png","image/jpg","image/gif"];var iH=({user:e,loginToken:n,apiUrl:r,onUserUpdate:i})=>{const{t:o,i18n:a}=_e(),l="it"===a.language?"it":"en",u=Q(r),{updateUser:d,uploadAsset:h}=u.backend,[p,f]=(0,c.useState)(),[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),b=!m||m&&eR.test(m),S=b&&m&&m.length>=24,x=!m||0===m.length,_=!b||x?0:m.length<8?15:m.length>=32?100:(m.length-8)*(50/24)+50,[w,C]=(0,c.useState)(!1),[A,E]=(0,c.useState)(null),T=async(e,r)=>{try{const{user:s,...a}=await d(n,e,r);0!==a.resultCode?(console.error(a),t(Yu).error(o(eO(a.resultCode)))):s&&(t(Yu).success(o("success")),i(s))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{C(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"memori--login-drawer--edit-account-title",children:o("login.editAccount")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form memori--login-drawer--account-form",onSubmit:async r=>{var i,s,a,l,c;if(r.preventDefault(),!e.userID)return;const u=e.userID,d=r.currentTarget,f=null!==(i=d.eMail.value)&&void 0!==i?i:p,g=null!==(s=d.newPassword.value)&&void 0!==s?s:m,v=d.password.value,y=d.confirmPassword.value,b=null===(a=d.pAndCUAccepted)||void 0===a?void 0:a.checked,S=null===(c=null===(l=d.avatar)||void 0===l?void 0:l.files)||void 0===c?void 0:c[0];if(C(!0),E(null),(null==g?void 0:g.length)&&g!==y)return E(o("login.passwordMatchingError")),void C(!1);let x={...(null==f?void 0:f.length)&&f!==e.eMail?{eMail:f}:{},...g?{password:v,newPassword:g}:{},...void 0!==b&&b!==e.pAndCUAccepted?{pAndCUAccepted:b,pAndCUAcceptanceDate:(new Date).toISOString()}:{}};if(0===Object.values(x).length&&!S)return console.debug("No changes to submit"),void C(!1);if(S){const e=new FileReader;e.onload=async e=>{var r,i;try{const{asset:s,...a}=await h(null!==(r=S.name)&&void 0!==r?r:"avatar",null===(i=e.target)||void 0===i?void 0:i.result,n);0!==a.resultCode?(console.error(a),t(Yu).error(o(eO(a.resultCode)))):s&&(x.avatarURL=s.assetURL,await T(u,x))}catch(e){let n=e;console.error("[avatar upload]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}},e.readAsDataURL(S)}else await T(u,x)},children:[(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.emailChange")}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[o("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",autoComplete:"email",placeholder:e.eMail,onChange:e=>f(e.target.value),"aria-invalid":!!(null==p?void 0:p.length)&&!tR.test(p)})]}),!!(null==p?void 0:p.length)&&!tR.test(p)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.emailFormatError")})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.passwordChange")}),(0,s.jsxs)("label",{htmlFor:"#password",children:[o("login.currentPassword"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"password",placeholder:o("login.currentPassword")||"Password"})]}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[o("login.newPassword"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",autoComplete:"new-password",placeholder:o("login.password")||"Password",onChange:e=>g(e.target.value),"aria-invalid":!b})]}),!b&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[o("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",autoComplete:"new-password",placeholder:o("login.confirmPassword")||"Password",onChange:e=>y(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v})]}),!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:_,id:"password-strength-meter"}),(0,s.jsx)("small",{children:o("login.pwd"+(S?"Strong":b?"Acceptable":"Weak"))})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.avatarChange")}),(0,s.jsxs)("label",{htmlFor:"#avatar",children:["Avatar",(0,s.jsx)("input",{type:"file",name:"avatar",id:"avatar",accept:rH.join(", "),placeholder:e.avatarURL})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox memori-checkbox--disabled",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",disabled:!0,defaultChecked:e.tnCAndPPAccepted,checked:e.tnCAndPPAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:o("login.privacyAndCookiePolicy")})," ",o("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/tos`,target:"_blank",rel:"noopener noreferrer",children:o("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input",defaultChecked:e.pAndCUAccepted}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsx)(AN,{align:"left",content:o("login.deepThoughtExplaination"),children:(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",o("login.optional"),")"]})})]})})]}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:w,children:o("login.save")})]}),A&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:A})]})};var oH=({open:e=!1,onClose:n,onLogin:r,onLogout:i,user:o,loginToken:a,tenant:l,apiUrl:u,__TEST__signup:d=!1,__TEST__needMissingData:h=!1,__TEST__waitingForOtp:p=!1,__TEST__changePwd:f=!1})=>{var m,g;const{t:v,i18n:y}=_e(),b="it"===y.language?"it":"en",S=Q(u),{userLogin:x,updateUser:_}=S.backend,w=(null==o?void 0:o.userID)&&a,[C,A]=(0,c.useState)(!1),[E,T]=(0,c.useState)(null),[I,M]=(0,c.useState)(d),[R,P]=(0,c.useState)(f?{flowID:"flowID",tenant:l.id,eMail:"email",userName:"username",password:"password"}:void 0),[N,O]=(0,c.useState)(h?{token:"token",birthDate:!0,tnCAndPPAccepted:!0}:{}),[k,L]=(0,c.useState)(),[D,B]=(0,c.useState)(),z=!k||k&&eR.test(k),F=z&&k&&k.length>=24,U=!k||0===k.length,j=!z||U?0:k.length<8?15:k.length>=32?100:(k.length-8)*(50/24)+50;return(0,s.jsx)(Cf,{open:e,onClose:n,className:t(ws)("memori--login-drawer",{"memori--login-drawer--logged":w,"memori--login-drawer--signup":I}),title:(0,s.jsx)("span",{className:"memori--login-drawer--title",children:w?v("login.loggedDrawerTitle",{name:o.userName}):v(I?"login.signupDrawerTitle":"login.loginDrawerTitle")}),children:w?(0,s.jsxs)("div",{className:"memori--login-drawer--logged",children:[o.avatarURL&&(0,s.jsx)("figure",{className:"memori--login-drawer--avatar",children:(0,s.jsx)("img",{src:o.avatarURL,alt:o.userName})}),(0,s.jsx)(_f,{primary:!0,onClick:()=>{i()},children:v("login.logout")}),(0,s.jsx)(iH,{user:o,loginToken:a,apiUrl:u,onUserUpdate:e=>r(e,a)})]}):(null===(m=null==N?void 0:N.token)||void 0===m?void 0:m.length)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{children:v("login.missingData")}),(0,s.jsx)("p",{children:v("login.missingDataHelper")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,s;e.preventDefault();const a=e.currentTarget,l=null===(n=a.birthDate)||void 0===n?void 0:n.value,c=null===(i=a.tnCAndPPAccepted)||void 0===i?void 0:i.checked,u=null===(s=a.pAndCUAccepted)||void 0===s?void 0:s.checked;if(!(null==o?void 0:o.userID)||!(null==N?void 0:N.token))return;if(!l||!c)return void T(v("missingData"));let d={userID:o.userID,birthDate:(null==o?void 0:o.birthDate)||!N.birthDate?void 0:l,tnCAndPPAccepted:c||(null==o?void 0:o.tnCAndPPAccepted),tnCAndPPAcceptanceDate:c?(new Date).toISOString():void 0,pAndCUAccepted:u||(null==o?void 0:o.pAndCUAccepted),pAndCUAcceptanceDate:u?(new Date).toISOString():void 0};const{user:h,...p}=await _(N.token,o.userID,d);0!==p.resultCode?(console.error(p),t(Yu).error(v(eO(p.resultCode))),T(p.resultMessage)):(t(Yu).success(v("success")),r(h||d,N.token))},children:[N.birthDate&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[v("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.birthDateHelper")})})]}),(null==N?void 0:N.tnCAndPPAccepted)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:v("login.privacyAndCookiePolicy")})," ",v("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/tos`,target:"_blank",rel:"noopener noreferrer",children:v("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",defaultChecked:null==o?void 0:o.pAndCUAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",v("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.goToAccountToChangeYourPreferences")})}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.deepThoughtExplaination")})})]}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:C,children:v("login.save")})]})]}):(null==R?void 0:R.flowID)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:v("login.mustChangePassword")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,o,s,a;e.preventDefault();const c=e.currentTarget,u=null!==(n=c.tenant.value)&&void 0!==n?n:l.id,d=null!==(i=c.flowID.value)&&void 0!==i?i:null==R?void 0:R.flowID,h=null!==(o=c.eMail.value)&&void 0!==o?o:null==R?void 0:R.eMail,p=null!==(s=c.userName.value)&&void 0!==s?s:null==R?void 0:R.userName,f=null!==(a=c.password.value)&&void 0!==a?a:null==R?void 0:R.password,m=c.newPassword.value;if(!(null==m?void 0:m.length)||!z)return void T(v("login.passwordFormatError"));A(!0);const g={tenant:u,flowID:d,eMail:h,userName:p,password:f,newPassword:m};try{const{user:e,token:n,...i}=await x(g);0!==i.resultCode?(console.error(i),t(Yu).error(v(eO(i.resultCode))),T(i.resultMessage)):e&&n&&(t(Yu).success(v("success")),r(e||g,n))}catch(e){let n=e;console.error("[LOGIN/CHANGE PWD]",n),n.message&&(t(Yu).error(n.message),T(n.message))}finally{A(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:null!==(g=R.tenant)&&void 0!==g?g:null==l?void 0:l.id}),(0,s.jsx)("input",{type:"hidden",name:"flowID",value:R.flowID}),(0,s.jsx)("input",{type:"hidden",name:"eMail",value:R.eMail}),(0,s.jsx)("input",{type:"hidden",name:"userName",value:R.userName}),(0,s.jsx)("input",{type:"hidden",name:"password",value:R.password}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[v("login.password"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.password")||"Password",onChange:e=>L(e.target.value),"aria-invalid":!z})]}),!z&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[v("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.confirmPassword")||"Password",onChange:e=>B(e.target.value),"aria-invalid":!!(null==k?void 0:k.length)&&!!(null==D?void 0:D.length)&&k!==D})]}),!!(null==k?void 0:k.length)&&!!(null==D?void 0:D.length)&&k!==D&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:j,id:"password-strength-meter"}),(0,s.jsx)("small",{children:v("login.pwd"+(F?"Strong":z?"Acceptable":"Weak"))}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:C,children:v("confirm")})]})]}):I?(0,s.jsx)(nH,{tenant:l,apiUrl:u,onLogin:r,goToLogin:()=>M(!1),__TEST__waitingForOtp:p}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:e=>{e.preventDefault();const n=e.currentTarget,i=n.userNameOrEmail.value,o=n.password.value,s=tR.test(i),a=s?{tenant:null==l?void 0:l.id,eMail:i,password:o}:{tenant:null==l?void 0:l.id,userName:i,password:o};A(!0),T(null),x(a).then((e=>{var n,a,c,u,d;-14===e.resultCode?P({tenant:l.id,eMail:s?i:void 0,userName:s?void 0:i,password:o,flowID:e.flowID||(null===(n=e.user)||void 0===n?void 0:n.flowID)}):0!==e.resultCode?(console.error(e),t(Yu).error(v(eO(e.resultCode))),T(e.resultMessage)):e.user&&e.token&&((null===(a=e.user)||void 0===a?void 0:a.tnCAndPPAccepted)&&(null===(c=e.user)||void 0===c?void 0:c.birthDate)?r(e.user,e.token):O({token:e.token,birthDate:!(null===(u=e.user)||void 0===u?void 0:u.birthDate),tnCAndPPAccepted:!(null===(d=e.user)||void 0===d?void 0:d.tnCAndPPAccepted)}))})).catch((e=>{console.error("[LOGIN]",e),e.message&&(t(Yu).error(e.message),T(e.message))})).finally((()=>{A(!1)}))},children:[(0,s.jsxs)("label",{htmlFor:"#userNameOrEmail",children:[v("login.userNameOrEmail"),(0,s.jsx)("input",{id:"userNameOrEmail",name:"userNameOrEmail",required:!0,autoComplete:"email",placeholder:"Username/email"})]}),(0,s.jsxs)("label",{htmlFor:"#password",children:["Password",(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"password",placeholder:"Password"})]}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:C,children:v("login.login")}),(null==l?void 0:l.disableRegistration)?l.adminEmail?(0,s.jsxs)("div",{className:"memori--login-drawer--signup",children:[(0,s.jsx)("p",{children:v("login.registrationDisabled")}),(0,s.jsxs)("p",{children:[v("login.contactAdmin"),":"," ",(0,s.jsx)("a",{href:`mailto:${l.adminEmail}`,children:l.adminEmail})]})]}):null:(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[v("login.newUserSignUp")," ",(0,s.jsx)(_f,{outlined:!0,onClick:()=>M(!0),children:v("login.signUp")})]})]}),E&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:E})]})})};var sH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,children:[m&&d&&h&&(0,s.jsx)(d,{...h}),e&&t&&(0,s.jsx)(e,{...t}),(0,s.jsxs)("div",{className:"memori--grid",children:[(0,s.jsxs)("div",{className:"memori--grid-column memori--grid-column-left",children:[n&&r&&(0,s.jsx)(n,{...r}),(0,s.jsx)("div",{id:"extension"})]}),(0,s.jsx)("div",{className:"memori--grid-column memori--grid-column-right",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null}),v]})]})]});var aH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,className:"memori-totem-layout",children:[v,m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-totem-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{className:"memori-totem-layout--avatar",children:n&&r&&(0,s.jsx)(n,{...r})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-totem-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]});var lH=({Header:e,headerProps:t,Chat:n,chatProps:r,StartPanel:i,startPanelProps:o,integrationStyle:a,integrationBackground:l,ChangeMode:c,changeModeProps:u,sessionId:d,hasUserActivatedSpeak:h,showInstruct:p=!1,loading:f=!1,poweredBy:m})=>(0,s.jsxs)(s.Fragment,{children:[a,l,(0,s.jsxs)(xf,{spinning:f,className:"memori-chat-layout",children:[m,p&&c&&u&&(0,s.jsx)(c,{...u}),(0,s.jsx)("div",{className:"memori-chat-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-chat-layout--controls",children:d&&h&&n&&r?(0,s.jsx)(n,{...r}):o?(0,s.jsx)(i,{...o}):null})]})]});c=o("85Hg2"),c=o("85Hg2");var cH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>{var y,b;const{t:S}=_e(),[x,_]=(0,c.useState)(!0),[w,C]=(0,c.useState)(),A=(0,c.useMemo)((()=>null==o?void 0:o.stopAudio),[null==o?void 0:o.stopAudio]),E=e=>{_(e),C(e?void 0:(new Date).toISOString());try{null==A||A()}catch(e){console.log(e)}};return(0,s.jsx)("div",{className:"memori-website_assistant--"+(x?"collapsed":"expanded"),children:x?(0,s.jsx)("div",{className:"memori-website_assistant--trigger",children:(0,s.jsx)(_f,{className:"memori-website_assistant--trigger-button",ghost:!0,shape:"circle",onClick:()=>E(!1),title:S("expand")||"Expand",children:(0,s.jsx)(lD,{avatar:null==r?void 0:r.memori.avatarURL})})}):(0,s.jsxs)(s.Fragment,{children:[u,(0,s.jsxs)(xf,{spinning:g,className:"memori-website_assistant-layout",children:[v,(0,s.jsx)("div",{className:"memori-website_assistant--close-button-wrapper",children:(0,s.jsx)(_f,{className:"memori-website_assistant--close-button",primary:!0,shape:"circle",onClick:()=>E(!0),icon:(0,s.jsx)(wf,{}),title:S("close")||"Close"})}),m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--header",children:e&&t&&(0,s.jsx)(e,{...t,showSettings:!1,showReload:!1})}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--avatar",children:n&&r&&(0,c.createElement)(n,{...r,integrationConfig:r.integrationConfig?{...r.integrationConfig,avatarURL:(null===(y=r.integrationConfig)||void 0===y?void 0:y.avatarURL)?`${null===(b=r.integrationConfig)||void 0===b?void 0:b.avatarURL.split("#")[0]}#${w}`:void 0}:{},key:w})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]})})};const uH=async({operation:e="session_creation",baseUrl:t,userID:n,userName:r,tenant:i})=>{if(!n&&!r)throw new Error("Either userID or userName must be provided");const o=await fetch(`${t}/api/verify-tokens`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e,userID:n,userName:r,tenant:i})});if(!o.ok)throw new Error("Failed to fetch credits");return o.json()};c=o("85Hg2");var dH=({Header:e,headerProps:t,Chat:n,chatProps:r,startPanelProps:i,sessionId:o,hasUserActivatedSpeak:a})=>{const{t:l}=_e(),[u,d]=(0,c.useState)(!1);(0,c.useEffect)((()=>{const e=document.body;e&&(u?(e.style.width="calc(100% - 350px)",e.style.marginRight="300px",e.style.transition="all 0.5s"):(e.style.width="100%",e.style.marginLeft="0"))}),[u]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("input",{type:"checkbox",id:"memori-sidebar-toggle",className:"memori-sidebar-toggle",checked:u,onChange:()=>{d(!u),(()=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}i&&(null==i?void 0:i.initializeTTS)&&(null==i||i.initializeTTS()),i&&(null==i?void 0:i.onClickStart)&&(null==i||i.onClickStart())})()}}),(0,s.jsxs)("div",{className:"memori-sidebar-container",children:[(0,s.jsx)("label",{htmlFor:"memori-sidebar-toggle",className:"memori-sidebar-toggle-label memori-open-label",children:(0,s.jsx)(YN,{className:"memori-icon","aria-label":l("expand")})}),(0,s.jsxs)("aside",{className:"memori-sidebar",children:[(0,s.jsx)("label",{htmlFor:"memori-sidebar-toggle",className:"memori-sidebar-toggle-label memori-close-label",children:(0,s.jsx)("span",{children:(0,s.jsx)(wf,{className:"memori-icon-close","aria-label":l("collapse")})})}),(0,s.jsx)("div",{className:"memori-sidebar-content",children:(0,s.jsx)("div",{className:"memori-hidden-chat-layout--header",children:e&&t&&(0,s.jsx)(e,{position:{latitude:0,longitude:0,placeName:""},...t,className:"memori-hidden-chat-layout-header--layout"})})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-hidden-chat-layout--controls",children:o&&a&&n&&r?(0,s.jsx)(n,{...r}):(0,s.jsx)("div",{className:"memori-loading",children:(0,s.jsx)(xf,{})})})]})]})]})};c=o("85Hg2");var hH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:u,integrationBackground:d,ChangeMode:h,changeModeProps:p,sessionId:f,hasUserActivatedSpeak:m,showInstruct:g=!1,loading:v=!1,poweredBy:y})=>((0,c.useEffect)((()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""})),[]),(0,s.jsxs)(s.Fragment,{children:[u,d,(0,s.jsxs)(xf,{className:"memori-spin--zoomed-full-body",spinning:v,children:[g&&h&&p&&(0,s.jsx)(h,{...p}),e&&t&&(0,s.jsx)(e,{...t}),(0,s.jsxs)("div",{className:"memori--grid",children:[(0,s.jsxs)("div",{className:"memori--grid-column memori--grid-column-left",children:[n&&r&&(0,s.jsx)(n,{chatProps:o,isZoomed:!0,...r}),(0,s.jsx)("div",{id:"extension"})]}),(0,s.jsx)("div",{className:"memori--grid-column memori--grid-column--zoomed-full-body memori--grid-column-right",children:f&&m&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null}),(0,s.jsx)("div",{className:"memori--powered-by-custom",children:y})]})]})]}));const pH=(e,t=!0,n=!1,r,i=!1,o=!1)=>{const s=new CustomEvent("MemoriTextEntered",{detail:{text:e,waitForPrevious:t,hidden:n,typingText:r,useLoaderTextAsMsg:i,hasBatchQueued:o}});document.dispatchEvent(s);window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak"))}),300)};let fH,mH,gH,vH,yH,bH;window.getMemoriState=e=>{var t,n,r,i,o;let s=e?document.querySelector(`.memori-widget[data-memori-integration="${e}"]`)||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector(".memori-widget[data-memori-integration]")):document.querySelector(".memori-widget")||(null===(i=null===(r=document.querySelector("memori-client"))||void 0===r?void 0:r.shadowRoot)||void 0===i?void 0:i.querySelector(".memori-widget"));if(!s)return null;let a=null===(o=s.dataset)||void 0===o?void 0:o.memoriEngineState;return a?JSON.parse(a):null},window.typeMessage=pH,window.typeMessageHidden=(e,t=!0,n,r=!1,i=!1)=>pH(e,t,!0,n,r,i),window.typeBatchMessages=e=>{function t(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.setAttribute("disabled","");const i="opacity: 0.5; touch-action: none; pointer-events: none;";null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.setAttribute("style",i),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.setAttribute("style",i),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.setAttribute("style",i)}function n(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.removeAttribute("disabled"),null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.removeAttribute("style"),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.removeAttribute("style"),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.removeAttribute("style")}function r(){var e;return!!(null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e?void 0:e.hasAttribute("disabled"))}const i=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent),o=function*(){yield*e}();t();const s=()=>{const e=o.next(),a=e.value;if(a){r()||t();let o=a.waitForPrevious;i&&(o=!1),pH(a.message,o,a.hidden,a.typingText,a.useLoaderTextAsMsg,!e.done),i&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak")),n()}),3e3)}else r()&&n();if(e.done)return document.removeEventListener("MemoriEndSpeak",s),void(r()&&n())};document.addEventListener("MemoriEndSpeak",s),s()};let SH,xH=!1,_H=!1;var wH=({memori:e,memoriConfigs:n,ownerUserID:r,ownerUserName:i,tenantID:o,memoriLang:a,multilingual:l,integration:u,layout:d="DEFAULT",customLayout:h,showInstruct:p=!1,showShare:f,preview:m=!1,embed:g=!1,showCopyButton:v=!0,showTranslationOriginal:y=!1,showInputs:b=!0,showDates:S=!1,showContextPerLine:x=!1,showSettings:_=!0,showTypingText:w=!1,showClear:C=!1,showLogin:A=!1,showOnlyLastMessages:E,height:T="100vh",secret:I,baseUrl:M="https://aisuru.com",apiUrl:R="https://backend.memori.ai",initialContextVars:P,initialQuestion:N,ogImage:O,sessionID:k,tenant:L,personification:D,authToken:B,AZURE_COGNITIVE_SERVICES_TTS_KEY:z,enableAudio:F,defaultSpeakerActive:U=!0,disableTextEnteredEvents:j=!1,onStateChange:H,additionalInfo:G,additionalSettings:V,customMediaRenderer:W,userAvatar:q})=>{var K,J,Y,X,Z,$,ee,te,ne,re,ie,oe,se,ae,le,ce,ue,de,he,pe,fe,me,ge,ve,ye,be;const{t:Se,i18n:xe}=_e(),[we,Ce]=(0,c.useState)(!1);(0,c.useEffect)((()=>{Ce(!0)}),[]);const Ae=Q(R),{initSession:Ee,postTextEnteredEvent:Te,postPlaceChangedEvent:Ie,postDateChangedEvent:Me,postTimeoutEvent:Re,postTagChangedEvent:Pe,getSession:Ne,getExpertReferences:Oe}=Ae,[ke,Le]=(0,c.useState)(!1),[De,Be]=(0,c.useState)(null!==(K=null==G?void 0:G.loginToken)&&void 0!==K?K:B),[ze,Fe]=(0,c.useState)({avatarURL:"string"==typeof q?q:void 0});(0,c.useEffect)((()=>{De&&!(null==ze?void 0:ze.userID)&&A&&Ae.backend.getCurrentUser(De).then((({user:e,resultCode:t})=>{e&&0===t?(Fe(e),qj("loginToken",De)):Kj("loginToken")}))}),[De,null==ze?void 0:ze.userID]);const[Ue,je]=(0,c.useState)(!1),[He,Ge]=(0,c.useState)(!1),[Ve,We]=(0,c.useState)(!1),qe=(null===(X=null===(Y=null===(J=e.culture)||void 0===J?void 0:J.split("-"))||void 0===Y?void 0:Y[0])||void 0===X?void 0:X.toUpperCase())||(null===(te=null===(ee=null===($=null===(Z=null==n?void 0:n.find((t=>t.memoriConfigID===e.memoriConfigurationID)))||void 0===Z?void 0:Z.culture)||void 0===$?void 0:$.split("-"))||void 0===ee?void 0:ee[0])||void 0===te?void 0:te.toUpperCase()),Ke=(null==u?void 0:u.customData)?JSON.parse(u.customData):null,Je=void 0!==l?l:!!(null==Ke?void 0:Ke.multilanguage),Ye=null==Ke?void 0:Ke.forcedTimeout,[Xe,Qe]=(0,c.useState)(null!==(oe=null!==(ie=null!==(re=null!==(ne=null!=a?a:null==Ke?void 0:Ke.lang)&&void 0!==ne?ne:qe)&&void 0!==re?re:null==Ke?void 0:Ke.uiLang)&&void 0!==ie?ie:xe.language)&&void 0!==oe?oe:"IT");(0,c.useEffect)((()=>{Je&&Xe&&nO.includes(Xe.toLowerCase())&&xe.changeLanguage(Xe.toLowerCase())}),[Xe]);const[Ze,$e]=(0,c.useState)(!1),[et,tt]=(0,c.useState)(!1),[nt,rt]=(0,c.useState)(),it=d||(null==Ke?void 0:Ke.layout)||"DEFAULT",ot=null!==(se=null!=F?F:null==Ke?void 0:Ke.enableAudio)&&void 0!==se&&se,[st,at]=(0,c.useState)(!1),[lt,ct]=(0,c.useState)(!1),[ut,dt]=(0,c.useState)(!1),[ht,pt]=(0,c.useState)(!1),[ft,mt]=(0,c.useState)(!1),[gt,vt]=(0,c.useState)(!1),[yt,bt]=(0,c.useState)(!ot||!U),[St,xt]=(0,c.useState)(!1),[_t,wt]=(0,c.useState)(2),[Ct,At]=(0,c.useState)(!1),[Et,Tt]=(0,c.useState)("center"),[It,Mt]=(0,c.useState)(!1),{startProcessing:Rt,setAudioContext:Pt,addViseme:Nt,stopProcessing:Ot,resetVisemeQueue:kt}=QF();(0,c.useEffect)((()=>{At(!!gH),_H=!!gH}),[gH]),(0,c.useEffect)((()=>{let e="bottom",t=Wj("microphoneMode","HOLD_TO_TALK");window.innerWidth<=768?(e="bottom",t="HOLD_TO_TALK"):e=window.matchMedia("(orientation: portrait)").matches||window.innerHeight>window.innerWidth?"center":"bottom",bt(Wj("muteSpeaker",!ot||!U)),xH=Wj("muteSpeaker",!ot||!U),xt("CONTINUOUS"===t),wt(Wj("continuousSpeechTimeout",2)),Tt(Wj("controlsPosition",e)),Mt(Wj("hideEmissions",!1)),(null==G?void 0:G.loginToken)||B||(Be(Wj("loginToken",void 0)),SH=Wj("loginToken",void 0))}),[]);const[Lt,Dt]=(0,c.useState)(I),[Bt,zt]=(0,c.useState)(),[Ft,Ut]=(0,c.useState)(null),[jt,Ht]=(0,c.useState)(),Gt=async(e,t)=>{var n;const r=null!=t?t:on;if(e&&r){const{currentState:t,...i}=await Ie({sessionId:r,placeName:e.placeName,latitude:e.latitude,longitude:e.longitude,uncertaintyKm:null!==(n=e.uncertainty)&&void 0!==n?n:0});t&&0===i.resultCode&&ln((e=>{var n;return{...e,...t,hints:(null===(n=t.hints)||void 0===n?void 0:n.length)?t.hints:null==e?void 0:e.hints}}))}};(0,c.useEffect)((()=>{const e=Wj("position",void 0);e&&Ht(e)}),[]);const[Vt,Wt]=(0,c.useState)(""),[qt,Kt]=(0,c.useState)(!1),[Jt,Yt]=(0,c.useState)([]),Xt=e=>{Yt((t=>{var n,r;return[...t,{...e,media:null!==(r=null===(n=e.media)||void 0===n?void 0:n.filter((e=>{var t;return!("text/javascript"===e.mimeType&&(null===(t=e.properties)||void 0===t?void 0:t.executable))})))&&void 0!==r?r:[]}]}))},Qt=async(n,r,i,o=!0,s,a=!1,l,c=!1,u=!1)=>{var d,h,p,f;const m=i||on||(null===(d=window.getMemoriState())||void 0===d?void 0:d.sessionID);if(!m||!(null==n?void 0:n.length))return;a||Xt({text:n,translatedText:s,fromUser:!0,media:null!=r?r:[],initial:on?!!i&&i!==on:!!i}),tt(!0),rt(l);let g=n,v=!1;try{if(!a&&o&&!ke&&Je&&Xe.toUpperCase()!==qe.toUpperCase()){g=(await wL(n,qe,Xe,M)).text}const{currentState:i,...s}=await Te({sessionId:m,text:g});if(0===s.resultCode&&i){const n=c&&l?l:null!==(h=i.emission)&&void 0!==h?h:null==an?void 0:an.emission;if("X4"===i.state&&e.giverTag){const{currentState:r,...i}=await Pe(m,e.giverTag);0===i.resultCode?(cn(r),n&&(Xt({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),Tn(n))):(console.error(s,i),t(Yu).error(Se(eO(i.resultCode))),v=!0)}else if("X2d"===i.state&&e.giverTag){const{currentState:r,...i}=await Te({sessionId:m,text:Math.random().toString().substring(2,8)});if(0===i.resultCode){const{currentState:r,...i}=await Pe(m,e.giverTag);0===i.resultCode?(cn(r),n&&(Xt({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),Tn(n))):(console.error(s,i),t(Yu).error(Se(eO(i.resultCode))),v=!0)}else console.error(s,i),t(Yu).error(Se(eO(i.resultCode))),v=!0}else Xe.toLowerCase()!==qe.toLowerCase()&&n&&!ke&&Je?Zt(i,Xe,g).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})):(cn({...i,emission:n}),n&&(Xt({text:n,emitter:i.emitter,media:i.media,fromUser:!1,questionAnswered:g,generatedByAI:!!i.completion,contextVars:i.contextVars,date:i.currentDate,placeName:i.currentPlaceName,placeLatitude:i.currentLatitude,placeLongitude:i.currentLongitude,placeUncertaintyKm:i.currentUncertaintyKm,tag:i.currentTag,memoryTags:i.memoryTags}),Tn(n)))}else 404===s.resultCode&&(Yt((e=>[...e.slice(0,e.length-1)])),dn(!1,Lt||e.secretToken,Bt,ke&&e.giverTag?e.giverTag:void 0,ke&&e.giverPIN?e.giverPIN:void 0,{PATHNAME:window.location.pathname,ROUTE:(null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||"",...P||{}},N).then((e=>{console.info("session timeout"),(null==e?void 0:e.sessionID)&&setTimeout((()=>{Qt(n,r,null==e?void 0:e.sessionID)}),500)})))}catch(e){console.error(e),v=!0,rt(void 0),tt(!1)}u||(rt(void 0),tt(!1))},Zt=async(e,t,n)=>{var r,i,o;const s=null!==(r=e.emission)&&void 0!==r?r:null==an?void 0:an.emission;let a={...e},l=null;if(s&&!ke&&qe.toUpperCase()!==t.toUpperCase()&&Je)try{const r=await wL(s,t,qe,M);if(e.hints&&e.hints.length>0){const n=await Promise.all((null!==(i=e.hints)&&void 0!==i?i:[]).map((async e=>{var n;const r=await wL(e,t,qe,M);return{text:null!==(n=null==r?void 0:r.text)&&void 0!==n?n:e,originalText:e}})));a={...e,emission:r.text,translatedHints:n}}else a={...e,emission:s,translatedEmission:r.text,hints:null!==(o=e.hints)&&void 0!==o?o:"G1"===e.state?null==an?void 0:an.hints:[]};r.text.length>0&&(l={text:s,translatedText:r.text,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,generatedByAI:!!e.completion,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags})}catch(t){console.error(t),a={...e,emission:s},l={text:s,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags}}else a={...e,emission:s},s&&(l={text:s,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags});return cn(a),l&&Xt(l),a},$t=void 0!==e.ageRestriction?e.ageRestriction:e.nsfw?18:e.enableCompletions?14:0,[en,tn]=(0,c.useState)(),[nn,rn]=(0,c.useState)(!1),[on,sn]=(0,c.useState)(k),[an,ln]=(0,c.useState)(),cn=e=>{var t;ln(e),H&&H(e);const n=new CustomEvent("MemoriNewDialogState",{detail:e});document.dispatchEvent(n);const r=null===(t=null==e?void 0:e.media)||void 0===t?void 0:t.filter((e=>{var t;return"text/javascript"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)}));null==r||r.forEach((e=>{try{setTimeout((()=>{var t;console.log("snippet",e),new Function(null!==(t=e.content)&&void 0!==t?t:"")(),setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),400)}),1e3)}catch(e){console.warn(e)}}))},un=async n=>{var r,i,o,s,a;let l=Wj("birthDate",void 0);if(en||l||!$t)if("PUBLIC"===e.privacyType||e.secretToken||Lt||Bt){$e(!0);try{if(!e.giverTag&&(null===(r=e.receivedInvitations)||void 0===r?void 0:r.length)){let t=e.receivedInvitations.find((e=>"GIVER"===e.type&&"ACCEPTED"===e.state));t&&(e.giverTag=t.tag,e.giverPIN=t.pin)}let l;try{l=window.location.href}catch(e){console.debug(e)}const c=await Ee({...n,tag:null!==(i=n.tag)&&void 0!==i?i:null==D?void 0:D.tag,pin:null!==(o=n.pin)&&void 0!==o?o:null==D?void 0:D.pin,additionalInfo:{...G||{},loginToken:null!==(a=null!==(s=null!=SH?SH:De)&&void 0!==s?s:null==G?void 0:G.loginToken)&&void 0!==a?a:B,language:_n(Xe),referral:l}});if((null==c?void 0:c.sessionID)&&(null==c?void 0:c.currentState)&&0===c.resultCode)return sn(c.sessionID),jt&&Gt(jt,c.sessionID),$e(!1),{dialogState:c.currentState,sessionID:c.sessionID};(null==c?void 0:c.resultMessage.startsWith("This Memori is aged restricted"))?(console.warn(c),t(Yu).error(Se("underageTwinSession",{age:$t})),We(!0)):403===(null==c?void 0:c.resultCode)?(Dt(void 0),Ut("password")):(console.warn(c),t(Yu).error(Se(eO(null==c?void 0:c.resultCode))),We(!0))}catch(e){console.error(e),new Error("Error fetching session")}}else Ut("password");else rn(!0)},dn=async(n=!1,r,i,o,s,a,l,c)=>{var u,d,h,p,f;$e(!0);try{let m,g=Wj("birthDate",void 0);if(!c&&!g&&$t)return void rn(!0);if(!("PUBLIC"===e.privacyType||r||e.secretToken||Lt||i||Bt))return void Ut("password");try{m=window.location.href}catch(e){console.debug(e)}const{sessionID:v,currentState:y,...b}=await Ee({memoriID:null!==(u=e.engineMemoriID)&&void 0!==u?u:"",password:r||Lt||e.secretToken,recoveryTokens:i||Bt,tag:o,pin:s,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(h=null===(d=window.location.pathname)||void 0===d?void 0:d.split("/"))||void 0===h?void 0:h.pop())||"",...a||{}},initialQuestion:l,birthDate:c||g||void 0,additionalInfo:{...G||{},loginToken:null!==(f=null!==(p=null!=SH?SH:De)&&void 0!==p?p:null==G?void 0:G.loginToken)&&void 0!==f?f:B,language:_n(Xe),referral:m}});if(v&&y&&0===b.resultCode)return sn(v),n&&(cn(y),y.emission&&(Jt.length<=1?Yt([{text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}]):Xt({text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}))),jt&&Gt(jt,v),e.needsDateTime&&pn({sessionID:v,state:y}),$e(!1),{dialogState:y,sessionID:v};(null==b?void 0:b.resultMessage.startsWith("This Memori is aged restricted"))?(console.error(b),t(Yu).error(Se("underageTwinSession",{age:$t})),We(!0)):403===(null==b?void 0:b.resultCode)?(Dt(void 0),Ut("password")):(console.error(b),t(Yu).error(Se(eO(b.resultCode))),We(!0))}catch(e){console.error(e)}return $e(!1),null},hn=async(t,n,r,i)=>{var o,s,a,l,c;if(!t||!n)return console.error("CHANGETAG/Session not found"),Promise.reject("Session not found");try{const{currentState:t,resultCode:u}=await Pe(n,null!=r?r:rO);if(0===u){let d=0;if(r!==rO&&i&&("X1a"===t.state||"X1b"===t.state)){const{resultCode:e}=await Te({sessionId:n,text:null!=i?i:""});d=e}if(0===d){const{currentState:e,...t}=await Ne(n);if(0===t.resultCode&&e)return{currentState:e,sessionId:n,...t}}else if([400,401,403,404,500].includes(u)){console.warn("[APPCONTEXT/CHANGETAG]",u);let t,n=Wj("birthDate",void 0);try{t=window.location.href}catch(e){console.debug(e)}un({memoriID:null!==(o=e.engineMemoriID)&&void 0!==o?o:"",password:I||Lt||e.secretToken,tag:e.giverTag,pin:e.giverPIN,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(a=null===(s=window.location.pathname)||void 0===s?void 0:s.split("/"))||void 0===a?void 0:a.pop())||"",...P||{}},initialQuestion:N,birthDate:en||n||void 0,additionalInfo:{...G||{},loginToken:null!==(c=null!==(l=null!=SH?SH:De)&&void 0!==l?l:null==G?void 0:G.loginToken)&&void 0!==c?c:B,language:_n(Xe),referral:t}})}else if(t)return{currentState:t,sessionId:n,resultCode:u}}}catch(e){let t=e;return console.warn("[APPCONTEXT/CHANGETAG]",t),Promise.reject(t)}return null};(0,c.useEffect)((()=>()=>{an&&(null==an?void 0:an.currentTag)===e.giverTag||(async()=>{on&&e.giverTag&&e.giverPIN&&(Yt([]),await hn(e.engineMemoriID,on,e.giverTag,e.giverPIN))})()}),[]);const pn=(0,c.useCallback)((async({sessionID:t,date:n,state:r})=>{var i;const o=null!=t?t:on,s=null!=r?r:an;if(!o||!e.needsDateTime||(null===(i=null==s?void 0:s.hints)||void 0===i?void 0:i.length))return;const a=(n?Cs.DateTime.fromISO(n):Cs.DateTime.now()).toUTC().toFormat("yyyy/MM/dd HH:mm:ss ZZ").split(":").slice(0,-1).join(":"),{currentState:l,...c}=await Me(o,a);0===c.resultCode&&l&&ln((e=>{var t;return{...e,...l,hints:(null===(t=l.hints)||void 0===t?void 0:t.length)?l.hints:null==e?void 0:e.hints}}))}),[an,e.needsDateTime,on]);(0,c.useEffect)((()=>{if(on&&e.needsDateTime){pn({sessionID:on,state:an});let e=setInterval((()=>{pn({sessionID:on})}),6e4);return()=>{clearInterval(e)}}}),[e.needsDateTime,on]);const[fn,mn]=(0,c.useState)(),gn=(0,c.useRef)(),vn=()=>{fn&&(clearTimeout(fn),mn(void 0)),(null==gn?void 0:gn.current)&&(clearTimeout(gn.current),gn.current=void 0)},yn=()=>{vn(),Ct||Vt.length||et||qt||Sn()},bn=async()=>{var e;if(!st||Ct||Vt.length||et||qt)yn();else if(on&&st&&(null==an?void 0:an.acceptsTimeout)){const{currentState:t,...n}=await Re(on);if(0===n.resultCode&&t){const n=t.emission;if(!ke&&Je&&Xe!==(null==xe?void 0:xe.language)&&n&&n.length>0)Zt({...t,emission:n},Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)}));else{if(!(n&&n.length>0))return void yn();Xt({text:n,emitter:t.emitter,media:t.media,fromUser:!1,generatedByAI:!!t.completion,contextVars:t.contextVars,date:t.currentDate,placeName:t.currentPlaceName,placeLatitude:t.currentLatitude,placeLongitude:t.currentLongitude,placeUncertaintyKm:t.currentUncertaintyKm,tag:t.currentTag,memoryTags:t.memoryTags}),Tn(n),cn({...t,hints:null!==(e=t.hints)&&void 0!==e?e:"G1"===t.state?null==an?void 0:an.hints:[]})}}}},Sn=()=>{let e=null==an?void 0:an.timeout;if(!e){let t=40,n=25;if(e=Math.floor(Math.random()*(t-n))+n,null==an?void 0:an.emission){e+=an.emission.length/26.5}}if(Ye&&(e=Ye,null==an?void 0:an.emission)){e+=an.emission.length/26.5}let t=setTimeout(bn,1e3*e);mn(t),gn.current=t};(0,c.useEffect)((()=>{(Vt.length||Ct||et)&&vn(),on&&!Vt.length&&yn()}),[null==an?void 0:an.acceptsTimeout,null==an?void 0:an.timeout,null==an?void 0:an.state,Ct,on,Jt,Vt,et,st]),(0,c.useEffect)((()=>()=>{at(!1),Ge(!1),vn(),gn.current=void 0}),[]);const xn=(0,c.useCallback)((t=>{var n,r,i,o;let s="",a=(null!==(o=null!==(i=null!=t?t:null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])&&void 0!==i?i:xe.language)&&void 0!==o?o:"IT").toUpperCase(),l=e.voiceType;if(e.enableBoardOfExperts&&(null==an?void 0:an.emitter)){null==or||or.find((e=>e.name===(null==an?void 0:an.emitter)))}switch(a){case"IT":s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-ElsaNeural");break;case"DE":s=""+("MALE"===l?"de-DE-ConradNeural":"de-DE-KatjaNeural");break;case"EN":s=""+("MALE"===l?"en-GB-RyanNeural":"en-GB-SoniaNeural");break;case"ES":s=""+("MALE"===l?"es-ES-AlvaroNeural":"es-ES-ElviraNeural");break;case"FR":s=""+("MALE"===l?"fr-FR-HenriNeural":"fr-FR-DeniseNeural");break;case"PT":s=""+("MALE"===l?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural");break;case"UK":s=""+("MALE"===l?"uk-UA-OstapNeural":"uk-UA-PolinaNeural");break;case"RU":s=""+("MALE"===l?"ru-RU-DmitryNeural":"ru-RU-SvetlanaNeural");break;case"PL":s=""+("MALE"===l?"pl-PL-MarekNeural":"pl-PL-AgnieszkaNeural");break;case"FI":s=""+("MALE"===l?"fi-FI-HarriNeural":"fi-FI-SelmaNeural");break;case"EL":s=""+("MALE"===l?"el-GR-NestorasNeural":"el-GR-AthinaNeural");break;case"AR":s=""+("MALE"===l?"ar-SA-HamedNeural":"ar-SA-ZariyahNeural");break;case"ZH":s=""+("MALE"===l?"zh-CN-YunxiNeural":"zh-CN-XiaoxiaoNeural");break;case"JA":s=""+("MALE"===l?"ja-JP-KeitaNeural":"ja-JP-NanamiNeural");break;default:s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-IsabellaNeural")}return s}),[e.voiceType,e.enableBoardOfExperts,null==an?void 0:an.emitter,xe.language,e.culture]),_n=t=>{var n,r;let i="";switch((t||(null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])||xe.language||"IT").toUpperCase()){case"IT":default:i="it-IT";break;case"DE":i="de-DE";break;case"EN":i="en-GB";break;case"ES":i="es-ES";break;case"FR":i="fr-FR";break;case"PT":i="pt-PT";break;case"UK":i="uk-UK";break;case"RU":i="ru-RU";break;case"PL":i="pl-PL";break;case"FI":i="fi-FI";break;case"EL":i="el-GR";break;case"AR":i="ar-SA";break;case"ZH":i="zh-CN";break;case"JA":i="ja-JP"}return i},[wn,Cn]=(0,c.useState)();(0,c.useEffect)((()=>{(async()=>{try{const e=await fetch(`${M||"https://aisuru.com"}/api/lexiconmap`);return await e.json()}catch(e){console.error(e)}})().then((e=>{Cn(e)}))}),[]);const An=(e,t)=>{var n;if(!wn)return e;const r={...null!==(n=wn.common)&&void 0!==n?n:{},...(null==L?void 0:L.id)&&wn[L.id]?wn[L.id]:{}},i=Object.keys(r).map((e=>{var n;return{word:e,phoneme:null!==(n=r[e][t.toLowerCase()])&&void 0!==n?n:r[e].default,caseSensitive:r[e].caseSensitive}}));return i.reduce(((e,{word:t,phoneme:n,caseSensitive:r})=>e.replace(new RegExp(`\\b${t}\\b`,r?"g":"gi"),`<phoneme alphabet="ipa" ph="${n}">${t}</phoneme>`)),e)},En=()=>{const e=new CustomEvent("MemoriEndSpeak");document.dispatchEvent(e)},Tn=e=>{if(!z||m)return void En();if(Fn(),m)return;if(yt||xH)return _H=!1,tt(!1),En(),void(St&&Dn());vH&&vH.pause();let t=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"),n=/iPad|iPhone|iPod/.test(navigator.userAgent);if("interrupted"===yH.state)return void yH.resume().then((()=>Tn(e)));if("closed"===yH.state){yH=new Xo;let e=yH.createBuffer(1,1e4,22050),t=yH.createBufferSource();t.buffer=e,t.connect(yH.destination)}else if("suspended"===yH.state){Rn(),yH=new Xo;let e=yH.createBuffer(1,1e4,22050),t=yH.createBufferSource();t.buffer=e,t.connect(yH.destination)}if(!gH){n||(vH=new Ss.SpeakerAudioDestination);let e=Ss.AudioConfig.fromSpeakerOutput(vH);gH=new Ss.SpeechSynthesizer(mH,e)}const r=yH.createBufferSource();r.addEventListener("ended",(()=>{At(!1),_H=!1})),vH.onAudioEnd=()=>{At(!1),_H=!1,r.disconnect(),En(),Vn()},kt(),gH.visemeReceived=function(e,t){Nt(t.visemeId,t.audioOffset)};const i=cR(sR(oR(lR(aR(e)))));gH.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${_n(Xe)}"><voice name="${xn(Xe)}"><s>${An(i,Xe.toLowerCase())}</s></voice></speak>`,(i=>{if(i){At(!0),_H=!0,Rt(yH);try{yH.decodeAudioData(i.audioData,(function(e){r.buffer=e,r.connect(yH.destination),(Jt.length<1||t&&n)&&r.start(0)})),yH.onstatechange=()=>{"suspended"===yH.state||"closed"===yH.state?(r.disconnect(),At(!1),Ot(),kt(),_H=!1):"interrupted"===yH.state&&yH.resume()},yH.resume(),gH&&(gH.close(),gH=null)}catch(t){console.error("Error processing audio data:",t),In(e)}}else In(e)}),(t=>{console.error("Speak error:",t),In(e)})),tt(!1)},In=e=>{console.log("Falling back to browser speech synthesis"),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),Mn()},Mn=()=>{At(!1),Ot(),kt(),_H=!1,gH&&(console.log("Closing speech synthesizer"),gH.close(),gH=null),En()},Rn=()=>{At(!1),_H=!1;try{gH&&(gH.close(),gH=null),"closed"!==yH.state&&yH.close(),vH&&(vH.pause(),vH.close())}catch(e){console.debug("stopAudio error: ",e)}};(0,c.useEffect)((()=>{let e=document.querySelector("#chat-fieldset textarea");e&&e.focus()}),[null==an?void 0:an.emission]);const[Pn,Nn]=(0,c.useState)(""),On=()=>Nn(""),[kn,Ln]=(0,c.useState)(null),Dn=()=>{let e=setTimeout((async()=>{Un();const e=iR(Pn);e.length>0&&qt?(Qt(e),On(),Wt("")):qt&&yn()}),1e3*_t);Ln(e)},Bn=()=>{kn&&(clearTimeout(kn),Ln(null))};(0,c.useEffect)((()=>{Bn(),St&&Dn(),yn()}),[Pn]);const zn=()=>{if(z){Un(),Nn(""),On();try{navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){ct(!0),mH||(mH=Ss.SpeechConfig.fromSubscription(z,"westeurope"),mH.speechRecognitionLanguage=_n(Xe),mH.speechSynthesisLanguage=_n(Xe),mH.speechSynthesisVoiceName=xn(Xe));const t=Ss.AudioConfig.fromDefaultMicrophoneInput();fH=new Ss.SpeechRecognizer(mH,t),Kt(!0),fH.recognized=(e,t)=>{if(t.result.text)if(t.result.reason===Ss.ResultReason.RecognizedSpeech){let e=t.result.text;if(Nn(e||""),(null==e?void 0:e.length)>0){const t=iR(e);t.length>0&&Wt((e=>`${e} ${t}`))}}else t.result.reason===Ss.ResultReason.NoMatch&&console.debug("NOMATCH: Speech could not be recognized.")},fH.canceled=(e,t)=>{t.reason===Ss.CancellationReason.Error&&(console.debug(`"CANCELED: ErrorCode=${t.errorCode}`),console.debug(`"CANCELED: ErrorDetails=${t.errorDetails}`),console.debug("CANCELED: Did you set the speech resource key and region values?")),Fn()},fH.sessionStopped=(e,t)=>{Fn()},On(),fH.startContinuousRecognitionAsync()})).catch(console.debug)}catch(e){console.debug(e)}}},Fn=()=>{fH&&(fH.stopContinuousRecognitionAsync(),fH.close(),fH=null),Kt(!1)},Un=()=>{ct(!1),Fn(),Bn()},jn=()=>{try{Un(),vn(),Ge(!1),gn.current=void 0,Rn()}catch(e){console.log("Error: resetUIEffects",e)}};(0,c.useEffect)((()=>()=>{jn()}),[]),(0,c.useEffect)((()=>(document.addEventListener("MemoriResetUIEffects",jn),()=>{document.removeEventListener("MemoriResetUIEffects",jn)})),[]),(0,c.useEffect)((()=>{"Z0"===(null==an?void 0:an.state)&&Un()}),[null==an?void 0:an.state]);const[Hn,Gn]=(0,c.useState)(!1),Vn=(0,c.useCallback)((e=>{Ct&&gH&&(gH.close(),gH=null),!St||!lt&&Hn||(Gn(!0),zn())}),[St,lt]);(0,c.useEffect)((()=>{Jt.length>1&&!Ct&&St&&(lt||!Hn)?zn():Ct&&qt&&Fn()}),[Ct]),(0,c.useEffect)((()=>{qt&&(Un(),On(),Wt(""),zn())}),[qe]);const[Wn,qn]=(0,c.useState)("keypress");(0,c.useEffect)((()=>{window.innerWidth<=768&&ZM()?qn("click"):qn("keypress")}),[]);const[Kn,Jn]=(0,c.useState)(),Yn=null==Ke?void 0:Ke.globalBackground,Xn=Yn?`url(${Yn})`:null,Qn=u?{"--memori-chat-bubble-bg":"#fff",...Ke&&!p?{"--memori-text-color":null!==(ae=Ke.textColor)&&void 0!==ae?ae:"#000"}:{},...(null==Ke?void 0:Ke.buttonBgColor)?{"--memori-button-bg":Ke.buttonBgColor,"--memori-primary":Ke.buttonBgColor}:{},...(null==Ke?void 0:Ke.buttonTextColor)?{"--memori-button-text":Ke.buttonTextColor}:{},...(null==Ke?void 0:Ke.blurBackground)?{"--memori-blur-background":"5px"}:{"--memori-blur-background":"0px"},...(null==Ke?void 0:Ke.innerBgColor)?{"--memori-inner-bg":`rgba(${"dark"===Ke.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(le=Ke.innerBgAlpha)&&void 0!==le?le:.4})`,"--memori-inner-content-pad":"1.5rem","--memori-nav-bg-image":"none","--memori-nav-bg":`rgba(${"dark"===Ke.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(ce=null==Ke?void 0:Ke.innerBgAlpha)&&void 0!==ce?ce:.4})`}:{"--memori-inner-content-pad":"0px"}}:{},Zn=`\n ${m?"#preview,":"WEBSITE_ASSISTANT"===it?"":":root,"} .memori-widget, .memori-drawer, .memori-modal {\n ${Object.entries(Qn).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `,$n=void 0===(null==Ke?void 0:Ke.showAIicon)||(null==Ke?void 0:Ke.showAIicon),er=void 0===(null==Ke?void 0:Ke.showWhyThisAnswer)||(null==Ke?void 0:Ke.showWhyThisAnswer),[tr,nr]=(0,c.useState)(!1);(0,c.useEffect)((()=>{(window.innerWidth>=768&&"FULLPAGE"===it||"FULLPAGE"!==it)&&nr(!0)}),[]),(0,c.useEffect)((()=>{if(null==Ke?void 0:Ke.seoTitle){let e=document.createElement("meta");e.setAttribute("property","og:title"),e.setAttribute("content",Ke.seoTitle),document.head.append(e)}if(null==Ke?void 0:Ke.seoDescription){let e=document.createElement("meta");e.setAttribute("property","og:description"),e.setAttribute("content",Ke.seoDescription),document.head.append(e)}if(null==Ke?void 0:Ke.seoUrl){let e=document.createElement("meta");e.setAttribute("property","og:url"),e.setAttribute("content",Ke.seoUrl),document.head.append(e)}let t=O||e.avatarURL;if((null==Ke?void 0:Ke.seoImageShowAvatar)&&t){let e=document.createElement("meta");e.setAttribute("property","og:image"),e.setAttribute("content",t),document.head.append(e)}}),[Ke,e.avatarURL,O]);const rr=(0,c.useCallback)((e=>{if(j)return;const{text:t,waitForPrevious:n,hidden:r,typingText:i,useLoaderTextAsMsg:o,hasBatchQueued:s}=e.detail;t&&(n&&!xH&&(_H||et)?setTimeout((()=>{rr(e)}),1e3):(Fn(),Rn(),Qt(t,void 0,void 0,void 0,void 0,r,i,o,s)))}),[on,Ct,et,Xe,j]);(0,c.useEffect)((()=>(j?document.removeEventListener("MemoriTextEntered",rr):document.addEventListener("MemoriTextEntered",rr),()=>{document.removeEventListener("MemoriTextEntered",rr)})),[on,Xe,j]);const ir=(0,c.useCallback)((async t=>{var n,r,i,o,s,a,l,c,u,d,h,p,f,m,g,v,y,b;const S=(null==t?void 0:t.sessionID)||on,x=(null==t?void 0:t.dialogState)||an;Ge(!0);let _=document.getElementById("memori-audio"),w=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome");_&&w&&(_.muted=!1,_.play().catch((e=>{console.warn("error playing intro audio",e)})));let C=Wj("birthDate",void 0),A=en||C||void 0;if(S||!$t||A){if(!S&&"PUBLIC"!==e.privacyType&&!e.secretToken&&!Lt&&!Bt||!S&&Ve)return Ut("password"),void Ge(!1);if(!S){Ge(!1),We(!1);const t=await un({memoriID:e.engineMemoriID,password:I||Lt||e.secretToken,tag:null==D?void 0:D.tag,pin:null==D?void 0:D.pin,initialContextVars:{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...P||{}},initialQuestion:N,birthDate:A,additionalInfo:{...G||{},loginToken:null!==(a=null!==(s=null!=SH?SH:De)&&void 0!==s?s:null==G?void 0:G.loginToken)&&void 0!==a?a:B,language:_n(Xe)}});return void((null==t?void 0:t.dialogState)?(Yt([]),Zt(t.dialogState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))):await ir(t||void 0))}if(k){const{currentState:t,...n}=await Ne(S);if(0!==n.resultCode||!t)return console.debug("session expired, opening new session"),We(!0),sn(void 0),Ge(!1),void await ir();if(Yt([]),jt&&Gt(jt,S),e.needsDateTime&&pn({sessionID:S,state:t}),ke&&e.giverTag&&(null==an?void 0:an.currentTag)!==e.giverTag)try{console.debug("change tag #0"),await hn(e.engineMemoriID,S,"-");const t=await hn(e.engineMemoriID,S,e.giverTag,e.giverPIN);if(!t||0!==t.resultCode)throw console.error("session #1",t),new Error("No session");Zt(t.currentState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}catch(t){console.error("session #2",t),dn(!0,null==e?void 0:e.secretToken,void 0,null==e?void 0:e.giverTag,null==e?void 0:e.giverPIN,{PATHNAME:null===(l=window.location.pathname)||void 0===l?void 0:l.toUpperCase(),ROUTE:(null===(d=null===(u=null===(c=window.location.pathname)||void 0===c?void 0:c.split("/"))||void 0===u?void 0:u.pop())||void 0===d?void 0:d.toUpperCase())||"",...P||{}},N,A).then((()=>{at(!0)}))}else if(!ke&&D&&(null==an?void 0:an.currentTag)!==D.tag)try{console.debug("change tag #3"),await hn(e.engineMemoriID,S,"-");const t=await hn(e.engineMemoriID,S,D.tag,D.pin);if(!t||0!==t.resultCode)throw console.error("session #4",t),new Error("No session");Zt(t.currentState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}catch(t){console.error("session #5",t),dn(!0,null==e?void 0:e.secretToken,void 0,D.tag,D.pin,{PATHNAME:null===(h=window.location.pathname)||void 0===h?void 0:h.toUpperCase(),ROUTE:(null===(m=null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||void 0===m?void 0:m.toUpperCase())||"",...P||{}},N,A).then((()=>{at(!0)}))}else if(ke||D||(null==an?void 0:an.currentTag)===rO)Zt(t,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}));else try{console.debug("change tag #6"),await hn(e.engineMemoriID,S,"-");const t=await hn(e.engineMemoriID,S,rO);if(!t||0!==t.resultCode)throw console.error("session #7",t),new Error("No session");Zt(t.currentState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}catch(t){console.error("session #8",t),dn(!0,null==e?void 0:e.secretToken,void 0,void 0,void 0,{PATHNAME:null===(g=window.location.pathname)||void 0===g?void 0:g.toUpperCase(),ROUTE:(null===(b=null===(y=null===(v=window.location.pathname)||void 0===v?void 0:v.split("/"))||void 0===y?void 0:y.pop())||void 0===b?void 0:b.toUpperCase())||"",...P||{}},N,A).then((()=>{at(!0)}))}jt&&Gt(jt,S),e.needsDateTime&&pn({sessionID:S,state:t})}else Yt([]),Zt(x,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}else rn(!0),Ge(!1)}),[Lt,e,Bt,en,on,Xe,jt]);(0,c.useEffect)((()=>{const t=document.querySelector(`memori-client[memoriname="${e.name}"]`)||document.querySelector(`memori-client[memoriid="${e.memoriID}"]`)||document.querySelector("memori-client");if(!t)return;const n=new MutationObserver(((e,t)=>{var n,r,i;for(const t of e)"attributes"===t.type&&"authtoken"===(null===(n=t.attributeName)||void 0===n?void 0:n.toLowerCase())&&("MEMORI-CLIENT"===t.target.nodeName?(Be(t.target.getAttribute("authtoken")||void 0),SH=t.target.getAttribute("authtoken")||void 0):(Be((null===(i=null===(r=t.target)||void 0===r?void 0:r.parentElement)||void 0===i?void 0:i.getAttribute("authtoken"))||void 0),SH=t.target.getAttribute("authtoken")||void 0))}));return n.observe(t,{attributes:!0,childList:!1,subtree:!1}),()=>{n.disconnect()}}),[]);const[or,sr]=(0,c.useState)(),ar=(0,c.useCallback)((async()=>{if(on&&(null==e?void 0:e.enableBoardOfExperts))try{const{experts:e,count:t,...n}=await Oe(on);0===n.resultCode?sr(e):console.warn("Error fetching experts",n)}catch(e){console.warn(e)}}),[on,null==e?void 0:e.enableBoardOfExperts]);(0,c.useEffect)((()=>{ar()}),[on,ar]);const lr=e.enableDeepThought&&!!De&&!!(null==ze?void 0:ze.userID)&&(null==ze?void 0:ze.pAndCUAccepted),cr=null==L?void 0:L.billingDelegation,[ur,dr]=(0,c.useState)(!0),hr=(0,c.useCallback)((async()=>{if(null==L?void 0:L.billingDelegation)try{const e=await uH({operation:lr?"dt_session_creation":"session_creation",baseUrl:M,userID:r,userName:i,tenant:o});e.enough?dr(!0):(dr(!1),console.warn("Not enough credits. Required:",e.required))}catch(e){let t=e;console.debug(t)}}),[null==L?void 0:L.billingDelegation,lr]);(0,c.useEffect)((()=>{(null==L?void 0:L.billingDelegation)&&hr()}),[null==L?void 0:L.billingDelegation,lr]);const pr=void 0===E?"TOTEM"!==d&&"WEBSITE_ASSISTANT"!==d&&"HIDDEN_CHAT"!==d:!E,fr={memori:e,tenant:L,history:Jt,showShare:null===(ue=null!=f?f:null==Ke?void 0:Ke.showShare)||void 0===ue||ue,position:jt,setShowPositionDrawer:dt,setShowSettingsDrawer:pt,setShowKnownFactsDrawer:mt,setShowExpertsDrawer:vt,enableAudio:null===(de=null!=F?F:null==Ke?void 0:Ke.enableAudio)||void 0===de||de,showSpeaker:!!z,speakerMuted:yt||xH,setSpeakerMuted:e=>{if(xH=!!e,bt(e),qj("muteSpeaker",!!e),e)Rn();else{yH=new Xo;let e=yH.createBuffer(1,1e4,22050),t=yH.createBufferSource();t.buffer=e,t.connect(yH.destination)}},showSettings:_,hasUserActivatedSpeak:st,showReload:"TOTEM"===it,showClear:C,clearHistory:()=>Yt((e=>e.slice(-1))),showLogin:A,setShowLoginDrawer:je,loginToken:De,user:ze,sessionID:on},mr={memori:e,integration:u,integrationConfig:Ke,tenant:L,instruct:ke,avatar3dVisible:tr,setAvatar3dVisible:nr,hasUserActivatedSpeak:st,isPlayingAudio:Ct&&!yt,loading:!!et,baseUrl:M,apiUrl:R},gr={memori:e,tenant:L,language:qe,userLang:Xe,setUserLang:Qe,baseUrl:M,apiUrl:R,position:jt,openPositionDrawer:()=>dt(!0),integrationConfig:Ke,instruct:ke,sessionId:on,clickedStart:He,isMultilanguageEnabled:Je,onClickStart:ir,initializeTTS:()=>{if(!z)return;mH=Ss.SpeechConfig.fromSubscription(z,"westeurope"),mH.speechSynthesisLanguage=_n(Xe),mH.speechSynthesisVoiceName=xn(Xe),mH.speechRecognitionLanguage=_n(Xe),mH.setProperty("speechSynthesis.outputFormat","viseme"),ZM()&&(mH.speechSynthesisOutputFormat=Ss.SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3),yH=new Xo;let e=yH.createBuffer(1,1e4,22050),t=yH.createBufferSource();t.buffer=e,t.connect(yH.destination),vH=new Ss.SpeakerAudioDestination;let n=Ss.AudioConfig.fromSpeakerOutput(vH);gH=new Ss.SpeechSynthesizer(mH,n)},isUserLoggedIn:!!De&&!!(null==ze?void 0:ze.userID),notEnoughCredits:cr&&!ur,showLogin:A,setShowLoginDrawer:je,user:ze},vr={memori:e,sessionID:on||"",tenant:L,translateTo:Je&&Xe.toUpperCase()!==(null===(ge=null!==(me=null!==(fe=null===(pe=null===(he=e.culture)||void 0===he?void 0:he.split("-"))||void 0===pe?void 0:pe[0])&&void 0!==fe?fe:xe.language)&&void 0!==me?me:"IT")||void 0===ge?void 0:ge.toUpperCase())?Xe:void 0,baseUrl:M,apiUrl:R,layout:d,memoriTyping:et,typingText:nt,showTypingText:w,history:pr?Jt:Jt.slice(-2),authToken:null!==(ye=null!==(ve=null!=De?De:SH)&&void 0!==ve?ve:null==G?void 0:G.loginToken)&&void 0!==ye?ye:B,dialogState:an,setDialogState:cn,pushMessage:Xt,simulateUserPrompt:(e,t)=>{Fn(),Rn(),Qt(e,void 0,void 0,!1,t)},showDates:S,showContextPerLine:x,showAIicon:$n,showWhyThisAnswer:er,showCopyButton:v,showTranslationOriginal:y,client:Ae,selectReceiverTag:async n=>{var r;if(on)try{const{currentState:i,...o}=await Pe(on,n);if(0===o.resultCode)if(Xt({text:n,fromUser:!0}),"X4"===i.state&&e.giverTag){const{currentState:n,...r}=await Ae.postTagChangedEvent(on,e.giverTag);0===r.resultCode?(cn(n),n.emission&&Xt({text:n.emission,emitter:n.emitter,media:n.media,fromUser:!1,contextVars:n.contextVars,date:n.currentDate,placeName:n.currentPlaceName,placeLatitude:n.currentLatitude,placeLongitude:n.currentLongitude,placeUncertaintyKm:n.currentUncertaintyKm,tag:n.currentTag,memoryTags:n.memoryTags})):(console.error(r),t(Yu).error(Se(eO(r.resultCode))))}else cn(i),i.emission&&Xt({text:i.emission,emitter:i.emitter,media:i.media,fromUser:!1,contextVars:i.contextVars,date:i.currentDate,placeName:i.currentPlaceName,placeLatitude:i.currentLatitude,placeLongitude:i.currentLongitude,placeUncertaintyKm:i.currentUncertaintyKm,tag:i.currentTag,memoryTags:i.memoryTags});else console.error(o,n,null===(r=null==an?void 0:an.knownTags)||void 0===r?void 0:r[n]),t(Yu).error(Se(eO(o.resultCode)))}catch(e){let n=e;console.error(n),t(Yu).error(n.message)}},preview:m,sendOnEnter:Wn,setSendOnEnter:qn,microphoneMode:St?"CONTINUOUS":"HOLD_TO_TALK",attachmentsMenuOpen:Kn,setAttachmentsMenuOpen:Jn,instruct:ke,showInputs:b,showMicrophone:!!z,userMessage:Vt,onChangeUserMessage:e=>{if(!e||"\n"===e||""===e.trim())return Wt(""),void yn();Wt(e),vn()},sendMessage:e=>{Rn(),Fn(),Qt(e),Wt(""),On()},stopListening:Un,startListening:zn,stopAudio:Rn,resetTranscript:On,listening:qt,isPlayingAudio:Ct,customMediaRenderer:W,user:ze,userAvatar:q,experts:or},yr=u&&Xn?(0,s.jsx)("div",{className:"memori--global-background",children:(0,s.jsx)("div",{className:"memori--global-background-image",style:{backgroundImage:Xn}})}):(0,s.jsx)("div",{className:"memori--global-background no-background-image"}),br=u?(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:Zn}}):null,Sr={canInstruct:!!e.giverTag,instruct:!!ke,onChangeMode:e=>{Le("instruct"===e),at(!1),Ge(!1)}},xr=(0,s.jsx)(bj,{tenant:L,userLang:Xe,integrationID:null==u?void 0:u.integrationID,memoriHash:`${e.ownerTenantName}-${e.ownerUserName}-${e.name}`}),_r=h||("TOTEM"===it?aH:"CHAT"===it?lH:"FULLPAGE"===it?sH:"WEBSITE_ASSISTANT"===it?cH:"HIDDEN_CHAT"===it?dH:"ZOOMED_FULL_BODY"===it?hH:sH);return(0,s.jsxs)("div",{className:t(ws)("memori","memori-widget",`memori-layout-${d.toLowerCase()}`,`memori-controls-${Et.toLowerCase()}`,`memori--avatar-${(null==Ke?void 0:Ke.avatar)||"default"}`,{"memori--preview":m,"memori--embed":g,"memori--with-integration":u,"memori--with-speechkey":!!z,"memori--active":st,"memori--hide-emissions":It,"memori--has-active-session":!!on}),"data-memori-name":null==e?void 0:e.name,"data-memori-id":null==e?void 0:e.engineMemoriID,"data-memori-secondary-id":null==e?void 0:e.memoriID,"data-memori-session-id":on,"data-memori-integration":null==u?void 0:u.integrationID,"data-memori-engine-state":JSON.stringify({...an,sessionID:on}),style:{height:T},children:[(0,s.jsx)(_r,{Header:yj,headerProps:fr,Avatar:ZF,avatarProps:mr,Chat:YL,chatProps:vr,StartPanel:nD,startPanelProps:gr,integrationStyle:br,integrationBackground:yr,ChangeMode:fU,changeModeProps:Sr,poweredBy:xr,sessionId:on,hasUserActivatedSpeak:st,showInstruct:p,loading:Ze}),(0,s.jsx)("audio",{id:"memori-audio",style:{display:"none"},src:"https://aisuru.com/intro.mp3"}),we&&(0,s.jsx)(SN,{withModal:!0,pwdOrTokens:Ft,openModal:!!Ft,setPwdOrTokens:Ut,showTokens:"SECRET"===e.privacyType,onFinish:async t=>{var n,r,i,o;t.password&&Dt(t.password),t.password&&(bH=t.password),t.tokens&&zt(t.tokens),dn(!on,t.password,t.tokens,ke?e.giverTag:null==D?void 0:D.tag,ke?e.giverPIN:null==D?void 0:D.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...P||{}},N,en).then((e=>{Ut(null),ir(e||void 0)})).catch((()=>{Ut(null),We(!0)}))},minimumNumberOfRecoveryTokens:null!==(be=null==e?void 0:e.minimumNumberOfRecoveryTokens)&&void 0!==be?be:1}),we&&(0,s.jsx)(jj,{visible:nn,minAge:$t,onClose:t=>{var n,r,i,o;t?(tn(t),qj("birthDate",t),dn(!on,bH||Lt||(null==e?void 0:e.secretToken),Bt,ke?e.giverTag:null==D?void 0:D.tag,ke?e.giverPIN:null==D?void 0:D.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...P||{}},N,t).then((e=>{rn(!1),Ut(null),ir(e||void 0)})).catch((()=>{rn(!1),We(!0)}))):(rn(!1),Ge(!1))}}),ht&&(0,s.jsx)(Yj,{layout:it,open:!!ht,onClose:()=>pt(!1),microphoneMode:St?"CONTINUOUS":"HOLD_TO_TALK",continuousSpeechTimeout:_t,setMicrophoneMode:e=>xt("CONTINUOUS"===e),setContinuousSpeechTimeout:wt,controlsPosition:Et,setControlsPosition:Tt,hideEmissions:It,setHideEmissions:Mt,additionalSettings:V}),ut&&(0,s.jsx)(QR,{memori:e,open:!!ut,venue:jt,setVenue:e=>{Ht(e),Gt(e),e?qj("position",JSON.stringify(e)):Kj("position")},onClose:e=>{e&&Gt(e),dt(!1)}}),ft&&on&&(0,s.jsx)($j,{apiURL:R,memori:e,sessionID:on,visible:ft,closeDrawer:()=>mt(!1)}),gt&&!!or&&(0,s.jsx)(eH,{apiUrl:R,baseUrl:M,tenant:L,experts:or,open:gt,onClose:()=>vt(!1)}),Ue&&(null==L?void 0:L.id)&&(0,s.jsx)(oH,{tenant:L,apiUrl:R,open:!!Ue,user:ze,loginToken:De,onClose:()=>je(!1),onLogin:(e,t)=>{Fe(e),Be(t),SH=t,je(!1),qj("loginToken",t)},onLogout:()=>{De&&Ae.backend.userLogout(De).then((()=>{je(!1),Fe(void 0),Be(void 0),SH=void 0,Kj("loginToken")}))}})]})};const CH={id:"aisuru.com",theme:"aisuru",config:{name:"Memori",showNewUser:!1,requirePosition:!1}},AH=async(e,t)=>{const n=t?new URL(`${t.startsWith("http")?"":t.includes("localhost")?"http://":"https://"}${t}`).origin:"https://aisuru.com";try{const t=await fetch(`${n}/api/tenant/${e}`),{tenant:r}=await t.json();return r||{...CH,tenantID:e}}catch(t){return{...CH,tenantID:e}}};function EH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EB(r.key),r)}}function IH(e,t,n){return t&&TH(e.prototype,t),n&&TH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function MH(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RH(e,t){return RH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},RH(e,t)}function PH(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RH(e,t)}function NH(e,t){if(t&&("object"===CB(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return MH(e)}function OH(e){return OH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},OH(e)}function kH(e){if(Array.isArray(e))return e}function LH(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function DH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BH(e,t){if(e){if("string"==typeof e)return DH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DH(e,t):void 0}}function zH(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function FH(e){return kH(e)||LH(e)||BH(e)||zH()}function UH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UH(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var HH={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},GH=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};EH(this,e),this.init(t,n)}return IH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||HH,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,jH(jH({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),VH=new GH,WH=function(){function e(){EH(this,e),this.observers={}}return IH(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function qH(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function KH(e){return null==e?"":""+e}function JH(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function YH(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function XH(e,t,n){var r=YH(e,t,Object);r.obj[r.k]=n}function QH(e,t){var n=YH(e,t),r=n.obj,i=n.k;if(r)return r[i]}function ZH(e,t,n){var r=QH(e,n);return void 0!==r?r:QH(t,n)}function $H(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):$H(e[r],t[r],n):e[r]=t[r]);return e}function eG(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var tG={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function nG(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return tG[e]})):e}var rG="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,iG=[" ",",","?","!",";"];function oG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=OH(e);if(t){var i=OH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NH(this,n)}}function lG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];void 0===l&&r.length>o+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?lG(l,c,n):void 0}i=i[r[o]]}return i}}var cG=function(e){PH(n,e);var t=aG(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return EH(this,n),r=t.call(this),rG&&WH.call(MH(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return IH(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."));var a=QH(this.data,s);return a||!o||"string"!=typeof n?a:lG(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(s=e.split("."))[1]),this.addNamespaces(t),XH(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=QH(this.data,s)||{};r?$H(a,n,i):a=sG(sG({},a),n),XH(this.data,s,a),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?sG(sG({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(WH),uG={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}};function dG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=OH(e);if(t){var i=OH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NH(this,n)}}var fG={},mG=function(e){PH(n,e);var t=pG(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return EH(this,n),r=t.call(this),rG&&WH.call(MH(r)),JH(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,MH(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=VH.create("translator"),r}return IH(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=iG.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,n,r));if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==CB(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?(f.res="".concat(u).concat(p).concat(l),f):"".concat(u).concat(p).concat(l)}return o?(f.res=l,f):l}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||l,v=f&&f.exactUsedKey||l,y=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],S=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(x&&m&&_&&b.indexOf(y)<0&&("string"!=typeof S||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,hG(hG({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=w,f):w}if(s){var C="[object Array]"===y,A=C?[]:{},E=C?v:g;for(var T in m)if(Object.prototype.hasOwnProperty.call(m,T)){var I="".concat(E).concat(s).concat(T);A[T]=this.translate(I,hG(hG({},t),{joinArrays:!1,ns:c})),A[T]===I&&(A[T]=m[T])}m=A}}else if(x&&"string"==typeof S&&"[object Array]"===y)(m=m.join(S))&&(m=this.extendTranslation(m,e,t,r));else{var M=!1,R=!1,P=void 0!==t.count&&"string"!=typeof t.count,N=n.hasDefaultValue(t),O=P?this.pluralResolver.getSuffix(d,t.count,t):"",k=t["defaultValue".concat(O)]||t.defaultValue;!this.isValidLookup(m)&&N&&(M=!0,m=k),this.isValidLookup(m)||(R=!0,m=l);var L=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,D=L&&R?void 0:m,B=N&&k!==m&&this.options.updateMissing;if(R||M||B){if(this.logger.log(B?"updateKey":"missingKey",d,u,l,B?k:m),s){var z=this.resolve(l,hG(hG({},t),{},{keySeparator:!1}));z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&U&&U[0])for(var j=0;j<U.length;j++)F.push(U[j]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var H=function(e,n,r){var o=N&&r!==m?r:D;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,n,o,B,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,n,o,B,t),i.emit("missingKey",e,u,n,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?F.forEach((function(e){i.pluralResolver.getSuffixes(e,t).forEach((function(n){H([e],l+n,t["defaultValue".concat(n)]||k)}))})):H(F,l,k))}m=this.extendTranslation(m,e,t,f,r),R&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(R||M)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,M?m:void 0):this.options.parseMissingKeyHandler(m))}return o?(f.res=m,f):m}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,hG(hG({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(hG(hG({},n),{interpolation:hG(hG({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=e.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=hG(hG({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,h="string"==typeof d?[d]:d;return null!=e&&h&&h.length&&!1!==n.applyPostProcessor&&(e=uG.handle(h,e,t,this.options&&this.options.postProcessPassResolved?hG({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(e){s.isValidLookup(t)||(o=e,!fG["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(fG["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,e,a);else{var u;d&&(u=s.pluralResolver.getSuffix(n,a.count,a));var f="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),h&&l.push(c+f)),p){var m="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(m),d&&(l.push(m+u),h&&l.push(m+f))}}for(;o=l.pop();)s.isValidLookup(t)||(r=o,t=s.getResource(n,e,o,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(WH);function gG(e){return e.charAt(0).toUpperCase()+e.slice(1)}var vG=function(){function e(t){EH(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=VH.create("languageUtils")}return IH(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=gG(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=gG(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=gG(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),yG=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],bG={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},SG=["v1","v2","v3"],xG={zero:0,one:1,two:2,few:3,many:4,other:5};function _G(){var e={};return yG.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:bG[t.fc]}}))})),e}var wG=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};EH(this,e),this.languageUtils=t,this.options=n,this.logger=VH.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=_G()}return IH(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return xG[e]-xG[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!SG.includes(this.options.compatibilityJSON)}}]),e}();function CG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function AG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var EG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};EH(this,e),this.logger=VH.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return IH(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:nG,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?eG(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?eG(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?eG(t.nestingPrefix):t.nestingPrefixEscaped||eG("$t("),this.nestingSuffix=t.nestingSuffix?eG(t.nestingSuffix):t.nestingSuffixEscaped||eG(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0){var i=ZH(t,l,e);return a.alwaysFormat?a.format(i,void 0,n,AG(AG(AG({},r),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(ZH(t,l,s),c,n,AG(AG(AG({},r),t),{},{interpolationkey:s}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?c(a.escape(e)):c(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof d){var l=d(e,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(h){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=KH(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),h?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=AG({},o);function a(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=AG(AG({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(a.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=KH(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return i.format(e,t,o.lng,AG(AG({},o),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function TG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function IG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function MG(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),s=t[o];return s||(s=e(r,i),t[o]=s),s(n)}}var RG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};EH(this,e),this.logger=VH.create("formatter"),this.options=t,this.formats={number:MG((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:MG((function(e,t){var n=new Intl.NumberFormat(e,IG(IG({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:MG((function(e,t){var n=new Intl.DateTimeFormat(e,IG({},t));return function(e){return n.format(e)}})),relativetime:MG((function(e,t){var n=new Intl.RelativeTimeFormat(e,IG({},t));return function(e){return n.format(e,t.range||"day")}})),list:MG((function(e,t){var n=new Intl.ListFormat(e,IG({},t));return function(e){return n.format(e)}}))},this.init(t)}return IH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=MG(t)}},{key:"format",value:function(e,t,n,r){var i=this,o=t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=FH(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}}(t),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[s](e,u,IG(IG(IG({},a),r),c))}catch(e){i.logger.warn(e)}return l}return i.logger.warn("there was no format function for ".concat(s)),e}),e);return o}}]),e}();function PG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function OG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=OH(e);if(t){var i=OH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NH(this,n)}}var kG=function(e){PH(n,e);var t=OG(n);function n(e,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return EH(this,n),o=t.call(this),rG&&WH.call(MH(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=VH.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return IH(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},s={},a={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,a,l,c,u,d;r=n.loaded,a=o,c=YH(r,[i],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(a)),l||u[d].push(a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](e,t,(function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,s)}),o):s(a,l)}))):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,r,s)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,NG(NG({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(WH);function LG(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===CB(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===CB(e[2])||"object"===CB(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function DG(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function BG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function FG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=OH(e);if(t){var i=OH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NH(this,n)}}function UG(){}function jG(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var HG=function(e){PH(n,e);var t=FG(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(EH(this,n),e=t.call(this),rG&&WH.call(MH(e)),e.options=DG(r),e.services={},e.logger=VH,e.modules={external:[]},jG(MH(e)),i&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,i),NH(e,MH(e));setTimeout((function(){e.init(r,i)}),0)}return e}return IH(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=LG();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=zG(zG(zG({},r),this.options),DG(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=zG(zG({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?VH.init(i(this.modules.logger),this.options):VH.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=RG);var s=new vG(this.options);this.store=new cG(this.options.resources,this.options);var a=this.services;a.logger=VH,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new wG(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new EG(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new kG(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new mG(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=UG),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=qH(),h=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:UG,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=qH();return e||(e=this.languages),t||(t=this.options.ns),n||(n=UG),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&uG.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=qH();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==CB(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([t,i].concat(a))}else o=zG({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(t):t;return r.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=qH();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=qH();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:UG,i=zG(zG(zG({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));var s=["store","services","language"];return s.forEach((function(t){o[t]=e[t]})),o.services=zG({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new mG(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(WH);TB(HG,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new HG(e,t)}));var GG=HG.createInstance();GG.createInstance=HG.createInstance;var VG,WG=GG.createInstance;GG.init,GG.loadResources,GG.reloadResources,GG.use,GG.changeLanguage,GG.getFixedT,GG.t,GG.exists,GG.setDefaultNamespace,GG.hasLoadedNamespace,GG.loadNamespaces,GG.loadLanguages;VG=JSON.parse('{"yes":"Si","no":"No","confirm":"Conferma","apply":"Applica","cancel":"Annulla","show":"Mostra","hide":"Nascondi","send":"Invia","close":"Chiudi","edit":"Modifica","delete":"Elimina","loading":"Caricamento","expand":"Espandi","collapse":"Riduci","fullscreenEnter":"Passa a schermo intero","fullscreenExit":"Esci da schermo intero","center":"Centro","bottom":"In basso","hidden":"Nascosto","day":"Giorno","month":"Mese","year":"Anno","createdAt":"Data creazione","selected":"Selezionati","page":"pagina","actions":"Azioni","next":"Successivo","previous":"Precedente","copy":"Copia","copyRawCode":"Copia codice sorgente","copyToClipboard":"Copia negli appunti","showOriginalText":"Mostra originale","showTranslatedText":"Mostra traduzione","exactPosition":"Posizione esatta","uncertain":"Incertezza","question":"Domanda","nothingFound":"Nessun risultato","venue":"Luogo","searchVenue":"Cerca luogo...","memoriBlockedTitle":"Bloccato","memoriBlockedUntil":"Memori bloccato fino al {{date}}","memoriBlockedAnon":"Attualmente \\"{{name}}\\" non può rispondere, torna qui il {{date}}","memoriBlockedReasonExceedChats":"perchè ha superato la soglia mensile di chat ammesse.","memoriBlockedGiverHelper":"Puoi sempre gestirlo in qualità di amministratore, ma altri utenti non potranno interrogarlo.","generatedByAI":"Risposta generata da IA, può talvolta generare informazioni non corrette","whyThisAnswer":"Perché questa risposta?","whyThisAnswerHelper":"Questa risposta è stata generata automaticamente da un\'intelligenza artificiale sulla base di questi contenuti verificati.","completionsEnabled":"IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette","completionProviderDown":"Questo Twin è integrato con una IA generativa di {{provider}}, ma al momento non è disponibile. Riprova più tardi.","completionProviderFallbackName":"un provider esterno","completionProviderCheckStatusPage":"Vedi pagina di stato","boardOfExperts":"Gruppo di esperti","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","underage":"Devi avere almeno {{age}} anni per registrarti.","underageTwinSession":"Devi avere almeno {{age}} anni per interagire con questo Twin.","ageVerification":"Verifica dell\'età","ageVerificationText":"Per interagire con questo Twin, devi aver almeno {{minAge}} anni.","nsfw":"NSFW: Questo Twin contiene contenuti per adulti","deepThought":"Pensiero profondo","deepThoughtHelper":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtDisclaimerTitle":"Pensiero profondo abilitato","deepThoughtDisclaimer":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtPreDisclaimerUnlogged":"Accedi per abilitare Pensiero Profondo.","deepThoughtPreDisclaimerNotAllowed":"Pensiero Profondo è disabilitato poiché non hai acconsentito al suo utilizzo, puoi cambiare la tua scelta in qualsiasi momento nelle impostazioni del tuo account.","notEnoughCredits":"L\'autore di questo Twin non ha abbastanza crediti per rispondere alla tua domanda.","knownFacts":{"title":"Fatti noti","description":"Dettagli delle informazioni condivise tra te e {{memoriName}}","type":"Tipo","typeShortTerm":"Breve termine","typeLongTerm":"Lungo termine","typeHelper":"Tipi:\\n- Breve termine: questo fatto noto è sempre utilizzato durante le conversazioni\\n- Lungo termine: questo fatto noto è utilizzato durante le conversazioni solo se rilevante per la domanda corrente","text":"Testo","deleteSuccess":"Fatto noto eliminato","deleteConfirmTitle":"Elimina il fatto noto","deleteConfirmMessage":"Confermi di voler eliminare questo fatto noto?","deleteSelectedConfirmTitle":"Elimina i fatti noti selezionati","deleteSelectedConfirmMessage":"Confermi di voler eliminare i fatti noti selezionati?"},"auth":{"title":"Autenticazione","useRecoveryTokens":"Utilizza i token di recupero","tokens":"Token","addToken":"Aggiungi token","usePassword":"Utilizza la password","atLeast":"Almeno"},"widget":{"instruct":"Istruisci","test":"Prova","sound":"Audio","position":"Preferenze posizione","settings":"Impostazioni","share":"Condividi","sendOnKeypress":"Premi Invio per inviare","sendOnClick":"Clicca sul bottone di invio","boardOfExperts":"Gruppo di esperti","showExpertsInTheBoard":"Mostra gli esperti di questo gruppo","expertsInTheBoard":"Esperti di questo gruppo","goToIntegrationsToCustomizeAvatar":"Per personalizzare l\'avatar, vai a Condividimi e configura la pagina pubblica"},"write_and_speak":{"micButtonPopover":"Premi il pulsante per parlare","micButtonPopoverListening":"Premi il pulsante per smettere di parlare","pageInstructExplanation":"Per insegnarmi nuove cose clicca sul pulsante ISTRUISCIMI per cominciare","pageTryMeExplanation":"Per parlare con me clicca sul pulsante INIZIAMO per cominciare","instructButton":"ISTRUISCIMI","tryMeButton":"INIZIAMO","chatHistory":"Cronologia chat","exportChatHistory":"Esporta la cronologia chat","exportChatHistoryMessage":"Vuoi esportare la cronologia chat?","chatBotButtonText":"CLICCA QUI PER APRIRE LA CHAT","conversationStartedLabel":"Conversazione avvenuta il","settingsHeaderLabel":"Configura qui il memori se vuoi impostare una conversazione continua. Setta i secondi di silenzio prima dell\'invio.","continuousSpeechLabel":"Conversazione continua","holdToSpeak":"Tieni premuto per parlare","releaseToEndListening":"Rilascia per smettere di parlare","pressAndHoldToSpeak":"Premi e tieni premuto per parlare","microphoneMode":"Modalità microfono","hideEmissionsLabel":"Nascondi testo emesso dal Twin","secondsLabel":"Secondi","controlsPosition":"Posizione dei controlli","tryMeHeaderLabel":"PROVA","unknownPosition":"Posizione sconosciuta","fieldPlace":"Indica la posizione (es \'Milano\')","showMapLinkFor":"Visualizza sulla mappa la posizione","useMyPosition":"Usa la mia posizione","myPosition":"Posizione corrente","updatingPosition":"Aggiorno la posizione...","placeNotFound":"Luogo sconosciuto!","requirePositionHelp":"Per parlare con {{name}} devi decidere se fornire o meno la tua posizione. Questo perchè diverse risposte che potrà fornirti potrebbero dipendere da dove ti trovi.","dontWantToProvidePosition":"Non voglio fornire la mia posizione","attachmentsLabel":"Arricchisci il tuo messaggio","iWantToTalkToIn":"Voglio parlare con {{name}} in"},"media":{"title":"Titolo","editAttributes":"Modifica attributi media","uploadMimeTypeNotAllowed":"Il tipo di file non è permesso","uploadSizeLimitMessage":"Il file caricato è troppo grande (max {{size}}MB)","uploadWrongResolutionMessage":"La risoluzione deve essere {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"Hai già un Twin con questo nome","uploadHelperImages":"Caricare un file con estensione png, jpg, jpeg o gif e con dimensione massima di {{size}}MB","uploadHelper":"Caricare un file di dimensione massima di {{size}}MB","uploadError":"Errore nel caricamento","square":"quadrato","scaleRatio":"Proporzioni","addMediaLabel":"Aggiungi media","insertThisMediaMsg":"Inserisci questi media","mediaUploadMessage":"Clicca per caricare un nuovo media","addLinkLabel":"Aggiungi un link","linkKey":"URL","linkValue":"Titolo link","insertThisLink":"Inserisci un link a {{url}} con titolo {{title}}"},"gamification":{"level":"Livello","points":"punti","memoriReachedLevel":"è diventato più evoluto ed ha raggiunto il livello","levelGoToStatistics":"{{memori}} è al livello {{level}} con {{points}} punti. Clicca per andare alle statistiche.","congratulationsNewLevel":"Congratulazioni, hai raggiunto un nuovo livello!","congratulationsNewLevelDescription":"Il tuo Memori è diventato più evoluto con {{points}} punti, guarda le","statistics":"statistiche"},"login":{"login":"Accedi","logout":"Esci","user":"Utente","loggedDrawerTitle":"Ciao, {{name}}!","loginDrawerTitle":"Accedi","signupDrawerTitle":"Registrati","newUserSignUp":"Sei un nuovo utente?","signUp":"Registrati!","alreadyHaveAnAccount":"Hai già un account?","backToLogin":"Torna al login","registrationDisabled":"La registrazione è disabilitata.","contactAdmin":"Contatta l\'amministratore per richiedere l\'accesso","userNameOrEmail":"Nome utente o email","email":"Email","emailFormatError":"Per favore, inserisci una mail valida","username":"Nome utente","usernameContainsReservedWord":"Il nome utente contiene una parola riservata, per favore cambia il nome utente","usernameFormatError":"Il nome utente deve essere lungo almeno 3 caratteri e può contenere solo lettere, numeri e _","otpCode":"Codice di verifica","resendVerificationCode":"Invia di nuovo","resentVerificationCode":"Codice di verifica inviato! Controlla la tua mail.","password":"Password","newPassword":"Nuova password","confirmPassword":"Conferma la password","currentPassword":"Password attuale","passwordMatchingError":"Le password non coincidono.","passwordFormatError":"La password deve essere lunga almeno 8 caratteri e contenere almeno un numero, una lettera maiuscola, una minuscola e un simbolo","pwdWeak":"Debole","pwdAcceptable":"Accettabile","pwdStrong":"Forte","mustChangePassword":"Devi cambiare la password","passwordChange":"Cambio password","emailChange":"Cambio email","avatarChange":"Cambio avatar","underage":"Devi avere almeno {{age}} anni per registrarti.","optional":"opzionale","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","missingData":"Informazioni mancanti","missingDataHelper":"Sappiamo che questo è un po\' fastidioso, ma abbiamo bisogno di alcune informazioni in più per completare la tua registrazione.","goToAccountToChangeYourPreferences":"Puoi cambiare la tua scelta in qualsiasi momento dalla tua pagina Account.","deepThoughtExplaination":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme. Consenti all\'autore del twin di contattarti per offerte commerciali riguardanti prodotti su cui hai espresso interesse.","tnCAndPPAcceptedHelper":"Dall\'ultimo accesso, i T&C e l\'Informativa sulla privacy sono stati modificati. Si prega di accettarle, altrimenti non sarà possibile apportare modifiche ai propri gemelli. Puoi sempre cancellare il tuo account nella pagina del tuo profilo utente.","privacyLabel":"Ho letto e accettato l\'","privacyAndCookiePolicy":"informativa sui cookie e sulla privacy","and":"e","termsOfService":"i termini del servizio","pAndCUAccepted":"Accetto le condizioni di utilizzo relative a Pensiero Profondo","editAccount":"Modifica account","save":"Salva"},"success":"Operazione andata a buon fine","Error":"Errore","internal server error":"Ops, scusa... qualcosa è andato storto nel server","error":"Errore","error.loading":"Errore durante il caricamento dei contenuti.","error.notFound":"Ops, non abbiamo trovato ciò che cercavi.","error.generic":"Ops, qualcosa è andato storto.","error.serverNotResponding":"Stiamo facendo manutenzione o rilasciando aggiornamenti. Riprova più tardi.","error.unprocessableEntity":"Errore durante il salvataggio dei dati. Ricontrolla i dati inseriti.","error.goBackTo":"Prova a tornare alla","error.reloadPage":"Ricarica la pagina","error.tryAgain":"Riprova","error.unauthorized":"Non sei autorizzato a visualizzare questo contenuto.","errors":{"TENANT_NOT_FOUND":"Tenant non trovato","TENANT_REGISTRATION_DISABLED":"La registrazione su questa piattaforma è disabilitata","TENANT_MISSING_NAME":"Tenant: nome mancante","TENANT_MAX_USERS_REACHED":"Numero massimo di utenti raggiunto","TENANT_MAX_ADMINS_REACHED":"Numero massimo di utenti amministratori raggiunto","TENANT_ALREADY_EXISTS":"Tenant già esistente","TENANT_MISSING_DESCRIPTION":"Tenant: descrizione mancante","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: non abilitato a gestire il provider di completamento","USER_NOT_CONFIRMED":"Utente ancora non confermato","USER_NOT_FOUND":"Utente non trovato","USER_OR_PASSWORD_INVALID":"Utente o password non validi","USER_MUST_CHANGE_PASSWORD":"Devi cambiare la password","USER_MUST_ENTER_VERIFICATION_CODE":"Devi inserire il codice di verifica","USER_MISSING_TENANT":"Utente: tenant mancante","USER_MISSING_NAME":"Utente: nome mancante","USER_MISSING_PASSWORD":"Utente: password mancante","USER_MISSING_EMAIL":"Utente: email mancante","USER_MISSING_VERIFICATION_CODE":"Utente: codice di verifica mancante","USER_NAME_ALREADY_USED":"Nome utente già in uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La password non rispetta le regole di sicurezza","USER_EMAIL_ALREADY_USED":"Email già in uso","USER_EMAIL_INVALID":"Email non valida","USER_VERIFICATION_CODE_INVALID":"Codice di verifica non valido","USER_MISSING_NAME_OR_EMAIL":"Nome utente o email mancante","USER_NAME_INVALID":"Nome utente non valido","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utente ha uno o più memori","USER_MISSING_NEW_PASSWORD":"Utente: nuova password mancante","USER_NOTHING_TO_DO":"Niente da fare","USER_CANT_CREATE_MEMORI":"Utente non abilitato a creare Memori","USER_MAX_MEMORI_REACHED":"Massimo numero di Memori raggiunto","USER_TOO_MANY_ATTEMPTS":"Troppi tentativi","USER_MUST_ACCEPT_TNC_AND_PP":"Devi accettare i termini e le condizioni","USER_BIRTH_DATE_CANT_BE_CHANGED":"Data di nascita non può essere cambiata","USER_CANT_SET_COMPLETION_PROVIDER":"Utente: non abilitato a gestire il provider di completamento","USER_CANT_ENABLE_DEEP_THOUGHT":"Utente: non abilitato a gestire Pensiero Profondo","USER_CANT_ENABLE_DCM_INTEGRATION":"Utente: non abilitato a gestire l\'integrazione con DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Utente: non abilitato a gestire la concatenazione o il gruppo di esperti","USER_CREATION_BILLING_DENIED_PERMISSION":"Non hai crediti sufficienti per creare un Twin","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"L\'utente ha una o più configurazioni completions","USER_CANT_BE_DELETED":"Utente non può essere cancellato","MEMORI_NOT_FOUND":"Memori non trovato","MEMORI_NOT_ACCESSIBLE":"Memori non accessibile","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Solo il proprietario può cambiare il tag e il pin","SESSION_NOT_FOUND":"Sessione non trovata","SESSION_IS_NOT_ADMINISTRATIVE":"Sessione non amministrativa","SESSION_EXPIRED":"Sessione scaduta","MEMORI_MISSING_CONFIGURATION":"Memori: configurazione mancante","MEMORI_CONFIGURATION_NOT_FOUND":"Memori: configurazione non trovata","MEMORI_INVALID_PRIVACY_TYPE":"Memori: tipo di privacy non valido","MEMORI_MISSING_PASSWORD":"Memori: password mancante","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero totale di token di recupero non valido","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero minimo di token di recupero non valido","MEMORI_INVALID_VOICE_TYPE":"Memori: tipo di voce non valido","MEMORI_MISSING_NAME":"Memori: nome mancante","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memori: password o token di recupero mancanti","MEMORI_INVALID_ID":"Memori: ID non valido","MEMORI_NAME_ALREADY_USED":"Nome memori già in uso","MEMORI_INVALID_PIN":"Memori: PIN non valido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memori: cambio TAG e PIN richiedono operazioni separate","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memori: password non richiesta su Memori pubblico","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Pensiero Profondo richiede l\'abilitazione delle completions","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Il gruppo di esperti richiede l\'abilitazione delle completions","MEMORI_INVALID_COMPLETION_CONFIG":"Memori: configurazione completions non valida","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Trasferimento: utente di destinazione mancante","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Trasferimento: ID utente di destinazione non valido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Trasferimento: dati utente di destinazione non validi","MEMORI_TRANSFER_NOTHING_TO_DO":"Trasferimento: alcuna operazione da fare","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memori: la configurazione non può essere modificata","MEMORI_MISSING_NEW_PASSWORD":"Memori: nuova password mancante","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Formato non valido data a partire da","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Formato non valido data fino a","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Memori: funzionalità richiede un abbonamento","INTEGRATION_NOT_FOUND":"Integrazione non trovata","INTEGRATION_INVALID_TYPE":"Tipo integrazione non valido","INTEGRATION_ALREADY_EXISTS":"Integrazione già esistente","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Memori non pubblici non possono essere integrati","INTEGRATION_MISSING_INVOCATION_TEXT":"Integrazione: testo di invocazione mancante","INTEGRATION_MISSING_DEVICE_EMAILS":"Integrazione: email del dispositivo mancante","INTEGRATION_MEMORI_IS_EMPTY":"Memori vuoti non possono essere integrati","INTEGRATION_MISSING_PRIVACY_POLICY":"Integrazione: privacy policy mancante","INTEGRATION_MISSING_CATEGORY":"Categoria integrazione mancante","INTEGRATION_MISSING_DESCRIPTION":"Descrizione integrazione mancante","INTEGRATION_INVALID_INVOCATION_TEXT":"Testo di invocazione non valido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home non più disponibile","UPLOAD_REQUIRES_MULTIPART_ENCODING":"L\'upload richiede l\'encoding multipart","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: manca il content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: dimensione massima superata","UPLOAD_FILE_IS_EMPTY":"Upload: file vuoto","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: tipo di file o firma non validi","UPLOAD_MISSING_FILE_NAME":"Upload: nome file mancante","UPLOAD_INVALID_MEMORY_ID":"Upload: ID contenuto non valido","UPLOAD_MISSING_FILE_CONTENT":"Upload: contenuto file mancante","ASSET_NOT_FOUND":"Asset non trovato","ASSET_NOT_ACCESSIBLE":"Asset non accessibile","ASSET_MISSING_SESSION_ID":"Asset: ID sessione mancante","ASSET_INVALID_FILE_NAME":"Asset: nome file non valido","INVITATION_NOT_FOUND":"Invito non trovato","INVITATION_NOT_ACCESSIBLE":"Invito non accessibile","INVITATION_ALREADY_ACCEPTED":"Invito già accettato","INVITATION_ALREADY_REJECTED":"Invito già rifiutato","INVITATION_MISSING_DESTINATION_EMAIL":"Invito: email di destinazione mancante","INVITATION_DESTINATION_EMAIL_INVALID":"Invito: email di destinazione non valida","INVITATION_MISSING_TAG":"Invito: tag mancante","INVITATION_MISSING_PIN":"Invito: PIN mancante","INVITATION_INVALID_PIN":"Invito: PIN non valido","INVITATION_INVALID_TYPE":"Invito: tipo non valido","INVITATION_MISSING_DESTINATION_NAME":"Invito: nome destinatario mancante","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invito: tag e pin non possono essere cambiati","INVITATION_CANT_BE_CHANGED":"Invito: non può essere modificato","ACTIONLOG_INVALID_USER_ID":"ID utente non valido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","ACTIONLOG_INVALID_MEMORI_ID":"ID Memori non valido","CONSUMPTIONLOG_INVALID_TYPE":"Tipo di log non valido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","CONSUMPTIONLOG_INVALID_USER_ID":"ID utente non valido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Memori ID non valido","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifiche: Periodo di estrazione chatlog non valido","PROCESS_INVALID_TYPE":"Tipo di processo non valido","PROCESS_ALREADY_RUNNING":"Processo già in esecuzione","PROCESS_NOT_FOUND":"Processo non trovato","IMPORTCSV_MISSING_ROWS":"Importazione CSV: righe mancanti","IMPORTCSV_MISSING_CSV":"Importazione CSV: CSV mancante","IMPORTCSV_MISSING_SEPARATOR":"Importazione CSV: separatore mancante","IMPORTCSV_INVALID_SEPARATOR":"Importazione CSV: separatore non valido","IMPORTCSV_MISSING_HEADERS":"Importazione CSV: intestazioni mancanti","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Importazione CSV: separatore varianti titolo mancante","IMPORTCSV_INVALID_RECEIVER_ID":"Importazione CSV: ID receiver non valido","IMPORTCSV_INVALID_MEDIA_LINK":"Importazione CSV: link media non valido","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"Importazione CSV: titolo link non valido","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Importazione CSV: encoding caratteri non rilevabile","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione CSV: impossibile importare in Memori segreti","IMPORTTXT_MISSING_ROWS":"Importazione TXT: righe mancanti","IMPORTTXT_INVALID_GRANULARITY":"Importazione TXT: granularità non valida","IMPORTTXT_INVALID_RECEIVER_ID":"Importazione TXT: ID receiver non valido","IMPORTTXT_INVALID_MEDIA_LINK":"Importazione TXT: link media non valido","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Importazione TXT: titolo link non valido","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Importazione TXT: encoding caratteri non rilevabile","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione TXT: impossibile importare in Memori segreti","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importazione TXT: limite importazione superato","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importazione TXT: importazione su GPT-4 richiede API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importazione TXT: importazione richiede un piano a pagamento","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importazione TXT: non hai crediti sufficienti per l\'operazione","EXPORTCSV_MISSING_CSV_SPECS":"Esportazione CSV: specifiche CSV mancanti","EXPORTCSV_MISSING_SEPARATOR":"Esportazione CSV: separatore mancante","EXPORTCSV_INVALID_SEPARATOR":"Esportazione CSV: separatore non valido","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Esportazione CSV: separatore varianti titolo mancante","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga mancante","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga non valido","EXPORTCSV_MISSING_PASSWORD":"Esportazione CSV: password mancante","EXPORTJSONL_MISSING_JSONL_SPECS":"Esportazione JSONL: specifiche JSONL mancanti","EXPORTJSONL_MISSING_PLATFORM":"Esportazione JSONL: piattaforma mancante","EXPORTJSONL_INVALID_PLATFORM":"Esportazione JSONL: piattaforma non valida","EXPORTJSONL_MISSING_PASSWORD":"Esportazione JSONL: password mancante","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Esportazione JSONL: esportazione richiede un piano a pagamento","ANALYSIS_MISSING_QUERY":"Analisi: query mancante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analisi: impossibile analizzare Memori segreti","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analisi: corrispondenza query utente richiede Pensiero Profondo","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Assegnazione badge: credenziali errate o mancanti","BADGE_ASSIGNMENT_MISSING_REF_ID":"Assegnazione badge: ID ref mancante","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Assegnazione badge: esito non trovato","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Assegnazione badge: URL di asserzione mancante","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Assegnazione badge: URL badge mancante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Assegnazione badge: URL issuer mancante","BADGE_ASSIGNMENT_INVALID_URL":"Assegnazione badge: URL non valido","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Assegnazione badge: destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Assegnazione badge: tipo destinatario sconosciuto","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario mancante","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario sconosciuto","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario errata","BADGE_NOT_FOUND":"Badge non trovato","OUTCOME_NO_DCM_CONFIGURED":"Outcome: nessun DCM configurato","OUTCOME_USER_BADGES_DISABLED":"Outcome: badge utente disabilitati","COMPLETION_CONFIG_MISSING_NAME":"Configurazione completions: nome mancante","COMPLETION_CONFIG_MISSING_PROVIDER":"Configurazione completions: provider mancante","COMPLETION_CONFIG_MISSING_ENDPOINT":"Configurazione completions: endpoint mancante","COMPLETION_CONFIG_MISSING_API_KEY":"Configurazione completions: API key mancante","COMPLETION_CONFIG_MISSING_MODEL":"Configurazione completions: modello mancante","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Configurazione completions: almeno un tipo di completions deve essere specificato","COMPLETION_CONFIG_INVALID_NAME":"Configurazione completions: nome non valido","COMPLETION_CONFIG_INVALID_PURPOSE":"Configurazione completions: tipo di completions non valido","COMPLETION_CONFIG_INVALID_ENDPOINT":"Configurazione completions: endpoint non valido","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Configurazione completions: endpoint incoerente","COMPLETION_CONFIG_INVALID_PROVIDER":"Configurazione completions: provider non valido","COMPLETION_CONFIG_NOT_FOUND":"Configurazione completions: non trovata","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Configurazione completions: non accessibile","COMPLETION_CONFIG_NAME_RESERVED":"Configurazione completions: nome riservato","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Configurazione completions: nome già esistente","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Configurazione completions: cambiamento visibilità non consentito"}}');var qG;qG=JSON.parse('{"yes":"Yes","no":"No","confirm":"Confirm","apply":"Apply","cancel":"Cancel","show":"Show","hide":"Hide","send":"Send","close":"Close","edit":"Edit","delete":"Delete","loading":"Loading","expand":"Expand","collapse":"Collapse","fullscreenEnter":"Enter fullscreen","fullscreenExit":"Exit fullscreen","center":"Center","bottom":"Bottom","hidden":"Hidden","day":"Day","month":"Month","year":"Year","createdAt":"Creation date","selected":"Selected","page":"page","actions":"Actions","next":"Next","previous":"Previous","copy":"Copy","copyRawCode":"Copy raw code","copyToClipboard":"Copy to clipboard","showOriginalText":"Show original","showTranslatedText":"Show translation","exactPosition":"Exact position","uncertain":"Uncertain","question":"Question","nothingFound":"Nothing found","venue":"Venue","searchVenue":"Search venue...","memoriBlockedTitle":"Blocked","memoriBlockedUntil":"Memori blocked until {{date}}","memoriBlockedAnon":"Currently \\"{{name}}\\" can\'t answer, come back here on {{date}}","memoriBlockedReasonExceedChats":"because it has exceeded the monthly threshold of allowed chats.","memoriBlockedGiverHelper":"You can still manage it as administrator, but other users will not be able to interact with it.","generatedByAI":"Answer generated by AI, may occasionally generate incorrect informations","whyThisAnswer":"Why this answer?","whyThisAnswerHelper":"This answer was generated automatically by an artificial intelligence based on these verified contents.","completionsEnabled":"Advanced AI, can respond with automatically generated answers that may sometimes contain incorrect information","completionProviderDown":"This Twin is integrated with a generative AI from {{provider}}, but it is currently unavailable. Try again later.","completionProviderFallbackName":"an external provider","completionProviderCheckStatusPage":"Check status page","boardOfExperts":"Board of experts","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","underage":"You must be at least {{age}} years old to sign up.","underageTwinSession":"You must be at least {{age}} years old to interact with this Twin.","ageVerification":"Age verification","ageVerificationText":"To interact with this Twin, you must be at least {{minAge}} years old.","nsfw":"NSFW: This Twin contains adult contents","deepThought":"Deep Thought","deepThoughtHelper":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","deepThoughtDisclaimerTitle":"Deep Thought enabled","deepThoughtDisclaimer":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together.","deepThoughtPreDisclaimerUnlogged":"Log in to enable Deep Thought.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought is disabled since you didn\'t consent its usage, you can change this any time in your account settings.","notEnoughCredits":"The author of this Twin does not have enough credits to answer your question.","knownFacts":{"title":"Known facts","description":"Details of the information shared between you and {{memoriName}}","type":"Type","typeShortTerm":"Short term","typeLongTerm":"Long term","typeHelper":"Types:\\n- Short Term: this Known Fact is always used during conversations\\n- Long Term: this Known Fact is used during conversations only if relevant to the current question","text":"Text","deleteSuccess":"Known fact deleted","deleteConfirmTitle":"Delete known fact","deleteConfirmMessage":"Are you sure you want to delete this known fact?","deleteSelectedConfirmTitle":"Delete selected known facts","deleteSelectedConfirmMessage":"Are you sure you want to delete the selected known facts?"},"auth":{"title":"Authentication","useRecoveryTokens":"Use recovery tokens","tokens":"Tokens","addToken":"Add token","usePassword":"Use password","atLeast":"At least"},"widget":{"instruct":"Instruct","test":"Test","sound":"Sound","position":"Position preferences","settings":"Settings","share":"Share","sendOnKeypress":"Hit Enter to send","sendOnClick":"Click on Submit","boardOfExperts":"Board of experts","showExpertsInTheBoard":"Show experts in this board","expertsInTheBoard":"Experts in this board","goToIntegrationsToCustomizeAvatar":"To customize the avatar, go to Share and customize the public page"},"write_and_speak":{"micButtonPopover":"Click the button to speak","micButtonPopoverListening":"Click the button to stop speak","pageInstructExplanation":"To teach me new things click on the INSTRUCT ME button to get started","pageTryMeExplanation":"To talk to me click on the START button to get started","instructButton":"INSTRUCT ME","tryMeButton":"START","chatHistory":"Chat history","exportChatHistory":"Export chat history","exportChatHistoryMessage":"Do you want to export chat history?","chatBotButtonText":"CLICK HERE TO OPEN CHATBOT","conversationStartedLabel":"Conversation started on","settingsHeaderLabel":"Setup here if you want to set the memori as continuous speech, and change the silence seconds if you want to customize them.","continuousSpeechLabel":"Continuous speech","holdToSpeak":"Hold to speak","releaseToEndListening":"Release to end listening","pressAndHoldToSpeak":"Press and hold to speak","microphoneMode":"Microphone mode","hideEmissionsLabel":"Hide text emitted by the Twin","secondsLabel":"Set seconds","controlsPosition":"Controls position","tryMeHeaderLabel":"TRY","unknownPosition":"Unknown position","fieldPlace":"Write the place (eg \'Milano\')","showMapLinkFor":"Show the position on the map","useMyPosition":"Use my position","myPosition":"Your position","updatingPosition":"Updating position...","placeNotFound":"Place not found!","requirePosition":"Insert your position before start","requirePositionHelp":"To talk to {{name}} you have to decide whether to provide your position or not. This is because different answers that it can provide you may depend on where you are.","dontWantToProvidePosition":"I don\'t want to provide my position","attachmentsLabel":"Enrich your message","iWantToTalkToIn":"I want to talk to {{name}} in"},"media":{"title":"Title","editAttributes":"Edit media attributes","uploadMimeTypeNotAllowed":"The file type is not allowed","uploadSizeLimitMessage":"The uploaded size is too big (max {{size}}MB)","uploadWrongResolutionMessage":"The resolution must be {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"You already have a Twin with this name","uploadHelperImages":"Upload a file with extension png, jpg, jpeg or gif, and having at maximum a size of {{size}}MB","uploadHelper":"Upload a file having at maximum a size of {{size}}MB","uploadError":"Upload failed","square":"square","scaleRatio":"Scale ratio","addMediaLabel":"Add a media","insertThisMediaMsg":"Insert these media","mediaUploadMessage":"Click to load a new media","addLinkLabel":"Add a link","linkKey":"URL","linkValue":"Link title","insertThisLink":"Insert a link to {{url}} with title {{title}}"},"gamification":{"level":"Level","points":"points","memoriReachedLevel":"became more evolved and reached level","levelGoToStatistics":"{{memori}} is at level {{level}} with {{points}} points. Click to go to statistics.","congratulationsNewLevel":"Congratulations, you have reached a new level!","congratulationsNewLevelDescription":"Your Memori became more evolved with {{points}} points, look at the","statistics":"statistics"},"login":{"login":"Login","logout":"Logout","user":"User","loggedDrawerTitle":"Hi, {{name}}!","loginDrawerTitle":"Login","signupDrawerTitle":"Sign up","newUserSignUp":"New user?","signUp":"Sign up!","alreadyHaveAnAccount":"Already have an account?","backToLogin":"Back to login","registrationDisabled":"Registration is disabled","contactAdmin":"Contact the administrator to request access","userNameOrEmail":"Username or email","email":"Email","emailFormatError":"Please, insert a valid email","username":"Username","usernameContainsReservedWord":"Username contains a reserved word, please choose another one","usernameFormatError":"Username must be at least 3 characters long and contain only letters, numbers and _","otpCode":"Verification code","resendVerificationCode":"Resend code","resentVerificationCode":"Confirmation code sent! Please check your email.","password":"Password","newPassword":"New password","confirmPassword":"Confirm Password","currentPassword":"Current password","passwordMatchingError":"Passwords do not match.","passwordFormatError":"Password must be at least 8 characters long and contain at least a number, an upper case letter, a lower case letter and a symbol","pwdWeak":"Weak","pwdAcceptable":"Acceptable","pwdStrong":"Strong","mustChangePassword":"You must change your password","passwordChange":"Change password","emailChange":"Change email","avatarChange":"Change avatar","underage":"You must be at least {{age}} years old to sign up.","optional":"Optional","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","missingData":"Missing informations","missingDataHelper":"We know that this is a bit annoying, but we need some more informations to complete your registration.","goToAccountToChangeYourPreferences":"You can change your choice at any time from your Account page.","deepThoughtExplaination":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","tnCAndPPAcceptedHelper":"Since your last login, T&C and Privacy Policy have changed. Please accept them, otherwise you won\'t be able to make changes to your Twins. You can always delete your account in your user profile page.","privacyLabel":"I have read and accepted the","privacyAndCookiePolicy":"Privacy e Cookie Policy","and":"and","termsOfService":"Terms of Service","pAndCUAccepted":"I accept the terms of service about Deep Thought","editAccount":"Edit account","save":"Save"},"success":"Success","Error":"Error","internal server error":"Oupsie, sorry... Something went wrong on the server","error":"Error","error.loading":"Error while loading content.","error.generic":"Oupsie, sorry... something went wrong.","error.serverNotResponding":"We are doing maintenance or releasing updates. Please try again later.","error.notFound":"Oupsie, we didn\'t find the page you were looking for.","error.goBackTo":"You can try to go back to the","error.reloadPage":"Reload the page","error.tryAgain":"Try again","error.unauthorized":"You are unauthorized to view this content.","error.unprocessableEntity":"Error while processing the request. Check the data you entered.","errors":{"TENANT_NOT_FOUND":"Tenant not found","TENANT_REGISTRATION_DISABLED":"Registration on this platform is disabled","TENANT_MISSING_NAME":"Tenant: name missing","TENANT_MAX_USERS_REACHED":"Maximum number of users reached","TENANT_MAX_ADMINS_REACHED":"Maximum number of admin users reached","TENANT_ALREADY_EXISTS":"Tenant already exists","TENANT_MISSING_DESCRIPTION":"Tenant: description missing","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: can\'t set completion provider","USER_NOT_CONFIRMED":"User still not confirmed","USER_NOT_FOUND":"User not found","USER_OR_PASSWORD_INVALID":"Invalid user or password","USER_MUST_CHANGE_PASSWORD":"You must change your password","USER_MUST_ENTER_VERIFICATION_CODE":"You must enter the verification code","USER_MISSING_TENANT":"User: missing tenant","USER_MISSING_NAME":"User: name is missing","USER_MISSING_PASSWORD":"User: password missing","USER_MISSING_EMAIL":"User: Missing email","USER_MISSING_VERIFICATION_CODE":"User: Missing verification code","USER_NAME_ALREADY_USED":"User name already in use","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"The password does not meet the security rules","USER_EMAIL_ALREADY_USED":"Email already in use","USER_EMAIL_INVALID":"Invalid email","USER_VERIFICATION_CODE_INVALID":"Invalid verification code","USER_MISSING_NAME_OR_EMAIL":"Missing username or email","USER_NAME_INVALID":"Invalid user name","USER_HAS_ONE_OR_MORE_MEMORI":"The user has one or more memories","USER_MISSING_NEW_PASSWORD":"User: new password missing","USER_NOTHING_TO_DO":"Nothing to do","USER_CANT_CREATE_MEMORI":"User not allowed to create Memori","USER_MAX_MEMORI_REACHED":"Maximum number of Memori reached","USER_TOO_MANY_ATTEMPTS":"Too many attempts","USER_MUST_ACCEPT_TNC_AND_PP":"You must accept the terms and conditions","USER_BIRTH_DATE_CANT_BE_CHANGED":"Date of birth cannot be changed","USER_CANT_SET_COMPLETION_PROVIDER":"User: not allowed to manage completion provider","USER_CANT_ENABLE_DEEP_THOUGHT":"User: not enabled to manage Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"User: not enabled to manage DCM integration","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"User: not allowed to manage chaining or expert group","USER_CREATION_BILLING_DENIED_PERMISSION":"You don\'t have enough credits to create a Twin","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"The user has one or more completion configurations","USER_CANT_BE_DELETED":"User can\'t be deleted","MEMORI_NOT_FOUND":"Memori not found","MEMORI_NOT_ACCESSIBLE":"Memori not accessible","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Only owner can change tag or pin","SESSION_NOT_FOUND":"Session not found","SESSION_IS_NOT_ADMINISTRATIVE":"Non-administrative session","SESSION_EXPIRED":"Session expired","MEMORI_MISSING_CONFIGURATION":"Twin: missing configuration","MEMORI_CONFIGURATION_NOT_FOUND":"Twin: configuration not found","MEMORI_INVALID_PRIVACY_TYPE":"Twin: invalid privacy type","MEMORI_MISSING_PASSWORD":"Twin: missing password","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Twin: total number of invalid recovery tokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Twin: minimum number of invalid recovery tokens","MEMORI_INVALID_VOICE_TYPE":"Twin: invalid voice type","MEMORI_MISSING_NAME":"Twin: missing name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Twin: missing password or recovery token","MEMORI_INVALID_ID":"Twin: invalid ID","MEMORI_NAME_ALREADY_USED":"Twin name already in use","MEMORI_INVALID_PIN":"Twin: Invalid PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Twin: TAG and PIN change require separate operations","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Twin: no password required when public","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought requires completions to be enabled","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"The expert group requires completions to be enabled","MEMORI_INVALID_COMPLETION_CONFIG":"Twin: invalid completions configuration","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfer: missing destination user","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfer: invalid destination user ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfer: invalid destination user data","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nothing to do","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memories: configuration cannot be changed","MEMORI_MISSING_NEW_PASSWORD":"Memories: new password missing","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Feature requires subscription","INTEGRATION_NOT_FOUND":"Integration not found","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Invalid date from format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Invalid date to format","INTEGRATION_INVALID_TYPE":"Invalid integration type","INTEGRATION_ALREADY_EXISTS":"Integration already exists","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Non-public memories cannot be integrated","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: missing invocation text","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: missing device email","INTEGRATION_MEMORI_IS_EMPTY":"Empty memories cannot be integrated","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: privacy policy missing","INTEGRATION_MISSING_CATEGORY":"Integration category missing","INTEGRATION_MISSING_DESCRIPTION":"Missing integration description","INTEGRATION_INVALID_INVOCATION_TEXT":"Invalid invocation text","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home no more available","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Upload requires multipart encoding","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: missing content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: maximum size exceeded","UPLOAD_FILE_IS_EMPTY":"Upload: empty file","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: invalid file type or signature","UPLOAD_MISSING_FILE_NAME":"Upload: missing file name","UPLOAD_INVALID_MEMORY_ID":"Upload: Invalid content ID","UPLOAD_MISSING_FILE_CONTENT":"Upload: Missing file content","ASSET_NOT_FOUND":"Asset not found","ASSET_NOT_ACCESSIBLE":"Asset not accessible","ASSET_MISSING_SESSION_ID":"Asset: missing session ID","ASSET_INVALID_FILE_NAME":"Asset: invalid file name","INVITATION_NOT_FOUND":"Invitation not found","INVITATION_NOT_ACCESSIBLE":"Invitation not accessible","INVITATION_ALREADY_ACCEPTED":"Invitation already accepted","INVITATION_ALREADY_REJECTED":"Invitation already rejected","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation: missing destination email","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation: destination email invalid","INVITATION_MISSING_TAG":"Invitation: missing tag","INVITATION_MISSING_PIN":"Invitation: PIN missing","INVITATION_INVALID_PIN":"Invitation: invalid PIN","INVITATION_INVALID_TYPE":"Invitation: invalid type","INVITATION_MISSING_DESTINATION_NAME":"Invitation: destination name missing","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation: tag and pin can\'t be changed","INVITATION_CANT_BE_CHANGED":"Intation: can\'t be changed","ACTIONLOG_INVALID_USER_ID":"Invalid user ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","ACTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","CONSUMPTIONLOG_INVALID_TYPE":"Invalid log type","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","CONSUMPTIONLOG_INVALID_USER_ID":"Invalid user ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifications: Invalid chat log extraction period","PROCESS_INVALID_TYPE":"Invalid process type","PROCESS_ALREADY_RUNNING":"Process already running","PROCESS_NOT_FOUND":"Process not found","IMPORTCSV_MISSING_ROWS":"CSV import: missing rows","IMPORTCSV_MISSING_CSV":"CSV Import: Missing CSV","IMPORTCSV_MISSING_SEPARATOR":"CSV import: missing separator","IMPORTCSV_INVALID_SEPARATOR":"CSV import: invalid separator","IMPORTCSV_MISSING_HEADERS":"CSV import: missing headers","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV import: missing title variant separator","IMPORTCSV_INVALID_RECEIVER_ID":"CSV import: invalid receiver ID","IMPORTCSV_INVALID_MEDIA_LINK":"CSV import: invalid media link","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"CSV import: invalid link title","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"CSV import: undetectable character encoding","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"CSV Import: Cannot import to Secret Memories","IMPORTTXT_MISSING_ROWS":"Importing TXT: missing rows","IMPORTTXT_INVALID_GRANULARITY":"Import TXT: invalid granularity","IMPORTTXT_INVALID_RECEIVER_ID":"Import TXT: invalid receiver ID","IMPORTTXT_INVALID_MEDIA_LINK":"Import TXT: invalid media link","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Import TXT: invalid link title","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"TXT import: undetectable character encoding","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"TXT Import: Cannot import to Secret Memories","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Import TXT: import limit exceeded","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Import TXT: import on GPT-4 requires API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Import TXT: Import requires a paying plan","IMPORTTXT_BILLING_DENIED_PERMISSION":"Import TXT: you don\'t have enough credits for the operation","EXPORTCSV_MISSING_CSV_SPECS":"CSV export: missing CSV specifications","EXPORTCSV_MISSING_SEPARATOR":"CSV export: missing separator","EXPORTCSV_INVALID_SEPARATOR":"CSV export: invalid separator","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV export: missing title variant separator","EXPORTCSV_MISSING_NEW_LINE_CHAR":"CSV export: missing newline character","EXPORTCSV_INVALID_NEW_LINE_CHAR":"CSV export: invalid newline character","EXPORTCSV_MISSING_PASSWORD":"CSV export: missing password","EXPORTJSONL_MISSING_JSONL_SPECS":"JSONL export: missing JSONL specifications","EXPORTJSONL_MISSING_PLATFORM":"JSONL export: missing platform","EXPORTJSONL_INVALID_PLATFORM":"JSONL export: invalid platform","EXPORTJSONL_MISSING_PASSWORD":"JSONL export: missing password","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"JSONL Export: Export requires a paid plan","ANALYSIS_MISSING_QUERY":"Analysis: missing query","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analysis: Unable to analyze Secret Memories","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analysis: matching user query requires Deep Thinking","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Badge assignment: incorrect or missing credentials","BADGE_ASSIGNMENT_MISSING_REF_ID":"Badge assignment: ref ID missing","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Badge assignment: result not found","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Badge assignment: Missing assertion URL","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Badge Assignment: Missing Badge URL","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Badge assignment: missing issuer URL","BADGE_ASSIGNMENT_INVALID_URL":"Badge assignment: Invalid URL","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Badge assignment: missing recipient","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Badge assignment: unknown recipient type","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Badge assignment: missing recipient identity","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Badge assignment: missing recipient hash type","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Badge assignment: recipient hash type unknown","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Badge assignment: incorrect recipient identity","BADGE_NOT_FOUND":"Badge not found","OUTCOME_NO_DCM_CONFIGURED":"Outcome: no DCM configured","OUTCOME_USER_BADGES_DISABLED":"Outcome: user badges disabled","COMPLETION_CONFIG_MISSING_NAME":"Completions configuration: missing name","COMPLETION_CONFIG_MISSING_PROVIDER":"Completions configuration: missing provider","COMPLETION_CONFIG_MISSING_ENDPOINT":"Completions configuration: missing endpoint","COMPLETION_CONFIG_MISSING_API_KEY":"Completions configuration: missing API key","COMPLETION_CONFIG_MISSING_MODEL":"Completions configuration: missing model","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Completions configuration: at least one completions type must be specified","COMPLETION_CONFIG_INVALID_NAME":"Completions configuration: invalid name","COMPLETION_CONFIG_INVALID_PURPOSE":"Completions configuration: invalid completions type","COMPLETION_CONFIG_INVALID_ENDPOINT":"Completions configuration: invalid endpoint","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Completions configuration: inconsistent endpoint","COMPLETION_CONFIG_INVALID_PROVIDER":"Completions configuration: invalid provider","COMPLETION_CONFIG_NOT_FOUND":"Completions configuration: not found","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Completions configuration: not accessible","COMPLETION_CONFIG_NAME_RESERVED":"Completions configuration: name reserved","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Completions configuration: name already exists","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Completions configuration: visibility change not allowed"}}');var KG;KG=JSON.parse('{"yes":"Oui","no":"Non","confirm":"Confirmer","apply":"Appliquer","cancel":"Annuler","show":"Montrer","hide":"Cacher","send":"Envoyer","close":"Fermer","edit":"Modifier","delete":"Supprimer","loading":"Chargement","expand":"Développer","collapse":"Effondrement","fullscreenEnter":"Entrez en plein écran","fullscreenExit":"Quitter le plein écran","center":"Centre","bottom":"Bas","hidden":"Caché","day":"Jour","month":"Mois","year":"Année","createdAt":"Date de création","selected":"Choisi","page":"page","actions":"Actes","next":"Suivant","previous":"Précédent","copy":"Copie","copyRawCode":"Copier le code brut","copyToClipboard":"Copier dans le presse-papier","showOriginalText":"Afficher l\'original","showTranslatedText":"Afficher la traduction","exactPosition":"Position exacte","uncertain":"Incertain","question":"Question","nothingFound":"Rien trouvé","venue":"Lieu","searchVenue":"Rechercher un lieu...","memoriBlockedTitle":"Bloqué","memoriBlockedUntil":"Memori bloqué jusqu\'à {{date}}","memoriBlockedAnon":"Actuellement \\"{{name}}\\"Je ne peux pas répondre, reviens ici {{date}}","memoriBlockedReasonExceedChats":"car il a dépassé le seuil mensuel de chats autorisés.","memoriBlockedGiverHelper":"Vous pouvez toujours le gérer en tant qu\'administrateur, mais les autres utilisateurs ne pourront pas interagir avec lui.","generatedByAI":"Réponse générée par l\'IA, peut occasionnellement générer des informations incorrectes","whyThisAnswer":"Pourquoi cette réponse ?","whyThisAnswerHelper":"Cette réponse a été générée automatiquement par une intelligence artificielle basée sur ces contenus vérifiés.","completionsEnabled":"L\'IA avancée peut répondre avec des réponses générées automatiquement qui peuvent parfois contenir des informations incorrectes","completionProviderDown":"Ce Twin est intégré à une IA générative de {{provider}}, mais il est actuellement indisponible. ","completionProviderFallbackName":"un prestataire externe","completionProviderCheckStatusPage":"Vérifier la page d\'état","boardOfExperts":"Conseil d\'experts","birthDate":"Date de naissance","birthDateHelper":"Nous demandons votre date de naissance uniquement pour activer ou désactiver les fonctionnalités qui ont des restrictions d\'âge","underage":"Vous devez être au moins {{age}} ans pour s\'inscrire.","underageTwinSession":"Vous devez être au moins {{age}} ans pour interagir avec ce Twin.","ageVerification":"Vérification de l\'âge","ageVerificationText":"Pour interagir avec ce Twin, vous devez être au minimum {{minAge}} ans.","nsfw":"NSFW : Ce jumeau contient du contenu pour adultes","deepThought":"Pensée profonde","deepThoughtHelper":"Deep Thought est une fonctionnalité avancée de l\'IA qui vous permettra d\'exploiter pleinement vos conversations en les gardant une trace. ","deepThoughtDisclaimerTitle":"Pensée profonde activée","deepThoughtDisclaimer":"Deep Thought est une fonctionnalité avancée de l\'IA qui vous permettra d\'exploiter pleinement vos conversations en les gardant une trace. ","deepThoughtPreDisclaimerUnlogged":"Connectez-vous pour activer Deep Thought.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought est désactivé car vous n\'avez pas consenti à son utilisation, vous pouvez le modifier à tout moment dans les paramètres de votre compte.","notEnoughCredits":"L\'auteur de ce Twin n\'a pas suffisamment de crédits pour répondre à votre question.","knownFacts":{"title":"Faits connus","description":"Détails des informations partagées entre vous et {{memoriName}}","type":"Taper","typeShortTerm":"Court terme","typeLongTerm":"Long terme","typeHelper":"Types :\\n","text":"Texte","deleteSuccess":"Fait connu supprimé","deleteConfirmTitle":"Supprimer un fait connu","deleteConfirmMessage":"Êtes-vous sûr de vouloir supprimer ce fait connu ?","deleteSelectedConfirmTitle":"Supprimer les faits connus sélectionnés","deleteSelectedConfirmMessage":"Etes-vous sûr de vouloir supprimer les faits connus sélectionnés ?"},"auth":{"title":"Authentification","useRecoveryTokens":"Utiliser des jetons de récupération","tokens":"Jetons","addToken":"Ajouter un jeton","usePassword":"Utiliser le mot de passe","atLeast":"Au moins"},"widget":{"instruct":"Instruire","test":"Test","sound":"Son","position":"Préférences de position","settings":"Paramètres","share":"Partager","sendOnKeypress":"Appuyez sur Entrée pour envoyer","sendOnClick":"Cliquez sur Soumettre","boardOfExperts":"Conseil d\'experts","showExpertsInTheBoard":"Afficher les experts dans ce forum","expertsInTheBoard":"Experts dans ce forum","goToIntegrationsToCustomizeAvatar":"Pour personnaliser l\'avatar, allez dans Partager et personnalisez la page publique"},"write_and_speak":{"micButtonPopover":"Cliquez sur le bouton pour parler","micButtonPopoverListening":"Cliquez sur le bouton pour arrêter de parler","pageInstructExplanation":"Pour m\'apprendre de nouvelles choses, cliquez sur le bouton INSTRUCTEZ-MOI pour commencer","pageTryMeExplanation":"Pour me parler, cliquez sur le bouton START pour commencer","instructButton":"INSTRUCTEZ-MOI","tryMeButton":"COMMENCER","chatHistory":"Historique des discussions","exportChatHistory":"Exporter l\'historique des discussions","exportChatHistoryMessage":"Voulez-vous exporter l’historique des discussions ?","chatBotButtonText":"CLIQUEZ ICI POUR OUVRIR LE CHATBOT","conversationStartedLabel":"La conversation a commencé le","settingsHeaderLabel":"Configurez ici si vous souhaitez définir la mémoire comme parole continue et modifiez les secondes de silence si vous souhaitez les personnaliser.","continuousSpeechLabel":"Discours continu","holdToSpeak":"Attends pour parler","releaseToEndListening":"Relâcher pour terminer l\'écoute","pressAndHoldToSpeak":"Appuyez et maintenez pour parler","microphoneMode":"Mode micro","hideEmissionsLabel":"Masquer le texte émis par le Twin","secondsLabel":"Régler les secondes","controlsPosition":"Position des commandes","tryMeHeaderLabel":"ESSAYER","unknownPosition":"Position inconnue","fieldPlace":"Écrivez le lieu (par exemple « Milano »)","showMapLinkFor":"Afficher la position sur la carte","useMyPosition":"Utiliser ma position","myPosition":"Votre poste","updatingPosition":"Mise à jour du poste...","placeNotFound":"Lieu introuvable !","requirePosition":"Insérez votre position avant de commencer","requirePositionHelp":"Pour parler à {{name}} vous devez décider si vous souhaitez ou non fournir votre poste. ","dontWantToProvidePosition":"Je ne veux pas donner ma position","attachmentsLabel":"Enrichissez votre message","iWantToTalkToIn":"je veux parler à {{name}} dans"},"media":{"title":"Titre","editAttributes":"Modifier les attributs du média","uploadMimeTypeNotAllowed":"Le type de fichier n\'est pas autorisé","uploadSizeLimitMessage":"La taille téléchargée est trop grande (max {{size}}Mo)","uploadWrongResolutionMessage":"La résolution doit être {{width}}x{{height}} pixels","memoriNameAlreadyUsed":"Vous avez déjà un jumeau portant ce nom","uploadHelperImages":"Téléchargez un fichier avec l\'extension png, jpg, jpeg ou gif, et ayant au maximum une taille de {{size}}Mo","uploadHelper":"Téléchargez un fichier ayant au maximum une taille de {{size}}Mo","uploadError":"Échec du téléchargement","square":"carré","scaleRatio":"Rapport d\'échelle","addMediaLabel":"Ajouter un média","insertThisMediaMsg":"Insérez ces médias","mediaUploadMessage":"Cliquez pour charger un nouveau média","addLinkLabel":"Ajouter un lien","linkKey":"URL","linkValue":"Titre du lien","insertThisLink":"Insérer un lien vers {{url}} avec titre {{title}}"},"gamification":{"level":"Niveau","points":"points","memoriReachedLevel":"est devenu plus évolué et a atteint le niveau","levelGoToStatistics":"{{memori}} est au niveau {{level}} avec {{points}} points. ","congratulationsNewLevel":"Félicitations, vous avez atteint un nouveau niveau !","congratulationsNewLevelDescription":"Votre Memori est devenu plus évolué avec {{points}} points, regardez le","statistics":"statistiques"},"login":{"login":"Se connecter","logout":"Déconnexion","user":"Utilisateur","loggedDrawerTitle":"Salut, {{name}}!","loginDrawerTitle":"Se connecter","signupDrawerTitle":"S\'inscrire","newUserSignUp":"Nouvel utilisateur ?","signUp":"S\'inscrire!","alreadyHaveAnAccount":"Vous avez déjà un compte ?","backToLogin":"Retour à la connexion","registrationDisabled":"L\'inscription est désactivée","contactAdmin":"Contacter l\'administrateur pour demander l\'accès","userNameOrEmail":"Nom d\'utilisateur ou email","email":"E-mail","emailFormatError":"Veuillez insérer un email valide","username":"Nom d\'utilisateur","usernameContainsReservedWord":"Le nom d\'utilisateur contient un mot réservé, veuillez en choisir un autre","usernameFormatError":"Le nom d\'utilisateur doit comporter au moins 3 caractères et contenir uniquement des lettres, des chiffres et _","otpCode":"Le code de vérification","resendVerificationCode":"Renvoyer le code","resentVerificationCode":"Code de confirmation envoyé ! ","password":"Mot de passe","newPassword":"Nouveau mot de passe","confirmPassword":"Confirmez le mot de passe","currentPassword":"Mot de passe actuel","passwordMatchingError":"Les mots de passe ne correspondent pas.","passwordFormatError":"Le mot de passe doit comporter au moins 8 caractères et contenir au moins un chiffre, une lettre majuscule, une lettre minuscule et un symbole.","pwdWeak":"Faible","pwdAcceptable":"Acceptable","pwdStrong":"Fort","mustChangePassword":"Vous devez changer votre mot de passe","passwordChange":"Changer le mot de passe","emailChange":"Changer d\'e-mail","avatarChange":"Changer d\'avatar","underage":"Vous devez être au moins {{age}} ans pour s\'inscrire.","optional":"Facultatif","birthDate":"Date de naissance","birthDateHelper":"Nous demandons votre date de naissance uniquement pour activer ou désactiver les fonctionnalités qui ont des restrictions d\'âge","missingData":"Informations manquantes","missingDataHelper":"Nous savons que c\'est un peu ennuyeux, mais nous avons besoin de plus d\'informations pour finaliser votre inscription.","goToAccountToChangeYourPreferences":"Vous pouvez modifier votre choix à tout moment depuis la page de votre compte.","deepThoughtExplaination":"Deep Thought est une fonctionnalité avancée de l\'IA qui vous permettra d\'exploiter pleinement vos conversations en les gardant une trace. ","tnCAndPPAcceptedHelper":"Depuis votre dernière connexion, les conditions générales et la politique de confidentialité ont changé. ","privacyLabel":"J\'ai lu et accepté le","privacyAndCookiePolicy":"Politique de confidentialité et de cookies","and":"et","termsOfService":"Conditions d\'utilisation","pAndCUAccepted":"J\'accepte les conditions d\'utilisation de Deep Thought","editAccount":"Modifier le compte","save":"Sauvegarder"},"success":"Succès","Error":"Erreur","internal server error":"Oupsie, désolé... Quelque chose s\'est mal passé sur le serveur","error":"Erreur","error.loading":"Erreur lors du chargement du contenu.","error.generic":"Oupsie, désolé... quelque chose s\'est mal passé.","error.serverNotResponding":"Nous effectuons une maintenance ou publions des mises à jour. ","error.notFound":"Oupsie, nous n\'avons pas trouvé la page que vous cherchiez.","error.goBackTo":"Vous pouvez essayer de revenir au","error.reloadPage":"Recharger la page","error.tryAgain":"Essayer à nouveau","error.unauthorized":"Vous n\'êtes pas autorisé à consulter ce contenu.","error.unprocessableEntity":"Erreur lors du traitement de la demande. ","errors":{"TENANT_NOT_FOUND":"Locataire introuvable","TENANT_REGISTRATION_DISABLED":"L\'inscription sur cette plateforme est désactivée","TENANT_MISSING_NAME":"Locataire : nom manquant","TENANT_MAX_USERS_REACHED":"Nombre maximum d\'utilisateurs atteint","TENANT_MAX_ADMINS_REACHED":"Nombre maximum d\'utilisateurs administrateurs atteint","TENANT_ALREADY_EXISTS":"Le locataire existe déjà","TENANT_MISSING_DESCRIPTION":"Locataire : description manquante","TENANT_CANT_SET_COMPLETION_PROVIDER":"Locataire : impossible de définir le fournisseur de complétion","USER_NOT_CONFIRMED":"L\'utilisateur n\'est toujours pas confirmé","USER_NOT_FOUND":"Utilisateur introuvable","USER_OR_PASSWORD_INVALID":"Utilisateur ou mot de passe invalide","USER_MUST_CHANGE_PASSWORD":"Vous devez changer votre mot de passe","USER_MUST_ENTER_VERIFICATION_CODE":"Vous devez entrer le code de vérification","USER_MISSING_TENANT":"Utilisateur : locataire manquant","USER_MISSING_NAME":"Utilisateur : le nom est manquant","USER_MISSING_PASSWORD":"Utilisateur : mot de passe manquant","USER_MISSING_EMAIL":"Utilisateur : E-mail manquant","USER_MISSING_VERIFICATION_CODE":"Utilisateur : Code de vérification manquant","USER_NAME_ALREADY_USED":"Nom d\'utilisateur déjà utilisé","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"Le mot de passe ne répond pas aux règles de sécurité","USER_EMAIL_ALREADY_USED":"E-mail déjà utilisé","USER_EMAIL_INVALID":"E-mail invalide","USER_VERIFICATION_CODE_INVALID":"Code de vérification invalide","USER_MISSING_NAME_OR_EMAIL":"Nom d\'utilisateur ou e-mail manquant","USER_NAME_INVALID":"Nom d\'utilisateur invalide","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utilisateur possède une ou plusieurs mémoires","USER_MISSING_NEW_PASSWORD":"Utilisateur : nouveau mot de passe manquant","USER_NOTHING_TO_DO":"Rien à faire","USER_CANT_CREATE_MEMORI":"L\'utilisateur n\'est pas autorisé à créer des Memori","USER_MAX_MEMORI_REACHED":"Nombre maximum de Memori atteint","USER_TOO_MANY_ATTEMPTS":"Trop de tentatives","USER_MUST_ACCEPT_TNC_AND_PP":"Vous devez accepter les termes et conditions","USER_BIRTH_DATE_CANT_BE_CHANGED":"La date de naissance ne peut pas être modifiée","USER_CANT_SET_COMPLETION_PROVIDER":"Utilisateur : non autorisé à gérer le fournisseur de complétion","USER_CANT_ENABLE_DEEP_THOUGHT":"Utilisateur : non autorisé à gérer Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"Utilisateur : non autorisé à gérer l\'intégration DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Utilisateur : non autorisé à gérer des chaînages ou des groupes d\'experts","USER_CREATION_BILLING_DENIED_PERMISSION":"Vous n\'avez pas assez de crédits pour créer un Twin","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"L\'utilisateur dispose d\'une ou plusieurs configurations de complétion","USER_CANT_BE_DELETED":"L\'utilisateur ne peut pas être supprimé","MEMORI_NOT_FOUND":"Mémoire introuvable","MEMORI_NOT_ACCESSIBLE":"Mémoires non accessibles","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Seul le propriétaire peut modifier le tag ou le code PIN","SESSION_NOT_FOUND":"Séance introuvable","SESSION_IS_NOT_ADMINISTRATIVE":"Séance non administrative","SESSION_EXPIRED":"Session expirée","MEMORI_MISSING_CONFIGURATION":"Twin : configuration manquante","MEMORI_CONFIGURATION_NOT_FOUND":"Twin : configuration introuvable","MEMORI_INVALID_PRIVACY_TYPE":"Twin : type de confidentialité non valide","MEMORI_MISSING_PASSWORD":"Twin : mot de passe manquant","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Twin : nombre total de jetons de récupération invalides","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Twin : nombre minimum de jetons de récupération invalides","MEMORI_INVALID_VOICE_TYPE":"Twin : type de voix invalide","MEMORI_MISSING_NAME":"Jumeau : nom manquant","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Twin : mot de passe ou jeton de récupération manquant","MEMORI_INVALID_ID":"Jumeau : pièce d\'identité invalide","MEMORI_NAME_ALREADY_USED":"Nom jumeau déjà utilisé","MEMORI_INVALID_PIN":"Twin : code PIN invalide","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Twin : le changement de TAG et de PIN nécessite des opérations distinctes","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Twin : aucun mot de passe requis lorsqu\'il est public","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought nécessite que les complétions soient activées","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Le groupe d\'experts exige que les complétions soient activées","MEMORI_INVALID_COMPLETION_CONFIG":"Twin : configuration des complétions non valide","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfert : utilisateur de destination manquant","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfert : ID utilisateur de destination non valide","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfert : données utilisateur de destination non valides","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfert : rien à faire","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Mémoires : la configuration ne peut pas être modifiée","MEMORI_MISSING_NEW_PASSWORD":"Souvenirs : nouveau mot de passe manquant","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"La fonctionnalité nécessite un abonnement","INTEGRATION_NOT_FOUND":"Intégration introuvable","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Date invalide du format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Date à formater invalide","INTEGRATION_INVALID_TYPE":"Type d\'intégration invalide","INTEGRATION_ALREADY_EXISTS":"L\'intégration existe déjà","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Les mémoires non publiques ne peuvent pas être intégrées","INTEGRATION_MISSING_INVOCATION_TEXT":"Intégration : texte d\'invocation manquant","INTEGRATION_MISSING_DEVICE_EMAILS":"Intégration : e-mail de l\'appareil manquant","INTEGRATION_MEMORI_IS_EMPTY":"Les mémoires vides ne peuvent pas être intégrées","INTEGRATION_MISSING_PRIVACY_POLICY":"Intégration : politique de confidentialité manquante","INTEGRATION_MISSING_CATEGORY":"Catégorie d\'intégration manquante","INTEGRATION_MISSING_DESCRIPTION":"Description de l\'intégration manquante","INTEGRATION_INVALID_INVOCATION_TEXT":"Texte d\'appel invalide","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home n\'est plus disponible","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Le téléchargement nécessite un codage en plusieurs parties","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Téléchargement : limite de type de contenu manquante","UPLOAD_MAX_LENGTH_EXCEEDED":"Téléchargement : taille maximale dépassée","UPLOAD_FILE_IS_EMPTY":"Télécharger : fichier vide","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Téléchargement : type de fichier ou signature non valide","UPLOAD_MISSING_FILE_NAME":"Télécharger : nom de fichier manquant","UPLOAD_INVALID_MEMORY_ID":"Télécharger : ID de contenu invalide","UPLOAD_MISSING_FILE_CONTENT":"Télécharger : contenu du fichier manquant","ASSET_NOT_FOUND":"Actif introuvable","ASSET_NOT_ACCESSIBLE":"Actif non accessible","ASSET_MISSING_SESSION_ID":"Élément : ID de session manquant","ASSET_INVALID_FILE_NAME":"Élément : nom de fichier non valide","INVITATION_NOT_FOUND":"Invitation introuvable","INVITATION_NOT_ACCESSIBLE":"Invitation non accessible","INVITATION_ALREADY_ACCEPTED":"Invitation déjà acceptée","INVITATION_ALREADY_REJECTED":"Invitation déjà rejetée","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation : e-mail de destination manquant","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation : e-mail de destination invalide","INVITATION_MISSING_TAG":"Invitation : étiquette manquante","INVITATION_MISSING_PIN":"Invitation : code PIN manquant","INVITATION_INVALID_PIN":"Invitation : code PIN invalide","INVITATION_INVALID_TYPE":"Invitation : type non valide","INVITATION_MISSING_DESTINATION_NAME":"Invitation : le nom de la destination est manquant","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation : le tag et le code PIN ne peuvent pas être modifiés","INVITATION_CANT_BE_CHANGED":"Intation : ne peut pas être modifié","ACTIONLOG_INVALID_USER_ID":"ID utilisateur invalide","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date de : format non valide","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date de : format non valide","ACTIONLOG_INVALID_MEMORI_ID":"Identifiant Memori invalide","CONSUMPTIONLOG_INVALID_TYPE":"Type de journal invalide","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date de : format non valide","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date de : format non valide","CONSUMPTIONLOG_INVALID_USER_ID":"ID utilisateur invalide","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Identifiant Memori invalide","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifications : période d\'extraction du journal de discussion non valide","PROCESS_INVALID_TYPE":"Type de processus invalide","PROCESS_ALREADY_RUNNING":"Processus déjà en cours","PROCESS_NOT_FOUND":"Processus introuvable","IMPORTCSV_MISSING_ROWS":"Import CSV : lignes manquantes","IMPORTCSV_MISSING_CSV":"Importation CSV : CSV manquant","IMPORTCSV_MISSING_SEPARATOR":"Import CSV : séparateur manquant","IMPORTCSV_INVALID_SEPARATOR":"Importation CSV : séparateur non valide","IMPORTCSV_MISSING_HEADERS":"Import CSV : en-têtes manquants","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Import CSV : séparateur de variante de titre manquant","IMPORTCSV_INVALID_RECEIVER_ID":"Importation CSV : ID de destinataire non valide","IMPORTCSV_INVALID_MEDIA_LINK":"Importation CSV : lien média non valide","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"Importation CSV : titre du lien invalide","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Import CSV : encodage de caractères indétectable","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importation CSV : impossible d\'importer dans les mémoires secrètes","IMPORTTXT_MISSING_ROWS":"Importation de TXT : lignes manquantes","IMPORTTXT_INVALID_GRANULARITY":"Importer TXT : granularité invalide","IMPORTTXT_INVALID_RECEIVER_ID":"Importer TXT : ID de destinataire invalide","IMPORTTXT_INVALID_MEDIA_LINK":"Importer TXT : lien média non valide","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Importer TXT : titre du lien invalide","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Import TXT : encodage de caractères indétectable","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importation TXT : impossible d\'importer vers les mémoires secrètes","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importer TXT : limite d\'importation dépassée","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importer TXT : l\'importation sur GPT-4 nécessite une clé API","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importer TXT : l\'importation nécessite un forfait payant","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importer TXT : vous n\'avez pas assez de crédits pour l\'opération","EXPORTCSV_MISSING_CSV_SPECS":"Exportation CSV : spécifications CSV manquantes","EXPORTCSV_MISSING_SEPARATOR":"Export CSV : séparateur manquant","EXPORTCSV_INVALID_SEPARATOR":"Exportation CSV : séparateur non valide","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Exportation CSV : séparateur de variante de titre manquant","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Exportation CSV : caractère de nouvelle ligne manquant","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Exportation CSV : caractère de nouvelle ligne non valide","EXPORTCSV_MISSING_PASSWORD":"Export CSV : mot de passe manquant","EXPORTJSONL_MISSING_JSONL_SPECS":"Export JSONL : spécifications JSONL manquantes","EXPORTJSONL_MISSING_PLATFORM":"Export JSONL : plateforme manquante","EXPORTJSONL_INVALID_PLATFORM":"Export JSONL : plateforme non valide","EXPORTJSONL_MISSING_PASSWORD":"Export JSONL : mot de passe manquant","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Exportation JSONL : l\'exportation nécessite un forfait payant","ANALYSIS_MISSING_QUERY":"Analyse : requête manquante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analyse : impossible d\'analyser les souvenirs secrets","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analyse : la correspondance avec la requête de l\'utilisateur nécessite une réflexion approfondie","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Attribution des badges : identifiants incorrects ou manquants","BADGE_ASSIGNMENT_MISSING_REF_ID":"Affectation du badge : ID de référence manquant","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Attribution des badges : résultat introuvable","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Attribution du badge : URL d\'assertion manquante","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Attribution du badge : URL du badge manquante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Attribution du badge : URL de l\'émetteur manquante","BADGE_ASSIGNMENT_INVALID_URL":"Attribution du badge : URL invalide","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Affectation du badge : destinataire manquant","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Attribution du badge : type de destinataire inconnu","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Attribution du badge : identité du destinataire manquante","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Attribution du badge : type de hachage du destinataire manquant","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Attribution du badge : type de hachage du destinataire inconnu","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Attribution du badge : identité du destinataire incorrecte","BADGE_NOT_FOUND":"Badge introuvable","OUTCOME_NO_DCM_CONFIGURED":"Résultat : aucun DCM configuré","OUTCOME_USER_BADGES_DISABLED":"Résultat : badges utilisateur désactivés","COMPLETION_CONFIG_MISSING_NAME":"Configuration des complétions : nom manquant","COMPLETION_CONFIG_MISSING_PROVIDER":"Configuration des complétions : fournisseur manquant","COMPLETION_CONFIG_MISSING_ENDPOINT":"Configuration des complétions : point de terminaison manquant","COMPLETION_CONFIG_MISSING_API_KEY":"Configuration des complétions : clé API manquante","COMPLETION_CONFIG_MISSING_MODEL":"Configuration des complétions : modèle manquant","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Configuration des complétions : au moins un type de complétions doit être spécifié","COMPLETION_CONFIG_INVALID_NAME":"Configuration des complétions: nom non valide","COMPLETION_CONFIG_INVALID_PURPOSE":"Configuration des complétions : type de complétions non valide","COMPLETION_CONFIG_INVALID_ENDPOINT":"Configuration des achèvements : point de terminaison non valide","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Configuration des complétions : point de terminaison incohérent","COMPLETION_CONFIG_INVALID_PROVIDER":"Configuration des complétions : fournisseur non valide","COMPLETION_CONFIG_NOT_FOUND":"Configuration des complétions : introuvable","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Configuration des complétions : non accessible","COMPLETION_CONFIG_NAME_RESERVED":"Configuration des complétions : nom réservé","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Configuration des complétions : le nom existe déjà","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Configuration des complétions : changement de visibilité non autorisé"}}');var JG;JG=JSON.parse('{"yes":"Ja","no":"NEIN","confirm":"Bestätigen","apply":"Anwenden","cancel":"Stornieren","show":"Zeigen","hide":"Verstecken","send":"Schicken","close":"Schließen","edit":"Bearbeiten","delete":"Löschen","loading":"Laden","expand":"Expandieren","collapse":"Zusammenbruch","fullscreenEnter":"Geben Sie den Vollbildmodus ein","fullscreenExit":"Beenden Sie den Vollbildmodus","center":"Center","bottom":"Unten","hidden":"Versteckt","day":"Tag","month":"Monat","year":"Jahr","createdAt":"Erstellungsdatum","selected":"Ausgewählt","page":"Seite","actions":"Aktionen","next":"Nächste","previous":"Vorherige","copy":"Kopie","copyRawCode":"Rohcode kopieren","copyToClipboard":"In die Zwischenablage kopieren","showOriginalText":"Original anzeigen","showTranslatedText":"Übersetzung anzeigen","exactPosition":"Genaue Position","uncertain":"Unsicher","question":"Frage","nothingFound":"Nichts gefunden","venue":"Veranstaltungsort","searchVenue":"Veranstaltungsort suchen...","memoriBlockedTitle":"Blockiert","memoriBlockedUntil":"Memori blockiert bis {{date}}","memoriBlockedAnon":"Momentan \\"{{name}}„Kann nicht antworten, komm hierher zurück {{date}}","memoriBlockedReasonExceedChats":"weil der monatliche Schwellenwert für erlaubte Chats überschritten wurde.","memoriBlockedGiverHelper":"Sie können es weiterhin als Administrator verwalten, andere Benutzer können jedoch nicht damit interagieren.","generatedByAI":"Von KI generierte Antworten können gelegentlich falsche Informationen generieren","whyThisAnswer":"Warum diese Antwort?","whyThisAnswerHelper":"Diese Antwort wurde automatisch von einer künstlichen Intelligenz auf Basis dieser verifizierten Inhalte generiert.","completionsEnabled":"Fortschrittliche KI kann mit automatisch generierten Antworten reagieren, die manchmal falsche Informationen enthalten können","completionProviderDown":"Dieser Zwilling ist mit einer generativen KI von integriert {{provider}}, aber es ist derzeit nicht verfügbar. ","completionProviderFallbackName":"ein externer Anbieter","completionProviderCheckStatusPage":"Überprüfen Sie die Statusseite","boardOfExperts":"Expertengremium","birthDate":"Geburtsdatum","birthDateHelper":"Wir fragen nur nach Ihrem Geburtsdatum, um Funktionen zu aktivieren oder zu deaktivieren, für die Altersbeschränkungen gelten","underage":"Das müssen Sie mindestens sein {{age}} Jahre alt, um sich anzumelden.","underageTwinSession":"Das müssen Sie mindestens sein {{age}} Jahre alt, um mit diesem Zwilling zu interagieren.","ageVerification":"Altersüberprüfung","ageVerificationText":"Um mit diesem Zwilling interagieren zu können, müssen Sie mindestens sein {{minAge}} Jahre alt.","nsfw":"NSFW: Dieser Twin enthält Inhalte für Erwachsene","deepThought":"Tiefer Gedanke","deepThoughtHelper":"Deep Thought ist eine erweiterte Funktion der KI, die es Ihnen ermöglicht, Ihre Gespräche voll auszuschöpfen, indem Sie sie verfolgen. ","deepThoughtDisclaimerTitle":"Deep Thought aktiviert","deepThoughtDisclaimer":"Deep Thought ist eine erweiterte Funktion der KI, die es Ihnen ermöglicht, Ihre Gespräche voll auszuschöpfen, indem Sie sie verfolgen. ","deepThoughtPreDisclaimerUnlogged":"Melden Sie sich an, um Deep Thought zu aktivieren.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought ist deaktiviert, da Sie der Nutzung nicht zugestimmt haben. Sie können dies jederzeit in Ihren Kontoeinstellungen ändern.","notEnoughCredits":"Der Autor dieses Zwillings verfügt nicht über genügend Credits, um Ihre Frage zu beantworten.","knownFacts":{"title":"Bekannte Fakten","description":"Einzelheiten zu den Informationen, die zwischen Ihnen und geteilt werden {{memoriName}}","type":"Typ","typeShortTerm":"Kurzfristig","typeLongTerm":"Langfristig","typeHelper":"Typen:\\n","text":"Text","deleteSuccess":"Bekannte Tatsache gelöscht","deleteConfirmTitle":"Bekannte Tatsache löschen","deleteConfirmMessage":"Sind Sie sicher, dass Sie diese bekannte Tatsache löschen möchten?","deleteSelectedConfirmTitle":"Ausgewählte bekannte Fakten löschen","deleteSelectedConfirmMessage":"Sind Sie sicher, dass Sie die ausgewählten bekannten Fakten löschen möchten?"},"auth":{"title":"Authentifizierung","useRecoveryTokens":"Verwenden Sie Wiederherstellungstoken","tokens":"Token","addToken":"Token hinzufügen","usePassword":"Passwort verwenden","atLeast":"Mindestens"},"widget":{"instruct":"Anweisen","test":"Prüfen","sound":"Klang","position":"Positionspräferenzen","settings":"Einstellungen","share":"Aktie","sendOnKeypress":"Drücken Sie zum Senden die Eingabetaste","sendOnClick":"Klicken Sie auf Senden","boardOfExperts":"Expertengremium","showExpertsInTheBoard":"Experten in diesem Forum anzeigen","expertsInTheBoard":"Experten in diesem Forum","goToIntegrationsToCustomizeAvatar":"Um den Avatar anzupassen, gehen Sie zu „Teilen“ und passen Sie die öffentliche Seite an"},"write_and_speak":{"micButtonPopover":"Klicken Sie auf die Schaltfläche, um zu sprechen","micButtonPopoverListening":"Klicken Sie auf die Schaltfläche, um das Sprechen zu stoppen","pageInstructExplanation":"Um mir neue Dinge beizubringen, klicken Sie auf die Schaltfläche „ANLEITEN“, um zu beginnen","pageTryMeExplanation":"Um mit mir zu sprechen, klicken Sie auf die Schaltfläche START, um zu beginnen","instructButton":"WEISE MICH AN","tryMeButton":"START","chatHistory":"Chatverlauf","exportChatHistory":"Chatverlauf exportieren","exportChatHistoryMessage":"Möchten Sie den Chatverlauf exportieren?","chatBotButtonText":"KLICKEN SIE HIER, UM CHATBOT ZU ÖFFNEN","conversationStartedLabel":"Das Gespräch begann am","settingsHeaderLabel":"Richten Sie hier ein, wenn Sie die Memori als Dauerrede einstellen möchten, und ändern Sie die Stillesekunden, wenn Sie sie anpassen möchten.","continuousSpeechLabel":"Kontinuierliche Rede","holdToSpeak":"Halten Sie gedrückt, um zu sprechen","releaseToEndListening":"Lassen Sie los, um das Hören zu beenden","pressAndHoldToSpeak":"Zum Sprechen gedrückt halten","microphoneMode":"Mikrofonmodus","hideEmissionsLabel":"Vom Zwilling ausgegebenen Text ausblenden","secondsLabel":"Sekunden einstellen","controlsPosition":"Steuert die Position","tryMeHeaderLabel":"VERSUCHEN","unknownPosition":"Unbekannte Position","fieldPlace":"Geben Sie den Ort ein (z. B. „Mailand“)","showMapLinkFor":"Zeigen Sie die Position auf der Karte an","useMyPosition":"Nutzen Sie meine Position","myPosition":"Ihre Position","updatingPosition":"Position wird aktualisiert...","placeNotFound":"Ort nicht gefunden!","requirePosition":"Geben Sie vor dem Start Ihre Position ein","requirePositionHelp":"Zum Reden {{name}} Sie müssen entscheiden, ob Sie Ihre Position angeben oder nicht. ","dontWantToProvidePosition":"Ich möchte meine Position nicht bekannt geben","attachmentsLabel":"Bereichern Sie Ihre Botschaft","iWantToTalkToIn":"Ich möchte mit reden {{name}} In"},"media":{"title":"Titel","editAttributes":"Medienattribute bearbeiten","uploadMimeTypeNotAllowed":"Der Dateityp ist nicht zulässig","uploadSizeLimitMessage":"Die hochgeladene Größe ist zu groß (max {{size}}MB)","uploadWrongResolutionMessage":"Die Auflösung muss sein {{width}}X{{height}} Pixel","memoriNameAlreadyUsed":"Du hast bereits einen Zwilling mit diesem Namen","uploadHelperImages":"Laden Sie eine Datei mit der Erweiterung PNG, JPG, JPEG oder GIF hoch und darf maximal eine Größe von haben {{size}}MB","uploadHelper":"Laden Sie eine Datei mit einer maximalen Größe von hoch {{size}}MB","uploadError":"Der Upload ist fehlgeschlagen","square":"Quadrat","scaleRatio":"Maßstabsverhältnis","addMediaLabel":"Fügen Sie ein Medium hinzu","insertThisMediaMsg":"Legen Sie diese Medien ein","mediaUploadMessage":"Klicken Sie hier, um ein neues Medium zu laden","addLinkLabel":"Fügen Sie einen Link hinzu","linkKey":"URL","linkValue":"Linktitel","insertThisLink":"Fügen Sie einen Link ein {{url}} mit Titel {{title}}"},"gamification":{"level":"Ebene","points":"Punkte","memoriReachedLevel":"entwickelte sich weiter und erreichte ein höheres Niveau","levelGoToStatistics":"{{memori}} ist auf gleicher Höhe {{level}} mit {{points}} Punkte. ","congratulationsNewLevel":"Herzlichen Glückwunsch, Sie haben ein neues Level erreicht!","congratulationsNewLevelDescription":"Ihre Memori wurden mit weiterentwickelt {{points}} Punkte, schauen Sie sich die an","statistics":"Statistiken"},"login":{"login":"Login","logout":"Abmelden","user":"Benutzer","loggedDrawerTitle":"Hallo, {{name}}!","loginDrawerTitle":"Login","signupDrawerTitle":"Melden Sie sich an","newUserSignUp":"Neuer Benutzer?","signUp":"Melden Sie sich an!","alreadyHaveAnAccount":"Sie haben bereits ein Konto?","backToLogin":"Zurück zum Login","registrationDisabled":"Die Registrierung ist deaktiviert","contactAdmin":"Wenden Sie sich an den Administrator, um Zugriff anzufordern","userNameOrEmail":"Benutzername oder E-Mail","email":"E-Mail","emailFormatError":"Bitte geben Sie eine gültige E-Mail-Adresse ein","username":"Benutzername","usernameContainsReservedWord":"Der Benutzername enthält ein reserviertes Wort. Bitte wählen Sie ein anderes","usernameFormatError":"Der Benutzername muss mindestens 3 Zeichen lang sein und darf nur Buchstaben, Zahlen und _ enthalten.","otpCode":"Bestätigungscode","resendVerificationCode":"Code erneut senden","resentVerificationCode":"Bestätigungscode gesendet! ","password":"Passwort","newPassword":"Neues Passwort","confirmPassword":"Passwort bestätigen","currentPassword":"Aktuelles Passwort","passwordMatchingError":"Passwörter stimmen nicht überein.","passwordFormatError":"Das Passwort muss mindestens 8 Zeichen lang sein und mindestens eine Zahl, einen Großbuchstaben, einen Kleinbuchstaben und ein Symbol enthalten","pwdWeak":"Schwach","pwdAcceptable":"Akzeptabel","pwdStrong":"Stark","mustChangePassword":"Sie müssen Ihr Passwort ändern","passwordChange":"Kennwort ändern","emailChange":"E-Mail ändern","avatarChange":"Avatar ändern","underage":"Das müssen Sie mindestens sein {{age}} Jahre alt, um sich anzumelden.","optional":"Optional","birthDate":"Geburtsdatum","birthDateHelper":"Wir fragen nur nach Ihrem Geburtsdatum, um Funktionen zu aktivieren oder zu deaktivieren, für die Altersbeschränkungen gelten","missingData":"Fehlende Informationen","missingDataHelper":"Wir wissen, dass dies etwas nervig ist, benötigen jedoch noch einige weitere Informationen, um Ihre Registrierung abzuschließen.","goToAccountToChangeYourPreferences":"Sie können Ihre Auswahl jederzeit auf Ihrer Kontoseite ändern.","deepThoughtExplaination":"Deep Thought ist eine erweiterte Funktion der KI, die es Ihnen ermöglicht, Ihre Gespräche voll auszuschöpfen, indem Sie sie verfolgen. ","tnCAndPPAcceptedHelper":"Seit Ihrer letzten Anmeldung haben sich die AGB und Datenschutzbestimmungen geändert. ","privacyLabel":"Ich habe die gelesen und akzeptiert","privacyAndCookiePolicy":"Datenschutz und Cookie-Richtlinie","and":"Und","termsOfService":"Nutzungsbedingungen","pAndCUAccepted":"Ich akzeptiere die Nutzungsbedingungen von Deep Thought","editAccount":"Konto bearbeiten","save":"Speichern"},"success":"Erfolg","Error":"Fehler","internal server error":"Oupsie, tut mir leid... Auf dem Server ist ein Fehler aufgetreten","error":"Fehler","error.loading":"Fehler beim Laden des Inhalts.","error.generic":"Oupsie, tut mir leid ... etwas ist schief gelaufen.","error.serverNotResponding":"Wir führen Wartungsarbeiten durch oder veröffentlichen Updates. ","error.notFound":"Oupsie, wir haben die von Ihnen gesuchte Seite nicht gefunden.","error.goBackTo":"Sie können versuchen, dorthin zurückzukehren","error.reloadPage":"Laden Sie die Seite neu","error.tryAgain":"Versuchen Sie es erneut","error.unauthorized":"Es ist Ihnen nicht gestattet, diesen Inhalt anzuzeigen.","error.unprocessableEntity":"Fehler beim Verarbeiten der Anfrage. ","errors":{"TENANT_NOT_FOUND":"Mieter nicht gefunden","TENANT_REGISTRATION_DISABLED":"Die Registrierung auf dieser Plattform ist deaktiviert","TENANT_MISSING_NAME":"Mieter: Name fehlt","TENANT_MAX_USERS_REACHED":"Maximale Anzahl Benutzer erreicht","TENANT_MAX_ADMINS_REACHED":"Maximale Anzahl an Admin-Benutzern erreicht","TENANT_ALREADY_EXISTS":"Mieter existiert bereits","TENANT_MISSING_DESCRIPTION":"Mieter: Beschreibung fehlt","TENANT_CANT_SET_COMPLETION_PROVIDER":"Mandant: Abschlussanbieter kann nicht festgelegt werden","USER_NOT_CONFIRMED":"Benutzer noch nicht bestätigt","USER_NOT_FOUND":"Benutzer nicht gefunden","USER_OR_PASSWORD_INVALID":"Ungültiger Benutzer oder Passwort","USER_MUST_CHANGE_PASSWORD":"Sie müssen Ihr Passwort ändern","USER_MUST_ENTER_VERIFICATION_CODE":"Sie müssen den Bestätigungscode eingeben","USER_MISSING_TENANT":"Benutzer: Mieter fehlt","USER_MISSING_NAME":"Benutzer: Name fehlt","USER_MISSING_PASSWORD":"Benutzer: Passwort fehlt","USER_MISSING_EMAIL":"Benutzer: Fehlende E-Mail","USER_MISSING_VERIFICATION_CODE":"Benutzer: Fehlender Bestätigungscode","USER_NAME_ALREADY_USED":"Benutzername wird bereits verwendet","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"Das Passwort entspricht nicht den Sicherheitsregeln","USER_EMAIL_ALREADY_USED":"E-Mail wird bereits verwendet","USER_EMAIL_INVALID":"Ungültige E-Mail","USER_VERIFICATION_CODE_INVALID":"Ungültiger Bestätigungscode","USER_MISSING_NAME_OR_EMAIL":"Benutzername oder E-Mail fehlen","USER_NAME_INVALID":"Ungültiger Benutzername","USER_HAS_ONE_OR_MORE_MEMORI":"Der Benutzer verfügt über eine oder mehrere Erinnerungen","USER_MISSING_NEW_PASSWORD":"Benutzer: Neues Passwort fehlt","USER_NOTHING_TO_DO":"Nichts zu tun","USER_CANT_CREATE_MEMORI":"Benutzer darf Memori nicht erstellen","USER_MAX_MEMORI_REACHED":"Maximale Anzahl an Memori erreicht","USER_TOO_MANY_ATTEMPTS":"Zu viele Versuche","USER_MUST_ACCEPT_TNC_AND_PP":"Sie müssen die Allgemeinen Geschäftsbedingungen akzeptieren","USER_BIRTH_DATE_CANT_BE_CHANGED":"Das Geburtsdatum kann nicht geändert werden","USER_CANT_SET_COMPLETION_PROVIDER":"Benutzer: darf den Vervollständigungsanbieter nicht verwalten","USER_CANT_ENABLE_DEEP_THOUGHT":"Benutzer: nicht für die Verwaltung von Deep Thought aktiviert","USER_CANT_ENABLE_DCM_INTEGRATION":"Benutzer: nicht für die Verwaltung der DCM-Integration aktiviert","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Benutzer: darf die Verkettung oder Expertengruppe nicht verwalten","USER_CREATION_BILLING_DENIED_PERMISSION":"Sie haben nicht genügend Credits, um einen Zwilling zu erstellen","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"Der Benutzer verfügt über eine oder mehrere Abschlusskonfigurationen","USER_CANT_BE_DELETED":"Benutzer kann nicht gelöscht werden","MEMORI_NOT_FOUND":"Erinnerungen nicht gefunden","MEMORI_NOT_ACCESSIBLE":"Memori nicht zugänglich","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Nur der Eigentümer kann das Tag oder die PIN ändern","SESSION_NOT_FOUND":"Sitzung nicht gefunden","SESSION_IS_NOT_ADMINISTRATIVE":"Nicht-administrative Sitzung","SESSION_EXPIRED":"Sitzung abgelaufen","MEMORI_MISSING_CONFIGURATION":"Zwilling: fehlende Konfiguration","MEMORI_CONFIGURATION_NOT_FOUND":"Zwilling: Konfiguration nicht gefunden","MEMORI_INVALID_PRIVACY_TYPE":"Twin: ungültiger Datenschutztyp","MEMORI_MISSING_PASSWORD":"Zwilling: Passwort fehlt","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Twin: Gesamtzahl ungültiger Wiederherstellungstokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Twin: Mindestanzahl ungültiger Wiederherstellungstokens","MEMORI_INVALID_VOICE_TYPE":"Zwilling: ungültiger Stimmtyp","MEMORI_MISSING_NAME":"Zwilling: fehlender Name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Zwilling: Fehlendes Passwort oder Wiederherstellungstoken","MEMORI_INVALID_ID":"Zwilling: ungültige ID","MEMORI_NAME_ALREADY_USED":"Zwillingsname wird bereits verwendet","MEMORI_INVALID_PIN":"Zwilling: Ungültige PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Zwilling: TAG- und PIN-Änderung erfordern separate Vorgänge","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Zwilling: Im öffentlichen Zustand ist kein Passwort erforderlich","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Für „Deep Thought“ müssen Vervollständigungen aktiviert sein","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Für die Expertengruppe müssen Vervollständigungen aktiviert sein","MEMORI_INVALID_COMPLETION_CONFIG":"Zwilling: Ungültige Abschlusskonfiguration","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Übertragung: Zielbenutzer fehlt","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Übertragung: Ungültige Zielbenutzer-ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Übertragung: Ungültige Zielbenutzerdaten","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nichts zu tun","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Speicher: Konfiguration kann nicht geändert werden","MEMORI_MISSING_NEW_PASSWORD":"Erinnerungen: Neues Passwort fehlt","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Für die Funktion ist ein Abonnement erforderlich","INTEGRATION_NOT_FOUND":"Integration nicht gefunden","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Ungültiges Datum aus Format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Ungültiges Datum zum Formatieren","INTEGRATION_INVALID_TYPE":"Ungültiger Integrationstyp","INTEGRATION_ALREADY_EXISTS":"Die Integration ist bereits vorhanden","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Nicht-öffentliche Erinnerungen können nicht integriert werden","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: fehlender Aufruftext","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: Fehlende Geräte-E-Mail","INTEGRATION_MEMORI_IS_EMPTY":"Leere Erinnerungen können nicht integriert werden","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: Datenschutzrichtlinie fehlt","INTEGRATION_MISSING_CATEGORY":"Integrationskategorie fehlt","INTEGRATION_MISSING_DESCRIPTION":"Fehlende Integrationsbeschreibung","INTEGRATION_INVALID_INVOCATION_TEXT":"Ungültiger Aufruftext","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home nicht mehr verfügbar","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Für den Upload ist eine mehrteilige Kodierung erforderlich","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Hochladen: Inhaltstypgrenze fehlt","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: Maximale Größe überschritten","UPLOAD_FILE_IS_EMPTY":"Hochladen: leere Datei","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Hochladen: Ungültiger Dateityp oder ungültige Signatur","UPLOAD_MISSING_FILE_NAME":"Hochladen: Dateiname fehlt","UPLOAD_INVALID_MEMORY_ID":"Hochladen: Ungültige Inhalts-ID","UPLOAD_MISSING_FILE_CONTENT":"Hochladen: Dateiinhalt fehlt","ASSET_NOT_FOUND":"Asset nicht gefunden","ASSET_NOT_ACCESSIBLE":"Asset nicht zugänglich","ASSET_MISSING_SESSION_ID":"Asset: Sitzungs-ID fehlt","ASSET_INVALID_FILE_NAME":"Asset: ungültiger Dateiname","INVITATION_NOT_FOUND":"Einladung nicht gefunden","INVITATION_NOT_ACCESSIBLE":"Einladung nicht zugänglich","INVITATION_ALREADY_ACCEPTED":"Einladung bereits angenommen","INVITATION_ALREADY_REJECTED":"Einladung bereits abgelehnt","INVITATION_MISSING_DESTINATION_EMAIL":"Einladung: Ziel-E-Mail fehlt","INVITATION_DESTINATION_EMAIL_INVALID":"Einladung: Ziel-E-Mail-Adresse ungültig","INVITATION_MISSING_TAG":"Einladung: Tag fehlt","INVITATION_MISSING_PIN":"Einladung: PIN fehlt","INVITATION_INVALID_PIN":"Einladung: ungültige PIN","INVITATION_INVALID_TYPE":"Einladung: ungültiger Typ","INVITATION_MISSING_DESTINATION_NAME":"Einladung: Zielname fehlt","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Einladung: Tag und Pin können nicht geändert werden","INVITATION_CANT_BE_CHANGED":"Absicht: kann nicht geändert werden","ACTIONLOG_INVALID_USER_ID":"Ungültige Benutzer-ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Datum von: ungültiges Format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Datum bis: ungültiges Format","ACTIONLOG_INVALID_MEMORI_ID":"Ungültige Memori-ID","CONSUMPTIONLOG_INVALID_TYPE":"Ungültiger Protokolltyp","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Datum von: ungültiges Format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Datum bis: ungültiges Format","CONSUMPTIONLOG_INVALID_USER_ID":"Ungültige Benutzer-ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Ungültige Memori-ID","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Benachrichtigungen: Ungültiger Chat-Protokoll-Extraktionszeitraum","PROCESS_INVALID_TYPE":"Ungültiger Prozesstyp","PROCESS_ALREADY_RUNNING":"Prozess läuft bereits","PROCESS_NOT_FOUND":"Prozess nicht gefunden","IMPORTCSV_MISSING_ROWS":"CSV-Import: fehlende Zeilen","IMPORTCSV_MISSING_CSV":"CSV-Import: CSV fehlt","IMPORTCSV_MISSING_SEPARATOR":"CSV-Import: fehlendes Trennzeichen","IMPORTCSV_INVALID_SEPARATOR":"CSV-Import: Ungültiges Trennzeichen","IMPORTCSV_MISSING_HEADERS":"CSV-Import: fehlende Header","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV-Import: Titelvariantentrennzeichen fehlt","IMPORTCSV_INVALID_RECEIVER_ID":"CSV-Import: ungültige Empfänger-ID","IMPORTCSV_INVALID_MEDIA_LINK":"CSV-Import: Ungültiger Medienlink","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"CSV-Import: Ungültiger Linktitel","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"CSV-Import: Nicht erkennbare Zeichenkodierung","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"CSV-Import: Der Import in Secret Memories ist nicht möglich","IMPORTTXT_MISSING_ROWS":"TXT wird importiert: Zeilen fehlen","IMPORTTXT_INVALID_GRANULARITY":"TXT importieren: ungültige Granularität","IMPORTTXT_INVALID_RECEIVER_ID":"TXT importieren: ungültige Empfänger-ID","IMPORTTXT_INVALID_MEDIA_LINK":"TXT importieren: Ungültiger Medienlink","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"TXT importieren: ungültiger Linktitel","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"TXT-Import: Nicht erkennbare Zeichenkodierung","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"TXT-Import: Der Import in Secret Memories ist nicht möglich","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"TXT importieren: Importlimit überschritten","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"TXT importieren: Für den Import auf GPT-4 ist ein API-Schlüssel erforderlich","IMPORTTXT_IMPORT_REQUIRES_PAYING":"TXT importieren: Für den Import ist ein kostenpflichtiger Plan erforderlich","IMPORTTXT_BILLING_DENIED_PERMISSION":"TXT importieren: Sie haben nicht genügend Credits für den Vorgang","EXPORTCSV_MISSING_CSV_SPECS":"CSV-Export: CSV-Spezifikationen fehlen","EXPORTCSV_MISSING_SEPARATOR":"CSV-Export: fehlendes Trennzeichen","EXPORTCSV_INVALID_SEPARATOR":"CSV-Export: Ungültiges Trennzeichen","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV-Export: fehlendes Titelvarianten-Trennzeichen","EXPORTCSV_MISSING_NEW_LINE_CHAR":"CSV-Export: Fehlendes Zeilenumbruchzeichen","EXPORTCSV_INVALID_NEW_LINE_CHAR":"CSV-Export: Ungültiges Zeilenumbruchzeichen","EXPORTCSV_MISSING_PASSWORD":"CSV-Export: Passwort fehlt","EXPORTJSONL_MISSING_JSONL_SPECS":"JSONL-Export: JSONL-Spezifikationen fehlen","EXPORTJSONL_MISSING_PLATFORM":"JSONL-Export: fehlende Plattform","EXPORTJSONL_INVALID_PLATFORM":"JSONL-Export: ungültige Plattform","EXPORTJSONL_MISSING_PASSWORD":"JSONL-Export: Passwort fehlt","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"JSONL-Export: Für den Export ist ein kostenpflichtiger Plan erforderlich","ANALYSIS_MISSING_QUERY":"Analyse: fehlende Abfrage","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analyse: Geheime Erinnerungen können nicht analysiert werden","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analyse: Passende Benutzeranfragen erfordern tiefes Denken","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Ausweiszuweisung: falsche oder fehlende Zugangsdaten","BADGE_ASSIGNMENT_MISSING_REF_ID":"Badge-Zuordnung: Referenz-ID fehlt","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Badge-Zuweisung: Ergebnis nicht gefunden","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Badge-Zuweisung: Fehlende Behauptungs-URL","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Badge-Zuweisung: Badge-URL fehlt","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Badge-Zuweisung: Aussteller-URL fehlt","BADGE_ASSIGNMENT_INVALID_URL":"Badge-Zuweisung: Ungültige URL","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Ausweiszuordnung: fehlender Empfänger","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Badge-Zuordnung: unbekannter Empfängertyp","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Ausweiszuordnung: Empfängeridentität fehlt","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Badge-Zuweisung: Empfänger-Hash-Typ fehlt","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Badge-Zuweisung: Empfänger-Hash-Typ unbekannt","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Badge-Zuordnung: Falsche Empfängeridentität","BADGE_NOT_FOUND":"Abzeichen nicht gefunden","OUTCOME_NO_DCM_CONFIGURED":"Ergebnis: kein DCM konfiguriert","OUTCOME_USER_BADGES_DISABLED":"Ergebnis: Benutzerausweise deaktiviert","COMPLETION_CONFIG_MISSING_NAME":"Vervollständigungskonfiguration: Name fehlt","COMPLETION_CONFIG_MISSING_PROVIDER":"Vervollständigungskonfiguration: fehlender Anbieter","COMPLETION_CONFIG_MISSING_ENDPOINT":"Abschlusskonfiguration: fehlender Endpunkt","COMPLETION_CONFIG_MISSING_API_KEY":"Vervollständigungskonfiguration: fehlender API-Schlüssel","COMPLETION_CONFIG_MISSING_MODEL":"Vervollständigungskonfiguration: fehlendes Modell","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Vervollständigungskonfiguration: Es muss mindestens ein Vervollständigungstyp angegeben werden","COMPLETION_CONFIG_INVALID_NAME":"Vervollständigungskonfiguration: ungültiger Name","COMPLETION_CONFIG_INVALID_PURPOSE":"Vervollständigungskonfiguration: Ungültiger Vervollständigungstyp","COMPLETION_CONFIG_INVALID_ENDPOINT":"Abschlusskonfiguration: Ungültiger Endpunkt","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Abschlusskonfiguration: inkonsistenter Endpunkt","COMPLETION_CONFIG_INVALID_PROVIDER":"Vervollständigungskonfiguration: ungültiger Anbieter","COMPLETION_CONFIG_NOT_FOUND":"Vervollständigungskonfiguration: nicht gefunden","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Vervollständigungskonfiguration: nicht zugänglich","COMPLETION_CONFIG_NAME_RESERVED":"Vervollständigungskonfiguration: Name reserviert","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Vervollständigungskonfiguration: Name existiert bereits","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Vervollständigungskonfiguration: Änderung der Sichtbarkeit nicht zulässig"}}');var YG;YG=JSON.parse('{"yes":"Sí","no":"No","confirm":"Confirmar","apply":"Aplicar","cancel":"Cancelar","show":"Espectáculo","hide":"Esconder","send":"Enviar","close":"Cerca","edit":"Editar","delete":"Borrar","loading":"Cargando","expand":"Expandir","collapse":"Colapsar","fullscreenEnter":"Entrar en pantalla completa","fullscreenExit":"Salir de pantalla completa","center":"Centro","bottom":"Abajo","hidden":"Oculto","day":"Día","month":"Mes","year":"Año","createdAt":"Fecha de creación","selected":"Seleccionado","page":"página","actions":"Comportamiento","next":"Próximo","previous":"Anterior","copy":"Copiar","copyRawCode":"Copiar código sin formato","copyToClipboard":"Copiar al portapapeles","showOriginalText":"Mostrar original","showTranslatedText":"Mostrar traducción","exactPosition":"Posición exacta","uncertain":"Incierto","question":"Pregunta","nothingFound":"No se encontró nada","venue":"Evento","searchVenue":"Buscar lugar...","memoriBlockedTitle":"Obstruido","memoriBlockedUntil":"Memori bloqueado hasta {{date}}","memoriBlockedAnon":"Actualmente \\"{{name}}\\"No puedo responder, vuelve aquí. {{date}}","memoriBlockedReasonExceedChats":"porque ha superado el umbral mensual de chats permitidos.","memoriBlockedGiverHelper":"Aún podrás administrarlo como administrador, pero otros usuarios no podrán interactuar con él.","generatedByAI":"La respuesta generada por IA, ocasionalmente puede generar información incorrecta","whyThisAnswer":"¿Por qué esta respuesta?","whyThisAnswerHelper":"Esta respuesta fue generada automáticamente por una inteligencia artificial basada en estos contenidos verificados.","completionsEnabled":"La IA avanzada puede responder con respuestas generadas automáticamente que a veces pueden contener información incorrecta.","completionProviderDown":"Este Twin está integrado con una IA generativa de {{provider}}, pero actualmente no está disponible. ","completionProviderFallbackName":"un proveedor externo","completionProviderCheckStatusPage":"Comprobar página de estado","boardOfExperts":"junta de expertos","birthDate":"Fecha de nacimiento","birthDateHelper":"Solicitamos tu fecha de nacimiento únicamente para habilitar o deshabilitar funcionalidades que tienen restricciones de edad.","underage":"Debes ser al menos {{age}} años para inscribirse.","underageTwinSession":"Debes ser al menos {{age}} años para interactuar con este gemelo.","ageVerification":"Verificación de edad","ageVerificationText":"Para interactuar con este Gemelo, debes tener al menos {{minAge}} años.","nsfw":"NSFW: Este gemelo contiene contenido para adultos","deepThought":"pensamiento profundo","deepThoughtHelper":"Deep Thought es una característica avanzada de la IA que te permitirá explotar al máximo tus conversaciones al realizar un seguimiento de ellas. ","deepThoughtDisclaimerTitle":"Pensamiento profundo habilitado","deepThoughtDisclaimer":"Deep Thought es una característica avanzada de la IA que te permitirá explotar al máximo tus conversaciones al realizar un seguimiento de ellas. ","deepThoughtPreDisclaimerUnlogged":"Inicie sesión para habilitar Pensamiento profundo.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought está deshabilitado porque usted no dio su consentimiento para su uso; puede cambiar esto en cualquier momento en la configuración de su cuenta.","notEnoughCredits":"El autor de este Gemelo no tiene suficientes créditos para responder a tu pregunta.","knownFacts":{"title":"hechos conocidos","description":"Detalles de la información compartida entre usted y {{memoriName}}","type":"Tipo","typeShortTerm":"Corto plazo","typeLongTerm":"Largo plazo","typeHelper":"Tipos:\\n","text":"Texto","deleteSuccess":"Hecho conocido eliminado","deleteConfirmTitle":"Eliminar hecho conocido","deleteConfirmMessage":"¿Está seguro de que desea eliminar este hecho conocido?","deleteSelectedConfirmTitle":"Eliminar hechos conocidos seleccionados","deleteSelectedConfirmMessage":"¿Está seguro de que desea eliminar los hechos conocidos seleccionados?"},"auth":{"title":"Autenticación","useRecoveryTokens":"Utilice tokens de recuperación","tokens":"Fichas","addToken":"Agregar token","usePassword":"Usar contraseña","atLeast":"Al menos"},"widget":{"instruct":"Instruir","test":"Prueba","sound":"Sonido","position":"Preferencias de posición","settings":"Ajustes","share":"Compartir","sendOnKeypress":"Presiona Enter para enviar","sendOnClick":"Haga clic en Enviar","boardOfExperts":"junta de expertos","showExpertsInTheBoard":"Mostrar expertos en este foro","expertsInTheBoard":"Expertos en este foro","goToIntegrationsToCustomizeAvatar":"Para personalizar el avatar, vaya a Compartir y personalice la página pública."},"write_and_speak":{"micButtonPopover":"Haga clic en el botón para hablar","micButtonPopoverListening":"Haga clic en el botón para dejar de hablar.","pageInstructExplanation":"Para enseñarme cosas nuevas, haga clic en el botón INSTRUIRME para comenzar.","pageTryMeExplanation":"Para hablar conmigo haga clic en el botón INICIO para comenzar","instructButton":"INSTRUÍME","tryMeButton":"COMENZAR","chatHistory":"Historial de chat","exportChatHistory":"Exportar historial de chat","exportChatHistoryMessage":"¿Quieres exportar el historial de chat?","chatBotButtonText":"HAGA CLIC AQUÍ PARA ABRIR EL CHATBOT","conversationStartedLabel":"La conversación comenzó el","settingsHeaderLabel":"Configure aquí si desea configurar la memoria como voz continua y cambie los segundos de silencio si desea personalizarlos.","continuousSpeechLabel":"discurso continuo","holdToSpeak":"Mantenga para hablar","releaseToEndListening":"Suelte para finalizar la escucha","pressAndHoldToSpeak":"Mantenga presionado para hablar","microphoneMode":"Modo micrófono","hideEmissionsLabel":"Ocultar texto emitido por el Twin","secondsLabel":"Establecer segundos","controlsPosition":"Posición de los controles","tryMeHeaderLabel":"INTENTAR","unknownPosition":"Posición desconocida","fieldPlace":"Escribe el lugar (por ejemplo, \'Milano\')","showMapLinkFor":"Mostrar la posición en el mapa.","useMyPosition":"Usa mi posición","myPosition":"Tu posición","updatingPosition":"Actualizando posición...","placeNotFound":"¡Lugar no encontrado!","requirePosition":"Inserte su posición antes de comenzar","requirePositionHelp":"para hablar con {{name}} usted tiene que decidir si proporciona su puesto o no. ","dontWantToProvidePosition":"No quiero proporcionar mi puesto.","attachmentsLabel":"Enriquece tu mensaje","iWantToTalkToIn":"quiero hablar con {{name}} en"},"media":{"title":"Título","editAttributes":"Editar atributos de medios","uploadMimeTypeNotAllowed":"El tipo de archivo no está permitido.","uploadSizeLimitMessage":"El tamaño subido es demasiado grande (máx. {{size}}MEGABYTE)","uploadWrongResolutionMessage":"La resolución debe ser {{width}}incógnita{{height}} píxel","memoriNameAlreadyUsed":"Ya tienes un gemelo con este nombre.","uploadHelperImages":"Sube un archivo con extensión png, jpg, jpeg o gif, y que tenga como máximo un tamaño de {{size}}MEGABYTE","uploadHelper":"Cargue un archivo que tenga como máximo un tamaño de {{size}}MEGABYTE","uploadError":"Error al subir","square":"cuadrado","scaleRatio":"Relación de escala","addMediaLabel":"Agregar un medio","insertThisMediaMsg":"Inserte estos medios","mediaUploadMessage":"Haga clic para cargar un nuevo medio","addLinkLabel":"Agregar un enlace","linkKey":"URL","linkValue":"Título del enlace","insertThisLink":"Insertar un enlace a {{url}} con titulo {{title}}"},"gamification":{"level":"Nivel","points":"agujas","memoriReachedLevel":"se volvió más evolucionado y alcanzó el nivel","levelGoToStatistics":"{{memori}} esta al nivel {{level}} con {{points}} agujas. ","congratulationsNewLevel":"¡Felicitaciones, has alcanzado un nuevo nivel!","congratulationsNewLevelDescription":"Tu Memori se volvió más evolucionado con {{points}} puntos, mira el","statistics":"estadística"},"login":{"login":"Acceso","logout":"Cerrar sesión","user":"Usuario","loggedDrawerTitle":"Hola, {{name}}!","loginDrawerTitle":"Acceso","signupDrawerTitle":"Inscribirse","newUserSignUp":"¿Nuevo usuario?","signUp":"¡Inscribirse!","alreadyHaveAnAccount":"¿Ya tienes una cuenta?","backToLogin":"Volver a iniciar sesión","registrationDisabled":"El registro está deshabilitado","contactAdmin":"Póngase en contacto con el administrador para solicitar acceso","userNameOrEmail":"Nombre de usuario o correo electrónico","email":"Correo electrónico","emailFormatError":"Por favor, inserte un correo electrónico válido","username":"Nombre de usuario","usernameContainsReservedWord":"El nombre de usuario contiene una palabra reservada, elija otra","usernameFormatError":"El nombre de usuario debe tener al menos 3 caracteres y contener solo letras, números y _","otpCode":"Código de verificación","resendVerificationCode":"Reenviar código","resentVerificationCode":"¡Código de confirmación enviado! ","password":"Contraseña","newPassword":"Nueva contraseña","confirmPassword":"confirmar Contraseña","currentPassword":"Contraseña actual","passwordMatchingError":"Las contraseñas no coinciden.","passwordFormatError":"La contraseña debe tener al menos 8 caracteres y contener al menos un número, una letra mayúscula, una letra minúscula y un símbolo.","pwdWeak":"Débil","pwdAcceptable":"Aceptable","pwdStrong":"Fuerte","mustChangePassword":"Debes cambiar tu contraseña","passwordChange":"Cambiar la contraseña","emailChange":"Cambiar correo electrónico","avatarChange":"Cambiar avatar","underage":"Debes ser al menos {{age}} años para inscribirse.","optional":"Opcional","birthDate":"Fecha de nacimiento","birthDateHelper":"Solicitamos tu fecha de nacimiento únicamente para habilitar o deshabilitar funcionalidades que tienen restricciones de edad.","missingData":"Información faltante","missingDataHelper":"Sabemos que esto es un poco molesto, pero necesitamos más información para completar tu registro.","goToAccountToChangeYourPreferences":"Puede cambiar su elección en cualquier momento desde la página de su Cuenta.","deepThoughtExplaination":"Deep Thought es una característica avanzada de la IA que te permitirá explotar al máximo tus conversaciones al realizar un seguimiento de ellas. ","tnCAndPPAcceptedHelper":"Desde su último inicio de sesión, los Términos y condiciones y la Política de privacidad han cambiado. ","privacyLabel":"He leído y acepto el","privacyAndCookiePolicy":"Política de privacidad y cookies","and":"y","termsOfService":"Términos de servicio","pAndCUAccepted":"Acepto los términos de servicio sobre Deep Thought","editAccount":"Editar cuenta","save":"Ahorrar"},"success":"Éxito","Error":"Error","internal server error":"Oupsie, lo siento... Algo salió mal en el servidor.","error":"Error","error.loading":"Error al cargar contenido.","error.generic":"Oupsie, lo siento... algo salió mal.","error.serverNotResponding":"Estamos realizando mantenimiento o lanzando actualizaciones. ","error.notFound":"Oupsie, no encontramos la página que buscabas.","error.goBackTo":"Puedes intentar volver al","error.reloadPage":"recargar la pagina","error.tryAgain":"Intentar otra vez","error.unauthorized":"No estás autorizado a ver este contenido.","error.unprocessableEntity":"Error al procesar la solicitud. ","errors":{"TENANT_NOT_FOUND":"Inquilino no encontrado","TENANT_REGISTRATION_DISABLED":"El registro en esta plataforma está deshabilitado","TENANT_MISSING_NAME":"Inquilino: falta el nombre","TENANT_MAX_USERS_REACHED":"Número máximo de usuarios alcanzado","TENANT_MAX_ADMINS_REACHED":"Número máximo de usuarios administradores alcanzado","TENANT_ALREADY_EXISTS":"El inquilino ya existe","TENANT_MISSING_DESCRIPTION":"Inquilino: falta descripción","TENANT_CANT_SET_COMPLETION_PROVIDER":"Inquilino: no se puede configurar el proveedor de finalización","USER_NOT_CONFIRMED":"Usuario aún no confirmado","USER_NOT_FOUND":"Usuario no encontrado","USER_OR_PASSWORD_INVALID":"Usuario o contraseña no válidos","USER_MUST_CHANGE_PASSWORD":"Debes cambiar tu contraseña","USER_MUST_ENTER_VERIFICATION_CODE":"Debes ingresar el código de verificación","USER_MISSING_TENANT":"Usuario: inquilino desaparecido","USER_MISSING_NAME":"Usuario: falta el nombre","USER_MISSING_PASSWORD":"Usuario: falta contraseña","USER_MISSING_EMAIL":"Usuario: Falta correo electrónico","USER_MISSING_VERIFICATION_CODE":"Usuario: Falta el código de verificación","USER_NAME_ALREADY_USED":"Nombre de usuario ya en uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La contraseña no cumple con las reglas de seguridad.","USER_EMAIL_ALREADY_USED":"Correo electrónico ya en uso","USER_EMAIL_INVALID":"Correo electrónico no válido","USER_VERIFICATION_CODE_INVALID":"Código de verificación no válido","USER_MISSING_NAME_OR_EMAIL":"Falta nombre de usuario o correo electrónico","USER_NAME_INVALID":"Nombre de usuario no válido","USER_HAS_ONE_OR_MORE_MEMORI":"El usuario tiene uno o más recuerdos.","USER_MISSING_NEW_PASSWORD":"Usuario: falta nueva contraseña","USER_NOTHING_TO_DO":"Nada que hacer","USER_CANT_CREATE_MEMORI":"Usuario no autorizado a crear Memori","USER_MAX_MEMORI_REACHED":"Número máximo de Memori alcanzado","USER_TOO_MANY_ATTEMPTS":"demasiados intentos","USER_MUST_ACCEPT_TNC_AND_PP":"Debes aceptar los términos y condiciones.","USER_BIRTH_DATE_CANT_BE_CHANGED":"La fecha de nacimiento no se puede cambiar.","USER_CANT_SET_COMPLETION_PROVIDER":"Usuario: no tiene permiso para gestionar el proveedor de finalización","USER_CANT_ENABLE_DEEP_THOUGHT":"Usuario: no habilitado para gestionar Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"Usuario: no habilitado para gestionar la integración de DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Usuario: no se le permite gestionar encadenamiento o grupo de expertos","USER_CREATION_BILLING_DENIED_PERMISSION":"No tienes suficientes créditos para crear un gemelo","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"El usuario tiene una o más configuraciones de finalización.","USER_CANT_BE_DELETED":"Usuario: no se puede eliminar","MEMORI_NOT_FOUND":"Memoria no encontrada","MEMORI_NOT_ACCESSIBLE":"Memorias no accesibles","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Sólo el propietario puede cambiar la etiqueta o el pin","SESSION_NOT_FOUND":"Sesión no encontrada","SESSION_IS_NOT_ADMINISTRATIVE":"Sesión no administrativa","SESSION_EXPIRED":"La sesión expiró","MEMORI_MISSING_CONFIGURATION":"Gemelo: falta configuración","MEMORI_CONFIGURATION_NOT_FOUND":"Gemelo: configuración no encontrada","MEMORI_INVALID_PRIVACY_TYPE":"Gemelo: tipo de privacidad no válido","MEMORI_MISSING_PASSWORD":"Gemelo: falta contraseña","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Gemelo: número total de tokens de recuperación no válidos","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Gemelo: número mínimo de tokens de recuperación no válidos","MEMORI_INVALID_VOICE_TYPE":"Gemelo: tipo de voz no válido","MEMORI_MISSING_NAME":"Gemelo: falta nombre","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Gemelo: falta contraseña o token de recuperación","MEMORI_INVALID_ID":"Gemelo: identificación no válida","MEMORI_NAME_ALREADY_USED":"Nombre gemelo ya en uso","MEMORI_INVALID_PIN":"Gemelo: PIN no válido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Gemelo: el cambio de TAG y PIN requiere operaciones separadas","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Twin: no se requiere contraseña cuando es público","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought requiere que las completaciones estén habilitadas","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"El grupo de expertos requiere que se habiliten las completaciones.","MEMORI_INVALID_COMPLETION_CONFIG":"Gemelo: configuración de finalizaciones no válidas","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transferencia: falta usuario de destino","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transferencia: ID de usuario de destino no válido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transferencia: datos de usuario de destino no válidos","MEMORI_TRANSFER_NOTHING_TO_DO":"Transferencia: nada que hacer","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memorias: la configuración no se puede cambiar","MEMORI_MISSING_NEW_PASSWORD":"Recuerdos: falta nueva contraseña","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"La función requiere suscripción","INTEGRATION_NOT_FOUND":"Integración no encontrada","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Fecha no válida del formato","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Fecha no válida para formatear","INTEGRATION_INVALID_TYPE":"Tipo de integración no válido","INTEGRATION_ALREADY_EXISTS":"La integración ya existe","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Las memorias no públicas no se pueden integrar","INTEGRATION_MISSING_INVOCATION_TEXT":"Integración: falta texto de invocación","INTEGRATION_MISSING_DEVICE_EMAILS":"Integración: correo electrónico del dispositivo perdido","INTEGRATION_MEMORI_IS_EMPTY":"Los recuerdos vacíos no se pueden integrar","INTEGRATION_MISSING_PRIVACY_POLICY":"Integración: falta la política de privacidad","INTEGRATION_MISSING_CATEGORY":"Falta categoría de integración","INTEGRATION_MISSING_DESCRIPTION":"Falta descripción de integración","INTEGRATION_INVALID_INVOCATION_TEXT":"Texto de invocación no válido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home ya no está disponible","UPLOAD_REQUIRES_MULTIPART_ENCODING":"La carga requiere codificación multiparte","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Subir: falta límite de tipo de contenido","UPLOAD_MAX_LENGTH_EXCEEDED":"Subir: se superó el tamaño máximo","UPLOAD_FILE_IS_EMPTY":"Subir: archivo vacío","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Subir: tipo de archivo o firma no válidos","UPLOAD_MISSING_FILE_NAME":"Subir: falta el nombre del archivo","UPLOAD_INVALID_MEMORY_ID":"Subir: ID de contenido no válido","UPLOAD_MISSING_FILE_CONTENT":"Subir: Falta contenido del archivo","ASSET_NOT_FOUND":"Activo no encontrado","ASSET_NOT_ACCESSIBLE":"Activo no accesible","ASSET_MISSING_SESSION_ID":"Activo: ID de sesión faltante","ASSET_INVALID_FILE_NAME":"Activo: nombre de archivo no válido","INVITATION_NOT_FOUND":"Invitación no encontrada","INVITATION_NOT_ACCESSIBLE":"Invitación no accesible","INVITATION_ALREADY_ACCEPTED":"Invitación ya aceptada","INVITATION_ALREADY_REJECTED":"Invitación ya rechazada","INVITATION_MISSING_DESTINATION_EMAIL":"Invitación: falta el correo electrónico de destino","INVITATION_DESTINATION_EMAIL_INVALID":"Invitación: correo electrónico de destino no válido","INVITATION_MISSING_TAG":"Invitación: falta etiqueta","INVITATION_MISSING_PIN":"Invitación: falta el PIN","INVITATION_INVALID_PIN":"Invitación: PIN no válido","INVITATION_INVALID_TYPE":"Invitación: tipo no válido","INVITATION_MISSING_DESTINATION_NAME":"Invitación: falta el nombre del destino","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitación: la etiqueta y el pin no se pueden cambiar","INVITATION_CANT_BE_CHANGED":"Intación: no se puede cambiar","ACTIONLOG_INVALID_USER_ID":"ID de usuario no válido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Fecha de: formato no válido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Fecha hasta: formato no válido","ACTIONLOG_INVALID_MEMORI_ID":"ID de memoria no válida","CONSUMPTIONLOG_INVALID_TYPE":"Tipo de registro no válido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Fecha de: formato no válido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Fecha hasta: formato no válido","CONSUMPTIONLOG_INVALID_USER_ID":"ID de usuario no válido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"ID de memoria no válida","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notificaciones: Período de extracción del registro de chat no válido","PROCESS_INVALID_TYPE":"Tipo de proceso no válido","PROCESS_ALREADY_RUNNING":"Proceso ya en ejecución","PROCESS_NOT_FOUND":"Proceso no encontrado","IMPORTCSV_MISSING_ROWS":"Importación CSV: filas faltantes","IMPORTCSV_MISSING_CSV":"Importación CSV: Falta CSV","IMPORTCSV_MISSING_SEPARATOR":"Importación CSV: falta separador","IMPORTCSV_INVALID_SEPARATOR":"Importación CSV: separador no válido","IMPORTCSV_MISSING_HEADERS":"Importación CSV: faltan encabezados","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Importación CSV: falta el separador de variante de título","IMPORTCSV_INVALID_RECEIVER_ID":"Importación CSV: ID de receptor no válido","IMPORTCSV_INVALID_MEDIA_LINK":"Importación CSV: enlace multimedia no válido","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"Importación CSV: título del enlace no válido","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Importación CSV: codificación de caracteres indetectable","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importación CSV: no se puede importar a Secret Memories","IMPORTTXT_MISSING_ROWS":"Importando TXT: filas faltantes","IMPORTTXT_INVALID_GRANULARITY":"Importar TXT: granularidad no válida","IMPORTTXT_INVALID_RECEIVER_ID":"Importar TXT: ID de receptor no válido","IMPORTTXT_INVALID_MEDIA_LINK":"Importar TXT: enlace multimedia no válido","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Importar TXT: título del enlace no válido","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Importación TXT: codificación de caracteres indetectable","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importación TXT: No se puede importar a Secret Memories","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importar TXT: límite de importación excedido","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importar TXT: la importación en GPT-4 requiere una clave API","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importar TXT: la importación requiere un plan de pago","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importar TXT: no tienes suficientes créditos para la operación","EXPORTCSV_MISSING_CSV_SPECS":"Exportación CSV: faltan especificaciones CSV","EXPORTCSV_MISSING_SEPARATOR":"Exportación CSV: falta separador","EXPORTCSV_INVALID_SEPARATOR":"Exportación CSV: separador no válido","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Exportación CSV: falta el separador de variante de título","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Exportación CSV: falta un carácter de nueva línea","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Exportación CSV: carácter de nueva línea no válido","EXPORTCSV_MISSING_PASSWORD":"Exportación CSV: falta contraseña","EXPORTJSONL_MISSING_JSONL_SPECS":"Exportación JSONL: faltan especificaciones JSONL","EXPORTJSONL_MISSING_PLATFORM":"Exportación JSONL: plataforma faltante","EXPORTJSONL_INVALID_PLATFORM":"Exportación JSONL: plataforma no válida","EXPORTJSONL_MISSING_PASSWORD":"Exportación JSONL: falta contraseña","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Exportación JSONL: la exportación requiere un plan pago","ANALYSIS_MISSING_QUERY":"Análisis: consulta faltante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Análisis: No se pueden analizar recuerdos secretos","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Análisis: hacer coincidir la consulta del usuario requiere un pensamiento profundo","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Asignación de insignia: credenciales incorrectas o faltantes","BADGE_ASSIGNMENT_MISSING_REF_ID":"Asignación de insignia: falta el ID de referencia","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Asignación de insignia: resultado no encontrado","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Asignación de insignia: falta la URL de aserción","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Asignación de insignia: URL de insignia faltante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Asignación de insignia: falta la URL del emisor","BADGE_ASSIGNMENT_INVALID_URL":"Asignación de insignia: URL no válida","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Asignación de insignia: destinatario faltante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Asignación de insignia: tipo de destinatario desconocido","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Asignación de insignia: falta la identidad del destinatario","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Asignación de insignia: falta el tipo de hash del destinatario","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Asignación de insignia: tipo de hash del destinatario desconocido","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Asignación de insignia: identidad del destinatario incorrecta","BADGE_NOT_FOUND":"Insignia no encontrada","OUTCOME_NO_DCM_CONFIGURED":"Resultado: no hay ningún DCM configurado","OUTCOME_USER_BADGES_DISABLED":"Resultado: insignias de usuario deshabilitadas","COMPLETION_CONFIG_MISSING_NAME":"Configuración de terminaciones: falta nombre","COMPLETION_CONFIG_MISSING_PROVIDER":"Configuración de terminaciones: falta proveedor","COMPLETION_CONFIG_MISSING_ENDPOINT":"Configuración de terminaciones: falta punto final","COMPLETION_CONFIG_MISSING_API_KEY":"Configuración de terminaciones: falta clave API","COMPLETION_CONFIG_MISSING_MODEL":"Configuración de terminaciones: modelo faltante","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Configuración de terminaciones: se debe especificar al menos un tipo de terminaciones","COMPLETION_CONFIG_INVALID_NAME":"Configuración de terminaciones: nombre no válido","COMPLETION_CONFIG_INVALID_PURPOSE":"Configuración de terminaciones: tipo de terminaciones no válidas","COMPLETION_CONFIG_INVALID_ENDPOINT":"Configuración de terminaciones: punto final no válido","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Configuración de terminaciones: punto final inconsistente","COMPLETION_CONFIG_INVALID_PROVIDER":"Configuración de terminaciones: proveedor no válido","COMPLETION_CONFIG_NOT_FOUND":"Configuración de terminaciones: no encontrada","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Configuración de terminaciones: no accesible","COMPLETION_CONFIG_NAME_RESERVED":"Configuración de terminaciones: nombre reservado","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Configuración de terminaciones: el nombre ya existe","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Configuración de terminaciones: cambio de visibilidad no permitido"}}');const XG=WG({resources:{en:{translation:t(qG)},it:{translation:t(VG)},es:{translation:t(YG)},fr:{translation:t(KG)},de:{translation:t(JG)}},lng:"en",fallbackLng:"it",supportedLngs:["en","it","fr","es","de"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1}});XG.init();var QG=XG;c=o("85Hg2"),c=o("85Hg2");function ZG(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,c.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,c.createElement)(le.Provider,{value:i},r)}var $G=({children:e})=>((0,c.useEffect)((()=>{window.MathJax||(window.MathJax=dR)}),[]),(0,s.jsxs)(ZG,{i18n:QG,children:[e,(0,s.jsx)("script",{id:"MathJax-script",async:!0,src:"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"})]}));const eV=({ownerUserName:e,ownerUserID:t,memoriName:n,memoriID:r,integrationID:i,tenantID:o,secretToken:a,sessionID:l,layout:u="DEFAULT",customLayout:d,showShare:h=!0,showCopyButton:p=!0,showTranslationOriginal:f=!1,showSettings:m=!0,showInstruct:g=!1,showTypingText:v=!1,showClear:y=!1,showOnlyLastMessages:b=!1,showInputs:S=!0,showDates:x=!1,showContextPerLine:_=!1,showLogin:w,height:C="100%",baseURL:A,apiURL:E="https://backend.memori.ai",engineURL:T="https://engine.memori.ai",tag:I,pin:M,context:R,initialQuestion:P,uiLang:N,spokenLang:O,multilingual:k,authToken:L,AZURE_COGNITIVE_SERVICES_TTS_KEY:D,enableAudio:B,defaultSpeakerActive:z=!0,disableTextEnteredEvents:F=!1,onStateChange:U,additionalInfo:j,customMediaRenderer:H,additionalSettings:G,userAvatar:V})=>{var W,q,K;const[J,Y]=(0,c.useState)(),[X,Z]=(0,c.useState)(),[$,ee]=(0,c.useState)(D),{t:te}=_e();if(!(r&&t||n&&e))throw new Error("Identifier pair required: please provide either memoriID and ownerUserID or memoriName and ownerUserName");const ne=Q(E,T),re=(0,c.useCallback)((async()=>{const e=A||(o.startsWith("https://")?o:`https://${o}`),t=await fetch(`${e}/api/speechkey`),n=await t.json();n.AZURE_COGNITIVE_SERVICES_TTS_KEY&&ee(n.AZURE_COGNITIVE_SERVICES_TTS_KEY)}),[]);(0,c.useEffect)((()=>{D||re()}),[D]);const ie=(0,c.useCallback)((async()=>{if(r&&t){const{memori:e,...n}=await ne.backend.getMemoriByUserAndId(o,t,r);0===n.resultCode&&e?Y(e):console.error("[MEMORI]",n,e)}else if(n&&e){const{memori:t,...r}=await ne.backend.getMemori(o,e,n);0===r.resultCode&&t?Y(t):console.error("[MEMORI]",r,t)}}),[r,t,n,e,o]);(0,c.useEffect)((()=>{ie()}),[ie,o]);const oe=(0,c.useCallback)((async()=>{const e=await AH(o,A);e&&Z(e)}),[o,E]);return(0,c.useEffect)((()=>{oe()}),[oe]),(0,c.useEffect)((()=>{if(N)QG.changeLanguage(N.toLowerCase());else{const{lng:e,fallbackLng:t}=(()=>{const e=navigator.language;if(e){let t=e.split("-")[0];if(["en","it"].includes(t))return{lng:t,fallbackLng:"en"===t?"it":"en"}}return{lng:"en",fallbackLng:"it"}})();QG.changeLanguage(e).catch((()=>{QG.changeLanguage(t)}))}}),[N]),(0,c.useEffect)((()=>{hR()}),[]),(0,s.jsx)($G,{children:(0,s.jsxs)(XF,{children:[(0,s.jsx)(Yu.Toaster,{position:"top-center",reverseOrder:!0}),J?(0,s.jsx)(wH,{layout:u,customLayout:d,height:C,baseUrl:A||(o.startsWith("https://")?o:`https://${o}`),apiUrl:E,memori:{...J,secretToken:a},ownerUserName:null!=e?e:J.ownerUserName,ownerUserID:null!=t?t:J.ownerUserID,tenantID:o,memoriLang:null!=O?O:null===(q=null===(W=J.culture)||void 0===W?void 0:W.split("-"))||void 0===q?void 0:q[0],multilingual:k,tenant:X,secret:a,sessionID:l,showShare:h,showCopyButton:p,showTranslationOriginal:f,showSettings:m,showInstruct:g,showTypingText:v,showClear:y,showOnlyLastMessages:b,showInputs:S,showDates:x,showContextPerLine:_,showLogin:null!=w?w:null==J?void 0:J.enableDeepThought,integration:null===(K=null==J?void 0:J.integrations)||void 0===K?void 0:K.find((e=>i?e.integrationID===i:!!e.publish&&"LANDING_EXPERIENCE"===e.type)),initialContextVars:R,initialQuestion:P,authToken:L,AZURE_COGNITIVE_SERVICES_TTS_KEY:$||D,enableAudio:B,defaultSpeakerActive:z,disableTextEnteredEvents:F,onStateChange:U,additionalInfo:j,customMediaRenderer:H,additionalSettings:G,userAvatar:V,...I&&M?{personification:{tag:I,pin:M}}:{}}):(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)("p",{style:{textAlign:"center",margin:"2rem auto",textTransform:"capitalize"},children:[te("loading")||"Loading","..."]})})]})})};eV.propTypes={memoriName:t(l).string,memoriID:t(l).string,ownerUserName:t(l).string,ownerUserID:t(l).string,integrationID:t(l).string,tenantID:t(l).string.isRequired,secretToken:t(l).string,sessionID:t(l).string,layout:t(l).oneOf(["DEFAULT","FULLPAGE","TOTEM","WEBSITE_ASSISTANT","CHAT","HIDDEN_CHAT","ZOOMED_FULL_BODY"]),customLayout:t(l).any,showShare:t(l).bool,showCopyButton:t(l).bool,showTranslationOriginal:t(l).bool,showInstruct:t(l).bool,showInputs:t(l).bool,showDates:t(l).bool,showContextPerLine:t(l).bool,showSettings:t(l).bool,showClear:t(l).bool,showOnlyLastMessages:t(l).bool,showTypingText:t(l).bool,showLogin:t(l).bool,height:t(l).oneOfType([t(l).string,t(l).number]),baseURL:t(l).string,apiURL:t(l).string,engineURL:t(l).string,tag:t(l).string,pin:t(l).string,context:t(l).objectOf(t(l).any),initialQuestion:t(l).string,uiLang:t(l).oneOf(["en","it","fr","es","de","EN","IT","FR","ES","DE"]),spokenLang:t(l).string,multilingual:t(l).bool,authToken:t(l).string,enableAudio:t(l).bool,defaultSpeakerActive:t(l).bool,disableTextEnteredEvents:t(l).bool,AZURE_COGNITIVE_SERVICES_TTS_KEY:t(l).string,onStateChange:t(l).func,additionalInfo:t(l).objectOf(t(l).any),customMediaRenderer:t(l).func,additionalSettings:t(l).any,userAvatar:t(l).oneOfType([t(l).string,t(l).any])};var tV=eV;class nV extends HTMLElement{connectedCallback(){const e=document.createElement("div"),n=document.createElement("div");n.setAttribute("id","memori-root"),e.appendChild(n),this.appendChild(e);const r=Object.keys(tV.propTypes).reduce(((e,t)=>(this.hasAttribute(t)&&(e[t]=this.getAttribute(t),"true"!==e[t]&&"false"!==e[t]||(e[t]="true"===e[t])),e)),{}),i=this.getAttribute("tenantId"),o=this.getAttribute("context")?.split(",")?.reduce(((e,t)=>{const[n,r]=t.split(":").map((e=>e.trim()));return{...e,[n]:r}}),{}),l=(e=>{try{return JSON.parse(e)}catch(e){return null}})(this.getAttribute("additionalInfo")||"{}")||{};i?t(a).render((0,s.jsx)(tV,{...r,context:o,tenantID:i,additionalInfo:l}),n):console.error("No tenantId attribute found")}}customElements.define("memori-client",nV)})();
|
|
258
|
+
*/function hj(e,t=0){const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return n.push(`M${i+t} ${r+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}function pj(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function fj(e,t,n,r){if(null==r)return null;const i=n?4:0,o=e.length+2*i,s=Math.floor(.1*t),a=o/t,l=(r.width||s)*a,c=(r.height||s)*a,u=null==r.x?e.length/2-l/2:r.x*a,d=null==r.y?e.length/2-c/2:r.y*a;let h=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+d-t)}}return{x:u,y:d,h:c,w:l,excavation:h}}var mj=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function gj(e){const n=e,{value:r,size:i=aj,level:o=lj,bgColor:s=cj,fgColor:a=uj,includeMargin:l=dj,style:u,imageSettings:d}=n,h=ij(n,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),p=null==d?void 0:d.src,f=(0,c.useRef)(null),m=(0,c.useRef)(null),[g,v]=(0,c.useState)(!1);(0,c.useEffect)((()=>{if(null!=f.current){const e=f.current,t=e.getContext("2d");if(!t)return;let n=oj.QrCode.encodeText(r,sj[o]).getModules();const c=l?4:0,u=n.length+2*c,h=fj(n,i,l,d),p=m.current,g=null!=h&&null!==p&&p.complete&&0!==p.naturalHeight&&0!==p.naturalWidth;g&&null!=h.excavation&&(n=pj(n,h.excavation));const v=window.devicePixelRatio||1;e.height=e.width=i*v;const y=i/u*v;t.scale(y,y),t.fillStyle=s,t.fillRect(0,0,u,u),t.fillStyle=a,mj?t.fill(new Path2D(hj(n,c))):n.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+c,n+c,1,1)}))})),g&&t.drawImage(p,h.x+c,h.y+c,h.w,h.h)}})),(0,c.useEffect)((()=>{v(!1)}),[p]);const y=rj({height:i,width:i},u);let b=null;return null!=p&&(b=t(c).createElement("img",{src:p,key:p,style:{display:"none"},onLoad:()=>{v(!0)},ref:m})),t(c).createElement(t(c).Fragment,null,t(c).createElement("canvas",rj({style:y,height:i,width:i,ref:f},h)),b)}var vj=({tenant:e,url:n,title:r="",className:i,baseUrl:o,primary:a=!0,showQrCode:l=!0,align:u="right"})=>{const{t:d}=_e(),[h,p]=(0,c.useState)(n),f=(0,c.useMemo)((()=>(null==e?void 0:e.theme)?`${null!=o?o:"https://aisuru.com"}/images/${e.theme}/square_logo.png`:`${null!=o?o:"https://aisuru.com"}/images/memori_logo.png`),[e,o]);(0,c.useEffect)((()=>{n||p(window.location.href)}),[n]);const m=[{id:"facebook",title:"Facebook",url:`https://www.facebook.com/sharer/sharer.php?u=${h}`,icon:GU},{id:"twitter",title:"Twitter",url:`https://twitter.com/intent/tweet?url=${h}`,icon:VU},{id:"linkedin",title:"LinkedIn",url:`https://www.linkedin.com/shareArticle?mini=true&title=${r}&url=${h}`,icon:WU},{id:"whatsapp",title:"Whatsapp",url:`https://api.whatsapp.com/send?phone=&text=${h}`,icon:qU},{id:"telegram",title:"Telegram",url:`https://t.me/share/url?text=${r}&url=${h}`,icon:QU},{id:"email",title:"Email",url:`mailto:?subject=${(null==r?void 0:r.length)>0?r:n}&body=${h}`,icon:KU}];return(0,s.jsxs)(jN,{as:"div",className:t(ws)("memori-share-button",{"memori-share-button--align-left":"left"===u}),children:[(0,s.jsx)(jN.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button",i,{"memori-button--primary":a}),title:d("widget.share")||void 0,children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(JU,{})})}),(0,s.jsxs)(jN.Items,{className:"memori-share-button--overlay",as:"ul",children:[(0,s.jsx)(jN.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsx)(_f,{className:"memori-share-button--link",ghost:!0,icon:(0,s.jsx)(vL,{}),onClick:()=>{h&&navigator.clipboard.writeText(h)},children:d("copyToClipboard")||void 0})},"copy"),m.map((e=>{var n;return(0,s.jsx)(jN.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsxs)("a",{className:t(ws)("memori-button","memori-button--with-icon","memori-button--ghost","memori-button--padded","memori-share-button--link"),href:null!==(n=e.url)&&void 0!==n?n:"",target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(e.icon,{})}),e.title]})},e.id)})),l&&(0,s.jsxs)(jN.Item,{as:"li",className:"memori-share-button--li-qr-code",children:[(0,s.jsx)(gj,{id:"qr-canvas",value:null!=h?h:"",size:128,bgColor:"#ffffff",fgColor:"#000000",level:"H",includeMargin:!1,imageSettings:{src:f,x:void 0,y:void 0,height:32,width:32,excavate:!0}}),(0,s.jsx)("div",{children:(0,s.jsx)(_f,{onClick:()=>{const e=document.getElementById("qr-canvas");if(!e)return;const t=document.createElement("a");t.href=e.toDataURL(),t.download=`memori-${r}-share.png`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},icon:(0,s.jsx)(YU,{}),title:"Download QR",children:"Download"})})]},"qrcode")]})]})};var yj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M290 236.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0 0 13.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 0 0 0 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 0 0-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"})});var bj=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",focusable:"false",role:"img",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2","aria-label":t,children:[(0,s.jsx)("path",{d:"M23 4L23 10 17 10"}),(0,s.jsx)("path",{d:"M1 20L1 14 7 14"}),(0,s.jsx)("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})]});var Sj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6c-.3 1.5-.4 3-.4 4.4 0 14.4 11.6 26 26 26h723c1.5 0 3-.1 4.4-.4 14.2-2.4 23.7-15.9 21.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"})});var xj=({className:e,memori:n,tenant:r,history:i,position:o,setShowPositionDrawer:a,setShowSettingsDrawer:l,setShowKnownFactsDrawer:u,setShowExpertsDrawer:d,enableAudio:h=!0,speakerMuted:p,setSpeakerMuted:f,hasUserActivatedSpeak:m=!1,showShare:g=!0,showSettings:v=!0,showSpeaker:y=!0,showReload:b=!1,showClear:S=!1,showLogin:x=!0,setShowLoginDrawer:_,clearHistory:w,loginToken:C,user:A,sessionID:E})=>{const{t:T}=_e(),[I,M]=(0,c.useState)(!1),[R,P]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{document.fullscreenEnabled&&M(!0)}),[]),(0,s.jsxs)("div",{className:t(ws)("memori-header",e),children:[n.needsPosition&&o&&(0,s.jsxs)("div",{className:"memori-header--position",children:[0!==o.latitude&&0!==o.longitude&&(0,s.jsx)("span",{className:"memori-header--position-placeName",children:o.placeName}),(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--position",title:T("widget.position")||"Position",icon:(0,s.jsx)(tD,{}),onClick:()=>a(!0)})]}),b&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--reload",title:T("reload")||"Reload",icon:(0,s.jsx)(bj,{}),onClick:()=>{window.location.reload()}}),S&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--clear",title:T("clearHistory")||"Clear chat",icon:(0,s.jsx)(Sj,{}),onClick:w}),I&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--fullscreen",title:R?T("fullscreenExit")||"Exit fullscreen":T("fullscreenEnter")||"Enter fullscreen",icon:R?(0,s.jsx)(UL,{}):(0,s.jsx)(yj,{}),onClick:()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),P(!1)):(document.documentElement.requestFullscreen(),P(!0))}}),n.enableDeepThought&&!!C&&(null==A?void 0:A.pAndCUAccepted)&&(0,s.jsx)(_f,{primary:!!E&&!!m,shape:"circle",icon:(0,s.jsx)($L,{}),className:"memori-header--button memori-header--button--knownfacts",disabled:!m||!E,onClick:()=>u(!0),title:T("knownFacts.title")||"Known facts"}),n.enableBoardOfExperts&&(0,s.jsx)(_f,{primary:!0,shape:"circle",icon:(0,s.jsx)(ZL,{}),className:"memori-header--button memori-header--button--experts",disabled:!m||!E,onClick:()=>d(!0),title:T("widget.showExpertsInTheBoard")||"Experts in this board"}),h&&y&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--speaker",icon:p?(0,s.jsx)(yU,{}):(0,s.jsx)(SU,{}),onClick:()=>f(!p),title:T("widget.sound")||"Sound"}),(0,s.jsx)(jU,{history:i,memori:n,className:"memori-header--button memori-header--button--export",disabled:!m||0===i.length}),v&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-settings",icon:(0,s.jsx)(HU,{}),onClick:()=>l(!0),title:T("widget.settings")||"Settings"}),g&&(0,s.jsx)(vj,{className:"memori-header--button memori-header--button-share",title:n.name,tenant:r,showQrCode:!0,align:"left"}),x&&(0,s.jsx)(_f,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-login",icon:(0,s.jsx)(_N,{}),onClick:()=>_(!0),title:C?T("login.user")||"User":T("login.login")||"Login"})]})};var _j=({tenant:e,userLang:t="en",integrationID:n,memoriHash:r})=>{const i="memorytwin"===(null==e?void 0:e.theme)?"memorytwin":"twincreator"===(null==e?void 0:e.theme)?"twincreator":"aisuru";return(0,s.jsxs)("div",{className:"memori--powered-by",children:[(0,s.jsx)("img",{src:`https://aisuru.com/images/${i}/logo.png`,alt:""}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"sr-only",children:"Powered by"}),(0,s.jsx)("a",{href:`https://memori.ai/${"it"===(null==t?void 0:t.toLowerCase())?"it":"en"}${n?`?integrationID=${n}`:""}${r?`${n?"&":"?"}memori=${r}`:""}`,target:"_blank",rel:"noopener noreferrer",children:"Memori.AI"})]})]})},wj=(c=o("85Hg2"),c=o("85Hg2"),(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(wj||{})),Cj=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Cj||{}),Aj=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Aj||{}),Ej=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.SetOrientation=3]="SetOrientation",e[e.GoToOption=4]="GoToOption",e[e.Search=5]="Search",e[e.ClearSearch=6]="ClearSearch",e[e.RegisterOption=7]="RegisterOption",e[e.UnregisterOption=8]="UnregisterOption",e))(Ej||{});function Tj(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Zh(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Ij={1:e=>e.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{value:n,mode:r,compare:i}=e.propsRef.current,o=e.options.findIndex((e=>{let t=e.dataRef.current.value;return ch(r,{1:()=>n.some((e=>i(e,t))),0:()=>i(n,t)})}));return-1!==o&&(t=o),{...e,listboxState:0,activeOptionIndex:t}},2:(e,t)=>e.disabled===t.disabled?e:{...e,disabled:t.disabled},3:(e,t)=>e.orientation===t.orientation?e:{...e,orientation:t.orientation},4(e,t){var n;if(e.disabled||1===e.listboxState)return e;let r=Tj(e),i=SR(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},5:(e,t)=>{if(e.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},6:e=>e.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},7:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=Tj(e,(e=>[...e,n]));if(null===e.activeOptionIndex){let{value:i,mode:o,compare:s}=e.propsRef.current,a=t.dataRef.current.value;ch(o,{1:()=>i.some((e=>s(e,a))),0:()=>s(i,a)})&&(r.activeOptionIndex=r.options.indexOf(n))}return{...e,...r}},8:(e,t)=>{let n=Tj(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},Mj=(0,c.createContext)(null);function Rj(e){let t=(0,c.useContext)(Mj);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Rj),t}return t}function Pj(e,t){return ch(t.type,Ij,e,t)}Mj.displayName="ListboxContext";let Nj=c.Fragment,Oj=gh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,horizontal:u=!1,multiple:d=!1,...h}=e;const p=u?"horizontal":"vertical";let f=Ah(n),[m,g]=AR(r,s,i),v=(0,c.useReducer)(Pj,{listboxState:1,propsRef:{current:{value:m,onChange:g,mode:d?1:0,compare:_h("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a)}},labelRef:(0,c.createRef)(),buttonRef:(0,c.createRef)(),optionsRef:(0,c.createRef)(),disabled:l,orientation:p,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1}),[{listboxState:y,propsRef:b,optionsRef:S,buttonRef:x},_]=v;b.current.value=m,b.current.mode=d?1:0,Sh((()=>{b.current.onChange=e=>ch(b.current.mode,{0:()=>g(e),1(){let t=b.current.value.slice(),{compare:n}=b.current,r=t.findIndex((t=>n(t,e)));return-1===r?t.push(e):t.splice(r,1),g(t)}})}),[g,b]),Sh((()=>_({type:2,disabled:l})),[l]),Sh((()=>_({type:3,orientation:p})),[p]),Dp([x,S],((e,t)=>{var n;_({type:1}),Jh(t,Kh.Loose)||(e.preventDefault(),null==(n=x.current)||n.focus())}),0===y);let w=(0,c.useMemo)((()=>({open:0===y,disabled:l,value:m})),[y,l,m]),C={ref:f};return t(c).createElement(Mj.Provider,{value:v},t(c).createElement(Pp,{value:ch(y,{0:Mp.Open,1:Mp.Closed})},null!=o&&null!=m&&xR({[o]:m}).map((([e,n])=>t(c).createElement(Dh,{features:Lh.Hidden,...vh({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:n})}))),ph({ourProps:C,theirProps:h,slot:w,defaultTag:Nj,name:"Listbox"})))})),kj=gh((function(e,t){var n;let[r,i]=Rj("Listbox.Button"),o=Ah(r.buttonRef,t),s=`headlessui-listbox-button-${kh()}`,a=nf(),l=_h((e=>{switch(e.key){case Th.Space:case Th.Enter:case Th.ArrowDown:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:bR.First})}));break;case Th.ArrowUp:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:bR.Last})}))}})),u=_h((e=>{if(e.key===Th.Space)e.preventDefault()})),d=_h((e=>{if(Ih(e.currentTarget))return e.preventDefault();0===r.listboxState?(i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),i({type:0}))})),h=mR((()=>{if(r.labelRef.current)return[r.labelRef.current.id,s].join(" ")}),[r.labelRef.current,s]),p=(0,c.useMemo)((()=>({open:0===r.listboxState,disabled:r.disabled,value:r.propsRef.current.value})),[r]),f=e;return ph({ourProps:{ref:o,id:s,type:vR(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.optionsRef.current)?void 0:n.id,"aria-expanded":r.disabled?void 0:0===r.listboxState,"aria-labelledby":h,disabled:r.disabled,onKeyDown:l,onKeyUp:u,onClick:d},theirProps:f,slot:p,defaultTag:"button",name:"Listbox.Button"})})),Lj=gh((function(e,t){let[n]=Rj("Listbox.Label"),r=`headlessui-listbox-label-${kh()}`;return ph({ourProps:{ref:Ah(n.labelRef,t),id:r,onClick:_h((()=>{var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))},theirProps:e,slot:(0,c.useMemo)((()=>({open:0===n.listboxState,disabled:n.disabled})),[n]),defaultTag:"label",name:"Listbox.Label"})})),Dj=dh.RenderStrategy|dh.Static,Bj=gh((function(e,t){var n;let[r,i]=Rj("Listbox.Options"),o=Ah(r.optionsRef,t),s=`headlessui-listbox-options-${kh()}`,a=nf(),l=nf(),u=Rp(),d=null!==u?u===Mp.Open:0===r.listboxState;(0,c.useEffect)((()=>{var e;let t=r.optionsRef.current;!t||0===r.listboxState&&t!==(null==(e=Fh(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})}),[r.listboxState,r.optionsRef]);let h=_h((e=>{switch(l.dispose(),e.key){case Th.Space:if(""!==r.searchQuery)return e.preventDefault(),e.stopPropagation(),i({type:5,value:e.key});case Th.Enter:if(e.preventDefault(),e.stopPropagation(),null!==r.activeOptionIndex){let{dataRef:e}=r.options[r.activeOptionIndex];r.propsRef.current.onChange(e.current.value)}0===r.propsRef.current.mode&&(i({type:1}),zh().nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})})));break;case ch(r.orientation,{vertical:Th.ArrowDown,horizontal:Th.ArrowRight}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.Next});case ch(r.orientation,{vertical:Th.ArrowUp,horizontal:Th.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.Previous});case Th.Home:case Th.PageUp:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.First});case Th.End:case Th.PageDown:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:bR.Last});case Th.Escape:return e.preventDefault(),e.stopPropagation(),i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case Th.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(i({type:5,value:e.key}),l.setTimeout((()=>i({type:6})),350))}})),p=mR((()=>{var e,t,n;return null!=(n=null==(e=r.labelRef.current)?void 0:e.id)?n:null==(t=r.buttonRef.current)?void 0:t.id}),[r.labelRef.current,r.buttonRef.current]),f=(0,c.useMemo)((()=>({open:0===r.listboxState})),[r]),m=e;return ph({ourProps:{"aria-activedescendant":null===r.activeOptionIndex||null==(n=r.options[r.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===r.propsRef.current.mode||void 0,"aria-labelledby":p,"aria-orientation":r.orientation,id:s,onKeyDown:h,role:"listbox",tabIndex:0,ref:o},theirProps:m,slot:f,defaultTag:"ul",features:Dj,visible:d,name:"Listbox.Options"})})),zj=gh((function(e,t){let{disabled:n=!1,value:r,...i}=e,[o,s]=Rj("Listbox.Option"),a=`headlessui-listbox-option-${kh()}`,l=null!==o.activeOptionIndex&&o.options[o.activeOptionIndex].id===a,{value:u,compare:d}=o.propsRef.current,h=ch(o.propsRef.current.mode,{1:()=>u.some((e=>d(e,r))),0:()=>d(u,r)}),p=(0,c.useRef)(null),f=Ah(t,p);Sh((()=>{if(0!==o.listboxState||!l||0===o.activationTrigger)return;let e=zh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[p,l,o.listboxState,o.activationTrigger,o.activeOptionIndex]);let m=(0,c.useRef)({disabled:n,value:r,domRef:p});Sh((()=>{m.current.disabled=n}),[m,n]),Sh((()=>{m.current.value=r}),[m,r]),Sh((()=>{var e,t;m.current.textValue=null==(t=null==(e=p.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[m,p]);let g=_h((()=>o.propsRef.current.onChange(r)));Sh((()=>(s({type:7,id:a,dataRef:m}),()=>s({type:8,id:a}))),[m,a]);let v=_h((e=>{if(n)return e.preventDefault();g(),0===o.propsRef.current.mode&&(s({type:1}),zh().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})))})),y=_h((()=>{if(n)return s({type:4,focus:bR.Nothing});s({type:4,focus:bR.Specific,id:a})})),b=_h((()=>{n||l||s({type:4,focus:bR.Specific,id:a,trigger:0})})),S=_h((()=>{n||!l||s({type:4,focus:bR.Nothing})})),x=(0,c.useMemo)((()=>({active:l,selected:h,disabled:n})),[l,h,n]);return ph({ourProps:{id:a,ref:f,role:"option",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,"aria-selected":h,disabled:void 0,onClick:v,onFocus:y,onPointerMove:b,onMouseMove:b,onPointerLeave:S,onMouseLeave:S},theirProps:i,slot:x,defaultTag:"li",name:"Listbox.Option"})})),Fj=Object.assign(Oj,{Button:kj,Label:Lj,Options:Bj,Option:zj});var Uj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",focusable:"false",role:"img",className:e,fill:"currentColor","aria-label":t,children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z",clipRule:"evenodd"})});const jj={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},Hj=(0,c.memo)((({defaultDate:e,onChange:t,disabled:n=!1})=>{const{t:r,i18n:i}=_e(),[o,a]=(0,c.useState)(e?"string"==typeof e?Cs.DateTime.fromISO(e):Cs.DateTime.fromJSDate(e):Cs.DateTime.now());return(0,c.useEffect)((()=>{t(o)}),[o,t]),(0,s.jsxs)("div",{className:"memori--date-selector",children:[(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Fj,{value:o,onChange:e=>{a(e)},disabled:n,name:"day",children:[(0,s.jsxs)(Fj.Label,{className:"memori--date-selector__select-label",children:[r("day"),":"]}),(0,s.jsxs)(Fj.Button,{"aria-label":r("day"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.day}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(Uj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Fj.Options,{className:"memori--date-selector__select-options",children:[...Array(31).keys()].map((e=>(0,s.jsx)(Fj.Option,{value:o.set({day:e+1}),className:"memori--date-selector__select-option",children:e+1},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Fj,{value:o,onChange:e=>{a(e)},disabled:n,name:"month",children:[(0,s.jsxs)(Fj.Label,{className:"memori--date-selector__select-label",children:[r("month"),":"]}),(0,s.jsxs)(Fj.Button,{"aria-label":r("month"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:jj["it"===i.language?"it":"en"][o.month-1]}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(Uj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Fj.Options,{className:"memori--date-selector__select-options",children:jj["it"===i.language?"it":"en"].map((e=>(0,s.jsx)(Fj.Option,{className:"memori--date-selector__select-option",value:o.set({month:jj["it"===i.language?"it":"en"].findIndex((t=>t===e))+1}),children:e},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Fj,{value:o,onChange:e=>{a(e)},disabled:n,name:"year",children:[(0,s.jsxs)(Fj.Label,{className:"memori--date-selector__select-label",children:[r("year"),":"]}),(0,s.jsxs)(Fj.Button,{"aria-label":r("year"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.year}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(Uj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Fj.Options,{className:"memori--date-selector__select-options",children:[...Array(Cs.DateTime.now().year-1899).keys()].sort(((e,t)=>t-e)).map((e=>(0,s.jsx)(Fj.Option,{value:o.set({year:e+1900}),className:"memori--date-selector__select-option",children:e+1900},e)))})})]})})]})}));Hj.displayName="DateSelector";var Gj=Hj;c=o("85Hg2");var Vj=({visible:e=!1,onClose:n,minAge:r})=>{const{t:i}=_e(),[o,a]=(0,c.useState)(),[l,u]=(0,c.useState)(),[d,h]=(0,c.useState)(!1),p=(0,c.useCallback)((()=>{if(h(!0),!o)return t(Yu).error(i("requiredField")),u(i("requiredField")||"Required field"),void h(!1);if(Cs.DateTime.now().diff(o,"years").years<r)return t(Yu).error(i("underageTwinSession",{age:r})),u(i("underageTwinSession",{age:r})||`You must be at least ${r} years old to interact with this Twin`),void h(!1);n(o.toJSDate().toISOString())}),[o,r,n,i]);return(0,s.jsxs)(ZR,{open:e,title:i("ageVerification"),className:"age-verification-modal",closable:!0,onClose:()=>n(),children:[(0,s.jsx)("p",{children:i("ageVerificationText",{minAge:r})}),(0,s.jsxs)("form",{className:"age-verification-form",onSubmit:e=>{e.preventDefault(),p()},children:[(0,s.jsx)("div",{className:"form-item",children:(0,s.jsxs)("fieldset",{name:"birthDate",children:[(0,s.jsx)("legend",{className:"sr-only",children:i("birthDate")}),(0,s.jsx)(Gj,{defaultDate:new Date(Date.now()),onChange:e=>{a(e)}}),(0,s.jsx)("p",{className:"form-item-help",children:i("birthDateHelper")}),l&&(0,s.jsx)("p",{className:"form-item-error",children:l})]})}),(0,s.jsx)("div",{className:"form-item form-submit",children:(0,s.jsx)(_f,{primary:!0,htmlType:"submit",className:"age-verification-submit",loading:d,disabled:!o,children:i("confirm")})})]})]})};c=o("85Hg2");var Wj=({label:e,className:n,disabled:r=!1,indeterminate:i=!1,checked:o,children:a,onChange:l,name:u,...d})=>{const h=(0,c.useRef)(null);return(0,c.useEffect)((()=>{h.current&&(h.current.indeterminate=i)}),[h,i]),(0,s.jsxs)("label",{className:t(ws)("memori-checkbox",n,{"memori-checkbox--disabled":r,"memori-checkbox--indeterminate":i}),children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{ref:h,type:"checkbox",...d,name:u,disabled:r,checked:o||i,className:"memori-checkbox--input",onChange:l}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),!!(null==e?void 0:e.length)&&(0,s.jsx)("span",{className:"memori-checkbox--text",children:e})]})};c=o("85Hg2");var qj=({className:e,value:n,name:r,displayValue:i,options:o,onChange:a,disabled:l=!1,label:u,placeholder:d})=>(0,s.jsx)("div",{className:t(ws)("memori-select",e),children:(0,s.jsxs)(Fj,{value:n,onChange:e=>{a(e)},disabled:l,name:r,children:[u&&(0,s.jsxs)(Fj.Label,{className:"memori-select--label",children:[u,":"]}),(0,s.jsxs)(Fj.Button,{"aria-label":u,className:"memori-select--button",children:[(0,s.jsx)("span",{className:t(ws)("memori-select--value",{"memori-select--value-placeholder":!n}),children:n?i||n:d}),(0,s.jsx)("span",{className:"memori-select--icon",children:(0,s.jsx)(Uj,{})})]}),(0,s.jsx)(bf,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Fj.Options,{className:"memori-select--options",children:o.map((e=>(0,s.jsx)(Fj.Option,{value:e.value,className:"memori-select--option",children:e.label},e.value)))})})]})});const Kj={muteSpeaker:"@memori:muteSpeaker",microphoneMode:"@memori:microphoneMode",continuousSpeechTimeout:"@memori:continuousSpeechTimeout",birthDate:"@memori:birthDate",controlsPosition:"@memori:controlsPosition",hideEmissions:"@memori:hideEmissions",loginToken:"@memori:loginToken",location:"@memori:location"},Jj=(e,t)=>{var n;try{const r=window.localStorage.getItem(null!==(n=Kj[e])&&void 0!==n?n:e);if(!r)return t;try{return JSON.parse(r)}catch(e){return r}}catch(e){return console.error("error",e),t}},Yj=(e,t)=>{var n;try{window.localStorage.setItem(null!==(n=Kj[e])&&void 0!==n?n:e,t.toString())}catch(e){console.error("error",e)}},Xj=e=>{var t;try{window.localStorage.removeItem(null!==(t=Kj[e])&&void 0!==t?t:e)}catch(e){console.error("error",e)}},Qj=[2,3,5,10,15,20,30,60];var Zj=({open:e,layout:t="DEFAULT",onClose:n,microphoneMode:r="HOLD_TO_TALK",continuousSpeechTimeout:i,setMicrophoneMode:o,setContinuousSpeechTimeout:a,controlsPosition:l,setControlsPosition:c,hideEmissions:u,setHideEmissions:d,additionalSettings:h})=>{const{t:p}=_e();return(0,s.jsxs)(Cf,{className:"memori-settings-drawer",open:e,onClose:n,title:p("widget.settings")||"Settings",description:p("write_and_speak.settingsHeaderLabel"),children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#microphoneMode",children:[p("write_and_speak.microphoneMode")||"Microphone mode",":"]}),(0,s.jsxs)(gU,{id:"microphoneMode",name:"microphoneMode",value:r,defaultValue:r,className:"memori-settings-drawer--microphoneMode-radio",onChange:e=>{let t="CONTINUOUS"===e?"CONTINUOUS":"HOLD_TO_TALK";o(t),Yj("microphoneMode",t)},children:[(0,s.jsx)(gU.Option,{value:"HOLD_TO_TALK",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("write_and_speak.holdToSpeak")||"Hold to speak"})}),(0,s.jsx)(gU.Option,{value:"CONTINUOUS",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("write_and_speak.continuousSpeechLabel")||"Continuous speech"})})]})]}),"CONTINUOUS"===r&&(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(qj,{label:p("write_and_speak.secondsLabel")||"Seconds",placeholder:p("write_and_speak.secondsLabel")||"Seconds",options:Qj.map((e=>({value:e,label:e}))),value:i,onChange:e=>{a(e),Yj("continuousSpeechTimeout",e)}})}),"TOTEM"===t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#controlsPosition",children:[p("write_and_speak.controlsPosition")||"Controls",":"]}),(0,s.jsxs)(gU,{id:"controlsPosition",name:"controlsPosition",value:l,defaultValue:l,className:"memori-settings-drawer--controlsposition-radio",onChange:e=>{c(e),Yj("controlsPosition",e)},children:[(0,s.jsx)(gU.Option,{value:"center",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("center")||"Center"})}),(0,s.jsx)(gU.Option,{value:"bottom",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(_f,{primary:e,outlined:!e,children:p("bottom")||"Bottom"})})]})]}),(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(Wj,{label:p("write_and_speak.hideEmissionsLabel")||"Hide emissions",name:"hideControls",checked:u,onChange:e=>{d(e.target.checked),Yj("hideEmissions",e.target.checked)}})})]}),h&&(0,s.jsx)("div",{className:"memori-settings-drawer--field controls",children:h})]})};c=o("85Hg2");var $j=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"})});var eH=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M15 18L9 12 15 6"})});var tH=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M9 18L15 12 9 6"})});var nH=({apiURL:e,sessionID:n,memori:r,visible:i=!0,initialKnownFacts:o=[],closeDrawer:a})=>{var l;const{t:u}=_e(),d=Q(e),{getKnownFactsPaginated:h,deleteKnownFact:p}=d.knownFacts,[f,m]=(0,c.useState)(o),[g,v]=(0,c.useState)(25),[y,b]=(0,c.useState)(0),[S,x]=(0,c.useState)(null!==(l=null==o?void 0:o.length)&&void 0!==l?l:0),[_,w]=(0,c.useState)(!1),C=async(e,r,i)=>{if(n||e){w(!0);try{const{knownFacts:o,count:s,...a}=await h(null!=e?e:n,null!=r?r:y,null!=i?i:g);m(null!=o?o:[]),x(null!=s?s:0),0!==a.resultCode&&(console.error(a),t(Yu).error(u(eO(a.resultCode))))}catch(e){console.error("KNOWN_FACTS/FETCH",e),m(null!=o?o:[])}w(!1)}};(0,c.useEffect)((()=>{C()}),[]);const[A,E]=(0,c.useState)(!1),[T,I]=(0,c.useState)(),[M,R]=(0,c.useState)([]);return(0,s.jsxs)(Cf,{open:i,width:"80%",className:"memori-known-facts-drawer",onClose:()=>a(),title:u("knownFacts.title"),children:[(0,s.jsx)("p",{children:u("knownFacts.description",{memoriName:r.name})}),(0,s.jsxs)(xf,{spinning:_,children:[(0,s.jsxs)("div",{className:"memori-known-facts-actions",children:[(0,s.jsxs)(_f,{primary:!0,danger:!0,onClick:()=>{E(!0)},className:"memori-known-facts-delete-selected",disabled:0===(null==M?void 0:M.length),icon:(0,s.jsx)($j,{}),loading:_,children:[u("selected")," (",null==M?void 0:M.length,")"]}),(0,s.jsx)(ZR,{className:"memori-known-facts-modal",open:A,closable:!0,title:M.length>1?u("knownFacts.deleteSelectedConfirmTitle"):u("knownFacts.deleteConfirmTitle"),description:M.length>1?u("knownFacts.deleteSelectedConfirmMessage",{number:M.length}):u("knownFacts.deleteConfirmMessage"),onClose:()=>{E(!1)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_f,{ghost:!0,onClick:()=>{E(!1)},children:u("cancel")}),(0,s.jsx)(_f,{primary:!0,danger:!0,onClick:async()=>{try{const e=M.map((e=>p(n,e)));Promise.all(e).then((e=>{if(e.every((e=>0===e.resultCode)))t(Yu).success(u("knownFacts.deleteSuccess")),R([]),C(),E(!1);else{let n=e.find((e=>0!==e.resultCode));console.error(n),void 0!==(null==n?void 0:n.resultCode)&&t(Yu).error(u(eO(null==n?void 0:n.resultCode)))}}))}catch(e){let n=e;t(Yu).error(u("Error")+n.message)}},children:u("confirm")})]})})]}),S>25&&(0,s.jsxs)("nav",{className:"memori--table--pagination",children:[S>g&&(0,s.jsxs)("div",{className:"memori--table--pagination--pages",children:[(0,s.jsx)(_f,{shape:"circle",disabled:0===y||y<g,padded:!1,title:u("previous")||"Previous",icon:(0,s.jsx)(eH,{}),onClick:()=>{let e=(y/g-1)*g;b(e),C(void 0,e,g)}}),(0,s.jsxs)("span",{className:"memori--table--pagination--pages--current",children:[Math.ceil(y/g)+1," /"," ",Math.ceil(S/g)]}),(0,s.jsx)(_f,{shape:"circle",padded:!1,title:u("next")||"Next",icon:(0,s.jsx)(tH,{}),disabled:(y/g+1)*g>=S,onClick:()=>{let e=(y/g+1)*g;b(e),C(void 0,e,g)}})]}),(0,s.jsx)(qj,{options:[{label:`25 / ${u("page")||"page"}`,value:25},{label:`50 / ${u("page")||"page"}`,value:50},{label:`100 / ${u("page")||"page"}`,value:100}],value:g,displayValue:`${g} / ${u("page")||"page"}`,onChange:e=>{v(e),b(0),C(void 0,0,e)}})]}),(0,s.jsxs)("table",{className:"memori--table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Wj,{checked:!!(null==f?void 0:f.length)&&(null==M?void 0:M.length)===f.length,indeterminate:!!(null==f?void 0:f.length)&&!!(null==M?void 0:M.length)&&(null==M?void 0:M.length)!==(null==f?void 0:f.length),onChange:e=>{e.target.checked?R(f.map((e=>e.knownFactID))):R([])}})}),(0,s.jsx)("th",{children:u("knownFacts.text")}),(0,s.jsx)("th",{className:"mobile-hidden",children:u("createdAt")}),(0,s.jsx)("th",{className:"memori--table--column-right",children:u("actions")})]})}),(0,s.jsx)("tbody",{children:f.map((e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Wj,{checked:null==M?void 0:M.includes(e.knownFactID),onChange:t=>{t.target.checked?R((t=>[...new Set([...t,e.knownFactID])])):R((t=>t.filter((t=>t!==e.knownFactID))))}})}),(0,s.jsx)("td",{children:e.text}),(0,s.jsx)("td",{className:"mobile-hidden",children:(0,s.jsx)("span",{className:"memori--table--date",children:e.creationTimestamp?new Intl.DateTimeFormat("it",{dateStyle:"short",timeStyle:"short"}).format(new Date(e.creationTimestamp)):"-"})}),(0,s.jsx)("td",{className:"memori--table--column-right",children:(0,s.jsxs)("div",{className:"memori--table--action-column",children:[(0,s.jsx)(_f,{danger:!0,ghost:!0,shape:"circle",icon:(0,s.jsx)($j,{}),disabled:(null==M?void 0:M.length)>0,title:u("delete")||"Delete",onClick:()=>I(e.knownFactID)}),(0,s.jsx)(ZR,{className:"memori-known-facts-modal",open:T===e.knownFactID,closable:!0,title:u("knownFacts.deleteConfirmTitle"),description:u("knownFacts.deleteConfirmMessage"),onClose:()=>{I(void 0)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_f,{ghost:!0,onClick:()=>{I(void 0)},children:u("cancel")}),(0,s.jsx)(_f,{primary:!0,danger:!0,onClick:async()=>{try{const r=await p(n,e.knownFactID);0===r.resultCode?(t(Yu).success(u("knownFacts.deleteSuccess")),R([]),C(),I(void 0)):(console.error(r),t(Yu).error(u(eO(r.resultCode),{ns:"common"})))}catch(e){let n=e;t(Yu).error(u("Error")+n.message)}},children:u("confirm")})]})})]})})]},e.knownFactID)))})]})]})]})};var rH=({open:e=!1,baseUrl:t,apiUrl:n,tenant:r,experts:i,onClose:o})=>{const{t:a}=_e();return(0,s.jsx)(Cf,{open:e,onClose:o,className:"memori--experts-drawer",title:(0,s.jsx)("h2",{className:"memori--experts-drawer--title",children:a("widget.expertsInTheBoard")}),children:(0,s.jsx)("ul",{className:"memori--experts-drawer--list",children:i.map((e=>(0,s.jsxs)("li",{className:"memori--experts-drawer--item",children:[(0,s.jsx)("figure",{className:"memori--experts-drawer--avatar",children:(0,s.jsx)("img",{src:`${n}/api/v1/memoriai/memori/avatar/${e.expertMemoriID}`,alt:e.name,onError:e=>{e.currentTarget.src=xN({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:t}),e.currentTarget.onerror=null}})}),(0,s.jsxs)("div",{className:"memori--experts-drawer--content",children:[(0,s.jsx)("h3",{className:"memori--experts-drawer--name",children:e.name}),(0,s.jsx)("p",{className:"memori--experts-drawer--description",children:e.description})]})]},e.expertID)))})})};c=o("85Hg2"),c=o("85Hg2");const iH=["memori","private","public","api","404","500","it","en","account","auth","logout","privacy_and_cookie","unauthorized","users","virtual_spaces"];var oH=({tenant:e,apiUrl:n,onLogin:r,goToLogin:i,__TEST__waitingForOtp:o=!1})=>{const{t:a,i18n:l}=_e(),u="it"===l.language?"it":"en",d=Q(n),{userSignUp:h,userConfirmSignUp:p,resendVerificationCode:f}=d.backend,[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),[b,S]=(0,c.useState)(),[x,_]=(0,c.useState)(),w=!b||b&&eR.test(b),C=w&&b&&b.length>=24,A=!b||0===b.length,E=!w||A?0:b.length<8?15:b.length>=32?100:(b.length-8)*(50/24)+50,[T,I]=(0,c.useState)(!1),[M,R]=(0,c.useState)(!1),[P,N]=(0,c.useState)(o),[O,k]=(0,c.useState)(null),[L,D]=(0,c.useState)();(0,c.useEffect)((()=>{D(window.location.href)}),[]);return P?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var i,o,s;n.preventDefault();const l=n.currentTarget,c=null!==(i=l.tenant.value)&&void 0!==i?i:e.id,u=null!==(o=l.userName.value)&&void 0!==o?o:v,d=null!==(s=l.password.value)&&void 0!==s?s:b,h=l.verificationCode.value;I(!0),k(null);try{const{user:e,token:n,...i}=await p({tenant:c,userName:u,password:d,verificationCode:h});0!==i.resultCode?(console.error(i),t(Yu).error(a(eO(i.resultCode)))):e&&n&&(t(Yu).success(a("success")),r(e,n))}catch(e){let n=e;console.error("[validate otp]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{I(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"userName",value:v}),(0,s.jsx)("input",{type:"hidden",name:"password",value:b}),(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsxs)("label",{htmlFor:"#verificationCode",children:[a("login.otpCode"),(0,s.jsx)("input",{id:"verificationCode",name:"verificationCode",type:"text",required:!0,autoComplete:"one-time-code",placeholder:a("login.otpCode")||"OTP"})]}),(0,s.jsx)("p",{children:(0,s.jsx)(_f,{outlined:!0,onClick:async n=>{if(n.preventDefault(),v){R(!0);try{const n=await f({tenant:null==e?void 0:e.id,userName:v});0===n.resultCode?t(Yu).success(a("resentVerificationCode")):(console.error(n),t(Yu).error(a(eO(n.resultCode))))}catch(e){let n=e;console.error("[resend otp]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{R(!1)}}},loading:M,children:a("login.resendVerificationCode")})}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:T,children:a("confirm")})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var r,i,o,s,l,c,u;n.preventDefault();const d=n.currentTarget,p=null!==(r=d.tenant.value)&&void 0!==r?r:e.id,f=(null!==(i=d.eMail.value)&&void 0!==i?i:m).toLowerCase(),g=null!==(o=d.userName.value)&&void 0!==o?o:v,y=d.password.value,b=new Date(null===(s=d.birthDate)||void 0===s?void 0:s.value).toISOString(),S=null===(l=d.tnCAndPPAccepted)||void 0===l?void 0:l.checked,x=null===(c=d.pAndCUAccepted)||void 0===c?void 0:c.checked,_=null===(u=d.referral)||void 0===u?void 0:u.value;if(!(f&&g&&y&&b&&S))return void k(a("missingData"));I(!0),k(null);if(((new Date).getTime()-new Date(b).getTime())/1e3/60/60/24/365<14)return t(Yu).error(a("login.underage",{age:14})),void k(a("login.underage",{age:14}));try{const{user:e,...n}=await h({tenant:p,eMail:f,userName:g,password:y,birthDate:b,tnCAndPPAccepted:S,tnCAndPPAcceptanceDate:(new Date).toISOString(),pAndCUAccepted:x,pAndCUAcceptanceDate:(new Date).toISOString(),referral:_});0!==n.resultCode?(console.error(n),t(Yu).error(a(eO(n.resultCode)))):e&&(t(Yu).success(a("success")),N(!0))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{I(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsx)("input",{type:"hidden",name:"referral",value:L}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[a("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",required:!0,autoComplete:"email",placeholder:a("login.email")||"Email",onChange:e=>g(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!tR.test(m)})]}),!!(null==m?void 0:m.length)&&!tR.test(m)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.emailFormatError")}),(0,s.jsxs)("label",{htmlFor:"userName",children:[a("login.username"),(0,s.jsx)("input",{type:"text",name:"userName",id:"userName",required:!0,autoComplete:"username",placeholder:a("login.username")||"Username",onFocus:()=>{if(!(null==v?void 0:v.length)&&(null==m?void 0:m.length)){let e=(e=>e.split("@")[0].replace(/[^a-zA-Z0-9]/g,""))(m);const t=document.getElementById("userName");t&&(t.value=e,y(e))}},onChange:e=>y(e.target.value),"aria-invalid":!!(null==v?void 0:v.length)&&(iH.includes(v.toLowerCase())||!nR.test(v))})]}),!!(null==v?void 0:v.length)&&iH.includes(v.toLowerCase())&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameContainsReservedWord")}),!!(null==v?void 0:v.length)&&!nR.test(v)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameFormatError")}),(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[a("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.birthDateHelper")})}),(0,s.jsxs)("label",{htmlFor:"#password",children:[a("login.password"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.password")||"Password",onChange:e=>S(e.target.value),"aria-invalid":!w})]}),!w&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[a("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.confirmPassword")||"Password",onChange:e=>_(e.target.value),"aria-invalid":!!(null==b?void 0:b.length)&&!!(null==x?void 0:x.length)&&b!==x})]}),!!(null==b?void 0:b.length)&&!!(null==x?void 0:x.length)&&b!==x&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:E,id:"password-strength-meter"}),(0,s.jsx)("small",{children:a("login.pwd"+(C?"Strong":w?"Acceptable":"Weak"))}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",required:!0,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:a("login.privacyAndCookiePolicy")})," ",a("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/tos`,target:"_blank",rel:"noopener noreferrer",children:a("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",a("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.deepThoughtExplaination")})}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:T,children:a("login.signUp")}),(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[a("login.alreadyHaveAnAccount")," ",(0,s.jsx)(_f,{outlined:!0,onClick:i,children:a("login.backToLogin")})]})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]})};c=o("85Hg2");const sH=["image/jpeg","image/png","image/jpg","image/gif"];var aH=({user:e,loginToken:n,apiUrl:r,onUserUpdate:i})=>{const{t:o,i18n:a}=_e(),l="it"===a.language?"it":"en",u=Q(r),{updateUser:d,uploadAsset:h}=u.backend,[p,f]=(0,c.useState)(),[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),b=!m||m&&eR.test(m),S=b&&m&&m.length>=24,x=!m||0===m.length,_=!b||x?0:m.length<8?15:m.length>=32?100:(m.length-8)*(50/24)+50,[w,C]=(0,c.useState)(!1),[A,E]=(0,c.useState)(null),T=async(e,r)=>{try{const{user:s,...a}=await d(n,e,r);0!==a.resultCode?(console.error(a),t(Yu).error(o(eO(a.resultCode)))):s&&(t(Yu).success(o("success")),i(s))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}finally{C(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"memori--login-drawer--edit-account-title",children:o("login.editAccount")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form memori--login-drawer--account-form",onSubmit:async r=>{var i,s,a,l,c;if(r.preventDefault(),!e.userID)return;const u=e.userID,d=r.currentTarget,f=null!==(i=d.eMail.value)&&void 0!==i?i:p,g=null!==(s=d.newPassword.value)&&void 0!==s?s:m,v=d.password.value,y=d.confirmPassword.value,b=null===(a=d.pAndCUAccepted)||void 0===a?void 0:a.checked,S=null===(c=null===(l=d.avatar)||void 0===l?void 0:l.files)||void 0===c?void 0:c[0];if(C(!0),E(null),(null==g?void 0:g.length)&&g!==y)return E(o("login.passwordMatchingError")),void C(!1);let x={...(null==f?void 0:f.length)&&f!==e.eMail?{eMail:f}:{},...g?{password:v,newPassword:g}:{},...void 0!==b&&b!==e.pAndCUAccepted?{pAndCUAccepted:b,pAndCUAcceptanceDate:(new Date).toISOString()}:{}};if(0===Object.values(x).length&&!S)return console.debug("No changes to submit"),void C(!1);if(S){const e=new FileReader;e.onload=async e=>{var r,i;try{const{asset:s,...a}=await h(null!==(r=S.name)&&void 0!==r?r:"avatar",null===(i=e.target)||void 0===i?void 0:i.result,n);0!==a.resultCode?(console.error(a),t(Yu).error(o(eO(a.resultCode)))):s&&(x.avatarURL=s.assetURL,await T(u,x))}catch(e){let n=e;console.error("[avatar upload]",n),(null==n?void 0:n.message)&&t(Yu).error(n.message)}},e.readAsDataURL(S)}else await T(u,x)},children:[(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.emailChange")}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[o("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",autoComplete:"email",placeholder:e.eMail,onChange:e=>f(e.target.value),"aria-invalid":!!(null==p?void 0:p.length)&&!tR.test(p)})]}),!!(null==p?void 0:p.length)&&!tR.test(p)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.emailFormatError")})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.passwordChange")}),(0,s.jsxs)("label",{htmlFor:"#password",children:[o("login.currentPassword"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"password",placeholder:o("login.currentPassword")||"Password"})]}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[o("login.newPassword"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",autoComplete:"new-password",placeholder:o("login.password")||"Password",onChange:e=>g(e.target.value),"aria-invalid":!b})]}),!b&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[o("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",autoComplete:"new-password",placeholder:o("login.confirmPassword")||"Password",onChange:e=>y(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v})]}),!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:_,id:"password-strength-meter"}),(0,s.jsx)("small",{children:o("login.pwd"+(S?"Strong":b?"Acceptable":"Weak"))})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.avatarChange")}),(0,s.jsxs)("label",{htmlFor:"#avatar",children:["Avatar",(0,s.jsx)("input",{type:"file",name:"avatar",id:"avatar",accept:sH.join(", "),placeholder:e.avatarURL})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox memori-checkbox--disabled",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",disabled:!0,defaultChecked:e.tnCAndPPAccepted,checked:e.tnCAndPPAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:o("login.privacyAndCookiePolicy")})," ",o("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/tos`,target:"_blank",rel:"noopener noreferrer",children:o("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input",defaultChecked:e.pAndCUAccepted}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsx)(AN,{align:"left",content:o("login.deepThoughtExplaination"),children:(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",o("login.optional"),")"]})})]})})]}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:w,children:o("login.save")})]}),A&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:A})]})};var lH=({open:e=!1,onClose:n,onLogin:r,onLogout:i,user:o,loginToken:a,tenant:l,apiUrl:u,__TEST__signup:d=!1,__TEST__needMissingData:h=!1,__TEST__waitingForOtp:p=!1,__TEST__changePwd:f=!1})=>{var m,g;const{t:v,i18n:y}=_e(),b="it"===y.language?"it":"en",S=Q(u),{userLogin:x,updateUser:_}=S.backend,w=(null==o?void 0:o.userID)&&a,[C,A]=(0,c.useState)(!1),[E,T]=(0,c.useState)(null),[I,M]=(0,c.useState)(d),[R,P]=(0,c.useState)(f?{flowID:"flowID",tenant:l.id,eMail:"email",userName:"username",password:"password"}:void 0),[N,O]=(0,c.useState)(h?{token:"token",birthDate:!0,tnCAndPPAccepted:!0}:{}),[k,L]=(0,c.useState)(),[D,B]=(0,c.useState)(),z=!k||k&&eR.test(k),F=z&&k&&k.length>=24,U=!k||0===k.length,j=!z||U?0:k.length<8?15:k.length>=32?100:(k.length-8)*(50/24)+50;return(0,s.jsx)(Cf,{open:e,onClose:n,className:t(ws)("memori--login-drawer",{"memori--login-drawer--logged":w,"memori--login-drawer--signup":I}),title:(0,s.jsx)("span",{className:"memori--login-drawer--title",children:w?v("login.loggedDrawerTitle",{name:o.userName}):v(I?"login.signupDrawerTitle":"login.loginDrawerTitle")}),children:w?(0,s.jsxs)("div",{className:"memori--login-drawer--logged",children:[o.avatarURL&&(0,s.jsx)("figure",{className:"memori--login-drawer--avatar",children:(0,s.jsx)("img",{src:o.avatarURL,alt:o.userName})}),(0,s.jsx)(_f,{primary:!0,onClick:()=>{i()},children:v("login.logout")}),(0,s.jsx)(aH,{user:o,loginToken:a,apiUrl:u,onUserUpdate:e=>r(e,a)})]}):(null===(m=null==N?void 0:N.token)||void 0===m?void 0:m.length)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{children:v("login.missingData")}),(0,s.jsx)("p",{children:v("login.missingDataHelper")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,s;e.preventDefault();const a=e.currentTarget,l=null===(n=a.birthDate)||void 0===n?void 0:n.value,c=null===(i=a.tnCAndPPAccepted)||void 0===i?void 0:i.checked,u=null===(s=a.pAndCUAccepted)||void 0===s?void 0:s.checked;if(!(null==o?void 0:o.userID)||!(null==N?void 0:N.token))return;if(!l||!c)return void T(v("missingData"));let d={userID:o.userID,birthDate:(null==o?void 0:o.birthDate)||!N.birthDate?void 0:l,tnCAndPPAccepted:c||(null==o?void 0:o.tnCAndPPAccepted),tnCAndPPAcceptanceDate:c?(new Date).toISOString():void 0,pAndCUAccepted:u||(null==o?void 0:o.pAndCUAccepted),pAndCUAcceptanceDate:u?(new Date).toISOString():void 0};const{user:h,...p}=await _(N.token,o.userID,d);0!==p.resultCode?(console.error(p),t(Yu).error(v(eO(p.resultCode))),T(p.resultMessage)):(t(Yu).success(v("success")),r(h||d,N.token))},children:[N.birthDate&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[v("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.birthDateHelper")})})]}),(null==N?void 0:N.tnCAndPPAccepted)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:v("login.privacyAndCookiePolicy")})," ",v("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/tos`,target:"_blank",rel:"noopener noreferrer",children:v("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",defaultChecked:null==o?void 0:o.pAndCUAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",v("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.goToAccountToChangeYourPreferences")})}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.deepThoughtExplaination")})})]}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:C,children:v("login.save")})]})]}):(null==R?void 0:R.flowID)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:v("login.mustChangePassword")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,o,s,a;e.preventDefault();const c=e.currentTarget,u=null!==(n=c.tenant.value)&&void 0!==n?n:l.id,d=null!==(i=c.flowID.value)&&void 0!==i?i:null==R?void 0:R.flowID,h=null!==(o=c.eMail.value)&&void 0!==o?o:null==R?void 0:R.eMail,p=null!==(s=c.userName.value)&&void 0!==s?s:null==R?void 0:R.userName,f=null!==(a=c.password.value)&&void 0!==a?a:null==R?void 0:R.password,m=c.newPassword.value;if(!(null==m?void 0:m.length)||!z)return void T(v("login.passwordFormatError"));A(!0);const g={tenant:u,flowID:d,eMail:h,userName:p,password:f,newPassword:m};try{const{user:e,token:n,...i}=await x(g);0!==i.resultCode?(console.error(i),t(Yu).error(v(eO(i.resultCode))),T(i.resultMessage)):e&&n&&(t(Yu).success(v("success")),r(e||g,n))}catch(e){let n=e;console.error("[LOGIN/CHANGE PWD]",n),n.message&&(t(Yu).error(n.message),T(n.message))}finally{A(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:null!==(g=R.tenant)&&void 0!==g?g:null==l?void 0:l.id}),(0,s.jsx)("input",{type:"hidden",name:"flowID",value:R.flowID}),(0,s.jsx)("input",{type:"hidden",name:"eMail",value:R.eMail}),(0,s.jsx)("input",{type:"hidden",name:"userName",value:R.userName}),(0,s.jsx)("input",{type:"hidden",name:"password",value:R.password}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[v("login.password"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.password")||"Password",onChange:e=>L(e.target.value),"aria-invalid":!z})]}),!z&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[v("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.confirmPassword")||"Password",onChange:e=>B(e.target.value),"aria-invalid":!!(null==k?void 0:k.length)&&!!(null==D?void 0:D.length)&&k!==D})]}),!!(null==k?void 0:k.length)&&!!(null==D?void 0:D.length)&&k!==D&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:j,id:"password-strength-meter"}),(0,s.jsx)("small",{children:v("login.pwd"+(F?"Strong":z?"Acceptable":"Weak"))}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:C,children:v("confirm")})]})]}):I?(0,s.jsx)(oH,{tenant:l,apiUrl:u,onLogin:r,goToLogin:()=>M(!1),__TEST__waitingForOtp:p}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:e=>{e.preventDefault();const n=e.currentTarget,i=n.userNameOrEmail.value,o=n.password.value,s=tR.test(i),a=s?{tenant:null==l?void 0:l.id,eMail:i,password:o}:{tenant:null==l?void 0:l.id,userName:i,password:o};A(!0),T(null),x(a).then((e=>{var n,a,c,u,d;-14===e.resultCode?P({tenant:l.id,eMail:s?i:void 0,userName:s?void 0:i,password:o,flowID:e.flowID||(null===(n=e.user)||void 0===n?void 0:n.flowID)}):0!==e.resultCode?(console.error(e),t(Yu).error(v(eO(e.resultCode))),T(e.resultMessage)):e.user&&e.token&&((null===(a=e.user)||void 0===a?void 0:a.tnCAndPPAccepted)&&(null===(c=e.user)||void 0===c?void 0:c.birthDate)?r(e.user,e.token):O({token:e.token,birthDate:!(null===(u=e.user)||void 0===u?void 0:u.birthDate),tnCAndPPAccepted:!(null===(d=e.user)||void 0===d?void 0:d.tnCAndPPAccepted)}))})).catch((e=>{console.error("[LOGIN]",e),e.message&&(t(Yu).error(e.message),T(e.message))})).finally((()=>{A(!1)}))},children:[(0,s.jsxs)("label",{htmlFor:"#userNameOrEmail",children:[v("login.userNameOrEmail"),(0,s.jsx)("input",{id:"userNameOrEmail",name:"userNameOrEmail",required:!0,autoComplete:"email",placeholder:"Username/email"})]}),(0,s.jsxs)("label",{htmlFor:"#password",children:["Password",(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"password",placeholder:"Password"})]}),(0,s.jsx)(_f,{htmlType:"submit",primary:!0,loading:C,children:v("login.login")}),(null==l?void 0:l.disableRegistration)?l.adminEmail?(0,s.jsxs)("div",{className:"memori--login-drawer--signup",children:[(0,s.jsx)("p",{children:v("login.registrationDisabled")}),(0,s.jsxs)("p",{children:[v("login.contactAdmin"),":"," ",(0,s.jsx)("a",{href:`mailto:${l.adminEmail}`,children:l.adminEmail})]})]}):null:(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[v("login.newUserSignUp")," ",(0,s.jsx)(_f,{outlined:!0,onClick:()=>M(!0),children:v("login.signUp")})]})]}),E&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:E})]})})};var cH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,children:[m&&d&&h&&(0,s.jsx)(d,{...h}),e&&t&&(0,s.jsx)(e,{...t}),(0,s.jsxs)("div",{className:"memori--grid",children:[(0,s.jsxs)("div",{className:"memori--grid-column memori--grid-column-left",children:[n&&r&&(0,s.jsx)(n,{...r}),(0,s.jsx)("div",{id:"extension"})]}),(0,s.jsx)("div",{className:"memori--grid-column memori--grid-column-right",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null}),v]})]})]});var uH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,className:"memori-totem-layout",children:[v,m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-totem-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{className:"memori-totem-layout--avatar",children:n&&r&&(0,s.jsx)(n,{...r})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-totem-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]});var dH=({Header:e,headerProps:t,Chat:n,chatProps:r,StartPanel:i,startPanelProps:o,integrationStyle:a,integrationBackground:l,ChangeMode:c,changeModeProps:u,sessionId:d,hasUserActivatedSpeak:h,showInstruct:p=!1,loading:f=!1,poweredBy:m})=>(0,s.jsxs)(s.Fragment,{children:[a,l,(0,s.jsxs)(xf,{spinning:f,className:"memori-chat-layout",children:[m,p&&c&&u&&(0,s.jsx)(c,{...u}),(0,s.jsx)("div",{className:"memori-chat-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-chat-layout--controls",children:d&&h&&n&&r?(0,s.jsx)(n,{...r}):o?(0,s.jsx)(i,{...o}):null})]})]});c=o("85Hg2"),c=o("85Hg2");var hH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>{var y,b;const{t:S}=_e(),[x,_]=(0,c.useState)(!0),[w,C]=(0,c.useState)(),A=(0,c.useMemo)((()=>null==o?void 0:o.stopAudio),[null==o?void 0:o.stopAudio]),E=e=>{_(e),C(e?void 0:(new Date).toISOString());try{null==A||A()}catch(e){console.log(e)}};return(0,s.jsx)("div",{className:"memori-website_assistant--"+(x?"collapsed":"expanded"),children:x?(0,s.jsx)("div",{className:"memori-website_assistant--trigger",children:(0,s.jsx)(_f,{className:"memori-website_assistant--trigger-button",ghost:!0,shape:"circle",onClick:()=>E(!1),title:S("expand")||"Expand",children:(0,s.jsx)(lD,{avatar:null==r?void 0:r.memori.avatarURL})})}):(0,s.jsxs)(s.Fragment,{children:[u,(0,s.jsxs)(xf,{spinning:g,className:"memori-website_assistant-layout",children:[v,(0,s.jsx)("div",{className:"memori-website_assistant--close-button-wrapper",children:(0,s.jsx)(_f,{className:"memori-website_assistant--close-button",primary:!0,shape:"circle",onClick:()=>E(!0),icon:(0,s.jsx)(wf,{}),title:S("close")||"Close"})}),m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--header",children:e&&t&&(0,s.jsx)(e,{...t,showSettings:!1,showReload:!1})}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--avatar",children:n&&r&&(0,c.createElement)(n,{...r,integrationConfig:r.integrationConfig?{...r.integrationConfig,avatarURL:(null===(y=r.integrationConfig)||void 0===y?void 0:y.avatarURL)?`${null===(b=r.integrationConfig)||void 0===b?void 0:b.avatarURL.split("#")[0]}#${w}`:void 0}:{},key:w})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]})})};const pH=async({operation:e="session_creation",baseUrl:t,userID:n,userName:r,tenant:i})=>{if(!n&&!r)throw new Error("Either userID or userName must be provided");const o=await fetch(`${t}/api/verify-tokens`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e,userID:n,userName:r,tenant:i})});if(!o.ok)throw new Error("Failed to fetch credits");return o.json()};c=o("85Hg2");var fH=({Header:e,headerProps:t,Chat:n,chatProps:r,startPanelProps:i,sessionId:o,hasUserActivatedSpeak:a})=>{const{t:l}=_e(),[u,d]=(0,c.useState)(!1);(0,c.useEffect)((()=>{const e=document.body;e&&(u?(e.style.width="calc(100% - 350px)",e.style.marginRight="300px",e.style.transition="all 0.5s"):(e.style.width="100%",e.style.marginLeft="0"))}),[u]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("input",{type:"checkbox",id:"memori-sidebar-toggle",className:"memori-sidebar-toggle",checked:u,onChange:()=>{d(!u),(()=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}i&&(null==i?void 0:i.initializeTTS)&&(null==i||i.initializeTTS()),i&&(null==i?void 0:i.onClickStart)&&(null==i||i.onClickStart())})()}}),(0,s.jsxs)("div",{className:"memori-sidebar-container",children:[(0,s.jsx)("label",{htmlFor:"memori-sidebar-toggle",className:"memori-sidebar-toggle-label memori-open-label",children:(0,s.jsx)(YN,{className:"memori-icon","aria-label":l("expand")})}),(0,s.jsxs)("aside",{className:"memori-sidebar",children:[(0,s.jsx)("label",{htmlFor:"memori-sidebar-toggle",className:"memori-sidebar-toggle-label memori-close-label",children:(0,s.jsx)("span",{children:(0,s.jsx)(wf,{className:"memori-icon-close","aria-label":l("collapse")})})}),(0,s.jsx)("div",{className:"memori-sidebar-content",children:(0,s.jsx)("div",{className:"memori-hidden-chat-layout--header",children:e&&t&&(0,s.jsx)(e,{position:{latitude:0,longitude:0,placeName:""},...t,className:"memori-hidden-chat-layout-header--layout"})})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-hidden-chat-layout--controls",children:o&&a&&n&&r?(0,s.jsx)(n,{...r}):(0,s.jsx)("div",{className:"memori-loading",children:(0,s.jsx)(xf,{})})})]})]})]})};c=o("85Hg2");var mH=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:u,integrationBackground:d,ChangeMode:h,changeModeProps:p,sessionId:f,hasUserActivatedSpeak:m,showInstruct:g=!1,loading:v=!1,poweredBy:y})=>((0,c.useEffect)((()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""})),[]),(0,s.jsxs)(s.Fragment,{children:[u,d,(0,s.jsxs)(xf,{className:"memori-spin--zoomed-full-body",spinning:v,children:[g&&h&&p&&(0,s.jsx)(h,{...p}),e&&t&&(0,s.jsx)(e,{...t}),(0,s.jsxs)("div",{className:"memori--grid",children:[(0,s.jsxs)("div",{className:"memori--grid-column memori--grid-column-left",children:[n&&r&&(0,s.jsx)(n,{chatProps:o,isZoomed:!0,...r}),(0,s.jsx)("div",{id:"extension"})]}),(0,s.jsx)("div",{className:"memori--grid-column memori--grid-column--zoomed-full-body memori--grid-column-right",children:f&&m&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null}),(0,s.jsx)("div",{className:"memori--powered-by-custom",children:y})]})]})]}));const gH=(e,t=!0,n=!1,r,i=!1,o=!1)=>{const s=new CustomEvent("MemoriTextEntered",{detail:{text:e,waitForPrevious:t,hidden:n,typingText:r,useLoaderTextAsMsg:i,hasBatchQueued:o}});document.dispatchEvent(s);window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak"))}),300)};let vH,yH,bH,SH,xH,_H;window.getMemoriState=e=>{var t,n,r,i,o;let s=e?document.querySelector(`.memori-widget[data-memori-integration="${e}"]`)||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector(".memori-widget[data-memori-integration]")):document.querySelector(".memori-widget")||(null===(i=null===(r=document.querySelector("memori-client"))||void 0===r?void 0:r.shadowRoot)||void 0===i?void 0:i.querySelector(".memori-widget"));if(!s)return null;let a=null===(o=s.dataset)||void 0===o?void 0:o.memoriEngineState;return a?JSON.parse(a):null},window.typeMessage=gH,window.typeMessageHidden=(e,t=!0,n,r=!1,i=!1)=>gH(e,t,!0,n,r,i),window.typeBatchMessages=e=>{function t(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.setAttribute("disabled","");const i="opacity: 0.5; touch-action: none; pointer-events: none;";null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.setAttribute("style",i),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.setAttribute("style",i),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.setAttribute("style",i)}function n(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.removeAttribute("disabled"),null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.removeAttribute("style"),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.removeAttribute("style"),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.removeAttribute("style")}function r(){var e;return!!(null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e?void 0:e.hasAttribute("disabled"))}const i=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent),o=function*(){yield*e}();t();const s=()=>{const e=o.next(),a=e.value;if(a){r()||t();let o=a.waitForPrevious;i&&(o=!1),gH(a.message,o,a.hidden,a.typingText,a.useLoaderTextAsMsg,!e.done),i&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak")),n()}),3e3)}else r()&&n();if(e.done)return document.removeEventListener("MemoriEndSpeak",s),void(r()&&n())};document.addEventListener("MemoriEndSpeak",s),s()};let wH,CH=!1,AH=!1;var EH=({memori:e,memoriConfigs:n,ownerUserID:r,ownerUserName:i,tenantID:o,memoriLang:a,multilingual:l,integration:u,layout:d="DEFAULT",customLayout:h,showInstruct:p=!1,showShare:f,preview:m=!1,embed:g=!1,showCopyButton:v=!0,showTranslationOriginal:y=!1,showInputs:b=!0,showDates:S=!1,showContextPerLine:x=!1,showSettings:_=!0,showTypingText:w=!1,showClear:C=!1,showLogin:A=!1,showOnlyLastMessages:E,height:T="100vh",secret:I,baseUrl:M="https://aisuru.com",apiUrl:R="https://backend.memori.ai",initialContextVars:P,initialQuestion:N,ogImage:O,sessionID:k,tenant:L,personification:D,authToken:B,AZURE_COGNITIVE_SERVICES_TTS_KEY:z,enableAudio:F,defaultSpeakerActive:U=!0,disableTextEnteredEvents:j=!1,onStateChange:H,additionalInfo:G,additionalSettings:V,customMediaRenderer:W,userAvatar:q})=>{var K,J,Y,X,Z,$,ee,te,ne,re,ie,oe,se,ae,le,ce,ue,de,he,pe,fe,me,ge,ve,ye,be;const{t:Se,i18n:xe}=_e(),[we,Ce]=(0,c.useState)(!1);(0,c.useEffect)((()=>{Ce(!0)}),[]);const Ae=Q(R),{initSession:Ee,postTextEnteredEvent:Te,postPlaceChangedEvent:Ie,postDateChangedEvent:Me,postTimeoutEvent:Re,postTagChangedEvent:Pe,getSession:Ne,getExpertReferences:Oe}=Ae,[ke,Le]=(0,c.useState)(!1),[De,Be]=(0,c.useState)(null!==(K=null==G?void 0:G.loginToken)&&void 0!==K?K:B),[ze,Fe]=(0,c.useState)({avatarURL:"string"==typeof q?q:void 0});(0,c.useEffect)((()=>{De&&!(null==ze?void 0:ze.userID)&&A&&Ae.backend.getCurrentUser(De).then((({user:e,resultCode:t})=>{e&&0===t?(Fe(e),Yj("loginToken",De)):Xj("loginToken")}))}),[De,null==ze?void 0:ze.userID]);const[Ue,je]=(0,c.useState)(!1),[He,Ge]=(0,c.useState)(!1),[Ve,We]=(0,c.useState)(!1),qe=(null===(X=null===(Y=null===(J=e.culture)||void 0===J?void 0:J.split("-"))||void 0===Y?void 0:Y[0])||void 0===X?void 0:X.toUpperCase())||(null===(te=null===(ee=null===($=null===(Z=null==n?void 0:n.find((t=>t.memoriConfigID===e.memoriConfigurationID)))||void 0===Z?void 0:Z.culture)||void 0===$?void 0:$.split("-"))||void 0===ee?void 0:ee[0])||void 0===te?void 0:te.toUpperCase()),Ke=(null==u?void 0:u.customData)?JSON.parse(u.customData):null,Je=void 0!==l?l:!!(null==Ke?void 0:Ke.multilanguage),Ye=null==Ke?void 0:Ke.forcedTimeout,[Xe,Qe]=(0,c.useState)(null!==(oe=null!==(ie=null!==(re=null!==(ne=null!=a?a:null==Ke?void 0:Ke.lang)&&void 0!==ne?ne:qe)&&void 0!==re?re:null==Ke?void 0:Ke.uiLang)&&void 0!==ie?ie:xe.language)&&void 0!==oe?oe:"IT");(0,c.useEffect)((()=>{Je&&Xe&&nO.includes(Xe.toLowerCase())&&xe.changeLanguage(Xe.toLowerCase())}),[Xe]);const[Ze,$e]=(0,c.useState)(!1),[et,tt]=(0,c.useState)(!1),[nt,rt]=(0,c.useState)(),it=d||(null==Ke?void 0:Ke.layout)||"DEFAULT",ot=null!==(se=null!=F?F:null==Ke?void 0:Ke.enableAudio)&&void 0!==se&&se,[st,at]=(0,c.useState)(!1),[lt,ct]=(0,c.useState)(!1),[ut,dt]=(0,c.useState)(!1),[ht,pt]=(0,c.useState)(!1),[ft,mt]=(0,c.useState)(!1),[gt,vt]=(0,c.useState)(!1),[yt,bt]=(0,c.useState)(!ot||!U),[St,xt]=(0,c.useState)(!1),[_t,wt]=(0,c.useState)(2),[Ct,At]=(0,c.useState)(!1),[Et,Tt]=(0,c.useState)("center"),[It,Mt]=(0,c.useState)(!1),{startProcessing:Rt,setAudioContext:Pt,addViseme:Nt,stopProcessing:Ot,resetVisemeQueue:kt}=eU();(0,c.useEffect)((()=>{At(!!bH),AH=!!bH}),[bH]),(0,c.useEffect)((()=>{let e="bottom",t=Jj("microphoneMode","HOLD_TO_TALK");window.innerWidth<=768?(e="bottom",t="HOLD_TO_TALK"):e=window.matchMedia("(orientation: portrait)").matches||window.innerHeight>window.innerWidth?"center":"bottom",bt(Jj("muteSpeaker",!ot||!U)),CH=Jj("muteSpeaker",!ot||!U),xt("CONTINUOUS"===t),wt(Jj("continuousSpeechTimeout",2)),Tt(Jj("controlsPosition",e)),Mt(Jj("hideEmissions",!1)),(null==G?void 0:G.loginToken)||B||(Be(Jj("loginToken",void 0)),wH=Jj("loginToken",void 0))}),[]);const[Lt,Dt]=(0,c.useState)(I),[Bt,zt]=(0,c.useState)(),[Ft,Ut]=(0,c.useState)(null),[jt,Ht]=(0,c.useState)(),Gt=async(e,t)=>{var n;const r=null!=t?t:on;if(e&&r){const{currentState:t,...i}=await Ie({sessionId:r,placeName:e.placeName,latitude:e.latitude,longitude:e.longitude,uncertaintyKm:null!==(n=e.uncertainty)&&void 0!==n?n:0});t&&0===i.resultCode&&ln((e=>{var n;return{...e,...t,hints:(null===(n=t.hints)||void 0===n?void 0:n.length)?t.hints:null==e?void 0:e.hints}}))}};(0,c.useEffect)((()=>{const e=Jj("position",void 0);e&&Ht(e)}),[]);const[Vt,Wt]=(0,c.useState)(""),[qt,Kt]=(0,c.useState)(!1),[Jt,Yt]=(0,c.useState)([]),Xt=e=>{Yt((t=>{var n,r;return[...t,{...e,media:null!==(r=null===(n=e.media)||void 0===n?void 0:n.filter((e=>{var t;return!("text/javascript"===e.mimeType&&(null===(t=e.properties)||void 0===t?void 0:t.executable))})))&&void 0!==r?r:[]}]}))},Qt=async(n,r,i,o=!0,s,a=!1,l,c=!1,u=!1)=>{var d,h,p,f;const m=i||on||(null===(d=window.getMemoriState())||void 0===d?void 0:d.sessionID);if(!m||!(null==n?void 0:n.length))return;a||Xt({text:n,translatedText:s,fromUser:!0,media:null!=r?r:[],initial:on?!!i&&i!==on:!!i}),tt(!0),rt(l);let g=n,v=!1;try{if(!a&&o&&!ke&&Je&&Xe.toUpperCase()!==qe.toUpperCase()){g=(await wL(n,qe,Xe,M)).text}const{currentState:i,...s}=await Te({sessionId:m,text:g});if(0===s.resultCode&&i){const n=c&&l?l:null!==(h=i.emission)&&void 0!==h?h:null==an?void 0:an.emission;if("X4"===i.state&&e.giverTag){const{currentState:r,...i}=await Pe(m,e.giverTag);0===i.resultCode?(cn(r),n&&(Xt({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),Tn(n))):(console.error(s,i),t(Yu).error(Se(eO(i.resultCode))),v=!0)}else if("X2d"===i.state&&e.giverTag){const{currentState:r,...i}=await Te({sessionId:m,text:Math.random().toString().substring(2,8)});if(0===i.resultCode){const{currentState:r,...i}=await Pe(m,e.giverTag);0===i.resultCode?(cn(r),n&&(Xt({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),Tn(n))):(console.error(s,i),t(Yu).error(Se(eO(i.resultCode))),v=!0)}else console.error(s,i),t(Yu).error(Se(eO(i.resultCode))),v=!0}else Xe.toLowerCase()!==qe.toLowerCase()&&n&&!ke&&Je?Zt(i,Xe,g).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})):(cn({...i,emission:n}),n&&(Xt({text:n,emitter:i.emitter,media:i.media,fromUser:!1,questionAnswered:g,generatedByAI:!!i.completion,contextVars:i.contextVars,date:i.currentDate,placeName:i.currentPlaceName,placeLatitude:i.currentLatitude,placeLongitude:i.currentLongitude,placeUncertaintyKm:i.currentUncertaintyKm,tag:i.currentTag,memoryTags:i.memoryTags}),Tn(n)))}else 404===s.resultCode&&(Yt((e=>[...e.slice(0,e.length-1)])),dn(!1,Lt||e.secretToken,Bt,ke&&e.giverTag?e.giverTag:void 0,ke&&e.giverPIN?e.giverPIN:void 0,{PATHNAME:window.location.pathname,ROUTE:(null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||"",...P||{}},N).then((e=>{console.info("session timeout"),(null==e?void 0:e.sessionID)&&setTimeout((()=>{Qt(n,r,null==e?void 0:e.sessionID)}),500)})))}catch(e){console.error(e),v=!0,rt(void 0),tt(!1)}u||(rt(void 0),tt(!1))},Zt=async(e,t,n)=>{var r,i,o;const s=null!==(r=e.emission)&&void 0!==r?r:null==an?void 0:an.emission;let a={...e},l=null;if(s&&!ke&&qe.toUpperCase()!==t.toUpperCase()&&Je)try{const r=await wL(s,t,qe,M);if(e.hints&&e.hints.length>0){const n=await Promise.all((null!==(i=e.hints)&&void 0!==i?i:[]).map((async e=>{var n;const r=await wL(e,t,qe,M);return{text:null!==(n=null==r?void 0:r.text)&&void 0!==n?n:e,originalText:e}})));a={...e,emission:r.text,translatedHints:n}}else a={...e,emission:s,translatedEmission:r.text,hints:null!==(o=e.hints)&&void 0!==o?o:"G1"===e.state?null==an?void 0:an.hints:[]};r.text.length>0&&(l={text:s,translatedText:r.text,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,generatedByAI:!!e.completion,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags})}catch(t){console.error(t),a={...e,emission:s},l={text:s,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags}}else a={...e,emission:s},s&&(l={text:s,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags});return cn(a),l&&Xt(l),a},$t=void 0!==e.ageRestriction?e.ageRestriction:e.nsfw?18:e.enableCompletions?14:0,[en,tn]=(0,c.useState)(),[nn,rn]=(0,c.useState)(!1),[on,sn]=(0,c.useState)(k),[an,ln]=(0,c.useState)(),cn=e=>{var t;ln(e),H&&H(e);const n=new CustomEvent("MemoriNewDialogState",{detail:e});document.dispatchEvent(n);const r=null===(t=null==e?void 0:e.media)||void 0===t?void 0:t.filter((e=>{var t;return"text/javascript"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)}));null==r||r.forEach((e=>{try{setTimeout((()=>{var t;console.log("snippet",e),new Function(null!==(t=e.content)&&void 0!==t?t:"")(),setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),400)}),1e3)}catch(e){console.warn(e)}}))},un=async n=>{var r,i,o,s,a;let l=Jj("birthDate",void 0);if(en||l||!$t)if("PUBLIC"===e.privacyType||e.secretToken||Lt||Bt){$e(!0);try{if(!e.giverTag&&(null===(r=e.receivedInvitations)||void 0===r?void 0:r.length)){let t=e.receivedInvitations.find((e=>"GIVER"===e.type&&"ACCEPTED"===e.state));t&&(e.giverTag=t.tag,e.giverPIN=t.pin)}let l;try{l=window.location.href}catch(e){console.debug(e)}const c=await Ee({...n,tag:null!==(i=n.tag)&&void 0!==i?i:null==D?void 0:D.tag,pin:null!==(o=n.pin)&&void 0!==o?o:null==D?void 0:D.pin,additionalInfo:{...G||{},loginToken:null!==(a=null!==(s=null!=wH?wH:De)&&void 0!==s?s:null==G?void 0:G.loginToken)&&void 0!==a?a:B,language:_n(Xe),referral:l}});if((null==c?void 0:c.sessionID)&&(null==c?void 0:c.currentState)&&0===c.resultCode)return sn(c.sessionID),jt&&Gt(jt,c.sessionID),$e(!1),{dialogState:c.currentState,sessionID:c.sessionID};(null==c?void 0:c.resultMessage.startsWith("This Memori is aged restricted"))?(console.warn(c),t(Yu).error(Se("underageTwinSession",{age:$t})),We(!0)):403===(null==c?void 0:c.resultCode)?(Dt(void 0),Ut("password")):(console.warn(c),t(Yu).error(Se(eO(null==c?void 0:c.resultCode))),We(!0))}catch(e){console.error(e),new Error("Error fetching session")}}else Ut("password");else rn(!0)},dn=async(n=!1,r,i,o,s,a,l,c)=>{var u,d,h,p,f;$e(!0);try{let m,g=Jj("birthDate",void 0);if(!c&&!g&&$t)return void rn(!0);if(!("PUBLIC"===e.privacyType||r||e.secretToken||Lt||i||Bt))return void Ut("password");try{m=window.location.href}catch(e){console.debug(e)}const{sessionID:v,currentState:y,...b}=await Ee({memoriID:null!==(u=e.engineMemoriID)&&void 0!==u?u:"",password:r||Lt||e.secretToken,recoveryTokens:i||Bt,tag:o,pin:s,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(h=null===(d=window.location.pathname)||void 0===d?void 0:d.split("/"))||void 0===h?void 0:h.pop())||"",...a||{}},initialQuestion:l,birthDate:c||g||void 0,additionalInfo:{...G||{},loginToken:null!==(f=null!==(p=null!=wH?wH:De)&&void 0!==p?p:null==G?void 0:G.loginToken)&&void 0!==f?f:B,language:_n(Xe),referral:m}});if(v&&y&&0===b.resultCode)return sn(v),n&&(cn(y),y.emission&&(Jt.length<=1?Yt([{text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}]):Xt({text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}))),jt&&Gt(jt,v),e.needsDateTime&&pn({sessionID:v,state:y}),$e(!1),{dialogState:y,sessionID:v};(null==b?void 0:b.resultMessage.startsWith("This Memori is aged restricted"))?(console.error(b),t(Yu).error(Se("underageTwinSession",{age:$t})),We(!0)):403===(null==b?void 0:b.resultCode)?(Dt(void 0),Ut("password")):(console.error(b),t(Yu).error(Se(eO(b.resultCode))),We(!0))}catch(e){console.error(e)}return $e(!1),null},hn=async(t,n,r,i)=>{var o,s,a,l,c;if(!t||!n)return console.error("CHANGETAG/Session not found"),Promise.reject("Session not found");try{const{currentState:t,resultCode:u}=await Pe(n,null!=r?r:rO);if(0===u){let d=0;if(r!==rO&&i&&("X1a"===t.state||"X1b"===t.state)){const{resultCode:e}=await Te({sessionId:n,text:null!=i?i:""});d=e}if(0===d){const{currentState:e,...t}=await Ne(n);if(0===t.resultCode&&e)return{currentState:e,sessionId:n,...t}}else if([400,401,403,404,500].includes(u)){console.warn("[APPCONTEXT/CHANGETAG]",u);let t,n=Jj("birthDate",void 0);try{t=window.location.href}catch(e){console.debug(e)}un({memoriID:null!==(o=e.engineMemoriID)&&void 0!==o?o:"",password:I||Lt||e.secretToken,tag:e.giverTag,pin:e.giverPIN,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(a=null===(s=window.location.pathname)||void 0===s?void 0:s.split("/"))||void 0===a?void 0:a.pop())||"",...P||{}},initialQuestion:N,birthDate:en||n||void 0,additionalInfo:{...G||{},loginToken:null!==(c=null!==(l=null!=wH?wH:De)&&void 0!==l?l:null==G?void 0:G.loginToken)&&void 0!==c?c:B,language:_n(Xe),referral:t}})}else if(t)return{currentState:t,sessionId:n,resultCode:u}}}catch(e){let t=e;return console.warn("[APPCONTEXT/CHANGETAG]",t),Promise.reject(t)}return null};(0,c.useEffect)((()=>()=>{an&&(null==an?void 0:an.currentTag)===e.giverTag||(async()=>{on&&e.giverTag&&e.giverPIN&&(Yt([]),await hn(e.engineMemoriID,on,e.giverTag,e.giverPIN))})()}),[]);const pn=(0,c.useCallback)((async({sessionID:t,date:n,state:r})=>{var i;const o=null!=t?t:on,s=null!=r?r:an;if(!o||!e.needsDateTime||(null===(i=null==s?void 0:s.hints)||void 0===i?void 0:i.length))return;const a=(n?Cs.DateTime.fromISO(n):Cs.DateTime.now()).toUTC().toFormat("yyyy/MM/dd HH:mm:ss ZZ").split(":").slice(0,-1).join(":"),{currentState:l,...c}=await Me(o,a);0===c.resultCode&&l&&ln((e=>{var t;return{...e,...l,hints:(null===(t=l.hints)||void 0===t?void 0:t.length)?l.hints:null==e?void 0:e.hints}}))}),[an,e.needsDateTime,on]);(0,c.useEffect)((()=>{if(on&&e.needsDateTime){pn({sessionID:on,state:an});let e=setInterval((()=>{pn({sessionID:on})}),6e4);return()=>{clearInterval(e)}}}),[e.needsDateTime,on]);const[fn,mn]=(0,c.useState)(),gn=(0,c.useRef)(),vn=()=>{fn&&(clearTimeout(fn),mn(void 0)),(null==gn?void 0:gn.current)&&(clearTimeout(gn.current),gn.current=void 0)},yn=()=>{vn(),Ct||Vt.length||et||qt||Sn()},bn=async()=>{var e;if(!st||Ct||Vt.length||et||qt)yn();else if(on&&st&&(null==an?void 0:an.acceptsTimeout)){const{currentState:t,...n}=await Re(on);if(0===n.resultCode&&t){const n=t.emission;if(!ke&&Je&&Xe!==(null==xe?void 0:xe.language)&&n&&n.length>0)Zt({...t,emission:n},Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)}));else{if(!(n&&n.length>0))return void yn();Xt({text:n,emitter:t.emitter,media:t.media,fromUser:!1,generatedByAI:!!t.completion,contextVars:t.contextVars,date:t.currentDate,placeName:t.currentPlaceName,placeLatitude:t.currentLatitude,placeLongitude:t.currentLongitude,placeUncertaintyKm:t.currentUncertaintyKm,tag:t.currentTag,memoryTags:t.memoryTags}),Tn(n),cn({...t,hints:null!==(e=t.hints)&&void 0!==e?e:"G1"===t.state?null==an?void 0:an.hints:[]})}}}},Sn=()=>{let e=null==an?void 0:an.timeout;if(!e){let t=40,n=25;if(e=Math.floor(Math.random()*(t-n))+n,null==an?void 0:an.emission){e+=an.emission.length/26.5}}if(Ye&&(e=Ye,null==an?void 0:an.emission)){e+=an.emission.length/26.5}let t=setTimeout(bn,1e3*e);mn(t),gn.current=t};(0,c.useEffect)((()=>{(Vt.length||Ct||et)&&vn(),on&&!Vt.length&&yn()}),[null==an?void 0:an.acceptsTimeout,null==an?void 0:an.timeout,null==an?void 0:an.state,Ct,on,Jt,Vt,et,st]),(0,c.useEffect)((()=>()=>{at(!1),Ge(!1),vn(),gn.current=void 0}),[]);const xn=(0,c.useCallback)((t=>{var n,r,i,o;let s="",a=(null!==(o=null!==(i=null!=t?t:null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])&&void 0!==i?i:xe.language)&&void 0!==o?o:"IT").toUpperCase(),l=e.voiceType;if(e.enableBoardOfExperts&&(null==an?void 0:an.emitter)){null==or||or.find((e=>e.name===(null==an?void 0:an.emitter)))}switch(a){case"IT":s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-ElsaNeural");break;case"DE":s=""+("MALE"===l?"de-DE-ConradNeural":"de-DE-KatjaNeural");break;case"EN":s=""+("MALE"===l?"en-GB-RyanNeural":"en-GB-SoniaNeural");break;case"ES":s=""+("MALE"===l?"es-ES-AlvaroNeural":"es-ES-ElviraNeural");break;case"FR":s=""+("MALE"===l?"fr-FR-HenriNeural":"fr-FR-DeniseNeural");break;case"PT":s=""+("MALE"===l?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural");break;case"UK":s=""+("MALE"===l?"uk-UA-OstapNeural":"uk-UA-PolinaNeural");break;case"RU":s=""+("MALE"===l?"ru-RU-DmitryNeural":"ru-RU-SvetlanaNeural");break;case"PL":s=""+("MALE"===l?"pl-PL-MarekNeural":"pl-PL-AgnieszkaNeural");break;case"FI":s=""+("MALE"===l?"fi-FI-HarriNeural":"fi-FI-SelmaNeural");break;case"EL":s=""+("MALE"===l?"el-GR-NestorasNeural":"el-GR-AthinaNeural");break;case"AR":s=""+("MALE"===l?"ar-SA-HamedNeural":"ar-SA-ZariyahNeural");break;case"ZH":s=""+("MALE"===l?"zh-CN-YunxiNeural":"zh-CN-XiaoxiaoNeural");break;case"JA":s=""+("MALE"===l?"ja-JP-KeitaNeural":"ja-JP-NanamiNeural");break;default:s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-IsabellaNeural")}return s}),[e.voiceType,e.enableBoardOfExperts,null==an?void 0:an.emitter,xe.language,e.culture]),_n=t=>{var n,r;let i="";switch((t||(null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])||xe.language||"IT").toUpperCase()){case"IT":default:i="it-IT";break;case"DE":i="de-DE";break;case"EN":i="en-GB";break;case"ES":i="es-ES";break;case"FR":i="fr-FR";break;case"PT":i="pt-PT";break;case"UK":i="uk-UK";break;case"RU":i="ru-RU";break;case"PL":i="pl-PL";break;case"FI":i="fi-FI";break;case"EL":i="el-GR";break;case"AR":i="ar-SA";break;case"ZH":i="zh-CN";break;case"JA":i="ja-JP"}return i},[wn,Cn]=(0,c.useState)();(0,c.useEffect)((()=>{(async()=>{try{const e=await fetch(`${M||"https://aisuru.com"}/api/lexiconmap`);return await e.json()}catch(e){console.error(e)}})().then((e=>{Cn(e)}))}),[]);const An=(e,t)=>{var n;if(!wn)return e;const r={...null!==(n=wn.common)&&void 0!==n?n:{},...(null==L?void 0:L.id)&&wn[L.id]?wn[L.id]:{}},i=Object.keys(r).map((e=>{var n;return{word:e,phoneme:null!==(n=r[e][t.toLowerCase()])&&void 0!==n?n:r[e].default,caseSensitive:r[e].caseSensitive}}));return i.reduce(((e,{word:t,phoneme:n,caseSensitive:r})=>e.replace(new RegExp(`\\b${t}\\b`,r?"g":"gi"),`<phoneme alphabet="ipa" ph="${n}">${t}</phoneme>`)),e)},En=()=>{const e=new CustomEvent("MemoriEndSpeak");document.dispatchEvent(e)},Tn=e=>{if(!z||m)return void En();if(Fn(),m)return;if(yt||CH)return AH=!1,tt(!1),En(),void(St&&Dn());SH&&SH.pause();let t=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"),n=/iPad|iPhone|iPod/.test(navigator.userAgent);if("interrupted"===xH.state)return void xH.resume().then((()=>Tn(e)));if("closed"===xH.state){xH=new Xo;let e=xH.createBuffer(1,1e4,22050),t=xH.createBufferSource();t.buffer=e,t.connect(xH.destination)}else if("suspended"===xH.state){Rn(),xH=new Xo;let e=xH.createBuffer(1,1e4,22050),t=xH.createBufferSource();t.buffer=e,t.connect(xH.destination)}if(!bH){n||(SH=new Ss.SpeakerAudioDestination);let e=Ss.AudioConfig.fromSpeakerOutput(SH);bH=new Ss.SpeechSynthesizer(yH,e)}const r=xH.createBufferSource();r.addEventListener("ended",(()=>{At(!1),AH=!1})),SH.onAudioEnd=()=>{At(!1),AH=!1,r.disconnect(),En(),Vn()},kt(),bH.visemeReceived=function(e,t){Nt(t.visemeId,t.audioOffset)};const i=cR(sR(oR(lR(aR(e)))));bH.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${_n(Xe)}"><voice name="${xn(Xe)}"><s>${An(i,Xe.toLowerCase())}</s></voice></speak>`,(i=>{if(i){At(!0),AH=!0,Rt(xH);try{xH.decodeAudioData(i.audioData,(function(e){r.buffer=e,r.connect(xH.destination),(Jt.length<1||t&&n)&&r.start(0)})),xH.onstatechange=()=>{"suspended"===xH.state||"closed"===xH.state?(r.disconnect(),At(!1),Ot(),kt(),AH=!1):"interrupted"===xH.state&&xH.resume()},xH.resume(),bH&&(bH.close(),bH=null)}catch(t){console.error("Error processing audio data:",t),In(e)}}else In(e)}),(t=>{console.error("Speak error:",t),In(e)})),tt(!1)},In=e=>{console.log("Falling back to browser speech synthesis"),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),Mn()},Mn=()=>{At(!1),Ot(),kt(),AH=!1,bH&&(console.log("Closing speech synthesizer"),bH.close(),bH=null),En()},Rn=()=>{At(!1),AH=!1;try{bH&&(bH.close(),bH=null),"closed"!==xH.state&&xH.close(),SH&&(SH.pause(),SH.close())}catch(e){console.debug("stopAudio error: ",e)}};(0,c.useEffect)((()=>{let e=document.querySelector("#chat-fieldset textarea");e&&e.focus()}),[null==an?void 0:an.emission]);const[Pn,Nn]=(0,c.useState)(""),On=()=>Nn(""),[kn,Ln]=(0,c.useState)(null),Dn=()=>{let e=setTimeout((async()=>{Un();const e=iR(Pn);e.length>0&&qt?(Qt(e),On(),Wt("")):qt&&yn()}),1e3*_t);Ln(e)},Bn=()=>{kn&&(clearTimeout(kn),Ln(null))};(0,c.useEffect)((()=>{Bn(),St&&Dn(),yn()}),[Pn]);const zn=()=>{if(z){Un(),Nn(""),On();try{navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){ct(!0),yH||(yH=Ss.SpeechConfig.fromSubscription(z,"westeurope"),yH.speechRecognitionLanguage=_n(Xe),yH.speechSynthesisLanguage=_n(Xe),yH.speechSynthesisVoiceName=xn(Xe));const t=Ss.AudioConfig.fromDefaultMicrophoneInput();vH=new Ss.SpeechRecognizer(yH,t),Kt(!0),vH.recognized=(e,t)=>{if(t.result.text)if(t.result.reason===Ss.ResultReason.RecognizedSpeech){let e=t.result.text;if(Nn(e||""),(null==e?void 0:e.length)>0){const t=iR(e);t.length>0&&Wt((e=>`${e} ${t}`))}}else t.result.reason===Ss.ResultReason.NoMatch&&console.debug("NOMATCH: Speech could not be recognized.")},vH.canceled=(e,t)=>{t.reason===Ss.CancellationReason.Error&&(console.debug(`"CANCELED: ErrorCode=${t.errorCode}`),console.debug(`"CANCELED: ErrorDetails=${t.errorDetails}`),console.debug("CANCELED: Did you set the speech resource key and region values?")),Fn()},vH.sessionStopped=(e,t)=>{Fn()},On(),vH.startContinuousRecognitionAsync()})).catch(console.debug)}catch(e){console.debug(e)}}},Fn=()=>{vH&&(vH.stopContinuousRecognitionAsync(),vH.close(),vH=null),Kt(!1)},Un=()=>{ct(!1),Fn(),Bn()},jn=()=>{try{Un(),vn(),Ge(!1),gn.current=void 0,Rn()}catch(e){console.log("Error: resetUIEffects",e)}};(0,c.useEffect)((()=>()=>{jn()}),[]),(0,c.useEffect)((()=>(document.addEventListener("MemoriResetUIEffects",jn),()=>{document.removeEventListener("MemoriResetUIEffects",jn)})),[]),(0,c.useEffect)((()=>{"Z0"===(null==an?void 0:an.state)&&Un()}),[null==an?void 0:an.state]);const[Hn,Gn]=(0,c.useState)(!1),Vn=(0,c.useCallback)((e=>{Ct&&bH&&(bH.close(),bH=null),!St||!lt&&Hn||(Gn(!0),zn())}),[St,lt]);(0,c.useEffect)((()=>{Jt.length>1&&!Ct&&St&&(lt||!Hn)?zn():Ct&&qt&&Fn()}),[Ct]),(0,c.useEffect)((()=>{qt&&(Un(),On(),Wt(""),zn())}),[qe]);const[Wn,qn]=(0,c.useState)("keypress");(0,c.useEffect)((()=>{window.innerWidth<=768&&ZM()?qn("click"):qn("keypress")}),[]);const[Kn,Jn]=(0,c.useState)(),Yn=null==Ke?void 0:Ke.globalBackground,Xn=Yn?`url(${Yn})`:null,Qn=u?{"--memori-chat-bubble-bg":"#fff",...Ke&&!p?{"--memori-text-color":null!==(ae=Ke.textColor)&&void 0!==ae?ae:"#000"}:{},...(null==Ke?void 0:Ke.buttonBgColor)?{"--memori-button-bg":Ke.buttonBgColor,"--memori-primary":Ke.buttonBgColor}:{},...(null==Ke?void 0:Ke.buttonTextColor)?{"--memori-button-text":Ke.buttonTextColor}:{},...(null==Ke?void 0:Ke.blurBackground)?{"--memori-blur-background":"5px"}:{"--memori-blur-background":"0px"},...(null==Ke?void 0:Ke.innerBgColor)?{"--memori-inner-bg":`rgba(${"dark"===Ke.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(le=Ke.innerBgAlpha)&&void 0!==le?le:.4})`,"--memori-inner-content-pad":"1.5rem","--memori-nav-bg-image":"none","--memori-nav-bg":`rgba(${"dark"===Ke.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(ce=null==Ke?void 0:Ke.innerBgAlpha)&&void 0!==ce?ce:.4})`}:{"--memori-inner-content-pad":"0px"}}:{},Zn=`\n ${m?"#preview,":"WEBSITE_ASSISTANT"===it?"":":root,"} .memori-widget, .memori-drawer, .memori-modal {\n ${Object.entries(Qn).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `,$n=void 0===(null==Ke?void 0:Ke.showAIicon)||(null==Ke?void 0:Ke.showAIicon),er=void 0===(null==Ke?void 0:Ke.showWhyThisAnswer)||(null==Ke?void 0:Ke.showWhyThisAnswer),[tr,nr]=(0,c.useState)(!1);(0,c.useEffect)((()=>{(window.innerWidth>=768&&"FULLPAGE"===it||"FULLPAGE"!==it)&&nr(!0)}),[]),(0,c.useEffect)((()=>{if(null==Ke?void 0:Ke.seoTitle){let e=document.createElement("meta");e.setAttribute("property","og:title"),e.setAttribute("content",Ke.seoTitle),document.head.append(e)}if(null==Ke?void 0:Ke.seoDescription){let e=document.createElement("meta");e.setAttribute("property","og:description"),e.setAttribute("content",Ke.seoDescription),document.head.append(e)}if(null==Ke?void 0:Ke.seoUrl){let e=document.createElement("meta");e.setAttribute("property","og:url"),e.setAttribute("content",Ke.seoUrl),document.head.append(e)}let t=O||e.avatarURL;if((null==Ke?void 0:Ke.seoImageShowAvatar)&&t){let e=document.createElement("meta");e.setAttribute("property","og:image"),e.setAttribute("content",t),document.head.append(e)}}),[Ke,e.avatarURL,O]);const rr=(0,c.useCallback)((e=>{if(j)return;const{text:t,waitForPrevious:n,hidden:r,typingText:i,useLoaderTextAsMsg:o,hasBatchQueued:s}=e.detail;t&&(n&&!CH&&(AH||et)?setTimeout((()=>{rr(e)}),1e3):(Fn(),Rn(),Qt(t,void 0,void 0,void 0,void 0,r,i,o,s)))}),[on,Ct,et,Xe,j]);(0,c.useEffect)((()=>(j?document.removeEventListener("MemoriTextEntered",rr):document.addEventListener("MemoriTextEntered",rr),()=>{document.removeEventListener("MemoriTextEntered",rr)})),[on,Xe,j]);const ir=(0,c.useCallback)((async t=>{var n,r,i,o,s,a,l,c,u,d,h,p,f,m,g,v,y,b;const S=(null==t?void 0:t.sessionID)||on,x=(null==t?void 0:t.dialogState)||an;Ge(!0);let _=document.getElementById("memori-audio"),w=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome");_&&w&&(_.muted=!1,_.play().catch((e=>{console.warn("error playing intro audio",e)})));let C=Jj("birthDate",void 0),A=en||C||void 0;if(S||!$t||A){if(!S&&"PUBLIC"!==e.privacyType&&!e.secretToken&&!Lt&&!Bt||!S&&Ve)return Ut("password"),void Ge(!1);if(!S){Ge(!1),We(!1);const t=await un({memoriID:e.engineMemoriID,password:I||Lt||e.secretToken,tag:null==D?void 0:D.tag,pin:null==D?void 0:D.pin,initialContextVars:{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...P||{}},initialQuestion:N,birthDate:A,additionalInfo:{...G||{},loginToken:null!==(a=null!==(s=null!=wH?wH:De)&&void 0!==s?s:null==G?void 0:G.loginToken)&&void 0!==a?a:B,language:_n(Xe)}});return void((null==t?void 0:t.dialogState)?(Yt([]),Zt(t.dialogState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))):await ir(t||void 0))}if(k){const{currentState:t,...n}=await Ne(S);if(0!==n.resultCode||!t)return console.debug("session expired, opening new session"),We(!0),sn(void 0),Ge(!1),void await ir();if(Yt([]),jt&&Gt(jt,S),e.needsDateTime&&pn({sessionID:S,state:t}),ke&&e.giverTag&&(null==an?void 0:an.currentTag)!==e.giverTag)try{console.debug("change tag #0"),await hn(e.engineMemoriID,S,"-");const t=await hn(e.engineMemoriID,S,e.giverTag,e.giverPIN);if(!t||0!==t.resultCode)throw console.error("session #1",t),new Error("No session");Zt(t.currentState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}catch(t){console.error("session #2",t),dn(!0,null==e?void 0:e.secretToken,void 0,null==e?void 0:e.giverTag,null==e?void 0:e.giverPIN,{PATHNAME:null===(l=window.location.pathname)||void 0===l?void 0:l.toUpperCase(),ROUTE:(null===(d=null===(u=null===(c=window.location.pathname)||void 0===c?void 0:c.split("/"))||void 0===u?void 0:u.pop())||void 0===d?void 0:d.toUpperCase())||"",...P||{}},N,A).then((()=>{at(!0)}))}else if(!ke&&D&&(null==an?void 0:an.currentTag)!==D.tag)try{console.debug("change tag #3"),await hn(e.engineMemoriID,S,"-");const t=await hn(e.engineMemoriID,S,D.tag,D.pin);if(!t||0!==t.resultCode)throw console.error("session #4",t),new Error("No session");Zt(t.currentState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}catch(t){console.error("session #5",t),dn(!0,null==e?void 0:e.secretToken,void 0,D.tag,D.pin,{PATHNAME:null===(h=window.location.pathname)||void 0===h?void 0:h.toUpperCase(),ROUTE:(null===(m=null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||void 0===m?void 0:m.toUpperCase())||"",...P||{}},N,A).then((()=>{at(!0)}))}else if(ke||D||(null==an?void 0:an.currentTag)===rO)Zt(t,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}));else try{console.debug("change tag #6"),await hn(e.engineMemoriID,S,"-");const t=await hn(e.engineMemoriID,S,rO);if(!t||0!==t.resultCode)throw console.error("session #7",t),new Error("No session");Zt(t.currentState,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}catch(t){console.error("session #8",t),dn(!0,null==e?void 0:e.secretToken,void 0,void 0,void 0,{PATHNAME:null===(g=window.location.pathname)||void 0===g?void 0:g.toUpperCase(),ROUTE:(null===(b=null===(y=null===(v=window.location.pathname)||void 0===v?void 0:v.split("/"))||void 0===y?void 0:y.pop())||void 0===b?void 0:b.toUpperCase())||"",...P||{}},N,A).then((()=>{at(!0)}))}jt&&Gt(jt,S),e.needsDateTime&&pn({sessionID:S,state:t})}else Yt([]),Zt(x,Xe).then((e=>{let t=e.translatedEmission||e.emission;t&&Tn(t)})).finally((()=>{at(!0)}))}else rn(!0),Ge(!1)}),[Lt,e,Bt,en,on,Xe,jt]);(0,c.useEffect)((()=>{const t=document.querySelector(`memori-client[memoriname="${e.name}"]`)||document.querySelector(`memori-client[memoriid="${e.memoriID}"]`)||document.querySelector("memori-client");if(!t)return;const n=new MutationObserver(((e,t)=>{var n,r,i;for(const t of e)"attributes"===t.type&&"authtoken"===(null===(n=t.attributeName)||void 0===n?void 0:n.toLowerCase())&&("MEMORI-CLIENT"===t.target.nodeName?(Be(t.target.getAttribute("authtoken")||void 0),wH=t.target.getAttribute("authtoken")||void 0):(Be((null===(i=null===(r=t.target)||void 0===r?void 0:r.parentElement)||void 0===i?void 0:i.getAttribute("authtoken"))||void 0),wH=t.target.getAttribute("authtoken")||void 0))}));return n.observe(t,{attributes:!0,childList:!1,subtree:!1}),()=>{n.disconnect()}}),[]);const[or,sr]=(0,c.useState)(),ar=(0,c.useCallback)((async()=>{if(on&&(null==e?void 0:e.enableBoardOfExperts))try{const{experts:e,count:t,...n}=await Oe(on);0===n.resultCode?sr(e):console.warn("Error fetching experts",n)}catch(e){console.warn(e)}}),[on,null==e?void 0:e.enableBoardOfExperts]);(0,c.useEffect)((()=>{ar()}),[on,ar]);const lr=e.enableDeepThought&&!!De&&!!(null==ze?void 0:ze.userID)&&(null==ze?void 0:ze.pAndCUAccepted),cr=null==L?void 0:L.billingDelegation,[ur,dr]=(0,c.useState)(!0),hr=(0,c.useCallback)((async()=>{if(null==L?void 0:L.billingDelegation)try{const e=await pH({operation:lr?"dt_session_creation":"session_creation",baseUrl:M,userID:r,userName:i,tenant:o});e.enough?dr(!0):(dr(!1),console.warn("Not enough credits. Required:",e.required))}catch(e){let t=e;console.debug(t)}}),[null==L?void 0:L.billingDelegation,lr]);(0,c.useEffect)((()=>{(null==L?void 0:L.billingDelegation)&&hr()}),[null==L?void 0:L.billingDelegation,lr]);const pr=void 0===E?"TOTEM"!==d&&"WEBSITE_ASSISTANT"!==d&&"HIDDEN_CHAT"!==d:!E,fr={memori:e,tenant:L,history:Jt,showShare:null===(ue=null!=f?f:null==Ke?void 0:Ke.showShare)||void 0===ue||ue,position:jt,setShowPositionDrawer:dt,setShowSettingsDrawer:pt,setShowKnownFactsDrawer:mt,setShowExpertsDrawer:vt,enableAudio:null===(de=null!=F?F:null==Ke?void 0:Ke.enableAudio)||void 0===de||de,showSpeaker:!!z,speakerMuted:yt||CH,setSpeakerMuted:e=>{if(CH=!!e,bt(e),Yj("muteSpeaker",!!e),e)Rn();else{xH=new Xo;let e=xH.createBuffer(1,1e4,22050),t=xH.createBufferSource();t.buffer=e,t.connect(xH.destination)}},showSettings:_,hasUserActivatedSpeak:st,showReload:"TOTEM"===it,showClear:C,clearHistory:()=>Yt((e=>e.slice(-1))),showLogin:A,setShowLoginDrawer:je,loginToken:De,user:ze,sessionID:on},mr={memori:e,integration:u,integrationConfig:Ke,tenant:L,instruct:ke,avatar3dVisible:tr,setAvatar3dVisible:nr,hasUserActivatedSpeak:st,isPlayingAudio:Ct&&!yt,loading:!!et,baseUrl:M,apiUrl:R},gr={memori:e,tenant:L,language:qe,userLang:Xe,setUserLang:Qe,baseUrl:M,apiUrl:R,position:jt,openPositionDrawer:()=>dt(!0),integrationConfig:Ke,instruct:ke,sessionId:on,clickedStart:He,isMultilanguageEnabled:Je,onClickStart:ir,initializeTTS:()=>{if(!z)return;yH=Ss.SpeechConfig.fromSubscription(z,"westeurope"),yH.speechSynthesisLanguage=_n(Xe),yH.speechSynthesisVoiceName=xn(Xe),yH.speechRecognitionLanguage=_n(Xe),yH.setProperty("speechSynthesis.outputFormat","viseme"),ZM()&&(yH.speechSynthesisOutputFormat=Ss.SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3),xH=new Xo;let e=xH.createBuffer(1,1e4,22050),t=xH.createBufferSource();t.buffer=e,t.connect(xH.destination),SH=new Ss.SpeakerAudioDestination;let n=Ss.AudioConfig.fromSpeakerOutput(SH);bH=new Ss.SpeechSynthesizer(yH,n)},isUserLoggedIn:!!De&&!!(null==ze?void 0:ze.userID),notEnoughCredits:cr&&!ur,showLogin:A,setShowLoginDrawer:je,user:ze},vr={memori:e,sessionID:on||"",tenant:L,translateTo:Je&&Xe.toUpperCase()!==(null===(ge=null!==(me=null!==(fe=null===(pe=null===(he=e.culture)||void 0===he?void 0:he.split("-"))||void 0===pe?void 0:pe[0])&&void 0!==fe?fe:xe.language)&&void 0!==me?me:"IT")||void 0===ge?void 0:ge.toUpperCase())?Xe:void 0,baseUrl:M,apiUrl:R,layout:d,memoriTyping:et,typingText:nt,showTypingText:w,history:pr?Jt:Jt.slice(-2),authToken:null!==(ye=null!==(ve=null!=De?De:wH)&&void 0!==ve?ve:null==G?void 0:G.loginToken)&&void 0!==ye?ye:B,dialogState:an,setDialogState:cn,pushMessage:Xt,simulateUserPrompt:(e,t)=>{Fn(),Rn(),Qt(e,void 0,void 0,!1,t)},showDates:S,showContextPerLine:x,showAIicon:$n,showWhyThisAnswer:er,showCopyButton:v,showTranslationOriginal:y,client:Ae,selectReceiverTag:async n=>{var r;if(on)try{const{currentState:i,...o}=await Pe(on,n);if(0===o.resultCode)if(Xt({text:n,fromUser:!0}),"X4"===i.state&&e.giverTag){const{currentState:n,...r}=await Ae.postTagChangedEvent(on,e.giverTag);0===r.resultCode?(cn(n),n.emission&&Xt({text:n.emission,emitter:n.emitter,media:n.media,fromUser:!1,contextVars:n.contextVars,date:n.currentDate,placeName:n.currentPlaceName,placeLatitude:n.currentLatitude,placeLongitude:n.currentLongitude,placeUncertaintyKm:n.currentUncertaintyKm,tag:n.currentTag,memoryTags:n.memoryTags})):(console.error(r),t(Yu).error(Se(eO(r.resultCode))))}else cn(i),i.emission&&Xt({text:i.emission,emitter:i.emitter,media:i.media,fromUser:!1,contextVars:i.contextVars,date:i.currentDate,placeName:i.currentPlaceName,placeLatitude:i.currentLatitude,placeLongitude:i.currentLongitude,placeUncertaintyKm:i.currentUncertaintyKm,tag:i.currentTag,memoryTags:i.memoryTags});else console.error(o,n,null===(r=null==an?void 0:an.knownTags)||void 0===r?void 0:r[n]),t(Yu).error(Se(eO(o.resultCode)))}catch(e){let n=e;console.error(n),t(Yu).error(n.message)}},preview:m,sendOnEnter:Wn,setSendOnEnter:qn,microphoneMode:St?"CONTINUOUS":"HOLD_TO_TALK",attachmentsMenuOpen:Kn,setAttachmentsMenuOpen:Jn,instruct:ke,showInputs:b,showMicrophone:!!z,userMessage:Vt,onChangeUserMessage:e=>{if(!e||"\n"===e||""===e.trim())return Wt(""),void yn();Wt(e),vn()},sendMessage:e=>{Rn(),Fn(),Qt(e),Wt(""),On()},stopListening:Un,startListening:zn,stopAudio:Rn,resetTranscript:On,listening:qt,isPlayingAudio:Ct,customMediaRenderer:W,user:ze,userAvatar:q,experts:or},yr=u&&Xn?(0,s.jsx)("div",{className:"memori--global-background",children:(0,s.jsx)("div",{className:"memori--global-background-image",style:{backgroundImage:Xn}})}):(0,s.jsx)("div",{className:"memori--global-background no-background-image"}),br=u?(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:Zn}}):null,Sr={canInstruct:!!e.giverTag,instruct:!!ke,onChangeMode:e=>{Le("instruct"===e),at(!1),Ge(!1)}},xr=(0,s.jsx)(_j,{tenant:L,userLang:Xe,integrationID:null==u?void 0:u.integrationID,memoriHash:`${e.ownerTenantName}-${e.ownerUserName}-${e.name}`}),_r=h||("TOTEM"===it?uH:"CHAT"===it?dH:"FULLPAGE"===it?cH:"WEBSITE_ASSISTANT"===it?hH:"HIDDEN_CHAT"===it?fH:"ZOOMED_FULL_BODY"===it?mH:cH);return(0,s.jsxs)("div",{className:t(ws)("memori","memori-widget",`memori-layout-${d.toLowerCase()}`,`memori-controls-${Et.toLowerCase()}`,`memori--avatar-${(null==Ke?void 0:Ke.avatar)||"default"}`,{"memori--preview":m,"memori--embed":g,"memori--with-integration":u,"memori--with-speechkey":!!z,"memori--active":st,"memori--hide-emissions":It,"memori--has-active-session":!!on}),"data-memori-name":null==e?void 0:e.name,"data-memori-id":null==e?void 0:e.engineMemoriID,"data-memori-secondary-id":null==e?void 0:e.memoriID,"data-memori-session-id":on,"data-memori-integration":null==u?void 0:u.integrationID,"data-memori-engine-state":JSON.stringify({...an,sessionID:on}),style:{height:T},children:[(0,s.jsx)(_r,{Header:xj,headerProps:fr,Avatar:tU,avatarProps:mr,Chat:YL,chatProps:vr,StartPanel:nD,startPanelProps:gr,integrationStyle:br,integrationBackground:yr,ChangeMode:vU,changeModeProps:Sr,poweredBy:xr,sessionId:on,hasUserActivatedSpeak:st,showInstruct:p,loading:Ze}),(0,s.jsx)("audio",{id:"memori-audio",style:{display:"none"},src:"https://aisuru.com/intro.mp3"}),we&&(0,s.jsx)(SN,{withModal:!0,pwdOrTokens:Ft,openModal:!!Ft,setPwdOrTokens:Ut,showTokens:"SECRET"===e.privacyType,onFinish:async t=>{var n,r,i,o;t.password&&Dt(t.password),t.password&&(_H=t.password),t.tokens&&zt(t.tokens),dn(!on,t.password,t.tokens,ke?e.giverTag:null==D?void 0:D.tag,ke?e.giverPIN:null==D?void 0:D.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...P||{}},N,en).then((e=>{Ut(null),ir(e||void 0)})).catch((()=>{Ut(null),We(!0)}))},minimumNumberOfRecoveryTokens:null!==(be=null==e?void 0:e.minimumNumberOfRecoveryTokens)&&void 0!==be?be:1}),we&&(0,s.jsx)(Vj,{visible:nn,minAge:$t,onClose:t=>{var n,r,i,o;t?(tn(t),Yj("birthDate",t),dn(!on,_H||Lt||(null==e?void 0:e.secretToken),Bt,ke?e.giverTag:null==D?void 0:D.tag,ke?e.giverPIN:null==D?void 0:D.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...P||{}},N,t).then((e=>{rn(!1),Ut(null),ir(e||void 0)})).catch((()=>{rn(!1),We(!0)}))):(rn(!1),Ge(!1))}}),ht&&(0,s.jsx)(Zj,{layout:it,open:!!ht,onClose:()=>pt(!1),microphoneMode:St?"CONTINUOUS":"HOLD_TO_TALK",continuousSpeechTimeout:_t,setMicrophoneMode:e=>xt("CONTINUOUS"===e),setContinuousSpeechTimeout:wt,controlsPosition:Et,setControlsPosition:Tt,hideEmissions:It,setHideEmissions:Mt,additionalSettings:V}),ut&&(0,s.jsx)(QR,{memori:e,open:!!ut,venue:jt,setVenue:e=>{Ht(e),Gt(e),e?Yj("position",JSON.stringify(e)):Xj("position")},onClose:e=>{e&&Gt(e),dt(!1)}}),ft&&on&&(0,s.jsx)(nH,{apiURL:R,memori:e,sessionID:on,visible:ft,closeDrawer:()=>mt(!1)}),gt&&!!or&&(0,s.jsx)(rH,{apiUrl:R,baseUrl:M,tenant:L,experts:or,open:gt,onClose:()=>vt(!1)}),Ue&&(null==L?void 0:L.id)&&(0,s.jsx)(lH,{tenant:L,apiUrl:R,open:!!Ue,user:ze,loginToken:De,onClose:()=>je(!1),onLogin:(e,t)=>{Fe(e),Be(t),wH=t,je(!1),Yj("loginToken",t)},onLogout:()=>{De&&Ae.backend.userLogout(De).then((()=>{je(!1),Fe(void 0),Be(void 0),wH=void 0,Xj("loginToken")}))}})]})};const TH={id:"aisuru.com",theme:"aisuru",config:{name:"Memori",showNewUser:!1,requirePosition:!1}},IH=async(e,t)=>{const n=t?new URL(`${t.startsWith("http")?"":t.includes("localhost")?"http://":"https://"}${t}`).origin:"https://aisuru.com";try{const t=await fetch(`${n}/api/tenant/${e}`),{tenant:r}=await t.json();return r||{...TH,tenantID:e}}catch(t){return{...TH,tenantID:e}}};function MH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EB(r.key),r)}}function PH(e,t,n){return t&&RH(e.prototype,t),n&&RH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function NH(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OH(e,t){return OH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},OH(e,t)}function kH(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OH(e,t)}function LH(e,t){if(t&&("object"===CB(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return NH(e)}function DH(e){return DH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},DH(e)}function BH(e){if(Array.isArray(e))return e}function zH(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function FH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function UH(e,t){if(e){if("string"==typeof e)return FH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FH(e,t):void 0}}function jH(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function HH(e){return BH(e)||zH(e)||UH(e)||jH()}function GH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GH(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var WH={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},qH=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};MH(this,e),this.init(t,n)}return PH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||WH,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,VH(VH({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),KH=new qH,JH=function(){function e(){MH(this,e),this.observers={}}return PH(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function YH(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function XH(e){return null==e?"":""+e}function QH(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function ZH(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function $H(e,t,n){var r=ZH(e,t,Object);r.obj[r.k]=n}function eG(e,t){var n=ZH(e,t),r=n.obj,i=n.k;if(r)return r[i]}function tG(e,t,n){var r=eG(e,n);return void 0!==r?r:eG(t,n)}function nG(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):nG(e[r],t[r],n):e[r]=t[r]);return e}function rG(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var iG={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function oG(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return iG[e]})):e}var sG="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,aG=[" ",",","?","!",";"];function lG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=DH(e);if(t){var i=DH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LH(this,n)}}function dG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];void 0===l&&r.length>o+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?dG(l,c,n):void 0}i=i[r[o]]}return i}}var hG=function(e){kH(n,e);var t=uG(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return MH(this,n),r=t.call(this),sG&&JH.call(NH(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return PH(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."));var a=eG(this.data,s);return a||!o||"string"!=typeof n?a:dG(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(s=e.split("."))[1]),this.addNamespaces(t),$H(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=eG(this.data,s)||{};r?nG(a,n,i):a=cG(cG({},a),n),$H(this.data,s,a),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?cG(cG({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(JH),pG={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}};function fG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=DH(e);if(t){var i=DH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LH(this,n)}}var vG={},yG=function(e){kH(n,e);var t=gG(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return MH(this,n),r=t.call(this),sG&&JH.call(NH(r)),QH(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,NH(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=KH.create("translator"),r}return PH(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=aG.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,n,r));if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==CB(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?(f.res="".concat(u).concat(p).concat(l),f):"".concat(u).concat(p).concat(l)}return o?(f.res=l,f):l}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||l,v=f&&f.exactUsedKey||l,y=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],S=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(x&&m&&_&&b.indexOf(y)<0&&("string"!=typeof S||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,mG(mG({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=w,f):w}if(s){var C="[object Array]"===y,A=C?[]:{},E=C?v:g;for(var T in m)if(Object.prototype.hasOwnProperty.call(m,T)){var I="".concat(E).concat(s).concat(T);A[T]=this.translate(I,mG(mG({},t),{joinArrays:!1,ns:c})),A[T]===I&&(A[T]=m[T])}m=A}}else if(x&&"string"==typeof S&&"[object Array]"===y)(m=m.join(S))&&(m=this.extendTranslation(m,e,t,r));else{var M=!1,R=!1,P=void 0!==t.count&&"string"!=typeof t.count,N=n.hasDefaultValue(t),O=P?this.pluralResolver.getSuffix(d,t.count,t):"",k=t["defaultValue".concat(O)]||t.defaultValue;!this.isValidLookup(m)&&N&&(M=!0,m=k),this.isValidLookup(m)||(R=!0,m=l);var L=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,D=L&&R?void 0:m,B=N&&k!==m&&this.options.updateMissing;if(R||M||B){if(this.logger.log(B?"updateKey":"missingKey",d,u,l,B?k:m),s){var z=this.resolve(l,mG(mG({},t),{},{keySeparator:!1}));z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&U&&U[0])for(var j=0;j<U.length;j++)F.push(U[j]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var H=function(e,n,r){var o=N&&r!==m?r:D;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,n,o,B,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,n,o,B,t),i.emit("missingKey",e,u,n,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?F.forEach((function(e){i.pluralResolver.getSuffixes(e,t).forEach((function(n){H([e],l+n,t["defaultValue".concat(n)]||k)}))})):H(F,l,k))}m=this.extendTranslation(m,e,t,f,r),R&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(R||M)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,M?m:void 0):this.options.parseMissingKeyHandler(m))}return o?(f.res=m,f):m}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,mG(mG({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(mG(mG({},n),{interpolation:mG(mG({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=e.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=mG(mG({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,h="string"==typeof d?[d]:d;return null!=e&&h&&h.length&&!1!==n.applyPostProcessor&&(e=pG.handle(h,e,t,this.options&&this.options.postProcessPassResolved?mG({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(e){s.isValidLookup(t)||(o=e,!vG["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(vG["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,e,a);else{var u;d&&(u=s.pluralResolver.getSuffix(n,a.count,a));var f="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),h&&l.push(c+f)),p){var m="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(m),d&&(l.push(m+u),h&&l.push(m+f))}}for(;o=l.pop();)s.isValidLookup(t)||(r=o,t=s.getResource(n,e,o,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(JH);function bG(e){return e.charAt(0).toUpperCase()+e.slice(1)}var SG=function(){function e(t){MH(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=KH.create("languageUtils")}return PH(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=bG(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=bG(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=bG(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),xG=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],_G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},wG=["v1","v2","v3"],CG={zero:0,one:1,two:2,few:3,many:4,other:5};function AG(){var e={};return xG.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:_G[t.fc]}}))})),e}var EG=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};MH(this,e),this.languageUtils=t,this.options=n,this.logger=KH.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=AG()}return PH(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return CG[e]-CG[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!wG.includes(this.options.compatibilityJSON)}}]),e}();function TG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function IG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var MG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};MH(this,e),this.logger=KH.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return PH(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:oG,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?rG(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?rG(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?rG(t.nestingPrefix):t.nestingPrefixEscaped||rG("$t("),this.nestingSuffix=t.nestingSuffix?rG(t.nestingSuffix):t.nestingSuffixEscaped||rG(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0){var i=tG(t,l,e);return a.alwaysFormat?a.format(i,void 0,n,IG(IG(IG({},r),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(tG(t,l,s),c,n,IG(IG(IG({},r),t),{},{interpolationkey:s}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?c(a.escape(e)):c(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof d){var l=d(e,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(h){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=XH(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),h?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=IG({},o);function a(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=IG(IG({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(a.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=XH(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return i.format(e,t,o.lng,IG(IG({},o),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function RG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function PG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function NG(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),s=t[o];return s||(s=e(r,i),t[o]=s),s(n)}}var OG=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};MH(this,e),this.logger=KH.create("formatter"),this.options=t,this.formats={number:NG((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:NG((function(e,t){var n=new Intl.NumberFormat(e,PG(PG({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:NG((function(e,t){var n=new Intl.DateTimeFormat(e,PG({},t));return function(e){return n.format(e)}})),relativetime:NG((function(e,t){var n=new Intl.RelativeTimeFormat(e,PG({},t));return function(e){return n.format(e,t.range||"day")}})),list:NG((function(e,t){var n=new Intl.ListFormat(e,PG({},t));return function(e){return n.format(e)}}))},this.init(t)}return PH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=NG(t)}},{key:"format",value:function(e,t,n,r){var i=this,o=t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=HH(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}}(t),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[s](e,u,PG(PG(PG({},a),r),c))}catch(e){i.logger.warn(e)}return l}return i.logger.warn("there was no format function for ".concat(s)),e}),e);return o}}]),e}();function kG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function LG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function DG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=DH(e);if(t){var i=DH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LH(this,n)}}var BG=function(e){kH(n,e);var t=DG(n);function n(e,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return MH(this,n),o=t.call(this),sG&&JH.call(NH(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=KH.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return PH(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},s={},a={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,a,l,c,u,d;r=n.loaded,a=o,c=ZH(r,[i],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(a)),l||u[d].push(a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](e,t,(function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,s)}),o):s(a,l)}))):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,r,s)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,LG(LG({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(JH);function zG(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===CB(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===CB(e[2])||"object"===CB(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function FG(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function UG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UG(Object(n),!0).forEach((function(t){TB(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function HG(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=DH(e);if(t){var i=DH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return LH(this,n)}}function GG(){}function VG(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var WG=function(e){kH(n,e);var t=HG(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(MH(this,n),e=t.call(this),sG&&JH.call(NH(e)),e.options=FG(r),e.services={},e.logger=KH,e.modules={external:[]},VG(NH(e)),i&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,i),LH(e,NH(e));setTimeout((function(){e.init(r,i)}),0)}return e}return PH(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=zG();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=jG(jG(jG({},r),this.options),FG(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=jG(jG({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?KH.init(i(this.modules.logger),this.options):KH.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=OG);var s=new SG(this.options);this.store=new hG(this.options.resources,this.options);var a=this.services;a.logger=KH,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new EG(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new MG(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new BG(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new yG(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=GG),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=YH(),h=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:GG,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=YH();return e||(e=this.languages),t||(t=this.options.ns),n||(n=GG),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&pG.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=YH();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==CB(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([t,i].concat(a))}else o=jG({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(t):t;return r.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=YH();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=YH();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:GG,i=jG(jG(jG({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));var s=["store","services","language"];return s.forEach((function(t){o[t]=e[t]})),o.services=jG({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new yG(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(JH);TB(WG,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new WG(e,t)}));var qG=WG.createInstance();qG.createInstance=WG.createInstance;var KG,JG=qG.createInstance;qG.init,qG.loadResources,qG.reloadResources,qG.use,qG.changeLanguage,qG.getFixedT,qG.t,qG.exists,qG.setDefaultNamespace,qG.hasLoadedNamespace,qG.loadNamespaces,qG.loadLanguages;KG=JSON.parse('{"yes":"Si","no":"No","confirm":"Conferma","apply":"Applica","cancel":"Annulla","show":"Mostra","hide":"Nascondi","send":"Invia","close":"Chiudi","edit":"Modifica","delete":"Elimina","loading":"Caricamento","expand":"Espandi","collapse":"Riduci","fullscreenEnter":"Passa a schermo intero","fullscreenExit":"Esci da schermo intero","center":"Centro","bottom":"In basso","hidden":"Nascosto","day":"Giorno","month":"Mese","year":"Anno","createdAt":"Data creazione","selected":"Selezionati","page":"pagina","actions":"Azioni","next":"Successivo","previous":"Precedente","copy":"Copia","copyRawCode":"Copia codice sorgente","copyToClipboard":"Copia negli appunti","showOriginalText":"Mostra originale","showTranslatedText":"Mostra traduzione","exactPosition":"Posizione esatta","uncertain":"Incertezza","question":"Domanda","nothingFound":"Nessun risultato","venue":"Luogo","searchVenue":"Cerca luogo...","memoriBlockedTitle":"Bloccato","memoriBlockedUntil":"Memori bloccato fino al {{date}}","memoriBlockedAnon":"Attualmente \\"{{name}}\\" non può rispondere, torna qui il {{date}}","memoriBlockedReasonExceedChats":"perchè ha superato la soglia mensile di chat ammesse.","memoriBlockedGiverHelper":"Puoi sempre gestirlo in qualità di amministratore, ma altri utenti non potranno interrogarlo.","generatedByAI":"Risposta generata da IA, può talvolta generare informazioni non corrette","whyThisAnswer":"Perché questa risposta?","whyThisAnswerHelper":"Questa risposta è stata generata automaticamente da un\'intelligenza artificiale sulla base di questi contenuti verificati.","completionsEnabled":"IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette","completionProviderDown":"Questo Twin è integrato con una IA generativa di {{provider}}, ma al momento non è disponibile. Riprova più tardi.","completionProviderFallbackName":"un provider esterno","completionProviderCheckStatusPage":"Vedi pagina di stato","boardOfExperts":"Gruppo di esperti","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","underage":"Devi avere almeno {{age}} anni per registrarti.","underageTwinSession":"Devi avere almeno {{age}} anni per interagire con questo Twin.","ageVerification":"Verifica dell\'età","ageVerificationText":"Per interagire con questo Twin, devi aver almeno {{minAge}} anni.","nsfw":"NSFW: Questo Twin contiene contenuti per adulti","deepThought":"Pensiero profondo","deepThoughtHelper":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtDisclaimerTitle":"Pensiero profondo abilitato","deepThoughtDisclaimer":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtPreDisclaimerUnlogged":"Accedi per abilitare Pensiero Profondo.","deepThoughtPreDisclaimerNotAllowed":"Pensiero Profondo è disabilitato poiché non hai acconsentito al suo utilizzo, puoi cambiare la tua scelta in qualsiasi momento nelle impostazioni del tuo account.","notEnoughCredits":"L\'autore di questo Twin non ha abbastanza crediti per rispondere alla tua domanda.","knownFacts":{"title":"Fatti noti","description":"Dettagli delle informazioni condivise tra te e {{memoriName}}","type":"Tipo","typeShortTerm":"Breve termine","typeLongTerm":"Lungo termine","typeHelper":"Tipi:\\n- Breve termine: questo fatto noto è sempre utilizzato durante le conversazioni\\n- Lungo termine: questo fatto noto è utilizzato durante le conversazioni solo se rilevante per la domanda corrente","text":"Testo","deleteSuccess":"Fatto noto eliminato","deleteConfirmTitle":"Elimina il fatto noto","deleteConfirmMessage":"Confermi di voler eliminare questo fatto noto?","deleteSelectedConfirmTitle":"Elimina i fatti noti selezionati","deleteSelectedConfirmMessage":"Confermi di voler eliminare i fatti noti selezionati?"},"auth":{"title":"Autenticazione","useRecoveryTokens":"Utilizza i token di recupero","tokens":"Token","addToken":"Aggiungi token","usePassword":"Utilizza la password","atLeast":"Almeno"},"widget":{"instruct":"Istruisci","test":"Prova","sound":"Audio","position":"Preferenze posizione","settings":"Impostazioni","share":"Condividi","sendOnKeypress":"Premi Invio per inviare","sendOnClick":"Clicca sul bottone di invio","boardOfExperts":"Gruppo di esperti","showExpertsInTheBoard":"Mostra gli esperti di questo gruppo","expertsInTheBoard":"Esperti di questo gruppo","goToIntegrationsToCustomizeAvatar":"Per personalizzare l\'avatar, vai a Condividimi e configura la pagina pubblica"},"write_and_speak":{"micButtonPopover":"Premi il pulsante per parlare","micButtonPopoverListening":"Premi il pulsante per smettere di parlare","pageInstructExplanation":"Per insegnarmi nuove cose clicca sul pulsante ISTRUISCIMI per cominciare","pageTryMeExplanation":"Per parlare con me clicca sul pulsante INIZIAMO per cominciare","instructButton":"ISTRUISCIMI","tryMeButton":"INIZIAMO","chatHistory":"Cronologia chat","exportChatHistory":"Esporta la cronologia chat","exportChatHistoryMessage":"Vuoi esportare la cronologia chat?","chatBotButtonText":"CLICCA QUI PER APRIRE LA CHAT","conversationStartedLabel":"Conversazione avvenuta il","settingsHeaderLabel":"Configura qui il memori se vuoi impostare una conversazione continua. Setta i secondi di silenzio prima dell\'invio.","continuousSpeechLabel":"Conversazione continua","holdToSpeak":"Tieni premuto per parlare","releaseToEndListening":"Rilascia per smettere di parlare","pressAndHoldToSpeak":"Premi e tieni premuto per parlare","microphoneMode":"Modalità microfono","hideEmissionsLabel":"Nascondi testo emesso dal Twin","secondsLabel":"Secondi","controlsPosition":"Posizione dei controlli","tryMeHeaderLabel":"PROVA","unknownPosition":"Posizione sconosciuta","fieldPlace":"Indica la posizione (es \'Milano\')","showMapLinkFor":"Visualizza sulla mappa la posizione","useMyPosition":"Usa la mia posizione","myPosition":"Posizione corrente","updatingPosition":"Aggiorno la posizione...","placeNotFound":"Luogo sconosciuto!","requirePositionHelp":"Per parlare con {{name}} devi decidere se fornire o meno la tua posizione. Questo perchè diverse risposte che potrà fornirti potrebbero dipendere da dove ti trovi.","dontWantToProvidePosition":"Non voglio fornire la mia posizione","attachmentsLabel":"Arricchisci il tuo messaggio","iWantToTalkToIn":"Voglio parlare con {{name}} in"},"media":{"title":"Titolo","editAttributes":"Modifica attributi media","uploadMimeTypeNotAllowed":"Il tipo di file non è permesso","uploadSizeLimitMessage":"Il file caricato è troppo grande (max {{size}}MB)","uploadWrongResolutionMessage":"La risoluzione deve essere {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"Hai già un Twin con questo nome","uploadHelperImages":"Caricare un file con estensione png, jpg, jpeg o gif e con dimensione massima di {{size}}MB","uploadHelper":"Caricare un file di dimensione massima di {{size}}MB","uploadError":"Errore nel caricamento","square":"quadrato","scaleRatio":"Proporzioni","addMediaLabel":"Aggiungi media","insertThisMediaMsg":"Inserisci questi media","mediaUploadMessage":"Clicca per caricare un nuovo media","addLinkLabel":"Aggiungi un link","linkKey":"URL","linkValue":"Titolo link","insertThisLink":"Inserisci un link a {{url}} con titolo {{title}}"},"gamification":{"level":"Livello","points":"punti","memoriReachedLevel":"è diventato più evoluto ed ha raggiunto il livello","levelGoToStatistics":"{{memori}} è al livello {{level}} con {{points}} punti. Clicca per andare alle statistiche.","congratulationsNewLevel":"Congratulazioni, hai raggiunto un nuovo livello!","congratulationsNewLevelDescription":"Il tuo Memori è diventato più evoluto con {{points}} punti, guarda le","statistics":"statistiche"},"login":{"login":"Accedi","logout":"Esci","user":"Utente","loggedDrawerTitle":"Ciao, {{name}}!","loginDrawerTitle":"Accedi","signupDrawerTitle":"Registrati","newUserSignUp":"Sei un nuovo utente?","signUp":"Registrati!","alreadyHaveAnAccount":"Hai già un account?","backToLogin":"Torna al login","registrationDisabled":"La registrazione è disabilitata.","contactAdmin":"Contatta l\'amministratore per richiedere l\'accesso","userNameOrEmail":"Nome utente o email","email":"Email","emailFormatError":"Per favore, inserisci una mail valida","username":"Nome utente","usernameContainsReservedWord":"Il nome utente contiene una parola riservata, per favore cambia il nome utente","usernameFormatError":"Il nome utente deve essere lungo almeno 3 caratteri e può contenere solo lettere, numeri e _","otpCode":"Codice di verifica","resendVerificationCode":"Invia di nuovo","resentVerificationCode":"Codice di verifica inviato! Controlla la tua mail.","password":"Password","newPassword":"Nuova password","confirmPassword":"Conferma la password","currentPassword":"Password attuale","passwordMatchingError":"Le password non coincidono.","passwordFormatError":"La password deve essere lunga almeno 8 caratteri e contenere almeno un numero, una lettera maiuscola, una minuscola e un simbolo","pwdWeak":"Debole","pwdAcceptable":"Accettabile","pwdStrong":"Forte","mustChangePassword":"Devi cambiare la password","passwordChange":"Cambio password","emailChange":"Cambio email","avatarChange":"Cambio avatar","underage":"Devi avere almeno {{age}} anni per registrarti.","optional":"opzionale","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","missingData":"Informazioni mancanti","missingDataHelper":"Sappiamo che questo è un po\' fastidioso, ma abbiamo bisogno di alcune informazioni in più per completare la tua registrazione.","goToAccountToChangeYourPreferences":"Puoi cambiare la tua scelta in qualsiasi momento dalla tua pagina Account.","deepThoughtExplaination":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme. Consenti all\'autore del twin di contattarti per offerte commerciali riguardanti prodotti su cui hai espresso interesse.","tnCAndPPAcceptedHelper":"Dall\'ultimo accesso, i T&C e l\'Informativa sulla privacy sono stati modificati. Si prega di accettarle, altrimenti non sarà possibile apportare modifiche ai propri gemelli. Puoi sempre cancellare il tuo account nella pagina del tuo profilo utente.","privacyLabel":"Ho letto e accettato l\'","privacyAndCookiePolicy":"informativa sui cookie e sulla privacy","and":"e","termsOfService":"i termini del servizio","pAndCUAccepted":"Accetto le condizioni di utilizzo relative a Pensiero Profondo","editAccount":"Modifica account","save":"Salva"},"success":"Operazione andata a buon fine","Error":"Errore","internal server error":"Ops, scusa... qualcosa è andato storto nel server","error":"Errore","error.loading":"Errore durante il caricamento dei contenuti.","error.notFound":"Ops, non abbiamo trovato ciò che cercavi.","error.generic":"Ops, qualcosa è andato storto.","error.serverNotResponding":"Stiamo facendo manutenzione o rilasciando aggiornamenti. Riprova più tardi.","error.unprocessableEntity":"Errore durante il salvataggio dei dati. Ricontrolla i dati inseriti.","error.goBackTo":"Prova a tornare alla","error.reloadPage":"Ricarica la pagina","error.tryAgain":"Riprova","error.unauthorized":"Non sei autorizzato a visualizzare questo contenuto.","errors":{"TENANT_NOT_FOUND":"Tenant non trovato","TENANT_REGISTRATION_DISABLED":"La registrazione su questa piattaforma è disabilitata","TENANT_MISSING_NAME":"Tenant: nome mancante","TENANT_MAX_USERS_REACHED":"Numero massimo di utenti raggiunto","TENANT_MAX_ADMINS_REACHED":"Numero massimo di utenti amministratori raggiunto","TENANT_ALREADY_EXISTS":"Tenant già esistente","TENANT_MISSING_DESCRIPTION":"Tenant: descrizione mancante","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: non abilitato a gestire il provider di completamento","USER_NOT_CONFIRMED":"Utente ancora non confermato","USER_NOT_FOUND":"Utente non trovato","USER_OR_PASSWORD_INVALID":"Utente o password non validi","USER_MUST_CHANGE_PASSWORD":"Devi cambiare la password","USER_MUST_ENTER_VERIFICATION_CODE":"Devi inserire il codice di verifica","USER_MISSING_TENANT":"Utente: tenant mancante","USER_MISSING_NAME":"Utente: nome mancante","USER_MISSING_PASSWORD":"Utente: password mancante","USER_MISSING_EMAIL":"Utente: email mancante","USER_MISSING_VERIFICATION_CODE":"Utente: codice di verifica mancante","USER_NAME_ALREADY_USED":"Nome utente già in uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La password non rispetta le regole di sicurezza","USER_EMAIL_ALREADY_USED":"Email già in uso","USER_EMAIL_INVALID":"Email non valida","USER_VERIFICATION_CODE_INVALID":"Codice di verifica non valido","USER_MISSING_NAME_OR_EMAIL":"Nome utente o email mancante","USER_NAME_INVALID":"Nome utente non valido","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utente ha uno o più memori","USER_MISSING_NEW_PASSWORD":"Utente: nuova password mancante","USER_NOTHING_TO_DO":"Niente da fare","USER_CANT_CREATE_MEMORI":"Utente non abilitato a creare Memori","USER_MAX_MEMORI_REACHED":"Massimo numero di Memori raggiunto","USER_TOO_MANY_ATTEMPTS":"Troppi tentativi","USER_MUST_ACCEPT_TNC_AND_PP":"Devi accettare i termini e le condizioni","USER_BIRTH_DATE_CANT_BE_CHANGED":"Data di nascita non può essere cambiata","USER_CANT_SET_COMPLETION_PROVIDER":"Utente: non abilitato a gestire il provider di completamento","USER_CANT_ENABLE_DEEP_THOUGHT":"Utente: non abilitato a gestire Pensiero Profondo","USER_CANT_ENABLE_DCM_INTEGRATION":"Utente: non abilitato a gestire l\'integrazione con DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Utente: non abilitato a gestire la concatenazione o il gruppo di esperti","USER_CREATION_BILLING_DENIED_PERMISSION":"Non hai crediti sufficienti per creare un Twin","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"L\'utente ha una o più configurazioni completions","USER_CANT_BE_DELETED":"Utente non può essere cancellato","MEMORI_NOT_FOUND":"Memori non trovato","MEMORI_NOT_ACCESSIBLE":"Memori non accessibile","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Solo il proprietario può cambiare il tag e il pin","SESSION_NOT_FOUND":"Sessione non trovata","SESSION_IS_NOT_ADMINISTRATIVE":"Sessione non amministrativa","SESSION_EXPIRED":"Sessione scaduta","MEMORI_MISSING_CONFIGURATION":"Memori: configurazione mancante","MEMORI_CONFIGURATION_NOT_FOUND":"Memori: configurazione non trovata","MEMORI_INVALID_PRIVACY_TYPE":"Memori: tipo di privacy non valido","MEMORI_MISSING_PASSWORD":"Memori: password mancante","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero totale di token di recupero non valido","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero minimo di token di recupero non valido","MEMORI_INVALID_VOICE_TYPE":"Memori: tipo di voce non valido","MEMORI_MISSING_NAME":"Memori: nome mancante","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memori: password o token di recupero mancanti","MEMORI_INVALID_ID":"Memori: ID non valido","MEMORI_NAME_ALREADY_USED":"Nome memori già in uso","MEMORI_INVALID_PIN":"Memori: PIN non valido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memori: cambio TAG e PIN richiedono operazioni separate","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memori: password non richiesta su Memori pubblico","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Pensiero Profondo richiede l\'abilitazione delle completions","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Il gruppo di esperti richiede l\'abilitazione delle completions","MEMORI_INVALID_COMPLETION_CONFIG":"Memori: configurazione completions non valida","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Trasferimento: utente di destinazione mancante","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Trasferimento: ID utente di destinazione non valido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Trasferimento: dati utente di destinazione non validi","MEMORI_TRANSFER_NOTHING_TO_DO":"Trasferimento: alcuna operazione da fare","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memori: la configurazione non può essere modificata","MEMORI_MISSING_NEW_PASSWORD":"Memori: nuova password mancante","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Formato non valido data a partire da","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Formato non valido data fino a","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Memori: funzionalità richiede un abbonamento","INTEGRATION_NOT_FOUND":"Integrazione non trovata","INTEGRATION_INVALID_TYPE":"Tipo integrazione non valido","INTEGRATION_ALREADY_EXISTS":"Integrazione già esistente","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Memori non pubblici non possono essere integrati","INTEGRATION_MISSING_INVOCATION_TEXT":"Integrazione: testo di invocazione mancante","INTEGRATION_MISSING_DEVICE_EMAILS":"Integrazione: email del dispositivo mancante","INTEGRATION_MEMORI_IS_EMPTY":"Memori vuoti non possono essere integrati","INTEGRATION_MISSING_PRIVACY_POLICY":"Integrazione: privacy policy mancante","INTEGRATION_MISSING_CATEGORY":"Categoria integrazione mancante","INTEGRATION_MISSING_DESCRIPTION":"Descrizione integrazione mancante","INTEGRATION_INVALID_INVOCATION_TEXT":"Testo di invocazione non valido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home non più disponibile","UPLOAD_REQUIRES_MULTIPART_ENCODING":"L\'upload richiede l\'encoding multipart","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: manca il content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: dimensione massima superata","UPLOAD_FILE_IS_EMPTY":"Upload: file vuoto","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: tipo di file o firma non validi","UPLOAD_MISSING_FILE_NAME":"Upload: nome file mancante","UPLOAD_INVALID_MEMORY_ID":"Upload: ID contenuto non valido","UPLOAD_MISSING_FILE_CONTENT":"Upload: contenuto file mancante","ASSET_NOT_FOUND":"Asset non trovato","ASSET_NOT_ACCESSIBLE":"Asset non accessibile","ASSET_MISSING_SESSION_ID":"Asset: ID sessione mancante","ASSET_INVALID_FILE_NAME":"Asset: nome file non valido","INVITATION_NOT_FOUND":"Invito non trovato","INVITATION_NOT_ACCESSIBLE":"Invito non accessibile","INVITATION_ALREADY_ACCEPTED":"Invito già accettato","INVITATION_ALREADY_REJECTED":"Invito già rifiutato","INVITATION_MISSING_DESTINATION_EMAIL":"Invito: email di destinazione mancante","INVITATION_DESTINATION_EMAIL_INVALID":"Invito: email di destinazione non valida","INVITATION_MISSING_TAG":"Invito: tag mancante","INVITATION_MISSING_PIN":"Invito: PIN mancante","INVITATION_INVALID_PIN":"Invito: PIN non valido","INVITATION_INVALID_TYPE":"Invito: tipo non valido","INVITATION_MISSING_DESTINATION_NAME":"Invito: nome destinatario mancante","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invito: tag e pin non possono essere cambiati","INVITATION_CANT_BE_CHANGED":"Invito: non può essere modificato","ACTIONLOG_INVALID_USER_ID":"ID utente non valido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","ACTIONLOG_INVALID_MEMORI_ID":"ID Memori non valido","CONSUMPTIONLOG_INVALID_TYPE":"Tipo di log non valido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","CONSUMPTIONLOG_INVALID_USER_ID":"ID utente non valido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Memori ID non valido","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifiche: Periodo di estrazione chatlog non valido","PROCESS_INVALID_TYPE":"Tipo di processo non valido","PROCESS_ALREADY_RUNNING":"Processo già in esecuzione","PROCESS_NOT_FOUND":"Processo non trovato","IMPORTCSV_MISSING_ROWS":"Importazione CSV: righe mancanti","IMPORTCSV_MISSING_CSV":"Importazione CSV: CSV mancante","IMPORTCSV_MISSING_SEPARATOR":"Importazione CSV: separatore mancante","IMPORTCSV_INVALID_SEPARATOR":"Importazione CSV: separatore non valido","IMPORTCSV_MISSING_HEADERS":"Importazione CSV: intestazioni mancanti","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Importazione CSV: separatore varianti titolo mancante","IMPORTCSV_INVALID_RECEIVER_ID":"Importazione CSV: ID receiver non valido","IMPORTCSV_INVALID_MEDIA_LINK":"Importazione CSV: link media non valido","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"Importazione CSV: titolo link non valido","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Importazione CSV: encoding caratteri non rilevabile","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione CSV: impossibile importare in Memori segreti","IMPORTTXT_MISSING_ROWS":"Importazione TXT: righe mancanti","IMPORTTXT_INVALID_GRANULARITY":"Importazione TXT: granularità non valida","IMPORTTXT_INVALID_RECEIVER_ID":"Importazione TXT: ID receiver non valido","IMPORTTXT_INVALID_MEDIA_LINK":"Importazione TXT: link media non valido","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Importazione TXT: titolo link non valido","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Importazione TXT: encoding caratteri non rilevabile","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione TXT: impossibile importare in Memori segreti","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importazione TXT: limite importazione superato","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importazione TXT: importazione su GPT-4 richiede API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importazione TXT: importazione richiede un piano a pagamento","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importazione TXT: non hai crediti sufficienti per l\'operazione","EXPORTCSV_MISSING_CSV_SPECS":"Esportazione CSV: specifiche CSV mancanti","EXPORTCSV_MISSING_SEPARATOR":"Esportazione CSV: separatore mancante","EXPORTCSV_INVALID_SEPARATOR":"Esportazione CSV: separatore non valido","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Esportazione CSV: separatore varianti titolo mancante","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga mancante","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga non valido","EXPORTCSV_MISSING_PASSWORD":"Esportazione CSV: password mancante","EXPORTJSONL_MISSING_JSONL_SPECS":"Esportazione JSONL: specifiche JSONL mancanti","EXPORTJSONL_MISSING_PLATFORM":"Esportazione JSONL: piattaforma mancante","EXPORTJSONL_INVALID_PLATFORM":"Esportazione JSONL: piattaforma non valida","EXPORTJSONL_MISSING_PASSWORD":"Esportazione JSONL: password mancante","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Esportazione JSONL: esportazione richiede un piano a pagamento","ANALYSIS_MISSING_QUERY":"Analisi: query mancante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analisi: impossibile analizzare Memori segreti","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analisi: corrispondenza query utente richiede Pensiero Profondo","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Assegnazione badge: credenziali errate o mancanti","BADGE_ASSIGNMENT_MISSING_REF_ID":"Assegnazione badge: ID ref mancante","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Assegnazione badge: esito non trovato","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Assegnazione badge: URL di asserzione mancante","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Assegnazione badge: URL badge mancante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Assegnazione badge: URL issuer mancante","BADGE_ASSIGNMENT_INVALID_URL":"Assegnazione badge: URL non valido","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Assegnazione badge: destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Assegnazione badge: tipo destinatario sconosciuto","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario mancante","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario sconosciuto","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario errata","BADGE_NOT_FOUND":"Badge non trovato","OUTCOME_NO_DCM_CONFIGURED":"Outcome: nessun DCM configurato","OUTCOME_USER_BADGES_DISABLED":"Outcome: badge utente disabilitati","COMPLETION_CONFIG_MISSING_NAME":"Configurazione completions: nome mancante","COMPLETION_CONFIG_MISSING_PROVIDER":"Configurazione completions: provider mancante","COMPLETION_CONFIG_MISSING_ENDPOINT":"Configurazione completions: endpoint mancante","COMPLETION_CONFIG_MISSING_API_KEY":"Configurazione completions: API key mancante","COMPLETION_CONFIG_MISSING_MODEL":"Configurazione completions: modello mancante","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Configurazione completions: almeno un tipo di completions deve essere specificato","COMPLETION_CONFIG_INVALID_NAME":"Configurazione completions: nome non valido","COMPLETION_CONFIG_INVALID_PURPOSE":"Configurazione completions: tipo di completions non valido","COMPLETION_CONFIG_INVALID_ENDPOINT":"Configurazione completions: endpoint non valido","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Configurazione completions: endpoint incoerente","COMPLETION_CONFIG_INVALID_PROVIDER":"Configurazione completions: provider non valido","COMPLETION_CONFIG_NOT_FOUND":"Configurazione completions: non trovata","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Configurazione completions: non accessibile","COMPLETION_CONFIG_NAME_RESERVED":"Configurazione completions: nome riservato","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Configurazione completions: nome già esistente","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Configurazione completions: cambiamento visibilità non consentito"}}');var YG;YG=JSON.parse('{"yes":"Yes","no":"No","confirm":"Confirm","apply":"Apply","cancel":"Cancel","show":"Show","hide":"Hide","send":"Send","close":"Close","edit":"Edit","delete":"Delete","loading":"Loading","expand":"Expand","collapse":"Collapse","fullscreenEnter":"Enter fullscreen","fullscreenExit":"Exit fullscreen","center":"Center","bottom":"Bottom","hidden":"Hidden","day":"Day","month":"Month","year":"Year","createdAt":"Creation date","selected":"Selected","page":"page","actions":"Actions","next":"Next","previous":"Previous","copy":"Copy","copyRawCode":"Copy raw code","copyToClipboard":"Copy to clipboard","showOriginalText":"Show original","showTranslatedText":"Show translation","exactPosition":"Exact position","uncertain":"Uncertain","question":"Question","nothingFound":"Nothing found","venue":"Venue","searchVenue":"Search venue...","memoriBlockedTitle":"Blocked","memoriBlockedUntil":"Memori blocked until {{date}}","memoriBlockedAnon":"Currently \\"{{name}}\\" can\'t answer, come back here on {{date}}","memoriBlockedReasonExceedChats":"because it has exceeded the monthly threshold of allowed chats.","memoriBlockedGiverHelper":"You can still manage it as administrator, but other users will not be able to interact with it.","generatedByAI":"Answer generated by AI, may occasionally generate incorrect informations","whyThisAnswer":"Why this answer?","whyThisAnswerHelper":"This answer was generated automatically by an artificial intelligence based on these verified contents.","completionsEnabled":"Advanced AI, can respond with automatically generated answers that may sometimes contain incorrect information","completionProviderDown":"This Twin is integrated with a generative AI from {{provider}}, but it is currently unavailable. Try again later.","completionProviderFallbackName":"an external provider","completionProviderCheckStatusPage":"Check status page","boardOfExperts":"Board of experts","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","underage":"You must be at least {{age}} years old to sign up.","underageTwinSession":"You must be at least {{age}} years old to interact with this Twin.","ageVerification":"Age verification","ageVerificationText":"To interact with this Twin, you must be at least {{minAge}} years old.","nsfw":"NSFW: This Twin contains adult contents","deepThought":"Deep Thought","deepThoughtHelper":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","deepThoughtDisclaimerTitle":"Deep Thought enabled","deepThoughtDisclaimer":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together.","deepThoughtPreDisclaimerUnlogged":"Log in to enable Deep Thought.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought is disabled since you didn\'t consent its usage, you can change this any time in your account settings.","notEnoughCredits":"The author of this Twin does not have enough credits to answer your question.","knownFacts":{"title":"Known facts","description":"Details of the information shared between you and {{memoriName}}","type":"Type","typeShortTerm":"Short term","typeLongTerm":"Long term","typeHelper":"Types:\\n- Short Term: this Known Fact is always used during conversations\\n- Long Term: this Known Fact is used during conversations only if relevant to the current question","text":"Text","deleteSuccess":"Known fact deleted","deleteConfirmTitle":"Delete known fact","deleteConfirmMessage":"Are you sure you want to delete this known fact?","deleteSelectedConfirmTitle":"Delete selected known facts","deleteSelectedConfirmMessage":"Are you sure you want to delete the selected known facts?"},"auth":{"title":"Authentication","useRecoveryTokens":"Use recovery tokens","tokens":"Tokens","addToken":"Add token","usePassword":"Use password","atLeast":"At least"},"widget":{"instruct":"Instruct","test":"Test","sound":"Sound","position":"Position preferences","settings":"Settings","share":"Share","sendOnKeypress":"Hit Enter to send","sendOnClick":"Click on Submit","boardOfExperts":"Board of experts","showExpertsInTheBoard":"Show experts in this board","expertsInTheBoard":"Experts in this board","goToIntegrationsToCustomizeAvatar":"To customize the avatar, go to Share and customize the public page"},"write_and_speak":{"micButtonPopover":"Click the button to speak","micButtonPopoverListening":"Click the button to stop speak","pageInstructExplanation":"To teach me new things click on the INSTRUCT ME button to get started","pageTryMeExplanation":"To talk to me click on the START button to get started","instructButton":"INSTRUCT ME","tryMeButton":"START","chatHistory":"Chat history","exportChatHistory":"Export chat history","exportChatHistoryMessage":"Do you want to export chat history?","chatBotButtonText":"CLICK HERE TO OPEN CHATBOT","conversationStartedLabel":"Conversation started on","settingsHeaderLabel":"Setup here if you want to set the memori as continuous speech, and change the silence seconds if you want to customize them.","continuousSpeechLabel":"Continuous speech","holdToSpeak":"Hold to speak","releaseToEndListening":"Release to end listening","pressAndHoldToSpeak":"Press and hold to speak","microphoneMode":"Microphone mode","hideEmissionsLabel":"Hide text emitted by the Twin","secondsLabel":"Set seconds","controlsPosition":"Controls position","tryMeHeaderLabel":"TRY","unknownPosition":"Unknown position","fieldPlace":"Write the place (eg \'Milano\')","showMapLinkFor":"Show the position on the map","useMyPosition":"Use my position","myPosition":"Your position","updatingPosition":"Updating position...","placeNotFound":"Place not found!","requirePosition":"Insert your position before start","requirePositionHelp":"To talk to {{name}} you have to decide whether to provide your position or not. This is because different answers that it can provide you may depend on where you are.","dontWantToProvidePosition":"I don\'t want to provide my position","attachmentsLabel":"Enrich your message","iWantToTalkToIn":"I want to talk to {{name}} in"},"media":{"title":"Title","editAttributes":"Edit media attributes","uploadMimeTypeNotAllowed":"The file type is not allowed","uploadSizeLimitMessage":"The uploaded size is too big (max {{size}}MB)","uploadWrongResolutionMessage":"The resolution must be {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"You already have a Twin with this name","uploadHelperImages":"Upload a file with extension png, jpg, jpeg or gif, and having at maximum a size of {{size}}MB","uploadHelper":"Upload a file having at maximum a size of {{size}}MB","uploadError":"Upload failed","square":"square","scaleRatio":"Scale ratio","addMediaLabel":"Add a media","insertThisMediaMsg":"Insert these media","mediaUploadMessage":"Click to load a new media","addLinkLabel":"Add a link","linkKey":"URL","linkValue":"Link title","insertThisLink":"Insert a link to {{url}} with title {{title}}"},"gamification":{"level":"Level","points":"points","memoriReachedLevel":"became more evolved and reached level","levelGoToStatistics":"{{memori}} is at level {{level}} with {{points}} points. Click to go to statistics.","congratulationsNewLevel":"Congratulations, you have reached a new level!","congratulationsNewLevelDescription":"Your Memori became more evolved with {{points}} points, look at the","statistics":"statistics"},"login":{"login":"Login","logout":"Logout","user":"User","loggedDrawerTitle":"Hi, {{name}}!","loginDrawerTitle":"Login","signupDrawerTitle":"Sign up","newUserSignUp":"New user?","signUp":"Sign up!","alreadyHaveAnAccount":"Already have an account?","backToLogin":"Back to login","registrationDisabled":"Registration is disabled","contactAdmin":"Contact the administrator to request access","userNameOrEmail":"Username or email","email":"Email","emailFormatError":"Please, insert a valid email","username":"Username","usernameContainsReservedWord":"Username contains a reserved word, please choose another one","usernameFormatError":"Username must be at least 3 characters long and contain only letters, numbers and _","otpCode":"Verification code","resendVerificationCode":"Resend code","resentVerificationCode":"Confirmation code sent! Please check your email.","password":"Password","newPassword":"New password","confirmPassword":"Confirm Password","currentPassword":"Current password","passwordMatchingError":"Passwords do not match.","passwordFormatError":"Password must be at least 8 characters long and contain at least a number, an upper case letter, a lower case letter and a symbol","pwdWeak":"Weak","pwdAcceptable":"Acceptable","pwdStrong":"Strong","mustChangePassword":"You must change your password","passwordChange":"Change password","emailChange":"Change email","avatarChange":"Change avatar","underage":"You must be at least {{age}} years old to sign up.","optional":"Optional","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","missingData":"Missing informations","missingDataHelper":"We know that this is a bit annoying, but we need some more informations to complete your registration.","goToAccountToChangeYourPreferences":"You can change your choice at any time from your Account page.","deepThoughtExplaination":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","tnCAndPPAcceptedHelper":"Since your last login, T&C and Privacy Policy have changed. Please accept them, otherwise you won\'t be able to make changes to your Twins. You can always delete your account in your user profile page.","privacyLabel":"I have read and accepted the","privacyAndCookiePolicy":"Privacy e Cookie Policy","and":"and","termsOfService":"Terms of Service","pAndCUAccepted":"I accept the terms of service about Deep Thought","editAccount":"Edit account","save":"Save"},"success":"Success","Error":"Error","internal server error":"Oupsie, sorry... Something went wrong on the server","error":"Error","error.loading":"Error while loading content.","error.generic":"Oupsie, sorry... something went wrong.","error.serverNotResponding":"We are doing maintenance or releasing updates. Please try again later.","error.notFound":"Oupsie, we didn\'t find the page you were looking for.","error.goBackTo":"You can try to go back to the","error.reloadPage":"Reload the page","error.tryAgain":"Try again","error.unauthorized":"You are unauthorized to view this content.","error.unprocessableEntity":"Error while processing the request. Check the data you entered.","errors":{"TENANT_NOT_FOUND":"Tenant not found","TENANT_REGISTRATION_DISABLED":"Registration on this platform is disabled","TENANT_MISSING_NAME":"Tenant: name missing","TENANT_MAX_USERS_REACHED":"Maximum number of users reached","TENANT_MAX_ADMINS_REACHED":"Maximum number of admin users reached","TENANT_ALREADY_EXISTS":"Tenant already exists","TENANT_MISSING_DESCRIPTION":"Tenant: description missing","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: can\'t set completion provider","USER_NOT_CONFIRMED":"User still not confirmed","USER_NOT_FOUND":"User not found","USER_OR_PASSWORD_INVALID":"Invalid user or password","USER_MUST_CHANGE_PASSWORD":"You must change your password","USER_MUST_ENTER_VERIFICATION_CODE":"You must enter the verification code","USER_MISSING_TENANT":"User: missing tenant","USER_MISSING_NAME":"User: name is missing","USER_MISSING_PASSWORD":"User: password missing","USER_MISSING_EMAIL":"User: Missing email","USER_MISSING_VERIFICATION_CODE":"User: Missing verification code","USER_NAME_ALREADY_USED":"User name already in use","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"The password does not meet the security rules","USER_EMAIL_ALREADY_USED":"Email already in use","USER_EMAIL_INVALID":"Invalid email","USER_VERIFICATION_CODE_INVALID":"Invalid verification code","USER_MISSING_NAME_OR_EMAIL":"Missing username or email","USER_NAME_INVALID":"Invalid user name","USER_HAS_ONE_OR_MORE_MEMORI":"The user has one or more memories","USER_MISSING_NEW_PASSWORD":"User: new password missing","USER_NOTHING_TO_DO":"Nothing to do","USER_CANT_CREATE_MEMORI":"User not allowed to create Memori","USER_MAX_MEMORI_REACHED":"Maximum number of Memori reached","USER_TOO_MANY_ATTEMPTS":"Too many attempts","USER_MUST_ACCEPT_TNC_AND_PP":"You must accept the terms and conditions","USER_BIRTH_DATE_CANT_BE_CHANGED":"Date of birth cannot be changed","USER_CANT_SET_COMPLETION_PROVIDER":"User: not allowed to manage completion provider","USER_CANT_ENABLE_DEEP_THOUGHT":"User: not enabled to manage Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"User: not enabled to manage DCM integration","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"User: not allowed to manage chaining or expert group","USER_CREATION_BILLING_DENIED_PERMISSION":"You don\'t have enough credits to create a Twin","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"The user has one or more completion configurations","USER_CANT_BE_DELETED":"User can\'t be deleted","MEMORI_NOT_FOUND":"Memori not found","MEMORI_NOT_ACCESSIBLE":"Memori not accessible","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Only owner can change tag or pin","SESSION_NOT_FOUND":"Session not found","SESSION_IS_NOT_ADMINISTRATIVE":"Non-administrative session","SESSION_EXPIRED":"Session expired","MEMORI_MISSING_CONFIGURATION":"Twin: missing configuration","MEMORI_CONFIGURATION_NOT_FOUND":"Twin: configuration not found","MEMORI_INVALID_PRIVACY_TYPE":"Twin: invalid privacy type","MEMORI_MISSING_PASSWORD":"Twin: missing password","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Twin: total number of invalid recovery tokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Twin: minimum number of invalid recovery tokens","MEMORI_INVALID_VOICE_TYPE":"Twin: invalid voice type","MEMORI_MISSING_NAME":"Twin: missing name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Twin: missing password or recovery token","MEMORI_INVALID_ID":"Twin: invalid ID","MEMORI_NAME_ALREADY_USED":"Twin name already in use","MEMORI_INVALID_PIN":"Twin: Invalid PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Twin: TAG and PIN change require separate operations","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Twin: no password required when public","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought requires completions to be enabled","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"The expert group requires completions to be enabled","MEMORI_INVALID_COMPLETION_CONFIG":"Twin: invalid completions configuration","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfer: missing destination user","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfer: invalid destination user ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfer: invalid destination user data","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nothing to do","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memories: configuration cannot be changed","MEMORI_MISSING_NEW_PASSWORD":"Memories: new password missing","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Feature requires subscription","INTEGRATION_NOT_FOUND":"Integration not found","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Invalid date from format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Invalid date to format","INTEGRATION_INVALID_TYPE":"Invalid integration type","INTEGRATION_ALREADY_EXISTS":"Integration already exists","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Non-public memories cannot be integrated","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: missing invocation text","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: missing device email","INTEGRATION_MEMORI_IS_EMPTY":"Empty memories cannot be integrated","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: privacy policy missing","INTEGRATION_MISSING_CATEGORY":"Integration category missing","INTEGRATION_MISSING_DESCRIPTION":"Missing integration description","INTEGRATION_INVALID_INVOCATION_TEXT":"Invalid invocation text","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home no more available","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Upload requires multipart encoding","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: missing content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: maximum size exceeded","UPLOAD_FILE_IS_EMPTY":"Upload: empty file","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: invalid file type or signature","UPLOAD_MISSING_FILE_NAME":"Upload: missing file name","UPLOAD_INVALID_MEMORY_ID":"Upload: Invalid content ID","UPLOAD_MISSING_FILE_CONTENT":"Upload: Missing file content","ASSET_NOT_FOUND":"Asset not found","ASSET_NOT_ACCESSIBLE":"Asset not accessible","ASSET_MISSING_SESSION_ID":"Asset: missing session ID","ASSET_INVALID_FILE_NAME":"Asset: invalid file name","INVITATION_NOT_FOUND":"Invitation not found","INVITATION_NOT_ACCESSIBLE":"Invitation not accessible","INVITATION_ALREADY_ACCEPTED":"Invitation already accepted","INVITATION_ALREADY_REJECTED":"Invitation already rejected","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation: missing destination email","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation: destination email invalid","INVITATION_MISSING_TAG":"Invitation: missing tag","INVITATION_MISSING_PIN":"Invitation: PIN missing","INVITATION_INVALID_PIN":"Invitation: invalid PIN","INVITATION_INVALID_TYPE":"Invitation: invalid type","INVITATION_MISSING_DESTINATION_NAME":"Invitation: destination name missing","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation: tag and pin can\'t be changed","INVITATION_CANT_BE_CHANGED":"Intation: can\'t be changed","ACTIONLOG_INVALID_USER_ID":"Invalid user ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","ACTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","CONSUMPTIONLOG_INVALID_TYPE":"Invalid log type","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","CONSUMPTIONLOG_INVALID_USER_ID":"Invalid user ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifications: Invalid chat log extraction period","PROCESS_INVALID_TYPE":"Invalid process type","PROCESS_ALREADY_RUNNING":"Process already running","PROCESS_NOT_FOUND":"Process not found","IMPORTCSV_MISSING_ROWS":"CSV import: missing rows","IMPORTCSV_MISSING_CSV":"CSV Import: Missing CSV","IMPORTCSV_MISSING_SEPARATOR":"CSV import: missing separator","IMPORTCSV_INVALID_SEPARATOR":"CSV import: invalid separator","IMPORTCSV_MISSING_HEADERS":"CSV import: missing headers","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV import: missing title variant separator","IMPORTCSV_INVALID_RECEIVER_ID":"CSV import: invalid receiver ID","IMPORTCSV_INVALID_MEDIA_LINK":"CSV import: invalid media link","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"CSV import: invalid link title","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"CSV import: undetectable character encoding","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"CSV Import: Cannot import to Secret Memories","IMPORTTXT_MISSING_ROWS":"Importing TXT: missing rows","IMPORTTXT_INVALID_GRANULARITY":"Import TXT: invalid granularity","IMPORTTXT_INVALID_RECEIVER_ID":"Import TXT: invalid receiver ID","IMPORTTXT_INVALID_MEDIA_LINK":"Import TXT: invalid media link","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Import TXT: invalid link title","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"TXT import: undetectable character encoding","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"TXT Import: Cannot import to Secret Memories","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Import TXT: import limit exceeded","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Import TXT: import on GPT-4 requires API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Import TXT: Import requires a paying plan","IMPORTTXT_BILLING_DENIED_PERMISSION":"Import TXT: you don\'t have enough credits for the operation","EXPORTCSV_MISSING_CSV_SPECS":"CSV export: missing CSV specifications","EXPORTCSV_MISSING_SEPARATOR":"CSV export: missing separator","EXPORTCSV_INVALID_SEPARATOR":"CSV export: invalid separator","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV export: missing title variant separator","EXPORTCSV_MISSING_NEW_LINE_CHAR":"CSV export: missing newline character","EXPORTCSV_INVALID_NEW_LINE_CHAR":"CSV export: invalid newline character","EXPORTCSV_MISSING_PASSWORD":"CSV export: missing password","EXPORTJSONL_MISSING_JSONL_SPECS":"JSONL export: missing JSONL specifications","EXPORTJSONL_MISSING_PLATFORM":"JSONL export: missing platform","EXPORTJSONL_INVALID_PLATFORM":"JSONL export: invalid platform","EXPORTJSONL_MISSING_PASSWORD":"JSONL export: missing password","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"JSONL Export: Export requires a paid plan","ANALYSIS_MISSING_QUERY":"Analysis: missing query","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analysis: Unable to analyze Secret Memories","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analysis: matching user query requires Deep Thinking","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Badge assignment: incorrect or missing credentials","BADGE_ASSIGNMENT_MISSING_REF_ID":"Badge assignment: ref ID missing","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Badge assignment: result not found","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Badge assignment: Missing assertion URL","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Badge Assignment: Missing Badge URL","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Badge assignment: missing issuer URL","BADGE_ASSIGNMENT_INVALID_URL":"Badge assignment: Invalid URL","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Badge assignment: missing recipient","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Badge assignment: unknown recipient type","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Badge assignment: missing recipient identity","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Badge assignment: missing recipient hash type","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Badge assignment: recipient hash type unknown","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Badge assignment: incorrect recipient identity","BADGE_NOT_FOUND":"Badge not found","OUTCOME_NO_DCM_CONFIGURED":"Outcome: no DCM configured","OUTCOME_USER_BADGES_DISABLED":"Outcome: user badges disabled","COMPLETION_CONFIG_MISSING_NAME":"Completions configuration: missing name","COMPLETION_CONFIG_MISSING_PROVIDER":"Completions configuration: missing provider","COMPLETION_CONFIG_MISSING_ENDPOINT":"Completions configuration: missing endpoint","COMPLETION_CONFIG_MISSING_API_KEY":"Completions configuration: missing API key","COMPLETION_CONFIG_MISSING_MODEL":"Completions configuration: missing model","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Completions configuration: at least one completions type must be specified","COMPLETION_CONFIG_INVALID_NAME":"Completions configuration: invalid name","COMPLETION_CONFIG_INVALID_PURPOSE":"Completions configuration: invalid completions type","COMPLETION_CONFIG_INVALID_ENDPOINT":"Completions configuration: invalid endpoint","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Completions configuration: inconsistent endpoint","COMPLETION_CONFIG_INVALID_PROVIDER":"Completions configuration: invalid provider","COMPLETION_CONFIG_NOT_FOUND":"Completions configuration: not found","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Completions configuration: not accessible","COMPLETION_CONFIG_NAME_RESERVED":"Completions configuration: name reserved","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Completions configuration: name already exists","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Completions configuration: visibility change not allowed"}}');var XG;XG=JSON.parse('{"yes":"Oui","no":"Non","confirm":"Confirmer","apply":"Appliquer","cancel":"Annuler","show":"Montrer","hide":"Cacher","send":"Envoyer","close":"Fermer","edit":"Modifier","delete":"Supprimer","loading":"Chargement","expand":"Développer","collapse":"Effondrement","fullscreenEnter":"Entrez en plein écran","fullscreenExit":"Quitter le plein écran","center":"Centre","bottom":"Bas","hidden":"Caché","day":"Jour","month":"Mois","year":"Année","createdAt":"Date de création","selected":"Choisi","page":"page","actions":"Actes","next":"Suivant","previous":"Précédent","copy":"Copie","copyRawCode":"Copier le code brut","copyToClipboard":"Copier dans le presse-papier","showOriginalText":"Afficher l\'original","showTranslatedText":"Afficher la traduction","exactPosition":"Position exacte","uncertain":"Incertain","question":"Question","nothingFound":"Rien trouvé","venue":"Lieu","searchVenue":"Rechercher un lieu...","memoriBlockedTitle":"Bloqué","memoriBlockedUntil":"Memori bloqué jusqu\'à {{date}}","memoriBlockedAnon":"Actuellement \\"{{name}}\\"Je ne peux pas répondre, reviens ici {{date}}","memoriBlockedReasonExceedChats":"car il a dépassé le seuil mensuel de chats autorisés.","memoriBlockedGiverHelper":"Vous pouvez toujours le gérer en tant qu\'administrateur, mais les autres utilisateurs ne pourront pas interagir avec lui.","generatedByAI":"Réponse générée par l\'IA, peut occasionnellement générer des informations incorrectes","whyThisAnswer":"Pourquoi cette réponse ?","whyThisAnswerHelper":"Cette réponse a été générée automatiquement par une intelligence artificielle basée sur ces contenus vérifiés.","completionsEnabled":"L\'IA avancée peut répondre avec des réponses générées automatiquement qui peuvent parfois contenir des informations incorrectes","completionProviderDown":"Ce Twin est intégré à une IA générative de {{provider}}, mais il est actuellement indisponible. ","completionProviderFallbackName":"un prestataire externe","completionProviderCheckStatusPage":"Vérifier la page d\'état","boardOfExperts":"Conseil d\'experts","birthDate":"Date de naissance","birthDateHelper":"Nous demandons votre date de naissance uniquement pour activer ou désactiver les fonctionnalités qui ont des restrictions d\'âge","underage":"Vous devez être au moins {{age}} ans pour s\'inscrire.","underageTwinSession":"Vous devez être au moins {{age}} ans pour interagir avec ce Twin.","ageVerification":"Vérification de l\'âge","ageVerificationText":"Pour interagir avec ce Twin, vous devez être au minimum {{minAge}} ans.","nsfw":"NSFW : Ce jumeau contient du contenu pour adultes","deepThought":"Pensée profonde","deepThoughtHelper":"Deep Thought est une fonctionnalité avancée de l\'IA qui vous permettra d\'exploiter pleinement vos conversations en les gardant une trace. ","deepThoughtDisclaimerTitle":"Pensée profonde activée","deepThoughtDisclaimer":"Deep Thought est une fonctionnalité avancée de l\'IA qui vous permettra d\'exploiter pleinement vos conversations en les gardant une trace. ","deepThoughtPreDisclaimerUnlogged":"Connectez-vous pour activer Deep Thought.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought est désactivé car vous n\'avez pas consenti à son utilisation, vous pouvez le modifier à tout moment dans les paramètres de votre compte.","notEnoughCredits":"L\'auteur de ce Twin n\'a pas suffisamment de crédits pour répondre à votre question.","knownFacts":{"title":"Faits connus","description":"Détails des informations partagées entre vous et {{memoriName}}","type":"Taper","typeShortTerm":"Court terme","typeLongTerm":"Long terme","typeHelper":"Types :\\n","text":"Texte","deleteSuccess":"Fait connu supprimé","deleteConfirmTitle":"Supprimer un fait connu","deleteConfirmMessage":"Êtes-vous sûr de vouloir supprimer ce fait connu ?","deleteSelectedConfirmTitle":"Supprimer les faits connus sélectionnés","deleteSelectedConfirmMessage":"Etes-vous sûr de vouloir supprimer les faits connus sélectionnés ?"},"auth":{"title":"Authentification","useRecoveryTokens":"Utiliser des jetons de récupération","tokens":"Jetons","addToken":"Ajouter un jeton","usePassword":"Utiliser le mot de passe","atLeast":"Au moins"},"widget":{"instruct":"Instruire","test":"Test","sound":"Son","position":"Préférences de position","settings":"Paramètres","share":"Partager","sendOnKeypress":"Appuyez sur Entrée pour envoyer","sendOnClick":"Cliquez sur Soumettre","boardOfExperts":"Conseil d\'experts","showExpertsInTheBoard":"Afficher les experts dans ce forum","expertsInTheBoard":"Experts dans ce forum","goToIntegrationsToCustomizeAvatar":"Pour personnaliser l\'avatar, allez dans Partager et personnalisez la page publique"},"write_and_speak":{"micButtonPopover":"Cliquez sur le bouton pour parler","micButtonPopoverListening":"Cliquez sur le bouton pour arrêter de parler","pageInstructExplanation":"Pour m\'apprendre de nouvelles choses, cliquez sur le bouton INSTRUCTEZ-MOI pour commencer","pageTryMeExplanation":"Pour me parler, cliquez sur le bouton START pour commencer","instructButton":"INSTRUCTEZ-MOI","tryMeButton":"COMMENCER","chatHistory":"Historique des discussions","exportChatHistory":"Exporter l\'historique des discussions","exportChatHistoryMessage":"Voulez-vous exporter l’historique des discussions ?","chatBotButtonText":"CLIQUEZ ICI POUR OUVRIR LE CHATBOT","conversationStartedLabel":"La conversation a commencé le","settingsHeaderLabel":"Configurez ici si vous souhaitez définir la mémoire comme parole continue et modifiez les secondes de silence si vous souhaitez les personnaliser.","continuousSpeechLabel":"Discours continu","holdToSpeak":"Attends pour parler","releaseToEndListening":"Relâcher pour terminer l\'écoute","pressAndHoldToSpeak":"Appuyez et maintenez pour parler","microphoneMode":"Mode micro","hideEmissionsLabel":"Masquer le texte émis par le Twin","secondsLabel":"Régler les secondes","controlsPosition":"Position des commandes","tryMeHeaderLabel":"ESSAYER","unknownPosition":"Position inconnue","fieldPlace":"Écrivez le lieu (par exemple « Milano »)","showMapLinkFor":"Afficher la position sur la carte","useMyPosition":"Utiliser ma position","myPosition":"Votre poste","updatingPosition":"Mise à jour du poste...","placeNotFound":"Lieu introuvable !","requirePosition":"Insérez votre position avant de commencer","requirePositionHelp":"Pour parler à {{name}} vous devez décider si vous souhaitez ou non fournir votre poste. ","dontWantToProvidePosition":"Je ne veux pas donner ma position","attachmentsLabel":"Enrichissez votre message","iWantToTalkToIn":"je veux parler à {{name}} dans"},"media":{"title":"Titre","editAttributes":"Modifier les attributs du média","uploadMimeTypeNotAllowed":"Le type de fichier n\'est pas autorisé","uploadSizeLimitMessage":"La taille téléchargée est trop grande (max {{size}}Mo)","uploadWrongResolutionMessage":"La résolution doit être {{width}}x{{height}} pixels","memoriNameAlreadyUsed":"Vous avez déjà un jumeau portant ce nom","uploadHelperImages":"Téléchargez un fichier avec l\'extension png, jpg, jpeg ou gif, et ayant au maximum une taille de {{size}}Mo","uploadHelper":"Téléchargez un fichier ayant au maximum une taille de {{size}}Mo","uploadError":"Échec du téléchargement","square":"carré","scaleRatio":"Rapport d\'échelle","addMediaLabel":"Ajouter un média","insertThisMediaMsg":"Insérez ces médias","mediaUploadMessage":"Cliquez pour charger un nouveau média","addLinkLabel":"Ajouter un lien","linkKey":"URL","linkValue":"Titre du lien","insertThisLink":"Insérer un lien vers {{url}} avec titre {{title}}"},"gamification":{"level":"Niveau","points":"points","memoriReachedLevel":"est devenu plus évolué et a atteint le niveau","levelGoToStatistics":"{{memori}} est au niveau {{level}} avec {{points}} points. ","congratulationsNewLevel":"Félicitations, vous avez atteint un nouveau niveau !","congratulationsNewLevelDescription":"Votre Memori est devenu plus évolué avec {{points}} points, regardez le","statistics":"statistiques"},"login":{"login":"Se connecter","logout":"Déconnexion","user":"Utilisateur","loggedDrawerTitle":"Salut, {{name}}!","loginDrawerTitle":"Se connecter","signupDrawerTitle":"S\'inscrire","newUserSignUp":"Nouvel utilisateur ?","signUp":"S\'inscrire!","alreadyHaveAnAccount":"Vous avez déjà un compte ?","backToLogin":"Retour à la connexion","registrationDisabled":"L\'inscription est désactivée","contactAdmin":"Contacter l\'administrateur pour demander l\'accès","userNameOrEmail":"Nom d\'utilisateur ou email","email":"E-mail","emailFormatError":"Veuillez insérer un email valide","username":"Nom d\'utilisateur","usernameContainsReservedWord":"Le nom d\'utilisateur contient un mot réservé, veuillez en choisir un autre","usernameFormatError":"Le nom d\'utilisateur doit comporter au moins 3 caractères et contenir uniquement des lettres, des chiffres et _","otpCode":"Le code de vérification","resendVerificationCode":"Renvoyer le code","resentVerificationCode":"Code de confirmation envoyé ! ","password":"Mot de passe","newPassword":"Nouveau mot de passe","confirmPassword":"Confirmez le mot de passe","currentPassword":"Mot de passe actuel","passwordMatchingError":"Les mots de passe ne correspondent pas.","passwordFormatError":"Le mot de passe doit comporter au moins 8 caractères et contenir au moins un chiffre, une lettre majuscule, une lettre minuscule et un symbole.","pwdWeak":"Faible","pwdAcceptable":"Acceptable","pwdStrong":"Fort","mustChangePassword":"Vous devez changer votre mot de passe","passwordChange":"Changer le mot de passe","emailChange":"Changer d\'e-mail","avatarChange":"Changer d\'avatar","underage":"Vous devez être au moins {{age}} ans pour s\'inscrire.","optional":"Facultatif","birthDate":"Date de naissance","birthDateHelper":"Nous demandons votre date de naissance uniquement pour activer ou désactiver les fonctionnalités qui ont des restrictions d\'âge","missingData":"Informations manquantes","missingDataHelper":"Nous savons que c\'est un peu ennuyeux, mais nous avons besoin de plus d\'informations pour finaliser votre inscription.","goToAccountToChangeYourPreferences":"Vous pouvez modifier votre choix à tout moment depuis la page de votre compte.","deepThoughtExplaination":"Deep Thought est une fonctionnalité avancée de l\'IA qui vous permettra d\'exploiter pleinement vos conversations en les gardant une trace. ","tnCAndPPAcceptedHelper":"Depuis votre dernière connexion, les conditions générales et la politique de confidentialité ont changé. ","privacyLabel":"J\'ai lu et accepté le","privacyAndCookiePolicy":"Politique de confidentialité et de cookies","and":"et","termsOfService":"Conditions d\'utilisation","pAndCUAccepted":"J\'accepte les conditions d\'utilisation de Deep Thought","editAccount":"Modifier le compte","save":"Sauvegarder"},"success":"Succès","Error":"Erreur","internal server error":"Oupsie, désolé... Quelque chose s\'est mal passé sur le serveur","error":"Erreur","error.loading":"Erreur lors du chargement du contenu.","error.generic":"Oupsie, désolé... quelque chose s\'est mal passé.","error.serverNotResponding":"Nous effectuons une maintenance ou publions des mises à jour. ","error.notFound":"Oupsie, nous n\'avons pas trouvé la page que vous cherchiez.","error.goBackTo":"Vous pouvez essayer de revenir au","error.reloadPage":"Recharger la page","error.tryAgain":"Essayer à nouveau","error.unauthorized":"Vous n\'êtes pas autorisé à consulter ce contenu.","error.unprocessableEntity":"Erreur lors du traitement de la demande. ","errors":{"TENANT_NOT_FOUND":"Locataire introuvable","TENANT_REGISTRATION_DISABLED":"L\'inscription sur cette plateforme est désactivée","TENANT_MISSING_NAME":"Locataire : nom manquant","TENANT_MAX_USERS_REACHED":"Nombre maximum d\'utilisateurs atteint","TENANT_MAX_ADMINS_REACHED":"Nombre maximum d\'utilisateurs administrateurs atteint","TENANT_ALREADY_EXISTS":"Le locataire existe déjà","TENANT_MISSING_DESCRIPTION":"Locataire : description manquante","TENANT_CANT_SET_COMPLETION_PROVIDER":"Locataire : impossible de définir le fournisseur de complétion","USER_NOT_CONFIRMED":"L\'utilisateur n\'est toujours pas confirmé","USER_NOT_FOUND":"Utilisateur introuvable","USER_OR_PASSWORD_INVALID":"Utilisateur ou mot de passe invalide","USER_MUST_CHANGE_PASSWORD":"Vous devez changer votre mot de passe","USER_MUST_ENTER_VERIFICATION_CODE":"Vous devez entrer le code de vérification","USER_MISSING_TENANT":"Utilisateur : locataire manquant","USER_MISSING_NAME":"Utilisateur : le nom est manquant","USER_MISSING_PASSWORD":"Utilisateur : mot de passe manquant","USER_MISSING_EMAIL":"Utilisateur : E-mail manquant","USER_MISSING_VERIFICATION_CODE":"Utilisateur : Code de vérification manquant","USER_NAME_ALREADY_USED":"Nom d\'utilisateur déjà utilisé","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"Le mot de passe ne répond pas aux règles de sécurité","USER_EMAIL_ALREADY_USED":"E-mail déjà utilisé","USER_EMAIL_INVALID":"E-mail invalide","USER_VERIFICATION_CODE_INVALID":"Code de vérification invalide","USER_MISSING_NAME_OR_EMAIL":"Nom d\'utilisateur ou e-mail manquant","USER_NAME_INVALID":"Nom d\'utilisateur invalide","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utilisateur possède une ou plusieurs mémoires","USER_MISSING_NEW_PASSWORD":"Utilisateur : nouveau mot de passe manquant","USER_NOTHING_TO_DO":"Rien à faire","USER_CANT_CREATE_MEMORI":"L\'utilisateur n\'est pas autorisé à créer des Memori","USER_MAX_MEMORI_REACHED":"Nombre maximum de Memori atteint","USER_TOO_MANY_ATTEMPTS":"Trop de tentatives","USER_MUST_ACCEPT_TNC_AND_PP":"Vous devez accepter les termes et conditions","USER_BIRTH_DATE_CANT_BE_CHANGED":"La date de naissance ne peut pas être modifiée","USER_CANT_SET_COMPLETION_PROVIDER":"Utilisateur : non autorisé à gérer le fournisseur de complétion","USER_CANT_ENABLE_DEEP_THOUGHT":"Utilisateur : non autorisé à gérer Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"Utilisateur : non autorisé à gérer l\'intégration DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Utilisateur : non autorisé à gérer des chaînages ou des groupes d\'experts","USER_CREATION_BILLING_DENIED_PERMISSION":"Vous n\'avez pas assez de crédits pour créer un Twin","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"L\'utilisateur dispose d\'une ou plusieurs configurations de complétion","USER_CANT_BE_DELETED":"L\'utilisateur ne peut pas être supprimé","MEMORI_NOT_FOUND":"Mémoire introuvable","MEMORI_NOT_ACCESSIBLE":"Mémoires non accessibles","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Seul le propriétaire peut modifier le tag ou le code PIN","SESSION_NOT_FOUND":"Séance introuvable","SESSION_IS_NOT_ADMINISTRATIVE":"Séance non administrative","SESSION_EXPIRED":"Session expirée","MEMORI_MISSING_CONFIGURATION":"Twin : configuration manquante","MEMORI_CONFIGURATION_NOT_FOUND":"Twin : configuration introuvable","MEMORI_INVALID_PRIVACY_TYPE":"Twin : type de confidentialité non valide","MEMORI_MISSING_PASSWORD":"Twin : mot de passe manquant","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Twin : nombre total de jetons de récupération invalides","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Twin : nombre minimum de jetons de récupération invalides","MEMORI_INVALID_VOICE_TYPE":"Twin : type de voix invalide","MEMORI_MISSING_NAME":"Jumeau : nom manquant","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Twin : mot de passe ou jeton de récupération manquant","MEMORI_INVALID_ID":"Jumeau : pièce d\'identité invalide","MEMORI_NAME_ALREADY_USED":"Nom jumeau déjà utilisé","MEMORI_INVALID_PIN":"Twin : code PIN invalide","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Twin : le changement de TAG et de PIN nécessite des opérations distinctes","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Twin : aucun mot de passe requis lorsqu\'il est public","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought nécessite que les complétions soient activées","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Le groupe d\'experts exige que les complétions soient activées","MEMORI_INVALID_COMPLETION_CONFIG":"Twin : configuration des complétions non valide","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfert : utilisateur de destination manquant","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfert : ID utilisateur de destination non valide","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfert : données utilisateur de destination non valides","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfert : rien à faire","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Mémoires : la configuration ne peut pas être modifiée","MEMORI_MISSING_NEW_PASSWORD":"Souvenirs : nouveau mot de passe manquant","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"La fonctionnalité nécessite un abonnement","INTEGRATION_NOT_FOUND":"Intégration introuvable","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Date invalide du format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Date à formater invalide","INTEGRATION_INVALID_TYPE":"Type d\'intégration invalide","INTEGRATION_ALREADY_EXISTS":"L\'intégration existe déjà","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Les mémoires non publiques ne peuvent pas être intégrées","INTEGRATION_MISSING_INVOCATION_TEXT":"Intégration : texte d\'invocation manquant","INTEGRATION_MISSING_DEVICE_EMAILS":"Intégration : e-mail de l\'appareil manquant","INTEGRATION_MEMORI_IS_EMPTY":"Les mémoires vides ne peuvent pas être intégrées","INTEGRATION_MISSING_PRIVACY_POLICY":"Intégration : politique de confidentialité manquante","INTEGRATION_MISSING_CATEGORY":"Catégorie d\'intégration manquante","INTEGRATION_MISSING_DESCRIPTION":"Description de l\'intégration manquante","INTEGRATION_INVALID_INVOCATION_TEXT":"Texte d\'appel invalide","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home n\'est plus disponible","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Le téléchargement nécessite un codage en plusieurs parties","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Téléchargement : limite de type de contenu manquante","UPLOAD_MAX_LENGTH_EXCEEDED":"Téléchargement : taille maximale dépassée","UPLOAD_FILE_IS_EMPTY":"Télécharger : fichier vide","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Téléchargement : type de fichier ou signature non valide","UPLOAD_MISSING_FILE_NAME":"Télécharger : nom de fichier manquant","UPLOAD_INVALID_MEMORY_ID":"Télécharger : ID de contenu invalide","UPLOAD_MISSING_FILE_CONTENT":"Télécharger : contenu du fichier manquant","ASSET_NOT_FOUND":"Actif introuvable","ASSET_NOT_ACCESSIBLE":"Actif non accessible","ASSET_MISSING_SESSION_ID":"Élément : ID de session manquant","ASSET_INVALID_FILE_NAME":"Élément : nom de fichier non valide","INVITATION_NOT_FOUND":"Invitation introuvable","INVITATION_NOT_ACCESSIBLE":"Invitation non accessible","INVITATION_ALREADY_ACCEPTED":"Invitation déjà acceptée","INVITATION_ALREADY_REJECTED":"Invitation déjà rejetée","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation : e-mail de destination manquant","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation : e-mail de destination invalide","INVITATION_MISSING_TAG":"Invitation : étiquette manquante","INVITATION_MISSING_PIN":"Invitation : code PIN manquant","INVITATION_INVALID_PIN":"Invitation : code PIN invalide","INVITATION_INVALID_TYPE":"Invitation : type non valide","INVITATION_MISSING_DESTINATION_NAME":"Invitation : le nom de la destination est manquant","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation : le tag et le code PIN ne peuvent pas être modifiés","INVITATION_CANT_BE_CHANGED":"Intation : ne peut pas être modifié","ACTIONLOG_INVALID_USER_ID":"ID utilisateur invalide","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date de : format non valide","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date de : format non valide","ACTIONLOG_INVALID_MEMORI_ID":"Identifiant Memori invalide","CONSUMPTIONLOG_INVALID_TYPE":"Type de journal invalide","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date de : format non valide","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date de : format non valide","CONSUMPTIONLOG_INVALID_USER_ID":"ID utilisateur invalide","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Identifiant Memori invalide","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifications : période d\'extraction du journal de discussion non valide","PROCESS_INVALID_TYPE":"Type de processus invalide","PROCESS_ALREADY_RUNNING":"Processus déjà en cours","PROCESS_NOT_FOUND":"Processus introuvable","IMPORTCSV_MISSING_ROWS":"Import CSV : lignes manquantes","IMPORTCSV_MISSING_CSV":"Importation CSV : CSV manquant","IMPORTCSV_MISSING_SEPARATOR":"Import CSV : séparateur manquant","IMPORTCSV_INVALID_SEPARATOR":"Importation CSV : séparateur non valide","IMPORTCSV_MISSING_HEADERS":"Import CSV : en-têtes manquants","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Import CSV : séparateur de variante de titre manquant","IMPORTCSV_INVALID_RECEIVER_ID":"Importation CSV : ID de destinataire non valide","IMPORTCSV_INVALID_MEDIA_LINK":"Importation CSV : lien média non valide","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"Importation CSV : titre du lien invalide","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Import CSV : encodage de caractères indétectable","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importation CSV : impossible d\'importer dans les mémoires secrètes","IMPORTTXT_MISSING_ROWS":"Importation de TXT : lignes manquantes","IMPORTTXT_INVALID_GRANULARITY":"Importer TXT : granularité invalide","IMPORTTXT_INVALID_RECEIVER_ID":"Importer TXT : ID de destinataire invalide","IMPORTTXT_INVALID_MEDIA_LINK":"Importer TXT : lien média non valide","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Importer TXT : titre du lien invalide","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Import TXT : encodage de caractères indétectable","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importation TXT : impossible d\'importer vers les mémoires secrètes","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importer TXT : limite d\'importation dépassée","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importer TXT : l\'importation sur GPT-4 nécessite une clé API","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importer TXT : l\'importation nécessite un forfait payant","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importer TXT : vous n\'avez pas assez de crédits pour l\'opération","EXPORTCSV_MISSING_CSV_SPECS":"Exportation CSV : spécifications CSV manquantes","EXPORTCSV_MISSING_SEPARATOR":"Export CSV : séparateur manquant","EXPORTCSV_INVALID_SEPARATOR":"Exportation CSV : séparateur non valide","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Exportation CSV : séparateur de variante de titre manquant","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Exportation CSV : caractère de nouvelle ligne manquant","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Exportation CSV : caractère de nouvelle ligne non valide","EXPORTCSV_MISSING_PASSWORD":"Export CSV : mot de passe manquant","EXPORTJSONL_MISSING_JSONL_SPECS":"Export JSONL : spécifications JSONL manquantes","EXPORTJSONL_MISSING_PLATFORM":"Export JSONL : plateforme manquante","EXPORTJSONL_INVALID_PLATFORM":"Export JSONL : plateforme non valide","EXPORTJSONL_MISSING_PASSWORD":"Export JSONL : mot de passe manquant","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Exportation JSONL : l\'exportation nécessite un forfait payant","ANALYSIS_MISSING_QUERY":"Analyse : requête manquante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analyse : impossible d\'analyser les souvenirs secrets","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analyse : la correspondance avec la requête de l\'utilisateur nécessite une réflexion approfondie","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Attribution des badges : identifiants incorrects ou manquants","BADGE_ASSIGNMENT_MISSING_REF_ID":"Affectation du badge : ID de référence manquant","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Attribution des badges : résultat introuvable","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Attribution du badge : URL d\'assertion manquante","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Attribution du badge : URL du badge manquante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Attribution du badge : URL de l\'émetteur manquante","BADGE_ASSIGNMENT_INVALID_URL":"Attribution du badge : URL invalide","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Affectation du badge : destinataire manquant","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Attribution du badge : type de destinataire inconnu","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Attribution du badge : identité du destinataire manquante","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Attribution du badge : type de hachage du destinataire manquant","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Attribution du badge : type de hachage du destinataire inconnu","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Attribution du badge : identité du destinataire incorrecte","BADGE_NOT_FOUND":"Badge introuvable","OUTCOME_NO_DCM_CONFIGURED":"Résultat : aucun DCM configuré","OUTCOME_USER_BADGES_DISABLED":"Résultat : badges utilisateur désactivés","COMPLETION_CONFIG_MISSING_NAME":"Configuration des complétions : nom manquant","COMPLETION_CONFIG_MISSING_PROVIDER":"Configuration des complétions : fournisseur manquant","COMPLETION_CONFIG_MISSING_ENDPOINT":"Configuration des complétions : point de terminaison manquant","COMPLETION_CONFIG_MISSING_API_KEY":"Configuration des complétions : clé API manquante","COMPLETION_CONFIG_MISSING_MODEL":"Configuration des complétions : modèle manquant","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Configuration des complétions : au moins un type de complétions doit être spécifié","COMPLETION_CONFIG_INVALID_NAME":"Configuration des complétions: nom non valide","COMPLETION_CONFIG_INVALID_PURPOSE":"Configuration des complétions : type de complétions non valide","COMPLETION_CONFIG_INVALID_ENDPOINT":"Configuration des achèvements : point de terminaison non valide","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Configuration des complétions : point de terminaison incohérent","COMPLETION_CONFIG_INVALID_PROVIDER":"Configuration des complétions : fournisseur non valide","COMPLETION_CONFIG_NOT_FOUND":"Configuration des complétions : introuvable","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Configuration des complétions : non accessible","COMPLETION_CONFIG_NAME_RESERVED":"Configuration des complétions : nom réservé","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Configuration des complétions : le nom existe déjà","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Configuration des complétions : changement de visibilité non autorisé"}}');var QG;QG=JSON.parse('{"yes":"Ja","no":"NEIN","confirm":"Bestätigen","apply":"Anwenden","cancel":"Stornieren","show":"Zeigen","hide":"Verstecken","send":"Schicken","close":"Schließen","edit":"Bearbeiten","delete":"Löschen","loading":"Laden","expand":"Expandieren","collapse":"Zusammenbruch","fullscreenEnter":"Geben Sie den Vollbildmodus ein","fullscreenExit":"Beenden Sie den Vollbildmodus","center":"Center","bottom":"Unten","hidden":"Versteckt","day":"Tag","month":"Monat","year":"Jahr","createdAt":"Erstellungsdatum","selected":"Ausgewählt","page":"Seite","actions":"Aktionen","next":"Nächste","previous":"Vorherige","copy":"Kopie","copyRawCode":"Rohcode kopieren","copyToClipboard":"In die Zwischenablage kopieren","showOriginalText":"Original anzeigen","showTranslatedText":"Übersetzung anzeigen","exactPosition":"Genaue Position","uncertain":"Unsicher","question":"Frage","nothingFound":"Nichts gefunden","venue":"Veranstaltungsort","searchVenue":"Veranstaltungsort suchen...","memoriBlockedTitle":"Blockiert","memoriBlockedUntil":"Memori blockiert bis {{date}}","memoriBlockedAnon":"Momentan \\"{{name}}„Kann nicht antworten, komm hierher zurück {{date}}","memoriBlockedReasonExceedChats":"weil der monatliche Schwellenwert für erlaubte Chats überschritten wurde.","memoriBlockedGiverHelper":"Sie können es weiterhin als Administrator verwalten, andere Benutzer können jedoch nicht damit interagieren.","generatedByAI":"Von KI generierte Antworten können gelegentlich falsche Informationen generieren","whyThisAnswer":"Warum diese Antwort?","whyThisAnswerHelper":"Diese Antwort wurde automatisch von einer künstlichen Intelligenz auf Basis dieser verifizierten Inhalte generiert.","completionsEnabled":"Fortschrittliche KI kann mit automatisch generierten Antworten reagieren, die manchmal falsche Informationen enthalten können","completionProviderDown":"Dieser Zwilling ist mit einer generativen KI von integriert {{provider}}, aber es ist derzeit nicht verfügbar. ","completionProviderFallbackName":"ein externer Anbieter","completionProviderCheckStatusPage":"Überprüfen Sie die Statusseite","boardOfExperts":"Expertengremium","birthDate":"Geburtsdatum","birthDateHelper":"Wir fragen nur nach Ihrem Geburtsdatum, um Funktionen zu aktivieren oder zu deaktivieren, für die Altersbeschränkungen gelten","underage":"Das müssen Sie mindestens sein {{age}} Jahre alt, um sich anzumelden.","underageTwinSession":"Das müssen Sie mindestens sein {{age}} Jahre alt, um mit diesem Zwilling zu interagieren.","ageVerification":"Altersüberprüfung","ageVerificationText":"Um mit diesem Zwilling interagieren zu können, müssen Sie mindestens sein {{minAge}} Jahre alt.","nsfw":"NSFW: Dieser Twin enthält Inhalte für Erwachsene","deepThought":"Tiefer Gedanke","deepThoughtHelper":"Deep Thought ist eine erweiterte Funktion der KI, die es Ihnen ermöglicht, Ihre Gespräche voll auszuschöpfen, indem Sie sie verfolgen. ","deepThoughtDisclaimerTitle":"Deep Thought aktiviert","deepThoughtDisclaimer":"Deep Thought ist eine erweiterte Funktion der KI, die es Ihnen ermöglicht, Ihre Gespräche voll auszuschöpfen, indem Sie sie verfolgen. ","deepThoughtPreDisclaimerUnlogged":"Melden Sie sich an, um Deep Thought zu aktivieren.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought ist deaktiviert, da Sie der Nutzung nicht zugestimmt haben. Sie können dies jederzeit in Ihren Kontoeinstellungen ändern.","notEnoughCredits":"Der Autor dieses Zwillings verfügt nicht über genügend Credits, um Ihre Frage zu beantworten.","knownFacts":{"title":"Bekannte Fakten","description":"Einzelheiten zu den Informationen, die zwischen Ihnen und geteilt werden {{memoriName}}","type":"Typ","typeShortTerm":"Kurzfristig","typeLongTerm":"Langfristig","typeHelper":"Typen:\\n","text":"Text","deleteSuccess":"Bekannte Tatsache gelöscht","deleteConfirmTitle":"Bekannte Tatsache löschen","deleteConfirmMessage":"Sind Sie sicher, dass Sie diese bekannte Tatsache löschen möchten?","deleteSelectedConfirmTitle":"Ausgewählte bekannte Fakten löschen","deleteSelectedConfirmMessage":"Sind Sie sicher, dass Sie die ausgewählten bekannten Fakten löschen möchten?"},"auth":{"title":"Authentifizierung","useRecoveryTokens":"Verwenden Sie Wiederherstellungstoken","tokens":"Token","addToken":"Token hinzufügen","usePassword":"Passwort verwenden","atLeast":"Mindestens"},"widget":{"instruct":"Anweisen","test":"Prüfen","sound":"Klang","position":"Positionspräferenzen","settings":"Einstellungen","share":"Aktie","sendOnKeypress":"Drücken Sie zum Senden die Eingabetaste","sendOnClick":"Klicken Sie auf Senden","boardOfExperts":"Expertengremium","showExpertsInTheBoard":"Experten in diesem Forum anzeigen","expertsInTheBoard":"Experten in diesem Forum","goToIntegrationsToCustomizeAvatar":"Um den Avatar anzupassen, gehen Sie zu „Teilen“ und passen Sie die öffentliche Seite an"},"write_and_speak":{"micButtonPopover":"Klicken Sie auf die Schaltfläche, um zu sprechen","micButtonPopoverListening":"Klicken Sie auf die Schaltfläche, um das Sprechen zu stoppen","pageInstructExplanation":"Um mir neue Dinge beizubringen, klicken Sie auf die Schaltfläche „ANLEITEN“, um zu beginnen","pageTryMeExplanation":"Um mit mir zu sprechen, klicken Sie auf die Schaltfläche START, um zu beginnen","instructButton":"WEISE MICH AN","tryMeButton":"START","chatHistory":"Chatverlauf","exportChatHistory":"Chatverlauf exportieren","exportChatHistoryMessage":"Möchten Sie den Chatverlauf exportieren?","chatBotButtonText":"KLICKEN SIE HIER, UM CHATBOT ZU ÖFFNEN","conversationStartedLabel":"Das Gespräch begann am","settingsHeaderLabel":"Richten Sie hier ein, wenn Sie die Memori als Dauerrede einstellen möchten, und ändern Sie die Stillesekunden, wenn Sie sie anpassen möchten.","continuousSpeechLabel":"Kontinuierliche Rede","holdToSpeak":"Halten Sie gedrückt, um zu sprechen","releaseToEndListening":"Lassen Sie los, um das Hören zu beenden","pressAndHoldToSpeak":"Zum Sprechen gedrückt halten","microphoneMode":"Mikrofonmodus","hideEmissionsLabel":"Vom Zwilling ausgegebenen Text ausblenden","secondsLabel":"Sekunden einstellen","controlsPosition":"Steuert die Position","tryMeHeaderLabel":"VERSUCHEN","unknownPosition":"Unbekannte Position","fieldPlace":"Geben Sie den Ort ein (z. B. „Mailand“)","showMapLinkFor":"Zeigen Sie die Position auf der Karte an","useMyPosition":"Nutzen Sie meine Position","myPosition":"Ihre Position","updatingPosition":"Position wird aktualisiert...","placeNotFound":"Ort nicht gefunden!","requirePosition":"Geben Sie vor dem Start Ihre Position ein","requirePositionHelp":"Zum Reden {{name}} Sie müssen entscheiden, ob Sie Ihre Position angeben oder nicht. ","dontWantToProvidePosition":"Ich möchte meine Position nicht bekannt geben","attachmentsLabel":"Bereichern Sie Ihre Botschaft","iWantToTalkToIn":"Ich möchte mit reden {{name}} In"},"media":{"title":"Titel","editAttributes":"Medienattribute bearbeiten","uploadMimeTypeNotAllowed":"Der Dateityp ist nicht zulässig","uploadSizeLimitMessage":"Die hochgeladene Größe ist zu groß (max {{size}}MB)","uploadWrongResolutionMessage":"Die Auflösung muss sein {{width}}X{{height}} Pixel","memoriNameAlreadyUsed":"Du hast bereits einen Zwilling mit diesem Namen","uploadHelperImages":"Laden Sie eine Datei mit der Erweiterung PNG, JPG, JPEG oder GIF hoch und darf maximal eine Größe von haben {{size}}MB","uploadHelper":"Laden Sie eine Datei mit einer maximalen Größe von hoch {{size}}MB","uploadError":"Der Upload ist fehlgeschlagen","square":"Quadrat","scaleRatio":"Maßstabsverhältnis","addMediaLabel":"Fügen Sie ein Medium hinzu","insertThisMediaMsg":"Legen Sie diese Medien ein","mediaUploadMessage":"Klicken Sie hier, um ein neues Medium zu laden","addLinkLabel":"Fügen Sie einen Link hinzu","linkKey":"URL","linkValue":"Linktitel","insertThisLink":"Fügen Sie einen Link ein {{url}} mit Titel {{title}}"},"gamification":{"level":"Ebene","points":"Punkte","memoriReachedLevel":"entwickelte sich weiter und erreichte ein höheres Niveau","levelGoToStatistics":"{{memori}} ist auf gleicher Höhe {{level}} mit {{points}} Punkte. ","congratulationsNewLevel":"Herzlichen Glückwunsch, Sie haben ein neues Level erreicht!","congratulationsNewLevelDescription":"Ihre Memori wurden mit weiterentwickelt {{points}} Punkte, schauen Sie sich die an","statistics":"Statistiken"},"login":{"login":"Login","logout":"Abmelden","user":"Benutzer","loggedDrawerTitle":"Hallo, {{name}}!","loginDrawerTitle":"Login","signupDrawerTitle":"Melden Sie sich an","newUserSignUp":"Neuer Benutzer?","signUp":"Melden Sie sich an!","alreadyHaveAnAccount":"Sie haben bereits ein Konto?","backToLogin":"Zurück zum Login","registrationDisabled":"Die Registrierung ist deaktiviert","contactAdmin":"Wenden Sie sich an den Administrator, um Zugriff anzufordern","userNameOrEmail":"Benutzername oder E-Mail","email":"E-Mail","emailFormatError":"Bitte geben Sie eine gültige E-Mail-Adresse ein","username":"Benutzername","usernameContainsReservedWord":"Der Benutzername enthält ein reserviertes Wort. Bitte wählen Sie ein anderes","usernameFormatError":"Der Benutzername muss mindestens 3 Zeichen lang sein und darf nur Buchstaben, Zahlen und _ enthalten.","otpCode":"Bestätigungscode","resendVerificationCode":"Code erneut senden","resentVerificationCode":"Bestätigungscode gesendet! ","password":"Passwort","newPassword":"Neues Passwort","confirmPassword":"Passwort bestätigen","currentPassword":"Aktuelles Passwort","passwordMatchingError":"Passwörter stimmen nicht überein.","passwordFormatError":"Das Passwort muss mindestens 8 Zeichen lang sein und mindestens eine Zahl, einen Großbuchstaben, einen Kleinbuchstaben und ein Symbol enthalten","pwdWeak":"Schwach","pwdAcceptable":"Akzeptabel","pwdStrong":"Stark","mustChangePassword":"Sie müssen Ihr Passwort ändern","passwordChange":"Kennwort ändern","emailChange":"E-Mail ändern","avatarChange":"Avatar ändern","underage":"Das müssen Sie mindestens sein {{age}} Jahre alt, um sich anzumelden.","optional":"Optional","birthDate":"Geburtsdatum","birthDateHelper":"Wir fragen nur nach Ihrem Geburtsdatum, um Funktionen zu aktivieren oder zu deaktivieren, für die Altersbeschränkungen gelten","missingData":"Fehlende Informationen","missingDataHelper":"Wir wissen, dass dies etwas nervig ist, benötigen jedoch noch einige weitere Informationen, um Ihre Registrierung abzuschließen.","goToAccountToChangeYourPreferences":"Sie können Ihre Auswahl jederzeit auf Ihrer Kontoseite ändern.","deepThoughtExplaination":"Deep Thought ist eine erweiterte Funktion der KI, die es Ihnen ermöglicht, Ihre Gespräche voll auszuschöpfen, indem Sie sie verfolgen. ","tnCAndPPAcceptedHelper":"Seit Ihrer letzten Anmeldung haben sich die AGB und Datenschutzbestimmungen geändert. ","privacyLabel":"Ich habe die gelesen und akzeptiert","privacyAndCookiePolicy":"Datenschutz und Cookie-Richtlinie","and":"Und","termsOfService":"Nutzungsbedingungen","pAndCUAccepted":"Ich akzeptiere die Nutzungsbedingungen von Deep Thought","editAccount":"Konto bearbeiten","save":"Speichern"},"success":"Erfolg","Error":"Fehler","internal server error":"Oupsie, tut mir leid... Auf dem Server ist ein Fehler aufgetreten","error":"Fehler","error.loading":"Fehler beim Laden des Inhalts.","error.generic":"Oupsie, tut mir leid ... etwas ist schief gelaufen.","error.serverNotResponding":"Wir führen Wartungsarbeiten durch oder veröffentlichen Updates. ","error.notFound":"Oupsie, wir haben die von Ihnen gesuchte Seite nicht gefunden.","error.goBackTo":"Sie können versuchen, dorthin zurückzukehren","error.reloadPage":"Laden Sie die Seite neu","error.tryAgain":"Versuchen Sie es erneut","error.unauthorized":"Es ist Ihnen nicht gestattet, diesen Inhalt anzuzeigen.","error.unprocessableEntity":"Fehler beim Verarbeiten der Anfrage. ","errors":{"TENANT_NOT_FOUND":"Mieter nicht gefunden","TENANT_REGISTRATION_DISABLED":"Die Registrierung auf dieser Plattform ist deaktiviert","TENANT_MISSING_NAME":"Mieter: Name fehlt","TENANT_MAX_USERS_REACHED":"Maximale Anzahl Benutzer erreicht","TENANT_MAX_ADMINS_REACHED":"Maximale Anzahl an Admin-Benutzern erreicht","TENANT_ALREADY_EXISTS":"Mieter existiert bereits","TENANT_MISSING_DESCRIPTION":"Mieter: Beschreibung fehlt","TENANT_CANT_SET_COMPLETION_PROVIDER":"Mandant: Abschlussanbieter kann nicht festgelegt werden","USER_NOT_CONFIRMED":"Benutzer noch nicht bestätigt","USER_NOT_FOUND":"Benutzer nicht gefunden","USER_OR_PASSWORD_INVALID":"Ungültiger Benutzer oder Passwort","USER_MUST_CHANGE_PASSWORD":"Sie müssen Ihr Passwort ändern","USER_MUST_ENTER_VERIFICATION_CODE":"Sie müssen den Bestätigungscode eingeben","USER_MISSING_TENANT":"Benutzer: Mieter fehlt","USER_MISSING_NAME":"Benutzer: Name fehlt","USER_MISSING_PASSWORD":"Benutzer: Passwort fehlt","USER_MISSING_EMAIL":"Benutzer: Fehlende E-Mail","USER_MISSING_VERIFICATION_CODE":"Benutzer: Fehlender Bestätigungscode","USER_NAME_ALREADY_USED":"Benutzername wird bereits verwendet","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"Das Passwort entspricht nicht den Sicherheitsregeln","USER_EMAIL_ALREADY_USED":"E-Mail wird bereits verwendet","USER_EMAIL_INVALID":"Ungültige E-Mail","USER_VERIFICATION_CODE_INVALID":"Ungültiger Bestätigungscode","USER_MISSING_NAME_OR_EMAIL":"Benutzername oder E-Mail fehlen","USER_NAME_INVALID":"Ungültiger Benutzername","USER_HAS_ONE_OR_MORE_MEMORI":"Der Benutzer verfügt über eine oder mehrere Erinnerungen","USER_MISSING_NEW_PASSWORD":"Benutzer: Neues Passwort fehlt","USER_NOTHING_TO_DO":"Nichts zu tun","USER_CANT_CREATE_MEMORI":"Benutzer darf Memori nicht erstellen","USER_MAX_MEMORI_REACHED":"Maximale Anzahl an Memori erreicht","USER_TOO_MANY_ATTEMPTS":"Zu viele Versuche","USER_MUST_ACCEPT_TNC_AND_PP":"Sie müssen die Allgemeinen Geschäftsbedingungen akzeptieren","USER_BIRTH_DATE_CANT_BE_CHANGED":"Das Geburtsdatum kann nicht geändert werden","USER_CANT_SET_COMPLETION_PROVIDER":"Benutzer: darf den Vervollständigungsanbieter nicht verwalten","USER_CANT_ENABLE_DEEP_THOUGHT":"Benutzer: nicht für die Verwaltung von Deep Thought aktiviert","USER_CANT_ENABLE_DCM_INTEGRATION":"Benutzer: nicht für die Verwaltung der DCM-Integration aktiviert","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Benutzer: darf die Verkettung oder Expertengruppe nicht verwalten","USER_CREATION_BILLING_DENIED_PERMISSION":"Sie haben nicht genügend Credits, um einen Zwilling zu erstellen","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"Der Benutzer verfügt über eine oder mehrere Abschlusskonfigurationen","USER_CANT_BE_DELETED":"Benutzer kann nicht gelöscht werden","MEMORI_NOT_FOUND":"Erinnerungen nicht gefunden","MEMORI_NOT_ACCESSIBLE":"Memori nicht zugänglich","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Nur der Eigentümer kann das Tag oder die PIN ändern","SESSION_NOT_FOUND":"Sitzung nicht gefunden","SESSION_IS_NOT_ADMINISTRATIVE":"Nicht-administrative Sitzung","SESSION_EXPIRED":"Sitzung abgelaufen","MEMORI_MISSING_CONFIGURATION":"Zwilling: fehlende Konfiguration","MEMORI_CONFIGURATION_NOT_FOUND":"Zwilling: Konfiguration nicht gefunden","MEMORI_INVALID_PRIVACY_TYPE":"Twin: ungültiger Datenschutztyp","MEMORI_MISSING_PASSWORD":"Zwilling: Passwort fehlt","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Twin: Gesamtzahl ungültiger Wiederherstellungstokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Twin: Mindestanzahl ungültiger Wiederherstellungstokens","MEMORI_INVALID_VOICE_TYPE":"Zwilling: ungültiger Stimmtyp","MEMORI_MISSING_NAME":"Zwilling: fehlender Name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Zwilling: Fehlendes Passwort oder Wiederherstellungstoken","MEMORI_INVALID_ID":"Zwilling: ungültige ID","MEMORI_NAME_ALREADY_USED":"Zwillingsname wird bereits verwendet","MEMORI_INVALID_PIN":"Zwilling: Ungültige PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Zwilling: TAG- und PIN-Änderung erfordern separate Vorgänge","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Zwilling: Im öffentlichen Zustand ist kein Passwort erforderlich","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Für „Deep Thought“ müssen Vervollständigungen aktiviert sein","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Für die Expertengruppe müssen Vervollständigungen aktiviert sein","MEMORI_INVALID_COMPLETION_CONFIG":"Zwilling: Ungültige Abschlusskonfiguration","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Übertragung: Zielbenutzer fehlt","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Übertragung: Ungültige Zielbenutzer-ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Übertragung: Ungültige Zielbenutzerdaten","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nichts zu tun","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Speicher: Konfiguration kann nicht geändert werden","MEMORI_MISSING_NEW_PASSWORD":"Erinnerungen: Neues Passwort fehlt","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Für die Funktion ist ein Abonnement erforderlich","INTEGRATION_NOT_FOUND":"Integration nicht gefunden","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Ungültiges Datum aus Format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Ungültiges Datum zum Formatieren","INTEGRATION_INVALID_TYPE":"Ungültiger Integrationstyp","INTEGRATION_ALREADY_EXISTS":"Die Integration ist bereits vorhanden","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Nicht-öffentliche Erinnerungen können nicht integriert werden","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: fehlender Aufruftext","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: Fehlende Geräte-E-Mail","INTEGRATION_MEMORI_IS_EMPTY":"Leere Erinnerungen können nicht integriert werden","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: Datenschutzrichtlinie fehlt","INTEGRATION_MISSING_CATEGORY":"Integrationskategorie fehlt","INTEGRATION_MISSING_DESCRIPTION":"Fehlende Integrationsbeschreibung","INTEGRATION_INVALID_INVOCATION_TEXT":"Ungültiger Aufruftext","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home nicht mehr verfügbar","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Für den Upload ist eine mehrteilige Kodierung erforderlich","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Hochladen: Inhaltstypgrenze fehlt","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: Maximale Größe überschritten","UPLOAD_FILE_IS_EMPTY":"Hochladen: leere Datei","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Hochladen: Ungültiger Dateityp oder ungültige Signatur","UPLOAD_MISSING_FILE_NAME":"Hochladen: Dateiname fehlt","UPLOAD_INVALID_MEMORY_ID":"Hochladen: Ungültige Inhalts-ID","UPLOAD_MISSING_FILE_CONTENT":"Hochladen: Dateiinhalt fehlt","ASSET_NOT_FOUND":"Asset nicht gefunden","ASSET_NOT_ACCESSIBLE":"Asset nicht zugänglich","ASSET_MISSING_SESSION_ID":"Asset: Sitzungs-ID fehlt","ASSET_INVALID_FILE_NAME":"Asset: ungültiger Dateiname","INVITATION_NOT_FOUND":"Einladung nicht gefunden","INVITATION_NOT_ACCESSIBLE":"Einladung nicht zugänglich","INVITATION_ALREADY_ACCEPTED":"Einladung bereits angenommen","INVITATION_ALREADY_REJECTED":"Einladung bereits abgelehnt","INVITATION_MISSING_DESTINATION_EMAIL":"Einladung: Ziel-E-Mail fehlt","INVITATION_DESTINATION_EMAIL_INVALID":"Einladung: Ziel-E-Mail-Adresse ungültig","INVITATION_MISSING_TAG":"Einladung: Tag fehlt","INVITATION_MISSING_PIN":"Einladung: PIN fehlt","INVITATION_INVALID_PIN":"Einladung: ungültige PIN","INVITATION_INVALID_TYPE":"Einladung: ungültiger Typ","INVITATION_MISSING_DESTINATION_NAME":"Einladung: Zielname fehlt","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Einladung: Tag und Pin können nicht geändert werden","INVITATION_CANT_BE_CHANGED":"Absicht: kann nicht geändert werden","ACTIONLOG_INVALID_USER_ID":"Ungültige Benutzer-ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Datum von: ungültiges Format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Datum bis: ungültiges Format","ACTIONLOG_INVALID_MEMORI_ID":"Ungültige Memori-ID","CONSUMPTIONLOG_INVALID_TYPE":"Ungültiger Protokolltyp","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Datum von: ungültiges Format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Datum bis: ungültiges Format","CONSUMPTIONLOG_INVALID_USER_ID":"Ungültige Benutzer-ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Ungültige Memori-ID","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Benachrichtigungen: Ungültiger Chat-Protokoll-Extraktionszeitraum","PROCESS_INVALID_TYPE":"Ungültiger Prozesstyp","PROCESS_ALREADY_RUNNING":"Prozess läuft bereits","PROCESS_NOT_FOUND":"Prozess nicht gefunden","IMPORTCSV_MISSING_ROWS":"CSV-Import: fehlende Zeilen","IMPORTCSV_MISSING_CSV":"CSV-Import: CSV fehlt","IMPORTCSV_MISSING_SEPARATOR":"CSV-Import: fehlendes Trennzeichen","IMPORTCSV_INVALID_SEPARATOR":"CSV-Import: Ungültiges Trennzeichen","IMPORTCSV_MISSING_HEADERS":"CSV-Import: fehlende Header","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV-Import: Titelvariantentrennzeichen fehlt","IMPORTCSV_INVALID_RECEIVER_ID":"CSV-Import: ungültige Empfänger-ID","IMPORTCSV_INVALID_MEDIA_LINK":"CSV-Import: Ungültiger Medienlink","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"CSV-Import: Ungültiger Linktitel","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"CSV-Import: Nicht erkennbare Zeichenkodierung","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"CSV-Import: Der Import in Secret Memories ist nicht möglich","IMPORTTXT_MISSING_ROWS":"TXT wird importiert: Zeilen fehlen","IMPORTTXT_INVALID_GRANULARITY":"TXT importieren: ungültige Granularität","IMPORTTXT_INVALID_RECEIVER_ID":"TXT importieren: ungültige Empfänger-ID","IMPORTTXT_INVALID_MEDIA_LINK":"TXT importieren: Ungültiger Medienlink","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"TXT importieren: ungültiger Linktitel","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"TXT-Import: Nicht erkennbare Zeichenkodierung","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"TXT-Import: Der Import in Secret Memories ist nicht möglich","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"TXT importieren: Importlimit überschritten","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"TXT importieren: Für den Import auf GPT-4 ist ein API-Schlüssel erforderlich","IMPORTTXT_IMPORT_REQUIRES_PAYING":"TXT importieren: Für den Import ist ein kostenpflichtiger Plan erforderlich","IMPORTTXT_BILLING_DENIED_PERMISSION":"TXT importieren: Sie haben nicht genügend Credits für den Vorgang","EXPORTCSV_MISSING_CSV_SPECS":"CSV-Export: CSV-Spezifikationen fehlen","EXPORTCSV_MISSING_SEPARATOR":"CSV-Export: fehlendes Trennzeichen","EXPORTCSV_INVALID_SEPARATOR":"CSV-Export: Ungültiges Trennzeichen","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV-Export: fehlendes Titelvarianten-Trennzeichen","EXPORTCSV_MISSING_NEW_LINE_CHAR":"CSV-Export: Fehlendes Zeilenumbruchzeichen","EXPORTCSV_INVALID_NEW_LINE_CHAR":"CSV-Export: Ungültiges Zeilenumbruchzeichen","EXPORTCSV_MISSING_PASSWORD":"CSV-Export: Passwort fehlt","EXPORTJSONL_MISSING_JSONL_SPECS":"JSONL-Export: JSONL-Spezifikationen fehlen","EXPORTJSONL_MISSING_PLATFORM":"JSONL-Export: fehlende Plattform","EXPORTJSONL_INVALID_PLATFORM":"JSONL-Export: ungültige Plattform","EXPORTJSONL_MISSING_PASSWORD":"JSONL-Export: Passwort fehlt","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"JSONL-Export: Für den Export ist ein kostenpflichtiger Plan erforderlich","ANALYSIS_MISSING_QUERY":"Analyse: fehlende Abfrage","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analyse: Geheime Erinnerungen können nicht analysiert werden","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analyse: Passende Benutzeranfragen erfordern tiefes Denken","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Ausweiszuweisung: falsche oder fehlende Zugangsdaten","BADGE_ASSIGNMENT_MISSING_REF_ID":"Badge-Zuordnung: Referenz-ID fehlt","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Badge-Zuweisung: Ergebnis nicht gefunden","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Badge-Zuweisung: Fehlende Behauptungs-URL","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Badge-Zuweisung: Badge-URL fehlt","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Badge-Zuweisung: Aussteller-URL fehlt","BADGE_ASSIGNMENT_INVALID_URL":"Badge-Zuweisung: Ungültige URL","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Ausweiszuordnung: fehlender Empfänger","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Badge-Zuordnung: unbekannter Empfängertyp","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Ausweiszuordnung: Empfängeridentität fehlt","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Badge-Zuweisung: Empfänger-Hash-Typ fehlt","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Badge-Zuweisung: Empfänger-Hash-Typ unbekannt","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Badge-Zuordnung: Falsche Empfängeridentität","BADGE_NOT_FOUND":"Abzeichen nicht gefunden","OUTCOME_NO_DCM_CONFIGURED":"Ergebnis: kein DCM konfiguriert","OUTCOME_USER_BADGES_DISABLED":"Ergebnis: Benutzerausweise deaktiviert","COMPLETION_CONFIG_MISSING_NAME":"Vervollständigungskonfiguration: Name fehlt","COMPLETION_CONFIG_MISSING_PROVIDER":"Vervollständigungskonfiguration: fehlender Anbieter","COMPLETION_CONFIG_MISSING_ENDPOINT":"Abschlusskonfiguration: fehlender Endpunkt","COMPLETION_CONFIG_MISSING_API_KEY":"Vervollständigungskonfiguration: fehlender API-Schlüssel","COMPLETION_CONFIG_MISSING_MODEL":"Vervollständigungskonfiguration: fehlendes Modell","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Vervollständigungskonfiguration: Es muss mindestens ein Vervollständigungstyp angegeben werden","COMPLETION_CONFIG_INVALID_NAME":"Vervollständigungskonfiguration: ungültiger Name","COMPLETION_CONFIG_INVALID_PURPOSE":"Vervollständigungskonfiguration: Ungültiger Vervollständigungstyp","COMPLETION_CONFIG_INVALID_ENDPOINT":"Abschlusskonfiguration: Ungültiger Endpunkt","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Abschlusskonfiguration: inkonsistenter Endpunkt","COMPLETION_CONFIG_INVALID_PROVIDER":"Vervollständigungskonfiguration: ungültiger Anbieter","COMPLETION_CONFIG_NOT_FOUND":"Vervollständigungskonfiguration: nicht gefunden","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Vervollständigungskonfiguration: nicht zugänglich","COMPLETION_CONFIG_NAME_RESERVED":"Vervollständigungskonfiguration: Name reserviert","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Vervollständigungskonfiguration: Name existiert bereits","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Vervollständigungskonfiguration: Änderung der Sichtbarkeit nicht zulässig"}}');var ZG;ZG=JSON.parse('{"yes":"Sí","no":"No","confirm":"Confirmar","apply":"Aplicar","cancel":"Cancelar","show":"Espectáculo","hide":"Esconder","send":"Enviar","close":"Cerca","edit":"Editar","delete":"Borrar","loading":"Cargando","expand":"Expandir","collapse":"Colapsar","fullscreenEnter":"Entrar en pantalla completa","fullscreenExit":"Salir de pantalla completa","center":"Centro","bottom":"Abajo","hidden":"Oculto","day":"Día","month":"Mes","year":"Año","createdAt":"Fecha de creación","selected":"Seleccionado","page":"página","actions":"Comportamiento","next":"Próximo","previous":"Anterior","copy":"Copiar","copyRawCode":"Copiar código sin formato","copyToClipboard":"Copiar al portapapeles","showOriginalText":"Mostrar original","showTranslatedText":"Mostrar traducción","exactPosition":"Posición exacta","uncertain":"Incierto","question":"Pregunta","nothingFound":"No se encontró nada","venue":"Evento","searchVenue":"Buscar lugar...","memoriBlockedTitle":"Obstruido","memoriBlockedUntil":"Memori bloqueado hasta {{date}}","memoriBlockedAnon":"Actualmente \\"{{name}}\\"No puedo responder, vuelve aquí. {{date}}","memoriBlockedReasonExceedChats":"porque ha superado el umbral mensual de chats permitidos.","memoriBlockedGiverHelper":"Aún podrás administrarlo como administrador, pero otros usuarios no podrán interactuar con él.","generatedByAI":"La respuesta generada por IA, ocasionalmente puede generar información incorrecta","whyThisAnswer":"¿Por qué esta respuesta?","whyThisAnswerHelper":"Esta respuesta fue generada automáticamente por una inteligencia artificial basada en estos contenidos verificados.","completionsEnabled":"La IA avanzada puede responder con respuestas generadas automáticamente que a veces pueden contener información incorrecta.","completionProviderDown":"Este Twin está integrado con una IA generativa de {{provider}}, pero actualmente no está disponible. ","completionProviderFallbackName":"un proveedor externo","completionProviderCheckStatusPage":"Comprobar página de estado","boardOfExperts":"junta de expertos","birthDate":"Fecha de nacimiento","birthDateHelper":"Solicitamos tu fecha de nacimiento únicamente para habilitar o deshabilitar funcionalidades que tienen restricciones de edad.","underage":"Debes ser al menos {{age}} años para inscribirse.","underageTwinSession":"Debes ser al menos {{age}} años para interactuar con este gemelo.","ageVerification":"Verificación de edad","ageVerificationText":"Para interactuar con este Gemelo, debes tener al menos {{minAge}} años.","nsfw":"NSFW: Este gemelo contiene contenido para adultos","deepThought":"pensamiento profundo","deepThoughtHelper":"Deep Thought es una característica avanzada de la IA que te permitirá explotar al máximo tus conversaciones al realizar un seguimiento de ellas. ","deepThoughtDisclaimerTitle":"Pensamiento profundo habilitado","deepThoughtDisclaimer":"Deep Thought es una característica avanzada de la IA que te permitirá explotar al máximo tus conversaciones al realizar un seguimiento de ellas. ","deepThoughtPreDisclaimerUnlogged":"Inicie sesión para habilitar Pensamiento profundo.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought está deshabilitado porque usted no dio su consentimiento para su uso; puede cambiar esto en cualquier momento en la configuración de su cuenta.","notEnoughCredits":"El autor de este Gemelo no tiene suficientes créditos para responder a tu pregunta.","knownFacts":{"title":"hechos conocidos","description":"Detalles de la información compartida entre usted y {{memoriName}}","type":"Tipo","typeShortTerm":"Corto plazo","typeLongTerm":"Largo plazo","typeHelper":"Tipos:\\n","text":"Texto","deleteSuccess":"Hecho conocido eliminado","deleteConfirmTitle":"Eliminar hecho conocido","deleteConfirmMessage":"¿Está seguro de que desea eliminar este hecho conocido?","deleteSelectedConfirmTitle":"Eliminar hechos conocidos seleccionados","deleteSelectedConfirmMessage":"¿Está seguro de que desea eliminar los hechos conocidos seleccionados?"},"auth":{"title":"Autenticación","useRecoveryTokens":"Utilice tokens de recuperación","tokens":"Fichas","addToken":"Agregar token","usePassword":"Usar contraseña","atLeast":"Al menos"},"widget":{"instruct":"Instruir","test":"Prueba","sound":"Sonido","position":"Preferencias de posición","settings":"Ajustes","share":"Compartir","sendOnKeypress":"Presiona Enter para enviar","sendOnClick":"Haga clic en Enviar","boardOfExperts":"junta de expertos","showExpertsInTheBoard":"Mostrar expertos en este foro","expertsInTheBoard":"Expertos en este foro","goToIntegrationsToCustomizeAvatar":"Para personalizar el avatar, vaya a Compartir y personalice la página pública."},"write_and_speak":{"micButtonPopover":"Haga clic en el botón para hablar","micButtonPopoverListening":"Haga clic en el botón para dejar de hablar.","pageInstructExplanation":"Para enseñarme cosas nuevas, haga clic en el botón INSTRUIRME para comenzar.","pageTryMeExplanation":"Para hablar conmigo haga clic en el botón INICIO para comenzar","instructButton":"INSTRUÍME","tryMeButton":"COMENZAR","chatHistory":"Historial de chat","exportChatHistory":"Exportar historial de chat","exportChatHistoryMessage":"¿Quieres exportar el historial de chat?","chatBotButtonText":"HAGA CLIC AQUÍ PARA ABRIR EL CHATBOT","conversationStartedLabel":"La conversación comenzó el","settingsHeaderLabel":"Configure aquí si desea configurar la memoria como voz continua y cambie los segundos de silencio si desea personalizarlos.","continuousSpeechLabel":"discurso continuo","holdToSpeak":"Mantenga para hablar","releaseToEndListening":"Suelte para finalizar la escucha","pressAndHoldToSpeak":"Mantenga presionado para hablar","microphoneMode":"Modo micrófono","hideEmissionsLabel":"Ocultar texto emitido por el Twin","secondsLabel":"Establecer segundos","controlsPosition":"Posición de los controles","tryMeHeaderLabel":"INTENTAR","unknownPosition":"Posición desconocida","fieldPlace":"Escribe el lugar (por ejemplo, \'Milano\')","showMapLinkFor":"Mostrar la posición en el mapa.","useMyPosition":"Usa mi posición","myPosition":"Tu posición","updatingPosition":"Actualizando posición...","placeNotFound":"¡Lugar no encontrado!","requirePosition":"Inserte su posición antes de comenzar","requirePositionHelp":"para hablar con {{name}} usted tiene que decidir si proporciona su puesto o no. ","dontWantToProvidePosition":"No quiero proporcionar mi puesto.","attachmentsLabel":"Enriquece tu mensaje","iWantToTalkToIn":"quiero hablar con {{name}} en"},"media":{"title":"Título","editAttributes":"Editar atributos de medios","uploadMimeTypeNotAllowed":"El tipo de archivo no está permitido.","uploadSizeLimitMessage":"El tamaño subido es demasiado grande (máx. {{size}}MEGABYTE)","uploadWrongResolutionMessage":"La resolución debe ser {{width}}incógnita{{height}} píxel","memoriNameAlreadyUsed":"Ya tienes un gemelo con este nombre.","uploadHelperImages":"Sube un archivo con extensión png, jpg, jpeg o gif, y que tenga como máximo un tamaño de {{size}}MEGABYTE","uploadHelper":"Cargue un archivo que tenga como máximo un tamaño de {{size}}MEGABYTE","uploadError":"Error al subir","square":"cuadrado","scaleRatio":"Relación de escala","addMediaLabel":"Agregar un medio","insertThisMediaMsg":"Inserte estos medios","mediaUploadMessage":"Haga clic para cargar un nuevo medio","addLinkLabel":"Agregar un enlace","linkKey":"URL","linkValue":"Título del enlace","insertThisLink":"Insertar un enlace a {{url}} con titulo {{title}}"},"gamification":{"level":"Nivel","points":"agujas","memoriReachedLevel":"se volvió más evolucionado y alcanzó el nivel","levelGoToStatistics":"{{memori}} esta al nivel {{level}} con {{points}} agujas. ","congratulationsNewLevel":"¡Felicitaciones, has alcanzado un nuevo nivel!","congratulationsNewLevelDescription":"Tu Memori se volvió más evolucionado con {{points}} puntos, mira el","statistics":"estadística"},"login":{"login":"Acceso","logout":"Cerrar sesión","user":"Usuario","loggedDrawerTitle":"Hola, {{name}}!","loginDrawerTitle":"Acceso","signupDrawerTitle":"Inscribirse","newUserSignUp":"¿Nuevo usuario?","signUp":"¡Inscribirse!","alreadyHaveAnAccount":"¿Ya tienes una cuenta?","backToLogin":"Volver a iniciar sesión","registrationDisabled":"El registro está deshabilitado","contactAdmin":"Póngase en contacto con el administrador para solicitar acceso","userNameOrEmail":"Nombre de usuario o correo electrónico","email":"Correo electrónico","emailFormatError":"Por favor, inserte un correo electrónico válido","username":"Nombre de usuario","usernameContainsReservedWord":"El nombre de usuario contiene una palabra reservada, elija otra","usernameFormatError":"El nombre de usuario debe tener al menos 3 caracteres y contener solo letras, números y _","otpCode":"Código de verificación","resendVerificationCode":"Reenviar código","resentVerificationCode":"¡Código de confirmación enviado! ","password":"Contraseña","newPassword":"Nueva contraseña","confirmPassword":"confirmar Contraseña","currentPassword":"Contraseña actual","passwordMatchingError":"Las contraseñas no coinciden.","passwordFormatError":"La contraseña debe tener al menos 8 caracteres y contener al menos un número, una letra mayúscula, una letra minúscula y un símbolo.","pwdWeak":"Débil","pwdAcceptable":"Aceptable","pwdStrong":"Fuerte","mustChangePassword":"Debes cambiar tu contraseña","passwordChange":"Cambiar la contraseña","emailChange":"Cambiar correo electrónico","avatarChange":"Cambiar avatar","underage":"Debes ser al menos {{age}} años para inscribirse.","optional":"Opcional","birthDate":"Fecha de nacimiento","birthDateHelper":"Solicitamos tu fecha de nacimiento únicamente para habilitar o deshabilitar funcionalidades que tienen restricciones de edad.","missingData":"Información faltante","missingDataHelper":"Sabemos que esto es un poco molesto, pero necesitamos más información para completar tu registro.","goToAccountToChangeYourPreferences":"Puede cambiar su elección en cualquier momento desde la página de su Cuenta.","deepThoughtExplaination":"Deep Thought es una característica avanzada de la IA que te permitirá explotar al máximo tus conversaciones al realizar un seguimiento de ellas. ","tnCAndPPAcceptedHelper":"Desde su último inicio de sesión, los Términos y condiciones y la Política de privacidad han cambiado. ","privacyLabel":"He leído y acepto el","privacyAndCookiePolicy":"Política de privacidad y cookies","and":"y","termsOfService":"Términos de servicio","pAndCUAccepted":"Acepto los términos de servicio sobre Deep Thought","editAccount":"Editar cuenta","save":"Ahorrar"},"success":"Éxito","Error":"Error","internal server error":"Oupsie, lo siento... Algo salió mal en el servidor.","error":"Error","error.loading":"Error al cargar contenido.","error.generic":"Oupsie, lo siento... algo salió mal.","error.serverNotResponding":"Estamos realizando mantenimiento o lanzando actualizaciones. ","error.notFound":"Oupsie, no encontramos la página que buscabas.","error.goBackTo":"Puedes intentar volver al","error.reloadPage":"recargar la pagina","error.tryAgain":"Intentar otra vez","error.unauthorized":"No estás autorizado a ver este contenido.","error.unprocessableEntity":"Error al procesar la solicitud. ","errors":{"TENANT_NOT_FOUND":"Inquilino no encontrado","TENANT_REGISTRATION_DISABLED":"El registro en esta plataforma está deshabilitado","TENANT_MISSING_NAME":"Inquilino: falta el nombre","TENANT_MAX_USERS_REACHED":"Número máximo de usuarios alcanzado","TENANT_MAX_ADMINS_REACHED":"Número máximo de usuarios administradores alcanzado","TENANT_ALREADY_EXISTS":"El inquilino ya existe","TENANT_MISSING_DESCRIPTION":"Inquilino: falta descripción","TENANT_CANT_SET_COMPLETION_PROVIDER":"Inquilino: no se puede configurar el proveedor de finalización","USER_NOT_CONFIRMED":"Usuario aún no confirmado","USER_NOT_FOUND":"Usuario no encontrado","USER_OR_PASSWORD_INVALID":"Usuario o contraseña no válidos","USER_MUST_CHANGE_PASSWORD":"Debes cambiar tu contraseña","USER_MUST_ENTER_VERIFICATION_CODE":"Debes ingresar el código de verificación","USER_MISSING_TENANT":"Usuario: inquilino desaparecido","USER_MISSING_NAME":"Usuario: falta el nombre","USER_MISSING_PASSWORD":"Usuario: falta contraseña","USER_MISSING_EMAIL":"Usuario: Falta correo electrónico","USER_MISSING_VERIFICATION_CODE":"Usuario: Falta el código de verificación","USER_NAME_ALREADY_USED":"Nombre de usuario ya en uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La contraseña no cumple con las reglas de seguridad.","USER_EMAIL_ALREADY_USED":"Correo electrónico ya en uso","USER_EMAIL_INVALID":"Correo electrónico no válido","USER_VERIFICATION_CODE_INVALID":"Código de verificación no válido","USER_MISSING_NAME_OR_EMAIL":"Falta nombre de usuario o correo electrónico","USER_NAME_INVALID":"Nombre de usuario no válido","USER_HAS_ONE_OR_MORE_MEMORI":"El usuario tiene uno o más recuerdos.","USER_MISSING_NEW_PASSWORD":"Usuario: falta nueva contraseña","USER_NOTHING_TO_DO":"Nada que hacer","USER_CANT_CREATE_MEMORI":"Usuario no autorizado a crear Memori","USER_MAX_MEMORI_REACHED":"Número máximo de Memori alcanzado","USER_TOO_MANY_ATTEMPTS":"demasiados intentos","USER_MUST_ACCEPT_TNC_AND_PP":"Debes aceptar los términos y condiciones.","USER_BIRTH_DATE_CANT_BE_CHANGED":"La fecha de nacimiento no se puede cambiar.","USER_CANT_SET_COMPLETION_PROVIDER":"Usuario: no tiene permiso para gestionar el proveedor de finalización","USER_CANT_ENABLE_DEEP_THOUGHT":"Usuario: no habilitado para gestionar Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"Usuario: no habilitado para gestionar la integración de DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Usuario: no se le permite gestionar encadenamiento o grupo de expertos","USER_CREATION_BILLING_DENIED_PERMISSION":"No tienes suficientes créditos para crear un gemelo","USER_HAS_ONE_OR_MORE_COMPLETION_CONFIGS":"El usuario tiene una o más configuraciones de finalización.","USER_CANT_BE_DELETED":"Usuario: no se puede eliminar","MEMORI_NOT_FOUND":"Memoria no encontrada","MEMORI_NOT_ACCESSIBLE":"Memorias no accesibles","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Sólo el propietario puede cambiar la etiqueta o el pin","SESSION_NOT_FOUND":"Sesión no encontrada","SESSION_IS_NOT_ADMINISTRATIVE":"Sesión no administrativa","SESSION_EXPIRED":"La sesión expiró","MEMORI_MISSING_CONFIGURATION":"Gemelo: falta configuración","MEMORI_CONFIGURATION_NOT_FOUND":"Gemelo: configuración no encontrada","MEMORI_INVALID_PRIVACY_TYPE":"Gemelo: tipo de privacidad no válido","MEMORI_MISSING_PASSWORD":"Gemelo: falta contraseña","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Gemelo: número total de tokens de recuperación no válidos","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Gemelo: número mínimo de tokens de recuperación no válidos","MEMORI_INVALID_VOICE_TYPE":"Gemelo: tipo de voz no válido","MEMORI_MISSING_NAME":"Gemelo: falta nombre","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Gemelo: falta contraseña o token de recuperación","MEMORI_INVALID_ID":"Gemelo: identificación no válida","MEMORI_NAME_ALREADY_USED":"Nombre gemelo ya en uso","MEMORI_INVALID_PIN":"Gemelo: PIN no válido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Gemelo: el cambio de TAG y PIN requiere operaciones separadas","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Twin: no se requiere contraseña cuando es público","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought requiere que las completaciones estén habilitadas","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"El grupo de expertos requiere que se habiliten las completaciones.","MEMORI_INVALID_COMPLETION_CONFIG":"Gemelo: configuración de finalizaciones no válidas","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transferencia: falta usuario de destino","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transferencia: ID de usuario de destino no válido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transferencia: datos de usuario de destino no válidos","MEMORI_TRANSFER_NOTHING_TO_DO":"Transferencia: nada que hacer","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memorias: la configuración no se puede cambiar","MEMORI_MISSING_NEW_PASSWORD":"Recuerdos: falta nueva contraseña","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"La función requiere suscripción","INTEGRATION_NOT_FOUND":"Integración no encontrada","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Fecha no válida del formato","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Fecha no válida para formatear","INTEGRATION_INVALID_TYPE":"Tipo de integración no válido","INTEGRATION_ALREADY_EXISTS":"La integración ya existe","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Las memorias no públicas no se pueden integrar","INTEGRATION_MISSING_INVOCATION_TEXT":"Integración: falta texto de invocación","INTEGRATION_MISSING_DEVICE_EMAILS":"Integración: correo electrónico del dispositivo perdido","INTEGRATION_MEMORI_IS_EMPTY":"Los recuerdos vacíos no se pueden integrar","INTEGRATION_MISSING_PRIVACY_POLICY":"Integración: falta la política de privacidad","INTEGRATION_MISSING_CATEGORY":"Falta categoría de integración","INTEGRATION_MISSING_DESCRIPTION":"Falta descripción de integración","INTEGRATION_INVALID_INVOCATION_TEXT":"Texto de invocación no válido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home ya no está disponible","UPLOAD_REQUIRES_MULTIPART_ENCODING":"La carga requiere codificación multiparte","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Subir: falta límite de tipo de contenido","UPLOAD_MAX_LENGTH_EXCEEDED":"Subir: se superó el tamaño máximo","UPLOAD_FILE_IS_EMPTY":"Subir: archivo vacío","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Subir: tipo de archivo o firma no válidos","UPLOAD_MISSING_FILE_NAME":"Subir: falta el nombre del archivo","UPLOAD_INVALID_MEMORY_ID":"Subir: ID de contenido no válido","UPLOAD_MISSING_FILE_CONTENT":"Subir: Falta contenido del archivo","ASSET_NOT_FOUND":"Activo no encontrado","ASSET_NOT_ACCESSIBLE":"Activo no accesible","ASSET_MISSING_SESSION_ID":"Activo: ID de sesión faltante","ASSET_INVALID_FILE_NAME":"Activo: nombre de archivo no válido","INVITATION_NOT_FOUND":"Invitación no encontrada","INVITATION_NOT_ACCESSIBLE":"Invitación no accesible","INVITATION_ALREADY_ACCEPTED":"Invitación ya aceptada","INVITATION_ALREADY_REJECTED":"Invitación ya rechazada","INVITATION_MISSING_DESTINATION_EMAIL":"Invitación: falta el correo electrónico de destino","INVITATION_DESTINATION_EMAIL_INVALID":"Invitación: correo electrónico de destino no válido","INVITATION_MISSING_TAG":"Invitación: falta etiqueta","INVITATION_MISSING_PIN":"Invitación: falta el PIN","INVITATION_INVALID_PIN":"Invitación: PIN no válido","INVITATION_INVALID_TYPE":"Invitación: tipo no válido","INVITATION_MISSING_DESTINATION_NAME":"Invitación: falta el nombre del destino","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitación: la etiqueta y el pin no se pueden cambiar","INVITATION_CANT_BE_CHANGED":"Intación: no se puede cambiar","ACTIONLOG_INVALID_USER_ID":"ID de usuario no válido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Fecha de: formato no válido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Fecha hasta: formato no válido","ACTIONLOG_INVALID_MEMORI_ID":"ID de memoria no válida","CONSUMPTIONLOG_INVALID_TYPE":"Tipo de registro no válido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Fecha de: formato no válido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Fecha hasta: formato no válido","CONSUMPTIONLOG_INVALID_USER_ID":"ID de usuario no válido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"ID de memoria no válida","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notificaciones: Período de extracción del registro de chat no válido","PROCESS_INVALID_TYPE":"Tipo de proceso no válido","PROCESS_ALREADY_RUNNING":"Proceso ya en ejecución","PROCESS_NOT_FOUND":"Proceso no encontrado","IMPORTCSV_MISSING_ROWS":"Importación CSV: filas faltantes","IMPORTCSV_MISSING_CSV":"Importación CSV: Falta CSV","IMPORTCSV_MISSING_SEPARATOR":"Importación CSV: falta separador","IMPORTCSV_INVALID_SEPARATOR":"Importación CSV: separador no válido","IMPORTCSV_MISSING_HEADERS":"Importación CSV: faltan encabezados","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Importación CSV: falta el separador de variante de título","IMPORTCSV_INVALID_RECEIVER_ID":"Importación CSV: ID de receptor no válido","IMPORTCSV_INVALID_MEDIA_LINK":"Importación CSV: enlace multimedia no válido","IMPORTCSV_INVALID_LINK_TITLE_HANDLING":"Importación CSV: título del enlace no válido","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Importación CSV: codificación de caracteres indetectable","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importación CSV: no se puede importar a Secret Memories","IMPORTTXT_MISSING_ROWS":"Importando TXT: filas faltantes","IMPORTTXT_INVALID_GRANULARITY":"Importar TXT: granularidad no válida","IMPORTTXT_INVALID_RECEIVER_ID":"Importar TXT: ID de receptor no válido","IMPORTTXT_INVALID_MEDIA_LINK":"Importar TXT: enlace multimedia no válido","IMPORTTXT_INVALID_LINK_TITLE_HANDLING":"Importar TXT: título del enlace no válido","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Importación TXT: codificación de caracteres indetectable","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importación TXT: No se puede importar a Secret Memories","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importar TXT: límite de importación excedido","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importar TXT: la importación en GPT-4 requiere una clave API","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importar TXT: la importación requiere un plan de pago","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importar TXT: no tienes suficientes créditos para la operación","EXPORTCSV_MISSING_CSV_SPECS":"Exportación CSV: faltan especificaciones CSV","EXPORTCSV_MISSING_SEPARATOR":"Exportación CSV: falta separador","EXPORTCSV_INVALID_SEPARATOR":"Exportación CSV: separador no válido","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Exportación CSV: falta el separador de variante de título","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Exportación CSV: falta un carácter de nueva línea","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Exportación CSV: carácter de nueva línea no válido","EXPORTCSV_MISSING_PASSWORD":"Exportación CSV: falta contraseña","EXPORTJSONL_MISSING_JSONL_SPECS":"Exportación JSONL: faltan especificaciones JSONL","EXPORTJSONL_MISSING_PLATFORM":"Exportación JSONL: plataforma faltante","EXPORTJSONL_INVALID_PLATFORM":"Exportación JSONL: plataforma no válida","EXPORTJSONL_MISSING_PASSWORD":"Exportación JSONL: falta contraseña","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Exportación JSONL: la exportación requiere un plan pago","ANALYSIS_MISSING_QUERY":"Análisis: consulta faltante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Análisis: No se pueden analizar recuerdos secretos","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Análisis: hacer coincidir la consulta del usuario requiere un pensamiento profundo","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Asignación de insignia: credenciales incorrectas o faltantes","BADGE_ASSIGNMENT_MISSING_REF_ID":"Asignación de insignia: falta el ID de referencia","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Asignación de insignia: resultado no encontrado","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Asignación de insignia: falta la URL de aserción","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Asignación de insignia: URL de insignia faltante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Asignación de insignia: falta la URL del emisor","BADGE_ASSIGNMENT_INVALID_URL":"Asignación de insignia: URL no válida","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Asignación de insignia: destinatario faltante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Asignación de insignia: tipo de destinatario desconocido","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Asignación de insignia: falta la identidad del destinatario","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Asignación de insignia: falta el tipo de hash del destinatario","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Asignación de insignia: tipo de hash del destinatario desconocido","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Asignación de insignia: identidad del destinatario incorrecta","BADGE_NOT_FOUND":"Insignia no encontrada","OUTCOME_NO_DCM_CONFIGURED":"Resultado: no hay ningún DCM configurado","OUTCOME_USER_BADGES_DISABLED":"Resultado: insignias de usuario deshabilitadas","COMPLETION_CONFIG_MISSING_NAME":"Configuración de terminaciones: falta nombre","COMPLETION_CONFIG_MISSING_PROVIDER":"Configuración de terminaciones: falta proveedor","COMPLETION_CONFIG_MISSING_ENDPOINT":"Configuración de terminaciones: falta punto final","COMPLETION_CONFIG_MISSING_API_KEY":"Configuración de terminaciones: falta clave API","COMPLETION_CONFIG_MISSING_MODEL":"Configuración de terminaciones: modelo faltante","COMPLETION_CONFIG_NO_PURPOSE_SPECIFIED":"Configuración de terminaciones: se debe especificar al menos un tipo de terminaciones","COMPLETION_CONFIG_INVALID_NAME":"Configuración de terminaciones: nombre no válido","COMPLETION_CONFIG_INVALID_PURPOSE":"Configuración de terminaciones: tipo de terminaciones no válidas","COMPLETION_CONFIG_INVALID_ENDPOINT":"Configuración de terminaciones: punto final no válido","COMPLETION_CONFIG_INCONSISTENT_ENDPOINT":"Configuración de terminaciones: punto final inconsistente","COMPLETION_CONFIG_INVALID_PROVIDER":"Configuración de terminaciones: proveedor no válido","COMPLETION_CONFIG_NOT_FOUND":"Configuración de terminaciones: no encontrada","COMPLETION_CONFIG_NOT_ACCESSIBLE":"Configuración de terminaciones: no accesible","COMPLETION_CONFIG_NAME_RESERVED":"Configuración de terminaciones: nombre reservado","COMPLETION_CONFIG_NAME_ALREADY_EXISTS":"Configuración de terminaciones: el nombre ya existe","COMPLETION_CONFIG_VISIBILITY_CHANGE_NOT_ALLOWED":"Configuración de terminaciones: cambio de visibilidad no permitido"}}');const $G=JG({resources:{en:{translation:t(YG)},it:{translation:t(KG)},es:{translation:t(ZG)},fr:{translation:t(XG)},de:{translation:t(QG)}},lng:"en",fallbackLng:"it",supportedLngs:["en","it","fr","es","de"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1}});$G.init();var eV=$G;c=o("85Hg2"),c=o("85Hg2");function tV(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,c.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,c.createElement)(le.Provider,{value:i},r)}var nV=({children:e})=>((0,c.useEffect)((()=>{window.MathJax||(window.MathJax=dR)}),[]),(0,s.jsxs)(tV,{i18n:eV,children:[e,(0,s.jsx)("script",{id:"MathJax-script",async:!0,src:"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"})]}));const rV=({ownerUserName:e,ownerUserID:t,memoriName:n,memoriID:r,integrationID:i,tenantID:o,secretToken:a,sessionID:l,layout:u="DEFAULT",customLayout:d,showShare:h=!0,showCopyButton:p=!0,showTranslationOriginal:f=!1,showSettings:m=!0,showInstruct:g=!1,showTypingText:v=!1,showClear:y=!1,showOnlyLastMessages:b=!1,showInputs:S=!0,showDates:x=!1,showContextPerLine:_=!1,showLogin:w,height:C="100%",baseURL:A,apiURL:E="https://backend.memori.ai",engineURL:T="https://engine.memori.ai",tag:I,pin:M,context:R,initialQuestion:P,uiLang:N,spokenLang:O,multilingual:k,authToken:L,AZURE_COGNITIVE_SERVICES_TTS_KEY:D,enableAudio:B,defaultSpeakerActive:z=!0,disableTextEnteredEvents:F=!1,onStateChange:U,additionalInfo:j,customMediaRenderer:H,additionalSettings:G,userAvatar:V})=>{var W,q,K;const[J,Y]=(0,c.useState)(),[X,Z]=(0,c.useState)(),[$,ee]=(0,c.useState)(D),{t:te}=_e();if(!(r&&t||n&&e))throw new Error("Identifier pair required: please provide either memoriID and ownerUserID or memoriName and ownerUserName");const ne=Q(E,T),re=(0,c.useCallback)((async()=>{const e=A||(o.startsWith("https://")?o:`https://${o}`),t=await fetch(`${e}/api/speechkey`),n=await t.json();n.AZURE_COGNITIVE_SERVICES_TTS_KEY&&ee(n.AZURE_COGNITIVE_SERVICES_TTS_KEY)}),[]);(0,c.useEffect)((()=>{D||re()}),[D]);const ie=(0,c.useCallback)((async()=>{if(r&&t){const{memori:e,...n}=await ne.backend.getMemoriByUserAndId(o,t,r);0===n.resultCode&&e?Y(e):console.error("[MEMORI]",n,e)}else if(n&&e){const{memori:t,...r}=await ne.backend.getMemori(o,e,n);0===r.resultCode&&t?Y(t):console.error("[MEMORI]",r,t)}}),[r,t,n,e,o]);(0,c.useEffect)((()=>{ie()}),[ie,o]);const oe=(0,c.useCallback)((async()=>{const e=await IH(o,A);e&&Z(e)}),[o,E]);return(0,c.useEffect)((()=>{oe()}),[oe]),(0,c.useEffect)((()=>{if(N)eV.changeLanguage(N.toLowerCase());else{const{lng:e,fallbackLng:t}=(()=>{const e=navigator.language;if(e){let t=e.split("-")[0];if(["en","it"].includes(t))return{lng:t,fallbackLng:"en"===t?"it":"en"}}return{lng:"en",fallbackLng:"it"}})();eV.changeLanguage(e).catch((()=>{eV.changeLanguage(t)}))}}),[N]),(0,c.useEffect)((()=>{hR()}),[]),(0,s.jsx)(nV,{children:(0,s.jsxs)($F,{children:[(0,s.jsx)(Yu.Toaster,{position:"top-center",reverseOrder:!0}),J?(0,s.jsx)(EH,{layout:u,customLayout:d,height:C,baseUrl:A||(o.startsWith("https://")?o:`https://${o}`),apiUrl:E,memori:{...J,secretToken:a},ownerUserName:null!=e?e:J.ownerUserName,ownerUserID:null!=t?t:J.ownerUserID,tenantID:o,memoriLang:null!=O?O:null===(q=null===(W=J.culture)||void 0===W?void 0:W.split("-"))||void 0===q?void 0:q[0],multilingual:k,tenant:X,secret:a,sessionID:l,showShare:h,showCopyButton:p,showTranslationOriginal:f,showSettings:m,showInstruct:g,showTypingText:v,showClear:y,showOnlyLastMessages:b,showInputs:S,showDates:x,showContextPerLine:_,showLogin:null!=w?w:null==J?void 0:J.enableDeepThought,integration:null===(K=null==J?void 0:J.integrations)||void 0===K?void 0:K.find((e=>i?e.integrationID===i:!!e.publish&&"LANDING_EXPERIENCE"===e.type)),initialContextVars:R,initialQuestion:P,authToken:L,AZURE_COGNITIVE_SERVICES_TTS_KEY:$||D,enableAudio:B,defaultSpeakerActive:z,disableTextEnteredEvents:F,onStateChange:U,additionalInfo:j,customMediaRenderer:H,additionalSettings:G,userAvatar:V,...I&&M?{personification:{tag:I,pin:M}}:{}}):(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)("p",{style:{textAlign:"center",margin:"2rem auto",textTransform:"capitalize"},children:[te("loading")||"Loading","..."]})})]})})};rV.propTypes={memoriName:t(l).string,memoriID:t(l).string,ownerUserName:t(l).string,ownerUserID:t(l).string,integrationID:t(l).string,tenantID:t(l).string.isRequired,secretToken:t(l).string,sessionID:t(l).string,layout:t(l).oneOf(["DEFAULT","FULLPAGE","TOTEM","WEBSITE_ASSISTANT","CHAT","HIDDEN_CHAT","ZOOMED_FULL_BODY"]),customLayout:t(l).any,showShare:t(l).bool,showCopyButton:t(l).bool,showTranslationOriginal:t(l).bool,showInstruct:t(l).bool,showInputs:t(l).bool,showDates:t(l).bool,showContextPerLine:t(l).bool,showSettings:t(l).bool,showClear:t(l).bool,showOnlyLastMessages:t(l).bool,showTypingText:t(l).bool,showLogin:t(l).bool,height:t(l).oneOfType([t(l).string,t(l).number]),baseURL:t(l).string,apiURL:t(l).string,engineURL:t(l).string,tag:t(l).string,pin:t(l).string,context:t(l).objectOf(t(l).any),initialQuestion:t(l).string,uiLang:t(l).oneOf(["en","it","fr","es","de","EN","IT","FR","ES","DE"]),spokenLang:t(l).string,multilingual:t(l).bool,authToken:t(l).string,enableAudio:t(l).bool,defaultSpeakerActive:t(l).bool,disableTextEnteredEvents:t(l).bool,AZURE_COGNITIVE_SERVICES_TTS_KEY:t(l).string,onStateChange:t(l).func,additionalInfo:t(l).objectOf(t(l).any),customMediaRenderer:t(l).func,additionalSettings:t(l).any,userAvatar:t(l).oneOfType([t(l).string,t(l).any])};var iV=rV;class oV extends HTMLElement{connectedCallback(){const e=document.createElement("div"),n=document.createElement("div");n.setAttribute("id","memori-root"),e.appendChild(n),this.appendChild(e);const r=Object.keys(iV.propTypes).reduce(((e,t)=>(this.hasAttribute(t)&&(e[t]=this.getAttribute(t),"true"!==e[t]&&"false"!==e[t]||(e[t]="true"===e[t])),e)),{}),i=this.getAttribute("tenantId"),o=this.getAttribute("context")?.split(",")?.reduce(((e,t)=>{const[n,r]=t.split(":").map((e=>e.trim()));return{...e,[n]:r}}),{}),l=(e=>{try{return JSON.parse(e)}catch(e){return null}})(this.getAttribute("additionalInfo")||"{}")||{};i?t(a).render((0,s.jsx)(iV,{...r,context:o,tenantID:i,additionalInfo:l}),n):console.error("No tenantId attribute found")}}customElements.define("memori-client",oV)})();
|