@leatcom/portal-sessions 0.0.43-beta.2 → 0.0.43-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,7 @@ React keys must be passed directly to JSX without using spread:
81
81
  Copyright (c) 2018 Jed Watson.
82
82
  Licensed under the MIT License (MIT), see
83
83
  http://jedwatson.github.io/classnames
84
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var l=arguments[a];l&&(s=i(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var l in s)t.call(s,l)&&s[l]&&(a=i(a,l));return a}function i(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xu);var K0=xu.exports;const Dt=ss(K0);function ti(e){return u.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:Dt("inline h-5 w-5 animate-spin fill-[#E5E7EB]",e.className),viewBox:"0 0 100 101",fill:"red",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentFill"}),u.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]})}const $0=br("group inline-flex shrink-0 select-none items-center justify-center font-medium transition-colors duration-100 antialiased rounded-lg hover:shadow-none focus:outline-0 focus:outline-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",{variants:{size:{sm:"h-8 gap-1 px-2 py-1 text-xs leading-4",md:"h-10 gap-1 px-3 py-2 text-sm leading-5",lg:"h-12 gap-1 px-3 py-3 text-base leading-6"},variant:{primary:"bg-core-primary-500 text-core-white-900 outline-primary hover:bg-core-primary-600 disabled:bg-core-primary-disabled",secondary:"box-border border border-core-gray-200 bg-core-white-900 shadow-xs hover:bg-core-gray-50 disabled:opacity-30",destructive:"bg-core-red-500 text-core-white-900 hover:bg-core-red-600 focus:outline-core-red-500 disabled:bg-core-red-200","destructive-outline":"box-border border border-core-red-200 text-core-red-700 shadow-xs hover:bg-core-red-50 focus:outline-core-red-500 disabled:opacity-40","link-gray":"bg-transparent hover:bg-surface hover:underline underline-offset-2 disabled:opacity-30"}},compoundVariants:[{variant:"link-gray",size:["md","lg"],class:"px-0 py-0"}],defaultVariants:{variant:"primary",size:"md"}}),Eu={primary:"primary",secondary:"secondary",destructive:"primary","destructive-outline":"destructive","link-gray":"secondary"},Cu={md:"sm",lg:"md"},it=({after:e,before:t,className:n,label:r="button",variant:i="primary",size:s="md",loading:a=!1,disabled:l=!1,onClick:f,...m})=>{const[h,v]=N.useState(a),c=d=>{f&&!h&&(v(!0),Promise.resolve(f(d)).finally(()=>v(!1)))},E=d=>{var g;return Dt("group-hover:opacity-70 ",(g=d.props)==null?void 0:g.className)},o=d=>{var g;return((g=d.props)==null?void 0:g.icon)??"user"};return u.jsxs("button",{className:Dt($0({variant:i,size:s}),n),disabled:l||h,onClick:c,...m,children:[u.jsxs("span",{className:`flex gap-1 ${h&&"opacity-0"}`,children:[t&&u.jsx(St,{className:E(t),icon:o(t),variant:Eu[i],size:Cu[s]}),u.jsx("span",{children:r}),e&&u.jsx(St,{className:Dt(E(e),`${h&&"opacity-0"}`),icon:o(e),variant:Eu[i],size:Cu[s]})]}),h&&u.jsx(ti,{className:"absolute"})]})};it.displayName="Button";function Ct({children:e}){return u.jsx("div",{className:"flex h-full max-h-full flex-col bg-white md:h-fit md:rounded-lg md:shadow-overlay",children:e})}function wt({children:e}){return u.jsx("div",{className:"grow overflow-y-auto px-6 py-4",children:e})}function Ot({children:e}){return u.jsx("div",{className:"border-t px-6 py-4",children:e})}function xt({children:e}){return u.jsx("div",{className:"border-b px-6",children:e})}const Au=({children:e,className:t,description:n,disabled:r,required:i=!1,tooltip:s,htmlFor:a})=>!e&&!s&&!n?null:u.jsx("label",{htmlFor:a,className:"inline-flex text-core-gray-800 shrink-0 items-center gap-1 antialiased ",children:u.jsxs("div",{className:Dt("inline-flex cursor-pointer items-center gap-1 text-sm font-medium leading-6",t,r&&"pointer-events-none text-core-gray-300"),children:[e?u.jsx("span",{className:Dt(r&&"pointer-events-none text-core-gray-300"),children:e}):null,n?u.jsx("span",{className:Dt("font-normal text-core-gray-500",r&&"text-current"),children:n}):null,i?u.jsx("span",{className:"font-normal text-core-red-500",children:"*"}):null]})}),Su=({helperText:e,error:t,disabled:n})=>e?u.jsx("span",{className:Dt("text-start text-sm leading-6 text-core-gray-500 antialiased ",t&&"text-core-red-500",n&&"text-core-gray-300"),children:e}):null;Au.displayName="Label",Su.displayName="HelperText";const kt=Object.assign(Au,{Helper:Su}),Q0=({id:e,defaultChecked:t=!1,disabled:n,onChange:r})=>{const i=n,[s,a]=N.useState(t),l=f=>{i||a(!s),r&&r(f.target.checked)};return u.jsx("div",{className:"flex h-6 w-6 items-center justify-center",children:u.jsx("input",{className:"h-4 w-4 rounded border border-core-gray-200 bg-core-white-900 text-core-primary-500 shadow-xs hover:border-core-gray-300 hover:shadow-none checked:bg-core-primary-500focus:outline-0 focus:ring-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border disabled:border-core-gray-200 disabled:bg-core-gray-50 disabled:shadow-none disabled:checked:bg-core-gray-200",id:e,type:"checkbox",checked:s,onChange:l,disabled:i})})},Tu=N.createContext(null);function ju(e=!1){const t=N.useContext(Tu);if(!t&&!e)throw new Error("Checkbox.Item must be used within a CheckboxGroup or CheckboxGroup.Root");return t}const Ou=N.forwardRef(({children:e,description:t,disabled:n,helperText:r,id:i,label:s,required:a,tooltip:l},f)=>{const m=N.useId(),h=i??m,v=s??t??l??r?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(kt,{className:"cursor-default",description:t,required:a,tooltip:l,htmlFor:h,disabled:n,children:s}),u.jsx(kt.Helper,{disabled:n,helperText:r})]}):null;return u.jsx(Tu.Provider,{value:{disabled:n},children:u.jsxs("div",{ref:f,"aria-describedby":r?`${h}__describer`:void 0,"aria-labelledby":s?`${h}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[s??r??t??l?u.jsx("div",{className:"flex flex-col",children:v}):null,e?u.jsx("div",{className:Dt("flex flex-col gap-2"),children:e}):null]})})});Ou.displayName="CheckboxGroup",Object.assign(Ou,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=ju(),{disabled:i}=r??{};return u.jsx(mo,{disabled:e??i,label:t,defaultChecked:n})}});const mo=({id:e,children:t,defaultChecked:n=!1,description:r,disabled:i,helperText:s,label:a,required:l=!1,tooltip:f,onChange:m})=>{const h=N.useId(),v=e??h,c=!!ju(!0),E=a??r??f??s?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(kt,{className:Dt(c&&"font-normal"),description:r,required:l,tooltip:f,htmlFor:v,disabled:i,children:a}),u.jsx(kt.Helper,{disabled:i,helperText:s})]}):null;return u.jsxs("div",{className:"flex gap-3",children:[u.jsx(Q0,{id:v,defaultChecked:n,disabled:i,onChange:m}),t||E]})};mo.displayName="Checkbox";var Nu={exports:{}};/*!
84
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var l=arguments[a];l&&(s=i(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var l in s)t.call(s,l)&&s[l]&&(a=i(a,l));return a}function i(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(xu);var K0=xu.exports;const Dt=ss(K0);function ti(e){return u.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:Dt("inline h-5 w-5 animate-spin fill-[#E5E7EB]",e.className),viewBox:"0 0 100 101",fill:"red",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentFill"}),u.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]})}const $0=br("group inline-flex shrink-0 select-none items-center justify-center font-medium transition-colors duration-100 antialiased rounded-lg hover:shadow-none focus:outline-0 focus:outline-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",{variants:{size:{sm:"h-8 gap-1 px-2 py-1 text-xs leading-4",md:"h-10 gap-1 px-3 py-2 text-sm leading-5",lg:"h-12 gap-1 px-3 py-3 text-base leading-6"},variant:{primary:"bg-core-primary-500 text-core-white-900 outline-primary hover:bg-core-primary-600 disabled:bg-core-primary-disabled",secondary:"box-border border border-core-gray-200 bg-core-white-900 shadow-xs hover:bg-core-gray-50 disabled:opacity-30",destructive:"bg-core-red-500 text-core-white-900 hover:bg-core-red-600 focus:outline-core-red-500 disabled:bg-core-red-200","destructive-outline":"box-border border border-core-red-200 text-core-red-700 shadow-xs hover:bg-core-red-50 focus:outline-core-red-500 disabled:opacity-40","link-gray":"bg-transparent hover:bg-surface hover:underline underline-offset-2 disabled:opacity-30"}},compoundVariants:[{variant:"link-gray",size:["md","lg"],class:"px-0 py-0"}],defaultVariants:{variant:"primary",size:"md"}}),Eu={primary:"primary",secondary:"secondary",destructive:"primary","destructive-outline":"destructive","link-gray":"secondary"},Cu={md:"sm",lg:"md"},it=({after:e,before:t,className:n,label:r="button",variant:i="primary",size:s="md",loading:a=!1,disabled:l=!1,onClick:f,...m})=>{const[h,v]=N.useState(a),c=d=>{f&&!h&&(v(!0),Promise.resolve(f(d)).finally(()=>v(!1)))},E=d=>{var g;return Dt("group-hover:opacity-70 ",(g=d.props)==null?void 0:g.className)},o=d=>{var g;return((g=d.props)==null?void 0:g.icon)??"user"};return u.jsxs("button",{className:Dt($0({variant:i,size:s}),n),disabled:l||h,onClick:c,...m,children:[u.jsxs("span",{className:`flex gap-1 ${h&&"opacity-0"}`,children:[t&&u.jsx(St,{className:E(t),icon:o(t),variant:Eu[i],size:Cu[s]}),u.jsx("span",{children:r}),e&&u.jsx(St,{className:Dt(E(e),`${h&&"opacity-0"}`),icon:o(e),variant:Eu[i],size:Cu[s]})]}),h&&u.jsx(ti,{className:"absolute"})]})};it.displayName="Button";function Ct({children:e}){return u.jsx("div",{className:"flex h-full max-h-full flex-col bg-white md:h-fit md:rounded-lg md:border md:shadow-md",children:e})}function wt({children:e}){return u.jsx("div",{className:"grow overflow-y-auto px-6 py-4",children:e})}function Ot({children:e}){return u.jsx("div",{className:"border-t px-6 py-4",children:e})}function xt({children:e}){return u.jsx("div",{className:"border-b px-6",children:e})}const Au=({children:e,className:t,description:n,disabled:r,required:i=!1,tooltip:s,htmlFor:a})=>!e&&!s&&!n?null:u.jsx("label",{htmlFor:a,className:"inline-flex text-core-gray-800 shrink-0 items-center gap-1 antialiased ",children:u.jsxs("div",{className:Dt("inline-flex cursor-pointer items-center gap-1 text-sm font-medium leading-6",t,r&&"pointer-events-none text-core-gray-300"),children:[e?u.jsx("span",{className:Dt(r&&"pointer-events-none text-core-gray-300"),children:e}):null,n?u.jsx("span",{className:Dt("font-normal text-core-gray-500",r&&"text-current"),children:n}):null,i?u.jsx("span",{className:"font-normal text-core-red-500",children:"*"}):null]})}),Su=({helperText:e,error:t,disabled:n})=>e?u.jsx("span",{className:Dt("text-start text-sm leading-6 text-core-gray-500 antialiased ",t&&"text-core-red-500",n&&"text-core-gray-300"),children:e}):null;Au.displayName="Label",Su.displayName="HelperText";const kt=Object.assign(Au,{Helper:Su}),Q0=({id:e,defaultChecked:t=!1,disabled:n,onChange:r})=>{const i=n,[s,a]=N.useState(t),l=f=>{i||a(!s),r&&r(f.target.checked)};return u.jsx("div",{className:"flex h-6 w-6 items-center justify-center",children:u.jsx("input",{className:"h-4 w-4 rounded border border-core-gray-200 bg-core-white-900 text-core-primary-500 shadow-xs hover:border-core-gray-300 hover:shadow-none checked:bg-core-primary-500focus:outline-0 focus:ring-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border disabled:border-core-gray-200 disabled:bg-core-gray-50 disabled:shadow-none disabled:checked:bg-core-gray-200",id:e,type:"checkbox",checked:s,onChange:l,disabled:i})})},Tu=N.createContext(null);function ju(e=!1){const t=N.useContext(Tu);if(!t&&!e)throw new Error("Checkbox.Item must be used within a CheckboxGroup or CheckboxGroup.Root");return t}const Ou=N.forwardRef(({children:e,description:t,disabled:n,helperText:r,id:i,label:s,required:a,tooltip:l},f)=>{const m=N.useId(),h=i??m,v=s??t??l??r?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(kt,{className:"cursor-default",description:t,required:a,tooltip:l,htmlFor:h,disabled:n,children:s}),u.jsx(kt.Helper,{disabled:n,helperText:r})]}):null;return u.jsx(Tu.Provider,{value:{disabled:n},children:u.jsxs("div",{ref:f,"aria-describedby":r?`${h}__describer`:void 0,"aria-labelledby":s?`${h}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[s??r??t??l?u.jsx("div",{className:"flex flex-col",children:v}):null,e?u.jsx("div",{className:Dt("flex flex-col gap-2"),children:e}):null]})})});Ou.displayName="CheckboxGroup",Object.assign(Ou,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=ju(),{disabled:i}=r??{};return u.jsx(mo,{disabled:e??i,label:t,defaultChecked:n})}});const mo=({id:e,children:t,defaultChecked:n=!1,description:r,disabled:i,helperText:s,label:a,required:l=!1,tooltip:f,onChange:m})=>{const h=N.useId(),v=e??h,c=!!ju(!0),E=a??r??f??s?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(kt,{className:Dt(c&&"font-normal"),description:r,required:l,tooltip:f,htmlFor:v,disabled:i,children:a}),u.jsx(kt.Helper,{disabled:i,helperText:s})]}):null;return u.jsxs("div",{className:"flex gap-3",children:[u.jsx(Q0,{id:v,defaultChecked:n,disabled:i,onChange:m}),t||E]})};mo.displayName="Checkbox";var Nu={exports:{}};/*!
85
85
  *
86
86
  * react-simple-keyboard v3.7.121
87
87
  * https://github.com/hodgef/react-simple-keyboard
@@ -98,7 +98,7 @@ React keys must be passed directly to JSX without using spread:
98
98
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function E(L,U){if(L){if(typeof L=="string")return o(L,U);var H=Object.prototype.toString.call(L).slice(8,-1);return H==="Object"&&L.constructor&&(H=L.constructor.name),H==="Map"||H==="Set"?Array.from(L):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?o(L,U):void 0}}function o(L,U){(U==null||U>L.length)&&(U=L.length);for(var H=0,A=new Array(U);H<U;H++)A[H]=L[H];return A}function d(L){return d=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},d(L)}function g(L,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(L,y(A.key),A)}}function p(L,U,H){return(U=y(U))in L?Object.defineProperty(L,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):L[U]=H,L}function y(L){var U=function(H,A){if(d(H)!="object"||!H)return H;var R=H[Symbol.toPrimitive];if(R!==void 0){var M=R.call(H,A||"default");if(d(M)!="object")return M;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(H)}(L,"string");return d(U)=="symbol"?U:U+""}h.r(v),h.d(v,{SimpleKeyboard:function(){return ve},default:function(){return le}}),h(5276),h(8598),h(4782),h(4554),h(2010),h(7427),h(6099),h(7495),h(8781),h(5440),h(744),h(2762),typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(L){if("Element"in L){var U="classList",H="prototype",A=L.Element[H],R=Object,M=String[H].trim||function(){return this.replace(/^\s+|\s+$/g,"")},B=Array[H].indexOf||function(ce){for(var ue=0,Ee=this.length;ue<Ee;ue++)if(ue in this&&this[ue]===ce)return ue;return-1},z=function(ce,ue){this.name=ce,this.code=DOMException[ce],this.message=ue},Z=function(ce,ue){if(ue==="")throw new z("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(ue))throw new z("INVALID_CHARACTER_ERR","The token must not contain space characters.");return B.call(ce,ue)},J=function(ce){for(var ue=M.call(ce.getAttribute("class")||""),Ee=ue?ue.split(/\s+/):[],fe=0,je=Ee.length;fe<je;fe++)this.push(Ee[fe]);this._updateClassName=function(){ce.setAttribute("class",this.toString())}},G=J[H]=[],pe=function(){return new J(this)};if(z[H]=Error[H],G.item=function(ce){return this[ce]||null},G.contains=function(ce){return~Z(this,ce+"")},G.add=function(){var ce,ue=arguments,Ee=0,fe=ue.length,je=!1;do~Z(this,ce=ue[Ee]+"")||(this.push(ce),je=!0);while(++Ee<fe);je&&this._updateClassName()},G.remove=function(){var ce,ue,Ee=arguments,fe=0,je=Ee.length,Ie=!1;do for(ue=Z(this,ce=Ee[fe]+"");~ue;)this.splice(ue,1),Ie=!0,ue=Z(this,ce);while(++fe<je);Ie&&this._updateClassName()},G.toggle=function(ce,ue){var Ee=this.contains(ce),fe=Ee?ue!==!0&&"remove":ue!==!1&&"add";return fe&&this[fe](ce),ue===!0||ue===!1?ue:!Ee},G.replace=function(ce,ue){var Ee=Z(ce+"");~Ee&&(this.splice(Ee,1,ue),this._updateClassName())},G.toString=function(){return this.join(" ")},R.defineProperty){var me={get:pe,enumerable:!0,configurable:!0};try{R.defineProperty(A,U,me)}catch(ce){ce.number!==void 0&&ce.number!==-2146823252||(me.enumerable=!1,R.defineProperty(A,U,me))}}else R[H].__defineGetter__&&A.__defineGetter__(U,pe)}}(self),function(){var L=document.createElement("_");if(L.classList.add("c1","c2"),!L.classList.contains("c2")){var U=function(A){var R=DOMTokenList.prototype[A];DOMTokenList.prototype[A]=function(M){var B,z=arguments.length;for(B=0;B<z;B++)M=arguments[B],R.call(this,M)}};U("add"),U("remove")}if(L.classList.toggle("c3",!1),L.classList.contains("c3")){var H=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(A,R){return 1 in arguments&&!this.contains(A)==!R?R:H.call(this,A)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(A,R){var M=this.toString().split(" "),B=M.indexOf(A+"");~B&&(M=M.slice(B),this.remove.apply(this,M),this.add(R),this.add.apply(this,M.slice(1)))}),L=null}()),h(2675),h(9463),h(2259),h(5700),h(8706),h(2008),h(3418),h(4423),h(3792),h(2062),h(6910),h(739),h(9572),h(2892),h(9085),h(3851),h(1278),h(9432),h(4864),h(1699),h(7764),h(8344),h(3500),h(2953),h(2712),h(2637),h(1480),h(1761);var x=function(){return L=function A(R){var M=R.getOptions,B=R.getCaretPosition,z=R.getCaretPositionEnd,Z=R.dispatch;(function(J,G){if(!(J instanceof G))throw new TypeError("Cannot call a class as a function")})(this,A),p(this,"getOptions",void 0),p(this,"getCaretPosition",void 0),p(this,"getCaretPositionEnd",void 0),p(this,"dispatch",void 0),p(this,"maxLengthReached",void 0),p(this,"isStandardButton",function(J){return J&&!(J[0]==="{"&&J[J.length-1]==="}")}),this.getOptions=M,this.getCaretPosition=B,this.getCaretPositionEnd=z,this.dispatch=Z,A.bindMethods(A,this)},U=[{key:"getButtonType",value:function(A){return A.includes("{")&&A.includes("}")&&A!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(A){var R=this.getButtonType(A),M=A.replace("{","").replace("}",""),B="";return R!=="standardBtn"&&(B=" hg-button-".concat(M)),"hg-".concat(R).concat(B)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(A,R){return(R=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),R):R||this.getDefaultDiplay())[A]||A}},{key:"getUpdatedInput",value:function(A,R,M){var B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:M,z=arguments.length>4&&arguments[4]!==void 0&&arguments[4],Z=this.getOptions(),J=[M,B,z],G=R;return(A==="{bksp}"||A==="{backspace}")&&G.length>0?G=this.removeAt.apply(this,[G].concat(J)):(A==="{delete}"||A==="{forwarddelete}")&&G.length>0?G=this.removeForwardsAt.apply(this,[G].concat(J)):A==="{space}"?G=this.addStringAt.apply(this,[G," "].concat(J)):A!=="{tab}"||typeof Z.tabCharOnTab=="boolean"&&Z.tabCharOnTab===!1?A!=="{enter}"&&A!=="{numpadenter}"||!Z.newLineOnEnter?A.includes("numpad")&&Number.isInteger(Number(A[A.length-2]))?G=this.addStringAt.apply(this,[G,A[A.length-2]].concat(J)):A==="{numpaddivide}"?G=this.addStringAt.apply(this,[G,"/"].concat(J)):A==="{numpadmultiply}"?G=this.addStringAt.apply(this,[G,"*"].concat(J)):A==="{numpadsubtract}"?G=this.addStringAt.apply(this,[G,"-"].concat(J)):A==="{numpadadd}"?G=this.addStringAt.apply(this,[G,"+"].concat(J)):A==="{numpaddecimal}"?G=this.addStringAt.apply(this,[G,"."].concat(J)):A==="{"||A==="}"?G=this.addStringAt.apply(this,[G,A].concat(J)):A.includes("{")||A.includes("}")||(G=this.addStringAt.apply(this,[G,A].concat(J))):G=this.addStringAt.apply(this,[G,`
99
99
  `].concat(J)):G=this.addStringAt.apply(this,[G," "].concat(J)),Z.debug&&console.log("Input will be: "+G),G}},{key:"updateCaretPos",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0&&arguments[1],M=this.updateCaretPosAction(A,R);this.dispatch(function(B){B.setCaretPosition(M)})}},{key:"updateCaretPosAction",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0&&arguments[1],M=this.getOptions(),B=this.getCaretPosition();return B!=null&&(R?B>0&&(B-=A):B+=A),M.debug&&console.log("Caret at:",B),B}},{key:"addStringAt",value:function(A,R){var M,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A.length,z=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A.length,Z=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return B||B===0?(M=[A.slice(0,B),R,A.slice(z)].join(""),this.isMaxLengthReached()||Z&&this.updateCaretPos(R.length)):M=A+R,M}},{key:"removeAt",value:function(A){var R,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A.length,z=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(M===0&&B===0)return A;if(M===B){var Z=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;M&&M>=0?A.substring(M-2,M).match(Z)?(R=A.substr(0,M-2)+A.substr(M),z&&this.updateCaretPos(2,!0)):(R=A.substr(0,M-1)+A.substr(M),z&&this.updateCaretPos(1,!0)):A.slice(-2).match(Z)?(R=A.slice(0,-2),z&&this.updateCaretPos(2,!0)):(R=A.slice(0,-1),z&&this.updateCaretPos(1,!0))}else R=A.slice(0,M)+A.slice(B),z&&this.dispatch(function(J){J.setCaretPosition(M)});return R}},{key:"removeForwardsAt",value:function(A){var R,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:A.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:A.length,z=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return A!=null&&A.length&&M!==null?(M===B?R=A.substring(M,M+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?A.substr(0,M)+A.substr(M+2):A.substr(0,M)+A.substr(M+1):(R=A.slice(0,M)+A.slice(B),z&&this.dispatch(function(Z){Z.setCaretPosition(M)})),R):A}},{key:"handleMaxLength",value:function(A,R){var M=this.getOptions(),B=M.maxLength,z=A[M.inputName||"default"],Z=R.length-1>=B;if(R.length<=z.length)return!1;if(Number.isInteger(B))return M.debug&&console.log("maxLength (num) reached:",Z),Z?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(d(B)==="object"){var J=R.length-1>=B[M.inputName||"default"];return M.debug&&console.log("maxLength (obj) reached:",J),J?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return!!this.maxLengthReached}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return!!window.PointerEvent}},{key:"camelCase",value:function(A){return A?A.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(R,M){return M.length?R+M[0].toUpperCase()+M.slice(1):R}):""}},{key:"chunkArray",value:function(A,R){return c(Array(Math.ceil(A.length/R))).map(function(M,B){return A.slice(R*B,R+R*B)})}},{key:"escapeRegex",value:function(A){return A.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(A,R){var M=A,B=R.indexOf("‫");return B<A&&B!=-1&&M--,R.indexOf("‬")<A&&B!=-1&&M--,M<0?0:M}}],H=[{key:"bindMethods",value:function(A,R){var M,B=function(Z,J){var G=typeof Symbol<"u"&&Z[Symbol.iterator]||Z["@@iterator"];if(!G){if(Array.isArray(Z)||(G=E(Z))||J){G&&(Z=G);var pe=0,me=function(){};return{s:me,n:function(){return pe>=Z.length?{done:!0}:{done:!1,value:Z[pe++]}},e:function(fe){throw fe},f:me}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
100
100
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ce,ue=!0,Ee=!1;return{s:function(){G=G.call(Z)},n:function(){var fe=G.next();return ue=fe.done,fe},e:function(fe){Ee=!0,ce=fe},f:function(){try{ue||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(L.prototype,U),H&&g(L,H),Object.defineProperty(L,"prototype",{writable:!1}),L;var L,U,H}();p(x,"noop",function(){});var C=x;function S(L){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(L)}function j(L,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(L,P(A.key),A)}}function O(L,U,H){return(U=P(U))in L?Object.defineProperty(L,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):L[U]=H,L}function P(L){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)}(L,"string");return S(U)=="symbol"?U:U+""}var k=function(){return L=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),O(this,"getOptions",void 0),O(this,"dispatch",void 0),O(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,ue,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||(ue=ce.onpointerdown)===null||ue===void 0||ue.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(L.prototype,U),H&&j(L,H),Object.defineProperty(L,"prototype",{writable:!1}),L;var L,U,H}();function _(L){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},_(L)}function $(L,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(L,q(A.key),A)}}function Q(L,U,H){return(U=q(U))in L?Object.defineProperty(L,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):L[U]=H,L}function q(L){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)}(L,"string");return _(U)=="symbol"?U:U+""}var K=function(){return L=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),Q(this,"utilities",void 0),Q(this,"options",void 0),Q(this,"candidateBoxElement",void 0),Q(this,"pageIndex",0),Q(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(Ie){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[Ie])||Ie,M.options.useTouchEvents?We.ontouchstart=function(ze){return G(Ie,ze||tt())}:We.onclick=function(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:tt();return G(Ie,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 ue=function(){me&&M.renderPage({candidateListPages:B,targetElement:z,pageIndex:Z-1,nbPages:J,onItemSelected:G})};this.options.useTouchEvents?ce.ontouchstart=ue:ce.onclick=ue,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&&$(L.prototype,U),H&&$(L,H),Object.defineProperty(L,"prototype",{writable:!1}),L;var L,U,H}(),I=K;function V(L){return function(U){if(Array.isArray(U))return W(U)}(L)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(L)||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}}(L)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
101
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W(L,U){(U==null||U>L.length)&&(U=L.length);for(var H=0,A=new Array(U);H<U;H++)A[H]=L[H];return A}function te(L){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(L)}function X(L,U){var H=Object.keys(L);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(L);U&&(A=A.filter(function(R){return Object.getOwnPropertyDescriptor(L,R).enumerable})),H.push.apply(H,A)}return H}function ne(L,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(L,he(A.key),A)}}function re(L,U,H){return(U=he(U))in L?Object.defineProperty(L,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):L[U]=H,L}function he(L){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)}(L,"string");return te(U)=="symbol"?U:U+""}var se=function(){return L=function A(R,M){var B=this;if(function(ue,Ee){if(!(ue 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(ue,Ee){var fe,je,Ie;if(typeof ue=="string")fe=ue.split(".").join(""),je=document.querySelector(".".concat(fe)),Ie=Ee;else if(ue instanceof HTMLDivElement){if(!ue.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");fe=ue.className.split(" ")[0],je=ue,Ie=Ee}else fe="simple-keyboard",je=document.querySelector(".".concat(fe)),Ie=ue;return{keyboardDOMClass:fe,keyboardDOM:je,options:Ie}}),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(ue,Ee){B.modules[ue]||(B.modules[ue]={}),Ee(B.modules[ue])}),re(this,"getKeyboardClassString",function(){for(var ue=arguments.length,Ee=new Array(ue),fe=0;fe<ue;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(ue){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(ue,je,fe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(fe)):X(Object(fe)).forEach(function(je){Object.defineProperty(ue,je,Object.getOwnPropertyDescriptor(fe,je))})}return ue}({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 k({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new I({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!!V(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 ue=B.getInput(B.options.inputName,!0),Ee=B.getCaretPositionEnd()||0,fe=ue.substring(0,Ee||0)||ue,je=new RegExp("".concat(B.utilities.escapeRegex(A),"$"),G?"g":"gi"),Ie=fe.replace(je,ce),Qe=ue.replace(fe,Ie),We=Ie.length-fe.length,tt=(Ee||ue.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,ue=me.candidateValue;ce&&ue?this.showCandidatesBox(ce,ue,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 I({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(V(M),V(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,ue=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,ue-ce+1);J=ue-ce,je.forEach(function(Ie){return Ee.appendChild(Ie)}),Z.splice(ce,0,Ee),A.innerHTML="",Z.forEach(function(Ie){return A.appendChild(Ie)}),z.options.debug&&console.log("rowDOMContainer",je,ce,ue,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 ue=[],Ee=[];me.forEach(function(fe,je){var Ie,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&&(ue.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),(Ie=Je.classList).add.apply(Ie,V(A.getButtonThemeClasses(fe))),A.setDOMButtonAttributes(fe,function(Ne,Rt){Je.setAttribute(Ne,Rt)}),A.activeButtonClass="hg-activeButton",!A.utilities.pointerEventsSupported()||B||Z?B?(Je.ontouchstart=function(Ne){A.handleButtonClicked(fe,Ne),A.handleButtonMouseDown(fe,Ne)},Je.ontouchend=function(Ne){A.handleButtonMouseUp(fe,Ne)},Je.ontouchcancel=function(Ne){A.handleButtonMouseUp(fe,Ne)}):(Je.onclick=function(Ne){A.setMouseHold(!1),typeof A.options.onKeyReleased!="function"&&A.handleButtonClicked(fe,Ne)},Je.onmousedown=function(Ne){typeof A.options.onKeyReleased!="function"||A.isMouseHold||A.handleButtonClicked(fe,Ne),A.handleButtonMouseDown(fe,Ne)},Je.onmouseup=function(Ne){A.handleButtonMouseUp(fe,Ne)}):(Je.onpointerdown=function(Ne){A.handleButtonClicked(fe,Ne),A.handleButtonMouseDown(fe,Ne)},Je.onpointerup=function(Ne){A.handleButtonMouseUp(fe,Ne)},Je.onpointercancel=function(Ne){A.handleButtonMouseUp(fe,Ne)}),Je.setAttribute("data-skBtn",fe);var Nt="".concat(A.options.layoutName,"-r").concat(pe,"b").concat(je);Je.setAttribute("data-skBtnUID",Nt);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,ue,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(L.prototype,U),H&&ne(L,H),Object.defineProperty(L,"prototype",{writable:!1}),L;var L,U,H}(),ve=se,le=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 O=S[Symbol.toPrimitive];if(O!==void 0){var P=O.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 O=function(Q){return c(c({},Q),{},{theme:"simple-keyboard ".concat(Q.theme||"hg-theme-default")})}(p);if(!x.current){x.current=!0,O.debug&&console.log("ReactSimpleKeyboard: Init");var P=C.current,k=".".concat(y);S.current=new(m())(P||k,O),O.keyboardRef&&O.keyboardRef(S.current)}var _=function(Q,q){var K=o(q),I=o(Q);return Object.keys(K).filter(function(V){return K[V]!==I[V]})}(j.current,O);if(_.length){var $=S.current;j.current=O,$==null||$.setOptions(O),O.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",_)}},[x,y,j,p]),l.createElement("div",{className:y,ref:C})},g=d}(),a}()})})(Nu);var W0=Nu.exports;const H0=ss(W0);function Iu({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,s]=N.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]=N.useState(!1),a=N.useRef(null),l=N.useRef(null);N.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(Iu,{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]=N.useState(0),{session:{currency:a,events:l}}=nt(),f=()=>{let m=0;return l.filter(v=>Object.values(Ln).includes(v.type)).forEach(v=>{m+=v.data.amount_in_cents}),m};return u.jsxs(Ct,{children:[e&&u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e})})}),u.jsx(wt,{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(Yn,{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(Yn,{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(it,{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 Du(e,t){N.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)}},[])}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 ku(){const[e,t]=N.useState(!1),n=N.useRef(null),r=N.useRef(null),i=N.useRef(null),[s,a]=N.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);N.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(Iu,{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})=>{const[d,g]=N.useState(h),p=N.useRef(null),[y,x]=N.useState(!1),{open:C,close:S}=pa();N.useEffect(()=>()=>{S()},[]);const j=()=>{p.current&&g(p.current.validationMessage),x(!1),S()},O=async $=>{x(!0),(async()=>C($))().then(()=>{var q;return(q=p.current)==null?void 0:q.scrollIntoView(!1)})},P=$=>{v&&v($)},k=N.useId(),_=e??k;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{description:r,disabled:f,htmlFor:_,required:i,children:n}),u.jsx("div",{className:Dt("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 ",y&&!m&&"border-core-primary-500 ring-1 ring-core-primary-500",m&&"border-core-red-500",m&&y&&"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(St,{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:P,onBlur:j,ref:p,placeholder:l,onFocus:O,disabled:f,autoFocus:o}),E&&u.jsx(St,{icon:E})]})}),u.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${h||d?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:u.jsx("div",{className:"overflow-hidden",children:u.jsx(kt.Helper,{error:m,helperText:h||d})})})]})};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]=N.useState(m),o=N.useRef(null),[d,g]=N.useState(!1),{open:p,close:y}=pa();N.useEffect(()=>()=>{y()},[]);const x=()=>{o.current&&E(o.current.validationMessage),g(!1),y()},C=async _=>{g(!0),(async()=>p(_))().then(()=>{var Q;return(Q=o.current)==null?void 0:Q.scrollIntoView(!1)})},[S,j]=N.useState(s||""),O=_=>{j(_.target.value),v==null||v(_)},P=N.useId(),k=e??P;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{description:i,disabled:l,htmlFor:k,required:r,children:n}),u.jsx("div",{className:Dt("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(St,{icon:"mail"}),u.jsx("input",{type:"email",id:k,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:O,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(kt.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]=N.useState(!1),o=N.useId(),d=e??o;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{description:i,disabled:l,htmlFor:d,required:r,children:n}),u.jsx("div",{className:Dt("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(St,{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(kt.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 ni({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:i,children:s}){const[a,l]=N.useState(t),f=N.useRef(null);N.useEffect(()=>{l(t)},[t]),N.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(wt,{children:s}),u.jsx(Ot,{children:u.jsxs("div",{className:"flex flex-col gap-2",children:[r&&u.jsx(it,{label:r.label??"",onClick:r.action,disabled:r.disabled}),i&&u.jsx(it,{label:i.label??"",onClick:i.action,disabled:i.disabled,variant:"secondary"})]})})]})})})}function Z0({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 X0(e){const{t}=$e(),n=N.useRef(null),[r,i]=N.useState(!1);Du(n,i);const[s,a]=N.useState(""),[l,f]=N.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(kt,{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(St,{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(Z0,{option:c,checked:l.includes(c.value),onChange:E=>v(E,c.value)},`${c.value}_${l.includes(c.value)?"checked":"unchecked"}`)})]})]})]})}function e1({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 bo({state:e}){const t=En(),{t:n}=$e(),r=Et(),[i,s]=N.useState(""),[a,l]=N.useState(!1),{session:f,mutate:m}=nt(),[h,v]=N.useState(!1),c=async o=>{if(t.onContactLink){const{data:{data:d}}=await rr.get(o);d&&t.onContactLink(d)}},E=N.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 N.useEffect(()=>{i&&!a&&!h&&E()},[i,a,h,E]),u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:n("scanOrEnterX",{x:"identifier"})})})}),u.jsxs(wt,{children:[u.jsx("p",{children:"Are we seeing this?"}),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(it,{label:n("continue"),onClick:E}),f.input_data.enable_email_identification&&u.jsx(it,{label:n("useEmail"),variant:"secondary",onClick:()=>r("../email",{state:e})})]})})]})}var Bu={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.compactObject=Lu,$t.deprecated=l1;var t1=$t.detectBrowser=u1;$t.disableLog=s1,$t.disableWarnings=a1,$t.extractVersion=wo,$t.filterStats=d1,$t.log=c1,$t.walkStats=xo,$t.wrapPeerConnectionEvent=o1;function n1(e,t,n){return t=r1(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1(e){var t=i1(e,"string");return Kn(t)=="symbol"?t:t+""}function i1(e,t){if(Kn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Kn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kn(e){"@babel/helpers - typeof";return Kn=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},Kn(e)}var Mu=!0,_u=!0;function wo(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function o1(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 s1(e){return typeof e!="boolean"?new Error("Argument type: "+Kn(e)+". Please use a boolean."):(Mu=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function a1(e){return typeof e!="boolean"?new Error("Argument type: "+Kn(e)+". Please use a boolean."):(_u=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function c1(){if((typeof window>"u"?"undefined":Kn(window))==="object"){if(Mu)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function l1(e,t){_u&&console.warn(e+" is deprecated, please use "+t+" instead.")}function u1(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=wo(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=wo(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=wo(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 Fu(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lu(e){return Fu(e)?Object.keys(e).reduce(function(t,n){var r=Fu(e[n]),i=r?Lu(e[n]):e[n],s=r&&!Object.keys(i).length;return i===void 0||s?t:Object.assign(t,n1({},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 d1(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 f1=Bu.shimGetUserMedia=g1,h1=p1($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 p1(e,t){if(e&&e.__esModule)return e;if(e===null||$n(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 $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 qu=h1.log;function g1(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(m){if($n(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=$n(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&&$n(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&&$n(m.video)==="object"){var c=m.video.facingMode;c=c&&($n(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 m1=Uu.shimGetUserMedia=b1,y1=v1($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 v1(e,t){if(e&&e.__esModule)return e;if(e===null||wr(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 wr(e){"@babel/helpers - typeof";return wr=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},wr(e)}function b1(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(f,m,h){y1.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 wr(f)==="object"&&wr(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"&&wr(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=N1,Cn.shimCallbacksAPI=A1,Cn.shimConstraints=$u,Cn.shimCreateOfferLegacy=O1;var w1=Cn.shimGetUserMedia=S1;Cn.shimLocalStreamsAPI=E1,Cn.shimRTCIceServerUrls=T1,Cn.shimRemoteStreamsAPI=C1,Cn.shimTrackEventTransceiver=j1;var Yu=x1($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 x1(e,t){if(e&&e.__esModule)return e;if(e===null||Qn(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 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)}function E1(e){if(!(Qn(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 C1(e){if(!(Qn(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 A1(e){if(!(Qn(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 S1(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 T1(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 j1(e){Qn(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 O1(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 N1(e){Qn(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)),I1=(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)},P1=(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 D1(e){return e.join("|")}function k1(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 R1(e,t){return e.Binarizer[t]}function B1(e,t){return e.CharacterSet[t]}const M1=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function _1(e){return M1[e.value]}function F1(e,t){return e.EanAddOnSymbol[t]}function L1(e,t){return e.TextMode[t]}const xr={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:D1(t.formats),binarizer:R1(e,t.binarizer),eanAddOnSymbol:F1(e,t.eanAddOnSymbol),textMode:L1(e,t.textMode),characterSet:B1(e,t.characterSet)}}function Zu(e){return{...e,format:k1(e.format),eccLevel:e.eccLevel,contentType:_1(e.contentType)}}const V1={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:V1,s=e({...i});return Xu.set(e,{moduleOverrides:i,modulePromise:s}),s}async function q1(e,t,n=xr){const r={...xr,...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 U1(e,t,n=xr){const r={...xr,...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}({...xr,formats:[...xr.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((w,b)=>{i=w,s=b});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(w){return r.locateFile?r.locateFile(w,c):c+w}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=w=>{var b=new XMLHttpRequest;return b.open("GET",w,!1),b.responseType="arraybuffer",b.send(null),new Uint8Array(b.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,O,P,k,_,$;function Q(){var w=y.buffer;r.HEAP8=C=new Int8Array(w),r.HEAP16=j=new Int16Array(w),r.HEAPU8=S=new Uint8Array(w),r.HEAPU16=O=new Uint16Array(w),r.HEAP32=P=new Int32Array(w),r.HEAPU32=k=new Uint32Array(w),r.HEAPF32=_=new Float32Array(w),r.HEAPF64=$=new Float64Array(w)}var q=[],K=[],I=[];function V(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)X(r.preRun.shift());J(q)}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(I)}function X(w){q.unshift(w)}function ne(w){K.unshift(w)}function re(w){I.unshift(w)}var he=0,se=null;function ve(w){var b;he++,(b=r.monitorRunDependencies)===null||b===void 0||b.call(r,he)}function le(w){var b;if(he--,(b=r.monitorRunDependencies)===null||b===void 0||b.call(r,he),he==0&&se){var T=se;se=null,T()}}function L(w){var b;(b=r.onAbort)===null||b===void 0||b.call(r,w),w="Aborted("+w+")",g(w),x=!0,w+=". Build with -sASSERTIONS for more info.";var T=new WebAssembly.RuntimeError(w);throw s(T),T}var U="data:application/octet-stream;base64,",H=w=>w.startsWith(U),A;A="zxing_reader.wasm",H(A)||(A=E(A));function R(w){if(w==A&&p)return new Uint8Array(p);if(o)return o(w);throw"both async and sync fetching of the wasm failed"}function M(w){return!p&&(f||v||m||h)&&typeof fetch=="function"?fetch(w,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${w}'`;return b.arrayBuffer()}).catch(()=>R(w)):Promise.resolve().then(()=>R(w))}function B(w,b,T){return M(w).then(D=>WebAssembly.instantiate(D,b)).then(T,D=>{g(`failed to asynchronously prepare wasm: ${D}`),L(D)})}function z(w,b,T,D){return!w&&typeof WebAssembly.instantiateStreaming=="function"&&!H(b)&&typeof fetch=="function"?fetch(b,{credentials:"same-origin"}).then(Y=>{var ee=WebAssembly.instantiateStreaming(Y,T);return ee.then(D,function(ie){return g(`wasm streaming compile failed: ${ie}`),g("falling back to ArrayBuffer instantiation"),B(b,T,D)})}):B(b,T,D)}function Z(){var w={a:J2};function b(D,Y){return ht=D.exports,y=ht.ma,Q(),Wf=ht.qa,ne(ht.na),le(),ht}ve();function T(D){b(D.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(w,b)}catch(D){g(`Module.instantiateWasm callback failed with error: ${D}`),s(D)}return z(p,A,w,T).catch(s),{}}var J=w=>{for(;w.length>0;)w.shift()(r)};r.noExitRuntime;var G=[],pe=0,me=w=>{var b=new Ee(w);return b.get_caught()||(b.set_caught(!0),pe--),b.set_rethrown(!1),G.push(b),lh(b.excPtr),b.get_exception_ptr()},ce=0,ue=()=>{lt(0,0);var w=G.pop();ch(w.excPtr),ce=0};class Ee{constructor(b){this.excPtr=b,this.ptr=b-24}set_type(b){k[this.ptr+4>>2]=b}get_type(){return k[this.ptr+4>>2]}set_destructor(b){k[this.ptr+8>>2]=b}get_destructor(){return k[this.ptr+8>>2]}set_caught(b){b=b?1:0,C[this.ptr+12]=b}get_caught(){return C[this.ptr+12]!=0}set_rethrown(b){b=b?1:0,C[this.ptr+13]=b}get_rethrown(){return C[this.ptr+13]!=0}init(b,T){this.set_adjusted_ptr(0),this.set_type(b),this.set_destructor(T)}set_adjusted_ptr(b){k[this.ptr+16>>2]=b}get_adjusted_ptr(){return k[this.ptr+16>>2]}get_exception_ptr(){var b=dh(this.get_type());if(b)return k[this.excPtr>>2];var T=this.get_adjusted_ptr();return T!==0?T:this.excPtr}}var fe=w=>{throw ce||(ce=w),ce},je=w=>{var b=ce;if(!b)return Bi(0),0;var T=new Ee(b);T.set_adjusted_ptr(b);var D=T.get_type();if(!D)return Bi(0),b;for(var Y in w){var ee=w[Y];if(ee===0||ee===D)break;var ie=T.ptr+16;if(uh(ee,D,ie))return Bi(ee),b}return Bi(D),b},Ie=()=>je([]),Qe=w=>je([w]),We=(w,b)=>je([w,b]),tt=()=>{var w=G.pop();w||L("no exception to throw");var b=w.excPtr;throw w.get_rethrown()||(G.push(w),w.set_rethrown(!0),w.set_caught(!1),pe++),ce=b,ce},ze=(w,b,T)=>{var D=new Ee(w);throw D.init(b,T),ce=w,pe++,ce},sn=()=>pe,Je={},Nt=w=>{for(;w.length;){var b=w.pop(),T=w.pop();T(b)}};function Ze(w){return this.fromWireType(k[w>>2])}var Ne={},Rt={},dt={},_t,It=w=>{throw new _t(w)},Ft=(w,b,T)=>{w.forEach(function(oe){dt[oe]=b});function D(oe){var ge=T(oe);ge.length!==w.length&&It("Mismatched type converter count");for(var we=0;we<w.length;++we)De(w[we],ge[we])}var Y=new Array(b.length),ee=[],ie=0;b.forEach((oe,ge)=>{Rt.hasOwnProperty(oe)?Y[ge]=Rt[oe]:(ee.push(oe),Ne.hasOwnProperty(oe)||(Ne[oe]=[]),Ne[oe].push(()=>{Y[ge]=Rt[oe],++ie,ie===ee.length&&D(Y)}))}),ee.length===0&&D(Y)},Wt=w=>{var b=Je[w];delete Je[w];var T=b.rawConstructor,D=b.rawDestructor,Y=b.fields,ee=Y.map(ie=>ie.getterReturnType).concat(Y.map(ie=>ie.setterArgumentType));Ft([w],ee,ie=>{var oe={};return Y.forEach((ge,we)=>{var Se=ge.fieldName,Ve=ie[we],ke=ge.getter,Ke=ge.getterContext,mt=ie[we+Y.length],Vt=ge.setter,ut=ge.setterContext;oe[Se]={read:Pt=>Ve.fromWireType(ke(Ke,Pt)),write:(Pt,be)=>{var Te=[];Vt(ut,Pt,mt.toWireType(Te,be)),Nt(Te)}}}),[{name:b.name,fromWireType:ge=>{var we={};for(var Se in oe)we[Se]=oe[Se].read(ge);return D(ge),we},toWireType:(ge,we)=>{for(var Se in oe)if(!(Se in we))throw new TypeError(`Missing field: "${Se}"`);var Ve=T();for(Se in oe)oe[Se].write(Ve,we[Se]);return ge!==null&&ge.push(D,Ve),Ve},argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction:D}]})},en=(w,b,T,D,Y)=>{},Gt=()=>{for(var w=new Array(256),b=0;b<256;++b)w[b]=String.fromCharCode(b);Lt=w},Lt,st=w=>{for(var b="",T=w;S[T];)b+=Lt[S[T++]];return b},an,Ce=w=>{throw new an(w)};function Le(w,b){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var D=b.name;if(w||Ce(`type "${D}" must have a positive integer typeid pointer`),Rt.hasOwnProperty(w)){if(T.ignoreDuplicateRegistrations)return;Ce(`Cannot register type '${D}' twice`)}if(Rt[w]=b,delete dt[w],Ne.hasOwnProperty(w)){var Y=Ne[w];delete Ne[w],Y.forEach(ee=>ee())}}function De(w,b){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Le(w,b,T)}var _e=8,at=(w,b,T,D)=>{b=st(b),De(w,{name:b,fromWireType:function(Y){return!!Y},toWireType:function(Y,ee){return ee?T:D},argPackAdvance:_e,readValueFromPointer:function(Y){return this.fromWireType(S[Y])},destructorFunction:null})},Or=w=>({count:w.count,deleteScheduled:w.deleteScheduled,preservePointerOnDelete:w.preservePointerOnDelete,ptr:w.ptr,ptrType:w.ptrType,smartPtr:w.smartPtr,smartPtrType:w.smartPtrType}),Zn=w=>{function b(T){return T.$$.ptrType.registeredClass.name}Ce(b(w)+" instance already deleted")},Nr=!1,Di=w=>{},tc=w=>{w.smartPtr?w.smartPtrType.rawDestructor(w.smartPtr):w.ptrType.registeredClass.rawDestructor(w.ptr)},Wo=w=>{w.count.value-=1;var b=w.count.value===0;b&&tc(w)},Ho=(w,b,T)=>{if(b===T)return w;if(T.baseClass===void 0)return null;var D=Ho(w,b,T.baseClass);return D===null?null:T.downcast(D)},Jo={},F=()=>Object.keys(Fe).length,ye=()=>{var w=[];for(var b in Fe)Fe.hasOwnProperty(b)&&w.push(Fe[b]);return w},Ae=[],Pe=()=>{for(;Ae.length;){var w=Ae.pop();w.$$.deleteScheduled=!1,w.delete()}},Ue,Xe=w=>{Ue=w,Ae.length&&Ue&&Ue(Pe)},Ge=()=>{r.getInheritedInstanceCount=F,r.getLiveInheritedInstances=ye,r.flushPendingDeletes=Pe,r.setDelayFunction=Xe},Fe={},Bt=(w,b)=>{for(b===void 0&&Ce("ptr should not be undefined");w.baseClass;)b=w.upcast(b),w=w.baseClass;return b},ct=(w,b)=>(b=Bt(w,b),Fe[b]),ot=(w,b)=>{(!b.ptrType||!b.ptr)&&It("makeClassHandle requires ptr and ptrType");var T=!!b.smartPtrType,D=!!b.smartPtr;return T!==D&&It("Both smartPtrType and smartPtr must be specified"),b.count={value:1},cn(Object.create(w,{$$:{value:b,writable:!0}}))};function Ht(w){var b=this.getPointee(w);if(!b)return this.destructor(w),null;var T=ct(this.registeredClass,b);if(T!==void 0){if(T.$$.count.value===0)return T.$$.ptr=b,T.$$.smartPtr=w,T.clone();var D=T.clone();return this.destructor(w),D}function Y(){return this.isSmartPointer?ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:b,smartPtrType:this,smartPtr:w}):ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:w})}var ee=this.registeredClass.getActualType(b),ie=Jo[ee];if(!ie)return Y.call(this);var oe;this.isConst?oe=ie.constPointerType:oe=ie.pointerType;var ge=Ho(b,this.registeredClass,oe.registeredClass);return ge===null?Y.call(this):this.isSmartPointer?ot(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:ge,smartPtrType:this,smartPtr:w}):ot(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:ge})}var cn=w=>typeof FinalizationRegistry>"u"?(cn=b=>b,w):(Nr=new FinalizationRegistry(b=>{Wo(b.$$)}),cn=b=>{var T=b.$$,D=!!T.smartPtr;if(D){var Y={$$:T};Nr.register(b,Y,b)}return b},Di=b=>Nr.unregister(b),cn(w)),Dn=()=>{Object.assign(Tt.prototype,{isAliasOf(w){if(!(this instanceof Tt)||!(w instanceof Tt))return!1;var b=this.$$.ptrType.registeredClass,T=this.$$.ptr;w.$$=w.$$;for(var D=w.$$.ptrType.registeredClass,Y=w.$$.ptr;b.baseClass;)T=b.upcast(T),b=b.baseClass;for(;D.baseClass;)Y=D.upcast(Y),D=D.baseClass;return b===D&&T===Y},clone(){if(this.$$.ptr||Zn(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var w=cn(Object.create(Object.getPrototypeOf(this),{$$:{value:Or(this.$$)}}));return w.$$.count.value+=1,w.$$.deleteScheduled=!1,w},delete(){this.$$.ptr||Zn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ce("Object already scheduled for deletion"),Di(this),Wo(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Zn(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 kn=(w,b)=>Object.defineProperty(b,"name",{value:w}),zo=(w,b,T)=>{if(w[b].overloadTable===void 0){var D=w[b];w[b]=function(){for(var Y=arguments.length,ee=new Array(Y),ie=0;ie<Y;ie++)ee[ie]=arguments[ie];return w[b].overloadTable.hasOwnProperty(ee.length)||Ce(`Function '${T}' called with an invalid number of arguments (${ee.length}) - expects one of (${w[b].overloadTable})!`),w[b].overloadTable[ee.length].apply(this,ee)},w[b].overloadTable=[],w[b].overloadTable[D.argCount]=D}},ki=(w,b,T)=>{r.hasOwnProperty(w)?((T===void 0||r[w].overloadTable!==void 0&&r[w].overloadTable[T]!==void 0)&&Ce(`Cannot register public name '${w}' twice`),zo(r,w,w),r.hasOwnProperty(T)&&Ce(`Cannot register multiple overloads of a function with the same number of arguments (${T})!`),r[w].overloadTable[T]=b):(r[w]=b,T!==void 0&&(r[w].numArguments=T))},Iw=48,Pw=57,Dw=w=>{if(w===void 0)return"_unknown";w=w.replace(/[^a-zA-Z0-9_]/g,"$");var b=w.charCodeAt(0);return b>=Iw&&b<=Pw?`_${w}`:w};function kw(w,b,T,D,Y,ee,ie,oe){this.name=w,this.constructor=b,this.instancePrototype=T,this.rawDestructor=D,this.baseClass=Y,this.getActualType=ee,this.upcast=ie,this.downcast=oe,this.pureVirtualFunctions=[]}var nc=(w,b,T)=>{for(;b!==T;)b.upcast||Ce(`Expected null or instance of ${T.name}, got an instance of ${b.name}`),w=b.upcast(w),b=b.baseClass;return w};function Rw(w,b){if(b===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),0;b.$$||Ce(`Cannot pass "${cc(b)}" as a ${this.name}`),b.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`);var T=b.$$.ptrType.registeredClass,D=nc(b.$$.ptr,T,this.registeredClass);return D}function Bw(w,b){var T;if(b===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),this.isSmartPointer?(T=this.rawConstructor(),w!==null&&w.push(this.rawDestructor,T),T):0;(!b||!b.$$)&&Ce(`Cannot pass "${cc(b)}" as a ${this.name}`),b.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&b.$$.ptrType.isConst&&Ce(`Cannot convert argument of type ${b.$$.smartPtrType?b.$$.smartPtrType.name:b.$$.ptrType.name} to parameter type ${this.name}`);var D=b.$$.ptrType.registeredClass;if(T=nc(b.$$.ptr,D,this.registeredClass),this.isSmartPointer)switch(b.$$.smartPtr===void 0&&Ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:b.$$.smartPtrType===this?T=b.$$.smartPtr:Ce(`Cannot convert argument of type ${b.$$.smartPtrType?b.$$.smartPtrType.name:b.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:T=b.$$.smartPtr;break;case 2:if(b.$$.smartPtrType===this)T=b.$$.smartPtr;else{var Y=b.clone();T=this.rawShare(T,Bn.toHandle(()=>Y.delete())),w!==null&&w.push(this.rawDestructor,T)}break;default:Ce("Unsupporting sharing policy")}return T}function Mw(w,b){if(b===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),0;b.$$||Ce(`Cannot pass "${cc(b)}" as a ${this.name}`),b.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`),b.$$.ptrType.isConst&&Ce(`Cannot convert argument of type ${b.$$.ptrType.name} to parameter type ${this.name}`);var T=b.$$.ptrType.registeredClass,D=nc(b.$$.ptr,T,this.registeredClass);return D}var _w=()=>{Object.assign(Zo.prototype,{getPointee(w){return this.rawGetPointee&&(w=this.rawGetPointee(w)),w},destructor(w){var b;(b=this.rawDestructor)===null||b===void 0||b.call(this,w)},argPackAdvance:_e,readValueFromPointer:Ze,fromWireType:Ht})};function Zo(w,b,T,D,Y,ee,ie,oe,ge,we,Se){this.name=w,this.registeredClass=b,this.isReference=T,this.isConst=D,this.isSmartPointer=Y,this.pointeeType=ee,this.sharingPolicy=ie,this.rawGetPointee=oe,this.rawConstructor=ge,this.rawShare=we,this.rawDestructor=Se,!Y&&b.baseClass===void 0?D?(this.toWireType=Rw,this.destructorFunction=null):(this.toWireType=Mw,this.destructorFunction=null):this.toWireType=Bw}var Qf=(w,b,T)=>{r.hasOwnProperty(w)||It("Replacing nonexistent public symbol"),r[w].overloadTable!==void 0&&T!==void 0?r[w].overloadTable[T]=b:(r[w]=b,r[w].argCount=T)},Fw=(w,b,T)=>{var D=r["dynCall_"+w];return D(b,...T)},Xo=[],Wf,ft=w=>{var b=Xo[w];return b||(w>=Xo.length&&(Xo.length=w+1),Xo[w]=b=Wf.get(w)),b},Lw=function(w,b){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(w.includes("j"))return Fw(w,b,T);var D=ft(b)(...T);return D},Vw=(w,b)=>function(){for(var T=arguments.length,D=new Array(T),Y=0;Y<T;Y++)D[Y]=arguments[Y];return Lw(w,b,D)},yn=(w,b)=>{w=st(w);function T(){return w.includes("j")?Vw(w,b):ft(b)}var D=T();return typeof D!="function"&&Ce(`unknown function pointer with signature ${w}: ${b}`),D},qw=(w,b)=>{var T=kn(b,function(D){this.name=b,this.message=D;var Y=new Error(D).stack;Y!==void 0&&(this.stack=this.toString()+`
101
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W(L,U){(U==null||U>L.length)&&(U=L.length);for(var H=0,A=new Array(U);H<U;H++)A[H]=L[H];return A}function te(L){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(L)}function X(L,U){var H=Object.keys(L);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(L);U&&(A=A.filter(function(R){return Object.getOwnPropertyDescriptor(L,R).enumerable})),H.push.apply(H,A)}return H}function ne(L,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(L,he(A.key),A)}}function re(L,U,H){return(U=he(U))in L?Object.defineProperty(L,U,{value:H,enumerable:!0,configurable:!0,writable:!0}):L[U]=H,L}function he(L){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)}(L,"string");return te(U)=="symbol"?U:U+""}var se=function(){return L=function A(R,M){var B=this;if(function(ue,Ee){if(!(ue 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(ue,Ee){var fe,je,Ie;if(typeof ue=="string")fe=ue.split(".").join(""),je=document.querySelector(".".concat(fe)),Ie=Ee;else if(ue instanceof HTMLDivElement){if(!ue.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");fe=ue.className.split(" ")[0],je=ue,Ie=Ee}else fe="simple-keyboard",je=document.querySelector(".".concat(fe)),Ie=ue;return{keyboardDOMClass:fe,keyboardDOM:je,options:Ie}}),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(ue,Ee){B.modules[ue]||(B.modules[ue]={}),Ee(B.modules[ue])}),re(this,"getKeyboardClassString",function(){for(var ue=arguments.length,Ee=new Array(ue),fe=0;fe<ue;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(ue){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(ue,je,fe[je])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ue,Object.getOwnPropertyDescriptors(fe)):X(Object(fe)).forEach(function(je){Object.defineProperty(ue,je,Object.getOwnPropertyDescriptor(fe,je))})}return ue}({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 k({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new I({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!!V(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 ue=B.getInput(B.options.inputName,!0),Ee=B.getCaretPositionEnd()||0,fe=ue.substring(0,Ee||0)||ue,je=new RegExp("".concat(B.utilities.escapeRegex(A),"$"),G?"g":"gi"),Ie=fe.replace(je,ce),Qe=ue.replace(fe,Ie),We=Ie.length-fe.length,tt=(Ee||ue.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,ue=me.candidateValue;ce&&ue?this.showCandidatesBox(ce,ue,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 I({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(V(M),V(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,ue=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,ue-ce+1);J=ue-ce,je.forEach(function(Ie){return Ee.appendChild(Ie)}),Z.splice(ce,0,Ee),A.innerHTML="",Z.forEach(function(Ie){return A.appendChild(Ie)}),z.options.debug&&console.log("rowDOMContainer",je,ce,ue,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 ue=[],Ee=[];me.forEach(function(fe,je){var Ie,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&&(ue.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),(Ie=Je.classList).add.apply(Ie,V(A.getButtonThemeClasses(fe))),A.setDOMButtonAttributes(fe,function(Ne,Rt){Je.setAttribute(Ne,Rt)}),A.activeButtonClass="hg-activeButton",!A.utilities.pointerEventsSupported()||B||Z?B?(Je.ontouchstart=function(Ne){A.handleButtonClicked(fe,Ne),A.handleButtonMouseDown(fe,Ne)},Je.ontouchend=function(Ne){A.handleButtonMouseUp(fe,Ne)},Je.ontouchcancel=function(Ne){A.handleButtonMouseUp(fe,Ne)}):(Je.onclick=function(Ne){A.setMouseHold(!1),typeof A.options.onKeyReleased!="function"&&A.handleButtonClicked(fe,Ne)},Je.onmousedown=function(Ne){typeof A.options.onKeyReleased!="function"||A.isMouseHold||A.handleButtonClicked(fe,Ne),A.handleButtonMouseDown(fe,Ne)},Je.onmouseup=function(Ne){A.handleButtonMouseUp(fe,Ne)}):(Je.onpointerdown=function(Ne){A.handleButtonClicked(fe,Ne),A.handleButtonMouseDown(fe,Ne)},Je.onpointerup=function(Ne){A.handleButtonMouseUp(fe,Ne)},Je.onpointercancel=function(Ne){A.handleButtonMouseUp(fe,Ne)}),Je.setAttribute("data-skBtn",fe);var Nt="".concat(A.options.layoutName,"-r").concat(pe,"b").concat(je);Je.setAttribute("data-skBtnUID",Nt);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,ue,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(L.prototype,U),H&&ne(L,H),Object.defineProperty(L,"prototype",{writable:!1}),L;var L,U,H}(),ve=se,le=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 O=S[Symbol.toPrimitive];if(O!==void 0){var P=O.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 O=function(Q){return c(c({},Q),{},{theme:"simple-keyboard ".concat(Q.theme||"hg-theme-default")})}(p);if(!x.current){x.current=!0,O.debug&&console.log("ReactSimpleKeyboard: Init");var P=C.current,k=".".concat(y);S.current=new(m())(P||k,O),O.keyboardRef&&O.keyboardRef(S.current)}var _=function(Q,q){var K=o(q),I=o(Q);return Object.keys(K).filter(function(V){return K[V]!==I[V]})}(j.current,O);if(_.length){var $=S.current;j.current=O,$==null||$.setOptions(O),O.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",_)}},[x,y,j,p]),l.createElement("div",{className:y,ref:C})},g=d}(),a}()})})(Nu);var W0=Nu.exports;const H0=ss(W0);function Iu({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,s]=N.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]=N.useState(!1),a=N.useRef(null),l=N.useRef(null);N.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(Iu,{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]=N.useState(0),{session:{currency:a,events:l}}=nt(),f=()=>{let m=0;return l.filter(v=>Object.values(Ln).includes(v.type)).forEach(v=>{m+=v.data.amount_in_cents}),m};return u.jsxs(Ct,{children:[e&&u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e})})}),u.jsx(wt,{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(Yn,{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(Yn,{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(it,{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 Du(e,t){N.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)}},[])}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 ku(){const[e,t]=N.useState(!1),n=N.useRef(null),r=N.useRef(null),i=N.useRef(null),[s,a]=N.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);N.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(Iu,{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})=>{const[d,g]=N.useState(h),p=N.useRef(null),[y,x]=N.useState(!1),{open:C,close:S}=pa();N.useEffect(()=>()=>{S()},[]);const j=()=>{p.current&&g(p.current.validationMessage),x(!1),S()},O=async $=>{x(!0),(async()=>C($))().then(()=>{var q;return(q=p.current)==null?void 0:q.scrollIntoView(!1)})},P=$=>{v&&v($)},k=N.useId(),_=e??k;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{description:r,disabled:f,htmlFor:_,required:i,children:n}),u.jsx("div",{className:Dt("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 ",y&&!m&&"border-core-primary-500 ring-1 ring-core-primary-500",m&&"border-core-red-500",m&&y&&"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(St,{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:P,onBlur:j,ref:p,placeholder:l,onFocus:O,disabled:f,autoFocus:o}),E&&u.jsx(St,{icon:E})]})}),u.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${h||d?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:u.jsx("div",{className:"overflow-hidden",children:u.jsx(kt.Helper,{error:m,helperText:h||d})})})]})};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]=N.useState(m),o=N.useRef(null),[d,g]=N.useState(!1),{open:p,close:y}=pa();N.useEffect(()=>()=>{y()},[]);const x=()=>{o.current&&E(o.current.validationMessage),g(!1),y()},C=async _=>{g(!0),(async()=>p(_))().then(()=>{var Q;return(Q=o.current)==null?void 0:Q.scrollIntoView(!1)})},[S,j]=N.useState(s||""),O=_=>{j(_.target.value),v==null||v(_)},P=N.useId(),k=e??P;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{description:i,disabled:l,htmlFor:k,required:r,children:n}),u.jsx("div",{className:Dt("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(St,{icon:"mail"}),u.jsx("input",{type:"email",id:k,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:O,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(kt.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]=N.useState(!1),o=N.useId(),d=e??o;return u.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{description:i,disabled:l,htmlFor:d,required:r,children:n}),u.jsx("div",{className:Dt("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(St,{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(kt.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 ni({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:i,children:s}){const[a,l]=N.useState(t),f=N.useRef(null);N.useEffect(()=>{l(t)},[t]),N.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(wt,{children:s}),u.jsx(Ot,{children:u.jsxs("div",{className:"flex flex-col gap-2",children:[r&&u.jsx(it,{label:r.label??"",onClick:r.action,disabled:r.disabled}),i&&u.jsx(it,{label:i.label??"",onClick:i.action,disabled:i.disabled,variant:"secondary"})]})})]})})})}function Z0({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 X0(e){const{t}=$e(),n=N.useRef(null),[r,i]=N.useState(!1);Du(n,i);const[s,a]=N.useState(""),[l,f]=N.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(kt,{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(St,{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(Z0,{option:c,checked:l.includes(c.value),onChange:E=>v(E,c.value)},`${c.value}_${l.includes(c.value)?"checked":"unchecked"}`)})]})]})]})}function e1({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 bo({state:e}){const t=En(),{t:n}=$e(),r=Et(),[i,s]=N.useState(""),[a,l]=N.useState(!1),{session:f,mutate:m}=nt(),[h,v]=N.useState(!1),c=async o=>{if(t.onContactLink){const{data:{data:d}}=await rr.get(o);d&&t.onContactLink(d)}},E=N.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 N.useEffect(()=>{i&&!a&&!h&&E()},[i,a,h,E]),u.jsxs(Ct,{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(wt,{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(it,{label:n("continue"),onClick:E}),f.input_data.enable_email_identification&&u.jsx(it,{label:n("useEmail"),variant:"secondary",onClick:()=>r("../email",{state:e})})]})})]})}var Bu={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.compactObject=Lu,$t.deprecated=l1;var t1=$t.detectBrowser=u1;$t.disableLog=s1,$t.disableWarnings=a1,$t.extractVersion=wo,$t.filterStats=d1,$t.log=c1,$t.walkStats=xo,$t.wrapPeerConnectionEvent=o1;function n1(e,t,n){return t=r1(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1(e){var t=i1(e,"string");return Kn(t)=="symbol"?t:t+""}function i1(e,t){if(Kn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Kn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kn(e){"@babel/helpers - typeof";return Kn=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},Kn(e)}var Mu=!0,_u=!0;function wo(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function o1(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 s1(e){return typeof e!="boolean"?new Error("Argument type: "+Kn(e)+". Please use a boolean."):(Mu=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function a1(e){return typeof e!="boolean"?new Error("Argument type: "+Kn(e)+". Please use a boolean."):(_u=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function c1(){if((typeof window>"u"?"undefined":Kn(window))==="object"){if(Mu)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function l1(e,t){_u&&console.warn(e+" is deprecated, please use "+t+" instead.")}function u1(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=wo(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=wo(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=wo(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 Fu(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lu(e){return Fu(e)?Object.keys(e).reduce(function(t,n){var r=Fu(e[n]),i=r?Lu(e[n]):e[n],s=r&&!Object.keys(i).length;return i===void 0||s?t:Object.assign(t,n1({},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 d1(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 f1=Bu.shimGetUserMedia=g1,h1=p1($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 p1(e,t){if(e&&e.__esModule)return e;if(e===null||$n(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 $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 qu=h1.log;function g1(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(m){if($n(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=$n(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&&$n(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&&$n(m.video)==="object"){var c=m.video.facingMode;c=c&&($n(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 m1=Uu.shimGetUserMedia=b1,y1=v1($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 v1(e,t){if(e&&e.__esModule)return e;if(e===null||wr(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 wr(e){"@babel/helpers - typeof";return wr=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},wr(e)}function b1(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(f,m,h){y1.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 wr(f)==="object"&&wr(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"&&wr(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=N1,Cn.shimCallbacksAPI=A1,Cn.shimConstraints=$u,Cn.shimCreateOfferLegacy=O1;var w1=Cn.shimGetUserMedia=S1;Cn.shimLocalStreamsAPI=E1,Cn.shimRTCIceServerUrls=T1,Cn.shimRemoteStreamsAPI=C1,Cn.shimTrackEventTransceiver=j1;var Yu=x1($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 x1(e,t){if(e&&e.__esModule)return e;if(e===null||Qn(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 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)}function E1(e){if(!(Qn(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 C1(e){if(!(Qn(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 A1(e){if(!(Qn(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 S1(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 T1(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 j1(e){Qn(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 O1(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 N1(e){Qn(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)),I1=(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)},P1=(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 D1(e){return e.join("|")}function k1(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 R1(e,t){return e.Binarizer[t]}function B1(e,t){return e.CharacterSet[t]}const M1=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function _1(e){return M1[e.value]}function F1(e,t){return e.EanAddOnSymbol[t]}function L1(e,t){return e.TextMode[t]}const xr={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:D1(t.formats),binarizer:R1(e,t.binarizer),eanAddOnSymbol:F1(e,t.eanAddOnSymbol),textMode:L1(e,t.textMode),characterSet:B1(e,t.characterSet)}}function Zu(e){return{...e,format:k1(e.format),eccLevel:e.eccLevel,contentType:_1(e.contentType)}}const V1={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:V1,s=e({...i});return Xu.set(e,{moduleOverrides:i,modulePromise:s}),s}async function q1(e,t,n=xr){const r={...xr,...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 U1(e,t,n=xr){const r={...xr,...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}({...xr,formats:[...xr.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((w,b)=>{i=w,s=b});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(w){return r.locateFile?r.locateFile(w,c):c+w}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=w=>{var b=new XMLHttpRequest;return b.open("GET",w,!1),b.responseType="arraybuffer",b.send(null),new Uint8Array(b.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,O,P,k,_,$;function Q(){var w=y.buffer;r.HEAP8=C=new Int8Array(w),r.HEAP16=j=new Int16Array(w),r.HEAPU8=S=new Uint8Array(w),r.HEAPU16=O=new Uint16Array(w),r.HEAP32=P=new Int32Array(w),r.HEAPU32=k=new Uint32Array(w),r.HEAPF32=_=new Float32Array(w),r.HEAPF64=$=new Float64Array(w)}var q=[],K=[],I=[];function V(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)X(r.preRun.shift());J(q)}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(I)}function X(w){q.unshift(w)}function ne(w){K.unshift(w)}function re(w){I.unshift(w)}var he=0,se=null;function ve(w){var b;he++,(b=r.monitorRunDependencies)===null||b===void 0||b.call(r,he)}function le(w){var b;if(he--,(b=r.monitorRunDependencies)===null||b===void 0||b.call(r,he),he==0&&se){var T=se;se=null,T()}}function L(w){var b;(b=r.onAbort)===null||b===void 0||b.call(r,w),w="Aborted("+w+")",g(w),x=!0,w+=". Build with -sASSERTIONS for more info.";var T=new WebAssembly.RuntimeError(w);throw s(T),T}var U="data:application/octet-stream;base64,",H=w=>w.startsWith(U),A;A="zxing_reader.wasm",H(A)||(A=E(A));function R(w){if(w==A&&p)return new Uint8Array(p);if(o)return o(w);throw"both async and sync fetching of the wasm failed"}function M(w){return!p&&(f||v||m||h)&&typeof fetch=="function"?fetch(w,{credentials:"same-origin"}).then(b=>{if(!b.ok)throw`failed to load wasm binary file at '${w}'`;return b.arrayBuffer()}).catch(()=>R(w)):Promise.resolve().then(()=>R(w))}function B(w,b,T){return M(w).then(D=>WebAssembly.instantiate(D,b)).then(T,D=>{g(`failed to asynchronously prepare wasm: ${D}`),L(D)})}function z(w,b,T,D){return!w&&typeof WebAssembly.instantiateStreaming=="function"&&!H(b)&&typeof fetch=="function"?fetch(b,{credentials:"same-origin"}).then(Y=>{var ee=WebAssembly.instantiateStreaming(Y,T);return ee.then(D,function(ie){return g(`wasm streaming compile failed: ${ie}`),g("falling back to ArrayBuffer instantiation"),B(b,T,D)})}):B(b,T,D)}function Z(){var w={a:J2};function b(D,Y){return ht=D.exports,y=ht.ma,Q(),Wf=ht.qa,ne(ht.na),le(),ht}ve();function T(D){b(D.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(w,b)}catch(D){g(`Module.instantiateWasm callback failed with error: ${D}`),s(D)}return z(p,A,w,T).catch(s),{}}var J=w=>{for(;w.length>0;)w.shift()(r)};r.noExitRuntime;var G=[],pe=0,me=w=>{var b=new Ee(w);return b.get_caught()||(b.set_caught(!0),pe--),b.set_rethrown(!1),G.push(b),lh(b.excPtr),b.get_exception_ptr()},ce=0,ue=()=>{lt(0,0);var w=G.pop();ch(w.excPtr),ce=0};class Ee{constructor(b){this.excPtr=b,this.ptr=b-24}set_type(b){k[this.ptr+4>>2]=b}get_type(){return k[this.ptr+4>>2]}set_destructor(b){k[this.ptr+8>>2]=b}get_destructor(){return k[this.ptr+8>>2]}set_caught(b){b=b?1:0,C[this.ptr+12]=b}get_caught(){return C[this.ptr+12]!=0}set_rethrown(b){b=b?1:0,C[this.ptr+13]=b}get_rethrown(){return C[this.ptr+13]!=0}init(b,T){this.set_adjusted_ptr(0),this.set_type(b),this.set_destructor(T)}set_adjusted_ptr(b){k[this.ptr+16>>2]=b}get_adjusted_ptr(){return k[this.ptr+16>>2]}get_exception_ptr(){var b=dh(this.get_type());if(b)return k[this.excPtr>>2];var T=this.get_adjusted_ptr();return T!==0?T:this.excPtr}}var fe=w=>{throw ce||(ce=w),ce},je=w=>{var b=ce;if(!b)return Bi(0),0;var T=new Ee(b);T.set_adjusted_ptr(b);var D=T.get_type();if(!D)return Bi(0),b;for(var Y in w){var ee=w[Y];if(ee===0||ee===D)break;var ie=T.ptr+16;if(uh(ee,D,ie))return Bi(ee),b}return Bi(D),b},Ie=()=>je([]),Qe=w=>je([w]),We=(w,b)=>je([w,b]),tt=()=>{var w=G.pop();w||L("no exception to throw");var b=w.excPtr;throw w.get_rethrown()||(G.push(w),w.set_rethrown(!0),w.set_caught(!1),pe++),ce=b,ce},ze=(w,b,T)=>{var D=new Ee(w);throw D.init(b,T),ce=w,pe++,ce},sn=()=>pe,Je={},Nt=w=>{for(;w.length;){var b=w.pop(),T=w.pop();T(b)}};function Ze(w){return this.fromWireType(k[w>>2])}var Ne={},Rt={},dt={},_t,It=w=>{throw new _t(w)},Ft=(w,b,T)=>{w.forEach(function(oe){dt[oe]=b});function D(oe){var ge=T(oe);ge.length!==w.length&&It("Mismatched type converter count");for(var we=0;we<w.length;++we)De(w[we],ge[we])}var Y=new Array(b.length),ee=[],ie=0;b.forEach((oe,ge)=>{Rt.hasOwnProperty(oe)?Y[ge]=Rt[oe]:(ee.push(oe),Ne.hasOwnProperty(oe)||(Ne[oe]=[]),Ne[oe].push(()=>{Y[ge]=Rt[oe],++ie,ie===ee.length&&D(Y)}))}),ee.length===0&&D(Y)},Wt=w=>{var b=Je[w];delete Je[w];var T=b.rawConstructor,D=b.rawDestructor,Y=b.fields,ee=Y.map(ie=>ie.getterReturnType).concat(Y.map(ie=>ie.setterArgumentType));Ft([w],ee,ie=>{var oe={};return Y.forEach((ge,we)=>{var Se=ge.fieldName,Ve=ie[we],ke=ge.getter,Ke=ge.getterContext,mt=ie[we+Y.length],Vt=ge.setter,ut=ge.setterContext;oe[Se]={read:Pt=>Ve.fromWireType(ke(Ke,Pt)),write:(Pt,be)=>{var Te=[];Vt(ut,Pt,mt.toWireType(Te,be)),Nt(Te)}}}),[{name:b.name,fromWireType:ge=>{var we={};for(var Se in oe)we[Se]=oe[Se].read(ge);return D(ge),we},toWireType:(ge,we)=>{for(var Se in oe)if(!(Se in we))throw new TypeError(`Missing field: "${Se}"`);var Ve=T();for(Se in oe)oe[Se].write(Ve,we[Se]);return ge!==null&&ge.push(D,Ve),Ve},argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction:D}]})},en=(w,b,T,D,Y)=>{},Gt=()=>{for(var w=new Array(256),b=0;b<256;++b)w[b]=String.fromCharCode(b);Lt=w},Lt,st=w=>{for(var b="",T=w;S[T];)b+=Lt[S[T++]];return b},an,Ce=w=>{throw new an(w)};function Le(w,b){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var D=b.name;if(w||Ce(`type "${D}" must have a positive integer typeid pointer`),Rt.hasOwnProperty(w)){if(T.ignoreDuplicateRegistrations)return;Ce(`Cannot register type '${D}' twice`)}if(Rt[w]=b,delete dt[w],Ne.hasOwnProperty(w)){var Y=Ne[w];delete Ne[w],Y.forEach(ee=>ee())}}function De(w,b){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Le(w,b,T)}var _e=8,at=(w,b,T,D)=>{b=st(b),De(w,{name:b,fromWireType:function(Y){return!!Y},toWireType:function(Y,ee){return ee?T:D},argPackAdvance:_e,readValueFromPointer:function(Y){return this.fromWireType(S[Y])},destructorFunction:null})},Or=w=>({count:w.count,deleteScheduled:w.deleteScheduled,preservePointerOnDelete:w.preservePointerOnDelete,ptr:w.ptr,ptrType:w.ptrType,smartPtr:w.smartPtr,smartPtrType:w.smartPtrType}),Zn=w=>{function b(T){return T.$$.ptrType.registeredClass.name}Ce(b(w)+" instance already deleted")},Nr=!1,Di=w=>{},tc=w=>{w.smartPtr?w.smartPtrType.rawDestructor(w.smartPtr):w.ptrType.registeredClass.rawDestructor(w.ptr)},Wo=w=>{w.count.value-=1;var b=w.count.value===0;b&&tc(w)},Ho=(w,b,T)=>{if(b===T)return w;if(T.baseClass===void 0)return null;var D=Ho(w,b,T.baseClass);return D===null?null:T.downcast(D)},Jo={},F=()=>Object.keys(Fe).length,ye=()=>{var w=[];for(var b in Fe)Fe.hasOwnProperty(b)&&w.push(Fe[b]);return w},Ae=[],Pe=()=>{for(;Ae.length;){var w=Ae.pop();w.$$.deleteScheduled=!1,w.delete()}},Ue,Xe=w=>{Ue=w,Ae.length&&Ue&&Ue(Pe)},Ge=()=>{r.getInheritedInstanceCount=F,r.getLiveInheritedInstances=ye,r.flushPendingDeletes=Pe,r.setDelayFunction=Xe},Fe={},Bt=(w,b)=>{for(b===void 0&&Ce("ptr should not be undefined");w.baseClass;)b=w.upcast(b),w=w.baseClass;return b},ct=(w,b)=>(b=Bt(w,b),Fe[b]),ot=(w,b)=>{(!b.ptrType||!b.ptr)&&It("makeClassHandle requires ptr and ptrType");var T=!!b.smartPtrType,D=!!b.smartPtr;return T!==D&&It("Both smartPtrType and smartPtr must be specified"),b.count={value:1},cn(Object.create(w,{$$:{value:b,writable:!0}}))};function Ht(w){var b=this.getPointee(w);if(!b)return this.destructor(w),null;var T=ct(this.registeredClass,b);if(T!==void 0){if(T.$$.count.value===0)return T.$$.ptr=b,T.$$.smartPtr=w,T.clone();var D=T.clone();return this.destructor(w),D}function Y(){return this.isSmartPointer?ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:b,smartPtrType:this,smartPtr:w}):ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:w})}var ee=this.registeredClass.getActualType(b),ie=Jo[ee];if(!ie)return Y.call(this);var oe;this.isConst?oe=ie.constPointerType:oe=ie.pointerType;var ge=Ho(b,this.registeredClass,oe.registeredClass);return ge===null?Y.call(this):this.isSmartPointer?ot(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:ge,smartPtrType:this,smartPtr:w}):ot(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:ge})}var cn=w=>typeof FinalizationRegistry>"u"?(cn=b=>b,w):(Nr=new FinalizationRegistry(b=>{Wo(b.$$)}),cn=b=>{var T=b.$$,D=!!T.smartPtr;if(D){var Y={$$:T};Nr.register(b,Y,b)}return b},Di=b=>Nr.unregister(b),cn(w)),Dn=()=>{Object.assign(Tt.prototype,{isAliasOf(w){if(!(this instanceof Tt)||!(w instanceof Tt))return!1;var b=this.$$.ptrType.registeredClass,T=this.$$.ptr;w.$$=w.$$;for(var D=w.$$.ptrType.registeredClass,Y=w.$$.ptr;b.baseClass;)T=b.upcast(T),b=b.baseClass;for(;D.baseClass;)Y=D.upcast(Y),D=D.baseClass;return b===D&&T===Y},clone(){if(this.$$.ptr||Zn(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var w=cn(Object.create(Object.getPrototypeOf(this),{$$:{value:Or(this.$$)}}));return w.$$.count.value+=1,w.$$.deleteScheduled=!1,w},delete(){this.$$.ptr||Zn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ce("Object already scheduled for deletion"),Di(this),Wo(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Zn(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 kn=(w,b)=>Object.defineProperty(b,"name",{value:w}),zo=(w,b,T)=>{if(w[b].overloadTable===void 0){var D=w[b];w[b]=function(){for(var Y=arguments.length,ee=new Array(Y),ie=0;ie<Y;ie++)ee[ie]=arguments[ie];return w[b].overloadTable.hasOwnProperty(ee.length)||Ce(`Function '${T}' called with an invalid number of arguments (${ee.length}) - expects one of (${w[b].overloadTable})!`),w[b].overloadTable[ee.length].apply(this,ee)},w[b].overloadTable=[],w[b].overloadTable[D.argCount]=D}},ki=(w,b,T)=>{r.hasOwnProperty(w)?((T===void 0||r[w].overloadTable!==void 0&&r[w].overloadTable[T]!==void 0)&&Ce(`Cannot register public name '${w}' twice`),zo(r,w,w),r.hasOwnProperty(T)&&Ce(`Cannot register multiple overloads of a function with the same number of arguments (${T})!`),r[w].overloadTable[T]=b):(r[w]=b,T!==void 0&&(r[w].numArguments=T))},Iw=48,Pw=57,Dw=w=>{if(w===void 0)return"_unknown";w=w.replace(/[^a-zA-Z0-9_]/g,"$");var b=w.charCodeAt(0);return b>=Iw&&b<=Pw?`_${w}`:w};function kw(w,b,T,D,Y,ee,ie,oe){this.name=w,this.constructor=b,this.instancePrototype=T,this.rawDestructor=D,this.baseClass=Y,this.getActualType=ee,this.upcast=ie,this.downcast=oe,this.pureVirtualFunctions=[]}var nc=(w,b,T)=>{for(;b!==T;)b.upcast||Ce(`Expected null or instance of ${T.name}, got an instance of ${b.name}`),w=b.upcast(w),b=b.baseClass;return w};function Rw(w,b){if(b===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),0;b.$$||Ce(`Cannot pass "${cc(b)}" as a ${this.name}`),b.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`);var T=b.$$.ptrType.registeredClass,D=nc(b.$$.ptr,T,this.registeredClass);return D}function Bw(w,b){var T;if(b===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),this.isSmartPointer?(T=this.rawConstructor(),w!==null&&w.push(this.rawDestructor,T),T):0;(!b||!b.$$)&&Ce(`Cannot pass "${cc(b)}" as a ${this.name}`),b.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&b.$$.ptrType.isConst&&Ce(`Cannot convert argument of type ${b.$$.smartPtrType?b.$$.smartPtrType.name:b.$$.ptrType.name} to parameter type ${this.name}`);var D=b.$$.ptrType.registeredClass;if(T=nc(b.$$.ptr,D,this.registeredClass),this.isSmartPointer)switch(b.$$.smartPtr===void 0&&Ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:b.$$.smartPtrType===this?T=b.$$.smartPtr:Ce(`Cannot convert argument of type ${b.$$.smartPtrType?b.$$.smartPtrType.name:b.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:T=b.$$.smartPtr;break;case 2:if(b.$$.smartPtrType===this)T=b.$$.smartPtr;else{var Y=b.clone();T=this.rawShare(T,Bn.toHandle(()=>Y.delete())),w!==null&&w.push(this.rawDestructor,T)}break;default:Ce("Unsupporting sharing policy")}return T}function Mw(w,b){if(b===null)return this.isReference&&Ce(`null is not a valid ${this.name}`),0;b.$$||Ce(`Cannot pass "${cc(b)}" as a ${this.name}`),b.$$.ptr||Ce(`Cannot pass deleted object as a pointer of type ${this.name}`),b.$$.ptrType.isConst&&Ce(`Cannot convert argument of type ${b.$$.ptrType.name} to parameter type ${this.name}`);var T=b.$$.ptrType.registeredClass,D=nc(b.$$.ptr,T,this.registeredClass);return D}var _w=()=>{Object.assign(Zo.prototype,{getPointee(w){return this.rawGetPointee&&(w=this.rawGetPointee(w)),w},destructor(w){var b;(b=this.rawDestructor)===null||b===void 0||b.call(this,w)},argPackAdvance:_e,readValueFromPointer:Ze,fromWireType:Ht})};function Zo(w,b,T,D,Y,ee,ie,oe,ge,we,Se){this.name=w,this.registeredClass=b,this.isReference=T,this.isConst=D,this.isSmartPointer=Y,this.pointeeType=ee,this.sharingPolicy=ie,this.rawGetPointee=oe,this.rawConstructor=ge,this.rawShare=we,this.rawDestructor=Se,!Y&&b.baseClass===void 0?D?(this.toWireType=Rw,this.destructorFunction=null):(this.toWireType=Mw,this.destructorFunction=null):this.toWireType=Bw}var Qf=(w,b,T)=>{r.hasOwnProperty(w)||It("Replacing nonexistent public symbol"),r[w].overloadTable!==void 0&&T!==void 0?r[w].overloadTable[T]=b:(r[w]=b,r[w].argCount=T)},Fw=(w,b,T)=>{var D=r["dynCall_"+w];return D(b,...T)},Xo=[],Wf,ft=w=>{var b=Xo[w];return b||(w>=Xo.length&&(Xo.length=w+1),Xo[w]=b=Wf.get(w)),b},Lw=function(w,b){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(w.includes("j"))return Fw(w,b,T);var D=ft(b)(...T);return D},Vw=(w,b)=>function(){for(var T=arguments.length,D=new Array(T),Y=0;Y<T;Y++)D[Y]=arguments[Y];return Lw(w,b,D)},yn=(w,b)=>{w=st(w);function T(){return w.includes("j")?Vw(w,b):ft(b)}var D=T();return typeof D!="function"&&Ce(`unknown function pointer with signature ${w}: ${b}`),D},qw=(w,b)=>{var T=kn(b,function(D){this.name=b,this.message=D;var Y=new Error(D).stack;Y!==void 0&&(this.stack=this.toString()+`
102
102
  `+Y.replace(/^Error(:[^\n]*)?\n/,""))});return T.prototype=Object.create(w.prototype),T.prototype.constructor=T,T.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},T},Hf,Jf=w=>{var b=ah(w),T=st(b);return Mn(b),T},es=(w,b)=>{var T=[],D={};function Y(ee){if(!D[ee]&&!Rt[ee]){if(dt[ee]){dt[ee].forEach(Y);return}T.push(ee),D[ee]=!0}}throw b.forEach(Y),new Hf(`${w}: `+T.map(Jf).join([", "]))},Uw=(w,b,T,D,Y,ee,ie,oe,ge,we,Se,Ve,ke)=>{Se=st(Se),ee=yn(Y,ee),oe&&(oe=yn(ie,oe)),we&&(we=yn(ge,we)),ke=yn(Ve,ke);var Ke=Dw(Se);ki(Ke,function(){es(`Cannot construct ${Se} due to unbound types`,[D])}),Ft([w,b,T],D?[D]:[],mt=>{mt=mt[0];var Vt,ut;D?(Vt=mt.registeredClass,ut=Vt.instancePrototype):ut=Tt.prototype;var Pt=kn(Se,function(){if(Object.getPrototypeOf(this)!==be)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)}),be=Object.create(ut,{constructor:{value:Pt}});Pt.prototype=be;var Te=new kw(Se,Pt,be,ke,Vt,ee,oe,we);if(Te.baseClass){var yt,jt;(jt=(yt=Te.baseClass).__derivedClasses)!==null&&jt!==void 0||(yt.__derivedClasses=[]),Te.baseClass.__derivedClasses.push(Te)}var Ir=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[w]={pointerType:rs,constPointerType:ph},Qf(Ke,Pt),[Ir,rs,ph]})},rc=(w,b)=>{for(var T=[],D=0;D<w;D++)T.push(k[b+D*4>>2]);return T};function Gw(w){for(var b=1;b<w.length;++b)if(w[b]!==null&&w[b].destructorFunction===void 0)return!0;return!1}function ic(w,b,T,D,Y,ee){var ie=b.length;ie<2&&Ce("argTypes array size mismatch! Must at least get return value and 'this' types!");var oe=b[1]!==null&&T!==null,ge=Gw(b),we=b[0].name!=="void",Se=ie-2,Ve=new Array(Se),ke=[],Ke=[],mt=function(){arguments.length!==Se&&Ce(`function ${w} called with ${arguments.length} arguments, expected ${Se}`),Ke.length=0;var Vt;ke.length=oe?2:1,ke[0]=Y,oe&&(Vt=b[1].toWireType(Ke,this),ke[1]=Vt);for(var ut=0;ut<Se;++ut)Ve[ut]=b[ut+2].toWireType(Ke,ut<0||arguments.length<=ut?void 0:arguments[ut]),ke.push(Ve[ut]);var Pt=D(...ke);function be(Te){if(ge)Nt(Ke);else for(var yt=oe?1:2;yt<b.length;yt++){var jt=yt===1?Vt:Ve[yt-2];b[yt].destructorFunction!==null&&b[yt].destructorFunction(jt)}if(we)return b[0].fromWireType(Te)}return be(Pt)};return kn(w,mt)}var Yw=(w,b,T,D,Y,ee)=>{var ie=rc(b,T);Y=yn(D,Y),Ft([],[w],oe=>{oe=oe[0];var ge=`constructor ${oe.name}`;if(oe.registeredClass.constructor_body===void 0&&(oe.registeredClass.constructor_body=[]),oe.registeredClass.constructor_body[b-1]!==void 0)throw new an(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${oe.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return oe.registeredClass.constructor_body[b-1]=()=>{es(`Cannot construct ${oe.name} due to unbound types`,ie)},Ft([],ie,we=>(we.splice(1,0,null),oe.registeredClass.constructor_body[b-1]=ic(ge,we,null,Y,ee),[])),[]})},zf=w=>{w=w.trim();const b=w.indexOf("(");return b!==-1?w.substr(0,b):w},Kw=(w,b,T,D,Y,ee,ie,oe,ge)=>{var we=rc(T,D);b=st(b),b=zf(b),ee=yn(Y,ee),Ft([],[w],Se=>{Se=Se[0];var Ve=`${Se.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]),oe&&Se.registeredClass.pureVirtualFunctions.push(b);function ke(){es(`Cannot call ${Ve} due to unbound types`,we)}var Ke=Se.registeredClass.instancePrototype,mt=Ke[b];return mt===void 0||mt.overloadTable===void 0&&mt.className!==Se.name&&mt.argCount===T-2?(ke.argCount=T-2,ke.className=Se.name,Ke[b]=ke):(zo(Ke,b,Ve),Ke[b].overloadTable[T-2]=ke),Ft([],we,Vt=>{var ut=ic(Ve,Vt,Se,ee,ie);return Ke[b].overloadTable===void 0?(ut.argCount=T-2,Ke[b]=ut):Ke[b].overloadTable[T-2]=ut,[]}),[]})},oc=[],Rn=[],sc=w=>{w>9&&--Rn[w+1]===0&&(Rn[w]=void 0,oc.push(w))},$w=()=>Rn.length/2-5-oc.length,Qw=()=>{Rn.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=$w},Bn={toValue:w=>(w||Ce("Cannot use deleted val. handle = "+w),Rn[w]),toHandle:w=>{switch(w){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const b=oc.pop()||Rn.length;return Rn[b]=w,Rn[b+1]=1,b}}}},Ww={name:"emscripten::val",fromWireType:w=>{var b=Bn.toValue(w);return sc(w),b},toWireType:(w,b)=>Bn.toHandle(b),argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction:null},Zf=w=>De(w,Ww),Hw=(w,b,T)=>{switch(b){case 1:return T?function(D){return this.fromWireType(C[D])}:function(D){return this.fromWireType(S[D])};case 2:return T?function(D){return this.fromWireType(j[D>>1])}:function(D){return this.fromWireType(O[D>>1])};case 4:return T?function(D){return this.fromWireType(P[D>>2])}:function(D){return this.fromWireType(k[D>>2])};default:throw new TypeError(`invalid integer width (${b}): ${w}`)}},Jw=(w,b,T,D)=>{b=st(b);function Y(){}Y.values={},De(w,{name:b,constructor:Y,fromWireType:function(ee){return this.constructor.values[ee]},toWireType:(ee,ie)=>ie.value,argPackAdvance:_e,readValueFromPointer:Hw(b,T,D),destructorFunction:null}),ki(b,Y)},ac=(w,b)=>{var T=Rt[w];return T===void 0&&Ce(`${b} has unknown type ${Jf(w)}`),T},zw=(w,b,T)=>{var D=ac(w,"enum");b=st(b);var Y=D.constructor,ee=Object.create(D.constructor.prototype,{value:{value:T},constructor:{value:kn(`${D.name}_${b}`,function(){})}});Y.values[T]=ee,Y[b]=ee},cc=w=>{if(w===null)return"null";var b=typeof w;return b==="object"||b==="array"||b==="function"?w.toString():""+w},Zw=(w,b)=>{switch(b){case 4:return function(T){return this.fromWireType(_[T>>2])};case 8:return function(T){return this.fromWireType($[T>>3])};default:throw new TypeError(`invalid float width (${b}): ${w}`)}},Xw=(w,b,T)=>{b=st(b),De(w,{name:b,fromWireType:D=>D,toWireType:(D,Y)=>Y,argPackAdvance:_e,readValueFromPointer:Zw(b,T),destructorFunction:null})},e2=(w,b,T,D,Y,ee,ie)=>{var oe=rc(b,T);w=st(w),w=zf(w),Y=yn(D,Y),ki(w,function(){es(`Cannot call ${w} due to unbound types`,oe)},b-1),Ft([],oe,ge=>{var we=[ge[0],null].concat(ge.slice(1));return Qf(w,ic(w,we,null,Y,ee),b-1),[]})},t2=(w,b,T)=>{switch(b){case 1:return T?D=>C[D]:D=>S[D];case 2:return T?D=>j[D>>1]:D=>O[D>>1];case 4:return T?D=>P[D>>2]:D=>k[D>>2];default:throw new TypeError(`invalid integer width (${b}): ${w}`)}},n2=(w,b,T,D,Y)=>{b=st(b);var ee=Se=>Se;if(D===0){var ie=32-8*T;ee=Se=>Se<<ie>>>ie}var oe=b.includes("unsigned"),ge=(Se,Ve)=>{},we;oe?we=function(Se,Ve){return ge(Ve,this.name),Ve>>>0}:we=function(Se,Ve){return ge(Ve,this.name),Ve},De(w,{name:b,fromWireType:ee,toWireType:we,argPackAdvance:_e,readValueFromPointer:t2(b,T,D!==0),destructorFunction:null})},r2=(w,b,T)=>{var D=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Y=D[b];function ee(ie){var oe=k[ie>>2],ge=k[ie+4>>2];return new Y(C.buffer,ge,oe)}T=st(T),De(w,{name:T,fromWireType:ee,argPackAdvance:_e,readValueFromPointer:ee},{ignoreDuplicateRegistrations:!0})},i2=(w,b)=>{Zf(w)},Xf=(w,b,T,D)=>{if(!(D>0))return 0;for(var Y=T,ee=T+D-1,ie=0;ie<w.length;++ie){var oe=w.charCodeAt(ie);if(oe>=55296&&oe<=57343){var ge=w.charCodeAt(++ie);oe=65536+((oe&1023)<<10)|ge&1023}if(oe<=127){if(T>=ee)break;b[T++]=oe}else if(oe<=2047){if(T+1>=ee)break;b[T++]=192|oe>>6,b[T++]=128|oe&63}else if(oe<=65535){if(T+2>=ee)break;b[T++]=224|oe>>12,b[T++]=128|oe>>6&63,b[T++]=128|oe&63}else{if(T+3>=ee)break;b[T++]=240|oe>>18,b[T++]=128|oe>>12&63,b[T++]=128|oe>>6&63,b[T++]=128|oe&63}}return b[T]=0,T-Y},o2=(w,b,T)=>Xf(w,S,b,T),eh=w=>{for(var b=0,T=0;T<w.length;++T){var D=w.charCodeAt(T);D<=127?b++:D<=2047?b+=2:D>=55296&&D<=57343?(b+=4,++T):b+=3}return b},th=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,nh=(w,b,T)=>{for(var D=b+T,Y=b;w[Y]&&!(Y>=D);)++Y;if(Y-b>16&&w.buffer&&th)return th.decode(w.subarray(b,Y));for(var ee="";b<Y;){var ie=w[b++];if(!(ie&128)){ee+=String.fromCharCode(ie);continue}var oe=w[b++]&63;if((ie&224)==192){ee+=String.fromCharCode((ie&31)<<6|oe);continue}var ge=w[b++]&63;if((ie&240)==224?ie=(ie&15)<<12|oe<<6|ge:ie=(ie&7)<<18|oe<<12|ge<<6|w[b++]&63,ie<65536)ee+=String.fromCharCode(ie);else{var we=ie-65536;ee+=String.fromCharCode(55296|we>>10,56320|we&1023)}}return ee},lc=(w,b)=>w?nh(S,w,b):"",s2=(w,b)=>{b=st(b);var T=b==="std::string";De(w,{name:b,fromWireType(D){var Y=k[D>>2],ee=D+4,ie;if(T)for(var oe=ee,ge=0;ge<=Y;++ge){var we=ee+ge;if(ge==Y||S[we]==0){var Se=we-oe,Ve=lc(oe,Se);ie===void 0?ie=Ve:(ie+="\0",ie+=Ve),oe=we+1}}else{for(var ke=new Array(Y),ge=0;ge<Y;++ge)ke[ge]=String.fromCharCode(S[ee+ge]);ie=ke.join("")}return Mn(D),ie},toWireType(D,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(k[oe>>2]=ee,T&&ie)o2(Y,ge,ee+1);else if(ie)for(var we=0;we<ee;++we){var Se=Y.charCodeAt(we);Se>255&&(Mn(ge),Ce("String has UTF-16 code units that do not fit in 8 bits")),S[ge+we]=Se}else for(var we=0;we<ee;++we)S[ge+we]=Y[we];return D!==null&&D.push(Mn,oe),oe},argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction(D){Mn(D)}})},rh=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,a2=(w,b)=>{for(var T=w,D=T>>1,Y=D+b/2;!(D>=Y)&&O[D];)++D;if(T=D<<1,T-w>32&&rh)return rh.decode(S.subarray(w,T));for(var ee="",ie=0;!(ie>=b/2);++ie){var oe=j[w+ie*2>>1];if(oe==0)break;ee+=String.fromCharCode(oe)}return ee},c2=(w,b,T)=>{var D;if((D=T)!==null&&D!==void 0||(T=2147483647),T<2)return 0;T-=2;for(var Y=b,ee=T<w.length*2?T/2:w.length,ie=0;ie<ee;++ie){var oe=w.charCodeAt(ie);j[b>>1]=oe,b+=2}return j[b>>1]=0,b-Y},l2=w=>w.length*2,u2=(w,b)=>{for(var T=0,D="";!(T>=b/4);){var Y=P[w+T*4>>2];if(Y==0)break;if(++T,Y>=65536){var ee=Y-65536;D+=String.fromCharCode(55296|ee>>10,56320|ee&1023)}else D+=String.fromCharCode(Y)}return D},d2=(w,b,T)=>{var D;if((D=T)!==null&&D!==void 0||(T=2147483647),T<4)return 0;for(var Y=b,ee=Y+T-4,ie=0;ie<w.length;++ie){var oe=w.charCodeAt(ie);if(oe>=55296&&oe<=57343){var ge=w.charCodeAt(++ie);oe=65536+((oe&1023)<<10)|ge&1023}if(P[b>>2]=oe,b+=4,b+4>ee)break}return P[b>>2]=0,b-Y},f2=w=>{for(var b=0,T=0;T<w.length;++T){var D=w.charCodeAt(T);D>=55296&&D<=57343&&++T,b+=4}return b},h2=(w,b,T)=>{T=st(T);var D,Y,ee,ie;b===2?(D=a2,Y=c2,ie=l2,ee=oe=>O[oe>>1]):b===4&&(D=u2,Y=d2,ie=f2,ee=oe=>k[oe>>2]),De(w,{name:T,fromWireType:oe=>{for(var ge=k[oe>>2],we,Se=oe+4,Ve=0;Ve<=ge;++Ve){var ke=oe+4+Ve*b;if(Ve==ge||ee(ke)==0){var Ke=ke-Se,mt=D(Se,Ke);we===void 0?we=mt:(we+="\0",we+=mt),Se=ke+b}}return Mn(oe),we},toWireType:(oe,ge)=>{typeof ge!="string"&&Ce(`Cannot pass non-string to C++ string type ${T}`);var we=ie(ge),Se=fc(4+we+b);return k[Se>>2]=we/b,Y(ge,Se+4,we+b),oe!==null&&oe.push(Mn,Se),Se},argPackAdvance:_e,readValueFromPointer:Ze,destructorFunction(oe){Mn(oe)}})},p2=(w,b,T,D,Y,ee)=>{Je[w]={name:st(b),rawConstructor:yn(T,D),rawDestructor:yn(Y,ee),fields:[]}},g2=(w,b,T,D,Y,ee,ie,oe,ge,we)=>{Je[w].fields.push({fieldName:st(b),getterReturnType:T,getter:yn(D,Y),getterContext:ee,setterArgumentType:ie,setter:yn(oe,ge),setterContext:we})},m2=(w,b)=>{b=st(b),De(w,{isVoid:!0,name:b,argPackAdvance:0,fromWireType:()=>{},toWireType:(T,D)=>{}})},uc=[],y2=(w,b,T,D)=>(w=uc[w],b=Bn.toValue(b),w(null,b,T,D)),v2={},b2=w=>{var b=v2[w];return b===void 0?st(w):b},ih=()=>{if(typeof globalThis=="object")return globalThis;function w(b){b.$$$embind_global$$$=b;var T=typeof $$$embind_global$$$=="object"&&b.$$$embind_global$$$==b;return T||delete b.$$$embind_global$$$,T}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&w(global)?$$$embind_global$$$=global:typeof self=="object"&&w(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},w2=w=>w===0?Bn.toHandle(ih()):(w=b2(w),Bn.toHandle(ih()[w])),x2=w=>{var b=uc.length;return uc.push(w),b},E2=(w,b)=>{for(var T=new Array(w),D=0;D<w;++D)T[D]=ac(k[b+D*4>>2],"parameter "+D);return T},C2=Reflect.construct,A2=(w,b,T)=>{var D=[],Y=w.toWireType(D,T);return D.length&&(k[b>>2]=Bn.toHandle(D)),Y},S2=(w,b,T)=>{var D=E2(w,b),Y=D.shift();w--;var ee=new Array(w),ie=(ge,we,Se,Ve)=>{for(var ke=0,Ke=0;Ke<w;++Ke)ee[Ke]=D[Ke].readValueFromPointer(Ve+ke),ke+=D[Ke].argPackAdvance;var mt=T===1?C2(we,ee):we.apply(ge,ee);return A2(Y,Se,mt)},oe=`methodCaller<(${D.map(ge=>ge.name).join(", ")}) => ${Y.name}>`;return x2(kn(oe,ie))},T2=w=>{w>9&&(Rn[w+1]+=1)},j2=w=>{var b=Bn.toValue(w);Nt(b),sc(w)},O2=(w,b)=>{w=ac(w,"_emval_take_value");var T=w.readValueFromPointer(b);return Bn.toHandle(T)},N2=()=>{L("")},I2=(w,b,T)=>S.copyWithin(w,b,b+T),P2=()=>2147483648,D2=w=>{var b=y.buffer,T=(w-b.byteLength+65535)/65536;try{return y.grow(T),Q(),1}catch{}},k2=w=>{var b=S.length;w>>>=0;var T=P2();if(w>T)return!1;for(var D=(ge,we)=>ge+(we-ge%we)%we,Y=1;Y<=4;Y*=2){var ee=b*(1+.2/Y);ee=Math.min(ee,w+100663296);var ie=Math.min(T,D(Math.max(w,ee),65536)),oe=D2(ie);if(oe)return!0}return!1},dc={},R2=()=>l||"./this.program",Ri=()=>{if(!Ri.strings){var w=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",b={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:w,_:R2()};for(var T in dc)dc[T]===void 0?delete b[T]:b[T]=dc[T];var D=[];for(var T in b)D.push(`${T}=${b[T]}`);Ri.strings=D}return Ri.strings},B2=(w,b)=>{for(var T=0;T<w.length;++T)C[b++]=w.charCodeAt(T);C[b]=0},M2=(w,b)=>{var T=0;return Ri().forEach((D,Y)=>{var ee=b+T;k[w+Y*4>>2]=ee,B2(D,ee),T+=D.length+1}),0},_2=(w,b)=>{var T=Ri();k[w>>2]=T.length;var D=0;return T.forEach(Y=>D+=Y.length+1),k[b>>2]=D,0},F2=w=>52;function L2(w,b,T,D,Y){return 70}var V2=[null,[],[]],q2=(w,b)=>{var T=V2[w];b===0||b===10?((w===1?d:g)(nh(T,0)),T.length=0):T.push(b)},U2=(w,b,T,D)=>{for(var Y=0,ee=0;ee<T;ee++){var ie=k[b>>2],oe=k[b+4>>2];b+=8;for(var ge=0;ge<oe;ge++)q2(w,S[ie+ge]);Y+=oe}return k[D>>2]=Y,0},G2=w=>w,ts=w=>w%4===0&&(w%100!==0||w%400===0),Y2=(w,b)=>{for(var T=0,D=0;D<=b;T+=w[D++]);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],K2=(w,b)=>{for(var T=new Date(w.getTime());b>0;){var D=ts(T.getFullYear()),Y=T.getMonth(),ee=(D?oh:sh)[Y];if(b>ee-T.getDate())b-=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()+b),T}return T};function $2(w,b,T){var D=eh(w)+1,Y=new Array(D);return Xf(w,Y,0,Y.length),Y}var Q2=(w,b)=>{C.set(w,b)},W2=(w,b,T,D)=>{var Y=k[D+40>>2],ee={tm_sec:P[D>>2],tm_min:P[D+4>>2],tm_hour:P[D+8>>2],tm_mday:P[D+12>>2],tm_mon:P[D+16>>2],tm_year:P[D+20>>2],tm_wday:P[D+24>>2],tm_yday:P[D+28>>2],tm_isdst:P[D+32>>2],tm_gmtoff:P[D+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 we=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Se=["January","February","March","April","May","June","July","August","September","October","November","December"];function Ve(be,Te,yt){for(var jt=typeof be=="number"?be.toString():be||"";jt.length<Te;)jt=yt[0]+jt;return jt}function ke(be,Te){return Ve(be,Te,"0")}function Ke(be,Te){function yt(Ir){return Ir<0?-1:Ir>0?1:0}var jt;return(jt=yt(be.getFullYear()-Te.getFullYear()))===0&&(jt=yt(be.getMonth()-Te.getMonth()))===0&&(jt=yt(be.getDate()-Te.getDate())),jt}function mt(be){switch(be.getDay()){case 0:return new Date(be.getFullYear()-1,11,29);case 1:return be;case 2:return new Date(be.getFullYear(),0,3);case 3:return new Date(be.getFullYear(),0,2);case 4:return new Date(be.getFullYear(),0,1);case 5:return new Date(be.getFullYear()-1,11,31);case 6:return new Date(be.getFullYear()-1,11,30)}}function Vt(be){var Te=K2(new Date(be.tm_year+1900,0,1),be.tm_yday),yt=new Date(Te.getFullYear(),0,4),jt=new Date(Te.getFullYear()+1,0,4),Ir=mt(yt),rs=mt(jt);return Ke(Ir,Te)<=0?Ke(rs,Te)<=0?Te.getFullYear()+1:Te.getFullYear():Te.getFullYear()-1}var ut={"%a":be=>we[be.tm_wday].substring(0,3),"%A":be=>we[be.tm_wday],"%b":be=>Se[be.tm_mon].substring(0,3),"%B":be=>Se[be.tm_mon],"%C":be=>{var Te=be.tm_year+1900;return ke(Te/100|0,2)},"%d":be=>ke(be.tm_mday,2),"%e":be=>Ve(be.tm_mday,2," "),"%g":be=>Vt(be).toString().substring(2),"%G":Vt,"%H":be=>ke(be.tm_hour,2),"%I":be=>{var Te=be.tm_hour;return Te==0?Te=12:Te>12&&(Te-=12),ke(Te,2)},"%j":be=>ke(be.tm_mday+Y2(ts(be.tm_year+1900)?oh:sh,be.tm_mon-1),3),"%m":be=>ke(be.tm_mon+1,2),"%M":be=>ke(be.tm_min,2),"%n":()=>`
103
- `,"%p":be=>be.tm_hour>=0&&be.tm_hour<12?"AM":"PM","%S":be=>ke(be.tm_sec,2),"%t":()=>" ","%u":be=>be.tm_wday||7,"%U":be=>{var Te=be.tm_yday+7-be.tm_wday;return ke(Math.floor(Te/7),2)},"%V":be=>{var Te=Math.floor((be.tm_yday+7-(be.tm_wday+6)%7)/7);if((be.tm_wday+371-be.tm_yday-2)%7<=2&&Te++,Te){if(Te==53){var yt=(be.tm_wday+371-be.tm_yday)%7;yt!=4&&(yt!=3||!ts(be.tm_year))&&(Te=1)}}else{Te=52;var jt=(be.tm_wday+7-be.tm_yday-1)%7;(jt==4||jt==5&&ts(be.tm_year%400-1))&&Te++}return ke(Te,2)},"%w":be=>be.tm_wday,"%W":be=>{var Te=be.tm_yday+7-(be.tm_wday+6)%7;return ke(Math.floor(Te/7),2)},"%y":be=>(be.tm_year+1900).toString().substring(2),"%Y":be=>be.tm_year+1900,"%z":be=>{var Te=be.tm_gmtoff,yt=Te>=0;return Te=Math.abs(Te)/60,Te=Te/60*100+Te%60,(yt?"+":"-")+("0000"+Te).slice(-4)},"%Z":be=>be.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=$2(ie);return Pt.length>b?0:(Q2(Pt,w),Pt.length-1)},H2=(w,b,T,D,Y)=>W2(w,b,T,D);_t=r.InternalError=class extends Error{constructor(w){super(w),this.name="InternalError"}},Gt(),an=r.BindingError=class extends Error{constructor(w){super(w),this.name="BindingError"}},Dn(),Ge(),_w(),Hf=r.UnboundTypeError=qw(Error,"UnboundTypeError"),Qw();var J2={s:me,u:ue,b:Ie,g:Qe,q:We,K:tt,f:ze,Y:sn,e:fe,ha:Wt,U:en,ba:at,fa:Uw,ea:Yw,w:Kw,aa:Zf,x:Jw,h:zw,O:Xw,P:e2,t:n2,o:r2,ga:i2,N:s2,C:h2,A:p2,ia:g2,ca:m2,E:y2,ka:sc,la:w2,M:S2,Q:T2,R:j2,da:O2,B:N2,$:I2,Z:k2,W:M2,X:_2,_:F2,T:L2,L:U2,F:fx,D:tx,G:dx,m:hx,a:z2,d:rx,p:ex,k:ux,I:cx,v:sx,H:lx,z:gx,S:yx,l:ix,j:nx,c:X2,n:Z2,J:ax,r:px,i:ox,y:mx,ja:G2,V:H2},ht=Z(),Mn=r._free=w=>(Mn=r._free=ht.oa)(w),fc=r._malloc=w=>(fc=r._malloc=ht.pa)(w),ah=w=>(ah=ht.ra)(w),lt=(w,b)=>(lt=ht.sa)(w,b),Bi=w=>(Bi=ht.ta)(w),pt=()=>(pt=ht.ua)(),gt=w=>(gt=ht.va)(w),ch=w=>(ch=ht.wa)(w),lh=w=>(lh=ht.xa)(w),uh=(w,b,T)=>(uh=ht.ya)(w,b,T),dh=w=>(dh=ht.za)(w);r.dynCall_viijii=(w,b,T,D,Y,ee,ie)=>(r.dynCall_viijii=ht.Aa)(w,b,T,D,Y,ee,ie),r.dynCall_jiji=(w,b,T,D,Y)=>(r.dynCall_jiji=ht.Ba)(w,b,T,D,Y);var fh=r.dynCall_jiiii=(w,b,T,D,Y)=>(fh=r.dynCall_jiiii=ht.Ca)(w,b,T,D,Y);r.dynCall_iiiiij=(w,b,T,D,Y,ee,ie)=>(r.dynCall_iiiiij=ht.Da)(w,b,T,D,Y,ee,ie),r.dynCall_iiiiijj=(w,b,T,D,Y,ee,ie,oe,ge)=>(r.dynCall_iiiiijj=ht.Ea)(w,b,T,D,Y,ee,ie,oe,ge),r.dynCall_iiiiiijj=(w,b,T,D,Y,ee,ie,oe,ge,we)=>(r.dynCall_iiiiiijj=ht.Fa)(w,b,T,D,Y,ee,ie,oe,ge,we);function z2(w,b){var T=pt();try{return ft(w)(b)}catch(D){if(gt(T),D!==D+0)throw D;lt(1,0)}}function Z2(w,b,T,D){var Y=pt();try{ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function X2(w,b,T){var D=pt();try{ft(w)(b,T)}catch(Y){if(gt(D),Y!==Y+0)throw Y;lt(1,0)}}function ex(w,b,T,D){var Y=pt();try{return ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function tx(w,b,T,D,Y){var ee=pt();try{return ft(w)(b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function nx(w,b){var T=pt();try{ft(w)(b)}catch(D){if(gt(T),D!==D+0)throw D;lt(1,0)}}function rx(w,b,T){var D=pt();try{return ft(w)(b,T)}catch(Y){if(gt(D),Y!==Y+0)throw Y;lt(1,0)}}function ix(w){var b=pt();try{ft(w)()}catch(T){if(gt(b),T!==T+0)throw T;lt(1,0)}}function ox(w,b,T,D,Y,ee,ie,oe,ge,we,Se){var Ve=pt();try{ft(w)(b,T,D,Y,ee,ie,oe,ge,we,Se)}catch(ke){if(gt(Ve),ke!==ke+0)throw ke;lt(1,0)}}function sx(w,b,T,D,Y,ee,ie){var oe=pt();try{return ft(w)(b,T,D,Y,ee,ie)}catch(ge){if(gt(oe),ge!==ge+0)throw ge;lt(1,0)}}function ax(w,b,T,D,Y){var ee=pt();try{ft(w)(b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function cx(w,b,T,D,Y,ee){var ie=pt();try{return ft(w)(b,T,D,Y,ee)}catch(oe){if(gt(ie),oe!==oe+0)throw oe;lt(1,0)}}function lx(w,b,T,D,Y,ee,ie,oe){var ge=pt();try{return ft(w)(b,T,D,Y,ee,ie,oe)}catch(we){if(gt(ge),we!==we+0)throw we;lt(1,0)}}function ux(w,b,T,D,Y){var ee=pt();try{return ft(w)(b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function dx(w,b,T,D){var Y=pt();try{return ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function fx(w,b,T,D){var Y=pt();try{return ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function hx(w){var b=pt();try{return ft(w)()}catch(T){if(gt(b),T!==T+0)throw T;lt(1,0)}}function px(w,b,T,D,Y,ee,ie,oe){var ge=pt();try{ft(w)(b,T,D,Y,ee,ie,oe)}catch(we){if(gt(ge),we!==we+0)throw we;lt(1,0)}}function gx(w,b,T,D,Y,ee,ie,oe,ge,we,Se,Ve){var ke=pt();try{return ft(w)(b,T,D,Y,ee,ie,oe,ge,we,Se,Ve)}catch(Ke){if(gt(ke),Ke!==Ke+0)throw Ke;lt(1,0)}}function mx(w,b,T,D,Y,ee,ie,oe,ge,we,Se,Ve,ke,Ke,mt,Vt){var ut=pt();try{ft(w)(b,T,D,Y,ee,ie,oe,ge,we,Se,Ve,ke,Ke,mt,Vt)}catch(Pt){if(gt(ut),Pt!==Pt+0)throw Pt;lt(1,0)}}function yx(w,b,T,D,Y){var ee=pt();try{return fh(w,b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}var ns;se=function w(){ns||hh(),ns||(se=w)};function hh(){if(he>0||(V(),he>0))return;function w(){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),w()},1)):w()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return hh(),t.ready}})();function G1(e){return ga(ma,e)}async function Y1(e,t){return q1(ma,e,t)}async function K1(e,t){return U1(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"]],$1=[...ed,["unknown"]].map(e=>e[0]),Eo=new Map(ed);function Q1(e){for(const[t,n]of Eo)if(e===n)return t;return"unknown"}function W1(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 H1(e){try{return e instanceof ImageData}catch{return!1}}function J1(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 ey(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(nd(e)&&!await ty(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ad(e)&&ny(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)&&iy(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=W1(e);if(t===0||n===0)return null;const r=J1(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 z1(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 Z1(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 X1(e){if(cd(e))return await z1(e);if(H1(e)){if(ry(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return id(e)||sd(e)?Z1(e):await ld(e)}async function ey(e){try{return await e.decode(),!0}catch{return!1}}async function ty(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function ny(e){return e.format===null}function ry(e){return e.data.buffer.byteLength===0}function iy(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(),I1(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.`);P1(this,ri,r??[]),G1().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 $1.filter(t=>t!=="unknown")}async detect(t){try{const n=await X1(t);if(n===null)return[];let r;try{cd(n)?r=await Y1(n,{tryHarder:!0,formats:Wu(this,ri).map(i=>Eo.get(i))}):r=await K1(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:Q1(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 oy(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 N.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"},N.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 sy(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 N.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"},N.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"}),N.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 ay(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,s]=N.useState(!1);function a(){s(!0),t?r():n(),setTimeout(()=>s(!1),1e3)}return N.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?N.createElement(oy,{disabled:i,onClick:a}):N.createElement(sy,{disabled:i,onClick:a}))}function cy(e){const{onClick:t,className:n,style:r}=e;return N.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},N.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 ly(e){const{onClick:t,className:n,style:r}=e;return N.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},N.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 uy(e){const{status:t,scanning:n,torchToggle:r}=e;function i(s){r(s)}return n&&r?N.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?N.createElement(ly,{onClick:()=>i(!1)}):N.createElement(cy,{onClick:()=>i(!0)})):null}function dy(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 N.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"},N.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 fy(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 N.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"},N.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 hy(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const s=(n.max-n.min)/3;return N.createElement(N.Fragment,null,N.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},N.createElement(fy,{disabled:i<=n.min,onClick:function(){r(Math.max(i-s,n.min))}})),N.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},N.createElement(dy,{disabled:i>=n.max,onClick:function(){r(Math.min(i+s,n.max))}})))}function py(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 N.createElement("div",{style:{position:"relative"}},N.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&&N.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",N.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),N.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:h,strokeWidth:3}),N.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:h,strokeWidth:3}),N.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:h,strokeWidth:3}),N.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:h,strokeWidth:3})),s&&N.createElement(ay,{scanning:t,startScanning:f,stopScanning:m}),a&&r.torch&&N.createElement(uy,{scanning:t,status:a.status,torchToggle:a.toggle}),l&&r.zoom&&N.createElement(hy,{scanning:t,capabilities:r.zoom,value:l.value,onZoom:l.onChange}))}const gy={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},my={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},yy={width:"100%",height:"100%",position:"relative"},vy={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var by=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=t1(window);switch(e.browser){case"chrome":f1(window,e);break;case"firefox":m1(window,e);break;case"safari":w1(window,e);break;default:throw new Error("Unsupported browser")}});const wy="data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgCh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J8XPgzoAABMTrz8BfQyY9ONGxJULutaa1TE5LHxWEo+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 xy(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=N.useRef(null),E=N.useRef(null),o=N.useRef(null),d=N.useMemo(()=>({...gy,...r}),[r]),g=N.useMemo(()=>({...my,...a}),[a]),[p,y]=N.useState(!1),[x,C]=N.useState(!0),[S,j]=N.useState(d),O=function(){const q=N.useRef(Promise.resolve({type:"stop",data:{}})),K=N.useRef(null),I=N.useRef(null),[V,W]=N.useState({}),[te,X]=N.useState({}),ne=N.useCallback(async(le,L)=>{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");by();const H=await navigator.mediaDevices.getUserMedia({audio:!1,video:L});le.srcObject!==void 0?le.srcObject=H:le.mozSrcObject!==void 0?le.mozSrcObject=H:window.URL.createObjectURL?le.src=window.URL.createObjectURL(H):window.webkitURL?le.src=window.webkitURL.createObjectURL(H):le.src=H.id,await Promise.race([le.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,I.current=A,{type:"start",data:{videoEl:le,stream:H,constraints:L}}},[]),re=N.useCallback(async(le,L)=>{le.src="",le.srcObject=null,le.load();for(const U of L.getTracks())L.removeTrack(U),U.stop();return K.current=null,I.current=null,X({}),{type:"stop",data:{}}},[]),he=N.useCallback(async(le,{constraints:L,restart:U=!1})=>{if(q.current=q.current.then(H=>{if(H.type==="start"){const{data:{videoEl:A,stream:R,constraints:M}}=H;return U||le!==A||L!==M?re(A,R).then(()=>ne(le,L)):H}return ne(le,L)}),(await q.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[ne,re]),se=N.useCallback(async()=>{if(q.current=q.current.then(le=>{if(le.type==="stop")return le;const{data:{videoEl:L,stream:U}}=le;return re(L,U)}),(await q.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[re]),ve=N.useCallback(async le=>{const L=I.current;if(!L)throw new Error("No active video track found.");{le.advanced&&le.advanced[0].zoom&&L.getCapabilities().torch&&await L.applyConstraints({advanced:[{torch:!1}]}),await L.applyConstraints(le);const U=L.getCapabilities(),H=L.getSettings();W(U),X(H)}},[]);return N.useEffect(()=>()=>{(async()=>await se())()},[se]),{capabilities:V,settings:te,startCamera:he,stopCamera:se,updateConstraints:ve}}(),{startScanning:P,stopScanning:k}=function(q){const{videoElementRef:K,onScan:I,onFound:V,retryDelay:W=100,scanDelay:te=0,formats:X=[],audio:ne=!0,allowMultiple:re=!1}=q,he=N.useRef(new ya({formats:X})),se=N.useRef(null),ve=N.useRef(null);N.useEffect(()=>{he.current=new ya({formats:X})},[X]),N.useEffect(()=>{typeof window<"u"&&ne&&(se.current=new Audio(wy))},[ne]);const le=N.useCallback(L=>async U=>{if(K.current!==null&&K.current.readyState>1){const{lastScan:H,contentBefore:A,lastScanHadContent:R}=L;if(U-H<W)ve.current=window.requestAnimationFrame(le(L));else{const M=await he.current.detect(K.current),B=M.some(G=>!A.includes(G.rawValue)),z=M.length>0;let Z=L.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,I(M)),z&&V(M),!z&&R&&V(M);const J={lastScan:U,lastOnScan:Z,lastScanHadContent:z,contentBefore:B?M.map(G=>G.rawValue):A};ve.current=window.requestAnimationFrame(le(J))}}},[K.current,I,V,W]);return{startScanning:N.useCallback(()=>{const L=performance.now(),U={lastScan:L,lastOnScan:L,contentBefore:[],lastScanHadContent:!1};ve.current=window.requestAnimationFrame(le(U))},[le]),stopScanning:N.useCallback(()=>{ve.current!==null&&(window.cancelAnimationFrame(ve.current),ve.current=null)},[])}}({videoElementRef:c,onScan:n,onFound:q=>function(K,I,V,W){const te=V;if(te==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const X=I;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),le=he*ve,L=se*ve,U=le/he,H=L/se,A=(ne-le)/2,R=(re-L)/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:ue,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:ue,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)}}(q,c.current,o.current,g.tracker),formats:i,audio:g.audio,allowMultiple:h,retryDelay:g.tracker===void 0?500:10,scanDelay:v});N.useEffect(()=>(y(!0),()=>{y(!1)}),[]),N.useEffect(()=>{p&&(k(),P())},[a==null?void 0:a.tracker]),N.useEffect(()=>{if(!gd(d,S)){const q=d;r!=null&&r.deviceId&&delete q.facingMode,j(q)}},[r]);const _=N.useMemo(()=>({constraints:S,shouldStream:p&&!s}),[S,p,s]),$=async()=>{const q=c.current;if(q==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 I=K.getContext("2d");if(I==null)throw new Error("Canvas should be defined when component is mounted.");if(_.shouldStream){await O.stopCamera(),C(!1);try{await O.startCamera(q,_),q?C(!0):await O.stopCamera()}catch(V){console.error("error",V)}}else K.width=q.videoWidth,K.height=q.videoHeight,I.drawImage(q,0,0,q.videoWidth,q.videoHeight),await O.stopCamera(),C(!1)};N.useEffect(()=>{(async()=>await $())()},[_]);const Q=N.useMemo(()=>_.shouldStream&&x,[_.shouldStream,x]);return N.useEffect(()=>{if(Q){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()}},[Q]),N.createElement("div",{style:{...yy,...f==null?void 0:f.container},className:m==null?void 0:m.container},N.createElement("video",{ref:c,style:{...vy,...f==null?void 0:f.video,visibility:s?"hidden":"visible"},className:m==null?void 0:m.video,autoPlay:!0,muted:!0,playsInline:!0}),N.createElement("canvas",{ref:E,style:{display:s?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),N.createElement("canvas",{ref:o,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),N.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},g.finder&&N.createElement(py,{scanning:x,capabilities:O.capabilities,loading:!1,onOff:g.onOff,zoom:g.zoom&&O.settings.zoom?{value:O.settings.zoom,onChange:async q=>{const K={...S,advanced:[{zoom:q}]};await O.updateConstraints(K)}}:void 0,torch:g.torch?{status:(t=O.settings.torch)!==null&&t!==void 0&&t,toggle:async q=>{const K={...S,advanced:[{torch:q}]};await O.updateConstraints(K)}}:void 0,startScanning:async()=>await $(),stopScanning:async()=>{await O.stopCamera(),Co(o.current),C(!1)},border:f==null?void 0:f.finderBorder}),l))}function Ey(){const[e,t]=N.useState([]);return N.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=Ey(),i=s=>{e(s[0].rawValue)};return u.jsxs("div",{children:[!!r.length&&u.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[u.jsx(Ay,{onScan:i}),u.jsx("hr",{})]}),u.jsx(yo,{label:n,autoFocus:!0,placeholder:"CDE2341S",onChange:s=>{t&&t(!0),e(s.target.value)}})]})}const Cy="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 Ay({onScan:e}){const[t,n]=N.useState("user");return u.jsxs("div",{className:"relative w-full",children:[u.jsx(xy,{components:{finder:!1},onScan:e,constraints:{facingMode:t},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-380px)] 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:Cy,alt:"camera-switch"})})]})}function Sy({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 Ty({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 jy(e){const t=N.useRef(null),[n,r]=N.useState(!1),[i,s]=N.useState(e.value??"");Du(t,r);const a=(f,m)=>{s(f),r(!1),e.onChange&&e.onChange(m)},l=N.Children.map(e.children,f=>{if(N.isValidElement(f)){if(f.type===va)return u.jsx("div",{onClick:()=>a(f.props.label,f.props.value),children:f});if(f.type===Ty){const m=N.Children.map(f.props.children,h=>{if(N.isValidElement(h)&&h.type===va)return u.jsx("div",{onClick:()=>a(h.props.label,h.props.value),children:h})});return N.cloneElement(f,{},...m)}}});return u.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{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(Sy,{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(kt.Helper,{helperText:e.helperText})]})}function Oy(){return u.jsxs("div",{children:[u.jsx("div",{className:"flex animate-pulse justify-end space-y-4",children:u.jsx("div",{className:"h-8 w-32 rounded bg-gray-100"})},"skeleton-item-"),u.jsx("div",{className:"my-6 h-px w-full bg-gray-100"}),u.jsx("div",{className:"space-y-4",children:u.jsx("div",{className:"animate-pulse space-y-4",children:u.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"})]})},"skeleton-item-")})]})}var Ny=Object.defineProperty,Iy=(e,t)=>{for(var n in t)Ny(e,n,{get:t[n],enumerable:!0})},hn={};Iy(hn,{assign:()=>ky,colors:()=>Jn,createStringInterpolator:()=>ja,skipAnimation:()=>Ed,to:()=>xd,willAdvance:()=>Oa});var ba=si(),Re=e=>oi(e,ba),wa=si();Re.write=e=>oi(e,wa);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 Er=[];Re.setTimeout=(e,t)=>{const n=Re.now()+t,r=()=>{const s=Er.findIndex(a=>a.cancel==r);~s&&Er.splice(s,1),Hn-=~s?1:0},i={time:n,handler:e,cancel:r};return Er.splice(md(n),0,i),Hn+=1,yd(),i};var md=e=>~(~Er.findIndex(t=>t.time>e)||~Er.length);Re.cancel=e=>{So.delete(e),xa.delete(e),Ea.delete(e),ba.delete(e),wa.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"):bd()};var Wn=-1,Hn=0,Aa=!1;function oi(e,t){Aa?(t.delete(e),e(0)):(t.add(e),yd())}function yd(){Wn<0&&(Wn=0,Re.frameLoop!=="demand"&&Ca(vd))}function Py(){Wn=-1}function vd(){~Wn&&(Ca(vd),Re.batchedUpdates(bd))}function bd(){const e=Wn;Wn=Re.now();const t=md(Wn);if(t&&(wd(Er.splice(0,t),n=>n.handler()),Hn-=t),!Hn){Py();return}So.flush(),ba.flush(e?Math.min(64,Wn-e):16.667),xa.flush(),wa.flush(),Ea.flush()}function si(){let e=new Set,t=e;return{add(n){Hn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Hn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Hn-=t.size,wd(t,r=>r(n)&&e.add(r)),Hn+=e.size,t=e)}}}function wd(e,t){e.forEach(n=>{try{t(n)}catch(r){Re.catch(r)}})}function Sa(){}var Dy=(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 In(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,Jn=null,Ed=!1,Oa=Sa,ky=e=>{e.to&&(xd=e.to),e.now&&(Re.now=e.now),e.colors!==void 0&&(Jn=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=[],Na=[],To=0,jo={get idle(){return!li.size&&!rn.length},start(e){To>e.priority?(li.add(e),Re.onStart(Ry)):(Cd(e),Re(Ia))},advance:Ia,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 Ry(){li.forEach(Cd),li.clear(),Re(Ia)}function Cd(e){rn.includes(e)||Ad(e)}function Ad(e){rn.splice(By(rn,t=>t.priority>e.priority),0,e)}function Ia(e){const t=Na;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,Na=rn,Na.length=0,rn=t,rn.length>0}function By(e,t){const n=e.findIndex(t);return n<0?e.length:n}var My=(e,t,n)=>Math.min(Math.max(n,e),t),_y={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 No(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Fy=new RegExp("rgb"+No(pn,pn,pn)),Ly=new RegExp("rgba"+No(pn,pn,pn,pn)),Vy=new RegExp("hsl"+No(pn,Oo,Oo)),qy=new RegExp("hsla"+No(pn,Oo,Oo,pn)),Uy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Gy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yy=/^#([0-9a-fA-F]{6})$/,Ky=/^#([0-9a-fA-F]{8})$/;function $y(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Yy.exec(e))?parseInt(t[1]+"ff",16)>>>0:Jn&&Jn[e]!==void 0?Jn[e]:(t=Fy.exec(e))?(Cr(t[1])<<24|Cr(t[2])<<16|Cr(t[3])<<8|255)>>>0:(t=Ly.exec(e))?(Cr(t[1])<<24|Cr(t[2])<<16|Cr(t[3])<<8|jd(t[4]))>>>0:(t=Uy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ky.exec(e))?parseInt(t[1],16)>>>0:(t=Gy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Vy.exec(e))?(Sd(Td(t[1]),Io(t[2]),Io(t[3]))|255)>>>0:(t=qy.exec(e))?(Sd(Td(t[1]),Io(t[2]),Io(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 Cr(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 Io(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Od(e){let t=$y(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=Wy(m,s);return Qy(m,s[h],s[h+1],i[h],i[h+1],f,a,l,r.map)}};function Qy(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 Wy(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Hy=(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 My(0,1,i/e)},Po=1.70158,Do=Po*1.525,Nd=Po+1,Id=2*Math.PI/3,Pd=2*Math.PI/4.5,ko=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,Jy={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=>Nd*e*e*e-Po*e*e,easeOutBack:e=>1+Nd*Math.pow(e-1,3)+Po*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Do+1)*2*e-Do)/2:(Math.pow(2*e-2,2)*((Do+1)*(e*2-2)+Do)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Id),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Id)+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-ko(1-e),easeOutBounce:ko,easeInOutBounce:e=>e<.5?(1-ko(1-2*e))/2:(1+ko(2*e-1))/2,steps:Hy},di=Symbol.for("FluidValue.get"),Ar=Symbol.for("FluidValue.observers"),on=e=>!!(e&&e[di]),Qt=e=>e&&e[di]?e[di]():e,Dd=e=>e[Ar]||null;function zy(e,t){e.eventObserved?e.eventObserved(t):e(t)}function fi(e,t){const n=e[Ar];n&&n.forEach(r=>{zy(r,t)})}var kd=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Zy(this,e)}},Zy=(e,t)=>Rd(e,di,t);function Sr(e,t){if(e[di]){let n=e[Ar];n||Rd(e,Ar,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[Ar];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ar]=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,Xy=/(#(?:[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"),ev=/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]=tv(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},tv=e=>{const t=Bo.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Da,nv=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,_d=e=>{Da||(Da=Jn?new RegExp(`(${Object.keys(Jn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>Qt(s).replace(Bo,Md).replace(Xy,Od).replace(Da,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(ev,nv)}},ka="react-spring: ",Fd=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${ka}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},rv=Fd(console.warn);function iv(){rv(`${ka}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ov=Fd(console.warn);function sv(){ov(`${ka}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(Jn||{}))}var Ra=Ta()?N.useEffect:N.useLayoutEffect,av=()=>{const e=N.useRef(!1);return Ra(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ld(){const e=N.useState()[1],t=av();return()=>{t.current&&e(Math.random())}}function cv(e,t){const[n]=N.useState(()=>({inputs:t,result:e()})),r=N.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&lv(t,s.inputs)||(s={inputs:t,result:e()}):s=n,N.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function lv(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=>N.useEffect(e,uv),uv=[];function qd(e){const t=N.useRef();return N.useEffect(()=>{t.current=e}),t.current}var pi=Symbol.for("Animated:node"),dv=e=>!!e&&e[pi]===e,Sn=e=>e&&e[pi],Ba=(e,t)=>Dy(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()}},Fo={dependencies:null},Lo=class extends Ud{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return An(this.source,(n,r)=>{dv(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){Fo.dependencies&&on(e)&&Fo.dependencies.add(e);const t=_o(e);t&&Ye(t,n=>this.add(n))}},Gd=class extends Lo{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(fv)),!0)}};function fv(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 N.forwardRef((r,i)=>{const s=N.useRef(null),a=n&&N.useCallback(o=>{s.current=gv(i,o)},[i]),[l,f]=pv(r,t),m=Ld(),h=()=>{const o=s.current;if(n&&!o)return;(o?t.applyAnimatedValues(o,l.getValue(!0)):!1)===!1&&m()},v=new hv(h,f),c=N.useRef();Ra(()=>(c.current=v,Ye(f,o=>Sr(o,v)),()=>{c.current&&(Ye(c.current.deps,o=>hi(o,c.current)),Re.cancel(c.current.update))})),N.useEffect(h,[]),Vd(()=>()=>{const o=c.current;Ye(o.deps,d=>hi(d,o))});const E=t.getComponentProps(l.getValue());return de.createElement(e,{...E,ref:a})})},hv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Re.write(this.update)}};function pv(e,t){const n=new Set;return Fo.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Lo(e),Fo.dependencies=null,[e,n]}function gv(e,t){return e&&(xe.fun(e)?e(t):e.current=t),t}var Kd=Symbol.for("AnimatedComponent"),mv=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Lo(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,yv=e=>e,_a=(e,t=yv)=>{let n=vv;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},vv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],bv={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 wv(e){const t={};let n=0;if(An(e,(r,i)=>{bv[i]||(t[i]=r,n++)}),n)return t}function Hd(e){const t=wv(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 xv(e){for(const t in e)return!0;return!1}function Fa(e){return xe.fun(e)||xe.arr(e)&&xe.obj(e[0])}function Ev(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Cv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Av={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}},La={...Av.default,mass:1,damping:1,easing:Jy.linear,clamp:!1},Sv=class{constructor(){this.velocity=0,Object.assign(this,La)}};function Tv(e,t,n){n&&(n={...n},Jd(n,t),t={...n,...t}),Jd(e,t),Object.assign(e,t);for(const a in La)e[a]==null&&(e[a]=La[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=[],jv=class{constructor(){this.changed=!1,this.values=zd,this.toValues=null,this.fromValues=zd,this.config=new Sv,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)?Tr(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}),Tr=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)&&Tr(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 bi(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,O)=>{xe.und(C[O])&&(C[O]=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 bi(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 bi(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,Ov=1,Ua=class extends kd{constructor(){super(...arguments),this.id=Ov++,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 iv(),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,wi=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,Nv=class extends Ua{constructor(e,t){if(super(),this.animation=new jv,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)||wi(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 wi(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 O,P=!1;const k=1,_=Math.ceil(e/k);for(let $=0;$<_&&(O=Math.abs(p)>x,!(!O&&(c=Math.abs(v-E)<=y,c)));++$){S&&(P=E==v||E>v==j,P&&(p=-p*C,E=v));const Q=-s.tension*1e-6*(E-v),q=-s.friction*.001*p,K=(Q+q)/s.mass;p=p+K*k,E=E+p*k}}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()),bi(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||Fa(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:()=>{wi(this)||(sf(this,!0),ci(s.pauseQueue),Ci(this,"onPause",gn(this,xi(this,this.animation.to)),this))},resume:()=>{wi(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(Tr(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(Tr(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=!In(v,m);c&&(l.from=v),v=Qt(v);const E=!In(h,f);E&&this._focus(h);const o=Fa(t.to),{config:d}=l,{decay:g,velocity:p}=d;(r||i)&&(d.velocity=0),t.config&&!o&&Tv(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),O=!o&&(!j||yi(a.immediate||t.immediate,s));if(E){const $=Ma(h);if($!==y.constructor)if(O)y=this._set(S);else throw Error(`Cannot animate between ${y.constructor.name} and ${$.name}, as the "to" prop suggests`)}const P=y.constructor;let k=on(h),_=!1;if(!k){const $=x||!Ka(this)&&c;(E||$)&&(_=In(vi(C),S),k=!_),(!In(l.immediate,O)&&!O||!In(d.decay,g)||!In(d.velocity,p))&&(k=!0)}if(_&&zn(this)&&(l.changed&&!x?k=!0:k||this._stop(f)),!o&&((k||on(f))&&(l.values=y.getPayload(),l.toValues=on(h)?null:P==mi?[1]:Xt(S)),l.immediate!=O&&(l.immediate=O,!O&&!x&&this._set(f)),k)){const{onRest:$}=l;Ye(Pv,q=>lf(this,t,q));const Q=gn(this,xi(this,f));ci(this._pendingCalls,Q),this._pendingCalls.add(n),l.changed&&Re.batchedUpdates(()=>{var q;l.changed=!x,$==null||$(Q,this),x?or(a.onRest,Q):(q=l.onStart)==null||q.call(l,Q,this)})}x&&this._set(C),o?n(ef(t.to,t,this._state,this)):k?this._start():zn(this)&&!E?this._pendingCalls.add(n):n(Xd(C))}_focus(e){const t=this.animation;e!==t.to&&(Dd(this)&&this._detach(),t.to=e,Dd(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;on(t)&&(Sr(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||!In(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),wi(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?Tr(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 In(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||Fa(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 Iv(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 Pv=["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 Dv=["onStart","onChange","onRest"],kv=1,Rv=class{constructor(e,t){this.id=kv++,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 bi(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(Dv,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?(bi(v,e._lastAsyncId),g(Tr(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,Sr(n,e))})}function hf(e,t){const n=new Nv;return n.key=e,t&&Sr(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=N.useContext(qo),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=cv(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=qo;return de.createElement(s,{value:t},e)},qo=Bv(Vo,{});Vo.Provider=qo.Provider,Vo.Consumer=qo.Consumer;function Bv(e,t){return Object.assign(e,de.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Mv=()=>{const e=[],t=function(r){sv();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 _v(e,t,n){const r=xe.fun(t)&&t;r&&!n&&(n=[]);const i=N.useMemo(()=>r||arguments.length==3?Mv():void 0,[]),s=N.useRef(0),a=Ld(),l=N.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=N.useRef([...l.ctrls]),m=[],h=qd(e)||0;N.useMemo(()=>{Ye(f.current.slice(e,h),p=>{Ev(p,i),p.stop(!0)}),f.current.length=e,v(h,e)},[e]),N.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 Rv(null,l.flush)),S=r?r(x,C):t[x];S&&(m[x]=Iv(S))}}const c=f.current.map((p,y)=>df(p,m[y])),E=N.useContext(Vo),o=qd(E),d=E!==o&&xv(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&&(Cv(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 Fv(e,t){const n=xe.fun(e),[[r],i]=_v(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var Lv=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();In(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)&&Sr(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 Vv(e){return e.idle!==!1}function mf(e){return!e.size||Array.from(e).every(Vv)}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 Lv(e,t)});var yf=/^--/;function qv(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 Uv(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=qv(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},Gv=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Yv=["Webkit","Ms","Moz","O"];Ai=Object.keys(Ai).reduce((e,t)=>(Yv.forEach(n=>e[Gv(n,t)]=e[t]),e),Ai);var Kv=/^(matrix|translate|scale|rotate|skew)/,$v=/^(translate)/,Qv=/^(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,Wv=class extends Lo{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(Kv.test(l)){if(delete r[l],xe.und(a))return;const f=$v.test(l)?"px":Qv.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 Hv(i,s)),super(r)}},Hv=class extends kd{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)&&Sr(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)}},Jv=["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:Xn.unstable_batchedUpdates,createStringInterpolator:_d,colors:_y});var zv=mv(Jv,{applyAnimatedValues:Uv,createAnimatedStyle:e=>new Wv(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Zv=zv.animated;function Go(e){const{rows:t}=e,n=Fv({from:{opacity:0},to:{opacity:1}});return u.jsxs(Zv.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 bf({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const i=N.useRef(null),[s,a]=N.useState(0),[l,f]=N.useState(r),m=l&&N.Children.count(e)>n?n:N.Children.count(e);N.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:N.Children.map(N.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 Xv=br("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),eb=br("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),tb=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:i="md"})=>{const s=t,[a,l]=N.useState(r),[f,m]=N.useState(!1),h=()=>{s||(l(!a),n&&n())},v=()=>{t||m(!0)},c=()=>{m(!1)},E=Dt("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},eb({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:Dt(Xv({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=N.useId(),E=e??c;return u.jsxs("div",{className:`flex ${i?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[u.jsx(tb,{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(kt,{className:Dt("font-normal"),description:r,required:m,tooltip:h,htmlFor:E,disabled:s,children:f}),u.jsx(kt.Helper,{disabled:s,helperText:a})]})]})};Yo.displayName="Switch";const wf=N.createContext(null);function nb(e=!1){const t=N.useContext(wf);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const xf=N.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=N.useId(),c=a??v,E=l??r??m??s?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(kt,{className:"cursor-default",description:r,required:f,tooltip:m,htmlFor:c,disabled:i,children:l}),u.jsx(kt.Helper,{disabled:i,helperText:s})]}):null;return u.jsx(wf.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:Dt("flex flex-col gap-2"),children:n}):null]})})});xf.displayName="SwitchGroup",Object.assign(xf,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=nb(),{disabled:i,size:s,toggleLeft:a}=r??{};return u.jsx(Yo,{toggleLeft:a,disabled:e??i,label:t,defaultChecked:n,size:s})}});const rb=({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}),ib=({id:e,label:t,icon:n,pathname:r,activeTab:i,setActiveTab:s})=>u.jsx(Dc,{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(St,{icon:n,className:"mr-2",variant:i===e?"discovery":"secondary"}),t]})});function Ef(){const{t:e}=$e(),[t,n]=N.useState(""),[r,i]=N.useState(!1),{session:s}=nt(),a=Et(),[l,f]=N.useState(!1),m=N.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 N.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("scanGiftcard")})})}),u.jsx(wt,{children:u.jsx(Ao,{dataSetter:n,setDefer:f,label:e("hash")})}),u.jsx(Ot,{children:u.jsx(it,{label:e("submit"),className:"w-full",onClick:m,disabled:!t||r})})]})})}function ob(){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]=N.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(ti,{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===Ln.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(Ct,{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(wt,{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(Yn,{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(Yn,{value:h+d(),start:h,currency:s.currency,asCurrency:!0})})]})})]})}),g()&&u.jsx(Ot,{children:u.jsx(it,{label:"",className:"w-full",...g()})})]})})}function sb(){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(ti,{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 ab(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/redeem/:hash",element:u.jsx(ob,{})})]})}function cb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/top-up/:hash",element:u.jsx(sb,{})})]})}function lb({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(St,{icon:"home"}),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(St,{icon:"home"}),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(St,{icon:"home"}),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(St,{icon:"home"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:new Date(e.current_display_values.birthdate).toLocaleDateString(At.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===ir.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 ub({contact:e}){const t=Et(),{t:n}=$e();return u.jsxs("div",{className:"flex flex-col gap-4 py-4 lg:flex-row lg:items-center lg:justify-between",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(At.language,{month:"long",year:"numeric"})]})]})]}),u.jsxs("div",{className:"flex flex-col items-start gap-2 lg:flex-row",children:[u.jsx(it,{className:"w-full lg:w-fit",label:n("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>t("contact-identifiers")}),u.jsx(it,{className:"w-full lg:w-fit",before:u.jsx(St,{icon:"edit"}),label:n("editProfile"),variant:"secondary",size:"md",onClick:()=>t("contact-attributes")})]})]})}function db(){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(Ct,{children:[u.jsx(xt,{children:u.jsx(ub,{contact:e})}),u.jsx(wt,{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(lb,{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(it,{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.map(f=>u.jsx(Af,{subscription:f},f.subscription_type.uuid))})]}),u.jsx(it,{label:i("changeSubscriptions"),before:u.jsx(St,{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(it,{label:e,variant:"link-gray",before:u.jsx(St,{icon:"caret-left",size:"md"}),onClick:()=>n(t)})})}function fb(){const{t:e}=$e(),{loyaltyTransactions:t}=fo(),{contact:n}=xn();return u.jsx("div",{className:"h-full md:container",children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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 hb(){const{t:e}=$e(),{subscriptions:t,mutate:n}=su(),[r,i]=N.useState({}),[s,a]=N.useState(!1);N.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(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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!==ir.FUNCTIONAL).map(h=>u.jsx(Af,{subscription:h,onChange:l,editable:!0},h.subscription_type.uuid))]})})}),u.jsx(Ot,{children:u.jsx(it,{label:e("saveChanges"),className:"w-full",onClick:f,disabled:!m()||s})})]})})}function pb({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(St,{className:"h-full",icon:"close"})})]})}function gb(){const{t:e}=$e(),t=Et(),{identifiers:n,isLoading:r,mutate:i}=Zl(),s=async a=>{await f0.clear({value:a}),await i()};return u.jsx("div",{className:"h-full md:container",children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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(a=>u.jsx(pb,{identifier:a,onClear:s},a.value))]})})}),u.jsx(Ot,{children:u.jsx(it,{label:e("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>t("create")})})]})})}function mb(){const{t:e}=$e(),{contact:t}=xn(),{mutate:n}=Zl(),r=Et(),[i,s]=N.useState(""),[a,l]=N.useState(!1),[f,m]=N.useState(!1),h=async()=>{l(!0),await rr.linkIdentifier(i,t.email),await n(),s(""),l(!1),r("/portal/profile/contact-identifiers")};return N.useEffect(()=>{i&&!a&&!f&&h().then()},[i,a,f,h]),u.jsx("div",{className:"h-full md:container",children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{children:u.jsx(Ao,{dataSetter:s,setDefer:m,label:e("contactIdentifier")})}),u.jsx(Ot,{children:u.jsx(it,{label:e("addIdentifier"),className:"w-full",onClick:h,disabled:a})})]})})}function yb(){const{t:e}=$e(),{contact:t,isLoading:n,mutate:r}=xn(),[i,s]=N.useState(),[a,l]=N.useState();N.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(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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(jy,{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(X0,{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(it,{label:e("saveChanges"),className:"w-full",onClick:h,disabled:!a})})]})})}function vb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/profile",element:u.jsx(mn,{element:u.jsx(db,{})})}),u.jsx(Oe,{path:"/profile/activity",element:u.jsx(mn,{element:u.jsx(fb,{})})}),u.jsx(Oe,{path:"/profile/subscriptions",element:u.jsx(mn,{element:u.jsx(hb,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers",element:u.jsx(mn,{element:u.jsx(gb,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers/create",element:u.jsx(mn,{element:u.jsx(mb,{})})}),u.jsx(Oe,{path:"/profile/contact-attributes",element:u.jsx(mn,{element:u.jsx(yb,{})})})]})}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 bb(){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]=N.useState(),[h,v]=N.useState(!1);N.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===Ln.VOUCHER_REDEEMED);return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("vouchers")})})}),u.jsx(wt,{children:n?u.jsx(Go,{rows:2}):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(bf,{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(ni,{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(e1,{value:m,max:e.required_credits})]})}function wb(){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]=N.useState(),[o,d]=N.useState(!1);N.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(O=>O.type===Ln.REWARD_RECEPTION&&O.data.reward.uuid===c.uuid),{data:{uuid:j}}=S.reduce((O,P)=>new Date(O.created_at)>new Date(P.created_at)?O: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===Ln.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(Ct,{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(wt,{children:n||v?u.jsx(Go,{rows:2}):u.jsxs("div",{className:"flex flex-col gap-1 overflow-auto 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(bf,{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(ni,{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 xb({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 Eb(){const e=Et(),{t}=$e(),{pathname:n}=Jt(),[r,i]=N.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 N.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(rb,{children:s.map(a=>u.jsx(ib,{id:a.id,label:a.label,icon:a.icon,activeTab:r,setActiveTab:i,pathname:a.pathname},a.id))}),u.jsxs(xb,{children:[u.jsx(vb,{}),u.jsxs(vn,{children:[u.jsx(Oe,{path:"/rewards",element:u.jsx(mn,{element:u.jsx(wb,{})})}),u.jsx(Oe,{path:"/vouchers",element:u.jsx(mn,{element:u.jsx(bb,{})})})]})]})]})}function Cb(){const e=Et(),{session:t}=nt();return N.useEffect(()=>{t&&!t.contact&&e("identifier")},[]),t&&u.jsx(Eb,{})}function Ab(){return u.jsx(Mt,{children:u.jsx(bo,{state:{redirectRoute:`${qt.PORTAL}`}})})}function ji(){const{state:e}=Jt(),[t,n]=N.useState(""),{session:r,mutate:i}=nt(),s=Et(),{t:a}=$e(),[l,f]=N.useState(!1),[m,h]=N.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})})})}),u.jsx(wt,{children:u.jsx(vo,{label:a("emailAddress"),onChange:c=>n(c.target.value)})}),u.jsx(Ot,{children:u.jsx(it,{label:a("continue"),className:"w-full",onClick:v,disabled:!t||l})})]})}),u.jsx(ni,{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 Sb(){const[e,t]=N.useState(""),{session:n,mutate:r}=nt(),i=Et(),{t:s}=$e(),a=async()=>{n&&(await rr.create(e),await r(),qe.success(s("contactSavedToSession")),i("../"))};return u.jsx(Mt,{children:u.jsxs(Ct,{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(wt,{children:u.jsx(vo,{label:s("emailAddress"),onChange:l=>t(l.target.value)})}),u.jsx(Ot,{children:u.jsx(it,{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]=N.useState(!1),[f,m]=N.useState([]),[h,v]=N.useState({}),[c,E]=N.useState(!1);N.useEffect(()=>{f.length||ca.get().then(g=>{const p=g.data.data.filter(x=>x.strategy!==ir.FUNCTIONAL);m(p);const y=p.reduce((x,C)=>({...x,[C.name]:C.strategy===ir.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 rr.create(e.email),await ca.update({values:h}),e.contactIdentifier&&await rr.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(Vr,{to:"../../"}):u.jsx(Mt,{children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:t("termsAndConditions")})})}),u.jsx(wt,{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===ir.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(it,{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]=N.useState(!1),[f,m]=N.useState(""),[h,v]=N.useState(!1);if(!t||!t.contactIdentifier)return u.jsx(Vr,{to:"../"});const c=async()=>{l(!0);try{await rr.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:e("linkContact")})}),u.jsx(wt,{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(it,{label:e("continue"),className:"w-full",onClick:c,disabled:!f||a})})]}),u.jsx(ni,{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 Tb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(Cb,{})}),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(Sb,{})}),u.jsx(Oe,{path:"/identifier",element:u.jsx(Ab,{})}),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 jb(){return u.jsx(Mt,{children:u.jsx(bo,{state:{redirectRoute:`${qt.POINTS_TRANSACTION}/transaction`}})})}function Ob(){const{t:e}=$e(),{session:{input_data:t}}=nt(),{contact:n,isLoading:r,mutate:i}=xn(),[s,a]=N.useState(),[l,f]=N.useState(!1),[m,h]=N.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 N.useEffect(()=>{!l&&!s&&!m&&(async()=>await v())()},[]),r?u.jsx(u.Fragment,{}):n?u.jsx(Mt,{children:u.jsxs(Ct,{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(wt,{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(Yn,{value:s.credits,start:0})]}):u.jsx("div",{className:"text-core-primary-500",children:u.jsx(ti,{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(Yn,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(s?s.credits:0)})]})})]})})]})}):u.jsx(Vr,{to:"../"})}function Nb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(jb,{})}),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(Ob,{})})})]})}function Sf(){const{session:e}=nt();return u.jsx(Mt,{children:u.jsx(bo,{state:{redirectRoute:e.type===zt.TOP_UP_PREPAID?`${qt.TOP_UP_PREPAID}/top-up`:`${qt.PAY_PREPAID}/pay`}})})}function Ib(){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 Pb(){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===Ln.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(Ct,{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(wt,{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(Yn,{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(Yn,{value:v(),start:f,currency:s,asCurrency:!0})})]})})]})}),u.jsx(Ot,{children:u.jsx(it,{label:e("confirmAndPay",{amount:vr(v(),s)}),className:"w-full",onClick:m,disabled:!f||!v()})})]})})}function Db(){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(Pb,{})})})]})}function kb(){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(Ib,{})})})]})}function Rb(){const{t:e}=$e(),[t,n]=N.useState(""),[r,i]=N.useState(!1),[s,a]=N.useState(!1),[l,f]=N.useState(!1),[m,h]=N.useState(),{session:v}=nt(),c=Et(),E=N.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 N.useEffect(()=>{t&&!r&&!s&&E().then()},[t,r,s,E]),u.jsxs(u.Fragment,{children:[u.jsx(Mt,{children:u.jsxs(Ct,{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(wt,{children:u.jsx(Ao,{dataSetter:n,setDefer:a,label:e("code")})}),u.jsx(Ot,{children:u.jsx(it,{label:e("submit"),className:"w-full",onClick:E})})]})}),u.jsx(ni,{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.jsxs("p",{children:["Link voucher ",u.jsx("b",{children:t})," to a contact to be able to redeem it."]})})]})}function Bb(){const{state:e}=Jt(),t=Et(),{t:n}=$e(),{session:r,mutate:i}=nt(),{onRedeemVoucher:s}=En(),[a,l]=N.useState(e.voucher);if(!a)return u.jsx(u.Fragment,{});const f=N.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:"Voucher"})})}),u.jsx(wt,{children:u.jsx("div",{children:u.jsx(Ha,{voucher:a,setSelected:()=>{}})})}),u.jsx(Ot,{children:u.jsx(it,{label:n("redeemVoucher"),className:"w-full",onClick:f,disabled:a.status!==yr.ACTIVE})})]})})}function Mb(){const{state:{voucher:e}}=Jt();return u.jsx(Mt,{children:u.jsx(bo,{state:{voucher:e,redirectRoute:`${qt.VOUCHER}/redeem`}})})}function _b(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Rb,{})}),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(Mb,{})}),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(Bb,{})})]})}const Fb="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 Lb(){const e=Et(),{t}=$e(),n=En();return N.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:Fb,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(it,{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 Vb(){const e=Et(),{t}=$e(),{sessionUuid:n}=En(),{session:r,isLoading:i,mutate:s}=nt();return N.useEffect(()=>{if(!i&&r){const a=r.type in qt?`/${r.type.replaceAll("_","-").toLowerCase()}`:"/";e(a)}},[i,s,e,r]),i?u.jsx(Oy,{}):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(Lb,{})}),u.jsx(Oe,{path:":portalSessionUuid",element:u.jsx(Vb,{})}),u.jsx(Oe,{path:`${qt.REDEEM_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.REDEEM_GIFTCARD,element:u.jsx(ab,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.TOP_UP_GIFTCARD,element:u.jsx(cb,{})})}),u.jsx(Oe,{path:`${qt.PORTAL}/*`,element:u.jsx(ar,{type:zt.PORTAL,element:u.jsx(Tb,{})})}),u.jsx(Oe,{path:`${qt.PAY_PREPAID}/*`,element:u.jsx(ar,{type:zt.PAY_PREPAID,element:u.jsx(Db,{})})}),u.jsx(Oe,{path:`${qt.POINTS_TRANSACTION}/*`,element:u.jsx(ar,{type:zt.POINTS_TRANSACTION,element:u.jsx(Nb,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_PREPAID}/*`,element:u.jsx(ar,{type:zt.TOP_UP_PREPAID,element:u.jsx(kb,{})})}),u.jsx(Oe,{path:`${qt.VOUCHER}/*`,element:u.jsx(ar,{type:zt.VOUCHER,element:u.jsx(_b,{})})})]})}function mn({element:e}){const{session:t}=nt();return t.contact?e:u.jsx(Vr,{to:"/"})}function ar({type:e,element:t}){const{session:n}=nt();if(n)return e===n.type?t:u.jsx(Vr,{to:"/"})}function qb(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}=qb(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 Nf(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":za(XMLHttpRequest))==="object"}function Ub(e){return!!e&&typeof e.then=="function"}function Gb(e){return Ub(e)?e:Promise.resolve(e)}function Yb(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:{}},If;function Kb(){return If||(If=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(I){return I&&DataView.prototype.isPrototypeOf(I)}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(I){return I&&h.indexOf(Object.prototype.toString.call(I))>-1};function c(I){if(typeof I!="string"&&(I=String(I)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(I)||I==="")throw new TypeError('Invalid character in header field name: "'+I+'"');return I.toLowerCase()}function E(I){return typeof I!="string"&&(I=String(I)),I}function o(I){var V={next:function(){var W=I.shift();return{done:W===void 0,value:W}}};return f.iterable&&(V[Symbol.iterator]=function(){return V}),V}function d(I){this.map={},I instanceof d?I.forEach(function(V,W){this.append(W,V)},this):Array.isArray(I)?I.forEach(function(V){this.append(V[0],V[1])},this):I&&Object.getOwnPropertyNames(I).forEach(function(V){this.append(V,I[V])},this)}d.prototype.append=function(I,V){I=c(I),V=E(V);var W=this.map[I];this.map[I]=W?W+", "+V:V},d.prototype.delete=function(I){delete this.map[c(I)]},d.prototype.get=function(I){return I=c(I),this.has(I)?this.map[I]:null},d.prototype.has=function(I){return this.map.hasOwnProperty(c(I))},d.prototype.set=function(I,V){this.map[c(I)]=E(V)},d.prototype.forEach=function(I,V){for(var W in this.map)this.map.hasOwnProperty(W)&&I.call(V,this.map[W],W,this)},d.prototype.keys=function(){var I=[];return this.forEach(function(V,W){I.push(W)}),o(I)},d.prototype.values=function(){var I=[];return this.forEach(function(V){I.push(V)}),o(I)},d.prototype.entries=function(){var I=[];return this.forEach(function(V,W){I.push([W,V])}),o(I)},f.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function g(I){if(I.bodyUsed)return Promise.reject(new TypeError("Already read"));I.bodyUsed=!0}function p(I){return new Promise(function(V,W){I.onload=function(){V(I.result)},I.onerror=function(){W(I.error)}})}function y(I){var V=new FileReader,W=p(V);return V.readAsArrayBuffer(I),W}function x(I){var V=new FileReader,W=p(V);return V.readAsText(I),W}function C(I){for(var V=new Uint8Array(I),W=new Array(V.length),te=0;te<V.length;te++)W[te]=String.fromCharCode(V[te]);return W.join("")}function S(I){if(I.slice)return I.slice(0);var V=new Uint8Array(I.byteLength);return V.set(new Uint8Array(I)),V.buffer}function j(){return this.bodyUsed=!1,this._initBody=function(I){this.bodyUsed=this.bodyUsed,this._bodyInit=I,I?typeof I=="string"?this._bodyText=I:f.blob&&Blob.prototype.isPrototypeOf(I)?this._bodyBlob=I:f.formData&&FormData.prototype.isPrototypeOf(I)?this._bodyFormData=I:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(I)?this._bodyText=I.toString():f.arrayBuffer&&f.blob&&m(I)?(this._bodyArrayBuffer=S(I.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(I)||v(I))?this._bodyArrayBuffer=S(I):this._bodyText=I=Object.prototype.toString.call(I):this._bodyText="",this.headers.get("content-type")||(typeof I=="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(I)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var I=g(this);if(I)return I;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 I=g(this);return I||(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 I=g(this);if(I)return I;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 O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(I){var V=I.toUpperCase();return O.indexOf(V)>-1?V:I}function k(I,V){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');V=V||{};var W=V.body;if(I instanceof k){if(I.bodyUsed)throw new TypeError("Already read");this.url=I.url,this.credentials=I.credentials,V.headers||(this.headers=new d(I.headers)),this.method=I.method,this.mode=I.mode,this.signal=I.signal,!W&&I._bodyInit!=null&&(W=I._bodyInit,I.bodyUsed=!0)}else this.url=String(I);if(this.credentials=V.credentials||this.credentials||"same-origin",(V.headers||!this.headers)&&(this.headers=new d(V.headers)),this.method=P(V.method||this.method||"GET"),this.mode=V.mode||this.mode||null,this.signal=V.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")&&(V.cache==="no-store"||V.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()}}}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function _(I){var V=new FormData;return I.trim().split("&").forEach(function(W){if(W){var te=W.split("="),X=te.shift().replace(/\+/g," "),ne=te.join("=").replace(/\+/g," ");V.append(decodeURIComponent(X),decodeURIComponent(ne))}}),V}function $(I){var V=new d,W=I.replace(/\r?\n[\t ]+/g," ");return W.split("\r").map(function(te){return te.indexOf(`
103
+ `,"%p":be=>be.tm_hour>=0&&be.tm_hour<12?"AM":"PM","%S":be=>ke(be.tm_sec,2),"%t":()=>" ","%u":be=>be.tm_wday||7,"%U":be=>{var Te=be.tm_yday+7-be.tm_wday;return ke(Math.floor(Te/7),2)},"%V":be=>{var Te=Math.floor((be.tm_yday+7-(be.tm_wday+6)%7)/7);if((be.tm_wday+371-be.tm_yday-2)%7<=2&&Te++,Te){if(Te==53){var yt=(be.tm_wday+371-be.tm_yday)%7;yt!=4&&(yt!=3||!ts(be.tm_year))&&(Te=1)}}else{Te=52;var jt=(be.tm_wday+7-be.tm_yday-1)%7;(jt==4||jt==5&&ts(be.tm_year%400-1))&&Te++}return ke(Te,2)},"%w":be=>be.tm_wday,"%W":be=>{var Te=be.tm_yday+7-(be.tm_wday+6)%7;return ke(Math.floor(Te/7),2)},"%y":be=>(be.tm_year+1900).toString().substring(2),"%Y":be=>be.tm_year+1900,"%z":be=>{var Te=be.tm_gmtoff,yt=Te>=0;return Te=Math.abs(Te)/60,Te=Te/60*100+Te%60,(yt?"+":"-")+("0000"+Te).slice(-4)},"%Z":be=>be.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=$2(ie);return Pt.length>b?0:(Q2(Pt,w),Pt.length-1)},H2=(w,b,T,D,Y)=>W2(w,b,T,D);_t=r.InternalError=class extends Error{constructor(w){super(w),this.name="InternalError"}},Gt(),an=r.BindingError=class extends Error{constructor(w){super(w),this.name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(w,b,T,D,Y,ee,ie,oe,ge,we)=>(r.dynCall_iiiiiijj=ht.Fa)(w,b,T,D,Y,ee,ie,oe,ge,we);function z2(w,b){var T=pt();try{return ft(w)(b)}catch(D){if(gt(T),D!==D+0)throw D;lt(1,0)}}function Z2(w,b,T,D){var Y=pt();try{ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function X2(w,b,T){var D=pt();try{ft(w)(b,T)}catch(Y){if(gt(D),Y!==Y+0)throw Y;lt(1,0)}}function ex(w,b,T,D){var Y=pt();try{return ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function tx(w,b,T,D,Y){var ee=pt();try{return ft(w)(b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function nx(w,b){var T=pt();try{ft(w)(b)}catch(D){if(gt(T),D!==D+0)throw D;lt(1,0)}}function rx(w,b,T){var D=pt();try{return ft(w)(b,T)}catch(Y){if(gt(D),Y!==Y+0)throw Y;lt(1,0)}}function ix(w){var b=pt();try{ft(w)()}catch(T){if(gt(b),T!==T+0)throw T;lt(1,0)}}function ox(w,b,T,D,Y,ee,ie,oe,ge,we,Se){var Ve=pt();try{ft(w)(b,T,D,Y,ee,ie,oe,ge,we,Se)}catch(ke){if(gt(Ve),ke!==ke+0)throw ke;lt(1,0)}}function sx(w,b,T,D,Y,ee,ie){var oe=pt();try{return ft(w)(b,T,D,Y,ee,ie)}catch(ge){if(gt(oe),ge!==ge+0)throw ge;lt(1,0)}}function ax(w,b,T,D,Y){var ee=pt();try{ft(w)(b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function cx(w,b,T,D,Y,ee){var ie=pt();try{return ft(w)(b,T,D,Y,ee)}catch(oe){if(gt(ie),oe!==oe+0)throw oe;lt(1,0)}}function lx(w,b,T,D,Y,ee,ie,oe){var ge=pt();try{return ft(w)(b,T,D,Y,ee,ie,oe)}catch(we){if(gt(ge),we!==we+0)throw we;lt(1,0)}}function ux(w,b,T,D,Y){var ee=pt();try{return ft(w)(b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}function dx(w,b,T,D){var Y=pt();try{return ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function fx(w,b,T,D){var Y=pt();try{return ft(w)(b,T,D)}catch(ee){if(gt(Y),ee!==ee+0)throw ee;lt(1,0)}}function hx(w){var b=pt();try{return ft(w)()}catch(T){if(gt(b),T!==T+0)throw T;lt(1,0)}}function px(w,b,T,D,Y,ee,ie,oe){var ge=pt();try{ft(w)(b,T,D,Y,ee,ie,oe)}catch(we){if(gt(ge),we!==we+0)throw we;lt(1,0)}}function gx(w,b,T,D,Y,ee,ie,oe,ge,we,Se,Ve){var ke=pt();try{return ft(w)(b,T,D,Y,ee,ie,oe,ge,we,Se,Ve)}catch(Ke){if(gt(ke),Ke!==Ke+0)throw Ke;lt(1,0)}}function mx(w,b,T,D,Y,ee,ie,oe,ge,we,Se,Ve,ke,Ke,mt,Vt){var ut=pt();try{ft(w)(b,T,D,Y,ee,ie,oe,ge,we,Se,Ve,ke,Ke,mt,Vt)}catch(Pt){if(gt(ut),Pt!==Pt+0)throw Pt;lt(1,0)}}function yx(w,b,T,D,Y){var ee=pt();try{return fh(w,b,T,D,Y)}catch(ie){if(gt(ee),ie!==ie+0)throw ie;lt(1,0)}}var ns;se=function w(){ns||hh(),ns||(se=w)};function hh(){if(he>0||(V(),he>0))return;function w(){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),w()},1)):w()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return hh(),t.ready}})();function G1(e){return ga(ma,e)}async function Y1(e,t){return q1(ma,e,t)}async function K1(e,t){return U1(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"]],$1=[...ed,["unknown"]].map(e=>e[0]),Eo=new Map(ed);function Q1(e){for(const[t,n]of Eo)if(e===n)return t;return"unknown"}function W1(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 H1(e){try{return e instanceof ImageData}catch{return!1}}function J1(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 ey(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(nd(e)&&!await ty(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ad(e)&&ny(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)&&iy(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=W1(e);if(t===0||n===0)return null;const r=J1(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 z1(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 Z1(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 X1(e){if(cd(e))return await z1(e);if(H1(e)){if(ry(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return id(e)||sd(e)?Z1(e):await ld(e)}async function ey(e){try{return await e.decode(),!0}catch{return!1}}async function ty(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function ny(e){return e.format===null}function ry(e){return e.data.buffer.byteLength===0}function iy(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(),I1(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.`);P1(this,ri,r??[]),G1().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 $1.filter(t=>t!=="unknown")}async detect(t){try{const n=await X1(t);if(n===null)return[];let r;try{cd(n)?r=await Y1(n,{tryHarder:!0,formats:Wu(this,ri).map(i=>Eo.get(i))}):r=await K1(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:Q1(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 oy(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 N.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"},N.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 sy(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 N.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"},N.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"}),N.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 ay(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,s]=N.useState(!1);function a(){s(!0),t?r():n(),setTimeout(()=>s(!1),1e3)}return N.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?N.createElement(oy,{disabled:i,onClick:a}):N.createElement(sy,{disabled:i,onClick:a}))}function cy(e){const{onClick:t,className:n,style:r}=e;return N.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},N.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 ly(e){const{onClick:t,className:n,style:r}=e;return N.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},N.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 uy(e){const{status:t,scanning:n,torchToggle:r}=e;function i(s){r(s)}return n&&r?N.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?N.createElement(ly,{onClick:()=>i(!1)}):N.createElement(cy,{onClick:()=>i(!0)})):null}function dy(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 N.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"},N.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 fy(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 N.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"},N.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 hy(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const s=(n.max-n.min)/3;return N.createElement(N.Fragment,null,N.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},N.createElement(fy,{disabled:i<=n.min,onClick:function(){r(Math.max(i-s,n.min))}})),N.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},N.createElement(dy,{disabled:i>=n.max,onClick:function(){r(Math.min(i+s,n.max))}})))}function py(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 N.createElement("div",{style:{position:"relative"}},N.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&&N.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",N.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),N.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:h,strokeWidth:3}),N.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:h,strokeWidth:3}),N.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:h,strokeWidth:3}),N.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:h,strokeWidth:3})),s&&N.createElement(ay,{scanning:t,startScanning:f,stopScanning:m}),a&&r.torch&&N.createElement(uy,{scanning:t,status:a.status,torchToggle:a.toggle}),l&&r.zoom&&N.createElement(hy,{scanning:t,capabilities:r.zoom,value:l.value,onZoom:l.onChange}))}const gy={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},my={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},yy={width:"100%",height:"100%",position:"relative"},vy={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var by=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=t1(window);switch(e.browser){case"chrome":f1(window,e);break;case"firefox":m1(window,e);break;case"safari":w1(window,e);break;default:throw new Error("Unsupported browser")}});const wy="data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8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qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";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 xy(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=N.useRef(null),E=N.useRef(null),o=N.useRef(null),d=N.useMemo(()=>({...gy,...r}),[r]),g=N.useMemo(()=>({...my,...a}),[a]),[p,y]=N.useState(!1),[x,C]=N.useState(!0),[S,j]=N.useState(d),O=function(){const q=N.useRef(Promise.resolve({type:"stop",data:{}})),K=N.useRef(null),I=N.useRef(null),[V,W]=N.useState({}),[te,X]=N.useState({}),ne=N.useCallback(async(le,L)=>{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");by();const H=await navigator.mediaDevices.getUserMedia({audio:!1,video:L});le.srcObject!==void 0?le.srcObject=H:le.mozSrcObject!==void 0?le.mozSrcObject=H:window.URL.createObjectURL?le.src=window.URL.createObjectURL(H):window.webkitURL?le.src=window.webkitURL.createObjectURL(H):le.src=H.id,await Promise.race([le.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,I.current=A,{type:"start",data:{videoEl:le,stream:H,constraints:L}}},[]),re=N.useCallback(async(le,L)=>{le.src="",le.srcObject=null,le.load();for(const U of L.getTracks())L.removeTrack(U),U.stop();return K.current=null,I.current=null,X({}),{type:"stop",data:{}}},[]),he=N.useCallback(async(le,{constraints:L,restart:U=!1})=>{if(q.current=q.current.then(H=>{if(H.type==="start"){const{data:{videoEl:A,stream:R,constraints:M}}=H;return U||le!==A||L!==M?re(A,R).then(()=>ne(le,L)):H}return ne(le,L)}),(await q.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[ne,re]),se=N.useCallback(async()=>{if(q.current=q.current.then(le=>{if(le.type==="stop")return le;const{data:{videoEl:L,stream:U}}=le;return re(L,U)}),(await q.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[re]),ve=N.useCallback(async le=>{const L=I.current;if(!L)throw new Error("No active video track found.");{le.advanced&&le.advanced[0].zoom&&L.getCapabilities().torch&&await L.applyConstraints({advanced:[{torch:!1}]}),await L.applyConstraints(le);const U=L.getCapabilities(),H=L.getSettings();W(U),X(H)}},[]);return N.useEffect(()=>()=>{(async()=>await se())()},[se]),{capabilities:V,settings:te,startCamera:he,stopCamera:se,updateConstraints:ve}}(),{startScanning:P,stopScanning:k}=function(q){const{videoElementRef:K,onScan:I,onFound:V,retryDelay:W=100,scanDelay:te=0,formats:X=[],audio:ne=!0,allowMultiple:re=!1}=q,he=N.useRef(new ya({formats:X})),se=N.useRef(null),ve=N.useRef(null);N.useEffect(()=>{he.current=new ya({formats:X})},[X]),N.useEffect(()=>{typeof window<"u"&&ne&&(se.current=new Audio(wy))},[ne]);const le=N.useCallback(L=>async U=>{if(K.current!==null&&K.current.readyState>1){const{lastScan:H,contentBefore:A,lastScanHadContent:R}=L;if(U-H<W)ve.current=window.requestAnimationFrame(le(L));else{const M=await he.current.detect(K.current),B=M.some(G=>!A.includes(G.rawValue)),z=M.length>0;let Z=L.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,I(M)),z&&V(M),!z&&R&&V(M);const J={lastScan:U,lastOnScan:Z,lastScanHadContent:z,contentBefore:B?M.map(G=>G.rawValue):A};ve.current=window.requestAnimationFrame(le(J))}}},[K.current,I,V,W]);return{startScanning:N.useCallback(()=>{const L=performance.now(),U={lastScan:L,lastOnScan:L,contentBefore:[],lastScanHadContent:!1};ve.current=window.requestAnimationFrame(le(U))},[le]),stopScanning:N.useCallback(()=>{ve.current!==null&&(window.cancelAnimationFrame(ve.current),ve.current=null)},[])}}({videoElementRef:c,onScan:n,onFound:q=>function(K,I,V,W){const te=V;if(te==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const X=I;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),le=he*ve,L=se*ve,U=le/he,H=L/se,A=(ne-le)/2,R=(re-L)/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:ue,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:ue,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)}}(q,c.current,o.current,g.tracker),formats:i,audio:g.audio,allowMultiple:h,retryDelay:g.tracker===void 0?500:10,scanDelay:v});N.useEffect(()=>(y(!0),()=>{y(!1)}),[]),N.useEffect(()=>{p&&(k(),P())},[a==null?void 0:a.tracker]),N.useEffect(()=>{if(!gd(d,S)){const q=d;r!=null&&r.deviceId&&delete q.facingMode,j(q)}},[r]);const _=N.useMemo(()=>({constraints:S,shouldStream:p&&!s}),[S,p,s]),$=async()=>{const q=c.current;if(q==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 I=K.getContext("2d");if(I==null)throw new Error("Canvas should be defined when component is mounted.");if(_.shouldStream){await O.stopCamera(),C(!1);try{await O.startCamera(q,_),q?C(!0):await O.stopCamera()}catch(V){console.error("error",V)}}else K.width=q.videoWidth,K.height=q.videoHeight,I.drawImage(q,0,0,q.videoWidth,q.videoHeight),await O.stopCamera(),C(!1)};N.useEffect(()=>{(async()=>await $())()},[_]);const Q=N.useMemo(()=>_.shouldStream&&x,[_.shouldStream,x]);return N.useEffect(()=>{if(Q){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()}},[Q]),N.createElement("div",{style:{...yy,...f==null?void 0:f.container},className:m==null?void 0:m.container},N.createElement("video",{ref:c,style:{...vy,...f==null?void 0:f.video,visibility:s?"hidden":"visible"},className:m==null?void 0:m.video,autoPlay:!0,muted:!0,playsInline:!0}),N.createElement("canvas",{ref:E,style:{display:s?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),N.createElement("canvas",{ref:o,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),N.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},g.finder&&N.createElement(py,{scanning:x,capabilities:O.capabilities,loading:!1,onOff:g.onOff,zoom:g.zoom&&O.settings.zoom?{value:O.settings.zoom,onChange:async q=>{const K={...S,advanced:[{zoom:q}]};await O.updateConstraints(K)}}:void 0,torch:g.torch?{status:(t=O.settings.torch)!==null&&t!==void 0&&t,toggle:async q=>{const K={...S,advanced:[{torch:q}]};await O.updateConstraints(K)}}:void 0,startScanning:async()=>await $(),stopScanning:async()=>{await O.stopCamera(),Co(o.current),C(!1)},border:f==null?void 0:f.finderBorder}),l))}function Ey(){const[e,t]=N.useState([]);return N.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=Ey(),i=s=>{e(s[0].rawValue)};return u.jsxs("div",{children:[!!r.length&&u.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[u.jsx(Ay,{onScan:i}),u.jsx("hr",{})]}),u.jsx(yo,{label:n,autoFocus:!0,placeholder:"CDE2341S",onChange:s=>{t&&t(!0),e(s.target.value)}})]})}const Cy="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 Ay({onScan:e}){const[t,n]=N.useState("user");return u.jsxs("div",{className:"relative w-full",children:[u.jsx(xy,{components:{finder:!1},onScan:e,constraints:{facingMode:t},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-380px)] 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:Cy,alt:"camera-switch"})})]})}function Sy({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 Ty({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 jy(e){const t=N.useRef(null),[n,r]=N.useState(!1),[i,s]=N.useState(e.value??"");Du(t,r);const a=(f,m)=>{s(f),r(!1),e.onChange&&e.onChange(m)},l=N.Children.map(e.children,f=>{if(N.isValidElement(f)){if(f.type===va)return u.jsx("div",{onClick:()=>a(f.props.label,f.props.value),children:f});if(f.type===Ty){const m=N.Children.map(f.props.children,h=>{if(N.isValidElement(h)&&h.type===va)return u.jsx("div",{onClick:()=>a(h.props.label,h.props.value),children:h})});return N.cloneElement(f,{},...m)}}});return u.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[u.jsx(kt,{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(Sy,{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(kt.Helper,{helperText:e.helperText})]})}function Oy(){return u.jsxs("div",{children:[u.jsx("div",{className:"flex animate-pulse justify-end space-y-4",children:u.jsx("div",{className:"h-8 w-32 rounded bg-gray-100"})},"skeleton-item-"),u.jsx("div",{className:"my-6 h-px w-full bg-gray-100"}),u.jsx("div",{className:"space-y-4",children:u.jsx("div",{className:"animate-pulse space-y-4",children:u.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),u.jsx("div",{className:"h-12 w-full rounded bg-gray-100"})]})},"skeleton-item-")})]})}var Ny=Object.defineProperty,Iy=(e,t)=>{for(var n in t)Ny(e,n,{get:t[n],enumerable:!0})},hn={};Iy(hn,{assign:()=>ky,colors:()=>Jn,createStringInterpolator:()=>ja,skipAnimation:()=>Ed,to:()=>xd,willAdvance:()=>Oa});var ba=si(),Re=e=>oi(e,ba),wa=si();Re.write=e=>oi(e,wa);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 Er=[];Re.setTimeout=(e,t)=>{const n=Re.now()+t,r=()=>{const s=Er.findIndex(a=>a.cancel==r);~s&&Er.splice(s,1),Hn-=~s?1:0},i={time:n,handler:e,cancel:r};return Er.splice(md(n),0,i),Hn+=1,yd(),i};var md=e=>~(~Er.findIndex(t=>t.time>e)||~Er.length);Re.cancel=e=>{So.delete(e),xa.delete(e),Ea.delete(e),ba.delete(e),wa.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"):bd()};var Wn=-1,Hn=0,Aa=!1;function oi(e,t){Aa?(t.delete(e),e(0)):(t.add(e),yd())}function yd(){Wn<0&&(Wn=0,Re.frameLoop!=="demand"&&Ca(vd))}function Py(){Wn=-1}function vd(){~Wn&&(Ca(vd),Re.batchedUpdates(bd))}function bd(){const e=Wn;Wn=Re.now();const t=md(Wn);if(t&&(wd(Er.splice(0,t),n=>n.handler()),Hn-=t),!Hn){Py();return}So.flush(),ba.flush(e?Math.min(64,Wn-e):16.667),xa.flush(),wa.flush(),Ea.flush()}function si(){let e=new Set,t=e;return{add(n){Hn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Hn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Hn-=t.size,wd(t,r=>r(n)&&e.add(r)),Hn+=e.size,t=e)}}}function wd(e,t){e.forEach(n=>{try{t(n)}catch(r){Re.catch(r)}})}function Sa(){}var Dy=(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 In(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,Jn=null,Ed=!1,Oa=Sa,ky=e=>{e.to&&(xd=e.to),e.now&&(Re.now=e.now),e.colors!==void 0&&(Jn=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=[],Na=[],To=0,jo={get idle(){return!li.size&&!rn.length},start(e){To>e.priority?(li.add(e),Re.onStart(Ry)):(Cd(e),Re(Ia))},advance:Ia,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 Ry(){li.forEach(Cd),li.clear(),Re(Ia)}function Cd(e){rn.includes(e)||Ad(e)}function Ad(e){rn.splice(By(rn,t=>t.priority>e.priority),0,e)}function Ia(e){const t=Na;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,Na=rn,Na.length=0,rn=t,rn.length>0}function By(e,t){const n=e.findIndex(t);return n<0?e.length:n}var My=(e,t,n)=>Math.min(Math.max(n,e),t),_y={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 No(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Fy=new RegExp("rgb"+No(pn,pn,pn)),Ly=new RegExp("rgba"+No(pn,pn,pn,pn)),Vy=new RegExp("hsl"+No(pn,Oo,Oo)),qy=new RegExp("hsla"+No(pn,Oo,Oo,pn)),Uy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Gy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yy=/^#([0-9a-fA-F]{6})$/,Ky=/^#([0-9a-fA-F]{8})$/;function $y(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Yy.exec(e))?parseInt(t[1]+"ff",16)>>>0:Jn&&Jn[e]!==void 0?Jn[e]:(t=Fy.exec(e))?(Cr(t[1])<<24|Cr(t[2])<<16|Cr(t[3])<<8|255)>>>0:(t=Ly.exec(e))?(Cr(t[1])<<24|Cr(t[2])<<16|Cr(t[3])<<8|jd(t[4]))>>>0:(t=Uy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ky.exec(e))?parseInt(t[1],16)>>>0:(t=Gy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Vy.exec(e))?(Sd(Td(t[1]),Io(t[2]),Io(t[3]))|255)>>>0:(t=qy.exec(e))?(Sd(Td(t[1]),Io(t[2]),Io(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 Cr(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 Io(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Od(e){let t=$y(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=Wy(m,s);return Qy(m,s[h],s[h+1],i[h],i[h+1],f,a,l,r.map)}};function Qy(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 Wy(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Hy=(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 My(0,1,i/e)},Po=1.70158,Do=Po*1.525,Nd=Po+1,Id=2*Math.PI/3,Pd=2*Math.PI/4.5,ko=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,Jy={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=>Nd*e*e*e-Po*e*e,easeOutBack:e=>1+Nd*Math.pow(e-1,3)+Po*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Do+1)*2*e-Do)/2:(Math.pow(2*e-2,2)*((Do+1)*(e*2-2)+Do)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Id),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Id)+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-ko(1-e),easeOutBounce:ko,easeInOutBounce:e=>e<.5?(1-ko(1-2*e))/2:(1+ko(2*e-1))/2,steps:Hy},di=Symbol.for("FluidValue.get"),Ar=Symbol.for("FluidValue.observers"),on=e=>!!(e&&e[di]),Qt=e=>e&&e[di]?e[di]():e,Dd=e=>e[Ar]||null;function zy(e,t){e.eventObserved?e.eventObserved(t):e(t)}function fi(e,t){const n=e[Ar];n&&n.forEach(r=>{zy(r,t)})}var kd=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Zy(this,e)}},Zy=(e,t)=>Rd(e,di,t);function Sr(e,t){if(e[di]){let n=e[Ar];n||Rd(e,Ar,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[Ar];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ar]=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,Xy=/(#(?:[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"),ev=/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]=tv(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},tv=e=>{const t=Bo.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Da,nv=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,_d=e=>{Da||(Da=Jn?new RegExp(`(${Object.keys(Jn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>Qt(s).replace(Bo,Md).replace(Xy,Od).replace(Da,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(ev,nv)}},ka="react-spring: ",Fd=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${ka}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},rv=Fd(console.warn);function iv(){rv(`${ka}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var ov=Fd(console.warn);function sv(){ov(`${ka}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(Jn||{}))}var Ra=Ta()?N.useEffect:N.useLayoutEffect,av=()=>{const e=N.useRef(!1);return Ra(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Ld(){const e=N.useState()[1],t=av();return()=>{t.current&&e(Math.random())}}function cv(e,t){const[n]=N.useState(()=>({inputs:t,result:e()})),r=N.useRef(),i=r.current;let s=i;return s?t&&s.inputs&&lv(t,s.inputs)||(s={inputs:t,result:e()}):s=n,N.useEffect(()=>{r.current=s,i==n&&(n.inputs=n.result=void 0)},[s]),s.result}function lv(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=>N.useEffect(e,uv),uv=[];function qd(e){const t=N.useRef();return N.useEffect(()=>{t.current=e}),t.current}var pi=Symbol.for("Animated:node"),dv=e=>!!e&&e[pi]===e,Sn=e=>e&&e[pi],Ba=(e,t)=>Dy(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()}},Fo={dependencies:null},Lo=class extends Ud{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return An(this.source,(n,r)=>{dv(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){Fo.dependencies&&on(e)&&Fo.dependencies.add(e);const t=_o(e);t&&Ye(t,n=>this.add(n))}},Gd=class extends Lo{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(fv)),!0)}};function fv(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 N.forwardRef((r,i)=>{const s=N.useRef(null),a=n&&N.useCallback(o=>{s.current=gv(i,o)},[i]),[l,f]=pv(r,t),m=Ld(),h=()=>{const o=s.current;if(n&&!o)return;(o?t.applyAnimatedValues(o,l.getValue(!0)):!1)===!1&&m()},v=new hv(h,f),c=N.useRef();Ra(()=>(c.current=v,Ye(f,o=>Sr(o,v)),()=>{c.current&&(Ye(c.current.deps,o=>hi(o,c.current)),Re.cancel(c.current.update))})),N.useEffect(h,[]),Vd(()=>()=>{const o=c.current;Ye(o.deps,d=>hi(d,o))});const E=t.getComponentProps(l.getValue());return de.createElement(e,{...E,ref:a})})},hv=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Re.write(this.update)}};function pv(e,t){const n=new Set;return Fo.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Lo(e),Fo.dependencies=null,[e,n]}function gv(e,t){return e&&(xe.fun(e)?e(t):e.current=t),t}var Kd=Symbol.for("AnimatedComponent"),mv=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Lo(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,yv=e=>e,_a=(e,t=yv)=>{let n=vv;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},vv=["config","onProps","onStart","onChange","onPause","onResume","onRest"],bv={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 wv(e){const t={};let n=0;if(An(e,(r,i)=>{bv[i]||(t[i]=r,n++)}),n)return t}function Hd(e){const t=wv(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 xv(e){for(const t in e)return!0;return!1}function Fa(e){return xe.fun(e)||xe.arr(e)&&xe.obj(e[0])}function Ev(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Cv(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Av={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}},La={...Av.default,mass:1,damping:1,easing:Jy.linear,clamp:!1},Sv=class{constructor(){this.velocity=0,Object.assign(this,La)}};function Tv(e,t,n){n&&(n={...n},Jd(n,t),t={...n,...t}),Jd(e,t),Object.assign(e,t);for(const a in La)e[a]==null&&(e[a]=La[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=[],jv=class{constructor(){this.changed=!1,this.values=zd,this.toValues=null,this.fromValues=zd,this.config=new Sv,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)?Tr(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}),Tr=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)&&Tr(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 bi(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,O)=>{xe.und(C[O])&&(C[O]=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 bi(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 bi(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,Ov=1,Ua=class extends kd{constructor(){super(...arguments),this.id=Ov++,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 iv(),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,wi=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,Nv=class extends Ua{constructor(e,t){if(super(),this.animation=new jv,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)||wi(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 wi(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 O,P=!1;const k=1,_=Math.ceil(e/k);for(let $=0;$<_&&(O=Math.abs(p)>x,!(!O&&(c=Math.abs(v-E)<=y,c)));++$){S&&(P=E==v||E>v==j,P&&(p=-p*C,E=v));const Q=-s.tension*1e-6*(E-v),q=-s.friction*.001*p,K=(Q+q)/s.mass;p=p+K*k,E=E+p*k}}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()),bi(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||Fa(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:()=>{wi(this)||(sf(this,!0),ci(s.pauseQueue),Ci(this,"onPause",gn(this,xi(this,this.animation.to)),this))},resume:()=>{wi(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(Tr(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(Tr(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=!In(v,m);c&&(l.from=v),v=Qt(v);const E=!In(h,f);E&&this._focus(h);const o=Fa(t.to),{config:d}=l,{decay:g,velocity:p}=d;(r||i)&&(d.velocity=0),t.config&&!o&&Tv(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),O=!o&&(!j||yi(a.immediate||t.immediate,s));if(E){const $=Ma(h);if($!==y.constructor)if(O)y=this._set(S);else throw Error(`Cannot animate between ${y.constructor.name} and ${$.name}, as the "to" prop suggests`)}const P=y.constructor;let k=on(h),_=!1;if(!k){const $=x||!Ka(this)&&c;(E||$)&&(_=In(vi(C),S),k=!_),(!In(l.immediate,O)&&!O||!In(d.decay,g)||!In(d.velocity,p))&&(k=!0)}if(_&&zn(this)&&(l.changed&&!x?k=!0:k||this._stop(f)),!o&&((k||on(f))&&(l.values=y.getPayload(),l.toValues=on(h)?null:P==mi?[1]:Xt(S)),l.immediate!=O&&(l.immediate=O,!O&&!x&&this._set(f)),k)){const{onRest:$}=l;Ye(Pv,q=>lf(this,t,q));const Q=gn(this,xi(this,f));ci(this._pendingCalls,Q),this._pendingCalls.add(n),l.changed&&Re.batchedUpdates(()=>{var q;l.changed=!x,$==null||$(Q,this),x?or(a.onRest,Q):(q=l.onStart)==null||q.call(l,Q,this)})}x&&this._set(C),o?n(ef(t.to,t,this._state,this)):k?this._start():zn(this)&&!E?this._pendingCalls.add(n):n(Xd(C))}_focus(e){const t=this.animation;e!==t.to&&(Dd(this)&&this._detach(),t.to=e,Dd(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;on(t)&&(Sr(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||!In(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),wi(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?Tr(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 In(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||Fa(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 Iv(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 Pv=["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 Dv=["onStart","onChange","onRest"],kv=1,Rv=class{constructor(e,t){this.id=kv++,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 bi(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(Dv,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?(bi(v,e._lastAsyncId),g(Tr(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,Sr(n,e))})}function hf(e,t){const n=new Nv;return n.key=e,t&&Sr(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=N.useContext(qo),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=cv(()=>({pause:r,immediate:i}),[r,i]);const{Provider:s}=qo;return de.createElement(s,{value:t},e)},qo=Bv(Vo,{});Vo.Provider=qo.Provider,Vo.Consumer=qo.Consumer;function Bv(e,t){return Object.assign(e,de.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Mv=()=>{const e=[],t=function(r){sv();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 _v(e,t,n){const r=xe.fun(t)&&t;r&&!n&&(n=[]);const i=N.useMemo(()=>r||arguments.length==3?Mv():void 0,[]),s=N.useRef(0),a=Ld(),l=N.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=N.useRef([...l.ctrls]),m=[],h=qd(e)||0;N.useMemo(()=>{Ye(f.current.slice(e,h),p=>{Ev(p,i),p.stop(!0)}),f.current.length=e,v(h,e)},[e]),N.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 Rv(null,l.flush)),S=r?r(x,C):t[x];S&&(m[x]=Iv(S))}}const c=f.current.map((p,y)=>df(p,m[y])),E=N.useContext(Vo),o=qd(E),d=E!==o&&xv(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&&(Cv(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 Fv(e,t){const n=xe.fun(e),[[r],i]=_v(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var Lv=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();In(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)&&Sr(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 Vv(e){return e.idle!==!1}function mf(e){return!e.size||Array.from(e).every(Vv)}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 Lv(e,t)});var yf=/^--/;function qv(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 Uv(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=qv(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},Gv=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Yv=["Webkit","Ms","Moz","O"];Ai=Object.keys(Ai).reduce((e,t)=>(Yv.forEach(n=>e[Gv(n,t)]=e[t]),e),Ai);var Kv=/^(matrix|translate|scale|rotate|skew)/,$v=/^(translate)/,Qv=/^(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,Wv=class extends Lo{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(Kv.test(l)){if(delete r[l],xe.und(a))return;const f=$v.test(l)?"px":Qv.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 Hv(i,s)),super(r)}},Hv=class extends kd{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)&&Sr(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)}},Jv=["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:Xn.unstable_batchedUpdates,createStringInterpolator:_d,colors:_y});var zv=mv(Jv,{applyAnimatedValues:Uv,createAnimatedStyle:e=>new Wv(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Zv=zv.animated;function Go(e){const{rows:t}=e,n=Fv({from:{opacity:0},to:{opacity:1}});return u.jsxs(Zv.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 bf({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const i=N.useRef(null),[s,a]=N.useState(0),[l,f]=N.useState(r),m=l&&N.Children.count(e)>n?n:N.Children.count(e);N.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:N.Children.map(N.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 Xv=br("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),eb=br("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),tb=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:i="md"})=>{const s=t,[a,l]=N.useState(r),[f,m]=N.useState(!1),h=()=>{s||(l(!a),n&&n())},v=()=>{t||m(!0)},c=()=>{m(!1)},E=Dt("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},eb({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:Dt(Xv({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=N.useId(),E=e??c;return u.jsxs("div",{className:`flex ${i?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[u.jsx(tb,{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(kt,{className:Dt("font-normal"),description:r,required:m,tooltip:h,htmlFor:E,disabled:s,children:f}),u.jsx(kt.Helper,{disabled:s,helperText:a})]})]})};Yo.displayName="Switch";const wf=N.createContext(null);function nb(e=!1){const t=N.useContext(wf);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const xf=N.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=N.useId(),c=a??v,E=l??r??m??s?u.jsxs("div",{className:"inline-flex flex-col",children:[u.jsx(kt,{className:"cursor-default",description:r,required:f,tooltip:m,htmlFor:c,disabled:i,children:l}),u.jsx(kt.Helper,{disabled:i,helperText:s})]}):null;return u.jsx(wf.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:Dt("flex flex-col gap-2"),children:n}):null]})})});xf.displayName="SwitchGroup",Object.assign(xf,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=nb(),{disabled:i,size:s,toggleLeft:a}=r??{};return u.jsx(Yo,{toggleLeft:a,disabled:e??i,label:t,defaultChecked:n,size:s})}});const rb=({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}),ib=({id:e,label:t,icon:n,pathname:r,activeTab:i,setActiveTab:s})=>u.jsx(Dc,{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(St,{icon:n,className:"mr-2",variant:i===e?"discovery":"secondary"}),t]})});function Ef(){const{t:e}=$e(),[t,n]=N.useState(""),[r,i]=N.useState(!1),{session:s}=nt(),a=Et(),[l,f]=N.useState(!1),m=N.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 N.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("scanGiftcard")})})}),u.jsx(wt,{children:u.jsx(Ao,{dataSetter:n,setDefer:f,label:e("hash")})}),u.jsx(Ot,{children:u.jsx(it,{label:e("submit"),className:"w-full",onClick:m,disabled:!t||r})})]})})}function ob(){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]=N.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(ti,{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===Ln.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(Ct,{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(wt,{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(Yn,{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(Yn,{value:h+d(),start:h,currency:s.currency,asCurrency:!0})})]})})]})}),g()&&u.jsx(Ot,{children:u.jsx(it,{label:"",className:"w-full",...g()})})]})})}function sb(){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(ti,{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 ab(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/redeem/:hash",element:u.jsx(ob,{})})]})}function cb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Ef,{})}),u.jsx(Oe,{path:"/top-up/:hash",element:u.jsx(sb,{})})]})}function lb({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(St,{icon:"home"}),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(St,{icon:"home"}),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(St,{icon:"home"}),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(St,{icon:"home"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs font-semibold",children:new Date(e.current_display_values.birthdate).toLocaleDateString(At.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===ir.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 ub({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(At.language,{month:"long",year:"numeric"})]})]})]}),u.jsxs("div",{className:"inline-grid gap-2 lg:grid-cols-2",children:[u.jsx(it,{label:n("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>t("contact-identifiers")}),u.jsx(it,{before:u.jsx(St,{icon:"edit"}),label:n("editProfile"),variant:"secondary",size:"md",onClick:()=>t("contact-attributes")})]})]})}function db(){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(Ct,{children:[u.jsx(xt,{children:u.jsx(ub,{contact:e})}),u.jsx(wt,{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(lb,{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(it,{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.map(f=>u.jsx(Af,{subscription:f},f.subscription_type.uuid))})]}),u.jsx(it,{label:i("changeSubscriptions"),before:u.jsx(St,{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(it,{label:e,variant:"link-gray",before:u.jsx(St,{icon:"caret-left",size:"md"}),onClick:()=>n(t)})})}function fb(){const{t:e}=$e(),{loyaltyTransactions:t}=fo(),{contact:n}=xn();return u.jsx("div",{className:"h-full md:container",children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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 hb(){const{t:e}=$e(),{subscriptions:t,mutate:n}=su(),[r,i]=N.useState({}),[s,a]=N.useState(!1);N.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(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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!==ir.FUNCTIONAL).map(h=>u.jsx(Af,{subscription:h,onChange:l,editable:!0},h.subscription_type.uuid))]})})}),u.jsx(Ot,{children:u.jsx(it,{label:e("saveChanges"),className:"w-full",onClick:f,disabled:!m()||s})})]})})}function pb({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(St,{className:"h-full",icon:"close"})})]})}function gb(){const{t:e}=$e(),t=Et(),{identifiers:n,isLoading:r,mutate:i}=Zl(),s=async a=>{await f0.clear({value:a}),await i()};return u.jsx("div",{className:"h-full md:container",children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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(a=>u.jsx(pb,{identifier:a,onClear:s},a.value))]})})}),u.jsx(Ot,{children:u.jsx(it,{label:e("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>t("create")})})]})})}function mb(){const{t:e}=$e(),{contact:t}=xn(),{mutate:n}=Zl(),r=Et(),[i,s]=N.useState(""),[a,l]=N.useState(!1),[f,m]=N.useState(!1),h=async()=>{l(!0),await rr.linkIdentifier(i,t.email),await n(),s(""),l(!1),r("/portal/profile/contact-identifiers")};return N.useEffect(()=>{i&&!a&&!f&&h().then()},[i,a,f,h]),u.jsx("div",{className:"h-full md:container",children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{children:u.jsx(Ao,{dataSetter:s,setDefer:m,label:e("contactIdentifier")})}),u.jsx(Ot,{children:u.jsx(it,{label:e("addIdentifier"),className:"w-full",onClick:h,disabled:a})})]})})}function yb(){const{t:e}=$e(),{contact:t,isLoading:n,mutate:r}=xn(),[i,s]=N.useState(),[a,l]=N.useState();N.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(Ct,{children:[u.jsx(xt,{children:u.jsx(Ti,{label:e("back"),path:"../"})}),u.jsx(wt,{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(jy,{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(X0,{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(it,{label:e("saveChanges"),className:"w-full",onClick:h,disabled:!a})})]})})}function vb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/profile",element:u.jsx(mn,{element:u.jsx(db,{})})}),u.jsx(Oe,{path:"/profile/activity",element:u.jsx(mn,{element:u.jsx(fb,{})})}),u.jsx(Oe,{path:"/profile/subscriptions",element:u.jsx(mn,{element:u.jsx(hb,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers",element:u.jsx(mn,{element:u.jsx(gb,{})})}),u.jsx(Oe,{path:"/profile/contact-identifiers/create",element:u.jsx(mn,{element:u.jsx(mb,{})})}),u.jsx(Oe,{path:"/profile/contact-attributes",element:u.jsx(mn,{element:u.jsx(yb,{})})})]})}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 bb(){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]=N.useState(),[h,v]=N.useState(!1);N.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===Ln.VOUCHER_REDEEMED);return u.jsxs("div",{className:"h-full md:container",children:[u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:e("vouchers")})})}),u.jsx(wt,{children:n?u.jsx(Go,{rows:4}):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(bf,{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(ni,{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(e1,{value:m,max:e.required_credits})]})}function wb(){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]=N.useState(),[o,d]=N.useState(!1);N.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(O=>O.type===Ln.REWARD_RECEPTION&&O.data.reward.uuid===c.uuid),{data:{uuid:j}}=S.reduce((O,P)=>new Date(O.created_at)>new Date(P.created_at)?O: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===Ln.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(Ct,{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(wt,{children:n||v?u.jsx(Go,{rows:4}):u.jsxs("div",{className:"flex flex-col gap-1 overflow-auto 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(bf,{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(ni,{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 xb({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 Eb(){const e=Et(),{t}=$e(),{pathname:n}=Jt(),[r,i]=N.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 N.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(rb,{children:s.map(a=>u.jsx(ib,{id:a.id,label:a.label,icon:a.icon,activeTab:r,setActiveTab:i,pathname:a.pathname},a.id))}),u.jsxs(xb,{children:[u.jsx(vb,{}),u.jsxs(vn,{children:[u.jsx(Oe,{path:"/rewards",element:u.jsx(mn,{element:u.jsx(wb,{})})}),u.jsx(Oe,{path:"/vouchers",element:u.jsx(mn,{element:u.jsx(bb,{})})})]})]})]})}function Cb(){const e=Et(),{session:t}=nt();return N.useEffect(()=>{t&&!t.contact&&e("identifier")},[]),t&&u.jsx(Eb,{})}function Ab(){return u.jsx(Mt,{children:u.jsx(bo,{state:{redirectRoute:`${qt.PORTAL}`}})})}function ji(){const{state:e}=Jt(),[t,n]=N.useState(""),{session:r,mutate:i}=nt(),s=Et(),{t:a}=$e(),[l,f]=N.useState(!1),[m,h]=N.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})})})}),u.jsx(wt,{children:u.jsx(vo,{label:a("emailAddress"),onChange:c=>n(c.target.value)})}),u.jsx(Ot,{children:u.jsx(it,{label:a("continue"),className:"w-full",onClick:v,disabled:!t||l})})]})}),u.jsx(ni,{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 Sb(){const[e,t]=N.useState(""),{session:n,mutate:r}=nt(),i=Et(),{t:s}=$e(),a=async()=>{n&&(await rr.create(e),await r(),qe.success(s("contactSavedToSession")),i("../"))};return u.jsx(Mt,{children:u.jsxs(Ct,{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(wt,{children:u.jsx(vo,{label:s("emailAddress"),onChange:l=>t(l.target.value)})}),u.jsx(Ot,{children:u.jsx(it,{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]=N.useState(!1),[f,m]=N.useState([]),[h,v]=N.useState({}),[c,E]=N.useState(!1);N.useEffect(()=>{f.length||ca.get().then(g=>{const p=g.data.data.filter(x=>x.strategy!==ir.FUNCTIONAL);m(p);const y=p.reduce((x,C)=>({...x,[C.name]:C.strategy===ir.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 rr.create(e.email),await ca.update({values:h}),e.contactIdentifier&&await rr.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(Vr,{to:"../../"}):u.jsx(Mt,{children:u.jsxs(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:t("termsAndConditions")})})}),u.jsx(wt,{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===ir.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(it,{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]=N.useState(!1),[f,m]=N.useState(""),[h,v]=N.useState(!1);if(!t||!t.contactIdentifier)return u.jsx(Vr,{to:"../"});const c=async()=>{l(!0);try{await rr.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:e("linkContact")})}),u.jsx(wt,{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(it,{label:e("continue"),className:"w-full",onClick:c,disabled:!f||a})})]}),u.jsx(ni,{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 Tb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(Cb,{})}),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(Sb,{})}),u.jsx(Oe,{path:"/identifier",element:u.jsx(Ab,{})}),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 jb(){return u.jsx(Mt,{children:u.jsx(bo,{state:{redirectRoute:`${qt.POINTS_TRANSACTION}/transaction`}})})}function Ob(){const{t:e}=$e(),{session:{input_data:t}}=nt(),{contact:n,isLoading:r,mutate:i}=xn(),[s,a]=N.useState(),[l,f]=N.useState(!1),[m,h]=N.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 N.useEffect(()=>{!l&&!s&&!m&&(async()=>await v())()},[]),r?u.jsx(u.Fragment,{}):n?u.jsx(Mt,{children:u.jsxs(Ct,{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(wt,{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(Yn,{value:s.credits,start:0})]}):u.jsx("div",{className:"text-core-primary-500",children:u.jsx(ti,{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(Yn,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(s?s.credits:0)})]})})]})})]})}):u.jsx(Vr,{to:"../"})}function Nb(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/*",element:u.jsx(jb,{})}),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(Ob,{})})})]})}function Sf(){const{session:e}=nt();return u.jsx(Mt,{children:u.jsx(bo,{state:{redirectRoute:e.type===zt.TOP_UP_PREPAID?`${qt.TOP_UP_PREPAID}/top-up`:`${qt.PAY_PREPAID}/pay`}})})}function Ib(){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 Pb(){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===Ln.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(Ct,{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(wt,{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(Yn,{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(Yn,{value:v(),start:f,currency:s,asCurrency:!0})})]})})]})}),u.jsx(Ot,{children:u.jsx(it,{label:e("confirmAndPay",{amount:vr(v(),s)}),className:"w-full",onClick:m,disabled:!f||!v()})})]})})}function Db(){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(Pb,{})})})]})}function kb(){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(Ib,{})})})]})}function Rb(){const{t:e}=$e(),[t,n]=N.useState(""),[r,i]=N.useState(!1),[s,a]=N.useState(!1),[l,f]=N.useState(!1),[m,h]=N.useState(),{session:v}=nt(),c=Et(),E=N.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 N.useEffect(()=>{t&&!r&&!s&&E().then()},[t,r,s,E]),u.jsxs(u.Fragment,{children:[u.jsx(Mt,{children:u.jsxs(Ct,{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(wt,{children:u.jsx(Ao,{dataSetter:n,setDefer:a,label:e("code")})}),u.jsx(Ot,{children:u.jsx(it,{label:e("submit"),className:"w-full",onClick:E})})]})}),u.jsx(ni,{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.jsxs("p",{children:["Link voucher ",u.jsx("b",{children:t})," to a contact to be able to redeem it."]})})]})}function Bb(){const{state:e}=Jt(),t=Et(),{t:n}=$e(),{session:r,mutate:i}=nt(),{onRedeemVoucher:s}=En(),[a,l]=N.useState(e.voucher);if(!a)return u.jsx(u.Fragment,{});const f=N.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(Ct,{children:[u.jsx(xt,{children:u.jsx("div",{className:"flex h-16 items-center",children:u.jsx("p",{children:"Voucher"})})}),u.jsx(wt,{children:u.jsx("div",{children:u.jsx(Ha,{voucher:a,setSelected:()=>{}})})}),u.jsx(Ot,{children:u.jsx(it,{label:n("redeemVoucher"),className:"w-full",onClick:f,disabled:a.status!==yr.ACTIVE})})]})})}function Mb(){const{state:{voucher:e}}=Jt();return u.jsx(Mt,{children:u.jsx(bo,{state:{voucher:e,redirectRoute:`${qt.VOUCHER}/redeem`}})})}function _b(){return u.jsxs(vn,{children:[u.jsx(Oe,{path:"/",element:u.jsx(Rb,{})}),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(Mb,{})}),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(Bb,{})})]})}const Fb="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 Lb(){const e=Et(),{t}=$e(),n=En();return N.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:Fb,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(it,{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 Vb(){const e=Et(),{t}=$e(),{sessionUuid:n}=En(),{session:r,isLoading:i,mutate:s}=nt();return N.useEffect(()=>{if(!i&&r){const a=r.type in qt?`/${r.type.replaceAll("_","-").toLowerCase()}`:"/";e(a)}},[i,s,e,r]),i?u.jsx(Oy,{}):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(Lb,{})}),u.jsx(Oe,{path:":portalSessionUuid",element:u.jsx(Vb,{})}),u.jsx(Oe,{path:`${qt.REDEEM_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.REDEEM_GIFTCARD,element:u.jsx(ab,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_GIFTCARD}/*`,element:u.jsx(ar,{type:zt.TOP_UP_GIFTCARD,element:u.jsx(cb,{})})}),u.jsx(Oe,{path:`${qt.PORTAL}/*`,element:u.jsx(ar,{type:zt.PORTAL,element:u.jsx(Tb,{})})}),u.jsx(Oe,{path:`${qt.PAY_PREPAID}/*`,element:u.jsx(ar,{type:zt.PAY_PREPAID,element:u.jsx(Db,{})})}),u.jsx(Oe,{path:`${qt.POINTS_TRANSACTION}/*`,element:u.jsx(ar,{type:zt.POINTS_TRANSACTION,element:u.jsx(Nb,{})})}),u.jsx(Oe,{path:`${qt.TOP_UP_PREPAID}/*`,element:u.jsx(ar,{type:zt.TOP_UP_PREPAID,element:u.jsx(kb,{})})}),u.jsx(Oe,{path:`${qt.VOUCHER}/*`,element:u.jsx(ar,{type:zt.VOUCHER,element:u.jsx(_b,{})})})]})}function mn({element:e}){const{session:t}=nt();return t.contact?e:u.jsx(Vr,{to:"/"})}function ar({type:e,element:t}){const{session:n}=nt();if(n)return e===n.type?t:u.jsx(Vr,{to:"/"})}function qb(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}=qb(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 Nf(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":za(XMLHttpRequest))==="object"}function Ub(e){return!!e&&typeof e.then=="function"}function Gb(e){return Ub(e)?e:Promise.resolve(e)}function Yb(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:{}},If;function Kb(){return If||(If=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(I){return I&&DataView.prototype.isPrototypeOf(I)}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(I){return I&&h.indexOf(Object.prototype.toString.call(I))>-1};function c(I){if(typeof I!="string"&&(I=String(I)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(I)||I==="")throw new TypeError('Invalid character in header field name: "'+I+'"');return I.toLowerCase()}function E(I){return typeof I!="string"&&(I=String(I)),I}function o(I){var V={next:function(){var W=I.shift();return{done:W===void 0,value:W}}};return f.iterable&&(V[Symbol.iterator]=function(){return V}),V}function d(I){this.map={},I instanceof d?I.forEach(function(V,W){this.append(W,V)},this):Array.isArray(I)?I.forEach(function(V){this.append(V[0],V[1])},this):I&&Object.getOwnPropertyNames(I).forEach(function(V){this.append(V,I[V])},this)}d.prototype.append=function(I,V){I=c(I),V=E(V);var W=this.map[I];this.map[I]=W?W+", "+V:V},d.prototype.delete=function(I){delete this.map[c(I)]},d.prototype.get=function(I){return I=c(I),this.has(I)?this.map[I]:null},d.prototype.has=function(I){return this.map.hasOwnProperty(c(I))},d.prototype.set=function(I,V){this.map[c(I)]=E(V)},d.prototype.forEach=function(I,V){for(var W in this.map)this.map.hasOwnProperty(W)&&I.call(V,this.map[W],W,this)},d.prototype.keys=function(){var I=[];return this.forEach(function(V,W){I.push(W)}),o(I)},d.prototype.values=function(){var I=[];return this.forEach(function(V){I.push(V)}),o(I)},d.prototype.entries=function(){var I=[];return this.forEach(function(V,W){I.push([W,V])}),o(I)},f.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function g(I){if(I.bodyUsed)return Promise.reject(new TypeError("Already read"));I.bodyUsed=!0}function p(I){return new Promise(function(V,W){I.onload=function(){V(I.result)},I.onerror=function(){W(I.error)}})}function y(I){var V=new FileReader,W=p(V);return V.readAsArrayBuffer(I),W}function x(I){var V=new FileReader,W=p(V);return V.readAsText(I),W}function C(I){for(var V=new Uint8Array(I),W=new Array(V.length),te=0;te<V.length;te++)W[te]=String.fromCharCode(V[te]);return W.join("")}function S(I){if(I.slice)return I.slice(0);var V=new Uint8Array(I.byteLength);return V.set(new Uint8Array(I)),V.buffer}function j(){return this.bodyUsed=!1,this._initBody=function(I){this.bodyUsed=this.bodyUsed,this._bodyInit=I,I?typeof I=="string"?this._bodyText=I:f.blob&&Blob.prototype.isPrototypeOf(I)?this._bodyBlob=I:f.formData&&FormData.prototype.isPrototypeOf(I)?this._bodyFormData=I:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(I)?this._bodyText=I.toString():f.arrayBuffer&&f.blob&&m(I)?(this._bodyArrayBuffer=S(I.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(I)||v(I))?this._bodyArrayBuffer=S(I):this._bodyText=I=Object.prototype.toString.call(I):this._bodyText="",this.headers.get("content-type")||(typeof I=="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(I)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var I=g(this);if(I)return I;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 I=g(this);return I||(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 I=g(this);if(I)return I;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 O=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(I){var V=I.toUpperCase();return O.indexOf(V)>-1?V:I}function k(I,V){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');V=V||{};var W=V.body;if(I instanceof k){if(I.bodyUsed)throw new TypeError("Already read");this.url=I.url,this.credentials=I.credentials,V.headers||(this.headers=new d(I.headers)),this.method=I.method,this.mode=I.mode,this.signal=I.signal,!W&&I._bodyInit!=null&&(W=I._bodyInit,I.bodyUsed=!0)}else this.url=String(I);if(this.credentials=V.credentials||this.credentials||"same-origin",(V.headers||!this.headers)&&(this.headers=new d(V.headers)),this.method=P(V.method||this.method||"GET"),this.mode=V.mode||this.mode||null,this.signal=V.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")&&(V.cache==="no-store"||V.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()}}}k.prototype.clone=function(){return new k(this,{body:this._bodyInit})};function _(I){var V=new FormData;return I.trim().split("&").forEach(function(W){if(W){var te=W.split("="),X=te.shift().replace(/\+/g," "),ne=te.join("=").replace(/\+/g," ");V.append(decodeURIComponent(X),decodeURIComponent(ne))}}),V}function $(I){var V=new d,W=I.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();V.append(ne,re)}}),V}j.call(k.prototype);function Q(I,V){if(!(this instanceof Q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');V||(V={}),this.type="default",this.status=V.status===void 0?200:V.status,this.ok=this.status>=200&&this.status<300,this.statusText=V.statusText===void 0?"":""+V.statusText,this.headers=new d(V.headers),this.url=V.url||"",this._initBody(I)}j.call(Q.prototype),Q.prototype.clone=function(){return new Q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},Q.error=function(){var I=new Q(null,{status:0,statusText:""});return I.type="error",I};var q=[301,302,303,307,308];Q.redirect=function(I,V){if(q.indexOf(V)===-1)throw new RangeError("Invalid status code");return new Q(null,{status:V,headers:{location:I}})},a.DOMException=l.DOMException;try{new a.DOMException}catch{a.DOMException=function(V,W){this.message=V,this.name=W;var te=Error(V);this.stack=te.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function K(I,V){return new Promise(function(W,te){var X=new k(I,V);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:$(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 Q(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")),V&&typeof V.headers=="object"&&!(V.headers instanceof d)?Object.getOwnPropertyNames(V.headers).forEach(function(se){ne.setRequestHeader(se,E(V.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=k,l.Response=Q),a.Headers=d,a.Request=k,a.Response=Q,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 Yb<"u"&&typeof window>"u"){var r=n||Kb();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Za,Za.exports);var Pf=Za.exports;const Df=ss(Pf),kf=bh({__proto__:null,default:Df},[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){$b(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 $b(e,t,n){return t=Qb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qb(e){var t=Wb(e,"string");return cr(t)=="symbol"?t:t+""}function Wb(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 Ni;Nf()&&(typeof global<"u"&&global.XMLHttpRequest?Ni=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Ni=window.XMLHttpRequest));var Qo;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Qo=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Qo=window.ActiveXObject)),!Pn&&kf&&!Ni&&!Qo&&(Pn=Df||kf),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,Hb=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)}}},Jb=function(t,n,r,i){r&&cr(r)==="object"&&(r=Xa("",r).slice(1)),t.queryStringParams&&(n=Xa(n,t.queryStringParams));try{var s;Ni?s=new Ni: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)}},zb=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},Pn&&n.indexOf("file:")!==0)return Hb(t,n,r,i);if(Nf()||typeof ActiveXObject=="function")return Jb(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function jr(e){"@babel/helpers - typeof";return jr=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},jr(e)}function Ff(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?Ff(Object(n),!0).forEach(function(r){Lf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ff(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xb(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 ew(e,t,n){return t&&Xb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lf(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=tw(e,"string");return jr(t)=="symbol"?t:t+""}function tw(e,t){if(jr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(jr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nw=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 Lf({},r,i||"")},parseLoadPayload:function(n,r){},request:zb,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]:{};Zb(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return ew(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({},nw()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);jr(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=Gb(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:rw,forEach:iw}=[];function ow(e){return iw.call(rw.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]+$/,sw=(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=sw(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 aw={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)}},cw={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 Ii=null;const Yf=()=>{if(Ii!==null)return Ii;try{Ii=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ii=!1}return Ii};var lw={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 uw={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)}},dw={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}},fw={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}},hw={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}},pw={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 gw(){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=ow(n,this.options||{},gw()),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(aw),this.addDetector(cw),this.addDetector(lw),this.addDetector(uw),this.addDetector(dw),this.addDetector(fw),this.addDetector(hw),this.addDetector(pw)}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",At.use(qf).use($f).use(I0).init({fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function mw({children:e,config:t,payload:n}){const[r,i]=N.useState("");return N.useEffect(()=>{r||(rt.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.jsxs(N.StrictMode,{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(ku,{})]})})}),u.jsx(Bl,{className:"top-16"})]}):u.jsx("div",{className:"flex h-screen items-center justify-center text-core-gray-500",children:u.jsx(ti,{className:"h-[48px] w-[48px]"})})}function yw(e){return u.jsx(mw,{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(Ic,{children:u.jsx(Tf,{})})})}function vw({uuid:e,host:t}){const[n,r]=N.useState(!1);return N.useEffect(()=>{n||(rt.initialize(void 0,t),Hl.get().then(i=>{const s=i.data.data;Of(s)}),r(!0))},[t,n]),n?u.jsxs(N.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(Ic,{children:u.jsx(Tf,{})})}),e&&u.jsx(ku,{})]})})}),u.jsx(Bl,{className:"top-16"})]}):u.jsx(u.Fragment,{children:"Initializing..."})}const bw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.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"})),ww=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},de.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"})),xw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.createElement("path",{d:"M13.25 8.75L9.75 12L13.25 15.25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Ew=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.createElement("path",{d:"M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Cw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},de.createElement("path",{d:"M4.7002 4.70016L11.2999 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}),de.createElement("path",{d:"M11.2998 4.70016L4.70014 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Aw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.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"})),Sw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.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"}),de.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"})),Tw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13V15"}),de.createElement("circle",{cx:12,cy:9,r:.5}),de.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}))},Symbol.toStringTag,{value:"Module"})),jw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...e},de.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"})),Ow=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},de.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"}),de.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"})),Nw=Object.freeze(Object.defineProperty({__proto__:null,default:e=>de.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...e},de.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"}),de.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=vw,vt.EventType=Ln,vt.PortalRoute=qt,vt.PortalSession=yw,vt.PortalType=zt,vt.SubscriptionStatus=au,vt.SubscriptionStrategy=ir,vt.VoucherStatus=yr,Object.defineProperty(vt,Symbol.toStringTag,{value:"Module"})});