@leatcom/portal-sessions 0.0.43 → 0.0.44

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.
@@ -100,5 +100,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
100
100
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ce,de=!0,Ee=!1;return{s:function(){G=G.call(Z)},n:function(){var fe=G.next();return de=fe.done,fe},e:function(fe){Ee=!0,ce=fe},f:function(){try{de||G.return==null||G.return()}finally{if(Ee)throw ce}}}}(Object.getOwnPropertyNames(A.prototype));try{for(B.s();!(M=B.n()).done;){var z=M.value;z==="constructor"||z==="bindMethods"||(R[z]=R[z].bind(R))}}catch(Z){B.e(Z)}finally{B.f()}}}],U&&g(F.prototype,U),H&&g(F,H),Object.defineProperty(F,"prototype",{writable:!1}),F;var F,U,H}();p(x,"noop",function(){});var C=x;function S(F){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},S(F)}function j(F,U){for(var H=0;H<U.length;H++){var A=U[H];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(F,P(A.key),A)}}function I(F,U,H){return(U=P(U))in F?Object.defineProperty(F,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):F[U]=H,F}function P(F){var U=function(H,A){if(S(H)!="object"||!H)return H;var R=H[Symbol.toPrimitive];if(R!==void 0){var M=R.call(H,A);if(S(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(H)}(F,"string");return S(U)=="symbol"?U:U+""}var D=function(){return F=function A(R){var M=this,B=R.dispatch,z=R.getOptions;(function(Z,J){if(!(Z instanceof J))throw new TypeError("Cannot call a class as a function")})(this,A),I(this,"getOptions",void 0),I(this,"dispatch",void 0),I(this,"isModifierKey",function(Z){return Z.altKey||Z.ctrlKey||Z.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(Z.code||Z.key||M.keyCodeToKey(Z==null?void 0:Z.keyCode))}),this.dispatch=B,this.getOptions=z,C.bindMethods(A,this)},(U=[{key:"handleHighlightKeyDown",value:function(A){var R=this.getOptions();R.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(A)&&(A.preventDefault(),A.stopImmediatePropagation());var M=this.getSimpleKeyboardLayoutKey(A);this.dispatch(function(B){var z,Z,J=B.getButtonElement(M),G=B.getButtonElement("{".concat(M,"}"));if(J)z=J,Z=M;else{if(!G)return;z=G,Z="{".concat(M,"}")}var pe,me,ce,de,Ee=function(je){je.style.background=R.physicalKeyboardHighlightBgColor||"#dadce4",je.style.color=R.physicalKeyboardHighlightTextColor||"black"};if(z)if(Array.isArray(z)){if(z.forEach(function(je){return Ee(je)}),R.physicalKeyboardHighlightPress)if(R.physicalKeyboardHighlightPressUsePointerEvents)(pe=z[0])===null||pe===void 0||(me=pe.onpointerdown)===null||me===void 0||me.call(pe,A);else if(R.physicalKeyboardHighlightPressUseClick){var fe;(fe=z[0])===null||fe===void 0||fe.click()}else B.handleButtonClicked(Z,A)}else Ee(z),R.physicalKeyboardHighlightPress&&(R.physicalKeyboardHighlightPressUsePointerEvents?(ce=z)===null||ce===void 0||(de=ce.onpointerdown)===null||de===void 0||de.call(ce,A):R.physicalKeyboardHighlightPressUseClick?z.click():B.handleButtonClicked(Z,A))})}},{key:"handleHighlightKeyUp",value:function(A){var R=this.getOptions();R.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(A)&&(A.preventDefault(),A.stopImmediatePropagation());var M=this.getSimpleKeyboardLayoutKey(A);this.dispatch(function(B){var z,Z,J,G=B.getButtonElement(M)||B.getButtonElement("{".concat(M,"}")),pe=function(me){me.removeAttribute&&me.removeAttribute("style")};G&&(Array.isArray(G)?(G.forEach(function(me){return pe(me)}),R.physicalKeyboardHighlightPressUsePointerEvents&&((z=G[0])===null||z===void 0||(Z=z.onpointerup)===null||Z===void 0||Z.call(z,A))):(pe(G),R.physicalKeyboardHighlightPressUsePointerEvents&&(G==null||(J=G.onpointerup)===null||J===void 0||J.call(G,A))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(A){var R,M="",B=A.code||A.key||this.keyCodeToKey(A==null?void 0:A.keyCode);return(M=B!=null&&B.includes("Numpad")||B!=null&&B.includes("Shift")||B!=null&&B.includes("Space")||B!=null&&B.includes("Backspace")||B!=null&&B.includes("Control")||B!=null&&B.includes("Alt")||B!=null&&B.includes("Meta")?A.code||"":A.key||this.keyCodeToKey(A==null?void 0:A.keyCode)||"").length>1?(R=M)===null||R===void 0?void 0:R.toLowerCase():M}},{key:"keyCodeToKey",value:function(A){return{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[A]||""}}])&&j(F.prototype,U),H&&j(F,H),Object.defineProperty(F,"prototype",{writable:!1}),F;var F,U,H}();function _(F){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},_(F)}function Q(F,U){for(var H=0;H<U.length;H++){var A=U[H];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(F,V(A.key),A)}}function $(F,U,H){return(U=V(U))in F?Object.defineProperty(F,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):F[U]=H,F}function V(F){var U=function(H,A){if(_(H)!="object"||!H)return H;var R=H[Symbol.toPrimitive];if(R!==void 0){var M=R.call(H,A);if(_(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(H)}(F,"string");return _(U)=="symbol"?U:U+""}var K=function(){return F=function A(R){var M=R.utilities,B=R.options;(function(z,Z){if(!(z instanceof Z))throw new TypeError("Cannot call a class as a function")})(this,A),$(this,"utilities",void 0),$(this,"options",void 0),$(this,"candidateBoxElement",void 0),$(this,"pageIndex",0),$(this,"pageSize",void 0),this.utilities=M,this.options=B,C.bindMethods(A,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},U=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(A){var R=this,M=A.candidateValue,B=A.targetElement,z=A.onSelect;if(M&&M.length){var Z=this.utilities.chunkArray(M.split(" "),this.pageSize);this.renderPage({candidateListPages:Z,targetElement:B,pageIndex:this.pageIndex,nbPages:Z.length,onItemSelected:function(J,G){z(J,G),R.destroy()}})}}},{key:"renderPage",value:function(A){var R,M=this,B=A.candidateListPages,z=A.targetElement,Z=A.pageIndex,J=A.nbPages,G=A.onItemSelected;(R=this.candidateBoxElement)===null||R===void 0||R.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var pe=document.createElement("ul");pe.className="hg-candidate-box-list",B[Z].forEach(function(Ne){var Qe,We=document.createElement("li"),tt=function(){var ze=new(M.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(ze,"target",{value:We}),ze};We.className="hg-candidate-box-list-item",We.innerHTML=((Qe=M.options.display)===null||Qe===void 0?void 0:Qe[Ne])||Ne,M.options.useTouchEvents?We.ontouchstart=function(ze){return G(Ne,ze||tt())}:We.onclick=function(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt();return G(Ne,ze)},pe.appendChild(We)});var me=Z>0,ce=document.createElement("div");ce.classList.add("hg-candidate-box-prev"),me&&ce.classList.add("hg-candidate-box-btn-active");var de=function(){me&&M.renderPage({candidateListPages:B,targetElement:z,pageIndex:Z-1,nbPages:J,onItemSelected:G})};this.options.useTouchEvents?ce.ontouchstart=de:ce.onclick=de,this.candidateBoxElement.appendChild(ce),this.candidateBoxElement.appendChild(pe);var Ee=Z<J-1,fe=document.createElement("div");fe.classList.add("hg-candidate-box-next"),Ee&&fe.classList.add("hg-candidate-box-btn-active");var je=function(){Ee&&M.renderPage({candidateListPages:B,targetElement:z,pageIndex:Z+1,nbPages:J,onItemSelected:G})};this.options.useTouchEvents?fe.ontouchstart=je:fe.onclick=je,this.candidateBoxElement.appendChild(fe),z.prepend(this.candidateBoxElement)}}],U&&Q(F.prototype,U),H&&Q(F,H),Object.defineProperty(F,"prototype",{writable:!1}),F;var F,U,H}(),N=K;function q(F){return function(U){if(Array.isArray(U))return W(U)}(F)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(F)||function(U,H){if(U){if(typeof U=="string")return W(U,H);var A=Object.prototype.toString.call(U).slice(8,-1);return A==="Object"&&U.constructor&&(A=U.constructor.name),A==="Map"||A==="Set"?Array.from(U):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?W(U,H):void 0}}(F)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
101
101
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W(F,U){(U==null||U>F.length)&&(U=F.length);for(var H=0,A=new Array(U);H<U;H++)A[H]=F[H];return A}function te(F){return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},te(F)}function X(F,U){var H=Object.keys(F);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(F);U&&(A=A.filter(function(R){return Object.getOwnPropertyDescriptor(F,R).enumerable})),H.push.apply(H,A)}return H}function ne(F,U){for(var H=0;H<U.length;H++){var A=U[H];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(F,he(A.key),A)}}function re(F,U,H){return(U=he(U))in F?Object.defineProperty(F,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):F[U]=H,F}function he(F){var U=function(H,A){if(te(H)!="object"||!H)return H;var R=H[Symbol.toPrimitive];if(R!==void 0){var M=R.call(H,A);if(te(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(H)}(F,"string");return te(U)=="symbol"?U:U+""}var se=function(){return F=function A(R,M){var B=this;if(function(de,Ee){if(!(de instanceof Ee))throw new TypeError("Cannot call a class as a function")}(this,A),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(de,Ee){var fe,je,Ne;if(typeof de=="string")fe=de.split(".").join(""),je=document.querySelector(".".concat(fe)),Ne=Ee;else if(de instanceof HTMLDivElement){if(!de.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");fe=de.className.split(" ")[0],je=de,Ne=Ee}else fe="simple-keyboard",je=document.querySelector(".".concat(fe)),Ne=de;return{keyboardDOMClass:fe,keyboardDOM:je,options:Ne}}),re(this,"getOptions",function(){return B.options}),re(this,"getCaretPosition",function(){return B.caretPosition}),re(this,"getCaretPositionEnd",function(){return B.caretPositionEnd}),re(this,"registerModule",function(de,Ee){B.modules[de]||(B.modules[de]={}),Ee(B.modules[de])}),re(this,"getKeyboardClassString",function(){for(var de=arguments.length,Ee=new Array(de),fe=0;fe<de;fe++)Ee[fe]=arguments[fe];return[B.keyboardDOMClass].concat(Ee).filter(function(je){return!!je}).join(" ")}),typeof window<"u"){var z=this.handleParams(R,M),Z=z.keyboardDOMClass,J=z.keyboardDOM,G=z.options,pe=G===void 0?{}:G;this.utilities=new C({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=J,this.options=function(de){for(var Ee=1;Ee<arguments.length;Ee++){var fe=arguments[Ee]!=null?arguments[Ee]:{};Ee%2?X(Object(fe),!0).forEach(function(je){re(de,je,fe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(fe)):X(Object(fe)).forEach(function(je){Object.defineProperty(de,je,Object.getOwnPropertyDescriptor(fe,je))})}return de}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},pe),this.keyboardPluginClasses="",C.bindMethods(A,this);var me=this.options.inputName,ce=me===void 0?this.defaultName:me;if(this.input={},this.input[ce]="",this.keyboardDOMClass=Z,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 D({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new N({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(Z,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},U=[{key:"setCaretPosition",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A;this.caretPosition=A,this.caretPositionEnd=R}},{key:"getInputCandidates",value:function(A){var R=this,M=this.options,B=M.layoutCandidates,z=M.layoutCandidatesCaseSensitiveMatch;if(!B||te(B)!=="object")return{};var Z=Object.keys(B).filter(function(pe){var me=A.substring(0,R.getCaretPositionEnd()||0)||A,ce=new RegExp("".concat(R.utilities.escapeRegex(pe),"$"),z?"g":"gi");return!!q(me.matchAll(ce)).length});if(Z.length>1){var J=Z.sort(function(pe,me){return me.length-pe.length})[0];return{candidateKey:J,candidateValue:B[J]}}if(Z.length){var G=Z[0];return{candidateKey:G,candidateValue:B[G]}}return{}}},{key:"showCandidatesBox",value:function(A,R,M){var B=this;this.candidateBox&&this.candidateBox.show({candidateValue:R,targetElement:M,onSelect:function(z,Z){var J=B.options,G=J.layoutCandidatesCaseSensitiveMatch,pe=J.disableCandidateNormalization,me=J.enableLayoutCandidatesKeyPress,ce=z;pe||(ce=z.normalize("NFD")),typeof B.options.beforeInputUpdate=="function"&&B.options.beforeInputUpdate(B);var de=B.getInput(B.options.inputName,!0),Ee=B.getCaretPositionEnd()||0,fe=de.substring(0,Ee||0)||de,je=new RegExp("".concat(B.utilities.escapeRegex(A),"$"),G?"g":"gi"),Ne=fe.replace(je,ce),Qe=de.replace(fe,Ne),We=Ne.length-fe.length,tt=(Ee||de.length)+We;tt<0&&(tt=0),B.setInput(Qe,B.options.inputName,!0),B.setCaretPosition(tt),me&&typeof B.options.onKeyPress=="function"&&B.options.onKeyPress(z,Z),typeof B.options.onChange=="function"&&B.options.onChange(B.getInput(B.options.inputName,!0),Z),typeof B.options.onChangeAll=="function"&&B.options.onChangeAll(B.getAllInputs(),Z)}})}},{key:"handleButtonClicked",value:function(A,R){var M=this.options,B=M.inputName,z=B===void 0?this.defaultName:B,Z=M.debug;if(A!=="{//}"){this.input[z]||(this.input[z]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var J=this.utilities.getUpdatedInput(A,this.input[z],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(A)&&this.activeInputElement&&this.input[z]&&this.input[z]===J&&this.caretPosition===0&&this.caretPositionEnd===J.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(A,R);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(A,R),this.input[z]!==J&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(J))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,J))return;var G=this.utilities.getUpdatedInput(A,this.input[z],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(G,this.options.inputName,!0),Z&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),R==null?void 0:R.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),R),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),R),R!=null&&R.target&&this.options.enableLayoutCandidates){var pe,me=this.getInputCandidates(J),ce=me.candidateKey,de=me.candidateValue;ce&&de?this.showCandidatesBox(ce,de,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)),Z&&console.log("Key pressed:",A)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(A){this.options.syncInstanceInputs?this.dispatch(function(R){R.isMouseHold=A}):this.isMouseHold=A}},{key:"handleButtonMouseDown",value:function(A,R){var M=this;R&&(this.options.preventMouseDownDefault&&R.preventDefault(),this.options.stopMouseDownPropagation&&R.stopPropagation(),R.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(){(M.getMouseHold()&&(!A.includes("{")&&!A.includes("}")||A==="{delete}"||A==="{backspace}"||A==="{bksp}"||A==="{space}"||A==="{tab}")||A==="{arrowright}"||A==="{arrowleft}"||A==="{arrowup}"||A==="{arrowdown}")&&(M.options.debug&&console.log("Button held:",A),M.handleButtonHold(A)),clearTimeout(M.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(A,R){var M=this;R&&(this.options.preventMouseUpDefault&&R.preventDefault&&R.preventDefault(),this.options.stopMouseUpPropagation&&R.stopPropagation&&R.stopPropagation(),!(R.target===this.keyboardDOM||R.target&&this.keyboardDOM.contains(R.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(R.target===this.candidateBox.candidateBoxElement||R.target&&this.candidateBox.candidateBoxElement.contains(R.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(B){B.classList.remove(M.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),A&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(A,R)}},{key:"handleKeyboardContainerMouseDown",value:function(A){this.options.preventMouseDownDefault&&A.preventDefault()}},{key:"handleButtonHold",value:function(A){var R=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){R.getMouseHold()?(R.handleButtonClicked(A),R.handleButtonHold(A)):clearTimeout(R.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var A=this;this.dispatch(function(R){R.replaceInput(A.input),R.setCaretPosition(A.caretPosition,A.caretPositionEnd)})}},{key:"clearInput",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[A]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,R=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!R&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[A].replace("‫","").replace("‬","")+"‬":this.input[A]}},{key:"getAllInputs",value:function(){var A=this,R={};return Object.keys(this.input).forEach(function(M){R[M]=A.getInput(M,!0)}),R}},{key:"setInput",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,M=arguments.length>2?arguments[2]:void 0;this.input[R]=A,!M&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(A){this.input=A}},{key:"setOptions",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=this.changedOptions(A);this.options=Object.assign(this.options,A),R.length&&(this.options.debug&&console.log("changedOptions",R),this.onSetOptions(R),this.render())}},{key:"changedOptions",value:function(A){var R=this;return Object.keys(A).filter(function(M){return JSON.stringify(A[M])!==JSON.stringify(R.options[M])})}},{key:"onSetOptions",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];A.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(A.includes("layoutCandidatesPageSize")||A.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new N({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(A){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(R){A(window.SimpleKeyboardInstances[R],R)})}},{key:"addButtonTheme",value:function(A,R){var M=this;R&&A&&(A.split(" ").forEach(function(B){R.split(" ").forEach(function(z){M.options.buttonTheme||(M.options.buttonTheme=[]);var Z=!1;M.options.buttonTheme.map(function(J){if(J!=null&&J.class.split(" ").includes(z)){Z=!0;var G=J.buttons.split(" ");G.includes(B)||(Z=!0,G.push(B),J.buttons=G.join(" "))}return J}),Z||M.options.buttonTheme.push({class:z,buttons:A})})}),this.render())}},{key:"removeButtonTheme",value:function(A,R){var M=this;if(!A&&!R)return this.options.buttonTheme=[],void this.render();A&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(A.split(" ").forEach(function(B){var z;(z=M.options)===null||z===void 0||(z=z.buttonTheme)===null||z===void 0||z.map(function(Z,J){if(Z&&R&&R.includes(Z.class)||!R){var G,pe,me=(G=Z)===null||G===void 0?void 0:G.buttons.split(" ").filter(function(ce){return ce!==B});Z&&me!=null&&me.length?Z.buttons=me.join(" "):((pe=M.options.buttonTheme)===null||pe===void 0||pe.splice(J,1),Z=null)}return Z})}),this.render())}},{key:"getButtonElement",value:function(A){var R,M=this.buttonElements[A];return M&&(R=M.length>1?M:M[0]),R}},{key:"inputPatternIsValid",value:function(A){var R,M=this.options.inputPattern;if((R=M instanceof RegExp?M:M[this.options.inputName||this.defaultName])&&A){var B=R.test(A);return this.options.debug&&console.log('inputPattern ("'.concat(R,'"): ').concat(B?"passed":"did not pass!")),B}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var A=this.options.physicalKeyboardHighlightPreventDefault,R=A!==void 0&&A;document.addEventListener("keyup",this.handleKeyUp,R),document.addEventListener("keydown",this.handleKeyDown,R),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(A){this.caretEventHandler(A),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(A)}},{key:"handleKeyDown",value:function(A){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(A)}},{key:"handleMouseUp",value:function(A){this.caretEventHandler(A)}},{key:"handleTouchEnd",value:function(A){this.caretEventHandler(A)}},{key:"handleSelect",value:function(A){this.caretEventHandler(A)}},{key:"handleSelectionChange",value:function(A){navigator.userAgent.includes("Firefox")||this.caretEventHandler(A)}},{key:"caretEventHandler",value:function(A){var R,M=this;A.target.tagName&&(R=A.target.tagName.toLowerCase()),this.dispatch(function(B){var z=A.target===B.keyboardDOM||A.target&&B.keyboardDOM.contains(A.target);if(M.options.syncInstanceInputs&&Array.isArray(A.path)&&(z=A.path.some(function(G){var pe;return G==null||(pe=G.hasAttribute)===null||pe===void 0?void 0:pe.call(G,"data-skInstance")})),(R==="textarea"||R==="input"&&["text","search","url","tel","password"].includes(A.target.type))&&!B.options.disableCaretPositioning){var Z=A.target.selectionStart,J=A.target.selectionEnd;B.options.rtl&&(Z=B.utilities.getRtlOffset(Z,B.getInput()),J=B.utilities.getRtlOffset(J,B.getInput())),B.setCaretPosition(Z,J),M.activeInputElement=A.target,B.options.debug&&console.log("Caret at: ",B.getCaretPosition(),B.getCaretPositionEnd(),A&&A.target.tagName.toLowerCase(),"(".concat(B.keyboardDOMClass,")"),A==null?void 0:A.type)}else!B.options.disableCaretPositioning&&z||(A==null?void 0:A.type)==="selectionchange"||(B.setCaretPosition(null),M.activeInputElement=null,B.options.debug&&console.log('Caret position reset due to "'.concat(A==null?void 0:A.type,'" event'),A))})}},{key:"recurseButtons",value:function(A){var R=this;A&&Object.keys(this.buttonElements).forEach(function(M){return R.buttonElements[M].forEach(A)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var A=this.options.physicalKeyboardHighlightPreventDefault,R=A!==void 0&&A;document.removeEventListener("keyup",this.handleKeyUp,R),document.removeEventListener("keydown",this.handleKeyDown,R),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(M){M&&(M.onpointerdown=null,M.onpointerup=null,M.onpointercancel=null,M.ontouchstart=null,M.ontouchend=null,M.ontouchcancel=null,M.onclick=null,M.onmousedown=null,M.onmouseup=null,M.remove(),M=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(A){var R=this.options.buttonTheme,M=[];return Array.isArray(R)&&R.forEach(function(B){if(B&&B.class&&typeof B.class=="string"&&B.buttons&&typeof B.buttons=="string"){var z=B.class.split(" ");B.buttons.split(" ").includes(A)&&(M=[].concat(q(M),q(z)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',B)}),M}},{key:"setDOMButtonAttributes",value:function(A,R){var M=this.options.buttonAttributes;Array.isArray(M)&&M.forEach(function(B){B.attribute&&typeof B.attribute=="string"&&B.value&&typeof B.value=="string"&&B.buttons&&typeof B.buttons=="string"?B.buttons.split(" ").includes(A)&&R(B.attribute,B.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',B)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(A){if(A.target.classList.contains("hg-button"))return A.preventDefault(),A.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 A=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(R){var M=new R(A);M.init&&M.init(A)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(A,R){return!!this.modules[A]&&this.modules[A][R]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(A,R,M,B){var z=this,Z=Array.from(A.children),J=0;return Z.length&&M.forEach(function(G,pe){var me=B[pe];if(!(me&&me>G))return!1;var ce=G-J,de=me-J,Ee=document.createElement("div");Ee.className+="hg-button-container";var fe="".concat(z.options.layoutName,"-r").concat(R,"c").concat(pe);Ee.setAttribute("data-skUID",fe);var je=Z.splice(ce,de-ce+1);J=de-ce,je.forEach(function(Ne){return Ee.appendChild(Ne)}),Z.splice(ce,0,Ee),A.innerHTML="",Z.forEach(function(Ne){return A.appendChild(Ne)}),z.options.debug&&console.log("rowDOMContainer",je,ce,de,J+1)}),A}},{key:"render",value:function(){var A=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var R="hg-layout-".concat(this.options.layoutName),M=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}"]},B=this.options.useTouchEvents||!1,z=B?"hg-touch-events":"",Z=this.options.useMouseEvents||!1,J=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,R,this.keyboardPluginClasses,z),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",M[this.options.layoutName||this.defaultName].forEach(function(G,pe){var me=G.split(" ");A.options.excludeFromLayout&&A.options.excludeFromLayout[A.options.layoutName||A.defaultName]&&(me=me.filter(function(fe){return A.options.excludeFromLayout&&!A.options.excludeFromLayout[A.options.layoutName||A.defaultName].includes(fe)}));var ce=document.createElement("div");ce.className+="hg-row";var de=[],Ee=[];me.forEach(function(fe,je){var Ne,Qe=!J&&typeof fe=="string"&&fe.length>1&&fe.indexOf("[")===0,We=!J&&typeof fe=="string"&&fe.length>1&&fe.indexOf("]")===fe.length-1;Qe&&(de.push(je),fe=fe.replace(/\[/g,"")),We&&(Ee.push(je),fe=fe.replace(/\]/g,""));var tt=A.utilities.getButtonClass(fe),ze=A.utilities.getButtonDisplayName(fe,A.options.display,A.options.mergeDisplay),sn=A.options.useButtonTag?"button":"div",Je=document.createElement(sn);Je.className+="hg-button ".concat(tt),(Ne=Je.classList).add.apply(Ne,q(A.getButtonThemeClasses(fe))),A.setDOMButtonAttributes(fe,function(Ie,Rt){Je.setAttribute(Ie,Rt)}),A.activeButtonClass="hg-activeButton",!A.utilities.pointerEventsSupported()||B||Z?B?(Je.ontouchstart=function(Ie){A.handleButtonClicked(fe,Ie),A.handleButtonMouseDown(fe,Ie)},Je.ontouchend=function(Ie){A.handleButtonMouseUp(fe,Ie)},Je.ontouchcancel=function(Ie){A.handleButtonMouseUp(fe,Ie)}):(Je.onclick=function(Ie){A.setMouseHold(!1),typeof A.options.onKeyReleased!="function"&&A.handleButtonClicked(fe,Ie)},Je.onmousedown=function(Ie){typeof A.options.onKeyReleased!="function"||A.isMouseHold||A.handleButtonClicked(fe,Ie),A.handleButtonMouseDown(fe,Ie)},Je.onmouseup=function(Ie){A.handleButtonMouseUp(fe,Ie)}):(Je.onpointerdown=function(Ie){A.handleButtonClicked(fe,Ie),A.handleButtonMouseDown(fe,Ie)},Je.onpointerup=function(Ie){A.handleButtonMouseUp(fe,Ie)},Je.onpointercancel=function(Ie){A.handleButtonMouseUp(fe,Ie)}),Je.setAttribute("data-skBtn",fe);var It="".concat(A.options.layoutName,"-r").concat(pe,"b").concat(je);Je.setAttribute("data-skBtnUID",It);var Ze=document.createElement("span");Ze.innerHTML=ze,Je.appendChild(Ze),A.buttonElements[fe]||(A.buttonElements[fe]=[]),A.buttonElements[fe].push(Je),ce.appendChild(Je)}),ce=A.parseRowDOMContainers(ce,pe,de,Ee),A.keyboardRowsDOM.appendChild(ce)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||B||Z?B?(document.ontouchend=function(G){return A.handleButtonMouseUp(void 0,G)},document.ontouchcancel=function(G){return A.handleButtonMouseUp(void 0,G)},this.keyboardDOM.ontouchstart=function(G){return A.handleKeyboardContainerMouseDown(G)}):B||(document.onmouseup=function(G){return A.handleButtonMouseUp(void 0,G)},this.keyboardDOM.onmousedown=function(G){return A.handleKeyboardContainerMouseDown(G)}):(document.onpointerup=function(G){return A.handleButtonMouseUp(void 0,G)},this.keyboardDOM.onpointerdown=function(G){return A.handleKeyboardContainerMouseDown(G)}),this.onInit())}}],U&&ne(F.prototype,U),H&&ne(F,H),Object.defineProperty(F,"prototype",{writable:!1}),F;var F,U,H}(),ve=se,ue=se}(),v}()},442:function(l){l.exports=n}},i={};function s(l){var f=i[l];if(f!==void 0)return f.exports;var m=i[l]={exports:{}};return r[l].call(m.exports,m,m.exports,s),m.exports}s.n=function(l){var f=l&&l.__esModule?function(){return l.default}:function(){return l};return s.d(f,{a:f}),f},s.d=function(l,f){for(var m in f)s.o(f,m)&&!s.o(l,m)&&Object.defineProperty(l,m,{enumerable:!0,get:f[m]})},s.o=function(l,f){return Object.prototype.hasOwnProperty.call(l,f)},s.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var a={};return function(){s.r(a),s.d(a,{KeyboardReact:function(){return d},default:function(){return g}}),s(981);var l=s(442),f=s(548),m=s.n(f);function h(p){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},h(p)}function v(p,y){var x=Object.keys(p);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(p);y&&(C=C.filter(function(S){return Object.getOwnPropertyDescriptor(p,S).enumerable})),x.push.apply(x,C)}return x}function c(p){for(var y=1;y<arguments.length;y++){var x=arguments[y]!=null?arguments[y]:{};y%2?v(Object(x),!0).forEach(function(C){E(p,C,x[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(x)):v(Object(x)).forEach(function(C){Object.defineProperty(p,C,Object.getOwnPropertyDescriptor(x,C))})}return p}function E(p,y,x){var C;return C=function(S,j){if(h(S)!="object"||!S)return S;var I=S[Symbol.toPrimitive];if(I!==void 0){var P=I.call(S,j||"default");if(h(P)!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(S)}(y,"string"),(y=h(C)=="symbol"?C:C+"")in p?Object.defineProperty(p,y,{value:x,enumerable:!0,configurable:!0,writable:!0}):p[y]=x,p}var o=function(p){return c(c({},p),{},{keyboardRef:null})},d=function(p){var y=p.baseClass||"react-simple-keyboard",x=l.useRef(null),C=l.useRef(null),S=l.useRef(null),j=l.useRef(p);return l.useEffect(function(){return function(){S.current&&S.current.destroy(),x.current=!1}},[]),l.useEffect(function(){var I=function($){return c(c({},$),{},{theme:"simple-keyboard ".concat($.theme||"hg-theme-default")})}(p);if(!x.current){x.current=!0,I.debug&&console.log("ReactSimpleKeyboard: Init");var P=C.current,D=".".concat(y);S.current=new(m())(P||D,I),I.keyboardRef&&I.keyboardRef(S.current)}var _=function($,V){var K=o(V),N=o($);return Object.keys(K).filter(function(q){return K[q]!==N[q]})}(j.current,I);if(_.length){var Q=S.current;j.current=I,Q==null||Q.setOptions(I),I.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",_)}},[x,y,j,p]),l.createElement("div",{className:y,ref:C})},g=d}(),a}()})})(Iu);var W0=Iu.exports;const H0=ss(W0);function Nu({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,s]=O.useState("default"),a=l=>{(l==="{shift}"||l==="{lock}")&&s(i==="default"?"shift":"default")};return u.jsx(H0,{keyboardRef:l=>t.current=l,layoutName:i,layout:n,theme:r,onChange:e,onKeyPress:a,preventMouseDownDefault:!0})}function J0({value:e,valueSetter:t}){const{session:n}=nt(),r=!(!n||!+(n.input_data.enable_on_screen_keyboard??!1)),[i,s]=O.useState(!1),a=O.useRef(null),l=O.useRef(null);O.useEffect(()=>{h(e?e.toString():"")},[]);const f=v=>{t(v?parseInt(v):0),h(v)},m=v=>{const{key:c}=v;if(e===0&&!/^[1-9]$/.test(c)||e!==0&&!/^[0-9]$/.test(c)&&c!=="Backspace")return;let E;if(c!=="Backspace")E=parseInt(e===0?c:`${e}${c}`);else{const o=e.toString().slice(0,-1);E=o.length?parseInt(o,10):0}t(E),h(E?E.toString():"")},h=v=>{l&&l.current&&(v?l.current.style.width=`${Math.max(v.length,3)*3}rem`:l.current.style.width="calc(3rem + 14px)")};return u.jsxs(u.Fragment,{children:[u.jsx("input",{ref:l,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:m,onChange:()=>{},onFocus:()=>s(!0),onBlur:()=>s(!1)}),r&&u.jsx("div",{className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!i&&"hidden"} absolute`,children:u.jsx(Nu,{keyboardRef:a,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:f})})]})}function Pu({title:e,balance:t,transaction:n}){const{t:r}=$e(),[i,s]=O.useState(0),{session:{currency:a,events:l}}=nt(),f=()=>{let m=0;return l.filter(v=>Object.values(Fn).includes(v.type)).forEach(v=>{m+=v.data.amount_in_cents}),m};return u.jsxs(At,{children:[e&&u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex h-full flex-col gap-4",children:[u.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx("p",{className:"font-light text-gray-500",children:r("balance")}),u.jsx(Kn,{value:t??0,start:t??0,currency:a,asCurrency:!0})]})}),u.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:u.jsx("div",{className:"flex items-center justify-center gap-1 p-4 text-5xl font-bold",children:f()?u.jsx(Kn,{value:0,start:i,currency:a,asCurrency:!0}):u.jsxs("div",{className:"flex items-center justify-center gap-1 ",children:[u.jsx("p",{children:"€"}),u.jsx(J0,{value:i,valueSetter:s})]})})})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:r("confirmAndPay",{amount:vr(i,a)}),className:"w-full",onClick:n&&(()=>n(i)),disabled:!i||!!f()})})]})}function z0(){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 ku(e,t){O.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 Z0=typeof window<"u"?O.useLayoutEffect:()=>{},X0=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight],e1=()=>{const[e,t]=O.useState(),n=O.useCallback(()=>{const r=X0();t(i=>i&&i[0]===r[0]&&i[1]===r[1]?i:r)},[]);return Z0(n,[n]),O.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 pa(){const{subscribe:e,unsubscribe:t,publish:n}=z0();return{initialize:(l,f)=>{e("openKeyboard",l),e("closeKeyboard",f)},terminate:(l,f)=>{t("openKeyboard",l),t("closeKeyboard",f)},open:l=>{n("openKeyboard",{inputId:l.target.id,inputValue:l.target.value})},close:()=>{n("closeKeyboard")}}}function Du(){const[e,t]=O.useState(!1),n=O.useRef(null),r=O.useRef(null),i=O.useRef(null),[s,a]=O.useState(),{session:l}=nt(),{initialize:f,terminate:m}=pa(),h=d=>{var g,p;r.current=document.getElementById(d.detail.inputId),(g=n.current)==null||g.setInput(d.detail.inputValue),(p=r.current)==null||p.addEventListener("input",y=>{var C;const x=y.target;(C=n.current)==null||C.setInput(x==null?void 0:x.value)}),t(!0)},v=()=>t(!1);O.useEffect(()=>{var g;const d=(g=i.current)==null?void 0:g.getBoundingClientRect();return d&&d.x&&!s&&a(d),f(h,v),()=>{m(h,v)}},[f,m,e]);const c=d=>{var g,p;if(r&&r.current){E(r.current,d);const y=(g=n.current)==null?void 0:g.getCaretPosition();y&&((p=r.current)==null||p.setSelectionRange(y,y))}},E=(d,g)=>{var x;const p=(x=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:x.set;p==null||p.call(d,g);const y=new Event("input",{bubbles:!0});d.dispatchEvent(y)};if(!l||!+(l.input_data.enable_on_screen_keyboard??!1))return u.jsx(u.Fragment,{});const o=()=>{var p;const d=(p=r.current)==null?void 0:p.getBoundingClientRect();let g=!1;return s&&d&&(g=!(s.right<d.left||s.left>d.right||s.bottom<d.top||s.top>d.bottom)),g};return u.jsx("div",{ref:i,className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&"hidden"} ${o()?"b-2 block":"absolute"}`,children:u.jsx(Nu,{keyboardRef:n,onChange:c})})}const yo=({id:e,name:t,label:n,description:r,required:i,type:s="text",value:a,placeholder:l,disabled:f,error:m=!1,helperText:h="",onChange:v,beforeIcon:c,afterIcon:E,autoFocus:o,onFocus:d,onBlur:g})=>{const[p,y]=O.useState(h),x=O.useRef(null),[C,S]=O.useState(!1),{open:j,close:I}=pa();O.useEffect(()=>()=>{I()},[]);const P=()=>{x.current&&y(x.current.validationMessage),S(!1),I(),g&&g()},D=async V=>{S(!0),(async()=>j(V))().then(()=>{var N;return(N=x.current)==null?void 0:N.scrollIntoView({behavior:"smooth",block:"center"})}),d&&d()},_=V=>{v&&v(V)},Q=O.useId(),$=e??Q;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(Dt,{description:r,disabled:f,htmlFor:$,required:i,children:n}),u.jsx("div",{className:kt("flex-start box flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",f?"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 ",C&&!m&&"border-core-primary-500 ring-1 ring-core-primary-500",m&&"border-core-red-500",m&&C&&"border-core-red-500 ring-1 ring-core-red-500"),children:u.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[c&&u.jsx(Ct,{icon:c}),u.jsx("input",{type:s,id:$,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:a,onChange:_,onBlur:P,ref:x,placeholder:l,onFocus:D,disabled:f,autoFocus:o}),E&&u.jsx(Ct,{icon:E})]})}),u.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${h||p?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:u.jsx("div",{className:"overflow-hidden",children:u.jsx(Dt.Helper,{error:m,helperText:h||p})})})]})};yo.displayName="Input";const vo=({id:e,name:t,label:n,required:r,description:i,defaultValue:s,placeholder:a,disabled:l,error:f=!1,helperText:m="",autoFocus:h,onChange:v})=>{const[c,E]=O.useState(m),o=O.useRef(null),[d,g]=O.useState(!1),{open:p,close:y}=pa();O.useEffect(()=>()=>{y()},[]);const x=()=>{o.current&&E(o.current.validationMessage),g(!1),y()},C=async _=>{g(!0),(async()=>p(_))().then(()=>{var $;return($=o.current)==null?void 0:$.scrollIntoView(!1)})},[S,j]=O.useState(s||""),I=_=>{j(_.target.value),v==null||v(_)},P=O.useId(),D=e??P;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(Dt,{description:i,disabled:l,htmlFor:D,required:r,children:n}),u.jsx("div",{className:kt("flex-start box relative flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",l?"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 ",d&&!f&&"border-core-primary-500 ring-1 ring-core-primary-500",f&&"border-core-red-500",f&&d&&"border-core-red-500 ring-1 ring-core-red-500"),children:u.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[u.jsx(Ct,{icon:"mail"}),u.jsx("input",{type:"email",id:D,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:S,onChange:I,onBlur:x,ref:o,placeholder:a,onFocus:C,disabled:l,autoFocus:h})]})}),u.jsx("div",{className:`transition-grid-rows grid overflow-hidden duration-300 ease-out ${m||c?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:u.jsx("div",{className:"overflow-hidden",children:u.jsx(Dt.Helper,{error:f,helperText:m||c})})})]})};vo.displayName="Input";const Ru=({id:e,name:t,label:n,required:r,description:i,placeholder:s,value:a,disabled:l,error:f=!1,helperText:m,onChange:h,type:v="date"})=>{const[c,E]=O.useState(!1),o=O.useId(),d=e??o;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(Dt,{description:i,disabled:l,htmlFor:d,required:r,children:n}),u.jsx("div",{className:kt("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 ",l?"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 ",c&&!f&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",f&&"border-core-red-500",f&&c&&"border-core-red-500 ring-1 ring-core-red-500"),children:u.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[u.jsx("input",{type:v,id:d,name:t,value:a,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:h,onFocus:()=>E(!0),onBlur:()=>E(!1),disabled:l}),u.jsx(Ct,{icon:"calendar"})]})}),u.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${m?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:u.jsx("div",{className:"overflow-hidden",children:u.jsx(Dt.Helper,{error:f,helperText:m})})})]})};Ru.displayName="Input";function Mt({children:e}){return u.jsx("div",{className:"h-screen w-screen md:p-6",children:u.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:e})})}function xr({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:i,children:s}){const[a,l]=O.useState(t),f=O.useRef(null);O.useEffect(()=>{l(t)},[t]),O.useEffect(()=>{const v=f.current;v&&(a?v.show():v.close())},[a]);const m=()=>{n&&n(),l(!1)},h=v=>{v.key==="Escape"&&m()};return u.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${a?"flex":"hidden"}`,children:u.jsx("dialog",{ref:f,onKeyDown:h,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:u.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e})})}),u.jsx(bt,{children:s}),u.jsx(Ot,{children:u.jsxs("div",{className:"flex flex-col gap-2",children:[r&&u.jsx(rt,{label:r.label??"",onClick:r.action,disabled:r.disabled}),i&&u.jsx(rt,{label:i.label??"",onClick:i.action,disabled:i.disabled,variant:"secondary"})]})})]})})})}function t1({option:{label:e},checked:t,onChange:n}){return u.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[u.jsx(mo,{defaultChecked:t,onChange:n}),u.jsx("p",{children:e})]})}function n1(e){const{t}=$e(),n=O.useRef(null),[r,i]=O.useState(!1);ku(n,i);const[s,a]=O.useState(""),[l,f]=O.useState(e.value.split(";")),{name:m,onChange:h}=e,v=(c,E)=>{let o=[];c?o=[...l,E]:o=l.filter(d=>d!==E),f(o),h&&h(m??"",o.join(";"))};return u.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[u.jsx(Dt,{disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),u.jsxs("div",{className:"relative",children:[u.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:[u.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${e.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:l.map(c=>{var o;const E=(o=e.options.find(d=>d.value===c))==null?void 0:o.label;return u.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[u.jsx("p",{className:"truncate",children:E}),u.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>v(!1,c),children:u.jsx(Ct,{icon:"close"})})]},c)})}),u.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),u.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&&u.jsx("div",{className:"px-4",children:u.jsx(yo,{placeholder:`${t("search")}...`,onChange:c=>a(c.target.value)})}),e.options.map(c=>{if(!(s&&!c.label.toLowerCase().includes(s.toLowerCase())))return u.jsx(t1,{option:c,checked:l.includes(c.value),onChange:E=>v(E,c.value)},`${c.value}_${l.includes(c.value)?"checked":"unchecked"}`)})]})]})]})}function r1({value:e,max:t,label:n}){return u.jsxs("div",{children:[u.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),u.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:u.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(e/t*100,100)}%`}})})]})}function wo({state:e}){const t=En(),{t:n}=$e(),r=Et(),[i,s]=O.useState(""),[a,l]=O.useState(!1),{session:f,mutate:m}=nt(),[h,v]=O.useState(!1),c=async o=>{if(t.onContactLink){const{data:{data:d}}=await ir.get(o);d&&t.onContactLink(d)}},E=O.useCallback(()=>{f&&(l(!0),ho.setContact(f.uuid,{contact_identifier_value:i}).then(o=>{c(o.data.data.contact.uuid).then(),m().then(()=>{qe.success(n("contactSavedToSession")),e&&e.redirectRoute&&r(e.redirectRoute,{state:e})})}).catch(()=>{r("link-identifier",{state:{...e,contactIdentifier:i}})}).finally(()=>l(!1)))},[e,i,m,f,n]);return O.useEffect(()=>{i&&!a&&!h&&E()},[i,a,h,E]),u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:n("scanOrEnterX",{x:"identifier"})})})}),u.jsx(bt,{children:u.jsx(Ao,{dataSetter:s,setDefer:v,label:n("contactIdentifier")})}),u.jsx(Ot,{children:u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx(rt,{label:n("continue"),onClick:E}),f.input_data.enable_email_identification&&u.jsx(rt,{label:n("useEmail"),variant:"secondary",onClick:()=>r("../email",{state:e})})]})})]})}var Bu={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.compactObject=Fu,$t.deprecated=f1;var i1=$t.detectBrowser=h1;$t.disableLog=l1,$t.disableWarnings=u1,$t.extractVersion=bo,$t.filterStats=p1,$t.log=d1,$t.walkStats=xo,$t.wrapPeerConnectionEvent=c1;function o1(e,t,n){return t=s1(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s1(e){var t=a1(e,"string");return $n(t)=="symbol"?t:t+""}function a1(e,t){if($n(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($n(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $n(e){"@babel/helpers - typeof";return $n=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},$n(e)}var Mu=!0,_u=!0;function bo(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function c1(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(a,l){if(a!==t)return i.apply(this,arguments);var f=function(h){var v=n(h);v&&(l.handleEvent?l.handleEvent(v):l(v))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(l,f),i.apply(this,[a,f])};var s=r.removeEventListener;r.removeEventListener=function(a,l){if(a!==t||!this._eventMap||!this._eventMap[t])return s.apply(this,arguments);if(!this._eventMap[t].has(l))return s.apply(this,arguments);var f=this._eventMap[t].get(l);return this._eventMap[t].delete(l),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,s.apply(this,[a,f])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(l){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),l&&this.addEventListener(t,this["_on"+t]=l)},enumerable:!0,configurable:!0})}}function l1(e){return typeof e!="boolean"?new Error("Argument type: "+$n(e)+". Please use a boolean."):(Mu=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function u1(e){return typeof e!="boolean"?new Error("Argument type: "+$n(e)+". Please use a boolean."):(_u=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function d1(){if((typeof window>"u"?"undefined":$n(window))==="object"){if(Mu)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function f1(e,t){_u&&console.warn(e+" is deprecated, please use "+t+" instead.")}function h1(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=bo(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=bo(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=bo(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 Lu(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fu(e){return Lu(e)?Object.keys(e).reduce(function(t,n){var r=Lu(e[n]),i=r?Fu(e[n]):e[n],s=r&&!Object.keys(i).length;return i===void 0||s?t:Object.assign(t,o1({},n,i))},{}):e}function xo(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?xo(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(i){xo(e,e.get(i),n)})}))}function p1(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(t===null)return i;var s=[];return e.forEach(function(a){a.type==="track"&&a.trackIdentifier===t.id&&s.push(a)}),s.forEach(function(a){e.forEach(function(l){l.type===r&&l.trackId===a.id&&xo(e,l,i)})}),i}Object.defineProperty(Bu,"__esModule",{value:!0});var g1=Bu.shimGetUserMedia=v1,m1=y1($t);function Vu(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Vu=function(i){return i?n:t})(e)}function y1(e,t){if(e&&e.__esModule)return e;if(e===null||Qn(e)!="object"&&typeof e!="function")return{default:e};var n=Vu(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 a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Qn(e){"@babel/helpers - typeof";return Qn=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},Qn(e)}var qu=m1.log;function v1(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(m){if(Qn(m)!=="object"||m.mandatory||m.optional)return m;var h={};return Object.keys(m).forEach(function(v){if(!(v==="require"||v==="advanced"||v==="mediaSource")){var c=Qn(m[v])==="object"?m[v]:{ideal:m[v]};c.exact!==void 0&&typeof c.exact=="number"&&(c.min=c.max=c.exact);var E=function(g,p){return g?g+p.charAt(0).toUpperCase()+p.slice(1):p==="deviceId"?"sourceId":p};if(c.ideal!==void 0){h.optional=h.optional||[];var o={};typeof c.ideal=="number"?(o[E("min",v)]=c.ideal,h.optional.push(o),o={},o[E("max",v)]=c.ideal,h.optional.push(o)):(o[E("",v)]=c.ideal,h.optional.push(o))}c.exact!==void 0&&typeof c.exact!="number"?(h.mandatory=h.mandatory||{},h.mandatory[E("",v)]=c.exact):["min","max"].forEach(function(d){c[d]!==void 0&&(h.mandatory=h.mandatory||{},h.mandatory[E(d,v)]=c[d])})}}),m.advanced&&(h.optional=(h.optional||[]).concat(m.advanced)),h},i=function(m,h){if(t.version>=61)return h(m);if(m=JSON.parse(JSON.stringify(m)),m&&Qn(m.audio)==="object"){var v=function(g,p,y){p in g&&!(y in g)&&(g[y]=g[p],delete g[p])};m=JSON.parse(JSON.stringify(m)),v(m.audio,"autoGainControl","googAutoGainControl"),v(m.audio,"noiseSuppression","googNoiseSuppression"),m.audio=r(m.audio)}if(m&&Qn(m.video)==="object"){var c=m.video.facingMode;c=c&&(Qn(c)==="object"?c:{ideal:c});var E=t.version<66;if(c&&(c.exact==="user"||c.exact==="environment"||c.ideal==="user"||c.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!E)){delete m.video.facingMode;var o;if(c.exact==="environment"||c.ideal==="environment"?o=["back","rear"]:(c.exact==="user"||c.ideal==="user")&&(o=["front"]),o)return n.mediaDevices.enumerateDevices().then(function(d){d=d.filter(function(p){return p.kind==="videoinput"});var g=d.find(function(p){return o.some(function(y){return p.label.toLowerCase().includes(y)})});return!g&&d.length&&o.includes("back")&&(g=d[d.length-1]),g&&(m.video.deviceId=c.exact?{exact:g.deviceId}:{ideal:g.deviceId}),m.video=r(m.video),qu("chrome: "+JSON.stringify(m)),h(m)})}m.video=r(m.video)}return qu("chrome: "+JSON.stringify(m)),h(m)},s=function(m){return t.version>=64?m:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[m.name]||m.name,message:m.message,constraint:m.constraint||m.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},a=function(m,h,v){i(m,function(c){n.webkitGetUserMedia(c,h,function(E){v&&v(s(E))})})};if(n.getUserMedia=a.bind(n),n.mediaDevices.getUserMedia){var l=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(f){return i(f,function(m){return l(m).then(function(h){if(m.audio&&!h.getAudioTracks().length||m.video&&!h.getVideoTracks().length)throw h.getTracks().forEach(function(v){v.stop()}),new DOMException("","NotFoundError");return h},function(h){return Promise.reject(s(h))})})}}}}var Uu={};Object.defineProperty(Uu,"__esModule",{value:!0});var w1=Uu.shimGetUserMedia=E1,b1=x1($t);function Gu(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Gu=function(i){return i?n:t})(e)}function x1(e,t){if(e&&e.__esModule)return e;if(e===null||Er(e)!="object"&&typeof e!="function")return{default:e};var n=Gu(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 a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Er(e){"@babel/helpers - typeof";return Er=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},Er(e)}function E1(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(f,m,h){b1.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(f).then(m,h)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var i=function(m,h,v){h in m&&!(v in m)&&(m[v]=m[h],delete m[h])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(f){return Er(f)==="object"&&Er(f.audio)==="object"&&(f=JSON.parse(JSON.stringify(f)),i(f.audio,"autoGainControl","mozAutoGainControl"),i(f.audio,"noiseSuppression","mozNoiseSuppression")),s(f)},r&&r.prototype.getSettings){var a=r.prototype.getSettings;r.prototype.getSettings=function(){var f=a.apply(this,arguments);return i(f,"mozAutoGainControl","autoGainControl"),i(f,"mozNoiseSuppression","noiseSuppression"),f}}if(r&&r.prototype.applyConstraints){var l=r.prototype.applyConstraints;r.prototype.applyConstraints=function(f){return this.kind==="audio"&&Er(f)==="object"&&(f=JSON.parse(JSON.stringify(f)),i(f,"autoGainControl","mozAutoGainControl"),i(f,"noiseSuppression","mozNoiseSuppression")),l.apply(this,[f])}}}}var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.shimAudioContext=k1,Cn.shimCallbacksAPI=j1,Cn.shimConstraints=$u,Cn.shimCreateOfferLegacy=P1;var C1=Cn.shimGetUserMedia=O1;Cn.shimLocalStreamsAPI=S1,Cn.shimRTCIceServerUrls=I1,Cn.shimRemoteStreamsAPI=T1,Cn.shimTrackEventTransceiver=N1;var Yu=A1($t);function Ku(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ku=function(i){return i?n:t})(e)}function A1(e,t){if(e&&e.__esModule)return e;if(e===null||Wn(e)!="object"&&typeof e!="function")return{default:e};var n=Ku(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 a=i?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function Wn(e){"@babel/helpers - typeof";return Wn=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},Wn(e)}function S1(e){if(!(Wn(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,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];return a&&a.forEach(function(f){i._localStreams?i._localStreams.includes(f)||i._localStreams.push(f):i._localStreams=[f]}),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 a=r.getTracks();this.getSenders().forEach(function(l){a.includes(l.track)&&i.removeTrack(l)})}})}}function T1(e){if(!(Wn(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(a){if(i._remoteStreams||(i._remoteStreams=[]),!i._remoteStreams.includes(a)){i._remoteStreams.push(a);var l=new Event("addstream");l.stream=a,i.dispatchEvent(l)}})})}});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 a=new Event("addstream");a.stream=s,r.dispatchEvent(a)}})}),t.apply(r,arguments)}}}function j1(e){if(!(Wn(e)!=="object"||!e.RTCPeerConnection)){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,s=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(m,h){var v=arguments.length>=2?arguments[2]:arguments[0],c=n.apply(this,[v]);return h?(c.then(m,h),Promise.resolve()):c},t.createAnswer=function(m,h){var v=arguments.length>=2?arguments[2]:arguments[0],c=r.apply(this,[v]);return h?(c.then(m,h),Promise.resolve()):c};var l=function(m,h,v){var c=i.apply(this,[m]);return v?(c.then(h,v),Promise.resolve()):c};t.setLocalDescription=l,l=function(m,h,v){var c=s.apply(this,[m]);return v?(c.then(h,v),Promise.resolve()):c},t.setRemoteDescription=l,l=function(m,h,v){var c=a.apply(this,[m]);return v?(c.then(h,v),Promise.resolve()):c},t.addIceCandidate=l}}function O1(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($u(i))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(s,a,l){t.mediaDevices.getUserMedia(s).then(a,l)}).bind(t))}function $u(e){return e&&e.video!==void 0?Object.assign({},e,{video:Yu.compactObject(e.video)}):e}function I1(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(r,i){if(r&&r.iceServers){for(var s=[],a=0;a<r.iceServers.length;a++){var l=r.iceServers[a];l.urls===void 0&&l.url?(Yu.deprecated("RTCIceServer.url","RTCIceServer.urls"),l=JSON.parse(JSON.stringify(l)),l.urls=l.url,delete l.url,s.push(l)):s.push(r.iceServers[a])}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 N1(e){Wn(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 P1(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(a){return a.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(a){return a.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 k1(e){Wn(e)!=="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var Qu=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Wu=(e,t,n)=>(Qu(e,t,"read from private field"),n?n.call(e):t.get(e)),D1=(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)},R1=(e,t,n,r)=>(Qu(e,t,"write to private field"),t.set(e,n),n);const Hu=["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 B1(e){return e.join("|")}function M1(e){const t=Ju(e);let n=0,r=Hu.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),s=Hu[i],a=Ju(s);if(a===t)return s;a<t?n=i+1:r=i-1}return"None"}function Ju(e){return e.toLowerCase().replace(/_-\[\]/g,"")}function _1(e,t){return e.Binarizer[t]}function L1(e,t){return e.CharacterSet[t]}const F1=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function V1(e){return F1[e.value]}function q1(e,t){return e.EanAddOnSymbol[t]}function U1(e,t){return e.TextMode[t]}const Cr={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 zu(e,t){return{...t,formats:B1(t.formats),binarizer:_1(e,t.binarizer),eanAddOnSymbol:q1(e,t.eanAddOnSymbol),textMode:U1(e,t.textMode),characterSet:L1(e,t.characterSet)}}function Zu(e){return{...e,format:M1(e.format),eccLevel:e.eccLevel,contentType:V1(e.contentType)}}const G1={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 Xu=new WeakMap;function ga(e,t){var n;const r=Xu.get(e);if(r!=null&&r.modulePromise&&t===void 0)return r.modulePromise;const i=(n=r==null?void 0:r.moduleOverrides)!=null?n:G1,s=e({...i});return Xu.set(e,{moduleOverrides:i,modulePromise:s}),s}async function Y1(e,t,n=Cr){const r={...Cr,...n},i=await ga(e),{size:s}=t,a=new Uint8Array(await t.arrayBuffer()),l=i._malloc(s);i.HEAPU8.set(a,l);const f=i.readBarcodesFromImage(l,s,zu(i,r));i._free(l);const m=[];for(let h=0;h<f.size();++h)m.push(Zu(f.get(h)));return m}async function K1(e,t,n=Cr){const r={...Cr,...n},i=await ga(e),{data:s,width:a,height:l,data:{byteLength:f}}=t,m=i._malloc(f);i.HEAPU8.set(s,m);const h=i.readBarcodesFromPixmap(m,a,l,zu(i,r));i._free(m);const v=[];for(let c=0;c<h.size();++c)v.push(Zu(h.get(c)));return v}({...Cr,formats:[...Cr.formats]});var ma=(()=>{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((b,w)=>{i=b,s=w});var a=Object.assign({},r),l="./this.program",f=typeof window=="object",m=typeof Bun<"u",h=typeof((n=globalThis.WebAssembly)==null?void 0:n.instantiate)=="function",v=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var c="";function E(b){return r.locateFile?r.locateFile(b,c):c+b}var o;(f||v||m)&&(v?c=self.location.href:typeof document<"u"&&document.currentScript&&(c=document.currentScript.src),e&&(c=e),c.startsWith("blob:")?c="":c=c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1),v&&(o=b=>{var w=new XMLHttpRequest;return w.open("GET",b,!1),w.responseType="arraybuffer",w.send(null),new Uint8Array(w.response)}));var d=r.print||console.log.bind(console),g=r.printErr||console.error.bind(console);Object.assign(r,a),a=null,r.arguments&&r.arguments,r.thisProgram&&(l=r.thisProgram),r.quit&&r.quit;var p;r.wasmBinary&&(p=r.wasmBinary);var y,x=!1,C,S,j,I,P,D,_,Q;function $(){var b=y.buffer;r.HEAP8=C=new Int8Array(b),r.HEAP16=j=new Int16Array(b),r.HEAPU8=S=new Uint8Array(b),r.HEAPU16=I=new Uint16Array(b),r.HEAP32=P=new Int32Array(b),r.HEAPU32=D=new Uint32Array(b),r.HEAPF32=_=new Float32Array(b),r.HEAPF64=Q=new Float64Array(b)}var V=[],K=[],N=[];function q(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)X(r.preRun.shift());J(V)}function W(){J(K)}function te(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)re(r.postRun.shift());J(N)}function X(b){V.unshift(b)}function ne(b){K.unshift(b)}function re(b){N.unshift(b)}var he=0,se=null;function ve(b){var w;he++,(w=r.monitorRunDependencies)===null||w===void 0||w.call(r,he)}function ue(b){var w;if(he--,(w=r.monitorRunDependencies)===null||w===void 0||w.call(r,he),he==0&&se){var T=se;se=null,T()}}function F(b){var w;(w=r.onAbort)===null||w===void 0||w.call(r,b),b="Aborted("+b+")",g(b),x=!0,b+=". Build with -sASSERTIONS for more info.";var T=new WebAssembly.RuntimeError(b);throw s(T),T}var U="data:application/octet-stream;base64,",H=b=>b.startsWith(U),A;A="zxing_reader.wasm",H(A)||(A=E(A));function R(b){if(b==A&&p)return new Uint8Array(p);if(o)return o(b);throw"both async and sync fetching of the wasm failed"}function M(b){return!p&&(f||v||m||h)&&typeof fetch=="function"?fetch(b,{credentials:"same-origin"}).then(w=>{if(!w.ok)throw`failed to load wasm binary file at '${b}'`;return w.arrayBuffer()}).catch(()=>R(b)):Promise.resolve().then(()=>R(b))}function B(b,w,T){return M(b).then(k=>WebAssembly.instantiate(k,w)).then(T,k=>{g(`failed to asynchronously prepare wasm: ${k}`),F(k)})}function z(b,w,T,k){return!b&&typeof WebAssembly.instantiateStreaming=="function"&&!H(w)&&typeof fetch=="function"?fetch(w,{credentials:"same-origin"}).then(Y=>{var ee=WebAssembly.instantiateStreaming(Y,T);return ee.then(k,function(ie){return g(`wasm streaming compile failed: ${ie}`),g("falling back to ArrayBuffer instantiation"),B(w,T,k)})}):B(w,T,k)}function Z(){var b={a:tx};function w(k,Y){return ht=k.exports,y=ht.ma,$(),Wf=ht.qa,ne(ht.na),ue(),ht}ve();function T(k){w(k.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(b,w)}catch(k){g(`Module.instantiateWasm callback failed with error: ${k}`),s(k)}return z(p,A,b,T).catch(s),{}}var J=b=>{for(;b.length>0;)b.shift()(r)};r.noExitRuntime;var G=[],pe=0,me=b=>{var w=new Ee(b);return w.get_caught()||(w.set_caught(!0),pe--),w.set_rethrown(!1),G.push(w),lh(w.excPtr),w.get_exception_ptr()},ce=0,de=()=>{lt(0,0);var b=G.pop();ch(b.excPtr),ce=0};class Ee{constructor(w){this.excPtr=w,this.ptr=w-24}set_type(w){D[this.ptr+4>>2]=w}get_type(){return D[this.ptr+4>>2]}set_destructor(w){D[this.ptr+8>>2]=w}get_destructor(){return D[this.ptr+8>>2]}set_caught(w){w=w?1:0,C[this.ptr+12]=w}get_caught(){return C[this.ptr+12]!=0}set_rethrown(w){w=w?1:0,C[this.ptr+13]=w}get_rethrown(){return C[this.ptr+13]!=0}init(w,T){this.set_adjusted_ptr(0),this.set_type(w),this.set_destructor(T)}set_adjusted_ptr(w){D[this.ptr+16>>2]=w}get_adjusted_ptr(){return D[this.ptr+16>>2]}get_exception_ptr(){var w=dh(this.get_type());if(w)return D[this.excPtr>>2];var T=this.get_adjusted_ptr();return T!==0?T:this.excPtr}}var fe=b=>{throw ce||(ce=b),ce},je=b=>{var w=ce;if(!w)return Bi(0),0;var T=new Ee(w);T.set_adjusted_ptr(w);var k=T.get_type();if(!k)return Bi(0),w;for(var Y in b){var ee=b[Y];if(ee===0||ee===k)break;var ie=T.ptr+16;if(uh(ee,k,ie))return Bi(ee),w}return Bi(k),w},Ne=()=>je([]),Qe=b=>je([b]),We=(b,w)=>je([b,w]),tt=()=>{var b=G.pop();b||F("no exception to throw");var w=b.excPtr;throw b.get_rethrown()||(G.push(b),b.set_rethrown(!0),b.set_caught(!1),pe++),ce=w,ce},ze=(b,w,T)=>{var k=new Ee(b);throw k.init(w,T),ce=b,pe++,ce},sn=()=>pe,Je={},It=b=>{for(;b.length;){var w=b.pop(),T=b.pop();T(w)}};function Ze(b){return this.fromWireType(D[b>>2])}var Ie={},Rt={},dt={},_t,Nt=b=>{throw new _t(b)},Lt=(b,w,T)=>{b.forEach(function(oe){dt[oe]=w});function k(oe){var ge=T(oe);ge.length!==b.length&&Nt("Mismatched type converter count");for(var be=0;be<b.length;++be)ke(b[be],ge[be])}var Y=new Array(w.length),ee=[],ie=0;w.forEach((oe,ge)=>{Rt.hasOwnProperty(oe)?Y[ge]=Rt[oe]:(ee.push(oe),Ie.hasOwnProperty(oe)||(Ie[oe]=[]),Ie[oe].push(()=>{Y[ge]=Rt[oe],++ie,ie===ee.length&&k(Y)}))}),ee.length===0&&k(Y)},Wt=b=>{var w=Je[b];delete Je[b];var T=w.rawConstructor,k=w.rawDestructor,Y=w.fields,ee=Y.map(ie=>ie.getterReturnType).concat(Y.map(ie=>ie.setterArgumentType));Lt([b],ee,ie=>{var oe={};return Y.forEach((ge,be)=>{var Se=ge.fieldName,Ve=ie[be],De=ge.getter,Ke=ge.getterContext,mt=ie[be+Y.length],Vt=ge.setter,ut=ge.setterContext;oe[Se]={read:Pt=>Ve.fromWireType(De(Ke,Pt)),write:(Pt,we)=>{var Te=[];Vt(ut,Pt,mt.toWireType(Te,we)),It(Te)}}}),[{name:w.name,fromWireType:ge=>{var be={};for(var Se in oe)be[Se]=oe[Se].read(ge);return k(ge),be},toWireType:(ge,be)=>{for(var Se in oe)if(!(Se in be))throw new TypeError(`Missing field: "${Se}"`);var Ve=T();for(Se in oe)oe[Se].write(Ve,be[Se]);return ge!==null&&ge.push(k,Ve),Ve},argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction:k}]})},en=(b,w,T,k,Y)=>{},Gt=()=>{for(var b=new Array(256),w=0;w<256;++w)b[w]=String.fromCharCode(w);Ft=b},Ft,st=b=>{for(var w="",T=b;S[T];)w+=Ft[S[T++]];return w},an,Ce=b=>{throw new an(b)};function Fe(b,w){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var k=w.name;if(b||Ce(`type "${k}" must have a positive integer typeid pointer`),Rt.hasOwnProperty(b)){if(T.ignoreDuplicateRegistrations)return;Ce(`Cannot register type '${k}' twice`)}if(Rt[b]=w,delete dt[b],Ie.hasOwnProperty(b)){var Y=Ie[b];delete Ie[b],Y.forEach(ee=>ee())}}function ke(b,w){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in w))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Fe(b,w,T)}var _e=8,at=(b,w,T,k)=>{w=st(w),ke(b,{name:w,fromWireType:function(Y){return!!Y},toWireType:function(Y,ee){return ee?T:k},argPackAdvance:_e,readValueFromPointer:function(Y){return this.fromWireType(S[Y])},destructorFunction:null})},Nr=b=>({count:b.count,deleteScheduled:b.deleteScheduled,preservePointerOnDelete:b.preservePointerOnDelete,ptr:b.ptr,ptrType:b.ptrType,smartPtr:b.smartPtr,smartPtrType:b.smartPtrType}),Xn=b=>{function w(T){return T.$$.ptrType.registeredClass.name}Ce(w(b)+" instance already deleted")},Pr=!1,ki=b=>{},tc=b=>{b.smartPtr?b.smartPtrType.rawDestructor(b.smartPtr):b.ptrType.registeredClass.rawDestructor(b.ptr)},Wo=b=>{b.count.value-=1;var w=b.count.value===0;w&&tc(b)},Ho=(b,w,T)=>{if(w===T)return b;if(T.baseClass===void 0)return null;var k=Ho(b,w,T.baseClass);return k===null?null:T.downcast(k)},Jo={},L=()=>Object.keys(Le).length,ye=()=>{var b=[];for(var w in Le)Le.hasOwnProperty(w)&&b.push(Le[w]);return b},Ae=[],Pe=()=>{for(;Ae.length;){var b=Ae.pop();b.$$.deleteScheduled=!1,b.delete()}},Ue,Xe=b=>{Ue=b,Ae.length&&Ue&&Ue(Pe)},Ge=()=>{r.getInheritedInstanceCount=L,r.getLiveInheritedInstances=ye,r.flushPendingDeletes=Pe,r.setDelayFunction=Xe},Le={},Bt=(b,w)=>{for(w===void 0&&Ce("ptr should not be undefined");b.baseClass;)w=b.upcast(w),b=b.baseClass;return w},ct=(b,w)=>(w=Bt(b,w),Le[w]),ot=(b,w)=>{(!w.ptrType||!w.ptr)&&Nt("makeClassHandle requires ptr and ptrType");var T=!!w.smartPtrType,k=!!w.smartPtr;return T!==k&&Nt("Both smartPtrType and smartPtr must be specified"),w.count={value:1},cn(Object.create(b,{$$:{value:w,writable:!0}}))};function Ht(b){var w=this.getPointee(b);if(!w)return this.destructor(b),null;var T=ct(this.registeredClass,w);if(T!==void 0){if(T.$$.count.value===0)return T.$$.ptr=w,T.$$.smartPtr=b,T.clone();var k=T.clone();return this.destructor(b),k}function Y(){return this.isSmartPointer?ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:w,smartPtrType:this,smartPtr:b}):ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:b})}var ee=this.registeredClass.getActualType(w),ie=Jo[ee];if(!ie)return Y.call(this);var oe;this.isConst?oe=ie.constPointerType:oe=ie.pointerType;var ge=Ho(w,this.registeredClass,oe.registeredClass);return ge===null?Y.call(this):this.isSmartPointer?ot(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:ge,smartPtrType:this,smartPtr:b}):ot(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:ge})}var cn=b=>typeof FinalizationRegistry>"u"?(cn=w=>w,b):(Pr=new FinalizationRegistry(w=>{Wo(w.$$)}),cn=w=>{var T=w.$$,k=!!T.smartPtr;if(k){var Y={$$:T};Pr.register(w,Y,w)}return w},ki=w=>Pr.unregister(w),cn(b)),kn=()=>{Object.assign(Tt.prototype,{isAliasOf(b){if(!(this instanceof Tt)||!(b instanceof Tt))return!1;var w=this.$$.ptrType.registeredClass,T=this.$$.ptr;b.$$=b.$$;for(var k=b.$$.ptrType.registeredClass,Y=b.$$.ptr;w.baseClass;)T=w.upcast(T),w=w.baseClass;for(;k.baseClass;)Y=k.upcast(Y),k=k.baseClass;return w===k&&T===Y},clone(){if(this.$$.ptr||Xn(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var b=cn(Object.create(Object.getPrototypeOf(this),{$$:{value:Nr(this.$$)}}));return b.$$.count.value+=1,b.$$.deleteScheduled=!1,b},delete(){this.$$.ptr||Xn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ce("Object already scheduled for deletion"),ki(this),Wo(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Xn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ce("Object already scheduled for deletion"),Ae.push(this),Ae.length===1&&Ue&&Ue(Pe),this.$$.deleteScheduled=!0,this}})};function Tt(){}var Dn=(b,w)=>Object.defineProperty(w,"name",{value:b}),zo=(b,w,T)=>{if(b[w].overloadTable===void 0){var k=b[w];b[w]=function(){for(var Y=arguments.length,ee=new Array(Y),ie=0;ie<Y;ie++)ee[ie]=arguments[ie];return b[w].overloadTable.hasOwnProperty(ee.length)||Ce(`Function '${T}' called with an invalid number of arguments (${ee.length}) - expects one of (${b[w].overloadTable})!`),b[w].overloadTable[ee.length].apply(this,ee)},b[w].overloadTable=[],b[w].overloadTable[k.argCount]=k}},Di=(b,w,T)=>{r.hasOwnProperty(b)?((T===void 0||r[b].overloadTable!==void 0&&r[b].overloadTable[T]!==void 0)&&Ce(`Cannot register public name '${b}' twice`),zo(r,b,b),r.hasOwnProperty(T)&&Ce(`Cannot register multiple overloads of a function with the same number of arguments (${T})!`),r[b].overloadTable[T]=w):(r[b]=w,T!==void 0&&(r[b].numArguments=T))},Bb=48,Mb=57,_b=b=>{if(b===void 0)return"_unknown";b=b.replace(/[^a-zA-Z0-9_]/g,"$");var w=b.charCodeAt(0);return w>=Bb&&w<=Mb?`_${b}`:b};function Lb(b,w,T,k,Y,ee,ie,oe){this.name=b,this.constructor=w,this.instancePrototype=T,this.rawDestructor=k,this.baseClass=Y,this.getActualType=ee,this.upcast=ie,this.downcast=oe,this.pureVirtualFunctions=[]}var nc=(b,w,T)=>{for(;w!==T;)w.upcast||Ce(`Expected null or instance of ${T.name}, got an instance of ${w.name}`),b=w.upcast(b),w=w.baseClass;return b};function Fb(b,w){if(w===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),0;w.$$||Ce(`Cannot pass "${cc(w)}" as a ${this.name}`),w.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`);var T=w.$$.ptrType.registeredClass,k=nc(w.$$.ptr,T,this.registeredClass);return k}function Vb(b,w){var T;if(w===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),this.isSmartPointer?(T=this.rawConstructor(),b!==null&&b.push(this.rawDestructor,T),T):0;(!w||!w.$$)&&Ce(`Cannot pass "${cc(w)}" as a ${this.name}`),w.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&w.$$.ptrType.isConst&&Ce(`Cannot convert argument of type ${w.$$.smartPtrType?w.$$.smartPtrType.name:w.$$.ptrType.name} to parameter type ${this.name}`);var k=w.$$.ptrType.registeredClass;if(T=nc(w.$$.ptr,k,this.registeredClass),this.isSmartPointer)switch(w.$$.smartPtr===void 0&&Ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:w.$$.smartPtrType===this?T=w.$$.smartPtr:Ce(`Cannot convert argument of type ${w.$$.smartPtrType?w.$$.smartPtrType.name:w.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:T=w.$$.smartPtr;break;case 2:if(w.$$.smartPtrType===this)T=w.$$.smartPtr;else{var Y=w.clone();T=this.rawShare(T,Bn.toHandle(()=>Y.delete())),b!==null&&b.push(this.rawDestructor,T)}break;default:Ce("Unsupporting sharing policy")}return T}function qb(b,w){if(w===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),0;w.$$||Ce(`Cannot pass "${cc(w)}" as a ${this.name}`),w.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`),w.$$.ptrType.isConst&&Ce(`Cannot convert argument of type ${w.$$.ptrType.name} to parameter type ${this.name}`);var T=w.$$.ptrType.registeredClass,k=nc(w.$$.ptr,T,this.registeredClass);return k}var Ub=()=>{Object.assign(Zo.prototype,{getPointee(b){return this.rawGetPointee&&(b=this.rawGetPointee(b)),b},destructor(b){var w;(w=this.rawDestructor)===null||w===void 0||w.call(this,b)},argPackAdvance:_e,readValueFromPointer:Ze,fromWireType:Ht})};function Zo(b,w,T,k,Y,ee,ie,oe,ge,be,Se){this.name=b,this.registeredClass=w,this.isReference=T,this.isConst=k,this.isSmartPointer=Y,this.pointeeType=ee,this.sharingPolicy=ie,this.rawGetPointee=oe,this.rawConstructor=ge,this.rawShare=be,this.rawDestructor=Se,!Y&&w.baseClass===void 0?k?(this.toWireType=Fb,this.destructorFunction=null):(this.toWireType=qb,this.destructorFunction=null):this.toWireType=Vb}var Qf=(b,w,T)=>{r.hasOwnProperty(b)||Nt("Replacing nonexistent public symbol"),r[b].overloadTable!==void 0&&T!==void 0?r[b].overloadTable[T]=w:(r[b]=w,r[b].argCount=T)},Gb=(b,w,T)=>{var k=r["dynCall_"+b];return k(w,...T)},Xo=[],Wf,ft=b=>{var w=Xo[b];return w||(b>=Xo.length&&(Xo.length=b+1),Xo[b]=w=Wf.get(b)),w},Yb=function(b,w){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(b.includes("j"))return Gb(b,w,T);var k=ft(w)(...T);return k},Kb=(b,w)=>function(){for(var T=arguments.length,k=new Array(T),Y=0;Y<T;Y++)k[Y]=arguments[Y];return Yb(b,w,k)},yn=(b,w)=>{b=st(b);function T(){return b.includes("j")?Kb(b,w):ft(w)}var k=T();return typeof k!="function"&&Ce(`unknown function pointer with signature ${b}: ${w}`),k},$b=(b,w)=>{var T=Dn(w,function(k){this.name=w,this.message=k;var Y=new Error(k).stack;Y!==void 0&&(this.stack=this.toString()+`
102
102
  `+Y.replace(/^Error(:[^\n]*)?\n/,""))});return T.prototype=Object.create(b.prototype),T.prototype.constructor=T,T.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},T},Hf,Jf=b=>{var w=ah(b),T=st(w);return Mn(w),T},es=(b,w)=>{var T=[],k={};function Y(ee){if(!k[ee]&&!Rt[ee]){if(dt[ee]){dt[ee].forEach(Y);return}T.push(ee),k[ee]=!0}}throw w.forEach(Y),new Hf(`${b}: `+T.map(Jf).join([", "]))},Qb=(b,w,T,k,Y,ee,ie,oe,ge,be,Se,Ve,De)=>{Se=st(Se),ee=yn(Y,ee),oe&&(oe=yn(ie,oe)),be&&(be=yn(ge,be)),De=yn(Ve,De);var Ke=_b(Se);Di(Ke,function(){es(`Cannot construct ${Se} due to unbound types`,[k])}),Lt([b,w,T],k?[k]:[],mt=>{mt=mt[0];var Vt,ut;k?(Vt=mt.registeredClass,ut=Vt.instancePrototype):ut=Tt.prototype;var Pt=Dn(Se,function(){if(Object.getPrototypeOf(this)!==we)throw new an("Use 'new' to construct "+Se);if(Te.constructor_body===void 0)throw new an(Se+" has no accessible constructor");for(var gh=arguments.length,is=new Array(gh),os=0;os<gh;os++)is[os]=arguments[os];var mh=Te.constructor_body[is.length];if(mh===void 0)throw new an(`Tried to invoke ctor of ${Se} with invalid number of parameters (${is.length}) - expected (${Object.keys(Te.constructor_body).toString()}) parameters instead!`);return mh.apply(this,is)}),we=Object.create(ut,{constructor:{value:Pt}});Pt.prototype=we;var Te=new Lb(Se,Pt,we,De,Vt,ee,oe,be);if(Te.baseClass){var yt,jt;(jt=(yt=Te.baseClass).__derivedClasses)!==null&&jt!==void 0||(yt.__derivedClasses=[]),Te.baseClass.__derivedClasses.push(Te)}var kr=new Zo(Se,Te,!0,!1,!1),rs=new Zo(Se+"*",Te,!1,!1,!1),ph=new Zo(Se+" const*",Te,!1,!0,!1);return Jo[b]={pointerType:rs,constPointerType:ph},Qf(Ke,Pt),[kr,rs,ph]})},rc=(b,w)=>{for(var T=[],k=0;k<b;k++)T.push(D[w+k*4>>2]);return T};function Wb(b){for(var w=1;w<b.length;++w)if(b[w]!==null&&b[w].destructorFunction===void 0)return!0;return!1}function ic(b,w,T,k,Y,ee){var ie=w.length;ie<2&&Ce("argTypes array size mismatch! Must at least get return value and 'this' types!");var oe=w[1]!==null&&T!==null,ge=Wb(w),be=w[0].name!=="void",Se=ie-2,Ve=new Array(Se),De=[],Ke=[],mt=function(){arguments.length!==Se&&Ce(`function ${b} called with ${arguments.length} arguments, expected ${Se}`),Ke.length=0;var Vt;De.length=oe?2:1,De[0]=Y,oe&&(Vt=w[1].toWireType(Ke,this),De[1]=Vt);for(var ut=0;ut<Se;++ut)Ve[ut]=w[ut+2].toWireType(Ke,ut<0||arguments.length<=ut?void 0:arguments[ut]),De.push(Ve[ut]);var Pt=k(...De);function we(Te){if(ge)It(Ke);else for(var yt=oe?1:2;yt<w.length;yt++){var jt=yt===1?Vt:Ve[yt-2];w[yt].destructorFunction!==null&&w[yt].destructorFunction(jt)}if(be)return w[0].fromWireType(Te)}return we(Pt)};return Dn(b,mt)}var Hb=(b,w,T,k,Y,ee)=>{var ie=rc(w,T);Y=yn(k,Y),Lt([],[b],oe=>{oe=oe[0];var ge=`constructor ${oe.name}`;if(oe.registeredClass.constructor_body===void 0&&(oe.registeredClass.constructor_body=[]),oe.registeredClass.constructor_body[w-1]!==void 0)throw new an(`Cannot register multiple constructors with identical number of parameters (${w-1}) for class '${oe.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return oe.registeredClass.constructor_body[w-1]=()=>{es(`Cannot construct ${oe.name} due to unbound types`,ie)},Lt([],ie,be=>(be.splice(1,0,null),oe.registeredClass.constructor_body[w-1]=ic(ge,be,null,Y,ee),[])),[]})},zf=b=>{b=b.trim();const w=b.indexOf("(");return w!==-1?b.substr(0,w):b},Jb=(b,w,T,k,Y,ee,ie,oe,ge)=>{var be=rc(T,k);w=st(w),w=zf(w),ee=yn(Y,ee),Lt([],[b],Se=>{Se=Se[0];var Ve=`${Se.name}.${w}`;w.startsWith("@@")&&(w=Symbol[w.substring(2)]),oe&&Se.registeredClass.pureVirtualFunctions.push(w);function De(){es(`Cannot call ${Ve} due to unbound types`,be)}var Ke=Se.registeredClass.instancePrototype,mt=Ke[w];return mt===void 0||mt.overloadTable===void 0&&mt.className!==Se.name&&mt.argCount===T-2?(De.argCount=T-2,De.className=Se.name,Ke[w]=De):(zo(Ke,w,Ve),Ke[w].overloadTable[T-2]=De),Lt([],be,Vt=>{var ut=ic(Ve,Vt,Se,ee,ie);return Ke[w].overloadTable===void 0?(ut.argCount=T-2,Ke[w]=ut):Ke[w].overloadTable[T-2]=ut,[]}),[]})},oc=[],Rn=[],sc=b=>{b>9&&--Rn[b+1]===0&&(Rn[b]=void 0,oc.push(b))},zb=()=>Rn.length/2-5-oc.length,Zb=()=>{Rn.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=zb},Bn={toValue:b=>(b||Ce("Cannot use deleted val. handle = "+b),Rn[b]),toHandle:b=>{switch(b){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const w=oc.pop()||Rn.length;return Rn[w]=b,Rn[w+1]=1,w}}}},Xb={name:"emscripten::val",fromWireType:b=>{var w=Bn.toValue(b);return sc(b),w},toWireType:(b,w)=>Bn.toHandle(w),argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction:null},Zf=b=>ke(b,Xb),e2=(b,w,T)=>{switch(w){case 1:return T?function(k){return this.fromWireType(C[k])}:function(k){return this.fromWireType(S[k])};case 2:return T?function(k){return this.fromWireType(j[k>>1])}:function(k){return this.fromWireType(I[k>>1])};case 4:return T?function(k){return this.fromWireType(P[k>>2])}:function(k){return this.fromWireType(D[k>>2])};default:throw new TypeError(`invalid integer width (${w}): ${b}`)}},t2=(b,w,T,k)=>{w=st(w);function Y(){}Y.values={},ke(b,{name:w,constructor:Y,fromWireType:function(ee){return this.constructor.values[ee]},toWireType:(ee,ie)=>ie.value,argPackAdvance:_e,readValueFromPointer:e2(w,T,k),destructorFunction:null}),Di(w,Y)},ac=(b,w)=>{var T=Rt[b];return T===void 0&&Ce(`${w} has unknown type ${Jf(b)}`),T},n2=(b,w,T)=>{var k=ac(b,"enum");w=st(w);var Y=k.constructor,ee=Object.create(k.constructor.prototype,{value:{value:T},constructor:{value:Dn(`${k.name}_${w}`,function(){})}});Y.values[T]=ee,Y[w]=ee},cc=b=>{if(b===null)return"null";var w=typeof b;return w==="object"||w==="array"||w==="function"?b.toString():""+b},r2=(b,w)=>{switch(w){case 4:return function(T){return this.fromWireType(_[T>>2])};case 8:return function(T){return this.fromWireType(Q[T>>3])};default:throw new TypeError(`invalid float width (${w}): ${b}`)}},i2=(b,w,T)=>{w=st(w),ke(b,{name:w,fromWireType:k=>k,toWireType:(k,Y)=>Y,argPackAdvance:_e,readValueFromPointer:r2(w,T),destructorFunction:null})},o2=(b,w,T,k,Y,ee,ie)=>{var oe=rc(w,T);b=st(b),b=zf(b),Y=yn(k,Y),Di(b,function(){es(`Cannot call ${b} due to unbound types`,oe)},w-1),Lt([],oe,ge=>{var be=[ge[0],null].concat(ge.slice(1));return Qf(b,ic(b,be,null,Y,ee),w-1),[]})},s2=(b,w,T)=>{switch(w){case 1:return T?k=>C[k]:k=>S[k];case 2:return T?k=>j[k>>1]:k=>I[k>>1];case 4:return T?k=>P[k>>2]:k=>D[k>>2];default:throw new TypeError(`invalid integer width (${w}): ${b}`)}},a2=(b,w,T,k,Y)=>{w=st(w);var ee=Se=>Se;if(k===0){var ie=32-8*T;ee=Se=>Se<<ie>>>ie}var oe=w.includes("unsigned"),ge=(Se,Ve)=>{},be;oe?be=function(Se,Ve){return ge(Ve,this.name),Ve>>>0}:be=function(Se,Ve){return ge(Ve,this.name),Ve},ke(b,{name:w,fromWireType:ee,toWireType:be,argPackAdvance:_e,readValueFromPointer:s2(w,T,k!==0),destructorFunction:null})},c2=(b,w,T)=>{var k=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Y=k[w];function ee(ie){var oe=D[ie>>2],ge=D[ie+4>>2];return new Y(C.buffer,ge,oe)}T=st(T),ke(b,{name:T,fromWireType:ee,argPackAdvance:_e,readValueFromPointer:ee},{ignoreDuplicateRegistrations:!0})},l2=(b,w)=>{Zf(b)},Xf=(b,w,T,k)=>{if(!(k>0))return 0;for(var Y=T,ee=T+k-1,ie=0;ie<b.length;++ie){var oe=b.charCodeAt(ie);if(oe>=55296&&oe<=57343){var ge=b.charCodeAt(++ie);oe=65536+((oe&1023)<<10)|ge&1023}if(oe<=127){if(T>=ee)break;w[T++]=oe}else if(oe<=2047){if(T+1>=ee)break;w[T++]=192|oe>>6,w[T++]=128|oe&63}else if(oe<=65535){if(T+2>=ee)break;w[T++]=224|oe>>12,w[T++]=128|oe>>6&63,w[T++]=128|oe&63}else{if(T+3>=ee)break;w[T++]=240|oe>>18,w[T++]=128|oe>>12&63,w[T++]=128|oe>>6&63,w[T++]=128|oe&63}}return w[T]=0,T-Y},u2=(b,w,T)=>Xf(b,S,w,T),eh=b=>{for(var w=0,T=0;T<b.length;++T){var k=b.charCodeAt(T);k<=127?w++:k<=2047?w+=2:k>=55296&&k<=57343?(w+=4,++T):w+=3}return w},th=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,nh=(b,w,T)=>{for(var k=w+T,Y=w;b[Y]&&!(Y>=k);)++Y;if(Y-w>16&&b.buffer&&th)return th.decode(b.subarray(w,Y));for(var ee="";w<Y;){var ie=b[w++];if(!(ie&128)){ee+=String.fromCharCode(ie);continue}var oe=b[w++]&63;if((ie&224)==192){ee+=String.fromCharCode((ie&31)<<6|oe);continue}var ge=b[w++]&63;if((ie&240)==224?ie=(ie&15)<<12|oe<<6|ge:ie=(ie&7)<<18|oe<<12|ge<<6|b[w++]&63,ie<65536)ee+=String.fromCharCode(ie);else{var be=ie-65536;ee+=String.fromCharCode(55296|be>>10,56320|be&1023)}}return ee},lc=(b,w)=>b?nh(S,b,w):"",d2=(b,w)=>{w=st(w);var T=w==="std::string";ke(b,{name:w,fromWireType(k){var Y=D[k>>2],ee=k+4,ie;if(T)for(var oe=ee,ge=0;ge<=Y;++ge){var be=ee+ge;if(ge==Y||S[be]==0){var Se=be-oe,Ve=lc(oe,Se);ie===void 0?ie=Ve:(ie+="\0",ie+=Ve),oe=be+1}}else{for(var De=new Array(Y),ge=0;ge<Y;++ge)De[ge]=String.fromCharCode(S[ee+ge]);ie=De.join("")}return Mn(k),ie},toWireType(k,Y){Y instanceof ArrayBuffer&&(Y=new Uint8Array(Y));var ee,ie=typeof Y=="string";ie||Y instanceof Uint8Array||Y instanceof Uint8ClampedArray||Y instanceof Int8Array||Ce("Cannot pass non-string to std::string"),T&&ie?ee=eh(Y):ee=Y.length;var oe=fc(4+ee+1),ge=oe+4;if(D[oe>>2]=ee,T&&ie)u2(Y,ge,ee+1);else if(ie)for(var be=0;be<ee;++be){var Se=Y.charCodeAt(be);Se>255&&(Mn(ge),Ce("String has UTF-16 code units that do not fit in 8 bits")),S[ge+be]=Se}else for(var be=0;be<ee;++be)S[ge+be]=Y[be];return k!==null&&k.push(Mn,oe),oe},argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction(k){Mn(k)}})},rh=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,f2=(b,w)=>{for(var T=b,k=T>>1,Y=k+w/2;!(k>=Y)&&I[k];)++k;if(T=k<<1,T-b>32&&rh)return rh.decode(S.subarray(b,T));for(var ee="",ie=0;!(ie>=w/2);++ie){var oe=j[b+ie*2>>1];if(oe==0)break;ee+=String.fromCharCode(oe)}return ee},h2=(b,w,T)=>{var k;if((k=T)!==null&&k!==void 0||(T=2147483647),T<2)return 0;T-=2;for(var Y=w,ee=T<b.length*2?T/2:b.length,ie=0;ie<ee;++ie){var oe=b.charCodeAt(ie);j[w>>1]=oe,w+=2}return j[w>>1]=0,w-Y},p2=b=>b.length*2,g2=(b,w)=>{for(var T=0,k="";!(T>=w/4);){var Y=P[b+T*4>>2];if(Y==0)break;if(++T,Y>=65536){var ee=Y-65536;k+=String.fromCharCode(55296|ee>>10,56320|ee&1023)}else k+=String.fromCharCode(Y)}return k},m2=(b,w,T)=>{var k;if((k=T)!==null&&k!==void 0||(T=2147483647),T<4)return 0;for(var Y=w,ee=Y+T-4,ie=0;ie<b.length;++ie){var oe=b.charCodeAt(ie);if(oe>=55296&&oe<=57343){var ge=b.charCodeAt(++ie);oe=65536+((oe&1023)<<10)|ge&1023}if(P[w>>2]=oe,w+=4,w+4>ee)break}return P[w>>2]=0,w-Y},y2=b=>{for(var w=0,T=0;T<b.length;++T){var k=b.charCodeAt(T);k>=55296&&k<=57343&&++T,w+=4}return w},v2=(b,w,T)=>{T=st(T);var k,Y,ee,ie;w===2?(k=f2,Y=h2,ie=p2,ee=oe=>I[oe>>1]):w===4&&(k=g2,Y=m2,ie=y2,ee=oe=>D[oe>>2]),ke(b,{name:T,fromWireType:oe=>{for(var ge=D[oe>>2],be,Se=oe+4,Ve=0;Ve<=ge;++Ve){var De=oe+4+Ve*w;if(Ve==ge||ee(De)==0){var Ke=De-Se,mt=k(Se,Ke);be===void 0?be=mt:(be+="\0",be+=mt),Se=De+w}}return Mn(oe),be},toWireType:(oe,ge)=>{typeof ge!="string"&&Ce(`Cannot pass non-string to C++ string type ${T}`);var be=ie(ge),Se=fc(4+be+w);return D[Se>>2]=be/w,Y(ge,Se+4,be+w),oe!==null&&oe.push(Mn,Se),Se},argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction(oe){Mn(oe)}})},w2=(b,w,T,k,Y,ee)=>{Je[b]={name:st(w),rawConstructor:yn(T,k),rawDestructor:yn(Y,ee),fields:[]}},b2=(b,w,T,k,Y,ee,ie,oe,ge,be)=>{Je[b].fields.push({fieldName:st(w),getterReturnType:T,getter:yn(k,Y),getterContext:ee,setterArgumentType:ie,setter:yn(oe,ge),setterContext:be})},x2=(b,w)=>{w=st(w),ke(b,{isVoid:!0,name:w,argPackAdvance:0,fromWireType:()=>{},toWireType:(T,k)=>{}})},uc=[],E2=(b,w,T,k)=>(b=uc[b],w=Bn.toValue(w),b(null,w,T,k)),C2={},A2=b=>{var w=C2[b];return w===void 0?st(b):w},ih=()=>{if(typeof globalThis=="object")return globalThis;function b(w){w.$$$embind_global$$$=w;var T=typeof $$$embind_global$$$=="object"&&w.$$$embind_global$$$==w;return T||delete w.$$$embind_global$$$,T}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&b(global)?$$$embind_global$$$=global:typeof self=="object"&&b(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},S2=b=>b===0?Bn.toHandle(ih()):(b=A2(b),Bn.toHandle(ih()[b])),T2=b=>{var w=uc.length;return uc.push(b),w},j2=(b,w)=>{for(var T=new Array(b),k=0;k<b;++k)T[k]=ac(D[w+k*4>>2],"parameter "+k);return T},O2=Reflect.construct,I2=(b,w,T)=>{var k=[],Y=b.toWireType(k,T);return k.length&&(D[w>>2]=Bn.toHandle(k)),Y},N2=(b,w,T)=>{var k=j2(b,w),Y=k.shift();b--;var ee=new Array(b),ie=(ge,be,Se,Ve)=>{for(var De=0,Ke=0;Ke<b;++Ke)ee[Ke]=k[Ke].readValueFromPointer(Ve+De),De+=k[Ke].argPackAdvance;var mt=T===1?O2(be,ee):be.apply(ge,ee);return I2(Y,Se,mt)},oe=`methodCaller<(${k.map(ge=>ge.name).join(", ")}) => ${Y.name}>`;return T2(Dn(oe,ie))},P2=b=>{b>9&&(Rn[b+1]+=1)},k2=b=>{var w=Bn.toValue(b);It(w),sc(b)},D2=(b,w)=>{b=ac(b,"_emval_take_value");var T=b.readValueFromPointer(w);return Bn.toHandle(T)},R2=()=>{F("")},B2=(b,w,T)=>S.copyWithin(b,w,w+T),M2=()=>2147483648,_2=b=>{var w=y.buffer,T=(b-w.byteLength+65535)/65536;try{return y.grow(T),$(),1}catch{}},L2=b=>{var w=S.length;b>>>=0;var T=M2();if(b>T)return!1;for(var k=(ge,be)=>ge+(be-ge%be)%be,Y=1;Y<=4;Y*=2){var ee=w*(1+.2/Y);ee=Math.min(ee,b+100663296);var ie=Math.min(T,k(Math.max(b,ee),65536)),oe=_2(ie);if(oe)return!0}return!1},dc={},F2=()=>l||"./this.program",Ri=()=>{if(!Ri.strings){var b=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",w={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:b,_:F2()};for(var T in dc)dc[T]===void 0?delete w[T]:w[T]=dc[T];var k=[];for(var T in w)k.push(`${T}=${w[T]}`);Ri.strings=k}return Ri.strings},V2=(b,w)=>{for(var T=0;T<b.length;++T)C[w++]=b.charCodeAt(T);C[w]=0},q2=(b,w)=>{var T=0;return Ri().forEach((k,Y)=>{var ee=w+T;D[b+Y*4>>2]=ee,V2(k,ee),T+=k.length+1}),0},U2=(b,w)=>{var T=Ri();D[b>>2]=T.length;var k=0;return T.forEach(Y=>k+=Y.length+1),D[w>>2]=k,0},G2=b=>52;function Y2(b,w,T,k,Y){return 70}var K2=[null,[],[]],$2=(b,w)=>{var T=K2[b];w===0||w===10?((b===1?d:g)(nh(T,0)),T.length=0):T.push(w)},Q2=(b,w,T,k)=>{for(var Y=0,ee=0;ee<T;ee++){var ie=D[w>>2],oe=D[w+4>>2];w+=8;for(var ge=0;ge<oe;ge++)$2(b,S[ie+ge]);Y+=oe}return D[k>>2]=Y,0},W2=b=>b,ts=b=>b%4===0&&(b%100!==0||b%400===0),H2=(b,w)=>{for(var T=0,k=0;k<=w;T+=b[k++]);return T},oh=[31,29,31,30,31,30,31,31,30,31,30,31],sh=[31,28,31,30,31,30,31,31,30,31,30,31],J2=(b,w)=>{for(var T=new Date(b.getTime());w>0;){var k=ts(T.getFullYear()),Y=T.getMonth(),ee=(k?oh:sh)[Y];if(w>ee-T.getDate())w-=ee-T.getDate()+1,T.setDate(1),Y<11?T.setMonth(Y+1):(T.setMonth(0),T.setFullYear(T.getFullYear()+1));else return T.setDate(T.getDate()+w),T}return T};function z2(b,w,T){var k=eh(b)+1,Y=new Array(k);return Xf(b,Y,0,Y.length),Y}var Z2=(b,w)=>{C.set(b,w)},X2=(b,w,T,k)=>{var Y=D[k+40>>2],ee={tm_sec:P[k>>2],tm_min:P[k+4>>2],tm_hour:P[k+8>>2],tm_mday:P[k+12>>2],tm_mon:P[k+16>>2],tm_year:P[k+20>>2],tm_wday:P[k+24>>2],tm_yday:P[k+28>>2],tm_isdst:P[k+32>>2],tm_gmtoff:P[k+36>>2],tm_zone:Y?lc(Y):""},ie=lc(T),oe={"%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 ge in oe)ie=ie.replace(new RegExp(ge,"g"),oe[ge]);var be=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Se=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ve(we,Te,yt){for(var jt=typeof we=="number"?we.toString():we||"";jt.length<Te;)jt=yt[0]+jt;return jt}function De(we,Te){return Ve(we,Te,"0")}function Ke(we,Te){function yt(kr){return kr<0?-1:kr>0?1:0}var jt;return(jt=yt(we.getFullYear()-Te.getFullYear()))===0&&(jt=yt(we.getMonth()-Te.getMonth()))===0&&(jt=yt(we.getDate()-Te.getDate())),jt}function mt(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 Vt(we){var Te=J2(new Date(we.tm_year+1900,0,1),we.tm_yday),yt=new Date(Te.getFullYear(),0,4),jt=new Date(Te.getFullYear()+1,0,4),kr=mt(yt),rs=mt(jt);return Ke(kr,Te)<=0?Ke(rs,Te)<=0?Te.getFullYear()+1:Te.getFullYear():Te.getFullYear()-1}var ut={"%a":we=>be[we.tm_wday].substring(0,3),"%A":we=>be[we.tm_wday],"%b":we=>Se[we.tm_mon].substring(0,3),"%B":we=>Se[we.tm_mon],"%C":we=>{var Te=we.tm_year+1900;return De(Te/100|0,2)},"%d":we=>De(we.tm_mday,2),"%e":we=>Ve(we.tm_mday,2," "),"%g":we=>Vt(we).toString().substring(2),"%G":Vt,"%H":we=>De(we.tm_hour,2),"%I":we=>{var Te=we.tm_hour;return Te==0?Te=12:Te>12&&(Te-=12),De(Te,2)},"%j":we=>De(we.tm_mday+H2(ts(we.tm_year+1900)?oh:sh,we.tm_mon-1),3),"%m":we=>De(we.tm_mon+1,2),"%M":we=>De(we.tm_min,2),"%n":()=>`
103
- `,"%p":we=>we.tm_hour>=0&&we.tm_hour<12?"AM":"PM","%S":we=>De(we.tm_sec,2),"%t":()=>" ","%u":we=>we.tm_wday||7,"%U":we=>{var Te=we.tm_yday+7-we.tm_wday;return De(Math.floor(Te/7),2)},"%V":we=>{var Te=Math.floor((we.tm_yday+7-(we.tm_wday+6)%7)/7);if((we.tm_wday+371-we.tm_yday-2)%7<=2&&Te++,Te){if(Te==53){var yt=(we.tm_wday+371-we.tm_yday)%7;yt!=4&&(yt!=3||!ts(we.tm_year))&&(Te=1)}}else{Te=52;var jt=(we.tm_wday+7-we.tm_yday-1)%7;(jt==4||jt==5&&ts(we.tm_year%400-1))&&Te++}return De(Te,2)},"%w":we=>we.tm_wday,"%W":we=>{var Te=we.tm_yday+7-(we.tm_wday+6)%7;return De(Math.floor(Te/7),2)},"%y":we=>(we.tm_year+1900).toString().substring(2),"%Y":we=>we.tm_year+1900,"%z":we=>{var Te=we.tm_gmtoff,yt=Te>=0;return Te=Math.abs(Te)/60,Te=Te/60*100+Te%60,(yt?"+":"-")+("0000"+Te).slice(-4)},"%Z":we=>we.tm_zone,"%%":()=>"%"};ie=ie.replace(/%%/g,"\0\0");for(var ge in ut)ie.includes(ge)&&(ie=ie.replace(new RegExp(ge,"g"),ut[ge](ee)));ie=ie.replace(/\0\0/g,"%");var Pt=z2(ie);return Pt.length>w?0:(Z2(Pt,b),Pt.length-1)},ex=(b,w,T,k,Y)=>X2(b,w,T,k);_t=r.InternalError=class extends Error{constructor(b){super(b),this.name="InternalError"}},Gt(),an=r.BindingError=class extends Error{constructor(b){super(b),this.name="BindingError"}},kn(),Ge(),Ub(),Hf=r.UnboundTypeError=$b(Error,"UnboundTypeError"),Zb();var tx={s:me,u:de,b:Ne,g:Qe,q:We,K:tt,f:ze,Y:sn,e:fe,ha:Wt,U:en,ba:at,fa:Qb,ea:Hb,w:Jb,aa:Zf,x:t2,h:n2,O:i2,P:o2,t:a2,o:c2,ga:l2,N:d2,C:v2,A:w2,ia:b2,ca:x2,E:E2,ka:sc,la:S2,M:N2,Q:P2,R:k2,da:D2,B:R2,$:B2,Z:L2,W:q2,X:U2,_:G2,T:Y2,L:Q2,F:yx,D:sx,G:mx,m:vx,a:nx,d:cx,p:ox,k:gx,I:hx,v:dx,H:px,z:bx,S:Ex,l:lx,j:ax,c:ix,n:rx,J:fx,r:wx,i:ux,y:xx,ja:W2,V:ex},ht=Z(),Mn=r._free=b=>(Mn=r._free=ht.oa)(b),fc=r._malloc=b=>(fc=r._malloc=ht.pa)(b),ah=b=>(ah=ht.ra)(b),lt=(b,w)=>(lt=ht.sa)(b,w),Bi=b=>(Bi=ht.ta)(b),pt=()=>(pt=ht.ua)(),gt=b=>(gt=ht.va)(b),ch=b=>(ch=ht.wa)(b),lh=b=>(lh=ht.xa)(b),uh=(b,w,T)=>(uh=ht.ya)(b,w,T),dh=b=>(dh=ht.za)(b);r.dynCall_viijii=(b,w,T,k,Y,ee,ie)=>(r.dynCall_viijii=ht.Aa)(b,w,T,k,Y,ee,ie),r.dynCall_jiji=(b,w,T,k,Y)=>(r.dynCall_jiji=ht.Ba)(b,w,T,k,Y);var fh=r.dynCall_jiiii=(b,w,T,k,Y)=>(fh=r.dynCall_jiiii=ht.Ca)(b,w,T,k,Y);r.dynCall_iiiiij=(b,w,T,k,Y,ee,ie)=>(r.dynCall_iiiiij=ht.Da)(b,w,T,k,Y,ee,ie),r.dynCall_iiiiijj=(b,w,T,k,Y,ee,ie,oe,ge)=>(r.dynCall_iiiiijj=ht.Ea)(b,w,T,k,Y,ee,ie,oe,ge),r.dynCall_iiiiiijj=(b,w,T,k,Y,ee,ie,oe,ge,be)=>(r.dynCall_iiiiiijj=ht.Fa)(b,w,T,k,Y,ee,ie,oe,ge,be);function nx(b,w){var T=pt();try{return ft(b)(w)}catch(k){if(gt(T),k!==k+0)throw k;lt(1,0)}}function rx(b,w,T,k){var Y=pt();try{ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function ix(b,w,T){var k=pt();try{ft(b)(w,T)}catch(Y){if(gt(k),Y!==Y+0)throw Y;lt(1,0)}}function ox(b,w,T,k){var Y=pt();try{return ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function sx(b,w,T,k,Y){var ee=pt();try{return ft(b)(w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function ax(b,w){var T=pt();try{ft(b)(w)}catch(k){if(gt(T),k!==k+0)throw k;lt(1,0)}}function cx(b,w,T){var k=pt();try{return ft(b)(w,T)}catch(Y){if(gt(k),Y!==Y+0)throw Y;lt(1,0)}}function lx(b){var w=pt();try{ft(b)()}catch(T){if(gt(w),T!==T+0)throw T;lt(1,0)}}function ux(b,w,T,k,Y,ee,ie,oe,ge,be,Se){var Ve=pt();try{ft(b)(w,T,k,Y,ee,ie,oe,ge,be,Se)}catch(De){if(gt(Ve),De!==De+0)throw De;lt(1,0)}}function dx(b,w,T,k,Y,ee,ie){var oe=pt();try{return ft(b)(w,T,k,Y,ee,ie)}catch(ge){if(gt(oe),ge!==ge+0)throw ge;lt(1,0)}}function fx(b,w,T,k,Y){var ee=pt();try{ft(b)(w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function hx(b,w,T,k,Y,ee){var ie=pt();try{return ft(b)(w,T,k,Y,ee)}catch(oe){if(gt(ie),oe!==oe+0)throw oe;lt(1,0)}}function px(b,w,T,k,Y,ee,ie,oe){var ge=pt();try{return ft(b)(w,T,k,Y,ee,ie,oe)}catch(be){if(gt(ge),be!==be+0)throw be;lt(1,0)}}function gx(b,w,T,k,Y){var ee=pt();try{return ft(b)(w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function mx(b,w,T,k){var Y=pt();try{return ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function yx(b,w,T,k){var Y=pt();try{return ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function vx(b){var w=pt();try{return ft(b)()}catch(T){if(gt(w),T!==T+0)throw T;lt(1,0)}}function wx(b,w,T,k,Y,ee,ie,oe){var ge=pt();try{ft(b)(w,T,k,Y,ee,ie,oe)}catch(be){if(gt(ge),be!==be+0)throw be;lt(1,0)}}function bx(b,w,T,k,Y,ee,ie,oe,ge,be,Se,Ve){var De=pt();try{return ft(b)(w,T,k,Y,ee,ie,oe,ge,be,Se,Ve)}catch(Ke){if(gt(De),Ke!==Ke+0)throw Ke;lt(1,0)}}function xx(b,w,T,k,Y,ee,ie,oe,ge,be,Se,Ve,De,Ke,mt,Vt){var ut=pt();try{ft(b)(w,T,k,Y,ee,ie,oe,ge,be,Se,Ve,De,Ke,mt,Vt)}catch(Pt){if(gt(ut),Pt!==Pt+0)throw Pt;lt(1,0)}}function Ex(b,w,T,k,Y){var ee=pt();try{return fh(b,w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}var ns;se=function b(){ns||hh(),ns||(se=b)};function hh(){if(he>0||(q(),he>0))return;function b(){ns||(ns=!0,r.calledRun=!0,!x&&(W(),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),te()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),b()},1)):b()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return hh(),t.ready}})();function $1(e){return ga(ma,e)}async function Q1(e,t){return Y1(ma,e,t)}async function W1(e,t){return K1(ma,e,t)}const ed=[["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"]],H1=[...ed,["unknown"]].map(e=>e[0]),Eo=new Map(ed);function J1(e){for(const[t,n]of Eo)if(e===n)return t;return"unknown"}function z1(e){if(td(e))return{width:e.naturalWidth,height:e.naturalHeight};if(nd(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(rd(e))return{width:e.videoWidth,height:e.videoHeight};if(od(e))return{width:e.width,height:e.height};if(ad(e))return{width:e.displayWidth,height:e.displayHeight};if(id(e))return{width:e.width,height:e.height};if(sd(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 td(e){try{return e instanceof HTMLImageElement}catch{return!1}}function nd(e){try{return e instanceof SVGImageElement}catch{return!1}}function rd(e){try{return e instanceof HTMLVideoElement}catch{return!1}}function id(e){try{return e instanceof HTMLCanvasElement}catch{return!1}}function od(e){try{return e instanceof ImageBitmap}catch{return!1}}function sd(e){try{return e instanceof OffscreenCanvas}catch{return!1}}function ad(e){try{return e instanceof VideoFrame}catch{return!1}}function cd(e){try{return e instanceof Blob}catch{return!1}}function Z1(e){try{return e instanceof ImageData}catch{return!1}}function X1(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 ld(e){if(td(e)&&!await ry(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(nd(e)&&!await iy(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ad(e)&&oy(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(rd(e)&&(e.readyState===0||e.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(od(e)&&ay(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=z1(e);if(t===0||n===0)return null;const r=X1(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 ey(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 ld(t)}function ty(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 ny(e){if(cd(e))return await ey(e);if(Z1(e)){if(sy(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return id(e)||sd(e)?ty(e):await ld(e)}async function ry(e){try{return await e.decode(),!0}catch{return!1}}async function iy(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function oy(e){return e.format===null}function sy(e){return e.data.buffer.byteLength===0}function ay(e){return e.width===0&&e.height===0}function ud(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 ri;class ya extends EventTarget{constructor(t={}){var n;super(),D1(this,ri,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(!Eo.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.`);R1(this,ri,r??[]),$1().then(i=>{this.dispatchEvent(new CustomEvent("load",{detail:i}))}).catch(i=>{this.dispatchEvent(new CustomEvent("error",{detail:i}))})}catch(r){throw ud(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return H1.filter(t=>t!=="unknown")}async detect(t){try{const n=await ny(t);if(n===null)return[];let r;try{cd(n)?r=await Q1(n,{tryHarder:!0,formats:Wu(this,ri).map(i=>Eo.get(i))}):r=await W1(n,{tryHarder:!0,formats:Wu(this,ri).map(i=>Eo.get(i))})}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:s,y:a},topRight:{x:l,y:f},bottomLeft:{x:m,y:h},bottomRight:{x:v,y:c}}=i.position,E=Math.min(s,l,m,v),o=Math.min(a,f,h,c),d=Math.max(s,l,m,v),g=Math.max(a,f,h,c);return{boundingBox:new DOMRectReadOnly(E,o,d-E,g-o),rawValue:i.text,format:J1(i.format),cornerPoints:[{x:s,y:a},{x:l,y:f},{x:v,y:c},{x:m,y:h}]}})}catch(n){throw ud(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ri=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=ya);function cy(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 O.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"},O.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 ly(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 O.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"},O.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"}),O.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 uy(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,s]=O.useState(!1);function a(){s(!0),t?r():n(),setTimeout(()=>s(!1),1e3)}return O.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?O.createElement(cy,{disabled:i,onClick:a}):O.createElement(ly,{disabled:i,onClick:a}))}function dy(e){const{onClick:t,className:n,style:r}=e;return O.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},O.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 fy(e){const{onClick:t,className:n,style:r}=e;return O.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},O.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 hy(e){const{status:t,scanning:n,torchToggle:r}=e;function i(s){r(s)}return n&&r?O.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?O.createElement(fy,{onClick:()=>i(!1)}):O.createElement(dy,{onClick:()=>i(!0)})):null}function py(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 O.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"},O.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 gy(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 O.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"},O.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 my(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const s=(n.max-n.min)/3;return O.createElement(O.Fragment,null,O.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},O.createElement(gy,{disabled:i<=n.min,onClick:function(){r(Math.max(i-s,n.min))}})),O.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},O.createElement(py,{disabled:i>=n.max,onClick:function(){r(Math.min(i+s,n.max))}})))}function yy(e){const{scanning:t,loading:n,capabilities:r,border:i=35,onOff:s,torch:a,zoom:l,startScanning:f,stopScanning:m}=e,h="rgba(255, 0, 0, 0.5)";return O.createElement("div",{style:{position:"relative"}},O.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&&O.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",O.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),O.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:h,strokeWidth:3}),O.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:h,strokeWidth:3}),O.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:h,strokeWidth:3}),O.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:h,strokeWidth:3})),s&&O.createElement(uy,{scanning:t,startScanning:f,stopScanning:m}),a&&r.torch&&O.createElement(hy,{scanning:t,status:a.status,torchToggle:a.toggle}),l&&r.zoom&&O.createElement(my,{scanning:t,capabilities:r.zoom,value:l.value,onZoom:l.onChange}))}const vy={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},wy={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},by={width:"100%",height:"100%",position:"relative"},xy={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var Ey=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=i1(window);switch(e.browser){case"chrome":g1(window,e);break;case"firefox":w1(window,e);break;case"safari":C1(window,e);break;default:throw new Error("Unsupported browser")}});const Cy="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//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWA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KFYz1KjaGAhyoQCFGM//zFARgIUZ/oZpdCttay6M5drW1joSj6Ekk1b7J7R7aoQNlPrWBKLTTzOsGT5yYxLrtHTy2iUxEkES0HIBVD066VjGj31odPkkSjJtbWs6OIjKmlXHR9K5MTv5pdZolE10kk2lly74TFx5KTXeTGLrS6ExiucvJSSDUdXZm3NLn1rtYBCUEoRj77WOhCPc+g5//PkZJ8XPgzoAABMTrz8BfQyY9ONGxJULutaa1TE5LHxWEo+XecmMa3p0kqBCR6qOFaFUGpNJIIjqVi0ylBqJIkiSJIkmJj605EkSRJPetWAyVacmodBUVhGfrAZPF0AUrgRLNiqDU4VHo8h6HRObJJNdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";var ii=e=>e instanceof Date,dd=e=>e==null;const fd=e=>typeof e=="object";var hd=e=>!dd(e)&&!Array.isArray(e)&&fd(e)&&!ii(e),pd=e=>dd(e)||!fd(e);function gd(e,t){if(pd(e)||pd(t))return e===t;if(ii(e)&&ii(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 a=t[i];if(ii(s)&&ii(a)||hd(s)&&hd(a)||Array.isArray(s)&&Array.isArray(a)?!gd(s,a):s!==a)return!1}}return!0}function Co(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 Ay(e){var t;const{onScan:n,constraints:r,formats:i=["qr_code"],paused:s=!1,components:a,children:l,styles:f,classNames:m,allowMultiple:h,scanDelay:v}=e,c=O.useRef(null),E=O.useRef(null),o=O.useRef(null),d=O.useMemo(()=>({...vy,...r}),[r]),g=O.useMemo(()=>({...wy,...a}),[a]),[p,y]=O.useState(!1),[x,C]=O.useState(!0),[S,j]=O.useState(d),I=function(){const V=O.useRef(Promise.resolve({type:"stop",data:{}})),K=O.useRef(null),N=O.useRef(null),[q,W]=O.useState({}),[te,X]=O.useState({}),ne=O.useCallback(async(ue,F)=>{var U;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((U=navigator==null?void 0:navigator.mediaDevices)===null||U===void 0?void 0:U.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");Ey();const H=await navigator.mediaDevices.getUserMedia({audio:!1,video:F});ue.srcObject!==void 0?ue.srcObject=H:ue.mozSrcObject!==void 0?ue.mozSrcObject=H:window.URL.createObjectURL?ue.src=window.URL.createObjectURL(H):window.webkitURL?ue.src=window.webkitURL.createObjectURL(H):ue.src=H.id,await Promise.race([ue.play(),new Promise(R=>setTimeout(R,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(R=>setTimeout(R,500));const[A]=H.getVideoTracks();return X(A.getSettings()),W(A.getCapabilities()),K.current=H,N.current=A,{type:"start",data:{videoEl:ue,stream:H,constraints:F}}},[]),re=O.useCallback(async(ue,F)=>{ue.src="",ue.srcObject=null,ue.load();for(const U of F.getTracks())F.removeTrack(U),U.stop();return K.current=null,N.current=null,X({}),{type:"stop",data:{}}},[]),he=O.useCallback(async(ue,{constraints:F,restart:U=!1})=>{if(V.current=V.current.then(H=>{if(H.type==="start"){const{data:{videoEl:A,stream:R,constraints:M}}=H;return U||ue!==A||F!==M?re(A,R).then(()=>ne(ue,F)):H}return ne(ue,F)}),(await V.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[ne,re]),se=O.useCallback(async()=>{if(V.current=V.current.then(ue=>{if(ue.type==="stop")return ue;const{data:{videoEl:F,stream:U}}=ue;return re(F,U)}),(await V.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[re]),ve=O.useCallback(async ue=>{const F=N.current;if(!F)throw new Error("No active video track found.");{ue.advanced&&ue.advanced[0].zoom&&F.getCapabilities().torch&&await F.applyConstraints({advanced:[{torch:!1}]}),await F.applyConstraints(ue);const U=F.getCapabilities(),H=F.getSettings();W(U),X(H)}},[]);return O.useEffect(()=>()=>{(async()=>await se())()},[se]),{capabilities:q,settings:te,startCamera:he,stopCamera:se,updateConstraints:ve}}(),{startScanning:P,stopScanning:D}=function(V){const{videoElementRef:K,onScan:N,onFound:q,retryDelay:W=100,scanDelay:te=0,formats:X=[],audio:ne=!0,allowMultiple:re=!1}=V,he=O.useRef(new ya({formats:X})),se=O.useRef(null),ve=O.useRef(null);O.useEffect(()=>{he.current=new ya({formats:X})},[X]),O.useEffect(()=>{typeof window<"u"&&ne&&(se.current=new Audio(Cy))},[ne]);const ue=O.useCallback(F=>async U=>{if(K.current!==null&&K.current.readyState>1){const{lastScan:H,contentBefore:A,lastScanHadContent:R}=F;if(U-H<W)ve.current=window.requestAnimationFrame(ue(F));else{const M=await he.current.detect(K.current),B=M.some(G=>!A.includes(G.rawValue)),z=M.length>0;let Z=F.lastOnScan;(B||re&&z&&U-Z>=te)&&(ne&&se.current&&se.current.paused&&se.current.play().catch(G=>console.error("Error playing the sound",G)),Z=U,N(M)),z&&q(M),!z&&R&&q(M);const J={lastScan:U,lastOnScan:Z,lastScanHadContent:z,contentBefore:B?M.map(G=>G.rawValue):A};ve.current=window.requestAnimationFrame(ue(J))}}},[K.current,N,q,W]);return{startScanning:O.useCallback(()=>{const F=performance.now(),U={lastScan:F,lastOnScan:F,contentBefore:[],lastScanHadContent:!1};ve.current=window.requestAnimationFrame(ue(U))},[ue]),stopScanning:O.useCallback(()=>{ve.current!==null&&(window.cancelAnimationFrame(ve.current),ve.current=null)},[])}}({videoElementRef:c,onScan:n,onFound:V=>function(K,N,q,W){const te=q;if(te==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const X=N;if(X==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(K.length===0||W===void 0)Co(te);else{const ne=X.offsetWidth,re=X.offsetHeight,he=X.videoWidth,se=X.videoHeight,ve=Math.max(ne/he,re/se),ue=he*ve,F=se*ve,U=ue/he,H=F/se,A=(ne-ue)/2,R=(re-F)/2,M=({x:J,y:G})=>({x:Math.floor(J*U),y:Math.floor(G*H)}),B=({x:J,y:G})=>({x:Math.floor(J+A),y:Math.floor(G+R)}),z=K.map(J=>{const{boundingBox:G,cornerPoints:pe}=J,{x:me,y:ce}=B(M({x:G.x,y:G.y})),{x:de,y:Ee}=M({x:G.width,y:G.height});return{...J,cornerPoints:pe.map(fe=>B(M(fe))),boundingBox:DOMRectReadOnly.fromRect({x:me,y:ce,width:de,height:Ee})}});te.width=X.offsetWidth,te.height=X.offsetHeight;const Z=te.getContext("2d");if(Z===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");W(z,Z)}}(V,c.current,o.current,g.tracker),formats:i,audio:g.audio,allowMultiple:h,retryDelay:g.tracker===void 0?500:10,scanDelay:v});O.useEffect(()=>(y(!0),()=>{y(!1)}),[]),O.useEffect(()=>{p&&(D(),P())},[a==null?void 0:a.tracker]),O.useEffect(()=>{if(!gd(d,S)){const V=d;r!=null&&r.deviceId&&delete V.facingMode,j(V)}},[r]);const _=O.useMemo(()=>({constraints:S,shouldStream:p&&!s}),[S,p,s]),Q=async()=>{const V=c.current;if(V==null)throw new Error("Video should be defined when component is mounted.");const K=E.current;if(K==null)throw new Error("Canvas should be defined when component is mounted.");const N=K.getContext("2d");if(N==null)throw new Error("Canvas should be defined when component is mounted.");if(_.shouldStream){await I.stopCamera(),C(!1);try{await I.startCamera(V,_),V?C(!0):await I.stopCamera()}catch(q){console.error("error",q)}}else K.width=V.videoWidth,K.height=V.videoHeight,N.drawImage(V,0,0,V.videoWidth,V.videoHeight),await I.stopCamera(),C(!1)};O.useEffect(()=>{(async()=>await Q())()},[_]);const $=O.useMemo(()=>_.shouldStream&&x,[_.shouldStream,x]);return O.useEffect(()=>{if($){if(E.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Co(E.current),o.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(Co(o.current),c.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");P()}},[$]),O.createElement("div",{style:{...by,...f==null?void 0:f.container},className:m==null?void 0:m.container},O.createElement("video",{ref:c,style:{...xy,...f==null?void 0:f.video,visibility:s?"hidden":"visible"},className:m==null?void 0:m.video,autoPlay:!0,muted:!0,playsInline:!0}),O.createElement("canvas",{ref:E,style:{display:s?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),O.createElement("canvas",{ref:o,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),O.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},g.finder&&O.createElement(yy,{scanning:x,capabilities:I.capabilities,loading:!1,onOff:g.onOff,zoom:g.zoom&&I.settings.zoom?{value:I.settings.zoom,onChange:async V=>{const K={...S,advanced:[{zoom:V}]};await I.updateConstraints(K)}}:void 0,torch:g.torch?{status:(t=I.settings.torch)!==null&&t!==void 0&&t,toggle:async V=>{const K={...S,advanced:[{torch:V}]};await I.updateConstraints(K)}}:void 0,startScanning:async()=>await Q(),stopScanning:async()=>{await I.stopCamera(),Co(o.current),C(!1)},border:f==null?void 0:f.finderBorder}),l))}function Sy(){const[e,t]=O.useState([]);return O.useEffect(()=>{(async()=>t(await async function(){return(await navigator.mediaDevices.enumerateDevices()).filter(({kind:n})=>n==="videoinput")}()))()},[]),e}function Ao({dataSetter:e,setDefer:t,label:n=""}){const r=O.useRef(null),i=Sy(),[s,a]=e1()??[0,0],l=f=>{e(f[0].rawValue)};return O.useEffect(()=>{a&&a<=332&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[a]),u.jsxs("div",{ref:r,children:[!!i.length&&u.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[u.jsx(jy,{onScan:l}),u.jsx("hr",{})]}),u.jsx(yo,{label:n,autoFocus:!0,placeholder:"CDE2341S",onChange:f=>{t&&t(!0),e(f.target.value)}})]})}const Ty="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 jy({onScan:e}){const[t,n]=O.useState("user");return u.jsxs("div",{className:"relative w-full",children:[u.jsx(Ay,{components:{finder:!1},onScan:e,constraints:{facingMode:t},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-381px)] min-h-[267px] overflow-hidden rounded"}}),u.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(t==="user"?"environment":"user"),children:u.jsx("img",{src:Ty,alt:"camera-switch"})})]})}function Oy({value:e,placeholder:t,open:n,setOpen:r,disabled:i}){return u.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:[u.jsx("span",{className:`text-sm ${i?"text-core-gray-300":"text-core-gray-800"}`,children:e||t}),u.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function Iy({label:e,children:t}){return u.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[u.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:e}),t]})}function va(e){return u.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:e.label})}function Ny(e){const t=O.useRef(null),[n,r]=O.useState(!1),[i,s]=O.useState(e.value??"");ku(t,r);const a=(f,m)=>{s(f),r(!1),e.onChange&&e.onChange(m)},l=O.Children.map(e.children,f=>{if(O.isValidElement(f)){if(f.type===va)return u.jsx("div",{onClick:()=>a(f.props.label,f.props.value),children:f});if(f.type===Iy){const m=O.Children.map(f.props.children,h=>{if(O.isValidElement(h)&&h.type===va)return u.jsx("div",{onClick:()=>a(h.props.label,h.props.value),children:h})});return O.cloneElement(f,{},...m)}}});return u.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[u.jsx(Dt,{description:e.description,disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),u.jsx("div",{children:u.jsxs("div",{className:"relative",children:[u.jsx(Oy,{value:i,placeholder:e.placeholder,open:n,setOpen:r,disabled:e.disabled}),e.children&&u.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:l})]})}),u.jsx(Dt.Helper,{helperText:e.helperText})]})}var Py=Object.defineProperty,ky=(e,t)=>{for(var n in t)Py(e,n,{get:t[n],enumerable:!0})},hn={};ky(hn,{assign:()=>By,colors:()=>zn,createStringInterpolator:()=>ja,skipAnimation:()=>Ed,to:()=>xd,willAdvance:()=>Oa});var wa=si(),Re=e=>oi(e,wa),ba=si();Re.write=e=>oi(e,ba);var So=si();Re.onStart=e=>oi(e,So);var xa=si();Re.onFrame=e=>oi(e,xa);var Ea=si();Re.onFinish=e=>oi(e,Ea);var Ar=[];Re.setTimeout=(e,t)=>{const n=Re.now()+t,r=()=>{const s=Ar.findIndex(a=>a.cancel==r);~s&&Ar.splice(s,1),Jn-=~s?1:0},i={time:n,handler:e,cancel:r};return Ar.splice(md(n),0,i),Jn+=1,yd(),i};var md=e=>~(~Ar.findIndex(t=>t.time>e)||~Ar.length);Re.cancel=e=>{So.delete(e),xa.delete(e),Ea.delete(e),wa.delete(e),ba.delete(e)},Re.sync=e=>{Aa=!0,Re.batchedUpdates(e),Aa=!1},Re.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Re.onStart(n)}return r.handler=e,r.cancel=()=>{So.delete(n),t=null},r};var Ca=typeof window<"u"?window.requestAnimationFrame:()=>{};Re.use=e=>Ca=e,Re.now=typeof performance<"u"?()=>performance.now():Date.now,Re.batchedUpdates=e=>e(),Re.catch=console.error,Re.frameLoop="always",Re.advance=()=>{Re.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):wd()};var Hn=-1,Jn=0,Aa=!1;function oi(e,t){Aa?(t.delete(e),e(0)):(t.add(e),yd())}function yd(){Hn<0&&(Hn=0,Re.frameLoop!=="demand"&&Ca(vd))}function Dy(){Hn=-1}function vd(){~Hn&&(Ca(vd),Re.batchedUpdates(wd))}function wd(){const e=Hn;Hn=Re.now();const t=md(Hn);if(t&&(bd(Ar.splice(0,t),n=>n.handler()),Jn-=t),!Jn){Dy();return}So.flush(),wa.flush(e?Math.min(64,Hn-e):16.667),xa.flush(),ba.flush(),Ea.flush()}function si(){let e=new Set,t=e;return{add(n){Jn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Jn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Jn-=t.size,bd(t,r=>r(n)&&e.add(r)),Jn+=e.size,t=e)}}}function bd(e,t){e.forEach(n=>{try{t(n)}catch(r){Re.catch(r)}})}function Sa(){}var Ry=(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 Nn(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 Ye=(e,t)=>e.forEach(t);function An(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 Xt=e=>xe.und(e)?[]:xe.arr(e)?e:[e];function ai(e,t){if(e.size){const n=Array.from(e);e.clear(),Ye(n,t)}}var ci=(e,...t)=>ai(e,n=>n(...t)),Ta=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ja,xd,zn=null,Ed=!1,Oa=Sa,By=e=>{e.to&&(xd=e.to),e.now&&(Re.now=e.now),e.colors!==void 0&&(zn=e.colors),e.skipAnimation!=null&&(Ed=e.skipAnimation),e.createStringInterpolator&&(ja=e.createStringInterpolator),e.requestAnimationFrame&&Re.use(e.requestAnimationFrame),e.batchedUpdates&&(Re.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Oa=e.willAdvance),e.frameLoop&&(Re.frameLoop=e.frameLoop)},li=new Set,rn=[],Ia=[],To=0,jo={get idle(){return!li.size&&!rn.length},start(e){To>e.priority?(li.add(e),Re.onStart(My)):(Cd(e),Re(Na))},advance:Na,sort(e){if(To)Re.onFrame(()=>jo.sort(e));else{const t=rn.indexOf(e);~t&&(rn.splice(t,1),Ad(e))}},clear(){rn=[],li.clear()}};function My(){li.forEach(Cd),li.clear(),Re(Na)}function Cd(e){rn.includes(e)||Ad(e)}function Ad(e){rn.splice(_y(rn,t=>t.priority>e.priority),0,e)}function Na(e){const t=Ia;for(let n=0;n<rn.length;n++){const r=rn[n];To=r.priority,r.idle||(Oa(r),r.advance(e),r.idle||t.push(r))}return To=0,Ia=rn,Ia.length=0,rn=t,rn.length>0}function _y(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Ly=(e,t,n)=>Math.min(Math.max(n,e),t),Fy={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},pn="[-+]?\\d*\\.?\\d+",Oo=pn+"%";function Io(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Vy=new RegExp("rgb"+Io(pn,pn,pn)),qy=new RegExp("rgba"+Io(pn,pn,pn,pn)),Uy=new RegExp("hsl"+Io(pn,Oo,Oo)),Gy=new RegExp("hsla"+Io(pn,Oo,Oo,pn)),Yy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ky=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$y=/^#([0-9a-fA-F]{6})$/,Qy=/^#([0-9a-fA-F]{8})$/;function Wy(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=$y.exec(e))?parseInt(t[1]+"ff",16)>>>0:zn&&zn[e]!==void 0?zn[e]:(t=Vy.exec(e))?(Sr(t[1])<<24|Sr(t[2])<<16|Sr(t[3])<<8|255)>>>0:(t=qy.exec(e))?(Sr(t[1])<<24|Sr(t[2])<<16|Sr(t[3])<<8|jd(t[4]))>>>0:(t=Yy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Qy.exec(e))?parseInt(t[1],16)>>>0:(t=Ky.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Uy.exec(e))?(Sd(Td(t[1]),No(t[2]),No(t[3]))|255)>>>0:(t=Gy.exec(e))?(Sd(Td(t[1]),No(t[2]),No(t[3]))|jd(t[4]))>>>0:null}function Pa(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 Sd(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=Pa(i,r,e+1/3),a=Pa(i,r,e),l=Pa(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function Sr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Td(e){return(parseFloat(e)%360+360)%360/360}function jd(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function No(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Od(e){let t=Wy(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 ui=(e,t,n)=>{if(xe.fun(e))return e;if(xe.arr(e))return ui({range:e,output:t,extrapolate:n});if(xe.str(e.output[0]))return ja(e);const r=e,i=r.output,s=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",f=r.easing||(m=>m);return m=>{const h=Jy(m,s);return Hy(m,s[h],s[h+1],i[h],i[h+1],f,a,l,r.map)}};function Hy(e,t,n,r,i,s,a,l,f){let m=f?f(e):e;if(m<t){if(a==="identity")return m;a==="clamp"&&(m=t)}if(m>n){if(l==="identity")return m;l==="clamp"&&(m=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?m=-m:n===1/0?m=m-t:m=(m-t)/(n-t),m=s(m),r===-1/0?m=-m:i===1/0?m=m+r:m=m*(i-r)+r,m)}function Jy(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var zy=(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 Ly(0,1,i/e)},Po=1.70158,ko=Po*1.525,Id=Po+1,Nd=2*Math.PI/3,Pd=2*Math.PI/4.5,Do=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,Zy={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=>Id*e*e*e-Po*e*e,easeOutBack:e=>1+Id*Math.pow(e-1,3)+Po*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ko+1)*2*e-ko)/2:(Math.pow(2*e-2,2)*((ko+1)*(e*2-2)+ko)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Nd),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Nd)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Pd))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Pd)/2+1,easeInBounce:e=>1-Do(1-e),easeOutBounce:Do,easeInOutBounce:e=>e<.5?(1-Do(1-2*e))/2:(1+Do(2*e-1))/2,steps:zy},di=Symbol.for("FluidValue.get"),Tr=Symbol.for("FluidValue.observers"),on=e=>!!(e&&e[di]),Qt=e=>e&&e[di]?e[di]():e,kd=e=>e[Tr]||null;function Xy(e,t){e.eventObserved?e.eventObserved(t):e(t)}function fi(e,t){const n=e[Tr];n&&n.forEach(r=>{Xy(r,t)})}var Dd=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ev(this,e)}},ev=(e,t)=>Rd(e,di,t);function jr(e,t){if(e[di]){let n=e[Tr];n||Rd(e,Tr,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function hi(e,t){const n=e[Tr];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Tr]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Rd=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ro=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,tv=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Bd=new RegExp(`(${Ro.source})(%|[a-z]+)`,"i"),nv=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Bo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Md=e=>{const[t,n]=rv(e);if(!t||Ta())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&&Bo.test(n))return Md(n);if(n)return n}return e},rv=e=>{const t=Bo.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ka,iv=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,_d=e=>{ka||(ka=zn?new RegExp(`(${Object.keys(zn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>Qt(s).replace(Bo,Md).replace(tv,Od).replace(ka,Od)),n=t.map(s=>s.match(Ro).map(Number)),i=n[0].map((s,a)=>n.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(s=>ui({...e,output:s}));return s=>{var f;const a=!Bd.test(t[0])&&((f=t.find(m=>Bd.test(m)))==null?void 0:f.replace(Ro,""));let l=0;return t[0].replace(Ro,()=>`${i[l++](s)}${a||""}`).replace(nv,iv)}},Da="react-spring: ",Ld=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Da}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},ov=Ld(console.warn);function sv(){ov(`${Da}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var av=Ld(console.warn);function cv(){av(`${Da}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 Mo(e){return xe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ta()&&Bo.test(e)||e in(zn||{}))}var Ra=Ta()?O.useEffect:O.useLayoutEffect,lv=()=>{const e=O.useRef(!1);return Ra(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Fd(){const e=O.useState()[1],t=lv();return()=>{t.current&&e(Math.random())}}function uv(e,t){const[n]=O.useState(()=>({inputs:t,result:e()})),r=O.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&dv(t,s.inputs)||(s={inputs:t,result:e()}):s=n,O.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function dv(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 Vd=e=>O.useEffect(e,fv),fv=[];function qd(e){const t=O.useRef();return O.useEffect(()=>{t.current=e}),t.current}var pi=Symbol.for("Animated:node"),hv=e=>!!e&&e[pi]===e,Sn=e=>e&&e[pi],Ba=(e,t)=>Ry(e,pi,t),_o=e=>e&&e[pi]&&e[pi].getPayload(),Ud=class{constructor(){Ba(this,this)}getPayload(){return this.payload||[]}},gi=class extends Ud{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 gi(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)}},mi=class extends gi{constructor(e){super(0),this._string=null,this._toString=ui({output:[e,e]})}static create(e){return new mi(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=ui({output:[this.getValue(),e]})),this._value=0,super.reset()}},Lo={dependencies:null},Fo=class extends Ud{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return An(this.source,(n,r)=>{hv(n)?t[r]=n.getValue(e):on(n)?t[r]=Qt(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ye(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return An(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Lo.dependencies&&on(e)&&Lo.dependencies.add(e);const t=_o(e);t&&Ye(t,n=>this.add(n))}},Gd=class extends Fo{constructor(e){super(e)}static create(e){return new Gd(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(pv)),!0)}};function pv(e){return(Mo(e)?mi:gi).create(e)}function Ma(e){const t=Sn(e);return t?t.constructor:xe.arr(e)?Gd:Mo(e)?mi:gi}var Yd=(e,t)=>{const n=!xe.fun(e)||e.prototype&&e.prototype.isReactComponent;return O.forwardRef((r,i)=>{const s=O.useRef(null),a=n&&O.useCallback(o=>{s.current=yv(i,o)},[i]),[l,f]=mv(r,t),m=Fd(),h=()=>{const o=s.current;if(n&&!o)return;(o?t.applyAnimatedValues(o,l.getValue(!0)):!1)===!1&&m()},v=new gv(h,f),c=O.useRef();Ra(()=>(c.current=v,Ye(f,o=>jr(o,v)),()=>{c.current&&(Ye(c.current.deps,o=>hi(o,c.current)),Re.cancel(c.current.update))})),O.useEffect(h,[]),Vd(()=>()=>{const o=c.current;Ye(o.deps,d=>hi(d,o))});const E=t.getComponentProps(l.getValue());return le.createElement(e,{...E,ref:a})})},gv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Re.write(this.update)}};function mv(e,t){const n=new Set;return Lo.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Fo(e),Lo.dependencies=null,[e,n]}function yv(e,t){return e&&(xe.fun(e)?e(t):e.current=t),t}var Kd=Symbol.for("AnimatedComponent"),vv=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Fo(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=a=>{const l=$d(a)||"Anonymous";return xe.str(a)?a=s[a]||(s[a]=Yd(a,i)):a=a[Kd]||(a[Kd]=Yd(a,i)),a.displayName=`Animated(${l})`,a};return An(e,(a,l)=>{xe.arr(e)&&(l=$d(a)),s[l]=s(a)}),{animated:s}},$d=e=>xe.str(e)?e:e&&xe.str(e.displayName)?e.displayName:xe.fun(e)&&e.name||null;function or(e,...t){return xe.fun(e)?e(...t):e}var yi=(e,t)=>e===!0||!!(t&&e&&(xe.fun(e)?e(t):Xt(e).includes(t))),Qd=(e,t)=>xe.obj(e)?t&&e[t]:e,Wd=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,wv=e=>e,_a=(e,t=wv)=>{let n=bv;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},bv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],xv={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 Ev(e){const t={};let n=0;if(An(e,(r,i)=>{xv[i]||(t[i]=r,n++)}),n)return t}function Hd(e){const t=Ev(e);if(t){const n={to:t};return An(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function vi(e){return e=Qt(e),xe.arr(e)?e.map(vi):Mo(e)?hn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Cv(e){for(const t in e)return!0;return!1}function La(e){return xe.fun(e)||xe.arr(e)&&xe.obj(e[0])}function Av(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Sv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Tv={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}},Fa={...Tv.default,mass:1,damping:1,easing:Zy.linear,clamp:!1},jv=class{constructor(){this.velocity=0,Object.assign(this,Fa)}};function Ov(e,t,n){n&&(n={...n},Jd(n,t),t={...n,...t}),Jd(e,t),Object.assign(e,t);for(const a in Fa)e[a]==null&&(e[a]=Fa[a]);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 Jd(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 zd=[],Iv=class{constructor(){this.changed=!1,this.values=zd,this.toValues=null,this.fromValues=zd,this.config=new jv,this.immediate=!1}};function Zd(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((a,l)=>{let f,m,h=yi(n.cancel??(r==null?void 0:r.cancel),t);if(h)E();else{xe.und(n.pause)||(i.paused=yi(n.pause,t));let o=r==null?void 0:r.pause;o!==!0&&(o=i.paused||yi(o,t)),f=or(n.delay||0,t),o?(i.resumeQueue.add(c),s.pause()):(s.resume(),c())}function v(){i.resumeQueue.add(c),i.timeouts.delete(m),m.cancel(),f=m.time-Re.now()}function c(){f>0&&!hn.skipAnimation?(i.delayed=!0,m=Re.setTimeout(E,f),i.pauseQueue.add(v),i.timeouts.add(m)):E()}function E(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(v),i.timeouts.delete(m),e<=(i.cancelId||0)&&(h=!0);try{s.start({...n,callId:e,cancel:h},a)}catch(o){l(o)}}})}var Va=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Or(e.get()):t.every(n=>n.noop)?Xd(e.get()):gn(e.get(),t.every(n=>n.finished)),Xd=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),gn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Or=e=>({value:e,cancelled:!0,finished:!1});function ef(e,t,n,r){const{callId:i,parentId:s,onRest:a}=t,{asyncTo:l,promise:f}=n;return!s&&e===l&&!t.reset?f:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const m=_a(t,(g,p)=>p==="onRest"?void 0:g);let h,v;const c=new Promise((g,p)=>(h=g,v=p)),E=g=>{const p=i<=(n.cancelId||0)&&Or(r)||i!==n.asyncId&&gn(r,!1);if(p)throw g.result=p,v(g),g},o=(g,p)=>{const y=new tf,x=new nf;return(async()=>{if(hn.skipAnimation)throw wi(n),x.result=gn(r,!1),v(x),x;E(y);const C=xe.obj(g)?{...g}:{...p,to:g};C.parentId=i,An(m,(j,I)=>{xe.und(C[I])&&(C[I]=j)});const S=await r.start(C);return E(y),n.paused&&await new Promise(j=>{n.resumeQueue.add(j)}),S})()};let d;if(hn.skipAnimation)return wi(n),gn(r,!1);try{let g;xe.arr(e)?g=(async p=>{for(const y of p)await o(y)})(e):g=Promise.resolve(e(o,r.stop.bind(r))),await Promise.all([g.then(h),c]),d=gn(r.get(),!0,!1)}catch(g){if(g instanceof tf)d=g.result;else if(g instanceof nf)d=g.result;else throw g}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?l:void 0,n.promise=s?f:void 0)}return xe.fun(a)&&Re.batchedUpdates(()=>{a(d,r,r.item)}),d})()}function wi(e,t){ai(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var tf=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.")}},nf=class extends Error{constructor(){super("SkipAnimationSignal")}},qa=e=>e instanceof Ua,Nv=1,Ua=class extends Dd{constructor(){super(...arguments),this.id=Nv++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Sn(this);return e&&e.getValue()}to(...e){return hn.to(this,e)}interpolate(...e){return sv(),hn.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){fi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||jo.sort(this),fi(this,{type:"priority",parent:this,priority:e})}},sr=Symbol.for("SpringPhase"),rf=1,Ga=2,Ya=4,Ka=e=>(e[sr]&rf)>0,Zn=e=>(e[sr]&Ga)>0,bi=e=>(e[sr]&Ya)>0,of=(e,t)=>t?e[sr]|=Ga|rf:e[sr]&=~Ga,sf=(e,t)=>t?e[sr]|=Ya:e[sr]&=~Ya,Pv=class extends Ua{constructor(e,t){if(super(),this.animation=new Iv,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!(Zn(this)||this._state.asyncTo)||bi(this)}get goal(){return Qt(this.animation.to)}get velocity(){const e=Sn(this);return e instanceof gi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Ka(this)}get isAnimating(){return Zn(this)}get isPaused(){return bi(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,a=_o(r.to);!a&&on(r.to)&&(i=Xt(Qt(r.to))),r.values.forEach((m,h)=>{if(m.done)return;const v=m.constructor==mi?1:a?a[h].lastPosition:i[h];let c=r.immediate,E=v;if(!c){if(E=m.lastPosition,s.tension<=0){m.done=!0;return}let o=m.elapsedTime+=e;const d=r.fromValues[h],g=m.v0!=null?m.v0:m.v0=xe.arr(s.velocity)?s.velocity[h]:s.velocity;let p;const y=s.precision||(d==v?.005:Math.min(1,Math.abs(v-d)*.001));if(xe.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,C=Math.exp(-(1-x)*o);E=d+g/(1-x)*(1-C),c=Math.abs(m.lastPosition-E)<=y,p=g*C}else{p=m.lastVelocity==null?g:m.lastVelocity;const x=s.restVelocity||y/10,C=s.clamp?0:s.bounce,S=!xe.und(C),j=d==v?m.v0>0:d<v;let I,P=!1;const D=1,_=Math.ceil(e/D);for(let Q=0;Q<_&&(I=Math.abs(p)>x,!(!I&&(c=Math.abs(v-E)<=y,c)));++Q){S&&(P=E==v||E>v==j,P&&(p=-p*C,E=v));const $=-s.tension*1e-6*(E-v),V=-s.friction*.001*p,K=($+V)/s.mass;p=p+K*D,E=E+p*D}}else{let x=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,m.durationProgress>0&&(m.elapsedTime=s.duration*m.durationProgress,o=m.elapsedTime+=e)),x=(s.progress||0)+o/this._memoizedDuration,x=x>1?1:x<0?0:x,m.durationProgress=x),E=d+s.easing(x)*(v-d),p=(E-m.lastPosition)/e,c=x==1}m.lastVelocity=p,Number.isNaN(E)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[h].done&&(c=!1),c?m.done=!0:t=!1,m.setValue(E,s.round)&&(n=!0)});const l=Sn(this),f=l.getValue();if(t){const m=Qt(r.to);(f!==m||n)&&!s.decay?(l.setValue(m),this._onChange(m)):n&&s.decay&&this._onChange(f),this._stop()}else n&&this._onChange(f)}set(e){return Re.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Zn(this)){const{to:e,config:t}=this.animation;Re.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=>Va(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),wi(this._state,e&&this._lastCallId),Re.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||La(n))&&(n=void 0),r=xe.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Ka(this)||(e.reverse&&([n,r]=[r,n]),r=Qt(r),xe.und(r)?Sn(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,_a(e,(a,l)=>/^on/.test(l)?Qd(a,n):a)),lf(this,e,"onProps"),Ci(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 Zd(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{bi(this)||(sf(this,!0),ci(s.pauseQueue),Ci(this,"onPause",gn(this,xi(this,this.animation.to)),this))},resume:()=>{bi(this)&&(sf(this,!1),Zn(this)&&this._resume(),ci(s.resumeQueue),Ci(this,"onResume",gn(this,xi(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const l=af(e);if(l)return this._update(l,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Or(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(Or(this));const{key:s,defaultProps:a,animation:l}=this,{to:f,from:m}=l;let{to:h=f,from:v=m}=e;i&&!r&&(!t.default||xe.und(h))&&(h=v),t.reverse&&([h,v]=[v,h]);const c=!Nn(v,m);c&&(l.from=v),v=Qt(v);const E=!Nn(h,f);E&&this._focus(h);const o=La(t.to),{config:d}=l,{decay:g,velocity:p}=d;(r||i)&&(d.velocity=0),t.config&&!o&&Ov(d,or(t.config,s),t.config!==a.config?or(a.config,s):void 0);let y=Sn(this);if(!y||xe.und(h))return n(gn(this,!0));const x=xe.und(t.reset)?i&&!t.default:!xe.und(v)&&yi(t.reset,s),C=x?v:this.get(),S=vi(h),j=xe.num(S)||xe.arr(S)||Mo(S),I=!o&&(!j||yi(a.immediate||t.immediate,s));if(E){const Q=Ma(h);if(Q!==y.constructor)if(I)y=this._set(S);else throw Error(`Cannot animate between ${y.constructor.name} and ${Q.name}, as the "to" prop suggests`)}const P=y.constructor;let D=on(h),_=!1;if(!D){const Q=x||!Ka(this)&&c;(E||Q)&&(_=Nn(vi(C),S),D=!_),(!Nn(l.immediate,I)&&!I||!Nn(d.decay,g)||!Nn(d.velocity,p))&&(D=!0)}if(_&&Zn(this)&&(l.changed&&!x?D=!0:D||this._stop(f)),!o&&((D||on(f))&&(l.values=y.getPayload(),l.toValues=on(h)?null:P==mi?[1]:Xt(S)),l.immediate!=I&&(l.immediate=I,!I&&!x&&this._set(f)),D)){const{onRest:Q}=l;Ye(Dv,V=>lf(this,t,V));const $=gn(this,xi(this,f));ci(this._pendingCalls,$),this._pendingCalls.add(n),l.changed&&Re.batchedUpdates(()=>{var V;l.changed=!x,Q==null||Q($,this),x?or(a.onRest,$):(V=l.onStart)==null||V.call(l,$,this)})}x&&this._set(C),o?n(ef(t.to,t,this._state,this)):D?this._start():Zn(this)&&!E?this._pendingCalls.add(n):n(Xd(C))}_focus(e){const t=this.animation;e!==t.to&&(kd(this)&&this._detach(),t.to=e,kd(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;on(t)&&(jr(t,this),qa(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;on(e)&&hi(e,this)}_set(e,t=!0){const n=Qt(e);if(!xe.und(n)){const r=Sn(this);if(!r||!Nn(n,r.getValue())){const i=Ma(n);!r||r.constructor!=i?Ba(this,i.create(n)):r.setValue(n),r&&Re.batchedUpdates(()=>{this._onChange(n,t)})}}return Sn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ci(this,"onStart",gn(this,xi(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),or(this.animation.onChange,e,this)),or(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Sn(this).reset(Qt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Zn(this)||(of(this,!0),bi(this)||this._resume())}_resume(){hn.skipAnimation?this.finish():jo.start(this)}_stop(e,t){if(Zn(this)){of(this,!1);const n=this.animation;Ye(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),fi(this,{type:"idle",parent:this});const r=t?Or(this.get()):gn(this.get(),xi(this,e??n.to));ci(this._pendingCalls,r),n.changed&&(n.changed=!1,Ci(this,"onRest",r,this))}}};function xi(e,t){const n=vi(t),r=vi(e.get());return Nn(r,n)}function af(e,t=e.loop,n=e.to){const r=or(t);if(r){const i=r!==!0&&Hd(r),s=(i||e).reverse,a=!i||i.reset;return Ei({...e,loop:t,default:!1,pause:void 0,to:!s||La(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function Ei(e){const{to:t,from:n}=e=Hd(e),r=new Set;return xe.obj(t)&&cf(t,r),xe.obj(n)&&cf(n,r),e.keys=r.size?Array.from(r):null,e}function kv(e){const t=Ei(e);return xe.und(t.default)&&(t.default=_a(t)),t}function cf(e,t){An(e,(n,r)=>n!=null&&t.add(r))}var Dv=["onStart","onRest","onChange","onPause","onResume"];function lf(e,t,n){e.animation[n]=t[n]!==Wd(t,n)?Qd(t[n],e.key):void 0}function Ci(e,t,...n){var r,i,s,a;(i=(r=e.animation)[t])==null||i.call(r,...n),(a=(s=e.defaultProps)[t])==null||a.call(s,...n)}var Rv=["onStart","onChange","onRest"],Bv=1,Mv=class{constructor(e,t){this.id=Bv++,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(Ei(e)),this}start(e){let{queue:t}=this;return e?t=Xt(e).map(Ei):this.queue=[],this._flush?this._flush(this,t):(gf(this,t),$a(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Ye(Xt(t),r=>n[r].stop(!!e))}else wi(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;Ye(Xt(e),n=>t[n].pause())}return this}resume(e){if(xe.und(e))this.start({pause:!1});else{const t=this.springs;Ye(Xt(e),n=>t[n].resume())}return this}each(e){An(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,ai(e,([l,f])=>{f.value=this.get(),l(f,this,this._item)}));const s=!r&&this._started,a=i||s&&n.size?this.get():null;i&&t.size&&ai(t,([l,f])=>{f.value=a,l(f,this,this._item)}),s&&(this._started=!1,ai(n,([l,f])=>{f.value=a,l(f,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;Re.onFrame(this._onFrame)}};function $a(e,t){return Promise.all(t.map(n=>uf(e,n))).then(n=>Va(e,n))}async function uf(e,t,n){const{keys:r,to:i,from:s,loop:a,onRest:l,onResolve:f}=t,m=xe.obj(t.default)&&t.default;a&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const h=xe.arr(i)||xe.fun(i)?i:void 0;h?(t.to=void 0,t.onRest=void 0,m&&(m.onRest=void 0)):Ye(Rv,d=>{const g=t[d];if(xe.fun(g)){const p=e._events[d];t[d]=({finished:y,cancelled:x})=>{const C=p.get(g);C?(y||(C.finished=!1),x&&(C.cancelled=!0)):p.set(g,{value:null,finished:y||!1,cancelled:x||!1})},m&&(m[d]=t[d])}});const v=e._state;t.pause===!v.paused?(v.paused=t.pause,ci(t.pause?v.pauseQueue:v.resumeQueue)):v.paused&&(t.pause=!0);const c=(r||Object.keys(e.springs)).map(d=>e.springs[d].start(t)),E=t.cancel===!0||Wd(t,"cancel")===!0;(h||E&&v.asyncId)&&c.push(Zd(++e._lastAsyncId,{props:t,state:v,actions:{pause:Sa,resume:Sa,start(d,g){E?(wi(v,e._lastAsyncId),g(Or(e))):(d.onRest=l,g(ef(h,d,v,e)))}}})),v.paused&&await new Promise(d=>{v.resumeQueue.add(d)});const o=Va(e,await Promise.all(c));if(a&&o.finished&&!(n&&o.noop)){const d=af(t,a,i);if(d)return gf(e,[d]),uf(e,d,!0)}return f&&Re.batchedUpdates(()=>f(o,e,e.item)),o}function df(e,t){const n={...e.springs};return t&&Ye(Xt(t),r=>{xe.und(r.keys)&&(r=Ei(r)),xe.obj(r.to)||(r={...r,to:void 0}),pf(n,r,i=>hf(i))}),ff(e,n),n}function ff(e,t){An(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,jr(n,e))})}function hf(e,t){const n=new Pv;return n.key=e,t&&jr(n,t),n}function pf(e,t,n){t.keys&&Ye(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function gf(e,t){Ye(t,n=>{pf(e.springs,n,r=>hf(r,e))})}var Vo=({children:e,...t})=>{const n=O.useContext(qo),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=uv(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=qo;return le.createElement(s,{value:t},e)},qo=_v(Vo,{});Vo.Provider=qo.Provider,Vo.Consumer=qo.Consumer;function _v(e,t){return Object.assign(e,le.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Lv=()=>{const e=[],t=function(r){cv();const i=[];return Ye(e,(s,a)=>{if(xe.und(r))i.push(s.start());else{const l=n(r,s,a);l&&i.push(s.start(l))}}),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 Ye(e,r=>r.pause(...arguments)),this},t.resume=function(){return Ye(e,r=>r.resume(...arguments)),this},t.set=function(r){Ye(e,(i,s)=>{const a=xe.fun(r)?r(s,i):r;a&&i.set(a)})},t.start=function(r){const i=[];return Ye(e,(s,a)=>{if(xe.und(r))i.push(s.start());else{const l=this._getProps(r,s,a);l&&i.push(s.start(l))}}),i},t.stop=function(){return Ye(e,r=>r.stop(...arguments)),this},t.update=function(r){return Ye(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 Fv(e,t,n){const r=xe.fun(t)&&t;r&&!n&&(n=[]);const i=O.useMemo(()=>r||arguments.length==3?Lv():void 0,[]),s=O.useRef(0),a=Fd(),l=O.useMemo(()=>({ctrls:[],queue:[],flush(p,y){const x=df(p,y);return s.current>0&&!l.queue.length&&!Object.keys(x).some(S=>!p.springs[S])?$a(p,y):new Promise(S=>{ff(p,x),l.queue.push(()=>{S($a(p,y))}),a()})}}),[]),f=O.useRef([...l.ctrls]),m=[],h=qd(e)||0;O.useMemo(()=>{Ye(f.current.slice(e,h),p=>{Av(p,i),p.stop(!0)}),f.current.length=e,v(h,e)},[e]),O.useMemo(()=>{v(0,Math.min(h,e))},n);function v(p,y){for(let x=p;x<y;x++){const C=f.current[x]||(f.current[x]=new Mv(null,l.flush)),S=r?r(x,C):t[x];S&&(m[x]=kv(S))}}const c=f.current.map((p,y)=>df(p,m[y])),E=O.useContext(Vo),o=qd(E),d=E!==o&&Cv(E);Ra(()=>{s.current++,l.ctrls=f.current;const{queue:p}=l;p.length&&(l.queue=[],Ye(p,y=>y())),Ye(f.current,(y,x)=>{i==null||i.add(y),d&&y.start({default:E});const C=m[x];C&&(Sv(y,C.ref),y.ref?y.queue.push(C):y.start(C))})}),Vd(()=>()=>{Ye(l.ctrls,p=>p.stop(!0))});const g=c.map(p=>({...p}));return i?[g,i]:g}function Vv(e,t){const n=xe.fun(e),[[r],i]=Fv(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var qv=class extends Ua{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ui(...t);const n=this._get(),r=Ma(n);Ba(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Nn(t,n)||(Sn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&mf(this._active)&&Qa(this)}_get(){const e=xe.arr(this.source)?this.source.map(Qt):Xt(Qt(this.source));return this.calc(...e)}_start(){this.idle&&!mf(this._active)&&(this.idle=!1,Ye(_o(this),e=>{e.done=!1}),hn.skipAnimation?(Re.batchedUpdates(()=>this.advance()),Qa(this)):jo.start(this))}_attach(){let e=1;Ye(Xt(this.source),t=>{on(t)&&jr(t,this),qa(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Ye(Xt(this.source),e=>{on(e)&&hi(e,this)}),this._active.clear(),Qa(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=Xt(this.source).reduce((t,n)=>Math.max(t,(qa(n)?n.priority:0)+1),0))}};function Uv(e){return e.idle!==!1}function mf(e){return!e.size||Array.from(e).every(Uv)}function Qa(e){e.idle||(e.idle=!0,Ye(_o(e),t=>{t.done=!0}),fi(e,{type:"idle",parent:e}))}hn.assign({createStringInterpolator:_d,to:(e,t)=>new qv(e,t)});var yf=/^--/;function Gv(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!yf.test(e)&&!(Ai.hasOwnProperty(e)&&Ai[e])?t+"px":(""+t).trim()}var vf={};function Yv(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:a,viewBox:l,...f}=t,m=Object.values(f),h=Object.keys(f).map(v=>n||e.hasAttribute(v)?v:vf[v]||(vf[v]=v.replace(/([A-Z])/g,c=>"-"+c.toLowerCase())));i!==void 0&&(e.textContent=i);for(const v in r)if(r.hasOwnProperty(v)){const c=Gv(v,r[v]);yf.test(v)?e.style.setProperty(v,c):e.style[v]=c}h.forEach((v,c)=>{e.setAttribute(v,m[c])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var Ai={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},Kv=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),$v=["Webkit","Ms","Moz","O"];Ai=Object.keys(Ai).reduce((e,t)=>($v.forEach(n=>e[Kv(n,t)]=e[t]),e),Ai);var Qv=/^(matrix|translate|scale|rotate|skew)/,Wv=/^(translate)/,Hv=/^(rotate|skew)/,Wa=(e,t)=>xe.num(e)&&e!==0?e+t:e,Uo=(e,t)=>xe.arr(e)?e.every(n=>Uo(n,t)):xe.num(e)?e===t:parseFloat(e)===t,Jv=class extends Fo{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(a=>[`translate3d(${a.map(l=>Wa(l,"px")).join(",")})`,Uo(a,0)])),An(r,(a,l)=>{if(l==="transform")i.push([a||""]),s.push(f=>[f,f===""]);else if(Qv.test(l)){if(delete r[l],xe.und(a))return;const f=Wv.test(l)?"px":Hv.test(l)?"deg":"";i.push(Xt(a)),s.push(l==="rotate3d"?([m,h,v,c])=>[`rotate3d(${m},${h},${v},${Wa(c,f)})`,Uo(c,0)]:m=>[`${l}(${m.map(h=>Wa(h,f)).join(",")})`,Uo(m,l.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new zv(i,s)),super(r)}},zv=class extends Dd{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 Ye(this.inputs,(n,r)=>{const i=Qt(n[0]),[s,a]=this.transforms[r](xe.arr(i)?i:n.map(Qt));e+=" "+s,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Ye(this.inputs,t=>Ye(t,n=>on(n)&&jr(n,this)))}observerRemoved(e){e==0&&Ye(this.inputs,t=>Ye(t,n=>on(n)&&hi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),fi(this,e)}},Zv=["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"];hn.assign({batchedUpdates:er.unstable_batchedUpdates,createStringInterpolator:_d,colors:Fy});var Xv=vv(Zv,{applyAnimatedValues:Yv,createAnimatedStyle:e=>new Jv(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),ew=Xv.animated;function Go(e){const{rows:t}=e,n=Vv({from:{opacity:0},to:{opacity:1}});return u.jsxs(ew.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,i)=>u.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${i}`)),u.jsx("span",{className:"sr-only",children:"Loading..."})]})}function wf({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const i=O.useRef(null),[s,a]=O.useState(0),[l,f]=O.useState(r),m=l&&O.Children.count(e)>n?n:O.Children.count(e);O.useEffect(()=>{i.current&&(s?l?i.current.style.marginBottom=`-${s-(s/m+(m-1)*(t??s/m/7.5))}px`:i.current.style.marginBottom="unset":a(i.current.offsetHeight))},[l,s]);const h=c=>(100-(m-1-c))/100,v=c=>c*(s/m-(t??s/m/7.5));return u.jsx("div",{ref:i,className:"hover:cursor-pointer",onClick:()=>m>1&&f(!l),children:O.Children.map(O.Children.toArray(e).slice(-1*m),(c,E)=>u.jsx("div",{className:`${!l&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:l&&m>1?`scaleX(${h(E)}) translateY(-${v(E)}px)`:void 0},children:c}))})}const tw=wr("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),nw=wr("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),rw=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:i="md"})=>{const s=t,[a,l]=O.useState(r),[f,m]=O.useState(!1),h=()=>{s||(l(!a),n&&n())},v=()=>{t||m(!0)},c=()=>{m(!1)},E=kt("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":f,"bg-core-primary-500 hover:bg-core-primary-600":a&&!t,"bg-core-gray-200 hover:bg-core-gray-300":!a&&!t,"bg-core-gray-100":t},nw({size:i})),o=i==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return u.jsxs("div",{className:`inline-flex items-center py-1 ${s?"pointer-events-none":"cursor-pointer "}`,onClick:h,onFocus:v,children:[u.jsx("input",{className:"sr-only ",id:e,type:"checkbox",checked:a,disabled:s,onBlur:c,onChange:h,onFocus:v}),u.jsx("div",{className:E,children:u.jsx("div",{className:kt(tw({size:i}),`${a?o:""} ${s?"shadow-none":"shadow-xs"}`)})})]})},Yo=({id:e,children:t,size:n="md",description:r,toggleLeft:i=!0,disabled:s,helperText:a,defaultChecked:l=!1,label:f,required:m=!1,tooltip:h,onChange:v})=>{const c=O.useId(),E=e??c;return u.jsxs("div",{className:`flex ${i?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[u.jsx(rw,{disabled:s,defaultChecked:l,id:E,size:n,onChange:v}),t||(f||r||h||a)&&u.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[u.jsx(Dt,{className:kt("font-normal"),description:r,required:m,tooltip:h,htmlFor:E,disabled:s,children:f}),u.jsx(Dt.Helper,{disabled:s,helperText:a})]})]})};Yo.displayName="Switch";const bf=O.createContext(null);function iw(e=!1){const t=O.useContext(bf);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const xf=O.forwardRef(({toggleLeft:e=!1,size:t="md",children:n,description:r,disabled:i,helperText:s,id:a,label:l,required:f,tooltip:m},h)=>{const v=O.useId(),c=a??v,E=l??r??m??s?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(Dt,{className:"cursor-default",description:r,required:f,tooltip:m,htmlFor:c,disabled:i,children:l}),u.jsx(Dt.Helper,{disabled:i,helperText:s})]}):null;return u.jsx(bf.Provider,{value:{disabled:i,toggleLeft:e,size:t},children:u.jsxs("div",{ref:h,"aria-describedby":s?`${c}__describer`:void 0,"aria-labelledby":l?`${c}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[l??s??r??m?u.jsx("div",{className:"flex flex-col",children:E}):null,n?u.jsx("div",{className:kt("flex flex-col gap-2"),children:n}):null]})})});xf.displayName="SwitchGroup",Object.assign(xf,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=iw(),{disabled:i,size:s,toggleLeft:a}=r??{};return u.jsx(Yo,{toggleLeft:a,disabled:e??i,label:t,defaultChecked:n,size:s})}});const ow=({children:e})=>u.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}),sw=({id:e,label:t,icon:n,pathname:r,activeTab:i,setActiveTab:s})=>u.jsx(kc,{className:"flex flex-grow items-center",to:r??"",children:u.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:[u.jsx(Ct,{icon:n,className:"mr-2",variant:i===e?"discovery":"secondary"}),t]})});function Ef(){const{t:e}=$e(),[t,n]=O.useState(""),[r,i]=O.useState(!1),{session:s}=nt(),a=Et(),[l,f]=O.useState(!1),m=O.useCallback(async()=>{i(!0);try{const{data:{data:h}}=await ia.get(t);a(`${s.type===zt.REDEEM_GIFTCARD?"redeem":"top-up"}/${h.hash}`)}catch{i(!1)}},[t,a,s]);return O.useEffect(()=>{t&&!r&&!l&&m().then()},[t,r,l,m]),(s==null?void 0:s.type)===zt.REDEEM_GIFTCARD&&!(s!=null&&s.input_data.amount_in_cents)?u.jsx(u.Fragment,{children:e("xIsRequired",{x:"Amount in cents"})}):u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("scanGiftcard")})})}),u.jsx(bt,{children:u.jsx(Ao,{dataSetter:n,setDefer:f,label:e("hash")})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("submit"),className:"w-full",onClick:m,disabled:!t||r})})]})})}function aw(){const{t:e}=$e(),{hash:t}=Ac(),{giftcard:n,isLoading:r,mutate:i}=Xl(t),{session:s,mutate:a}=nt(),{onUseGiftcard:l}=En(),f=Et(),m=(s==null?void 0:s.input_data.amount_in_cents)??0,[h]=O.useState(s.results.remaining_amount??m),v=(s==null?void 0:s.input_data.allow_multiple_giftcards)??!0;if(r)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:u.jsx(br,{className:"h-[48px] w-[48px]"})});if(!n)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const c=async()=>{const p=await ia.transaction(n.uuid,-o());await i();const y=await a(),x=y==null?void 0:y.data.data.events;go(x),qe.success(`${e("transactionSuccessful")}!`),l&&l(p.data.data)},E=()=>s.results.remaining_amount??m,o=()=>Math.min(E(),n.amount_in_cents),d=()=>{let p=0;return s.events.filter(x=>x.type===Fn.GIFTCARD_TRANSACTION).forEach(x=>{x.data.giftcard.uuid===n.uuid&&(p+=x.data.amount_in_cents)}),p},g=()=>{if(o())return{label:e("confirmAndPay",{amount:vr(o(),s==null?void 0:s.currency)}),onClick:c};if(v&&E())return{label:e("useAnotherGiftcard"),onClick:()=>f("../"),variant:"secondary"}};return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:`${e("giftcard")} ${n.hash}`})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex h-full flex-col gap-4",children:[u.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx("p",{className:"font-light text-gray-500",children:e("balance")}),u.jsx(Kn,{value:n.amount_in_cents,start:n.amount_in_cents-d(),currency:s.currency,asCurrency:!0})]})}),u.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:u.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[u.jsx("p",{className:"font-light text-gray-500",children:e("amountToPay")}),u.jsx("div",{className:"text-5xl font-bold",children:u.jsx(Kn,{value:h+d(),start:h,currency:s.currency,asCurrency:!0})})]})})]})}),g()&&u.jsx(Ot,{children:u.jsx(rt,{label:"",className:"w-full",...g()})})]})})}function cw(){const{t:e}=$e(),{hash:t}=Ac(),{giftcard:n,isLoading:r,mutate:i}=Xl(t),{mutate:s}=nt();if(r)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:u.jsx(br,{className:"h-[48px] w-[48px]"})});if(!n)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const a=async l=>{const f=await ia.transaction(n.uuid,l);await i(),await s(),qe.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${vr(f.data.data.amount_in_cents)}`)};return u.jsx(Mt,{children:u.jsx(Pu,{title:`${e("giftcard")} ${n.hash}`,balance:n.amount_in_cents,transaction:a})})}function lw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/redeem/:hash",element:u.jsx(aw,{})})]})}function uw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/top-up/:hash",element:u.jsx(cw,{})})]})}function dw({contact:e}){const{t}=$e(),{session:{loyalty_program:n}}=nt(),r=(s,a)=>uu(s,a)?`${uu(s,a)} ${t("yearsAgo")}`:lu(s,a)?`${lu(s,a)} ${t("weeksAgo")}`:cu(s,a)?`${cu(s,a)} ${t("daysAgo")}`:t("today"),i=()=>{const s=new Date,a=new Date(e.current_display_values.birthdate);return a.setFullYear(s.getFullYear()),s.getTime()>a.getTime()&&a.setFullYear(a.getFullYear()+1),Math.floor((a.getTime()-s.getTime())/(1e3*60*60*24))};return u.jsxs("div",{className:"h-full justify-between",children:[u.jsx("p",{className:"mb-4 text-lg font-semibold leading-7",children:"Stats"}),u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"calendar"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:r(new Date,new Date(e.current_display_values.loyalty_last_transaction_date))}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("lastVisit")})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"shopping-bag"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_number_of_transactions} ${t("visits")}`}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalVisits")})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"dollar"}),u.jsxs("div",{children:[u.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")}`}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalCredits")})]})]}),e.current_values.birthdate&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"star"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:new Date(e.current_display_values.birthdate).toLocaleDateString(St.language,{day:"numeric",month:"long"})}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("birthdayInDays",{number:i()})})]})]})]})]})}function Cf({loyaltyTransaction:e}){const{t}=$e();return u.jsxs("div",{className:"mb-2 flex justify-between",children:[u.jsx("p",{className:"text-xs text-core-gray-500",children:e.type===eu.CREDIT_RECEPTION?t("transaction"):`${t("isRedeemed")} '${e.loyalty_transaction_data.title}'`}),u.jsx("p",{className:"text-xs font-semibold",children:e.credits>0?"+"+e.credits:e.credits})]})}function Af({subscription:e,onChange:t,editable:n=!1}){const{t:r}=$e();return u.jsxs("div",{className:"mb-2 flex justify-between",children:[u.jsx("p",{className:"text-xs font-semibold",children:e.subscription_type.name}),n?u.jsx(Yo,{defaultChecked:e.is_subscribed,disabled:e.subscription_type.strategy===Yn.FUNCTIONAL,onChange:t&&(()=>t(e.subscription_type.name))}):u.jsx(ha,{label:r(e.status.toLowerCase()),size:"sm",color:e.is_subscribed?"primary":"gray"})]})}function fw({contact:e}){const t=Et(),{t:n}=$e();return u.jsxs("div",{className:"inline-grid w-full items-center gap-4 py-4 lg:grid-cols-2",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(fa,{src:e.current_display_values.avatar,size:"2xl"}),u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsxs("div",{className:"flex gap-2",children:[u.jsxs("p",{className:"text-lg",children:[e.current_display_values.firstname," ",e.current_display_values.lastname]}),u.jsx(ha,{label:e.current_display_values.tier,size:"sm",stroke:!0})]}),u.jsxs("p",{className:"text-sm text-core-gray-500 ",children:[n("joined")," ",new Date(e.current_values.created_at).toLocaleDateString(St.language,{month:"long",year:"numeric"})]})]})]}),u.jsxs("div",{className:"inline-grid gap-2 lg:grid-cols-2",children:[u.jsx(rt,{label:n("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>t("contact-identifiers")}),u.jsx(rt,{before:u.jsx(Ct,{icon:"edit"}),label:n("editProfile"),variant:"secondary",size:"md",onClick:()=>t("contact-attributes")})]})]})}function hw(){const{contact:e,isLoading:t}=xn(),{session:{loyalty_program:n,currency:r}}=nt(),{t:i}=$e(),s=Et(),{loyaltyTransactions:a}=fo(),{subscriptions:l}=su();return t||!e?u.jsx(u.Fragment,{}):u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(fw,{contact:e})}),u.jsx(bt,{children:u.jsxs("div",{className:"grid grid-cols-1 gap-x-2 gap-y-2 lg:grid-cols-4",children:[u.jsxs("div",{className:"flex gap-2 lg:flex-col",children:[u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[u.jsx("p",{className:"text-2xl leading-8",children:e.current_display_values.loyalty_balance}),u.jsx("p",{className:"text-sm text-core-gray-500",children:n.custom_credit_name?n.custom_credit_name:i("points")})]})}),u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[u.jsx("p",{className:"text-2xl leading-8",children:vr(e.prepaid_balance.balance_in_cents,r)}),u.jsx("p",{className:"text-sm text-core-gray-500",children:i("prepaidCredit")})]})})]}),u.jsx(Si,{children:u.jsx(dw,{contact:e})}),u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{className:"text-lg font-semibold leading-7",children:i("activities")}),a&&a.length?u.jsx("div",{children:a.slice(0,5).map(f=>u.jsx(Cf,{loyaltyTransaction:f},f.uuid))}):u.jsx("p",{className:"text-sm text-core-gray-500",children:i("noActivity")})]}),u.jsx(rt,{label:`${i("all")} ${i("activities").toLowerCase()}`,variant:"secondary",onClick:()=>s("activity")})]})}),u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col justify-between",children:[u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{className:"text-lg font-semibold leading-7",children:i("subscriptions")}),u.jsx("div",{children:l==null?void 0:l.filter(f=>f.subscription_type.strategy!==Yn.FUNCTIONAL).map(f=>u.jsx(Af,{subscription:f},f.subscription_type.uuid))})]}),u.jsx(rt,{label:i("change").charAt(0).toUpperCase()+i("change").slice(1),before:u.jsx(Ct,{icon:"edit"}),variant:"secondary",onClick:()=>s("subscriptions")})]})})]})})]})}function Si({children:e}){return u.jsx("div",{className:"flex-grow rounded-lg border p-4",children:e})}function Ti({label:e,path:t}){const n=Et();return u.jsx("div",{className:"flex h-16 items-center text-base text-core-gray-900",children:u.jsx(rt,{label:e,variant:"link-gray",before:u.jsx(Ct,{icon:"caret-left",size:"md"}),onClick:()=>n(t)})})}function pw(){const{t:e}=$e(),{loyaltyTransactions:t}=fo(),{contact:n}=xn();return u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsxs("div",{className:"md:max-h-[528px]",children:[u.jsx("p",{className:"text-sm font-medium",children:e("allActivities")}),u.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("checkOutAllActivitiesOfName",{name:n.current_display_values.firstname})}),u.jsx("div",{className:"overflow-auto",children:t==null?void 0:t.map(r=>u.jsx(Cf,{loyaltyTransaction:r},r.uuid))})]})})]})})}function gw(){const{t:e}=$e(),{subscriptions:t,mutate:n}=su(),[r,i]=O.useState({}),[s,a]=O.useState(!1);O.useEffect(()=>{if(t&&!Object.keys(r).length){const h=t.reduce((v,c)=>({...v,[c.subscription_type.name]:c.is_subscribed}),{});i(h)}},[]);const l=h=>{Object.hasOwn(r,h)?i({...r,[h]:!r[h]}):i({...r,[h]:!0})},f=async()=>{a(!0),await ca.update({values:r}),await n(),qe.success(e("subscriptionsUpdated")),a(!1)},m=()=>t&&t.some(h=>r[h.subscription_type.name]!==h.is_subscribed);return u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsx("div",{className:"md:max-h-[528px]",children:u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:e("subscriptions")}),u.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("manageEmailPreferences")}),t==null?void 0:t.filter(h=>h.subscription_type.strategy!==Yn.FUNCTIONAL).map(h=>u.jsx(Af,{subscription:h,onChange:l,editable:!0},h.subscription_type.uuid))]})})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("saveChanges"),className:"w-full",onClick:f,disabled:!m()||s})})]})})}function mw({identifier:e,onClear:t}){const{t:n}=$e();return u.jsxs("div",{className:"flex items-center justify-between rounded-lg border text-xs",children:[u.jsxs("div",{className:"flex-col pl-4",children:[u.jsx("p",{className:"font-semibold",children:e.value}),u.jsx("p",{className:"text-core-gray-500",children:n("contactIdentifier")})]}),u.jsx("div",{className:"h-full border-l p-4 hover:cursor-pointer hover:bg-core-gray-50",onClick:()=>t&&t(e.value),children:u.jsx(Ct,{className:"h-full",icon:"close"})})]})}function yw(){const{t:e}=$e(),t=Et(),{identifiers:n,isLoading:r,mutate:i}=Zl(),[s,a]=O.useState(""),[l,f]=O.useState(!1),m=v=>{a(v),f(!0)},h=async()=>{await f0.clear({value:s}),await i(),f(!1)};return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsx("div",{className:"md:max-h-[528px]",children:u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:e("contactIdentifiers")}),u.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("contactIdentifierDescription")})]}),r?u.jsx(Go,{rows:10}):n==null?void 0:n.map(v=>u.jsx(mw,{identifier:v,onClear:m},v.value))]})})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>t("create")})})]}),u.jsx(xr,{title:e("confirmClearContactIdentifier"),isOpen:l,primaryAction:{label:e("confirm"),action:h},secondaryAction:{label:e("cancel"),action:()=>f(!1)},onClose:()=>f(!1),children:u.jsx("p",{children:e("clearContactIdentifier",{value:s})})})]})}function vw(){const{t:e}=$e(),{contact:t}=xn(),{mutate:n}=Zl(),r=Et(),[i,s]=O.useState(""),[a,l]=O.useState(!1),[f,m]=O.useState(!1),h=async()=>{l(!0);try{await ir.linkIdentifier(i,t.email),await n(),r("/portal/profile/contact-identifiers")}finally{s(""),l(!1)}};return O.useEffect(()=>{i&&!a&&!f&&h().then()},[i,a,f,h]),u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsx(Ao,{dataSetter:s,setDefer:m,label:e("contactIdentifier")})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("addIdentifier"),className:"w-full",onClick:h,disabled:a})})]})})}function ww(){const{t:e}=$e(),{contact:t,isLoading:n,mutate:r}=xn(),[i,s]=O.useState(),[a,l]=O.useState();O.useEffect(()=>{i||(async()=>{const{data:v}=await zl.get();s(v.data.elements)})()},[i]);const f=v=>{l({...a,[v.target.name]:v.target.value})},m=(v,c)=>{l({...a,[v]:c})},h=async()=>{a&&(await zl.update(a),await r(),qe.success(e("contactAttributesUpdated")),l(void 0))};return u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsxs("div",{className:"md:max-h-[528px]",children:[!n&&u.jsxs("div",{className:"mb-4 flex flex-row items-center gap-4 border-b border-b-core-gray-200 px-1 pb-4",children:[u.jsx(fa,{src:t.current_display_values.avatar,size:"2xl"}),u.jsxs("div",{children:[u.jsx("div",{className:"flex flex-row items-center gap-2 ",children:u.jsxs("h1",{className:"text-lg text-core-gray-900",children:[t.current_display_values.firstname," ",t.current_display_values.lastname]})}),u.jsx("p",{className:"text-sm text-core-gray-500",children:t.current_display_values.email})]})]}),!i||n?u.jsx(Go,{rows:10}):i.map(v=>{if(!(v.type==="media_upload"||v.type==="email"))return v.type==="select"?u.jsx(Ny,{name:v.name,label:v.label,value:a&&a[v.name]?a[v.name]:t.current_display_values[v.name],onChange:c=>m(v.name,c),disabled:v.disabled,children:v.options.map(c=>u.jsx(va,{label:c.label,value:c.value},c.value))},v.id):v.type==="multi_select"?u.jsx(n1,{name:v.name,value:a&&a[v.name]?a[v.name]:v.defaultValue,label:v.label,onChange:m,disabled:v.disabled,options:v.options},v.id):v.type==="birth_date"||v.type==="date_time"?u.jsx(Ru,{id:v.id,name:v.name,label:v.label,type:v.type==="date_time"?"date_time":"date",value:a&&a[v.name]?a[v.name]:t.current_display_values[v.name],disabled:v.disabled,onChange:f},v.id):u.jsx(yo,{disabled:v.disabled,label:v.label,name:v.name,value:a&&a[v.name]?a[v.name]:t.current_display_values[v.name],onChange:f},v.id)})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("saveChanges"),className:"w-full",onClick:h,disabled:!a})})]})})}function bw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/profile",element:u.jsx(mn,{element:u.jsx(hw,{})})}),u.jsx(Oe,{path:"/profile/activity",element:u.jsx(mn,{element:u.jsx(pw,{})})}),u.jsx(Oe,{path:"/profile/subscriptions",element:u.jsx(mn,{element:u.jsx(gw,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers",element:u.jsx(mn,{element:u.jsx(yw,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers/create",element:u.jsx(mn,{element:u.jsx(vw,{})})}),u.jsx(Oe,{path:"/profile/contact-attributes",element:u.jsx(mn,{element:u.jsx(ww,{})})})]})}function Ha({voucher:e,selected:t,setSelected:n}){const{t:r}=$e();return u.jsxs("div",{className:`flex cursor-pointer items-center justify-between gap-4 rounded-lg ${e.status===yr.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:[u.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[u.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"}),u.jsxs("div",{className:"overflow-hidden overflow-ellipsis ",children:[u.jsx("p",{className:"font-semibold",children:e.name}),e.status===yr.REDEEMED?u.jsx("p",{className:"text-core-gray-500",children:r("redeemed")}):u.jsx("p",{className:"text-core-primary-500",children:e.expiration_date?`Valid until ${new Date(e.expiration_date).toLocaleDateString()}`:r("nonExpiring")})]})]}),u.jsx("p",{className:`text-core-${e.status===yr.REDEEMED?"gray":"primary"}-500`,children:e.code})]})}function xw(){const{t:e}=$e(),{vouchers:t,isLoading:n,mutate:r}=v0(),{onRedeemVoucher:i}=En(),{mutate:s}=fo(),{session:{events:a},mutate:l}=nt(),[f,m]=O.useState(),[h,v]=O.useState(!1);O.useEffect(()=>{f&&v(!0)},[f]);const c=async()=>{if(f){const o=await la.redeemByCode(f.code);r(),s();const d=await l(),g=d==null?void 0:d.data.data.events;go(g),qe.success(e("voucherSuccessfullyRedeemed")),i&&i(o.data.data),v(!1),m(void 0)}},E=()=>a.filter(o=>o.type===Fn.VOUCHER_REDEEMED);return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("vouchers")})})}),u.jsx(bt,{children:n?u.jsx(Go,{rows:1}):u.jsx("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:t&&t.length?t.map(o=>u.jsx(Ha,{voucher:o,selected:f,setSelected:m},o.code)):u.jsx("p",{className:"text-center text-sm text-core-gray-500",children:e("vouchersEmptyState")})})}),!!E().length&&u.jsx(Ot,{children:u.jsx("div",{children:u.jsx(wf,{children:E().map(o=>u.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-core-primary-100 bg-core-primary-50 p-2",children:u.jsx("div",{className:"flex h-full flex-col justify-between text-xs",children:u.jsxs("div",{className:"overflow-hidden",children:[u.jsx("p",{className:"font-semibold",children:o.data.name}),u.jsxs("p",{className:"overflow-ellipsis text-core-gray-500",children:[o.data.code," - ",e("applied")]})]})})},o.data.uuid))},E().length)})})]}),u.jsx(xr,{title:e("confirmVoucherRedemption"),isOpen:h,primaryAction:{label:e("confirm"),action:c},secondaryAction:{label:e("cancel"),action:()=>v(!1)},onClose:()=>v(!1),children:u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{children:e("redeemTitle",{title:f==null?void 0:f.name})}),f&&u.jsx(Ha,{voucher:f,setSelected:m})]})})]})}function Ja({reward:e,selected:t,setSelected:n,disabled:r,readOnly:i}){const{t:s}=$e(),{session:a}=nt(),{contact:l,isLoading:f}=xn(),m=f?0:l.credit_balance.balance;return u.jsxs("div",{className:`max-h-[48px] rounded-lg border ${r?"pointer-events-none opacity-40":!i&&"cursor-pointer"}`,children:[u.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:[u.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[u.jsx("img",{src:e.media.value??"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),u.jsx("p",{className:"truncate",children:e.title??e.description})]}),u.jsxs("p",{className:"whitespace-nowrap text-core-primary-500",children:[e.required_credits," ",a!=null&&a.loyalty_program.custom_credit_name?a==null?void 0:a.loyalty_program.custom_credit_name:s("points").toLowerCase()]})]}),e.required_credits-m>0&&u.jsx(r1,{value:m,max:e.required_credits})]})}function Ew(){const{t:e}=$e(),{rewards:t,isLoading:n,mutate:r}=y0(),{mutate:i}=xn(),{mutate:s}=fo(),{onClaimReward:a}=En(),{session:{events:l,loyalty_program:f},mutate:m}=nt(),{contact:h,isLoading:v}=xn(),[c,E]=O.useState(),[o,d]=O.useState(!1);O.useEffect(()=>{c&&d(!0)},[c]);const g=async()=>{if(c){const y=await m0.claim(c.uuid),x=await m(),C=x==null?void 0:x.data.data.events;go(C);const S=C.filter(I=>I.type===Fn.REWARD_RECEPTION&&I.data.reward.uuid===c.uuid),{data:{uuid:j}}=S.reduce((I,P)=>new Date(I.created_at)>new Date(P.created_at)?I:P);r(),i(),s(),qe.success(e("rewardClaimed",{name:y.data.data.title})),a&&a(y.data.data,j),d(!1),E(void 0)}},p=()=>l.filter(y=>y.type===Fn.REWARD_RECEPTION).map(y=>t==null?void 0:t.find(x=>x.uuid===y.data.reward.uuid));return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsxs("div",{className:"flex h-16 items-center justify-between",children:[u.jsx("h1",{children:e("rewards")}),u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsx("p",{children:v?0:h.credit_balance.balance}),u.jsx("p",{className:"text-sm text-core-gray-500",children:f.custom_credit_name?f.custom_credit_name:e("points")})]})]})}),u.jsx(bt,{children:n||v?u.jsx(Go,{rows:1}):u.jsxs("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:[u.jsx("p",{className:"text-sm font-light text-core-gray-500",children:e("redeemableRewards")}),t.filter(y=>y.required_credits<=h.credit_balance.balance).map(y=>u.jsx(Ja,{reward:y,selected:c,setSelected:E},y.uuid)),!!t.filter(y=>y.required_credits>h.credit_balance.balance).length&&u.jsx("p",{className:"mt-2 text-sm font-light text-core-gray-500",children:e("saveABitMore")}),t.filter(y=>y.required_credits>h.credit_balance.balance).map(y=>u.jsx(Ja,{reward:y,selected:c,setSelected:E,disabled:!0},y.uuid))]})}),!!p().length&&!n&&u.jsx(Ot,{children:u.jsx("div",{children:u.jsx(wf,{children:p().map((y,x)=>u.jsxs("div",{className:" flex items-center justify-between rounded-lg border border-core-primary-100 bg-core-primary-50 p-2 text-xs",children:[u.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[u.jsx("img",{src:y.media.value??"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-8 w-8 rounded object-cover object-center"}),u.jsx("p",{className:"truncate",children:y.title??y.description})]}),u.jsxs("p",{className:"text-core-primary-500",children:[y.required_credits," ",f.custom_credit_name?f.custom_credit_name:e("points")]})]},`${x}-${y.uuid}`))},p().length)})})]}),u.jsx(xr,{title:e("confirmRewardRedemption"),isOpen:o,primaryAction:{label:e("confirm"),action:g},secondaryAction:{label:e("cancel"),action:()=>d(!1)},onClose:()=>d(!1),children:u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{children:e("redeemRewardForPoints",{title:c==null?void 0:c.title,credits:c==null?void 0:c.required_credits,customCreditName:f.custom_credit_name?f.custom_credit_name:e("points")})}),c&&u.jsx(Ja,{reward:c,selected:c,setSelected:E,readOnly:!0})]})})]})}function Cw({children:e}){return u.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:u.jsx("div",{className:"h-full max-h-full",children:e})})}function Aw(){const e=Et(),{t}=$e(),{pathname:n}=Jt(),[r,i]=O.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 O.useEffect(()=>{(n==="/portal"||n==="/portal/")&&e(s[r].pathname);const a=n.split("/")[n.split("/").length-1];if(a!==s[r].pathname){const l=s.find(f=>f.pathname===a);l&&i(l.id)}},[e]),u.jsxs("div",{className:"relative h-full w-full select-none overflow-auto",children:[u.jsx(ow,{children:s.map(a=>u.jsx(sw,{id:a.id,label:a.label,icon:a.icon,activeTab:r,setActiveTab:i,pathname:a.pathname},a.id))}),u.jsxs(Cw,{children:[u.jsx(bw,{}),u.jsxs(vn,{children:[u.jsx(Oe,{path:"/rewards",element:u.jsx(mn,{element:u.jsx(Ew,{})})}),u.jsx(Oe,{path:"/vouchers",element:u.jsx(mn,{element:u.jsx(xw,{})})})]})]})]})}function Sw(){const e=Et(),{session:t}=nt();return O.useEffect(()=>{t&&!t.contact&&e("identifier")},[]),t&&u.jsx(Aw,{})}function Tw(){return u.jsx(Mt,{children:u.jsx(wo,{state:{redirectRoute:`${qt.PORTAL}`}})})}function ji(){const{state:e}=Jt(),[t,n]=O.useState(""),{session:r,mutate:i}=nt(),s=Et(),{t:a}=$e(),[l,f]=O.useState(!1),[m,h]=O.useState(!1),v=async()=>{if(r){f(!0);try{await ho.setContact(r.uuid,{email:t}),await i(),qe.success(a("contactSavedToSession")),e&&e.redirectRoute&&s(e.redirectRoute,{state:e})}catch{h(!0)}f(!1)}};return u.jsxs(u.Fragment,{children:[u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsxs("div",{className:"flex h-16 items-center",children:[u.jsx(rt,{label:"",variant:"link-gray",before:u.jsx(Ct,{icon:"caret-left",size:"md"}),onClick:()=>s("../")}),u.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})})]})}),u.jsx(bt,{children:u.jsx(vo,{label:a("emailAddress"),onChange:c=>n(c.target.value)})}),u.jsx(Ot,{children:u.jsx(rt,{label:a("continue"),className:"w-full",onClick:v,disabled:!t||l})})]})}),u.jsx(xr,{title:`${a("new")} ${a("emailAddress").toLowerCase()}`,isOpen:m,onClose:()=>h(!1),primaryAction:{label:a("confirm"),action:()=>{s("new-contact",{state:{...e,email:t}})}},secondaryAction:{label:a("cancel"),action:()=>h(!1)},children:u.jsx("p",{children:a("continueWithEmail",{email:t})})})]})}function jw(){const[e,t]=O.useState(""),{session:n,mutate:r}=nt(),i=Et(),{t:s}=$e(),a=async()=>{n&&(await ir.create(e),await r(),qe.success(s("contactSavedToSession")),i("../"))};return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:s("fillInXBelow",{x:s("emailAddress").toLowerCase()})})})}),u.jsx(bt,{children:u.jsx(vo,{label:s("emailAddress"),onChange:l=>t(l.target.value)})}),u.jsx(Ot,{children:u.jsx(rt,{label:s("continue"),className:"w-full",onClick:a,disabled:!e})})]})})}function Tn(){const{state:e}=Jt(),{t}=$e(),{session:n,mutate:r}=nt(),i=Et(),s=En(),[a,l]=O.useState(!1),[f,m]=O.useState([]),[h,v]=O.useState({}),[c,E]=O.useState(!1);O.useEffect(()=>{f.length||ca.get().then(g=>{const p=g.data.data.filter(x=>x.strategy!==Yn.FUNCTIONAL);m(p);const y=p.reduce((x,C)=>({...x,[C.name]:C.strategy===Yn.OPT_OUT}),{});v(y)})},[]);const o=g=>{Object.hasOwn(h,g)?v({...h,[g]:!h[g]}):v({...h,[g]:!0})},d=async()=>{l(!0),await ir.create(e.email),await ca.update({values:h}),e.contactIdentifier&&await ir.linkIdentifier(e.contactIdentifier,e.email),await du(n.uuid,e.email,e.contactIdentifier,s.onContactLink),await r(),qe.success(t("contactForEmailCreated",{email:e.email})),qe.success(t("contactIdentifierLinkedToEmail",{value:e.contactIdentifier,email:e.email})),e&&e.redirectRoute&&i(e.redirectRoute,{state:e}),l(!1)};return!e||!e.email&&!e.contactIdentifier?u.jsx(Ur,{to:"../../"}):u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:t("termsAndConditions")})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex flex-col gap-4 text-sm",children:[u.jsxs("div",{children:[u.jsx("p",{children:t("marketingSubscriptions")}),u.jsx("p",{className:"text-core-gray-500",children:t("chooseCommunicationPreferences")})]}),f.map(g=>u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Yo,{defaultChecked:g.strategy===Yn.OPT_OUT,onChange:()=>o(g.name)}),u.jsx("p",{children:g.name})]},g.id)),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(mo,{required:!0,onChange:g=>E(g)}),u.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"})}})]})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:t("create"),className:"w-full",onClick:d,disabled:!c||a})})]})})}function Oi(){const{t:e}=$e(),{state:t}=Jt(),{session:n,mutate:r}=nt(),i=Et(),s=En(),[a,l]=O.useState(!1),[f,m]=O.useState(""),[h,v]=O.useState(!1);if(!t||!t.contactIdentifier)return u.jsx(Ur,{to:"../"});const c=async()=>{l(!0);try{await ir.linkIdentifier(t.contactIdentifier,f),await du(n.uuid,f,t.contactIdentifier,s.onContactLink),await r(),qe.success(e("contactIdentifierLinkedToEmail",{value:t.contactIdentifier,email:f})),t&&t.redirectRoute&&i(t.redirectRoute,{state:t})}catch{v(!0)}l(!1)};return u.jsxs(Mt,{children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:e("linkContact")})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex flex-col gap-3",children:[u.jsx(Y0,{body:e("noEmailAddressLinkedToIdentifier")}),u.jsx(vo,{label:e("emailAddress"),onChange:E=>m(E.target.value)})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("continue"),className:"w-full",onClick:c,disabled:!f||a})})]}),u.jsx(xr,{title:`${e("new")} ${e("emailAddress").toLowerCase()}`,isOpen:h,onClose:()=>v(!1),primaryAction:{label:e("confirm"),action:()=>i("new-contact",{state:{...t,email:f}})},secondaryAction:{label:e("cancel"),action:()=>v(!1)},children:u.jsx("p",{children:e("continueWithEmail",{email:f})})})]})}function Ow(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(Sw,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/register",element:u.jsx(jw,{})}),u.jsx(Oe,{path:"/identifier",element:u.jsx(Tw,{})}),u.jsx(Oe,{path:"/identifier/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/identifier/link-identifier/new-contact",element:u.jsx(Tn,{})})]})}function Iw(){return u.jsx(Mt,{children:u.jsx(wo,{state:{redirectRoute:`${qt.POINTS_TRANSACTION}/transaction`}})})}function Nw(){const{t:e}=$e(),{session:{input_data:t}}=nt(),{contact:n,isLoading:r,mutate:i}=xn(),[s,a]=O.useState(),[l,f]=O.useState(!1),[m,h]=O.useState(""),v=async()=>{if(f(!0),t.amount_in_cents)try{const{data:{data:c}}=await p0.create({unit_value:t.amount_in_cents/100});i(),a(c)}catch(c){h(c.response.data.message)}else h(e("xIsRequired",{x:"Amount in cents"})+".");f(!1)};return O.useEffect(()=>{!l&&!s&&!m&&(async()=>await v())()},[]),r?u.jsx(u.Fragment,{}):n?u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.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})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[u.jsx("div",{className:"flex h-full flex-col items-center gap-2 p-6",children:m?u.jsx("p",{className:"text-core-red-500",children:m}):u.jsx("div",{className:"flex h-full items-center justify-center gap-1 text-4xl font-bold",children:s?u.jsxs(u.Fragment,{children:["+",u.jsx(Kn,{value:s.credits,start:0})]}):u.jsx("div",{className:"text-core-primary-500",children:u.jsx(br,{className:"h-[32px] w-[32px]"})})})}),u.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx("p",{className:"font-light text-gray-500",children:`${e("new")} ${e("balance").toLowerCase()}`}),u.jsx(Kn,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(s?s.credits:0)})]})})]})})]})}):u.jsx(Ur,{to:"../"})}function Pw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(Iw,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/transaction",element:u.jsx(mn,{element:u.jsx(Nw,{})})})]})}function Sf(){const{session:e}=nt();return u.jsx(Mt,{children:u.jsx(wo,{state:{redirectRoute:e.type===zt.TOP_UP_PREPAID?`${qt.TOP_UP_PREPAID}/top-up`:`${qt.PAY_PREPAID}/pay`}})})}function kw(){const{t:e}=$e(),{balance:t,mutate:n}=ou(),{mutate:r}=nt(),{contact:i}=xn(),s=async a=>{a&&(await iu.transaction({amount_in_cents:a}),await n(),await r(),qe.success(e("prepaidTransactionCreated")))};return!t||!i?u.jsx(u.Fragment,{}):u.jsx(Mt,{children:u.jsx(Pu,{title:`${i.current_display_values.firstname} ${i.current_display_values.lastname}`,balance:(t==null?void 0:t.balance_in_cents)??0,transaction:s})})}function Dw(){const{t:e}=$e(),{balance:t,mutate:n}=ou(),{contact:r}=xn(),{session:{input_data:i,currency:s,events:a},mutate:l}=nt(),f=i.amount_in_cents??0;if(!t||!r)return u.jsx(u.Fragment,{});const m=async()=>{f&&(await iu.transaction({amount_in_cents:-v()}),await n(),await l(),qe.success(e("prepaidTransactionCreated")))},h=()=>{let c=0;return a.filter(o=>o.type===Fn.PREPAID_TRANSACTION).forEach(o=>{c+=o.data.amount_in_cents}),c},v=()=>Math.min(f+h(),t==null?void 0:t.balance_in_cents);return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:`${r.current_display_values.firstname} ${r.current_display_values.lastname}`})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex h-full flex-col gap-4",children:[u.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx("p",{className:"font-light text-gray-500",children:e("prepaidBalance")}),u.jsx(Kn,{value:t.balance_in_cents,start:t.balance_in_cents+h(),currency:s,asCurrency:!0})]})}),u.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:u.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[u.jsx("p",{className:"text-sm font-light text-gray-500",children:e("amountToPay")}),u.jsx("div",{className:"text-5xl font-bold",children:u.jsx(Kn,{value:v(),start:f,currency:s,asCurrency:!0})})]})})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("confirmAndPay",{amount:vr(v(),s)}),className:"w-full",onClick:m,disabled:!f||!v()})})]})})}function Rw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Sf,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/pay",element:u.jsx(mn,{element:u.jsx(Dw,{})})})]})}function Bw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Sf,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/top-up",element:u.jsx(mn,{element:u.jsx(kw,{})})})]})}function Mw(){const{t:e}=$e(),[t,n]=O.useState(""),[r,i]=O.useState(!1),[s,a]=O.useState(!1),[l,f]=O.useState(!1),[m,h]=O.useState(),{session:v}=nt(),c=Et(),E=O.useCallback(async()=>{if(v){i(!0);const{data:{data:o}}=await la.get(t);h(o),o.contact||v.contact?c("redeem",{state:{voucher:o}}):f(!0),i(!1)}},[t,v]);return O.useEffect(()=>{t&&!r&&!s&&E().then()},[t,r,s,E]),u.jsxs(u.Fragment,{children:[u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("scanOrEnterX",{x:e("voucherCode").toLowerCase()})})})}),u.jsx(bt,{children:u.jsx(Ao,{dataSetter:n,setDefer:a,label:e("code")})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("submit"),className:"w-full",onClick:E})})]})}),u.jsx(xr,{title:"Voucher not linked to contact",isOpen:l,onClose:()=>f(!1),primaryAction:{label:e("linkToContact"),action:()=>c("link",{state:{voucher:m}})},secondaryAction:{label:e("cancel"),action:()=>f(!1)},children:u.jsx("p",{children:e("linkVoucherWithCodeToContact",{code:t})})})]})}function _w(){const{state:e}=Jt(),t=Et(),{t:n}=$e(),{session:r,mutate:i}=nt(),{onRedeemVoucher:s}=En(),[a,l]=O.useState(e.voucher);if(!a)return u.jsx(u.Fragment,{});const f=O.useCallback(async()=>{if(!a.contact&&!r.contact)return t("../link",{state:e});const{data:{data:m}}=await la.redeemByCode(a.code);l(m),s&&s(m);const h=await i(),v=h==null?void 0:h.data.data.events;go(v)},[r,a]);return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:"Voucher"})})}),u.jsx(bt,{children:u.jsx("div",{children:u.jsx(Ha,{voucher:a,setSelected:()=>{}})})}),u.jsx(Ot,{children:u.jsx(rt,{label:n("redeemVoucher"),className:"w-full",onClick:f,disabled:a.status!==yr.ACTIVE})})]})})}function Lw(){const{state:{voucher:e}}=Jt();return u.jsx(Mt,{children:u.jsx(wo,{state:{voucher:e,redirectRoute:`${qt.VOUCHER}/redeem`}})})}function Fw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Mw,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link",element:u.jsx(Lw,{})}),u.jsx(Oe,{path:"/link/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/redeem",element:u.jsx(_w,{})})]})}const Vw="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 qw(){const e=Et(),{t}=$e(),n=En();return O.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),u.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[u.jsxs("div",{className:"flex items-center justify-center gap-3",children:[u.jsx("img",{alt:"logo",src:Vw,className:"z-10 h-16 w-16 hover:animate-spin"}),u.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",u.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?u.jsx(rt,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):u.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function Uw(){const e=Et(),{t}=$e(),{sessionUuid:n}=En(),{session:r,isLoading:i,mutate:s}=nt();return O.useEffect(()=>{if(!i&&r){const a=r.type in qt?`/${r.type.replaceAll("_","-").toLowerCase()}`:"/";e(a)}},[i,s,e,r]),i?u.jsx("div",{className:"flex h-screen items-center justify-center text-core-gray-500",children:u.jsx(br,{className:"h-[48px] w-[48px]"})}):u.jsx("div",{className:"text-error-600 flex w-full items-center justify-center",children:`${t("portalSessionNotFound")} (${n})`})}function Tf(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(qw,{})}),u.jsx(Oe,{path:":portalSessionUuid",element:u.jsx(Uw,{})}),u.jsx(Oe,{path:`${qt.REDEEM_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.REDEEM_GIFTCARD,element:u.jsx(lw,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.TOP_UP_GIFTCARD,element:u.jsx(uw,{})})}),u.jsx(Oe,{path:`${qt.PORTAL}/*`,element:u.jsx(ar,{type:zt.PORTAL,element:u.jsx(Ow,{})})}),u.jsx(Oe,{path:`${qt.PAY_PREPAID}/*`,element:u.jsx(ar,{type:zt.PAY_PREPAID,element:u.jsx(Rw,{})})}),u.jsx(Oe,{path:`${qt.POINTS_TRANSACTION}/*`,element:u.jsx(ar,{type:zt.POINTS_TRANSACTION,element:u.jsx(Pw,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_PREPAID}/*`,element:u.jsx(ar,{type:zt.TOP_UP_PREPAID,element:u.jsx(Bw,{})})}),u.jsx(Oe,{path:`${qt.VOUCHER}/*`,element:u.jsx(ar,{type:zt.VOUCHER,element:u.jsx(Fw,{})})})]})}function mn({element:e}){const{session:t}=nt();return t.contact?e:u.jsx(Ur,{to:"/"})}function ar({type:e,element:t}){const{session:n}=nt();if(n)return e===n.type?t:u.jsx(Ur,{to:"/"})}function Gw(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),a=i-s,l=(i+s)/2;let f=0;a!==0&&(f=a/(1-Math.abs(2*l-1)));let m=0;return a!==0&&(i===t?m=((n-r)/a+(n<r?6:0))*60:i===n?m=((r-t)/a+2)*60:m=((t-n)/a+4)*60),{hue:m,saturation:f,lightness:l}}function Ko(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 a=0,l=0,f=0;return e<60?(a=r,l=i,f=0):e<120?(a=i,l=r,f=0):e<180?(a=0,l=r,f=i):e<240?(a=0,l=i,f=r):e<300?(a=i,l=0,f=r):(a=r,l=0,f=i),a=Math.round((a+s)*255),l=Math.round((l+s)*255),f=Math.round((f+s)*255),`#${a.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}`}function jf(e){const{hue:t,saturation:n,lightness:r}=Gw(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}],a={},l={},f={},m={};s.forEach(h=>{const v=(h.min+h.max)/2/100;a[h.key]=Ko(t,n,v),f[h.key]=Ko(0,n,v),m[h.key]=Ko(120,n,v),l[h.key]=Ko(t,i,v)});for(const h of s)if(r*100>=h.min&&r*100<=h.max){a[h.key]=e;break}return{primaryPalette:a,redPalette:f,greenPalette:m,grayPalette:l}}const Of=e=>{const t={primary:e.primary_color,secondary:e.secondary_color,tertiary:e.tertiary_color,quarternary:e.quarternary_color},n=document.querySelector(":root");for(const a in t){const{primaryPalette:l}=jf(t[a]);for(const f in l)n.style.setProperty(`--${a}-${f}`,l[f])}const{grayPalette:r,redPalette:i,greenPalette:s}=jf(t.primary);for(const a in r)n.style.setProperty(`--gray-${a}`,r[a]);for(const a in i)n.style.setProperty(`--red-${a}`,i[a]);for(const a in s)n.style.setProperty(`--green-${a}`,s[a])};function za(e){"@babel/helpers - typeof";return za=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},za(e)}function If(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":za(XMLHttpRequest))==="object"}function Yw(e){return!!e&&typeof e.then=="function"}function Kw(e){return Yw(e)?e:Promise.resolve(e)}function $w(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 Za={exports:{}},$o={exports:{}},Nf;function Qw(){return Nf||(Nf=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof lr<"u"&&lr,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(a){var l=typeof s<"u"&&s||typeof self<"u"&&self||typeof l<"u"&&l,f={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function m(N){return N&&DataView.prototype.isPrototypeOf(N)}if(f.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=ArrayBuffer.isView||function(N){return N&&h.indexOf(Object.prototype.toString.call(N))>-1};function c(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(N)||N==="")throw new TypeError('Invalid character in header field name: "'+N+'"');return N.toLowerCase()}function E(N){return typeof N!="string"&&(N=String(N)),N}function o(N){var q={next:function(){var W=N.shift();return{done:W===void 0,value:W}}};return f.iterable&&(q[Symbol.iterator]=function(){return q}),q}function d(N){this.map={},N instanceof d?N.forEach(function(q,W){this.append(W,q)},this):Array.isArray(N)?N.forEach(function(q){this.append(q[0],q[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(q){this.append(q,N[q])},this)}d.prototype.append=function(N,q){N=c(N),q=E(q);var W=this.map[N];this.map[N]=W?W+", "+q:q},d.prototype.delete=function(N){delete this.map[c(N)]},d.prototype.get=function(N){return N=c(N),this.has(N)?this.map[N]:null},d.prototype.has=function(N){return this.map.hasOwnProperty(c(N))},d.prototype.set=function(N,q){this.map[c(N)]=E(q)},d.prototype.forEach=function(N,q){for(var W in this.map)this.map.hasOwnProperty(W)&&N.call(q,this.map[W],W,this)},d.prototype.keys=function(){var N=[];return this.forEach(function(q,W){N.push(W)}),o(N)},d.prototype.values=function(){var N=[];return this.forEach(function(q){N.push(q)}),o(N)},d.prototype.entries=function(){var N=[];return this.forEach(function(q,W){N.push([W,q])}),o(N)},f.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function g(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function p(N){return new Promise(function(q,W){N.onload=function(){q(N.result)},N.onerror=function(){W(N.error)}})}function y(N){var q=new FileReader,W=p(q);return q.readAsArrayBuffer(N),W}function x(N){var q=new FileReader,W=p(q);return q.readAsText(N),W}function C(N){for(var q=new Uint8Array(N),W=new Array(q.length),te=0;te<q.length;te++)W[te]=String.fromCharCode(q[te]);return W.join("")}function S(N){if(N.slice)return N.slice(0);var q=new Uint8Array(N.byteLength);return q.set(new Uint8Array(N)),q.buffer}function j(){return this.bodyUsed=!1,this._initBody=function(N){this.bodyUsed=this.bodyUsed,this._bodyInit=N,N?typeof N=="string"?this._bodyText=N:f.blob&&Blob.prototype.isPrototypeOf(N)?this._bodyBlob=N:f.formData&&FormData.prototype.isPrototypeOf(N)?this._bodyFormData=N:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)?this._bodyText=N.toString():f.arrayBuffer&&f.blob&&m(N)?(this._bodyArrayBuffer=S(N.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(N)||v(N))?this._bodyArrayBuffer=S(N):this._bodyText=N=Object.prototype.toString.call(N):this._bodyText="",this.headers.get("content-type")||(typeof N=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var N=g(this);if(N)return N;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 N=g(this);return N||(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(y)}),this.text=function(){var N=g(this);if(N)return N;if(this._bodyBlob)return x(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(N){var q=N.toUpperCase();return I.indexOf(q)>-1?q:N}function D(N,q){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');q=q||{};var W=q.body;if(N instanceof D){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,q.headers||(this.headers=new d(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!W&&N._bodyInit!=null&&(W=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=q.credentials||this.credentials||"same-origin",(q.headers||!this.headers)&&(this.headers=new d(q.headers)),this.method=P(q.method||this.method||"GET"),this.mode=q.mode||this.mode||null,this.signal=q.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")&&(q.cache==="no-store"||q.cache==="no-cache")){var te=/([?&])_=[^&]*/;if(te.test(this.url))this.url=this.url.replace(te,"$1_="+new Date().getTime());else{var X=/\?/;this.url+=(X.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}D.prototype.clone=function(){return new D(this,{body:this._bodyInit})};function _(N){var q=new FormData;return N.trim().split("&").forEach(function(W){if(W){var te=W.split("="),X=te.shift().replace(/\+/g," "),ne=te.join("=").replace(/\+/g," ");q.append(decodeURIComponent(X),decodeURIComponent(ne))}}),q}function Q(N){var q=new d,W=N.replace(/\r?\n[\t ]+/g," ");return W.split("\r").map(function(te){return te.indexOf(`
103
+ `,"%p":we=>we.tm_hour>=0&&we.tm_hour<12?"AM":"PM","%S":we=>De(we.tm_sec,2),"%t":()=>" ","%u":we=>we.tm_wday||7,"%U":we=>{var Te=we.tm_yday+7-we.tm_wday;return De(Math.floor(Te/7),2)},"%V":we=>{var Te=Math.floor((we.tm_yday+7-(we.tm_wday+6)%7)/7);if((we.tm_wday+371-we.tm_yday-2)%7<=2&&Te++,Te){if(Te==53){var yt=(we.tm_wday+371-we.tm_yday)%7;yt!=4&&(yt!=3||!ts(we.tm_year))&&(Te=1)}}else{Te=52;var jt=(we.tm_wday+7-we.tm_yday-1)%7;(jt==4||jt==5&&ts(we.tm_year%400-1))&&Te++}return De(Te,2)},"%w":we=>we.tm_wday,"%W":we=>{var Te=we.tm_yday+7-(we.tm_wday+6)%7;return De(Math.floor(Te/7),2)},"%y":we=>(we.tm_year+1900).toString().substring(2),"%Y":we=>we.tm_year+1900,"%z":we=>{var Te=we.tm_gmtoff,yt=Te>=0;return Te=Math.abs(Te)/60,Te=Te/60*100+Te%60,(yt?"+":"-")+("0000"+Te).slice(-4)},"%Z":we=>we.tm_zone,"%%":()=>"%"};ie=ie.replace(/%%/g,"\0\0");for(var ge in ut)ie.includes(ge)&&(ie=ie.replace(new RegExp(ge,"g"),ut[ge](ee)));ie=ie.replace(/\0\0/g,"%");var Pt=z2(ie);return Pt.length>w?0:(Z2(Pt,b),Pt.length-1)},ex=(b,w,T,k,Y)=>X2(b,w,T,k);_t=r.InternalError=class extends Error{constructor(b){super(b),this.name="InternalError"}},Gt(),an=r.BindingError=class extends Error{constructor(b){super(b),this.name="BindingError"}},kn(),Ge(),Ub(),Hf=r.UnboundTypeError=$b(Error,"UnboundTypeError"),Zb();var tx={s:me,u:de,b:Ne,g:Qe,q:We,K:tt,f:ze,Y:sn,e:fe,ha:Wt,U:en,ba:at,fa:Qb,ea:Hb,w:Jb,aa:Zf,x:t2,h:n2,O:i2,P:o2,t:a2,o:c2,ga:l2,N:d2,C:v2,A:w2,ia:b2,ca:x2,E:E2,ka:sc,la:S2,M:N2,Q:P2,R:k2,da:D2,B:R2,$:B2,Z:L2,W:q2,X:U2,_:G2,T:Y2,L:Q2,F:yx,D:sx,G:mx,m:vx,a:nx,d:cx,p:ox,k:gx,I:hx,v:dx,H:px,z:bx,S:Ex,l:lx,j:ax,c:ix,n:rx,J:fx,r:wx,i:ux,y:xx,ja:W2,V:ex},ht=Z(),Mn=r._free=b=>(Mn=r._free=ht.oa)(b),fc=r._malloc=b=>(fc=r._malloc=ht.pa)(b),ah=b=>(ah=ht.ra)(b),lt=(b,w)=>(lt=ht.sa)(b,w),Bi=b=>(Bi=ht.ta)(b),pt=()=>(pt=ht.ua)(),gt=b=>(gt=ht.va)(b),ch=b=>(ch=ht.wa)(b),lh=b=>(lh=ht.xa)(b),uh=(b,w,T)=>(uh=ht.ya)(b,w,T),dh=b=>(dh=ht.za)(b);r.dynCall_viijii=(b,w,T,k,Y,ee,ie)=>(r.dynCall_viijii=ht.Aa)(b,w,T,k,Y,ee,ie),r.dynCall_jiji=(b,w,T,k,Y)=>(r.dynCall_jiji=ht.Ba)(b,w,T,k,Y);var fh=r.dynCall_jiiii=(b,w,T,k,Y)=>(fh=r.dynCall_jiiii=ht.Ca)(b,w,T,k,Y);r.dynCall_iiiiij=(b,w,T,k,Y,ee,ie)=>(r.dynCall_iiiiij=ht.Da)(b,w,T,k,Y,ee,ie),r.dynCall_iiiiijj=(b,w,T,k,Y,ee,ie,oe,ge)=>(r.dynCall_iiiiijj=ht.Ea)(b,w,T,k,Y,ee,ie,oe,ge),r.dynCall_iiiiiijj=(b,w,T,k,Y,ee,ie,oe,ge,be)=>(r.dynCall_iiiiiijj=ht.Fa)(b,w,T,k,Y,ee,ie,oe,ge,be);function nx(b,w){var T=pt();try{return ft(b)(w)}catch(k){if(gt(T),k!==k+0)throw k;lt(1,0)}}function rx(b,w,T,k){var Y=pt();try{ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function ix(b,w,T){var k=pt();try{ft(b)(w,T)}catch(Y){if(gt(k),Y!==Y+0)throw Y;lt(1,0)}}function ox(b,w,T,k){var Y=pt();try{return ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function sx(b,w,T,k,Y){var ee=pt();try{return ft(b)(w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function ax(b,w){var T=pt();try{ft(b)(w)}catch(k){if(gt(T),k!==k+0)throw k;lt(1,0)}}function cx(b,w,T){var k=pt();try{return ft(b)(w,T)}catch(Y){if(gt(k),Y!==Y+0)throw Y;lt(1,0)}}function lx(b){var w=pt();try{ft(b)()}catch(T){if(gt(w),T!==T+0)throw T;lt(1,0)}}function ux(b,w,T,k,Y,ee,ie,oe,ge,be,Se){var Ve=pt();try{ft(b)(w,T,k,Y,ee,ie,oe,ge,be,Se)}catch(De){if(gt(Ve),De!==De+0)throw De;lt(1,0)}}function dx(b,w,T,k,Y,ee,ie){var oe=pt();try{return ft(b)(w,T,k,Y,ee,ie)}catch(ge){if(gt(oe),ge!==ge+0)throw ge;lt(1,0)}}function fx(b,w,T,k,Y){var ee=pt();try{ft(b)(w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function hx(b,w,T,k,Y,ee){var ie=pt();try{return ft(b)(w,T,k,Y,ee)}catch(oe){if(gt(ie),oe!==oe+0)throw oe;lt(1,0)}}function px(b,w,T,k,Y,ee,ie,oe){var ge=pt();try{return ft(b)(w,T,k,Y,ee,ie,oe)}catch(be){if(gt(ge),be!==be+0)throw be;lt(1,0)}}function gx(b,w,T,k,Y){var ee=pt();try{return ft(b)(w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function mx(b,w,T,k){var Y=pt();try{return ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function yx(b,w,T,k){var Y=pt();try{return ft(b)(w,T,k)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function vx(b){var w=pt();try{return ft(b)()}catch(T){if(gt(w),T!==T+0)throw T;lt(1,0)}}function wx(b,w,T,k,Y,ee,ie,oe){var ge=pt();try{ft(b)(w,T,k,Y,ee,ie,oe)}catch(be){if(gt(ge),be!==be+0)throw be;lt(1,0)}}function bx(b,w,T,k,Y,ee,ie,oe,ge,be,Se,Ve){var De=pt();try{return ft(b)(w,T,k,Y,ee,ie,oe,ge,be,Se,Ve)}catch(Ke){if(gt(De),Ke!==Ke+0)throw Ke;lt(1,0)}}function xx(b,w,T,k,Y,ee,ie,oe,ge,be,Se,Ve,De,Ke,mt,Vt){var ut=pt();try{ft(b)(w,T,k,Y,ee,ie,oe,ge,be,Se,Ve,De,Ke,mt,Vt)}catch(Pt){if(gt(ut),Pt!==Pt+0)throw Pt;lt(1,0)}}function Ex(b,w,T,k,Y){var ee=pt();try{return fh(b,w,T,k,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}var ns;se=function b(){ns||hh(),ns||(se=b)};function hh(){if(he>0||(q(),he>0))return;function b(){ns||(ns=!0,r.calledRun=!0,!x&&(W(),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),te()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),b()},1)):b()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return hh(),t.ready}})();function $1(e){return ga(ma,e)}async function Q1(e,t){return Y1(ma,e,t)}async function W1(e,t){return K1(ma,e,t)}const ed=[["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"]],H1=[...ed,["unknown"]].map(e=>e[0]),Eo=new Map(ed);function J1(e){for(const[t,n]of Eo)if(e===n)return t;return"unknown"}function z1(e){if(td(e))return{width:e.naturalWidth,height:e.naturalHeight};if(nd(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(rd(e))return{width:e.videoWidth,height:e.videoHeight};if(od(e))return{width:e.width,height:e.height};if(ad(e))return{width:e.displayWidth,height:e.displayHeight};if(id(e))return{width:e.width,height:e.height};if(sd(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 td(e){try{return e instanceof HTMLImageElement}catch{return!1}}function nd(e){try{return e instanceof SVGImageElement}catch{return!1}}function rd(e){try{return e instanceof HTMLVideoElement}catch{return!1}}function id(e){try{return e instanceof HTMLCanvasElement}catch{return!1}}function od(e){try{return e instanceof ImageBitmap}catch{return!1}}function sd(e){try{return e instanceof OffscreenCanvas}catch{return!1}}function ad(e){try{return e instanceof VideoFrame}catch{return!1}}function cd(e){try{return e instanceof Blob}catch{return!1}}function Z1(e){try{return e instanceof ImageData}catch{return!1}}function X1(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 ld(e){if(td(e)&&!await ry(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(nd(e)&&!await iy(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ad(e)&&oy(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(rd(e)&&(e.readyState===0||e.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(od(e)&&ay(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=z1(e);if(t===0||n===0)return null;const r=X1(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 ey(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 ld(t)}function ty(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 ny(e){if(cd(e))return await ey(e);if(Z1(e)){if(sy(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return id(e)||sd(e)?ty(e):await ld(e)}async function ry(e){try{return await e.decode(),!0}catch{return!1}}async function iy(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function oy(e){return e.format===null}function sy(e){return e.data.buffer.byteLength===0}function ay(e){return e.width===0&&e.height===0}function ud(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 ri;class ya extends EventTarget{constructor(t={}){var n;super(),D1(this,ri,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(!Eo.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.`);R1(this,ri,r??[]),$1().then(i=>{this.dispatchEvent(new CustomEvent("load",{detail:i}))}).catch(i=>{this.dispatchEvent(new CustomEvent("error",{detail:i}))})}catch(r){throw ud(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return H1.filter(t=>t!=="unknown")}async detect(t){try{const n=await ny(t);if(n===null)return[];let r;try{cd(n)?r=await Q1(n,{tryHarder:!0,formats:Wu(this,ri).map(i=>Eo.get(i))}):r=await W1(n,{tryHarder:!0,formats:Wu(this,ri).map(i=>Eo.get(i))})}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:s,y:a},topRight:{x:l,y:f},bottomLeft:{x:m,y:h},bottomRight:{x:v,y:c}}=i.position,E=Math.min(s,l,m,v),o=Math.min(a,f,h,c),d=Math.max(s,l,m,v),g=Math.max(a,f,h,c);return{boundingBox:new DOMRectReadOnly(E,o,d-E,g-o),rawValue:i.text,format:J1(i.format),cornerPoints:[{x:s,y:a},{x:l,y:f},{x:v,y:c},{x:m,y:h}]}})}catch(n){throw ud(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ri=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=ya);function cy(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 O.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"},O.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 ly(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 O.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"},O.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"}),O.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 uy(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,s]=O.useState(!1);function a(){s(!0),t?r():n(),setTimeout(()=>s(!1),1e3)}return O.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?O.createElement(cy,{disabled:i,onClick:a}):O.createElement(ly,{disabled:i,onClick:a}))}function dy(e){const{onClick:t,className:n,style:r}=e;return O.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},O.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 fy(e){const{onClick:t,className:n,style:r}=e;return O.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},O.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 hy(e){const{status:t,scanning:n,torchToggle:r}=e;function i(s){r(s)}return n&&r?O.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?O.createElement(fy,{onClick:()=>i(!1)}):O.createElement(dy,{onClick:()=>i(!0)})):null}function py(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 O.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"},O.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 gy(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 O.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"},O.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 my(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const s=(n.max-n.min)/3;return O.createElement(O.Fragment,null,O.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},O.createElement(gy,{disabled:i<=n.min,onClick:function(){r(Math.max(i-s,n.min))}})),O.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},O.createElement(py,{disabled:i>=n.max,onClick:function(){r(Math.min(i+s,n.max))}})))}function yy(e){const{scanning:t,loading:n,capabilities:r,border:i=35,onOff:s,torch:a,zoom:l,startScanning:f,stopScanning:m}=e,h="rgba(255, 0, 0, 0.5)";return O.createElement("div",{style:{position:"relative"}},O.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&&O.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",O.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),O.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:h,strokeWidth:3}),O.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:h,strokeWidth:3}),O.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:h,strokeWidth:3}),O.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:h,strokeWidth:3})),s&&O.createElement(uy,{scanning:t,startScanning:f,stopScanning:m}),a&&r.torch&&O.createElement(hy,{scanning:t,status:a.status,torchToggle:a.toggle}),l&&r.zoom&&O.createElement(my,{scanning:t,capabilities:r.zoom,value:l.value,onZoom:l.onChange}))}const vy={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},wy={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},by={width:"100%",height:"100%",position:"relative"},xy={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var Ey=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=i1(window);switch(e.browser){case"chrome":g1(window,e);break;case"firefox":w1(window,e);break;case"safari":C1(window,e);break;default:throw new Error("Unsupported browser")}});const Cy="data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvG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qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";var ii=e=>e instanceof Date,dd=e=>e==null;const fd=e=>typeof e=="object";var hd=e=>!dd(e)&&!Array.isArray(e)&&fd(e)&&!ii(e),pd=e=>dd(e)||!fd(e);function gd(e,t){if(pd(e)||pd(t))return e===t;if(ii(e)&&ii(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 a=t[i];if(ii(s)&&ii(a)||hd(s)&&hd(a)||Array.isArray(s)&&Array.isArray(a)?!gd(s,a):s!==a)return!1}}return!0}function Co(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 Ay(e){var t;const{onScan:n,constraints:r,formats:i=["qr_code"],paused:s=!1,components:a,children:l,styles:f,classNames:m,allowMultiple:h,scanDelay:v}=e,c=O.useRef(null),E=O.useRef(null),o=O.useRef(null),d=O.useMemo(()=>({...vy,...r}),[r]),g=O.useMemo(()=>({...wy,...a}),[a]),[p,y]=O.useState(!1),[x,C]=O.useState(!0),[S,j]=O.useState(d),I=function(){const V=O.useRef(Promise.resolve({type:"stop",data:{}})),K=O.useRef(null),N=O.useRef(null),[q,W]=O.useState({}),[te,X]=O.useState({}),ne=O.useCallback(async(ue,F)=>{var U;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((U=navigator==null?void 0:navigator.mediaDevices)===null||U===void 0?void 0:U.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");Ey();const H=await navigator.mediaDevices.getUserMedia({audio:!1,video:F});ue.srcObject!==void 0?ue.srcObject=H:ue.mozSrcObject!==void 0?ue.mozSrcObject=H:window.URL.createObjectURL?ue.src=window.URL.createObjectURL(H):window.webkitURL?ue.src=window.webkitURL.createObjectURL(H):ue.src=H.id,await Promise.race([ue.play(),new Promise(R=>setTimeout(R,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(R=>setTimeout(R,500));const[A]=H.getVideoTracks();return X(A.getSettings()),W(A.getCapabilities()),K.current=H,N.current=A,{type:"start",data:{videoEl:ue,stream:H,constraints:F}}},[]),re=O.useCallback(async(ue,F)=>{ue.src="",ue.srcObject=null,ue.load();for(const U of F.getTracks())F.removeTrack(U),U.stop();return K.current=null,N.current=null,X({}),{type:"stop",data:{}}},[]),he=O.useCallback(async(ue,{constraints:F,restart:U=!1})=>{if(V.current=V.current.then(H=>{if(H.type==="start"){const{data:{videoEl:A,stream:R,constraints:M}}=H;return U||ue!==A||F!==M?re(A,R).then(()=>ne(ue,F)):H}return ne(ue,F)}),(await V.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[ne,re]),se=O.useCallback(async()=>{if(V.current=V.current.then(ue=>{if(ue.type==="stop")return ue;const{data:{videoEl:F,stream:U}}=ue;return re(F,U)}),(await V.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[re]),ve=O.useCallback(async ue=>{const F=N.current;if(!F)throw new Error("No active video track found.");{ue.advanced&&ue.advanced[0].zoom&&F.getCapabilities().torch&&await F.applyConstraints({advanced:[{torch:!1}]}),await F.applyConstraints(ue);const U=F.getCapabilities(),H=F.getSettings();W(U),X(H)}},[]);return O.useEffect(()=>()=>{(async()=>await se())()},[se]),{capabilities:q,settings:te,startCamera:he,stopCamera:se,updateConstraints:ve}}(),{startScanning:P,stopScanning:D}=function(V){const{videoElementRef:K,onScan:N,onFound:q,retryDelay:W=100,scanDelay:te=0,formats:X=[],audio:ne=!0,allowMultiple:re=!1}=V,he=O.useRef(new ya({formats:X})),se=O.useRef(null),ve=O.useRef(null);O.useEffect(()=>{he.current=new ya({formats:X})},[X]),O.useEffect(()=>{typeof window<"u"&&ne&&(se.current=new Audio(Cy))},[ne]);const ue=O.useCallback(F=>async U=>{if(K.current!==null&&K.current.readyState>1){const{lastScan:H,contentBefore:A,lastScanHadContent:R}=F;if(U-H<W)ve.current=window.requestAnimationFrame(ue(F));else{const M=await he.current.detect(K.current),B=M.some(G=>!A.includes(G.rawValue)),z=M.length>0;let Z=F.lastOnScan;(B||re&&z&&U-Z>=te)&&(ne&&se.current&&se.current.paused&&se.current.play().catch(G=>console.error("Error playing the sound",G)),Z=U,N(M)),z&&q(M),!z&&R&&q(M);const J={lastScan:U,lastOnScan:Z,lastScanHadContent:z,contentBefore:B?M.map(G=>G.rawValue):A};ve.current=window.requestAnimationFrame(ue(J))}}},[K.current,N,q,W]);return{startScanning:O.useCallback(()=>{const F=performance.now(),U={lastScan:F,lastOnScan:F,contentBefore:[],lastScanHadContent:!1};ve.current=window.requestAnimationFrame(ue(U))},[ue]),stopScanning:O.useCallback(()=>{ve.current!==null&&(window.cancelAnimationFrame(ve.current),ve.current=null)},[])}}({videoElementRef:c,onScan:n,onFound:V=>function(K,N,q,W){const te=q;if(te==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const X=N;if(X==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(K.length===0||W===void 0)Co(te);else{const ne=X.offsetWidth,re=X.offsetHeight,he=X.videoWidth,se=X.videoHeight,ve=Math.max(ne/he,re/se),ue=he*ve,F=se*ve,U=ue/he,H=F/se,A=(ne-ue)/2,R=(re-F)/2,M=({x:J,y:G})=>({x:Math.floor(J*U),y:Math.floor(G*H)}),B=({x:J,y:G})=>({x:Math.floor(J+A),y:Math.floor(G+R)}),z=K.map(J=>{const{boundingBox:G,cornerPoints:pe}=J,{x:me,y:ce}=B(M({x:G.x,y:G.y})),{x:de,y:Ee}=M({x:G.width,y:G.height});return{...J,cornerPoints:pe.map(fe=>B(M(fe))),boundingBox:DOMRectReadOnly.fromRect({x:me,y:ce,width:de,height:Ee})}});te.width=X.offsetWidth,te.height=X.offsetHeight;const Z=te.getContext("2d");if(Z===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");W(z,Z)}}(V,c.current,o.current,g.tracker),formats:i,audio:g.audio,allowMultiple:h,retryDelay:g.tracker===void 0?500:10,scanDelay:v});O.useEffect(()=>(y(!0),()=>{y(!1)}),[]),O.useEffect(()=>{p&&(D(),P())},[a==null?void 0:a.tracker]),O.useEffect(()=>{if(!gd(d,S)){const V=d;r!=null&&r.deviceId&&delete V.facingMode,j(V)}},[r]);const _=O.useMemo(()=>({constraints:S,shouldStream:p&&!s}),[S,p,s]),Q=async()=>{const V=c.current;if(V==null)throw new Error("Video should be defined when component is mounted.");const K=E.current;if(K==null)throw new Error("Canvas should be defined when component is mounted.");const N=K.getContext("2d");if(N==null)throw new Error("Canvas should be defined when component is mounted.");if(_.shouldStream){await I.stopCamera(),C(!1);try{await I.startCamera(V,_),V?C(!0):await I.stopCamera()}catch(q){console.error("error",q)}}else K.width=V.videoWidth,K.height=V.videoHeight,N.drawImage(V,0,0,V.videoWidth,V.videoHeight),await I.stopCamera(),C(!1)};O.useEffect(()=>{(async()=>await Q())()},[_]);const $=O.useMemo(()=>_.shouldStream&&x,[_.shouldStream,x]);return O.useEffect(()=>{if($){if(E.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Co(E.current),o.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(Co(o.current),c.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");P()}},[$]),O.createElement("div",{style:{...by,...f==null?void 0:f.container},className:m==null?void 0:m.container},O.createElement("video",{ref:c,style:{...xy,...f==null?void 0:f.video,visibility:s?"hidden":"visible"},className:m==null?void 0:m.video,autoPlay:!0,muted:!0,playsInline:!0}),O.createElement("canvas",{ref:E,style:{display:s?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),O.createElement("canvas",{ref:o,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),O.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},g.finder&&O.createElement(yy,{scanning:x,capabilities:I.capabilities,loading:!1,onOff:g.onOff,zoom:g.zoom&&I.settings.zoom?{value:I.settings.zoom,onChange:async V=>{const K={...S,advanced:[{zoom:V}]};await I.updateConstraints(K)}}:void 0,torch:g.torch?{status:(t=I.settings.torch)!==null&&t!==void 0&&t,toggle:async V=>{const K={...S,advanced:[{torch:V}]};await I.updateConstraints(K)}}:void 0,startScanning:async()=>await Q(),stopScanning:async()=>{await I.stopCamera(),Co(o.current),C(!1)},border:f==null?void 0:f.finderBorder}),l))}function Sy(){const[e,t]=O.useState([]);return O.useEffect(()=>{(async()=>t(await async function(){return(await navigator.mediaDevices.enumerateDevices()).filter(({kind:n})=>n==="videoinput")}()))()},[]),e}function Ao({dataSetter:e,setDefer:t,label:n=""}){const r=O.useRef(null),i=Sy(),[s,a]=e1()??[0,0],l=f=>{e(f[0].rawValue)};return O.useEffect(()=>{a&&a<=332&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[a]),u.jsxs("div",{ref:r,children:[!!i.length&&u.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[u.jsx(jy,{onScan:l}),u.jsx("hr",{})]}),u.jsx(yo,{label:n,autoFocus:!0,placeholder:"CDE2341S",onChange:f=>{t&&t(!0),e(f.target.value)}})]})}const Ty="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 jy({onScan:e}){const[t,n]=O.useState("user");return u.jsxs("div",{className:"relative w-full",children:[u.jsx(Ay,{components:{finder:!1},onScan:e,constraints:{facingMode:t},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-381px)] min-h-[267px] overflow-hidden rounded"}}),u.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(t==="user"?"environment":"user"),children:u.jsx("img",{src:Ty,alt:"camera-switch"})})]})}function Oy({value:e,placeholder:t,open:n,setOpen:r,disabled:i}){return u.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:[u.jsx("span",{className:`text-sm ${i?"text-core-gray-300":"text-core-gray-800"}`,children:e||t}),u.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function Iy({label:e,children:t}){return u.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[u.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:e}),t]})}function va(e){return u.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:e.label})}function Ny(e){const t=O.useRef(null),[n,r]=O.useState(!1),[i,s]=O.useState(e.value??"");ku(t,r);const a=(f,m)=>{s(f),r(!1),e.onChange&&e.onChange(m)},l=O.Children.map(e.children,f=>{if(O.isValidElement(f)){if(f.type===va)return u.jsx("div",{onClick:()=>a(f.props.label,f.props.value),children:f});if(f.type===Iy){const m=O.Children.map(f.props.children,h=>{if(O.isValidElement(h)&&h.type===va)return u.jsx("div",{onClick:()=>a(h.props.label,h.props.value),children:h})});return O.cloneElement(f,{},...m)}}});return u.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[u.jsx(Dt,{description:e.description,disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),u.jsx("div",{children:u.jsxs("div",{className:"relative",children:[u.jsx(Oy,{value:i,placeholder:e.placeholder,open:n,setOpen:r,disabled:e.disabled}),e.children&&u.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:l})]})}),u.jsx(Dt.Helper,{helperText:e.helperText})]})}var Py=Object.defineProperty,ky=(e,t)=>{for(var n in t)Py(e,n,{get:t[n],enumerable:!0})},hn={};ky(hn,{assign:()=>By,colors:()=>zn,createStringInterpolator:()=>ja,skipAnimation:()=>Ed,to:()=>xd,willAdvance:()=>Oa});var wa=si(),Re=e=>oi(e,wa),ba=si();Re.write=e=>oi(e,ba);var So=si();Re.onStart=e=>oi(e,So);var xa=si();Re.onFrame=e=>oi(e,xa);var Ea=si();Re.onFinish=e=>oi(e,Ea);var Ar=[];Re.setTimeout=(e,t)=>{const n=Re.now()+t,r=()=>{const s=Ar.findIndex(a=>a.cancel==r);~s&&Ar.splice(s,1),Jn-=~s?1:0},i={time:n,handler:e,cancel:r};return Ar.splice(md(n),0,i),Jn+=1,yd(),i};var md=e=>~(~Ar.findIndex(t=>t.time>e)||~Ar.length);Re.cancel=e=>{So.delete(e),xa.delete(e),Ea.delete(e),wa.delete(e),ba.delete(e)},Re.sync=e=>{Aa=!0,Re.batchedUpdates(e),Aa=!1},Re.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Re.onStart(n)}return r.handler=e,r.cancel=()=>{So.delete(n),t=null},r};var Ca=typeof window<"u"?window.requestAnimationFrame:()=>{};Re.use=e=>Ca=e,Re.now=typeof performance<"u"?()=>performance.now():Date.now,Re.batchedUpdates=e=>e(),Re.catch=console.error,Re.frameLoop="always",Re.advance=()=>{Re.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):wd()};var Hn=-1,Jn=0,Aa=!1;function oi(e,t){Aa?(t.delete(e),e(0)):(t.add(e),yd())}function yd(){Hn<0&&(Hn=0,Re.frameLoop!=="demand"&&Ca(vd))}function Dy(){Hn=-1}function vd(){~Hn&&(Ca(vd),Re.batchedUpdates(wd))}function wd(){const e=Hn;Hn=Re.now();const t=md(Hn);if(t&&(bd(Ar.splice(0,t),n=>n.handler()),Jn-=t),!Jn){Dy();return}So.flush(),wa.flush(e?Math.min(64,Hn-e):16.667),xa.flush(),ba.flush(),Ea.flush()}function si(){let e=new Set,t=e;return{add(n){Jn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Jn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Jn-=t.size,bd(t,r=>r(n)&&e.add(r)),Jn+=e.size,t=e)}}}function bd(e,t){e.forEach(n=>{try{t(n)}catch(r){Re.catch(r)}})}function Sa(){}var Ry=(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 Nn(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 Ye=(e,t)=>e.forEach(t);function An(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 Xt=e=>xe.und(e)?[]:xe.arr(e)?e:[e];function ai(e,t){if(e.size){const n=Array.from(e);e.clear(),Ye(n,t)}}var ci=(e,...t)=>ai(e,n=>n(...t)),Ta=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),ja,xd,zn=null,Ed=!1,Oa=Sa,By=e=>{e.to&&(xd=e.to),e.now&&(Re.now=e.now),e.colors!==void 0&&(zn=e.colors),e.skipAnimation!=null&&(Ed=e.skipAnimation),e.createStringInterpolator&&(ja=e.createStringInterpolator),e.requestAnimationFrame&&Re.use(e.requestAnimationFrame),e.batchedUpdates&&(Re.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Oa=e.willAdvance),e.frameLoop&&(Re.frameLoop=e.frameLoop)},li=new Set,rn=[],Ia=[],To=0,jo={get idle(){return!li.size&&!rn.length},start(e){To>e.priority?(li.add(e),Re.onStart(My)):(Cd(e),Re(Na))},advance:Na,sort(e){if(To)Re.onFrame(()=>jo.sort(e));else{const t=rn.indexOf(e);~t&&(rn.splice(t,1),Ad(e))}},clear(){rn=[],li.clear()}};function My(){li.forEach(Cd),li.clear(),Re(Na)}function Cd(e){rn.includes(e)||Ad(e)}function Ad(e){rn.splice(_y(rn,t=>t.priority>e.priority),0,e)}function Na(e){const t=Ia;for(let n=0;n<rn.length;n++){const r=rn[n];To=r.priority,r.idle||(Oa(r),r.advance(e),r.idle||t.push(r))}return To=0,Ia=rn,Ia.length=0,rn=t,rn.length>0}function _y(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Ly=(e,t,n)=>Math.min(Math.max(n,e),t),Fy={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},pn="[-+]?\\d*\\.?\\d+",Oo=pn+"%";function Io(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Vy=new RegExp("rgb"+Io(pn,pn,pn)),qy=new RegExp("rgba"+Io(pn,pn,pn,pn)),Uy=new RegExp("hsl"+Io(pn,Oo,Oo)),Gy=new RegExp("hsla"+Io(pn,Oo,Oo,pn)),Yy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ky=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$y=/^#([0-9a-fA-F]{6})$/,Qy=/^#([0-9a-fA-F]{8})$/;function Wy(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=$y.exec(e))?parseInt(t[1]+"ff",16)>>>0:zn&&zn[e]!==void 0?zn[e]:(t=Vy.exec(e))?(Sr(t[1])<<24|Sr(t[2])<<16|Sr(t[3])<<8|255)>>>0:(t=qy.exec(e))?(Sr(t[1])<<24|Sr(t[2])<<16|Sr(t[3])<<8|jd(t[4]))>>>0:(t=Yy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Qy.exec(e))?parseInt(t[1],16)>>>0:(t=Ky.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Uy.exec(e))?(Sd(Td(t[1]),No(t[2]),No(t[3]))|255)>>>0:(t=Gy.exec(e))?(Sd(Td(t[1]),No(t[2]),No(t[3]))|jd(t[4]))>>>0:null}function Pa(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 Sd(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=Pa(i,r,e+1/3),a=Pa(i,r,e),l=Pa(i,r,e-1/3);return Math.round(s*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function Sr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Td(e){return(parseFloat(e)%360+360)%360/360}function jd(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function No(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Od(e){let t=Wy(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 ui=(e,t,n)=>{if(xe.fun(e))return e;if(xe.arr(e))return ui({range:e,output:t,extrapolate:n});if(xe.str(e.output[0]))return ja(e);const r=e,i=r.output,s=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",l=r.extrapolateRight||r.extrapolate||"extend",f=r.easing||(m=>m);return m=>{const h=Jy(m,s);return Hy(m,s[h],s[h+1],i[h],i[h+1],f,a,l,r.map)}};function Hy(e,t,n,r,i,s,a,l,f){let m=f?f(e):e;if(m<t){if(a==="identity")return m;a==="clamp"&&(m=t)}if(m>n){if(l==="identity")return m;l==="clamp"&&(m=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?m=-m:n===1/0?m=m-t:m=(m-t)/(n-t),m=s(m),r===-1/0?m=-m:i===1/0?m=m+r:m=m*(i-r)+r,m)}function Jy(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var zy=(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 Ly(0,1,i/e)},Po=1.70158,ko=Po*1.525,Id=Po+1,Nd=2*Math.PI/3,Pd=2*Math.PI/4.5,Do=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,Zy={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=>Id*e*e*e-Po*e*e,easeOutBack:e=>1+Id*Math.pow(e-1,3)+Po*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((ko+1)*2*e-ko)/2:(Math.pow(2*e-2,2)*((ko+1)*(e*2-2)+ko)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Nd),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Nd)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Pd))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Pd)/2+1,easeInBounce:e=>1-Do(1-e),easeOutBounce:Do,easeInOutBounce:e=>e<.5?(1-Do(1-2*e))/2:(1+Do(2*e-1))/2,steps:zy},di=Symbol.for("FluidValue.get"),Tr=Symbol.for("FluidValue.observers"),on=e=>!!(e&&e[di]),Qt=e=>e&&e[di]?e[di]():e,kd=e=>e[Tr]||null;function Xy(e,t){e.eventObserved?e.eventObserved(t):e(t)}function fi(e,t){const n=e[Tr];n&&n.forEach(r=>{Xy(r,t)})}var Dd=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ev(this,e)}},ev=(e,t)=>Rd(e,di,t);function jr(e,t){if(e[di]){let n=e[Tr];n||Rd(e,Tr,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function hi(e,t){const n=e[Tr];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Tr]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Rd=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ro=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,tv=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Bd=new RegExp(`(${Ro.source})(%|[a-z]+)`,"i"),nv=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Bo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Md=e=>{const[t,n]=rv(e);if(!t||Ta())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&&Bo.test(n))return Md(n);if(n)return n}return e},rv=e=>{const t=Bo.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ka,iv=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,_d=e=>{ka||(ka=zn?new RegExp(`(${Object.keys(zn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>Qt(s).replace(Bo,Md).replace(tv,Od).replace(ka,Od)),n=t.map(s=>s.match(Ro).map(Number)),i=n[0].map((s,a)=>n.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(s=>ui({...e,output:s}));return s=>{var f;const a=!Bd.test(t[0])&&((f=t.find(m=>Bd.test(m)))==null?void 0:f.replace(Ro,""));let l=0;return t[0].replace(Ro,()=>`${i[l++](s)}${a||""}`).replace(nv,iv)}},Da="react-spring: ",Ld=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Da}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},ov=Ld(console.warn);function sv(){ov(`${Da}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var av=Ld(console.warn);function cv(){av(`${Da}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 Mo(e){return xe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Ta()&&Bo.test(e)||e in(zn||{}))}var Ra=Ta()?O.useEffect:O.useLayoutEffect,lv=()=>{const e=O.useRef(!1);return Ra(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Fd(){const e=O.useState()[1],t=lv();return()=>{t.current&&e(Math.random())}}function uv(e,t){const[n]=O.useState(()=>({inputs:t,result:e()})),r=O.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&dv(t,s.inputs)||(s={inputs:t,result:e()}):s=n,O.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function dv(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 Vd=e=>O.useEffect(e,fv),fv=[];function qd(e){const t=O.useRef();return O.useEffect(()=>{t.current=e}),t.current}var pi=Symbol.for("Animated:node"),hv=e=>!!e&&e[pi]===e,Sn=e=>e&&e[pi],Ba=(e,t)=>Ry(e,pi,t),_o=e=>e&&e[pi]&&e[pi].getPayload(),Ud=class{constructor(){Ba(this,this)}getPayload(){return this.payload||[]}},gi=class extends Ud{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 gi(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)}},mi=class extends gi{constructor(e){super(0),this._string=null,this._toString=ui({output:[e,e]})}static create(e){return new mi(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=ui({output:[this.getValue(),e]})),this._value=0,super.reset()}},Lo={dependencies:null},Fo=class extends Ud{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return An(this.source,(n,r)=>{hv(n)?t[r]=n.getValue(e):on(n)?t[r]=Qt(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Ye(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return An(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Lo.dependencies&&on(e)&&Lo.dependencies.add(e);const t=_o(e);t&&Ye(t,n=>this.add(n))}},Gd=class extends Fo{constructor(e){super(e)}static create(e){return new Gd(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(pv)),!0)}};function pv(e){return(Mo(e)?mi:gi).create(e)}function Ma(e){const t=Sn(e);return t?t.constructor:xe.arr(e)?Gd:Mo(e)?mi:gi}var Yd=(e,t)=>{const n=!xe.fun(e)||e.prototype&&e.prototype.isReactComponent;return O.forwardRef((r,i)=>{const s=O.useRef(null),a=n&&O.useCallback(o=>{s.current=yv(i,o)},[i]),[l,f]=mv(r,t),m=Fd(),h=()=>{const o=s.current;if(n&&!o)return;(o?t.applyAnimatedValues(o,l.getValue(!0)):!1)===!1&&m()},v=new gv(h,f),c=O.useRef();Ra(()=>(c.current=v,Ye(f,o=>jr(o,v)),()=>{c.current&&(Ye(c.current.deps,o=>hi(o,c.current)),Re.cancel(c.current.update))})),O.useEffect(h,[]),Vd(()=>()=>{const o=c.current;Ye(o.deps,d=>hi(d,o))});const E=t.getComponentProps(l.getValue());return le.createElement(e,{...E,ref:a})})},gv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Re.write(this.update)}};function mv(e,t){const n=new Set;return Lo.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Fo(e),Lo.dependencies=null,[e,n]}function yv(e,t){return e&&(xe.fun(e)?e(t):e.current=t),t}var Kd=Symbol.for("AnimatedComponent"),vv=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Fo(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=a=>{const l=$d(a)||"Anonymous";return xe.str(a)?a=s[a]||(s[a]=Yd(a,i)):a=a[Kd]||(a[Kd]=Yd(a,i)),a.displayName=`Animated(${l})`,a};return An(e,(a,l)=>{xe.arr(e)&&(l=$d(a)),s[l]=s(a)}),{animated:s}},$d=e=>xe.str(e)?e:e&&xe.str(e.displayName)?e.displayName:xe.fun(e)&&e.name||null;function or(e,...t){return xe.fun(e)?e(...t):e}var yi=(e,t)=>e===!0||!!(t&&e&&(xe.fun(e)?e(t):Xt(e).includes(t))),Qd=(e,t)=>xe.obj(e)?t&&e[t]:e,Wd=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,wv=e=>e,_a=(e,t=wv)=>{let n=bv;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},bv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],xv={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 Ev(e){const t={};let n=0;if(An(e,(r,i)=>{xv[i]||(t[i]=r,n++)}),n)return t}function Hd(e){const t=Ev(e);if(t){const n={to:t};return An(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function vi(e){return e=Qt(e),xe.arr(e)?e.map(vi):Mo(e)?hn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Cv(e){for(const t in e)return!0;return!1}function La(e){return xe.fun(e)||xe.arr(e)&&xe.obj(e[0])}function Av(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Sv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Tv={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}},Fa={...Tv.default,mass:1,damping:1,easing:Zy.linear,clamp:!1},jv=class{constructor(){this.velocity=0,Object.assign(this,Fa)}};function Ov(e,t,n){n&&(n={...n},Jd(n,t),t={...n,...t}),Jd(e,t),Object.assign(e,t);for(const a in Fa)e[a]==null&&(e[a]=Fa[a]);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 Jd(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 zd=[],Iv=class{constructor(){this.changed=!1,this.values=zd,this.toValues=null,this.fromValues=zd,this.config=new jv,this.immediate=!1}};function Zd(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise((a,l)=>{let f,m,h=yi(n.cancel??(r==null?void 0:r.cancel),t);if(h)E();else{xe.und(n.pause)||(i.paused=yi(n.pause,t));let o=r==null?void 0:r.pause;o!==!0&&(o=i.paused||yi(o,t)),f=or(n.delay||0,t),o?(i.resumeQueue.add(c),s.pause()):(s.resume(),c())}function v(){i.resumeQueue.add(c),i.timeouts.delete(m),m.cancel(),f=m.time-Re.now()}function c(){f>0&&!hn.skipAnimation?(i.delayed=!0,m=Re.setTimeout(E,f),i.pauseQueue.add(v),i.timeouts.add(m)):E()}function E(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(v),i.timeouts.delete(m),e<=(i.cancelId||0)&&(h=!0);try{s.start({...n,callId:e,cancel:h},a)}catch(o){l(o)}}})}var Va=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Or(e.get()):t.every(n=>n.noop)?Xd(e.get()):gn(e.get(),t.every(n=>n.finished)),Xd=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),gn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Or=e=>({value:e,cancelled:!0,finished:!1});function ef(e,t,n,r){const{callId:i,parentId:s,onRest:a}=t,{asyncTo:l,promise:f}=n;return!s&&e===l&&!t.reset?f:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const m=_a(t,(g,p)=>p==="onRest"?void 0:g);let h,v;const c=new Promise((g,p)=>(h=g,v=p)),E=g=>{const p=i<=(n.cancelId||0)&&Or(r)||i!==n.asyncId&&gn(r,!1);if(p)throw g.result=p,v(g),g},o=(g,p)=>{const y=new tf,x=new nf;return(async()=>{if(hn.skipAnimation)throw wi(n),x.result=gn(r,!1),v(x),x;E(y);const C=xe.obj(g)?{...g}:{...p,to:g};C.parentId=i,An(m,(j,I)=>{xe.und(C[I])&&(C[I]=j)});const S=await r.start(C);return E(y),n.paused&&await new Promise(j=>{n.resumeQueue.add(j)}),S})()};let d;if(hn.skipAnimation)return wi(n),gn(r,!1);try{let g;xe.arr(e)?g=(async p=>{for(const y of p)await o(y)})(e):g=Promise.resolve(e(o,r.stop.bind(r))),await Promise.all([g.then(h),c]),d=gn(r.get(),!0,!1)}catch(g){if(g instanceof tf)d=g.result;else if(g instanceof nf)d=g.result;else throw g}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?l:void 0,n.promise=s?f:void 0)}return xe.fun(a)&&Re.batchedUpdates(()=>{a(d,r,r.item)}),d})()}function wi(e,t){ai(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var tf=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.")}},nf=class extends Error{constructor(){super("SkipAnimationSignal")}},qa=e=>e instanceof Ua,Nv=1,Ua=class extends Dd{constructor(){super(...arguments),this.id=Nv++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Sn(this);return e&&e.getValue()}to(...e){return hn.to(this,e)}interpolate(...e){return sv(),hn.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){fi(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||jo.sort(this),fi(this,{type:"priority",parent:this,priority:e})}},sr=Symbol.for("SpringPhase"),rf=1,Ga=2,Ya=4,Ka=e=>(e[sr]&rf)>0,Zn=e=>(e[sr]&Ga)>0,bi=e=>(e[sr]&Ya)>0,of=(e,t)=>t?e[sr]|=Ga|rf:e[sr]&=~Ga,sf=(e,t)=>t?e[sr]|=Ya:e[sr]&=~Ya,Pv=class extends Ua{constructor(e,t){if(super(),this.animation=new Iv,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!(Zn(this)||this._state.asyncTo)||bi(this)}get goal(){return Qt(this.animation.to)}get velocity(){const e=Sn(this);return e instanceof gi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Ka(this)}get isAnimating(){return Zn(this)}get isPaused(){return bi(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,a=_o(r.to);!a&&on(r.to)&&(i=Xt(Qt(r.to))),r.values.forEach((m,h)=>{if(m.done)return;const v=m.constructor==mi?1:a?a[h].lastPosition:i[h];let c=r.immediate,E=v;if(!c){if(E=m.lastPosition,s.tension<=0){m.done=!0;return}let o=m.elapsedTime+=e;const d=r.fromValues[h],g=m.v0!=null?m.v0:m.v0=xe.arr(s.velocity)?s.velocity[h]:s.velocity;let p;const y=s.precision||(d==v?.005:Math.min(1,Math.abs(v-d)*.001));if(xe.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,C=Math.exp(-(1-x)*o);E=d+g/(1-x)*(1-C),c=Math.abs(m.lastPosition-E)<=y,p=g*C}else{p=m.lastVelocity==null?g:m.lastVelocity;const x=s.restVelocity||y/10,C=s.clamp?0:s.bounce,S=!xe.und(C),j=d==v?m.v0>0:d<v;let I,P=!1;const D=1,_=Math.ceil(e/D);for(let Q=0;Q<_&&(I=Math.abs(p)>x,!(!I&&(c=Math.abs(v-E)<=y,c)));++Q){S&&(P=E==v||E>v==j,P&&(p=-p*C,E=v));const $=-s.tension*1e-6*(E-v),V=-s.friction*.001*p,K=($+V)/s.mass;p=p+K*D,E=E+p*D}}else{let x=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,m.durationProgress>0&&(m.elapsedTime=s.duration*m.durationProgress,o=m.elapsedTime+=e)),x=(s.progress||0)+o/this._memoizedDuration,x=x>1?1:x<0?0:x,m.durationProgress=x),E=d+s.easing(x)*(v-d),p=(E-m.lastPosition)/e,c=x==1}m.lastVelocity=p,Number.isNaN(E)&&(console.warn("Got NaN while animating:",this),c=!0)}a&&!a[h].done&&(c=!1),c?m.done=!0:t=!1,m.setValue(E,s.round)&&(n=!0)});const l=Sn(this),f=l.getValue();if(t){const m=Qt(r.to);(f!==m||n)&&!s.decay?(l.setValue(m),this._onChange(m)):n&&s.decay&&this._onChange(f),this._stop()}else n&&this._onChange(f)}set(e){return Re.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Zn(this)){const{to:e,config:t}=this.animation;Re.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=>Va(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),wi(this._state,e&&this._lastCallId),Re.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||La(n))&&(n=void 0),r=xe.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Ka(this)||(e.reverse&&([n,r]=[r,n]),r=Qt(r),xe.und(r)?Sn(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,_a(e,(a,l)=>/^on/.test(l)?Qd(a,n):a)),lf(this,e,"onProps"),Ci(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 Zd(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{bi(this)||(sf(this,!0),ci(s.pauseQueue),Ci(this,"onPause",gn(this,xi(this,this.animation.to)),this))},resume:()=>{bi(this)&&(sf(this,!1),Zn(this)&&this._resume(),ci(s.resumeQueue),Ci(this,"onResume",gn(this,xi(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const l=af(e);if(l)return this._update(l,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Or(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(Or(this));const{key:s,defaultProps:a,animation:l}=this,{to:f,from:m}=l;let{to:h=f,from:v=m}=e;i&&!r&&(!t.default||xe.und(h))&&(h=v),t.reverse&&([h,v]=[v,h]);const c=!Nn(v,m);c&&(l.from=v),v=Qt(v);const E=!Nn(h,f);E&&this._focus(h);const o=La(t.to),{config:d}=l,{decay:g,velocity:p}=d;(r||i)&&(d.velocity=0),t.config&&!o&&Ov(d,or(t.config,s),t.config!==a.config?or(a.config,s):void 0);let y=Sn(this);if(!y||xe.und(h))return n(gn(this,!0));const x=xe.und(t.reset)?i&&!t.default:!xe.und(v)&&yi(t.reset,s),C=x?v:this.get(),S=vi(h),j=xe.num(S)||xe.arr(S)||Mo(S),I=!o&&(!j||yi(a.immediate||t.immediate,s));if(E){const Q=Ma(h);if(Q!==y.constructor)if(I)y=this._set(S);else throw Error(`Cannot animate between ${y.constructor.name} and ${Q.name}, as the "to" prop suggests`)}const P=y.constructor;let D=on(h),_=!1;if(!D){const Q=x||!Ka(this)&&c;(E||Q)&&(_=Nn(vi(C),S),D=!_),(!Nn(l.immediate,I)&&!I||!Nn(d.decay,g)||!Nn(d.velocity,p))&&(D=!0)}if(_&&Zn(this)&&(l.changed&&!x?D=!0:D||this._stop(f)),!o&&((D||on(f))&&(l.values=y.getPayload(),l.toValues=on(h)?null:P==mi?[1]:Xt(S)),l.immediate!=I&&(l.immediate=I,!I&&!x&&this._set(f)),D)){const{onRest:Q}=l;Ye(Dv,V=>lf(this,t,V));const $=gn(this,xi(this,f));ci(this._pendingCalls,$),this._pendingCalls.add(n),l.changed&&Re.batchedUpdates(()=>{var V;l.changed=!x,Q==null||Q($,this),x?or(a.onRest,$):(V=l.onStart)==null||V.call(l,$,this)})}x&&this._set(C),o?n(ef(t.to,t,this._state,this)):D?this._start():Zn(this)&&!E?this._pendingCalls.add(n):n(Xd(C))}_focus(e){const t=this.animation;e!==t.to&&(kd(this)&&this._detach(),t.to=e,kd(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;on(t)&&(jr(t,this),qa(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;on(e)&&hi(e,this)}_set(e,t=!0){const n=Qt(e);if(!xe.und(n)){const r=Sn(this);if(!r||!Nn(n,r.getValue())){const i=Ma(n);!r||r.constructor!=i?Ba(this,i.create(n)):r.setValue(n),r&&Re.batchedUpdates(()=>{this._onChange(n,t)})}}return Sn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ci(this,"onStart",gn(this,xi(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),or(this.animation.onChange,e,this)),or(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Sn(this).reset(Qt(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Zn(this)||(of(this,!0),bi(this)||this._resume())}_resume(){hn.skipAnimation?this.finish():jo.start(this)}_stop(e,t){if(Zn(this)){of(this,!1);const n=this.animation;Ye(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),fi(this,{type:"idle",parent:this});const r=t?Or(this.get()):gn(this.get(),xi(this,e??n.to));ci(this._pendingCalls,r),n.changed&&(n.changed=!1,Ci(this,"onRest",r,this))}}};function xi(e,t){const n=vi(t),r=vi(e.get());return Nn(r,n)}function af(e,t=e.loop,n=e.to){const r=or(t);if(r){const i=r!==!0&&Hd(r),s=(i||e).reverse,a=!i||i.reset;return Ei({...e,loop:t,default:!1,pause:void 0,to:!s||La(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function Ei(e){const{to:t,from:n}=e=Hd(e),r=new Set;return xe.obj(t)&&cf(t,r),xe.obj(n)&&cf(n,r),e.keys=r.size?Array.from(r):null,e}function kv(e){const t=Ei(e);return xe.und(t.default)&&(t.default=_a(t)),t}function cf(e,t){An(e,(n,r)=>n!=null&&t.add(r))}var Dv=["onStart","onRest","onChange","onPause","onResume"];function lf(e,t,n){e.animation[n]=t[n]!==Wd(t,n)?Qd(t[n],e.key):void 0}function Ci(e,t,...n){var r,i,s,a;(i=(r=e.animation)[t])==null||i.call(r,...n),(a=(s=e.defaultProps)[t])==null||a.call(s,...n)}var Rv=["onStart","onChange","onRest"],Bv=1,Mv=class{constructor(e,t){this.id=Bv++,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(Ei(e)),this}start(e){let{queue:t}=this;return e?t=Xt(e).map(Ei):this.queue=[],this._flush?this._flush(this,t):(gf(this,t),$a(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Ye(Xt(t),r=>n[r].stop(!!e))}else wi(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;Ye(Xt(e),n=>t[n].pause())}return this}resume(e){if(xe.und(e))this.start({pause:!1});else{const t=this.springs;Ye(Xt(e),n=>t[n].resume())}return this}each(e){An(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,ai(e,([l,f])=>{f.value=this.get(),l(f,this,this._item)}));const s=!r&&this._started,a=i||s&&n.size?this.get():null;i&&t.size&&ai(t,([l,f])=>{f.value=a,l(f,this,this._item)}),s&&(this._started=!1,ai(n,([l,f])=>{f.value=a,l(f,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;Re.onFrame(this._onFrame)}};function $a(e,t){return Promise.all(t.map(n=>uf(e,n))).then(n=>Va(e,n))}async function uf(e,t,n){const{keys:r,to:i,from:s,loop:a,onRest:l,onResolve:f}=t,m=xe.obj(t.default)&&t.default;a&&(t.loop=!1),i===!1&&(t.to=null),s===!1&&(t.from=null);const h=xe.arr(i)||xe.fun(i)?i:void 0;h?(t.to=void 0,t.onRest=void 0,m&&(m.onRest=void 0)):Ye(Rv,d=>{const g=t[d];if(xe.fun(g)){const p=e._events[d];t[d]=({finished:y,cancelled:x})=>{const C=p.get(g);C?(y||(C.finished=!1),x&&(C.cancelled=!0)):p.set(g,{value:null,finished:y||!1,cancelled:x||!1})},m&&(m[d]=t[d])}});const v=e._state;t.pause===!v.paused?(v.paused=t.pause,ci(t.pause?v.pauseQueue:v.resumeQueue)):v.paused&&(t.pause=!0);const c=(r||Object.keys(e.springs)).map(d=>e.springs[d].start(t)),E=t.cancel===!0||Wd(t,"cancel")===!0;(h||E&&v.asyncId)&&c.push(Zd(++e._lastAsyncId,{props:t,state:v,actions:{pause:Sa,resume:Sa,start(d,g){E?(wi(v,e._lastAsyncId),g(Or(e))):(d.onRest=l,g(ef(h,d,v,e)))}}})),v.paused&&await new Promise(d=>{v.resumeQueue.add(d)});const o=Va(e,await Promise.all(c));if(a&&o.finished&&!(n&&o.noop)){const d=af(t,a,i);if(d)return gf(e,[d]),uf(e,d,!0)}return f&&Re.batchedUpdates(()=>f(o,e,e.item)),o}function df(e,t){const n={...e.springs};return t&&Ye(Xt(t),r=>{xe.und(r.keys)&&(r=Ei(r)),xe.obj(r.to)||(r={...r,to:void 0}),pf(n,r,i=>hf(i))}),ff(e,n),n}function ff(e,t){An(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,jr(n,e))})}function hf(e,t){const n=new Pv;return n.key=e,t&&jr(n,t),n}function pf(e,t,n){t.keys&&Ye(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function gf(e,t){Ye(t,n=>{pf(e.springs,n,r=>hf(r,e))})}var Vo=({children:e,...t})=>{const n=O.useContext(qo),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=uv(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=qo;return le.createElement(s,{value:t},e)},qo=_v(Vo,{});Vo.Provider=qo.Provider,Vo.Consumer=qo.Consumer;function _v(e,t){return Object.assign(e,le.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Lv=()=>{const e=[],t=function(r){cv();const i=[];return Ye(e,(s,a)=>{if(xe.und(r))i.push(s.start());else{const l=n(r,s,a);l&&i.push(s.start(l))}}),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 Ye(e,r=>r.pause(...arguments)),this},t.resume=function(){return Ye(e,r=>r.resume(...arguments)),this},t.set=function(r){Ye(e,(i,s)=>{const a=xe.fun(r)?r(s,i):r;a&&i.set(a)})},t.start=function(r){const i=[];return Ye(e,(s,a)=>{if(xe.und(r))i.push(s.start());else{const l=this._getProps(r,s,a);l&&i.push(s.start(l))}}),i},t.stop=function(){return Ye(e,r=>r.stop(...arguments)),this},t.update=function(r){return Ye(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 Fv(e,t,n){const r=xe.fun(t)&&t;r&&!n&&(n=[]);const i=O.useMemo(()=>r||arguments.length==3?Lv():void 0,[]),s=O.useRef(0),a=Fd(),l=O.useMemo(()=>({ctrls:[],queue:[],flush(p,y){const x=df(p,y);return s.current>0&&!l.queue.length&&!Object.keys(x).some(S=>!p.springs[S])?$a(p,y):new Promise(S=>{ff(p,x),l.queue.push(()=>{S($a(p,y))}),a()})}}),[]),f=O.useRef([...l.ctrls]),m=[],h=qd(e)||0;O.useMemo(()=>{Ye(f.current.slice(e,h),p=>{Av(p,i),p.stop(!0)}),f.current.length=e,v(h,e)},[e]),O.useMemo(()=>{v(0,Math.min(h,e))},n);function v(p,y){for(let x=p;x<y;x++){const C=f.current[x]||(f.current[x]=new Mv(null,l.flush)),S=r?r(x,C):t[x];S&&(m[x]=kv(S))}}const c=f.current.map((p,y)=>df(p,m[y])),E=O.useContext(Vo),o=qd(E),d=E!==o&&Cv(E);Ra(()=>{s.current++,l.ctrls=f.current;const{queue:p}=l;p.length&&(l.queue=[],Ye(p,y=>y())),Ye(f.current,(y,x)=>{i==null||i.add(y),d&&y.start({default:E});const C=m[x];C&&(Sv(y,C.ref),y.ref?y.queue.push(C):y.start(C))})}),Vd(()=>()=>{Ye(l.ctrls,p=>p.stop(!0))});const g=c.map(p=>({...p}));return i?[g,i]:g}function Vv(e,t){const n=xe.fun(e),[[r],i]=Fv(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var qv=class extends Ua{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ui(...t);const n=this._get(),r=Ma(n);Ba(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Nn(t,n)||(Sn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&mf(this._active)&&Qa(this)}_get(){const e=xe.arr(this.source)?this.source.map(Qt):Xt(Qt(this.source));return this.calc(...e)}_start(){this.idle&&!mf(this._active)&&(this.idle=!1,Ye(_o(this),e=>{e.done=!1}),hn.skipAnimation?(Re.batchedUpdates(()=>this.advance()),Qa(this)):jo.start(this))}_attach(){let e=1;Ye(Xt(this.source),t=>{on(t)&&jr(t,this),qa(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Ye(Xt(this.source),e=>{on(e)&&hi(e,this)}),this._active.clear(),Qa(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=Xt(this.source).reduce((t,n)=>Math.max(t,(qa(n)?n.priority:0)+1),0))}};function Uv(e){return e.idle!==!1}function mf(e){return!e.size||Array.from(e).every(Uv)}function Qa(e){e.idle||(e.idle=!0,Ye(_o(e),t=>{t.done=!0}),fi(e,{type:"idle",parent:e}))}hn.assign({createStringInterpolator:_d,to:(e,t)=>new qv(e,t)});var yf=/^--/;function Gv(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!yf.test(e)&&!(Ai.hasOwnProperty(e)&&Ai[e])?t+"px":(""+t).trim()}var vf={};function Yv(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:a,viewBox:l,...f}=t,m=Object.values(f),h=Object.keys(f).map(v=>n||e.hasAttribute(v)?v:vf[v]||(vf[v]=v.replace(/([A-Z])/g,c=>"-"+c.toLowerCase())));i!==void 0&&(e.textContent=i);for(const v in r)if(r.hasOwnProperty(v)){const c=Gv(v,r[v]);yf.test(v)?e.style.setProperty(v,c):e.style[v]=c}h.forEach((v,c)=>{e.setAttribute(v,m[c])}),s!==void 0&&(e.scrollTop=s),a!==void 0&&(e.scrollLeft=a),l!==void 0&&e.setAttribute("viewBox",l)}var Ai={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},Kv=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),$v=["Webkit","Ms","Moz","O"];Ai=Object.keys(Ai).reduce((e,t)=>($v.forEach(n=>e[Kv(n,t)]=e[t]),e),Ai);var Qv=/^(matrix|translate|scale|rotate|skew)/,Wv=/^(translate)/,Hv=/^(rotate|skew)/,Wa=(e,t)=>xe.num(e)&&e!==0?e+t:e,Uo=(e,t)=>xe.arr(e)?e.every(n=>Uo(n,t)):xe.num(e)?e===t:parseFloat(e)===t,Jv=class extends Fo{constructor({x:e,y:t,z:n,...r}){const i=[],s=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),s.push(a=>[`translate3d(${a.map(l=>Wa(l,"px")).join(",")})`,Uo(a,0)])),An(r,(a,l)=>{if(l==="transform")i.push([a||""]),s.push(f=>[f,f===""]);else if(Qv.test(l)){if(delete r[l],xe.und(a))return;const f=Wv.test(l)?"px":Hv.test(l)?"deg":"";i.push(Xt(a)),s.push(l==="rotate3d"?([m,h,v,c])=>[`rotate3d(${m},${h},${v},${Wa(c,f)})`,Uo(c,0)]:m=>[`${l}(${m.map(h=>Wa(h,f)).join(",")})`,Uo(m,l.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new zv(i,s)),super(r)}},zv=class extends Dd{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 Ye(this.inputs,(n,r)=>{const i=Qt(n[0]),[s,a]=this.transforms[r](xe.arr(i)?i:n.map(Qt));e+=" "+s,t=t&&a}),t?"none":e}observerAdded(e){e==1&&Ye(this.inputs,t=>Ye(t,n=>on(n)&&jr(n,this)))}observerRemoved(e){e==0&&Ye(this.inputs,t=>Ye(t,n=>on(n)&&hi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),fi(this,e)}},Zv=["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"];hn.assign({batchedUpdates:er.unstable_batchedUpdates,createStringInterpolator:_d,colors:Fy});var Xv=vv(Zv,{applyAnimatedValues:Yv,createAnimatedStyle:e=>new Jv(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),ew=Xv.animated;function Go(e){const{rows:t}=e,n=Vv({from:{opacity:0},to:{opacity:1}});return u.jsxs(ew.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,i)=>u.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${i}`)),u.jsx("span",{className:"sr-only",children:"Loading..."})]})}function wf({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const i=O.useRef(null),[s,a]=O.useState(0),[l,f]=O.useState(r),m=l&&O.Children.count(e)>n?n:O.Children.count(e);O.useEffect(()=>{i.current&&(s?l?i.current.style.marginBottom=`-${s-(s/m+(m-1)*(t??s/m/7.5))}px`:i.current.style.marginBottom="unset":a(i.current.offsetHeight))},[l,s]);const h=c=>(100-(m-1-c))/100,v=c=>c*(s/m-(t??s/m/7.5));return u.jsx("div",{ref:i,className:"hover:cursor-pointer",onClick:()=>m>1&&f(!l),children:O.Children.map(O.Children.toArray(e).slice(-1*m),(c,E)=>u.jsx("div",{className:`${!l&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:l&&m>1?`scaleX(${h(E)}) translateY(-${v(E)}px)`:void 0},children:c}))})}const tw=wr("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),nw=wr("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),rw=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:i="md"})=>{const s=t,[a,l]=O.useState(r),[f,m]=O.useState(!1),h=()=>{s||(l(!a),n&&n())},v=()=>{t||m(!0)},c=()=>{m(!1)},E=kt("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":f,"bg-core-primary-500 hover:bg-core-primary-600":a&&!t,"bg-core-gray-200 hover:bg-core-gray-300":!a&&!t,"bg-core-gray-100":t},nw({size:i})),o=i==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return u.jsxs("div",{className:`inline-flex items-center py-1 ${s?"pointer-events-none":"cursor-pointer "}`,onClick:h,onFocus:v,children:[u.jsx("input",{className:"sr-only ",id:e,type:"checkbox",checked:a,disabled:s,onBlur:c,onChange:h,onFocus:v}),u.jsx("div",{className:E,children:u.jsx("div",{className:kt(tw({size:i}),`${a?o:""} ${s?"shadow-none":"shadow-xs"}`)})})]})},Yo=({id:e,children:t,size:n="md",description:r,toggleLeft:i=!0,disabled:s,helperText:a,defaultChecked:l=!1,label:f,required:m=!1,tooltip:h,onChange:v})=>{const c=O.useId(),E=e??c;return u.jsxs("div",{className:`flex ${i?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[u.jsx(rw,{disabled:s,defaultChecked:l,id:E,size:n,onChange:v}),t||(f||r||h||a)&&u.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[u.jsx(Dt,{className:kt("font-normal"),description:r,required:m,tooltip:h,htmlFor:E,disabled:s,children:f}),u.jsx(Dt.Helper,{disabled:s,helperText:a})]})]})};Yo.displayName="Switch";const bf=O.createContext(null);function iw(e=!1){const t=O.useContext(bf);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const xf=O.forwardRef(({toggleLeft:e=!1,size:t="md",children:n,description:r,disabled:i,helperText:s,id:a,label:l,required:f,tooltip:m},h)=>{const v=O.useId(),c=a??v,E=l??r??m??s?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(Dt,{className:"cursor-default",description:r,required:f,tooltip:m,htmlFor:c,disabled:i,children:l}),u.jsx(Dt.Helper,{disabled:i,helperText:s})]}):null;return u.jsx(bf.Provider,{value:{disabled:i,toggleLeft:e,size:t},children:u.jsxs("div",{ref:h,"aria-describedby":s?`${c}__describer`:void 0,"aria-labelledby":l?`${c}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[l??s??r??m?u.jsx("div",{className:"flex flex-col",children:E}):null,n?u.jsx("div",{className:kt("flex flex-col gap-2"),children:n}):null]})})});xf.displayName="SwitchGroup",Object.assign(xf,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=iw(),{disabled:i,size:s,toggleLeft:a}=r??{};return u.jsx(Yo,{toggleLeft:a,disabled:e??i,label:t,defaultChecked:n,size:s})}});const ow=({children:e})=>u.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}),sw=({id:e,label:t,icon:n,pathname:r,activeTab:i,setActiveTab:s})=>u.jsx(kc,{className:"flex flex-grow items-center",to:r??"",children:u.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:[u.jsx(Ct,{icon:n,className:"mr-2",variant:i===e?"discovery":"secondary"}),t]})});function Ef(){const{t:e}=$e(),[t,n]=O.useState(""),[r,i]=O.useState(!1),{session:s}=nt(),a=Et(),[l,f]=O.useState(!1),m=O.useCallback(async()=>{i(!0);try{const{data:{data:h}}=await ia.get(t);a(`${s.type===zt.REDEEM_GIFTCARD?"redeem":"top-up"}/${h.hash}`)}catch{i(!1)}},[t,a,s]);return O.useEffect(()=>{t&&!r&&!l&&m().then()},[t,r,l,m]),(s==null?void 0:s.type)===zt.REDEEM_GIFTCARD&&!(s!=null&&s.input_data.amount_in_cents)?u.jsx(u.Fragment,{children:e("xIsRequired",{x:"Amount in cents"})}):u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("scanGiftcard")})})}),u.jsx(bt,{children:u.jsx(Ao,{dataSetter:n,setDefer:f,label:e("hash")})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("submit"),className:"w-full",onClick:m,disabled:!t||r})})]})})}function aw(){const{t:e}=$e(),{hash:t}=Ac(),{giftcard:n,isLoading:r,mutate:i}=Xl(t),{session:s,mutate:a}=nt(),{onUseGiftcard:l}=En(),f=Et(),m=(s==null?void 0:s.input_data.amount_in_cents)??0,[h]=O.useState(s.results.remaining_amount??m),v=(s==null?void 0:s.input_data.allow_multiple_giftcards)??!0;if(r)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:u.jsx(br,{className:"h-[48px] w-[48px]"})});if(!n)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const c=async()=>{const p=await ia.transaction(n.uuid,-o());await i();const y=await a(),x=y==null?void 0:y.data.data.events;go(x),qe.success(`${e("transactionSuccessful")}!`),l&&l(p.data.data)},E=()=>s.results.remaining_amount??m,o=()=>Math.min(E(),n.amount_in_cents),d=()=>{let p=0;return s.events.filter(x=>x.type===Fn.GIFTCARD_TRANSACTION).forEach(x=>{x.data.giftcard.uuid===n.uuid&&(p+=x.data.amount_in_cents)}),p},g=()=>{if(o())return{label:e("confirmAndPay",{amount:vr(o(),s==null?void 0:s.currency)}),onClick:c};if(v&&E())return{label:e("useAnotherGiftcard"),onClick:()=>f("../"),variant:"secondary"}};return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:`${e("giftcard")} ${n.hash}`})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex h-full flex-col gap-4",children:[u.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx("p",{className:"font-light text-gray-500",children:e("balance")}),u.jsx(Kn,{value:n.amount_in_cents,start:n.amount_in_cents-d(),currency:s.currency,asCurrency:!0})]})}),u.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:u.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[u.jsx("p",{className:"font-light text-gray-500",children:e("amountToPay")}),u.jsx("div",{className:"text-5xl font-bold",children:u.jsx(Kn,{value:h+d(),start:h,currency:s.currency,asCurrency:!0})})]})})]})}),g()&&u.jsx(Ot,{children:u.jsx(rt,{label:"",className:"w-full",...g()})})]})})}function cw(){const{t:e}=$e(),{hash:t}=Ac(),{giftcard:n,isLoading:r,mutate:i}=Xl(t),{mutate:s}=nt();if(r)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:u.jsx(br,{className:"h-[48px] w-[48px]"})});if(!n)return u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-red-500",children:e("giftcardNotFound")});const a=async l=>{const f=await ia.transaction(n.uuid,l);await i(),await s(),qe.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${vr(f.data.data.amount_in_cents)}`)};return u.jsx(Mt,{children:u.jsx(Pu,{title:`${e("giftcard")} ${n.hash}`,balance:n.amount_in_cents,transaction:a})})}function lw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/redeem/:hash",element:u.jsx(aw,{})})]})}function uw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/top-up/:hash",element:u.jsx(cw,{})})]})}function dw({contact:e}){const{t}=$e(),{session:{loyalty_program:n}}=nt(),r=(s,a)=>uu(s,a)?`${uu(s,a)} ${t("yearsAgo")}`:lu(s,a)?`${lu(s,a)} ${t("weeksAgo")}`:cu(s,a)?`${cu(s,a)} ${t("daysAgo")}`:t("today"),i=()=>{const s=new Date,a=new Date(e.current_display_values.birthdate);return a.setFullYear(s.getFullYear()),s.getTime()>a.getTime()&&a.setFullYear(a.getFullYear()+1),Math.floor((a.getTime()-s.getTime())/(1e3*60*60*24))};return u.jsxs("div",{className:"h-full justify-between",children:[u.jsx("p",{className:"mb-4 text-lg font-semibold leading-7",children:"Stats"}),u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"calendar"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:r(new Date,new Date(e.current_display_values.loyalty_last_transaction_date))}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("lastVisit")})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"shopping-bag"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_number_of_transactions} ${t("visits")}`}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalVisits")})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"dollar"}),u.jsxs("div",{children:[u.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")}`}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalCredits")})]})]}),e.current_values.birthdate&&u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ct,{icon:"star"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:new Date(e.current_display_values.birthdate).toLocaleDateString(St.language,{day:"numeric",month:"long"})}),u.jsx("p",{className:"text-xs text-core-gray-500",children:t("birthdayInDays",{number:i()})})]})]})]})]})}function Cf({loyaltyTransaction:e}){const{t}=$e();return u.jsxs("div",{className:"mb-2 flex justify-between",children:[u.jsx("p",{className:"text-xs text-core-gray-500",children:e.type===eu.CREDIT_RECEPTION?t("transaction"):`${t("isRedeemed")} '${e.loyalty_transaction_data.title}'`}),u.jsx("p",{className:"text-xs font-semibold",children:e.credits>0?"+"+e.credits:e.credits})]})}function Af({subscription:e,onChange:t,editable:n=!1}){const{t:r}=$e();return u.jsxs("div",{className:"mb-2 flex justify-between",children:[u.jsx("p",{className:"text-xs font-semibold",children:e.subscription_type.name}),n?u.jsx(Yo,{defaultChecked:e.is_subscribed,disabled:e.subscription_type.strategy===Yn.FUNCTIONAL,onChange:t&&(()=>t(e.subscription_type.name))}):u.jsx(ha,{label:r(e.status.toLowerCase()),size:"sm",color:e.is_subscribed?"primary":"gray"})]})}function fw({contact:e}){const t=Et(),{t:n}=$e();return u.jsxs("div",{className:"inline-grid w-full items-center gap-4 py-4 lg:grid-cols-2",children:[u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(fa,{src:e.current_display_values.avatar,size:"2xl"}),u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsxs("div",{className:"flex gap-2",children:[u.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&&u.jsx(ha,{label:e.current_display_values.tier,size:"sm",stroke:!0})]}),u.jsxs("p",{className:"text-sm text-core-gray-500 ",children:[n("joined")," ",new Date(e.current_values.created_at).toLocaleDateString(St.language,{month:"long",year:"numeric"})]})]})]}),u.jsxs("div",{className:"inline-grid gap-2 lg:grid-cols-2",children:[u.jsx(rt,{label:n("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>t("contact-identifiers")}),u.jsx(rt,{before:u.jsx(Ct,{icon:"edit"}),label:n("editProfile"),variant:"secondary",size:"md",onClick:()=>t("contact-attributes")})]})]})}function hw(){const{contact:e,isLoading:t}=xn(),{session:{loyalty_program:n,currency:r}}=nt(),{t:i}=$e(),s=Et(),{loyaltyTransactions:a}=fo(),{subscriptions:l}=su();return t||!e?u.jsx(u.Fragment,{}):u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(fw,{contact:e})}),u.jsx(bt,{children:u.jsxs("div",{className:"grid grid-cols-1 gap-x-2 gap-y-2 lg:grid-cols-4",children:[u.jsxs("div",{className:"flex gap-2 lg:flex-col",children:[u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[u.jsx("p",{className:"text-2xl leading-8",children:e.current_display_values.loyalty_balance}),u.jsx("p",{className:"text-sm text-core-gray-500",children:n.custom_credit_name?n.custom_credit_name:i("points")})]})}),u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[u.jsx("p",{className:"text-2xl leading-8",children:vr(e.prepaid_balance.balance_in_cents,r)}),u.jsx("p",{className:"text-sm text-core-gray-500",children:i("prepaidCredit")})]})})]}),u.jsx(Si,{children:u.jsx(dw,{contact:e})}),u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{className:"text-lg font-semibold leading-7",children:i("activities")}),a&&a.length?u.jsx("div",{children:a.slice(0,5).map(f=>u.jsx(Cf,{loyaltyTransaction:f},f.uuid))}):u.jsx("p",{className:"text-sm text-core-gray-500",children:i("noActivity")})]}),u.jsx(rt,{label:`${i("all")} ${i("activities").toLowerCase()}`,variant:"secondary",onClick:()=>s("activity")})]})}),u.jsx(Si,{children:u.jsxs("div",{className:"flex h-full flex-col justify-between",children:[u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{className:"text-lg font-semibold leading-7",children:i("subscriptions")}),u.jsx("div",{children:l==null?void 0:l.filter(f=>f.subscription_type.strategy!==Yn.FUNCTIONAL).map(f=>u.jsx(Af,{subscription:f},f.subscription_type.uuid))})]}),u.jsx(rt,{label:i("change").charAt(0).toUpperCase()+i("change").slice(1),before:u.jsx(Ct,{icon:"edit"}),variant:"secondary",onClick:()=>s("subscriptions")})]})})]})})]})}function Si({children:e}){return u.jsx("div",{className:"flex-grow rounded-lg border p-4",children:e})}function Ti({label:e,path:t}){const n=Et();return u.jsx("div",{className:"flex h-16 items-center text-base text-core-gray-900",children:u.jsx(rt,{label:e,variant:"link-gray",before:u.jsx(Ct,{icon:"caret-left",size:"md"}),onClick:()=>n(t)})})}function pw(){const{t:e}=$e(),{loyaltyTransactions:t}=fo(),{contact:n}=xn();return u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsxs("div",{className:"md:max-h-[528px]",children:[u.jsx("p",{className:"text-sm font-medium",children:e("allActivities")}),u.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("checkOutAllActivitiesOfName",{name:n.current_display_values.firstname})}),u.jsx("div",{className:"overflow-auto",children:t==null?void 0:t.map(r=>u.jsx(Cf,{loyaltyTransaction:r},r.uuid))})]})})]})})}function gw(){const{t:e}=$e(),{subscriptions:t,mutate:n}=su(),[r,i]=O.useState({}),[s,a]=O.useState(!1);O.useEffect(()=>{if(t&&!Object.keys(r).length){const h=t.reduce((v,c)=>({...v,[c.subscription_type.name]:c.is_subscribed}),{});i(h)}},[]);const l=h=>{Object.hasOwn(r,h)?i({...r,[h]:!r[h]}):i({...r,[h]:!0})},f=async()=>{a(!0),await ca.update({values:r}),await n(),qe.success(e("subscriptionsUpdated")),a(!1)},m=()=>t&&t.some(h=>r[h.subscription_type.name]!==h.is_subscribed);return u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsx("div",{className:"md:max-h-[528px]",children:u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:e("subscriptions")}),u.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("manageEmailPreferences")}),t==null?void 0:t.filter(h=>h.subscription_type.strategy!==Yn.FUNCTIONAL).map(h=>u.jsx(Af,{subscription:h,onChange:l,editable:!0},h.subscription_type.uuid))]})})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("saveChanges"),className:"w-full",onClick:f,disabled:!m()||s})})]})})}function mw({identifier:e,onClear:t}){const{t:n}=$e();return u.jsxs("div",{className:"flex items-center justify-between rounded-lg border text-xs",children:[u.jsxs("div",{className:"flex-col pl-4",children:[u.jsx("p",{className:"font-semibold",children:e.value}),u.jsx("p",{className:"text-core-gray-500",children:n("contactIdentifier")})]}),u.jsx("div",{className:"h-full border-l p-4 hover:cursor-pointer hover:bg-core-gray-50",onClick:()=>t&&t(e.value),children:u.jsx(Ct,{className:"h-full",icon:"close"})})]})}function yw(){const{t:e}=$e(),t=Et(),{identifiers:n,isLoading:r,mutate:i}=Zl(),[s,a]=O.useState(""),[l,f]=O.useState(!1),m=v=>{a(v),f(!0)},h=async()=>{await f0.clear({value:s}),await i(),f(!1)};return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsx("div",{className:"md:max-h-[528px]",children:u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium",children:e("contactIdentifiers")}),u.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:e("contactIdentifierDescription")})]}),r?u.jsx(Go,{rows:10}):n==null?void 0:n.map(v=>u.jsx(mw,{identifier:v,onClear:m},v.value))]})})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>t("create")})})]}),u.jsx(xr,{title:e("confirmClearContactIdentifier"),isOpen:l,primaryAction:{label:e("confirm"),action:h},secondaryAction:{label:e("cancel"),action:()=>f(!1)},onClose:()=>f(!1),children:u.jsx("p",{children:e("clearContactIdentifier",{value:s})})})]})}function vw(){const{t:e}=$e(),{contact:t}=xn(),{mutate:n}=Zl(),r=Et(),[i,s]=O.useState(""),[a,l]=O.useState(!1),[f,m]=O.useState(!1),h=async()=>{l(!0);try{await ir.linkIdentifier(i,t.email),await n(),r("/portal/profile/contact-identifiers")}finally{s(""),l(!1)}};return O.useEffect(()=>{i&&!a&&!f&&h().then()},[i,a,f,h]),u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsx(Ao,{dataSetter:s,setDefer:m,label:e("contactIdentifier")})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("addIdentifier"),className:"w-full",onClick:h,disabled:a})})]})})}function ww(){const{t:e}=$e(),{contact:t,isLoading:n,mutate:r}=xn(),[i,s]=O.useState(),[a,l]=O.useState();O.useEffect(()=>{i||(async()=>{const{data:v}=await zl.get();s(v.data.elements)})()},[i]);const f=v=>{l({...a,[v.target.name]:v.target.value})},m=(v,c)=>{l({...a,[v]:c})},h=async()=>{a&&(await zl.update(a),await r(),qe.success(e("contactAttributesUpdated")),l(void 0))};return u.jsx("div",{className:"h-full md:container",children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(bt,{children:u.jsxs("div",{className:"md:max-h-[528px]",children:[!n&&u.jsxs("div",{className:"mb-4 flex flex-row items-center gap-4 border-b border-b-core-gray-200 px-1 pb-4",children:[u.jsx(fa,{src:t.current_display_values.avatar,size:"2xl"}),u.jsxs("div",{children:[u.jsx("div",{className:"flex flex-row items-center gap-2 ",children:u.jsxs("h1",{className:"text-lg text-core-gray-900",children:[t.current_display_values.firstname," ",t.current_display_values.lastname]})}),u.jsx("p",{className:"text-sm text-core-gray-500",children:t.current_display_values.email})]})]}),!i||n?u.jsx(Go,{rows:10}):i.map(v=>{if(!(v.type==="media_upload"||v.type==="email"))return v.type==="select"?u.jsx(Ny,{name:v.name,label:v.label,value:a&&a[v.name]?a[v.name]:t.current_display_values[v.name],onChange:c=>m(v.name,c),disabled:v.disabled,children:v.options.map(c=>u.jsx(va,{label:c.label,value:c.value},c.value))},v.id):v.type==="multi_select"?u.jsx(n1,{name:v.name,value:a&&a[v.name]?a[v.name]:v.defaultValue,label:v.label,onChange:m,disabled:v.disabled,options:v.options},v.id):v.type==="birth_date"||v.type==="date_time"?u.jsx(Ru,{id:v.id,name:v.name,label:v.label,type:v.type==="date_time"?"date_time":"date",value:a&&a[v.name]?a[v.name]:t.current_display_values[v.name],disabled:v.disabled,onChange:f},v.id):u.jsx(yo,{disabled:v.disabled,label:v.label,name:v.name,value:a&&a[v.name]!=="undefined"?a[v.name]:t.current_display_values[v.name],onChange:f},v.id)})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("saveChanges"),className:"w-full",onClick:h,disabled:!a})})]})})}function bw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/profile",element:u.jsx(mn,{element:u.jsx(hw,{})})}),u.jsx(Oe,{path:"/profile/activity",element:u.jsx(mn,{element:u.jsx(pw,{})})}),u.jsx(Oe,{path:"/profile/subscriptions",element:u.jsx(mn,{element:u.jsx(gw,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers",element:u.jsx(mn,{element:u.jsx(yw,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers/create",element:u.jsx(mn,{element:u.jsx(vw,{})})}),u.jsx(Oe,{path:"/profile/contact-attributes",element:u.jsx(mn,{element:u.jsx(ww,{})})})]})}function Ha({voucher:e,selected:t,setSelected:n}){const{t:r}=$e();return u.jsxs("div",{className:`flex cursor-pointer items-center justify-between gap-4 rounded-lg ${e.status===yr.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:[u.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[u.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"}),u.jsxs("div",{className:"overflow-hidden overflow-ellipsis ",children:[u.jsx("p",{className:"font-semibold",children:e.name}),e.status===yr.REDEEMED?u.jsx("p",{className:"text-core-gray-500",children:r("redeemed")}):u.jsx("p",{className:"text-core-primary-500",children:e.expiration_date?`Valid until ${new Date(e.expiration_date).toLocaleDateString()}`:r("nonExpiring")})]})]}),u.jsx("p",{className:`text-core-${e.status===yr.REDEEMED?"gray":"primary"}-500`,children:e.code})]})}function xw(){const{t:e}=$e(),{vouchers:t,isLoading:n,mutate:r}=v0(),{onRedeemVoucher:i}=En(),{mutate:s}=fo(),{session:{events:a},mutate:l}=nt(),[f,m]=O.useState(),[h,v]=O.useState(!1);O.useEffect(()=>{f&&v(!0)},[f]);const c=async()=>{if(f){const o=await la.redeemByCode(f.code);r(),s();const d=await l(),g=d==null?void 0:d.data.data.events;go(g),qe.success(e("voucherSuccessfullyRedeemed")),i&&i(o.data.data),v(!1),m(void 0)}},E=()=>a.filter(o=>o.type===Fn.VOUCHER_REDEEMED);return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("vouchers")})})}),u.jsx(bt,{children:n?u.jsx(Go,{rows:1}):u.jsx("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:t&&t.length?t.map(o=>u.jsx(Ha,{voucher:o,selected:f,setSelected:m},o.code)):u.jsx("p",{className:"text-center text-sm text-core-gray-500",children:e("vouchersEmptyState")})})}),!!E().length&&u.jsx(Ot,{children:u.jsx("div",{children:u.jsx(wf,{children:E().map(o=>u.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-core-primary-100 bg-core-primary-50 p-2",children:u.jsx("div",{className:"flex h-full flex-col justify-between text-xs",children:u.jsxs("div",{className:"overflow-hidden",children:[u.jsx("p",{className:"font-semibold",children:o.data.name}),u.jsxs("p",{className:"overflow-ellipsis text-core-gray-500",children:[o.data.code," - ",e("applied")]})]})})},o.data.uuid))},E().length)})})]}),u.jsx(xr,{title:e("confirmVoucherRedemption"),isOpen:h,primaryAction:{label:e("confirm"),action:c},secondaryAction:{label:e("cancel"),action:()=>v(!1)},onClose:()=>v(!1),children:u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{children:e("redeemTitle",{title:f==null?void 0:f.name})}),f&&u.jsx(Ha,{voucher:f,setSelected:m})]})})]})}function Ja({reward:e,selected:t,setSelected:n,disabled:r,readOnly:i}){const{t:s}=$e(),{session:a}=nt(),{contact:l,isLoading:f}=xn(),m=f?0:l.credit_balance.balance;return u.jsxs("div",{className:`max-h-[48px] rounded-lg border ${r?"pointer-events-none opacity-40":!i&&"cursor-pointer"}`,children:[u.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:[u.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[u.jsx("img",{src:e.media.value??"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),u.jsx("p",{className:"truncate",children:e.title??e.description})]}),u.jsxs("p",{className:"whitespace-nowrap text-core-primary-500",children:[e.required_credits," ",a!=null&&a.loyalty_program.custom_credit_name?a==null?void 0:a.loyalty_program.custom_credit_name:s("points").toLowerCase()]})]}),e.required_credits-m>0&&u.jsx(r1,{value:m,max:e.required_credits})]})}function Ew(){const{t:e}=$e(),{rewards:t,isLoading:n,mutate:r}=y0(),{mutate:i}=xn(),{mutate:s}=fo(),{onClaimReward:a}=En(),{session:{events:l,loyalty_program:f},mutate:m}=nt(),{contact:h,isLoading:v}=xn(),[c,E]=O.useState(),[o,d]=O.useState(!1);O.useEffect(()=>{c&&d(!0)},[c]);const g=async()=>{if(c){const y=await m0.claim(c.uuid),x=await m(),C=x==null?void 0:x.data.data.events;go(C);const S=C.filter(I=>I.type===Fn.REWARD_RECEPTION&&I.data.reward.uuid===c.uuid),{data:{uuid:j}}=S.reduce((I,P)=>new Date(I.created_at)>new Date(P.created_at)?I:P);r(),i(),s(),qe.success(e("rewardClaimed",{name:y.data.data.title})),a&&a(y.data.data,j),d(!1),E(void 0)}},p=()=>l.filter(y=>y.type===Fn.REWARD_RECEPTION).map(y=>t==null?void 0:t.find(x=>x.uuid===y.data.reward.uuid));return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsxs("div",{className:"flex h-16 items-center justify-between",children:[u.jsx("h1",{children:e("rewards")}),u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsx("p",{children:v?0:h.credit_balance.balance}),u.jsx("p",{className:"text-sm text-core-gray-500",children:f.custom_credit_name?f.custom_credit_name:e("points")})]})]})}),u.jsx(bt,{children:n||v?u.jsx(Go,{rows:1}):u.jsxs("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:[!!t.filter(y=>y.required_credits<=h.credit_balance.balance).length&&u.jsx("p",{className:"text-sm font-light text-core-gray-500",children:e("redeemableRewards")}),t.filter(y=>y.required_credits<=h.credit_balance.balance).map(y=>u.jsx(Ja,{reward:y,selected:c,setSelected:E},y.uuid)),!!t.filter(y=>y.required_credits>h.credit_balance.balance).length&&u.jsx("p",{className:"mt-2 text-sm font-light text-core-gray-500",children:e("saveABitMore")}),t.filter(y=>y.required_credits>h.credit_balance.balance).map(y=>u.jsx(Ja,{reward:y,selected:c,setSelected:E,disabled:!0},y.uuid))]})}),!!p().length&&!n&&u.jsx(Ot,{children:u.jsx("div",{children:u.jsx(wf,{children:p().map((y,x)=>u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-core-primary-100 bg-core-primary-50 p-2 text-xs",children:[u.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[u.jsx("img",{src:y.media.value??"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-8 w-8 rounded object-cover object-center"}),u.jsx("p",{className:"truncate",children:y.title??y.description})]}),u.jsxs("p",{className:"text-core-primary-500",children:[y.required_credits," ",f.custom_credit_name?f.custom_credit_name:e("points")]})]},`${x}-${y.uuid}`))},p().length)})})]}),u.jsx(xr,{title:e("confirmRewardRedemption"),isOpen:o,primaryAction:{label:e("confirm"),action:g},secondaryAction:{label:e("cancel"),action:()=>d(!1)},onClose:()=>d(!1),children:u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx("p",{children:e("redeemRewardForPoints",{title:c==null?void 0:c.title,credits:c==null?void 0:c.required_credits,customCreditName:f.custom_credit_name?f.custom_credit_name:e("points")})}),c&&u.jsx(Ja,{reward:c,selected:c,setSelected:E,readOnly:!0})]})})]})}function Cw({children:e}){return u.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:u.jsx("div",{className:"h-full max-h-full",children:e})})}function Aw(){const e=Et(),{t}=$e(),{pathname:n}=Jt(),[r,i]=O.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 O.useEffect(()=>{(n==="/portal"||n==="/portal/")&&e(s[r].pathname);const a=n.split("/")[n.split("/").length-1];if(a!==s[r].pathname){const l=s.find(f=>f.pathname===a);l&&i(l.id)}},[e]),u.jsxs("div",{className:"relative h-full w-full select-none overflow-auto",children:[u.jsx(ow,{children:s.map(a=>u.jsx(sw,{id:a.id,label:a.label,icon:a.icon,activeTab:r,setActiveTab:i,pathname:a.pathname},a.id))}),u.jsxs(Cw,{children:[u.jsx(bw,{}),u.jsxs(vn,{children:[u.jsx(Oe,{path:"/rewards",element:u.jsx(mn,{element:u.jsx(Ew,{})})}),u.jsx(Oe,{path:"/vouchers",element:u.jsx(mn,{element:u.jsx(xw,{})})})]})]})]})}function Sw(){const e=Et(),{session:t}=nt();return O.useEffect(()=>{t&&!t.contact&&e("identifier")},[]),t&&u.jsx(Aw,{})}function Tw(){return u.jsx(Mt,{children:u.jsx(wo,{state:{redirectRoute:`${qt.PORTAL}`}})})}function ji(){const{state:e}=Jt(),[t,n]=O.useState(""),{session:r,mutate:i}=nt(),s=Et(),{t:a}=$e(),[l,f]=O.useState(!1),[m,h]=O.useState(!1),v=async()=>{if(r){f(!0);try{await ho.setContact(r.uuid,{email:t}),await i(),qe.success(a("contactSavedToSession")),e&&e.redirectRoute&&s(e.redirectRoute,{state:e})}catch{h(!0)}f(!1)}};return u.jsxs(u.Fragment,{children:[u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsxs("div",{className:"flex h-16 items-center",children:[u.jsx(rt,{label:"",variant:"link-gray",before:u.jsx(Ct,{icon:"caret-left",size:"md"}),onClick:()=>s("../")}),u.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})})]})}),u.jsx(bt,{children:u.jsx(vo,{label:a("emailAddress"),onChange:c=>n(c.target.value)})}),u.jsx(Ot,{children:u.jsx(rt,{label:a("continue"),className:"w-full",onClick:v,disabled:!t||l})})]})}),u.jsx(xr,{title:`${a("new")} ${a("emailAddress").toLowerCase()}`,isOpen:m,onClose:()=>h(!1),primaryAction:{label:a("confirm"),action:()=>{s("new-contact",{state:{...e,email:t}})}},secondaryAction:{label:a("cancel"),action:()=>h(!1)},children:u.jsx("p",{children:a("continueWithEmail",{email:t})})})]})}function jw(){const[e,t]=O.useState(""),{session:n,mutate:r}=nt(),i=Et(),{t:s}=$e(),a=async()=>{n&&(await ir.create(e),await r(),qe.success(s("contactSavedToSession")),i("../"))};return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:s("fillInXBelow",{x:s("emailAddress").toLowerCase()})})})}),u.jsx(bt,{children:u.jsx(vo,{label:s("emailAddress"),onChange:l=>t(l.target.value)})}),u.jsx(Ot,{children:u.jsx(rt,{label:s("continue"),className:"w-full",onClick:a,disabled:!e})})]})})}function Tn(){const{state:e}=Jt(),{t}=$e(),{session:n,mutate:r}=nt(),i=Et(),s=En(),[a,l]=O.useState(!1),[f,m]=O.useState([]),[h,v]=O.useState({}),[c,E]=O.useState(!1);O.useEffect(()=>{f.length||ca.get().then(g=>{const p=g.data.data.filter(x=>x.strategy!==Yn.FUNCTIONAL);m(p);const y=p.reduce((x,C)=>({...x,[C.name]:C.strategy===Yn.OPT_OUT}),{});v(y)})},[]);const o=g=>{Object.hasOwn(h,g)?v({...h,[g]:!h[g]}):v({...h,[g]:!0})},d=async()=>{l(!0),await ir.create(e.email),await ca.update({values:h}),e.contactIdentifier&&await ir.linkIdentifier(e.contactIdentifier,e.email),await du(n.uuid,e.email,e.contactIdentifier,s.onContactLink),await r(),qe.success(t("contactForEmailCreated",{email:e.email})),qe.success(t("contactIdentifierLinkedToEmail",{value:e.contactIdentifier,email:e.email})),e&&e.redirectRoute&&i(e.redirectRoute,{state:e}),l(!1)};return!e||!e.email&&!e.contactIdentifier?u.jsx(Ur,{to:"../../"}):u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:t("termsAndConditions")})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex flex-col gap-4 text-sm",children:[u.jsxs("div",{children:[u.jsx("p",{children:t("marketingSubscriptions")}),u.jsx("p",{className:"text-core-gray-500",children:t("chooseCommunicationPreferences")})]}),f.map(g=>u.jsxs("div",{className:"flex gap-2",children:[u.jsx(Yo,{defaultChecked:g.strategy===Yn.OPT_OUT,onChange:()=>o(g.name)}),u.jsx("p",{children:g.name})]},g.id)),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(mo,{required:!0,onChange:g=>E(g)}),u.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"})}})]})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:t("create"),className:"w-full",onClick:d,disabled:!c||a})})]})})}function Oi(){const{t:e}=$e(),{state:t}=Jt(),{session:n,mutate:r}=nt(),i=Et(),s=En(),[a,l]=O.useState(!1),[f,m]=O.useState(""),[h,v]=O.useState(!1);if(!t||!t.contactIdentifier)return u.jsx(Ur,{to:"../"});const c=async()=>{l(!0);try{await ir.linkIdentifier(t.contactIdentifier,f),await du(n.uuid,f,t.contactIdentifier,s.onContactLink),await r(),qe.success(e("contactIdentifierLinkedToEmail",{value:t.contactIdentifier,email:f})),t&&t.redirectRoute&&i(t.redirectRoute,{state:t})}catch{v(!0)}l(!1)};return u.jsxs(Mt,{children:[u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:e("linkContact")})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex flex-col gap-3",children:[u.jsx(Y0,{body:e("noEmailAddressLinkedToIdentifier")}),u.jsx(vo,{label:e("emailAddress"),onChange:E=>m(E.target.value)})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("continue"),className:"w-full",onClick:c,disabled:!f||a})})]}),u.jsx(xr,{title:`${e("new")} ${e("emailAddress").toLowerCase()}`,isOpen:h,onClose:()=>v(!1),primaryAction:{label:e("confirm"),action:()=>i("new-contact",{state:{...t,email:f}})},secondaryAction:{label:e("cancel"),action:()=>v(!1)},children:u.jsx("p",{children:e("continueWithEmail",{email:f})})})]})}function Ow(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(Sw,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/register",element:u.jsx(jw,{})}),u.jsx(Oe,{path:"/identifier",element:u.jsx(Tw,{})}),u.jsx(Oe,{path:"/identifier/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/identifier/link-identifier/new-contact",element:u.jsx(Tn,{})})]})}function Iw(){return u.jsx(Mt,{children:u.jsx(wo,{state:{redirectRoute:`${qt.POINTS_TRANSACTION}/transaction`}})})}function Nw(){const{t:e}=$e(),{session:{input_data:t}}=nt(),{contact:n,isLoading:r,mutate:i}=xn(),[s,a]=O.useState(),[l,f]=O.useState(!1),[m,h]=O.useState(""),v=async()=>{if(f(!0),t.amount_in_cents)try{const{data:{data:c}}=await p0.create({unit_value:t.amount_in_cents/100});i(),a(c)}catch(c){h(c.response.data.message)}else h(e("xIsRequired",{x:"Amount in cents"})+".");f(!1)};return O.useEffect(()=>{!l&&!s&&!m&&(async()=>await v())()},[]),r?u.jsx(u.Fragment,{}):n?u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.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})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[u.jsx("div",{className:"flex h-full flex-col items-center gap-2 p-6",children:m?u.jsx("p",{className:"text-core-red-500",children:m}):u.jsx("div",{className:"flex h-full items-center justify-center gap-1 text-4xl font-bold",children:s?u.jsxs(u.Fragment,{children:["+",u.jsx(Kn,{value:s.credits,start:0})]}):u.jsx("div",{className:"text-core-primary-500",children:u.jsx(br,{className:"h-[32px] w-[32px]"})})})}),u.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx("p",{className:"font-light text-gray-500",children:`${e("new")} ${e("balance").toLowerCase()}`}),u.jsx(Kn,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(s?s.credits:0)})]})})]})})]})}):u.jsx(Ur,{to:"../"})}function Pw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(Iw,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/transaction",element:u.jsx(mn,{element:u.jsx(Nw,{})})})]})}function Sf(){const{session:e}=nt();return u.jsx(Mt,{children:u.jsx(wo,{state:{redirectRoute:e.type===zt.TOP_UP_PREPAID?`${qt.TOP_UP_PREPAID}/top-up`:`${qt.PAY_PREPAID}/pay`}})})}function kw(){const{t:e}=$e(),{balance:t,mutate:n}=ou(),{mutate:r}=nt(),{contact:i}=xn(),s=async a=>{a&&(await iu.transaction({amount_in_cents:a}),await n(),await r(),qe.success(e("prepaidTransactionCreated")))};return!t||!i?u.jsx(u.Fragment,{}):u.jsx(Mt,{children:u.jsx(Pu,{title:`${i.current_display_values.firstname} ${i.current_display_values.lastname}`,balance:(t==null?void 0:t.balance_in_cents)??0,transaction:s})})}function Dw(){const{t:e}=$e(),{balance:t,mutate:n}=ou(),{contact:r}=xn(),{session:{input_data:i,currency:s,events:a},mutate:l}=nt(),f=i.amount_in_cents??0;if(!t||!r)return u.jsx(u.Fragment,{});const m=async()=>{f&&(await iu.transaction({amount_in_cents:-v()}),await n(),await l(),qe.success(e("prepaidTransactionCreated")))},h=()=>{let c=0;return a.filter(o=>o.type===Fn.PREPAID_TRANSACTION).forEach(o=>{c+=o.data.amount_in_cents}),c},v=()=>Math.min(f+h(),t==null?void 0:t.balance_in_cents);return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:`${r.current_display_values.firstname} ${r.current_display_values.lastname}`})})}),u.jsx(bt,{children:u.jsxs("div",{className:"flex h-full flex-col gap-4",children:[u.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:u.jsxs("div",{className:"flex justify-between",children:[u.jsx("p",{className:"font-light text-gray-500",children:e("prepaidBalance")}),u.jsx(Kn,{value:t.balance_in_cents,start:t.balance_in_cents+h(),currency:s,asCurrency:!0})]})}),u.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:u.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[u.jsx("p",{className:"text-sm font-light text-gray-500",children:e("amountToPay")}),u.jsx("div",{className:"text-5xl font-bold",children:u.jsx(Kn,{value:v(),start:f,currency:s,asCurrency:!0})})]})})]})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("confirmAndPay",{amount:vr(v(),s)}),className:"w-full",onClick:m,disabled:!f||!v()})})]})})}function Rw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Sf,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/pay",element:u.jsx(mn,{element:u.jsx(Dw,{})})})]})}function Bw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Sf,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/top-up",element:u.jsx(mn,{element:u.jsx(kw,{})})})]})}function Mw(){const{t:e}=$e(),[t,n]=O.useState(""),[r,i]=O.useState(!1),[s,a]=O.useState(!1),[l,f]=O.useState(!1),[m,h]=O.useState(),{session:v}=nt(),c=Et(),E=O.useCallback(async()=>{if(v){i(!0);const{data:{data:o}}=await la.get(t);h(o),o.contact||v.contact?c("redeem",{state:{voucher:o}}):f(!0),i(!1)}},[t,v]);return O.useEffect(()=>{t&&!r&&!s&&E().then()},[t,r,s,E]),u.jsxs(u.Fragment,{children:[u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("scanOrEnterX",{x:e("voucherCode").toLowerCase()})})})}),u.jsx(bt,{children:u.jsx(Ao,{dataSetter:n,setDefer:a,label:e("code")})}),u.jsx(Ot,{children:u.jsx(rt,{label:e("submit"),className:"w-full",onClick:E})})]})}),u.jsx(xr,{title:"Voucher not linked to contact",isOpen:l,onClose:()=>f(!1),primaryAction:{label:e("linkToContact"),action:()=>c("link",{state:{voucher:m}})},secondaryAction:{label:e("cancel"),action:()=>f(!1)},children:u.jsx("p",{children:e("linkVoucherWithCodeToContact",{code:t})})})]})}function _w(){const{state:e}=Jt(),t=Et(),{t:n}=$e(),{session:r,mutate:i}=nt(),{onRedeemVoucher:s}=En(),[a,l]=O.useState(e.voucher);if(!a)return u.jsx(u.Fragment,{});const f=O.useCallback(async()=>{if(!a.contact&&!r.contact)return t("../link",{state:e});const{data:{data:m}}=await la.redeemByCode(a.code);l(m),s&&s(m);const h=await i(),v=h==null?void 0:h.data.data.events;go(v)},[r,a]);return u.jsx(Mt,{children:u.jsxs(At,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:"Voucher"})})}),u.jsx(bt,{children:u.jsx("div",{children:u.jsx(Ha,{voucher:a,setSelected:()=>{}})})}),u.jsx(Ot,{children:u.jsx(rt,{label:n("redeemVoucher"),className:"w-full",onClick:f,disabled:a.status!==yr.ACTIVE})})]})})}function Lw(){const{state:{voucher:e}}=Jt();return u.jsx(Mt,{children:u.jsx(wo,{state:{voucher:e,redirectRoute:`${qt.VOUCHER}/redeem`}})})}function Fw(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Mw,{})}),u.jsx(Oe,{path:"/email",element:u.jsx(ji,{})}),u.jsx(Oe,{path:"/email/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/link",element:u.jsx(Lw,{})}),u.jsx(Oe,{path:"/link/link-identifier",element:u.jsx(Oi,{})}),u.jsx(Oe,{path:"/link/link-identifier/new-contact",element:u.jsx(Tn,{})}),u.jsx(Oe,{path:"/redeem",element:u.jsx(_w,{})})]})}const Vw="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 qw(){const e=Et(),{t}=$e(),n=En();return O.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),u.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[u.jsxs("div",{className:"flex items-center justify-center gap-3",children:[u.jsx("img",{alt:"logo",src:Vw,className:"z-10 h-16 w-16 hover:animate-spin"}),u.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",u.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?u.jsx(rt,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):u.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function Uw(){const e=Et(),{t}=$e(),{sessionUuid:n}=En(),{session:r,isLoading:i,mutate:s}=nt();return O.useEffect(()=>{if(!i&&r){const a=r.type in qt?`/${r.type.replaceAll("_","-").toLowerCase()}`:"/";e(a)}},[i,s,e,r]),i?u.jsx("div",{className:"flex h-screen w-screen items-center justify-center text-core-primary-500",children:u.jsx(br,{className:"h-[48px] w-[48px]"})}):u.jsx("div",{className:"text-error-600 flex w-full items-center justify-center",children:`${t("portalSessionNotFound")} (${n})`})}function Tf(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(qw,{})}),u.jsx(Oe,{path:":portalSessionUuid",element:u.jsx(Uw,{})}),u.jsx(Oe,{path:`${qt.REDEEM_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.REDEEM_GIFTCARD,element:u.jsx(lw,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.TOP_UP_GIFTCARD,element:u.jsx(uw,{})})}),u.jsx(Oe,{path:`${qt.PORTAL}/*`,element:u.jsx(ar,{type:zt.PORTAL,element:u.jsx(Ow,{})})}),u.jsx(Oe,{path:`${qt.PAY_PREPAID}/*`,element:u.jsx(ar,{type:zt.PAY_PREPAID,element:u.jsx(Rw,{})})}),u.jsx(Oe,{path:`${qt.POINTS_TRANSACTION}/*`,element:u.jsx(ar,{type:zt.POINTS_TRANSACTION,element:u.jsx(Pw,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_PREPAID}/*`,element:u.jsx(ar,{type:zt.TOP_UP_PREPAID,element:u.jsx(Bw,{})})}),u.jsx(Oe,{path:`${qt.VOUCHER}/*`,element:u.jsx(ar,{type:zt.VOUCHER,element:u.jsx(Fw,{})})})]})}function mn({element:e}){const{session:t}=nt();return t.contact?e:u.jsx(Ur,{to:"/"})}function ar({type:e,element:t}){const{session:n}=nt();if(n)return e===n.type?t:u.jsx(Ur,{to:"/"})}function Gw(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),a=i-s,l=(i+s)/2;let f=0;a!==0&&(f=a/(1-Math.abs(2*l-1)));let m=0;return a!==0&&(i===t?m=((n-r)/a+(n<r?6:0))*60:i===n?m=((r-t)/a+2)*60:m=((t-n)/a+4)*60),{hue:m,saturation:f,lightness:l}}function Ko(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 a=0,l=0,f=0;return e<60?(a=r,l=i,f=0):e<120?(a=i,l=r,f=0):e<180?(a=0,l=r,f=i):e<240?(a=0,l=i,f=r):e<300?(a=i,l=0,f=r):(a=r,l=0,f=i),a=Math.round((a+s)*255),l=Math.round((l+s)*255),f=Math.round((f+s)*255),`#${a.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}${f.toString(16).padStart(2,"0")}`}function jf(e){const{hue:t,saturation:n,lightness:r}=Gw(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}],a={},l={},f={},m={};s.forEach(h=>{const v=(h.min+h.max)/2/100;a[h.key]=Ko(t,n,v),f[h.key]=Ko(0,n,v),m[h.key]=Ko(120,n,v),l[h.key]=Ko(t,i,v)});for(const h of s)if(r*100>=h.min&&r*100<=h.max){a[h.key]=e;break}return{primaryPalette:a,redPalette:f,greenPalette:m,grayPalette:l}}const Of=e=>{const t={primary:e.primary_color,secondary:e.secondary_color,tertiary:e.tertiary_color,quarternary:e.quarternary_color},n=document.querySelector(":root");for(const a in t){const{primaryPalette:l}=jf(t[a]);for(const f in l)n.style.setProperty(`--${a}-${f}`,l[f])}const{grayPalette:r,redPalette:i,greenPalette:s}=jf(t.primary);for(const a in r)n.style.setProperty(`--gray-${a}`,r[a]);for(const a in i)n.style.setProperty(`--red-${a}`,i[a]);for(const a in s)n.style.setProperty(`--green-${a}`,s[a])};function za(e){"@babel/helpers - typeof";return za=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},za(e)}function If(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":za(XMLHttpRequest))==="object"}function Yw(e){return!!e&&typeof e.then=="function"}function Kw(e){return Yw(e)?e:Promise.resolve(e)}function $w(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 Za={exports:{}},$o={exports:{}},Nf;function Qw(){return Nf||(Nf=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof lr<"u"&&lr,r=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(a){var l=typeof s<"u"&&s||typeof self<"u"&&self||typeof l<"u"&&l,f={searchParams:"URLSearchParams"in l,iterable:"Symbol"in l&&"iterator"in Symbol,blob:"FileReader"in l&&"Blob"in l&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in l,arrayBuffer:"ArrayBuffer"in l};function m(N){return N&&DataView.prototype.isPrototypeOf(N)}if(f.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],v=ArrayBuffer.isView||function(N){return N&&h.indexOf(Object.prototype.toString.call(N))>-1};function c(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(N)||N==="")throw new TypeError('Invalid character in header field name: "'+N+'"');return N.toLowerCase()}function E(N){return typeof N!="string"&&(N=String(N)),N}function o(N){var q={next:function(){var W=N.shift();return{done:W===void 0,value:W}}};return f.iterable&&(q[Symbol.iterator]=function(){return q}),q}function d(N){this.map={},N instanceof d?N.forEach(function(q,W){this.append(W,q)},this):Array.isArray(N)?N.forEach(function(q){this.append(q[0],q[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(q){this.append(q,N[q])},this)}d.prototype.append=function(N,q){N=c(N),q=E(q);var W=this.map[N];this.map[N]=W?W+", "+q:q},d.prototype.delete=function(N){delete this.map[c(N)]},d.prototype.get=function(N){return N=c(N),this.has(N)?this.map[N]:null},d.prototype.has=function(N){return this.map.hasOwnProperty(c(N))},d.prototype.set=function(N,q){this.map[c(N)]=E(q)},d.prototype.forEach=function(N,q){for(var W in this.map)this.map.hasOwnProperty(W)&&N.call(q,this.map[W],W,this)},d.prototype.keys=function(){var N=[];return this.forEach(function(q,W){N.push(W)}),o(N)},d.prototype.values=function(){var N=[];return this.forEach(function(q){N.push(q)}),o(N)},d.prototype.entries=function(){var N=[];return this.forEach(function(q,W){N.push([W,q])}),o(N)},f.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function g(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function p(N){return new Promise(function(q,W){N.onload=function(){q(N.result)},N.onerror=function(){W(N.error)}})}function y(N){var q=new FileReader,W=p(q);return q.readAsArrayBuffer(N),W}function x(N){var q=new FileReader,W=p(q);return q.readAsText(N),W}function C(N){for(var q=new Uint8Array(N),W=new Array(q.length),te=0;te<q.length;te++)W[te]=String.fromCharCode(q[te]);return W.join("")}function S(N){if(N.slice)return N.slice(0);var q=new Uint8Array(N.byteLength);return q.set(new Uint8Array(N)),q.buffer}function j(){return this.bodyUsed=!1,this._initBody=function(N){this.bodyUsed=this.bodyUsed,this._bodyInit=N,N?typeof N=="string"?this._bodyText=N:f.blob&&Blob.prototype.isPrototypeOf(N)?this._bodyBlob=N:f.formData&&FormData.prototype.isPrototypeOf(N)?this._bodyFormData=N:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)?this._bodyText=N.toString():f.arrayBuffer&&f.blob&&m(N)?(this._bodyArrayBuffer=S(N.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(N)||v(N))?this._bodyArrayBuffer=S(N):this._bodyText=N=Object.prototype.toString.call(N):this._bodyText="",this.headers.get("content-type")||(typeof N=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(N)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var N=g(this);if(N)return N;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 N=g(this);return N||(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(y)}),this.text=function(){var N=g(this);if(N)return N;if(this._bodyBlob)return x(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}var I=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(N){var q=N.toUpperCase();return I.indexOf(q)>-1?q:N}function D(N,q){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');q=q||{};var W=q.body;if(N instanceof D){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,q.headers||(this.headers=new d(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!W&&N._bodyInit!=null&&(W=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=q.credentials||this.credentials||"same-origin",(q.headers||!this.headers)&&(this.headers=new d(q.headers)),this.method=P(q.method||this.method||"GET"),this.mode=q.mode||this.mode||null,this.signal=q.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")&&(q.cache==="no-store"||q.cache==="no-cache")){var te=/([?&])_=[^&]*/;if(te.test(this.url))this.url=this.url.replace(te,"$1_="+new Date().getTime());else{var X=/\?/;this.url+=(X.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}D.prototype.clone=function(){return new D(this,{body:this._bodyInit})};function _(N){var q=new FormData;return N.trim().split("&").forEach(function(W){if(W){var te=W.split("="),X=te.shift().replace(/\+/g," "),ne=te.join("=").replace(/\+/g," ");q.append(decodeURIComponent(X),decodeURIComponent(ne))}}),q}function Q(N){var q=new d,W=N.replace(/\r?\n[\t ]+/g," ");return W.split("\r").map(function(te){return te.indexOf(`
104
104
  `)===0?te.substr(1,te.length):te}).forEach(function(te){var X=te.split(":"),ne=X.shift().trim();if(ne){var re=X.join(":").trim();q.append(ne,re)}}),q}j.call(D.prototype);function $(N,q){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');q||(q={}),this.type="default",this.status=q.status===void 0?200:q.status,this.ok=this.status>=200&&this.status<300,this.statusText=q.statusText===void 0?"":""+q.statusText,this.headers=new d(q.headers),this.url=q.url||"",this._initBody(N)}j.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},$.error=function(){var N=new $(null,{status:0,statusText:""});return N.type="error",N};var V=[301,302,303,307,308];$.redirect=function(N,q){if(V.indexOf(q)===-1)throw new RangeError("Invalid status code");return new $(null,{status:q,headers:{location:N}})},a.DOMException=l.DOMException;try{new a.DOMException}catch{a.DOMException=function(q,W){this.message=q,this.name=W;var te=Error(q);this.stack=te.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function K(N,q){return new Promise(function(W,te){var X=new D(N,q);if(X.signal&&X.signal.aborted)return te(new a.DOMException("Aborted","AbortError"));var ne=new XMLHttpRequest;function re(){ne.abort()}ne.onload=function(){var se={status:ne.status,statusText:ne.statusText,headers:Q(ne.getAllResponseHeaders()||"")};se.url="responseURL"in ne?ne.responseURL:se.headers.get("X-Request-URL");var ve="response"in ne?ne.response:ne.responseText;setTimeout(function(){W(new $(ve,se))},0)},ne.onerror=function(){setTimeout(function(){te(new TypeError("Network request failed"))},0)},ne.ontimeout=function(){setTimeout(function(){te(new TypeError("Network request failed"))},0)},ne.onabort=function(){setTimeout(function(){te(new a.DOMException("Aborted","AbortError"))},0)};function he(se){try{return se===""&&l.location.href?l.location.href:se}catch{return se}}ne.open(X.method,he(X.url),!0),X.credentials==="include"?ne.withCredentials=!0:X.credentials==="omit"&&(ne.withCredentials=!1),"responseType"in ne&&(f.blob?ne.responseType="blob":f.arrayBuffer&&X.headers.get("Content-Type")&&X.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(ne.responseType="arraybuffer")),q&&typeof q.headers=="object"&&!(q.headers instanceof d)?Object.getOwnPropertyNames(q.headers).forEach(function(se){ne.setRequestHeader(se,E(q.headers[se]))}):X.headers.forEach(function(se,ve){ne.setRequestHeader(ve,se)}),X.signal&&(X.signal.addEventListener("abort",re),ne.onreadystatechange=function(){ne.readyState===4&&X.signal.removeEventListener("abort",re)}),ne.send(typeof X._bodyInit>"u"?null:X._bodyInit)})}return K.polyfill=!0,l.fetch||(l.fetch=K,l.Headers=d,l.Request=D,l.Response=$),a.Headers=d,a.Request=D,a.Response=$,a.fetch=K,a})({})})(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}($o,$o.exports)),$o.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof lr<"u"&&lr.fetch?n=lr.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof $w<"u"&&typeof window>"u"){var r=n||Qw();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Za,Za.exports);var Pf=Za.exports;const kf=ss(Pf),Df=wh({__proto__:null,default:kf},[Pf]);function Rf(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 Bf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rf(Object(n),!0).forEach(function(r){Ww(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ww(e,t,n){return t=Hw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hw(e){var t=Jw(e,"string");return cr(t)=="symbol"?t:t+""}function Jw(e,t){if(cr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(cr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cr(e){"@babel/helpers - typeof";return cr=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},cr(e)}var Pn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?Pn=global.fetch:typeof window<"u"&&window.fetch?Pn=window.fetch:Pn=fetch);var Ii;If()&&(typeof global<"u"&&global.XMLHttpRequest?Ii=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Ii=window.XMLHttpRequest));var Qo;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Qo=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Qo=window.ActiveXObject)),!Pn&&Df&&!Ii&&!Qo&&(Pn=kf||Df),typeof Pn!="function"&&(Pn=void 0);var Xa=function(t,n){if(n&&cr(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},Mf=function(t,n,r,i){var s=function(f){if(!f.ok)return r(f.statusText||"Error",{status:f.status});f.text().then(function(m){r(null,{status:f.status,data:m})}).catch(r)};if(i){var a=i(t,n);if(a instanceof Promise){a.then(s).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(s).catch(r):Pn(t,n).then(s).catch(r)},_f=!1,zw=function(t,n,r,i){t.queryStringParams&&(n=Xa(n,t.queryStringParams));var s=Bf({},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 a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,l=Bf({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:s},_f?{}:a),f=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Mf(n,l,i,f)}catch(m){if(!a||Object.keys(a).length===0||!m.message||m.message.indexOf("not implemented")<0)return i(m);try{Object.keys(a).forEach(function(h){delete l[h]}),Mf(n,l,i,f),_f=!0}catch(h){i(h)}}},Zw=function(t,n,r,i){r&&cr(r)==="object"&&(r=Xa("",r).slice(1)),t.queryStringParams&&(n=Xa(n,t.queryStringParams));try{var s;Ii?s=new Ii:s=new Qo("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 a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var l in a)s.setRequestHeader(l,a[l]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(r)}catch(f){console&&console.log(f)}},Xw=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Pn&&n.indexOf("file:")!==0)return zw(t,n,r,i);if(If()||typeof ActiveXObject=="function")return Zw(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ir(e){"@babel/helpers - typeof";return Ir=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},Ir(e)}function Lf(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 ec(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lf(Object(n),!0).forEach(function(r){Ff(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tb(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,Vf(r.key),r)}}function nb(e,t,n){return t&&tb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ff(e,t,n){return t=Vf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vf(e){var t=rb(e,"string");return Ir(t)=="symbol"?t:t+""}function rb(e,t){if(Ir(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ir(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ib=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 Ff({},r,i||"")},parseLoadPayload:function(n,r){},request:Xw,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},qf=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]:{};eb(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return nb(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=ec(ec(ec({},ib()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Ir(a)==="object"&&typeof a.unref=="function"&&a.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,a){var l=this,f=this.options.loadPath;typeof this.options.loadPath=="function"&&(f=this.options.loadPath(n,i)),f=Kw(f),f.then(function(m){if(!m)return a(null,{});var h=l.services.interpolator.interpolate(m,{lng:n.join("+"),ns:i.join("+")});l.loadUrl(h,a,r,s)})}},{key:"loadUrl",value:function(n,r,i,s){var a=this,l=typeof i=="string"?[i]:i,f=typeof s=="string"?[s]:s,m=this.options.parseLoadPayload(l,f);this.options.request(this.options,n,m,function(h,v){if(v&&(v.status>=500&&v.status<600||!v.status))return r("failed loading "+n+"; status code: "+v.status,!0);if(v&&v.status>=400&&v.status<500)return r("failed loading "+n+"; status code: "+v.status,!1);if(!v&&h&&h.message&&h.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+h.message,!0);if(h)return r(h,!1);var c,E;try{typeof v.data=="string"?c=a.options.parse(v.data,i,s):c=v.data}catch{E="failed parsing "+n+" to json"}if(E)return r(E,!1);r(null,c)})}},{key:"create",value:function(n,r,i,s,a){var l=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var f=this.options.parsePayload(r,i,s),m=0,h=[],v=[];n.forEach(function(c){var E=l.options.addPath;typeof l.options.addPath=="function"&&(E=l.options.addPath(c,r));var o=l.services.interpolator.interpolate(E,{lng:c,ns:r});l.options.request(l.options,o,f,function(d,g){m+=1,h.push(d),v.push(g),m===n.length&&typeof a=="function"&&a(h,v)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,s=r.languageUtils,a=r.logger,l=i.language;if(!(l&&l.toLowerCase()==="cimode")){var f=[],m=function(v){var c=s.toResolveHierarchy(v);c.forEach(function(E){f.indexOf(E)<0&&f.push(E)})};m(l),this.allOptions.preload&&this.allOptions.preload.forEach(function(h){return m(h)}),f.forEach(function(h){n.allOptions.ns.forEach(function(v){i.read(h,v,"read",null,null,function(c,E){c&&a.warn("loading namespace ".concat(v," for language ").concat(h," failed"),c),!c&&E&&a.log("loaded namespace ".concat(v," for language ").concat(h),E),i.loaded("".concat(h,"|").concat(v),c,E)})})})}}}])}();qf.type="backend";const{slice:ob,forEach:sb}=[];function ab(e){return sb.call(ob.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Uf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,cb=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let s=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!Uf.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!Uf.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},Gf={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=cb(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 lb={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Gf.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:s}=t;n&&typeof document<"u"&&Gf.create(n,e,r,i,s)}},ub={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 a=i.substring(1).split("&");for(let l=0;l<a.length;l++){const f=a[l].indexOf("=");f>0&&a[l].substring(0,f)===t&&(n=a[l].substring(f+1))}}return n}};let Ni=null;const Yf=()=>{if(Ni!==null)return Ni;try{Ni=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ni=!1}return Ni};var db={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Yf())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Yf()&&window.localStorage.setItem(n,e)}};let Pi=null;const Kf=()=>{if(Pi!==null)return Pi;try{Pi=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Pi=!1}return Pi};var fb={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Kf())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Kf()&&window.sessionStorage.setItem(n,e)}},hb={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}},pb={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}},gb={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}},mb={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 yb(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class $f{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=ab(n,this.options||{},yb()),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(lb),this.addDetector(ub),this.addDetector(db),this.addDetector(fb),this.addDetector(hb),this.addDetector(pb),this.addDetector(gb),this.addDetector(mb)}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)}))}}$f.type="languageDetector",St.use(qf).use($f).use(N0).init({fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function vb({children:e,config:t,payload:n}){const[r,i]=O.useState("");return O.useEffect(()=>{r||(it.initialize(t.apiKey,t.host),localStorage.setItem("apiKey",JSON.stringify(t.apiKey)),(async()=>{const s=await ho.create(n);i(s.data.data.uuid);const{data:{data:a}}=await Hl.get();Of(a)})())},[t,n,r]),r?u.jsx(O.StrictMode,{children:u.jsxs(O.Suspense,{children:[u.jsx(nu,{...t,sessionUuid:r,children:u.jsx("div",{children:u.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[u.jsx("div",{className:"flex h-full overflow-auto",children:e}),r&&u.jsx(Du,{})]})})}),u.jsx(Bl,{className:"lg:top-14"})]})}):u.jsx("div",{className:"flex h-screen items-center justify-center text-core-gray-500",children:u.jsx(br,{className:"h-[48px] w-[48px]"})})}function wb(e){return u.jsx(vb,{config:e,payload:{type:e.type??zt.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,contact_uuid:e.contactUuid,...e.amountInCents&&{amount_in_cents:e.amountInCents},...e.allowMultipleGiftcards&&{allow_multiple_giftcards:e.allowMultipleGiftcards},...e.enableRegistration&&{enable_registration:e.enableRegistration},...e.enableEmailIdentification&&{enable_email_identification:e.enableEmailIdentification},...e.enableOnScreenKeyboard&&{enable_on_screen_keyboard:e.enableOnScreenKeyboard}},children:u.jsx(Nc,{children:u.jsx(Tf,{})})})}function bb({uuid:e,host:t}){const[n,r]=O.useState(!1);return O.useEffect(()=>{n||(it.initialize(void 0,t),Hl.get().then(i=>{const s=i.data.data;Of(s)}),r(!0))},[t,n]),n?u.jsxs(O.StrictMode,{children:[u.jsx(nu,{sessionUuid:e,children:u.jsx("div",{className:"bg-primary-50 flex h-screen w-screen",children:u.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[u.jsx("div",{className:"flex h-full overflow-auto",children:u.jsx(Nc,{children:u.jsx(Tf,{})})}),e&&u.jsx(Du,{})]})})}),u.jsx(Bl,{className:"lg:top-14"})]}):u.jsx(u.Fragment,{children:"Initializing..."})}const xb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},le.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"})),Eb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},le.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"})),Cb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},le.createElement("path",{d:"M13.25 8.75L9.75 12L13.25 15.25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Ab=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},le.createElement("path",{d:"M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Sb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},le.createElement("path",{d:"M4.7002 4.70016L11.2999 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}),le.createElement("path",{d:"M11.2998 4.70016L4.70014 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Tb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},le.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),le.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"}),le.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 7.75V8.25"}),le.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15.75V16.25"}))},Symbol.toStringTag,{value:"Module"})),jb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},le.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"})),Ob=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},le.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"}),le.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"})),Ib=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},le.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13V15"}),le.createElement("circle",{cx:12,cy:9,r:.5}),le.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}))},Symbol.toStringTag,{value:"Module"})),Nb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},le.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"})),Pb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},le.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"}),le.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"})),kb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},le.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75H5.75V16.75L4.75 19.25H19.25L18.25 16.75V7.75Z"}),le.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75L16.25 4.75H7.75L5.75 7.75"}),le.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"})),Db=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...e},le.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"})),Rb=Object.freeze(Object.defineProperty({__proto__:null,default:e=>le.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},le.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"}),le.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"}));vt.DefaultSession=bb,vt.EventType=Fn,vt.PortalRoute=qt,vt.PortalSession=wb,vt.PortalType=zt,vt.SubscriptionStatus=au,vt.SubscriptionStrategy=Yn,vt.VoucherStatus=yr,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});