@leatcom/portal-sessions 0.0.70-beta.3 → 0.0.71

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.
@@ -30718,12 +30718,12 @@ function Qj(e) {
30718
30718
  });
30719
30719
  };
30720
30720
  return Ne(() => {
30721
- localStorage.setItem("apiKey", JSON.stringify(e.apiKey)), sessionStorage.setItem("apiHost", JSON.stringify(e.host)), It.initialize(e.apiKey, e.host), o();
30721
+ localStorage.setItem("apiKey", JSON.stringify(e.apiKey)), e.host && sessionStorage.setItem("apiHost", JSON.stringify(e.host)), It.initialize(e.apiKey, e.host), o();
30722
30722
  }, []), r ? /* @__PURE__ */ m.jsx(fb, { ...e, sessionUuid: r, children: /* @__PURE__ */ m.jsx(ow, { children: /* @__PURE__ */ m.jsx(Av, { children: /* @__PURE__ */ m.jsx(X1, {}) }) }) }) : /* @__PURE__ */ m.jsx(J1, {});
30723
30723
  }
30724
30724
  function zj({ uuid: e, host: t }) {
30725
30725
  return Ne(() => {
30726
- sessionStorage.setItem("apiHost", JSON.stringify(t)), It.initialize(void 0, t);
30726
+ t && sessionStorage.setItem("apiHost", JSON.stringify(t)), It.initialize(void 0, t);
30727
30727
  }, []), /* @__PURE__ */ m.jsx(fb, { sessionUuid: e, children: /* @__PURE__ */ m.jsx(ow, { children: /* @__PURE__ */ m.jsx(Av, { children: /* @__PURE__ */ m.jsx(X1, {}) }) }) });
30728
30728
  }
30729
30729
  export {
@@ -139,4 +139,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
139
139
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W($,H){(H==null||H>$.length)&&(H=$.length);for(var X=0,C=new Array(H);X<H;X++)C[X]=$[X];return C}function z($){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},z($)}function Z($,H){var X=Object.keys($);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols($);H&&(C=C.filter(function(j){return Object.getOwnPropertyDescriptor($,j).enumerable})),X.push.apply(X,C)}return X}function te($,H){for(var X=0;X<H.length;X++){var C=H[X];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty($,he(C.key),C)}}function re($,H,X){return(H=he(H))in $?Object.defineProperty($,H,{value:X,enumerable:!0,configurable:!0,writable:!0}):$[H]=X,$}function he($){var H=function(X,C){if(z(X)!="object"||!X)return X;var j=X[Symbol.toPrimitive];if(j!==void 0){var B=j.call(X,C);if(z(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(X)}($,"string");return z(H)=="symbol"?H:H+""}var ue=function(){return $=function C(j,B){var M=this;if(function(ie,be){if(!(ie instanceof be))throw new TypeError("Cannot call a class as a function")}(this,C),re(this,"input",void 0),re(this,"options",void 0),re(this,"utilities",void 0),re(this,"caretPosition",void 0),re(this,"caretPositionEnd",void 0),re(this,"keyboardDOM",void 0),re(this,"keyboardPluginClasses",void 0),re(this,"keyboardDOMClass",void 0),re(this,"buttonElements",void 0),re(this,"currentInstanceName",void 0),re(this,"allKeyboardInstances",void 0),re(this,"keyboardInstanceNames",void 0),re(this,"isFirstKeyboardInstance",void 0),re(this,"physicalKeyboard",void 0),re(this,"modules",void 0),re(this,"activeButtonClass",void 0),re(this,"holdInteractionTimeout",void 0),re(this,"holdTimeout",void 0),re(this,"isMouseHold",void 0),re(this,"initialized",void 0),re(this,"candidateBox",void 0),re(this,"keyboardRowsDOM",void 0),re(this,"defaultName","default"),re(this,"activeInputElement",null),re(this,"handleParams",function(ie,be){var ae,Ce,_e;if(typeof ie=="string")ae=ie.split(".").join(""),Ce=document.querySelector(".".concat(ae)),_e=be;else if(ie instanceof HTMLDivElement){if(!ie.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ae=ie.className.split(" ")[0],Ce=ie,_e=be}else ae="simple-keyboard",Ce=document.querySelector(".".concat(ae)),_e=ie;return{keyboardDOMClass:ae,keyboardDOM:Ce,options:_e}}),re(this,"getOptions",function(){return M.options}),re(this,"getCaretPosition",function(){return M.caretPosition}),re(this,"getCaretPositionEnd",function(){return M.caretPositionEnd}),re(this,"registerModule",function(ie,be){M.modules[ie]||(M.modules[ie]={}),be(M.modules[ie])}),re(this,"getKeyboardClassString",function(){for(var ie=arguments.length,be=new Array(ie),ae=0;ae<ie;ae++)be[ae]=arguments[ae];return[M.keyboardDOMClass].concat(be).filter(function(Ce){return!!Ce}).join(" ")}),typeof window<"u"){var ee=this.handleParams(j,B),J=ee.keyboardDOMClass,Q=ee.keyboardDOM,Y=ee.options,pe=Y===void 0?{}:Y;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=Q,this.options=function(ie){for(var be=1;be<arguments.length;be++){var ae=arguments[be]!=null?arguments[be]:{};be%2?Z(Object(ae),!0).forEach(function(Ce){re(ie,Ce,ae[Ce])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ie,Object.getOwnPropertyDescriptors(ae)):Z(Object(ae)).forEach(function(Ce){Object.defineProperty(ie,Ce,Object.getOwnPropertyDescriptor(ae,Ce))})}return ie}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},pe),this.keyboardPluginClasses="",E.bindMethods(C,this);var ge=this.options.inputName,le=ge===void 0?this.defaultName:ge;if(this.input={},this.input[le]="",this.keyboardDOMClass=J,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new N({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new R({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(J,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},H=[{key:"setCaretPosition",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C;this.caretPosition=C,this.caretPositionEnd=j}},{key:"getInputCandidates",value:function(C){var j=this,B=this.options,M=B.layoutCandidates,ee=B.layoutCandidatesCaseSensitiveMatch;if(!M||z(M)!=="object")return{};var J=Object.keys(M).filter(function(pe){var ge=C.substring(0,j.getCaretPositionEnd()||0)||C,le=new RegExp("".concat(j.utilities.escapeRegex(pe),"$"),ee?"g":"gi");return!!L(ge.matchAll(le)).length});if(J.length>1){var Q=J.sort(function(pe,ge){return ge.length-pe.length})[0];return{candidateKey:Q,candidateValue:M[Q]}}if(J.length){var Y=J[0];return{candidateKey:Y,candidateValue:M[Y]}}return{}}},{key:"showCandidatesBox",value:function(C,j,B){var M=this;this.candidateBox&&this.candidateBox.show({candidateValue:j,targetElement:B,onSelect:function(ee,J){var Q=M.options,Y=Q.layoutCandidatesCaseSensitiveMatch,pe=Q.disableCandidateNormalization,ge=Q.enableLayoutCandidatesKeyPress,le=ee;pe||(le=ee.normalize("NFD")),typeof M.options.beforeInputUpdate=="function"&&M.options.beforeInputUpdate(M);var ie=M.getInput(M.options.inputName,!0),be=M.getCaretPositionEnd()||0,ae=ie.substring(0,be||0)||ie,Ce=new RegExp("".concat(M.utilities.escapeRegex(C),"$"),Y?"g":"gi"),_e=ae.replace(Ce,le),Ye=ie.replace(ae,_e),rt=_e.length-ae.length,yt=(be||ie.length)+rt;yt<0&&(yt=0),M.setInput(Ye,M.options.inputName,!0),M.setCaretPosition(yt),ge&&typeof M.options.onKeyPress=="function"&&M.options.onKeyPress(ee,J),typeof M.options.onChange=="function"&&M.options.onChange(M.getInput(M.options.inputName,!0),J),typeof M.options.onChangeAll=="function"&&M.options.onChangeAll(M.getAllInputs(),J)}})}},{key:"handleButtonClicked",value:function(C,j){var B=this.options,M=B.inputName,ee=M===void 0?this.defaultName:M,J=B.debug;if(C!=="{//}"){this.input[ee]||(this.input[ee]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var Q=this.utilities.getUpdatedInput(C,this.input[ee],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(C)&&this.activeInputElement&&this.input[ee]&&this.input[ee]===Q&&this.caretPosition===0&&this.caretPositionEnd===Q.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(C,j);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(C,j),this.input[ee]!==Q&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(Q))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,Q))return;var Y=this.utilities.getUpdatedInput(C,this.input[ee],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(Y,this.options.inputName,!0),J&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),j==null?void 0:j.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),j),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),j),j!=null&&j.target&&this.options.enableLayoutCandidates){var pe,ge=this.getInputCandidates(Q),le=ge.candidateKey,ie=ge.candidateValue;le&&ie?this.showCandidatesBox(le,ie,this.keyboardDOM):(pe=this.candidateBox)===null||pe===void 0||pe.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),J&&console.log("Key pressed:",C)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(C){this.options.syncInstanceInputs?this.dispatch(function(j){j.isMouseHold=C}):this.isMouseHold=C}},{key:"handleButtonMouseDown",value:function(C,j){var B=this;j&&(this.options.preventMouseDownDefault&&j.preventDefault(),this.options.stopMouseDownPropagation&&j.stopPropagation(),j.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(B.getMouseHold()&&(!C.includes("{")&&!C.includes("}")||C==="{delete}"||C==="{backspace}"||C==="{bksp}"||C==="{space}"||C==="{tab}")||C==="{arrowright}"||C==="{arrowleft}"||C==="{arrowup}"||C==="{arrowdown}")&&(B.options.debug&&console.log("Button held:",C),B.handleButtonHold(C)),clearTimeout(B.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(C,j){var B=this;j&&(this.options.preventMouseUpDefault&&j.preventDefault&&j.preventDefault(),this.options.stopMouseUpPropagation&&j.stopPropagation&&j.stopPropagation(),!(j.target===this.keyboardDOM||j.target&&this.keyboardDOM.contains(j.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(j.target===this.candidateBox.candidateBoxElement||j.target&&this.candidateBox.candidateBoxElement.contains(j.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(M){M.classList.remove(B.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),C&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(C,j)}},{key:"handleKeyboardContainerMouseDown",value:function(C){this.options.preventMouseDownDefault&&C.preventDefault()}},{key:"handleButtonHold",value:function(C){var j=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){j.getMouseHold()?(j.handleButtonClicked(C),j.handleButtonHold(C)):clearTimeout(j.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var C=this;this.dispatch(function(j){j.replaceInput(C.input),j.setCaretPosition(C.caretPosition,C.caretPositionEnd)})}},{key:"clearInput",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[C]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,j=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!j&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[C].replace("‫","").replace("‬","")+"‬":this.input[C]}},{key:"getAllInputs",value:function(){var C=this,j={};return Object.keys(this.input).forEach(function(B){j[B]=C.getInput(B,!0)}),j}},{key:"setInput",value:function(C){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,B=arguments.length>2?arguments[2]:void 0;this.input[j]=C,!B&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(C){this.input=C}},{key:"setOptions",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},j=this.changedOptions(C);this.options=Object.assign(this.options,C),j.length&&(this.options.debug&&console.log("changedOptions",j),this.onSetOptions(j),this.render())}},{key:"changedOptions",value:function(C){var j=this;return Object.keys(C).filter(function(B){return JSON.stringify(C[B])!==JSON.stringify(j.options[B])})}},{key:"onSetOptions",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];C.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(C.includes("layoutCandidatesPageSize")||C.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new R({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(C){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(j){C(window.SimpleKeyboardInstances[j],j)})}},{key:"addButtonTheme",value:function(C,j){var B=this;j&&C&&(C.split(" ").forEach(function(M){j.split(" ").forEach(function(ee){B.options.buttonTheme||(B.options.buttonTheme=[]);var J=!1;B.options.buttonTheme.map(function(Q){if(Q!=null&&Q.class.split(" ").includes(ee)){J=!0;var Y=Q.buttons.split(" ");Y.includes(M)||(J=!0,Y.push(M),Q.buttons=Y.join(" "))}return Q}),J||B.options.buttonTheme.push({class:ee,buttons:C})})}),this.render())}},{key:"removeButtonTheme",value:function(C,j){var B=this;if(!C&&!j)return this.options.buttonTheme=[],void this.render();C&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(C.split(" ").forEach(function(M){var ee;(ee=B.options)===null||ee===void 0||(ee=ee.buttonTheme)===null||ee===void 0||ee.map(function(J,Q){if(J&&j&&j.includes(J.class)||!j){var Y,pe,ge=(Y=J)===null||Y===void 0?void 0:Y.buttons.split(" ").filter(function(le){return le!==M});J&&ge!=null&&ge.length?J.buttons=ge.join(" "):((pe=B.options.buttonTheme)===null||pe===void 0||pe.splice(Q,1),J=null)}return J})}),this.render())}},{key:"getButtonElement",value:function(C){var j,B=this.buttonElements[C];return B&&(j=B.length>1?B:B[0]),j}},{key:"inputPatternIsValid",value:function(C){var j,B=this.options.inputPattern;if((j=B instanceof RegExp?B:B[this.options.inputName||this.defaultName])&&C){var M=j.test(C);return this.options.debug&&console.log('inputPattern ("'.concat(j,'"): ').concat(M?"passed":"did not pass!")),M}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var C=this.options.physicalKeyboardHighlightPreventDefault,j=C!==void 0&&C;document.addEventListener("keyup",this.handleKeyUp,j),document.addEventListener("keydown",this.handleKeyDown,j),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(C){this.caretEventHandler(C),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(C)}},{key:"handleKeyDown",value:function(C){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(C)}},{key:"handleMouseUp",value:function(C){this.caretEventHandler(C)}},{key:"handleTouchEnd",value:function(C){this.caretEventHandler(C)}},{key:"handleSelect",value:function(C){this.caretEventHandler(C)}},{key:"handleSelectionChange",value:function(C){navigator.userAgent.includes("Firefox")||this.caretEventHandler(C)}},{key:"caretEventHandler",value:function(C){var j,B=this;C.target.tagName&&(j=C.target.tagName.toLowerCase()),this.dispatch(function(M){var ee=C.target===M.keyboardDOM||C.target&&M.keyboardDOM.contains(C.target);if(B.options.syncInstanceInputs&&Array.isArray(C.path)&&(ee=C.path.some(function(Y){var pe;return Y==null||(pe=Y.hasAttribute)===null||pe===void 0?void 0:pe.call(Y,"data-skInstance")})),(j==="textarea"||j==="input"&&["text","search","url","tel","password"].includes(C.target.type))&&!M.options.disableCaretPositioning){var J=C.target.selectionStart,Q=C.target.selectionEnd;M.options.rtl&&(J=M.utilities.getRtlOffset(J,M.getInput()),Q=M.utilities.getRtlOffset(Q,M.getInput())),M.setCaretPosition(J,Q),B.activeInputElement=C.target,M.options.debug&&console.log("Caret at: ",M.getCaretPosition(),M.getCaretPositionEnd(),C&&C.target.tagName.toLowerCase(),"(".concat(M.keyboardDOMClass,")"),C==null?void 0:C.type)}else!M.options.disableCaretPositioning&&ee||(C==null?void 0:C.type)==="selectionchange"||(M.setCaretPosition(null),B.activeInputElement=null,M.options.debug&&console.log('Caret position reset due to "'.concat(C==null?void 0:C.type,'" event'),C))})}},{key:"recurseButtons",value:function(C){var j=this;C&&Object.keys(this.buttonElements).forEach(function(B){return j.buttonElements[B].forEach(C)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var C=this.options.physicalKeyboardHighlightPreventDefault,j=C!==void 0&&C;document.removeEventListener("keyup",this.handleKeyUp,j),document.removeEventListener("keydown",this.handleKeyDown,j),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(B){B&&(B.onpointerdown=null,B.onpointerup=null,B.onpointercancel=null,B.ontouchstart=null,B.ontouchend=null,B.ontouchcancel=null,B.onclick=null,B.onmousedown=null,B.onmouseup=null,B.remove(),B=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(C){var j=this.options.buttonTheme,B=[];return Array.isArray(j)&&j.forEach(function(M){if(M&&M.class&&typeof M.class=="string"&&M.buttons&&typeof M.buttons=="string"){var ee=M.class.split(" ");M.buttons.split(" ").includes(C)&&(B=[].concat(L(B),L(ee)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',M)}),B}},{key:"setDOMButtonAttributes",value:function(C,j){var B=this.options.buttonAttributes;Array.isArray(B)&&B.forEach(function(M){M.attribute&&typeof M.attribute=="string"&&M.value&&typeof M.value=="string"&&M.buttons&&typeof M.buttons=="string"?M.buttons.split(" ").includes(C)&&j(M.attribute,M.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',M)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(C){if(C.target.classList.contains("hg-button"))return C.preventDefault(),C.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var C=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(j){var B=new j(C);B.init&&B.init(C)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(C,j){return!!this.modules[C]&&this.modules[C][j]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(C,j,B,M){var ee=this,J=Array.from(C.children),Q=0;return J.length&&B.forEach(function(Y,pe){var ge=M[pe];if(!(ge&&ge>Y))return!1;var le=Y-Q,ie=ge-Q,be=document.createElement("div");be.className+="hg-button-container";var ae="".concat(ee.options.layoutName,"-r").concat(j,"c").concat(pe);be.setAttribute("data-skUID",ae);var Ce=J.splice(le,ie-le+1);Q=ie-le,Ce.forEach(function(_e){return be.appendChild(_e)}),J.splice(le,0,be),C.innerHTML="",J.forEach(function(_e){return C.appendChild(_e)}),ee.options.debug&&console.log("rowDOMContainer",Ce,le,ie,Q+1)}),C}},{key:"render",value:function(){var C=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var j="hg-layout-".concat(this.options.layoutName),B=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},M=this.options.useTouchEvents||!1,ee=M?"hg-touch-events":"",J=this.options.useMouseEvents||!1,Q=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,j,this.keyboardPluginClasses,ee),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",B[this.options.layoutName||this.defaultName].forEach(function(Y,pe){var ge=Y.split(" ");C.options.excludeFromLayout&&C.options.excludeFromLayout[C.options.layoutName||C.defaultName]&&(ge=ge.filter(function(ae){return C.options.excludeFromLayout&&!C.options.excludeFromLayout[C.options.layoutName||C.defaultName].includes(ae)}));var le=document.createElement("div");le.className+="hg-row";var ie=[],be=[];ge.forEach(function(ae,Ce){var _e,Ye=!Q&&typeof ae=="string"&&ae.length>1&&ae.indexOf("[")===0,rt=!Q&&typeof ae=="string"&&ae.length>1&&ae.indexOf("]")===ae.length-1;Ye&&(ie.push(Ce),ae=ae.replace(/\[/g,"")),rt&&(be.push(Ce),ae=ae.replace(/\]/g,""));var yt=C.utilities.getButtonClass(ae),pt=C.utilities.getButtonDisplayName(ae,C.options.display,C.options.mergeDisplay),Kn=C.options.useButtonTag?"button":"div",ct=document.createElement(Kn);ct.className+="hg-button ".concat(yt),(_e=ct.classList).add.apply(_e,L(C.getButtonThemeClasses(ae))),C.setDOMButtonAttributes(ae,function(Re,ln){ct.setAttribute(Re,ln)}),C.activeButtonClass="hg-activeButton",!C.utilities.pointerEventsSupported()||M||J?M?(ct.ontouchstart=function(Re){C.handleButtonClicked(ae,Re),C.handleButtonMouseDown(ae,Re)},ct.ontouchend=function(Re){C.handleButtonMouseUp(ae,Re)},ct.ontouchcancel=function(Re){C.handleButtonMouseUp(ae,Re)}):(ct.onclick=function(Re){C.setMouseHold(!1),typeof C.options.onKeyReleased!="function"&&C.handleButtonClicked(ae,Re)},ct.onmousedown=function(Re){typeof C.options.onKeyReleased!="function"||C.isMouseHold||C.handleButtonClicked(ae,Re),C.handleButtonMouseDown(ae,Re)},ct.onmouseup=function(Re){C.handleButtonMouseUp(ae,Re)}):(ct.onpointerdown=function(Re){C.handleButtonClicked(ae,Re),C.handleButtonMouseDown(ae,Re)},ct.onpointerup=function(Re){C.handleButtonMouseUp(ae,Re)},ct.onpointercancel=function(Re){C.handleButtonMouseUp(ae,Re)}),ct.setAttribute("data-skBtn",ae);var rn="".concat(C.options.layoutName,"-r").concat(pe,"b").concat(Ce);ct.setAttribute("data-skBtnUID",rn);var mt=document.createElement("span");mt.innerHTML=pt,ct.appendChild(mt),C.buttonElements[ae]||(C.buttonElements[ae]=[]),C.buttonElements[ae].push(ct),le.appendChild(ct)}),le=C.parseRowDOMContainers(le,pe,ie,be),C.keyboardRowsDOM.appendChild(le)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||M||J?M?(document.ontouchend=function(Y){return C.handleButtonMouseUp(void 0,Y)},document.ontouchcancel=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.ontouchstart=function(Y){return C.handleKeyboardContainerMouseDown(Y)}):M||(document.onmouseup=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onmousedown=function(Y){return C.handleKeyboardContainerMouseDown(Y)}):(document.onpointerup=function(Y){return C.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onpointerdown=function(Y){return C.handleKeyboardContainerMouseDown(Y)}),this.onInit())}}],H&&te($.prototype,H),X&&te($,X),Object.defineProperty($,"prototype",{writable:!1}),$;var $,H,X}(),ye=ue,de=ue}(),h}()},442:function(c){c.exports=n}},i={};function s(c){var u=i[c];if(u!==void 0)return u.exports;var d=i[c]={exports:{}};return r[c].call(d.exports,d,d.exports,s),d.exports}s.n=function(c){var u=c&&c.__esModule?function(){return c.default}:function(){return c};return s.d(u,{a:u}),u},s.d=function(c,u){for(var d in u)s.o(u,d)&&!s.o(c,d)&&Object.defineProperty(c,d,{enumerable:!0,get:u[d]})},s.o=function(c,u){return Object.prototype.hasOwnProperty.call(c,u)},s.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var o={};return function(){s.r(o),s.d(o,{KeyboardReact:function(){return p},default:function(){return y}}),s(981);var c=s(442),u=s(548),d=s.n(u);function f(g){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},f(g)}function h(g,v){var w=Object.keys(g);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(g);v&&(E=E.filter(function(S){return Object.getOwnPropertyDescriptor(g,S).enumerable})),w.push.apply(w,E)}return w}function l(g){for(var v=1;v<arguments.length;v++){var w=arguments[v]!=null?arguments[v]:{};v%2?h(Object(w),!0).forEach(function(E){b(g,E,w[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(w)):h(Object(w)).forEach(function(E){Object.defineProperty(g,E,Object.getOwnPropertyDescriptor(w,E))})}return g}function b(g,v,w){var E;return E=function(S,A){if(f(S)!="object"||!S)return S;var T=S[Symbol.toPrimitive];if(T!==void 0){var O=T.call(S,A||"default");if(f(O)!="object")return O;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(S)}(v,"string"),(v=f(E)=="symbol"?E:E+"")in g?Object.defineProperty(g,v,{value:w,enumerable:!0,configurable:!0,writable:!0}):g[v]=w,g}var a=function(g){return l(l({},g),{},{keyboardRef:null})},p=function(g){var v=g.baseClass||"react-simple-keyboard",w=c.useRef(null),E=c.useRef(null),S=c.useRef(null),A=c.useRef(g);return c.useEffect(function(){return function(){S.current&&S.current.destroy(),w.current=!1}},[]),c.useEffect(function(){var T=function(V){return l(l({},V),{},{theme:"simple-keyboard ".concat(V.theme||"hg-theme-default")})}(g);if(!w.current){w.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var O=E.current,N=".".concat(v);S.current=new(d())(O||N,T),T.keyboardRef&&T.keyboardRef(S.current)}var D=function(V,F){var q=a(F),R=a(V);return Object.keys(q).filter(function(L){return q[L]!==R[L]})}(A.current,T);if(D.length){var U=S.current;A.current=T,U==null||U.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",D)}},[w,v,A,g]),c.createElement("div",{className:v,ref:E})},y=p}(),o}()})})(Zy);var _k=Zy.exports;const Ck=Pu(_k);function Xy({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,s]=k.useState("default"),o=c=>{(c==="{shift}"||c==="{lock}")&&s(i==="default"?"shift":"default")};return m.jsx(Ck,{keyboardRef:c=>t.current=c,layoutName:i,layout:n,theme:r,onChange:e,onKeyPress:o,preventMouseDownDefault:!0})}function bt(){const{sessionUuid:e}=Tt(),{data:t,pending:n,error:r,isLoading:i,mutate:s}=gr({url:e});return{session:t==null?void 0:t.data.data,data:t,pending:n,error:r,isLoading:i,mutate:s}}function Ak({value:e,valueSetter:t}){const{session:n}=bt(),r=!(!n||!+(n.input_data.enable_on_screen_keyboard??!1)),[i,s]=k.useState(!1),o=k.useRef(null),c=k.useRef(null);k.useEffect(()=>{f(e?e.toString():"")},[]);const u=h=>{t(h?parseInt(h):0),f(h)},d=h=>{const{key:l}=h;if(e===0&&!/^[1-9]$/.test(l)||e!==0&&!/^[0-9]$/.test(l)&&l!=="Backspace")return;let b;if(l!=="Backspace")b=parseInt(e===0?l:`${e}${l}`);else{const a=e.toString().slice(0,-1);b=a.length?parseInt(a,10):0}t(b),f(b?b.toString():"")},f=h=>{c&&c.current&&(h?c.current.style.width=`${Math.max(h.length,3)*3}rem`:c.current.style.width="calc(3rem + 14px)")};return m.jsxs(m.Fragment,{children:[m.jsx("input",{ref:c,className:"h-full w-[65px] rounded border-gray-200 border-transparent text-5xl [appearance:textfield] focus:border-transparent focus:ring-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",type:"number",pattern:"[0-9]*",inputMode:"numeric",placeholder:"0",autoFocus:!0,value:e?(e/100).toFixed(2):"",onKeyDown:d,onChange:()=>{},onFocus:()=>s(!0),onBlur:()=>s(!1)}),r&&m.jsx("div",{className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!i&&"hidden"} absolute`,children:m.jsx(Xy,{keyboardRef:o,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:u})})]})}function ev({title:e,balance:t,transaction:n}){const{t:r}=tt(),[i,s]=k.useState(0),{session:{currency:o,events:c}}=bt(),u=()=>{let d=0;return c.filter(h=>Object.values(ci).includes(h.type)).forEach(h=>{d+=h.data.amount_in_cents}),d};return m.jsxs(Ht,{children:[e&&m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e})})}),m.jsx(Pt,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:r("balance")}),m.jsx(ui,{value:t??0,start:t??0,currency:o,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsx("div",{className:"flex items-center justify-center gap-1 p-4 text-5xl font-bold",children:u()?m.jsx(ui,{value:0,start:i,currency:o,asCurrency:!0}):m.jsxs("div",{className:"flex items-center justify-center gap-1 ",children:[m.jsx("p",{children:"€"}),m.jsx(Ak,{value:i,valueSetter:s})]})})})]})}),m.jsx(nn,{children:m.jsx(ht,{label:r("confirmAndPay",{amount:xs(i,o)}),className:"w-full",onClick:n&&(()=>n(i)),disabled:!i||!!u()})})]})}function Vc(){return{subscribe:(r,i)=>{document.addEventListener(r,i)},unsubscribe:(r,i)=>{document.removeEventListener(r,i)},publish:(r,i)=>{const s=new CustomEvent(r,{detail:i});document.dispatchEvent(s)}}}function tv(e,t){k.useEffect(()=>{const n=i=>{e.current&&!e.current.contains(i.target)&&t(!1)},r=i=>{i.key==="Escape"&&t(!1)};return document.addEventListener("mousedown",n),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",r)}},[])}const Tk=typeof window<"u"?k.useLayoutEffect:()=>{},Ik=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight],kk=()=>{const[e,t]=k.useState(),n=k.useCallback(()=>{const r=Ik();t(i=>i&&i[0]===r[0]&&i[1]===r[1]?i:r)},[]);return Tk(n,[n]),k.useEffect(()=>{var i;const r=()=>{n(),setTimeout(n,1e3)};return window.addEventListener("resize",r),window.addEventListener("orientationchange",r),(i=window.visualViewport)==null||i.addEventListener("resize",r),()=>{var s;window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r),(s=window.visualViewport)==null||s.removeEventListener("resize",r)}},[n]),e};function nv(){const{subscribe:e,unsubscribe:t,publish:n}=Vc();return{initialize:(c,u)=>{e("openKeyboard",c),e("closeKeyboard",u)},terminate:(c,u)=>{t("openKeyboard",c),t("closeKeyboard",u)},open:c=>{n("openKeyboard",{inputId:c.target.id,inputValue:c.target.value})},close:()=>{n("closeKeyboard")}}}const Mr="keyboard-custom-overlap-id";function Ok(){const[e,t]=k.useState(!1),n=k.useRef(null),r=k.useRef(null),i=k.useRef(null),[s,o]=k.useState(),{session:c}=bt(),{initialize:u,terminate:d}=nv(),f=g=>{var v,w;r.current=document.getElementById(g.detail.inputId),(v=n.current)==null||v.setInput(g.detail.inputValue),(w=r.current)==null||w.addEventListener("input",E=>{var A;const S=E.target;(A=n.current)==null||A.setInput(S==null?void 0:S.value)}),t(!0)},h=()=>t(!1);k.useEffect(()=>(u(f,h),()=>{d(f,h)}),[e]);const l=g=>{var v,w;if(r&&r.current){b(r.current,g);const E=(v=n.current)==null?void 0:v.getCaretPosition();E&&((w=r.current)==null||w.setSelectionRange(E,E))}},b=(g,v)=>{var S;const w=(S=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:S.set;w==null||w.call(g,v);const E=new Event("input",{bubbles:!0});g.dispatchEvent(E)};if(!c||!+(c.input_data.enable_on_screen_keyboard??!1))return m.jsx(m.Fragment,{});const a=()=>{var g;if(!s){const v=(g=i.current)==null?void 0:g.getBoundingClientRect();return v&&v.x&&!s&&o(v),v}return s},p=()=>{var E;const g=(E=r.current)==null?void 0:E.getBoundingClientRect(),v=a();let w=!1;return v&&g&&(w=!(v.right<g.left||v.left>g.right||v.bottom<g.top||v.top>g.bottom)),w},y=()=>{const g=document.querySelectorAll("#"+Mr);let v=!1;for(let w=0;w<g.length;w++){const E=g[w].getBoundingClientRect(),S=a();S&&E&&(v=!(S.right<E.left||S.left>E.right||S.bottom<E.top||S.top>E.bottom))}return v||p()};return m.jsx("div",{ref:i,className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&s&&"hidden"} ${!e&&!s&&"pointer-events-none opacity-0"} ${y()?"b-2 block":"absolute"}`,children:m.jsx(Xy,{keyboardRef:n,onChange:l})})}const Cs=({id:e,name:t,label:n,description:r,required:i,type:s="text",value:o,placeholder:c,disabled:u,error:d=!1,helperText:f="",onChange:h,beforeIcon:l,afterIcon:b,autoFocus:a,onFocus:p,onBlur:y})=>{const[g,v]=k.useState(f),w=k.useRef(null),[E,S]=k.useState(!1),{open:A,close:T}=nv();k.useEffect(()=>()=>{T()},[]);const O=()=>{w.current&&v(w.current.validationMessage),S(!1),T(),y==null||y()},N=async F=>{S(!0),(async()=>A(F))().then(()=>{var R;return(R=w.current)==null?void 0:R.scrollIntoView({behavior:"smooth",block:"center"})}),p==null||p()},D=F=>{h==null||h(F)},U=k.useId(),V=e??U;return m.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[m.jsx(Sn,{description:r,disabled:u,htmlFor:V,required:i,children:n}),m.jsx("div",{className:fn("flex-start box flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",u?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",E&&!d&&"border-core-primary-500 ring-1 ring-core-primary-500",d&&"border-core-red-500",d&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:m.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[l&&m.jsx(tn,{icon:l}),m.jsx("input",{type:s,id:V,name:t,className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",value:o,onChange:D,onBlur:O,ref:w,placeholder:c,onFocus:N,disabled:u,autoFocus:a}),b&&m.jsx(tn,{icon:b})]})}),m.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${f||g?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:m.jsx("div",{className:"overflow-hidden",children:m.jsx(Sn.Helper,{error:d,helperText:f||g})})})]})};Cs.displayName="Input";const rv=({id:e,name:t,label:n,required:r,description:i,placeholder:s,value:o,disabled:c,error:u=!1,helperText:d,onChange:f,type:h="date"})=>{const[l,b]=k.useState(!1),a=k.useId(),p=e??a;return m.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[m.jsx(Sn,{description:i,disabled:c,htmlFor:p,required:r,children:n}),m.jsx("div",{className:fn("flex-start box relative flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs ring-core-primary-500 ",c?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",l&&!u&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",u&&"border-core-red-500",u&&l&&"border-core-red-500 ring-1 ring-core-red-500"),children:m.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[m.jsx("input",{type:h,id:p,name:t,value:o,max:"2200-01-01",className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",placeholder:s,onChange:f,onFocus:()=>b(!0),onBlur:()=>b(!1),disabled:c}),m.jsx(tn,{icon:"calendar"})]})}),m.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${d?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:m.jsx("div",{className:"overflow-hidden",children:m.jsx(Sn.Helper,{error:u,helperText:d})})})]})};rv.displayName="Input";function hn({children:e}){return m.jsx("div",{className:"h-screen w-screen md:p-6",children:m.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:e})})}function Mi({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:i,children:s}){const[o,c]=k.useState(t),u=k.useRef(null);k.useEffect(()=>{c(t)},[t]),k.useEffect(()=>{const h=u.current;h&&(o?h.show():h.close())},[o]);const d=()=>{n&&n(),c(!1)},f=h=>{h.key==="Escape"&&d()};return m.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${o?"flex":"hidden"}`,children:m.jsx("dialog",{ref:u,onKeyDown:f,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:m.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e})})}),m.jsx(Pt,{children:s}),m.jsx(nn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[r&&m.jsx(ht,{label:r.label??"",onClick:r.action,disabled:r.disabled}),i&&m.jsx(ht,{label:i.label??"",onClick:i.action,disabled:i.disabled,variant:"secondary"})]})})]})})})}function Rk({option:{label:e},checked:t,onChange:n}){return m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[m.jsx(Uc,{defaultChecked:t,onChange:n}),m.jsx("p",{children:e})]})}function Nk(e){const{t}=tt(),n=k.useRef(null),[r,i]=k.useState(!1);tv(n,i);const[s,o]=k.useState(""),[c,u]=k.useState(e.value.split(";")),{name:d,onChange:f}=e,h=(l,b)=>{let a=[];l?a=[...c,b]:a=c.filter(p=>p!==b),u(a),f&&f(d??"",a.join(";"))};return m.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[m.jsx(Sn,{disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),m.jsxs("div",{className:"relative",children:[m.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${e.disabled?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!e.disabled&&i(!r),children:[m.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${e.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:c.map(l=>{var a;const b=(a=e.options.find(p=>p.value===l))==null?void 0:a.label;return m.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[m.jsx("p",{className:"truncate",children:b}),m.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>h(!1,l),children:m.jsx(tn,{icon:"close"})})]},l)})}),m.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),m.jsxs("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!r&&"hidden"} py-2`,children:[e.options.length>6&&m.jsx("div",{className:"px-4",children:m.jsx(Cs,{placeholder:`${t("search")}...`,onChange:l=>o(l.target.value)})}),e.options.map(l=>{if(!(s&&!l.label.toLowerCase().includes(s.toLowerCase())))return m.jsx(Rk,{option:l,checked:c.includes(l.value),onChange:b=>h(b,l.value)},`${l.value}_${c.includes(l.value)?"checked":"unchecked"}`)})]})]})]})}function Mk({value:e,max:t,label:n}){return m.jsxs("div",{children:[m.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),m.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:m.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(e/t*100,100)}%`}})})]})}function iv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=iv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function li(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=iv(e))&&(r&&(r+=" "),r+=t);return r}const Oo=e=>typeof e=="number"&&!isNaN(e),Di=e=>typeof e=="string",Ln=e=>typeof e=="function",qc=e=>Di(e)||Ln(e)?e:null,of=e=>k.isValidElement(e)||Di(e)||Ln(e)||Oo(e);function Dk(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function $c(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:s=300}=e;return function(o){let{children:c,position:u,preventExitTransition:d,done:f,nodeRef:h,isIn:l,playToast:b}=o;const a=r?`${t}--${u}`:t,p=r?`${n}--${u}`:n,y=k.useRef(0);return k.useLayoutEffect(()=>{const g=h.current,v=a.split(" "),w=E=>{E.target===h.current&&(b(),g.removeEventListener("animationend",w),g.removeEventListener("animationcancel",w),y.current===0&&E.type!=="animationcancel"&&g.classList.remove(...v))};g.classList.add(...v),g.addEventListener("animationend",w),g.addEventListener("animationcancel",w)},[]),k.useEffect(()=>{const g=h.current,v=()=>{g.removeEventListener("animationend",v),i?Dk(g,f,s):f()};l||(d?v():(y.current=1,g.className+=` ${p}`,g.addEventListener("animationend",v)))},[l]),k.createElement(k.Fragment,null,c)}}function sv(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const xn=new Map;let Ro=[];const af=new Set,Pk=e=>af.forEach(t=>t(e)),ov=()=>xn.size>0;function av(e,t){var n;if(t)return!((n=xn.get(t))==null||!n.isToastActive(e));let r=!1;return xn.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function cv(e,t){of(e)&&(ov()||Ro.push({content:e,options:t}),xn.forEach(n=>{n.buildToast(e,t)}))}function uv(e,t){xn.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function jk(e){const{subscribe:t,getSnapshot:n,setProps:r}=k.useRef(function(s){const o=s.containerId||1;return{subscribe(c){const u=function(f,h,l){let b=1,a=0,p=[],y=[],g=[],v=h;const w=new Map,E=new Set,S=()=>{g=Array.from(w.values()),E.forEach(O=>O())},A=O=>{y=O==null?[]:y.filter(N=>N!==O),S()},T=O=>{const{toastId:N,onOpen:D,updateId:U,children:V}=O.props,F=U==null;O.staleId&&w.delete(O.staleId),w.set(N,O),y=[...y,O.props.toastId].filter(q=>q!==O.staleId),S(),l(sv(O,F?"added":"updated")),F&&Ln(D)&&D(k.isValidElement(V)&&V.props)};return{id:f,props:v,observe:O=>(E.add(O),()=>E.delete(O)),toggle:(O,N)=>{w.forEach(D=>{N!=null&&N!==D.props.toastId||Ln(D.toggle)&&D.toggle(O)})},removeToast:A,toasts:w,clearQueue:()=>{a-=p.length,p=[]},buildToast:(O,N)=>{if((he=>{let{containerId:ue,toastId:ye,updateId:de}=he;const $=ue?ue!==f:f!==1,H=w.has(ye)&&de==null;return $||H})(N))return;const{toastId:D,updateId:U,data:V,staleId:F,delay:q}=N,R=()=>{A(D)},L=U==null;L&&a++;const W={...v,style:v.toastStyle,key:b++,...Object.fromEntries(Object.entries(N).filter(he=>{let[ue,ye]=he;return ye!=null})),toastId:D,updateId:U,data:V,closeToast:R,isIn:!1,className:qc(N.className||v.toastClassName),bodyClassName:qc(N.bodyClassName||v.bodyClassName),progressClassName:qc(N.progressClassName||v.progressClassName),autoClose:!N.isLoading&&(z=N.autoClose,Z=v.autoClose,z===!1||Oo(z)&&z>0?z:Z),deleteToast(){const he=w.get(D),{onClose:ue,children:ye}=he.props;Ln(ue)&&ue(k.isValidElement(ye)&&ye.props),l(sv(he,"removed")),w.delete(D),a--,a<0&&(a=0),p.length>0?T(p.shift()):S()}};var z,Z;W.closeButton=v.closeButton,N.closeButton===!1||of(N.closeButton)?W.closeButton=N.closeButton:N.closeButton===!0&&(W.closeButton=!of(v.closeButton)||v.closeButton);let te=O;k.isValidElement(O)&&!Di(O.type)?te=k.cloneElement(O,{closeToast:R,toastProps:W,data:V}):Ln(O)&&(te=O({closeToast:R,toastProps:W,data:V}));const re={content:te,props:W,staleId:F};v.limit&&v.limit>0&&a>v.limit&&L?p.push(re):Oo(q)?setTimeout(()=>{T(re)},q):T(re)},setProps(O){v=O},setToggle:(O,N)=>{w.get(O).toggle=N},isToastActive:O=>y.some(N=>N===O),getSnapshot:()=>v.newestOnTop?g.reverse():g}}(o,s,Pk);xn.set(o,u);const d=u.observe(c);return Ro.forEach(f=>cv(f.content,f.options)),Ro=[],()=>{d(),xn.delete(o)}},setProps(c){var u;(u=xn.get(o))==null||u.setProps(c)},getSnapshot(){var c;return(c=xn.get(o))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const i=k.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!i)return[];const o=new Map;return i.forEach(c=>{const{position:u}=c.props;o.has(u)||o.set(u,[]),o.get(u).push(c)}),Array.from(o,c=>s(c[0],c[1]))},isToastActive:av,count:i==null?void 0:i.length}}function Lk(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),s=k.useRef(null),o=k.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:u,closeToast:d,onClick:f,closeOnClick:h}=e;var l,b;function a(){n(!0)}function p(){n(!1)}function y(w){const E=s.current;o.canDrag&&E&&(o.didMove=!0,t&&p(),o.delta=e.draggableDirection==="x"?w.clientX-o.start:w.clientY-o.start,o.start!==w.clientX&&(o.canCloseOnClick=!1),E.style.transform=`translate3d(${e.draggableDirection==="x"?`${o.delta}px, var(--y)`:`0, calc(${o.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("pointermove",y),document.removeEventListener("pointerup",g);const w=s.current;if(o.canDrag&&o.didMove&&w){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();w.style.transition="transform 0.2s, opacity 0.2s",w.style.removeProperty("transform"),w.style.removeProperty("opacity")}}(b=xn.get((l={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||b.setToggle(l.id,l.fn),k.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",a),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",a),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const v={onPointerDown:function(w){if(e.draggable===!0||e.draggable===w.pointerType){o.didMove=!1,document.addEventListener("pointermove",y),document.addEventListener("pointerup",g);const E=s.current;o.canCloseOnClick=!0,o.canDrag=!0,E.style.transition="none",e.draggableDirection==="x"?(o.start=w.clientX,o.removalDistance=E.offsetWidth*(e.draggablePercent/100)):(o.start=w.clientY,o.removalDistance=E.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(w){const{top:E,bottom:S,left:A,right:T}=s.current.getBoundingClientRect();w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&w.clientX>=A&&w.clientX<=T&&w.clientY>=E&&w.clientY<=S?p():a()}};return c&&u&&(v.onMouseEnter=p,e.stacked||(v.onMouseLeave=a)),h&&(v.onClick=w=>{f&&f(w),o.canCloseOnClick&&d()}),{playToast:a,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:v}}function Bk(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:s,className:o,style:c,controlledProgress:u,progress:d,rtl:f,isIn:h,theme:l}=e;const b=s||u&&d===0,a={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};u&&(a.transform=`scaleX(${d})`);const p=li("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":f}),y=Ln(o)?o({rtl:f,type:i,defaultClassName:p}):li(p,o),g={[u&&d>=1?"onTransitionEnd":"onAnimationEnd"]:u&&d<1?null:()=>{h&&r()}};return k.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":b},k.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${i}`}),k.createElement("div",{role:"progressbar","aria-hidden":b?"true":"false","aria-label":"notification timer",className:y,style:a,...g}))}let Fk=1;const lv=()=>""+Fk++;function Uk(e){return e&&(Di(e.toastId)||Oo(e.toastId))?e.toastId:lv()}function No(e,t){return cv(e,t),t.toastId}function Gc(e,t){return{...t,type:t&&t.type||e,toastId:Uk(t)}}function Hc(e){return(t,n)=>No(t,Gc(e,n))}function ze(e,t){return No(e,Gc("default",t))}ze.loading=(e,t)=>No(e,Gc("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ze.promise=function(e,t,n){let r,{pending:i,error:s,success:o}=t;i&&(r=Di(i)?ze.loading(i,n):ze.loading(i.render,{...n,...i}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(f,h,l)=>{if(h==null)return void ze.dismiss(r);const b={type:f,...c,...n,data:l},a=Di(h)?{render:h}:h;return r?ze.update(r,{...b,...a}):ze(a.render,{...b,...a}),l},d=Ln(e)?e():e;return d.then(f=>u("success",o,f)).catch(f=>u("error",s,f)),d},ze.success=Hc("success"),ze.info=Hc("info"),ze.error=Hc("error"),ze.warning=Hc("warning"),ze.warn=ze.warning,ze.dark=(e,t)=>No(e,Gc("default",{theme:"dark",...t})),ze.dismiss=function(e){(function(t){var n;if(ov()){if(t==null||Di(n=t)||Oo(n))xn.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=xn.get(t.containerId);r?r.removeToast(t.id):xn.forEach(i=>{i.removeToast(t.id)})}}else Ro=Ro.filter(r=>t!=null&&r.options.toastId!==t)})(e)},ze.clearWaitingQueue=function(e){e===void 0&&(e={}),xn.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},ze.isActive=av,ze.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var s;let{containerId:o}=i;return(s=xn.get(o||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:lv()};s.toastId!==e&&(s.staleId=e);const o=s.render||i;delete s.render,No(o,s)}},ze.done=e=>{ze.update(e,{progress:1})},ze.onChange=function(e){return af.add(e),()=>{af.delete(e)}},ze.play=e=>uv(!0,e),ze.pause=e=>uv(!1,e);const Vk=typeof window<"u"?k.useLayoutEffect:k.useEffect,Yc=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return k.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},cf={info:function(e){return k.createElement(Yc,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return k.createElement(Yc,{...e},k.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return k.createElement(Yc,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return k.createElement(Yc,{...e},k.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return k.createElement("div",{className:"Toastify__spinner"})}},qk=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:s}=Lk(e),{closeButton:o,children:c,autoClose:u,onClick:d,type:f,hideProgressBar:h,closeToast:l,transition:b,position:a,className:p,style:y,bodyClassName:g,bodyStyle:v,progressClassName:w,progressStyle:E,updateId:S,role:A,progress:T,rtl:O,toastId:N,deleteToast:D,isIn:U,isLoading:V,closeOnClick:F,theme:q}=e,R=li("Toastify__toast",`Toastify__toast-theme--${q}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":F}),L=Ln(p)?p({rtl:O,position:a,type:f,defaultClassName:R}):li(R,p),W=function(re){let{theme:he,type:ue,isLoading:ye,icon:de}=re,$=null;const H={theme:he,type:ue};return de===!1||(Ln(de)?$=de({...H,isLoading:ye}):k.isValidElement(de)?$=k.cloneElement(de,H):ye?$=cf.spinner():(X=>X in cf)(ue)&&($=cf[ue](H))),$}(e),z=!!T||!u,Z={closeToast:l,type:f,theme:q};let te=null;return o===!1||(te=Ln(o)?o(Z):k.isValidElement(o)?k.cloneElement(o,Z):function(re){let{closeToast:he,theme:ue,ariaLabel:ye="close"}=re;return k.createElement("button",{className:`Toastify__close-button Toastify__close-button--${ue}`,type:"button",onClick:de=>{de.stopPropagation(),he(de)},"aria-label":ye},k.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},k.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(Z)),k.createElement(b,{isIn:U,done:D,position:a,preventExitTransition:n,nodeRef:r,playToast:s},k.createElement("div",{id:N,onClick:d,"data-in":U,className:L,...i,style:y,ref:r},k.createElement("div",{...U&&{role:A},className:Ln(g)?g({type:f}):li("Toastify__toast-body",g),style:v},W!=null&&k.createElement("div",{className:li("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!V})},W),k.createElement("div",null,c)),te,k.createElement(Bk,{...S&&!z?{key:`pb-${S}`}:{},rtl:O,theme:q,delay:u,isRunning:t,isIn:U,closeToast:l,hide:h,type:f,style:E,className:w,controlledProgress:z,progress:T||0})))},Wc=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},$k=$c(Wc("bounce",!0));$c(Wc("slide",!0)),$c(Wc("zoom")),$c(Wc("flip"));const Gk={position:"top-right",transition:$k,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Hk(e){let t={...Gk,...e};const n=e.stacked,[r,i]=k.useState(!0),s=k.useRef(null),{getToastToRender:o,isToastActive:c,count:u}=jk(t),{className:d,style:f,rtl:h,containerId:l}=t;function b(p){const y=li("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":h});return Ln(d)?d({position:p,rtl:h,defaultClassName:y}):li(y,qc(d))}function a(){n&&(i(!0),ze.play())}return Vk(()=>{if(n){var p;const y=s.current.querySelectorAll('[data-in="true"]'),g=12,v=(p=t.position)==null?void 0:p.includes("top");let w=0,E=0;Array.from(y).reverse().forEach((S,A)=>{const T=S;T.classList.add("Toastify__toast--stacked"),A>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=v?"top":"bot");const O=w*(r?.2:1)+(r?0:g*A);T.style.setProperty("--y",`${v?O:-1*O}px`),T.style.setProperty("--g",`${g}`),T.style.setProperty("--s",""+(1-(r?E:0))),w+=T.offsetHeight,E+=.025})}},[r,u,n]),k.createElement("div",{ref:s,className:"Toastify",id:l,onMouseEnter:()=>{n&&(i(!1),ze.pause())},onMouseLeave:a},o((p,y)=>{const g=y.length?{...f}:{...f,pointerEvents:"none"};return k.createElement("div",{className:b(p),style:g,key:`container-${p}`},y.map(v=>{let{content:w,props:E}=v;return k.createElement(qk,{...E,stacked:n,collapseAll:a,isIn:c(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},w)}))}))}const Yk="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_15_20)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23E7FBF4'/%3e%3cpath%20d='M10.6668%2017.3333L14.6668%2020L21.3335%2012'%20stroke='%23039855'%20stroke-width='1.6875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_15_20'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Wk="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_95)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FEF3F2'/%3e%3cpath%20d='M12.0003%2012L20.0003%2020M12.0003%2020L20.0003%2012'%20stroke='%23E02731'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_95'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Kk="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_99)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FFFAEB'/%3e%3cpath%20d='M16.0002%2017.3333V13.3333M16.0002%2020V20.0067M23.0353%2019.3333L17.942%2010.456C17.0833%208.95867%2014.9167%208.95867%2014.058%2010.456L8.96533%2019.3333C8.11266%2020.8187%209.18933%2022.6667%2010.9073%2022.6667H21.0933C22.8107%2022.6667%2023.8873%2020.8187%2023.0353%2019.3333Z'%20stroke='%23CFAA25'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_99'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200C24.8366%200%2032%207.16344%2032%2016C32%2024.8366%2024.8366%2032%2016%2032C7.16344%2032%200%2024.8366%200%2016Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function Mo(){const{t:e}=tt(),n={closeButton:!1,icon:c=>c.type==="success"?m.jsx("img",{src:Yk,alt:"success"}):c.type==="error"?m.jsx("img",{src:Wk,alt:"error"}):m.jsx("img",{src:Kk,alt:"warning"})},r=(c,u)=>{if(c==="success")return i(u);o(u)},i=(c=e("success"),u={})=>{ze.success(c,{...n,...u})},s=(c=e("warning"))=>{ze.warning(c,n)},o=(c=e("somethingWentWrong"))=>{var f,h;const u=(f=c.response)==null?void 0:f.data.errors,d=m.jsxs("div",{children:[m.jsx("p",{children:(h=c.response)==null?void 0:h.data.message}),u&&Object.keys(u).map(l=>u[l].map(b=>m.jsx("li",{children:b},b)))]});ze.error(d,n)};return{toast:r,successToast:i,warningToast:s,errorToast:o}}function Kc({state:e}){const t=Tt(),n=vs(),{errorToast:r}=Mo(),{t:i}=tt(),s=Mt(),[o,c]=k.useState(""),[u,d]=k.useState(!1),{session:f,mutate:h}=bt(),[l,b]=k.useState(!1),a=y=>{t.onContactLink&&n.get(`${f.uuid}/contacts`,{contact_uuid:y}).then(g=>{var v;(v=t.onContactLink)==null||v.call(t,g.data.data)}).catch(r)},p=()=>{n.put(f.uuid,{contact_identifier_value:o}).then(y=>{a(y.data.data.contact.uuid),h().then(()=>{e&&e.redirectRoute&&s(e.redirectRoute,{state:{...e,contactIdentifier:o}})})}).catch(()=>s("link-identifier",{state:{...e,contactIdentifier:o}})).finally(()=>d(!1))};return k.useEffect(()=>{o&&!u&&!l&&p()},[o]),m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:i("scanOrEnterX",{x:"identifier"})})})}),m.jsx(Pt,{children:m.jsx("form",{onSubmit:y=>{y.preventDefault(),p()},children:m.jsx(jo,{dataSetter:c,setDefer:b,label:i("contactIdentifier")})})}),m.jsx(nn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(ht,{label:i("continue"),onClick:p}),f.input_data.enable_email_identification&&m.jsx(ht,{label:i("useEmail"),variant:"secondary",onClick:()=>s("../email",{state:e})})]})})]})}var dv={},kn={};Object.defineProperty(kn,"__esModule",{value:!0}),kn.compactObject=mv,kn.deprecated=r6;var zk=kn.detectBrowser=i6;kn.disableLog=e6,kn.disableWarnings=t6,kn.extractVersion=zc,kn.filterStats=s6,kn.log=n6,kn.walkStats=Qc,kn.wrapPeerConnectionEvent=Xk;function Qk(e,t,n){return t=Jk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jk(e){var t=Zk(e,"string");return di(t)=="symbol"?t:t+""}function Zk(e,t){if(di(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(di(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function di(e){"@babel/helpers - typeof";return di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(e)}var fv=!0,hv=!0;function zc(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function Xk(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(o,c){if(o!==t)return i.apply(this,arguments);var u=function(f){var h=n(f);h&&(c.handleEvent?c.handleEvent(h):c(h))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(c,u),i.apply(this,[o,u])};var s=r.removeEventListener;r.removeEventListener=function(o,c){if(o!==t||!this._eventMap||!this._eventMap[t])return s.apply(this,arguments);if(!this._eventMap[t].has(c))return s.apply(this,arguments);var u=this._eventMap[t].get(c);return this._eventMap[t].delete(c),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,s.apply(this,[o,u])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(c){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),c&&this.addEventListener(t,this["_on"+t]=c)},enumerable:!0,configurable:!0})}}function e6(e){return typeof e!="boolean"?new Error("Argument type: "+di(e)+". Please use a boolean."):(fv=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function t6(e){return typeof e!="boolean"?new Error("Argument type: "+di(e)+". Please use a boolean."):(hv=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function n6(){if((typeof window>"u"?"undefined":di(window))==="object"){if(fv)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function r6(e,t){hv&&console.warn(e+" is deprecated, please use "+t+" instead.")}function i6(e){var t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;var n=e.navigator;if(n.userAgentData&&n.userAgentData.brands){var r=n.userAgentData.brands.find(function(i){return i.brand==="Chromium"});if(r)return{browser:"chrome",version:parseInt(r.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=zc(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=zc(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=zc(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function pv(e){return Object.prototype.toString.call(e)==="[object Object]"}function mv(e){return pv(e)?Object.keys(e).reduce(function(t,n){var r=pv(e[n]),i=r?mv(e[n]):e[n],s=r&&!Object.keys(i).length;return i===void 0||s?t:Object.assign(t,Qk({},n,i))},{}):e}function Qc(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?Qc(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(i){Qc(e,e.get(i),n)})}))}function s6(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(t===null)return i;var s=[];return e.forEach(function(o){o.type==="track"&&o.trackIdentifier===t.id&&s.push(o)}),s.forEach(function(o){e.forEach(function(c){c.type===r&&c.trackId===o.id&&Qc(e,c,i)})}),i}Object.defineProperty(dv,"__esModule",{value:!0});var o6=dv.shimGetUserMedia=u6,a6=c6(kn);function gv(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(gv=function(i){return i?n:t})(e)}function c6(e,t){if(e&&e.__esModule)return e;if(e===null||fi(e)!="object"&&typeof e!="function")return{default:e};var n=gv(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function fi(e){"@babel/helpers - typeof";return fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fi(e)}var yv=a6.log;function u6(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(d){if(fi(d)!=="object"||d.mandatory||d.optional)return d;var f={};return Object.keys(d).forEach(function(h){if(!(h==="require"||h==="advanced"||h==="mediaSource")){var l=fi(d[h])==="object"?d[h]:{ideal:d[h]};l.exact!==void 0&&typeof l.exact=="number"&&(l.min=l.max=l.exact);var b=function(y,g){return y?y+g.charAt(0).toUpperCase()+g.slice(1):g==="deviceId"?"sourceId":g};if(l.ideal!==void 0){f.optional=f.optional||[];var a={};typeof l.ideal=="number"?(a[b("min",h)]=l.ideal,f.optional.push(a),a={},a[b("max",h)]=l.ideal,f.optional.push(a)):(a[b("",h)]=l.ideal,f.optional.push(a))}l.exact!==void 0&&typeof l.exact!="number"?(f.mandatory=f.mandatory||{},f.mandatory[b("",h)]=l.exact):["min","max"].forEach(function(p){l[p]!==void 0&&(f.mandatory=f.mandatory||{},f.mandatory[b(p,h)]=l[p])})}}),d.advanced&&(f.optional=(f.optional||[]).concat(d.advanced)),f},i=function(d,f){if(t.version>=61)return f(d);if(d=JSON.parse(JSON.stringify(d)),d&&fi(d.audio)==="object"){var h=function(y,g,v){g in y&&!(v in y)&&(y[v]=y[g],delete y[g])};d=JSON.parse(JSON.stringify(d)),h(d.audio,"autoGainControl","googAutoGainControl"),h(d.audio,"noiseSuppression","googNoiseSuppression"),d.audio=r(d.audio)}if(d&&fi(d.video)==="object"){var l=d.video.facingMode;l=l&&(fi(l)==="object"?l:{ideal:l});var b=t.version<66;if(l&&(l.exact==="user"||l.exact==="environment"||l.ideal==="user"||l.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!b)){delete d.video.facingMode;var a;if(l.exact==="environment"||l.ideal==="environment"?a=["back","rear"]:(l.exact==="user"||l.ideal==="user")&&(a=["front"]),a)return n.mediaDevices.enumerateDevices().then(function(p){p=p.filter(function(g){return g.kind==="videoinput"});var y=p.find(function(g){return a.some(function(v){return g.label.toLowerCase().includes(v)})});return!y&&p.length&&a.includes("back")&&(y=p[p.length-1]),y&&(d.video.deviceId=l.exact?{exact:y.deviceId}:{ideal:y.deviceId}),d.video=r(d.video),yv("chrome: "+JSON.stringify(d)),f(d)})}d.video=r(d.video)}return yv("chrome: "+JSON.stringify(d)),f(d)},s=function(d){return t.version>=64?d:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[d.name]||d.name,message:d.message,constraint:d.constraint||d.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},o=function(d,f,h){i(d,function(l){n.webkitGetUserMedia(l,f,function(b){h&&h(s(b))})})};if(n.getUserMedia=o.bind(n),n.mediaDevices.getUserMedia){var c=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(u){return i(u,function(d){return c(d).then(function(f){if(d.audio&&!f.getAudioTracks().length||d.video&&!f.getVideoTracks().length)throw f.getTracks().forEach(function(h){h.stop()}),new DOMException("","NotFoundError");return f},function(f){return Promise.reject(s(f))})})}}}}var vv={};Object.defineProperty(vv,"__esModule",{value:!0});var l6=vv.shimGetUserMedia=h6,d6=f6(kn);function bv(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(bv=function(i){return i?n:t})(e)}function f6(e,t){if(e&&e.__esModule)return e;if(e===null||As(e)!="object"&&typeof e!="function")return{default:e};var n=bv(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function h6(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(u,d,f){d6.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(u).then(d,f)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var i=function(d,f,h){f in d&&!(h in d)&&(d[h]=d[f],delete d[f])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(u){return As(u)==="object"&&As(u.audio)==="object"&&(u=JSON.parse(JSON.stringify(u)),i(u.audio,"autoGainControl","mozAutoGainControl"),i(u.audio,"noiseSuppression","mozNoiseSuppression")),s(u)},r&&r.prototype.getSettings){var o=r.prototype.getSettings;r.prototype.getSettings=function(){var u=o.apply(this,arguments);return i(u,"mozAutoGainControl","autoGainControl"),i(u,"mozNoiseSuppression","noiseSuppression"),u}}if(r&&r.prototype.applyConstraints){var c=r.prototype.applyConstraints;r.prototype.applyConstraints=function(u){return this.kind==="audio"&&As(u)==="object"&&(u=JSON.parse(JSON.stringify(u)),i(u,"autoGainControl","mozAutoGainControl"),i(u,"noiseSuppression","mozNoiseSuppression")),c.apply(this,[u])}}}}var vr={};Object.defineProperty(vr,"__esModule",{value:!0}),vr.shimAudioContext=x6,vr.shimCallbacksAPI=v6,vr.shimConstraints=Sv,vr.shimCreateOfferLegacy=S6;var p6=vr.shimGetUserMedia=b6;vr.shimLocalStreamsAPI=g6,vr.shimRTCIceServerUrls=w6,vr.shimRemoteStreamsAPI=y6,vr.shimTrackEventTransceiver=E6;var wv=m6(kn);function Ev(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ev=function(i){return i?n:t})(e)}function m6(e,t){if(e&&e.__esModule)return e;if(e===null||hi(e)!="object"&&typeof e!="function")return{default:e};var n=Ev(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&{}.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function hi(e){"@babel/helpers - typeof";return hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hi(e)}function g6(e){if(!(hi(e)!=="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(r){var i=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(r)||this._localStreams.push(r),r.getAudioTracks().forEach(function(s){return t.call(i,s,r)}),r.getVideoTracks().forEach(function(s){return t.call(i,s,r)})},e.RTCPeerConnection.prototype.addTrack=function(r){for(var i=this,s=arguments.length,o=new Array(s>1?s-1:0),c=1;c<s;c++)o[c-1]=arguments[c];return o&&o.forEach(function(u){i._localStreams?i._localStreams.includes(u)||i._localStreams.push(u):i._localStreams=[u]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(r){var i=this;this._localStreams||(this._localStreams=[]);var s=this._localStreams.indexOf(r);if(s!==-1){this._localStreams.splice(s,1);var o=r.getTracks();this.getSenders().forEach(function(c){o.includes(c.track)&&i.removeTrack(c)})}})}}function y6(e){if(!(hi(e)!=="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(r){var i=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=r),this.addEventListener("track",this._onaddstreampoly=function(s){s.streams.forEach(function(o){if(i._remoteStreams||(i._remoteStreams=[]),!i._remoteStreams.includes(o)){i._remoteStreams.push(o);var c=new Event("addstream");c.stream=o,i.dispatchEvent(c)}})})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var r=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(i){i.streams.forEach(function(s){if(r._remoteStreams||(r._remoteStreams=[]),!(r._remoteStreams.indexOf(s)>=0)){r._remoteStreams.push(s);var o=new Event("addstream");o.stream=s,r.dispatchEvent(o)}})}),t.apply(r,arguments)}}}function v6(e){if(!(hi(e)!=="object"||!e.RTCPeerConnection)){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,s=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(d,f){var h=arguments.length>=2?arguments[2]:arguments[0],l=n.apply(this,[h]);return f?(l.then(d,f),Promise.resolve()):l},t.createAnswer=function(d,f){var h=arguments.length>=2?arguments[2]:arguments[0],l=r.apply(this,[h]);return f?(l.then(d,f),Promise.resolve()):l};var c=function(d,f,h){var l=i.apply(this,[d]);return h?(l.then(f,h),Promise.resolve()):l};t.setLocalDescription=c,c=function(d,f,h){var l=s.apply(this,[d]);return h?(l.then(f,h),Promise.resolve()):l},t.setRemoteDescription=c,c=function(d,f,h){var l=o.apply(this,[d]);return h?(l.then(f,h),Promise.resolve()):l},t.addIceCandidate=c}}function b6(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(i){return r(Sv(i))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(s,o,c){t.mediaDevices.getUserMedia(s).then(o,c)}).bind(t))}function Sv(e){return e&&e.video!==void 0?Object.assign({},e,{video:wv.compactObject(e.video)}):e}function w6(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(r,i){if(r&&r.iceServers){for(var s=[],o=0;o<r.iceServers.length;o++){var c=r.iceServers[o];c.urls===void 0&&c.url?(wv.deprecated("RTCIceServer.url","RTCIceServer.urls"),c=JSON.parse(JSON.stringify(c)),c.urls=c.url,delete c.url,s.push(c)):s.push(r.iceServers[o])}r.iceServers=s}return new t(r,i)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function E6(e){hi(e)==="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function S6(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);var i=this.getTransceivers().find(function(o){return o.receiver.track.kind==="audio"});r.offerToReceiveAudio===!1&&i?i.direction==="sendrecv"?i.setDirection?i.setDirection("sendonly"):i.direction="sendonly":i.direction==="recvonly"&&(i.setDirection?i.setDirection("inactive"):i.direction="inactive"):r.offerToReceiveAudio===!0&&!i&&this.addTransceiver("audio",{direction:"recvonly"}),typeof r.offerToReceiveVideo<"u"&&(r.offerToReceiveVideo=!!r.offerToReceiveVideo);var s=this.getTransceivers().find(function(o){return o.receiver.track.kind==="video"});r.offerToReceiveVideo===!1&&s?s.direction==="sendrecv"?s.setDirection?s.setDirection("sendonly"):s.direction="sendonly":s.direction==="recvonly"&&(s.setDirection?s.setDirection("inactive"):s.direction="inactive"):r.offerToReceiveVideo===!0&&!s&&this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function x6(e){hi(e)!=="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var xv=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},_v=(e,t,n)=>(xv(e,t,"read from private field"),n?n.call(e):t.get(e)),_6=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},C6=(e,t,n,r)=>(xv(e,t,"write to private field"),t.set(e,n),n);const Cv=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function A6(e){return e.join("|")}function T6(e){const t=Av(e);let n=0,r=Cv.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),s=Cv[i],o=Av(s);if(o===t)return s;o<t?n=i+1:r=i-1}return"None"}function Av(e){return e.toLowerCase().replace(/_-\[\]/g,"")}function I6(e,t){return e.Binarizer[t]}function k6(e,t){return e.CharacterSet[t]}const O6=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function R6(e){return O6[e.value]}function N6(e,t){return e.EanAddOnSymbol[t]}function M6(e,t){return e.TextMode[t]}const Ts={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function Tv(e,t){return{...t,formats:A6(t.formats),binarizer:I6(e,t.binarizer),eanAddOnSymbol:N6(e,t.eanAddOnSymbol),textMode:M6(e,t.textMode),characterSet:k6(e,t.characterSet)}}function Iv(e){return{...e,format:T6(e.format),eccLevel:e.eccLevel,contentType:R6(e.contentType)}}const D6={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.11/dist/${n[1]}/${e}`:t+e}};let kv=new WeakMap;function uf(e,t){var n;const r=kv.get(e);if(r!=null&&r.modulePromise&&t===void 0)return r.modulePromise;const i=(n=r==null?void 0:r.moduleOverrides)!=null?n:D6,s=e({...i});return kv.set(e,{moduleOverrides:i,modulePromise:s}),s}async function P6(e,t,n=Ts){const r={...Ts,...n},i=await uf(e),{size:s}=t,o=new Uint8Array(await t.arrayBuffer()),c=i._malloc(s);i.HEAPU8.set(o,c);const u=i.readBarcodesFromImage(c,s,Tv(i,r));i._free(c);const d=[];for(let f=0;f<u.size();++f)d.push(Iv(u.get(f)));return d}async function j6(e,t,n=Ts){const r={...Ts,...n},i=await uf(e),{data:s,width:o,height:c,data:{byteLength:u}}=t,d=i._malloc(u);i.HEAPU8.set(s,d);const f=i.readBarcodesFromPixmap(d,o,c,Tv(i,r));i._free(d);const h=[];for(let l=0;l<f.size();++l)h.push(Iv(f.get(l)));return h}({...Ts,formats:[...Ts.formats]});var lf=(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(t={}){var n,r=t,i,s;r.ready=new Promise((_,x)=>{i=_,s=x});var o=Object.assign({},r),c="./this.program",u=typeof window=="object",d=typeof Bun<"u",f=typeof((n=globalThis.WebAssembly)==null?void 0:n.instantiate)=="function",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var l="";function b(_){return r.locateFile?r.locateFile(_,l):l+_}var a;(u||h||d)&&(h?l=self.location.href:typeof document<"u"&&document.currentScript&&(l=document.currentScript.src),e&&(l=e),l.startsWith("blob:")?l="":l=l.substr(0,l.replace(/[?#].*/,"").lastIndexOf("/")+1),h&&(a=_=>{var x=new XMLHttpRequest;return x.open("GET",_,!1),x.responseType="arraybuffer",x.send(null),new Uint8Array(x.response)}));var p=r.print||console.log.bind(console),y=r.printErr||console.error.bind(console);Object.assign(r,o),o=null,r.arguments&&r.arguments,r.thisProgram&&(c=r.thisProgram),r.quit&&r.quit;var g;r.wasmBinary&&(g=r.wasmBinary);var v,w=!1,E,S,A,T,O,N,D,U;function V(){var _=v.buffer;r.HEAP8=E=new Int8Array(_),r.HEAP16=A=new Int16Array(_),r.HEAPU8=S=new Uint8Array(_),r.HEAPU16=T=new Uint16Array(_),r.HEAP32=O=new Int32Array(_),r.HEAPU32=N=new Uint32Array(_),r.HEAPF32=D=new Float32Array(_),r.HEAPF64=U=new Float64Array(_)}var F=[],q=[],R=[];function L(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)Z(r.preRun.shift());Q(F)}function W(){Q(q)}function z(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)re(r.postRun.shift());Q(R)}function Z(_){F.unshift(_)}function te(_){q.unshift(_)}function re(_){R.unshift(_)}var he=0,ue=null;function ye(_){var x;he++,(x=r.monitorRunDependencies)===null||x===void 0||x.call(r,he)}function de(_){var x;if(he--,(x=r.monitorRunDependencies)===null||x===void 0||x.call(r,he),he==0&&ue){var I=ue;ue=null,I()}}function $(_){var x;(x=r.onAbort)===null||x===void 0||x.call(r,_),_="Aborted("+_+")",y(_),w=!0,_+=". Build with -sASSERTIONS for more info.";var I=new WebAssembly.RuntimeError(_);throw s(I),I}var H="data:application/octet-stream;base64,",X=_=>_.startsWith(H),C;C="zxing_reader.wasm",X(C)||(C=b(C));function j(_){if(_==C&&g)return new Uint8Array(g);if(a)return a(_);throw"both async and sync fetching of the wasm failed"}function B(_){return!g&&(u||h||d||f)&&typeof fetch=="function"?fetch(_,{credentials:"same-origin"}).then(x=>{if(!x.ok)throw`failed to load wasm binary file at '${_}'`;return x.arrayBuffer()}).catch(()=>j(_)):Promise.resolve().then(()=>j(_))}function M(_,x,I){return B(_).then(P=>WebAssembly.instantiate(P,x)).then(I,P=>{y(`failed to asynchronously prepare wasm: ${P}`),$(P)})}function ee(_,x,I,P){return!_&&typeof WebAssembly.instantiateStreaming=="function"&&!X(x)&&typeof fetch=="function"?fetch(x,{credentials:"same-origin"}).then(K=>{var ne=WebAssembly.instantiateStreaming(K,I);return ne.then(P,function(oe){return y(`wasm streaming compile failed: ${oe}`),y("falling back to ArrayBuffer instantiation"),M(x,I,P)})}):M(x,I,P)}function J(){var _={a:e9};function x(P,K){return Ft=P.exports,v=Ft.ma,V(),Ib=Ft.qa,te(Ft.na),de(),Ft}ye();function I(P){x(P.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(_,x)}catch(P){y(`Module.instantiateWasm callback failed with error: ${P}`),s(P)}return ee(g,C,_,I).catch(s),{}}var Q=_=>{for(;_.length>0;)_.shift()(r)};r.noExitRuntime;var Y=[],pe=0,ge=_=>{var x=new be(_);return x.get_caught()||(x.set_caught(!0),pe--),x.set_rethrown(!1),Y.push(x),$b(x.excPtr),x.get_exception_ptr()},le=0,ie=()=>{Ot(0,0);var _=Y.pop();qb(_.excPtr),le=0};class be{constructor(x){this.excPtr=x,this.ptr=x-24}set_type(x){N[this.ptr+4>>2]=x}get_type(){return N[this.ptr+4>>2]}set_destructor(x){N[this.ptr+8>>2]=x}get_destructor(){return N[this.ptr+8>>2]}set_caught(x){x=x?1:0,E[this.ptr+12]=x}get_caught(){return E[this.ptr+12]!=0}set_rethrown(x){x=x?1:0,E[this.ptr+13]=x}get_rethrown(){return E[this.ptr+13]!=0}init(x,I){this.set_adjusted_ptr(0),this.set_type(x),this.set_destructor(I)}set_adjusted_ptr(x){N[this.ptr+16>>2]=x}get_adjusted_ptr(){return N[this.ptr+16>>2]}get_exception_ptr(){var x=Hb(this.get_type());if(x)return N[this.excPtr>>2];var I=this.get_adjusted_ptr();return I!==0?I:this.excPtr}}var ae=_=>{throw le||(le=_),le},Ce=_=>{var x=le;if(!x)return fa(0),0;var I=new be(x);I.set_adjusted_ptr(x);var P=I.get_type();if(!P)return fa(0),x;for(var K in _){var ne=_[K];if(ne===0||ne===P)break;var oe=I.ptr+16;if(Gb(ne,P,oe))return fa(ne),x}return fa(P),x},_e=()=>Ce([]),Ye=_=>Ce([_]),rt=(_,x)=>Ce([_,x]),yt=()=>{var _=Y.pop();_||$("no exception to throw");var x=_.excPtr;throw _.get_rethrown()||(Y.push(_),_.set_rethrown(!0),_.set_caught(!1),pe++),le=x,le},pt=(_,x,I)=>{var P=new be(_);throw P.init(x,I),le=_,pe++,le},Kn=()=>pe,ct={},rn=_=>{for(;_.length;){var x=_.pop(),I=_.pop();I(x)}};function mt(_){return this.fromWireType(N[_>>2])}var Re={},ln={},Lt={},pn,sn=_=>{throw new pn(_)},mn=(_,x,I)=>{_.forEach(function(ce){Lt[ce]=x});function P(ce){var me=I(ce);me.length!==_.length&&sn("Mismatched type converter count");for(var Ee=0;Ee<_.length;++Ee)Pe(_[Ee],me[Ee])}var K=new Array(x.length),ne=[],oe=0;x.forEach((ce,me)=>{ln.hasOwnProperty(ce)?K[me]=ln[ce]:(ne.push(ce),Re.hasOwnProperty(ce)||(Re[ce]=[]),Re[ce].push(()=>{K[me]=ln[ce],++oe,oe===ne.length&&P(K)}))}),ne.length===0&&P(K)},Rn=_=>{var x=ct[_];delete ct[_];var I=x.rawConstructor,P=x.rawDestructor,K=x.fields,ne=K.map(oe=>oe.getterReturnType).concat(K.map(oe=>oe.setterArgumentType));mn([_],ne,oe=>{var ce={};return K.forEach((me,Ee)=>{var Ie=me.fieldName,Ke=oe[Ee],Be=me.getter,st=me.getterContext,qt=oe[Ee+K.length],yn=me.setter,Rt=me.setterContext;ce[Ie]={read:on=>Ke.fromWireType(Be(st,on)),write:(on,we)=>{var ke=[];yn(Rt,on,qt.toWireType(ke,we)),rn(ke)}}}),[{name:x.name,fromWireType:me=>{var Ee={};for(var Ie in ce)Ee[Ie]=ce[Ie].read(me);return P(me),Ee},toWireType:(me,Ee)=>{for(var Ie in ce)if(!(Ie in Ee))throw new TypeError(`Missing field: "${Ie}"`);var Ke=I();for(Ie in ce)ce[Ie].write(Ke,Ee[Ie]);return me!==null&&me.push(P,Ke),Ke},argPackAdvance:$e,readValueFromPointer:mt,destructorFunction:P}]})},Fn=(_,x,I,P,K)=>{},_n=()=>{for(var _=new Array(256),x=0;x<256;++x)_[x]=String.fromCharCode(x);gn=_},gn,At=_=>{for(var x="",I=_;S[I];)x+=gn[S[I++]];return x},zn,Ae=_=>{throw new zn(_)};function We(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var P=x.name;if(_||Ae(`type "${P}" must have a positive integer typeid pointer`),ln.hasOwnProperty(_)){if(I.ignoreDuplicateRegistrations)return;Ae(`Cannot register type '${P}' twice`)}if(ln[_]=x,delete Lt[_],Re.hasOwnProperty(_)){var K=Re[_];delete Re[_],K.forEach(ne=>ne())}}function Pe(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in x))throw new TypeError("registerType registeredInstance requires argPackAdvance");return We(_,x,I)}var $e=8,It=(_,x,I,P)=>{x=At(x),Pe(_,{name:x,fromWireType:function(K){return!!K},toWireType:function(K,ne){return ne?I:P},argPackAdvance:$e,readValueFromPointer:function(K){return this.fromWireType(S[K])},destructorFunction:null})},Ps=_=>({count:_.count,deleteScheduled:_.deleteScheduled,preservePointerOnDelete:_.preservePointerOnDelete,ptr:_.ptr,ptrType:_.ptrType,smartPtr:_.smartPtr,smartPtrType:_.smartPtrType}),vi=_=>{function x(I){return I.$$.ptrType.registeredClass.name}Ae(x(_)+" instance already deleted")},js=!1,ua=_=>{},zf=_=>{_.smartPtr?_.smartPtrType.rawDestructor(_.smartPtr):_.ptrType.registeredClass.rawDestructor(_.ptr)},xu=_=>{_.count.value-=1;var x=_.count.value===0;x&&zf(_)},_u=(_,x,I)=>{if(x===I)return _;if(I.baseClass===void 0)return null;var P=_u(_,x,I.baseClass);return P===null?null:I.downcast(P)},Cu={},G=()=>Object.keys(Ge).length,ve=()=>{var _=[];for(var x in Ge)Ge.hasOwnProperty(x)&&_.push(Ge[x]);return _},Te=[],Me=()=>{for(;Te.length;){var _=Te.pop();_.$$.deleteScheduled=!1,_.delete()}},Ze,gt=_=>{Ze=_,Te.length&&Ze&&Ze(Me)},Xe=()=>{r.getInheritedInstanceCount=G,r.getLiveInheritedInstances=ve,r.flushPendingDeletes=Me,r.setDelayFunction=gt},Ge={},dn=(_,x)=>{for(x===void 0&&Ae("ptr should not be undefined");_.baseClass;)x=_.upcast(x),_=_.baseClass;return x},kt=(_,x)=>(x=dn(_,x),Ge[x]),St=(_,x)=>{(!x.ptrType||!x.ptr)&&sn("makeClassHandle requires ptr and ptrType");var I=!!x.smartPtrType,P=!!x.smartPtr;return I!==P&&sn("Both smartPtrType and smartPtr must be specified"),x.count={value:1},Qn(Object.create(_,{$$:{value:x,writable:!0}}))};function Nn(_){var x=this.getPointee(_);if(!x)return this.destructor(_),null;var I=kt(this.registeredClass,x);if(I!==void 0){if(I.$$.count.value===0)return I.$$.ptr=x,I.$$.smartPtr=_,I.clone();var P=I.clone();return this.destructor(_),P}function K(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:x,smartPtrType:this,smartPtr:_}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:_})}var ne=this.registeredClass.getActualType(x),oe=Cu[ne];if(!oe)return K.call(this);var ce;this.isConst?ce=oe.constPointerType:ce=oe.pointerType;var me=_u(x,this.registeredClass,ce.registeredClass);return me===null?K.call(this):this.isSmartPointer?St(ce.registeredClass.instancePrototype,{ptrType:ce,ptr:me,smartPtrType:this,smartPtr:_}):St(ce.registeredClass.instancePrototype,{ptrType:ce,ptr:me})}var Qn=_=>typeof FinalizationRegistry>"u"?(Qn=x=>x,_):(js=new FinalizationRegistry(x=>{xu(x.$$)}),Qn=x=>{var I=x.$$,P=!!I.smartPtr;if(P){var K={$$:I};js.register(x,K,x)}return x},ua=x=>js.unregister(x),Qn(_)),Lr=()=>{Object.assign(Zt.prototype,{isAliasOf(_){if(!(this instanceof Zt)||!(_ instanceof Zt))return!1;var x=this.$$.ptrType.registeredClass,I=this.$$.ptr;_.$$=_.$$;for(var P=_.$$.ptrType.registeredClass,K=_.$$.ptr;x.baseClass;)I=x.upcast(I),x=x.baseClass;for(;P.baseClass;)K=P.upcast(K),P=P.baseClass;return x===P&&I===K},clone(){if(this.$$.ptr||vi(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var _=Qn(Object.create(Object.getPrototypeOf(this),{$$:{value:Ps(this.$$)}}));return _.$$.count.value+=1,_.$$.deleteScheduled=!1,_},delete(){this.$$.ptr||vi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),ua(this),xu(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||vi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ae("Object already scheduled for deletion"),Te.push(this),Te.length===1&&Ze&&Ze(Me),this.$$.deleteScheduled=!0,this}})};function Zt(){}var Br=(_,x)=>Object.defineProperty(x,"name",{value:_}),Au=(_,x,I)=>{if(_[x].overloadTable===void 0){var P=_[x];_[x]=function(){for(var K=arguments.length,ne=new Array(K),oe=0;oe<K;oe++)ne[oe]=arguments[oe];return _[x].overloadTable.hasOwnProperty(ne.length)||Ae(`Function '${I}' called with an invalid number of arguments (${ne.length}) - expects one of (${_[x].overloadTable})!`),_[x].overloadTable[ne.length].apply(this,ne)},_[x].overloadTable=[],_[x].overloadTable[P.argCount]=P}},la=(_,x,I)=>{r.hasOwnProperty(_)?((I===void 0||r[_].overloadTable!==void 0&&r[_].overloadTable[I]!==void 0)&&Ae(`Cannot register public name '${_}' twice`),Au(r,_,_),r.hasOwnProperty(I)&&Ae(`Cannot register multiple overloads of a function with the same number of arguments (${I})!`),r[_].overloadTable[I]=x):(r[_]=x,I!==void 0&&(r[_].numArguments=I))},D8=48,P8=57,j8=_=>{if(_===void 0)return"_unknown";_=_.replace(/[^a-zA-Z0-9_]/g,"$");var x=_.charCodeAt(0);return x>=D8&&x<=P8?`_${_}`:_};function L8(_,x,I,P,K,ne,oe,ce){this.name=_,this.constructor=x,this.instancePrototype=I,this.rawDestructor=P,this.baseClass=K,this.getActualType=ne,this.upcast=oe,this.downcast=ce,this.pureVirtualFunctions=[]}var Qf=(_,x,I)=>{for(;x!==I;)x.upcast||Ae(`Expected null or instance of ${I.name}, got an instance of ${x.name}`),_=x.upcast(_),x=x.baseClass;return _};function B8(_,x){if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;x.$$||Ae(`Cannot pass "${nh(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`);var I=x.$$.ptrType.registeredClass,P=Qf(x.$$.ptr,I,this.registeredClass);return P}function F8(_,x){var I;if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),this.isSmartPointer?(I=this.rawConstructor(),_!==null&&_.push(this.rawDestructor,I),I):0;(!x||!x.$$)&&Ae(`Cannot pass "${nh(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&x.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${x.$$.smartPtrType?x.$$.smartPtrType.name:x.$$.ptrType.name} to parameter type ${this.name}`);var P=x.$$.ptrType.registeredClass;if(I=Qf(x.$$.ptr,P,this.registeredClass),this.isSmartPointer)switch(x.$$.smartPtr===void 0&&Ae("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:x.$$.smartPtrType===this?I=x.$$.smartPtr:Ae(`Cannot convert argument of type ${x.$$.smartPtrType?x.$$.smartPtrType.name:x.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:I=x.$$.smartPtr;break;case 2:if(x.$$.smartPtrType===this)I=x.$$.smartPtr;else{var K=x.clone();I=this.rawShare(I,Ur.toHandle(()=>K.delete())),_!==null&&_.push(this.rawDestructor,I)}break;default:Ae("Unsupporting sharing policy")}return I}function U8(_,x){if(x===null)return this.isReference&&Ae(`null is not a valid ${this.name}`),0;x.$$||Ae(`Cannot pass "${nh(x)}" as a ${this.name}`),x.$$.ptr||Ae(`Cannot pass deleted object as a pointer of type ${this.name}`),x.$$.ptrType.isConst&&Ae(`Cannot convert argument of type ${x.$$.ptrType.name} to parameter type ${this.name}`);var I=x.$$.ptrType.registeredClass,P=Qf(x.$$.ptr,I,this.registeredClass);return P}var V8=()=>{Object.assign(Tu.prototype,{getPointee(_){return this.rawGetPointee&&(_=this.rawGetPointee(_)),_},destructor(_){var x;(x=this.rawDestructor)===null||x===void 0||x.call(this,_)},argPackAdvance:$e,readValueFromPointer:mt,fromWireType:Nn})};function Tu(_,x,I,P,K,ne,oe,ce,me,Ee,Ie){this.name=_,this.registeredClass=x,this.isReference=I,this.isConst=P,this.isSmartPointer=K,this.pointeeType=ne,this.sharingPolicy=oe,this.rawGetPointee=ce,this.rawConstructor=me,this.rawShare=Ee,this.rawDestructor=Ie,!K&&x.baseClass===void 0?P?(this.toWireType=B8,this.destructorFunction=null):(this.toWireType=U8,this.destructorFunction=null):this.toWireType=F8}var Tb=(_,x,I)=>{r.hasOwnProperty(_)||sn("Replacing nonexistent public symbol"),r[_].overloadTable!==void 0&&I!==void 0?r[_].overloadTable[I]=x:(r[_]=x,r[_].argCount=I)},q8=(_,x,I)=>{var P=r["dynCall_"+_];return P(x,...I)},Iu=[],Ib,Bt=_=>{var x=Iu[_];return x||(_>=Iu.length&&(Iu.length=_+1),Iu[_]=x=Ib.get(_)),x},$8=function(_,x){let I=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(_.includes("j"))return q8(_,x,I);var P=Bt(x)(...I);return P},G8=(_,x)=>function(){for(var I=arguments.length,P=new Array(I),K=0;K<I;K++)P[K]=arguments[K];return $8(_,x,P)},ar=(_,x)=>{_=At(_);function I(){return _.includes("j")?G8(_,x):Bt(x)}var P=I();return typeof P!="function"&&Ae(`unknown function pointer with signature ${_}: ${x}`),P},H8=(_,x)=>{var I=Br(x,function(P){this.name=x,this.message=P;var K=new Error(P).stack;K!==void 0&&(this.stack=this.toString()+`
140
140
  `+K.replace(/^Error(:[^\n]*)?\n/,""))});return I.prototype=Object.create(_.prototype),I.prototype.constructor=I,I.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},I},kb,Ob=_=>{var x=Vb(_),I=At(x);return Vr(x),I},ku=(_,x)=>{var I=[],P={};function K(ne){if(!P[ne]&&!ln[ne]){if(Lt[ne]){Lt[ne].forEach(K);return}I.push(ne),P[ne]=!0}}throw x.forEach(K),new kb(`${_}: `+I.map(Ob).join([", "]))},Y8=(_,x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke,Be)=>{Ie=At(Ie),ne=ar(K,ne),ce&&(ce=ar(oe,ce)),Ee&&(Ee=ar(me,Ee)),Be=ar(Ke,Be);var st=j8(Ie);la(st,function(){ku(`Cannot construct ${Ie} due to unbound types`,[P])}),mn([_,x,I],P?[P]:[],qt=>{qt=qt[0];var yn,Rt;P?(yn=qt.registeredClass,Rt=yn.instancePrototype):Rt=Zt.prototype;var on=Br(Ie,function(){if(Object.getPrototypeOf(this)!==we)throw new zn("Use 'new' to construct "+Ie);if(ke.constructor_body===void 0)throw new zn(Ie+" has no accessible constructor");for(var zb=arguments.length,Mu=new Array(zb),Du=0;Du<zb;Du++)Mu[Du]=arguments[Du];var Qb=ke.constructor_body[Mu.length];if(Qb===void 0)throw new zn(`Tried to invoke ctor of ${Ie} with invalid number of parameters (${Mu.length}) - expected (${Object.keys(ke.constructor_body).toString()}) parameters instead!`);return Qb.apply(this,Mu)}),we=Object.create(Rt,{constructor:{value:on}});on.prototype=we;var ke=new L8(Ie,on,we,Be,yn,ne,ce,Ee);if(ke.baseClass){var $t,Xt;(Xt=($t=ke.baseClass).__derivedClasses)!==null&&Xt!==void 0||($t.__derivedClasses=[]),ke.baseClass.__derivedClasses.push(ke)}var Ls=new Tu(Ie,ke,!0,!1,!1),Nu=new Tu(Ie+"*",ke,!1,!1,!1),Kb=new Tu(Ie+" const*",ke,!1,!0,!1);return Cu[_]={pointerType:Nu,constPointerType:Kb},Tb(st,on),[Ls,Nu,Kb]})},Jf=(_,x)=>{for(var I=[],P=0;P<_;P++)I.push(N[x+P*4>>2]);return I};function W8(_){for(var x=1;x<_.length;++x)if(_[x]!==null&&_[x].destructorFunction===void 0)return!0;return!1}function Zf(_,x,I,P,K,ne){var oe=x.length;oe<2&&Ae("argTypes array size mismatch! Must at least get return value and 'this' types!");var ce=x[1]!==null&&I!==null,me=W8(x),Ee=x[0].name!=="void",Ie=oe-2,Ke=new Array(Ie),Be=[],st=[],qt=function(){arguments.length!==Ie&&Ae(`function ${_} called with ${arguments.length} arguments, expected ${Ie}`),st.length=0;var yn;Be.length=ce?2:1,Be[0]=K,ce&&(yn=x[1].toWireType(st,this),Be[1]=yn);for(var Rt=0;Rt<Ie;++Rt)Ke[Rt]=x[Rt+2].toWireType(st,Rt<0||arguments.length<=Rt?void 0:arguments[Rt]),Be.push(Ke[Rt]);var on=P(...Be);function we(ke){if(me)rn(st);else for(var $t=ce?1:2;$t<x.length;$t++){var Xt=$t===1?yn:Ke[$t-2];x[$t].destructorFunction!==null&&x[$t].destructorFunction(Xt)}if(Ee)return x[0].fromWireType(ke)}return we(on)};return Br(_,qt)}var K8=(_,x,I,P,K,ne)=>{var oe=Jf(x,I);K=ar(P,K),mn([],[_],ce=>{ce=ce[0];var me=`constructor ${ce.name}`;if(ce.registeredClass.constructor_body===void 0&&(ce.registeredClass.constructor_body=[]),ce.registeredClass.constructor_body[x-1]!==void 0)throw new zn(`Cannot register multiple constructors with identical number of parameters (${x-1}) for class '${ce.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return ce.registeredClass.constructor_body[x-1]=()=>{ku(`Cannot construct ${ce.name} due to unbound types`,oe)},mn([],oe,Ee=>(Ee.splice(1,0,null),ce.registeredClass.constructor_body[x-1]=Zf(me,Ee,null,K,ne),[])),[]})},Rb=_=>{_=_.trim();const x=_.indexOf("(");return x!==-1?_.substr(0,x):_},z8=(_,x,I,P,K,ne,oe,ce,me)=>{var Ee=Jf(I,P);x=At(x),x=Rb(x),ne=ar(K,ne),mn([],[_],Ie=>{Ie=Ie[0];var Ke=`${Ie.name}.${x}`;x.startsWith("@@")&&(x=Symbol[x.substring(2)]),ce&&Ie.registeredClass.pureVirtualFunctions.push(x);function Be(){ku(`Cannot call ${Ke} due to unbound types`,Ee)}var st=Ie.registeredClass.instancePrototype,qt=st[x];return qt===void 0||qt.overloadTable===void 0&&qt.className!==Ie.name&&qt.argCount===I-2?(Be.argCount=I-2,Be.className=Ie.name,st[x]=Be):(Au(st,x,Ke),st[x].overloadTable[I-2]=Be),mn([],Ee,yn=>{var Rt=Zf(Ke,yn,Ie,ne,oe);return st[x].overloadTable===void 0?(Rt.argCount=I-2,st[x]=Rt):st[x].overloadTable[I-2]=Rt,[]}),[]})},Xf=[],Fr=[],eh=_=>{_>9&&--Fr[_+1]===0&&(Fr[_]=void 0,Xf.push(_))},Q8=()=>Fr.length/2-5-Xf.length,J8=()=>{Fr.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=Q8},Ur={toValue:_=>(_||Ae("Cannot use deleted val. handle = "+_),Fr[_]),toHandle:_=>{switch(_){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const x=Xf.pop()||Fr.length;return Fr[x]=_,Fr[x+1]=1,x}}}},Z8={name:"emscripten::val",fromWireType:_=>{var x=Ur.toValue(_);return eh(_),x},toWireType:(_,x)=>Ur.toHandle(x),argPackAdvance:$e,readValueFromPointer:mt,destructorFunction:null},Nb=_=>Pe(_,Z8),X8=(_,x,I)=>{switch(x){case 1:return I?function(P){return this.fromWireType(E[P])}:function(P){return this.fromWireType(S[P])};case 2:return I?function(P){return this.fromWireType(A[P>>1])}:function(P){return this.fromWireType(T[P>>1])};case 4:return I?function(P){return this.fromWireType(O[P>>2])}:function(P){return this.fromWireType(N[P>>2])};default:throw new TypeError(`invalid integer width (${x}): ${_}`)}},eM=(_,x,I,P)=>{x=At(x);function K(){}K.values={},Pe(_,{name:x,constructor:K,fromWireType:function(ne){return this.constructor.values[ne]},toWireType:(ne,oe)=>oe.value,argPackAdvance:$e,readValueFromPointer:X8(x,I,P),destructorFunction:null}),la(x,K)},th=(_,x)=>{var I=ln[_];return I===void 0&&Ae(`${x} has unknown type ${Ob(_)}`),I},tM=(_,x,I)=>{var P=th(_,"enum");x=At(x);var K=P.constructor,ne=Object.create(P.constructor.prototype,{value:{value:I},constructor:{value:Br(`${P.name}_${x}`,function(){})}});K.values[I]=ne,K[x]=ne},nh=_=>{if(_===null)return"null";var x=typeof _;return x==="object"||x==="array"||x==="function"?_.toString():""+_},nM=(_,x)=>{switch(x){case 4:return function(I){return this.fromWireType(D[I>>2])};case 8:return function(I){return this.fromWireType(U[I>>3])};default:throw new TypeError(`invalid float width (${x}): ${_}`)}},rM=(_,x,I)=>{x=At(x),Pe(_,{name:x,fromWireType:P=>P,toWireType:(P,K)=>K,argPackAdvance:$e,readValueFromPointer:nM(x,I),destructorFunction:null})},iM=(_,x,I,P,K,ne,oe)=>{var ce=Jf(x,I);_=At(_),_=Rb(_),K=ar(P,K),la(_,function(){ku(`Cannot call ${_} due to unbound types`,ce)},x-1),mn([],ce,me=>{var Ee=[me[0],null].concat(me.slice(1));return Tb(_,Zf(_,Ee,null,K,ne),x-1),[]})},sM=(_,x,I)=>{switch(x){case 1:return I?P=>E[P]:P=>S[P];case 2:return I?P=>A[P>>1]:P=>T[P>>1];case 4:return I?P=>O[P>>2]:P=>N[P>>2];default:throw new TypeError(`invalid integer width (${x}): ${_}`)}},oM=(_,x,I,P,K)=>{x=At(x);var ne=Ie=>Ie;if(P===0){var oe=32-8*I;ne=Ie=>Ie<<oe>>>oe}var ce=x.includes("unsigned"),me=(Ie,Ke)=>{},Ee;ce?Ee=function(Ie,Ke){return me(Ke,this.name),Ke>>>0}:Ee=function(Ie,Ke){return me(Ke,this.name),Ke},Pe(_,{name:x,fromWireType:ne,toWireType:Ee,argPackAdvance:$e,readValueFromPointer:sM(x,I,P!==0),destructorFunction:null})},aM=(_,x,I)=>{var P=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],K=P[x];function ne(oe){var ce=N[oe>>2],me=N[oe+4>>2];return new K(E.buffer,me,ce)}I=At(I),Pe(_,{name:I,fromWireType:ne,argPackAdvance:$e,readValueFromPointer:ne},{ignoreDuplicateRegistrations:!0})},cM=(_,x)=>{Nb(_)},Mb=(_,x,I,P)=>{if(!(P>0))return 0;for(var K=I,ne=I+P-1,oe=0;oe<_.length;++oe){var ce=_.charCodeAt(oe);if(ce>=55296&&ce<=57343){var me=_.charCodeAt(++oe);ce=65536+((ce&1023)<<10)|me&1023}if(ce<=127){if(I>=ne)break;x[I++]=ce}else if(ce<=2047){if(I+1>=ne)break;x[I++]=192|ce>>6,x[I++]=128|ce&63}else if(ce<=65535){if(I+2>=ne)break;x[I++]=224|ce>>12,x[I++]=128|ce>>6&63,x[I++]=128|ce&63}else{if(I+3>=ne)break;x[I++]=240|ce>>18,x[I++]=128|ce>>12&63,x[I++]=128|ce>>6&63,x[I++]=128|ce&63}}return x[I]=0,I-K},uM=(_,x,I)=>Mb(_,S,x,I),Db=_=>{for(var x=0,I=0;I<_.length;++I){var P=_.charCodeAt(I);P<=127?x++:P<=2047?x+=2:P>=55296&&P<=57343?(x+=4,++I):x+=3}return x},Pb=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,jb=(_,x,I)=>{for(var P=x+I,K=x;_[K]&&!(K>=P);)++K;if(K-x>16&&_.buffer&&Pb)return Pb.decode(_.subarray(x,K));for(var ne="";x<K;){var oe=_[x++];if(!(oe&128)){ne+=String.fromCharCode(oe);continue}var ce=_[x++]&63;if((oe&224)==192){ne+=String.fromCharCode((oe&31)<<6|ce);continue}var me=_[x++]&63;if((oe&240)==224?oe=(oe&15)<<12|ce<<6|me:oe=(oe&7)<<18|ce<<12|me<<6|_[x++]&63,oe<65536)ne+=String.fromCharCode(oe);else{var Ee=oe-65536;ne+=String.fromCharCode(55296|Ee>>10,56320|Ee&1023)}}return ne},rh=(_,x)=>_?jb(S,_,x):"",lM=(_,x)=>{x=At(x);var I=x==="std::string";Pe(_,{name:x,fromWireType(P){var K=N[P>>2],ne=P+4,oe;if(I)for(var ce=ne,me=0;me<=K;++me){var Ee=ne+me;if(me==K||S[Ee]==0){var Ie=Ee-ce,Ke=rh(ce,Ie);oe===void 0?oe=Ke:(oe+="\0",oe+=Ke),ce=Ee+1}}else{for(var Be=new Array(K),me=0;me<K;++me)Be[me]=String.fromCharCode(S[ne+me]);oe=Be.join("")}return Vr(P),oe},toWireType(P,K){K instanceof ArrayBuffer&&(K=new Uint8Array(K));var ne,oe=typeof K=="string";oe||K instanceof Uint8Array||K instanceof Uint8ClampedArray||K instanceof Int8Array||Ae("Cannot pass non-string to std::string"),I&&oe?ne=Db(K):ne=K.length;var ce=oh(4+ne+1),me=ce+4;if(N[ce>>2]=ne,I&&oe)uM(K,me,ne+1);else if(oe)for(var Ee=0;Ee<ne;++Ee){var Ie=K.charCodeAt(Ee);Ie>255&&(Vr(me),Ae("String has UTF-16 code units that do not fit in 8 bits")),S[me+Ee]=Ie}else for(var Ee=0;Ee<ne;++Ee)S[me+Ee]=K[Ee];return P!==null&&P.push(Vr,ce),ce},argPackAdvance:$e,readValueFromPointer:mt,destructorFunction(P){Vr(P)}})},Lb=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,dM=(_,x)=>{for(var I=_,P=I>>1,K=P+x/2;!(P>=K)&&T[P];)++P;if(I=P<<1,I-_>32&&Lb)return Lb.decode(S.subarray(_,I));for(var ne="",oe=0;!(oe>=x/2);++oe){var ce=A[_+oe*2>>1];if(ce==0)break;ne+=String.fromCharCode(ce)}return ne},fM=(_,x,I)=>{var P;if((P=I)!==null&&P!==void 0||(I=2147483647),I<2)return 0;I-=2;for(var K=x,ne=I<_.length*2?I/2:_.length,oe=0;oe<ne;++oe){var ce=_.charCodeAt(oe);A[x>>1]=ce,x+=2}return A[x>>1]=0,x-K},hM=_=>_.length*2,pM=(_,x)=>{for(var I=0,P="";!(I>=x/4);){var K=O[_+I*4>>2];if(K==0)break;if(++I,K>=65536){var ne=K-65536;P+=String.fromCharCode(55296|ne>>10,56320|ne&1023)}else P+=String.fromCharCode(K)}return P},mM=(_,x,I)=>{var P;if((P=I)!==null&&P!==void 0||(I=2147483647),I<4)return 0;for(var K=x,ne=K+I-4,oe=0;oe<_.length;++oe){var ce=_.charCodeAt(oe);if(ce>=55296&&ce<=57343){var me=_.charCodeAt(++oe);ce=65536+((ce&1023)<<10)|me&1023}if(O[x>>2]=ce,x+=4,x+4>ne)break}return O[x>>2]=0,x-K},gM=_=>{for(var x=0,I=0;I<_.length;++I){var P=_.charCodeAt(I);P>=55296&&P<=57343&&++I,x+=4}return x},yM=(_,x,I)=>{I=At(I);var P,K,ne,oe;x===2?(P=dM,K=fM,oe=hM,ne=ce=>T[ce>>1]):x===4&&(P=pM,K=mM,oe=gM,ne=ce=>N[ce>>2]),Pe(_,{name:I,fromWireType:ce=>{for(var me=N[ce>>2],Ee,Ie=ce+4,Ke=0;Ke<=me;++Ke){var Be=ce+4+Ke*x;if(Ke==me||ne(Be)==0){var st=Be-Ie,qt=P(Ie,st);Ee===void 0?Ee=qt:(Ee+="\0",Ee+=qt),Ie=Be+x}}return Vr(ce),Ee},toWireType:(ce,me)=>{typeof me!="string"&&Ae(`Cannot pass non-string to C++ string type ${I}`);var Ee=oe(me),Ie=oh(4+Ee+x);return N[Ie>>2]=Ee/x,K(me,Ie+4,Ee+x),ce!==null&&ce.push(Vr,Ie),Ie},argPackAdvance:$e,readValueFromPointer:mt,destructorFunction(ce){Vr(ce)}})},vM=(_,x,I,P,K,ne)=>{ct[_]={name:At(x),rawConstructor:ar(I,P),rawDestructor:ar(K,ne),fields:[]}},bM=(_,x,I,P,K,ne,oe,ce,me,Ee)=>{ct[_].fields.push({fieldName:At(x),getterReturnType:I,getter:ar(P,K),getterContext:ne,setterArgumentType:oe,setter:ar(ce,me),setterContext:Ee})},wM=(_,x)=>{x=At(x),Pe(_,{isVoid:!0,name:x,argPackAdvance:0,fromWireType:()=>{},toWireType:(I,P)=>{}})},ih=[],EM=(_,x,I,P)=>(_=ih[_],x=Ur.toValue(x),_(null,x,I,P)),SM={},xM=_=>{var x=SM[_];return x===void 0?At(_):x},Bb=()=>{if(typeof globalThis=="object")return globalThis;function _(x){x.$$$embind_global$$$=x;var I=typeof $$$embind_global$$$=="object"&&x.$$$embind_global$$$==x;return I||delete x.$$$embind_global$$$,I}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&_(global)?$$$embind_global$$$=global:typeof self=="object"&&_(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},_M=_=>_===0?Ur.toHandle(Bb()):(_=xM(_),Ur.toHandle(Bb()[_])),CM=_=>{var x=ih.length;return ih.push(_),x},AM=(_,x)=>{for(var I=new Array(_),P=0;P<_;++P)I[P]=th(N[x+P*4>>2],"parameter "+P);return I},TM=Reflect.construct,IM=(_,x,I)=>{var P=[],K=_.toWireType(P,I);return P.length&&(N[x>>2]=Ur.toHandle(P)),K},kM=(_,x,I)=>{var P=AM(_,x),K=P.shift();_--;var ne=new Array(_),oe=(me,Ee,Ie,Ke)=>{for(var Be=0,st=0;st<_;++st)ne[st]=P[st].readValueFromPointer(Ke+Be),Be+=P[st].argPackAdvance;var qt=I===1?TM(Ee,ne):Ee.apply(me,ne);return IM(K,Ie,qt)},ce=`methodCaller<(${P.map(me=>me.name).join(", ")}) => ${K.name}>`;return CM(Br(ce,oe))},OM=_=>{_>9&&(Fr[_+1]+=1)},RM=_=>{var x=Ur.toValue(_);rn(x),eh(_)},NM=(_,x)=>{_=th(_,"_emval_take_value");var I=_.readValueFromPointer(x);return Ur.toHandle(I)},MM=()=>{$("")},DM=(_,x,I)=>S.copyWithin(_,x,x+I),PM=()=>2147483648,jM=_=>{var x=v.buffer,I=(_-x.byteLength+65535)/65536;try{return v.grow(I),V(),1}catch{}},LM=_=>{var x=S.length;_>>>=0;var I=PM();if(_>I)return!1;for(var P=(me,Ee)=>me+(Ee-me%Ee)%Ee,K=1;K<=4;K*=2){var ne=x*(1+.2/K);ne=Math.min(ne,_+100663296);var oe=Math.min(I,P(Math.max(_,ne),65536)),ce=jM(oe);if(ce)return!0}return!1},sh={},BM=()=>c||"./this.program",da=()=>{if(!da.strings){var _=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",x={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:_,_:BM()};for(var I in sh)sh[I]===void 0?delete x[I]:x[I]=sh[I];var P=[];for(var I in x)P.push(`${I}=${x[I]}`);da.strings=P}return da.strings},FM=(_,x)=>{for(var I=0;I<_.length;++I)E[x++]=_.charCodeAt(I);E[x]=0},UM=(_,x)=>{var I=0;return da().forEach((P,K)=>{var ne=x+I;N[_+K*4>>2]=ne,FM(P,ne),I+=P.length+1}),0},VM=(_,x)=>{var I=da();N[_>>2]=I.length;var P=0;return I.forEach(K=>P+=K.length+1),N[x>>2]=P,0},qM=_=>52;function $M(_,x,I,P,K){return 70}var GM=[null,[],[]],HM=(_,x)=>{var I=GM[_];x===0||x===10?((_===1?p:y)(jb(I,0)),I.length=0):I.push(x)},YM=(_,x,I,P)=>{for(var K=0,ne=0;ne<I;ne++){var oe=N[x>>2],ce=N[x+4>>2];x+=8;for(var me=0;me<ce;me++)HM(_,S[oe+me]);K+=ce}return N[P>>2]=K,0},WM=_=>_,Ou=_=>_%4===0&&(_%100!==0||_%400===0),KM=(_,x)=>{for(var I=0,P=0;P<=x;I+=_[P++]);return I},Fb=[31,29,31,30,31,30,31,31,30,31,30,31],Ub=[31,28,31,30,31,30,31,31,30,31,30,31],zM=(_,x)=>{for(var I=new Date(_.getTime());x>0;){var P=Ou(I.getFullYear()),K=I.getMonth(),ne=(P?Fb:Ub)[K];if(x>ne-I.getDate())x-=ne-I.getDate()+1,I.setDate(1),K<11?I.setMonth(K+1):(I.setMonth(0),I.setFullYear(I.getFullYear()+1));else return I.setDate(I.getDate()+x),I}return I};function QM(_,x,I){var P=Db(_)+1,K=new Array(P);return Mb(_,K,0,K.length),K}var JM=(_,x)=>{E.set(_,x)},ZM=(_,x,I,P)=>{var K=N[P+40>>2],ne={tm_sec:O[P>>2],tm_min:O[P+4>>2],tm_hour:O[P+8>>2],tm_mday:O[P+12>>2],tm_mon:O[P+16>>2],tm_year:O[P+20>>2],tm_wday:O[P+24>>2],tm_yday:O[P+28>>2],tm_isdst:O[P+32>>2],tm_gmtoff:O[P+36>>2],tm_zone:K?rh(K):""},oe=rh(I),ce={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var me in ce)oe=oe.replace(new RegExp(me,"g"),ce[me]);var Ee=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ie=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ke(we,ke,$t){for(var Xt=typeof we=="number"?we.toString():we||"";Xt.length<ke;)Xt=$t[0]+Xt;return Xt}function Be(we,ke){return Ke(we,ke,"0")}function st(we,ke){function $t(Ls){return Ls<0?-1:Ls>0?1:0}var Xt;return(Xt=$t(we.getFullYear()-ke.getFullYear()))===0&&(Xt=$t(we.getMonth()-ke.getMonth()))===0&&(Xt=$t(we.getDate()-ke.getDate())),Xt}function qt(we){switch(we.getDay()){case 0:return new Date(we.getFullYear()-1,11,29);case 1:return we;case 2:return new Date(we.getFullYear(),0,3);case 3:return new Date(we.getFullYear(),0,2);case 4:return new Date(we.getFullYear(),0,1);case 5:return new Date(we.getFullYear()-1,11,31);case 6:return new Date(we.getFullYear()-1,11,30)}}function yn(we){var ke=zM(new Date(we.tm_year+1900,0,1),we.tm_yday),$t=new Date(ke.getFullYear(),0,4),Xt=new Date(ke.getFullYear()+1,0,4),Ls=qt($t),Nu=qt(Xt);return st(Ls,ke)<=0?st(Nu,ke)<=0?ke.getFullYear()+1:ke.getFullYear():ke.getFullYear()-1}var Rt={"%a":we=>Ee[we.tm_wday].substring(0,3),"%A":we=>Ee[we.tm_wday],"%b":we=>Ie[we.tm_mon].substring(0,3),"%B":we=>Ie[we.tm_mon],"%C":we=>{var ke=we.tm_year+1900;return Be(ke/100|0,2)},"%d":we=>Be(we.tm_mday,2),"%e":we=>Ke(we.tm_mday,2," "),"%g":we=>yn(we).toString().substring(2),"%G":yn,"%H":we=>Be(we.tm_hour,2),"%I":we=>{var ke=we.tm_hour;return ke==0?ke=12:ke>12&&(ke-=12),Be(ke,2)},"%j":we=>Be(we.tm_mday+KM(Ou(we.tm_year+1900)?Fb:Ub,we.tm_mon-1),3),"%m":we=>Be(we.tm_mon+1,2),"%M":we=>Be(we.tm_min,2),"%n":()=>`
141
141
  `,"%p":we=>we.tm_hour>=0&&we.tm_hour<12?"AM":"PM","%S":we=>Be(we.tm_sec,2),"%t":()=>" ","%u":we=>we.tm_wday||7,"%U":we=>{var ke=we.tm_yday+7-we.tm_wday;return Be(Math.floor(ke/7),2)},"%V":we=>{var ke=Math.floor((we.tm_yday+7-(we.tm_wday+6)%7)/7);if((we.tm_wday+371-we.tm_yday-2)%7<=2&&ke++,ke){if(ke==53){var $t=(we.tm_wday+371-we.tm_yday)%7;$t!=4&&($t!=3||!Ou(we.tm_year))&&(ke=1)}}else{ke=52;var Xt=(we.tm_wday+7-we.tm_yday-1)%7;(Xt==4||Xt==5&&Ou(we.tm_year%400-1))&&ke++}return Be(ke,2)},"%w":we=>we.tm_wday,"%W":we=>{var ke=we.tm_yday+7-(we.tm_wday+6)%7;return Be(Math.floor(ke/7),2)},"%y":we=>(we.tm_year+1900).toString().substring(2),"%Y":we=>we.tm_year+1900,"%z":we=>{var ke=we.tm_gmtoff,$t=ke>=0;return ke=Math.abs(ke)/60,ke=ke/60*100+ke%60,($t?"+":"-")+("0000"+ke).slice(-4)},"%Z":we=>we.tm_zone,"%%":()=>"%"};oe=oe.replace(/%%/g,"\0\0");for(var me in Rt)oe.includes(me)&&(oe=oe.replace(new RegExp(me,"g"),Rt[me](ne)));oe=oe.replace(/\0\0/g,"%");var on=QM(oe);return on.length>x?0:(JM(on,_),on.length-1)},XM=(_,x,I,P,K)=>ZM(_,x,I,P);pn=r.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},_n(),zn=r.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},Lr(),Xe(),V8(),kb=r.UnboundTypeError=H8(Error,"UnboundTypeError"),J8();var e9={s:ge,u:ie,b:_e,g:Ye,q:rt,K:yt,f:pt,Y:Kn,e:ae,ha:Rn,U:Fn,ba:It,fa:Y8,ea:K8,w:z8,aa:Nb,x:eM,h:tM,O:rM,P:iM,t:oM,o:aM,ga:cM,N:lM,C:yM,A:vM,ia:bM,ca:wM,E:EM,ka:eh,la:_M,M:kM,Q:OM,R:RM,da:NM,B:MM,$:DM,Z:LM,W:UM,X:VM,_:qM,T:$M,L:YM,F:g9,D:s9,G:m9,m:y9,a:t9,d:a9,p:i9,k:p9,I:f9,v:l9,H:h9,z:b9,S:E9,l:c9,j:o9,c:r9,n:n9,J:d9,r:v9,i:u9,y:w9,ja:WM,V:XM},Ft=J(),Vr=r._free=_=>(Vr=r._free=Ft.oa)(_),oh=r._malloc=_=>(oh=r._malloc=Ft.pa)(_),Vb=_=>(Vb=Ft.ra)(_),Ot=(_,x)=>(Ot=Ft.sa)(_,x),fa=_=>(fa=Ft.ta)(_),Ut=()=>(Ut=Ft.ua)(),Vt=_=>(Vt=Ft.va)(_),qb=_=>(qb=Ft.wa)(_),$b=_=>($b=Ft.xa)(_),Gb=(_,x,I)=>(Gb=Ft.ya)(_,x,I),Hb=_=>(Hb=Ft.za)(_);r.dynCall_viijii=(_,x,I,P,K,ne,oe)=>(r.dynCall_viijii=Ft.Aa)(_,x,I,P,K,ne,oe),r.dynCall_jiji=(_,x,I,P,K)=>(r.dynCall_jiji=Ft.Ba)(_,x,I,P,K);var Yb=r.dynCall_jiiii=(_,x,I,P,K)=>(Yb=r.dynCall_jiiii=Ft.Ca)(_,x,I,P,K);r.dynCall_iiiiij=(_,x,I,P,K,ne,oe)=>(r.dynCall_iiiiij=Ft.Da)(_,x,I,P,K,ne,oe),r.dynCall_iiiiijj=(_,x,I,P,K,ne,oe,ce,me)=>(r.dynCall_iiiiijj=Ft.Ea)(_,x,I,P,K,ne,oe,ce,me),r.dynCall_iiiiiijj=(_,x,I,P,K,ne,oe,ce,me,Ee)=>(r.dynCall_iiiiiijj=Ft.Fa)(_,x,I,P,K,ne,oe,ce,me,Ee);function t9(_,x){var I=Ut();try{return Bt(_)(x)}catch(P){if(Vt(I),P!==P+0)throw P;Ot(1,0)}}function n9(_,x,I,P){var K=Ut();try{Bt(_)(x,I,P)}catch(ne){if(Vt(K),ne!==ne+0)throw ne;Ot(1,0)}}function r9(_,x,I){var P=Ut();try{Bt(_)(x,I)}catch(K){if(Vt(P),K!==K+0)throw K;Ot(1,0)}}function i9(_,x,I,P){var K=Ut();try{return Bt(_)(x,I,P)}catch(ne){if(Vt(K),ne!==ne+0)throw ne;Ot(1,0)}}function s9(_,x,I,P,K){var ne=Ut();try{return Bt(_)(x,I,P,K)}catch(oe){if(Vt(ne),oe!==oe+0)throw oe;Ot(1,0)}}function o9(_,x){var I=Ut();try{Bt(_)(x)}catch(P){if(Vt(I),P!==P+0)throw P;Ot(1,0)}}function a9(_,x,I){var P=Ut();try{return Bt(_)(x,I)}catch(K){if(Vt(P),K!==K+0)throw K;Ot(1,0)}}function c9(_){var x=Ut();try{Bt(_)()}catch(I){if(Vt(x),I!==I+0)throw I;Ot(1,0)}}function u9(_,x,I,P,K,ne,oe,ce,me,Ee,Ie){var Ke=Ut();try{Bt(_)(x,I,P,K,ne,oe,ce,me,Ee,Ie)}catch(Be){if(Vt(Ke),Be!==Be+0)throw Be;Ot(1,0)}}function l9(_,x,I,P,K,ne,oe){var ce=Ut();try{return Bt(_)(x,I,P,K,ne,oe)}catch(me){if(Vt(ce),me!==me+0)throw me;Ot(1,0)}}function d9(_,x,I,P,K){var ne=Ut();try{Bt(_)(x,I,P,K)}catch(oe){if(Vt(ne),oe!==oe+0)throw oe;Ot(1,0)}}function f9(_,x,I,P,K,ne){var oe=Ut();try{return Bt(_)(x,I,P,K,ne)}catch(ce){if(Vt(oe),ce!==ce+0)throw ce;Ot(1,0)}}function h9(_,x,I,P,K,ne,oe,ce){var me=Ut();try{return Bt(_)(x,I,P,K,ne,oe,ce)}catch(Ee){if(Vt(me),Ee!==Ee+0)throw Ee;Ot(1,0)}}function p9(_,x,I,P,K){var ne=Ut();try{return Bt(_)(x,I,P,K)}catch(oe){if(Vt(ne),oe!==oe+0)throw oe;Ot(1,0)}}function m9(_,x,I,P){var K=Ut();try{return Bt(_)(x,I,P)}catch(ne){if(Vt(K),ne!==ne+0)throw ne;Ot(1,0)}}function g9(_,x,I,P){var K=Ut();try{return Bt(_)(x,I,P)}catch(ne){if(Vt(K),ne!==ne+0)throw ne;Ot(1,0)}}function y9(_){var x=Ut();try{return Bt(_)()}catch(I){if(Vt(x),I!==I+0)throw I;Ot(1,0)}}function v9(_,x,I,P,K,ne,oe,ce){var me=Ut();try{Bt(_)(x,I,P,K,ne,oe,ce)}catch(Ee){if(Vt(me),Ee!==Ee+0)throw Ee;Ot(1,0)}}function b9(_,x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke){var Be=Ut();try{return Bt(_)(x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke)}catch(st){if(Vt(Be),st!==st+0)throw st;Ot(1,0)}}function w9(_,x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke,Be,st,qt,yn){var Rt=Ut();try{Bt(_)(x,I,P,K,ne,oe,ce,me,Ee,Ie,Ke,Be,st,qt,yn)}catch(on){if(Vt(Rt),on!==on+0)throw on;Ot(1,0)}}function E9(_,x,I,P,K){var ne=Ut();try{return Yb(_,x,I,P,K)}catch(oe){if(Vt(ne),oe!==oe+0)throw oe;Ot(1,0)}}var Ru;ue=function _(){Ru||Wb(),Ru||(ue=_)};function Wb(){if(he>0||(L(),he>0))return;function _(){Ru||(Ru=!0,r.calledRun=!0,!w&&(W(),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),z()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),_()},1)):_()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return Wb(),t.ready}})();function L6(e){return uf(lf,e)}async function B6(e,t){return P6(lf,e,t)}async function F6(e,t){return j6(lf,e,t)}const Ov=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],U6=[...Ov,["unknown"]].map(e=>e[0]),Jc=new Map(Ov);function V6(e){for(const[t,n]of Jc)if(e===n)return t;return"unknown"}function q6(e){if(Rv(e))return{width:e.naturalWidth,height:e.naturalHeight};if(Nv(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(Mv(e))return{width:e.videoWidth,height:e.videoHeight};if(Pv(e))return{width:e.width,height:e.height};if(Lv(e))return{width:e.displayWidth,height:e.displayHeight};if(Dv(e))return{width:e.width,height:e.height};if(jv(e))return{width:e.width,height:e.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Rv(e){try{return e instanceof HTMLImageElement}catch{return!1}}function Nv(e){try{return e instanceof SVGImageElement}catch{return!1}}function Mv(e){try{return e instanceof HTMLVideoElement}catch{return!1}}function Dv(e){try{return e instanceof HTMLCanvasElement}catch{return!1}}function Pv(e){try{return e instanceof ImageBitmap}catch{return!1}}function jv(e){try{return e instanceof OffscreenCanvas}catch{return!1}}function Lv(e){try{return e instanceof VideoFrame}catch{return!1}}function Bv(e){try{return e instanceof Blob}catch{return!1}}function $6(e){try{return e instanceof ImageData}catch{return!1}}function G6(e,t){try{const n=new OffscreenCanvas(e,t);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=e,n.height=t,n}}async function Fv(e){if(Rv(e)&&!await K6(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Nv(e)&&!await z6(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Lv(e)&&Q6(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Mv(e)&&(e.readyState===0||e.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Pv(e)&&Z6(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=q6(e);if(t===0||n===0)return null;const r=G6(t,n).getContext("2d");r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function H6(e){let t;try{if(globalThis.createImageBitmap)t=await createImageBitmap(e);else if(globalThis.Image){t=new Image;let n="";try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Fv(t)}function Y6(e){const{width:t,height:n}=e;if(t===0||n===0)return null;const r=e.getContext("2d");try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function W6(e){if(Bv(e))return await H6(e);if($6(e)){if(J6(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return Dv(e)||jv(e)?Y6(e):await Fv(e)}async function K6(e){try{return await e.decode(),!0}catch{return!1}}async function z6(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function Q6(e){return e.format===null}function J6(e){return e.data.buffer.byteLength===0}function Z6(e){return e.width===0&&e.height===0}function Uv(e,t){return e instanceof DOMException?new DOMException(`${t}: ${e.message}`,e.name):e instanceof Error?new e.constructor(`${t}: ${e.message}`):new Error(`${t}: ${e}`)}var Do;class df extends EventTarget{constructor(t={}){var n;super(),_6(this,Do,void 0);try{const r=(n=t==null?void 0:t.formats)==null?void 0:n.filter(i=>i!=="unknown");if((r==null?void 0:r.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const i of r??[])if(!Jc.has(i))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${i}' is not a valid enum value of type BarcodeFormat.`);C6(this,Do,r??[]),L6().then(i=>{this.dispatchEvent(new CustomEvent("load",{detail:i}))}).catch(i=>{this.dispatchEvent(new CustomEvent("error",{detail:i}))})}catch(r){throw Uv(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return U6.filter(t=>t!=="unknown")}async detect(t){try{const n=await W6(t);if(n===null)return[];let r;try{Bv(n)?r=await B6(n,{tryHarder:!0,formats:_v(this,Do).map(i=>Jc.get(i))}):r=await F6(n,{tryHarder:!0,formats:_v(this,Do).map(i=>Jc.get(i))})}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:s,y:o},topRight:{x:c,y:u},bottomLeft:{x:d,y:f},bottomRight:{x:h,y:l}}=i.position,b=Math.min(s,c,d,h),a=Math.min(o,u,f,l),p=Math.max(s,c,d,h),y=Math.max(o,u,f,l);return{boundingBox:new DOMRectReadOnly(b,a,p-b,y-a),rawValue:i.text,format:V6(i.format),cornerPoints:[{x:s,y:o},{x:c,y:u},{x:h,y:l},{x:d,y:f}]}})}catch(n){throw Uv(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}}Do=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=df);function X6(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007"}))}function eO(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z"}),k.createElement("path",{d:"M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z"}))}function tO(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,s]=k.useState(!1);function o(){s(!0),t?r():n(),setTimeout(()=>s(!1),1e3)}return k.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?k.createElement(X6,{disabled:i,onClick:o}):k.createElement(eO,{disabled:i,onClick:o}))}function nO(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z"}))}function rO(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z"}))}function iO(e){const{status:t,scanning:n,torchToggle:r}=e;function i(s){r(s)}return n&&r?k.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?k.createElement(rO,{onClick:()=>i(!1)}):k.createElement(nO,{onClick:()=>i(!0)})):null}function sO(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z"}))}function oO(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z"}))}function aO(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const s=(n.max-n.min)/3;return k.createElement(k.Fragment,null,k.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(oO,{disabled:i<=n.min,onClick:function(){r(Math.max(i-s,n.min))}})),k.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(sO,{disabled:i>=n.max,onClick:function(){r(Math.min(i+s,n.max))}})))}function cO(e){const{scanning:t,loading:n,capabilities:r,border:i=35,onOff:s,torch:o,zoom:c,startScanning:u,stopScanning:d}=e,f="rgba(255, 0, 0, 0.5)";return k.createElement("div",{style:{position:"relative"}},k.createElement("svg",{viewBox:"0 0 100 100",style:{top:0,left:0,zIndex:1,boxSizing:"border-box",border:`${i>=35?i:35}px solid rgba(0, 0, 0, 0.2)`}},n&&k.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",k.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),k.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:f,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:f,strokeWidth:3})),s&&k.createElement(tO,{scanning:t,startScanning:u,stopScanning:d}),o&&r.torch&&k.createElement(iO,{scanning:t,status:o.status,torchToggle:o.toggle}),c&&r.zoom&&k.createElement(aO,{scanning:t,capabilities:r.zoom,value:c.value,onZoom:c.onChange}))}const uO={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},lO={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},dO={width:"100%",height:"100%",position:"relative"},fO={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var hO=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=zk(window);switch(e.browser){case"chrome":o6(window,e);break;case"firefox":l6(window,e);break;case"safari":p6(window,e);break;default:throw new Error("Unsupported browser")}});const pO="data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgChFgBgL//CIswYYH//+HKCpk4K0C9AaKKC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a1TE5LHxWEo+XecmMa3p0kqBCR6qOFaFUGpNJIIjqVi0ylBqJIkiSJIkmJj605EkSRJPetWAyVacmodBUVhGfrAZPF0AUrgRLNiqDU4VHo8h6HRObJJNdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";var Po=e=>e instanceof Date,Vv=e=>e==null;const qv=e=>typeof e=="object";var $v=e=>!Vv(e)&&!Array.isArray(e)&&qv(e)&&!Po(e),Gv=e=>Vv(e)||!qv(e);function Hv(e,t){if(Gv(e)||Gv(t))return e===t;if(Po(e)&&Po(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const o=t[i];if(Po(s)&&Po(o)||$v(s)&&$v(o)||Array.isArray(s)&&Array.isArray(o)?!Hv(s,o):s!==o)return!1}}return!0}function Zc(e){if(e===null)throw new Error("Canvas should always be defined when component is mounted.");const t=e.getContext("2d");if(t===null)throw new Error("Canvas 2D context should be non-null");t.clearRect(0,0,e.width,e.height)}function mO(e){var t;const{onScan:n,constraints:r,formats:i=["qr_code"],paused:s=!1,components:o,children:c,styles:u,classNames:d,allowMultiple:f,scanDelay:h}=e,l=k.useRef(null),b=k.useRef(null),a=k.useRef(null),p=k.useMemo(()=>({...uO,...r}),[r]),y=k.useMemo(()=>({...lO,...o}),[o]),[g,v]=k.useState(!1),[w,E]=k.useState(!0),[S,A]=k.useState(p),T=function(){const F=k.useRef(Promise.resolve({type:"stop",data:{}})),q=k.useRef(null),R=k.useRef(null),[L,W]=k.useState({}),[z,Z]=k.useState({}),te=k.useCallback(async(de,$)=>{var H;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((H=navigator==null?void 0:navigator.mediaDevices)===null||H===void 0?void 0:H.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");hO();const X=await navigator.mediaDevices.getUserMedia({audio:!1,video:$});de.srcObject!==void 0?de.srcObject=X:de.mozSrcObject!==void 0?de.mozSrcObject=X:window.URL.createObjectURL?de.src=window.URL.createObjectURL(X):window.webkitURL?de.src=window.webkitURL.createObjectURL(X):de.src=X.id,await Promise.race([de.play(),new Promise(j=>setTimeout(j,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(j=>setTimeout(j,500));const[C]=X.getVideoTracks();return Z(C.getSettings()),W(C.getCapabilities()),q.current=X,R.current=C,{type:"start",data:{videoEl:de,stream:X,constraints:$}}},[]),re=k.useCallback(async(de,$)=>{de.src="",de.srcObject=null,de.load();for(const H of $.getTracks())$.removeTrack(H),H.stop();return q.current=null,R.current=null,Z({}),{type:"stop",data:{}}},[]),he=k.useCallback(async(de,{constraints:$,restart:H=!1})=>{if(F.current=F.current.then(X=>{if(X.type==="start"){const{data:{videoEl:C,stream:j,constraints:B}}=X;return H||de!==C||$!==B?re(C,j).then(()=>te(de,$)):X}return te(de,$)}),(await F.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[te,re]),ue=k.useCallback(async()=>{if(F.current=F.current.then(de=>{if(de.type==="stop")return de;const{data:{videoEl:$,stream:H}}=de;return re($,H)}),(await F.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[re]),ye=k.useCallback(async de=>{const $=R.current;if(!$)throw new Error("No active video track found.");{de.advanced&&de.advanced[0].zoom&&$.getCapabilities().torch&&await $.applyConstraints({advanced:[{torch:!1}]}),await $.applyConstraints(de);const H=$.getCapabilities(),X=$.getSettings();W(H),Z(X)}},[]);return k.useEffect(()=>()=>{(async()=>await ue())()},[ue]),{capabilities:L,settings:z,startCamera:he,stopCamera:ue,updateConstraints:ye}}(),{startScanning:O,stopScanning:N}=function(F){const{videoElementRef:q,onScan:R,onFound:L,retryDelay:W=100,scanDelay:z=0,formats:Z=[],audio:te=!0,allowMultiple:re=!1}=F,he=k.useRef(new df({formats:Z})),ue=k.useRef(null),ye=k.useRef(null);k.useEffect(()=>{he.current=new df({formats:Z})},[Z]),k.useEffect(()=>{typeof window<"u"&&te&&(ue.current=new Audio(pO))},[te]);const de=k.useCallback($=>async H=>{if(q.current!==null&&q.current.readyState>1){const{lastScan:X,contentBefore:C,lastScanHadContent:j}=$;if(H-X<W)ye.current=window.requestAnimationFrame(de($));else{const B=await he.current.detect(q.current),M=B.some(Y=>!C.includes(Y.rawValue)),ee=B.length>0;let J=$.lastOnScan;(M||re&&ee&&H-J>=z)&&(te&&ue.current&&ue.current.paused&&ue.current.play().catch(Y=>console.error("Error playing the sound",Y)),J=H,R(B)),ee&&L(B),!ee&&j&&L(B);const Q={lastScan:H,lastOnScan:J,lastScanHadContent:ee,contentBefore:M?B.map(Y=>Y.rawValue):C};ye.current=window.requestAnimationFrame(de(Q))}}},[q.current,R,L,W]);return{startScanning:k.useCallback(()=>{const $=performance.now(),H={lastScan:$,lastOnScan:$,contentBefore:[],lastScanHadContent:!1};ye.current=window.requestAnimationFrame(de(H))},[de]),stopScanning:k.useCallback(()=>{ye.current!==null&&(window.cancelAnimationFrame(ye.current),ye.current=null)},[])}}({videoElementRef:l,onScan:n,onFound:F=>function(q,R,L,W){const z=L;if(z==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const Z=R;if(Z==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(q.length===0||W===void 0)Zc(z);else{const te=Z.offsetWidth,re=Z.offsetHeight,he=Z.videoWidth,ue=Z.videoHeight,ye=Math.max(te/he,re/ue),de=he*ye,$=ue*ye,H=de/he,X=$/ue,C=(te-de)/2,j=(re-$)/2,B=({x:Q,y:Y})=>({x:Math.floor(Q*H),y:Math.floor(Y*X)}),M=({x:Q,y:Y})=>({x:Math.floor(Q+C),y:Math.floor(Y+j)}),ee=q.map(Q=>{const{boundingBox:Y,cornerPoints:pe}=Q,{x:ge,y:le}=M(B({x:Y.x,y:Y.y})),{x:ie,y:be}=B({x:Y.width,y:Y.height});return{...Q,cornerPoints:pe.map(ae=>M(B(ae))),boundingBox:DOMRectReadOnly.fromRect({x:ge,y:le,width:ie,height:be})}});z.width=Z.offsetWidth,z.height=Z.offsetHeight;const J=z.getContext("2d");if(J===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");W(ee,J)}}(F,l.current,a.current,y.tracker),formats:i,audio:y.audio,allowMultiple:f,retryDelay:y.tracker===void 0?500:10,scanDelay:h});k.useEffect(()=>(v(!0),()=>{v(!1)}),[]),k.useEffect(()=>{g&&(N(),O())},[o==null?void 0:o.tracker]),k.useEffect(()=>{if(!Hv(p,S)){const F=p;r!=null&&r.deviceId&&delete F.facingMode,A(F)}},[r]);const D=k.useMemo(()=>({constraints:S,shouldStream:g&&!s}),[S,g,s]),U=async()=>{const F=l.current;if(F==null)throw new Error("Video should be defined when component is mounted.");const q=b.current;if(q==null)throw new Error("Canvas should be defined when component is mounted.");const R=q.getContext("2d");if(R==null)throw new Error("Canvas should be defined when component is mounted.");if(D.shouldStream){await T.stopCamera(),E(!1);try{await T.startCamera(F,D),F?E(!0):await T.stopCamera()}catch(L){console.error("error",L)}}else q.width=F.videoWidth,q.height=F.videoHeight,R.drawImage(F,0,0,F.videoWidth,F.videoHeight),await T.stopCamera(),E(!1)};k.useEffect(()=>{(async()=>await U())()},[D]);const V=k.useMemo(()=>D.shouldStream&&w,[D.shouldStream,w]);return k.useEffect(()=>{if(V){if(b.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Zc(b.current),a.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(Zc(a.current),l.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");O()}},[V]),k.createElement("div",{style:{...dO,...u==null?void 0:u.container},className:d==null?void 0:d.container},k.createElement("video",{ref:l,style:{...fO,...u==null?void 0:u.video,visibility:s?"hidden":"visible"},className:d==null?void 0:d.video,autoPlay:!0,muted:!0,playsInline:!0}),k.createElement("canvas",{ref:b,style:{display:s?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),k.createElement("canvas",{ref:a,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),k.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},y.finder&&k.createElement(cO,{scanning:w,capabilities:T.capabilities,loading:!1,onOff:y.onOff,zoom:y.zoom&&T.settings.zoom?{value:T.settings.zoom,onChange:async F=>{const q={...S,advanced:[{zoom:F}]};await T.updateConstraints(q)}}:void 0,torch:y.torch?{status:(t=T.settings.torch)!==null&&t!==void 0&&t,toggle:async F=>{const q={...S,advanced:[{torch:F}]};await T.updateConstraints(q)}}:void 0,startScanning:async()=>await U(),stopScanning:async()=>{await T.stopCamera(),Zc(a.current),E(!1)},border:u==null?void 0:u.finderBorder}),c))}function gO(){const[e,t]=k.useState([]);return k.useEffect(()=>{(async()=>t(await async function(){return(await navigator.mediaDevices.enumerateDevices()).filter(({kind:n})=>n==="videoinput")}()))()},[]),e}function jo({dataSetter:e,setDefer:t,label:n=""}){const r=k.useRef(null),i=gO(),[s,o]=kk()??[0,0],{subscribe:c,unsubscribe:u}=Vc(),d=f=>{e(f[0].rawValue)};return k.useEffect(()=>{o&&o<=332&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"});const f=h=>{e(h.detail.code)};return c("onCodeScan",f),()=>{u("onCodeScan",f)}},[o]),m.jsxs("div",{ref:r,children:[!!i.length&&m.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[m.jsx(vO,{onScan:d}),m.jsx("hr",{})]}),m.jsx(Cs,{label:n,autoFocus:!0,placeholder:"CDE2341S",onChange:f=>{t&&t(!0),e(f.target.value)}})]})}const yO="data:image/svg+xml,%3csvg%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m21.25%207.5c.3796958%200%20.693491.28215388.7431534.64822944l.0068466.10177056v8.5c0%201.7330315-1.3564548%203.1492459-3.0655761%203.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555%200-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932%201.06066018%200%20.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734%200%201.6711923-.7071103%201.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815%202%202c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554%200%20.03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2%202c-.2928932.29289321-.767767.29289321-1.0606602%200-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734%200-1.67119234.70711027-1.7441988%201.60647279l-.0058012.14352721v8.5c0%20.4142136-.33578644.75-.75.75-.37969577%200-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146%201.35645477-3.14924593%203.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117%205.85294824c2.209139%200%204%201.790861%204%204s-1.790861%204-4%204-4-1.790861-4-4%201.790861-4%204-4zm0%201.5c-1.3807119%200-2.5%201.1192881-2.5%202.5s1.1192881%202.5%202.5%202.5%202.5-1.1192881%202.5-2.5-1.1192881-2.5-2.5-2.5z'%20fill='%23212121'/%3e%3c/svg%3e";function vO({onScan:e}){const t=Tt(),[n,r]=k.useState(t.cameraFacingMode??ws.USER);return m.jsxs("div",{className:"relative w-full",children:[m.jsx(mO,{components:{finder:!1},onScan:e,constraints:{facingMode:n},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-381px)] min-h-[267px] overflow-hidden rounded"}}),m.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-overlay",onClick:()=>n===ws.USER?r(ws.ENVIRONMENT):r(ws.USER),children:m.jsx("img",{src:yO,alt:"camera-switch"})})]})}function bO({value:e,placeholder:t,open:n,setOpen:r,disabled:i}){return m.jsxs("div",{className:`flex items-center justify-between rounded border p-2 ${i?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!i&&r(!n),children:[m.jsx("span",{className:`text-sm ${i?"text-core-gray-300":"text-core-gray-800"}`,children:e||t}),m.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function wO({label:e,children:t}){return m.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[m.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:e}),t]})}function ff(e){return m.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:e.label})}function EO(e){const t=k.useRef(null),[n,r]=k.useState(!1),[i,s]=k.useState(e.value??"");tv(t,r);const o=(u,d)=>{s(u),r(!1),e.onChange&&e.onChange(d)},c=k.Children.map(e.children,u=>{if(k.isValidElement(u)){if(u.type===ff)return m.jsx("div",{onClick:()=>o(u.props.label,u.props.value),children:u});if(u.type===wO){const d=k.Children.map(u.props.children,f=>{if(k.isValidElement(f)&&f.type===ff)return m.jsx("div",{onClick:()=>o(f.props.label,f.props.value),children:f})});return k.cloneElement(u,{},...d)}}});return m.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[m.jsx(Sn,{description:e.description,disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),m.jsx("div",{children:m.jsxs("div",{className:"relative",children:[m.jsx(bO,{value:i,placeholder:e.placeholder,open:n,setOpen:r,disabled:e.disabled}),e.children&&m.jsx("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!n&&"hidden"} py-2`,children:c})]})}),m.jsx(Sn.Helper,{helperText:e.helperText})]})}var SO=Object.defineProperty,xO=(e,t)=>{for(var n in t)SO(e,n,{get:t[n],enumerable:!0})},nr={};xO(nr,{assign:()=>AO,colors:()=>gi,createStringInterpolator:()=>Ef,skipAnimation:()=>Zv,to:()=>Jv,willAdvance:()=>Sf});var hf=Bo(),Ue=e=>Lo(e,hf),pf=Bo();Ue.write=e=>Lo(e,pf);var Xc=Bo();Ue.onStart=e=>Lo(e,Xc);var mf=Bo();Ue.onFrame=e=>Lo(e,mf);var gf=Bo();Ue.onFinish=e=>Lo(e,gf);var Is=[];Ue.setTimeout=(e,t)=>{const n=Ue.now()+t,r=()=>{const s=Is.findIndex(o=>o.cancel==r);~s&&Is.splice(s,1),mi-=~s?1:0},i={time:n,handler:e,cancel:r};return Is.splice(Yv(n),0,i),mi+=1,Wv(),i};var Yv=e=>~(~Is.findIndex(t=>t.time>e)||~Is.length);Ue.cancel=e=>{Xc.delete(e),mf.delete(e),gf.delete(e),hf.delete(e),pf.delete(e)},Ue.sync=e=>{vf=!0,Ue.batchedUpdates(e),vf=!1},Ue.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Ue.onStart(n)}return r.handler=e,r.cancel=()=>{Xc.delete(n),t=null},r};var yf=typeof window<"u"?window.requestAnimationFrame:()=>{};Ue.use=e=>yf=e,Ue.now=typeof performance<"u"?()=>performance.now():Date.now,Ue.batchedUpdates=e=>e(),Ue.catch=console.error,Ue.frameLoop="always",Ue.advance=()=>{Ue.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):zv()};var pi=-1,mi=0,vf=!1;function Lo(e,t){vf?(t.delete(e),e(0)):(t.add(e),Wv())}function Wv(){pi<0&&(pi=0,Ue.frameLoop!=="demand"&&yf(Kv))}function _O(){pi=-1}function Kv(){~pi&&(yf(Kv),Ue.batchedUpdates(zv))}function zv(){const e=pi;pi=Ue.now();const t=Yv(pi);if(t&&(Qv(Is.splice(0,t),n=>n.handler()),mi-=t),!mi){_O();return}Xc.flush(),hf.flush(e?Math.min(64,pi-e):16.667),mf.flush(),pf.flush(),gf.flush()}function Bo(){let e=new Set,t=e;return{add(n){mi+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return mi-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,mi-=t.size,Qv(t,r=>r(n)&&e.add(r)),mi+=e.size,t=e)}}}function Qv(e,t){e.forEach(n=>{try{t(n)}catch(r){Ue.catch(r)}})}function bf(){}var CO=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),xe={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Dr(e,t){if(xe.arr(e)){if(!xe.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var nt=(e,t)=>e.forEach(t);function br(e,t,n){if(xe.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Bn=e=>xe.und(e)?[]:xe.arr(e)?e:[e];function Fo(e,t){if(e.size){const n=Array.from(e);e.clear(),nt(n,t)}}var Uo=(e,...t)=>Fo(e,n=>n(...t)),wf=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Ef,Jv,gi=null,Zv=!1,Sf=bf,AO=e=>{e.to&&(Jv=e.to),e.now&&(Ue.now=e.now),e.colors!==void 0&&(gi=e.colors),e.skipAnimation!=null&&(Zv=e.skipAnimation),e.createStringInterpolator&&(Ef=e.createStringInterpolator),e.requestAnimationFrame&&Ue.use(e.requestAnimationFrame),e.batchedUpdates&&(Ue.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Sf=e.willAdvance),e.frameLoop&&(Ue.frameLoop=e.frameLoop)},Vo=new Set,Yn=[],xf=[],eu=0,tu={get idle(){return!Vo.size&&!Yn.length},start(e){eu>e.priority?(Vo.add(e),Ue.onStart(TO)):(Xv(e),Ue(_f))},advance:_f,sort(e){if(eu)Ue.onFrame(()=>tu.sort(e));else{const t=Yn.indexOf(e);~t&&(Yn.splice(t,1),e1(e))}},clear(){Yn=[],Vo.clear()}};function TO(){Vo.forEach(Xv),Vo.clear(),Ue(_f)}function Xv(e){Yn.includes(e)||e1(e)}function e1(e){Yn.splice(IO(Yn,t=>t.priority>e.priority),0,e)}function _f(e){const t=xf;for(let n=0;n<Yn.length;n++){const r=Yn[n];eu=r.priority,r.idle||(Sf(r),r.advance(e),r.idle||t.push(r))}return eu=0,xf=Yn,xf.length=0,Yn=t,Yn.length>0}function IO(e,t){const n=e.findIndex(t);return n<0?e.length:n}var kO=(e,t,n)=>Math.min(Math.max(n,e),t),OO={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},rr="[-+]?\\d*\\.?\\d+",nu=rr+"%";function ru(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var RO=new RegExp("rgb"+ru(rr,rr,rr)),NO=new RegExp("rgba"+ru(rr,rr,rr,rr)),MO=new RegExp("hsl"+ru(rr,nu,nu)),DO=new RegExp("hsla"+ru(rr,nu,nu,rr)),PO=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jO=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,LO=/^#([0-9a-fA-F]{6})$/,BO=/^#([0-9a-fA-F]{8})$/;function FO(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=LO.exec(e))?parseInt(t[1]+"ff",16)>>>0:gi&&gi[e]!==void 0?gi[e]:(t=RO.exec(e))?(ks(t[1])<<24|ks(t[2])<<16|ks(t[3])<<8|255)>>>0:(t=NO.exec(e))?(ks(t[1])<<24|ks(t[2])<<16|ks(t[3])<<8|r1(t[4]))>>>0:(t=PO.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=BO.exec(e))?parseInt(t[1],16)>>>0:(t=jO.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=MO.exec(e))?(t1(n1(t[1]),iu(t[2]),iu(t[3]))|255)>>>0:(t=DO.exec(e))?(t1(n1(t[1]),iu(t[2]),iu(t[3]))|r1(t[4]))>>>0:null}function Cf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function t1(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=Cf(i,r,e+1/3),o=Cf(i,r,e),c=Cf(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(c*255)<<8}function ks(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function n1(e){return(parseFloat(e)%360+360)%360/360}function r1(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function iu(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function i1(e){let t=FO(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,s=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${s})`}var qo=(e,t,n)=>{if(xe.fun(e))return e;if(xe.arr(e))return qo({range:e,output:t,extrapolate:n});if(xe.str(e.output[0]))return Ef(e);const r=e,i=r.output,s=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||(d=>d);return d=>{const f=VO(d,s);return UO(d,s[f],s[f+1],i[f],i[f+1],u,o,c,r.map)}};function UO(e,t,n,r,i,s,o,c,u){let d=u?u(e):e;if(d<t){if(o==="identity")return d;o==="clamp"&&(d=t)}if(d>n){if(c==="identity")return d;c==="clamp"&&(d=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?d=-d:n===1/0?d=d-t:d=(d-t)/(n-t),d=s(d),r===-1/0?d=-d:i===1/0?d=d+r:d=d*(i-r)+r,d)}function VO(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var qO=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return kO(0,1,i/e)},su=1.70158,ou=su*1.525,s1=su+1,o1=2*Math.PI/3,a1=2*Math.PI/4.5,au=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,$O={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>s1*e*e*e-su*e*e,easeOutBack:e=>1+s1*Math.pow(e-1,3)+su*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ou+1)*2*e-ou)/2:(Math.pow(2*e-2,2)*((ou+1)*(e*2-2)+ou)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*o1),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*o1)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*a1))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*a1)/2+1,easeInBounce:e=>1-au(1-e),easeOutBounce:au,easeInOutBounce:e=>e<.5?(1-au(1-2*e))/2:(1+au(2*e-1))/2,steps:qO},$o=Symbol.for("FluidValue.get"),Os=Symbol.for("FluidValue.observers"),Wn=e=>!!(e&&e[$o]),On=e=>e&&e[$o]?e[$o]():e,c1=e=>e[Os]||null;function GO(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Go(e,t){const n=e[Os];n&&n.forEach(r=>{GO(r,t)})}var u1=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");HO(this,e)}},HO=(e,t)=>l1(e,$o,t);function Rs(e,t){if(e[$o]){let n=e[Os];n||l1(e,Os,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Ho(e,t){const n=e[Os];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Os]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var l1=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),cu=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,YO=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,d1=new RegExp(`(${cu.source})(%|[a-z]+)`,"i"),WO=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,uu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,f1=e=>{const[t,n]=KO(e);if(!t||wf())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&uu.test(n))return f1(n);if(n)return n}return e},KO=e=>{const t=uu.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Af,zO=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,h1=e=>{Af||(Af=gi?new RegExp(`(${Object.keys(gi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>On(s).replace(uu,f1).replace(YO,i1).replace(Af,i1)),n=t.map(s=>s.match(cu).map(Number)),i=n[0].map((s,o)=>n.map(c=>{if(!(o in c))throw Error('The arity of each "output" value must be equal');return c[o]})).map(s=>qo({...e,output:s}));return s=>{var u;const o=!d1.test(t[0])&&((u=t.find(d=>d1.test(d)))==null?void 0:u.replace(cu,""));let c=0;return t[0].replace(cu,()=>`${i[c++](s)}${o||""}`).replace(WO,zO)}},Tf="react-spring: ",p1=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Tf}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},QO=p1(console.warn);function JO(){QO(`${Tf}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ZO=p1(console.warn);function XO(){ZO(`${Tf}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function lu(e){return xe.str(e)&&(e[0]=="#"||/\d/.test(e)||!wf()&&uu.test(e)||e in(gi||{}))}var If=wf()?k.useEffect:k.useLayoutEffect,eR=()=>{const e=k.useRef(!1);return If(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function m1(){const e=k.useState()[1],t=eR();return()=>{t.current&&e(Math.random())}}function tR(e,t){const[n]=k.useState(()=>({inputs:t,result:e()})),r=k.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&nR(t,s.inputs)||(s={inputs:t,result:e()}):s=n,k.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function nR(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var g1=e=>k.useEffect(e,rR),rR=[];function y1(e){const t=k.useRef();return k.useEffect(()=>{t.current=e}),t.current}var Yo=Symbol.for("Animated:node"),iR=e=>!!e&&e[Yo]===e,wr=e=>e&&e[Yo],kf=(e,t)=>CO(e,Yo,t),du=e=>e&&e[Yo]&&e[Yo].getPayload(),v1=class{constructor(){kf(this,this)}getPayload(){return this.payload||[]}},Wo=class extends v1{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,xe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Wo(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return xe.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,xe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Ko=class extends Wo{constructor(e){super(0),this._string=null,this._toString=qo({output:[e,e]})}static create(e){return new Ko(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(xe.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=qo({output:[this.getValue(),e]})),this._value=0,super.reset()}},fu={dependencies:null},hu=class extends v1{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return br(this.source,(n,r)=>{iR(n)?t[r]=n.getValue(e):Wn(n)?t[r]=On(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&nt(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return br(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){fu.dependencies&&Wn(e)&&fu.dependencies.add(e);const t=du(e);t&&nt(t,n=>this.add(n))}},b1=class extends hu{constructor(e){super(e)}static create(e){return new b1(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(sR)),!0)}};function sR(e){return(lu(e)?Ko:Wo).create(e)}function Of(e){const t=wr(e);return t?t.constructor:xe.arr(e)?b1:lu(e)?Ko:Wo}var w1=(e,t)=>{const n=!xe.fun(e)||e.prototype&&e.prototype.isReactComponent;return k.forwardRef((r,i)=>{const s=k.useRef(null),o=n&&k.useCallback(a=>{s.current=cR(i,a)},[i]),[c,u]=aR(r,t),d=m1(),f=()=>{const a=s.current;if(n&&!a)return;(a?t.applyAnimatedValues(a,c.getValue(!0)):!1)===!1&&d()},h=new oR(f,u),l=k.useRef();If(()=>(l.current=h,nt(u,a=>Rs(a,h)),()=>{l.current&&(nt(l.current.deps,a=>Ho(a,l.current)),Ue.cancel(l.current.update))})),k.useEffect(f,[]),g1(()=>()=>{const a=l.current;nt(a.deps,p=>Ho(p,a))});const b=t.getComponentProps(c.getValue());return se.createElement(e,{...b,ref:o})})},oR=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Ue.write(this.update)}};function aR(e,t){const n=new Set;return fu.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new hu(e),fu.dependencies=null,[e,n]}function cR(e,t){return e&&(xe.fun(e)?e(t):e.current=t),t}var E1=Symbol.for("AnimatedComponent"),uR=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new hu(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=o=>{const c=S1(o)||"Anonymous";return xe.str(o)?o=s[o]||(s[o]=w1(o,i)):o=o[E1]||(o[E1]=w1(o,i)),o.displayName=`Animated(${c})`,o};return br(e,(o,c)=>{xe.arr(e)&&(c=S1(o)),s[c]=s(o)}),{animated:s}},S1=e=>xe.str(e)?e:e&&xe.str(e.displayName)?e.displayName:xe.fun(e)&&e.name||null;function Pi(e,...t){return xe.fun(e)?e(...t):e}var zo=(e,t)=>e===!0||!!(t&&e&&(xe.fun(e)?e(t):Bn(e).includes(t))),x1=(e,t)=>xe.obj(e)?t&&e[t]:e,_1=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,lR=e=>e,Rf=(e,t=lR)=>{let n=dR;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const s=t(e[i],i);xe.und(s)||(r[i]=s)}return r},dR=["config","onProps","onStart","onChange","onPause","onResume","onRest"],fR={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function hR(e){const t={};let n=0;if(br(e,(r,i)=>{fR[i]||(t[i]=r,n++)}),n)return t}function C1(e){const t=hR(e);if(t){const n={to:t};return br(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Qo(e){return e=On(e),xe.arr(e)?e.map(Qo):lu(e)?nr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function pR(e){for(const t in e)return!0;return!1}function Nf(e){return xe.fun(e)||xe.arr(e)&&xe.obj(e[0])}function mR(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function gR(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var yR={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Mf={...yR.default,mass:1,damping:1,easing:$O.linear,clamp:!1},vR=class{constructor(){this.velocity=0,Object.assign(this,Mf)}};function bR(e,t,n){n&&(n={...n},A1(n,t),t={...n,...t}),A1(e,t),Object.assign(e,t);for(const o in Mf)e[o]==null&&(e[o]=Mf[o]);let{frequency:r,damping:i}=e;const{mass:s}=e;return xe.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*s,e.friction=4*Math.PI*i*s/r),e}function A1(e,t){if(!xe.und(t.decay))e.duration=void 0;else{const n=!xe.und(t.tension)||!xe.und(t.friction);(n||!xe.und(t.frequency)||!xe.und(t.damping)||!xe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var T1=[],wR=class{constructor(){this.changed=!1,this.values=T1,this.toValues=null,this.fromValues=T1,this.config=new vR,this.immediate=!1}};function I1(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((o,c)=>{let u,d,f=zo(n.cancel??(r==null?void 0:r.cancel),t);if(f)b();else{xe.und(n.pause)||(i.paused=zo(n.pause,t));let a=r==null?void 0:r.pause;a!==!0&&(a=i.paused||zo(a,t)),u=Pi(n.delay||0,t),a?(i.resumeQueue.add(l),s.pause()):(s.resume(),l())}function h(){i.resumeQueue.add(l),i.timeouts.delete(d),d.cancel(),u=d.time-Ue.now()}function l(){u>0&&!nr.skipAnimation?(i.delayed=!0,d=Ue.setTimeout(b,u),i.pauseQueue.add(h),i.timeouts.add(d)):b()}function b(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(h),i.timeouts.delete(d),e<=(i.cancelId||0)&&(f=!0);try{s.start({...n,callId:e,cancel:f},o)}catch(a){c(a)}}})}var Df=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ns(e.get()):t.every(n=>n.noop)?k1(e.get()):ir(e.get(),t.every(n=>n.finished)),k1=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ir=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ns=e=>({value:e,cancelled:!0,finished:!1});function O1(e,t,n,r){const{callId:i,parentId:s,onRest:o}=t,{asyncTo:c,promise:u}=n;return!s&&e===c&&!t.reset?u:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const d=Rf(t,(y,g)=>g==="onRest"?void 0:y);let f,h;const l=new Promise((y,g)=>(f=y,h=g)),b=y=>{const g=i<=(n.cancelId||0)&&Ns(r)||i!==n.asyncId&&ir(r,!1);if(g)throw y.result=g,h(y),y},a=(y,g)=>{const v=new R1,w=new N1;return(async()=>{if(nr.skipAnimation)throw Jo(n),w.result=ir(r,!1),h(w),w;b(v);const E=xe.obj(y)?{...y}:{...g,to:y};E.parentId=i,br(d,(A,T)=>{xe.und(E[T])&&(E[T]=A)});const S=await r.start(E);return b(v),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),S})()};let p;if(nr.skipAnimation)return Jo(n),ir(r,!1);try{let y;xe.arr(e)?y=(async g=>{for(const v of g)await a(v)})(e):y=Promise.resolve(e(a,r.stop.bind(r))),await Promise.all([y.then(f),l]),p=ir(r.get(),!0,!1)}catch(y){if(y instanceof R1)p=y.result;else if(y instanceof N1)p=y.result;else throw y}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?c:void 0,n.promise=s?u:void 0)}return xe.fun(o)&&Ue.batchedUpdates(()=>{o(p,r,r.item)}),p})()}function Jo(e,t){Fo(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var R1=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},N1=class extends Error{constructor(){super("SkipAnimationSignal")}},Pf=e=>e instanceof jf,ER=1,jf=class extends u1{constructor(){super(...arguments),this.id=ER++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=wr(this);return e&&e.getValue()}to(...e){return nr.to(this,e)}interpolate(...e){return JO(),nr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Go(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||tu.sort(this),Go(this,{type:"priority",parent:this,priority:e})}},ji=Symbol.for("SpringPhase"),M1=1,Lf=2,Bf=4,Ff=e=>(e[ji]&M1)>0,yi=e=>(e[ji]&Lf)>0,Zo=e=>(e[ji]&Bf)>0,D1=(e,t)=>t?e[ji]|=Lf|M1:e[ji]&=~Lf,P1=(e,t)=>t?e[ji]|=Bf:e[ji]&=~Bf,SR=class extends jf{constructor(e,t){if(super(),this.animation=new wR,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!xe.und(e)||!xe.und(t)){const n=xe.obj(e)?{...e}:{...t,from:e};xe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(yi(this)||this._state.asyncTo)||Zo(this)}get goal(){return On(this.animation.to)}get velocity(){const e=wr(this);return e instanceof Wo?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Ff(this)}get isAnimating(){return yi(this)}get isPaused(){return Zo(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:s}=r,o=du(r.to);!o&&Wn(r.to)&&(i=Bn(On(r.to))),r.values.forEach((d,f)=>{if(d.done)return;const h=d.constructor==Ko?1:o?o[f].lastPosition:i[f];let l=r.immediate,b=h;if(!l){if(b=d.lastPosition,s.tension<=0){d.done=!0;return}let a=d.elapsedTime+=e;const p=r.fromValues[f],y=d.v0!=null?d.v0:d.v0=xe.arr(s.velocity)?s.velocity[f]:s.velocity;let g;const v=s.precision||(p==h?.005:Math.min(1,Math.abs(h-p)*.001));if(xe.und(s.duration))if(s.decay){const w=s.decay===!0?.998:s.decay,E=Math.exp(-(1-w)*a);b=p+y/(1-w)*(1-E),l=Math.abs(d.lastPosition-b)<=v,g=y*E}else{g=d.lastVelocity==null?y:d.lastVelocity;const w=s.restVelocity||v/10,E=s.clamp?0:s.bounce,S=!xe.und(E),A=p==h?d.v0>0:p<h;let T,O=!1;const N=1,D=Math.ceil(e/N);for(let U=0;U<D&&(T=Math.abs(g)>w,!(!T&&(l=Math.abs(h-b)<=v,l)));++U){S&&(O=b==h||b>h==A,O&&(g=-g*E,b=h));const V=-s.tension*1e-6*(b-h),F=-s.friction*.001*g,q=(V+F)/s.mass;g=g+q*N,b=b+g*N}}else{let w=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,d.durationProgress>0&&(d.elapsedTime=s.duration*d.durationProgress,a=d.elapsedTime+=e)),w=(s.progress||0)+a/this._memoizedDuration,w=w>1?1:w<0?0:w,d.durationProgress=w),b=p+s.easing(w)*(h-p),g=(b-d.lastPosition)/e,l=w==1}d.lastVelocity=g,Number.isNaN(b)&&(console.warn("Got NaN while animating:",this),l=!0)}o&&!o[f].done&&(l=!1),l?d.done=!0:t=!1,d.setValue(b,s.round)&&(n=!0)});const c=wr(this),u=c.getValue();if(t){const d=On(r.to);(u!==d||n)&&!s.decay?(c.setValue(d),this._onChange(d)):n&&s.decay&&this._onChange(u),this._stop()}else n&&this._onChange(u)}set(e){return Ue.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(yi(this)){const{to:e,config:t}=this.animation;Ue.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return xe.und(e)?(n=this.queue||[],this.queue=[]):n=[xe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Df(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Jo(this._state,e&&this._lastCallId),Ue.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=xe.obj(n)?n[t]:n,(n==null||Nf(n))&&(n=void 0),r=xe.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Ff(this)||(e.reverse&&([n,r]=[r,n]),r=On(r),xe.und(r)?wr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Rf(e,(o,c)=>/^on/.test(c)?x1(o,n):o)),B1(this,e,"onProps"),ta(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return I1(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{Zo(this)||(P1(this,!0),Uo(s.pauseQueue),ta(this,"onPause",ir(this,Xo(this,this.animation.to)),this))},resume:()=>{Zo(this)&&(P1(this,!1),yi(this)&&this._resume(),Uo(s.resumeQueue),ta(this,"onResume",ir(this,Xo(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const c=j1(e);if(c)return this._update(c,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ns(this));const r=!xe.und(e.to),i=!xe.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ns(this));const{key:s,defaultProps:o,animation:c}=this,{to:u,from:d}=c;let{to:f=u,from:h=d}=e;i&&!r&&(!t.default||xe.und(f))&&(f=h),t.reverse&&([f,h]=[h,f]);const l=!Dr(h,d);l&&(c.from=h),h=On(h);const b=!Dr(f,u);b&&this._focus(f);const a=Nf(t.to),{config:p}=c,{decay:y,velocity:g}=p;(r||i)&&(p.velocity=0),t.config&&!a&&bR(p,Pi(t.config,s),t.config!==o.config?Pi(o.config,s):void 0);let v=wr(this);if(!v||xe.und(f))return n(ir(this,!0));const w=xe.und(t.reset)?i&&!t.default:!xe.und(h)&&zo(t.reset,s),E=w?h:this.get(),S=Qo(f),A=xe.num(S)||xe.arr(S)||lu(S),T=!a&&(!A||zo(o.immediate||t.immediate,s));if(b){const U=Of(f);if(U!==v.constructor)if(T)v=this._set(S);else throw Error(`Cannot animate between ${v.constructor.name} and ${U.name}, as the "to" prop suggests`)}const O=v.constructor;let N=Wn(f),D=!1;if(!N){const U=w||!Ff(this)&&l;(b||U)&&(D=Dr(Qo(E),S),N=!D),(!Dr(c.immediate,T)&&!T||!Dr(p.decay,y)||!Dr(p.velocity,g))&&(N=!0)}if(D&&yi(this)&&(c.changed&&!w?N=!0:N||this._stop(u)),!a&&((N||Wn(u))&&(c.values=v.getPayload(),c.toValues=Wn(f)?null:O==Ko?[1]:Bn(S)),c.immediate!=T&&(c.immediate=T,!T&&!w&&this._set(u)),N)){const{onRest:U}=c;nt(_R,F=>B1(this,t,F));const V=ir(this,Xo(this,u));Uo(this._pendingCalls,V),this._pendingCalls.add(n),c.changed&&Ue.batchedUpdates(()=>{var F;c.changed=!w,U==null||U(V,this),w?Pi(o.onRest,V):(F=c.onStart)==null||F.call(c,V,this)})}w&&this._set(E),a?n(O1(t.to,t,this._state,this)):N?this._start():yi(this)&&!b?this._pendingCalls.add(n):n(k1(E))}_focus(e){const t=this.animation;e!==t.to&&(c1(this)&&this._detach(),t.to=e,c1(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Wn(t)&&(Rs(t,this),Pf(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Wn(e)&&Ho(e,this)}_set(e,t=!0){const n=On(e);if(!xe.und(n)){const r=wr(this);if(!r||!Dr(n,r.getValue())){const i=Of(n);!r||r.constructor!=i?kf(this,i.create(n)):r.setValue(n),r&&Ue.batchedUpdates(()=>{this._onChange(n,t)})}}return wr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ta(this,"onStart",ir(this,Xo(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Pi(this.animation.onChange,e,this)),Pi(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;wr(this).reset(On(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),yi(this)||(D1(this,!0),Zo(this)||this._resume())}_resume(){nr.skipAnimation?this.finish():tu.start(this)}_stop(e,t){if(yi(this)){D1(this,!1);const n=this.animation;nt(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Go(this,{type:"idle",parent:this});const r=t?Ns(this.get()):ir(this.get(),Xo(this,e??n.to));Uo(this._pendingCalls,r),n.changed&&(n.changed=!1,ta(this,"onRest",r,this))}}};function Xo(e,t){const n=Qo(t),r=Qo(e.get());return Dr(r,n)}function j1(e,t=e.loop,n=e.to){const r=Pi(t);if(r){const i=r!==!0&&C1(r),s=(i||e).reverse,o=!i||i.reset;return ea({...e,loop:t,default:!1,pause:void 0,to:!s||Nf(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function ea(e){const{to:t,from:n}=e=C1(e),r=new Set;return xe.obj(t)&&L1(t,r),xe.obj(n)&&L1(n,r),e.keys=r.size?Array.from(r):null,e}function xR(e){const t=ea(e);return xe.und(t.default)&&(t.default=Rf(t)),t}function L1(e,t){br(e,(n,r)=>n!=null&&t.add(r))}var _R=["onStart","onRest","onChange","onPause","onResume"];function B1(e,t,n){e.animation[n]=t[n]!==_1(t,n)?x1(t[n],e.key):void 0}function ta(e,t,...n){var r,i,s,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(s=e.defaultProps)[t])==null||o.call(s,...n)}var CR=["onStart","onChange","onRest"],AR=1,TR=class{constructor(e,t){this.id=AR++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];xe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ea(e)),this}start(e){let{queue:t}=this;return e?t=Bn(e).map(ea):this.queue=[],this._flush?this._flush(this,t):(G1(this,t),Uf(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;nt(Bn(t),r=>n[r].stop(!!e))}else Jo(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(xe.und(e))this.start({pause:!0});else{const t=this.springs;nt(Bn(e),n=>t[n].pause())}return this}resume(e){if(xe.und(e))this.start({pause:!1});else{const t=this.springs;nt(Bn(e),n=>t[n].resume())}return this}each(e){br(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,Fo(e,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const s=!r&&this._started,o=i||s&&n.size?this.get():null;i&&t.size&&Fo(t,([c,u])=>{u.value=o,c(u,this,this._item)}),s&&(this._started=!1,Fo(n,([c,u])=>{u.value=o,c(u,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Ue.onFrame(this._onFrame)}};function Uf(e,t){return Promise.all(t.map(n=>F1(e,n))).then(n=>Df(e,n))}async function F1(e,t,n){const{keys:r,to:i,from:s,loop:o,onRest:c,onResolve:u}=t,d=xe.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const f=xe.arr(i)||xe.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,d&&(d.onRest=void 0)):nt(CR,p=>{const y=t[p];if(xe.fun(y)){const g=e._events[p];t[p]=({finished:v,cancelled:w})=>{const E=g.get(y);E?(v||(E.finished=!1),w&&(E.cancelled=!0)):g.set(y,{value:null,finished:v||!1,cancelled:w||!1})},d&&(d[p]=t[p])}});const h=e._state;t.pause===!h.paused?(h.paused=t.pause,Uo(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const l=(r||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),b=t.cancel===!0||_1(t,"cancel")===!0;(f||b&&h.asyncId)&&l.push(I1(++e._lastAsyncId,{props:t,state:h,actions:{pause:bf,resume:bf,start(p,y){b?(Jo(h,e._lastAsyncId),y(Ns(e))):(p.onRest=c,y(O1(f,p,h,e)))}}})),h.paused&&await new Promise(p=>{h.resumeQueue.add(p)});const a=Df(e,await Promise.all(l));if(o&&a.finished&&!(n&&a.noop)){const p=j1(t,o,i);if(p)return G1(e,[p]),F1(e,p,!0)}return u&&Ue.batchedUpdates(()=>u(a,e,e.item)),a}function U1(e,t){const n={...e.springs};return t&&nt(Bn(t),r=>{xe.und(r.keys)&&(r=ea(r)),xe.obj(r.to)||(r={...r,to:void 0}),$1(n,r,i=>q1(i))}),V1(e,n),n}function V1(e,t){br(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Rs(n,e))})}function q1(e,t){const n=new SR;return n.key=e,t&&Rs(n,t),n}function $1(e,t,n){t.keys&&nt(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function G1(e,t){nt(t,n=>{$1(e.springs,n,r=>q1(r,e))})}var pu=({children:e,...t})=>{const n=k.useContext(mu),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=tR(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=mu;return se.createElement(s,{value:t},e)},mu=IR(pu,{});pu.Provider=mu.Provider,pu.Consumer=mu.Consumer;function IR(e,t){return Object.assign(e,se.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var kR=()=>{const e=[],t=function(r){XO();const i=[];return nt(e,(s,o)=>{if(xe.und(r))i.push(s.start());else{const c=n(r,s,o);c&&i.push(s.start(c))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return nt(e,r=>r.pause(...arguments)),this},t.resume=function(){return nt(e,r=>r.resume(...arguments)),this},t.set=function(r){nt(e,(i,s)=>{const o=xe.fun(r)?r(s,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return nt(e,(s,o)=>{if(xe.und(r))i.push(s.start());else{const c=this._getProps(r,s,o);c&&i.push(s.start(c))}}),i},t.stop=function(){return nt(e,r=>r.stop(...arguments)),this},t.update=function(r){return nt(e,(i,s)=>i.update(this._getProps(r,i,s))),this};const n=function(r,i,s){return xe.fun(r)?r(s,i):r};return t._getProps=n,t};function OR(e,t,n){const r=xe.fun(t)&&t;r&&!n&&(n=[]);const i=k.useMemo(()=>r||arguments.length==3?kR():void 0,[]),s=k.useRef(0),o=m1(),c=k.useMemo(()=>({ctrls:[],queue:[],flush(g,v){const w=U1(g,v);return s.current>0&&!c.queue.length&&!Object.keys(w).some(S=>!g.springs[S])?Uf(g,v):new Promise(S=>{V1(g,w),c.queue.push(()=>{S(Uf(g,v))}),o()})}}),[]),u=k.useRef([...c.ctrls]),d=[],f=y1(e)||0;k.useMemo(()=>{nt(u.current.slice(e,f),g=>{mR(g,i),g.stop(!0)}),u.current.length=e,h(f,e)},[e]),k.useMemo(()=>{h(0,Math.min(f,e))},n);function h(g,v){for(let w=g;w<v;w++){const E=u.current[w]||(u.current[w]=new TR(null,c.flush)),S=r?r(w,E):t[w];S&&(d[w]=xR(S))}}const l=u.current.map((g,v)=>U1(g,d[v])),b=k.useContext(pu),a=y1(b),p=b!==a&&pR(b);If(()=>{s.current++,c.ctrls=u.current;const{queue:g}=c;g.length&&(c.queue=[],nt(g,v=>v())),nt(u.current,(v,w)=>{i==null||i.add(v),p&&v.start({default:b});const E=d[w];E&&(gR(v,E.ref),v.ref?v.queue.push(E):v.start(E))})}),g1(()=>()=>{nt(c.ctrls,g=>g.stop(!0))});const y=l.map(g=>({...g}));return i?[y,i]:y}function RR(e,t){const n=xe.fun(e),[[r],i]=OR(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var NR=class extends jf{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=qo(...t);const n=this._get(),r=Of(n);kf(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Dr(t,n)||(wr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&H1(this._active)&&Vf(this)}_get(){const e=xe.arr(this.source)?this.source.map(On):Bn(On(this.source));return this.calc(...e)}_start(){this.idle&&!H1(this._active)&&(this.idle=!1,nt(du(this),e=>{e.done=!1}),nr.skipAnimation?(Ue.batchedUpdates(()=>this.advance()),Vf(this)):tu.start(this))}_attach(){let e=1;nt(Bn(this.source),t=>{Wn(t)&&Rs(t,this),Pf(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){nt(Bn(this.source),e=>{Wn(e)&&Ho(e,this)}),this._active.clear(),Vf(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Bn(this.source).reduce((t,n)=>Math.max(t,(Pf(n)?n.priority:0)+1),0))}};function MR(e){return e.idle!==!1}function H1(e){return!e.size||Array.from(e).every(MR)}function Vf(e){e.idle||(e.idle=!0,nt(du(e),t=>{t.done=!0}),Go(e,{type:"idle",parent:e}))}nr.assign({createStringInterpolator:h1,to:(e,t)=>new NR(e,t)});var Y1=/^--/;function DR(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Y1.test(e)&&!(na.hasOwnProperty(e)&&na[e])?t+"px":(""+t).trim()}var W1={};function PR(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:i,scrollTop:s,scrollLeft:o,viewBox:c,...u}=t,d=Object.values(u),f=Object.keys(u).map(h=>n||e.hasAttribute(h)?h:W1[h]||(W1[h]=h.replace(/([A-Z])/g,l=>"-"+l.toLowerCase())));i!==void 0&&(e.textContent=i);for(const h in r)if(r.hasOwnProperty(h)){const l=DR(h,r[h]);Y1.test(h)?e.style.setProperty(h,l):e.style[h]=l}f.forEach((h,l)=>{e.setAttribute(h,d[l])}),s!==void 0&&(e.scrollTop=s),o!==void 0&&(e.scrollLeft=o),c!==void 0&&e.setAttribute("viewBox",c)}var na={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jR=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),LR=["Webkit","Ms","Moz","O"];na=Object.keys(na).reduce((e,t)=>(LR.forEach(n=>e[jR(n,t)]=e[t]),e),na);var BR=/^(matrix|translate|scale|rotate|skew)/,FR=/^(translate)/,UR=/^(rotate|skew)/,qf=(e,t)=>xe.num(e)&&e!==0?e+t:e,gu=(e,t)=>xe.arr(e)?e.every(n=>gu(n,t)):xe.num(e)?e===t:parseFloat(e)===t,VR=class extends hu{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(o=>[`translate3d(${o.map(c=>qf(c,"px")).join(",")})`,gu(o,0)])),br(r,(o,c)=>{if(c==="transform")i.push([o||""]),s.push(u=>[u,u===""]);else if(BR.test(c)){if(delete r[c],xe.und(o))return;const u=FR.test(c)?"px":UR.test(c)?"deg":"";i.push(Bn(o)),s.push(c==="rotate3d"?([d,f,h,l])=>[`rotate3d(${d},${f},${h},${qf(l,u)})`,gu(l,0)]:d=>[`${c}(${d.map(f=>qf(f,u)).join(",")})`,gu(d,c.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new qR(i,s)),super(r)}},qR=class extends u1{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return nt(this.inputs,(n,r)=>{const i=On(n[0]),[s,o]=this.transforms[r](xe.arr(i)?i:n.map(On));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&nt(this.inputs,t=>nt(t,n=>Wn(n)&&Rs(n,this)))}observerRemoved(e){e==0&&nt(this.inputs,t=>nt(t,n=>Wn(n)&&Ho(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Go(this,e)}},$R=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];nr.assign({batchedUpdates:bi.unstable_batchedUpdates,createStringInterpolator:h1,colors:OO});var GR=uR($R,{applyAnimatedValues:PR,createAnimatedStyle:e=>new VR(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),HR=GR.animated;function yu(e){const{rows:t}=e,n=RR({from:{opacity:0},to:{opacity:1}});return m.jsxs(HR.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,i)=>m.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${i}`)),m.jsx("span",{className:"sr-only",children:"Loading..."})]})}function K1({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const i=k.useRef(null),[s,o]=k.useState(0),[c,u]=k.useState(r),d=c&&k.Children.count(e)>n?n:k.Children.count(e);k.useEffect(()=>{i.current&&(s?c?i.current.style.marginBottom=`-${s-(s/d+(d-1)*(t??s/d/7.5))}px`:i.current.style.marginBottom="unset":o(i.current.offsetHeight))},[c,s]);const f=l=>(100-(d-1-l))/100,h=l=>l*(s/d-(t??s/d/7.5));return m.jsx("div",{ref:i,className:"hover:cursor-pointer",onClick:()=>d>1&&u(!c),children:k.Children.map(k.Children.toArray(e).slice(-1*d),(l,b)=>m.jsx("div",{className:`${!c&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:c&&d>1?`scaleX(${f(b)}) translateY(-${h(b)}px)`:void 0},children:l}))})}const YR=_s("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),WR=_s("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),KR=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:i="md"})=>{const s=t,[o,c]=k.useState(r),[u,d]=k.useState(!1),f=()=>{s||(c(!o),n&&n())},h=()=>{t||d(!0)},l=()=>{d(!1)},b=fn("relative py-0.5 pl-0.5 rounded-full",{"ring-2 ring-core-white-900 outline-core-primary-500 outline outline-2 outline-offset-2":u,"bg-core-primary-500 hover:bg-core-primary-600":o&&!t,"bg-core-gray-200 hover:bg-core-gray-300":!o&&!t,"bg-core-gray-100":t},WR({size:i})),a=i==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return m.jsxs("div",{className:`inline-flex items-center py-1 ${s?"pointer-events-none":"cursor-pointer "}`,onClick:f,onFocus:h,children:[m.jsx("input",{className:"sr-only ",id:e,type:"checkbox",checked:o,disabled:s,onBlur:l,onChange:f,onFocus:h}),m.jsx("div",{className:b,children:m.jsx("div",{className:fn(YR({size:i}),`${o?a:""} ${s?"shadow-none":"shadow-xs"}`)})})]})},vu=({id:e,children:t,size:n="md",description:r,toggleLeft:i=!0,disabled:s,helperText:o,defaultChecked:c=!1,label:u,required:d=!1,tooltip:f,onChange:h})=>{const l=k.useId(),b=e??l;return m.jsxs("div",{className:`flex ${i?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[m.jsx(KR,{disabled:s,defaultChecked:c,id:b,size:n,onChange:h}),t||(u||r||f||o)&&m.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[m.jsx(Sn,{className:fn("font-normal"),description:r,required:d,tooltip:f,htmlFor:b,disabled:s,children:u}),m.jsx(Sn.Helper,{disabled:s,helperText:o})]})]})};vu.displayName="Switch";const z1=k.createContext(null);function zR(e=!1){const t=k.useContext(z1);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const Q1=k.forwardRef(({toggleLeft:e=!1,size:t="md",children:n,description:r,disabled:i,helperText:s,id:o,label:c,required:u,tooltip:d},f)=>{const h=k.useId(),l=o??h,b=c??r??d??s?m.jsxs("div",{className:"inline-flex flex-col",children:[m.jsx(Sn,{className:"cursor-default",description:r,required:u,tooltip:d,htmlFor:l,disabled:i,children:c}),m.jsx(Sn.Helper,{disabled:i,helperText:s})]}):null;return m.jsx(z1.Provider,{value:{disabled:i,toggleLeft:e,size:t},children:m.jsxs("div",{ref:f,"aria-describedby":s?`${l}__describer`:void 0,"aria-labelledby":c?`${l}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[c??s??r??d?m.jsx("div",{className:"flex flex-col",children:b}):null,n?m.jsx("div",{className:fn("flex flex-col gap-2"),children:n}):null]})})});Q1.displayName="SwitchGroup",Object.assign(Q1,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=zR(),{disabled:i,size:s,toggleLeft:o}=r??{};return m.jsx(vu,{toggleLeft:o,disabled:e??i,label:t,defaultChecked:n,size:s})}});const QR=({children:e})=>m.jsx("div",{className:"fixed bottom-0 z-10 flex h-[70px] w-full border-b-0 border-t border-gray-100 bg-white lg:bottom-auto lg:top-0 lg:h-[50px] lg:border-b lg:border-t-0",children:e}),JR=({id:e,label:t,icon:n,pathname:r,activeTab:i,setActiveTab:s})=>m.jsx(u0,{className:"flex flex-grow items-center",to:r??"",children:m.jsxs("button",{className:`flex h-full flex-grow flex-col items-center justify-center gap-1 border-b-0 border-t-2 px-3 py-3 text-xs focus:outline-none lg:flex-row lg:border-b-2 lg:border-t-0 lg:text-sm ${i===e?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>s(e),children:[m.jsx(tn,{icon:n,className:"mr-2",variant:i===e?"discovery":"secondary"}),t]})});function Pr(){const{sessionUuid:e}=Tt(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=gr({url:`${e}/contacts`});return{contact:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function ZR({contact:e}){const{t}=tt(),{session:{loyalty_program:n}}=bt(),r=(s,o)=>Dy(s,o)?`${Dy(s,o)} ${t("yearsAgo")}`:My(s,o)?`${My(s,o)} ${t("weeksAgo")}`:Ny(s,o)?`${Ny(s,o)} ${t("daysAgo")}`:t("today"),i=()=>{const s=new Date,o=new Date(e.current_display_values.birthdate);return o.setFullYear(s.getFullYear()),s.getTime()>o.getTime()&&o.setFullYear(o.getFullYear()+1),Math.floor((o.getTime()-s.getTime())/(1e3*60*60*24))};return m.jsxs("div",{className:"h-full justify-between",children:[m.jsx("p",{className:"mb-4 text-lg font-semibold leading-7",children:"Stats"}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(tn,{icon:"calendar"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:r(new Date,new Date(e.current_display_values.loyalty_last_transaction_date))}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("lastVisit")})]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(tn,{icon:"shopping-bag"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_number_of_transactions} ${t("visits")}`}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalVisits")})]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(tn,{icon:"dollar"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_total_credits_received} ${n.custom_credit_name?n.custom_credit_name:t("points")}`}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalCredits")})]})]}),e.current_display_values.birthdate&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(tn,{icon:"star"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs font-semibold",children:new Date(e.current_display_values.birthdate).toLocaleDateString(Jt.language,{day:"numeric",month:"long"})}),m.jsx("p",{className:"text-xs text-core-gray-500",children:t("birthdayInDays",{number:i()})})]})]})]})]})}function J1({loyaltyTransaction:e}){const{t}=tt();return m.jsxs("div",{className:"mb-2 flex justify-between",children:[m.jsx("p",{className:"text-xs text-core-gray-500",children:e.type===fy.CREDIT_RECEPTION?t("transaction"):`${t("isRedeemed")} '${e.loyalty_transaction_data.title}'`}),m.jsx("p",{className:"text-xs font-semibold",children:e.credits>0?"+"+e.credits:e.credits})]})}function Z1({subscription:e,onChange:t,editable:n=!1}){const{t:r}=tt();return m.jsxs("div",{className:"mb-2 flex justify-between",children:[m.jsx("p",{className:"text-xs font-semibold",children:e.subscription_type.name}),n?m.jsx(vu,{defaultChecked:e.is_subscribed,disabled:e.subscription_type.strategy===ai.FUNCTIONAL,onChange:t&&(()=>t(e.subscription_type.name))}):m.jsx(sf,{label:r(e.status.toLowerCase()),size:"sm",color:e.is_subscribed?"primary":"gray"})]})}function XR({contact:e}){const t=Mt(),{t:n}=tt();return m.jsxs("div",{className:"inline-grid w-full items-center gap-4 py-4 lg:grid-cols-2",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx(rf,{src:e.current_display_values.avatar,size:"2xl"}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex gap-2",children:[m.jsx("p",{className:"text-lg",children:e.current_display_values.firstname||e.current_display_values.lastname?`${e.current_display_values.firstname} ${e.current_display_values.lastname}`:e.current_display_values.email}),e.current_display_values.tier&&m.jsx(sf,{label:e.current_display_values.tier,size:"sm",stroke:!0})]}),m.jsxs("p",{className:"text-sm text-core-gray-500 ",children:[n("joined")," ",new Date(e.current_display_values.created_at).toLocaleDateString(Jt.language,{month:"long",year:"numeric"})]})]})]}),m.jsxs("div",{className:"inline-grid gap-2 lg:grid-cols-2",children:[m.jsx(ht,{label:n("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>t("contact-identifiers")}),m.jsx(ht,{before:m.jsx(tn,{icon:"edit"}),label:n("editProfile"),variant:"secondary",size:"md",onClick:()=>t("contact-attributes")})]})]})}function bu(){const{sessionUuid:e}=Tt(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=gr({url:`${e}/loyalty-transactions`});return{loyaltyTransactions:t==null?void 0:t.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function X1(){const{sessionUuid:e}=Tt(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=gr({url:`${e}/subscriptions/contact`});return{subscriptions:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function eN(){const{contact:e,isLoading:t}=Pr(),{session:{loyalty_program:n,currency:r}}=bt(),{t:i}=tt(),s=Mt(),{loyaltyTransactions:o}=bu(),{subscriptions:c}=X1();return t||!e?m.jsx(m.Fragment,{}):m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx(XR,{contact:e})}),m.jsx(Pt,{children:m.jsxs("div",{className:"grid grid-cols-1 gap-x-2 gap-y-2 lg:grid-cols-4",children:[m.jsxs("div",{className:"flex gap-2 lg:flex-col",children:[m.jsx(ra,{children:m.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[m.jsx("p",{className:"text-2xl leading-8",children:e.current_display_values.loyalty_balance}),m.jsx("p",{className:"text-sm text-core-gray-500",children:n.custom_credit_name?n.custom_credit_name:i("points")})]})}),m.jsx(ra,{children:m.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[m.jsx("p",{className:"text-2xl leading-8",children:xs(e.prepaid_balance.balance_in_cents,r)}),m.jsx("p",{className:"text-sm text-core-gray-500",children:i("prepaidCredit")})]})})]}),m.jsx(ra,{children:m.jsx(ZR,{contact:e})}),m.jsx(ra,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-semibold leading-7",children:i("activities")}),o&&o.length?m.jsx("div",{children:o.slice(0,5).map(u=>m.jsx(J1,{loyaltyTransaction:u},u.uuid))}):m.jsx("p",{className:"text-sm text-core-gray-500",children:i("noActivity")})]}),m.jsx(ht,{label:`${i("all")} ${i("activities").toLowerCase()}`,variant:"secondary",onClick:()=>s("activity")})]})}),m.jsx(ra,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between",children:[m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{className:"text-lg font-semibold leading-7",children:i("subscriptions")}),m.jsx("div",{children:c==null?void 0:c.filter(u=>u.subscription_type.strategy!==ai.FUNCTIONAL).map(u=>m.jsx(Z1,{subscription:u},u.subscription_type.uuid))})]}),m.jsx(ht,{label:i("change").charAt(0).toUpperCase()+i("change").slice(1),before:m.jsx(tn,{icon:"edit"}),variant:"secondary",onClick:()=>s("subscriptions")})]})})]})})]})}function ra({children:e}){return m.jsx("div",{className:"flex-grow rounded-lg border p-4",children:e})}function ia({label:e,path:t}){const n=Mt();return m.jsx("div",{className:"flex h-16 items-center text-base text-core-gray-900",children:m.jsx(ht,{label:e,variant:"link-gray",before:m.jsx(tn,{icon:"caret-left",size:"md"}),onClick:()=>n(t)})})}function tN(){const{t:e}=tt(),{loyaltyTransactions:t}=bu(),{contact:n}=Pr();return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx(ia,{label:e("back"),path:"../"})}),m.jsx(Pt,{children:m.jsxs("div",{className:"md:max-h-[528px]",children:[m.jsx("p",{className:"text-sm font-medium",children:e("allActivities")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("checkOutAllActivitiesOfName",{name:n.current_display_values.firstname})}),m.jsx("div",{className:"overflow-auto",children:t==null?void 0:t.map(r=>m.jsx(J1,{loyaltyTransaction:r},r.uuid))})]})})]})})}function nN(){const{t:e}=tt(),{subscriptions:t,mutate:n}=X1(),[r,i]=k.useState({}),[s,o]=k.useState(!1);k.useEffect(()=>{if(t&&!Object.keys(r).length){const f=t.reduce((h,l)=>({...h,[l.subscription_type.name]:l.is_subscribed}),{});i(f)}},[]);const c=f=>{Object.hasOwn(r,f)?i({...r,[f]:!r[f]}):i({...r,[f]:!0})},u=async()=>{o(!0),await Jd.update({values:r}),await n(),ze.success(e("subscriptionsUpdated")),o(!1)},d=()=>t&&t.some(f=>r[f.subscription_type.name]!==f.is_subscribed);return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx(ia,{label:e("back"),path:"../"})}),m.jsx(Pt,{children:m.jsx("div",{className:"md:max-h-[528px]",children:m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium",children:e("subscriptions")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("manageEmailPreferences")}),t==null?void 0:t.filter(f=>f.subscription_type.strategy!==ai.FUNCTIONAL).map(f=>m.jsx(Z1,{subscription:f,onChange:c,editable:!0},f.subscription_type.uuid))]})})}),m.jsx(nn,{children:m.jsx(ht,{label:e("saveChanges"),className:"w-full",onClick:u,disabled:!d()||s})})]})})}function rN({identifier:e,onClear:t}){const{t:n}=tt();return m.jsxs("div",{className:"flex items-center justify-between rounded-lg border text-xs",children:[m.jsxs("div",{className:"flex-col pl-4",children:[m.jsx("p",{className:"font-semibold",children:e.value}),m.jsx("p",{className:"text-core-gray-500",children:n("contactIdentifier")})]}),m.jsx("div",{className:"h-full border-l p-4 hover:cursor-pointer hover:bg-core-gray-50",onClick:()=>t&&t(e.value),children:m.jsx(tn,{className:"h-full",icon:"close"})})]})}function eb(){const{sessionUuid:e}=Tt(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=gr({url:`${e}/contact-identifiers`});return{identifiers:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function iN(){const{t:e}=tt(),t=Mt(),{identifiers:n,isLoading:r,mutate:i}=eb(),[s,o]=k.useState(""),[c,u]=k.useState(!1),d=h=>{o(h),u(!0)},f=async()=>{await E3.clear({value:s}),await i(),u(!1)};return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx(ia,{label:e("back"),path:"../"})}),m.jsx(Pt,{children:m.jsx("div",{className:"md:max-h-[528px]",children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-medium",children:e("contactIdentifiers")}),m.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("contactIdentifierDescription")})]}),r?m.jsx(yu,{rows:10}):n==null?void 0:n.map(h=>m.jsx(rN,{identifier:h,onClear:d},h.value))]})})}),m.jsx(nn,{children:m.jsx(ht,{label:e("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>t("create")})})]}),m.jsx(Mi,{title:e("confirmClearContactIdentifier"),isOpen:c,primaryAction:{label:e("confirm"),action:f},secondaryAction:{label:e("cancel"),action:()=>u(!1)},onClose:()=>u(!1),children:m.jsx("p",{children:e("clearContactIdentifier",{value:s})})})]})}function sN(){const{t:e}=tt(),{contact:t}=Pr(),{mutate:n}=eb(),{errorToast:r}=Mo(),i=Mt(),[s,o]=k.useState(""),[c,u]=k.useState(!1),[d,f]=k.useState(!1),h=()=>{!s||!t||!t.email||(u(!0),xo.linkIdentifier(s,t.email).then(()=>{n(),i("/portal/profile/contact-identifiers")}).catch(r).finally(()=>{o(""),u(!1)}))};return k.useEffect(()=>{s&&!c&&!d&&h()},[s,c,d,h]),m.jsx("div",{className:"h-full md:container",children:m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx(ia,{label:e("back"),path:"../"})}),m.jsx(Pt,{children:m.jsx("form",{onSubmit:l=>{l.preventDefault(),h()},children:m.jsx(jo,{dataSetter:o,setDefer:f,label:e("contactIdentifier")})})}),m.jsx(nn,{children:m.jsx(ht,{label:e("addIdentifier"),className:"w-full",onClick:h,disabled:c})})]})})}function oN(){const{t:e}=tt(),{contact:t,isLoading:n,mutate:r}=Pr(),[i,s]=k.useState(),[o,c]=k.useState();k.useEffect(()=>{i||(async()=>{const{data:h}=await uy.get();s(h.data.elements)})()},[i]);const u=h=>{c({...o,[h.target.name]:h.target.value})},d=(h,l)=>{c({...o,[h]:l})},f=async()=>{o&&(await uy.update(o),await r(),ze.success(e("contactAttributesUpdated")),c(void 0))};return m.jsx("div",{className:"h-full md:container",children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx(ia,{label:e("back"),path:"../"})}),m.jsx(Pt,{children:m.jsxs("div",{className:"md:max-h-[528px]",children:[!n&&m.jsxs("div",{className:"mb-4 flex flex-row items-center gap-4 border-b border-b-core-gray-200 px-1 pb-4",children:[m.jsx(rf,{src:t.current_display_values.avatar,size:"2xl"}),m.jsxs("div",{children:[m.jsx("div",{className:"flex flex-row items-center gap-2 ",children:m.jsxs("h1",{className:"text-lg text-core-gray-900",children:[t.current_display_values.firstname," ",t.current_display_values.lastname]})}),m.jsx("p",{className:"text-sm text-core-gray-500",children:t.current_display_values.email})]})]}),!i||n?m.jsx(yu,{rows:10}):i.map(h=>{if(!(h.type==="media_upload"||h.type==="email"))return h.type==="select"?m.jsx(EO,{name:h.name,label:h.label,value:o&&o[h.name]?o[h.name]:t.current_display_values[h.name],onChange:l=>d(h.name,l),disabled:h.disabled,children:h.options.map(l=>m.jsx(ff,{label:l.label,value:l.value},l.value))},h.id):h.type==="multi_select"?m.jsx(Nk,{name:h.name,value:o&&o[h.name]?o[h.name]:h.defaultValue,label:h.label,onChange:d,disabled:h.disabled,options:h.options},h.id):h.type==="birth_date"||h.type==="date_time"?m.jsx(rv,{id:h.id,name:h.name,label:h.label,type:h.type==="date_time"?"date_time":"date",value:o&&o[h.name]?o[h.name]:t.current_display_values[h.name],disabled:h.disabled,onChange:u},h.id):m.jsx(Cs,{disabled:h.disabled,label:h.label,name:h.name,value:o&&o[h.name]!=="undefined"?o[h.name]:t.current_display_values[h.name],onChange:u},h.id)})]})}),m.jsx(nn,{children:m.jsx(ht,{label:e("saveChanges"),className:"w-full",onClick:f,disabled:!o})})]})})}function aN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/profile",element:m.jsx(or,{element:m.jsx(eN,{})})}),m.jsx(Oe,{path:"/profile/activity",element:m.jsx(or,{element:m.jsx(tN,{})})}),m.jsx(Oe,{path:"/profile/subscriptions",element:m.jsx(or,{element:m.jsx(nN,{})})}),m.jsx(Oe,{path:"/profile/contact-identifiers",element:m.jsx(or,{element:m.jsx(iN,{})})}),m.jsx(Oe,{path:"/profile/contact-identifiers/create",element:m.jsx(or,{element:m.jsx(sN,{})})}),m.jsx(Oe,{path:"/profile/contact-attributes",element:m.jsx(or,{element:m.jsx(oN,{})})})]})}function $f({voucher:e,selected:t,setSelected:n}){const{t:r}=tt();return m.jsxs("div",{className:`flex cursor-pointer items-center justify-between gap-4 rounded-lg ${e.status===bs.REDEEMED?"border border-core-primary-100 bg-core-primary-50":"border bg-white"} p-2 text-xs`,onClick:()=>(t==null?void 0:t.code)===e.code?n(void 0):n(e),children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:e.promotion.image?e.promotion.image.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),m.jsxs("div",{className:"overflow-hidden overflow-ellipsis ",children:[m.jsx("p",{className:"font-semibold",children:e.name}),e.status===bs.REDEEMED?m.jsx("p",{className:"text-core-gray-500",children:r("redeemed")}):m.jsx("p",{className:"text-core-primary-500",children:e.expiration_date?`Valid until ${new Date(e.expiration_date).toLocaleDateString()}`:r("nonExpiring")})]})]}),m.jsx("p",{className:`text-core-${e.status===bs.REDEEMED?"gray":"primary"}-500`,children:e.code})]})}function cN(){const{sessionUuid:e}=Tt(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=gr({url:`${e}/vouchers`});return{vouchers:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function uN(){const e=vs(),{errorToast:t}=Mo(),{t:n}=tt(),{vouchers:r,isLoading:i,mutate:s}=cN(),{onRedeemVoucher:o}=Tt(),{mutate:c}=bu(),{session:u,mutate:d}=bt(),[f,h]=k.useState(),[l,b]=k.useState(!1);k.useEffect(()=>{f&&b(!0)},[f]);const a=v=>{e.post(`${u.uuid}/vouchers/redeem`,{code:v}).then(w=>{ze.success(n("voucherSuccessfullyRedeemed")),o&&o(w.data.data),p()}).catch(t).finally(y)},p=()=>{s(),c(),d().then(v=>{Io(v==null?void 0:v.data.data.events)})},y=()=>{b(!1),h(void 0)},g=()=>u.events.filter(v=>v.type===ci.VOUCHER_REDEEMED);return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("vouchers")})})}),m.jsx(Pt,{children:i?m.jsx(yu,{rows:1}):m.jsx("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:r&&r.length?r.map(v=>m.jsx($f,{voucher:v,selected:f,setSelected:h},v.code)):m.jsx("p",{className:"text-center text-sm text-core-gray-500",children:n("vouchersEmptyState")})})}),!!g().length&&m.jsx(nn,{children:m.jsx("div",{children:m.jsx(K1,{children:g().map(v=>m.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-core-primary-100 bg-core-primary-50 p-2",children:m.jsx("div",{className:"flex h-full flex-col justify-between text-xs",children:m.jsxs("div",{className:"overflow-hidden",children:[m.jsx("p",{className:"font-semibold",children:v.data.name}),m.jsxs("p",{className:"overflow-ellipsis text-core-gray-500",children:[v.data.code," - ",n("applied")]})]})})},v.data.uuid))},g().length)})})]}),m.jsx(Mi,{title:n("confirmVoucherRedemption"),isOpen:l,primaryAction:{label:n("confirm"),action:f&&(()=>a(f.code))},secondaryAction:{label:n("cancel"),action:y},onClose:y,children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{children:n("redeemTitle",{title:f==null?void 0:f.name})}),f&&m.jsx($f,{voucher:f,setSelected:h})]})})]})}function Gf({reward:e,selected:t,setSelected:n,disabled:r,readOnly:i}){const{t:s}=tt(),{session:o}=bt(),{contact:c,isLoading:u}=Pr(),d=u?0:c.credit_balance.balance;return m.jsxs("div",{className:`max-h-[48px] rounded-lg border ${r?"pointer-events-none opacity-40":!i&&"cursor-pointer"}`,children:[m.jsxs("div",{className:`flex items-center justify-between rounded-lg text-xs ${r?"px-2 pt-2":"p-2"}`,onClick:i?void 0:()=>(t==null?void 0:t.uuid)===e.uuid?n(void 0):n(e),children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:e.media&&e.media.value?e.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),m.jsx("p",{className:"truncate",children:e.title??e.description})]}),m.jsxs("p",{className:"whitespace-nowrap text-core-primary-500",children:[e.required_credits," ",o!=null&&o.loyalty_program.custom_credit_name?o==null?void 0:o.loyalty_program.custom_credit_name:s("points").toLowerCase()]})]}),e.required_credits-d>0&&m.jsx(Mk,{value:d,max:e.required_credits})]})}function lN(){const{sessionUuid:e}=Tt(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=gr({url:`${e}/rewards`});return{rewards:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function dN(){const{t:e}=tt(),{rewards:t,isLoading:n,mutate:r}=lN(),{contact:i,isLoading:s,mutate:o}=Pr(),{mutate:c}=bu(),{session:{events:u,loyalty_program:d},mutate:f}=bt(),{onClaimReward:h}=Tt(),[l,b]=k.useState(),[a,p]=k.useState(!1);k.useEffect(()=>{l&&p(!0)},[l]);const y=async()=>{if(l){const v=await C3.claim(l.uuid),w=await f(),E=w==null?void 0:w.data.data.events;Io(E);const S=E.filter(T=>T.type===ci.REWARD_RECEPTION&&T.data.reward.uuid===l.uuid),{data:{uuid:A}}=S.reduce((T,O)=>new Date(T.created_at)>new Date(O.created_at)?T:O);r(),o(),c(),ze.success(e("rewardClaimed",{name:v.data.data.title})),h&&h(v.data.data,A),p(!1),b(void 0)}},g=()=>u.filter(v=>v.type===ci.REWARD_RECEPTION).map(v=>t==null?void 0:t.find(w=>w.uuid===v.data.reward.uuid)).filter(v=>v);return m.jsxs("div",{className:"h-full md:container",children:[m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsxs("div",{className:"flex h-16 items-center justify-between",children:[m.jsx("h1",{children:e("rewards")}),m.jsxs("div",{className:"flex flex-col items-center",children:[m.jsx("p",{children:s?0:i.credit_balance.balance}),m.jsx("p",{className:"text-sm text-core-gray-500",children:d.custom_credit_name?d.custom_credit_name:e("points")})]})]})}),m.jsx(Pt,{children:n||s?m.jsx(yu,{rows:1}):m.jsxs("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:[!!t.filter(v=>v.required_credits<=i.credit_balance.balance).length&&m.jsx("p",{className:"text-sm font-light text-core-gray-500",children:e("redeemableRewards")}),t.filter(v=>v.required_credits<=i.credit_balance.balance).map(v=>m.jsx(Gf,{reward:v,selected:l,setSelected:b},v.uuid)),!!t.filter(v=>v.required_credits>i.credit_balance.balance).length&&m.jsx("p",{className:"mt-2 text-sm font-light text-core-gray-500",children:e("saveABitMore")}),t.filter(v=>v.required_credits>i.credit_balance.balance).map(v=>m.jsx(Gf,{reward:v,selected:l,setSelected:b,disabled:!0},v.uuid))]})}),!!g().length&&!n&&m.jsx(nn,{children:m.jsx("div",{children:m.jsx(K1,{children:g().map((v,w)=>m.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-core-primary-100 bg-core-primary-50 p-2 text-xs",children:[m.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[m.jsx("img",{src:v.media&&v.media.value?v.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-8 w-8 rounded object-cover object-center"}),m.jsx("p",{className:"truncate",children:v.title??v.description})]}),m.jsxs("p",{className:"text-core-primary-500",children:[v.required_credits," ",d.custom_credit_name?d.custom_credit_name:e("points")]})]},`${w}-${v.uuid}`))},g().length)})})]}),m.jsx(Mi,{title:e("confirmRewardRedemption"),isOpen:a,primaryAction:{label:e("confirm"),action:y},secondaryAction:{label:e("cancel"),action:()=>p(!1)},onClose:()=>p(!1),children:m.jsxs("div",{className:"flex flex-col gap-4",children:[m.jsx("p",{children:e("redeemRewardForPoints",{title:l==null?void 0:l.title,credits:l==null?void 0:l.required_credits,customCreditName:d.custom_credit_name?d.custom_credit_name:e("points")})}),l&&m.jsx(Gf,{reward:l,selected:l,setSelected:b,readOnly:!0})]})})]})}function fN({children:e}){return m.jsx("div",{className:"h-screen w-screen pb-[70px] md:px-4 md:pb-[86px] md:pt-4 lg:pb-4 lg:pt-[66px]",children:m.jsx("div",{className:"h-full max-h-full",children:e})})}function hN(){const e=Mt(),{t}=tt(),{pathname:n}=Yt(),[r,i]=k.useState(1),s=[{id:0,label:t("profile"),icon:"user",pathname:"profile"},{id:1,label:t("rewards"),icon:"edit",pathname:"rewards"},{id:2,label:t("vouchers"),icon:"mail",pathname:"vouchers"}];return k.useEffect(()=>{(n==="/portal"||n==="/portal/")&&e(s[r].pathname);const o=n.split("/")[n.split("/").length-1];if(o!==s[r].pathname){const c=s.find(u=>u.pathname===o);c&&i(c.id)}},[e]),m.jsxs("div",{className:"relative h-full w-full select-none overflow-auto",children:[m.jsx(QR,{children:s.map(o=>m.jsx(JR,{id:o.id,label:o.label,icon:o.icon,activeTab:r,setActiveTab:i,pathname:o.pathname},o.id))}),m.jsxs(fN,{children:[m.jsx(aN,{}),m.jsxs(pr,{children:[m.jsx(Oe,{path:"/rewards",element:m.jsx(or,{element:m.jsx(dN,{})})}),m.jsx(Oe,{path:"/vouchers",element:m.jsx(or,{element:m.jsx(uN,{})})})]})]})]})}function pN(){const{state:e}=Yt(),t=Mt(),{session:n}=bt();return k.useEffect(()=>{n&&!n.contact&&(n.input_data.primary_identification_method===_o.EMAIL&&n.input_data.enable_email_identification&&!e?t("email",{state:{redirectRoute:`${ft.PORTAL}`}}):t("identifier"))},[]),n&&m.jsx(hN,{})}function mN(){return m.jsx(hn,{children:m.jsx(Kc,{state:{redirectRoute:`${ft.PORTAL}`}})})}function tb({onSubmit:e,children:t}){const n=r=>{r.preventDefault(),e&&e(r)};return m.jsx("form",{onSubmit:n,children:t})}function Ms(){const{state:e}=Yt(),{t}=tt(),n=Mt(),r=vs(),{onContactLink:i}=Tt(),{session:s,mutate:o}=bt(),{publish:c}=Vc(),[u,d]=k.useState(""),[f,h]=k.useState(!1),[l,b]=k.useState(!1),a=()=>{h(!0),Fc(s.uuid,u,void 0,i).then(()=>o().then(()=>e&&e.redirectRoute&&n(e.redirectRoute,{state:e}))).catch(y=>{y.response.data.code===Nc.CONTACT_NOT_FOUND&&b(!0)}).finally(()=>h(!1))},p=()=>{h(!0),r.post(`${s.uuid}/contacts`,{email:u}).then(()=>{Fc(s.uuid,u,void 0,i).then(()=>{o().then(()=>{ze.success(t("contactForEmailCreated",{email:u})),e&&e.redirectRoute&&n(e.redirectRoute,{state:e})})})}).finally(()=>h(!1))};return k.useEffect(()=>{c("openKeyboard",{inputId:"via-email-address-input",inputValue:""})},[]),m.jsxs(m.Fragment,{children:[m.jsx(hn,{children:m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("fillInXBelow",{x:t("emailAddress").toLowerCase()})})})}),m.jsx(Pt,{children:m.jsx(tb,{onSubmit:()=>{u&&!f&&a()},children:m.jsx(Cs,{id:"via-email-address-input",label:t("emailAddress"),autoFocus:!0,onChange:y=>d(y.target.value),beforeIcon:"mail"})})}),m.jsx(nn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(ht,{label:t("continue"),className:"w-full",onClick:a,disabled:!u||f}),m.jsx(ht,{label:t("useIdentifier"),variant:"secondary",onClick:()=>n("../",{state:e})})]})})]})}),m.jsx(Mi,{title:`${t("new")} ${t("emailAddress").toLowerCase()}`,isOpen:l,onClose:()=>b(!1),primaryAction:{label:t("confirm"),action:p},secondaryAction:{label:t("cancel"),action:()=>b(!1)},children:m.jsx("p",{children:t("continueWithEmail",{email:u})})})]})}function sr(){const{state:e}=Yt(),{t}=tt(),{session:n,mutate:r}=bt(),i=Mt(),s=Tt(),[o,c]=k.useState(!1),[u,d]=k.useState([]),[f,h]=k.useState({}),[l,b]=k.useState(!1);k.useEffect(()=>{u.length||Jd.get().then(y=>{const g=y.data.data.filter(w=>w.strategy!==ai.FUNCTIONAL);d(g);const v=g.reduce((w,E)=>({...w,[E.name]:E.strategy===ai.OPT_OUT}),{});h(v)})},[]);const a=y=>{Object.hasOwn(f,y)?h({...f,[y]:!f[y]}):h({...f,[y]:!0})},p=async()=>{c(!0),await xo.create(e.email),await Jd.update({values:f}),e.contactIdentifier&&await xo.linkIdentifier(e.contactIdentifier,e.email),await Fc(n.uuid,e.email,e.contactIdentifier,s.onContactLink),await r(),ze.success(t("contactForEmailCreated",{email:e.email})),ze.success(t("contactIdentifierLinkedToEmail",{value:e.contactIdentifier,email:e.email})),e&&e.redirectRoute&&i(e.redirectRoute,{state:e}),c(!1)};return!e||!e.email&&!e.contactIdentifier?m.jsx(mo,{to:"../../"}):m.jsx(hn,{children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("termsAndConditions")})})}),m.jsx(Pt,{children:m.jsxs("div",{className:"flex flex-col gap-4 text-sm",children:[m.jsxs("div",{children:[m.jsx("p",{children:t("marketingSubscriptions")}),m.jsx("p",{className:"text-core-gray-500",children:t("chooseCommunicationPreferences")})]}),u.map(y=>m.jsxs("div",{className:"flex gap-2",children:[m.jsx(vu,{defaultChecked:y.strategy===ai.OPT_OUT,onChange:()=>a(y.name)}),m.jsx("p",{children:y.name})]},y.id)),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(Uc,{required:!0,onChange:y=>b(y)}),m.jsx("div",{className:"[&_a]:text-core-primary-500",dangerouslySetInnerHTML:{__html:t("iAgreeWithTheTerms",{terms:"https://www.piggy.nl/algemene-voorwaarden",privacy:"https://www.piggy.nl/privacy-policy"})}})]})]})}),m.jsx(nn,{children:m.jsx(ht,{label:t("create"),className:"w-full",onClick:p,disabled:!l||o})})]})})}function sa(){const e=vs(),{errorToast:t}=Mo(),{t:n}=tt(),{state:r}=Yt(),{session:i,mutate:s}=bt(),o=Mt(),{publish:c}=Vc(),u=Tt(),[d,f]=k.useState(!1),[h,l]=k.useState(""),[b,a]=k.useState(!1);if(!r||!r.contactIdentifier)return m.jsx(mo,{to:"../"});const p=()=>{f(!0),e.post(`${u.sessionUuid}/contacts`,{email:h}).then(y).catch(t)},y=()=>{f(!0),e.post(`${u.sessionUuid}/contacts/link-identifier`,{contact_identifier_value:r.contactIdentifier,email:h}).then(()=>{Fc(i.uuid,h,r.contactIdentifier,u.onContactLink).then(()=>{s().then(()=>{r&&r.redirectRoute&&o(r.redirectRoute,{state:r})})})}).catch(g=>{g.response.data.code===Nc.CONTACT_NOT_FOUND?a(!0):t(g)}).finally(()=>f(!1))};return k.useEffect(()=>{c("openKeyboard",{inputId:"new-contact-identifier-input",inputValue:""})},[]),m.jsxs(hn,{children:[m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:n("linkContact")})}),m.jsx(Pt,{children:m.jsxs("div",{className:"flex flex-col gap-3",children:[m.jsx(wk,{body:n("noEmailAddressLinkedToIdentifier")}),m.jsx(tb,{onSubmit:y,children:m.jsx(Cs,{id:"new-contact-identifier-input",label:n("emailAddress"),autoFocus:!0,onChange:g=>l(g.target.value),beforeIcon:"mail"})})]})}),m.jsx(nn,{children:m.jsx(ht,{label:n("continue"),className:"w-full",onClick:y,disabled:!h||d})})]}),m.jsx(Mi,{title:`${n("new")} ${n("emailAddress").toLowerCase()}`,isOpen:b,onClose:()=>a(!1),primaryAction:{label:n("confirm"),action:p},secondaryAction:{label:n("cancel"),action:()=>a(!1)},children:m.jsx("p",{children:n("continueWithEmail",{email:h})})})]})}function gN(){const e=Mt(),{t}=tt(),{session:n,mutate:r}=bt(),{onContactLink:i}=Tt(),[s,o]=k.useState(""),[c,u]=k.useState(!1),[d,f]=k.useState(!1),[h,l]=k.useState(!1),[b,a]=k.useState(),p=async g=>{if(i){const{data:{data:v}}=await xo.get(g);v&&i(v)}},y=k.useCallback(async()=>{if(n){f(!0);const{data:g}=await Qd.checkCode(s);if(a(g),g.voucher){g.voucher.contact||n.contact?e(`${ft.VOUCHER}/redeem`,{state:{voucher:g.voucher}}):l(!0);return}if(g.giftcard)return e(`${ft.GIFTCARD}`,{state:{giftcard:g.giftcard}});if(g.identifier){const{data:v}=await Qd.setContact(n.uuid,{contact_identifier_value:s});return await p(v.data.contact.uuid),await r(),e(ft.PORTAL)}ze.error(t("unknownCode",{code:s}))}},[s,e,n]);return k.useEffect(()=>{s&&!d&&!c&&y().then()},[s]),m.jsxs(hn,{children:[m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:t("scanOrEnterX",{x:"code"})})})}),m.jsx(Pt,{children:m.jsx("form",{onSubmit:g=>{g.preventDefault(),s&&y()},children:m.jsx(jo,{dataSetter:o,setDefer:u,label:t("code")})})}),m.jsx(nn,{children:m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(ht,{label:t("continue"),onClick:y,disabled:!s}),n.input_data.enable_email_identification&&m.jsx(ht,{label:t("useEmail"),variant:"secondary",onClick:()=>e("../email",{state:{redirectRoute:`${ft.PORTAL}`}})})]})})]}),m.jsx(Mi,{title:t("noContactLinkedToVoucherTitle"),isOpen:h,onClose:()=>l(!1),primaryAction:{label:t("linkToContact"),action:()=>e(`${ft.VOUCHER}/link`,{state:{voucher:b==null?void 0:b.voucher}})},secondaryAction:{label:t("cancel"),action:()=>l(!1)},children:m.jsx("p",{children:t("linkVoucherWithCodeToContact",{code:s})})})]})}function yN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(gN,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(Ms,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(sr,{})})]})}function vN(){const e=Mt(),{state:t}=Yt(),{t:n}=tt(),{session:r}=bt(),[i,s]=k.useState(""),[o,c]=k.useState(!1),[u,d]=k.useState(!1),[f,h]=k.useState(r.type),l=k.useCallback(async()=>{c(!0);try{const{data:{data:a}}=await zd.get(i);e(`${f===ut.REDEEM_GIFTCARD?"redeem":"top-up"}/${a.hash}`)}catch{c(!1),s("")}},[i,e,r]);k.useEffect(()=>{i&&!o&&!u&&l().then()},[i]);const b=a=>{t&&t.giftcard?e(`${a===ut.REDEEM_GIFTCARD?"redeem":"top-up"}/${t.giftcard.hash}`):h(a)};return(r==null?void 0:r.type)===ut.REDEEM_GIFTCARD&&!(r!=null&&r.input_data.amount_in_cents)?m.jsx(m.Fragment,{children:n("xIsRequired",{x:"Amount in cents"})}):m.jsx(hn,{children:f===ut.GIFTCARD||f===ut.GENERIC?m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("Choose type")})})}),m.jsx(Pt,{children:m.jsxs("div",{className:"flex gap-2",children:[m.jsx(ht,{className:"grow",label:"Redeem",onClick:()=>b(ut.REDEEM_GIFTCARD)}),m.jsx(ht,{className:"grow",label:"Top up",onClick:()=>b(ut.TOP_UP_GIFTCARD)})]})})]}):m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n("scanGiftcard")})})}),m.jsx(Pt,{children:m.jsx(jo,{dataSetter:s,setDefer:d,label:n("hash")})}),m.jsx(nn,{children:m.jsx(ht,{label:n("submit"),className:"w-full",onClick:l,disabled:!i||o})})]})})}function nb(e){const{sessionUuid:t}=Tt(),{data:n,error:r,isLoading:i,isValidating:s,mutate:o}=gr({url:`${t}/giftcards/${e}`});return{giftcard:n==null?void 0:n.data.data,data:n,error:r,isLoading:i,isValidating:s,mutate:o}}function bN(){const{t:e}=tt(),{hash:t}=t0(),{giftcard:n,isLoading:r,mutate:i}=nb(t),{session:s,mutate:o}=bt(),{onUseGiftcard:c}=Tt(),u=Mt(),d=(s==null?void 0:s.input_data.amount_in_cents)??0,[f]=k.useState(s.results.remaining_amount?+s.results.remaining_amount:+d),h=(s==null?void 0:s.input_data.allow_multiple_giftcards)??!0;if(r)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:m.jsx(ko,{className:"h-[48px] w-[48px]"})});if(!n)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const l=async()=>{const g=await zd.transaction(n.uuid,-a());await i();const v=await o(),w=v==null?void 0:v.data.data.events;Io(w),ze.success(`${e("transactionSuccessful")}!`),c&&c(g.data.data)},b=()=>s.results.remaining_amount??d,a=()=>Math.min(b(),n.amount_in_cents),p=()=>{let g=0;return s.events.filter(w=>w.type===ci.GIFTCARD_TRANSACTION).forEach(w=>{w.data.giftcard.uuid===n.uuid&&(g+=w.data.amount_in_cents)}),g},y=()=>{if(a())return{label:e("confirmAndPay",{amount:xs(a(),s==null?void 0:s.currency)}),onClick:l};if(h&&b())return{label:e("useAnotherGiftcard"),onClick:()=>u("../"),variant:"secondary"}};return m.jsx(hn,{children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:`${e("giftcard")} ${n.hash}`})})}),m.jsx(Pt,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:e("balance")}),m.jsx(ui,{value:n.amount_in_cents,start:n.amount_in_cents-p(),currency:s.currency,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[m.jsx("p",{className:"font-light text-gray-500",children:e("amountToPay")}),m.jsx("div",{className:"text-5xl font-bold",children:m.jsx(ui,{value:f+p(),start:f,currency:s.currency,asCurrency:!0})})]})})]})}),y()&&m.jsx(nn,{children:m.jsx(ht,{label:"",className:"w-full",...y()})})]})})}function wN(){const{t:e}=tt(),{hash:t}=t0(),{giftcard:n,isLoading:r,mutate:i}=nb(t),{mutate:s}=bt(),{onUseGiftcard:o}=Tt();if(r)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:m.jsx(ko,{className:"h-[48px] w-[48px]"})});if(!n)return m.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const c=async u=>{const d=await zd.transaction(n.uuid,u);await i();const f=await s(),h=f==null?void 0:f.data.data.events;Io(h),ze.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${xs(d.data.data.amount_in_cents)}`),o&&o(d.data.data)};return m.jsx(hn,{children:m.jsx(ev,{title:`${e("giftcard")} ${n.hash}`,balance:n.amount_in_cents,transaction:c})})}function EN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/",element:m.jsx(vN,{})}),m.jsx(Oe,{path:"/redeem/:hash",element:m.jsx(bN,{})}),m.jsx(Oe,{path:"/top-up/:hash",element:m.jsx(wN,{})})]})}function SN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(pN,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(Ms,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/identifier",element:m.jsx(mN,{})}),m.jsx(Oe,{path:"/identifier/link-identifier",element:m.jsx(sa,{})}),m.jsx(Oe,{path:"/identifier/link-identifier/new-contact",element:m.jsx(sr,{})})]})}function xN(){const{state:e}=Yt(),t=Mt(),{session:n}=bt();return k.useEffect(()=>{n.input_data.primary_identification_method===_o.EMAIL&&n.input_data.enable_email_identification&&!e&&t("email",{state:{redirectRoute:`${ft.POINTS_TRANSACTION}/transaction`}})},[]),m.jsx(hn,{children:m.jsx(Kc,{state:{redirectRoute:`${ft.POINTS_TRANSACTION}/transaction`}})})}function _N(){const{t:e}=tt(),{session:{input_data:t}}=bt(),{contact:n,isLoading:r,mutate:i}=Pr(),[s,o]=k.useState(),[c,u]=k.useState(!1),[d,f]=k.useState(""),h=async()=>{if(u(!0),t.amount_in_cents)try{const{data:{data:l}}=await x3.create({unit_value:t.amount_in_cents/100});i(),o(l)}catch(l){f(l.response.data.message)}else f(e("xIsRequired",{x:"Amount in cents"})+".");u(!1)};return k.useEffect(()=>{!c&&!s&&!d&&(async()=>await h())()},[]),r?m.jsx(m.Fragment,{}):n?m.jsx(hn,{children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:n.current_display_values.firstname||n.current_display_values.lastname?`${n.current_display_values.firstname} ${n.current_display_values.lastname}`:n.current_display_values.email})})}),m.jsx(Pt,{children:m.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[m.jsx("div",{className:"flex h-full flex-col items-center gap-2 p-6",children:d?m.jsx("p",{className:"text-core-red-500",children:d}):m.jsx("div",{className:"flex h-full items-center justify-center gap-1 text-4xl font-bold",children:s?m.jsxs(m.Fragment,{children:["+",m.jsx(ui,{value:s.credits,start:0})]}):m.jsx("div",{className:"text-core-primary-500",children:m.jsx(ko,{className:"h-[32px] w-[32px]"})})})}),m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:`${e("new")} ${e("balance").toLowerCase()}`}),m.jsx(ui,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(s?s.credits:0)})]})})]})})]})}):m.jsx(mo,{to:"../"})}function CN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/*",element:m.jsx(xN,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(Ms,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(sa,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/transaction",element:m.jsx(or,{element:m.jsx(_N,{})})})]})}function rb(){const{state:e}=Yt(),t=Mt(),{session:n}=bt(),r={redirectRoute:n.type===ut.TOP_UP_PREPAID?`${ft.TOP_UP_PREPAID}/top-up`:`${ft.PAY_PREPAID}/pay`};return k.useEffect(()=>{n.input_data.primary_identification_method===_o.EMAIL&&n.input_data.enable_email_identification&&!e&&t("email",{state:r})},[]),m.jsx(hn,{children:m.jsx(Kc,{state:r})})}function ib(){const{sessionUuid:e}=Tt(),{data:t,error:n,isLoading:r,isValidating:i,mutate:s}=gr({url:`${e}/prepaid`});return{balance:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:s}}function AN(){const{state:e}=Yt(),{t}=tt(),{balance:n,mutate:r}=ib(),{mutate:i}=bt(),{contact:s}=Pr(),o=async c=>{c&&(await py.transaction({amount_in_cents:c,contact_identifier_value:e.contactIdentifier??void 0}),await r(),await i(),ze.success(t("prepaidTransactionCreated")))};return!n||!s?m.jsx(m.Fragment,{}):m.jsx(hn,{children:m.jsx(ev,{title:`${s.current_display_values.firstname} ${s.current_display_values.lastname}`,balance:(n==null?void 0:n.balance_in_cents)??0,transaction:o})})}function TN(){const{state:e}=Yt(),{t}=tt(),{balance:n,mutate:r}=ib(),{contact:i}=Pr(),{session:{input_data:s,currency:o,events:c},mutate:u}=bt(),d=s.amount_in_cents?+s.amount_in_cents:0;if(!n||!i)return m.jsx(m.Fragment,{});const f=async()=>{d&&(await py.transaction({amount_in_cents:-l(),contact_identifier_value:e.contactIdentifier??void 0}),await r(),await u(),ze.success(t("prepaidTransactionCreated")))},h=()=>{let b=0;return c.filter(p=>p.type===ci.PREPAID_TRANSACTION).forEach(p=>{b+=p.data.amount_in_cents}),b},l=()=>Math.min(d+h(),n==null?void 0:n.balance_in_cents);return m.jsx(hn,{children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:`${i.current_display_values.firstname} ${i.current_display_values.lastname}`})})}),m.jsx(Pt,{children:m.jsxs("div",{className:"flex h-full flex-col gap-4",children:[m.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:m.jsxs("div",{className:"flex justify-between",children:[m.jsx("p",{className:"font-light text-gray-500",children:t("prepaidBalance")}),m.jsx(ui,{value:n.balance_in_cents,start:n.balance_in_cents+h(),currency:o,asCurrency:!0})]})}),m.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:m.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[m.jsx("p",{className:"text-sm font-light text-gray-500",children:t("amountToPay")}),m.jsx("div",{className:"text-5xl font-bold",children:m.jsx(ui,{value:l(),start:d,currency:o,asCurrency:!0})})]})})]})}),m.jsx(nn,{children:m.jsx(ht,{label:t("confirmAndPay",{amount:xs(l(),o)}),className:"w-full",onClick:f,disabled:!d||!l()})})]})})}function IN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/",element:m.jsx(rb,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(Ms,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(sa,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/pay",element:m.jsx(or,{element:m.jsx(TN,{})})})]})}function kN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/",element:m.jsx(rb,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(Ms,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/link-identifier",element:m.jsx(sa,{})}),m.jsx(Oe,{path:"/link-identifier/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/top-up",element:m.jsx(or,{element:m.jsx(AN,{})})})]})}function ON(){const{t:e}=tt(),[t,n]=k.useState(""),[r,i]=k.useState(!1),[s,o]=k.useState(!1),[c,u]=k.useState(!1),[d,f]=k.useState(),{session:h}=bt(),l=Mt(),b=k.useCallback(async()=>{if(h){i(!0);try{const{data:{data:a}}=await vy.get(t);f(a),a.contact||h.contact?l("redeem",{state:{voucher:a}}):u(!0)}catch{i(!1),n("")}}},[t,l,h]);return k.useEffect(()=>{t&&!r&&!s&&b().then()},[t]),m.jsxs(m.Fragment,{children:[m.jsx(hn,{children:m.jsxs(Ht,{id:Mr,children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:e("scanOrEnterX",{x:e("voucherCode").toLowerCase()})})})}),m.jsx(Pt,{children:m.jsx(jo,{dataSetter:n,setDefer:o,label:e("code")})}),m.jsx(nn,{children:m.jsx(ht,{label:e("submit"),className:"w-full",onClick:b})})]})}),m.jsx(Mi,{title:e("noContactLinkedToVoucherTitle"),isOpen:c,onClose:()=>u(!1),primaryAction:{label:e("linkToContact"),action:()=>l("link",{state:{voucher:d}})},secondaryAction:{label:e("cancel"),action:()=>u(!1)},children:m.jsx("p",{children:e("linkVoucherWithCodeToContact",{code:t})})})]})}function RN(){const{state:e}=Yt(),t=Mt(),{t:n}=tt(),{session:r,mutate:i}=bt(),{onRedeemVoucher:s}=Tt(),[o,c]=k.useState(e.voucher);if(!o)return m.jsx(m.Fragment,{});const u=k.useCallback(async()=>{if(!o.contact&&!r.contact)return t("../link",{state:e});const{data:{data:d}}=await vy.redeemByCode(o.code);c(d),s&&s(d);const f=await i(),h=f==null?void 0:f.data.data.events;Io(h)},[r,o]);return m.jsx(hn,{children:m.jsxs(Ht,{children:[m.jsx(jt,{children:m.jsx("div",{className:"flex h-16 items-center",children:m.jsx("p",{children:"Voucher"})})}),m.jsx(Pt,{children:m.jsx("div",{children:m.jsx($f,{voucher:o,setSelected:()=>{}})})}),m.jsx(nn,{children:m.jsx(ht,{label:n("redeemVoucher"),className:"w-full",onClick:u,disabled:o.status!==bs.ACTIVE})})]})})}function NN(){const{state:{voucher:e}}=Yt();return m.jsx(hn,{children:m.jsx(Kc,{state:{voucher:e,redirectRoute:`${ft.VOUCHER}/redeem`}})})}function MN(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/",element:m.jsx(ON,{})}),m.jsx(Oe,{path:"/email",element:m.jsx(Ms,{})}),m.jsx(Oe,{path:"/email/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/link",element:m.jsx(NN,{})}),m.jsx(Oe,{path:"/link/link-identifier",element:m.jsx(sa,{})}),m.jsx(Oe,{path:"/link/link-identifier/new-contact",element:m.jsx(sr,{})}),m.jsx(Oe,{path:"/redeem",element:m.jsx(RN,{})})]})}const DN="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.37482%209.55838C0.802045%2011.696%200.887351%2013.9567%201.61959%2016.045C2.35183%2018.1334%203.69695%2019.9524%205.47921%2021.2642C7.26146%2022.5761%209.39798%2023.3199%2011.6096%2023.3985C13.8212%2023.477%2016.0051%2022.8866%2017.876%2021.7045C19.7468%2020.5223%2021.2175%2018.8034%2022.0961%2016.7722C22.9746%2014.7411%2023.2201%2012.4921%2022.8004%2010.3193C22.3807%208.1464%2021.3154%206.15066%2019.7436%204.59277C18.1718%203.03489%2016.1667%201.98732%2013.9902%201.58693M7.14096%202.53681C5.21049%203.48732%203.60119%204.98315%202.51232%206.8391M10.7049%201.48193C10.452%201.51191%2010.2003%201.55066%209.95012%201.59811M18.1995%2015.656C18.757%2014.5927%2019.0317%2013.4039%2018.9971%2012.2038C18.9625%2011.0037%2018.6198%209.83263%2018.002%208.8032C17.3842%207.77377%2016.512%206.92055%2015.4692%206.32553C14.4264%205.73051%2013.2481%205.4137%2012.0476%205.40554C10.847%205.39739%209.66449%205.69816%208.61372%206.27895C7.56295%206.85974%206.67923%207.70104%206.04747%208.72198C5.41572%209.74292%205.05717%2010.9092%205.00628%2012.1087C4.9554%2013.3082%205.21389%2014.5007%205.75691%2015.5714M9.15764%2013.3648C9.00624%2012.9162%208.96314%2012.4382%209.03189%2011.9698C9.10064%2011.5014%209.27926%2011.0559%209.55317%2010.6697C9.82708%2010.2836%2010.1885%209.96774%2010.6079%209.74803C11.0272%209.52832%2011.4926%209.41098%2011.966%209.4056C12.4394%209.40023%2012.9074%209.50697%2013.3316%209.71709C13.7559%209.92722%2014.1244%2010.2348%2014.407%2010.6146C14.6896%2010.9944%2014.8783%2011.4358%2014.9576%2011.9025C15.037%2012.3692%2015.0048%2012.8481%2014.8636%2013.3M14.0993%2010.2622C14.0043%2010.1691%2013.9032%2010.0825%2013.7967%2010.0028M8.2478%2018.3147C9.32147%2018.9965%2010.5606%2019.3728%2011.832%2019.4033C13.1035%2019.4339%2014.3592%2019.1174%2015.4644%2018.488'%20stroke='%233430FF'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";function PN(){const e=Mt(),{t}=tt(),n=Tt();return k.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),m.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[m.jsxs("div",{className:"flex items-center justify-center gap-3",children:[m.jsx("img",{alt:"logo",src:DN,className:"z-10 h-16 w-16 hover:animate-spin"}),m.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",m.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?m.jsx(ht,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):m.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function sb({message:e=""}){return m.jsxs("div",{className:"flex h-screen w-full items-center justify-center gap-4 text-core-gray-500",children:[m.jsx(ko,{className:"h-[48px] w-[48px]"}),e&&m.jsx("p",{className:"text-xl",children:e})]})}const jN={[ut.GENERIC]:ft.GENERIC,[ut.PORTAL]:ft.PORTAL,[ut.POINTS_TRANSACTION]:ft.POINTS_TRANSACTION,[ut.PAY_PREPAID]:ft.PAY_PREPAID,[ut.TOP_UP_PREPAID]:ft.TOP_UP_PREPAID,[ut.VOUCHER]:ft.VOUCHER,[ut.GIFTCARD]:ft.GIFTCARD,[ut.REDEEM_GIFTCARD]:ft.GIFTCARD,[ut.TOP_UP_GIFTCARD]:ft.GIFTCARD};function LN(){const e=Mt(),{t}=tt(),{sessionUuid:n}=Tt(),{session:r,isLoading:i,mutate:s}=bt();return k.useEffect(()=>{!i&&r&&e(jN[r.type])},[i,s,e,r]),i?m.jsx(sb,{}):m.jsx("div",{className:"text-error-600 flex w-full items-center justify-center",children:`${t("portalSessionNotFound")} (${n})`})}function ob(){return m.jsxs(pr,{children:[m.jsx(Oe,{path:"/",element:m.jsx(PN,{})}),m.jsx(Oe,{path:":portalSessionUuid",element:m.jsx(LN,{})}),m.jsx(Oe,{path:`${ft.GENERIC}/*`,element:m.jsx(Li,{type:ut.GENERIC,element:m.jsx(yN,{})})}),m.jsx(Oe,{path:`${ft.GIFTCARD}/*`,element:m.jsx(Li,{type:[ut.GIFTCARD,ut.REDEEM_GIFTCARD,ut.TOP_UP_GIFTCARD],element:m.jsx(EN,{})})}),m.jsx(Oe,{path:`${ft.PORTAL}/*`,element:m.jsx(Li,{type:ut.PORTAL,element:m.jsx(SN,{})})}),m.jsx(Oe,{path:`${ft.PAY_PREPAID}/*`,element:m.jsx(Li,{type:ut.PAY_PREPAID,element:m.jsx(IN,{})})}),m.jsx(Oe,{path:`${ft.POINTS_TRANSACTION}/*`,element:m.jsx(Li,{type:ut.POINTS_TRANSACTION,element:m.jsx(CN,{})})}),m.jsx(Oe,{path:`${ft.TOP_UP_PREPAID}/*`,element:m.jsx(Li,{type:ut.TOP_UP_PREPAID,element:m.jsx(kN,{})})}),m.jsx(Oe,{path:`${ft.VOUCHER}/*`,element:m.jsx(Li,{type:ut.VOUCHER,element:m.jsx(MN,{})})})]})}function or({element:e}){const{session:t}=bt();return t.contact?e:m.jsx(mo,{to:"/"})}function Li({type:e,element:t}){const{session:n}=bt();return n?(Array.isArray(e)?[...e,ut.GENERIC].includes(n.type):n.type===e||n.type===ut.GENERIC)?t:m.jsx(mo,{to:"/"}):void 0}function BN(e){const t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r),o=i-s,c=(i+s)/2;let u=0;o!==0&&(u=o/(1-Math.abs(2*c-1)));let d=0;return o!==0&&(i===t?d=((n-r)/o+(n<r?6:0))*60:i===n?d=((r-t)/o+2)*60:d=((t-n)/o+4)*60),{hue:d,saturation:u,lightness:c}}function wu(e,t,n){const r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),s=n-r/2;let o=0,c=0,u=0;return e<60?(o=r,c=i,u=0):e<120?(o=i,c=r,u=0):e<180?(o=0,c=r,u=i):e<240?(o=0,c=i,u=r):e<300?(o=i,c=0,u=r):(o=r,c=0,u=i),o=Math.round((o+s)*255),c=Math.round((c+s)*255),u=Math.round((u+s)*255),`#${o.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}${u.toString(16).padStart(2,"0")}`}function ab(e){const{hue:t,saturation:n,lightness:r}=BN(e),i=.04,s=[{key:"50",min:97,max:99},{key:"100",min:92,max:96},{key:"200",min:85,max:91},{key:"300",min:74,max:84},{key:"400",min:58,max:73},{key:"500",min:51,max:61},{key:"600",min:36,max:50},{key:"700",min:29,max:40},{key:"800",min:24,max:33},{key:"900",min:20,max:28},{key:"950",min:0,max:19}],o={},c={},u={},d={};s.forEach(f=>{const h=(f.min+f.max)/2/100;o[f.key]=wu(t,n,h),u[f.key]=wu(0,n,h),d[f.key]=wu(120,n,h),c[f.key]=wu(t,i,h)});for(const f of s)if(r*100>=f.min&&r*100<=f.max){o[f.key]=e;break}return{primaryPalette:o,redPalette:u,greenPalette:d,grayPalette:c}}const FN=e=>{const t={primary:e.primary_color,secondary:e.secondary_color,tertiary:e.tertiary_color,quaternary:e.quaternary_color},n=document.querySelector(":root");for(const r in t)if(t[r]){const{primaryPalette:i}=ab(t[r]);for(const s in i)n.style.setProperty(`--${r}-${s}`,i[s])}if(t.primary){const{grayPalette:r,redPalette:i,greenPalette:s}=ab(t.primary);for(const o in r)n.style.setProperty(`--gray-${o}`,r[o]);for(const o in i)n.style.setProperty(`--red-${o}`,i[o]);for(const o in s)n.style.setProperty(`--green-${o}`,s[o])}};function UN(){const{t:e}=tt(),[t,n]=k.useState(!1);return m.jsx("div",{className:"default-bg-colors flex h-screen items-center justify-center",children:m.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 bg-white shadow-lg",children:[m.jsx("div",{className:"border-b border-gray-200 bg-gray-50 px-6 pb-3 pt-4 shadow",children:m.jsx("h2",{className:"text-3xl",children:"Oops!"})}),m.jsx("p",{className:"mt-4 px-6 text-gray-900",children:e("sorrySomethingWentWrong")}),m.jsx("div",{className:"mt-10 p-6",children:m.jsx(ht,{onClick:()=>{n(!0),window.location.replace("/")},loading:t,label:e("back")})})]})})}function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function cb(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Hf(XMLHttpRequest))==="object"}function VN(e){return!!e&&typeof e.then=="function"}function qN(e){return VN(e)?e:Promise.resolve(e)}function $N(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Yf={exports:{}},Eu={exports:{}},ub;function GN(){return ub||(ub=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Fi<"u"&&Fi,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var c=typeof s<"u"&&s||typeof self<"u"&&self||typeof c<"u"&&c,u={searchParams:"URLSearchParams"in c,iterable:"Symbol"in c&&"iterator"in Symbol,blob:"FileReader"in c&&"Blob"in c&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in c,arrayBuffer:"ArrayBuffer"in c};function d(R){return R&&DataView.prototype.isPrototypeOf(R)}if(u.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(R){return R&&f.indexOf(Object.prototype.toString.call(R))>-1};function l(R){if(typeof R!="string"&&(R=String(R)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(R)||R==="")throw new TypeError('Invalid character in header field name: "'+R+'"');return R.toLowerCase()}function b(R){return typeof R!="string"&&(R=String(R)),R}function a(R){var L={next:function(){var W=R.shift();return{done:W===void 0,value:W}}};return u.iterable&&(L[Symbol.iterator]=function(){return L}),L}function p(R){this.map={},R instanceof p?R.forEach(function(L,W){this.append(W,L)},this):Array.isArray(R)?R.forEach(function(L){this.append(L[0],L[1])},this):R&&Object.getOwnPropertyNames(R).forEach(function(L){this.append(L,R[L])},this)}p.prototype.append=function(R,L){R=l(R),L=b(L);var W=this.map[R];this.map[R]=W?W+", "+L:L},p.prototype.delete=function(R){delete this.map[l(R)]},p.prototype.get=function(R){return R=l(R),this.has(R)?this.map[R]:null},p.prototype.has=function(R){return this.map.hasOwnProperty(l(R))},p.prototype.set=function(R,L){this.map[l(R)]=b(L)},p.prototype.forEach=function(R,L){for(var W in this.map)this.map.hasOwnProperty(W)&&R.call(L,this.map[W],W,this)},p.prototype.keys=function(){var R=[];return this.forEach(function(L,W){R.push(W)}),a(R)},p.prototype.values=function(){var R=[];return this.forEach(function(L){R.push(L)}),a(R)},p.prototype.entries=function(){var R=[];return this.forEach(function(L,W){R.push([W,L])}),a(R)},u.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function y(R){if(R.bodyUsed)return Promise.reject(new TypeError("Already read"));R.bodyUsed=!0}function g(R){return new Promise(function(L,W){R.onload=function(){L(R.result)},R.onerror=function(){W(R.error)}})}function v(R){var L=new FileReader,W=g(L);return L.readAsArrayBuffer(R),W}function w(R){var L=new FileReader,W=g(L);return L.readAsText(R),W}function E(R){for(var L=new Uint8Array(R),W=new Array(L.length),z=0;z<L.length;z++)W[z]=String.fromCharCode(L[z]);return W.join("")}function S(R){if(R.slice)return R.slice(0);var L=new Uint8Array(R.byteLength);return L.set(new Uint8Array(R)),L.buffer}function A(){return this.bodyUsed=!1,this._initBody=function(R){this.bodyUsed=this.bodyUsed,this._bodyInit=R,R?typeof R=="string"?this._bodyText=R:u.blob&&Blob.prototype.isPrototypeOf(R)?this._bodyBlob=R:u.formData&&FormData.prototype.isPrototypeOf(R)?this._bodyFormData=R:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)?this._bodyText=R.toString():u.arrayBuffer&&u.blob&&d(R)?(this._bodyArrayBuffer=S(R.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(R)||h(R))?this._bodyArrayBuffer=S(R):this._bodyText=R=Object.prototype.toString.call(R):this._bodyText="",this.headers.get("content-type")||(typeof R=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var R=y(this);if(R)return R;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var R=y(this);return R||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(v)}),this.text=function(){var R=y(this);if(R)return R;if(this._bodyBlob)return w(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(D)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function O(R){var L=R.toUpperCase();return T.indexOf(L)>-1?L:R}function N(R,L){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L=L||{};var W=L.body;if(R instanceof N){if(R.bodyUsed)throw new TypeError("Already read");this.url=R.url,this.credentials=R.credentials,L.headers||(this.headers=new p(R.headers)),this.method=R.method,this.mode=R.mode,this.signal=R.signal,!W&&R._bodyInit!=null&&(W=R._bodyInit,R.bodyUsed=!0)}else this.url=String(R);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new p(L.headers)),this.method=O(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(W),(this.method==="GET"||this.method==="HEAD")&&(L.cache==="no-store"||L.cache==="no-cache")){var z=/([?&])_=[^&]*/;if(z.test(this.url))this.url=this.url.replace(z,"$1_="+new Date().getTime());else{var Z=/\?/;this.url+=(Z.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function D(R){var L=new FormData;return R.trim().split("&").forEach(function(W){if(W){var z=W.split("="),Z=z.shift().replace(/\+/g," "),te=z.join("=").replace(/\+/g," ");L.append(decodeURIComponent(Z),decodeURIComponent(te))}}),L}function U(R){var L=new p,W=R.replace(/\r?\n[\t ]+/g," ");return W.split("\r").map(function(z){return z.indexOf(`
142
- `)===0?z.substr(1,z.length):z}).forEach(function(z){var Z=z.split(":"),te=Z.shift().trim();if(te){var re=Z.join(":").trim();L.append(te,re)}}),L}A.call(N.prototype);function V(R,L){if(!(this instanceof V))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText=L.statusText===void 0?"":""+L.statusText,this.headers=new p(L.headers),this.url=L.url||"",this._initBody(R)}A.call(V.prototype),V.prototype.clone=function(){return new V(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},V.error=function(){var R=new V(null,{status:0,statusText:""});return R.type="error",R};var F=[301,302,303,307,308];V.redirect=function(R,L){if(F.indexOf(L)===-1)throw new RangeError("Invalid status code");return new V(null,{status:L,headers:{location:R}})},o.DOMException=c.DOMException;try{new o.DOMException}catch{o.DOMException=function(L,W){this.message=L,this.name=W;var z=Error(L);this.stack=z.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function q(R,L){return new Promise(function(W,z){var Z=new N(R,L);if(Z.signal&&Z.signal.aborted)return z(new o.DOMException("Aborted","AbortError"));var te=new XMLHttpRequest;function re(){te.abort()}te.onload=function(){var ue={status:te.status,statusText:te.statusText,headers:U(te.getAllResponseHeaders()||"")};ue.url="responseURL"in te?te.responseURL:ue.headers.get("X-Request-URL");var ye="response"in te?te.response:te.responseText;setTimeout(function(){W(new V(ye,ue))},0)},te.onerror=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.ontimeout=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.onabort=function(){setTimeout(function(){z(new o.DOMException("Aborted","AbortError"))},0)};function he(ue){try{return ue===""&&c.location.href?c.location.href:ue}catch{return ue}}te.open(Z.method,he(Z.url),!0),Z.credentials==="include"?te.withCredentials=!0:Z.credentials==="omit"&&(te.withCredentials=!1),"responseType"in te&&(u.blob?te.responseType="blob":u.arrayBuffer&&Z.headers.get("Content-Type")&&Z.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(te.responseType="arraybuffer")),L&&typeof L.headers=="object"&&!(L.headers instanceof p)?Object.getOwnPropertyNames(L.headers).forEach(function(ue){te.setRequestHeader(ue,b(L.headers[ue]))}):Z.headers.forEach(function(ue,ye){te.setRequestHeader(ye,ue)}),Z.signal&&(Z.signal.addEventListener("abort",re),te.onreadystatechange=function(){te.readyState===4&&Z.signal.removeEventListener("abort",re)}),te.send(typeof Z._bodyInit>"u"?null:Z._bodyInit)})}return q.polyfill=!0,c.fetch||(c.fetch=q,c.Headers=p,c.Request=N,c.Response=V),o.Headers=p,o.Request=N,o.Response=V,o.fetch=q,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Eu,Eu.exports)),Eu.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Fi<"u"&&Fi.fetch?n=Fi.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof $N<"u"&&typeof window>"u"){var r=n||GN();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Yf,Yf.exports);var lb=Yf.exports;const db=Pu(lb),fb=Xb({__proto__:null,default:db},[lb]);function hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hb(Object(n),!0).forEach(function(r){HN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HN(e,t,n){return t=YN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YN(e){var t=WN(e,"string");return Bi(t)=="symbol"?t:t+""}function WN(e,t){if(Bi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bi(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}var jr;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?jr=global.fetch:typeof window<"u"&&window.fetch?jr=window.fetch:jr=fetch);var oa;cb()&&(typeof global<"u"&&global.XMLHttpRequest?oa=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(oa=window.XMLHttpRequest));var Su;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Su=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Su=window.ActiveXObject)),!jr&&fb&&!oa&&!Su&&(jr=db||fb),typeof jr!="function"&&(jr=void 0);var Wf=function(t,n){if(n&&Bi(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},mb=function(t,n,r,i){var s=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(d){r(null,{status:u.status,data:d})}).catch(r)};if(i){var o=i(t,n);if(o instanceof Promise){o.then(s).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(s).catch(r):jr(t,n).then(s).catch(r)},gb=!1,KN=function(t,n,r,i){t.queryStringParams&&(n=Wf(n,t.queryStringParams));var s=pb({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,c=pb({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},gb?{}:o),u=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{mb(n,c,i,u)}catch(d){if(!o||Object.keys(o).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(o).forEach(function(f){delete c[f]}),mb(n,c,i,u),gb=!0}catch(f){i(f)}}},zN=function(t,n,r,i){r&&Bi(r)==="object"&&(r=Wf("",r).slice(1)),t.queryStringParams&&(n=Wf(n,t.queryStringParams));try{var s;oa?s=new oa:s=new Su("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var c in o)s.setRequestHeader(c,o[c]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(u){console&&console.log(u)}},QN=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},jr&&n.indexOf("file:")!==0)return KN(t,n,r,i);if(cb()||typeof ActiveXObject=="function")return zN(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ds(e){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(e)}function yb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yb(Object(n),!0).forEach(function(r){vb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZN(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,bb(r.key),r)}}function XN(e,t,n){return t&&ZN(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vb(e,t,n){return t=bb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bb(e){var t=e8(e,"string");return Ds(t)=="symbol"?t:t+""}function e8(e,t){if(Ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var t8=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return vb({},r,i||"")},parseLoadPayload:function(n,r){},request:QN,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},wb=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};JN(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return XN(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Kf(Kf(Kf({},t8()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);Ds(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var c=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(n,i)),u=qN(u),u.then(function(d){if(!d)return o(null,{});var f=c.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});c.loadUrl(f,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,c=typeof i=="string"?[i]:i,u=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(c,u);this.options.request(this.options,n,d,function(f,h){if(h&&(h.status>=500&&h.status<600||!h.status))return r("failed loading "+n+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return r("failed loading "+n+"; status code: "+h.status,!1);if(!h&&f&&f.message&&f.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+f.message,!0);if(f)return r(f,!1);var l,b;try{typeof h.data=="string"?l=o.options.parse(h.data,i,s):l=h.data}catch{b="failed parsing "+n+" to json"}if(b)return r(b,!1);r(null,l)})}},{key:"create",value:function(n,r,i,s,o){var c=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var u=this.options.parsePayload(r,i,s),d=0,f=[],h=[];n.forEach(function(l){var b=c.options.addPath;typeof c.options.addPath=="function"&&(b=c.options.addPath(l,r));var a=c.services.interpolator.interpolate(b,{lng:l,ns:r});c.options.request(c.options,a,u,function(p,y){d+=1,f.push(p),h.push(y),d===n.length&&typeof o=="function"&&o(f,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,c=i.language;if(!(c&&c.toLowerCase()==="cimode")){var u=[],d=function(h){var l=s.toResolveHierarchy(h);l.forEach(function(b){u.indexOf(b)<0&&u.push(b)})};d(c),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),u.forEach(function(f){n.allOptions.ns.forEach(function(h){i.read(f,h,"read",null,null,function(l,b){l&&o.warn("loading namespace ".concat(h," for language ").concat(f," failed"),l),!l&&b&&o.log("loaded namespace ".concat(h," for language ").concat(f),b),i.loaded("".concat(f,"|").concat(h),l,b)})})})}}}])}();wb.type="backend";const{slice:n8,forEach:r8}=[];function i8(e){return r8.call(n8.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Eb=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,s8=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!Eb.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!Eb.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},Sb={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=s8(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e){this.create(e,"",-1)}};var o8={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Sb.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:s}=t;n&&typeof document<"u"&&Sb.create(n,e,r,i,s)}},a8={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let c=0;c<o.length;c++){const u=o[c].indexOf("=");u>0&&o[c].substring(0,u)===t&&(n=o[c].substring(u+1))}}return n}};let aa=null;const xb=()=>{if(aa!==null)return aa;try{aa=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{aa=!1}return aa};var c8={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&xb())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&xb()&&window.localStorage.setItem(n,e)}};let ca=null;const _b=()=>{if(ca!==null)return ca;try{ca=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ca=!1}return ca};var u8={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&_b())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&_b()&&window.sessionStorage.setItem(n,e)}},l8={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let s=0;s<n.length;s++)t.push(n[s]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},d8={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},f8={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},h8={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function p8(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Cb{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=i8(n,this.options||{},p8()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(o8),this.addDetector(a8),this.addDetector(c8),this.addDetector(u8),this.addDetector(l8),this.addDetector(d8),this.addDetector(f8),this.addDetector(h8)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Cb.type="languageDetector",Jt.use(wb).use(Cb).use(ok).init({fallbackLng:"en",lng:navigator.language&&navigator.language.substring(0,2),interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function Ab({children:e}){const{sessionUuid:t}=Tt(),[n,r]=k.useState();return gr({url:`${t}/brand-kit`,onData:i=>r(i)}),k.useEffect(()=>{n&&FN(n)},[n]),m.jsx(k.StrictMode,{children:m.jsx(ad,{fallback:UN,children:m.jsxs(k.Suspense,{children:[m.jsx("div",{children:m.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[m.jsx("div",{className:"flex h-full overflow-auto",children:e}),m.jsx(Ok,{})]})}),m.jsx(Hk,{className:"lg:top-14"})]})})})}function m8(e){const t=vs(),{errorToast:n}=Mo(),[r,i]=k.useState(""),s=()=>{const c={type:e.type??ut.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,contact_uuid:e.contactUuid};return e.cameraFacingMode&&(c.camera_facing_mode=e.cameraFacingMode),e.amountInCents&&(c.amount_in_cents=e.amountInCents),e.allowMultipleGiftcards&&(c.allow_multiple_giftcards=e.allowMultipleGiftcards),e.enableRegistration&&(c.enable_registration=e.enableRegistration),e.enableEmailIdentification&&(c.enable_email_identification=e.enableEmailIdentification),e.enableOnScreenKeyboard&&(c.enable_on_screen_keyboard=e.enableOnScreenKeyboard),e.primaryIdentificationMethod&&(c.primary_identification_method=e.primaryIdentificationMethod),c},o=()=>{t.post("/",s(),{baseURL:`${e.host}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${e.apiKey}`}}).then(c=>{i(c.data.data.uuid)}).catch(c=>{n(c)})};return k.useEffect(()=>{localStorage.setItem("apiKey",JSON.stringify(e.apiKey)),sessionStorage.setItem("apiHost",JSON.stringify(e.host)),Ct.initialize(e.apiKey,e.host),o()},[]),r?m.jsx(wy,{...e,sessionUuid:r,children:m.jsx(Ab,{children:m.jsx(o0,{children:m.jsx(ob,{})})})}):m.jsx(sb,{})}function g8({uuid:e,host:t}){return k.useEffect(()=>{sessionStorage.setItem("apiHost",JSON.stringify(t)),Ct.initialize(void 0,t)},[]),m.jsx(wy,{sessionUuid:e,children:m.jsx(Ab,{children:m.jsx(o0,{children:m.jsx(ob,{})})})})}const y8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M8 4.75V8.25M16 4.75V8.25M7.75 10.75H16.25M6.75 19.25H17.25C18.3546 19.25 19.25 18.3546 19.25 17.25V8.75C19.25 7.64543 18.3546 6.75 17.25 6.75H6.75C5.64543 6.75 4.75 7.64543 4.75 8.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),v8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("path",{d:"m21.25 7.5c.3796958 0 .693491.28215388.7431534.64822944l.0068466.10177056v8.5c0 1.7330315-1.3564548 3.1492459-3.0655761 3.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555 0-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932 1.06066018 0 .26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734 0 1.6711923-.7071103 1.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815 2 2c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554 0 .03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2 2c-.2928932.29289321-.767767.29289321-1.0606602 0-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734 0-1.67119234.70711027-1.7441988 1.60647279l-.0058012.14352721v8.5c0 .4142136-.33578644.75-.75.75-.37969577 0-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146 1.35645477-3.14924593 3.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117 5.85294824c2.209139 0 4 1.790861 4 4s-1.790861 4-4 4-4-1.790861-4-4 1.790861-4 4-4zm0 1.5c-1.3807119 0-2.5 1.1192881-2.5 2.5s1.1192881 2.5 2.5 2.5 2.5-1.1192881 2.5-2.5-1.1192881-2.5-2.5-2.5z",fill:"#212121"}))},Symbol.toStringTag,{value:"Module"})),b8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M13.25 8.75L9.75 12L13.25 15.25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),w8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),E8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("path",{d:"M4.7002 4.70016L11.2999 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M11.2998 4.70016L4.70014 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),S8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M14.25 8.75H11.375C10.4775 8.75 9.75 9.47754 9.75 10.375V10.375C9.75 11.2725 10.4775 12 11.375 12H12.625C13.5225 12 14.25 12.7275 14.25 13.625V13.625C14.25 14.5225 13.5225 15.25 12.625 15.25H9.75"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 7.75V8.25"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15.75V16.25"}))},Symbol.toStringTag,{value:"Module"})),x8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M19.25 19.25H13.75M9 18.25L4.75 19.25L5.75 15L15.0429 5.70711C15.4334 5.31658 16.0666 5.31658 16.4571 5.70711L18.2929 7.54289C18.6834 7.93342 18.6834 8.56658 18.2929 8.95711L9 18.25Z",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),_8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M6.75024 19.2502H17.2502C18.3548 19.2502 19.2502 18.3548 19.2502 17.2502V9.75025L12.0002 4.75024L4.75024 9.75025V17.2502C4.75024 18.3548 5.64568 19.2502 6.75024 19.2502Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M9.74963 15.7493C9.74963 14.6447 10.6451 13.7493 11.7496 13.7493H12.2496C13.3542 13.7493 14.2496 14.6447 14.2496 15.7493V19.2493H9.74963V15.7493Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),C8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13V15"}),se.createElement("circle",{cx:12,cy:9,r:.5}),se.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}))},Symbol.toStringTag,{value:"Module"})),A8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M5.5 6.5L12 12.25L18.5 6.5M6.75 18.25H17.25C18.3546 18.25 19.25 17.3546 19.25 16.25V7.75C19.25 6.64543 18.3546 5.75 17.25 5.75H6.75C5.64543 5.75 4.75 6.64543 4.75 7.75V16.25C4.75 17.3546 5.64543 18.25 6.75 18.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),T8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_17_95)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#FEF3F2"}),se.createElement("path",{d:"M12.0003 12L20.0003 20M12.0003 20L20.0003 12",stroke:"#E02731",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_17_95"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),I8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_15_20)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#E7FBF4"}),se.createElement("path",{d:"M10.6668 17.3333L14.6668 20L21.3335 12",stroke:"#039855",strokeWidth:1.6875,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_15_20"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),k8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_17_99)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#FFFAEB"}),se.createElement("path",{d:"M16.0002 17.3333V13.3333M16.0002 20V20.0067M23.0353 19.3333L17.942 10.456C17.0833 8.95867 14.9167 8.95867 14.058 10.456L8.96533 19.3333C8.11266 20.8187 9.18933 22.6667 10.9073 22.6667H21.0933C22.8107 22.6667 23.8873 20.8187 23.0353 19.3333Z",stroke:"#CFAA25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_17_99"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),O8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M13.1191 5.61336C13.0508 5.11856 12.6279 4.75 12.1285 4.75H11.8715C11.3721 4.75 10.9492 5.11856 10.8809 5.61336L10.7938 6.24511C10.7382 6.64815 10.4403 6.96897 10.0622 7.11922C10.006 7.14156 9.95021 7.16484 9.89497 7.18905C9.52217 7.3524 9.08438 7.3384 8.75876 7.09419L8.45119 6.86351C8.05307 6.56492 7.49597 6.60451 7.14408 6.9564L6.95641 7.14408C6.60452 7.49597 6.56492 8.05306 6.86351 8.45118L7.09419 8.75876C7.33841 9.08437 7.3524 9.52216 7.18905 9.89497C7.16484 9.95021 7.14156 10.006 7.11922 10.0622C6.96897 10.4403 6.64815 10.7382 6.24511 10.7938L5.61336 10.8809C5.11856 10.9492 4.75 11.372 4.75 11.8715V12.1285C4.75 12.6279 5.11856 13.0508 5.61336 13.1191L6.24511 13.2062C6.64815 13.2618 6.96897 13.5597 7.11922 13.9378C7.14156 13.994 7.16484 14.0498 7.18905 14.105C7.3524 14.4778 7.3384 14.9156 7.09419 15.2412L6.86351 15.5488C6.56492 15.9469 6.60451 16.504 6.9564 16.8559L7.14408 17.0436C7.49597 17.3955 8.05306 17.4351 8.45118 17.1365L8.75876 16.9058C9.08437 16.6616 9.52216 16.6476 9.89496 16.811C9.95021 16.8352 10.006 16.8584 10.0622 16.8808C10.4403 17.031 10.7382 17.3519 10.7938 17.7549L10.8809 18.3866C10.9492 18.8814 11.3721 19.25 11.8715 19.25H12.1285C12.6279 19.25 13.0508 18.8814 13.1191 18.3866L13.2062 17.7549C13.2618 17.3519 13.5597 17.031 13.9378 16.8808C13.994 16.8584 14.0498 16.8352 14.105 16.8109C14.4778 16.6476 14.9156 16.6616 15.2412 16.9058L15.5488 17.1365C15.9469 17.4351 16.504 17.3955 16.8559 17.0436L17.0436 16.8559C17.3955 16.504 17.4351 15.9469 17.1365 15.5488L16.9058 15.2412C16.6616 14.9156 16.6476 14.4778 16.811 14.105C16.8352 14.0498 16.8584 13.994 16.8808 13.9378C17.031 13.5597 17.3519 13.2618 17.7549 13.2062L18.3866 13.1191C18.8814 13.0508 19.25 12.6279 19.25 12.1285V11.8715C19.25 11.3721 18.8814 10.9492 18.3866 10.8809L17.7549 10.7938C17.3519 10.7382 17.031 10.4403 16.8808 10.0622C16.8584 10.006 16.8352 9.95021 16.8109 9.89496C16.6476 9.52216 16.6616 9.08437 16.9058 8.75875L17.1365 8.4512C17.4351 8.05308 17.3955 7.49599 17.0436 7.1441L16.8559 6.95642C16.504 6.60453 15.9469 6.56494 15.5488 6.86353L15.2412 7.09419C14.9156 7.33841 14.4778 7.3524 14.105 7.18905C14.0498 7.16484 13.994 7.14156 13.9378 7.11922C13.5597 6.96897 13.2618 6.64815 13.2062 6.24511L13.1191 5.61336Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M13.25 12C13.25 12.6904 12.6904 13.25 12 13.25C11.3096 13.25 10.75 12.6904 10.75 12C10.75 11.3096 11.3096 10.75 12 10.75C12.6904 10.75 13.25 11.3096 13.25 12Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),R8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75H5.75V16.75L4.75 19.25H19.25L18.25 16.75V7.75Z"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75L16.25 4.75H7.75L5.75 7.75"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.75 10.75V11.75C9.75 12.9926 10.7574 14 12 14V14C13.2426 14 14.25 12.9926 14.25 11.75V10.75"}))},Symbol.toStringTag,{value:"Module"})),N8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4.75L13.75 10.25H19.25L14.75 13.75L16.25 19.25L12 15.75L7.75 19.25L9.25 13.75L4.75 10.25H10.25L12 4.75Z"}))},Symbol.toStringTag,{value:"Module"})),M8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M15.25 8C15.25 9.79493 13.7949 11.25 12 11.25C10.205 11.25 8.74997 9.79493 8.74997 8C8.74997 6.20507 10.205 4.75 12 4.75C13.7949 4.75 15.25 6.20507 15.25 8Z"}),se.createElement("path",{d:"M6.84748 19.25H17.1525C18.2944 19.25 19.174 18.2681 18.6407 17.2584C17.8563 15.7731 16.068 14 12 14C7.93198 14 6.14364 15.7731 5.35921 17.2584C4.82594 18.2681 5.70556 19.25 6.84748 19.25Z"}))},Symbol.toStringTag,{value:"Module"}));xt.DefaultSession=g8,xt.ErrorCodes=Nc,xt.EventType=ci,xt.FacingMode=ws,xt.PortalRoute=ft,xt.PortalSession=m8,xt.PortalType=ut,xt.PrimaryIdentificationMethod=_o,xt.SubscriptionStatus=yy,xt.SubscriptionStrategy=ai,xt.VoucherStatus=bs,Object.defineProperty(xt,Symbol.toStringTag,{value:"Module"})});
142
+ `)===0?z.substr(1,z.length):z}).forEach(function(z){var Z=z.split(":"),te=Z.shift().trim();if(te){var re=Z.join(":").trim();L.append(te,re)}}),L}A.call(N.prototype);function V(R,L){if(!(this instanceof V))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText=L.statusText===void 0?"":""+L.statusText,this.headers=new p(L.headers),this.url=L.url||"",this._initBody(R)}A.call(V.prototype),V.prototype.clone=function(){return new V(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},V.error=function(){var R=new V(null,{status:0,statusText:""});return R.type="error",R};var F=[301,302,303,307,308];V.redirect=function(R,L){if(F.indexOf(L)===-1)throw new RangeError("Invalid status code");return new V(null,{status:L,headers:{location:R}})},o.DOMException=c.DOMException;try{new o.DOMException}catch{o.DOMException=function(L,W){this.message=L,this.name=W;var z=Error(L);this.stack=z.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function q(R,L){return new Promise(function(W,z){var Z=new N(R,L);if(Z.signal&&Z.signal.aborted)return z(new o.DOMException("Aborted","AbortError"));var te=new XMLHttpRequest;function re(){te.abort()}te.onload=function(){var ue={status:te.status,statusText:te.statusText,headers:U(te.getAllResponseHeaders()||"")};ue.url="responseURL"in te?te.responseURL:ue.headers.get("X-Request-URL");var ye="response"in te?te.response:te.responseText;setTimeout(function(){W(new V(ye,ue))},0)},te.onerror=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.ontimeout=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},te.onabort=function(){setTimeout(function(){z(new o.DOMException("Aborted","AbortError"))},0)};function he(ue){try{return ue===""&&c.location.href?c.location.href:ue}catch{return ue}}te.open(Z.method,he(Z.url),!0),Z.credentials==="include"?te.withCredentials=!0:Z.credentials==="omit"&&(te.withCredentials=!1),"responseType"in te&&(u.blob?te.responseType="blob":u.arrayBuffer&&Z.headers.get("Content-Type")&&Z.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(te.responseType="arraybuffer")),L&&typeof L.headers=="object"&&!(L.headers instanceof p)?Object.getOwnPropertyNames(L.headers).forEach(function(ue){te.setRequestHeader(ue,b(L.headers[ue]))}):Z.headers.forEach(function(ue,ye){te.setRequestHeader(ye,ue)}),Z.signal&&(Z.signal.addEventListener("abort",re),te.onreadystatechange=function(){te.readyState===4&&Z.signal.removeEventListener("abort",re)}),te.send(typeof Z._bodyInit>"u"?null:Z._bodyInit)})}return q.polyfill=!0,c.fetch||(c.fetch=q,c.Headers=p,c.Request=N,c.Response=V),o.Headers=p,o.Request=N,o.Response=V,o.fetch=q,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Eu,Eu.exports)),Eu.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Fi<"u"&&Fi.fetch?n=Fi.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof $N<"u"&&typeof window>"u"){var r=n||GN();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Yf,Yf.exports);var lb=Yf.exports;const db=Pu(lb),fb=Xb({__proto__:null,default:db},[lb]);function hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hb(Object(n),!0).forEach(function(r){HN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HN(e,t,n){return t=YN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YN(e){var t=WN(e,"string");return Bi(t)=="symbol"?t:t+""}function WN(e,t){if(Bi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Bi(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bi(e){"@babel/helpers - typeof";return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bi(e)}var jr;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?jr=global.fetch:typeof window<"u"&&window.fetch?jr=window.fetch:jr=fetch);var oa;cb()&&(typeof global<"u"&&global.XMLHttpRequest?oa=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(oa=window.XMLHttpRequest));var Su;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Su=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Su=window.ActiveXObject)),!jr&&fb&&!oa&&!Su&&(jr=db||fb),typeof jr!="function"&&(jr=void 0);var Wf=function(t,n){if(n&&Bi(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},mb=function(t,n,r,i){var s=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(d){r(null,{status:u.status,data:d})}).catch(r)};if(i){var o=i(t,n);if(o instanceof Promise){o.then(s).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(s).catch(r):jr(t,n).then(s).catch(r)},gb=!1,KN=function(t,n,r,i){t.queryStringParams&&(n=Wf(n,t.queryStringParams));var s=pb({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(s["Content-Type"]="application/json");var o=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,c=pb({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},gb?{}:o),u=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{mb(n,c,i,u)}catch(d){if(!o||Object.keys(o).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(o).forEach(function(f){delete c[f]}),mb(n,c,i,u),gb=!0}catch(f){i(f)}}},zN=function(t,n,r,i){r&&Bi(r)==="object"&&(r=Wf("",r).slice(1)),t.queryStringParams&&(n=Wf(n,t.queryStringParams));try{var s;oa?s=new oa:s=new Su("MSXML2.XMLHTTP.3.0"),s.open(r?"POST":"GET",n,1),t.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!t.withCredentials,r&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=t.customHeaders;if(o=typeof o=="function"?o():o,o)for(var c in o)s.setRequestHeader(c,o[c]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(u){console&&console.log(u)}},QN=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},jr&&n.indexOf("file:")!==0)return KN(t,n,r,i);if(cb()||typeof ActiveXObject=="function")return zN(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ds(e){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(e)}function yb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yb(Object(n),!0).forEach(function(r){vb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JN(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZN(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,bb(r.key),r)}}function XN(e,t,n){return t&&ZN(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vb(e,t,n){return t=bb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bb(e){var t=e8(e,"string");return Ds(t)=="symbol"?t:t+""}function e8(e,t){if(Ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var t8=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return vb({},r,i||"")},parseLoadPayload:function(n,r){},request:QN,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},wb=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};JN(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return XN(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Kf(Kf(Kf({},t8()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);Ds(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,s,o){var c=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(n,i)),u=qN(u),u.then(function(d){if(!d)return o(null,{});var f=c.services.interpolator.interpolate(d,{lng:n.join("+"),ns:i.join("+")});c.loadUrl(f,o,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var o=this,c=typeof i=="string"?[i]:i,u=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(c,u);this.options.request(this.options,n,d,function(f,h){if(h&&(h.status>=500&&h.status<600||!h.status))return r("failed loading "+n+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return r("failed loading "+n+"; status code: "+h.status,!1);if(!h&&f&&f.message&&f.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+f.message,!0);if(f)return r(f,!1);var l,b;try{typeof h.data=="string"?l=o.options.parse(h.data,i,s):l=h.data}catch{b="failed parsing "+n+" to json"}if(b)return r(b,!1);r(null,l)})}},{key:"create",value:function(n,r,i,s,o){var c=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var u=this.options.parsePayload(r,i,s),d=0,f=[],h=[];n.forEach(function(l){var b=c.options.addPath;typeof c.options.addPath=="function"&&(b=c.options.addPath(l,r));var a=c.services.interpolator.interpolate(b,{lng:l,ns:r});c.options.request(c.options,a,u,function(p,y){d+=1,f.push(p),h.push(y),d===n.length&&typeof o=="function"&&o(f,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,o=r.logger,c=i.language;if(!(c&&c.toLowerCase()==="cimode")){var u=[],d=function(h){var l=s.toResolveHierarchy(h);l.forEach(function(b){u.indexOf(b)<0&&u.push(b)})};d(c),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return d(f)}),u.forEach(function(f){n.allOptions.ns.forEach(function(h){i.read(f,h,"read",null,null,function(l,b){l&&o.warn("loading namespace ".concat(h," for language ").concat(f," failed"),l),!l&&b&&o.log("loaded namespace ".concat(h," for language ").concat(f),b),i.loaded("".concat(f,"|").concat(h),l,b)})})})}}}])}();wb.type="backend";const{slice:n8,forEach:r8}=[];function i8(e){return r8.call(n8.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Eb=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,s8=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!Eb.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!Eb.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},Sb={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=s8(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e){this.create(e,"",-1)}};var o8={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Sb.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:s}=t;n&&typeof document<"u"&&Sb.create(n,e,r,i,s)}},a8={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let c=0;c<o.length;c++){const u=o[c].indexOf("=");u>0&&o[c].substring(0,u)===t&&(n=o[c].substring(u+1))}}return n}};let aa=null;const xb=()=>{if(aa!==null)return aa;try{aa=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{aa=!1}return aa};var c8={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&xb())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&xb()&&window.localStorage.setItem(n,e)}};let ca=null;const _b=()=>{if(ca!==null)return ca;try{ca=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ca=!1}return ca};var u8={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&_b())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&_b()&&window.sessionStorage.setItem(n,e)}},l8={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let s=0;s<n.length;s++)t.push(n[s]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},d8={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},f8={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},h8={name:"subdomain",lookup(e){var i,s;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function p8(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Cb{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=i8(n,this.options||{},p8()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(o8),this.addDetector(a8),this.addDetector(c8),this.addDetector(u8),this.addDetector(l8),this.addDetector(d8),this.addDetector(f8),this.addDetector(h8)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Cb.type="languageDetector",Jt.use(wb).use(Cb).use(ok).init({fallbackLng:"en",lng:navigator.language&&navigator.language.substring(0,2),interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function Ab({children:e}){const{sessionUuid:t}=Tt(),[n,r]=k.useState();return gr({url:`${t}/brand-kit`,onData:i=>r(i)}),k.useEffect(()=>{n&&FN(n)},[n]),m.jsx(k.StrictMode,{children:m.jsx(ad,{fallback:UN,children:m.jsxs(k.Suspense,{children:[m.jsx("div",{children:m.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[m.jsx("div",{className:"flex h-full overflow-auto",children:e}),m.jsx(Ok,{})]})}),m.jsx(Hk,{className:"lg:top-14"})]})})})}function m8(e){const t=vs(),{errorToast:n}=Mo(),[r,i]=k.useState(""),s=()=>{const c={type:e.type??ut.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,contact_uuid:e.contactUuid};return e.cameraFacingMode&&(c.camera_facing_mode=e.cameraFacingMode),e.amountInCents&&(c.amount_in_cents=e.amountInCents),e.allowMultipleGiftcards&&(c.allow_multiple_giftcards=e.allowMultipleGiftcards),e.enableRegistration&&(c.enable_registration=e.enableRegistration),e.enableEmailIdentification&&(c.enable_email_identification=e.enableEmailIdentification),e.enableOnScreenKeyboard&&(c.enable_on_screen_keyboard=e.enableOnScreenKeyboard),e.primaryIdentificationMethod&&(c.primary_identification_method=e.primaryIdentificationMethod),c},o=()=>{t.post("/",s(),{baseURL:`${e.host}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${e.apiKey}`}}).then(c=>{i(c.data.data.uuid)}).catch(c=>{n(c)})};return k.useEffect(()=>{localStorage.setItem("apiKey",JSON.stringify(e.apiKey)),e.host&&sessionStorage.setItem("apiHost",JSON.stringify(e.host)),Ct.initialize(e.apiKey,e.host),o()},[]),r?m.jsx(wy,{...e,sessionUuid:r,children:m.jsx(Ab,{children:m.jsx(o0,{children:m.jsx(ob,{})})})}):m.jsx(sb,{})}function g8({uuid:e,host:t}){return k.useEffect(()=>{t&&sessionStorage.setItem("apiHost",JSON.stringify(t)),Ct.initialize(void 0,t)},[]),m.jsx(wy,{sessionUuid:e,children:m.jsx(Ab,{children:m.jsx(o0,{children:m.jsx(ob,{})})})})}const y8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M8 4.75V8.25M16 4.75V8.25M7.75 10.75H16.25M6.75 19.25H17.25C18.3546 19.25 19.25 18.3546 19.25 17.25V8.75C19.25 7.64543 18.3546 6.75 17.25 6.75H6.75C5.64543 6.75 4.75 7.64543 4.75 8.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),v8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("path",{d:"m21.25 7.5c.3796958 0 .693491.28215388.7431534.64822944l.0068466.10177056v8.5c0 1.7330315-1.3564548 3.1492459-3.0655761 3.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555 0-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932 1.06066018 0 .26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734 0 1.6711923-.7071103 1.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815 2 2c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554 0 .03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2 2c-.2928932.29289321-.767767.29289321-1.0606602 0-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734 0-1.67119234.70711027-1.7441988 1.60647279l-.0058012.14352721v8.5c0 .4142136-.33578644.75-.75.75-.37969577 0-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146 1.35645477-3.14924593 3.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117 5.85294824c2.209139 0 4 1.790861 4 4s-1.790861 4-4 4-4-1.790861-4-4 1.790861-4 4-4zm0 1.5c-1.3807119 0-2.5 1.1192881-2.5 2.5s1.1192881 2.5 2.5 2.5 2.5-1.1192881 2.5-2.5-1.1192881-2.5-2.5-2.5z",fill:"#212121"}))},Symbol.toStringTag,{value:"Module"})),b8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M13.25 8.75L9.75 12L13.25 15.25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),w8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),E8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("path",{d:"M4.7002 4.70016L11.2999 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M11.2998 4.70016L4.70014 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),S8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M14.25 8.75H11.375C10.4775 8.75 9.75 9.47754 9.75 10.375V10.375C9.75 11.2725 10.4775 12 11.375 12H12.625C13.5225 12 14.25 12.7275 14.25 13.625V13.625C14.25 14.5225 13.5225 15.25 12.625 15.25H9.75"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 7.75V8.25"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15.75V16.25"}))},Symbol.toStringTag,{value:"Module"})),x8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M19.25 19.25H13.75M9 18.25L4.75 19.25L5.75 15L15.0429 5.70711C15.4334 5.31658 16.0666 5.31658 16.4571 5.70711L18.2929 7.54289C18.6834 7.93342 18.6834 8.56658 18.2929 8.95711L9 18.25Z",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),_8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M6.75024 19.2502H17.2502C18.3548 19.2502 19.2502 18.3548 19.2502 17.2502V9.75025L12.0002 4.75024L4.75024 9.75025V17.2502C4.75024 18.3548 5.64568 19.2502 6.75024 19.2502Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M9.74963 15.7493C9.74963 14.6447 10.6451 13.7493 11.7496 13.7493H12.2496C13.3542 13.7493 14.2496 14.6447 14.2496 15.7493V19.2493H9.74963V15.7493Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),C8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13V15"}),se.createElement("circle",{cx:12,cy:9,r:.5}),se.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}))},Symbol.toStringTag,{value:"Module"})),A8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},se.createElement("path",{d:"M5.5 6.5L12 12.25L18.5 6.5M6.75 18.25H17.25C18.3546 18.25 19.25 17.3546 19.25 16.25V7.75C19.25 6.64543 18.3546 5.75 17.25 5.75H6.75C5.64543 5.75 4.75 6.64543 4.75 7.75V16.25C4.75 17.3546 5.64543 18.25 6.75 18.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),T8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_17_95)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#FEF3F2"}),se.createElement("path",{d:"M12.0003 12L20.0003 20M12.0003 20L20.0003 12",stroke:"#E02731",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_17_95"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),I8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_15_20)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#E7FBF4"}),se.createElement("path",{d:"M10.6668 17.3333L14.6668 20L21.3335 12",stroke:"#039855",strokeWidth:1.6875,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_15_20"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),k8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},se.createElement("g",{clipPath:"url(#clip0_17_99)"},se.createElement("rect",{width:32,height:32,rx:4,fill:"#FFFAEB"}),se.createElement("path",{d:"M16.0002 17.3333V13.3333M16.0002 20V20.0067M23.0353 19.3333L17.942 10.456C17.0833 8.95867 14.9167 8.95867 14.058 10.456L8.96533 19.3333C8.11266 20.8187 9.18933 22.6667 10.9073 22.6667H21.0933C22.8107 22.6667 23.8873 20.8187 23.0353 19.3333Z",stroke:"#CFAA25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),se.createElement("defs",null,se.createElement("clipPath",{id:"clip0_17_99"},se.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),O8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M13.1191 5.61336C13.0508 5.11856 12.6279 4.75 12.1285 4.75H11.8715C11.3721 4.75 10.9492 5.11856 10.8809 5.61336L10.7938 6.24511C10.7382 6.64815 10.4403 6.96897 10.0622 7.11922C10.006 7.14156 9.95021 7.16484 9.89497 7.18905C9.52217 7.3524 9.08438 7.3384 8.75876 7.09419L8.45119 6.86351C8.05307 6.56492 7.49597 6.60451 7.14408 6.9564L6.95641 7.14408C6.60452 7.49597 6.56492 8.05306 6.86351 8.45118L7.09419 8.75876C7.33841 9.08437 7.3524 9.52216 7.18905 9.89497C7.16484 9.95021 7.14156 10.006 7.11922 10.0622C6.96897 10.4403 6.64815 10.7382 6.24511 10.7938L5.61336 10.8809C5.11856 10.9492 4.75 11.372 4.75 11.8715V12.1285C4.75 12.6279 5.11856 13.0508 5.61336 13.1191L6.24511 13.2062C6.64815 13.2618 6.96897 13.5597 7.11922 13.9378C7.14156 13.994 7.16484 14.0498 7.18905 14.105C7.3524 14.4778 7.3384 14.9156 7.09419 15.2412L6.86351 15.5488C6.56492 15.9469 6.60451 16.504 6.9564 16.8559L7.14408 17.0436C7.49597 17.3955 8.05306 17.4351 8.45118 17.1365L8.75876 16.9058C9.08437 16.6616 9.52216 16.6476 9.89496 16.811C9.95021 16.8352 10.006 16.8584 10.0622 16.8808C10.4403 17.031 10.7382 17.3519 10.7938 17.7549L10.8809 18.3866C10.9492 18.8814 11.3721 19.25 11.8715 19.25H12.1285C12.6279 19.25 13.0508 18.8814 13.1191 18.3866L13.2062 17.7549C13.2618 17.3519 13.5597 17.031 13.9378 16.8808C13.994 16.8584 14.0498 16.8352 14.105 16.8109C14.4778 16.6476 14.9156 16.6616 15.2412 16.9058L15.5488 17.1365C15.9469 17.4351 16.504 17.3955 16.8559 17.0436L17.0436 16.8559C17.3955 16.504 17.4351 15.9469 17.1365 15.5488L16.9058 15.2412C16.6616 14.9156 16.6476 14.4778 16.811 14.105C16.8352 14.0498 16.8584 13.994 16.8808 13.9378C17.031 13.5597 17.3519 13.2618 17.7549 13.2062L18.3866 13.1191C18.8814 13.0508 19.25 12.6279 19.25 12.1285V11.8715C19.25 11.3721 18.8814 10.9492 18.3866 10.8809L17.7549 10.7938C17.3519 10.7382 17.031 10.4403 16.8808 10.0622C16.8584 10.006 16.8352 9.95021 16.8109 9.89496C16.6476 9.52216 16.6616 9.08437 16.9058 8.75875L17.1365 8.4512C17.4351 8.05308 17.3955 7.49599 17.0436 7.1441L16.8559 6.95642C16.504 6.60453 15.9469 6.56494 15.5488 6.86353L15.2412 7.09419C14.9156 7.33841 14.4778 7.3524 14.105 7.18905C14.0498 7.16484 13.994 7.14156 13.9378 7.11922C13.5597 6.96897 13.2618 6.64815 13.2062 6.24511L13.1191 5.61336Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),se.createElement("path",{d:"M13.25 12C13.25 12.6904 12.6904 13.25 12 13.25C11.3096 13.25 10.75 12.6904 10.75 12C10.75 11.3096 11.3096 10.75 12 10.75C12.6904 10.75 13.25 11.3096 13.25 12Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),R8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75H5.75V16.75L4.75 19.25H19.25L18.25 16.75V7.75Z"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75L16.25 4.75H7.75L5.75 7.75"}),se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.75 10.75V11.75C9.75 12.9926 10.7574 14 12 14V14C13.2426 14 14.25 12.9926 14.25 11.75V10.75"}))},Symbol.toStringTag,{value:"Module"})),N8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},se.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4.75L13.75 10.25H19.25L14.75 13.75L16.25 19.25L12 15.75L7.75 19.25L9.25 13.75L4.75 10.25H10.25L12 4.75Z"}))},Symbol.toStringTag,{value:"Module"})),M8=Object.freeze(Object.defineProperty({__proto__:null,default:e=>se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},se.createElement("path",{d:"M15.25 8C15.25 9.79493 13.7949 11.25 12 11.25C10.205 11.25 8.74997 9.79493 8.74997 8C8.74997 6.20507 10.205 4.75 12 4.75C13.7949 4.75 15.25 6.20507 15.25 8Z"}),se.createElement("path",{d:"M6.84748 19.25H17.1525C18.2944 19.25 19.174 18.2681 18.6407 17.2584C17.8563 15.7731 16.068 14 12 14C7.93198 14 6.14364 15.7731 5.35921 17.2584C4.82594 18.2681 5.70556 19.25 6.84748 19.25Z"}))},Symbol.toStringTag,{value:"Module"}));xt.DefaultSession=g8,xt.ErrorCodes=Nc,xt.EventType=ci,xt.FacingMode=ws,xt.PortalRoute=ft,xt.PortalSession=m8,xt.PortalType=ut,xt.PrimaryIdentificationMethod=_o,xt.SubscriptionStatus=yy,xt.SubscriptionStrategy=ai,xt.VoucherStatus=bs,Object.defineProperty(xt,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leatcom/portal-sessions",
3
- "version": "0.0.70-beta.3",
3
+ "version": "0.0.71",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"