@leatcom/portal-sessions 0.0.24 → 0.0.25

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.
@@ -0,0 +1,197 @@
1
+ (function(tt,z){typeof exports=="object"&&typeof module<"u"?z(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],z):(tt=typeof globalThis<"u"?globalThis:tt||self,z(tt.PortalSessions={},tt.React,tt.ReactDOM))})(this,function(tt,z,an){"use strict";var vv=Object.defineProperty;var bv=(tt,z,an)=>z in tt?vv(tt,z,{enumerable:!0,configurable:!0,writable:!0,value:an}):tt[z]=an;var zu=(tt,z,an)=>(bv(tt,typeof z!="symbol"?z+"":z,an),an);function Va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function Hu(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const le=Va(z),qu=Va(an);var Pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Wo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Go={exports:{}},qn={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var za;function Ku(){if(za)return qn;za=1;var e=z,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(u,h,v){var m,b={},l=null,g=null;v!==void 0&&(l=""+v),h.key!==void 0&&(l=""+h.key),h.ref!==void 0&&(g=h.ref);for(m in h)r.call(h,m)&&!a.hasOwnProperty(m)&&(b[m]=h[m]);if(u&&u.defaultProps)for(m in h=u.defaultProps,h)b[m]===void 0&&(b[m]=h[m]);return{$$typeof:t,type:u,key:l,ref:g,props:b,_owner:i.current}}return qn.Fragment=n,qn.jsx=s,qn.jsxs=s,qn}var Kn={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Ha;function Wu(){return Ha||(Ha=1,process.env.NODE_ENV!=="production"&&function(){var e=z,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),o=Symbol.iterator,c="@@iterator";function f(N){if(N===null||typeof N!="object")return null;var ne=o&&N[o]||N[c];return typeof ne=="function"?ne:null}var d=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(N){{for(var ne=arguments.length,he=new Array(ne>1?ne-1:0),Ce=1;Ce<ne;Ce++)he[Ce-1]=arguments[Ce];y("error",N,he)}}function y(N,ne,he){{var Ce=d.ReactDebugCurrentFrame,Ie=Ce.getStackAddendum();Ie!==""&&(ne+="%s",he=he.concat([Ie]));var Fe=he.map(function(_e){return String(_e)});Fe.unshift("Warning: "+ne),Function.prototype.apply.call(console[N],console,Fe)}}var x=!1,E=!1,S=!1,k=!1,B=!1,O;O=Symbol.for("react.module.reference");function I(N){return!!(typeof N=="string"||typeof N=="function"||N===r||N===a||B||N===i||N===v||N===m||k||N===g||x||E||S||typeof N=="object"&&N!==null&&(N.$$typeof===l||N.$$typeof===b||N.$$typeof===s||N.$$typeof===u||N.$$typeof===h||N.$$typeof===O||N.getModuleId!==void 0))}function L(N,ne,he){var Ce=N.displayName;if(Ce)return Ce;var Ie=ne.displayName||ne.name||"";return Ie!==""?he+"("+Ie+")":he}function D(N){return N.displayName||"Context"}function M(N){if(N==null)return null;if(typeof N.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof N=="function")return N.displayName||N.name||null;if(typeof N=="string")return N;switch(N){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case v:return"Suspense";case m:return"SuspenseList"}if(typeof N=="object")switch(N.$$typeof){case u:var ne=N;return D(ne)+".Consumer";case s:var he=N;return D(he._context)+".Provider";case h:return L(N,N.render,"ForwardRef");case b:var Ce=N.displayName||null;return Ce!==null?Ce:M(N.type)||"Memo";case l:{var Ie=N,Fe=Ie._payload,_e=Ie._init;try{return M(_e(Fe))}catch{return null}}}return null}var $=Object.assign,P=0,R,q,K,J,Z,ee,ue;function te(){}te.__reactDisabledLog=!0;function ge(){{if(P===0){R=console.log,q=console.info,K=console.warn,J=console.error,Z=console.group,ee=console.groupCollapsed,ue=console.groupEnd;var N={configurable:!0,enumerable:!0,value:te,writable:!0};Object.defineProperties(console,{info:N,log:N,warn:N,error:N,group:N,groupCollapsed:N,groupEnd:N})}P++}}function de(){{if(P--,P===0){var N={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},N,{value:R}),info:$({},N,{value:q}),warn:$({},N,{value:K}),error:$({},N,{value:J}),group:$({},N,{value:Z}),groupCollapsed:$({},N,{value:ee}),groupEnd:$({},N,{value:ue})})}P<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=d.ReactCurrentDispatcher,U;function Q(N,ne,he){{if(U===void 0)try{throw Error()}catch(Ie){var Ce=Ie.stack.trim().match(/\n( *(at )?)/);U=Ce&&Ce[1]||""}return`
18
+ `+U+N}}var w=!1,_;{var j=typeof WeakMap=="function"?WeakMap:Map;_=new j}function T(N,ne){if(!N||w)return"";{var he=_.get(N);if(he!==void 0)return he}var Ce;w=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Fe;Fe=V.current,V.current=null,ge();try{if(ne){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(et){Ce=et}Reflect.construct(N,[],_e)}else{try{_e.call()}catch(et){Ce=et}N.call(_e.prototype)}}else{try{throw Error()}catch(et){Ce=et}N()}}catch(et){if(et&&Ce&&typeof et.stack=="string"){for(var Ne=et.stack.split(`
19
+ `),We=Ce.stack.split(`
20
+ `),Ge=Ne.length-1,Ye=We.length-1;Ge>=1&&Ye>=0&&Ne[Ge]!==We[Ye];)Ye--;for(;Ge>=1&&Ye>=0;Ge--,Ye--)if(Ne[Ge]!==We[Ye]){if(Ge!==1||Ye!==1)do if(Ge--,Ye--,Ye<0||Ne[Ge]!==We[Ye]){var ht=`
21
+ `+Ne[Ge].replace(" at new "," at ");return N.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",N.displayName)),typeof N=="function"&&_.set(N,ht),ht}while(Ge>=1&&Ye>=0);break}}}finally{w=!1,V.current=Fe,de(),Error.prepareStackTrace=Ie}var Te=N?N.displayName||N.name:"",dt=Te?Q(Te):"";return typeof N=="function"&&_.set(N,dt),dt}function W(N,ne,he){return T(N,!1)}function G(N){var ne=N.prototype;return!!(ne&&ne.isReactComponent)}function Y(N,ne,he){if(N==null)return"";if(typeof N=="function")return T(N,G(N));if(typeof N=="string")return Q(N);switch(N){case v:return Q("Suspense");case m:return Q("SuspenseList")}if(typeof N=="object")switch(N.$$typeof){case h:return W(N.render);case b:return Y(N.type,ne,he);case l:{var Ce=N,Ie=Ce._payload,Fe=Ce._init;try{return Y(Fe(Ie),ne,he)}catch{}}}return""}var F=Object.prototype.hasOwnProperty,ce={},fe=d.ReactDebugCurrentFrame;function re(N){if(N){var ne=N._owner,he=Y(N.type,N._source,ne?ne.type:null);fe.setExtraStackFrame(he)}else fe.setExtraStackFrame(null)}function oe(N,ne,he,Ce,Ie){{var Fe=Function.call.bind(F);for(var _e in N)if(Fe(N,_e)){var Ne=void 0;try{if(typeof N[_e]!="function"){var We=Error((Ce||"React class")+": "+he+" type `"+_e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof N[_e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw We.name="Invariant Violation",We}Ne=N[_e](ne,_e,Ce,he,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){Ne=Ge}Ne&&!(Ne instanceof Error)&&(re(Ie),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ce||"React class",he,_e,typeof Ne),re(null)),Ne instanceof Error&&!(Ne.message in ce)&&(ce[Ne.message]=!0,re(Ie),p("Failed %s type: %s",he,Ne.message),re(null))}}}var ye=Array.isArray;function ae(N){return ye(N)}function be(N){{var ne=typeof Symbol=="function"&&Symbol.toStringTag,he=ne&&N[Symbol.toStringTag]||N.constructor.name||"Object";return he}}function ke(N){try{return De(N),!1}catch{return!0}}function De(N){return""+N}function je(N){if(ke(N))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",be(N)),De(N)}var $e=d.ReactCurrentOwner,Ve={key:!0,ref:!0,__self:!0,__source:!0},bt,ze,Je;Je={};function Ke(N){if(F.call(N,"ref")){var ne=Object.getOwnPropertyDescriptor(N,"ref").get;if(ne&&ne.isReactWarning)return!1}return N.ref!==void 0}function Ee(N){if(F.call(N,"key")){var ne=Object.getOwnPropertyDescriptor(N,"key").get;if(ne&&ne.isReactWarning)return!1}return N.key!==void 0}function At(N,ne){if(typeof N.ref=="string"&&$e.current&&ne&&$e.current.stateNode!==ne){var he=M($e.current.type);Je[he]||(p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M($e.current.type),N.ref),Je[he]=!0)}}function st(N,ne){{var he=function(){bt||(bt=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};he.isReactWarning=!0,Object.defineProperty(N,"key",{get:he,configurable:!0})}}function mt(N,ne){{var he=function(){ze||(ze=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ne))};he.isReactWarning=!0,Object.defineProperty(N,"ref",{get:he,configurable:!0})}}var ut=function(N,ne,he,Ce,Ie,Fe,_e){var Ne={$$typeof:t,type:N,key:ne,ref:he,props:_e,_owner:Fe};return Ne._store={},Object.defineProperty(Ne._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ne,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ce}),Object.defineProperty(Ne,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(Ne.props),Object.freeze(Ne)),Ne};function Ht(N,ne,he,Ce,Ie){{var Fe,_e={},Ne=null,We=null;he!==void 0&&(je(he),Ne=""+he),Ee(ne)&&(je(ne.key),Ne=""+ne.key),Ke(ne)&&(We=ne.ref,At(ne,Ie));for(Fe in ne)F.call(ne,Fe)&&!Ve.hasOwnProperty(Fe)&&(_e[Fe]=ne[Fe]);if(N&&N.defaultProps){var Ge=N.defaultProps;for(Fe in Ge)_e[Fe]===void 0&&(_e[Fe]=Ge[Fe])}if(Ne||We){var Ye=typeof N=="function"?N.displayName||N.name||"Unknown":N;Ne&&st(_e,Ye),We&&mt(_e,Ye)}return ut(N,Ne,We,Ie,Ce,$e.current,_e)}}var gt=d.ReactCurrentOwner,Pt=d.ReactDebugCurrentFrame;function yt(N){if(N){var ne=N._owner,he=Y(N.type,N._source,ne?ne.type:null);Pt.setExtraStackFrame(he)}else Pt.setExtraStackFrame(null)}var wt;wt=!1;function on(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function Sn(){{if(gt.current){var N=M(gt.current.type);if(N)return`
22
+
23
+ Check the render method of \``+N+"`."}return""}}function A(N){{if(N!==void 0){var ne=N.fileName.replace(/^.*[\\\/]/,""),he=N.lineNumber;return`
24
+
25
+ Check your code at `+ne+":"+he+"."}return""}}var H={};function X(N){{var ne=Sn();if(!ne){var he=typeof N=="string"?N:N.displayName||N.name;he&&(ne=`
26
+
27
+ Check the top-level render call using <`+he+">.")}return ne}}function ie(N,ne){{if(!N._store||N._store.validated||N.key!=null)return;N._store.validated=!0;var he=X(ne);if(H[he])return;H[he]=!0;var Ce="";N&&N._owner&&N._owner!==gt.current&&(Ce=" It was passed a child from "+M(N._owner.type)+"."),yt(N),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',he,Ce),yt(null)}}function pe(N,ne){{if(typeof N!="object")return;if(ae(N))for(var he=0;he<N.length;he++){var Ce=N[he];on(Ce)&&ie(Ce,ne)}else if(on(N))N._store&&(N._store.validated=!0);else if(N){var Ie=f(N);if(typeof Ie=="function"&&Ie!==N.entries)for(var Fe=Ie.call(N),_e;!(_e=Fe.next()).done;)on(_e.value)&&ie(_e.value,ne)}}}function Se(N){{var ne=N.type;if(ne==null||typeof ne=="string")return;var he;if(typeof ne=="function")he=ne.propTypes;else if(typeof ne=="object"&&(ne.$$typeof===h||ne.$$typeof===b))he=ne.propTypes;else return;if(he){var Ce=M(ne);oe(he,N.props,"prop",Ce,N)}else if(ne.PropTypes!==void 0&&!wt){wt=!0;var Ie=M(ne);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof ne.getDefaultProps=="function"&&!ne.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function we(N){{for(var ne=Object.keys(N.props),he=0;he<ne.length;he++){var Ce=ne[he];if(Ce!=="children"&&Ce!=="key"){yt(N),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ce),yt(null);break}}N.ref!==null&&(yt(N),p("Invalid attribute `ref` supplied to `React.Fragment`."),yt(null))}}function ve(N,ne,he,Ce,Ie,Fe){{var _e=I(N);if(!_e){var Ne="";(N===void 0||typeof N=="object"&&N!==null&&Object.keys(N).length===0)&&(Ne+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var We=A(Ie);We?Ne+=We:Ne+=Sn();var Ge;N===null?Ge="null":ae(N)?Ge="array":N!==void 0&&N.$$typeof===t?(Ge="<"+(M(N.type)||"Unknown")+" />",Ne=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof N,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,Ne)}var Ye=Ht(N,ne,he,Ie,Fe);if(Ye==null)return Ye;if(_e){var ht=ne.children;if(ht!==void 0)if(Ce)if(ae(ht)){for(var Te=0;Te<ht.length;Te++)pe(ht[Te],N);Object.freeze&&Object.freeze(ht)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else pe(ht,N)}return N===r?we(Ye):Se(Ye),Ye}}function Oe(N,ne,he){return ve(N,ne,he,!0)}function Pe(N,ne,he){return ve(N,ne,he,!1)}var lt=Pe,ct=Oe;Kn.Fragment=r,Kn.jsx=lt,Kn.jsxs=ct}()),Kn}process.env.NODE_ENV==="production"?Go.exports=Ku():Go.exports=Wu();var C=Go.exports,Bn=(e=>(e.REDEEM_GIFTCARD="REDEEM_GIFTCARD",e.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",e.PORTAL="PORTAL",e.PREPAID="PREPAID",e.SAVE="SAVE",e.VOUCHER="VOUCHER",e))(Bn||{}),Zt=(e=>(e.REDEEM_GIFTCARD="/redeem_giftcard",e.TOP_UP_GIFTCARD="/top_up_giftcard",e.PORTAL="/portal",e.PREPAID="/prepaid",e.SAVE="/save",e.VOUCHER="/voucher",e))(Zt||{});const Gu={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class qr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Gu,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new qr(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new qr(this.logger,t)}}var qt=new qr;class Kr{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[u,h]=s;for(let v=0;v<h;v++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[u,h]=s;for(let v=0;v<h;v++)u.apply(u,[t,...r])})}}function Wn(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function qa(e){return e==null?"":""+e}function Yu(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const Qu=/###/g;function Gn(e,t,n){function r(u){return u&&u.indexOf("###")>-1?u.replace(Qu,"."):u}function i(){return!e||typeof e=="string"}const a=typeof t!="string"?t:t.split(".");let s=0;for(;s<a.length-1;){if(i())return{};const u=r(a[s]);!e[u]&&n&&(e[u]=new n),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return i()?{}:{obj:e,k:r(a[s])}}function Ka(e,t,n){const{obj:r,k:i}=Gn(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],s=t.slice(0,t.length-1),u=Gn(e,s,Object);for(;u.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),u=Gn(e,s,Object),u&&u.obj&&typeof u.obj[`${u.k}.${a}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${a}`]=n}function Xu(e,t,n,r){const{obj:i,k:a}=Gn(e,t,Object);i[a]=i[a]||[],r&&(i[a]=i[a].concat(n)),r||i[a].push(n)}function Wr(e,t){const{obj:n,k:r}=Gn(e,t);if(n)return n[r]}function Ju(e,t,n){const r=Wr(e,n);return r!==void 0?r:Wr(t,n)}function Wa(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Wa(e[r],t[r],n):e[r]=t[r]);return e}function On(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Zu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ed(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>Zu[t]):e}class td{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const nd=[" ",",","?","!",";"],rd=new td(20);function od(e,t,n){t=t||"",n=n||"";const r=nd.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=rd.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!i.test(e);if(!a){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(a=!0)}return a}function Yo(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let a=0;a<r.length;){if(!i||typeof i!="object")return;let s,u="";for(let h=a;h<r.length;++h)if(h!==a&&(u+=n),u+=r[h],s=i[u],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&h<r.length-1)continue;a+=h-a+1;break}i=s}return i}function Gr(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class Ga extends Kr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):typeof r=="string"&&a?u.push(...r.split(a)):u.push(r)));const h=Wr(this.data,u);return!h&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),h||!s||typeof r!="string"?h:Yo(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=[t,n];r&&(u=u.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(u=t.split("."),i=n,n=u[1]),this.addNamespaces(n),Ka(this.data,u,i),a.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Object.prototype.toString.apply(r[a])==="[object Array]")&&this.addResource(t,n,a,r[a],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),i=r,r=n,n=u[1]),this.addNamespaces(n);let h=Wr(this.data,u)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?Wa(h,r,a):h={...h,...r},Ka(this.data,u,h),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var Ya={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,i))}),t}};const Qa={};class Yr extends Kr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Yu(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=qt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!od(t,r,i);if(s&&!u){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:a};const v=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(v[0])>-1)&&(a=v.shift()),t=v.join(i)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:u}=this.extractFromKey(t[t.length-1],n),h=u[u.length-1],v=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(m){const x=n.nsSeparator||this.options.nsSeparator;return i?{res:`${h}${x}${s}`,usedKey:s,exactUsedKey:s,usedLng:v,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:`${h}${x}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:v,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:s}const b=this.resolve(t,n);let l=b&&b.res;const g=b&&b.usedKey||s,o=b&&b.exactUsedKey||s,c=Object.prototype.toString.apply(l),f=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,p=!this.i18nFormat||this.i18nFormat.handleAsObject;if(p&&l&&(typeof l!="string"&&typeof l!="boolean"&&typeof l!="number")&&f.indexOf(c)<0&&!(typeof d=="string"&&c==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,l,{...n,ns:u}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(b.res=x,b.usedParams=this.getUsedParamsDetails(n),b):x}if(a){const x=c==="[object Array]",E=x?[]:{},S=x?o:g;for(const k in l)if(Object.prototype.hasOwnProperty.call(l,k)){const B=`${S}${a}${k}`;E[k]=this.translate(B,{...n,joinArrays:!1,ns:u}),E[k]===B&&(E[k]=l[k])}l=E}}else if(p&&typeof d=="string"&&c==="[object Array]")l=l.join(d),l&&(l=this.extendTranslation(l,t,n,r));else{let x=!1,E=!1;const S=n.count!==void 0&&typeof n.count!="string",k=Yr.hasDefaultValue(n),B=S?this.pluralResolver.getSuffix(v,n.count,n):"",O=n.ordinal&&S?this.pluralResolver.getSuffix(v,n.count,{ordinal:!1}):"",I=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),L=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${B}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(l)&&k&&(x=!0,l=L),this.isValidLookup(l)||(E=!0,l=s);const M=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:l,$=k&&L!==l&&this.options.updateMissing;if(E||x||$){if(this.logger.log($?"updateKey":"missingKey",v,h,s,$?L:l),a){const K=this.resolve(s,{...n,keySeparator:!1});K&&K.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let P=[];const R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&R&&R[0])for(let K=0;K<R.length;K++)P.push(R[K]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(n.lng||this.language):P.push(n.lng||this.language);const q=(K,J,Z)=>{const ee=k&&Z!==l?Z:M;this.options.missingKeyHandler?this.options.missingKeyHandler(K,h,J,ee,$,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(K,h,J,ee,$,n),this.emit("missingKey",K,h,J,l)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?P.forEach(K=>{const J=this.pluralResolver.getSuffixes(K,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&J.indexOf(`${this.options.pluralSeparator}zero`)<0&&J.push(`${this.options.pluralSeparator}zero`),J.forEach(Z=>{q([K],s+Z,n[`defaultValue${Z}`]||L)})}):q(P,s,L))}l=this.extendTranslation(l,t,n,b,r),E&&l===s&&this.options.appendNamespaceToMissingKey&&(l=`${h}:${s}`),(E||x)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?l=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${s}`:s,x?l:void 0):l=this.options.parseMissingKeyHandler(l))}return i?(b.res=l,b.usedParams=this.getUsedParamsDetails(n),b):l}extendTranslation(t,n,r,i,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const v=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(v){const l=t.match(this.interpolator.nestingRegexp);m=l&&l.length}let b=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(b={...this.options.interpolation.defaultVariables,...b}),t=this.interpolator.interpolate(t,b,r.lng||this.language,r),v){const l=t.match(this.interpolator.nestingRegexp),g=l&&l.length;m<g&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var l=arguments.length,g=new Array(l),o=0;o<l;o++)g[o]=arguments[o];return a&&a[0]===g[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${n[0]}`),null):s.translate(...g,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,h=typeof u=="string"?[u]:u;return t!=null&&h&&h.length&&r.applyPostProcessor!==!1&&(t=Ya.handle(h,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,a,s,u;return typeof t=="string"&&(t=[t]),t.forEach(h=>{if(this.isValidLookup(r))return;const v=this.extractFromKey(h,n),m=v.key;i=m;let b=v.namespaces;this.options.fallbackNS&&(b=b.concat(this.options.fallbackNS));const l=n.count!==void 0&&typeof n.count!="string",g=l&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),o=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",c=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);b.forEach(f=>{this.isValidLookup(r)||(u=f,!Qa[`${c[0]}-${f}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(u)&&(Qa[`${c[0]}-${f}`]=!0,this.logger.warn(`key "${i}" for languages "${c.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),c.forEach(d=>{if(this.isValidLookup(r))return;s=d;const p=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(p,m,d,f,n);else{let x;l&&(x=this.pluralResolver.getSuffix(d,n.count,n));const E=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(p.push(m+x),n.ordinal&&x.indexOf(S)===0&&p.push(m+x.replace(S,this.options.pluralSeparator)),g&&p.push(m+E)),o){const k=`${m}${this.options.contextSeparator}${n.context}`;p.push(k),l&&(p.push(k+x),n.ordinal&&x.indexOf(S)===0&&p.push(k+x.replace(S,this.options.pluralSeparator)),g&&p.push(k+E))}}let y;for(;y=p.pop();)this.isValidLookup(r)||(a=y,r=this.getResource(d,f,y,n))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:s,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const a of n)delete i[a]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Qo(e){return e.charAt(0).toUpperCase()+e.slice(1)}class Xa{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=qt.create("languageUtils")}getScriptPartFromCode(t){if(t=Gr(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Gr(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qo(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qo(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Qo(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],a=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&a(this.formatLanguageCode(s))}),i}}let id=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ad={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const sd=["v1","v2","v3"],ld=["v4"],Ja={zero:0,one:1,two:2,few:3,many:4,other:5};function cd(){const e={};return id.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:ad[t.fc]}})}),e}class ud{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=qt.create("pluralResolver"),(!this.options.compatibilityJSON||ld.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=cd()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Gr(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,a)=>Ja[i]-Ja[a]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!sd.includes(this.options.compatibilityJSON)}}function Za(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Ju(e,t,n);return!a&&i&&typeof n=="string"&&(a=Yo(e,n,r),a===void 0&&(a=Yo(t,n,r))),a}class dd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const n=t.interpolation;this.escape=n.escape!==void 0?n.escape:ed,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?On(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?On(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?On(n.nestingPrefix):n.nestingPrefixEscaped||On("$t("),this.nestingSuffix=n.nestingSuffix?On(n.nestingSuffix):n.nestingSuffixEscaped||On(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let a,s,u;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function v(o){return o.replace(/\$/g,"$$$$")}const m=o=>{if(o.indexOf(this.formatSeparator)<0){const p=Za(n,h,o,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(p,void 0,r,{...i,...n,interpolationkey:o}):p}const c=o.split(this.formatSeparator),f=c.shift().trim(),d=c.join(this.formatSeparator).trim();return this.format(Za(n,h,f,this.options.keySeparator,this.options.ignoreJSONStructure),d,r,{...i,...n,interpolationkey:f})};this.resetRegExp();const b=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,l=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:o=>v(o)},{regex:this.regexp,safeValue:o=>this.escapeValue?v(this.escape(o)):v(o)}].forEach(o=>{for(u=0;a=o.regex.exec(t);){const c=a[1].trim();if(s=m(c),s===void 0)if(typeof b=="function"){const d=b(t,a,i);s=typeof d=="string"?d:""}else if(i&&Object.prototype.hasOwnProperty.call(i,c))s="";else if(l){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${c} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=qa(s));const f=o.safeValue(s);if(t=t.replace(a[0],f),l?(o.regex.lastIndex+=s.length,o.regex.lastIndex-=a[0].length):o.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,s;function u(h,v){const m=this.nestingOptionsSeparator;if(h.indexOf(m)<0)return h;const b=h.split(new RegExp(`${m}[ ]*{`));let l=`{${b[1]}`;h=b[0],l=this.interpolate(l,s);const g=l.match(/'/g),o=l.match(/"/g);(g&&g.length%2===0&&!o||o.length%2!==0)&&(l=l.replace(/'/g,'"'));try{s=JSON.parse(l),v&&(s={...v,...s})}catch(c){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,c),`${h}${m}${l}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,h}for(;i=this.nestingRegexp.exec(t);){let h=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let v=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const m=i[1].split(this.formatSeparator).map(b=>b.trim());i[1]=m.shift(),h=m,v=!0}if(a=n(u.call(this,i[1].trim(),s),s),a&&i[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=qa(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),v&&(a=h.reduce((m,b)=>this.format(m,b,r.lng,{...r,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}function fd(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(!s)return;const[u,...h]=s.split(":"),v=h.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=v),v==="false"&&(n[u.trim()]=!1),v==="true"&&(n[u.trim()]=!0),isNaN(v)||(n[u.trim()]=parseInt(v,10))})}return{formatName:t,formatOptions:n}}function Nn(e){const t={};return function(r,i,a){const s=i+JSON.stringify(a);let u=t[s];return u||(u=e(Gr(i),a),t[s]=u),u(r)}}class hd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=qt.create("formatter"),this.options=t,this.formats={number:Nn((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return a=>i.format(a)}),currency:Nn((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>i.format(a)}),datetime:Nn((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return a=>i.format(a)}),relativetime:Nn((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return a=>i.format(a,r.range||"day")}),list:Nn((n,r)=>{const i=new Intl.ListFormat(n,{...r});return a=>i.format(a)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Nn(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((u,h)=>{const{formatName:v,formatOptions:m}=fd(h);if(this.formats[v]){let b=u;try{const l=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=l.locale||l.lng||i.locale||i.lng||r;b=this.formats[v](u,g,{...m,...i,...l})}catch(l){this.logger.warn(l)}return b}else this.logger.warn(`there was no format function for ${v}`);return u},t)}}function pd(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class md extends Kr{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=qt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const a={},s={},u={},h={};return t.forEach(v=>{let m=!0;n.forEach(b=>{const l=`${v}|${b}`;!r.reload&&this.store.hasResourceBundle(v,b)?this.state[l]=2:this.state[l]<0||(this.state[l]===1?s[l]===void 0&&(s[l]=!0):(this.state[l]=1,m=!1,s[l]===void 0&&(s[l]=!0),a[l]===void 0&&(a[l]=!0),h[b]===void 0&&(h[b]=!0)))}),m||(u[v]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(h)}}loaded(t,n,r){const i=t.split("|"),a=i[0],s=i[1];n&&this.emit("failedLoading",a,s,n),r&&this.store.addResourceBundle(a,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const u={};this.queue.forEach(h=>{Xu(h.loaded,[a],s),pd(h,t),n&&h.errors.push(n),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(v=>{u[v]||(u[v]={});const m=h.loaded[v];m.length&&m.forEach(b=>{u[v][b]===void 0&&(u[v][b]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(h=>!h.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:a,callback:s});return}this.readingCalls++;const u=(v,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const b=this.waitingReads.shift();this.read(b.lng,b.ns,b.fcName,b.tried,b.wait,b.callback)}if(v&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,a*2,s)},a);return}s(v,m)},h=this.backend[r].bind(this.backend);if(h.length===2){try{const v=h(t,n);v&&typeof v.then=="function"?v.then(m=>u(null,m)).catch(u):u(null,v)}catch(v){u(v)}return}return h(t,n,u)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],a=r[1];this.read(i,a,"read",void 0,void 0,(s,u)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${i} failed`,s),!s&&u&&this.logger.log(`${n}loaded namespace ${a} for language ${i}`,u),this.loaded(t,s,u)})}saveMissing(t,n,r,i,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const h={...s,isUpdate:a},v=this.backend.create.bind(this.backend);if(v.length<6)try{let m;v.length===5?m=v(t,n,r,i,h):m=v(t,n,r,i),m&&typeof m.then=="function"?m.then(b=>u(null,b)).catch(u):u(null,m)}catch(m){u(m)}else v(t,n,r,i,u,h)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function es(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ts(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Qr(){}function gd(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Yn extends Kr{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ts(t),this.services={},this.logger=qt,this.modules={external:[]},gd(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=es();this.options={...i,...this.options,...ts(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?qt.init(a(this.modules.logger),this.options):qt.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl<"u"&&(m=hd);const b=new Xa(this.options);this.store=new Ga(this.options.resources,this.options);const l=this.services;l.logger=qt,l.resourceStore=this.store,l.languageUtils=b,l.pluralResolver=new ud(b,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(l.formatter=a(m),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new dd(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new md(a(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(g){for(var o=arguments.length,c=new Array(o>1?o-1:0),f=1;f<o;f++)c[f-1]=arguments[f];t.emit(g,...c)}),this.modules.languageDetector&&(l.languageDetector=a(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=a(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Yr(this.services,this.options),this.translator.on("*",function(g){for(var o=arguments.length,c=new Array(o>1?o-1:0),f=1;f<o;f++)c[f-1]=arguments[f];t.emit(g,...c)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Qr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return t.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return t.store[m](...arguments),t}});const h=Wn(),v=()=>{const m=(b,l)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(l),r(b,l)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?v():setTimeout(v,0),h}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qr;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],s=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(v=>{v!=="cimode"&&a.indexOf(v)<0&&a.push(v)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>s(h)),this.options.preload&&this.options.preload.forEach(u=>s(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const i=Wn();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Qr),this.services.backendConnector.reload(t,n,a=>{i.resolve(),r(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Ya.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Wn();this.emit("languageChanging",t);const a=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},s=(h,v)=>{v?(a(v),this.translator.changeLanguage(v),this.isLanguageChangingTo=void 0,this.emit("languageChanged",v),this.logger.log("languageChanged",v)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(h,function(){return r.t(...arguments)})},u=h=>{!t&&!h&&this.services.languageDetector&&(h=[]);const v=typeof h=="string"?h:this.services.languageUtils.getBestMatchFromCodes(h);v&&(this.language||a(v),this.translator.language||this.translator.changeLanguage(v),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(v)),this.loadResources(v,m=>{s(m,v)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),i}getFixedT(t,n,r){var i=this;const a=function(s,u){let h;if(typeof u!="object"){for(var v=arguments.length,m=new Array(v>2?v-2:0),b=2;b<v;b++)m[b-2]=arguments[b];h=i.options.overloadTranslationOptionHandler([s,u].concat(m))}else h={...u};h.lng=h.lng||a.lng,h.lngs=h.lngs||a.lngs,h.ns=h.ns||a.ns,h.keyPrefix=h.keyPrefix||r||a.keyPrefix;const l=i.options.keySeparator||".";let g;return h.keyPrefix&&Array.isArray(s)?g=s.map(o=>`${h.keyPrefix}${l}${o}`):g=h.keyPrefix?`${h.keyPrefix}${l}${s}`:s,i.t(g,h)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,h)=>{const v=this.services.backendConnector.state[`${u}|${h}`];return v===-1||v===2};if(n.precheck){const u=n.precheck(this,s);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(a,t)))}loadNamespaces(t,n){const r=Wn();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Wn();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],a=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=i.concat(a),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new Xa(es());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Yn(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qr;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new Yn(i);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(u=>{a[u]=this[u]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Ga(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Yr(a.services,i),a.translator.on("*",function(u){for(var h=arguments.length,v=new Array(h>1?h-1:0),m=1;m<h;m++)v[m-1]=arguments[m];a.emit(u,...v)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ft=Yn.createInstance();ft.createInstance=Yn.createInstance,ft.createInstance,ft.dir,ft.init,ft.loadResources,ft.reloadResources,ft.use,ft.changeLanguage,ft.getFixedT,ft.t,ft.exists,ft.setDefaultNamespace,ft.hasLoadedNamespace,ft.loadNamespaces,ft.loadLanguages;const Qn=(e,t="EUR")=>new Intl.NumberFormat(ft.language,{style:"currency",currency:t??"EUR"}).format(e/100);function ns(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=ns(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ns(e))&&(r&&(r+=" "),r+=t);return r}const Xn=e=>typeof e=="number"&&!isNaN(e),yn=e=>typeof e=="string",Et=e=>typeof e=="function",Xr=e=>yn(e)||Et(e)?e:null,Xo=e=>z.isValidElement(e)||yn(e)||Et(e)||Xn(e);function yd(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function Jr(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}=e;return function(s){let{children:u,position:h,preventExitTransition:v,done:m,nodeRef:b,isIn:l,playToast:g}=s;const o=r?`${t}--${h}`:t,c=r?`${n}--${h}`:n,f=z.useRef(0);return z.useLayoutEffect(()=>{const d=b.current,p=o.split(" "),y=x=>{x.target===b.current&&(g(),d.removeEventListener("animationend",y),d.removeEventListener("animationcancel",y),f.current===0&&x.type!=="animationcancel"&&d.classList.remove(...p))};d.classList.add(...p),d.addEventListener("animationend",y),d.addEventListener("animationcancel",y)},[]),z.useEffect(()=>{const d=b.current,p=()=>{d.removeEventListener("animationend",p),i?yd(d,m,a):m()};l||(v?p():(f.current=1,d.className+=` ${c}`,d.addEventListener("animationend",p)))},[l]),z.createElement(z.Fragment,null,u)}}function rs(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const vt=new Map;let Jn=[];const Jo=new Set,vd=e=>Jo.forEach(t=>t(e)),os=()=>vt.size>0;function is(e,t){var n;if(t)return!((n=vt.get(t))==null||!n.isToastActive(e));let r=!1;return vt.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function as(e,t){Xo(e)&&(os()||Jn.push({content:e,options:t}),vt.forEach(n=>{n.buildToast(e,t)}))}function ss(e,t){vt.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function bd(e){const{subscribe:t,getSnapshot:n,setProps:r}=z.useRef(function(a){const s=a.containerId||1;return{subscribe(u){const h=function(m,b,l){let g=1,o=0,c=[],f=[],d=[],p=b;const y=new Map,x=new Set,E=()=>{d=Array.from(y.values()),x.forEach(B=>B())},S=B=>{f=B==null?[]:f.filter(O=>O!==B),E()},k=B=>{const{toastId:O,onOpen:I,updateId:L,children:D}=B.props,M=L==null;B.staleId&&y.delete(B.staleId),y.set(O,B),f=[...f,B.props.toastId].filter($=>$!==B.staleId),E(),l(rs(B,M?"added":"updated")),M&&Et(I)&&I(z.isValidElement(D)&&D.props)};return{id:m,props:p,observe:B=>(x.add(B),()=>x.delete(B)),toggle:(B,O)=>{y.forEach(I=>{O!=null&&O!==I.props.toastId||Et(I.toggle)&&I.toggle(B)})},removeToast:S,toasts:y,clearQueue:()=>{o-=c.length,c=[]},buildToast:(B,O)=>{if((ue=>{let{containerId:te,toastId:ge,updateId:de}=ue;const V=te?te!==m:m!==1,U=y.has(ge)&&de==null;return V||U})(O))return;const{toastId:I,updateId:L,data:D,staleId:M,delay:$}=O,P=()=>{S(I)},R=L==null;R&&o++;const q={...p,style:p.toastStyle,key:g++,...Object.fromEntries(Object.entries(O).filter(ue=>{let[te,ge]=ue;return ge!=null})),toastId:I,updateId:L,data:D,closeToast:P,isIn:!1,className:Xr(O.className||p.toastClassName),bodyClassName:Xr(O.bodyClassName||p.bodyClassName),progressClassName:Xr(O.progressClassName||p.progressClassName),autoClose:!O.isLoading&&(K=O.autoClose,J=p.autoClose,K===!1||Xn(K)&&K>0?K:J),deleteToast(){const ue=y.get(I),{onClose:te,children:ge}=ue.props;Et(te)&&te(z.isValidElement(ge)&&ge.props),l(rs(ue,"removed")),y.delete(I),o--,o<0&&(o=0),c.length>0?k(c.shift()):E()}};var K,J;q.closeButton=p.closeButton,O.closeButton===!1||Xo(O.closeButton)?q.closeButton=O.closeButton:O.closeButton===!0&&(q.closeButton=!Xo(p.closeButton)||p.closeButton);let Z=B;z.isValidElement(B)&&!yn(B.type)?Z=z.cloneElement(B,{closeToast:P,toastProps:q,data:D}):Et(B)&&(Z=B({closeToast:P,toastProps:q,data:D}));const ee={content:Z,props:q,staleId:M};p.limit&&p.limit>0&&o>p.limit&&R?c.push(ee):Xn($)?setTimeout(()=>{k(ee)},$):k(ee)},setProps(B){p=B},setToggle:(B,O)=>{y.get(B).toggle=O},isToastActive:B=>f.some(O=>O===B),getSnapshot:()=>p.newestOnTop?d.reverse():d}}(s,a,vd);vt.set(s,h);const v=h.observe(u);return Jn.forEach(m=>as(m.content,m.options)),Jn=[],()=>{v(),vt.delete(s)}},setProps(u){var h;(h=vt.get(s))==null||h.setProps(u)},getSnapshot(){var u;return(u=vt.get(s))==null?void 0:u.getSnapshot()}}}(e)).current;r(e);const i=z.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!i)return[];const s=new Map;return i.forEach(u=>{const{position:h}=u.props;s.has(h)||s.set(h,[]),s.get(h).push(u)}),Array.from(s,u=>a(u[0],u[1]))},isToastActive:is,count:i==null?void 0:i.length}}function wd(e){const[t,n]=z.useState(!1),[r,i]=z.useState(!1),a=z.useRef(null),s=z.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:u,pauseOnHover:h,closeToast:v,onClick:m,closeOnClick:b}=e;var l,g;function o(){n(!0)}function c(){n(!1)}function f(y){const x=a.current;s.canDrag&&x&&(s.didMove=!0,t&&c(),s.delta=e.draggableDirection==="x"?y.clientX-s.start:y.clientY-s.start,s.start!==y.clientX&&(s.canCloseOnClick=!1),x.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,x.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function d(){document.removeEventListener("pointermove",f),document.removeEventListener("pointerup",d);const y=a.current;if(s.canDrag&&s.didMove&&y){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(g=vt.get((l={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||g.setToggle(l.id,l.fn),z.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||c(),window.addEventListener("focus",o),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",o),window.removeEventListener("blur",c)}},[e.pauseOnFocusLoss]);const p={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){s.didMove=!1,document.addEventListener("pointermove",f),document.addEventListener("pointerup",d);const x=a.current;s.canCloseOnClick=!0,s.canDrag=!0,x.style.transition="none",e.draggableDirection==="x"?(s.start=y.clientX,s.removalDistance=x.offsetWidth*(e.draggablePercent/100)):(s.start=y.clientY,s.removalDistance=x.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:x,bottom:E,left:S,right:k}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=S&&y.clientX<=k&&y.clientY>=x&&y.clientY<=E?c():o()}};return u&&h&&(p.onMouseEnter=c,e.stacked||(p.onMouseLeave=o)),b&&(p.onClick=y=>{m&&m(y),s.canCloseOnClick&&v()}),{playToast:o,pauseToast:c,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:p}}function xd(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:a,className:s,style:u,controlledProgress:h,progress:v,rtl:m,isIn:b,theme:l}=e;const g=a||h&&v===0,o={...u,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};h&&(o.transform=`scaleX(${v})`);const c=sn("Toastify__progress-bar",h?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":m}),f=Et(s)?s({rtl:m,type:i,defaultClassName:c}):sn(c,s),d={[h&&v>=1?"onTransitionEnd":"onAnimationEnd"]:h&&v<1?null:()=>{b&&r()}};return z.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":g},z.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${i}`}),z.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:f,style:o,...d}))}let kd=1;const ls=()=>""+kd++;function Cd(e){return e&&(yn(e.toastId)||Xn(e.toastId))?e.toastId:ls()}function Zn(e,t){return as(e,t),t.toastId}function Zr(e,t){return{...t,type:t&&t.type||e,toastId:Cd(t)}}function eo(e){return(t,n)=>Zn(t,Zr(e,n))}function Re(e,t){return Zn(e,Zr("default",t))}Re.loading=(e,t)=>Zn(e,Zr("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Re.promise=function(e,t,n){let r,{pending:i,error:a,success:s}=t;i&&(r=yn(i)?Re.loading(i,n):Re.loading(i.render,{...n,...i}));const u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},h=(m,b,l)=>{if(b==null)return void Re.dismiss(r);const g={type:m,...u,...n,data:l},o=yn(b)?{render:b}:b;return r?Re.update(r,{...g,...o}):Re(o.render,{...g,...o}),l},v=Et(e)?e():e;return v.then(m=>h("success",s,m)).catch(m=>h("error",a,m)),v},Re.success=eo("success"),Re.info=eo("info"),Re.error=eo("error"),Re.warning=eo("warning"),Re.warn=Re.warning,Re.dark=(e,t)=>Zn(e,Zr("default",{theme:"dark",...t})),Re.dismiss=function(e){(function(t){var n;if(os()){if(t==null||yn(n=t)||Xn(n))vt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=vt.get(t.containerId);r?r.removeToast(t.id):vt.forEach(i=>{i.removeToast(t.id)})}}else Jn=Jn.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Re.clearWaitingQueue=function(e){e===void 0&&(e={}),vt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Re.isActive=is,Re.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var a;let{containerId:s}=i;return(a=vt.get(s||1))==null?void 0:a.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:ls()};a.toastId!==e&&(a.staleId=e);const s=a.render||i;delete a.render,Zn(s,a)}},Re.done=e=>{Re.update(e,{progress:1})},Re.onChange=function(e){return Jo.add(e),()=>{Jo.delete(e)}},Re.play=e=>ss(!0,e),Re.pause=e=>ss(!1,e);const Ed=typeof window<"u"?z.useLayoutEffect:z.useEffect,to=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return z.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},Zo={info:function(e){return z.createElement(to,{...e},z.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return z.createElement(to,{...e},z.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return z.createElement(to,{...e},z.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return z.createElement(to,{...e},z.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return z.createElement("div",{className:"Toastify__spinner"})}},Sd=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:a}=wd(e),{closeButton:s,children:u,autoClose:h,onClick:v,type:m,hideProgressBar:b,closeToast:l,transition:g,position:o,className:c,style:f,bodyClassName:d,bodyStyle:p,progressClassName:y,progressStyle:x,updateId:E,role:S,progress:k,rtl:B,toastId:O,deleteToast:I,isIn:L,isLoading:D,closeOnClick:M,theme:$}=e,P=sn("Toastify__toast",`Toastify__toast-theme--${$}`,`Toastify__toast--${m}`,{"Toastify__toast--rtl":B},{"Toastify__toast--close-on-click":M}),R=Et(c)?c({rtl:B,position:o,type:m,defaultClassName:P}):sn(P,c),q=function(ee){let{theme:ue,type:te,isLoading:ge,icon:de}=ee,V=null;const U={theme:ue,type:te};return de===!1||(Et(de)?V=de({...U,isLoading:ge}):z.isValidElement(de)?V=z.cloneElement(de,U):ge?V=Zo.spinner():(Q=>Q in Zo)(te)&&(V=Zo[te](U))),V}(e),K=!!k||!h,J={closeToast:l,type:m,theme:$};let Z=null;return s===!1||(Z=Et(s)?s(J):z.isValidElement(s)?z.cloneElement(s,J):function(ee){let{closeToast:ue,theme:te,ariaLabel:ge="close"}=ee;return z.createElement("button",{className:`Toastify__close-button Toastify__close-button--${te}`,type:"button",onClick:de=>{de.stopPropagation(),ue(de)},"aria-label":ge},z.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},z.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(J)),z.createElement(g,{isIn:L,done:I,position:o,preventExitTransition:n,nodeRef:r,playToast:a},z.createElement("div",{id:O,onClick:v,"data-in":L,className:R,...i,style:f,ref:r},z.createElement("div",{...L&&{role:S},className:Et(d)?d({type:m}):sn("Toastify__toast-body",d),style:p},q!=null&&z.createElement("div",{className:sn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},q),z.createElement("div",null,u)),Z,z.createElement(xd,{...E&&!K?{key:`pb-${E}`}:{},rtl:B,theme:$,delay:h,isRunning:t,isIn:L,closeToast:l,hide:b,type:m,style:x,className:y,controlledProgress:K,progress:k||0})))},no=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Pd=Jr(no("bounce",!0));Jr(no("slide",!0)),Jr(no("zoom")),Jr(no("flip"));const Bd={position:"top-right",transition:Pd,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function cs(e){let t={...Bd,...e};const n=e.stacked,[r,i]=z.useState(!0),a=z.useRef(null),{getToastToRender:s,isToastActive:u,count:h}=bd(t),{className:v,style:m,rtl:b,containerId:l}=t;function g(c){const f=sn("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":b});return Et(v)?v({position:c,rtl:b,defaultClassName:f}):sn(f,Xr(v))}function o(){n&&(i(!0),Re.play())}return Ed(()=>{if(n){var c;const f=a.current.querySelectorAll('[data-in="true"]'),d=12,p=(c=t.position)==null?void 0:c.includes("top");let y=0,x=0;Array.from(f).reverse().forEach((E,S)=>{const k=E;k.classList.add("Toastify__toast--stacked"),S>0&&(k.dataset.collapsed=`${r}`),k.dataset.pos||(k.dataset.pos=p?"top":"bot");const B=y*(r?.2:1)+(r?0:d*S);k.style.setProperty("--y",`${p?B:-1*B}px`),k.style.setProperty("--g",`${d}`),k.style.setProperty("--s",""+(1-(r?x:0))),y+=k.offsetHeight,x+=.025})}},[r,h,n]),z.createElement("div",{ref:a,className:"Toastify",id:l,onMouseEnter:()=>{n&&(i(!1),Re.pause())},onMouseLeave:o},s((c,f)=>{const d=f.length?{...m}:{...m,pointerEvents:"none"};return z.createElement("div",{className:g(c),style:d,key:`container-${c}`},f.map(p=>{let{content:y,props:x}=p;return z.createElement(Sd,{...x,stacked:n,collapseAll:o,isIn:u(x.toastId,x.containerId),style:x.style,key:`toast-${x.key}`},y)}))}))}function us(e,t){return function(){return e.apply(t,arguments)}}const{toString:Od}=Object.prototype,{getPrototypeOf:ei}=Object,ro=(e=>t=>{const n=Od.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kt=e=>(e=e.toLowerCase(),t=>ro(t)===e),oo=e=>t=>typeof t===e,{isArray:_n}=Array,er=oo("undefined");function Nd(e){return e!==null&&!er(e)&&e.constructor!==null&&!er(e.constructor)&&Bt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ds=Kt("ArrayBuffer");function _d(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ds(e.buffer),t}const Td=oo("string"),Bt=oo("function"),fs=oo("number"),io=e=>e!==null&&typeof e=="object",jd=e=>e===!0||e===!1,ao=e=>{if(ro(e)!=="object")return!1;const t=ei(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Id=Kt("Date"),Ad=Kt("File"),Rd=Kt("Blob"),Ld=Kt("FileList"),Dd=e=>io(e)&&Bt(e.pipe),Md=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Bt(e.append)&&((t=ro(e))==="formdata"||t==="object"&&Bt(e.toString)&&e.toString()==="[object FormData]"))},Fd=Kt("URLSearchParams"),Ud=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),_n(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function hs(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ps=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ms=e=>!er(e)&&e!==ps;function ti(){const{caseless:e}=ms(this)&&this||{},t={},n=(r,i)=>{const a=e&&hs(t,i)||i;ao(t[a])&&ao(r)?t[a]=ti(t[a],r):ao(r)?t[a]=ti({},r):_n(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&tr(arguments[r],n);return t}const $d=(e,t,n,{allOwnKeys:r}={})=>(tr(t,(i,a)=>{n&&Bt(i)?e[a]=us(i,n):e[a]=i},{allOwnKeys:r}),e),Vd=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zd=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Hd=(e,t,n,r)=>{let i,a,s;const u={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&ei(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},qd=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Kd=e=>{if(!e)return null;if(_n(e))return e;let t=e.length;if(!fs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Wd=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ei(Uint8Array)),Gd=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Yd=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Qd=Kt("HTMLFormElement"),Xd=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),gs=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jd=Kt("RegExp"),ys=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};tr(n,(i,a)=>{let s;(s=t(i,a,e))!==!1&&(r[a]=s||i)}),Object.defineProperties(e,r)},Zd=e=>{ys(e,(t,n)=>{if(Bt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Bt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ef=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return _n(e)?r(e):r(String(e).split(t)),n},tf=()=>{},nf=(e,t)=>(e=+e,Number.isFinite(e)?e:t),ni="abcdefghijklmnopqrstuvwxyz",vs="0123456789",bs={DIGIT:vs,ALPHA:ni,ALPHA_DIGIT:ni+ni.toUpperCase()+vs},rf=(e=16,t=bs.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function of(e){return!!(e&&Bt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const af=e=>{const t=new Array(10),n=(r,i)=>{if(io(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=_n(r)?[]:{};return tr(r,(s,u)=>{const h=n(s,i+1);!er(h)&&(a[u]=h)}),t[i]=void 0,a}}return r};return n(e,0)},sf=Kt("AsyncFunction"),se={isArray:_n,isArrayBuffer:ds,isBuffer:Nd,isFormData:Md,isArrayBufferView:_d,isString:Td,isNumber:fs,isBoolean:jd,isObject:io,isPlainObject:ao,isUndefined:er,isDate:Id,isFile:Ad,isBlob:Rd,isRegExp:Jd,isFunction:Bt,isStream:Dd,isURLSearchParams:Fd,isTypedArray:Wd,isFileList:Ld,forEach:tr,merge:ti,extend:$d,trim:Ud,stripBOM:Vd,inherits:zd,toFlatObject:Hd,kindOf:ro,kindOfTest:Kt,endsWith:qd,toArray:Kd,forEachEntry:Gd,matchAll:Yd,isHTMLForm:Qd,hasOwnProperty:gs,hasOwnProp:gs,reduceDescriptors:ys,freezeMethods:Zd,toObjectSet:ef,toCamelCase:Xd,noop:tf,toFiniteNumber:nf,findKey:hs,global:ps,isContextDefined:ms,ALPHABET:bs,generateString:rf,isSpecCompliantForm:of,toJSONObject:af,isAsyncFn:sf,isThenable:e=>e&&(io(e)||Bt(e))&&Bt(e.then)&&Bt(e.catch)};function Me(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}se.inherits(Me,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ws=Me.prototype,xs={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xs[e]={value:e}}),Object.defineProperties(Me,xs),Object.defineProperty(ws,"isAxiosError",{value:!0}),Me.from=(e,t,n,r,i,a)=>{const s=Object.create(ws);return se.toFlatObject(e,s,function(h){return h!==Error.prototype},u=>u!=="isAxiosError"),Me.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const lf=null;function ri(e){return se.isPlainObject(e)||se.isArray(e)}function ks(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function Cs(e,t,n){return e?e.concat(t).map(function(i,a){return i=ks(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function cf(e){return se.isArray(e)&&!e.some(ri)}const uf=se.toFlatObject(se,{},null,function(t){return/^is[A-Z]/.test(t)});function so(e,t,n){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,f){return!se.isUndefined(f[c])});const r=n.metaTokens,i=n.visitor||m,a=n.dots,s=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&se.isSpecCompliantForm(t);if(!se.isFunction(i))throw new TypeError("visitor must be a function");function v(o){if(o===null)return"";if(se.isDate(o))return o.toISOString();if(!h&&se.isBlob(o))throw new Me("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(o)||se.isTypedArray(o)?h&&typeof Blob=="function"?new Blob([o]):Buffer.from(o):o}function m(o,c,f){let d=o;if(o&&!f&&typeof o=="object"){if(se.endsWith(c,"{}"))c=r?c:c.slice(0,-2),o=JSON.stringify(o);else if(se.isArray(o)&&cf(o)||(se.isFileList(o)||se.endsWith(c,"[]"))&&(d=se.toArray(o)))return c=ks(c),d.forEach(function(y,x){!(se.isUndefined(y)||y===null)&&t.append(s===!0?Cs([c],x,a):s===null?c:c+"[]",v(y))}),!1}return ri(o)?!0:(t.append(Cs(f,c,a),v(o)),!1)}const b=[],l=Object.assign(uf,{defaultVisitor:m,convertValue:v,isVisitable:ri});function g(o,c){if(!se.isUndefined(o)){if(b.indexOf(o)!==-1)throw Error("Circular reference detected in "+c.join("."));b.push(o),se.forEach(o,function(d,p){(!(se.isUndefined(d)||d===null)&&i.call(t,d,se.isString(p)?p.trim():p,c,l))===!0&&g(d,c?c.concat(p):[p])}),b.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Es(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function oi(e,t){this._pairs=[],e&&so(e,this,t)}const Ss=oi.prototype;Ss.append=function(t,n){this._pairs.push([t,n])},Ss.toString=function(t){const n=t?function(r){return t.call(this,r,Es)}:Es;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function df(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ps(e,t,n){if(!t)return e;const r=n&&n.encode||df,i=n&&n.serialize;let a;if(i?a=i(t,n):a=se.isURLSearchParams(t)?t.toString():new oi(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ff{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){se.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Bs=ff,Os={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},hf={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:oi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ns=typeof window<"u"&&typeof document<"u",pf=(e=>Ns&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),mf=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Wt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ns,hasStandardBrowserEnv:pf,hasStandardBrowserWebWorkerEnv:mf},Symbol.toStringTag,{value:"Module"})),...hf};function gf(e,t){return so(e,new Wt.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Wt.isNode&&se.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function yf(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function vf(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function _s(e){function t(n,r,i,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),h=a>=n.length;return s=!s&&se.isArray(i)?i.length:s,h?(se.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!u):((!i[s]||!se.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],a)&&se.isArray(i[s])&&(i[s]=vf(i[s])),!u)}if(se.isFormData(e)&&se.isFunction(e.entries)){const n={};return se.forEachEntry(e,(r,i)=>{t(yf(r),i,n,0)}),n}return null}function bf(e,t,n){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ii={transitional:Os,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=se.isObject(t);if(a&&se.isHTMLForm(t)&&(t=new FormData(t)),se.isFormData(t))return i?JSON.stringify(_s(t)):t;if(se.isArrayBuffer(t)||se.isBuffer(t)||se.isStream(t)||se.isFile(t)||se.isBlob(t))return t;if(se.isArrayBufferView(t))return t.buffer;if(se.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return gf(t,this.formSerializer).toString();if((u=se.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return so(u?{"files[]":t}:t,h&&new h,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),bf(t)):t}],transformResponse:[function(t){const n=this.transitional||ii.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&se.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(u){if(s)throw u.name==="SyntaxError"?Me.from(u,Me.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wt.classes.FormData,Blob:Wt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],e=>{ii.headers[e]={}});const ai=ii,wf=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xf=e=>{const t={};let n,r,i;return e&&e.split(`
28
+ `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&wf[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ts=Symbol("internals");function nr(e){return e&&String(e).trim().toLowerCase()}function lo(e){return e===!1||e==null?e:se.isArray(e)?e.map(lo):String(e)}function kf(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Cf=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function si(e,t,n,r,i){if(se.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!se.isString(t)){if(se.isString(r))return t.indexOf(r)!==-1;if(se.isRegExp(r))return r.test(t)}}function Ef(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Sf(e,t){const n=se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,s){return this[r].call(this,t,i,a,s)},configurable:!0})})}class co{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(u,h,v){const m=nr(h);if(!m)throw new Error("header name must be a non-empty string");const b=se.findKey(i,m);(!b||i[b]===void 0||v===!0||v===void 0&&i[b]!==!1)&&(i[b||h]=lo(u))}const s=(u,h)=>se.forEach(u,(v,m)=>a(v,m,h));return se.isPlainObject(t)||t instanceof this.constructor?s(t,n):se.isString(t)&&(t=t.trim())&&!Cf(t)?s(xf(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=nr(t),t){const r=se.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return kf(i);if(se.isFunction(n))return n.call(this,i,r);if(se.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=nr(t),t){const r=se.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||si(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(s){if(s=nr(s),s){const u=se.findKey(r,s);u&&(!n||si(r,r[u],u,n))&&(delete r[u],i=!0)}}return se.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||si(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return se.forEach(this,(i,a)=>{const s=se.findKey(r,a);if(s){n[s]=lo(i),delete n[a];return}const u=t?Ef(a):String(a).trim();u!==a&&delete n[a],n[u]=lo(i),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return se.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&se.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
29
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Ts]=this[Ts]={accessors:{}}).accessors,i=this.prototype;function a(s){const u=nr(s);r[u]||(Sf(i,s),r[u]=!0)}return se.isArray(t)?t.forEach(a):a(t),this}}co.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(co.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),se.freezeMethods(co);const en=co;function li(e,t){const n=this||ai,r=t||n,i=en.from(r.headers);let a=r.data;return se.forEach(e,function(u){a=u.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function js(e){return!!(e&&e.__CANCEL__)}function rr(e,t,n){Me.call(this,e??"canceled",Me.ERR_CANCELED,t,n),this.name="CanceledError"}se.inherits(rr,Me,{__CANCEL__:!0});function Pf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Me("Request failed with status code "+n.status,[Me.ERR_BAD_REQUEST,Me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Bf=Wt.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const s=[e+"="+encodeURIComponent(t)];se.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),se.isString(r)&&s.push("path="+r),se.isString(i)&&s.push("domain="+i),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Of(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Nf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Is(e,t){return e&&!Of(t)?Nf(e,t):t}const _f=Wt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let s=a;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const u=se.isString(s)?i(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}();function Tf(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jf(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,s;return t=t!==void 0?t:1e3,function(h){const v=Date.now(),m=r[a];s||(s=v),n[i]=h,r[i]=v;let b=a,l=0;for(;b!==i;)l+=n[b++],b=b%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),v-s<t)return;const g=m&&v-m;return g?Math.round(l*1e3/g):void 0}}function As(e,t){let n=0;const r=jf(50,250);return i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,u=a-n,h=r(u),v=a<=s;n=a;const m={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:h||void 0,estimated:h&&s&&v?(s-a)/h:void 0,event:i};m[t?"download":"upload"]=!0,e(m)}}const ci={http:lf,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=en.from(e.headers).normalize();let{responseType:s,withXSRFToken:u}=e,h;function v(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}let m;if(se.isFormData(i)){if(Wt.hasStandardBrowserEnv||Wt.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((m=a.getContentType())!==!1){const[c,...f]=m?m.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...f].join("; "))}}let b=new XMLHttpRequest;if(e.auth){const c=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(c+":"+f))}const l=Is(e.baseURL,e.url);b.open(e.method.toUpperCase(),Ps(l,e.params,e.paramsSerializer),!0),b.timeout=e.timeout;function g(){if(!b)return;const c=en.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),d={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:c,config:e,request:b};Pf(function(y){n(y),v()},function(y){r(y),v()},d),b=null}if("onloadend"in b?b.onloadend=g:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(g)},b.onabort=function(){b&&(r(new Me("Request aborted",Me.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Me("Network Error",Me.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let f=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const d=e.transitional||Os;e.timeoutErrorMessage&&(f=e.timeoutErrorMessage),r(new Me(f,d.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,e,b)),b=null},Wt.hasStandardBrowserEnv&&(u&&se.isFunction(u)&&(u=u(e)),u||u!==!1&&_f(l))){const c=e.xsrfHeaderName&&e.xsrfCookieName&&Bf.read(e.xsrfCookieName);c&&a.set(e.xsrfHeaderName,c)}i===void 0&&a.setContentType(null),"setRequestHeader"in b&&se.forEach(a.toJSON(),function(f,d){b.setRequestHeader(d,f)}),se.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),s&&s!=="json"&&(b.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&b.addEventListener("progress",As(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&b.upload&&b.upload.addEventListener("progress",As(e.onUploadProgress)),(e.cancelToken||e.signal)&&(h=c=>{b&&(r(!c||c.type?new rr(null,e,b):c),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h)));const o=Tf(l);if(o&&Wt.protocols.indexOf(o)===-1){r(new Me("Unsupported protocol "+o+":",Me.ERR_BAD_REQUEST,e));return}b.send(i||null)})}};se.forEach(ci,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Rs=e=>`- ${e}`,If=e=>se.isFunction(e)||e===null||e===!1,Ls={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!If(n)&&(r=ci[(s=String(n)).toLowerCase()],r===void 0))throw new Me(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+a]=r}if(!r){const a=Object.entries(i).map(([u,h])=>`adapter ${u} `+(h===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
30
+ `+a.map(Rs).join(`
31
+ `):" "+Rs(a[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:ci};function ui(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rr(null,e)}function Ds(e){return ui(e),e.headers=en.from(e.headers),e.data=li.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ls.getAdapter(e.adapter||ai.adapter)(e).then(function(r){return ui(e),r.data=li.call(e,e.transformResponse,r),r.headers=en.from(r.headers),r},function(r){return js(r)||(ui(e),r&&r.response&&(r.response.data=li.call(e,e.transformResponse,r.response),r.response.headers=en.from(r.response.headers))),Promise.reject(r)})}const Ms=e=>e instanceof en?{...e}:e;function Tn(e,t){t=t||{};const n={};function r(v,m,b){return se.isPlainObject(v)&&se.isPlainObject(m)?se.merge.call({caseless:b},v,m):se.isPlainObject(m)?se.merge({},m):se.isArray(m)?m.slice():m}function i(v,m,b){if(se.isUndefined(m)){if(!se.isUndefined(v))return r(void 0,v,b)}else return r(v,m,b)}function a(v,m){if(!se.isUndefined(m))return r(void 0,m)}function s(v,m){if(se.isUndefined(m)){if(!se.isUndefined(v))return r(void 0,v)}else return r(void 0,m)}function u(v,m,b){if(b in t)return r(v,m);if(b in e)return r(void 0,v)}const h={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(v,m)=>i(Ms(v),Ms(m),!0)};return se.forEach(Object.keys(Object.assign({},e,t)),function(m){const b=h[m]||i,l=b(e[m],t[m],m);se.isUndefined(l)&&b!==u||(n[m]=l)}),n}const Fs="1.6.8",di={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{di[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Us={};di.transitional=function(t,n,r){function i(a,s){return"[Axios v"+Fs+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,u)=>{if(t===!1)throw new Me(i(s," has been removed"+(n?" in "+n:"")),Me.ERR_DEPRECATED);return n&&!Us[s]&&(Us[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,u):!0}};function Af(e,t,n){if(typeof e!="object")throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],s=t[a];if(s){const u=e[a],h=u===void 0||s(u,a,e);if(h!==!0)throw new Me("option "+a+" must be "+h,Me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Me("Unknown option "+a,Me.ERR_BAD_OPTION)}}const fi={assertOptions:Af,validators:di},ln=fi.validators;class uo{constructor(t){this.defaults=t,this.interceptors={request:new Bs,response:new Bs}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
32
+ `+a):r.stack=a}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Tn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&fi.assertOptions(r,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean)},!1),i!=null&&(se.isFunction(i)?n.paramsSerializer={serialize:i}:fi.assertOptions(i,{encode:ln.function,serialize:ln.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&se.merge(a.common,a[n.method]);a&&se.forEach(["delete","get","head","post","put","patch","common"],o=>{delete a[o]}),n.headers=en.concat(s,a);const u=[];let h=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(n)===!1||(h=h&&c.synchronous,u.unshift(c.fulfilled,c.rejected))});const v=[];this.interceptors.response.forEach(function(c){v.push(c.fulfilled,c.rejected)});let m,b=0,l;if(!h){const o=[Ds.bind(this),void 0];for(o.unshift.apply(o,u),o.push.apply(o,v),l=o.length,m=Promise.resolve(n);b<l;)m=m.then(o[b++],o[b++]);return m}l=u.length;let g=n;for(b=0;b<l;){const o=u[b++],c=u[b++];try{g=o(g)}catch(f){c.call(this,f);break}}try{m=Ds.call(this,g)}catch(o){return Promise.reject(o)}for(b=0,l=v.length;b<l;)m=m.then(v[b++],v[b++]);return m}getUri(t){t=Tn(this.defaults,t);const n=Is(t.baseURL,t.url);return Ps(n,t.params,t.paramsSerializer)}}se.forEach(["delete","get","head","options"],function(t){uo.prototype[t]=function(n,r){return this.request(Tn(r||{},{method:t,url:n,data:(r||{}).data}))}}),se.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,u){return this.request(Tn(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}uo.prototype[t]=n(),uo.prototype[t+"Form"]=n(!0)});const fo=uo;class hi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const s=new Promise(u=>{r.subscribe(u),a=u}).then(i);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,u){r.reason||(r.reason=new rr(a,s,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new hi(function(i){t=i}),cancel:t}}}const Rf=hi;function Lf(e){return function(n){return e.apply(null,n)}}function Df(e){return se.isObject(e)&&e.isAxiosError===!0}const pi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pi).forEach(([e,t])=>{pi[t]=e});const Mf=pi;function $s(e){const t=new fo(e),n=us(fo.prototype.request,t);return se.extend(n,fo.prototype,t,{allOwnKeys:!0}),se.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return $s(Tn(e,i))},n}const ot=$s(ai);ot.Axios=fo,ot.CanceledError=rr,ot.CancelToken=Rf,ot.isCancel=js,ot.VERSION=Fs,ot.toFormData=so,ot.AxiosError=Me,ot.Cancel=ot.CanceledError,ot.all=function(t){return Promise.all(t)},ot.spread=Lf,ot.isAxiosError=Df,ot.mergeConfig=Tn,ot.AxiosHeaders=en,ot.formToJSON=e=>_s(se.isHTMLForm(e)?new FormData(e):e),ot.getAdapter=Ls.getAdapter,ot.HttpStatusCode=Mf,ot.default=ot;const Vs=ot,Ff=e=>{var n,r,i,a;const t=(n=e.response)==null?void 0:n.status;if(t&&t!==401){const s=(r=e.response)==null?void 0:r.data;console.table(s);const u=(i=e.response)==null?void 0:i.data.errors,h=C.jsxs("div",{children:[C.jsx("p",{children:(a=e.response)==null?void 0:a.data.message}),u&&Object.keys(u).map(v=>u[v].map(m=>C.jsx("li",{children:m},m)))]});Re.error(h)}return Promise.reject(e)};class Uf{constructor(){zu(this,"instance",Vs.create())}initialize(t,n){this.instance=Vs.create({baseURL:n||"https://api.piggy.eu",headers:{Authorization:`Bearer ${t}`}}),this.instance.interceptors.response.use(void 0,Ff)}}const it=new Uf;var mi={exports:{}},gi={};/**
33
+ * @license React
34
+ * use-sync-external-store-shim.production.min.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */var zs;function $f(){if(zs)return gi;zs=1;var e=z;function t(b,l){return b===l&&(b!==0||1/b===1/l)||b!==b&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(b,l){var g=l(),o=r({inst:{value:g,getSnapshot:l}}),c=o[0].inst,f=o[1];return a(function(){c.value=g,c.getSnapshot=l,h(c)&&f({inst:c})},[b,g,l]),i(function(){return h(c)&&f({inst:c}),b(function(){h(c)&&f({inst:c})})},[b]),s(g),g}function h(b){var l=b.getSnapshot;b=b.value;try{var g=l();return!n(b,g)}catch{return!0}}function v(b,l){return l()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:u;return gi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,gi}var yi={};/**
41
+ * @license React
42
+ * use-sync-external-store-shim.development.js
43
+ *
44
+ * Copyright (c) Facebook, Inc. and its affiliates.
45
+ *
46
+ * This source code is licensed under the MIT license found in the
47
+ * LICENSE file in the root directory of this source tree.
48
+ */var Hs;function Vf(){return Hs||(Hs=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=z,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(y){{for(var x=arguments.length,E=new Array(x>1?x-1:0),S=1;S<x;S++)E[S-1]=arguments[S];r("error",y,E)}}function r(y,x,E){{var S=t.ReactDebugCurrentFrame,k=S.getStackAddendum();k!==""&&(x+="%s",E=E.concat([k]));var B=E.map(function(O){return String(O)});B.unshift("Warning: "+x),Function.prototype.apply.call(console[y],console,B)}}function i(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var a=typeof Object.is=="function"?Object.is:i,s=e.useState,u=e.useEffect,h=e.useLayoutEffect,v=e.useDebugValue,m=!1,b=!1;function l(y,x,E){m||e.startTransition!==void 0&&(m=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=x();if(!b){var k=x();a(S,k)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),b=!0)}var B=s({inst:{value:S,getSnapshot:x}}),O=B[0].inst,I=B[1];return h(function(){O.value=S,O.getSnapshot=x,g(O)&&I({inst:O})},[y,S,x]),u(function(){g(O)&&I({inst:O});var L=function(){g(O)&&I({inst:O})};return y(L)},[y]),v(S),S}function g(y){var x=y.getSnapshot,E=y.value;try{var S=x();return!a(E,S)}catch{return!0}}function o(y,x,E){return x()}var c=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",f=!c,d=f?o:l,p=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d;yi.useSyncExternalStore=p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),yi}process.env.NODE_ENV==="production"?mi.exports=$f():mi.exports=Vf();var zf=mi.exports;const cn=()=>{},xt=cn(),vi=Object,Ue=e=>e===xt,Gt=e=>typeof e=="function",un=(e,t)=>({...e,...t}),Hf=e=>Gt(e.then),ho=new WeakMap;let qf=0;const or=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,a;if(vi(e)===e&&!r&&n!=RegExp){if(i=ho.get(e),i)return i;if(i=++qf+"~",ho.set(e,i),n==Array){for(i="@",a=0;a<e.length;a++)i+=or(e[a])+",";ho.set(e,i)}if(n==vi){i="#";const s=vi.keys(e).sort();for(;!Ue(a=s.pop());)Ue(e[a])||(i+=a+":"+or(e[a])+",");ho.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},tn=new WeakMap,bi={},po={},wi="undefined",mo=typeof window!=wi,xi=typeof document!=wi,Kf=()=>mo&&typeof window.requestAnimationFrame!=wi,qs=(e,t)=>{const n=tn.get(e);return[()=>!Ue(t)&&e.get(t)||bi,r=>{if(!Ue(t)){const i=e.get(t);t in po||(po[t]=i),n[5](t,un(i,r),i||bi)}},n[6],()=>!Ue(t)&&t in po?po[t]:!Ue(t)&&e.get(t)||bi]};let ki=!0;const Wf=()=>ki,[Ci,Ei]=mo&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[cn,cn],Gf=()=>{const e=xi&&document.visibilityState;return Ue(e)||e!=="hidden"},Yf=e=>(xi&&document.addEventListener("visibilitychange",e),Ci("focus",e),()=>{xi&&document.removeEventListener("visibilitychange",e),Ei("focus",e)}),Qf=e=>{const t=()=>{ki=!0,e()},n=()=>{ki=!1};return Ci("online",t),Ci("offline",n),()=>{Ei("online",t),Ei("offline",n)}},Xf={isOnline:Wf,isVisible:Gf},Jf={initFocus:Yf,initReconnect:Qf},Ks=!z.useId,ir=!mo||"Deno"in window,Zf=e=>Kf()?window.requestAnimationFrame(e):setTimeout(e,1),Si=ir?z.useEffect:z.useLayoutEffect,Pi=typeof navigator<"u"&&navigator.connection,Ws=!ir&&Pi&&(["slow-2g","2g"].includes(Pi.effectiveType)||Pi.saveData),Bi=e=>{if(Gt(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?or(e):"",[e,t]};let eh=0;const Oi=()=>++eh,Gs=0,Ys=1,Qs=2;var ar={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:Gs,MUTATE_EVENT:Qs,RECONNECT_EVENT:Ys};async function Xs(...e){const[t,n,r,i]=e,a=un({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let s=a.populateCache;const u=a.rollbackOnError;let h=a.optimisticData;const v=l=>typeof u=="function"?u(l):u!==!1,m=a.throwOnError;if(Gt(n)){const l=n,g=[],o=t.keys();for(const c of o)!/^\$(inf|sub)\$/.test(c)&&l(t.get(c)._k)&&g.push(c);return Promise.all(g.map(b))}return b(n);async function b(l){const[g]=Bi(l);if(!g)return;const[o,c]=qs(t,g),[f,d,p,y]=tn.get(t),x=()=>{const M=f[g];return(Gt(a.revalidate)?a.revalidate(o().data,l):a.revalidate!==!1)&&(delete p[g],delete y[g],M&&M[0])?M[0](Qs).then(()=>o().data):o().data};if(e.length<3)return x();let E=r,S;const k=Oi();d[g]=[k,0];const B=!Ue(h),O=o(),I=O.data,L=O._c,D=Ue(L)?I:L;if(B&&(h=Gt(h)?h(D,I):h,c({data:h,_c:D})),Gt(E))try{E=E(D)}catch(M){S=M}if(E&&Hf(E))if(E=await E.catch(M=>{S=M}),k!==d[g][0]){if(S)throw S;return E}else S&&B&&v(S)&&(s=!0,c({data:D,_c:xt}));if(s&&!S)if(Gt(s)){const M=s(E,D);c({data:M,error:xt,_c:xt})}else c({data:E,error:xt,_c:xt});if(d[g][1]=Oi(),Promise.resolve(x()).then(()=>{c({_c:xt})}),S){if(m)throw S;return}return E}}const Js=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},th=(e,t)=>{if(!tn.has(e)){const n=un(Jf,t),r={},i=Xs.bind(xt,e);let a=cn;const s={},u=(m,b)=>{const l=s[m]||[];return s[m]=l,l.push(b),()=>l.splice(l.indexOf(b),1)},h=(m,b,l)=>{e.set(m,b);const g=s[m];if(g)for(const o of g)o(b,l)},v=()=>{if(!tn.has(e)&&(tn.set(e,[r,{},{},{},i,h,u]),!ir)){const m=n.initFocus(setTimeout.bind(xt,Js.bind(xt,r,Gs))),b=n.initReconnect(setTimeout.bind(xt,Js.bind(xt,r,Ys)));a=()=>{m&&m(),b&&b(),tn.delete(e)}}};return v(),[e,i,v,a]}return[e,tn.get(e)[4]]},nh=(e,t,n,r,i)=>{const a=n.errorRetryCount,s=i.retryCount,u=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!Ue(a)&&s>a||setTimeout(r,u,i)},rh=(e,t)=>or(e)==or(t),[Zs,oh]=th(new Map),ih=un({onLoadingSlow:cn,onSuccess:cn,onError:cn,onErrorRetry:nh,onDiscarded:cn,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ws?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Ws?5e3:3e3,compare:rh,isPaused:()=>!1,cache:Zs,mutate:oh,fallback:{}},Xf),ah=(e,t)=>{const n=un(e,t);if(t){const{use:r,fallback:i}=e,{use:a,fallback:s}=t;r&&a&&(n.use=r.concat(a)),i&&s&&(n.fallback=un(i,s))}return n},sh=z.createContext({}),lh="$inf$",el=mo&&window.__SWR_DEVTOOLS_USE__,ch=el?window.__SWR_DEVTOOLS_USE__:[],uh=()=>{el&&(window.__SWR_DEVTOOLS_REACT__=z)},dh=e=>Gt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],fh=()=>un(ih,z.useContext(sh)),hh=e=>(t,n,r)=>e(t,n&&((...a)=>{const[s]=Bi(t),[,,,u]=tn.get(Zs);if(s.startsWith(lh))return n(...a);const h=u[s];return Ue(h)?n(...a):(delete u[s],h)}),r),ph=ch.concat(hh),mh=e=>function(...n){const r=fh(),[i,a,s]=dh(n),u=ah(r,s);let h=e;const{use:v}=u,m=(v||[]).concat(ph);for(let b=m.length;b--;)h=m[b](h);return h(i,a||u.fetcher||null,u)},gh=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};uh();const tl=z.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Ni={dedupe:!0},yh=mh((e,t,n)=>{const{cache:r,compare:i,suspense:a,fallbackData:s,revalidateOnMount:u,revalidateIfStale:h,refreshInterval:v,refreshWhenHidden:m,refreshWhenOffline:b,keepPreviousData:l}=n,[g,o,c,f]=tn.get(r),[d,p]=Bi(e),y=z.useRef(!1),x=z.useRef(!1),E=z.useRef(d),S=z.useRef(t),k=z.useRef(n),B=()=>k.current,O=()=>B().isVisible()&&B().isOnline(),[I,L,D,M]=qs(r,d),$=z.useRef({}).current,P=Ue(s)?n.fallback[d]:s,R=(T,W)=>{for(const G in $){const Y=G;if(Y==="data"){if(!i(T[Y],W[Y])&&(!Ue(T[Y])||!i(de,W[Y])))return!1}else if(W[Y]!==T[Y])return!1}return!0},q=z.useMemo(()=>{const T=(()=>!d||!t?!1:Ue(u)?B().isPaused()||a?!1:Ue(h)?!0:h:u)(),W=re=>{const oe=un(re);return delete oe._k,T?{isValidating:!0,isLoading:!0,...oe}:oe},G=I(),Y=M(),F=W(G),ce=G===Y?F:W(Y);let fe=F;return[()=>{const re=W(I());return R(re,fe)?(fe.data=re.data,fe.isLoading=re.isLoading,fe.isValidating=re.isValidating,fe.error=re.error,fe):(fe=re,re)},()=>ce]},[r,d]),K=zf.useSyncExternalStore(z.useCallback(T=>D(d,(W,G)=>{R(G,W)||T()}),[r,d]),q[0],q[1]),J=!y.current,Z=g[d]&&g[d].length>0,ee=K.data,ue=Ue(ee)?P:ee,te=K.error,ge=z.useRef(ue),de=l?Ue(ee)?ge.current:ee:ue,V=(()=>Z&&!Ue(te)?!1:J&&!Ue(u)?u:B().isPaused()?!1:a?Ue(ue)?!1:h:Ue(ue)||h)(),U=!!(d&&t&&J&&V),Q=Ue(K.isValidating)?U:K.isValidating,w=Ue(K.isLoading)?U:K.isLoading,_=z.useCallback(async T=>{const W=S.current;if(!d||!W||x.current||B().isPaused())return!1;let G,Y,F=!0;const ce=T||{},fe=!c[d]||!ce.dedupe,re=()=>Ks?!x.current&&d===E.current&&y.current:d===E.current,oe={isValidating:!1,isLoading:!1},ye=()=>{L(oe)},ae=()=>{const ke=c[d];ke&&ke[1]===Y&&delete c[d]},be={isValidating:!0};Ue(I().data)&&(be.isLoading=!0);try{if(fe&&(L(be),n.loadingTimeout&&Ue(I().data)&&setTimeout(()=>{F&&re()&&B().onLoadingSlow(d,n)},n.loadingTimeout),c[d]=[W(p),Oi()]),[G,Y]=c[d],G=await G,fe&&setTimeout(ae,n.dedupingInterval),!c[d]||c[d][1]!==Y)return fe&&re()&&B().onDiscarded(d),!1;oe.error=xt;const ke=o[d];if(!Ue(ke)&&(Y<=ke[0]||Y<=ke[1]||ke[1]===0))return ye(),fe&&re()&&B().onDiscarded(d),!1;const De=I().data;oe.data=i(De,G)?De:G,fe&&re()&&B().onSuccess(G,d,n)}catch(ke){ae();const De=B(),{shouldRetryOnError:je}=De;De.isPaused()||(oe.error=ke,fe&&re()&&(De.onError(ke,d,De),(je===!0||Gt(je)&&je(ke))&&(!B().revalidateOnFocus||!B().revalidateOnReconnect||O())&&De.onErrorRetry(ke,d,De,$e=>{const Ve=g[d];Ve&&Ve[0]&&Ve[0](ar.ERROR_REVALIDATE_EVENT,$e)},{retryCount:(ce.retryCount||0)+1,dedupe:!0})))}return F=!1,ye(),!0},[d,r]),j=z.useCallback((...T)=>Xs(r,E.current,...T),[]);if(Si(()=>{S.current=t,k.current=n,Ue(ee)||(ge.current=ee)}),Si(()=>{if(!d)return;const T=_.bind(xt,Ni);let W=0;const Y=gh(d,g,(F,ce={})=>{if(F==ar.FOCUS_EVENT){const fe=Date.now();B().revalidateOnFocus&&fe>W&&O()&&(W=fe+B().focusThrottleInterval,T())}else if(F==ar.RECONNECT_EVENT)B().revalidateOnReconnect&&O()&&T();else{if(F==ar.MUTATE_EVENT)return _();if(F==ar.ERROR_REVALIDATE_EVENT)return _(ce)}});return x.current=!1,E.current=d,y.current=!0,L({_k:p}),V&&(Ue(ue)||ir?T():Zf(T)),()=>{x.current=!0,Y()}},[d]),Si(()=>{let T;function W(){const Y=Gt(v)?v(I().data):v;Y&&T!==-1&&(T=setTimeout(G,Y))}function G(){!I().error&&(m||B().isVisible())&&(b||B().isOnline())?_(Ni).then(W):W()}return W(),()=>{T&&(clearTimeout(T),T=-1)}},[v,m,b,d]),z.useDebugValue(de),a&&Ue(ue)&&d){if(!Ks&&ir)throw new Error("Fallback data is required when using suspense in SSR.");S.current=t,k.current=n,x.current=!1;const T=f[d];if(!Ue(T)){const W=j(T);tl(W)}if(Ue(te)){const W=_(Ni);Ue(de)||(W.status="fulfilled",W.value=!0),tl(W)}else throw te}return{mutate:j,get data(){return $.data=!0,de},get error(){return $.error=!0,te},get isValidating(){return $.isValidating=!0,Q},get isLoading(){return $.isLoading=!0,w}}}),vn=(e,t)=>{const n=h=>it.instance.get(h,{params:t}),{data:r,error:i,isLoading:a,isValidating:s,mutate:u}=yh(e,n,{shouldRetryOnError:!1,revalidateIfStale:!1});return{data:r,error:i,isLoading:a,isValidating:s,mutate:u}},nt=(e="")=>`/api/v1/portal-sessions/${localStorage.getItem("portal_session_uuid")}/${e}`,nl="contact-attributes",rl={get:()=>it.instance.get(nt(nl)),update:e=>it.instance.put(nt(nl),e)},go="contacts",_i={exists:e=>it.instance.get(`${nt(go)}/exists`,{params:{email:e}}),create:e=>it.instance.post(`${nt(go)}`,{email:e}),linkIdentifier:(e,t)=>it.instance.post(`${nt(go)}/link-identifier`,{contact_identifier_value:e,email:t})},yo=(e,t)=>{const{data:n,error:r,isLoading:i,isValidating:a,mutate:s}=vn(nt(go),{contact_uuid:e,email:t});return{contact:n==null?void 0:n.data.data,data:n,error:r,isLoading:i,isValidating:a,mutate:s}},vh="credit-receptions",bh={create:e=>it.instance.post(`${nt(vh)}/create`,e)},Ti="giftcards",ji={get:e=>it.instance.get(`${nt(Ti)}/${e}`),transaction:(e,t)=>it.instance.post(`${nt(Ti)}/transaction`,{uuid:e,amount_in_cents:t})},ol=e=>{const{data:t,error:n,isLoading:r,isValidating:i,mutate:a}=vn(nt(Ti)+`/${e}`);return{giftcard:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:a}},il=z.createContext(null),al=({children:e,apiKey:t,shopUuid:n,sessionUuid:r,onClaimReward:i,onRedeemVoucher:a,onUseGiftcard:s,host:u})=>(localStorage.setItem("portal_session_uuid",r),C.jsx(il.Provider,{value:{apiKey:t,shopUuid:n,sessionUuid:r,onClaimReward:i,onRedeemVoucher:a,onUseGiftcard:s,host:u},children:e})),jn=()=>{const e=z.useContext(il);if(e===null)throw"Only use 'useSession' within a SessionProvider";return e},Ii="/api/v1/portal-sessions/",vo={create:e=>it.instance.post(Ii,e),setContact:(e,t)=>it.instance.put(Ii+e,t)},kt=()=>{const{sessionUuid:e}=jn(),{data:t,error:n,isLoading:r,isValidating:i,mutate:a}=vn(Ii+e);return{session:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:a}};var Rt=(e=>(e.HAND_SCANNER="hand_scanner",e.CAMERA="camera",e))(Rt||{});const sl="prepaid",wh={transaction:e=>it.instance.post(`${nt(sl)}/transaction`,e)},xh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=vn(nt(sl));return{balance:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}},Ai="rewards",kh={get:e=>it.instance.get(`${nt(Ai)}/${e}`),claim:e=>it.instance.post(`${nt(Ai)}/claim/${e}`)},Ch=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=vn(nt(Ai));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}},ll="subscriptions",Eh={update:e=>it.instance.put(nt(ll),e)},Sh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=vn(nt(ll));return{subscriptions:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}};var sr=(e=>(e.SUBSCRIBED="SUBSCRIBED",e.UNSUBSCRIBED="UNSUBSCRIBED",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e))(sr||{}),In=(e=>(e.OPT_OUT="OPT_OUT",e.OPT_IN="OPT_IN",e.DOUBLE_OPT_IN="DOUBLE_OPT_IN",e.FUNCTIONAL="FUNCTIONAL",e))(In||{});const bo="vouchers",Ri={get:e=>it.instance.get(`${nt(bo)}/${e}`),redeemById:e=>it.instance.post(`${nt(bo)}/redeem/${e}`),redeemByCode:e=>it.instance.post(`${nt(bo)}/redeem`,{code:e})},Ph=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=vn(nt(bo));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}};var cl=(e=>(e.INACTIVE="INACTIVE",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.LOCKED="LOCKED",e.REDEEMED="REDEEMED",e.DEACTIVATED="DEACTIVATED",e))(cl||{}),ul={exports:{}};/*!
49
+ Copyright (c) 2018 Jed Watson.
50
+ Licensed under the MIT License (MIT), see
51
+ http://jedwatson.github.io/classnames
52
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(a=i(a,r(u)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var u in a)t.call(a,u)&&a[u]&&(s=i(s,u));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ul);var Bh=ul.exports;const lr=Wo(Bh);function Oh(e){return C.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:lr("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:[C.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"}),C.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"})]})}function Xe({label:e,...t}){const[n,r]=z.useState(!1),i=a=>{t.onClick&&!n&&(r(!0),Promise.resolve(t.onClick(a)).finally(()=>r(!1)))};return C.jsxs("button",{...t,disabled:t.disabled||n,onClick:i,className:"relative flex h-[40px] items-center justify-center rounded-lg border bg-primary-600 px-3 font-normal text-white hover:border-[#101028] hover:bg-primary-700 active:bg-primary-800 disabled:cursor-not-allowed disabled:border-gray-900/[.1] disabled:bg-gray-50 disabled:text-[#353454]",children:[C.jsx("p",{className:`text-sm ${n&&"opacity-0"}`,children:e}),n&&C.jsx(Oh,{className:"absolute"})]})}function He({className:e,hidden:t,children:n,onClick:r,align:i,size:a="md",weight:s="light",render_as:u="p",dangerously_set_inner_html:h=!1}){const v=lr({"text-xs":a=="xs"},{"text-sm":a=="sm"},{"text-base":a=="md"},{"text-lg":a=="lg"},{"text-xl":a=="xl"},{"text-2xl":a=="2xl"},{"text-3xl":a=="3xl"},{"text-4xl":a=="4xl"},{"text-5xl":a=="5xl"}),m=lr({"font-thin":s=="thin"},{"font-extralight":s=="extralight"},{"font-light":s=="light"},{"font-normal":s=="normal"},{"font-medium":s=="medium"},{"font-semibold":s=="semibold"},{"font-bold":s=="bold"},{"font-extrabold":s=="extrabold"},{"font-black":s=="black"}),b=lr({"text-center":i=="center"},{"text-left":i=="left"},{"text-right":i=="right"}),l=lr(v,m,b,r?"hover:cursor-pointer hover:underline":"",e??"");return u=="label"?C.jsx("label",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):u=="span"?C.jsx("span",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):C.jsx("p",{hidden:t,className:l,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n})}function Nh(e){const{onClick:t,elements:n}=e;return C.jsx("div",{className:"flex w-full cursor-pointer rounded-lg border border-gray-200 bg-white",children:n.map(r=>C.jsx("div",{onClick:()=>t(r.key),className:`grow border-r border-gray-200 p-2 first-of-type:rounded-l-lg last-of-type:rounded-r-lg last-of-type:border-r-0 ${r.active?"bg-primary-50":"bg-white"}`,children:C.jsx(He,{className:"mx-2",align:"center",children:r.label})},r.label))})}function Li(e){return C.jsx("div",{className:"relative mb-2 w-full border-b border-gray-100 pt-3",children:C.jsxs("div",{className:"pb-1 pl-1 pt-1",children:[C.jsx(He,{weight:"normal",color:"text-gray-500",size:"xs",children:e.label}),C.jsx("div",{className:"min-h-[1.7rem]",children:e.children})]})})}function _h(e){return C.jsx(Li,{label:e.label,children:C.jsx(He,{weight:"extralight",children:e.value})})}function Th(e){const t=n=>C.jsx("div",{className:"mt-1 flex w-fit rounded border border-primary-200 bg-primary-100 px-2 py-px",children:C.jsx(He,{render_as:"span",size:"sm",weight:"normal",color:"text-primary-800",children:n.value})});return C.jsx(Li,{label:e.label,children:Array.isArray(e.value)?C.jsx("div",{className:"flex max-w-full gap-1 overflow-x-scroll",children:e.value.map((n,r)=>C.jsx(t,{value:n},r))}):e.value&&C.jsx(t,{value:e.value})})}function jh(e){switch(e){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;default:return!1}}function Ih(e){return C.jsx(Li,{label:e.label,children:C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{className:`h-fit rounded-full p-1 ${e.underlying_value&&jh(e.underlying_value)?"bg-green-500":"bg-red-600"}`}),C.jsx(He,{children:e.value})]})})}function Ah(e){const{type:t,value:n,label:r,underlying_value:i}=e;return t==="select"||t=="multi_select"?C.jsx(Th,{label:r,value:n}):t==="checkbox"?C.jsx(Ih,{label:r,value:n,underlying_value:i}):C.jsx(_h,{label:r,value:n})}function Rh(e){const{searchable:t,hide_label:n,...r}=e;return e.type==="select"?C.jsx(Uh,{...r,onChange:(i,a)=>e.onChange&&e.onChange(i,a)}):e.type==="multi_select"?C.jsx(Fh,{...r,onChange:(i,a)=>e.onChange&&e.onChange(i,a)}):C.jsx(cr,{...r,onChange:(i,a)=>e.onChange&&e.onChange(i,a)})}var dl={exports:{}};/*!
53
+ *
54
+ * react-simple-keyboard v3.7.116
55
+ * https://github.com/hodgef/react-simple-keyboard
56
+ *
57
+ * Copyright (c) Francisco Hodge (https://github.com/hodgef) and project contributors.
58
+ *
59
+ * This source code is licensed under the MIT license found in the
60
+ * LICENSE file in the root directory of this source tree.
61
+ *
62
+ */(function(e,t){(function(n,r){e.exports=r(z)})(Pn,function(n){return function(){var r={981:function(){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(u){if("Element"in u){var h="classList",v="prototype",m=u.Element[v],b=Object,l=String[v].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[v].indexOf||function(x){for(var E=0,S=this.length;E<S;E++)if(E in this&&this[E]===x)return E;return-1},o=function(x,E){this.name=x,this.code=DOMException[x],this.message=E},c=function(x,E){if(E==="")throw new o("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(E))throw new o("INVALID_CHARACTER_ERR","The token must not contain space characters.");return g.call(x,E)},f=function(x){for(var E=l.call(x.getAttribute("class")||""),S=E?E.split(/\s+/):[],k=0,B=S.length;k<B;k++)this.push(S[k]);this._updateClassName=function(){x.setAttribute("class",this.toString())}},d=f[v]=[],p=function(){return new f(this)};if(o[v]=Error[v],d.item=function(x){return this[x]||null},d.contains=function(x){return~c(this,x+"")},d.add=function(){var x,E=arguments,S=0,k=E.length,B=!1;do~c(this,x=E[S]+"")||(this.push(x),B=!0);while(++S<k);B&&this._updateClassName()},d.remove=function(){var x,E,S=arguments,k=0,B=S.length,O=!1;do for(E=c(this,x=S[k]+"");~E;)this.splice(E,1),O=!0,E=c(this,x);while(++k<B);O&&this._updateClassName()},d.toggle=function(x,E){var S=this.contains(x),k=S?E!==!0&&"remove":E!==!1&&"add";return k&&this[k](x),E===!0||E===!1?E:!S},d.replace=function(x,E){var S=c(x+"");~S&&(this.splice(S,1,E),this._updateClassName())},d.toString=function(){return this.join(" ")},b.defineProperty){var y={get:p,enumerable:!0,configurable:!0};try{b.defineProperty(m,h,y)}catch(x){x.number!==void 0&&x.number!==-2146823252||(y.enumerable=!1,b.defineProperty(m,h,y))}}else b[v].__defineGetter__&&m.__defineGetter__(h,p)}}(self),function(){var u=document.createElement("_");if(u.classList.add("c1","c2"),!u.classList.contains("c2")){var h=function(m){var b=DOMTokenList.prototype[m];DOMTokenList.prototype[m]=function(l){var g,o=arguments.length;for(g=0;g<o;g++)l=arguments[g],b.call(this,l)}};h("add"),h("remove")}if(u.classList.toggle("c3",!1),u.classList.contains("c3")){var v=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(m,b){return 1 in arguments&&!this.contains(m)==!b?b:v.call(this,m)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(m,b){var l=this.toString().split(" "),g=l.indexOf(m+"");~g&&(l=l.slice(g),this.remove.apply(this,l),this.add(b),this.add.apply(this,l.slice(1)))}),u=null}())},548:function(u){u.exports=function(){var h={9306:function(l,g,o){var c=o(4901),f=o(6823),d=TypeError;l.exports=function(p){if(c(p))return p;throw new d(f(p)+" is not a function")}},5548:function(l,g,o){var c=o(3517),f=o(6823),d=TypeError;l.exports=function(p){if(c(p))return p;throw new d(f(p)+" is not a constructor")}},3506:function(l,g,o){var c=o(3925),f=String,d=TypeError;l.exports=function(p){if(c(p))return p;throw new d("Can't set "+f(p)+" as a prototype")}},6469:function(l,g,o){var c=o(8227),f=o(2360),d=o(4913).f,p=c("unscopables"),y=Array.prototype;y[p]===void 0&&d(y,p,{configurable:!0,value:f(null)}),l.exports=function(x){y[p][x]=!0}},7829:function(l,g,o){var c=o(8183).charAt;l.exports=function(f,d,p){return d+(p?c(f,d).length:1)}},8551:function(l,g,o){var c=o(34),f=String,d=TypeError;l.exports=function(p){if(c(p))return p;throw new d(f(p)+" is not an object")}},235:function(l,g,o){var c=o(9213).forEach,f=o(4598)("forEach");l.exports=f?[].forEach:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}},7916:function(l,g,o){var c=o(6080),f=o(9565),d=o(8981),p=o(6319),y=o(4209),x=o(3517),E=o(6198),S=o(4659),k=o(81),B=o(851),O=Array;l.exports=function(I){var L=d(I),D=x(this),M=arguments.length,$=M>1?arguments[1]:void 0,P=$!==void 0;P&&($=c($,M>2?arguments[2]:void 0));var R,q,K,J,Z,ee,ue=B(L),te=0;if(!ue||this===O&&y(ue))for(R=E(L),q=D?new this(R):O(R);R>te;te++)ee=P?$(L[te],te):L[te],S(q,te,ee);else for(q=D?new this:[],Z=(J=k(L,ue)).next;!(K=f(Z,J)).done;te++)ee=P?p(J,$,[K.value,te],!0):K.value,S(q,te,ee);return q.length=te,q}},9617:function(l,g,o){var c=o(5397),f=o(5610),d=o(6198),p=function(y){return function(x,E,S){var k=c(x),B=d(k);if(B===0)return!y&&-1;var O,I=f(S,B);if(y&&E!=E){for(;B>I;)if((O=k[I++])!=O)return!0}else for(;B>I;I++)if((y||I in k)&&k[I]===E)return y||I||0;return!y&&-1}};l.exports={includes:p(!0),indexOf:p(!1)}},9213:function(l,g,o){var c=o(6080),f=o(9504),d=o(7055),p=o(8981),y=o(6198),x=o(1469),E=f([].push),S=function(k){var B=k===1,O=k===2,I=k===3,L=k===4,D=k===6,M=k===7,$=k===5||D;return function(P,R,q,K){for(var J,Z,ee=p(P),ue=d(ee),te=y(ue),ge=c(R,q),de=0,V=K||x,U=B?V(P,te):O||M?V(P,0):void 0;te>de;de++)if(($||de in ue)&&(Z=ge(J=ue[de],de,ee),k))if(B)U[de]=Z;else if(Z)switch(k){case 3:return!0;case 5:return J;case 6:return de;case 2:E(U,J)}else switch(k){case 4:return!1;case 7:E(U,J)}return D?-1:I||L?L:U}};l.exports={forEach:S(0),map:S(1),filter:S(2),some:S(3),every:S(4),find:S(5),findIndex:S(6),filterReject:S(7)}},597:function(l,g,o){var c=o(9039),f=o(8227),d=o(7388),p=f("species");l.exports=function(y){return d>=51||!c(function(){var x=[];return(x.constructor={})[p]=function(){return{foo:1}},x[y](Boolean).foo!==1})}},4598:function(l,g,o){var c=o(9039);l.exports=function(f,d){var p=[][f];return!!p&&c(function(){p.call(null,d||function(){return 1},1)})}},926:function(l,g,o){var c=o(9306),f=o(8981),d=o(7055),p=o(6198),y=TypeError,x="Reduce of empty array with no initial value",E=function(S){return function(k,B,O,I){var L=f(k),D=d(L),M=p(L);if(c(B),M===0&&O<2)throw new y(x);var $=S?M-1:0,P=S?-1:1;if(O<2)for(;;){if($ in D){I=D[$],$+=P;break}if($+=P,S?$<0:M<=$)throw new y(x)}for(;S?$>=0:M>$;$+=P)$ in D&&(I=B(I,D[$],$,L));return I}};l.exports={left:E(!1),right:E(!0)}},4527:function(l,g,o){var c=o(3724),f=o(4376),d=TypeError,p=Object.getOwnPropertyDescriptor,y=c&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(x){return x instanceof TypeError}}();l.exports=y?function(x,E){if(f(x)&&!p(x,"length").writable)throw new d("Cannot set read only .length");return x.length=E}:function(x,E){return x.length=E}},7680:function(l,g,o){var c=o(9504);l.exports=c([].slice)},4488:function(l,g,o){var c=o(7680),f=Math.floor,d=function(p,y){var x=p.length;if(x<8)for(var E,S,k=1;k<x;){for(S=k,E=p[k];S&&y(p[S-1],E)>0;)p[S]=p[--S];S!==k++&&(p[S]=E)}else for(var B=f(x/2),O=d(c(p,0,B),y),I=d(c(p,B),y),L=O.length,D=I.length,M=0,$=0;M<L||$<D;)p[M+$]=M<L&&$<D?y(O[M],I[$])<=0?O[M++]:I[$++]:M<L?O[M++]:I[$++];return p};l.exports=d},7433:function(l,g,o){var c=o(4376),f=o(3517),d=o(34),p=o(8227)("species"),y=Array;l.exports=function(x){var E;return c(x)&&(E=x.constructor,(f(E)&&(E===y||c(E.prototype))||d(E)&&(E=E[p])===null)&&(E=void 0)),E===void 0?y:E}},1469:function(l,g,o){var c=o(7433);l.exports=function(f,d){return new(c(f))(d===0?0:d)}},6319:function(l,g,o){var c=o(8551),f=o(9539);l.exports=function(d,p,y,x){try{return x?p(c(y)[0],y[1]):p(y)}catch(E){f(d,"throw",E)}}},4428:function(l,g,o){var c=o(8227)("iterator"),f=!1;try{var d=0,p={next:function(){return{done:!!d++}},return:function(){f=!0}};p[c]=function(){return this},Array.from(p,function(){throw 2})}catch{}l.exports=function(y,x){try{if(!x&&!f)return!1}catch{return!1}var E=!1;try{var S={};S[c]=function(){return{next:function(){return{done:E=!0}}}},y(S)}catch{}return E}},4576:function(l,g,o){var c=o(9504),f=c({}.toString),d=c("".slice);l.exports=function(p){return d(f(p),8,-1)}},6955:function(l,g,o){var c=o(2140),f=o(4901),d=o(4576),p=o(8227)("toStringTag"),y=Object,x=d(function(){return arguments}())==="Arguments";l.exports=c?d:function(E){var S,k,B;return E===void 0?"Undefined":E===null?"Null":typeof(k=function(O,I){try{return O[I]}catch{}}(S=y(E),p))=="string"?k:x?d(S):(B=d(S))==="Object"&&f(S.callee)?"Arguments":B}},7740:function(l,g,o){var c=o(9297),f=o(5031),d=o(7347),p=o(4913);l.exports=function(y,x,E){for(var S=f(x),k=p.f,B=d.f,O=0;O<S.length;O++){var I=S[O];c(y,I)||E&&c(E,I)||k(y,I,B(x,I))}}},1436:function(l,g,o){var c=o(8227)("match");l.exports=function(f){var d=/./;try{"/./"[f](d)}catch{try{return d[c]=!1,"/./"[f](d)}catch{}}return!1}},2211:function(l,g,o){var c=o(9039);l.exports=!c(function(){function f(){}return f.prototype.constructor=null,Object.getPrototypeOf(new f)!==f.prototype})},2529:function(l){l.exports=function(g,o){return{value:g,done:o}}},6699:function(l,g,o){var c=o(3724),f=o(4913),d=o(6980);l.exports=c?function(p,y,x){return f.f(p,y,d(1,x))}:function(p,y,x){return p[y]=x,p}},6980:function(l){l.exports=function(g,o){return{enumerable:!(1&g),configurable:!(2&g),writable:!(4&g),value:o}}},4659:function(l,g,o){var c=o(3724),f=o(4913),d=o(6980);l.exports=function(p,y,x){c?f.f(p,y,d(0,x)):p[y]=x}},3640:function(l,g,o){var c=o(8551),f=o(4270),d=TypeError;l.exports=function(p){if(c(this),p==="string"||p==="default")p="string";else if(p!=="number")throw new d("Incorrect hint");return f(this,p)}},2106:function(l,g,o){var c=o(283),f=o(4913);l.exports=function(d,p,y){return y.get&&c(y.get,p,{getter:!0}),y.set&&c(y.set,p,{setter:!0}),f.f(d,p,y)}},6840:function(l,g,o){var c=o(4901),f=o(4913),d=o(283),p=o(9433);l.exports=function(y,x,E,S){S||(S={});var k=S.enumerable,B=S.name!==void 0?S.name:x;if(c(E)&&d(E,B,S),S.global)k?y[x]=E:p(x,E);else{try{S.unsafe?y[x]&&(k=!0):delete y[x]}catch{}k?y[x]=E:f.f(y,x,{value:E,enumerable:!1,configurable:!S.nonConfigurable,writable:!S.nonWritable})}return y}},9433:function(l,g,o){var c=o(4475),f=Object.defineProperty;l.exports=function(d,p){try{f(c,d,{value:p,configurable:!0,writable:!0})}catch{c[d]=p}return p}},4606:function(l,g,o){var c=o(6823),f=TypeError;l.exports=function(d,p){if(!delete d[p])throw new f("Cannot delete property "+c(p)+" of "+c(d))}},3724:function(l,g,o){var c=o(9039);l.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(l,g,o){var c=o(4475),f=o(34),d=c.document,p=f(d)&&f(d.createElement);l.exports=function(y){return p?d.createElement(y):{}}},6837:function(l){var g=TypeError;l.exports=function(o){if(o>9007199254740991)throw g("Maximum allowed index exceeded");return o}},7400:function(l){l.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(l,g,o){var c=o(4055)("span").classList,f=c&&c.constructor&&c.constructor.prototype;l.exports=f===Object.prototype?void 0:f},8834:function(l,g,o){var c=o(9392).match(/firefox\/(\d+)/i);l.exports=!!c&&+c[1]},3202:function(l,g,o){var c=o(9392);l.exports=/MSIE|Trident/.test(c)},9088:function(l,g,o){var c=o(4475),f=o(4576);l.exports=f(c.process)==="process"},9392:function(l){l.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(l,g,o){var c,f,d=o(4475),p=o(9392),y=d.process,x=d.Deno,E=y&&y.versions||x&&x.version,S=E&&E.v8;S&&(f=(c=S.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!f&&p&&(!(c=p.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=p.match(/Chrome\/(\d+)/))&&(f=+c[1]),l.exports=f},9160:function(l,g,o){var c=o(9392).match(/AppleWebKit\/(\d+)\./);l.exports=!!c&&+c[1]},8727:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(l,g,o){var c=o(4475),f=o(7347).f,d=o(6699),p=o(6840),y=o(9433),x=o(7740),E=o(2796);l.exports=function(S,k){var B,O,I,L,D,M=S.target,$=S.global,P=S.stat;if(B=$?c:P?c[M]||y(M,{}):c[M]&&c[M].prototype)for(O in k){if(L=k[O],I=S.dontCallGetSet?(D=f(B,O))&&D.value:B[O],!E($?O:M+(P?".":"#")+O,S.forced)&&I!==void 0){if(typeof L==typeof I)continue;x(L,I)}(S.sham||I&&I.sham)&&d(L,"sham",!0),p(B,O,L,S)}}},9039:function(l){l.exports=function(g){try{return!!g()}catch{return!0}}},9228:function(l,g,o){o(7495);var c=o(9565),f=o(6840),d=o(7323),p=o(9039),y=o(8227),x=o(6699),E=y("species"),S=RegExp.prototype;l.exports=function(k,B,O,I){var L=y(k),D=!p(function(){var R={};return R[L]=function(){return 7},""[k](R)!==7}),M=D&&!p(function(){var R=!1,q=/a/;return k==="split"&&((q={}).constructor={},q.constructor[E]=function(){return q},q.flags="",q[L]=/./[L]),q.exec=function(){return R=!0,null},q[L](""),!R});if(!D||!M||O){var $=/./[L],P=B(L,""[k],function(R,q,K,J,Z){var ee=q.exec;return ee===d||ee===S.exec?D&&!Z?{done:!0,value:c($,q,K,J)}:{done:!0,value:c(R,K,q,J)}:{done:!1}});f(String.prototype,k,P[0]),f(S,L,P[1])}I&&x(S[L],"sham",!0)}},8745:function(l,g,o){var c=o(616),f=Function.prototype,d=f.apply,p=f.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(c?p.bind(d):function(){return p.apply(d,arguments)})},6080:function(l,g,o){var c=o(7476),f=o(9306),d=o(616),p=c(c.bind);l.exports=function(y,x){return f(y),x===void 0?y:d?p(y,x):function(){return y.apply(x,arguments)}}},616:function(l,g,o){var c=o(9039);l.exports=!c(function(){var f=function(){}.bind();return typeof f!="function"||f.hasOwnProperty("prototype")})},9565:function(l,g,o){var c=o(616),f=Function.prototype.call;l.exports=c?f.bind(f):function(){return f.apply(f,arguments)}},350:function(l,g,o){var c=o(3724),f=o(9297),d=Function.prototype,p=c&&Object.getOwnPropertyDescriptor,y=f(d,"name"),x=y&&function(){}.name==="something",E=y&&(!c||c&&p(d,"name").configurable);l.exports={EXISTS:y,PROPER:x,CONFIGURABLE:E}},6706:function(l,g,o){var c=o(9504),f=o(9306);l.exports=function(d,p,y){try{return c(f(Object.getOwnPropertyDescriptor(d,p)[y]))}catch{}}},7476:function(l,g,o){var c=o(4576),f=o(9504);l.exports=function(d){if(c(d)==="Function")return f(d)}},9504:function(l,g,o){var c=o(616),f=Function.prototype,d=f.call,p=c&&f.bind.bind(d,d);l.exports=c?p:function(y){return function(){return d.apply(y,arguments)}}},7751:function(l,g,o){var c=o(4475),f=o(4901);l.exports=function(d,p){return arguments.length<2?(y=c[d],f(y)?y:void 0):c[d]&&c[d][p];var y}},851:function(l,g,o){var c=o(6955),f=o(5966),d=o(4117),p=o(6269),y=o(8227)("iterator");l.exports=function(x){if(!d(x))return f(x,y)||f(x,"@@iterator")||p[c(x)]}},81:function(l,g,o){var c=o(9565),f=o(9306),d=o(8551),p=o(6823),y=o(851),x=TypeError;l.exports=function(E,S){var k=arguments.length<2?y(E):S;if(f(k))return d(c(k,E));throw new x(p(E)+" is not iterable")}},6933:function(l,g,o){var c=o(9504),f=o(4376),d=o(4901),p=o(4576),y=o(655),x=c([].push);l.exports=function(E){if(d(E))return E;if(f(E)){for(var S=E.length,k=[],B=0;B<S;B++){var O=E[B];typeof O=="string"?x(k,O):typeof O!="number"&&p(O)!=="Number"&&p(O)!=="String"||x(k,y(O))}var I=k.length,L=!0;return function(D,M){if(L)return L=!1,M;if(f(this))return M;for(var $=0;$<I;$++)if(k[$]===D)return M}}}},5966:function(l,g,o){var c=o(9306),f=o(4117);l.exports=function(d,p){var y=d[p];return f(y)?void 0:c(y)}},2478:function(l,g,o){var c=o(9504),f=o(8981),d=Math.floor,p=c("".charAt),y=c("".replace),x=c("".slice),E=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S=/\$([$&'`]|\d{1,2})/g;l.exports=function(k,B,O,I,L,D){var M=O+k.length,$=I.length,P=S;return L!==void 0&&(L=f(L),P=E),y(D,P,function(R,q){var K;switch(p(q,0)){case"$":return"$";case"&":return k;case"`":return x(B,0,O);case"'":return x(B,M);case"<":K=L[x(q,1,-1)];break;default:var J=+q;if(J===0)return R;if(J>$){var Z=d(J/10);return Z===0?R:Z<=$?I[Z-1]===void 0?p(q,1):I[Z-1]+p(q,1):R}K=I[J-1]}return K===void 0?"":K})}},4475:function(l,g,o){var c=function(f){return f&&f.Math===Math&&f};l.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof o.g=="object"&&o.g)||c(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(l,g,o){var c=o(9504),f=o(8981),d=c({}.hasOwnProperty);l.exports=Object.hasOwn||function(p,y){return d(f(p),y)}},421:function(l){l.exports={}},397:function(l,g,o){var c=o(7751);l.exports=c("document","documentElement")},5917:function(l,g,o){var c=o(3724),f=o(9039),d=o(4055);l.exports=!c&&!f(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(l,g,o){var c=o(9504),f=o(9039),d=o(4576),p=Object,y=c("".split);l.exports=f(function(){return!p("z").propertyIsEnumerable(0)})?function(x){return d(x)==="String"?y(x,""):p(x)}:p},3167:function(l,g,o){var c=o(4901),f=o(34),d=o(2967);l.exports=function(p,y,x){var E,S;return d&&c(E=y.constructor)&&E!==x&&f(S=E.prototype)&&S!==x.prototype&&d(p,S),p}},3706:function(l,g,o){var c=o(9504),f=o(4901),d=o(7629),p=c(Function.toString);f(d.inspectSource)||(d.inspectSource=function(y){return p(y)}),l.exports=d.inspectSource},1181:function(l,g,o){var c,f,d,p=o(8622),y=o(4475),x=o(34),E=o(6699),S=o(9297),k=o(7629),B=o(6119),O=o(421),I="Object already initialized",L=y.TypeError,D=y.WeakMap;if(p||k.state){var M=k.state||(k.state=new D);M.get=M.get,M.has=M.has,M.set=M.set,c=function(P,R){if(M.has(P))throw new L(I);return R.facade=P,M.set(P,R),R},f=function(P){return M.get(P)||{}},d=function(P){return M.has(P)}}else{var $=B("state");O[$]=!0,c=function(P,R){if(S(P,$))throw new L(I);return R.facade=P,E(P,$,R),R},f=function(P){return S(P,$)?P[$]:{}},d=function(P){return S(P,$)}}l.exports={set:c,get:f,has:d,enforce:function(P){return d(P)?f(P):c(P,{})},getterFor:function(P){return function(R){var q;if(!x(R)||(q=f(R)).type!==P)throw new L("Incompatible receiver, "+P+" required");return q}}}},4209:function(l,g,o){var c=o(8227),f=o(6269),d=c("iterator"),p=Array.prototype;l.exports=function(y){return y!==void 0&&(f.Array===y||p[d]===y)}},4376:function(l,g,o){var c=o(4576);l.exports=Array.isArray||function(f){return c(f)==="Array"}},4901:function(l){var g=typeof document=="object"&&document.all;l.exports=g===void 0&&g!==void 0?function(o){return typeof o=="function"||o===g}:function(o){return typeof o=="function"}},3517:function(l,g,o){var c=o(9504),f=o(9039),d=o(4901),p=o(6955),y=o(7751),x=o(3706),E=function(){},S=y("Reflect","construct"),k=/^\s*(?:class|function)\b/,B=c(k.exec),O=!k.test(E),I=function(D){if(!d(D))return!1;try{return S(E,[],D),!0}catch{return!1}},L=function(D){if(!d(D))return!1;switch(p(D)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return O||!!B(k,x(D))}catch{return!0}};L.sham=!0,l.exports=!S||f(function(){var D;return I(I.call)||!I(Object)||!I(function(){D=!0})||D})?L:I},2796:function(l,g,o){var c=o(9039),f=o(4901),d=/#|\.prototype\./,p=function(k,B){var O=x[y(k)];return O===S||O!==E&&(f(B)?c(B):!!B)},y=p.normalize=function(k){return String(k).replace(d,".").toLowerCase()},x=p.data={},E=p.NATIVE="N",S=p.POLYFILL="P";l.exports=p},2087:function(l,g,o){var c=o(34),f=Math.floor;l.exports=Number.isInteger||function(d){return!c(d)&&isFinite(d)&&f(d)===d}},4117:function(l){l.exports=function(g){return g==null}},34:function(l,g,o){var c=o(4901);l.exports=function(f){return typeof f=="object"?f!==null:c(f)}},3925:function(l,g,o){var c=o(34);l.exports=function(f){return c(f)||f===null}},6395:function(l){l.exports=!1},788:function(l,g,o){var c=o(34),f=o(4576),d=o(8227)("match");l.exports=function(p){var y;return c(p)&&((y=p[d])!==void 0?!!y:f(p)==="RegExp")}},757:function(l,g,o){var c=o(7751),f=o(4901),d=o(1625),p=o(7040),y=Object;l.exports=p?function(x){return typeof x=="symbol"}:function(x){var E=c("Symbol");return f(E)&&d(E.prototype,y(x))}},9539:function(l,g,o){var c=o(9565),f=o(8551),d=o(5966);l.exports=function(p,y,x){var E,S;f(p);try{if(!(E=d(p,"return"))){if(y==="throw")throw x;return x}E=c(E,p)}catch(k){S=!0,E=k}if(y==="throw")throw x;if(S)throw E;return f(E),x}},3994:function(l,g,o){var c=o(7657).IteratorPrototype,f=o(2360),d=o(6980),p=o(687),y=o(6269),x=function(){return this};l.exports=function(E,S,k,B){var O=S+" Iterator";return E.prototype=f(c,{next:d(+!B,k)}),p(E,O,!1,!0),y[O]=x,E}},1088:function(l,g,o){var c=o(6518),f=o(9565),d=o(6395),p=o(350),y=o(4901),x=o(3994),E=o(2787),S=o(2967),k=o(687),B=o(6699),O=o(6840),I=o(8227),L=o(6269),D=o(7657),M=p.PROPER,$=p.CONFIGURABLE,P=D.IteratorPrototype,R=D.BUGGY_SAFARI_ITERATORS,q=I("iterator"),K="keys",J="values",Z="entries",ee=function(){return this};l.exports=function(ue,te,ge,de,V,U,Q){x(ge,te,de);var w,_,j,T=function(re){if(re===V&&ce)return ce;if(!R&&re&&re in Y)return Y[re];switch(re){case K:case J:case Z:return function(){return new ge(this,re)}}return function(){return new ge(this)}},W=te+" Iterator",G=!1,Y=ue.prototype,F=Y[q]||Y["@@iterator"]||V&&Y[V],ce=!R&&F||T(V),fe=te==="Array"&&Y.entries||F;if(fe&&(w=E(fe.call(new ue)))!==Object.prototype&&w.next&&(d||E(w)===P||(S?S(w,P):y(w[q])||O(w,q,ee)),k(w,W,!0,!0),d&&(L[W]=ee)),M&&V===J&&F&&F.name!==J&&(!d&&$?B(Y,"name",J):(G=!0,ce=function(){return f(F,this)})),V)if(_={values:T(J),keys:U?ce:T(K),entries:T(Z)},Q)for(j in _)(R||G||!(j in Y))&&O(Y,j,_[j]);else c({target:te,proto:!0,forced:R||G},_);return d&&!Q||Y[q]===ce||O(Y,q,ce,{name:V}),L[te]=ce,_}},7657:function(l,g,o){var c,f,d,p=o(9039),y=o(4901),x=o(34),E=o(2360),S=o(2787),k=o(6840),B=o(8227),O=o(6395),I=B("iterator"),L=!1;[].keys&&("next"in(d=[].keys())?(f=S(S(d)))!==Object.prototype&&(c=f):L=!0),!x(c)||p(function(){var D={};return c[I].call(D)!==D})?c={}:O&&(c=E(c)),y(c[I])||k(c,I,function(){return this}),l.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:L}},6269:function(l){l.exports={}},6198:function(l,g,o){var c=o(8014);l.exports=function(f){return c(f.length)}},283:function(l,g,o){var c=o(9504),f=o(9039),d=o(4901),p=o(9297),y=o(3724),x=o(350).CONFIGURABLE,E=o(3706),S=o(1181),k=S.enforce,B=S.get,O=String,I=Object.defineProperty,L=c("".slice),D=c("".replace),M=c([].join),$=y&&!f(function(){return I(function(){},"length",{value:8}).length!==8}),P=String(String).split("String"),R=l.exports=function(q,K,J){L(O(K),0,7)==="Symbol("&&(K="["+D(O(K),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),J&&J.getter&&(K="get "+K),J&&J.setter&&(K="set "+K),(!p(q,"name")||x&&q.name!==K)&&(y?I(q,"name",{value:K,configurable:!0}):q.name=K),$&&J&&p(J,"arity")&&q.length!==J.arity&&I(q,"length",{value:J.arity});try{J&&p(J,"constructor")&&J.constructor?y&&I(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var Z=k(q);return p(Z,"source")||(Z.source=M(P,typeof K=="string"?K:"")),q};Function.prototype.toString=R(function(){return d(this)&&B(this).source||E(this)},"toString")},741:function(l){var g=Math.ceil,o=Math.floor;l.exports=Math.trunc||function(c){var f=+c;return(f>0?o:g)(f)}},5749:function(l,g,o){var c=o(788),f=TypeError;l.exports=function(d){if(c(d))throw new f("The method doesn't accept regular expressions");return d}},4213:function(l,g,o){var c=o(3724),f=o(9504),d=o(9565),p=o(9039),y=o(1072),x=o(3717),E=o(8773),S=o(8981),k=o(7055),B=Object.assign,O=Object.defineProperty,I=f([].concat);l.exports=!B||p(function(){if(c&&B({b:1},B(O({},"a",{enumerable:!0,get:function(){O(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var L={},D={},M=Symbol("assign detection"),$="abcdefghijklmnopqrst";return L[M]=7,$.split("").forEach(function(P){D[P]=P}),B({},L)[M]!==7||y(B({},D)).join("")!==$})?function(L,D){for(var M=S(L),$=arguments.length,P=1,R=x.f,q=E.f;$>P;)for(var K,J=k(arguments[P++]),Z=R?I(y(J),R(J)):y(J),ee=Z.length,ue=0;ee>ue;)K=Z[ue++],c&&!d(q,J,K)||(M[K]=J[K]);return M}:B},2360:function(l,g,o){var c,f=o(8551),d=o(6801),p=o(8727),y=o(421),x=o(397),E=o(4055),S=o(6119),k="prototype",B="script",O=S("IE_PROTO"),I=function(){},L=function($){return"<"+B+">"+$+"</"+B+">"},D=function($){$.write(L("")),$.close();var P=$.parentWindow.Object;return $=null,P},M=function(){try{c=new ActiveXObject("htmlfile")}catch{}var $,P,R;M=typeof document<"u"?document.domain&&c?D(c):(P=E("iframe"),R="java"+B+":",P.style.display="none",x.appendChild(P),P.src=String(R),($=P.contentWindow.document).open(),$.write(L("document.F=Object")),$.close(),$.F):D(c);for(var q=p.length;q--;)delete M[k][p[q]];return M()};y[O]=!0,l.exports=Object.create||function($,P){var R;return $!==null?(I[k]=f($),R=new I,I[k]=null,R[O]=$):R=M(),P===void 0?R:d.f(R,P)}},6801:function(l,g,o){var c=o(3724),f=o(8686),d=o(4913),p=o(8551),y=o(5397),x=o(1072);g.f=c&&!f?Object.defineProperties:function(E,S){p(E);for(var k,B=y(S),O=x(S),I=O.length,L=0;I>L;)d.f(E,k=O[L++],B[k]);return E}},4913:function(l,g,o){var c=o(3724),f=o(5917),d=o(8686),p=o(8551),y=o(6969),x=TypeError,E=Object.defineProperty,S=Object.getOwnPropertyDescriptor,k="enumerable",B="configurable",O="writable";g.f=c?d?function(I,L,D){if(p(I),L=y(L),p(D),typeof I=="function"&&L==="prototype"&&"value"in D&&O in D&&!D[O]){var M=S(I,L);M&&M[O]&&(I[L]=D.value,D={configurable:B in D?D[B]:M[B],enumerable:k in D?D[k]:M[k],writable:!1})}return E(I,L,D)}:E:function(I,L,D){if(p(I),L=y(L),p(D),f)try{return E(I,L,D)}catch{}if("get"in D||"set"in D)throw new x("Accessors not supported");return"value"in D&&(I[L]=D.value),I}},7347:function(l,g,o){var c=o(3724),f=o(9565),d=o(8773),p=o(6980),y=o(5397),x=o(6969),E=o(9297),S=o(5917),k=Object.getOwnPropertyDescriptor;g.f=c?k:function(B,O){if(B=y(B),O=x(O),S)try{return k(B,O)}catch{}if(E(B,O))return p(!f(d.f,B,O),B[O])}},298:function(l,g,o){var c=o(4576),f=o(5397),d=o(8480).f,p=o(7680),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(x){return y&&c(x)==="Window"?function(E){try{return d(E)}catch{return p(y)}}(x):d(f(x))}},8480:function(l,g,o){var c=o(1828),f=o(8727).concat("length","prototype");g.f=Object.getOwnPropertyNames||function(d){return c(d,f)}},3717:function(l,g){g.f=Object.getOwnPropertySymbols},2787:function(l,g,o){var c=o(9297),f=o(4901),d=o(8981),p=o(6119),y=o(2211),x=p("IE_PROTO"),E=Object,S=E.prototype;l.exports=y?E.getPrototypeOf:function(k){var B=d(k);if(c(B,x))return B[x];var O=B.constructor;return f(O)&&B instanceof O?O.prototype:B instanceof E?S:null}},1625:function(l,g,o){var c=o(9504);l.exports=c({}.isPrototypeOf)},1828:function(l,g,o){var c=o(9504),f=o(9297),d=o(5397),p=o(9617).indexOf,y=o(421),x=c([].push);l.exports=function(E,S){var k,B=d(E),O=0,I=[];for(k in B)!f(y,k)&&f(B,k)&&x(I,k);for(;S.length>O;)f(B,k=S[O++])&&(~p(I,k)||x(I,k));return I}},1072:function(l,g,o){var c=o(1828),f=o(8727);l.exports=Object.keys||function(d){return c(d,f)}},8773:function(l,g){var o={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,f=c&&!o.call({1:2},1);g.f=f?function(d){var p=c(this,d);return!!p&&p.enumerable}:o},2551:function(l,g,o){var c=o(6395),f=o(4475),d=o(9039),p=o(9160);l.exports=c||!d(function(){if(!(p&&p<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete f[y]}})},2967:function(l,g,o){var c=o(6706),f=o(34),d=o(7750),p=o(3506);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y,x=!1,E={};try{(y=c(Object.prototype,"__proto__","set"))(E,[]),x=E instanceof Array}catch{}return function(S,k){return d(S),p(k),f(S)&&(x?y(S,k):S.__proto__=k),S}}():void 0)},3179:function(l,g,o){var c=o(2140),f=o(6955);l.exports=c?{}.toString:function(){return"[object "+f(this)+"]"}},4270:function(l,g,o){var c=o(9565),f=o(4901),d=o(34),p=TypeError;l.exports=function(y,x){var E,S;if(x==="string"&&f(E=y.toString)&&!d(S=c(E,y))||f(E=y.valueOf)&&!d(S=c(E,y))||x!=="string"&&f(E=y.toString)&&!d(S=c(E,y)))return S;throw new p("Can't convert object to primitive value")}},5031:function(l,g,o){var c=o(7751),f=o(9504),d=o(8480),p=o(3717),y=o(8551),x=f([].concat);l.exports=c("Reflect","ownKeys")||function(E){var S=d.f(y(E)),k=p.f;return k?x(S,k(E)):S}},9167:function(l,g,o){var c=o(4475);l.exports=c},1056:function(l,g,o){var c=o(4913).f;l.exports=function(f,d,p){p in f||c(f,p,{configurable:!0,get:function(){return d[p]},set:function(y){d[p]=y}})}},6682:function(l,g,o){var c=o(9565),f=o(8551),d=o(4901),p=o(4576),y=o(7323),x=TypeError;l.exports=function(E,S){var k=E.exec;if(d(k)){var B=c(k,E,S);return B!==null&&f(B),B}if(p(E)==="RegExp")return c(y,E,S);throw new x("RegExp#exec called on incompatible receiver")}},7323:function(l,g,o){var c,f,d=o(9565),p=o(9504),y=o(655),x=o(7979),E=o(8429),S=o(5745),k=o(2360),B=o(1181).get,O=o(3635),I=o(8814),L=S("native-string-replace",String.prototype.replace),D=RegExp.prototype.exec,M=D,$=p("".charAt),P=p("".indexOf),R=p("".replace),q=p("".slice),K=(f=/b*/g,d(D,c=/a/,"a"),d(D,f,"a"),c.lastIndex!==0||f.lastIndex!==0),J=E.BROKEN_CARET,Z=/()??/.exec("")[1]!==void 0;(K||Z||J||O||I)&&(M=function(ee){var ue,te,ge,de,V,U,Q,w=this,_=B(w),j=y(ee),T=_.raw;if(T)return T.lastIndex=w.lastIndex,ue=d(M,T,j),w.lastIndex=T.lastIndex,ue;var W=_.groups,G=J&&w.sticky,Y=d(x,w),F=w.source,ce=0,fe=j;if(G&&(Y=R(Y,"y",""),P(Y,"g")===-1&&(Y+="g"),fe=q(j,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&$(j,w.lastIndex-1)!==`
63
+ `)&&(F="(?: "+F+")",fe=" "+fe,ce++),te=new RegExp("^(?:"+F+")",Y)),Z&&(te=new RegExp("^"+F+"$(?!\\s)",Y)),K&&(ge=w.lastIndex),de=d(D,G?te:w,fe),G?de?(de.input=q(de.input,ce),de[0]=q(de[0],ce),de.index=w.lastIndex,w.lastIndex+=de[0].length):w.lastIndex=0:K&&de&&(w.lastIndex=w.global?de.index+de[0].length:ge),Z&&de&&de.length>1&&d(L,de[0],te,function(){for(V=1;V<arguments.length-2;V++)arguments[V]===void 0&&(de[V]=void 0)}),de&&W)for(de.groups=U=k(null),V=0;V<W.length;V++)U[(Q=W[V])[0]]=de[Q[1]];return de}),l.exports=M},7979:function(l,g,o){var c=o(8551);l.exports=function(){var f=c(this),d="";return f.hasIndices&&(d+="d"),f.global&&(d+="g"),f.ignoreCase&&(d+="i"),f.multiline&&(d+="m"),f.dotAll&&(d+="s"),f.unicode&&(d+="u"),f.unicodeSets&&(d+="v"),f.sticky&&(d+="y"),d}},1034:function(l,g,o){var c=o(9565),f=o(9297),d=o(1625),p=o(7979),y=RegExp.prototype;l.exports=function(x){var E=x.flags;return E!==void 0||"flags"in y||f(x,"flags")||!d(y,x)?E:c(p,x)}},8429:function(l,g,o){var c=o(9039),f=o(4475).RegExp,d=c(function(){var x=f("a","y");return x.lastIndex=2,x.exec("abcd")!==null}),p=d||c(function(){return!f("a","y").sticky}),y=d||c(function(){var x=f("^r","gy");return x.lastIndex=2,x.exec("str")!==null});l.exports={BROKEN_CARET:y,MISSED_STICKY:p,UNSUPPORTED_Y:d}},3635:function(l,g,o){var c=o(9039),f=o(4475).RegExp;l.exports=c(function(){var d=f(".","s");return!(d.dotAll&&d.test(`
64
+ `)&&d.flags==="s")})},8814:function(l,g,o){var c=o(9039),f=o(4475).RegExp;l.exports=c(function(){var d=f("(?<a>b)","g");return d.exec("b").groups.a!=="b"||"b".replace(d,"$<a>c")!=="bc"})},7750:function(l,g,o){var c=o(4117),f=TypeError;l.exports=function(d){if(c(d))throw new f("Can't call method on "+d);return d}},7633:function(l,g,o){var c=o(7751),f=o(2106),d=o(8227),p=o(3724),y=d("species");l.exports=function(x){var E=c(x);p&&E&&!E[y]&&f(E,y,{configurable:!0,get:function(){return this}})}},687:function(l,g,o){var c=o(4913).f,f=o(9297),d=o(8227)("toStringTag");l.exports=function(p,y,x){p&&!x&&(p=p.prototype),p&&!f(p,d)&&c(p,d,{configurable:!0,value:y})}},6119:function(l,g,o){var c=o(5745),f=o(3392),d=c("keys");l.exports=function(p){return d[p]||(d[p]=f(p))}},7629:function(l,g,o){var c=o(6395),f=o(4475),d=o(9433),p="__core-js_shared__",y=l.exports=f[p]||d(p,{});(y.versions||(y.versions=[])).push({version:"3.37.0",mode:c?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(l,g,o){var c=o(7629);l.exports=function(f,d){return c[f]||(c[f]=d||{})}},2293:function(l,g,o){var c=o(8551),f=o(5548),d=o(4117),p=o(8227)("species");l.exports=function(y,x){var E,S=c(y).constructor;return S===void 0||d(E=c(S)[p])?x:f(E)}},8183:function(l,g,o){var c=o(9504),f=o(1291),d=o(655),p=o(7750),y=c("".charAt),x=c("".charCodeAt),E=c("".slice),S=function(k){return function(B,O){var I,L,D=d(p(B)),M=f(O),$=D.length;return M<0||M>=$?k?"":void 0:(I=x(D,M))<55296||I>56319||M+1===$||(L=x(D,M+1))<56320||L>57343?k?y(D,M):I:k?E(D,M,M+2):L-56320+(I-55296<<10)+65536}};l.exports={codeAt:S(!1),charAt:S(!0)}},706:function(l,g,o){var c=o(350).PROPER,f=o(9039),d=o(7452);l.exports=function(p){return f(function(){return!!d[p]()||"​…᠎"[p]()!=="​…᠎"||c&&d[p].name!==p})}},3802:function(l,g,o){var c=o(9504),f=o(7750),d=o(655),p=o(7452),y=c("".replace),x=RegExp("^["+p+"]+"),E=RegExp("(^|[^"+p+"])["+p+"]+$"),S=function(k){return function(B){var O=d(f(B));return 1&k&&(O=y(O,x,"")),2&k&&(O=y(O,E,"$1")),O}};l.exports={start:S(1),end:S(2),trim:S(3)}},4495:function(l,g,o){var c=o(7388),f=o(9039),d=o(4475).String;l.exports=!!Object.getOwnPropertySymbols&&!f(function(){var p=Symbol("symbol detection");return!d(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&c&&c<41})},8242:function(l,g,o){var c=o(9565),f=o(7751),d=o(8227),p=o(6840);l.exports=function(){var y=f("Symbol"),x=y&&y.prototype,E=x&&x.valueOf,S=d("toPrimitive");x&&!x[S]&&p(x,S,function(k){return c(E,this)},{arity:1})}},1296:function(l,g,o){var c=o(4495);l.exports=c&&!!Symbol.for&&!!Symbol.keyFor},1240:function(l,g,o){var c=o(9504);l.exports=c(1 .valueOf)},5610:function(l,g,o){var c=o(1291),f=Math.max,d=Math.min;l.exports=function(p,y){var x=c(p);return x<0?f(x+y,0):d(x,y)}},5397:function(l,g,o){var c=o(7055),f=o(7750);l.exports=function(d){return c(f(d))}},1291:function(l,g,o){var c=o(741);l.exports=function(f){var d=+f;return d!=d||d===0?0:c(d)}},8014:function(l,g,o){var c=o(1291),f=Math.min;l.exports=function(d){var p=c(d);return p>0?f(p,9007199254740991):0}},8981:function(l,g,o){var c=o(7750),f=Object;l.exports=function(d){return f(c(d))}},2777:function(l,g,o){var c=o(9565),f=o(34),d=o(757),p=o(5966),y=o(4270),x=o(8227),E=TypeError,S=x("toPrimitive");l.exports=function(k,B){if(!f(k)||d(k))return k;var O,I=p(k,S);if(I){if(B===void 0&&(B="default"),O=c(I,k,B),!f(O)||d(O))return O;throw new E("Can't convert object to primitive value")}return B===void 0&&(B="number"),y(k,B)}},6969:function(l,g,o){var c=o(2777),f=o(757);l.exports=function(d){var p=c(d,"string");return f(p)?p:p+""}},2140:function(l,g,o){var c={};c[o(8227)("toStringTag")]="z",l.exports=String(c)==="[object z]"},655:function(l,g,o){var c=o(6955),f=String;l.exports=function(d){if(c(d)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return f(d)}},6823:function(l){var g=String;l.exports=function(o){try{return g(o)}catch{return"Object"}}},3392:function(l,g,o){var c=o(9504),f=0,d=Math.random(),p=c(1 .toString);l.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+p(++f+d,36)}},7040:function(l,g,o){var c=o(4495);l.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(l,g,o){var c=o(3724),f=o(9039);l.exports=c&&f(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},8622:function(l,g,o){var c=o(4475),f=o(4901),d=c.WeakMap;l.exports=f(d)&&/native code/.test(String(d))},511:function(l,g,o){var c=o(9167),f=o(9297),d=o(1951),p=o(4913).f;l.exports=function(y){var x=c.Symbol||(c.Symbol={});f(x,y)||p(x,y,{value:d.f(y)})}},1951:function(l,g,o){var c=o(8227);g.f=c},8227:function(l,g,o){var c=o(4475),f=o(5745),d=o(9297),p=o(3392),y=o(4495),x=o(7040),E=c.Symbol,S=f("wks"),k=x?E.for||E:E&&E.withoutSetter||p;l.exports=function(B){return d(S,B)||(S[B]=y&&d(E,B)?E[B]:k("Symbol."+B)),S[B]}},7452:function(l){l.exports=`
65
+ \v\f\r                 \u2028\u2029\uFEFF`},8706:function(l,g,o){var c=o(6518),f=o(9039),d=o(4376),p=o(34),y=o(8981),x=o(6198),E=o(6837),S=o(4659),k=o(1469),B=o(597),O=o(8227),I=o(7388),L=O("isConcatSpreadable"),D=I>=51||!f(function(){var $=[];return $[L]=!1,$.concat()[0]!==$}),M=function($){if(!p($))return!1;var P=$[L];return P!==void 0?!!P:d($)};c({target:"Array",proto:!0,arity:1,forced:!D||!B("concat")},{concat:function($){var P,R,q,K,J,Z=y(this),ee=k(Z,0),ue=0;for(P=-1,q=arguments.length;P<q;P++)if(M(J=P===-1?Z:arguments[P]))for(K=x(J),E(ue+K),R=0;R<K;R++,ue++)R in J&&S(ee,ue,J[R]);else E(ue+1),S(ee,ue++,J);return ee.length=ue,ee}})},2008:function(l,g,o){var c=o(6518),f=o(9213).filter;c({target:"Array",proto:!0,forced:!o(597)("filter")},{filter:function(d){return f(this,d,arguments.length>1?arguments[1]:void 0)}})},3418:function(l,g,o){var c=o(6518),f=o(7916);c({target:"Array",stat:!0,forced:!o(4428)(function(d){Array.from(d)})},{from:f})},4423:function(l,g,o){var c=o(6518),f=o(9617).includes,d=o(9039),p=o(6469);c({target:"Array",proto:!0,forced:d(function(){return!Array(1).includes()})},{includes:function(y){return f(this,y,arguments.length>1?arguments[1]:void 0)}}),p("includes")},5276:function(l,g,o){var c=o(6518),f=o(7476),d=o(9617).indexOf,p=o(4598),y=f([].indexOf),x=!!y&&1/y([1],1,-0)<0;c({target:"Array",proto:!0,forced:x||!p("indexOf")},{indexOf:function(E){var S=arguments.length>1?arguments[1]:void 0;return x?y(this,E,S)||0:d(this,E,S)}})},3792:function(l,g,o){var c=o(5397),f=o(6469),d=o(6269),p=o(1181),y=o(4913).f,x=o(1088),E=o(2529),S=o(6395),k=o(3724),B="Array Iterator",O=p.set,I=p.getterFor(B);l.exports=x(Array,"Array",function(D,M){O(this,{type:B,target:c(D),index:0,kind:M})},function(){var D=I(this),M=D.target,$=D.index++;if(!M||$>=M.length)return D.target=void 0,E(void 0,!0);switch(D.kind){case"keys":return E($,!1);case"values":return E(M[$],!1)}return E([$,M[$]],!1)},"values");var L=d.Arguments=d.Array;if(f("keys"),f("values"),f("entries"),!S&&k&&L.name!=="values")try{y(L,"name",{value:"values"})}catch{}},8598:function(l,g,o){var c=o(6518),f=o(9504),d=o(7055),p=o(5397),y=o(4598),x=f([].join);c({target:"Array",proto:!0,forced:d!==Object||!y("join",",")},{join:function(E){return x(p(this),E===void 0?",":E)}})},2062:function(l,g,o){var c=o(6518),f=o(9213).map;c({target:"Array",proto:!0,forced:!o(597)("map")},{map:function(d){return f(this,d,arguments.length>1?arguments[1]:void 0)}})},2712:function(l,g,o){var c=o(6518),f=o(926).left,d=o(4598),p=o(7388);c({target:"Array",proto:!0,forced:!o(9088)&&p>79&&p<83||!d("reduce")},{reduce:function(y){var x=arguments.length;return f(this,y,x,x>1?arguments[1]:void 0)}})},4782:function(l,g,o){var c=o(6518),f=o(4376),d=o(3517),p=o(34),y=o(5610),x=o(6198),E=o(5397),S=o(4659),k=o(8227),B=o(597),O=o(7680),I=B("slice"),L=k("species"),D=Array,M=Math.max;c({target:"Array",proto:!0,forced:!I},{slice:function($,P){var R,q,K,J=E(this),Z=x(J),ee=y($,Z),ue=y(P===void 0?Z:P,Z);if(f(J)&&(R=J.constructor,(d(R)&&(R===D||f(R.prototype))||p(R)&&(R=R[L])===null)&&(R=void 0),R===D||R===void 0))return O(J,ee,ue);for(q=new(R===void 0?D:R)(M(ue-ee,0)),K=0;ee<ue;ee++,K++)ee in J&&S(q,K,J[ee]);return q.length=K,q}})},6910:function(l,g,o){var c=o(6518),f=o(9504),d=o(9306),p=o(8981),y=o(6198),x=o(4606),E=o(655),S=o(9039),k=o(4488),B=o(4598),O=o(8834),I=o(3202),L=o(7388),D=o(9160),M=[],$=f(M.sort),P=f(M.push),R=S(function(){M.sort(void 0)}),q=S(function(){M.sort(null)}),K=B("sort"),J=!S(function(){if(L)return L<70;if(!(O&&O>3)){if(I)return!0;if(D)return D<603;var Z,ee,ue,te,ge="";for(Z=65;Z<76;Z++){switch(ee=String.fromCharCode(Z),Z){case 66:case 69:case 70:case 72:ue=3;break;case 68:case 71:ue=4;break;default:ue=2}for(te=0;te<47;te++)M.push({k:ee+te,v:ue})}for(M.sort(function(de,V){return V.v-de.v}),te=0;te<M.length;te++)ee=M[te].k.charAt(0),ge.charAt(ge.length-1)!==ee&&(ge+=ee);return ge!=="DGBEFHACIJK"}});c({target:"Array",proto:!0,forced:R||!q||!K||!J},{sort:function(Z){Z!==void 0&&d(Z);var ee=p(this);if(J)return Z===void 0?$(ee):$(ee,Z);var ue,te,ge=[],de=y(ee);for(te=0;te<de;te++)te in ee&&P(ge,ee[te]);for(k(ge,function(V){return function(U,Q){return Q===void 0?-1:U===void 0?1:V!==void 0?+V(U,Q)||0:E(U)>E(Q)?1:-1}}(Z)),ue=y(ge),te=0;te<ue;)ee[te]=ge[te++];for(;te<de;)x(ee,te++);return ee}})},4554:function(l,g,o){var c=o(6518),f=o(8981),d=o(5610),p=o(1291),y=o(6198),x=o(4527),E=o(6837),S=o(1469),k=o(4659),B=o(4606),O=o(597)("splice"),I=Math.max,L=Math.min;c({target:"Array",proto:!0,forced:!O},{splice:function(D,M){var $,P,R,q,K,J,Z=f(this),ee=y(Z),ue=d(D,ee),te=arguments.length;for(te===0?$=P=0:te===1?($=0,P=ee-ue):($=te-2,P=L(I(p(M),0),ee-ue)),E(ee+$-P),R=S(Z,P),q=0;q<P;q++)(K=ue+q)in Z&&k(R,q,Z[K]);if(R.length=P,$<P){for(q=ue;q<ee-P;q++)J=q+$,(K=q+P)in Z?Z[J]=Z[K]:B(Z,J);for(q=ee;q>ee-P+$;q--)B(Z,q-1)}else if($>P)for(q=ee-P;q>ue;q--)J=q+$-1,(K=q+P-1)in Z?Z[J]=Z[K]:B(Z,J);for(q=0;q<$;q++)Z[q+ue]=arguments[q+2];return x(Z,ee-P+$),R}})},739:function(l,g,o){var c=o(6518),f=o(9039),d=o(8981),p=o(2777);c({target:"Date",proto:!0,arity:1,forced:f(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(y){var x=d(this),E=p(x,"number");return typeof E!="number"||isFinite(E)?x.toISOString():null}})},9572:function(l,g,o){var c=o(9297),f=o(6840),d=o(3640),p=o(8227)("toPrimitive"),y=Date.prototype;c(y,p)||f(y,p,d)},2010:function(l,g,o){var c=o(3724),f=o(350).EXISTS,d=o(9504),p=o(2106),y=Function.prototype,x=d(y.toString),E=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,S=d(E.exec);c&&!f&&p(y,"name",{configurable:!0,get:function(){try{return S(E,x(this))[1]}catch{return""}}})},3110:function(l,g,o){var c=o(6518),f=o(7751),d=o(8745),p=o(9565),y=o(9504),x=o(9039),E=o(4901),S=o(757),k=o(7680),B=o(6933),O=o(4495),I=String,L=f("JSON","stringify"),D=y(/./.exec),M=y("".charAt),$=y("".charCodeAt),P=y("".replace),R=y(1 .toString),q=/[\uD800-\uDFFF]/g,K=/^[\uD800-\uDBFF]$/,J=/^[\uDC00-\uDFFF]$/,Z=!O||x(function(){var ge=f("Symbol")("stringify detection");return L([ge])!=="[null]"||L({a:ge})!=="{}"||L(Object(ge))!=="{}"}),ee=x(function(){return L("\uDF06\uD834")!=='"\\udf06\\ud834"'||L("\uDEAD")!=='"\\udead"'}),ue=function(ge,de){var V=k(arguments),U=B(de);if(E(U)||ge!==void 0&&!S(ge))return V[1]=function(Q,w){if(E(U)&&(w=p(U,this,I(Q),w)),!S(w))return w},d(L,null,V)},te=function(ge,de,V){var U=M(V,de-1),Q=M(V,de+1);return D(K,ge)&&!D(J,Q)||D(J,ge)&&!D(K,U)?"\\u"+R($(ge,0),16):ge};L&&c({target:"JSON",stat:!0,arity:3,forced:Z||ee},{stringify:function(ge,de,V){var U=k(arguments),Q=d(Z?ue:L,null,U);return ee&&typeof Q=="string"?P(Q,q,te):Q}})},2892:function(l,g,o){var c=o(6518),f=o(6395),d=o(3724),p=o(4475),y=o(9167),x=o(9504),E=o(2796),S=o(9297),k=o(3167),B=o(1625),O=o(757),I=o(2777),L=o(9039),D=o(8480).f,M=o(7347).f,$=o(4913).f,P=o(1240),R=o(3802).trim,q="Number",K=p[q],J=y[q],Z=K.prototype,ee=p.TypeError,ue=x("".slice),te=x("".charCodeAt),ge=function(Q){var w,_,j,T,W,G,Y,F,ce=I(Q,"number");if(O(ce))throw new ee("Cannot convert a Symbol value to a number");if(typeof ce=="string"&&ce.length>2){if(ce=R(ce),(w=te(ce,0))===43||w===45){if((_=te(ce,2))===88||_===120)return NaN}else if(w===48){switch(te(ce,1)){case 66:case 98:j=2,T=49;break;case 79:case 111:j=8,T=55;break;default:return+ce}for(G=(W=ue(ce,2)).length,Y=0;Y<G;Y++)if((F=te(W,Y))<48||F>T)return NaN;return parseInt(W,j)}}return+ce},de=E(q,!K(" 0o1")||!K("0b1")||K("+0x1")),V=function(Q){var w,_=arguments.length<1?0:K(function(j){var T=I(j,"number");return typeof T=="bigint"?T:ge(T)}(Q));return B(Z,w=this)&&L(function(){P(w)})?k(Object(_),this,V):_};V.prototype=Z,de&&!f&&(Z.constructor=V),c({global:!0,constructor:!0,wrap:!0,forced:de},{Number:V});var U=function(Q,w){for(var _,j=d?D(w):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),T=0;j.length>T;T++)S(w,_=j[T])&&!S(Q,_)&&$(Q,_,M(w,_))};f&&J&&U(y[q],J),(de||f)&&U(y[q],K)},2637:function(l,g,o){o(6518)({target:"Number",stat:!0},{isInteger:o(2087)})},9085:function(l,g,o){var c=o(6518),f=o(4213);c({target:"Object",stat:!0,arity:2,forced:Object.assign!==f},{assign:f})},7427:function(l,g,o){var c=o(6518),f=o(3724),d=o(2551),p=o(9306),y=o(8981),x=o(4913);f&&c({target:"Object",proto:!0,forced:d},{__defineGetter__:function(E,S){x.f(y(this),E,{get:p(S),enumerable:!0,configurable:!0})}})},3851:function(l,g,o){var c=o(6518),f=o(9039),d=o(5397),p=o(7347).f,y=o(3724);c({target:"Object",stat:!0,forced:!y||f(function(){p(1)}),sham:!y},{getOwnPropertyDescriptor:function(x,E){return p(d(x),E)}})},1278:function(l,g,o){var c=o(6518),f=o(3724),d=o(5031),p=o(5397),y=o(7347),x=o(4659);c({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(E){for(var S,k,B=p(E),O=y.f,I=d(B),L={},D=0;I.length>D;)(k=O(B,S=I[D++]))!==void 0&&x(L,S,k);return L}})},1480:function(l,g,o){var c=o(6518),f=o(9039),d=o(298).f;c({target:"Object",stat:!0,forced:f(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:d})},9773:function(l,g,o){var c=o(6518),f=o(4495),d=o(9039),p=o(3717),y=o(8981);c({target:"Object",stat:!0,forced:!f||d(function(){p.f(1)})},{getOwnPropertySymbols:function(x){var E=p.f;return E?E(y(x)):[]}})},9432:function(l,g,o){var c=o(6518),f=o(8981),d=o(1072);c({target:"Object",stat:!0,forced:o(9039)(function(){d(1)})},{keys:function(p){return d(f(p))}})},6099:function(l,g,o){var c=o(2140),f=o(6840),d=o(3179);c||f(Object.prototype,"toString",d,{unsafe:!0})},4864:function(l,g,o){var c=o(3724),f=o(4475),d=o(9504),p=o(2796),y=o(3167),x=o(6699),E=o(2360),S=o(8480).f,k=o(1625),B=o(788),O=o(655),I=o(1034),L=o(8429),D=o(1056),M=o(6840),$=o(9039),P=o(9297),R=o(1181).enforce,q=o(7633),K=o(8227),J=o(3635),Z=o(8814),ee=K("match"),ue=f.RegExp,te=ue.prototype,ge=f.SyntaxError,de=d(te.exec),V=d("".charAt),U=d("".replace),Q=d("".indexOf),w=d("".slice),_=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,T=/a/g,W=new ue(j)!==j,G=L.MISSED_STICKY,Y=L.UNSUPPORTED_Y;if(p("RegExp",c&&(!W||G||J||Z||$(function(){return T[ee]=!1,ue(j)!==j||ue(T)===T||String(ue(j,"i"))!=="/a/i"})))){for(var F=function(re,oe){var ye,ae,be,ke,De,je,$e=k(te,this),Ve=B(re),bt=oe===void 0,ze=[],Je=re;if(!$e&&Ve&&bt&&re.constructor===F)return re;if((Ve||k(te,re))&&(re=re.source,bt&&(oe=I(Je))),re=re===void 0?"":O(re),oe=oe===void 0?"":O(oe),Je=re,J&&"dotAll"in j&&(ae=!!oe&&Q(oe,"s")>-1)&&(oe=U(oe,/s/g,"")),ye=oe,G&&"sticky"in j&&(be=!!oe&&Q(oe,"y")>-1)&&Y&&(oe=U(oe,/y/g,"")),Z&&(ke=function(Ke){for(var Ee,At=Ke.length,st=0,mt="",ut=[],Ht=E(null),gt=!1,Pt=!1,yt=0,wt="";st<=At;st++){if((Ee=V(Ke,st))==="\\")Ee+=V(Ke,++st);else if(Ee==="]")gt=!1;else if(!gt)switch(!0){case Ee==="[":gt=!0;break;case Ee==="(":de(_,w(Ke,st+1))&&(st+=2,Pt=!0),mt+=Ee,yt++;continue;case(Ee===">"&&Pt):if(wt===""||P(Ht,wt))throw new ge("Invalid capture group name");Ht[wt]=!0,ut[ut.length]=[wt,yt],Pt=!1,wt="";continue}Pt?wt+=Ee:mt+=Ee}return[mt,ut]}(re),re=ke[0],ze=ke[1]),De=y(ue(re,oe),$e?this:te,F),(ae||be||ze.length)&&(je=R(De),ae&&(je.dotAll=!0,je.raw=F(function(Ke){for(var Ee,At=Ke.length,st=0,mt="",ut=!1;st<=At;st++)(Ee=V(Ke,st))!=="\\"?ut||Ee!=="."?(Ee==="["?ut=!0:Ee==="]"&&(ut=!1),mt+=Ee):mt+="[\\s\\S]":mt+=Ee+V(Ke,++st);return mt}(re),ye)),be&&(je.sticky=!0),ze.length&&(je.groups=ze)),re!==Je)try{x(De,"source",Je===""?"(?:)":Je)}catch{}return De},ce=S(ue),fe=0;ce.length>fe;)D(F,ue,ce[fe++]);te.constructor=F,F.prototype=te,M(f,"RegExp",F,{constructor:!0})}q("RegExp")},7495:function(l,g,o){var c=o(6518),f=o(7323);c({target:"RegExp",proto:!0,forced:/./.exec!==f},{exec:f})},8781:function(l,g,o){var c=o(350).PROPER,f=o(6840),d=o(8551),p=o(655),y=o(9039),x=o(1034),E="toString",S=RegExp.prototype,k=S[E],B=y(function(){return k.call({source:"a",flags:"b"})!=="/a/b"}),O=c&&k.name!==E;(B||O)&&f(S,E,function(){var I=d(this);return"/"+p(I.source)+"/"+p(x(I))},{unsafe:!0})},1699:function(l,g,o){var c=o(6518),f=o(9504),d=o(5749),p=o(7750),y=o(655),x=o(1436),E=f("".indexOf);c({target:"String",proto:!0,forced:!x("includes")},{includes:function(S){return!!~E(y(p(this)),y(d(S)),arguments.length>1?arguments[1]:void 0)}})},7764:function(l,g,o){var c=o(8183).charAt,f=o(655),d=o(1181),p=o(1088),y=o(2529),x="String Iterator",E=d.set,S=d.getterFor(x);p(String,"String",function(k){E(this,{type:x,string:f(k),index:0})},function(){var k,B=S(this),O=B.string,I=B.index;return I>=O.length?y(void 0,!0):(k=c(O,I),B.index+=k.length,y(k,!1))})},8543:function(l,g,o){var c=o(6518),f=o(9565),d=o(7476),p=o(3994),y=o(2529),x=o(7750),E=o(8014),S=o(655),k=o(8551),B=o(4117),O=o(4576),I=o(788),L=o(1034),D=o(5966),M=o(6840),$=o(9039),P=o(8227),R=o(2293),q=o(7829),K=o(6682),J=o(1181),Z=o(6395),ee=P("matchAll"),ue="RegExp String",te=ue+" Iterator",ge=J.set,de=J.getterFor(te),V=RegExp.prototype,U=TypeError,Q=d("".indexOf),w=d("".matchAll),_=!!w&&!$(function(){w("a",/./)}),j=p(function(W,G,Y,F){ge(this,{type:te,regexp:W,string:G,global:Y,unicode:F,done:!1})},ue,function(){var W=de(this);if(W.done)return y(void 0,!0);var G=W.regexp,Y=W.string,F=K(G,Y);return F===null?(W.done=!0,y(void 0,!0)):W.global?(S(F[0])===""&&(G.lastIndex=q(Y,E(G.lastIndex),W.unicode)),y(F,!1)):(W.done=!0,y(F,!1))}),T=function(W){var G,Y,F,ce=k(this),fe=S(W),re=R(ce,RegExp),oe=S(L(ce));return G=new re(re===RegExp?ce.source:ce,oe),Y=!!~Q(oe,"g"),F=!!~Q(oe,"u"),G.lastIndex=E(ce.lastIndex),new j(G,fe,Y,F)};c({target:"String",proto:!0,forced:_},{matchAll:function(W){var G,Y,F,ce,fe=x(this);if(B(W)){if(_)return w(fe,W)}else{if(I(W)&&(G=S(x(L(W))),!~Q(G,"g")))throw new U("`.matchAll` does not allow non-global regexes");if(_)return w(fe,W);if((F=D(W,ee))===void 0&&Z&&O(W)==="RegExp"&&(F=T),F)return f(F,W,fe)}return Y=S(fe),ce=new RegExp(W,"g"),Z?f(T,ce,Y):ce[ee](Y)}}),Z||ee in V||M(V,ee,T)},1761:function(l,g,o){var c=o(9565),f=o(9228),d=o(8551),p=o(4117),y=o(8014),x=o(655),E=o(7750),S=o(5966),k=o(7829),B=o(6682);f("match",function(O,I,L){return[function(D){var M=E(this),$=p(D)?void 0:S(D,O);return $?c($,D,M):new RegExp(D)[O](x(M))},function(D){var M=d(this),$=x(D),P=L(I,M,$);if(P.done)return P.value;if(!M.global)return B(M,$);var R=M.unicode;M.lastIndex=0;for(var q,K=[],J=0;(q=B(M,$))!==null;){var Z=x(q[0]);K[J]=Z,Z===""&&(M.lastIndex=k($,y(M.lastIndex),R)),J++}return J===0?null:K}]})},5440:function(l,g,o){var c=o(8745),f=o(9565),d=o(9504),p=o(9228),y=o(9039),x=o(8551),E=o(4901),S=o(4117),k=o(1291),B=o(8014),O=o(655),I=o(7750),L=o(7829),D=o(5966),M=o(2478),$=o(6682),P=o(8227)("replace"),R=Math.max,q=Math.min,K=d([].concat),J=d([].push),Z=d("".indexOf),ee=d("".slice),ue="a".replace(/./,"$0")==="$0",te=!!/./[P]&&/./[P]("a","$0")==="";p("replace",function(ge,de,V){var U=te?"$":"$0";return[function(Q,w){var _=I(this),j=S(Q)?void 0:D(Q,P);return j?f(j,Q,_,w):f(de,O(_),Q,w)},function(Q,w){var _=x(this),j=O(Q);if(typeof w=="string"&&Z(w,U)===-1&&Z(w,"$<")===-1){var T=V(de,_,j,w);if(T.done)return T.value}var W=E(w);W||(w=O(w));var G,Y=_.global;Y&&(G=_.unicode,_.lastIndex=0);for(var F,ce=[];(F=$(_,j))!==null&&(J(ce,F),Y);)O(F[0])===""&&(_.lastIndex=L(j,B(_.lastIndex),G));for(var fe,re="",oe=0,ye=0;ye<ce.length;ye++){for(var ae,be=O((F=ce[ye])[0]),ke=R(q(k(F.index),j.length),0),De=[],je=1;je<F.length;je++)J(De,(fe=F[je])===void 0?fe:String(fe));var $e=F.groups;if(W){var Ve=K([be],De,ke,j);$e!==void 0&&J(Ve,$e),ae=O(c(w,void 0,Ve))}else ae=M(be,j,ke,De,$e,w);ke>=oe&&(re+=ee(j,oe,ke)+ae,oe=ke+be.length)}return re+ee(j,oe)}]},!!y(function(){var ge=/./;return ge.exec=function(){var de=[];return de.groups={a:"7"},de},"".replace(ge,"$<a>")!=="7"})||!ue||te)},744:function(l,g,o){var c=o(9565),f=o(9504),d=o(9228),p=o(8551),y=o(4117),x=o(7750),E=o(2293),S=o(7829),k=o(8014),B=o(655),O=o(5966),I=o(6682),L=o(8429),D=o(9039),M=L.UNSUPPORTED_Y,$=Math.min,P=f([].push),R=f("".slice),q=!D(function(){var J=/(?:)/,Z=J.exec;J.exec=function(){return Z.apply(this,arguments)};var ee="ab".split(J);return ee.length!==2||ee[0]!=="a"||ee[1]!=="b"}),K="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;d("split",function(J,Z,ee){var ue="0".split(void 0,0).length?function(te,ge){return te===void 0&&ge===0?[]:c(Z,this,te,ge)}:Z;return[function(te,ge){var de=x(this),V=y(te)?void 0:O(te,J);return V?c(V,te,de,ge):c(ue,B(de),te,ge)},function(te,ge){var de=p(this),V=B(te);if(!K){var U=ee(ue,de,V,ge,ue!==Z);if(U.done)return U.value}var Q=E(de,RegExp),w=de.unicode,_=(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")+(M?"g":"y"),j=new Q(M?"^(?:"+de.source+")":de,_),T=ge===void 0?4294967295:ge>>>0;if(T===0)return[];if(V.length===0)return I(j,V)===null?[V]:[];for(var W=0,G=0,Y=[];G<V.length;){j.lastIndex=M?0:G;var F,ce=I(j,M?R(V,G):V);if(ce===null||(F=$(k(j.lastIndex+(M?G:0)),V.length))===W)G=S(V,G,w);else{if(P(Y,R(V,W,G)),Y.length===T)return Y;for(var fe=1;fe<=ce.length-1;fe++)if(P(Y,ce[fe]),Y.length===T)return Y;G=W=F}}return P(Y,R(V,W)),Y}]},K||!q,M)},2762:function(l,g,o){var c=o(6518),f=o(3802).trim;c({target:"String",proto:!0,forced:o(706)("trim")},{trim:function(){return f(this)}})},6761:function(l,g,o){var c=o(6518),f=o(4475),d=o(9565),p=o(9504),y=o(6395),x=o(3724),E=o(4495),S=o(9039),k=o(9297),B=o(1625),O=o(8551),I=o(5397),L=o(6969),D=o(655),M=o(6980),$=o(2360),P=o(1072),R=o(8480),q=o(298),K=o(3717),J=o(7347),Z=o(4913),ee=o(6801),ue=o(8773),te=o(6840),ge=o(2106),de=o(5745),V=o(6119),U=o(421),Q=o(3392),w=o(8227),_=o(1951),j=o(511),T=o(8242),W=o(687),G=o(1181),Y=o(9213).forEach,F=V("hidden"),ce="Symbol",fe="prototype",re=G.set,oe=G.getterFor(ce),ye=Object[fe],ae=f.Symbol,be=ae&&ae[fe],ke=f.RangeError,De=f.TypeError,je=f.QObject,$e=J.f,Ve=Z.f,bt=q.f,ze=ue.f,Je=p([].push),Ke=de("symbols"),Ee=de("op-symbols"),At=de("wks"),st=!je||!je[fe]||!je[fe].findChild,mt=function(A,H,X){var ie=$e(ye,H);ie&&delete ye[H],Ve(A,H,X),ie&&A!==ye&&Ve(ye,H,ie)},ut=x&&S(function(){return $(Ve({},"a",{get:function(){return Ve(this,"a",{value:7}).a}})).a!==7})?mt:Ve,Ht=function(A,H){var X=Ke[A]=$(be);return re(X,{type:ce,tag:A,description:H}),x||(X.description=H),X},gt=function(A,H,X){A===ye&&gt(Ee,H,X),O(A);var ie=L(H);return O(X),k(Ke,ie)?(X.enumerable?(k(A,F)&&A[F][ie]&&(A[F][ie]=!1),X=$(X,{enumerable:M(0,!1)})):(k(A,F)||Ve(A,F,M(1,$(null))),A[F][ie]=!0),ut(A,ie,X)):Ve(A,ie,X)},Pt=function(A,H){O(A);var X=I(H),ie=P(X).concat(Sn(X));return Y(ie,function(pe){x&&!d(yt,X,pe)||gt(A,pe,X[pe])}),A},yt=function(A){var H=L(A),X=d(ze,this,H);return!(this===ye&&k(Ke,H)&&!k(Ee,H))&&(!(X||!k(this,H)||!k(Ke,H)||k(this,F)&&this[F][H])||X)},wt=function(A,H){var X=I(A),ie=L(H);if(X!==ye||!k(Ke,ie)||k(Ee,ie)){var pe=$e(X,ie);return!pe||!k(Ke,ie)||k(X,F)&&X[F][ie]||(pe.enumerable=!0),pe}},on=function(A){var H=bt(I(A)),X=[];return Y(H,function(ie){k(Ke,ie)||k(U,ie)||Je(X,ie)}),X},Sn=function(A){var H=A===ye,X=bt(H?Ee:I(A)),ie=[];return Y(X,function(pe){!k(Ke,pe)||H&&!k(ye,pe)||Je(ie,Ke[pe])}),ie};E||(ae=function(){if(B(be,this))throw new De("Symbol is not a constructor");var A=arguments.length&&arguments[0]!==void 0?D(arguments[0]):void 0,H=Q(A),X=function(ie){var pe=this===void 0?f:this;pe===ye&&d(X,Ee,ie),k(pe,F)&&k(pe[F],H)&&(pe[F][H]=!1);var Se=M(1,ie);try{ut(pe,H,Se)}catch(we){if(!(we instanceof ke))throw we;mt(pe,H,Se)}};return x&&st&&ut(ye,H,{configurable:!0,set:X}),Ht(H,A)},te(be=ae[fe],"toString",function(){return oe(this).tag}),te(ae,"withoutSetter",function(A){return Ht(Q(A),A)}),ue.f=yt,Z.f=gt,ee.f=Pt,J.f=wt,R.f=q.f=on,K.f=Sn,_.f=function(A){return Ht(w(A),A)},x&&(ge(be,"description",{configurable:!0,get:function(){return oe(this).description}}),y||te(ye,"propertyIsEnumerable",yt,{unsafe:!0}))),c({global:!0,constructor:!0,wrap:!0,forced:!E,sham:!E},{Symbol:ae}),Y(P(At),function(A){j(A)}),c({target:ce,stat:!0,forced:!E},{useSetter:function(){st=!0},useSimple:function(){st=!1}}),c({target:"Object",stat:!0,forced:!E,sham:!x},{create:function(A,H){return H===void 0?$(A):Pt($(A),H)},defineProperty:gt,defineProperties:Pt,getOwnPropertyDescriptor:wt}),c({target:"Object",stat:!0,forced:!E},{getOwnPropertyNames:on}),T(),W(ae,ce),U[F]=!0},9463:function(l,g,o){var c=o(6518),f=o(3724),d=o(4475),p=o(9504),y=o(9297),x=o(4901),E=o(1625),S=o(655),k=o(2106),B=o(7740),O=d.Symbol,I=O&&O.prototype;if(f&&x(O)&&(!("description"in I)||O().description!==void 0)){var L={},D=function(){var J=arguments.length<1||arguments[0]===void 0?void 0:S(arguments[0]),Z=E(I,this)?new O(J):J===void 0?O():O(J);return J===""&&(L[Z]=!0),Z};B(D,O),D.prototype=I,I.constructor=D;var M=String(O("description detection"))==="Symbol(description detection)",$=p(I.valueOf),P=p(I.toString),R=/^Symbol\((.*)\)[^)]+$/,q=p("".replace),K=p("".slice);k(I,"description",{configurable:!0,get:function(){var J=$(this);if(y(L,J))return"";var Z=P(J),ee=M?K(Z,7,-1):q(Z,R,"$1");return ee===""?void 0:ee}}),c({global:!0,constructor:!0,forced:!0},{Symbol:D})}},1510:function(l,g,o){var c=o(6518),f=o(7751),d=o(9297),p=o(655),y=o(5745),x=o(1296),E=y("string-to-symbol-registry"),S=y("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!x},{for:function(k){var B=p(k);if(d(E,B))return E[B];var O=f("Symbol")(B);return E[B]=O,S[O]=B,O}})},2259:function(l,g,o){o(511)("iterator")},2675:function(l,g,o){o(6761),o(1510),o(7812),o(3110),o(9773)},7812:function(l,g,o){var c=o(6518),f=o(9297),d=o(757),p=o(6823),y=o(5745),x=o(1296),E=y("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!x},{keyFor:function(S){if(!d(S))throw new TypeError(p(S)+" is not a symbol");if(f(E,S))return E[S]}})},5700:function(l,g,o){var c=o(511),f=o(8242);c("toPrimitive"),f()},8344:function(l,g,o){o(8543)},3500:function(l,g,o){var c=o(4475),f=o(7400),d=o(9296),p=o(235),y=o(6699),x=function(S){if(S&&S.forEach!==p)try{y(S,"forEach",p)}catch{S.forEach=p}};for(var E in f)f[E]&&x(c[E]&&c[E].prototype);x(d)},2953:function(l,g,o){var c=o(4475),f=o(7400),d=o(9296),p=o(3792),y=o(6699),x=o(687),E=o(8227)("iterator"),S=p.values,k=function(O,I){if(O){if(O[E]!==S)try{y(O,E,S)}catch{O[E]=S}if(x(O,I,!0),f[I]){for(var L in p)if(O[L]!==p[L])try{y(O,L,p[L])}catch{O[L]=p[L]}}}};for(var B in f)k(c[B]&&c[B].prototype,B);k(d,"DOMTokenList")}},v={};function m(l){var g=v[l];if(g!==void 0)return g.exports;var o=v[l]={exports:{}};return h[l].call(o.exports,o,o.exports,m),o.exports}m.d=function(l,g){for(var o in g)m.o(g,o)&&!m.o(l,o)&&Object.defineProperty(l,o,{enumerable:!0,get:g[o]})},m.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),m.o=function(l,g){return Object.prototype.hasOwnProperty.call(l,g)},m.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var b={};return function(){function l(V){return function(U){if(Array.isArray(U))return o(U)}(V)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(V)||g(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
66
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function g(V,U){if(V){if(typeof V=="string")return o(V,U);var Q=Object.prototype.toString.call(V).slice(8,-1);return Q==="Object"&&V.constructor&&(Q=V.constructor.name),Q==="Map"||Q==="Set"?Array.from(V):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?o(V,U):void 0}}function o(V,U){(U==null||U>V.length)&&(U=V.length);for(var Q=0,w=new Array(U);Q<U;Q++)w[Q]=V[Q];return w}function c(V){return c=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},c(V)}function f(V,U){for(var Q=0;Q<U.length;Q++){var w=U[Q];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,p(w.key),w)}}function d(V,U,Q){return(U=p(U))in V?Object.defineProperty(V,U,{value:Q,enumerable:!0,configurable:!0,writable:!0}):V[U]=Q,V}function p(V){var U=function(Q,w){if(c(Q)!="object"||!Q)return Q;var _=Q[Symbol.toPrimitive];if(_!==void 0){var j=_.call(Q,w||"default");if(c(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(Q)}(V,"string");return c(U)=="symbol"?U:U+""}m.r(b),m.d(b,{SimpleKeyboard:function(){return ge},default:function(){return de}}),m(5276),m(8598),m(4782),m(4554),m(2010),m(7427),m(6099),m(7495),m(8781),m(5440),m(744),m(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(V){if("Element"in V){var U="classList",Q="prototype",w=V.Element[Q],_=Object,j=String[Q].trim||function(){return this.replace(/^\s+|\s+$/g,"")},T=Array[Q].indexOf||function(re){for(var oe=0,ye=this.length;oe<ye;oe++)if(oe in this&&this[oe]===re)return oe;return-1},W=function(re,oe){this.name=re,this.code=DOMException[re],this.message=oe},G=function(re,oe){if(oe==="")throw new W("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(oe))throw new W("INVALID_CHARACTER_ERR","The token must not contain space characters.");return T.call(re,oe)},Y=function(re){for(var oe=j.call(re.getAttribute("class")||""),ye=oe?oe.split(/\s+/):[],ae=0,be=ye.length;ae<be;ae++)this.push(ye[ae]);this._updateClassName=function(){re.setAttribute("class",this.toString())}},F=Y[Q]=[],ce=function(){return new Y(this)};if(W[Q]=Error[Q],F.item=function(re){return this[re]||null},F.contains=function(re){return~G(this,re+"")},F.add=function(){var re,oe=arguments,ye=0,ae=oe.length,be=!1;do~G(this,re=oe[ye]+"")||(this.push(re),be=!0);while(++ye<ae);be&&this._updateClassName()},F.remove=function(){var re,oe,ye=arguments,ae=0,be=ye.length,ke=!1;do for(oe=G(this,re=ye[ae]+"");~oe;)this.splice(oe,1),ke=!0,oe=G(this,re);while(++ae<be);ke&&this._updateClassName()},F.toggle=function(re,oe){var ye=this.contains(re),ae=ye?oe!==!0&&"remove":oe!==!1&&"add";return ae&&this[ae](re),oe===!0||oe===!1?oe:!ye},F.replace=function(re,oe){var ye=G(re+"");~ye&&(this.splice(ye,1,oe),this._updateClassName())},F.toString=function(){return this.join(" ")},_.defineProperty){var fe={get:ce,enumerable:!0,configurable:!0};try{_.defineProperty(w,U,fe)}catch(re){re.number!==void 0&&re.number!==-2146823252||(fe.enumerable=!1,_.defineProperty(w,U,fe))}}else _[Q].__defineGetter__&&w.__defineGetter__(U,ce)}}(self),function(){var V=document.createElement("_");if(V.classList.add("c1","c2"),!V.classList.contains("c2")){var U=function(w){var _=DOMTokenList.prototype[w];DOMTokenList.prototype[w]=function(j){var T,W=arguments.length;for(T=0;T<W;T++)j=arguments[T],_.call(this,j)}};U("add"),U("remove")}if(V.classList.toggle("c3",!1),V.classList.contains("c3")){var Q=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(w,_){return 1 in arguments&&!this.contains(w)==!_?_:Q.call(this,w)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(w,_){var j=this.toString().split(" "),T=j.indexOf(w+"");~T&&(j=j.slice(T),this.remove.apply(this,j),this.add(_),this.add.apply(this,j.slice(1)))}),V=null}()),m(2675),m(9463),m(2259),m(5700),m(8706),m(2008),m(3418),m(4423),m(3792),m(2062),m(6910),m(739),m(9572),m(2892),m(9085),m(3851),m(1278),m(9432),m(4864),m(1699),m(7764),m(8344),m(3500),m(2953),m(2712),m(2637),m(1480),m(1761);var y=function(){return V=function w(_){var j=_.getOptions,T=_.getCaretPosition,W=_.getCaretPositionEnd,G=_.dispatch;(function(Y,F){if(!(Y instanceof F))throw new TypeError("Cannot call a class as a function")})(this,w),d(this,"getOptions",void 0),d(this,"getCaretPosition",void 0),d(this,"getCaretPositionEnd",void 0),d(this,"dispatch",void 0),d(this,"maxLengthReached",void 0),d(this,"isStandardButton",function(Y){return Y&&!(Y[0]==="{"&&Y[Y.length-1]==="}")}),this.getOptions=j,this.getCaretPosition=T,this.getCaretPositionEnd=W,this.dispatch=G,w.bindMethods(w,this)},U=[{key:"getButtonType",value:function(w){return w.includes("{")&&w.includes("}")&&w!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(w){var _=this.getButtonType(w),j=w.replace("{","").replace("}",""),T="";return _!=="standardBtn"&&(T=" hg-button-".concat(j)),"hg-".concat(_).concat(T)}},{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(w,_){return(_=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),_):_||this.getDefaultDiplay())[w]||w}},{key:"getUpdatedInput",value:function(w,_,j){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:j,W=arguments.length>4&&arguments[4]!==void 0&&arguments[4],G=this.getOptions(),Y=[j,T,W],F=_;return(w==="{bksp}"||w==="{backspace}")&&F.length>0?F=this.removeAt.apply(this,[F].concat(Y)):(w==="{delete}"||w==="{forwarddelete}")&&F.length>0?F=this.removeForwardsAt.apply(this,[F].concat(Y)):w==="{space}"?F=this.addStringAt.apply(this,[F," "].concat(Y)):w!=="{tab}"||typeof G.tabCharOnTab=="boolean"&&G.tabCharOnTab===!1?w!=="{enter}"&&w!=="{numpadenter}"||!G.newLineOnEnter?w.includes("numpad")&&Number.isInteger(Number(w[w.length-2]))?F=this.addStringAt.apply(this,[F,w[w.length-2]].concat(Y)):w==="{numpaddivide}"?F=this.addStringAt.apply(this,[F,"/"].concat(Y)):w==="{numpadmultiply}"?F=this.addStringAt.apply(this,[F,"*"].concat(Y)):w==="{numpadsubtract}"?F=this.addStringAt.apply(this,[F,"-"].concat(Y)):w==="{numpadadd}"?F=this.addStringAt.apply(this,[F,"+"].concat(Y)):w==="{numpaddecimal}"?F=this.addStringAt.apply(this,[F,"."].concat(Y)):w==="{"||w==="}"?F=this.addStringAt.apply(this,[F,w].concat(Y)):w.includes("{")||w.includes("}")||(F=this.addStringAt.apply(this,[F,w].concat(Y))):F=this.addStringAt.apply(this,[F,`
67
+ `].concat(Y)):F=this.addStringAt.apply(this,[F," "].concat(Y)),G.debug&&console.log("Input will be: "+F),F}},{key:"updateCaretPos",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0&&arguments[1],j=this.updateCaretPosAction(w,_);this.dispatch(function(T){T.setCaretPosition(j)})}},{key:"updateCaretPosAction",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0&&arguments[1],j=this.getOptions(),T=this.getCaretPosition();return T!=null&&(_?T>0&&(T-=w):T+=w),j.debug&&console.log("Caret at:",T),T}},{key:"addStringAt",value:function(w,_){var j,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w.length,G=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return T||T===0?(j=[w.slice(0,T),_,w.slice(W)].join(""),this.isMaxLengthReached()||G&&this.updateCaretPos(_.length)):j=w+_,j}},{key:"removeAt",value:function(w){var _,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.length,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(j===0&&T===0)return w;if(j===T){var G=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;j&&j>=0?w.substring(j-2,j).match(G)?(_=w.substr(0,j-2)+w.substr(j),W&&this.updateCaretPos(2,!0)):(_=w.substr(0,j-1)+w.substr(j),W&&this.updateCaretPos(1,!0)):w.slice(-2).match(G)?(_=w.slice(0,-2),W&&this.updateCaretPos(2,!0)):(_=w.slice(0,-1),W&&this.updateCaretPos(1,!0))}else _=w.slice(0,j)+w.slice(T),W&&this.dispatch(function(Y){Y.setCaretPosition(j)});return _}},{key:"removeForwardsAt",value:function(w){var _,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.length,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return w!=null&&w.length&&j!==null?(j===T?_=w.substring(j,j+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?w.substr(0,j)+w.substr(j+2):w.substr(0,j)+w.substr(j+1):(_=w.slice(0,j)+w.slice(T),W&&this.dispatch(function(G){G.setCaretPosition(j)})),_):w}},{key:"handleMaxLength",value:function(w,_){var j=this.getOptions(),T=j.maxLength,W=w[j.inputName||"default"],G=_.length-1>=T;if(_.length<=W.length)return!1;if(Number.isInteger(T))return j.debug&&console.log("maxLength (num) reached:",G),G?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(c(T)==="object"){var Y=_.length-1>=T[j.inputName||"default"];return j.debug&&console.log("maxLength (obj) reached:",Y),Y?(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(w){return w?w.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(_,j){return j.length?_+j[0].toUpperCase()+j.slice(1):_}):""}},{key:"chunkArray",value:function(w,_){return l(Array(Math.ceil(w.length/_))).map(function(j,T){return w.slice(_*T,_+_*T)})}},{key:"escapeRegex",value:function(w){return w.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(w,_){var j=w,T=_.indexOf("‫");return T<w&&T!=-1&&j--,_.indexOf("‬")<w&&T!=-1&&j--,j<0?0:j}}],Q=[{key:"bindMethods",value:function(w,_){var j,T=function(G,Y){var F=typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(!F){if(Array.isArray(G)||(F=g(G))||Y&&G&&typeof G.length=="number"){F&&(G=F);var ce=0,fe=function(){};return{s:fe,n:function(){return ce>=G.length?{done:!0}:{done:!1,value:G[ce++]}},e:function(ae){throw ae},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
68
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var re,oe=!0,ye=!1;return{s:function(){F=F.call(G)},n:function(){var ae=F.next();return oe=ae.done,ae},e:function(ae){ye=!0,re=ae},f:function(){try{oe||F.return==null||F.return()}finally{if(ye)throw re}}}}(Object.getOwnPropertyNames(w.prototype));try{for(T.s();!(j=T.n()).done;){var W=j.value;W==="constructor"||W==="bindMethods"||(_[W]=_[W].bind(_))}}catch(G){T.e(G)}finally{T.f()}}}],U&&f(V.prototype,U),Q&&f(V,Q),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,Q}();d(y,"noop",function(){});var x=y;function E(V){return E=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},E(V)}function S(V,U){for(var Q=0;Q<U.length;Q++){var w=U[Q];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,B(w.key),w)}}function k(V,U,Q){return(U=B(U))in V?Object.defineProperty(V,U,{value:Q,enumerable:!0,configurable:!0,writable:!0}):V[U]=Q,V}function B(V){var U=function(Q,w){if(E(Q)!="object"||!Q)return Q;var _=Q[Symbol.toPrimitive];if(_!==void 0){var j=_.call(Q,w||"default");if(E(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(Q)}(V,"string");return E(U)=="symbol"?U:U+""}var O=function(){return V=function w(_){var j=this,T=_.dispatch,W=_.getOptions;(function(G,Y){if(!(G instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,w),k(this,"getOptions",void 0),k(this,"dispatch",void 0),k(this,"isModifierKey",function(G){return G.altKey||G.ctrlKey||G.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(G.code||G.key||j.keyCodeToKey(G==null?void 0:G.keyCode))}),this.dispatch=T,this.getOptions=W,x.bindMethods(w,this)},(U=[{key:"handleHighlightKeyDown",value:function(w){var _=this.getOptions();_.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(w)&&(w.preventDefault(),w.stopImmediatePropagation());var j=this.getSimpleKeyboardLayoutKey(w);this.dispatch(function(T){var W,G,Y=T.getButtonElement(j),F=T.getButtonElement("{".concat(j,"}"));if(Y)W=Y,G=j;else{if(!F)return;W=F,G="{".concat(j,"}")}var ce,fe,re,oe,ye=function(be){be.style.background=_.physicalKeyboardHighlightBgColor||"#dadce4",be.style.color=_.physicalKeyboardHighlightTextColor||"black"};if(W)if(Array.isArray(W)){if(W.forEach(function(be){return ye(be)}),_.physicalKeyboardHighlightPress)if(_.physicalKeyboardHighlightPressUsePointerEvents)(ce=W[0])===null||ce===void 0||(fe=ce.onpointerdown)===null||fe===void 0||fe.call(ce,w);else if(_.physicalKeyboardHighlightPressUseClick){var ae;(ae=W[0])===null||ae===void 0||ae.click()}else T.handleButtonClicked(G,w)}else ye(W),_.physicalKeyboardHighlightPress&&(_.physicalKeyboardHighlightPressUsePointerEvents?(re=W)===null||re===void 0||(oe=re.onpointerdown)===null||oe===void 0||oe.call(re,w):_.physicalKeyboardHighlightPressUseClick?W.click():T.handleButtonClicked(G,w))})}},{key:"handleHighlightKeyUp",value:function(w){var _=this.getOptions();_.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(w)&&(w.preventDefault(),w.stopImmediatePropagation());var j=this.getSimpleKeyboardLayoutKey(w);this.dispatch(function(T){var W,G,Y,F=T.getButtonElement(j)||T.getButtonElement("{".concat(j,"}")),ce=function(fe){fe.removeAttribute&&fe.removeAttribute("style")};F&&(Array.isArray(F)?(F.forEach(function(fe){return ce(fe)}),_.physicalKeyboardHighlightPressUsePointerEvents&&((W=F[0])===null||W===void 0||(G=W.onpointerup)===null||G===void 0||G.call(W,w))):(ce(F),_.physicalKeyboardHighlightPressUsePointerEvents&&(F==null||(Y=F.onpointerup)===null||Y===void 0||Y.call(F,w))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(w){var _,j="",T=w.code||w.key||this.keyCodeToKey(w==null?void 0:w.keyCode);return(j=T!=null&&T.includes("Numpad")||T!=null&&T.includes("Shift")||T!=null&&T.includes("Space")||T!=null&&T.includes("Backspace")||T!=null&&T.includes("Control")||T!=null&&T.includes("Alt")||T!=null&&T.includes("Meta")?w.code||"":w.key||this.keyCodeToKey(w==null?void 0:w.keyCode)||"").length>1?(_=j)===null||_===void 0?void 0:_.toLowerCase():j}},{key:"keyCodeToKey",value:function(w){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:"'"}[w]||""}}])&&S(V.prototype,U),Q&&S(V,Q),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,Q}();function I(V){return I=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},I(V)}function L(V,U){for(var Q=0;Q<U.length;Q++){var w=U[Q];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,M(w.key),w)}}function D(V,U,Q){return(U=M(U))in V?Object.defineProperty(V,U,{value:Q,enumerable:!0,configurable:!0,writable:!0}):V[U]=Q,V}function M(V){var U=function(Q,w){if(I(Q)!="object"||!Q)return Q;var _=Q[Symbol.toPrimitive];if(_!==void 0){var j=_.call(Q,w||"default");if(I(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(Q)}(V,"string");return I(U)=="symbol"?U:U+""}var $=function(){return V=function w(_){var j=_.utilities,T=_.options;(function(W,G){if(!(W instanceof G))throw new TypeError("Cannot call a class as a function")})(this,w),D(this,"utilities",void 0),D(this,"options",void 0),D(this,"candidateBoxElement",void 0),D(this,"pageIndex",0),D(this,"pageSize",void 0),this.utilities=j,this.options=T,x.bindMethods(w,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(w){var _=this,j=w.candidateValue,T=w.targetElement,W=w.onSelect;if(j&&j.length){var G=this.utilities.chunkArray(j.split(" "),this.pageSize);this.renderPage({candidateListPages:G,targetElement:T,pageIndex:this.pageIndex,nbPages:G.length,onItemSelected:function(Y,F){W(Y,F),_.destroy()}})}}},{key:"renderPage",value:function(w){var _,j=this,T=w.candidateListPages,W=w.targetElement,G=w.pageIndex,Y=w.nbPages,F=w.onItemSelected;(_=this.candidateBoxElement)===null||_===void 0||_.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var ce=document.createElement("ul");ce.className="hg-candidate-box-list",T[G].forEach(function(ke){var De,je=document.createElement("li"),$e=function(){var Ve=new(j.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(Ve,"target",{value:je}),Ve};je.className="hg-candidate-box-list-item",je.innerHTML=((De=j.options.display)===null||De===void 0?void 0:De[ke])||ke,j.options.useTouchEvents?je.ontouchstart=function(Ve){return F(ke,Ve||$e())}:je.onclick=function(){var Ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$e();return F(ke,Ve)},ce.appendChild(je)});var fe=G>0,re=document.createElement("div");re.classList.add("hg-candidate-box-prev"),fe&&re.classList.add("hg-candidate-box-btn-active");var oe=function(){fe&&j.renderPage({candidateListPages:T,targetElement:W,pageIndex:G-1,nbPages:Y,onItemSelected:F})};this.options.useTouchEvents?re.ontouchstart=oe:re.onclick=oe,this.candidateBoxElement.appendChild(re),this.candidateBoxElement.appendChild(ce);var ye=G<Y-1,ae=document.createElement("div");ae.classList.add("hg-candidate-box-next"),ye&&ae.classList.add("hg-candidate-box-btn-active");var be=function(){ye&&j.renderPage({candidateListPages:T,targetElement:W,pageIndex:G+1,nbPages:Y,onItemSelected:F})};this.options.useTouchEvents?ae.ontouchstart=be:ae.onclick=be,this.candidateBoxElement.appendChild(ae),W.prepend(this.candidateBoxElement)}}],U&&L(V.prototype,U),Q&&L(V,Q),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,Q}(),P=$;function R(V){return function(U){if(Array.isArray(U))return q(U)}(V)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(V)||function(U,Q){if(U){if(typeof U=="string")return q(U,Q);var w=Object.prototype.toString.call(U).slice(8,-1);return w==="Object"&&U.constructor&&(w=U.constructor.name),w==="Map"||w==="Set"?Array.from(U):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?q(U,Q):void 0}}(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
69
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function q(V,U){(U==null||U>V.length)&&(U=V.length);for(var Q=0,w=new Array(U);Q<U;Q++)w[Q]=V[Q];return w}function K(V){return K=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},K(V)}function J(V,U){var Q=Object.keys(V);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(V);U&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(V,_).enumerable})),Q.push.apply(Q,w)}return Q}function Z(V,U){for(var Q=0;Q<U.length;Q++){var w=U[Q];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,ue(w.key),w)}}function ee(V,U,Q){return(U=ue(U))in V?Object.defineProperty(V,U,{value:Q,enumerable:!0,configurable:!0,writable:!0}):V[U]=Q,V}function ue(V){var U=function(Q,w){if(K(Q)!="object"||!Q)return Q;var _=Q[Symbol.toPrimitive];if(_!==void 0){var j=_.call(Q,w||"default");if(K(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(Q)}(V,"string");return K(U)=="symbol"?U:U+""}var te=function(){return V=function w(_,j){var T=this;if(function(oe,ye){if(!(oe instanceof ye))throw new TypeError("Cannot call a class as a function")}(this,w),ee(this,"input",void 0),ee(this,"options",void 0),ee(this,"utilities",void 0),ee(this,"caretPosition",void 0),ee(this,"caretPositionEnd",void 0),ee(this,"keyboardDOM",void 0),ee(this,"keyboardPluginClasses",void 0),ee(this,"keyboardDOMClass",void 0),ee(this,"buttonElements",void 0),ee(this,"currentInstanceName",void 0),ee(this,"allKeyboardInstances",void 0),ee(this,"keyboardInstanceNames",void 0),ee(this,"isFirstKeyboardInstance",void 0),ee(this,"physicalKeyboard",void 0),ee(this,"modules",void 0),ee(this,"activeButtonClass",void 0),ee(this,"holdInteractionTimeout",void 0),ee(this,"holdTimeout",void 0),ee(this,"isMouseHold",void 0),ee(this,"initialized",void 0),ee(this,"candidateBox",void 0),ee(this,"keyboardRowsDOM",void 0),ee(this,"defaultName","default"),ee(this,"activeInputElement",null),ee(this,"handleParams",function(oe,ye){var ae,be,ke;if(typeof oe=="string")ae=oe.split(".").join(""),be=document.querySelector(".".concat(ae)),ke=ye;else if(oe instanceof HTMLDivElement){if(!oe.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ae=oe.className.split(" ")[0],be=oe,ke=ye}else ae="simple-keyboard",be=document.querySelector(".".concat(ae)),ke=oe;return{keyboardDOMClass:ae,keyboardDOM:be,options:ke}}),ee(this,"getOptions",function(){return T.options}),ee(this,"getCaretPosition",function(){return T.caretPosition}),ee(this,"getCaretPositionEnd",function(){return T.caretPositionEnd}),ee(this,"registerModule",function(oe,ye){T.modules[oe]||(T.modules[oe]={}),ye(T.modules[oe])}),ee(this,"getKeyboardClassString",function(){for(var oe=arguments.length,ye=new Array(oe),ae=0;ae<oe;ae++)ye[ae]=arguments[ae];return[T.keyboardDOMClass].concat(ye).filter(function(be){return!!be}).join(" ")}),typeof window<"u"){var W=this.handleParams(_,j),G=W.keyboardDOMClass,Y=W.keyboardDOM,F=W.options,ce=F===void 0?{}:F;this.utilities=new x({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=Y,this.options=function(oe){for(var ye=1;ye<arguments.length;ye++){var ae=arguments[ye]!=null?arguments[ye]:{};ye%2?J(Object(ae),!0).forEach(function(be){ee(oe,be,ae[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(ae)):J(Object(ae)).forEach(function(be){Object.defineProperty(oe,be,Object.getOwnPropertyDescriptor(ae,be))})}return oe}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},ce),this.keyboardPluginClasses="",x.bindMethods(w,this);var fe=this.options.inputName,re=fe===void 0?this.defaultName:fe;if(this.input={},this.input[re]="",this.keyboardDOMClass=G,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 O({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new P({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(G,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},U=[{key:"setCaretPosition",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w;this.caretPosition=w,this.caretPositionEnd=_}},{key:"getInputCandidates",value:function(w){var _=this,j=this.options,T=j.layoutCandidates,W=j.layoutCandidatesCaseSensitiveMatch;if(!T||K(T)!=="object")return{};var G=Object.keys(T).filter(function(ce){var fe=w.substring(0,_.getCaretPositionEnd()||0)||w,re=new RegExp("".concat(_.utilities.escapeRegex(ce),"$"),W?"g":"gi");return!!R(fe.matchAll(re)).length});if(G.length>1){var Y=G.sort(function(ce,fe){return fe.length-ce.length})[0];return{candidateKey:Y,candidateValue:T[Y]}}if(G.length){var F=G[0];return{candidateKey:F,candidateValue:T[F]}}return{}}},{key:"showCandidatesBox",value:function(w,_,j){var T=this;this.candidateBox&&this.candidateBox.show({candidateValue:_,targetElement:j,onSelect:function(W,G){var Y=T.options,F=Y.layoutCandidatesCaseSensitiveMatch,ce=Y.disableCandidateNormalization,fe=Y.enableLayoutCandidatesKeyPress,re=W;ce||(re=W.normalize("NFD"));var oe=T.getInput(T.options.inputName,!0),ye=T.getCaretPositionEnd()||0,ae=oe.substring(0,ye||0)||oe,be=new RegExp("".concat(T.utilities.escapeRegex(w),"$"),F?"g":"gi"),ke=ae.replace(be,re),De=oe.replace(ae,ke),je=ke.length-ae.length,$e=(ye||oe.length)+je;$e<0&&($e=0),T.setInput(De,T.options.inputName,!0),T.setCaretPosition($e),fe&&typeof T.options.onKeyPress=="function"&&T.options.onKeyPress(W,G),typeof T.options.onChange=="function"&&T.options.onChange(T.getInput(T.options.inputName,!0),G),typeof T.options.onChangeAll=="function"&&T.options.onChangeAll(T.getAllInputs(),G)}})}},{key:"handleButtonClicked",value:function(w,_){var j=this.options,T=j.inputName,W=T===void 0?this.defaultName:T,G=j.debug;if(w!=="{//}"){this.input[W]||(this.input[W]="");var Y=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(w)&&this.activeInputElement&&this.input[W]&&this.input[W]===Y&&this.caretPosition===0&&this.caretPositionEnd===Y.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(w,_);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(w,_),this.input[W]!==Y&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(Y))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,Y))return;var F=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(F,this.options.inputName,!0),G&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),_==null?void 0:_.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),_),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),_),_!=null&&_.target&&this.options.enableLayoutCandidates){var ce,fe=this.getInputCandidates(Y),re=fe.candidateKey,oe=fe.candidateValue;re&&oe?this.showCandidatesBox(re,oe,this.keyboardDOM):(ce=this.candidateBox)===null||ce===void 0||ce.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)),G&&console.log("Key pressed:",w)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(w){this.options.syncInstanceInputs?this.dispatch(function(_){_.isMouseHold=w}):this.isMouseHold=w}},{key:"handleButtonMouseDown",value:function(w,_){var j=this;_&&(this.options.preventMouseDownDefault&&_.preventDefault(),this.options.stopMouseDownPropagation&&_.stopPropagation(),_.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(){(j.getMouseHold()&&(!w.includes("{")&&!w.includes("}")||w==="{delete}"||w==="{backspace}"||w==="{bksp}"||w==="{space}"||w==="{tab}")||w==="{arrowright}"||w==="{arrowleft}"||w==="{arrowup}"||w==="{arrowdown}")&&(j.options.debug&&console.log("Button held:",w),j.handleButtonHold(w)),clearTimeout(j.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(w,_){var j=this;_&&(this.options.preventMouseUpDefault&&_.preventDefault&&_.preventDefault(),this.options.stopMouseUpPropagation&&_.stopPropagation&&_.stopPropagation(),!(_.target===this.keyboardDOM||_.target&&this.keyboardDOM.contains(_.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(_.target===this.candidateBox.candidateBoxElement||_.target&&this.candidateBox.candidateBoxElement.contains(_.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(T){T.classList.remove(j.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),w&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(w,_)}},{key:"handleKeyboardContainerMouseDown",value:function(w){this.options.preventMouseDownDefault&&w.preventDefault()}},{key:"handleButtonHold",value:function(w){var _=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){_.getMouseHold()?(_.handleButtonClicked(w),_.handleButtonHold(w)):clearTimeout(_.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var w=this;this.dispatch(function(_){_.replaceInput(w.input),_.setCaretPosition(w.caretPosition,w.caretPositionEnd)})}},{key:"clearInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[w]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!_&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[w].replace("‫","").replace("‬","")+"‬":this.input[w]}},{key:"getAllInputs",value:function(){var w=this,_={};return Object.keys(this.input).forEach(function(j){_[j]=w.getInput(j,!0)}),_}},{key:"setInput",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,j=arguments.length>2?arguments[2]:void 0;this.input[_]=w,!j&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(w){this.input=w}},{key:"setOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=this.changedOptions(w);this.options=Object.assign(this.options,w),_.length&&(this.options.debug&&console.log("changedOptions",_),this.onSetOptions(_),this.render())}},{key:"changedOptions",value:function(w){var _=this;return Object.keys(w).filter(function(j){return JSON.stringify(w[j])!==JSON.stringify(_.options[j])})}},{key:"onSetOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(w.includes("layoutCandidatesPageSize")||w.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new P({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(w){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(_){w(window.SimpleKeyboardInstances[_],_)})}},{key:"addButtonTheme",value:function(w,_){var j=this;_&&w&&(w.split(" ").forEach(function(T){_.split(" ").forEach(function(W){j.options.buttonTheme||(j.options.buttonTheme=[]);var G=!1;j.options.buttonTheme.map(function(Y){if(Y!=null&&Y.class.split(" ").includes(W)){G=!0;var F=Y.buttons.split(" ");F.includes(T)||(G=!0,F.push(T),Y.buttons=F.join(" "))}return Y}),G||j.options.buttonTheme.push({class:W,buttons:w})})}),this.render())}},{key:"removeButtonTheme",value:function(w,_){var j=this;if(!w&&!_)return this.options.buttonTheme=[],void this.render();w&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(w.split(" ").forEach(function(T){var W;(W=j.options)===null||W===void 0||(W=W.buttonTheme)===null||W===void 0||W.map(function(G,Y){if(G&&_&&_.includes(G.class)||!_){var F,ce,fe=(F=G)===null||F===void 0?void 0:F.buttons.split(" ").filter(function(re){return re!==T});G&&fe!=null&&fe.length?G.buttons=fe.join(" "):((ce=j.options.buttonTheme)===null||ce===void 0||ce.splice(Y,1),G=null)}return G})}),this.render())}},{key:"getButtonElement",value:function(w){var _,j=this.buttonElements[w];return j&&(_=j.length>1?j:j[0]),_}},{key:"inputPatternIsValid",value:function(w){var _,j=this.options.inputPattern;if((_=j instanceof RegExp?j:j[this.options.inputName||this.defaultName])&&w){var T=_.test(w);return this.options.debug&&console.log('inputPattern ("'.concat(_,'"): ').concat(T?"passed":"did not pass!")),T}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.addEventListener("keyup",this.handleKeyUp,_),document.addEventListener("keydown",this.handleKeyDown,_),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(w){this.caretEventHandler(w),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(w)}},{key:"handleKeyDown",value:function(w){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(w)}},{key:"handleMouseUp",value:function(w){this.caretEventHandler(w)}},{key:"handleTouchEnd",value:function(w){this.caretEventHandler(w)}},{key:"handleSelect",value:function(w){this.caretEventHandler(w)}},{key:"handleSelectionChange",value:function(w){navigator.userAgent.includes("Firefox")||this.caretEventHandler(w)}},{key:"caretEventHandler",value:function(w){var _,j=this;w.target.tagName&&(_=w.target.tagName.toLowerCase()),this.dispatch(function(T){var W=w.target===T.keyboardDOM||w.target&&T.keyboardDOM.contains(w.target);if(j.options.syncInstanceInputs&&Array.isArray(w.path)&&(W=w.path.some(function(F){var ce;return F==null||(ce=F.hasAttribute)===null||ce===void 0?void 0:ce.call(F,"data-skInstance")})),(_==="textarea"||_==="input"&&["text","search","url","tel","password"].includes(w.target.type))&&!T.options.disableCaretPositioning){var G=w.target.selectionStart,Y=w.target.selectionEnd;T.options.rtl&&(G=T.utilities.getRtlOffset(G,T.getInput()),Y=T.utilities.getRtlOffset(Y,T.getInput())),T.setCaretPosition(G,Y),j.activeInputElement=w.target,T.options.debug&&console.log("Caret at: ",T.getCaretPosition(),T.getCaretPositionEnd(),w&&w.target.tagName.toLowerCase(),"(".concat(T.keyboardDOMClass,")"),w==null?void 0:w.type)}else!T.options.disableCaretPositioning&&W||(w==null?void 0:w.type)==="selectionchange"||(T.setCaretPosition(null),j.activeInputElement=null,T.options.debug&&console.log('Caret position reset due to "'.concat(w==null?void 0:w.type,'" event'),w))})}},{key:"recurseButtons",value:function(w){var _=this;w&&Object.keys(this.buttonElements).forEach(function(j){return _.buttonElements[j].forEach(w)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.removeEventListener("keyup",this.handleKeyUp,_),document.removeEventListener("keydown",this.handleKeyDown,_),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(j){j&&(j.onpointerdown=null,j.onpointerup=null,j.onpointercancel=null,j.ontouchstart=null,j.ontouchend=null,j.ontouchcancel=null,j.onclick=null,j.onmousedown=null,j.onmouseup=null,j.remove(),j=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(w){var _=this.options.buttonTheme,j=[];return Array.isArray(_)&&_.forEach(function(T){if(T&&T.class&&typeof T.class=="string"&&T.buttons&&typeof T.buttons=="string"){var W=T.class.split(" ");T.buttons.split(" ").includes(w)&&(j=[].concat(R(j),R(W)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',T)}),j}},{key:"setDOMButtonAttributes",value:function(w,_){var j=this.options.buttonAttributes;Array.isArray(j)&&j.forEach(function(T){T.attribute&&typeof T.attribute=="string"&&T.value&&typeof T.value=="string"&&T.buttons&&typeof T.buttons=="string"?T.buttons.split(" ").includes(w)&&_(T.attribute,T.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',T)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(w){if(w.target.classList.contains("hg-button"))return w.preventDefault(),w.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 w=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(_){var j=new _(w);j.init&&j.init(w)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(w,_){return!!this.modules[w]&&this.modules[w][_]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(w,_,j,T){var W=this,G=Array.from(w.children),Y=0;return G.length&&j.forEach(function(F,ce){var fe=T[ce];if(!(fe&&fe>F))return!1;var re=F-Y,oe=fe-Y,ye=document.createElement("div");ye.className+="hg-button-container";var ae="".concat(W.options.layoutName,"-r").concat(_,"c").concat(ce);ye.setAttribute("data-skUID",ae);var be=G.splice(re,oe-re+1);Y=oe-re,be.forEach(function(ke){return ye.appendChild(ke)}),G.splice(re,0,ye),w.innerHTML="",G.forEach(function(ke){return w.appendChild(ke)}),W.options.debug&&console.log("rowDOMContainer",be,re,oe,Y+1)}),w}},{key:"render",value:function(){var w=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var _="hg-layout-".concat(this.options.layoutName),j=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}"]},T=this.options.useTouchEvents||!1,W=T?"hg-touch-events":"",G=this.options.useMouseEvents||!1,Y=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,_,this.keyboardPluginClasses,W),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",j[this.options.layoutName||this.defaultName].forEach(function(F,ce){var fe=F.split(" ");w.options.excludeFromLayout&&w.options.excludeFromLayout[w.options.layoutName||w.defaultName]&&(fe=fe.filter(function(ae){return w.options.excludeFromLayout&&!w.options.excludeFromLayout[w.options.layoutName||w.defaultName].includes(ae)}));var re=document.createElement("div");re.className+="hg-row";var oe=[],ye=[];fe.forEach(function(ae,be){var ke,De=!Y&&typeof ae=="string"&&ae.length>1&&ae.indexOf("[")===0,je=!Y&&typeof ae=="string"&&ae.length>1&&ae.indexOf("]")===ae.length-1;De&&(oe.push(be),ae=ae.replace(/\[/g,"")),je&&(ye.push(be),ae=ae.replace(/\]/g,""));var $e=w.utilities.getButtonClass(ae),Ve=w.utilities.getButtonDisplayName(ae,w.options.display,w.options.mergeDisplay),bt=w.options.useButtonTag?"button":"div",ze=document.createElement(bt);ze.className+="hg-button ".concat($e),(ke=ze.classList).add.apply(ke,R(w.getButtonThemeClasses(ae))),w.setDOMButtonAttributes(ae,function(Ee,At){ze.setAttribute(Ee,At)}),w.activeButtonClass="hg-activeButton",!w.utilities.pointerEventsSupported()||T||G?T?(ze.ontouchstart=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},ze.ontouchend=function(Ee){w.handleButtonMouseUp(ae,Ee)},ze.ontouchcancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(ze.onclick=function(Ee){w.setMouseHold(!1),typeof w.options.onKeyReleased!="function"&&w.handleButtonClicked(ae,Ee)},ze.onmousedown=function(Ee){typeof w.options.onKeyReleased!="function"||w.isMouseHold||w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},ze.onmouseup=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(ze.onpointerdown=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},ze.onpointerup=function(Ee){w.handleButtonMouseUp(ae,Ee)},ze.onpointercancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}),ze.setAttribute("data-skBtn",ae);var Je="".concat(w.options.layoutName,"-r").concat(ce,"b").concat(be);ze.setAttribute("data-skBtnUID",Je);var Ke=document.createElement("span");Ke.innerHTML=Ve,ze.appendChild(Ke),w.buttonElements[ae]||(w.buttonElements[ae]=[]),w.buttonElements[ae].push(ze),re.appendChild(ze)}),re=w.parseRowDOMContainers(re,ce,oe,ye),w.keyboardRowsDOM.appendChild(re)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||T||G?T?(document.ontouchend=function(F){return w.handleButtonMouseUp(void 0,F)},document.ontouchcancel=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.ontouchstart=function(F){return w.handleKeyboardContainerMouseDown(F)}):T||(document.onmouseup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onmousedown=function(F){return w.handleKeyboardContainerMouseDown(F)}):(document.onpointerup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onpointerdown=function(F){return w.handleKeyboardContainerMouseDown(F)}),this.onInit())}}],U&&Z(V.prototype,U),Q&&Z(V,Q),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,Q}(),ge=te,de=te}(),b}()},442:function(u){u.exports=n}},i={};function a(u){var h=i[u];if(h!==void 0)return h.exports;var v=i[u]={exports:{}};return r[u].call(v.exports,v,v.exports,a),v.exports}a.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return a.d(h,{a:h}),h},a.d=function(u,h){for(var v in h)a.o(h,v)&&!a.o(u,v)&&Object.defineProperty(u,v,{enumerable:!0,get:h[v]})},a.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},a.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var s={};return function(){a.r(s),a.d(s,{KeyboardReact:function(){return c},default:function(){return f}}),a(981);var u=a(442),h=a(548),v=a.n(h);function m(d){return m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},m(d)}function b(d,p){var y=Object.keys(d);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(d);p&&(x=x.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),y.push.apply(y,x)}return y}function l(d){for(var p=1;p<arguments.length;p++){var y=arguments[p]!=null?arguments[p]:{};p%2?b(Object(y),!0).forEach(function(x){g(d,x,y[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(y)):b(Object(y)).forEach(function(x){Object.defineProperty(d,x,Object.getOwnPropertyDescriptor(y,x))})}return d}function g(d,p,y){var x;return x=function(E,S){if(m(E)!="object"||!E)return E;var k=E[Symbol.toPrimitive];if(k!==void 0){var B=k.call(E,S||"default");if(m(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(E)}(p,"string"),(p=m(x)=="symbol"?x:x+"")in d?Object.defineProperty(d,p,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[p]=y,d}var o=function(d){return l(l({},d),{},{keyboardRef:null})},c=function(d){var p=d.baseClass||"react-simple-keyboard",y=u.useRef(null),x=u.useRef(null),E=u.useRef(null),S=u.useRef(d);return u.useEffect(function(){return function(){E.current&&E.current.destroy(),y.current=!1}},[]),u.useEffect(function(){var k=function(D){return l(l({},D),{},{theme:"simple-keyboard ".concat(D.theme||"hg-theme-default")})}(d);if(!y.current){y.current=!0,k.debug&&console.log("ReactSimpleKeyboard: Init");var B=x.current,O=".".concat(p);E.current=new(v())(B||O,k),k.keyboardRef&&k.keyboardRef(E.current)}var I=function(D,M){var $=o(M),P=o(D);return Object.keys($).filter(function(R){return $[R]!==P[R]})}(S.current,k);if(I.length){var L=E.current;S.current=k,L==null||L.setOptions(k),k.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",I)}},[y,p,S,d]),u.createElement("div",{className:p,ref:x})},f=c}(),s}()})})(dl);var Lh=dl.exports;const Dh=Wo(Lh),Nv="";function fl({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,a]=z.useState("default"),s=u=>{(u==="{shift}"||u==="{lock}")&&a(i==="default"?"shift":"default")};return C.jsx(Dh,{keyboardRef:u=>t.current=u,layoutName:i,layout:n,theme:r,onChange:e,onKeyPress:s,preventMouseDownDefault:!0})}function Mh(){return{subscribe:(r,i)=>{document.addEventListener(r,i)},unsubscribe:(r,i)=>{document.removeEventListener(r,i)},publish:(r,i)=>{const a=new CustomEvent(r,{detail:i});document.dispatchEvent(a)}}}function hl(){const{subscribe:e,unsubscribe:t,publish:n}=Mh();return{initialize:(u,h)=>{e("openKeyboard",u),e("closeKeyboard",h)},terminate:(u,h)=>{t("openKeyboard",u),t("closeKeyboard",h)},open:u=>{n("openKeyboard",{inputId:u.target.id,inputValue:u.target.value})},close:()=>{n("closeKeyboard")}}}function pl(){const[e,t]=z.useState(!1),n=z.useRef(null),r=z.useRef(null),{session:i}=kt(),{initialize:a,terminate:s}=hl(),u=b=>{var l,g;r.current=document.getElementById(b.detail.inputId),(l=n.current)==null||l.setInput(b.detail.inputValue),(g=r.current)==null||g.addEventListener("input",o=>{var f;const c=o.target;(f=n.current)==null||f.setInput(c==null?void 0:c.value)}),t(!0)},h=()=>t(!1);z.useEffect(()=>(a(u,h),()=>{s(u,h)}),[a,s,e]);const v=b=>{var l,g;if(r&&r.current){m(r.current,b);const o=(l=n.current)==null?void 0:l.getCaretPosition();o&&((g=r.current)==null||g.setSelectionRange(o,o))}},m=(b,l)=>{var c;const g=(c=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:c.set;g==null||g.call(b,l);const o=new Event("input",{bubbles:!0});b.dispatchEvent(o)};return!i||!+(i.input_data.enable_on_screen_keyboard??!1)?C.jsx(C.Fragment,{}):C.jsx("div",{className:`mobile:hidden absolute bottom-2 left-2 right-2 z-50 mx-auto max-w-[1200px] ${!e&&"hidden"}`,children:C.jsx(fl,{keyboardRef:n,onChange:v})})}function Di({value:e,valueSetter:t}){const n=z.useRef(null),r=i=>{const a=i?(parseFloat(i)/100).toFixed(2):"";t(a)};return C.jsxs("div",{children:[C.jsx("input",{type:"number",readOnly:!0,className:"mb-4 h-full w-full rounded border-gray-200 p-4 text-center text-4xl text-gray-500 focus:ring-0 focus:ring-offset-0",value:e,placeholder:"0,00",onChange:i=>r(i.target.value)}),C.jsx(fl,{keyboardRef:n,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:r})]})}function cr(e){const{open:t,close:n}=hl(),r=a=>{t(a)},i=()=>{n()};return C.jsxs("div",{className:"relative",onFocus:r,onBlur:i,children:[C.jsx("input",{...e,type:e.type==="date_time"?"datetime-local":e.type==="birth_date"?"date":e.type,placeholder:" ",className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:a=>e.onChange&&e.onChange(a.target.name,a.target.value)}),C.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function Fh(e){const t=z.useRef(null),[n,r]=z.useState(!1),[i,a]=z.useState(""),[s,u]=z.useState(e.defaultValue.split(";")),{name:h,onChange:v}=e;return z.useEffect(()=>{function m(b){t.current&&!t.current.contains(b.target)&&r(!1)}return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[]),z.useEffect(()=>{v&&v(h,s.join(";"))},[s]),C.jsxs("div",{ref:t,className:"relative w-full",children:[C.jsx("div",{onClick:()=>r(!n),className:`flex h-[54px] w-full cursor-pointer gap-2 truncate rounded border bg-white p-3 leading-[2.75rem] text-gray-700 ${n?"border-2 border-blue-600":"border-gray-300"}`,children:s.sort().reduce((m,b)=>m+=b+(b===s[s.length-1]?"":", "),"")}),C.jsx("div",{className:`pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 transition-[opacity,_transform] duration-200 ease-linear motion-reduce:transition-none ${n?"-translate-y-2 translate-x-[0.15rem] scale-[0.85] text-blue-600":"text-gray-500"} ${s.length&&"-translate-y-2 translate-x-[0.15rem] scale-[0.85]"}`,children:e.label}),n&&C.jsxs("div",{className:"absolute z-20 mt-2 flex w-full flex-col gap-3 rounded bg-white p-3 shadow-md",children:[C.jsx("input",{placeholder:"Search",className:"rounded border border-solid border-gray-300 bg-transparent p-3 outline-none",type:"text",onChange:m=>a(m.target.value)}),C.jsx("hr",{}),!e.options.filter(m=>m.label.toLowerCase().includes(i.toLowerCase())).length&&C.jsx("p",{className:"text-center text-sm font-normal text-neutral-400",children:"No results found"}),e.options.map(m=>{if(!(i&&!m.label.toLowerCase().includes(i.toLowerCase())))return C.jsxs("div",{className:"flex items-center",children:[C.jsx("input",{id:m.value,type:"checkbox",value:m.value,checked:s.includes(m.value),readOnly:!0,className:"h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-blue-500",onClick:b=>{b.target.checked?u([...s,b.target.value]):u(s.filter(l=>l!==b.target.value))}}),C.jsx("label",{htmlFor:m.value,className:"text-md ml-2 flex-grow font-normal text-gray-700",children:m.label})]},m.value)})]})]})}function Uh(e){return C.jsxs("div",{className:"relative",children:[C.jsx("select",{...e,id:e.id,className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-2 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:t=>e.onChange&&e.onChange(t.target.name,t.target.value),children:e.options.map(t=>C.jsx("option",{value:t.value,children:t.label},t.value))}),C.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function Ot({children:e}){return C.jsx("div",{className:"h-full w-full rounded-lg border border-gray-200 bg-white p-4 shadow sm:p-6 md:p-8",children:e})}function ml({children:e}){return C.jsxs(Ot,{children:[C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs("svg",{className:"stroke h-36 w-36 animate-[scale_.3s_ease-in-out_.9s_both] fill-none stroke-green-600 stroke-2 shadow-[inset_0px_0px_0px_#7ac142]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 52 52",children:[C.jsx("circle",{className:"animate-[stroke_.6s_linear_forwards] fill-none stroke-green-600 stroke-2",style:{strokeDasharray:166,strokeDashoffset:166},cx:"26",cy:"26",r:"25",fill:"none"}),C.jsx("path",{className:"origin-[50%_50%] animate-[stroke_.3s_linear_.8s_forwards]",style:{strokeDasharray:48,strokeDashoffset:48},fill:"none",d:"M14.1 27.2l7.1 7.2 16.7-16.8"})]})}),e]})}const $h="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik00LjcwMDIgNC43MDAxNkwxMS4yOTk5IDExLjI5OTgiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIKICAgICAgICAgIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KICAgIDxwYXRoIGQ9Ik0xMS4yOTk4IDQuNzAwMTZMNC43MDAxNCAxMS4yOTk4IiBzdHJva2U9IiMwMDAiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiCiAgICAgICAgICBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=";function ur({title:e,isOpen:t,onClose:n,children:r}){const[i,a]=z.useState(t),s=z.useRef(null);z.useEffect(()=>{a(t)},[t]),z.useEffect(()=>{const v=s.current;v&&(i?v.show():v.close())},[i]);const u=()=>{n&&n(),a(!1)},h=v=>{v.key==="Escape"&&u()};return C.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${i?"flex":"hidden"}`,children:C.jsxs("dialog",{ref:s,onKeyDown:h,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:[C.jsxs("div",{className:"flex w-full justify-between bg-gray-50 p-4",children:[C.jsx("p",{className:"truncate text-lg",children:e}),C.jsx("img",{src:$h,alt:"closeButton",className:"h-[25px] w-[25px] cursor-pointer opacity-50 hover:opacity-90",onClick:u})]}),C.jsx("div",{className:"p-6",children:r})]})})}function Vh(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const gl={};function Mi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&gl[t[0]]||(typeof t[0]=="string"&&(gl[t[0]]=new Date),Vh(...t))}const yl=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function vl(e,t,n){e.loadNamespaces(t,yl(e,n))}function bl(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,yl(e,r))}function zh(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,h)=>{const v=t.services.backendConnector.state[`${u}|${h}`];return v===-1||v===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(a,e)))}function Hh(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Mi("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,e))return!1}}):zh(e,t,n)}const qh=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Kh={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Wh=e=>Kh[e];let Fi={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(qh,Wh)};function Gh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fi={...Fi,...e}}function Yh(){return Fi}let wl;function Qh(e){wl=e}function Xh(){return wl}const Jh={type:"3rdParty",init(e){Gh(e.options.react),Qh(e)}},Zh=z.createContext();class ep{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const tp=(e,t)=>{const n=z.useRef();return z.useEffect(()=>{n.current=t?n.current:e},[e,t]),n.current};function xl(e,t,n,r){return e.getFixedT(t,n,r)}function np(e,t,n,r){return z.useCallback(xl(e,t,n,r),[e,t,n,r])}function qe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=z.useContext(Zh)||{},a=n||r||Xh();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new ep),!a){Mi("You will need to pass in an i18next instance by using initReactI18next");const x=(S,k)=>typeof k=="string"?k:k&&typeof k=="object"&&typeof k.defaultValue=="string"?k.defaultValue:Array.isArray(S)?S[S.length-1]:S,E=[x,{},!1];return E.t=x,E.i18n={},E.ready=!1,E}a.options.react&&a.options.react.wait!==void 0&&Mi("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Yh(),...a.options.react,...t},{useSuspense:u,keyPrefix:h}=s;let v=e||i||a.options&&a.options.defaultNS;v=typeof v=="string"?[v]:v||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(v);const m=(a.isInitialized||a.initializedStoreOnce)&&v.every(x=>Hh(x,a,s)),b=np(a,t.lng||null,s.nsMode==="fallback"?v:v[0],h),l=()=>b,g=()=>xl(a,t.lng||null,s.nsMode==="fallback"?v:v[0],h),[o,c]=z.useState(l);let f=v.join();t.lng&&(f=`${t.lng}${f}`);const d=tp(f),p=z.useRef(!0);z.useEffect(()=>{const{bindI18n:x,bindI18nStore:E}=s;p.current=!0,!m&&!u&&(t.lng?bl(a,t.lng,v,()=>{p.current&&c(g)}):vl(a,v,()=>{p.current&&c(g)})),m&&d&&d!==f&&p.current&&c(g);function S(){p.current&&c(g)}return x&&a&&a.on(x,S),E&&a&&a.store.on(E,S),()=>{p.current=!1,x&&a&&x.split(" ").forEach(k=>a.off(k,S)),E&&a&&E.split(" ").forEach(k=>a.store.off(k,S))}},[a,f]),z.useEffect(()=>{p.current&&m&&c(l)},[a,h,m]);const y=[o,a,m];if(y.t=o,y.i18n=a,y.ready=m,m||!m&&!u)return y;throw new Promise(x=>{t.lng?bl(a,t.lng,v,()=>x()):vl(a,v,()=>x())})}function rp(){const{t:e}=qe();return C.jsxs("div",{children:[C.jsx("p",{className:"",children:e("60011")}),C.jsx("br",{}),C.jsx("br",{}),"... plus nog meer"]})}function op({email:e,setEmail:t}){const{t:n}=qe();return C.jsxs(C.Fragment,{children:[C.jsx("p",{className:"mb-2",children:n("fillInNewEmail").replace(/.$/,":")}),C.jsx(cr,{autoFocus:!0,id:"email-input",name:"email",label:n("emailAddress"),type:"email",value:e,onChange:(r,i)=>t(i)})]})}function ip({contact:e,email:t,contactIdentifier:n}){const{t:r}=qe();return C.jsxs("div",{children:[e?C.jsxs("div",{className:"flex items-center gap-4",children:[e.current_display_values.avatar&&C.jsx("img",{src:e.current_display_values.avatar,alt:"avatar",className:"h-16 w-16 rounded-full border-2 border-gray-300 object-cover"}),C.jsxs("div",{children:[C.jsx("p",{className:"text-md font-medium",children:e.email}),C.jsxs("p",{className:"text-md font-normal",children:[e.current_display_values.firstname," ",e.current_display_values.lastname]}),C.jsx("p",{className:"text-sm font-normal",children:e.current_display_values.created_at})]})]}):C.jsxs("div",{children:[C.jsx("p",{className:"text-md font-medium",children:r("contactNotFound")}),C.jsx("p",{className:"text-md mt-2 font-normal",children:t})]}),C.jsx("div",{className:"my-6",children:r("linkContactIdentifierToContact",{value:n})})]})}function ap({contactIdentifier:e,callback:t}){const{t:n}=qe(),r=[n("info"),n("email"),n("confirm")],[i,a]=z.useState(0),[s,u]=z.useState(""),[h,v]=z.useState(null),m=async()=>{await _i.linkIdentifier(e,s),t&&t()},b=()=>{switch(i){case 0:return C.jsx(rp,{});case 1:return C.jsx(op,{email:s,setEmail:u});case 2:return C.jsx(ip,{contact:h,email:s,contactIdentifier:e});default:return C.jsx(C.Fragment,{})}},l=async()=>{switch(i){case 0:a(i+1);break;case 1:{const g=await _i.exists(s);v(g.data.data),a(i+1);break}case 2:await m();break}};return C.jsxs("div",{className:"min-w-[600px]",children:[C.jsx(Am,{activeStep:i,children:r.map(g=>C.jsx(Im,{label:g},g))}),C.jsx("div",{className:"h-48 py-12",children:b()}),C.jsxs("div",{className:"flex justify-between",children:[C.jsx(Xe,{label:n("previous"),disabled:i<=0,onClick:()=>a(i-1)}),C.jsx(Xe,{label:n(i===r.length-1?"confirm":"next"),onClick:()=>l()})]})]})}function Ui({callback:e}){const{t}=qe(),[n,r]=z.useState(""),[i,a]=z.useState(!1),[s,u]=z.useState(!1),{session:h,mutate:v}=kt(),m=h==null?void 0:h.input_data.scanner_type,b=z.useCallback(()=>{h&&(a(!0),vo.setContact(h.uuid,{contact_identifier_value:n}).then(()=>{v().then(()=>{Re.success(t("contactSavedToSession")),e&&e()})}).catch(()=>u(!0)).finally(()=>a(!1)))},[e,n,v,h,t]);return z.useEffect(()=>{m===Rt.CAMERA&&n&&!i&&b()},[n,i,m,h,b]),C.jsxs(C.Fragment,{children:[C.jsx(wo,{dataSetter:r,type:m,label:t("contactIdentifier")}),m===Rt.HAND_SCANNER&&C.jsx("div",{className:"pt-3",children:C.jsx(Xe,{type:"submit",label:t("submit"),onClick:b})}),C.jsx(ur,{isOpen:s,title:t("linkContact"),onClose:()=>u(!1),children:C.jsx(ap,{contactIdentifier:n,callback:()=>{u(!1),b()}},n)})]})}function wo({dataSetter:e,type:t=Rt.CAMERA,label:n=""}){const{t:r}=qe(),i=a=>{e(a.data)};return t===Rt.HAND_SCANNER?C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsx("p",{children:r("fillInXBelow",{x:n.toLowerCase()})}),C.jsx(cr,{id:`${n}-input`,name:n,label:n,type:"text",onChange:(a,s)=>e(s),autoFocus:!0})]}):C.jsx(sp,{label:n,onDecode:i})}class Ae{constructor(t,n,r,i,a){this._legacyCanvasSize=Ae.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=t,this.$canvas=document.createElement("canvas"),r&&typeof r=="object"?this._onDecode=n:(console.warn(r||i||a?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=n),n=typeof r=="object"?r:{},this._onDecodeError=n.onDecodeError||(typeof r=="function"?r:this._onDecodeError),this._calculateScanRegion=n.calculateScanRegion||(typeof i=="function"?i:this._calculateScanRegion),this._preferredCamera=n.preferredCamera||a||this._preferredCamera,this._legacyCanvasSize=typeof r=="number"?r:typeof i=="number"?i:this._legacyCanvasSize,this._maxScansPerSecond=n.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),t.disablePictureInPicture=!0,t.playsInline=!0,t.muted=!0;let s=!1;if(t.hidden&&(t.hidden=!1,s=!0),document.body.contains(t)||(document.body.appendChild(t),s=!0),r=t.parentElement,n.highlightScanRegion||n.highlightCodeOutline){if(i=!!n.overlay,this.$overlay=n.overlay||document.createElement("div"),a=this.$overlay.style,a.position="absolute",a.display="none",a.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!i&&n.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch{}r.insertBefore(this.$overlay,this.$video.nextSibling)}n.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(t),requestAnimationFrame(()=>{let u=window.getComputedStyle(t);u.display==="none"&&(t.style.setProperty("display","block","important"),s=!0),u.visibility!=="visible"&&(t.style.setProperty("visibility","visible","important"),s=!0),s&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),t.style.opacity="0",t.style.width="0",t.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),t.addEventListener("play",this._onPlay),t.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=Ae.createQrEngine()}static set WORKER_PATH(t){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await Ae.listCameras(!1)).length}catch{return!1}}static async listCameras(t=!1){if(!navigator.mediaDevices)return[];let n=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(i=>i.kind==="videoinput"),r;try{t&&(await n()).every(i=>!i.label)&&(r=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await n()).map((i,a)=>({id:i.deviceId,label:i.label||(a===0?"Default Camera":`Camera ${a+1}`)}))}finally{r&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),Ae._stopVideoStream(r))}}async hasFlash(){let t;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;t=this.$video.srcObject}else t=(await this._getCameraStream()).stream;return"torch"in t.getVideoTracks()[0].getSettings()}catch{return!1}finally{t&&t!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),Ae._stopVideoStream(t))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(t){throw this._flashOn=!1,t}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),Ae._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&(window.location.protocol!=="https:"&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:t,facingMode:n}=await this._getCameraStream();!this._active||this._paused?Ae._stopVideoStream(t):(this._setVideoMirror(n),this.$video.srcObject=t,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(t){if(!this._paused)throw this._active=!1,t}}stop(){this.pause(),this._active=!1}async pause(t=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let n=()=>{this.$video.srcObject instanceof MediaStream&&(Ae._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return t?(n(),!0):(await new Promise(r=>setTimeout(r,300)),this._paused?(n(),!0):!1)}async setCamera(t){t!==this._preferredCamera&&(this._preferredCamera=t,await this._restartVideoStream())}static async scanImage(t,n,r,i,a=!1,s=!1){let u,h=!1;n&&("scanRegion"in n||"qrEngine"in n||"canvas"in n||"disallowCanvasResizing"in n||"alsoTryWithoutScanRegion"in n||"returnDetailedScanResult"in n)?(u=n.scanRegion,r=n.qrEngine,i=n.canvas,a=n.disallowCanvasResizing||!1,s=n.alsoTryWithoutScanRegion||!1,h=!0):console.warn(n||r||i||a||s?"You're using a deprecated api for scanImage which will be removed in the future.":"Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),n=!!r;try{let v,m;[r,v]=await Promise.all([r||Ae.createQrEngine(),Ae._loadImage(t)]),[i,m]=Ae._drawToCanvas(v,u,i,a);let b;if(r instanceof Worker){let l=r;n||Ae._postWorkerMessageSync(l,"inversionMode","both"),b=await new Promise((g,o)=>{let c,f,d,p=-1;f=x=>{x.data.id===p&&(l.removeEventListener("message",f),l.removeEventListener("error",d),clearTimeout(c),x.data.data!==null?g({data:x.data.data,cornerPoints:Ae._convertPoints(x.data.cornerPoints,u)}):o(Ae.NO_QR_CODE_FOUND))},d=x=>{l.removeEventListener("message",f),l.removeEventListener("error",d),clearTimeout(c),o("Scanner error: "+(x?x.message||x:"Unknown Error"))},l.addEventListener("message",f),l.addEventListener("error",d),c=setTimeout(()=>d("timeout"),1e4);let y=m.getImageData(0,0,i.width,i.height);p=Ae._postWorkerMessageSync(l,"decode",y,[y.data.buffer])})}else b=await Promise.race([new Promise((l,g)=>window.setTimeout(()=>g("Scanner error: timeout"),1e4)),(async()=>{try{var[l]=await r.detect(i);if(!l)throw Ae.NO_QR_CODE_FOUND;return{data:l.rawValue,cornerPoints:Ae._convertPoints(l.cornerPoints,u)}}catch(g){if(l=g.message||g,/not implemented|service unavailable/.test(l))return Ae._disableBarcodeDetector=!0,Ae.scanImage(t,{scanRegion:u,canvas:i,disallowCanvasResizing:a,alsoTryWithoutScanRegion:s});throw`Scanner error: ${l}`}})()]);return h?b:b.data}catch(v){if(!u||!s)throw v;let m=await Ae.scanImage(t,{qrEngine:r,canvas:i,disallowCanvasResizing:a});return h?m:m.data}finally{n||Ae._postWorkerMessage(r,"close")}}setGrayscaleWeights(t,n,r,i=!0){Ae._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:t,green:n,blue:r,useIntegerApproximation:i})}setInversionMode(t){Ae._postWorkerMessage(this._qrEnginePromise,"inversionMode",t)}static async createQrEngine(t){if(t&&console.warn("Specifying a worker path is not required and not supported anymore."),t=()=>Promise.resolve().then(()=>gv).then(r=>r.createWorker()),!(!Ae._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return t();let n=navigator.userAgentData;return n&&n.brands.some(({brand:r})=>/Chromium/i.test(r))&&/mac ?OS/i.test(n.platform)&&await n.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:r,platformVersion:i})=>/arm/i.test(r||"arm")&&13<=parseInt(i||"13")).catch(()=>!0)?t():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(t){let n=Math.round(.6666666666666666*Math.min(t.videoWidth,t.videoHeight));return{x:Math.round((t.videoWidth-n)/2),y:Math.round((t.videoHeight-n)/2),width:n,height:n,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var t=this.$video,n=t.videoWidth,r=t.videoHeight,i=t.offsetWidth,a=t.offsetHeight,s=t.offsetLeft,u=t.offsetTop,h=window.getComputedStyle(t),v=h.objectFit,m=n/r,b=i/a;switch(v){case"none":var l=n,g=r;break;case"fill":l=i,g=a;break;default:(v==="cover"?m>b:m<b)?(g=a,l=g*m):(l=i,g=l/m),v==="scale-down"&&(l=Math.min(l,n),g=Math.min(g,r))}var[o,c]=h.objectPosition.split(" ").map((d,p)=>{const y=parseFloat(d);return d.endsWith("%")?(p?a-g:i-l)*y/100:y});h=this._scanRegion.width||n,b=this._scanRegion.height||r,v=this._scanRegion.x||0;var f=this._scanRegion.y||0;m=this.$overlay.style,m.width=`${h/n*l}px`,m.height=`${b/r*g}px`,m.top=`${u+c+f/r*g}px`,r=/scaleX\(-1\)/.test(t.style.transform),m.left=`${s+(r?i-o-l:o)+(r?n-v-h:v)/n*l}px`,m.transform=t.style.transform}})}static _convertPoints(t,n){if(!n)return t;let r=n.x||0,i=n.y||0,a=n.width&&n.downScaledWidth?n.width/n.downScaledWidth:1;n=n.height&&n.downScaledHeight?n.height/n.downScaledHeight:1;for(let s of t)s.x=s.x*a+r,s.y=s.y*n+i;return t}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var t=Date.now()-this._lastScanTimestamp,n=1e3/this._maxScansPerSecond;t<n&&await new Promise(i=>setTimeout(i,n-t)),this._lastScanTimestamp=Date.now();try{var r=await Ae.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(i){if(!this._active)return;this._onDecodeError(i)}!Ae._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=Ae.createQrEngine()),r?(this._onDecode?this._onDecode(r):this._legacyOnDecode&&this._legacyOnDecode(r.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",r.cornerPoints.map(({x:i,y:a})=>`${i},${a}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(t){t!==Ae.NO_QR_CODE_FOUND&&console.log(t)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let t=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",n=[{width:{min:1024}},{width:{min:768}},{}],r=n.map(i=>Object.assign({},i,{[t]:{exact:this._preferredCamera}}));for(let i of[...r,...n])try{let a=await navigator.mediaDevices.getUserMedia({video:i,audio:!1}),s=this._getFacingMode(a)||(i.facingMode?this._preferredCamera:this._preferredCamera==="environment"?"user":"environment");return{stream:a,facingMode:s}}catch{}throw"Camera not found."}async _restartVideoStream(){let t=this._paused;await this.pause(!0)&&!t&&this._active&&await this.start()}static _stopVideoStream(t){for(let n of t.getTracks())n.stop(),t.removeTrack(n)}_setVideoMirror(t){this.$video.style.transform="scaleX("+(t==="user"?-1:1)+")"}_getFacingMode(t){return(t=t.getVideoTracks()[0])?/rear|back|environment/i.test(t.label)?"environment":/front|user|face/i.test(t.label)?"user":null:null}static _drawToCanvas(t,n,r,i=!1){r=r||document.createElement("canvas");let a=n&&n.x?n.x:0,s=n&&n.y?n.y:0,u=n&&n.width?n.width:t.videoWidth||t.width,h=n&&n.height?n.height:t.videoHeight||t.height;return i||(i=n&&n.downScaledWidth?n.downScaledWidth:u,n=n&&n.downScaledHeight?n.downScaledHeight:h,r.width!==i&&(r.width=i),r.height!==n&&(r.height=n)),n=r.getContext("2d",{alpha:!1}),n.imageSmoothingEnabled=!1,n.drawImage(t,a,s,u,h,0,0,r.width,r.height),[r,n]}static async _loadImage(t){if(t instanceof Image)return await Ae._awaitImageLoad(t),t;if(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement||t instanceof SVGImageElement||"OffscreenCanvas"in window&&t instanceof OffscreenCanvas||"ImageBitmap"in window&&t instanceof ImageBitmap)return t;if(t instanceof File||t instanceof Blob||t instanceof URL||typeof t=="string"){let n=new Image;n.src=t instanceof File||t instanceof Blob?URL.createObjectURL(t):t.toString();try{return await Ae._awaitImageLoad(n),n}finally{(t instanceof File||t instanceof Blob)&&URL.revokeObjectURL(n.src)}}else throw"Unsupported image type."}static async _awaitImageLoad(t){t.complete&&t.naturalWidth!==0||await new Promise((n,r)=>{let i=a=>{t.removeEventListener("load",i),t.removeEventListener("error",i),a instanceof ErrorEvent?r("Image load error"):n()};t.addEventListener("load",i),t.addEventListener("error",i)})}static async _postWorkerMessage(t,n,r,i){return Ae._postWorkerMessageSync(await t,n,r,i)}static _postWorkerMessageSync(t,n,r,i){if(!(t instanceof Worker))return-1;let a=Ae._workerMessageId++;return t.postMessage({id:a,type:n,data:r},i),a}}Ae.DEFAULT_CANVAS_SIZE=400,Ae.NO_QR_CODE_FOUND="No QR code found",Ae._disableBarcodeDetector=!1,Ae._workerMessageId=0;function sp({label:e="",onDecode:t}){const n=z.useRef(),r=z.useRef(null),[i,a]=z.useState([]);return z.useEffect(()=>(r.current&&!n.current&&(n.current=new Ae(r.current,t??(s=>console.log("decoded qr code:",s)),{returnDetailedScanResult:!0,highlightScanRegion:!0,highlightCodeOutline:!0}),Ae.listCameras(!0).then(s=>a(s)),n.current.start()),()=>{var s;r.current||(s=n.current)==null||s.stop()}),[t]),C.jsxs("div",{className:"flex flex-col gap-1",children:[C.jsxs("div",{className:"flex flex-col items-center justify-between text-gray-700 sm:flex-row",children:[C.jsx("p",{children:`Scan ${e==null?void 0:e.toLowerCase()}`}),C.jsx("select",{id:"select",className:"appearance-none rounded border bg-transparent px-2.5 py-2 text-sm",onChange:s=>{var u;return(u=n.current)==null?void 0:u.setCamera(s.target.value)},children:i.map(s=>C.jsx("option",{value:s.id,children:s.label},s.id))})]}),C.jsx("video",{className:"h-full w-full rounded border object-cover",ref:r})]})}function kl(){return C.jsxs("div",{children:[C.jsx("div",{className:"flex animate-pulse justify-end space-y-4",children:C.jsx("div",{className:"h-8 w-32 rounded bg-gray-100"})},"skeleton-item-"),C.jsx("div",{className:"my-6 h-px w-full bg-gray-100"}),C.jsx("div",{className:"space-y-4",children:C.jsx("div",{className:"animate-pulse space-y-4",children:C.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),C.jsx("div",{className:"h-12 w-full rounded bg-gray-100"})]})},"skeleton-item-")})]})}var lp=Object.defineProperty,cp=(e,t)=>{for(var n in t)lp(e,n,{get:t[n],enumerable:!0})},Lt={};cp(Lt,{assign:()=>fp,colors:()=>hn,createStringInterpolator:()=>Yi,skipAnimation:()=>Nl,to:()=>Ol,willAdvance:()=>Qi});var $i=fr(),Be=e=>dr(e,$i),Vi=fr();Be.write=e=>dr(e,Vi);var xo=fr();Be.onStart=e=>dr(e,xo);var zi=fr();Be.onFrame=e=>dr(e,zi);var Hi=fr();Be.onFinish=e=>dr(e,Hi);var An=[];Be.setTimeout=(e,t)=>{const n=Be.now()+t,r=()=>{const a=An.findIndex(s=>s.cancel==r);~a&&An.splice(a,1),fn-=~a?1:0},i={time:n,handler:e,cancel:r};return An.splice(Cl(n),0,i),fn+=1,El(),i};var Cl=e=>~(~An.findIndex(t=>t.time>e)||~An.length);Be.cancel=e=>{xo.delete(e),zi.delete(e),Hi.delete(e),$i.delete(e),Vi.delete(e)},Be.sync=e=>{Ki=!0,Be.batchedUpdates(e),Ki=!1},Be.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Be.onStart(n)}return r.handler=e,r.cancel=()=>{xo.delete(n),t=null},r};var qi=typeof window<"u"?window.requestAnimationFrame:()=>{};Be.use=e=>qi=e,Be.now=typeof performance<"u"?()=>performance.now():Date.now,Be.batchedUpdates=e=>e(),Be.catch=console.error,Be.frameLoop="always",Be.advance=()=>{Be.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Pl()};var dn=-1,fn=0,Ki=!1;function dr(e,t){Ki?(t.delete(e),e(0)):(t.add(e),El())}function El(){dn<0&&(dn=0,Be.frameLoop!=="demand"&&qi(Sl))}function up(){dn=-1}function Sl(){~dn&&(qi(Sl),Be.batchedUpdates(Pl))}function Pl(){const e=dn;dn=Be.now();const t=Cl(dn);if(t&&(Bl(An.splice(0,t),n=>n.handler()),fn-=t),!fn){up();return}xo.flush(),$i.flush(e?Math.min(64,dn-e):16.667),zi.flush(),Vi.flush(),Hi.flush()}function fr(){let e=new Set,t=e;return{add(n){fn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return fn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,fn-=t.size,Bl(t,r=>r(n)&&e.add(r)),fn+=e.size,t=e)}}}function Bl(e,t){e.forEach(n=>{try{t(n)}catch(r){Be.catch(r)}})}function Wi(){}var dp=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),me={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function nn(e,t){if(me.arr(e)){if(!me.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 Le=(e,t)=>e.forEach(t);function Yt(e,t,n){if(me.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 St=e=>me.und(e)?[]:me.arr(e)?e:[e];function hr(e,t){if(e.size){const n=Array.from(e);e.clear(),Le(n,t)}}var pr=(e,...t)=>hr(e,n=>n(...t)),Gi=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Yi,Ol,hn=null,Nl=!1,Qi=Wi,fp=e=>{e.to&&(Ol=e.to),e.now&&(Be.now=e.now),e.colors!==void 0&&(hn=e.colors),e.skipAnimation!=null&&(Nl=e.skipAnimation),e.createStringInterpolator&&(Yi=e.createStringInterpolator),e.requestAnimationFrame&&Be.use(e.requestAnimationFrame),e.batchedUpdates&&(Be.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Qi=e.willAdvance),e.frameLoop&&(Be.frameLoop=e.frameLoop)},mr=new Set,Nt=[],Xi=[],ko=0,Co={get idle(){return!mr.size&&!Nt.length},start(e){ko>e.priority?(mr.add(e),Be.onStart(hp)):(_l(e),Be(Ji))},advance:Ji,sort(e){if(ko)Be.onFrame(()=>Co.sort(e));else{const t=Nt.indexOf(e);~t&&(Nt.splice(t,1),Tl(e))}},clear(){Nt=[],mr.clear()}};function hp(){mr.forEach(_l),mr.clear(),Be(Ji)}function _l(e){Nt.includes(e)||Tl(e)}function Tl(e){Nt.splice(pp(Nt,t=>t.priority>e.priority),0,e)}function Ji(e){const t=Xi;for(let n=0;n<Nt.length;n++){const r=Nt[n];ko=r.priority,r.idle||(Qi(r),r.advance(e),r.idle||t.push(r))}return ko=0,Xi=Nt,Xi.length=0,Nt=t,Nt.length>0}function pp(e,t){const n=e.findIndex(t);return n<0?e.length:n}var mp=(e,t,n)=>Math.min(Math.max(n,e),t),gp={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},Dt="[-+]?\\d*\\.?\\d+",Eo=Dt+"%";function So(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var yp=new RegExp("rgb"+So(Dt,Dt,Dt)),vp=new RegExp("rgba"+So(Dt,Dt,Dt,Dt)),bp=new RegExp("hsl"+So(Dt,Eo,Eo)),wp=new RegExp("hsla"+So(Dt,Eo,Eo,Dt)),xp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,kp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Cp=/^#([0-9a-fA-F]{6})$/,Ep=/^#([0-9a-fA-F]{8})$/;function Sp(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Cp.exec(e))?parseInt(t[1]+"ff",16)>>>0:hn&&hn[e]!==void 0?hn[e]:(t=yp.exec(e))?(Rn(t[1])<<24|Rn(t[2])<<16|Rn(t[3])<<8|255)>>>0:(t=vp.exec(e))?(Rn(t[1])<<24|Rn(t[2])<<16|Rn(t[3])<<8|Al(t[4]))>>>0:(t=xp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Ep.exec(e))?parseInt(t[1],16)>>>0:(t=kp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=bp.exec(e))?(jl(Il(t[1]),Po(t[2]),Po(t[3]))|255)>>>0:(t=wp.exec(e))?(jl(Il(t[1]),Po(t[2]),Po(t[3]))|Al(t[4]))>>>0:null}function Zi(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 jl(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Zi(i,r,e+1/3),s=Zi(i,r,e),u=Zi(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(s*255)<<16|Math.round(u*255)<<8}function Rn(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Il(e){return(parseFloat(e)%360+360)%360/360}function Al(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Po(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Rl(e){let t=Sp(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var gr=(e,t,n)=>{if(me.fun(e))return e;if(me.arr(e))return gr({range:e,output:t,extrapolate:n});if(me.str(e.output[0]))return Yi(e);const r=e,i=r.output,a=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",u=r.extrapolateRight||r.extrapolate||"extend",h=r.easing||(v=>v);return v=>{const m=Bp(v,a);return Pp(v,a[m],a[m+1],i[m],i[m+1],h,s,u,r.map)}};function Pp(e,t,n,r,i,a,s,u,h){let v=h?h(e):e;if(v<t){if(s==="identity")return v;s==="clamp"&&(v=t)}if(v>n){if(u==="identity")return v;u==="clamp"&&(v=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?v=-v:n===1/0?v=v-t:v=(v-t)/(n-t),v=a(v),r===-1/0?v=-v:i===1/0?v=v+r:v=v*(i-r)+r,v)}function Bp(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Op=(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 mp(0,1,i/e)},Bo=1.70158,Oo=Bo*1.525,Ll=Bo+1,Dl=2*Math.PI/3,Ml=2*Math.PI/4.5,No=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,Np={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=>Ll*e*e*e-Bo*e*e,easeOutBack:e=>1+Ll*Math.pow(e-1,3)+Bo*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Oo+1)*2*e-Oo)/2:(Math.pow(2*e-2,2)*((Oo+1)*(e*2-2)+Oo)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Dl),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Dl)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ml))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ml)/2+1,easeInBounce:e=>1-No(1-e),easeOutBounce:No,easeInOutBounce:e=>e<.5?(1-No(1-2*e))/2:(1+No(2*e-1))/2,steps:Op},yr=Symbol.for("FluidValue.get"),Ln=Symbol.for("FluidValue.observers"),_t=e=>!!(e&&e[yr]),Ct=e=>e&&e[yr]?e[yr]():e,Fl=e=>e[Ln]||null;function _p(e,t){e.eventObserved?e.eventObserved(t):e(t)}function vr(e,t){const n=e[Ln];n&&n.forEach(r=>{_p(r,t)})}var Ul=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Tp(this,e)}},Tp=(e,t)=>$l(e,yr,t);function Dn(e,t){if(e[yr]){let n=e[Ln];n||$l(e,Ln,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function br(e,t){const n=e[Ln];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ln]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var $l=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),_o=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,jp=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Vl=new RegExp(`(${_o.source})(%|[a-z]+)`,"i"),Ip=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,To=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,zl=e=>{const[t,n]=Ap(e);if(!t||Gi())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&&To.test(n))return zl(n);if(n)return n}return e},Ap=e=>{const t=To.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ea,Rp=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Hl=e=>{ea||(ea=hn?new RegExp(`(${Object.keys(hn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Ct(a).replace(To,zl).replace(jp,Rl).replace(ea,Rl)),n=t.map(a=>a.match(_o).map(Number)),i=n[0].map((a,s)=>n.map(u=>{if(!(s in u))throw Error('The arity of each "output" value must be equal');return u[s]})).map(a=>gr({...e,output:a}));return a=>{var h;const s=!Vl.test(t[0])&&((h=t.find(v=>Vl.test(v)))==null?void 0:h.replace(_o,""));let u=0;return t[0].replace(_o,()=>`${i[u++](a)}${s||""}`).replace(Ip,Rp)}},ta="react-spring: ",ql=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${ta}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},Lp=ql(console.warn);function Dp(){Lp(`${ta}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Mp=ql(console.warn);function Fp(){Mp(`${ta}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 jo(e){return me.str(e)&&(e[0]=="#"||/\d/.test(e)||!Gi()&&To.test(e)||e in(hn||{}))}var na=Gi()?z.useEffect:z.useLayoutEffect,Up=()=>{const e=z.useRef(!1);return na(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Kl(){const e=z.useState()[1],t=Up();return()=>{t.current&&e(Math.random())}}function $p(e,t){const[n]=z.useState(()=>({inputs:t,result:e()})),r=z.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&Vp(t,a.inputs)||(a={inputs:t,result:e()}):a=n,z.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function Vp(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 Wl=e=>z.useEffect(e,zp),zp=[];function Gl(e){const t=z.useRef();return z.useEffect(()=>{t.current=e}),t.current}var wr=Symbol.for("Animated:node"),Hp=e=>!!e&&e[wr]===e,Qt=e=>e&&e[wr],ra=(e,t)=>dp(e,wr,t),Io=e=>e&&e[wr]&&e[wr].getPayload(),Yl=class{constructor(){ra(this,this)}getPayload(){return this.payload||[]}},xr=class extends Yl{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,me.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new xr(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return me.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,me.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},kr=class extends xr{constructor(e){super(0),this._string=null,this._toString=gr({output:[e,e]})}static create(e){return new kr(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(me.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=gr({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ao={dependencies:null},Ro=class extends Yl{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Yt(this.source,(n,r)=>{Hp(n)?t[r]=n.getValue(e):_t(n)?t[r]=Ct(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Le(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Yt(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ao.dependencies&&_t(e)&&Ao.dependencies.add(e);const t=Io(e);t&&Le(t,n=>this.add(n))}},Ql=class extends Ro{constructor(e){super(e)}static create(e){return new Ql(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(qp)),!0)}};function qp(e){return(jo(e)?kr:xr).create(e)}function oa(e){const t=Qt(e);return t?t.constructor:me.arr(e)?Ql:jo(e)?kr:xr}var Xl=(e,t)=>{const n=!me.fun(e)||e.prototype&&e.prototype.isReactComponent;return z.forwardRef((r,i)=>{const a=z.useRef(null),s=n&&z.useCallback(o=>{a.current=Gp(i,o)},[i]),[u,h]=Wp(r,t),v=Kl(),m=()=>{const o=a.current;if(n&&!o)return;(o?t.applyAnimatedValues(o,u.getValue(!0)):!1)===!1&&v()},b=new Kp(m,h),l=z.useRef();na(()=>(l.current=b,Le(h,o=>Dn(o,b)),()=>{l.current&&(Le(l.current.deps,o=>br(o,l.current)),Be.cancel(l.current.update))})),z.useEffect(m,[]),Wl(()=>()=>{const o=l.current;Le(o.deps,c=>br(c,o))});const g=t.getComponentProps(u.getValue());return le.createElement(e,{...g,ref:s})})},Kp=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Be.write(this.update)}};function Wp(e,t){const n=new Set;return Ao.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ro(e),Ao.dependencies=null,[e,n]}function Gp(e,t){return e&&(me.fun(e)?e(t):e.current=t),t}var Jl=Symbol.for("AnimatedComponent"),Yp=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Ro(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=s=>{const u=Zl(s)||"Anonymous";return me.str(s)?s=a[s]||(a[s]=Xl(s,i)):s=s[Jl]||(s[Jl]=Xl(s,i)),s.displayName=`Animated(${u})`,s};return Yt(e,(s,u)=>{me.arr(e)&&(u=Zl(s)),a[u]=a(s)}),{animated:a}},Zl=e=>me.str(e)?e:e&&me.str(e.displayName)?e.displayName:me.fun(e)&&e.name||null;function bn(e,...t){return me.fun(e)?e(...t):e}var Cr=(e,t)=>e===!0||!!(t&&e&&(me.fun(e)?e(t):St(e).includes(t))),ec=(e,t)=>me.obj(e)?t&&e[t]:e,tc=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Qp=e=>e,ia=(e,t=Qp)=>{let n=Xp;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);me.und(a)||(r[i]=a)}return r},Xp=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Jp={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 Zp(e){const t={};let n=0;if(Yt(e,(r,i)=>{Jp[i]||(t[i]=r,n++)}),n)return t}function nc(e){const t=Zp(e);if(t){const n={to:t};return Yt(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Er(e){return e=Ct(e),me.arr(e)?e.map(Er):jo(e)?Lt.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function em(e){for(const t in e)return!0;return!1}function aa(e){return me.fun(e)||me.arr(e)&&me.obj(e[0])}function tm(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function nm(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var rm={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}},sa={...rm.default,mass:1,damping:1,easing:Np.linear,clamp:!1},om=class{constructor(){this.velocity=0,Object.assign(this,sa)}};function im(e,t,n){n&&(n={...n},rc(n,t),t={...n,...t}),rc(e,t),Object.assign(e,t);for(const s in sa)e[s]==null&&(e[s]=sa[s]);let{frequency:r,damping:i}=e;const{mass:a}=e;return me.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function rc(e,t){if(!me.und(t.decay))e.duration=void 0;else{const n=!me.und(t.tension)||!me.und(t.friction);(n||!me.und(t.frequency)||!me.und(t.damping)||!me.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var oc=[],am=class{constructor(){this.changed=!1,this.values=oc,this.toValues=null,this.fromValues=oc,this.config=new om,this.immediate=!1}};function ic(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((s,u)=>{let h,v,m=Cr(n.cancel??(r==null?void 0:r.cancel),t);if(m)g();else{me.und(n.pause)||(i.paused=Cr(n.pause,t));let o=r==null?void 0:r.pause;o!==!0&&(o=i.paused||Cr(o,t)),h=bn(n.delay||0,t),o?(i.resumeQueue.add(l),a.pause()):(a.resume(),l())}function b(){i.resumeQueue.add(l),i.timeouts.delete(v),v.cancel(),h=v.time-Be.now()}function l(){h>0&&!Lt.skipAnimation?(i.delayed=!0,v=Be.setTimeout(g,h),i.pauseQueue.add(b),i.timeouts.add(v)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(b),i.timeouts.delete(v),e<=(i.cancelId||0)&&(m=!0);try{a.start({...n,callId:e,cancel:m},s)}catch(o){u(o)}}})}var la=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Mn(e.get()):t.every(n=>n.noop)?ac(e.get()):Mt(e.get(),t.every(n=>n.finished)),ac=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Mt=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Mn=e=>({value:e,cancelled:!0,finished:!1});function sc(e,t,n,r){const{callId:i,parentId:a,onRest:s}=t,{asyncTo:u,promise:h}=n;return!a&&e===u&&!t.reset?h:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const v=ia(t,(f,d)=>d==="onRest"?void 0:f);let m,b;const l=new Promise((f,d)=>(m=f,b=d)),g=f=>{const d=i<=(n.cancelId||0)&&Mn(r)||i!==n.asyncId&&Mt(r,!1);if(d)throw f.result=d,b(f),f},o=(f,d)=>{const p=new lc,y=new cc;return(async()=>{if(Lt.skipAnimation)throw Sr(n),y.result=Mt(r,!1),b(y),y;g(p);const x=me.obj(f)?{...f}:{...d,to:f};x.parentId=i,Yt(v,(S,k)=>{me.und(x[k])&&(x[k]=S)});const E=await r.start(x);return g(p),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),E})()};let c;if(Lt.skipAnimation)return Sr(n),Mt(r,!1);try{let f;me.arr(e)?f=(async d=>{for(const p of d)await o(p)})(e):f=Promise.resolve(e(o,r.stop.bind(r))),await Promise.all([f.then(m),l]),c=Mt(r.get(),!0,!1)}catch(f){if(f instanceof lc)c=f.result;else if(f instanceof cc)c=f.result;else throw f}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?u:void 0,n.promise=a?h:void 0)}return me.fun(s)&&Be.batchedUpdates(()=>{s(c,r,r.item)}),c})()}function Sr(e,t){hr(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var lc=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.")}},cc=class extends Error{constructor(){super("SkipAnimationSignal")}},ca=e=>e instanceof ua,sm=1,ua=class extends Ul{constructor(){super(...arguments),this.id=sm++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Qt(this);return e&&e.getValue()}to(...e){return Lt.to(this,e)}interpolate(...e){return Dp(),Lt.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){vr(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Co.sort(this),vr(this,{type:"priority",parent:this,priority:e})}},wn=Symbol.for("SpringPhase"),uc=1,da=2,fa=4,ha=e=>(e[wn]&uc)>0,pn=e=>(e[wn]&da)>0,Pr=e=>(e[wn]&fa)>0,dc=(e,t)=>t?e[wn]|=da|uc:e[wn]&=~da,fc=(e,t)=>t?e[wn]|=fa:e[wn]&=~fa,lm=class extends ua{constructor(e,t){if(super(),this.animation=new am,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,!me.und(e)||!me.und(t)){const n=me.obj(e)?{...e}:{...t,from:e};me.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(pn(this)||this._state.asyncTo)||Pr(this)}get goal(){return Ct(this.animation.to)}get velocity(){const e=Qt(this);return e instanceof xr?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ha(this)}get isAnimating(){return pn(this)}get isPaused(){return Pr(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,s=Io(r.to);!s&&_t(r.to)&&(i=St(Ct(r.to))),r.values.forEach((v,m)=>{if(v.done)return;const b=v.constructor==kr?1:s?s[m].lastPosition:i[m];let l=r.immediate,g=b;if(!l){if(g=v.lastPosition,a.tension<=0){v.done=!0;return}let o=v.elapsedTime+=e;const c=r.fromValues[m],f=v.v0!=null?v.v0:v.v0=me.arr(a.velocity)?a.velocity[m]:a.velocity;let d;const p=a.precision||(c==b?.005:Math.min(1,Math.abs(b-c)*.001));if(me.und(a.duration))if(a.decay){const y=a.decay===!0?.998:a.decay,x=Math.exp(-(1-y)*o);g=c+f/(1-y)*(1-x),l=Math.abs(v.lastPosition-g)<=p,d=f*x}else{d=v.lastVelocity==null?f:v.lastVelocity;const y=a.restVelocity||p/10,x=a.clamp?0:a.bounce,E=!me.und(x),S=c==b?v.v0>0:c<b;let k,B=!1;const O=1,I=Math.ceil(e/O);for(let L=0;L<I&&(k=Math.abs(d)>y,!(!k&&(l=Math.abs(b-g)<=p,l)));++L){E&&(B=g==b||g>b==S,B&&(d=-d*x,g=b));const D=-a.tension*1e-6*(g-b),M=-a.friction*.001*d,$=(D+M)/a.mass;d=d+$*O,g=g+d*O}}else{let y=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,v.durationProgress>0&&(v.elapsedTime=a.duration*v.durationProgress,o=v.elapsedTime+=e)),y=(a.progress||0)+o/this._memoizedDuration,y=y>1?1:y<0?0:y,v.durationProgress=y),g=c+a.easing(y)*(b-c),d=(g-v.lastPosition)/e,l=y==1}v.lastVelocity=d,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),l=!0)}s&&!s[m].done&&(l=!1),l?v.done=!0:t=!1,v.setValue(g,a.round)&&(n=!0)});const u=Qt(this),h=u.getValue();if(t){const v=Ct(r.to);(h!==v||n)&&!a.decay?(u.setValue(v),this._onChange(v)):n&&a.decay&&this._onChange(h),this._stop()}else n&&this._onChange(h)}set(e){return Be.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(pn(this)){const{to:e,config:t}=this.animation;Be.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 me.und(e)?(n=this.queue||[],this.queue=[]):n=[me.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>la(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Sr(this._state,e&&this._lastCallId),Be.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=me.obj(n)?n[t]:n,(n==null||aa(n))&&(n=void 0),r=me.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return ha(this)||(e.reverse&&([n,r]=[r,n]),r=Ct(r),me.und(r)?Qt(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,ia(e,(s,u)=>/^on/.test(u)?ec(s,n):s)),mc(this,e,"onProps"),Nr(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 a=this._state;return ic(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Pr(this)||(fc(this,!0),pr(a.pauseQueue),Nr(this,"onPause",Mt(this,Br(this,this.animation.to)),this))},resume:()=>{Pr(this)&&(fc(this,!1),pn(this)&&this._resume(),pr(a.resumeQueue),Nr(this,"onResume",Mt(this,Br(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const u=hc(e);if(u)return this._update(u,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Mn(this));const r=!me.und(e.to),i=!me.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Mn(this));const{key:a,defaultProps:s,animation:u}=this,{to:h,from:v}=u;let{to:m=h,from:b=v}=e;i&&!r&&(!t.default||me.und(m))&&(m=b),t.reverse&&([m,b]=[b,m]);const l=!nn(b,v);l&&(u.from=b),b=Ct(b);const g=!nn(m,h);g&&this._focus(m);const o=aa(t.to),{config:c}=u,{decay:f,velocity:d}=c;(r||i)&&(c.velocity=0),t.config&&!o&&im(c,bn(t.config,a),t.config!==s.config?bn(s.config,a):void 0);let p=Qt(this);if(!p||me.und(m))return n(Mt(this,!0));const y=me.und(t.reset)?i&&!t.default:!me.und(b)&&Cr(t.reset,a),x=y?b:this.get(),E=Er(m),S=me.num(E)||me.arr(E)||jo(E),k=!o&&(!S||Cr(s.immediate||t.immediate,a));if(g){const L=oa(m);if(L!==p.constructor)if(k)p=this._set(E);else throw Error(`Cannot animate between ${p.constructor.name} and ${L.name}, as the "to" prop suggests`)}const B=p.constructor;let O=_t(m),I=!1;if(!O){const L=y||!ha(this)&&l;(g||L)&&(I=nn(Er(x),E),O=!I),(!nn(u.immediate,k)&&!k||!nn(c.decay,f)||!nn(c.velocity,d))&&(O=!0)}if(I&&pn(this)&&(u.changed&&!y?O=!0:O||this._stop(h)),!o&&((O||_t(h))&&(u.values=p.getPayload(),u.toValues=_t(m)?null:B==kr?[1]:St(E)),u.immediate!=k&&(u.immediate=k,!k&&!y&&this._set(h)),O)){const{onRest:L}=u;Le(um,M=>mc(this,t,M));const D=Mt(this,Br(this,h));pr(this._pendingCalls,D),this._pendingCalls.add(n),u.changed&&Be.batchedUpdates(()=>{var M;u.changed=!y,L==null||L(D,this),y?bn(s.onRest,D):(M=u.onStart)==null||M.call(u,D,this)})}y&&this._set(x),o?n(sc(t.to,t,this._state,this)):O?this._start():pn(this)&&!g?this._pendingCalls.add(n):n(ac(x))}_focus(e){const t=this.animation;e!==t.to&&(Fl(this)&&this._detach(),t.to=e,Fl(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;_t(t)&&(Dn(t,this),ca(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;_t(e)&&br(e,this)}_set(e,t=!0){const n=Ct(e);if(!me.und(n)){const r=Qt(this);if(!r||!nn(n,r.getValue())){const i=oa(n);!r||r.constructor!=i?ra(this,i.create(n)):r.setValue(n),r&&Be.batchedUpdates(()=>{this._onChange(n,t)})}}return Qt(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Nr(this,"onStart",Mt(this,Br(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),bn(this.animation.onChange,e,this)),bn(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Qt(this).reset(Ct(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),pn(this)||(dc(this,!0),Pr(this)||this._resume())}_resume(){Lt.skipAnimation?this.finish():Co.start(this)}_stop(e,t){if(pn(this)){dc(this,!1);const n=this.animation;Le(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),vr(this,{type:"idle",parent:this});const r=t?Mn(this.get()):Mt(this.get(),Br(this,e??n.to));pr(this._pendingCalls,r),n.changed&&(n.changed=!1,Nr(this,"onRest",r,this))}}};function Br(e,t){const n=Er(t),r=Er(e.get());return nn(r,n)}function hc(e,t=e.loop,n=e.to){const r=bn(t);if(r){const i=r!==!0&&nc(r),a=(i||e).reverse,s=!i||i.reset;return Or({...e,loop:t,default:!1,pause:void 0,to:!a||aa(n)?n:void 0,from:s?e.from:void 0,reset:s,...i})}}function Or(e){const{to:t,from:n}=e=nc(e),r=new Set;return me.obj(t)&&pc(t,r),me.obj(n)&&pc(n,r),e.keys=r.size?Array.from(r):null,e}function cm(e){const t=Or(e);return me.und(t.default)&&(t.default=ia(t)),t}function pc(e,t){Yt(e,(n,r)=>n!=null&&t.add(r))}var um=["onStart","onRest","onChange","onPause","onResume"];function mc(e,t,n){e.animation[n]=t[n]!==tc(t,n)?ec(t[n],e.key):void 0}function Nr(e,t,...n){var r,i,a,s;(i=(r=e.animation)[t])==null||i.call(r,...n),(s=(a=e.defaultProps)[t])==null||s.call(a,...n)}var dm=["onStart","onChange","onRest"],fm=1,hm=class{constructor(e,t){this.id=fm++,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];me.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Or(e)),this}start(e){let{queue:t}=this;return e?t=St(e).map(Or):this.queue=[],this._flush?this._flush(this,t):(xc(this,t),pa(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Le(St(t),r=>n[r].stop(!!e))}else Sr(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(me.und(e))this.start({pause:!0});else{const t=this.springs;Le(St(e),n=>t[n].pause())}return this}resume(e){if(me.und(e))this.start({pause:!1});else{const t=this.springs;Le(St(e),n=>t[n].resume())}return this}each(e){Yt(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,hr(e,([u,h])=>{h.value=this.get(),u(h,this,this._item)}));const a=!r&&this._started,s=i||a&&n.size?this.get():null;i&&t.size&&hr(t,([u,h])=>{h.value=s,u(h,this,this._item)}),a&&(this._started=!1,hr(n,([u,h])=>{h.value=s,u(h,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;Be.onFrame(this._onFrame)}};function pa(e,t){return Promise.all(t.map(n=>gc(e,n))).then(n=>la(e,n))}async function gc(e,t,n){const{keys:r,to:i,from:a,loop:s,onRest:u,onResolve:h}=t,v=me.obj(t.default)&&t.default;s&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const m=me.arr(i)||me.fun(i)?i:void 0;m?(t.to=void 0,t.onRest=void 0,v&&(v.onRest=void 0)):Le(dm,c=>{const f=t[c];if(me.fun(f)){const d=e._events[c];t[c]=({finished:p,cancelled:y})=>{const x=d.get(f);x?(p||(x.finished=!1),y&&(x.cancelled=!0)):d.set(f,{value:null,finished:p||!1,cancelled:y||!1})},v&&(v[c]=t[c])}});const b=e._state;t.pause===!b.paused?(b.paused=t.pause,pr(t.pause?b.pauseQueue:b.resumeQueue)):b.paused&&(t.pause=!0);const l=(r||Object.keys(e.springs)).map(c=>e.springs[c].start(t)),g=t.cancel===!0||tc(t,"cancel")===!0;(m||g&&b.asyncId)&&l.push(ic(++e._lastAsyncId,{props:t,state:b,actions:{pause:Wi,resume:Wi,start(c,f){g?(Sr(b,e._lastAsyncId),f(Mn(e))):(c.onRest=u,f(sc(m,c,b,e)))}}})),b.paused&&await new Promise(c=>{b.resumeQueue.add(c)});const o=la(e,await Promise.all(l));if(s&&o.finished&&!(n&&o.noop)){const c=hc(t,s,i);if(c)return xc(e,[c]),gc(e,c,!0)}return h&&Be.batchedUpdates(()=>h(o,e,e.item)),o}function yc(e,t){const n={...e.springs};return t&&Le(St(t),r=>{me.und(r.keys)&&(r=Or(r)),me.obj(r.to)||(r={...r,to:void 0}),wc(n,r,i=>bc(i))}),vc(e,n),n}function vc(e,t){Yt(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Dn(n,e))})}function bc(e,t){const n=new lm;return n.key=e,t&&Dn(n,t),n}function wc(e,t,n){t.keys&&Le(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function xc(e,t){Le(t,n=>{wc(e.springs,n,r=>bc(r,e))})}var Lo=({children:e,...t})=>{const n=z.useContext(Do),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=$p(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=Do;return le.createElement(a,{value:t},e)},Do=pm(Lo,{});Lo.Provider=Do.Provider,Lo.Consumer=Do.Consumer;function pm(e,t){return Object.assign(e,le.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var mm=()=>{const e=[],t=function(r){Fp();const i=[];return Le(e,(a,s)=>{if(me.und(r))i.push(a.start());else{const u=n(r,a,s);u&&i.push(a.start(u))}}),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 Le(e,r=>r.pause(...arguments)),this},t.resume=function(){return Le(e,r=>r.resume(...arguments)),this},t.set=function(r){Le(e,(i,a)=>{const s=me.fun(r)?r(a,i):r;s&&i.set(s)})},t.start=function(r){const i=[];return Le(e,(a,s)=>{if(me.und(r))i.push(a.start());else{const u=this._getProps(r,a,s);u&&i.push(a.start(u))}}),i},t.stop=function(){return Le(e,r=>r.stop(...arguments)),this},t.update=function(r){return Le(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return me.fun(r)?r(a,i):r};return t._getProps=n,t};function gm(e,t,n){const r=me.fun(t)&&t;r&&!n&&(n=[]);const i=z.useMemo(()=>r||arguments.length==3?mm():void 0,[]),a=z.useRef(0),s=Kl(),u=z.useMemo(()=>({ctrls:[],queue:[],flush(d,p){const y=yc(d,p);return a.current>0&&!u.queue.length&&!Object.keys(y).some(E=>!d.springs[E])?pa(d,p):new Promise(E=>{vc(d,y),u.queue.push(()=>{E(pa(d,p))}),s()})}}),[]),h=z.useRef([...u.ctrls]),v=[],m=Gl(e)||0;z.useMemo(()=>{Le(h.current.slice(e,m),d=>{tm(d,i),d.stop(!0)}),h.current.length=e,b(m,e)},[e]),z.useMemo(()=>{b(0,Math.min(m,e))},n);function b(d,p){for(let y=d;y<p;y++){const x=h.current[y]||(h.current[y]=new hm(null,u.flush)),E=r?r(y,x):t[y];E&&(v[y]=cm(E))}}const l=h.current.map((d,p)=>yc(d,v[p])),g=z.useContext(Lo),o=Gl(g),c=g!==o&&em(g);na(()=>{a.current++,u.ctrls=h.current;const{queue:d}=u;d.length&&(u.queue=[],Le(d,p=>p())),Le(h.current,(p,y)=>{i==null||i.add(p),c&&p.start({default:g});const x=v[y];x&&(nm(p,x.ref),p.ref?p.queue.push(x):p.start(x))})}),Wl(()=>()=>{Le(u.ctrls,d=>d.stop(!0))});const f=l.map(d=>({...d}));return i?[f,i]:f}function ym(e,t){const n=me.fun(e),[[r],i]=gm(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var vm=class extends ua{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=gr(...t);const n=this._get(),r=oa(n);ra(this,r.create(n))}advance(e){const t=this._get(),n=this.get();nn(t,n)||(Qt(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&kc(this._active)&&ma(this)}_get(){const e=me.arr(this.source)?this.source.map(Ct):St(Ct(this.source));return this.calc(...e)}_start(){this.idle&&!kc(this._active)&&(this.idle=!1,Le(Io(this),e=>{e.done=!1}),Lt.skipAnimation?(Be.batchedUpdates(()=>this.advance()),ma(this)):Co.start(this))}_attach(){let e=1;Le(St(this.source),t=>{_t(t)&&Dn(t,this),ca(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Le(St(this.source),e=>{_t(e)&&br(e,this)}),this._active.clear(),ma(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=St(this.source).reduce((t,n)=>Math.max(t,(ca(n)?n.priority:0)+1),0))}};function bm(e){return e.idle!==!1}function kc(e){return!e.size||Array.from(e).every(bm)}function ma(e){e.idle||(e.idle=!0,Le(Io(e),t=>{t.done=!0}),vr(e,{type:"idle",parent:e}))}Lt.assign({createStringInterpolator:Hl,to:(e,t)=>new vm(e,t)});var Cc=/^--/;function wm(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Cc.test(e)&&!(_r.hasOwnProperty(e)&&_r[e])?t+"px":(""+t).trim()}var Ec={};function xm(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:a,scrollLeft:s,viewBox:u,...h}=t,v=Object.values(h),m=Object.keys(h).map(b=>n||e.hasAttribute(b)?b:Ec[b]||(Ec[b]=b.replace(/([A-Z])/g,l=>"-"+l.toLowerCase())));i!==void 0&&(e.textContent=i);for(const b in r)if(r.hasOwnProperty(b)){const l=wm(b,r[b]);Cc.test(b)?e.style.setProperty(b,l):e.style[b]=l}m.forEach((b,l)=>{e.setAttribute(b,v[l])}),a!==void 0&&(e.scrollTop=a),s!==void 0&&(e.scrollLeft=s),u!==void 0&&e.setAttribute("viewBox",u)}var _r={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},km=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Cm=["Webkit","Ms","Moz","O"];_r=Object.keys(_r).reduce((e,t)=>(Cm.forEach(n=>e[km(n,t)]=e[t]),e),_r);var Em=/^(matrix|translate|scale|rotate|skew)/,Sm=/^(translate)/,Pm=/^(rotate|skew)/,ga=(e,t)=>me.num(e)&&e!==0?e+t:e,Mo=(e,t)=>me.arr(e)?e.every(n=>Mo(n,t)):me.num(e)?e===t:parseFloat(e)===t,Bm=class extends Ro{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(s=>[`translate3d(${s.map(u=>ga(u,"px")).join(",")})`,Mo(s,0)])),Yt(r,(s,u)=>{if(u==="transform")i.push([s||""]),a.push(h=>[h,h===""]);else if(Em.test(u)){if(delete r[u],me.und(s))return;const h=Sm.test(u)?"px":Pm.test(u)?"deg":"";i.push(St(s)),a.push(u==="rotate3d"?([v,m,b,l])=>[`rotate3d(${v},${m},${b},${ga(l,h)})`,Mo(l,0)]:v=>[`${u}(${v.map(m=>ga(m,h)).join(",")})`,Mo(v,u.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new Om(i,a)),super(r)}},Om=class extends Ul{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 Le(this.inputs,(n,r)=>{const i=Ct(n[0]),[a,s]=this.transforms[r](me.arr(i)?i:n.map(Ct));e+=" "+a,t=t&&s}),t?"none":e}observerAdded(e){e==1&&Le(this.inputs,t=>Le(t,n=>_t(n)&&Dn(n,this)))}observerRemoved(e){e==0&&Le(this.inputs,t=>Le(t,n=>_t(n)&&br(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),vr(this,e)}},Nm=["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"];Lt.assign({batchedUpdates:an.unstable_batchedUpdates,createStringInterpolator:Hl,colors:gp});var _m=Yp(Nm,{applyAnimatedValues:xm,createAnimatedStyle:e=>new Bm(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Tm=_m.animated;function jm(e){const{rows:t}=e,n=ym({from:{opacity:0},to:{opacity:1}});return C.jsxs(Tm.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,i)=>C.jsx("div",{className:"h-16 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${i}`)),C.jsx("span",{className:"sr-only",children:"Loading..."})]})}function Im({label:e,isActive:t,isCompleted:n,isFinalStep:r}){return C.jsx("li",{className:`flex items-center ${!r&&"after:border-1 after:mx-6 after:hidden after:h-1 after:w-full after:border-b after:border-gray-200 sm:after:inline-block sm:after:content-[''] md:w-full xl:after:mx-10"} ${t&&"text-primary-600"}`,children:C.jsxs("span",{className:`flex items-center after:mx-2 after:text-gray-200 after:content-['/'] sm:after:hidden ${n&&"text-gray-300"}`,children:[n?C.jsx("svg",{className:"me-2.5 h-3.5 w-3.5 sm:h-4 sm:w-4","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5Zm3.707 8.207-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L9 10.586l3.293-3.293a1 1 0 0 1 1.414 1.414Z"})}):null,C.jsx("span",{className:"whitespace-nowrap",children:e})]})})}function Am({activeStep:e,children:t}){return C.jsx("div",{children:C.jsx("ol",{className:"flex w-full items-center text-center text-sm font-medium text-gray-500 sm:text-base",children:z.Children.map(t,(n,r)=>z.cloneElement(n,{isActive:r<=e,isCompleted:r<e,isFinalStep:r===z.Children.count(t)-1}))})})}function Rm({item:e}){return C.jsx("th",{className:`h-10 min-w-max items-center px-4 ${e.align==="left"?"text-start":e.align==="center"?"text-center":"text-end"}`,children:C.jsx(He,{size:"xs",weight:"normal",color:"text-gray-700",children:e&&e.value})})}function Lm({row:e,onClick:t}){return C.jsx("tr",{children:e.columns.map((n,r)=>C.jsx("td",{children:C.jsx("div",{className:`my-auto flex h-12 w-full items-center ${n.align==="left"?"justify-start":n.align==="center"?"justify-center":"justify-end"} truncate px-4 font-thin`,children:n.value.type==="button_component"?C.jsx(Xe,{label:n.value.label??"",disabled:n.value.disabled,onClick:()=>t&&t(n.value.id)}):C.jsx(He,{size:"sm",weight:"light",color:"text-gray-700",children:n.value.title})})},`${n.value}-${r}`))})}function Dm(e){return C.jsx(C.Fragment,{children:[...Array(e.rows)].map((t,n)=>C.jsx("tr",{className:"border-b border-gray-50",children:[...Array(e.columns)].map((r,i)=>C.jsx("td",{className:"table-cell animate-pulse",children:C.jsx("div",{className:`flex grow items-center ${e.type=="double"?"h-[72px]":"h-12"}`,children:C.jsx("div",{className:"m-2 h-8 w-28 rounded-lg bg-gray-50"})})},`form_element_skeleton_col_${i}`))},`form_element_skeleton_${n}`))})}function Sc({header:e=[],rows:t=[],pending:n,onClick:r}){const{t:i}=qe();return C.jsxs("div",{className:"relative overflow-auto rounded-lg rounded-b-lg rounded-t-lg border border-gray-900/10",children:[C.jsxs("table",{className:"table w-full table-auto",children:[C.jsx("thead",{className:"sticky top-0 table-header-group w-full bg-gray-50",children:C.jsx("tr",{children:e.map((a,s)=>C.jsx(Rm,{item:a},`${a.value}-${s}`))})}),C.jsx("tbody",{children:n?C.jsx(Dm,{columns:e.length??5,rows:t.length??10}):t.map((a,s)=>C.jsx(Lm,{row:a,onClick:r},s))})]}),!t.length&&C.jsx("div",{className:"p-6",children:C.jsx(He,{color:"text-gray-200",className:"text-center",size:"sm",children:i("noData")})})]})}function ya(e){"@babel/helpers - typeof";return ya=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},ya(e)}function Pc(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":ya(XMLHttpRequest))==="object"}function Mm(e){return!!e&&typeof e.then=="function"}function Fm(e){return Mm(e)?e:Promise.resolve(e)}function Um(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 va={exports:{}},Fo={exports:{}},Bc;function $m(){return Bc||(Bc=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Pn<"u"&&Pn,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var u=typeof a<"u"&&a||typeof self<"u"&&self||typeof u<"u"&&u,h={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function v(P){return P&&DataView.prototype.isPrototypeOf(P)}if(h.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=ArrayBuffer.isView||function(P){return P&&m.indexOf(Object.prototype.toString.call(P))>-1};function l(P){if(typeof P!="string"&&(P=String(P)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(P)||P==="")throw new TypeError('Invalid character in header field name: "'+P+'"');return P.toLowerCase()}function g(P){return typeof P!="string"&&(P=String(P)),P}function o(P){var R={next:function(){var q=P.shift();return{done:q===void 0,value:q}}};return h.iterable&&(R[Symbol.iterator]=function(){return R}),R}function c(P){this.map={},P instanceof c?P.forEach(function(R,q){this.append(q,R)},this):Array.isArray(P)?P.forEach(function(R){this.append(R[0],R[1])},this):P&&Object.getOwnPropertyNames(P).forEach(function(R){this.append(R,P[R])},this)}c.prototype.append=function(P,R){P=l(P),R=g(R);var q=this.map[P];this.map[P]=q?q+", "+R:R},c.prototype.delete=function(P){delete this.map[l(P)]},c.prototype.get=function(P){return P=l(P),this.has(P)?this.map[P]:null},c.prototype.has=function(P){return this.map.hasOwnProperty(l(P))},c.prototype.set=function(P,R){this.map[l(P)]=g(R)},c.prototype.forEach=function(P,R){for(var q in this.map)this.map.hasOwnProperty(q)&&P.call(R,this.map[q],q,this)},c.prototype.keys=function(){var P=[];return this.forEach(function(R,q){P.push(q)}),o(P)},c.prototype.values=function(){var P=[];return this.forEach(function(R){P.push(R)}),o(P)},c.prototype.entries=function(){var P=[];return this.forEach(function(R,q){P.push([q,R])}),o(P)},h.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function f(P){if(P.bodyUsed)return Promise.reject(new TypeError("Already read"));P.bodyUsed=!0}function d(P){return new Promise(function(R,q){P.onload=function(){R(P.result)},P.onerror=function(){q(P.error)}})}function p(P){var R=new FileReader,q=d(R);return R.readAsArrayBuffer(P),q}function y(P){var R=new FileReader,q=d(R);return R.readAsText(P),q}function x(P){for(var R=new Uint8Array(P),q=new Array(R.length),K=0;K<R.length;K++)q[K]=String.fromCharCode(R[K]);return q.join("")}function E(P){if(P.slice)return P.slice(0);var R=new Uint8Array(P.byteLength);return R.set(new Uint8Array(P)),R.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(P){this.bodyUsed=this.bodyUsed,this._bodyInit=P,P?typeof P=="string"?this._bodyText=P:h.blob&&Blob.prototype.isPrototypeOf(P)?this._bodyBlob=P:h.formData&&FormData.prototype.isPrototypeOf(P)?this._bodyFormData=P:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)?this._bodyText=P.toString():h.arrayBuffer&&h.blob&&v(P)?(this._bodyArrayBuffer=E(P.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(P)||b(P))?this._bodyArrayBuffer=E(P):this._bodyText=P=Object.prototype.toString.call(P):this._bodyText="",this.headers.get("content-type")||(typeof P=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var P=f(this);if(P)return P;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 P=f(this);return P||(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(p)}),this.text=function(){var P=f(this);if(P)return P;if(this._bodyBlob)return y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(x(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(I)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function B(P){var R=P.toUpperCase();return k.indexOf(R)>-1?R:P}function O(P,R){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R=R||{};var q=R.body;if(P instanceof O){if(P.bodyUsed)throw new TypeError("Already read");this.url=P.url,this.credentials=P.credentials,R.headers||(this.headers=new c(P.headers)),this.method=P.method,this.mode=P.mode,this.signal=P.signal,!q&&P._bodyInit!=null&&(q=P._bodyInit,P.bodyUsed=!0)}else this.url=String(P);if(this.credentials=R.credentials||this.credentials||"same-origin",(R.headers||!this.headers)&&(this.headers=new c(R.headers)),this.method=B(R.method||this.method||"GET"),this.mode=R.mode||this.mode||null,this.signal=R.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(q),(this.method==="GET"||this.method==="HEAD")&&(R.cache==="no-store"||R.cache==="no-cache")){var K=/([?&])_=[^&]*/;if(K.test(this.url))this.url=this.url.replace(K,"$1_="+new Date().getTime());else{var J=/\?/;this.url+=(J.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function I(P){var R=new FormData;return P.trim().split("&").forEach(function(q){if(q){var K=q.split("="),J=K.shift().replace(/\+/g," "),Z=K.join("=").replace(/\+/g," ");R.append(decodeURIComponent(J),decodeURIComponent(Z))}}),R}function L(P){var R=new c,q=P.replace(/\r?\n[\t ]+/g," ");return q.split("\r").map(function(K){return K.indexOf(`
70
+ `)===0?K.substr(1,K.length):K}).forEach(function(K){var J=K.split(":"),Z=J.shift().trim();if(Z){var ee=J.join(":").trim();R.append(Z,ee)}}),R}S.call(O.prototype);function D(P,R){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');R||(R={}),this.type="default",this.status=R.status===void 0?200:R.status,this.ok=this.status>=200&&this.status<300,this.statusText=R.statusText===void 0?"":""+R.statusText,this.headers=new c(R.headers),this.url=R.url||"",this._initBody(P)}S.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},D.error=function(){var P=new D(null,{status:0,statusText:""});return P.type="error",P};var M=[301,302,303,307,308];D.redirect=function(P,R){if(M.indexOf(R)===-1)throw new RangeError("Invalid status code");return new D(null,{status:R,headers:{location:P}})},s.DOMException=u.DOMException;try{new s.DOMException}catch{s.DOMException=function(R,q){this.message=R,this.name=q;var K=Error(R);this.stack=K.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function $(P,R){return new Promise(function(q,K){var J=new O(P,R);if(J.signal&&J.signal.aborted)return K(new s.DOMException("Aborted","AbortError"));var Z=new XMLHttpRequest;function ee(){Z.abort()}Z.onload=function(){var te={status:Z.status,statusText:Z.statusText,headers:L(Z.getAllResponseHeaders()||"")};te.url="responseURL"in Z?Z.responseURL:te.headers.get("X-Request-URL");var ge="response"in Z?Z.response:Z.responseText;setTimeout(function(){q(new D(ge,te))},0)},Z.onerror=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.ontimeout=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.onabort=function(){setTimeout(function(){K(new s.DOMException("Aborted","AbortError"))},0)};function ue(te){try{return te===""&&u.location.href?u.location.href:te}catch{return te}}Z.open(J.method,ue(J.url),!0),J.credentials==="include"?Z.withCredentials=!0:J.credentials==="omit"&&(Z.withCredentials=!1),"responseType"in Z&&(h.blob?Z.responseType="blob":h.arrayBuffer&&J.headers.get("Content-Type")&&J.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Z.responseType="arraybuffer")),R&&typeof R.headers=="object"&&!(R.headers instanceof c)?Object.getOwnPropertyNames(R.headers).forEach(function(te){Z.setRequestHeader(te,g(R.headers[te]))}):J.headers.forEach(function(te,ge){Z.setRequestHeader(ge,te)}),J.signal&&(J.signal.addEventListener("abort",ee),Z.onreadystatechange=function(){Z.readyState===4&&J.signal.removeEventListener("abort",ee)}),Z.send(typeof J._bodyInit>"u"?null:J._bodyInit)})}return $.polyfill=!0,u.fetch||(u.fetch=$,u.Headers=c,u.Request=O,u.Response=D),s.Headers=c,s.Request=O,s.Response=D,s.fetch=$,s})({})})(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}(Fo,Fo.exports)),Fo.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Pn<"u"&&Pn.fetch?n=Pn.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Um<"u"&&typeof window>"u"){var r=n||$m();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(va,va.exports);var Oc=va.exports;const Nc=Wo(Oc),_c=Hu({__proto__:null,default:Nc},[Oc]);function Tc(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 jc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tc(Object(n),!0).forEach(function(r){Vm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vm(e,t,n){return t=zm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zm(e){var t=Hm(e,"string");return xn(t)=="symbol"?t:String(t)}function Hm(e,t){if(xn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xn(e){"@babel/helpers - typeof";return xn=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},xn(e)}var rn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?rn=global.fetch:typeof window<"u"&&window.fetch?rn=window.fetch:rn=fetch);var Tr;Pc()&&(typeof global<"u"&&global.XMLHttpRequest?Tr=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Tr=window.XMLHttpRequest));var Uo;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Uo=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Uo=window.ActiveXObject)),!rn&&_c&&!Tr&&!Uo&&(rn=Nc||_c),typeof rn!="function"&&(rn=void 0);var ba=function(t,n){if(n&&xn(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},Ic=function(t,n,r,i){var a=function(h){if(!h.ok)return r(h.statusText||"Error",{status:h.status});h.text().then(function(v){r(null,{status:h.status,data:v})}).catch(r)};if(i){var s=i(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):rn(t,n).then(a).catch(r)},Ac=!1,qm=function(t,n,r,i){t.queryStringParams&&(n=ba(n,t.queryStringParams));var a=jc({},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&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,u=jc({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},Ac?{}:s),h=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Ic(n,u,i,h)}catch(v){if(!s||Object.keys(s).length===0||!v.message||v.message.indexOf("not implemented")<0)return i(v);try{Object.keys(s).forEach(function(m){delete u[m]}),Ic(n,u,i,h),Ac=!0}catch(m){i(m)}}},Km=function(t,n,r,i){r&&xn(r)==="object"&&(r=ba("",r).slice(1)),t.queryStringParams&&(n=ba(n,t.queryStringParams));try{var a;Tr?a=new Tr:a=new Uo("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(h){console&&console.log(h)}},Wm=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},rn&&n.indexOf("file:")!==0)return qm(t,n,r,i);if(Pc()||typeof ActiveXObject=="function")return Km(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 Rc(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 wa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rc(Object(n),!0).forEach(function(r){Dc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lc(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,Mc(r.key),r)}}function Ym(e,t,n){return t&&Lc(e.prototype,t),n&&Lc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dc(e,t,n){return t=Mc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mc(e){var t=Qm(e,"string");return jr(t)=="symbol"?t:String(t)}function Qm(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 Xm=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 Dc({},r,i||"")},parseLoadPayload:function(n,r){},request:Wm,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Fc=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]:{};Gm(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Ym(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n,this.options=wa(wa(wa({},Xm()),this.options||{}),i),this.allOptions=a,this.services&&this.options.reloadInterval&&setInterval(function(){return r.reload()},this.options.reloadInterval)}},{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,a,s){var u=this,h=this.options.loadPath;typeof this.options.loadPath=="function"&&(h=this.options.loadPath(n,i)),h=Fm(h),h.then(function(v){if(!v)return s(null,{});var m=u.services.interpolator.interpolate(v,{lng:n.join("+"),ns:i.join("+")});u.loadUrl(m,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this,u=typeof i=="string"?[i]:i,h=typeof a=="string"?[a]:a,v=this.options.parseLoadPayload(u,h);this.options.request(this.options,n,v,function(m,b){if(b&&(b.status>=500&&b.status<600||!b.status))return r("failed loading "+n+"; status code: "+b.status,!0);if(b&&b.status>=400&&b.status<500)return r("failed loading "+n+"; status code: "+b.status,!1);if(!b&&m&&m.message&&m.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+m.message,!0);if(m)return r(m,!1);var l,g;try{typeof b.data=="string"?l=s.options.parse(b.data,i,a):l=b.data}catch{g="failed parsing "+n+" to json"}if(g)return r(g,!1);r(null,l)})}},{key:"create",value:function(n,r,i,a,s){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var h=this.options.parsePayload(r,i,a),v=0,m=[],b=[];n.forEach(function(l){var g=u.options.addPath;typeof u.options.addPath=="function"&&(g=u.options.addPath(l,r));var o=u.services.interpolator.interpolate(g,{lng:l,ns:r});u.options.request(u.options,o,h,function(c,f){v+=1,m.push(c),b.push(f),v===n.length&&typeof s=="function"&&s(m,b)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,u=i.language;if(!(u&&u.toLowerCase()==="cimode")){var h=[],v=function(b){var l=a.toResolveHierarchy(b);l.forEach(function(g){h.indexOf(g)<0&&h.push(g)})};v(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(m){return v(m)}),h.forEach(function(m){n.allOptions.ns.forEach(function(b){i.read(m,b,"read",null,null,function(l,g){l&&s.warn("loading namespace ".concat(b," for language ").concat(m," failed"),l),!l&&g&&s.log("loaded namespace ".concat(b," for language ").concat(m),g),i.loaded("".concat(m,"|").concat(b),l,g)})})})}}}]),e}();Fc.type="backend";function Jm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ir(e){"@babel/helpers - typeof";return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(e)}function Zm(e,t){if(Ir(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ir(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eg(e){var t=Zm(e,"string");return Ir(t)=="symbol"?t:t+""}function Uc(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,eg(r.key),r)}}function tg(e,t,n){return t&&Uc(e.prototype,t),n&&Uc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var $c=[],ng=$c.forEach,rg=$c.slice;function og(e){return ng.call(rg.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e}var Vc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ig=function(t,n,r){var i=r||{};i.path=i.path||"/";var a=encodeURIComponent(n),s="".concat(t,"=").concat(a);if(i.maxAge>0){var u=i.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(u))}if(i.domain){if(!Vc.test(i.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(i.domain)}if(i.path){if(!Vc.test(i.path))throw new TypeError("option path is invalid");s+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite){var h=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(h){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},zc={create:function(t,n,r,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+r*60*1e3)),i&&(a.domain=i),document.cookie=ig(t,encodeURIComponent(n),a)},read:function(t){for(var n="".concat(t,"="),r=document.cookie.split(";"),i=0;i<r.length;i++){for(var a=r[i];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(n)===0)return a.substring(n.length,a.length)}return null},remove:function(t){this.create(t,"",-1)}},ag={name:"cookie",lookup:function(t){var n;if(t.lookupCookie&&typeof document<"u"){var r=zc.read(t.lookupCookie);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupCookie&&typeof document<"u"&&zc.create(n.lookupCookie,t,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},sg={name:"querystring",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=r.substring(1),a=i.split("&"),s=0;s<a.length;s++){var u=a[s].indexOf("=");if(u>0){var h=a[s].substring(0,u);h===t.lookupQuerystring&&(n=a[s].substring(u+1))}}}return n}},Ar=null,Hc=function(){if(Ar!==null)return Ar;try{Ar=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Ar=!1}return Ar},lg={name:"localStorage",lookup:function(t){var n;if(t.lookupLocalStorage&&Hc()){var r=window.localStorage.getItem(t.lookupLocalStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupLocalStorage&&Hc()&&window.localStorage.setItem(n.lookupLocalStorage,t)}},Rr=null,qc=function(){if(Rr!==null)return Rr;try{Rr=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Rr=!1}return Rr},cg={name:"sessionStorage",lookup:function(t){var n;if(t.lookupSessionStorage&&qc()){var r=window.sessionStorage.getItem(t.lookupSessionStorage);r&&(n=r)}return n},cacheUserLanguage:function(t,n){n.lookupSessionStorage&&qc()&&window.sessionStorage.setItem(n.lookupSessionStorage,t)}},ug={name:"navigator",lookup:function(t){var n=[];if(typeof navigator<"u"){if(navigator.languages)for(var r=0;r<navigator.languages.length;r++)n.push(navigator.languages[r]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},dg={name:"htmlTag",lookup:function(t){var n,r=t.htmlTag||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},fg={name:"path",lookup:function(t){var n;if(typeof window<"u"){var r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(r instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof r[t.lookupFromPathIndex]!="string")return;n=r[t.lookupFromPathIndex].replace("/","")}else n=r[0].replace("/","")}return n}},hg={name:"subdomain",lookup:function(t){var n=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,r=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};function pg(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var Kc=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Jm(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return tg(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=og(r,this.options||{},pg()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(a){return a.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(ag),this.addDetector(sg),this.addDetector(lg),this.addDetector(cg),this.addDetector(ug),this.addDetector(dg),this.addDetector(fg),this.addDetector(hg)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var r=this;n||(n=this.options.order);var i=[];return n.forEach(function(a){if(r.detectors[a]){var s=r.detectors[a].lookup(r.options);s&&typeof s=="string"&&(s=[s]),s&&(i=i.concat(s))}}),i=i.map(function(a){return r.options.convertDetectedLanguage(a)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(n,r){var i=this;r||(r=this.options.caches),r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||r.forEach(function(a){i.detectors[a]&&i.detectors[a].cacheUserLanguage(n,i.options)}))}}]),e}();Kc.type="languageDetector",ft.use(Fc).use(Kc).use(Jh).init({fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});const Tv="";function mg({children:e,config:t,payload:n}){const[r,i]=z.useState("");return z.useEffect(()=>{r||(it.initialize(t.apiKey,t.host),(async()=>{const a=await vo.create(n);i(a.data.data.uuid)})())},[t,n,r]),r?C.jsxs(z.StrictMode,{children:[C.jsx(al,{...t,sessionUuid:r,children:C.jsxs("div",{className:"flex h-screen w-screen bg-primary-50",children:[r&&C.jsx(pl,{}),e]})}),C.jsx(cs,{position:"bottom-center"})]}):C.jsx(C.Fragment,{children:"Loading..."})}/**
71
+ * @remix-run/router v1.16.0
72
+ *
73
+ * Copyright (c) Remix Software Inc.
74
+ *
75
+ * This source code is licensed under the MIT license found in the
76
+ * LICENSE.md file in the root directory of this source tree.
77
+ *
78
+ * @license MIT
79
+ */function Ze(){return Ze=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ze.apply(this,arguments)}var rt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(rt||(rt={}));function gg(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((g,o)=>m(g,typeof g=="string"?null:g.state,o===0?"default":void 0));let a=h(n??i.length-1),s=rt.Pop,u=null;function h(g){return Math.min(Math.max(g,0),i.length-1)}function v(){return i[a]}function m(g,o,c){o===void 0&&(o=null);let f=xa(i?v().pathname:"/",g,o,c);return at(f.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(g)),f}function b(g){return typeof g=="string"?g:kn(g)}return{get index(){return a},get action(){return s},get location(){return v()},createHref:b,createURL(g){return new URL(b(g),"http://localhost")},encodeLocation(g){let o=typeof g=="string"?Xt(g):g;return{pathname:o.pathname||"",search:o.search||"",hash:o.hash||""}},push(g,o){s=rt.Push;let c=m(g,o);a+=1,i.splice(a,i.length,c),r&&u&&u({action:s,location:c,delta:1})},replace(g,o){s=rt.Replace;let c=m(g,o);i[a]=c,r&&u&&u({action:s,location:c,delta:0})},go(g){s=rt.Pop;let o=h(a+g),c=i[o];a=o,u&&u({action:s,location:c,delta:g})},listen(g){return u=g,()=>{u=null}}}}function xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function at(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yg(){return Math.random().toString(36).substr(2,8)}function xa(e,t,n,r){return n===void 0&&(n=null),Ze({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Xt(t):t,{state:n,key:t&&t.key||r||yg()})}function kn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Xt(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Qe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qe||(Qe={}));const vg=new Set(["lazy","caseSensitive","path","id","index","children"]);function bg(e){return e.index===!0}function ka(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,a)=>{let s=[...n,a],u=typeof i.id=="string"?i.id:s.join("-");if(xe(i.index!==!0||!i.children,"Cannot specify children on an index route"),xe(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),bg(i)){let h=Ze({},i,t(i),{id:u});return r[u]=h,h}else{let h=Ze({},i,t(i),{id:u,children:void 0});return r[u]=h,i.children&&(h.children=ka(i.children,t,s,r)),h}})}function Fn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Xt(t):t,i=Ft(r.pathname||"/",n);if(i==null)return null;let a=Wc(e);xg(a);let s=null;for(let u=0;s==null&&u<a.length;++u){let h=jg(i);s=_g(a[u],h)}return s}function wg(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Wc(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,s,u)=>{let h={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};h.relativePath.startsWith("/")&&(xe(h.relativePath.startsWith(r),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(r.length));let v=Jt([r,h.relativePath]),m=n.concat(h);a.children&&a.children.length>0&&(xe(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+v+'".')),Wc(a.children,t,m,v)),!(a.path==null&&!a.index)&&t.push({path:v,score:Og(v,a.index),routesMeta:m})};return e.forEach((a,s)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))i(a,s);else for(let h of Gc(a.path))i(a,s,h)}),t}function Gc(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=Gc(r.join("/")),u=[];return u.push(...s.map(h=>h===""?a:[a,h].join("/"))),i&&u.push(...s),u.map(h=>e.startsWith("/")&&h===""?"/":h)}function xg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ng(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const kg=/^:[\w-]+$/,Cg=3,Eg=2,Sg=1,Pg=10,Bg=-2,Yc=e=>e==="*";function Og(e,t){let n=e.split("/"),r=n.length;return n.some(Yc)&&(r+=Bg),t&&(r+=Eg),n.filter(i=>!Yc(i)).reduce((i,a)=>i+(kg.test(a)?Cg:a===""?Sg:Pg),r)}function Ng(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function _g(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let s=0;s<n.length;++s){let u=n[s],h=s===n.length-1,v=i==="/"?t:t.slice(i.length)||"/",m=Ca({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},v);if(!m)return null;Object.assign(r,m.params);let b=u.route;a.push({params:r,pathname:Jt([i,m.pathname]),pathnameBase:Rg(Jt([i,m.pathnameBase])),route:b}),m.pathnameBase!=="/"&&(i=Jt([i,m.pathnameBase]))}return a}function Ca(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Tg(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),u=i.slice(1);return{params:r.reduce((v,m,b)=>{let{paramName:l,isOptional:g}=m;if(l==="*"){let c=u[b]||"";s=a.slice(0,a.length-c.length).replace(/(.)\/+$/,"$1")}const o=u[b];return g&&!o?v[l]=void 0:v[l]=(o||"").replace(/%2F/g,"/"),v},{}),pathname:a,pathnameBase:s,pattern:e}}function Tg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),at(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,h)=>(r.push({paramName:u,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function jg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return at(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ft(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Ig(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Xt(e):e;return{pathname:n?n.startsWith("/")?n:Ag(n,t):t,search:Lg(r),hash:Dg(i)}}function Ag(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ea(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Qc(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Sa(e,t){let n=Qc(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Pa(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Xt(e):(i=Ze({},e),xe(!i.pathname||!i.pathname.includes("?"),Ea("?","pathname","search",i)),xe(!i.pathname||!i.pathname.includes("#"),Ea("#","pathname","hash",i)),xe(!i.search||!i.search.includes("#"),Ea("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,u;if(s==null)u=n;else{let b=t.length-1;if(!r&&s.startsWith("..")){let l=s.split("/");for(;l[0]==="..";)l.shift(),b-=1;i.pathname=l.join("/")}u=b>=0?t[b]:"/"}let h=Ig(i,u),v=s&&s!=="/"&&s.endsWith("/"),m=(a||s===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(v||m)&&(h.pathname+="/"),h}const Jt=e=>e.join("/").replace(/\/\/+/g,"/"),Rg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Dg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Xc{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ba(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Jc=["post","put","patch","delete"],Mg=new Set(Jc),Fg=["get",...Jc],Ug=new Set(Fg),$g=new Set([301,302,303,307,308]),Vg=new Set([307,308]),Oa={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},zg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Lr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Na=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Zc="remix-router-transitions";function qg(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;xe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;i=H=>({hasErrorBoundary:A(H)})}else i=Hg;let a={},s=ka(e.routes,i,void 0,a),u,h=e.basename||"/",v=e.unstable_dataStrategy||Yg,m=Ze({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),b=null,l=new Set,g=null,o=null,c=null,f=e.hydrationData!=null,d=Fn(s,e.history.location,h),p=null;if(d==null){let A=Tt(404,{pathname:e.history.location.pathname}),{matches:H,route:X}=uu(s);d=H,p={[X.id]:A}}let y,x=d.some(A=>A.route.lazy),E=d.some(A=>A.route.loader);if(x)y=!1;else if(!E)y=!0;else if(m.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null,X=ie=>ie.route.loader?typeof ie.route.loader=="function"&&ie.route.loader.hydrate===!0?!1:A&&A[ie.route.id]!==void 0||H&&H[ie.route.id]!==void 0:!0;if(H){let ie=d.findIndex(pe=>H[pe.route.id]!==void 0);y=d.slice(0,ie+1).every(X)}else y=d.every(X)}else y=e.hydrationData!=null;let S,k={historyAction:e.history.action,location:e.history.location,matches:d,initialized:y,navigation:Oa,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||p,fetchers:new Map,blockers:new Map},B=rt.Pop,O=!1,I,L=!1,D=new Map,M=null,$=!1,P=!1,R=[],q=[],K=new Map,J=0,Z=-1,ee=new Map,ue=new Set,te=new Map,ge=new Map,de=new Set,V=new Map,U=new Map,Q=!1;function w(){if(b=e.history.listen(A=>{let{action:H,location:X,delta:ie}=A;if(Q){Q=!1;return}at(U.size===0||ie!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let pe=Ht({currentLocation:k.location,nextLocation:X,historyAction:H});if(pe&&ie!=null){Q=!0,e.history.go(ie*-1),ut(pe,{state:"blocked",location:X,proceed(){ut(pe,{state:"proceeding",proceed:void 0,reset:void 0,location:X}),e.history.go(ie)},reset(){let Se=new Map(k.blockers);Se.set(pe,Lr),T({blockers:Se})}});return}return F(H,X)}),n){sy(t,D);let A=()=>ly(t,D);t.addEventListener("pagehide",A),M=()=>t.removeEventListener("pagehide",A)}return k.initialized||F(rt.Pop,k.location,{initialHydration:!0}),S}function _(){b&&b(),M&&M(),l.clear(),I&&I.abort(),k.fetchers.forEach((A,H)=>bt(H)),k.blockers.forEach((A,H)=>mt(H))}function j(A){return l.add(A),()=>l.delete(A)}function T(A,H){H===void 0&&(H={}),k=Ze({},k,A);let X=[],ie=[];m.v7_fetcherPersist&&k.fetchers.forEach((pe,Se)=>{pe.state==="idle"&&(de.has(Se)?ie.push(Se):X.push(Se))}),[...l].forEach(pe=>pe(k,{deletedFetchers:ie,unstable_viewTransitionOpts:H.viewTransitionOpts,unstable_flushSync:H.flushSync===!0})),m.v7_fetcherPersist&&(X.forEach(pe=>k.fetchers.delete(pe)),ie.forEach(pe=>bt(pe)))}function W(A,H,X){var ie,pe;let{flushSync:Se}=X===void 0?{}:X,we=k.actionData!=null&&k.navigation.formMethod!=null&&Ut(k.navigation.formMethod)&&k.navigation.state==="loading"&&((ie=A.state)==null?void 0:ie._isRedirect)!==!0,ve;H.actionData?Object.keys(H.actionData).length>0?ve=H.actionData:ve=null:we?ve=k.actionData:ve=null;let Oe=H.loaderData?lu(k.loaderData,H.loaderData,H.matches||[],H.errors):k.loaderData,Pe=k.blockers;Pe.size>0&&(Pe=new Map(Pe),Pe.forEach((N,ne)=>Pe.set(ne,Lr)));let lt=O===!0||k.navigation.formMethod!=null&&Ut(k.navigation.formMethod)&&((pe=A.state)==null?void 0:pe._isRedirect)!==!0;u&&(s=u,u=void 0),$||B===rt.Pop||(B===rt.Push?e.history.push(A,A.state):B===rt.Replace&&e.history.replace(A,A.state));let ct;if(B===rt.Pop){let N=D.get(k.location.pathname);N&&N.has(A.pathname)?ct={currentLocation:k.location,nextLocation:A}:D.has(A.pathname)&&(ct={currentLocation:A,nextLocation:k.location})}else if(L){let N=D.get(k.location.pathname);N?N.add(A.pathname):(N=new Set([A.pathname]),D.set(k.location.pathname,N)),ct={currentLocation:k.location,nextLocation:A}}T(Ze({},H,{actionData:ve,loaderData:Oe,historyAction:B,location:A,initialized:!0,navigation:Oa,revalidation:"idle",restoreScrollPosition:on(A,H.matches||k.matches),preventScrollReset:lt,blockers:Pe}),{viewTransitionOpts:ct,flushSync:Se===!0}),B=rt.Pop,O=!1,L=!1,$=!1,P=!1,R=[],q=[]}async function G(A,H){if(typeof A=="number"){e.history.go(A);return}let X=_a(k.location,k.matches,h,m.v7_prependBasename,A,m.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:ie,submission:pe,error:Se}=eu(m.v7_normalizeFormMethod,!1,X,H),we=k.location,ve=xa(k.location,ie,H&&H.state);ve=Ze({},ve,e.history.encodeLocation(ve));let Oe=H&&H.replace!=null?H.replace:void 0,Pe=rt.Push;Oe===!0?Pe=rt.Replace:Oe===!1||pe!=null&&Ut(pe.formMethod)&&pe.formAction===k.location.pathname+k.location.search&&(Pe=rt.Replace);let lt=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,ct=(H&&H.unstable_flushSync)===!0,N=Ht({currentLocation:we,nextLocation:ve,historyAction:Pe});if(N){ut(N,{state:"blocked",location:ve,proceed(){ut(N,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),G(A,H)},reset(){let ne=new Map(k.blockers);ne.set(N,Lr),T({blockers:ne})}});return}return await F(Pe,ve,{submission:pe,pendingError:Se,preventScrollReset:lt,replace:H&&H.replace,enableViewTransition:H&&H.unstable_viewTransition,flushSync:ct})}function Y(){if(De(),T({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){F(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}F(B||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}}async function F(A,H,X){I&&I.abort(),I=null,B=A,$=(X&&X.startUninterruptedRevalidation)===!0,wt(k.location,k.matches),O=(X&&X.preventScrollReset)===!0,L=(X&&X.enableViewTransition)===!0;let ie=u||s,pe=X&&X.overrideNavigation,Se=Fn(ie,H,h),we=(X&&X.flushSync)===!0;if(!Se){let N=Tt(404,{pathname:H.pathname}),{matches:ne,route:he}=uu(ie);gt(),W(H,{matches:ne,loaderData:{},errors:{[he.id]:N}},{flushSync:we});return}if(k.initialized&&!P&&ty(k.location,H)&&!(X&&X.submission&&Ut(X.submission.formMethod))){W(H,{matches:Se},{flushSync:we});return}I=new AbortController;let ve=Un(e.history,H,I.signal,X&&X.submission),Oe;if(X&&X.pendingError)Oe=[Dr(Se).route.id,{type:Qe.error,error:X.pendingError}];else if(X&&X.submission&&Ut(X.submission.formMethod)){let N=await ce(ve,H,X.submission,Se,{replace:X.replace,flushSync:we});if(N.shortCircuited)return;Oe=N.pendingActionResult,pe=Aa(H,X.submission),we=!1,ve=Un(e.history,ve.url,ve.signal)}let{shortCircuited:Pe,loaderData:lt,errors:ct}=await fe(ve,H,Se,pe,X&&X.submission,X&&X.fetcherSubmission,X&&X.replace,X&&X.initialHydration===!0,we,Oe);Pe||(I=null,W(H,Ze({matches:Se},cu(Oe),{loaderData:lt,errors:ct})))}async function ce(A,H,X,ie,pe){pe===void 0&&(pe={}),De();let Se=iy(H,X);T({navigation:Se},{flushSync:pe.flushSync===!0});let we,ve=Ia(ie,H);if(!ve.route.action&&!ve.route.lazy)we={type:Qe.error,error:Tt(405,{method:A.method,pathname:H.pathname,routeId:ve.route.id})};else if(we=(await be("action",A,[ve],ie))[0],A.signal.aborted)return{shortCircuited:!0};if(En(we)){let Oe;return pe&&pe.replace!=null?Oe=pe.replace:Oe=iu(we.response.headers.get("Location"),new URL(A.url),h)===k.location.pathname+k.location.search,await ae(A,we,{submission:X,replace:Oe}),{shortCircuited:!0}}if(Cn(we))throw Tt(400,{type:"defer-action"});if(jt(we)){let Oe=Dr(ie,ve.route.id);return(pe&&pe.replace)!==!0&&(B=rt.Push),{pendingActionResult:[Oe.route.id,we]}}return{pendingActionResult:[ve.route.id,we]}}async function fe(A,H,X,ie,pe,Se,we,ve,Oe,Pe){let lt=ie||Aa(H,pe),ct=pe||Se||gu(lt),N=u||s,[ne,he]=tu(e.history,k,X,ct,H,m.v7_partialHydration&&ve===!0,m.unstable_skipActionErrorRevalidation,P,R,q,de,te,ue,N,h,Pe);if(gt(Te=>!(X&&X.some(dt=>dt.route.id===Te))||ne&&ne.some(dt=>dt.route.id===Te)),Z=++J,ne.length===0&&he.length===0){let Te=Ee();return W(H,Ze({matches:X,loaderData:{},errors:Pe&&jt(Pe[1])?{[Pe[0]]:Pe[1].error}:null},cu(Pe),Te?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Oe}),{shortCircuited:!0}}if(!$&&(!m.v7_partialHydration||!ve)){he.forEach(dt=>{let et=k.fetchers.get(dt.key),pt=Mr(void 0,et?et.data:void 0);k.fetchers.set(dt.key,pt)});let Te;Pe&&!jt(Pe[1])?Te={[Pe[0]]:Pe[1].data}:k.actionData&&(Object.keys(k.actionData).length===0?Te=null:Te=k.actionData),T(Ze({navigation:lt},Te!==void 0?{actionData:Te}:{},he.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Oe})}he.forEach(Te=>{K.has(Te.key)&&Je(Te.key),Te.controller&&K.set(Te.key,Te.controller)});let Ce=()=>he.forEach(Te=>Je(Te.key));I&&I.signal.addEventListener("abort",Ce);let{loaderResults:Ie,fetcherResults:Fe}=await ke(k.matches,X,ne,he,A);if(A.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",Ce),he.forEach(Te=>K.delete(Te.key));let _e=du([...Ie,...Fe]);if(_e){if(_e.idx>=ne.length){let Te=he[_e.idx-ne.length].key;ue.add(Te)}return await ae(A,_e.result,{replace:we}),{shortCircuited:!0}}let{loaderData:Ne,errors:We}=su(k,X,ne,Ie,Pe,he,Fe,V);V.forEach((Te,dt)=>{Te.subscribe(et=>{(et||Te.done)&&V.delete(dt)})}),m.v7_partialHydration&&ve&&k.errors&&Object.entries(k.errors).filter(Te=>{let[dt]=Te;return!ne.some(et=>et.route.id===dt)}).forEach(Te=>{let[dt,et]=Te;We=Object.assign(We||{},{[dt]:et})});let Ge=Ee(),Ye=At(Z),ht=Ge||Ye||he.length>0;return Ze({loaderData:Ne,errors:We},ht?{fetchers:new Map(k.fetchers)}:{})}function re(A,H,X,ie){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");K.has(A)&&Je(A);let pe=(ie&&ie.unstable_flushSync)===!0,Se=u||s,we=_a(k.location,k.matches,h,m.v7_prependBasename,X,m.v7_relativeSplatPath,H,ie==null?void 0:ie.relative),ve=Fn(Se,we,h);if(!ve){$e(A,H,Tt(404,{pathname:we}),{flushSync:pe});return}let{path:Oe,submission:Pe,error:lt}=eu(m.v7_normalizeFormMethod,!0,we,ie);if(lt){$e(A,H,lt,{flushSync:pe});return}let ct=Ia(ve,Oe);if(O=(ie&&ie.preventScrollReset)===!0,Pe&&Ut(Pe.formMethod)){oe(A,H,Oe,ct,ve,pe,Pe);return}te.set(A,{routeId:H,path:Oe}),ye(A,H,Oe,ct,ve,pe,Pe)}async function oe(A,H,X,ie,pe,Se,we){if(De(),te.delete(A),!ie.route.action&&!ie.route.lazy){let pt=Tt(405,{method:we.formMethod,pathname:X,routeId:H});$e(A,H,pt,{flushSync:Se});return}let ve=k.fetchers.get(A);je(A,ay(we,ve),{flushSync:Se});let Oe=new AbortController,Pe=Un(e.history,X,Oe.signal,we);K.set(A,Oe);let lt=J,N=(await be("action",Pe,[ie],pe))[0];if(Pe.signal.aborted){K.get(A)===Oe&&K.delete(A);return}if(m.v7_fetcherPersist&&de.has(A)){if(En(N)||jt(N)){je(A,mn(void 0));return}}else{if(En(N))if(K.delete(A),Z>lt){je(A,mn(void 0));return}else return ue.add(A),je(A,Mr(we)),ae(Pe,N,{fetcherSubmission:we});if(jt(N)){$e(A,H,N.error);return}}if(Cn(N))throw Tt(400,{type:"defer-action"});let ne=k.navigation.location||k.location,he=Un(e.history,ne,Oe.signal),Ce=u||s,Ie=k.navigation.state!=="idle"?Fn(Ce,k.navigation.location,h):k.matches;xe(Ie,"Didn't find any matches after fetcher action");let Fe=++J;ee.set(A,Fe);let _e=Mr(we,N.data);k.fetchers.set(A,_e);let[Ne,We]=tu(e.history,k,Ie,we,ne,!1,m.unstable_skipActionErrorRevalidation,P,R,q,de,te,ue,Ce,h,[ie.route.id,N]);We.filter(pt=>pt.key!==A).forEach(pt=>{let Hr=pt.key,Vu=k.fetchers.get(Hr),yv=Mr(void 0,Vu?Vu.data:void 0);k.fetchers.set(Hr,yv),K.has(Hr)&&Je(Hr),pt.controller&&K.set(Hr,pt.controller)}),T({fetchers:new Map(k.fetchers)});let Ge=()=>We.forEach(pt=>Je(pt.key));Oe.signal.addEventListener("abort",Ge);let{loaderResults:Ye,fetcherResults:ht}=await ke(k.matches,Ie,Ne,We,he);if(Oe.signal.aborted)return;Oe.signal.removeEventListener("abort",Ge),ee.delete(A),K.delete(A),We.forEach(pt=>K.delete(pt.key));let Te=du([...Ye,...ht]);if(Te){if(Te.idx>=Ne.length){let pt=We[Te.idx-Ne.length].key;ue.add(pt)}return ae(he,Te.result)}let{loaderData:dt,errors:et}=su(k,k.matches,Ne,Ye,void 0,We,ht,V);if(k.fetchers.has(A)){let pt=mn(N.data);k.fetchers.set(A,pt)}At(Fe),k.navigation.state==="loading"&&Fe>Z?(xe(B,"Expected pending action"),I&&I.abort(),W(k.navigation.location,{matches:Ie,loaderData:dt,errors:et,fetchers:new Map(k.fetchers)})):(T({errors:et,loaderData:lu(k.loaderData,dt,Ie,et),fetchers:new Map(k.fetchers)}),P=!1)}async function ye(A,H,X,ie,pe,Se,we){let ve=k.fetchers.get(A);je(A,Mr(we,ve?ve.data:void 0),{flushSync:Se});let Oe=new AbortController,Pe=Un(e.history,X,Oe.signal);K.set(A,Oe);let lt=J,N=(await be("loader",Pe,[ie],pe))[0];if(Cn(N)&&(N=await mu(N,Pe.signal,!0)||N),K.get(A)===Oe&&K.delete(A),!Pe.signal.aborted){if(de.has(A)){je(A,mn(void 0));return}if(En(N))if(Z>lt){je(A,mn(void 0));return}else{ue.add(A),await ae(Pe,N);return}if(jt(N)){$e(A,H,N.error);return}xe(!Cn(N),"Unhandled fetcher deferred data"),je(A,mn(N.data))}}async function ae(A,H,X){let{submission:ie,fetcherSubmission:pe,replace:Se}=X===void 0?{}:X;H.response.headers.has("X-Remix-Revalidate")&&(P=!0);let we=H.response.headers.get("Location");xe(we,"Expected a Location header on the redirect Response"),we=iu(we,new URL(A.url),h);let ve=xa(k.location,we,{_isRedirect:!0});if(n){let ne=!1;if(H.response.headers.has("X-Remix-Reload-Document"))ne=!0;else if(Na.test(we)){const he=e.history.createURL(we);ne=he.origin!==t.location.origin||Ft(he.pathname,h)==null}if(ne){Se?t.location.replace(we):t.location.assign(we);return}}I=null;let Oe=Se===!0?rt.Replace:rt.Push,{formMethod:Pe,formAction:lt,formEncType:ct}=k.navigation;!ie&&!pe&&Pe&&lt&&ct&&(ie=gu(k.navigation));let N=ie||pe;if(Vg.has(H.response.status)&&N&&Ut(N.formMethod))await F(Oe,ve,{submission:Ze({},N,{formAction:we}),preventScrollReset:O});else{let ne=Aa(ve,ie);await F(Oe,ve,{overrideNavigation:ne,fetcherSubmission:pe,preventScrollReset:O})}}async function be(A,H,X,ie){try{let pe=await Qg(v,A,H,X,ie,a,i);return await Promise.all(pe.map((Se,we)=>{if(ny(Se)){let ve=Se.result;return{type:Qe.redirect,response:Zg(ve,H,X[we].route.id,ie,h,m.v7_relativeSplatPath)}}return Jg(Se)}))}catch(pe){return X.map(()=>({type:Qe.error,error:pe}))}}async function ke(A,H,X,ie,pe){let[Se,...we]=await Promise.all([X.length?be("loader",pe,X,H):[],...ie.map(ve=>{if(ve.matches&&ve.match&&ve.controller){let Oe=Un(e.history,ve.path,ve.controller.signal);return be("loader",Oe,[ve.match],ve.matches).then(Pe=>Pe[0])}else return Promise.resolve({type:Qe.error,error:Tt(404,{pathname:ve.path})})})]);return await Promise.all([pu(A,X,Se,Se.map(()=>pe.signal),!1,k.loaderData),pu(A,ie.map(ve=>ve.match),we,ie.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{loaderResults:Se,fetcherResults:we}}function De(){P=!0,R.push(...gt()),te.forEach((A,H)=>{K.has(H)&&(q.push(H),Je(H))})}function je(A,H,X){X===void 0&&(X={}),k.fetchers.set(A,H),T({fetchers:new Map(k.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function $e(A,H,X,ie){ie===void 0&&(ie={});let pe=Dr(k.matches,H);bt(A),T({errors:{[pe.route.id]:X},fetchers:new Map(k.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function Ve(A){return m.v7_fetcherPersist&&(ge.set(A,(ge.get(A)||0)+1),de.has(A)&&de.delete(A)),k.fetchers.get(A)||zg}function bt(A){let H=k.fetchers.get(A);K.has(A)&&!(H&&H.state==="loading"&&ee.has(A))&&Je(A),te.delete(A),ee.delete(A),ue.delete(A),de.delete(A),k.fetchers.delete(A)}function ze(A){if(m.v7_fetcherPersist){let H=(ge.get(A)||0)-1;H<=0?(ge.delete(A),de.add(A)):ge.set(A,H)}else bt(A);T({fetchers:new Map(k.fetchers)})}function Je(A){let H=K.get(A);xe(H,"Expected fetch controller: "+A),H.abort(),K.delete(A)}function Ke(A){for(let H of A){let X=Ve(H),ie=mn(X.data);k.fetchers.set(H,ie)}}function Ee(){let A=[],H=!1;for(let X of ue){let ie=k.fetchers.get(X);xe(ie,"Expected fetcher: "+X),ie.state==="loading"&&(ue.delete(X),A.push(X),H=!0)}return Ke(A),H}function At(A){let H=[];for(let[X,ie]of ee)if(ie<A){let pe=k.fetchers.get(X);xe(pe,"Expected fetcher: "+X),pe.state==="loading"&&(Je(X),ee.delete(X),H.push(X))}return Ke(H),H.length>0}function st(A,H){let X=k.blockers.get(A)||Lr;return U.get(A)!==H&&U.set(A,H),X}function mt(A){k.blockers.delete(A),U.delete(A)}function ut(A,H){let X=k.blockers.get(A)||Lr;xe(X.state==="unblocked"&&H.state==="blocked"||X.state==="blocked"&&H.state==="blocked"||X.state==="blocked"&&H.state==="proceeding"||X.state==="blocked"&&H.state==="unblocked"||X.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+X.state+" -> "+H.state);let ie=new Map(k.blockers);ie.set(A,H),T({blockers:ie})}function Ht(A){let{currentLocation:H,nextLocation:X,historyAction:ie}=A;if(U.size===0)return;U.size>1&&at(!1,"A router only supports one blocker at a time");let pe=Array.from(U.entries()),[Se,we]=pe[pe.length-1],ve=k.blockers.get(Se);if(!(ve&&ve.state==="proceeding")&&we({currentLocation:H,nextLocation:X,historyAction:ie}))return Se}function gt(A){let H=[];return V.forEach((X,ie)=>{(!A||A(ie))&&(X.cancel(),H.push(ie),V.delete(ie))}),H}function Pt(A,H,X){if(g=A,c=H,o=X||null,!f&&k.navigation===Oa){f=!0;let ie=on(k.location,k.matches);ie!=null&&T({restoreScrollPosition:ie})}return()=>{g=null,c=null,o=null}}function yt(A,H){return o&&o(A,H.map(ie=>wg(ie,k.loaderData)))||A.key}function wt(A,H){if(g&&c){let X=yt(A,H);g[X]=c()}}function on(A,H){if(g){let X=yt(A,H),ie=g[X];if(typeof ie=="number")return ie}return null}function Sn(A){a={},u=ka(A,i,void 0,a)}return S={get basename(){return h},get future(){return m},get state(){return k},get routes(){return s},get window(){return t},initialize:w,subscribe:j,enableScrollRestoration:Pt,navigate:G,fetch:re,revalidate:Y,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:Ve,deleteFetcher:ze,dispose:_,getBlocker:st,deleteBlocker:mt,_internalFetchControllers:K,_internalActiveDeferreds:V,_internalSetRoutes:Sn},S}function Kg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function _a(e,t,n,r,i,a,s,u){let h,v;if(s){h=[];for(let b of t)if(h.push(b),b.route.id===s){v=b;break}}else h=t,v=t[t.length-1];let m=Pa(i||".",Sa(h,a),Ft(e.pathname,n)||e.pathname,u==="path");return i==null&&(m.search=e.search,m.hash=e.hash),(i==null||i===""||i===".")&&v&&v.route.index&&!ja(m.search)&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(m.pathname=m.pathname==="/"?n:Jt([n,m.pathname])),kn(m)}function eu(e,t,n,r){if(!r||!Kg(r))return{path:n};if(r.formMethod&&!oy(r.formMethod))return{path:n,error:Tt(405,{method:r.formMethod})};let i=()=>({path:n,error:Tt(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),u=fu(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ut(s))return i();let l=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,o)=>{let[c,f]=o;return""+g+c+"="+f+`
80
+ `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:l}}}else if(r.formEncType==="application/json"){if(!Ut(s))return i();try{let l=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:l,text:void 0}}}catch{return i()}}}xe(typeof FormData=="function","FormData is not available in this environment");let h,v;if(r.formData)h=Ta(r.formData),v=r.formData;else if(r.body instanceof FormData)h=Ta(r.body),v=r.body;else if(r.body instanceof URLSearchParams)h=r.body,v=au(h);else if(r.body==null)h=new URLSearchParams,v=new FormData;else try{h=new URLSearchParams(r.body),v=au(h)}catch{return i()}let m={formMethod:s,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:v,json:void 0,text:void 0};if(Ut(m.formMethod))return{path:n,submission:m};let b=Xt(n);return t&&b.search&&ja(b.search)&&h.append("index",""),b.search="?"+h,{path:kn(b),submission:m}}function Wg(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function tu(e,t,n,r,i,a,s,u,h,v,m,b,l,g,o,c){let f=c?jt(c[1])?c[1].error:c[1].data:void 0,d=e.createURL(t.location),p=e.createURL(i),y=c&&jt(c[1])?c[0]:void 0,x=y?Wg(n,y):n,E=c?c[1].statusCode:void 0,S=s&&E&&E>=400,k=x.filter((O,I)=>{let{route:L}=O;if(L.lazy)return!0;if(L.loader==null)return!1;if(a)return typeof L.loader!="function"||L.loader.hydrate?!0:t.loaderData[L.id]===void 0&&(!t.errors||t.errors[L.id]===void 0);if(Gg(t.loaderData,t.matches[I],O)||h.some($=>$===O.route.id))return!0;let D=t.matches[I],M=O;return ru(O,Ze({currentUrl:d,currentParams:D.params,nextUrl:p,nextParams:M.params},r,{actionResult:f,unstable_actionStatus:E,defaultShouldRevalidate:S?!1:u||d.pathname+d.search===p.pathname+p.search||d.search!==p.search||nu(D,M)}))}),B=[];return b.forEach((O,I)=>{if(a||!n.some(P=>P.route.id===O.routeId)||m.has(I))return;let L=Fn(g,O.path,o);if(!L){B.push({key:I,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(I),M=Ia(L,O.path),$=!1;l.has(I)?$=!1:v.includes(I)?$=!0:D&&D.state!=="idle"&&D.data===void 0?$=u:$=ru(M,Ze({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:p,nextParams:n[n.length-1].params},r,{actionResult:f,unstable_actionStatus:E,defaultShouldRevalidate:S?!1:u})),$&&B.push({key:I,routeId:O.routeId,path:O.path,matches:L,match:M,controller:new AbortController})}),[k,B]}function Gg(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function nu(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ru(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function ou(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];xe(i,"No route found in manifest");let a={};for(let s in r){let h=i[s]!==void 0&&s!=="hasErrorBoundary";at(!h,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!h&&!vg.has(s)&&(a[s]=r[s])}Object.assign(i,a),Object.assign(i,Ze({},t(i),{lazy:void 0}))}function Yg(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function Qg(e,t,n,r,i,a,s,u){let h=r.reduce((b,l)=>b.add(l.route.id),new Set),v=new Set,m=await e({matches:i.map(b=>{let l=h.has(b.route.id);return Ze({},b,{shouldLoad:l,resolve:o=>(v.add(b.route.id),l?Xg(t,n,b,a,s,o,u):Promise.resolve({type:Qe.data,result:void 0}))})}),request:n,params:i[0].params,context:u});return i.forEach(b=>xe(v.has(b.route.id),'`match.resolve()` was not called for route id "'+b.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),m.filter((b,l)=>h.has(i[l].route.id))}async function Xg(e,t,n,r,i,a,s){let u,h,v=m=>{let b,l=new Promise((c,f)=>b=f);h=()=>b(),t.signal.addEventListener("abort",h);let g=c=>typeof m!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):m({request:t,params:n.params,context:s},...c!==void 0?[c]:[]),o;return a?o=a(c=>g(c)):o=(async()=>{try{return{type:"data",result:await g()}}catch(c){return{type:"error",result:c}}})(),Promise.race([o,l])};try{let m=n.route[e];if(n.route.lazy)if(m){let b,[l]=await Promise.all([v(m).catch(g=>{b=g}),ou(n.route,i,r)]);if(b!==void 0)throw b;u=l}else if(await ou(n.route,i,r),m=n.route[e],m)u=await v(m);else if(e==="action"){let b=new URL(t.url),l=b.pathname+b.search;throw Tt(405,{method:t.method,pathname:l,routeId:n.route.id})}else return{type:Qe.data,result:void 0};else if(m)u=await v(m);else{let b=new URL(t.url),l=b.pathname+b.search;throw Tt(404,{pathname:l})}xe(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(m){return{type:Qe.error,result:m}}finally{h&&t.signal.removeEventListener("abort",h)}return u}async function Jg(e){let{result:t,type:n,status:r}=e;if(hu(t)){let s;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(u){return{type:Qe.error,error:u}}return n===Qe.error?{type:Qe.error,error:new Xc(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:Qe.data,data:s,statusCode:t.status,headers:t.headers}}if(n===Qe.error)return{type:Qe.error,error:t,statusCode:Ba(t)?t.status:r};if(ry(t)){var i,a;return{type:Qe.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}return{type:Qe.data,data:t,statusCode:r}}function Zg(e,t,n,r,i,a){let s=e.headers.get("Location");if(xe(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Na.test(s)){let u=r.slice(0,r.findIndex(h=>h.route.id===n)+1);s=_a(new URL(t.url),u,i,!0,s,a),e.headers.set("Location",s)}return e}function iu(e,t,n){if(Na.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Ft(i.pathname,n)!=null;if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}return e}function Un(e,t,n,r){let i=e.createURL(fu(t)).toString(),a={signal:n};if(r&&Ut(r.formMethod)){let{formMethod:s,formEncType:u}=r;a.method=s.toUpperCase(),u==="application/json"?(a.headers=new Headers({"Content-Type":u}),a.body=JSON.stringify(r.json)):u==="text/plain"?a.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?a.body=Ta(r.formData):a.body=r.formData}return new Request(i,a)}function Ta(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function au(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function ey(e,t,n,r,i,a){let s={},u=null,h,v=!1,m={},b=r&&jt(r[1])?r[1].error:void 0;return n.forEach((l,g)=>{let o=t[g].route.id;if(xe(!En(l),"Cannot handle redirect results in processLoaderData"),jt(l)){let c=l.error;if(b!==void 0&&(c=b,b=void 0),u=u||{},a)u[o]=c;else{let f=Dr(e,o);u[f.route.id]==null&&(u[f.route.id]=c)}s[o]=void 0,v||(v=!0,h=Ba(l.error)?l.error.status:500),l.headers&&(m[o]=l.headers)}else Cn(l)?(i.set(o,l.deferredData),s[o]=l.deferredData.data,l.statusCode!=null&&l.statusCode!==200&&!v&&(h=l.statusCode),l.headers&&(m[o]=l.headers)):(s[o]=l.data,l.statusCode&&l.statusCode!==200&&!v&&(h=l.statusCode),l.headers&&(m[o]=l.headers))}),b!==void 0&&r&&(u={[r[0]]:b},s[r[0]]=void 0),{loaderData:s,errors:u,statusCode:h||200,loaderHeaders:m}}function su(e,t,n,r,i,a,s,u){let{loaderData:h,errors:v}=ey(t,n,r,i,u,!1);for(let m=0;m<a.length;m++){let{key:b,match:l,controller:g}=a[m];xe(s!==void 0&&s[m]!==void 0,"Did not find corresponding fetcher result");let o=s[m];if(!(g&&g.signal.aborted))if(jt(o)){let c=Dr(e.matches,l==null?void 0:l.route.id);v&&v[c.route.id]||(v=Ze({},v,{[c.route.id]:o.error})),e.fetchers.delete(b)}else if(En(o))xe(!1,"Unhandled fetcher revalidation redirect");else if(Cn(o))xe(!1,"Unhandled fetcher deferred data");else{let c=mn(o.data);e.fetchers.set(b,c)}}return{loaderData:h,errors:v}}function lu(e,t,n,r){let i=Ze({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(i[s]=t[s]):e[s]!==void 0&&a.route.loader&&(i[s]=e[s]),r&&r.hasOwnProperty(s))break}return i}function cu(e){return e?jt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Dr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function uu(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Tt(e,t){let{pathname:n,routeId:r,method:i,type:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?u="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?u="defer() is not supported in actions":a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?u="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(u='Invalid request method "'+i.toUpperCase()+'"')),new Xc(e||500,s,new Error(u),!0)}function du(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(En(n))return{result:n,idx:t}}}function fu(e){let t=typeof e=="string"?Xt(e):e;return kn(Ze({},t,{hash:""}))}function ty(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ny(e){return hu(e.result)&&$g.has(e.result.status)}function Cn(e){return e.type===Qe.deferred}function jt(e){return e.type===Qe.error}function En(e){return(e&&e.type)===Qe.redirect}function ry(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function hu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function oy(e){return Ug.has(e.toLowerCase())}function Ut(e){return Mg.has(e.toLowerCase())}async function pu(e,t,n,r,i,a){for(let s=0;s<n.length;s++){let u=n[s],h=t[s];if(!h)continue;let v=e.find(b=>b.route.id===h.route.id),m=v!=null&&!nu(v,h)&&(a&&a[h.route.id])!==void 0;if(Cn(u)&&(i||m)){let b=r[s];xe(b,"Expected an AbortSignal for revalidating fetcher deferred result"),await mu(u,b,i).then(l=>{l&&(n[s]=l||n[s])})}}}async function mu(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Qe.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Qe.error,error:i}}return{type:Qe.data,data:e.deferredData.data}}}function ja(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ia(e,t){let n=typeof t=="string"?Xt(t).search:t.search;if(e[e.length-1].route.index&&ja(n||""))return e[e.length-1];let r=Qc(e);return r[r.length-1]}function gu(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Aa(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function iy(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Mr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ay(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function mn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function sy(e,t){try{let n=e.sessionStorage.getItem(Zc);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(i,new Set(a||[]))}}catch{}}function ly(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Zc,JSON.stringify(n))}catch(r){at(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
81
+ * React Router v6.23.0
82
+ *
83
+ * Copyright (c) Remix Software Inc.
84
+ *
85
+ * This source code is licensed under the MIT license found in the
86
+ * LICENSE.md file in the root directory of this source tree.
87
+ *
88
+ * @license MIT
89
+ */function $n(){return $n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$n.apply(this,arguments)}const Vn=le.createContext(null);process.env.NODE_ENV!=="production"&&(Vn.displayName="DataRouter");const $o=le.createContext(null);process.env.NODE_ENV!=="production"&&($o.displayName="DataRouterState");const cy=le.createContext(null);process.env.NODE_ENV!=="production"&&(cy.displayName="Await");const $t=le.createContext(null);process.env.NODE_ENV!=="production"&&($t.displayName="Navigation");const Fr=le.createContext(null);process.env.NODE_ENV!=="production"&&(Fr.displayName="Location");const Vt=le.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Vt.displayName="Route");const Ra=le.createContext(null);process.env.NODE_ENV!=="production"&&(Ra.displayName="RouteError");function uy(e,t){let{relative:n}=t===void 0?{}:t;Ur()||(process.env.NODE_ENV!=="production"?xe(!1,"useHref() may be used only in the context of a <Router> component."):xe(!1));let{basename:r,navigator:i}=le.useContext($t),{hash:a,pathname:s,search:u}=$r(e,{relative:n}),h=s;return r!=="/"&&(h=s==="/"?r:Jt([r,s])),i.createHref({pathname:h,search:u,hash:a})}function Ur(){return le.useContext(Fr)!=null}function gn(){return Ur()||(process.env.NODE_ENV!=="production"?xe(!1,"useLocation() may be used only in the context of a <Router> component."):xe(!1)),le.useContext(Fr).location}const yu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vu(e){le.useContext($t).static||le.useLayoutEffect(e)}function It(){let{isDataRoute:e}=le.useContext(Vt);return e?Sy():dy()}function dy(){Ur()||(process.env.NODE_ENV!=="production"?xe(!1,"useNavigate() may be used only in the context of a <Router> component."):xe(!1));let e=le.useContext(Vn),{basename:t,future:n,navigator:r}=le.useContext($t),{matches:i}=le.useContext(Vt),{pathname:a}=gn(),s=JSON.stringify(Sa(i,n.v7_relativeSplatPath)),u=le.useRef(!1);return vu(()=>{u.current=!0}),le.useCallback(function(v,m){if(m===void 0&&(m={}),process.env.NODE_ENV!=="production"&&at(u.current,yu),!u.current)return;if(typeof v=="number"){r.go(v);return}let b=Pa(v,JSON.parse(s),a,m.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:Jt([t,b.pathname])),(m.replace?r.replace:r.push)(b,m.state,m)},[t,r,s,a,e])}const fy=le.createContext(null);function hy(e){let t=le.useContext(Vt).outlet;return t&&le.createElement(fy.Provider,{value:e},t)}function bu(){let{matches:e}=le.useContext(Vt),t=e[e.length-1];return t?t.params:{}}function $r(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=le.useContext($t),{matches:i}=le.useContext(Vt),{pathname:a}=gn(),s=JSON.stringify(Sa(i,r.v7_relativeSplatPath));return le.useMemo(()=>Pa(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function py(e,t,n,r){Ur()||(process.env.NODE_ENV!=="production"?xe(!1,"useRoutes() may be used only in the context of a <Router> component."):xe(!1));let{navigator:i}=le.useContext($t),{matches:a}=le.useContext(Vt),s=a[a.length-1],u=s?s.params:{},h=s?s.pathname:"/",v=s?s.pathnameBase:"/",m=s&&s.route;if(process.env.NODE_ENV!=="production"){let p=m&&m.path||"";ku(h,!m||p.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+h+'" (under <Route path="'+p+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
90
+
91
+ `+('Please change the parent <Route path="'+p+'"> to <Route ')+('path="'+(p==="/"?"*":p+"/*")+'">.'))}let b=gn(),l;if(t){var g;let p=typeof t=="string"?Xt(t):t;v==="/"||(g=p.pathname)!=null&&g.startsWith(v)||(process.env.NODE_ENV!=="production"?xe(!1,"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was "+('matched by all parent routes. The current pathname base is "'+v+'" ')+('but pathname "'+p.pathname+'" was given in the `location` prop.')):xe(!1)),l=p}else l=b;let o=l.pathname||"/",c=o;if(v!=="/"){let p=v.replace(/^\//,"").split("/");c="/"+o.replace(/^\//,"").split("/").slice(p.length).join("/")}let f=Fn(e,{pathname:c});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&at(m||f!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&at(f==null||f[f.length-1].route.element!==void 0||f[f.length-1].route.Component!==void 0||f[f.length-1].route.lazy!==void 0,'Matched leaf route at location "'+l.pathname+l.search+l.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let d=by(f&&f.map(p=>Object.assign({},p,{params:Object.assign({},u,p.params),pathname:Jt([v,i.encodeLocation?i.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?v:Jt([v,i.encodeLocation?i.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),a,n,r);return t&&d?le.createElement(Fr.Provider,{value:{location:$n({pathname:"/",search:"",hash:"",state:null,key:"default"},l),navigationType:rt.Pop}},d):d}function my(){let e=Ey(),t=Ba(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=le.createElement(le.Fragment,null,le.createElement("p",null,"💿 Hey developer 👋"),le.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",le.createElement("code",{style:a},"ErrorBoundary")," or"," ",le.createElement("code",{style:a},"errorElement")," prop on your route."))),le.createElement(le.Fragment,null,le.createElement("h2",null,"Unexpected Application Error!"),le.createElement("h3",{style:{fontStyle:"italic"}},t),n?le.createElement("pre",{style:i},n):null,s)}const gy=le.createElement(my,null);class yy extends le.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?le.createElement(Vt.Provider,{value:this.props.routeContext},le.createElement(Ra.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function vy(e){let{routeContext:t,match:n,children:r}=e,i=le.useContext(Vn);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),le.createElement(Vt.Provider,{value:t},r)}function by(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let m=s.findIndex(b=>b.route.id&&(u==null?void 0:u[b.route.id])!==void 0);m>=0||(process.env.NODE_ENV!=="production"?xe(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(u).join(",")):xe(!1)),s=s.slice(0,Math.min(s.length,m+1))}let h=!1,v=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m<s.length;m++){let b=s[m];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(v=m),b.route.id){let{loaderData:l,errors:g}=n,o=b.route.loader&&l[b.route.id]===void 0&&(!g||g[b.route.id]===void 0);if(b.route.lazy||o){h=!0,v>=0?s=s.slice(0,v+1):s=[s[0]];break}}}return s.reduceRight((m,b,l)=>{let g,o=!1,c=null,f=null;n&&(g=u&&b.route.id?u[b.route.id]:void 0,c=b.route.errorElement||gy,h&&(v<0&&l===0?(ku("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),o=!0,f=null):v===l&&(o=!0,f=b.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,l+1)),p=()=>{let y;return g?y=c:o?y=f:b.route.Component?y=le.createElement(b.route.Component,null):b.route.element?y=b.route.element:y=m,le.createElement(vy,{match:b,routeContext:{outlet:m,matches:d,isDataRoute:n!=null},children:y})};return n&&(b.route.ErrorBoundary||b.route.errorElement||l===0)?le.createElement(yy,{location:n.location,revalidation:n.revalidation,component:c,error:g,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var wu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wu||{}),Vr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Vr||{});function La(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function wy(e){let t=le.useContext(Vn);return t||(process.env.NODE_ENV!=="production"?xe(!1,La(e)):xe(!1)),t}function xy(e){let t=le.useContext($o);return t||(process.env.NODE_ENV!=="production"?xe(!1,La(e)):xe(!1)),t}function ky(e){let t=le.useContext(Vt);return t||(process.env.NODE_ENV!=="production"?xe(!1,La(e)):xe(!1)),t}function Da(e){let t=ky(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?xe(!1,e+' can only be used on routes that contain a unique "id"'):xe(!1)),n.route.id}function Cy(){return Da(Vr.UseRouteId)}function Ey(){var e;let t=le.useContext(Ra),n=xy(Vr.UseRouteError),r=Da(Vr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Sy(){let{router:e}=wy(wu.UseNavigateStable),t=Da(Vr.UseNavigateStable),n=le.useRef(!1);return vu(()=>{n.current=!0}),le.useCallback(function(i,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&at(n.current,yu),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,$n({fromRouteId:t},a)))},[e,t])}const xu={};function ku(e,t,n){!t&&!xu[e]&&(xu[e]=!0,process.env.NODE_ENV!=="production"&&at(!1,n))}function zt(e){return hy(e.context)}function Py(e){let{basename:t="/",children:n=null,location:r,navigationType:i=rt.Pop,navigator:a,static:s=!1,future:u}=e;Ur()&&(process.env.NODE_ENV!=="production"?xe(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):xe(!1));let h=t.replace(/^\/*/,"/"),v=le.useMemo(()=>({basename:h,navigator:a,static:s,future:$n({v7_relativeSplatPath:!1},u)}),[h,u,a,s]);typeof r=="string"&&(r=Xt(r));let{pathname:m="/",search:b="",hash:l="",state:g=null,key:o="default"}=r,c=le.useMemo(()=>{let f=Ft(m,h);return f==null?null:{location:{pathname:f,search:b,hash:l,state:g,key:o},navigationType:i}},[h,m,b,l,g,o,i]);return process.env.NODE_ENV!=="production"&&at(c!=null,'<Router basename="'+h+'"> is not able to match the URL '+('"'+m+b+l+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),c==null?null:le.createElement($t.Provider,{value:v},le.createElement(Fr.Provider,{children:n,value:c}))}new Promise(()=>{});function By(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&at(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:le.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&at(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:le.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&at(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:le.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function zn(e,t){return qg({basename:t==null?void 0:t.basename,future:$n({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:gg({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,mapRouteProperties:By,unstable_dataStrategy:t==null?void 0:t.unstable_dataStrategy}).initialize()}/**
92
+ * React Router DOM v6.23.0
93
+ *
94
+ * Copyright (c) Remix Software Inc.
95
+ *
96
+ * This source code is licensed under the MIT license found in the
97
+ * LICENSE.md file in the root directory of this source tree.
98
+ *
99
+ * @license MIT
100
+ */function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hn.apply(this,arguments)}function Ma(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}const Vo="get",zo="application/x-www-form-urlencoded";function Ho(e){return e!=null&&typeof e.tagName=="string"}function Oy(e){return Ho(e)&&e.tagName.toLowerCase()==="button"}function Ny(e){return Ho(e)&&e.tagName.toLowerCase()==="form"}function _y(e){return Ho(e)&&e.tagName.toLowerCase()==="input"}function Ty(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jy(e,t){return e.button===0&&(!t||t==="_self")&&!Ty(e)}let qo=null;function Iy(){if(qo===null)try{new FormData(document.createElement("form"),0),qo=!1}catch{qo=!0}return qo}const Ay=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fa(e){return e!=null&&!Ay.has(e)?(process.env.NODE_ENV!=="production"&&at(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+zo+'"')),null):e}function Ry(e,t){let n,r,i,a,s;if(Ny(e)){let u=e.getAttribute("action");r=u?Ft(u,t):null,n=e.getAttribute("method")||Vo,i=Fa(e.getAttribute("enctype"))||zo,a=new FormData(e)}else if(Oy(e)||_y(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||u.getAttribute("action");if(r=h?Ft(h,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Vo,i=Fa(e.getAttribute("formenctype"))||Fa(u.getAttribute("enctype"))||zo,a=new FormData(u,e),!Iy()){let{name:v,type:m,value:b}=e;if(m==="image"){let l=v?v+".":"";a.append(l+"x","0"),a.append(l+"y","0")}else v&&a.append(v,b)}}else{if(Ho(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Vo,r=null,i=zo,s=e}return a&&i==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:s}}const Ly=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Dy=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],My=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Fy="6";try{window.__reactRouterVersion=Fy}catch{}const Ua=le.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Ua.displayName="ViewTransition");const Cu=le.createContext(new Map);process.env.NODE_ENV!=="production"&&(Cu.displayName="Fetchers");const Eu=le["startTransition"],Su=qu["flushSync"];function Uy(e){Eu?Eu(e):e()}function zr(e){Su?Su(e):e()}class $y{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Vy(e){let{fallbackElement:t,router:n,future:r}=e,[i,a]=le.useState(n.state),[s,u]=le.useState(),[h,v]=le.useState({isTransitioning:!1}),[m,b]=le.useState(),[l,g]=le.useState(),[o,c]=le.useState(),f=le.useRef(new Map),{v7_startTransition:d}=r||{},p=le.useCallback(k=>{d?Uy(k):k()},[d]),y=le.useCallback((k,B)=>{let{deletedFetchers:O,unstable_flushSync:I,unstable_viewTransitionOpts:L}=B;O.forEach(M=>f.current.delete(M)),k.fetchers.forEach((M,$)=>{M.data!==void 0&&f.current.set($,M.data)});let D=n.window==null||typeof n.window.document.startViewTransition!="function";if(!L||D){I?zr(()=>a(k)):p(()=>a(k));return}if(I){zr(()=>{l&&(m&&m.resolve(),l.skipTransition()),v({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let M=n.window.document.startViewTransition(()=>{zr(()=>a(k))});M.finished.finally(()=>{zr(()=>{b(void 0),g(void 0),u(void 0),v({isTransitioning:!1})})}),zr(()=>g(M));return}l?(m&&m.resolve(),l.skipTransition(),c({state:k,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(u(k),v({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[n.window,l,m,f,p]);le.useLayoutEffect(()=>n.subscribe(y),[n,y]),le.useEffect(()=>{h.isTransitioning&&!h.flushSync&&b(new $y)},[h]),le.useEffect(()=>{if(m&&s&&n.window){let k=s,B=m.promise,O=n.window.document.startViewTransition(async()=>{p(()=>a(k)),await B});O.finished.finally(()=>{b(void 0),g(void 0),u(void 0),v({isTransitioning:!1})}),g(O)}},[p,s,m,n.window]),le.useEffect(()=>{m&&s&&i.location.key===s.location.key&&m.resolve()},[m,l,i.location,s]),le.useEffect(()=>{!h.isTransitioning&&o&&(u(o.state),v({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}),c(void 0))},[h.isTransitioning,o]),le.useEffect(()=>{process.env.NODE_ENV!=="production"&&at(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let x=le.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,B,O)=>n.navigate(k,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(k,B,O)=>n.navigate(k,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),E=n.basename||"/",S=le.useMemo(()=>({router:n,navigator:x,static:!1,basename:E}),[n,x,E]);return le.createElement(le.Fragment,null,le.createElement(Vn.Provider,{value:S},le.createElement($o.Provider,{value:i},le.createElement(Cu.Provider,{value:f.current},le.createElement(Ua.Provider,{value:h},le.createElement(Py,{basename:E,location:i.location,navigationType:i.historyAction,navigator:x,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?le.createElement(zy,{routes:n.routes,future:n.future,state:i}):t))))),null)}function zy(e){let{routes:t,future:n,state:r}=e;return py(t,void 0,r,n)}process.env.NODE_ENV;const Hy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pu=le.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:s,state:u,target:h,to:v,preventScrollReset:m,unstable_viewTransition:b}=t,l=Ma(t,Ly),{basename:g}=le.useContext($t),o,c=!1;if(typeof v=="string"&&qy.test(v)&&(o=v,Hy))try{let y=new URL(window.location.href),x=v.startsWith("//")?new URL(y.protocol+v):new URL(v),E=Ft(x.pathname,g);x.origin===y.origin&&E!=null?v=E+x.search+x.hash:c=!0}catch{process.env.NODE_ENV!=="production"&&at(!1,'<Link to="'+v+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let f=uy(v,{relative:i}),d=Yy(v,{replace:s,state:u,target:h,preventScrollReset:m,relative:i,unstable_viewTransition:b});function p(y){r&&r(y),y.defaultPrevented||d(y)}return le.createElement("a",Hn({},l,{href:o||f,onClick:c||a?r:p,ref:n,target:h}))});process.env.NODE_ENV!=="production"&&(Pu.displayName="Link");const Ky=le.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:s=!1,style:u,to:h,unstable_viewTransition:v,children:m}=t,b=Ma(t,Dy),l=$r(h,{relative:b.relative}),g=gn(),o=le.useContext($o),{navigator:c,basename:f}=le.useContext($t),d=o!=null&&tv(l)&&v===!0,p=c.encodeLocation?c.encodeLocation(l).pathname:l.pathname,y=g.pathname,x=o&&o.navigation&&o.navigation.location?o.navigation.location.pathname:null;i||(y=y.toLowerCase(),x=x?x.toLowerCase():null,p=p.toLowerCase()),x&&f&&(x=Ft(x,f)||x);const E=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let S=y===p||!s&&y.startsWith(p)&&y.charAt(E)==="/",k=x!=null&&(x===p||!s&&x.startsWith(p)&&x.charAt(p.length)==="/"),B={isActive:S,isPending:k,isTransitioning:d},O=S?r:void 0,I;typeof a=="function"?I=a(B):I=[a,S?"active":null,k?"pending":null,d?"transitioning":null].filter(Boolean).join(" ");let L=typeof u=="function"?u(B):u;return le.createElement(Pu,Hn({},b,{"aria-current":O,className:I,ref:n,style:L,to:h,unstable_viewTransition:v}),typeof m=="function"?m(B):m)});process.env.NODE_ENV!=="production"&&(Ky.displayName="NavLink");const Wy=le.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:s,method:u=Vo,action:h,onSubmit:v,relative:m,preventScrollReset:b,unstable_viewTransition:l}=e,g=Ma(e,My),o=Zy(),c=ev(h,{relative:m}),f=u.toLowerCase()==="get"?"get":"post",d=p=>{if(v&&v(p),p.defaultPrevented)return;p.preventDefault();let y=p.nativeEvent.submitter,x=(y==null?void 0:y.getAttribute("formmethod"))||u;o(y||p.currentTarget,{fetcherKey:n,method:x,navigate:r,replace:a,state:s,relative:m,preventScrollReset:b,unstable_viewTransition:l})};return le.createElement("form",Hn({ref:t,method:f,action:c,onSubmit:i?v:d},g))});process.env.NODE_ENV!=="production"&&(Wy.displayName="Form"),process.env.NODE_ENV;var Ko;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ko||(Ko={}));var Bu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bu||(Bu={}));function Gy(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Ou(e){let t=le.useContext(Vn);return t||(process.env.NODE_ENV!=="production"?xe(!1,Gy(e)):xe(!1)),t}function Yy(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:u}=t===void 0?{}:t,h=It(),v=gn(),m=$r(e,{relative:s});return le.useCallback(b=>{if(jy(b,n)){b.preventDefault();let l=r!==void 0?r:kn(v)===kn(m);h(e,{replace:l,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:u})}},[v,h,m,r,i,n,e,a,s,u])}function Qy(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Xy=0,Jy=()=>"__"+String(++Xy)+"__";function Zy(){let{router:e}=Ou(Ko.UseSubmit),{basename:t}=le.useContext($t),n=Cy();return le.useCallback(function(r,i){i===void 0&&(i={}),Qy();let{action:a,method:s,encType:u,formData:h,body:v}=Ry(r,t);if(i.navigate===!1){let m=i.fetcherKey||Jy();e.fetch(m,n,i.action||a,{preventScrollReset:i.preventScrollReset,formData:h,body:v,formMethod:i.method||s,formEncType:i.encType||u,unstable_flushSync:i.unstable_flushSync})}else e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:h,body:v,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:n,unstable_flushSync:i.unstable_flushSync,unstable_viewTransition:i.unstable_viewTransition})},[e,t,n])}function ev(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=le.useContext($t),i=le.useContext(Vt);i||(process.env.NODE_ENV!=="production"?xe(!1,"useFormAction must be used inside a RouteContext"):xe(!1));let[a]=i.matches.slice(-1),s=Hn({},$r(e||".",{relative:n})),u=gn();if(e==null){s.search=u.search;let h=new URLSearchParams(s.search);h.has("index")&&h.get("index")===""&&(h.delete("index"),s.search=h.toString()?"?"+h.toString():"")}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Jt([r,s.pathname])),kn(s)}function tv(e,t){t===void 0&&(t={});let n=le.useContext(Ua);n==null&&(process.env.NODE_ENV!=="production"?xe(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):xe(!1));let{basename:r}=Ou(Ko.useViewTransitionState),i=$r(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Ft(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ft(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ca(i.pathname,s)!=null||Ca(i.pathname,a)!=null}const nv="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyNCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuMzc0ODIgOS41NTgzOEMwLjgwMjA0NSAxMS42OTYgMC44ODczNTEgMTMuOTU2NyAxLjYxOTU5IDE2LjA0NUMyLjM1MTgzIDE4LjEzMzQgMy42OTY5NSAxOS45NTI0IDUuNDc5MjEgMjEuMjY0MkM3LjI2MTQ2IDIyLjU3NjEgOS4zOTc5OCAyMy4zMTk5IDExLjYwOTYgMjMuMzk4NUMxMy44MjEyIDIzLjQ3NyAxNi4wMDUxIDIyLjg4NjYgMTcuODc2IDIxLjcwNDVDMTkuNzQ2OCAyMC41MjIzIDIxLjIxNzUgMTguODAzNCAyMi4wOTYxIDE2Ljc3MjJDMjIuOTc0NiAxNC43NDExIDIzLjIyMDEgMTIuNDkyMSAyMi44MDA0IDEwLjMxOTNDMjIuMzgwNyA4LjE0NjQgMjEuMzE1NCA2LjE1MDY2IDE5Ljc0MzYgNC41OTI3N0MxOC4xNzE4IDMuMDM0ODkgMTYuMTY2NyAxLjk4NzMyIDEzLjk5MDIgMS41ODY5M003LjE0MDk2IDIuNTM2ODFDNS4yMTA0OSAzLjQ4NzMyIDMuNjAxMTkgNC45ODMxNSAyLjUxMjMyIDYuODM5MU0xMC43MDQ5IDEuNDgxOTNDMTAuNDUyIDEuNTExOTEgMTAuMjAwMyAxLjU1MDY2IDkuOTUwMTIgMS41OTgxMU0xOC4xOTk1IDE1LjY1NkMxOC43NTcgMTQuNTkyNyAxOS4wMzE3IDEzLjQwMzkgMTguOTk3MSAxMi4yMDM4QzE4Ljk2MjUgMTEuMDAzNyAxOC42MTk4IDkuODMyNjMgMTguMDAyIDguODAzMkMxNy4zODQyIDcuNzczNzcgMTYuNTEyIDYuOTIwNTUgMTUuNDY5MiA2LjMyNTUzQzE0LjQyNjQgNS43MzA1MSAxMy4yNDgxIDUuNDEzNyAxMi4wNDc2IDUuNDA1NTRDMTAuODQ3IDUuMzk3MzkgOS42NjQ0OSA1LjY5ODE2IDguNjEzNzIgNi4yNzg5NUM3LjU2Mjk1IDYuODU5NzQgNi42NzkyMyA3LjcwMTA0IDYuMDQ3NDcgOC43MjE5OEM1LjQxNTcyIDkuNzQyOTIgNS4wNTcxNyAxMC45MDkyIDUuMDA2MjggMTIuMTA4N0M0Ljk1NTQgMTMuMzA4MiA1LjIxMzg5IDE0LjUwMDcgNS43NTY5MSAxNS41NzE0TTkuMTU3NjQgMTMuMzY0OEM5LjAwNjI0IDEyLjkxNjIgOC45NjMxNCAxMi40MzgyIDkuMDMxODkgMTEuOTY5OEM5LjEwMDY0IDExLjUwMTQgOS4yNzkyNiAxMS4wNTU5IDkuNTUzMTcgMTAuNjY5N0M5LjgyNzA4IDEwLjI4MzYgMTAuMTg4NSA5Ljk2Nzc0IDEwLjYwNzkgOS43NDgwM0MxMS4wMjcyIDkuNTI4MzIgMTEuNDkyNiA5LjQxMDk4IDExLjk2NiA5LjQwNTZDMTIuNDM5NCA5LjQwMDIzIDEyLjkwNzQgOS41MDY5NyAxMy4zMzE2IDkuNzE3MDlDMTMuNzU1OSA5LjkyNzIyIDE0LjEyNDQgMTAuMjM0OCAxNC40MDcgMTAuNjE0NkMxNC42ODk2IDEwLjk5NDQgMTQuODc4MyAxMS40MzU4IDE0Ljk1NzYgMTEuOTAyNUMxNS4wMzcgMTIuMzY5MiAxNS4wMDQ4IDEyLjg0ODEgMTQuODYzNiAxMy4zTTE0LjA5OTMgMTAuMjYyMkMxNC4wMDQzIDEwLjE2OTEgMTMuOTAzMiAxMC4wODI1IDEzLjc5NjcgMTAuMDAyOE04LjI0NzggMTguMzE0N0M5LjMyMTQ3IDE4Ljk5NjUgMTAuNTYwNiAxOS4zNzI4IDExLjgzMiAxOS40MDMzQzEzLjEwMzUgMTkuNDMzOSAxNC4zNTkyIDE5LjExNzQgMTUuNDY0NCAxOC40ODgiIHN0cm9rZT0iIzM0MzBGRiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KPC9zdmc+Cg==";function rv(){const e=It(),{t}=qe(),n=jn();return z.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),C.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[C.jsxs("div",{className:"flex items-center justify-center gap-3",children:[C.jsx("img",{alt:"logo",src:nv,className:"z-10 h-16 w-16 hover:animate-spin"}),C.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",C.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?C.jsx(Xe,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):C.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function ov(){const e=It(),{t}=qe(),{sessionUuid:n}=jn(),{session:r,isLoading:i,mutate:a}=kt();return z.useEffect(()=>{if(!i&&r){const s=r.type in Zt?`/${r.type.toLowerCase()}`:"/";e(s)}},[i,a,e,r]),i?C.jsx(kl,{}):C.jsx("div",{className:"flex w-full items-center justify-center text-error-600",children:`${t("portalSessionNotFound")} (${n})`})}zn([{path:"/",element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx($a,{})},{path:"/top-up/:hash",element:C.jsx(_u,{})},{path:"/redeem/:hash",element:C.jsx(Nu,{})}]}]);function $a(){const{t:e}=qe(),[t,n]=z.useState(""),[r,i]=z.useState(!1),{session:a}=kt(),s=It(),u=a==null?void 0:a.input_data.scanner_type,h=z.useCallback(()=>{let m;return a==null||a.events.forEach(b=>{b.type==="remaining_amount"&&(m=b.data.amount_in_cents)}),m??(a==null?void 0:a.input_data.amount_in_cents)},[a]),v=z.useCallback(async()=>{i(!0);const{data:{data:m}}=await ji.get(t);s(`${a.type===Bn.REDEEM_GIFTCARD?"redeem":"top-up"}/${m.hash}`)},[t,s,a]);return z.useEffect(()=>{u===Rt.CAMERA&&t&&!r&&v().then()},[t,r,u,v]),(a==null?void 0:a.type)===Bn.REDEEM_GIFTCARD&&!(a!=null&&a.input_data.amount_in_cents)?C.jsx(C.Fragment,{children:e("xIsRequired",{x:"Amount in cents"})}):C.jsx("div",{className:"container m-auto",children:C.jsx(Ot,{children:C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsx(He,{size:"sm",weight:"extralight",children:e("scanGiftcard")}),(a==null?void 0:a.type)===Bn.REDEEM_GIFTCARD&&C.jsx(He,{size:"lg",children:`${e("amountToBePaid")}: ${Qn(h())}`}),C.jsx(wo,{dataSetter:n,type:u,label:e("hash")}),u===Rt.HAND_SCANNER&&C.jsx("div",{children:C.jsx(Xe,{type:"submit",label:e("submit"),onClick:v})})]})})})}function Nu(){const{t:e}=qe(),{hash:t}=bu(),{giftcard:n,mutate:r}=ol(t),{session:i,mutate:a}=kt(),{onUseGiftcard:s}=jn(),u=It(),h=(i==null?void 0:i.input_data.amount_in_cents)??0,v=(i==null?void 0:i.input_data.allow_multiple_giftcards)??!0;if(!n)return C.jsx(C.Fragment,{children:e("giftcardNotFound")});const m=async()=>{const g=await ji.transaction(n.uuid,-l());await r(),await a(),Re.success(`${e("transactionSuccessful")}!`),s&&s(g.data.data)},b=()=>{let g;return i==null||i.events.forEach(o=>{o.type==="remaining_amount"&&(g=o.data.amount_in_cents)}),g??h},l=()=>Math.min(b(),n.amount_in_cents);return C.jsx("div",{className:"container m-auto",children:C.jsx(Ot,{children:C.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[C.jsxs("div",{children:[C.jsxs(He,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),C.jsx(He,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),C.jsxs("div",{children:[C.jsx(He,{size:"lg",align:"center",children:e("balance")}),C.jsx(He,{size:"4xl",align:"center",children:n.display_amount})]}),C.jsx("div",{className:"mx-auto flex gap-2",children:l()?C.jsx(Xe,{label:e("confirmAndPay",{amount:Qn(l(),i==null?void 0:i.currency)}),onClick:m}):C.jsxs("div",{className:"flex flex-col gap-4",children:[C.jsx(He,{size:"lg",align:"center",className:"text-gray-500",children:e("xOfYPaid",{x:b()?Qn(h-b(),i==null?void 0:i.currency):e("fullAmount"),y:Qn(h,i==null?void 0:i.currency)})}),v&&b()?C.jsx(Xe,{label:e("useAnotherGiftcard"),onClick:()=>u("../")}):null]})})]})})})}function _u(){const{t:e}=qe(),{hash:t}=bu(),{giftcard:n,mutate:r}=ol(t),[i,a]=z.useState(!1),[s,u]=z.useState("");if(!n)return C.jsx(C.Fragment,{children:e("giftcardNotFound")});const h=async()=>{const v=await ji.transaction(n.uuid,parseFloat(s)*100);await r(),Re.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${Qn(v.data.data.amount_in_cents)}`),a(!1)};return C.jsxs("div",{className:"container m-auto",children:[C.jsx(Ot,{children:C.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[C.jsxs("div",{children:[C.jsxs(He,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),C.jsx(He,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),C.jsxs("div",{children:[C.jsx(He,{size:"lg",align:"center",children:e("balance")}),C.jsx(He,{size:"4xl",align:"center",children:n.display_amount})]}),C.jsx("div",{className:"mx-auto flex gap-2",children:C.jsx(Xe,{label:e("topUp"),onClick:()=>a(!0)})})]})}),C.jsx(ur,{isOpen:i,onClose:()=>a(!1),children:C.jsxs("div",{className:"flex flex-col gap-4",children:[C.jsx(Di,{value:s,valueSetter:u}),C.jsx(Xe,{label:e("submit"),onClick:h})]})})]})}zn([{path:"/",element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Tu,{})},{path:"email",element:C.jsx(Iu,{})},{path:"identifier",element:C.jsx(ju,{})},{path:"register",element:C.jsx(Au,{})}]}]);function iv(){const{t:e}=qe(),{contact:t,isLoading:n,mutate:r}=yo(),[i,a]=z.useState(),[s,u]=z.useState();z.useEffect(()=>{i||(async()=>{const{data:m}=await rl.get();a(m.data.elements)})()},[t,i]);const h=(m,b)=>{u({...s,[m]:b})},v=async()=>{s&&(await rl.update(s),await r(),Re.success(e("contactAttributesUpdated")))};return!i||n?C.jsx(kl,{}):C.jsxs("div",{className:"flex h-full flex-col gap-6",children:[C.jsx("div",{className:"flex justify-end",children:C.jsx(Xe,{label:e("saveChanges"),onClick:v})}),C.jsx("hr",{}),C.jsx("div",{className:"grid h-full grid-cols-2 gap-x-6 gap-y-2 overflow-y-auto p-1",children:i.map(m=>{if(m.type==="media_upload")return;const b=m.disabled?C.jsx(Ah,{type:m.type,value:t.current_display_values[m.name],label:m.label,underlying_value:t.current_values[m.name]}):C.jsx(Rh,{...m,onChange:h});return C.jsx("div",{children:b},m.id)})})]})}function av(){const{t:e}=qe(),{data:t,isLoading:n,mutate:r}=Sh(),i=async s=>{await Eh.update({subscription_type_id:s.subscription_type.id}),await r()},a=s=>{const u=s.subscription_type.strategy,h=s.status;if(u===In.FUNCTIONAL)return e("disabled");switch(h){case sr.SUBSCRIBED:return e("unsubscribe");case sr.UNSUBSCRIBED:return u===In.OPT_IN||In.OPT_OUT?e("subscribe"):e("sendConfirmationEmail");case sr.PENDING_CONFIRMATION:return e("sendReminder");default:return""}};return n?C.jsx(jm,{rows:5}):C.jsx("div",{children:t.data.data.map(s=>C.jsxs("div",{className:"mb-4 flex justify-between rounded-lg border border-gray-200 px-6 py-4",children:[C.jsxs("div",{children:[C.jsxs("div",{className:"flex gap-3",children:[C.jsx(He,{weight:"normal",children:s.subscription_type.name}),C.jsx("span",{className:`flex gap-2 rounded-full px-2 py-0.5 text-sm font-light ${s.is_subscribed?"bg-[#03985515] text-[#039855]":"bg-[#E0273115] text-[#E02731]"}`,children:s.status.charAt(0)+s.status.substring(1).toLowerCase()})]}),C.jsx(He,{color:"text-gray-400",size:"sm",children:s.subscription_type.description})]}),C.jsx(Xe,{style:{color:"inherit",backgroundColor:"white",border:"1px solid rgb(229 231 235)"},disabled:s.subscription_type.strategy===In.FUNCTIONAL,onClick:()=>i(s),label:a(s)})]},s.subscription_type.uuid))})}function sv(){const{t:e}=qe(),[t,n]=z.useState(),r=z.useMemo(()=>[{id:0,label:e("contactDetails"),icon:C.jsx("path",{d:"M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"}),content:C.jsx(iv,{})},{id:1,label:e("subscriptions"),icon:C.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:C.jsx(av,{})}],[e]);return z.useEffect(()=>{t||n(r[0])},[r,t]),C.jsxs("div",{className:"h-full sm:flex",children:[C.jsx("ul",{className:"flex-column space-y mb-4 space-y-4 text-sm font-medium text-gray-500 md:mb-0 md:me-4",children:r.map(i=>C.jsx("li",{children:C.jsxs("div",{className:`inline-flex w-full cursor-pointer items-center rounded-lg px-4 py-3 ${i.id===(t==null?void 0:t.id)?"bg-primary-600 text-white":"bg-gray-50 hover:bg-gray-100 hover:text-gray-900"}`,onClick:()=>n(i),children:[C.jsx("svg",{className:`me-2 h-4 w-4 ${i.id===(t==null?void 0:t.id)?"text-white":"text-gray-500"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:i.icon}),C.jsx("p",{className:"truncate",children:i.label})]})},i.id))}),C.jsx("div",{className:"text-medium h-full w-full rounded-lg bg-gray-50 p-6",children:t&&t.content})]})}function lv(){const{data:e,isLoading:t,mutate:n}=Ch(),{mutate:r}=yo(),{onClaimReward:i}=jn(),{t:a}=qe(),s=async u=>{const h=await kh.claim(u);await n(),await r(),Re.success(a("rewardClaimed",{name:h.data.data.title})),i&&i(h.data.data)};return C.jsx(Sc,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:s})}function cv(){const{data:e,isLoading:t,mutate:n}=Ph(),{onRedeemVoucher:r}=jn(),{t:i}=qe(),a=async s=>{const u=await Ri.redeemById(s);await n(),Re.success(i("voucherSuccessfullyRedeemed")),r&&r(u.data.data)};return C.jsx(Sc,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:a})}function uv(){const{t:e}=qe(),{session:{loyalty_program:t}}=kt(),{contact:n,isLoading:r}=yo();if(r)return C.jsx(C.Fragment,{});const i=[{value:n.credit_balance.balance,label:t.custom_credit_name||e("points")},{value:n.current_display_values.loyalty_number_of_transactions,label:e("transactions")},{value:n.tier?n.tier.name:"-",label:e("tier")}];return C.jsxs("div",{className:"flex w-full justify-between text-inherit",children:[C.jsxs("div",{children:[C.jsx("p",{className:"text-md font-medium",children:`${n.current_display_values.firstname} ${n.current_display_values.lastname}`}),C.jsx("p",{className:"text-sm",children:n.current_display_values.email})]}),C.jsx("div",{className:"flex gap-8",children:i.map(a=>C.jsxs("div",{className:"flex flex-col items-center",children:[C.jsx("p",{className:"text-md font-medium",children:a.value}),C.jsx("p",{className:"text-sm",children:a.label})]},a.label))})]})}function dv(){const{t:e}=qe(),{session:t}=kt(),n=t.contact,[r,i]=z.useState("rewards");if(!n)return C.jsx(C.Fragment,{children:e("contactNotFound")});const a=()=>{switch(r){case"profile":return C.jsx(sv,{});case"rewards":return C.jsx(lv,{});case"vouchers":return C.jsx(cv,{})}};return C.jsx("div",{className:"container m-auto flex h-full p-8",children:C.jsx(Ot,{children:C.jsxs("div",{className:"flex h-full flex-col gap-6 overflow-hidden",children:[C.jsx(uv,{}),C.jsx("hr",{}),C.jsx("div",{children:C.jsx(Nh,{elements:[{key:"profile",label:e("profile"),active:r==="profile"},{key:"rewards",label:e("rewards"),active:r==="rewards"},{key:"vouchers",label:e("vouchers"),active:r==="vouchers"}],onClick:s=>i(s)})}),a()]})})})}function fv(){const{session:e}=kt(),t=It(),{t:n}=qe();return C.jsxs("div",{className:"m-auto flex flex-col items-center gap-4",children:[C.jsx("p",{children:n("noContactLinked")}),C.jsxs("div",{className:"flex gap-4",children:[e.input_data.enable_registration&&C.jsx(Xe,{label:n("registerNewContact"),onClick:()=>t("register")}),e.input_data.enable_email_identification&&C.jsx(Xe,{label:n("linkViaEmail"),onClick:()=>t("email")}),C.jsx(Xe,{label:n("linkViaCard"),onClick:()=>t("identifier")})]})]})}function Tu(){const{session:e}=kt();return e&&(e.contact?C.jsx(dv,{}):C.jsx(fv,{}))}function ju(){const e=It();return C.jsx("div",{className:"container m-auto",children:C.jsx(Ot,{children:C.jsx(Ui,{callback:()=>e("../")})})})}function Iu(){const[e,t]=z.useState(""),{session:n,mutate:r}=kt(),i=It(),{t:a}=qe(),s=async()=>{n&&(await vo.setContact(n.uuid,{email:e}),await r(),Re.success(a("contactSavedToSession")),i("../"))};return C.jsx("div",{className:"container m-auto",children:C.jsx(Ot,{children:C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),C.jsx(cr,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,h)=>t(h)}),C.jsx("div",{children:C.jsx(Xe,{type:"submit",label:a("linkContact"),onClick:s})})]})})})}function Au(){const[e,t]=z.useState(""),{session:n,mutate:r}=kt(),i=It(),{t:a}=qe();console.log("hoi");const s=async()=>{n&&(await _i.create(e),await r(),Re.success(a("contactSavedToSession")),i("../"))};return C.jsx("div",{className:"container m-auto",children:C.jsx(Ot,{children:C.jsxs("div",{className:"flex flex-col gap-3",children:[C.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),C.jsx(cr,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,h)=>t(h)}),C.jsx("div",{children:C.jsx(Xe,{type:"submit",label:a("register"),onClick:s})})]})})})}zn([{path:"/",element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Ru,{})},{path:"balance",element:C.jsx(Lu,{})}]}]);function Ru(){const e=It();return C.jsx("div",{className:"container m-auto",children:C.jsx(Ot,{children:C.jsx(Ui,{callback:()=>e("balance")})})})}function Lu(){const{t:e}=qe(),{balance:t,mutate:n}=xh(),[r,i]=z.useState(""),[a,s]=z.useState(1),[u,h]=z.useState(!1),v=async()=>{r&&(await wh.transaction({amount_in_cents:parseFloat(r)*100*a}),await n(),Re.success(e("prepaidTransactionCreated")),h(!1))};return C.jsxs("div",{className:"container m-auto",children:[C.jsxs(Ot,{children:[C.jsxs(He,{size:"lg",align:"center",weight:"normal",children:[e("prepaidBalance"),": ",t==null?void 0:t.balance]}),C.jsx("div",{className:"mt-6 flex justify-center",children:C.jsxs("div",{className:"grid w-1/3 grid-cols-2 gap-x-2",children:[C.jsx(Xe,{label:e("upgrade"),onClick:()=>{h(!0),s(1)}}),C.jsx(Xe,{label:e("depreciate"),onClick:()=>{h(!0),s(-1)}})]})})]}),C.jsx(ur,{isOpen:u,onClose:()=>h(!1),children:C.jsxs("div",{className:"flex flex-col gap-4",children:[C.jsx(Di,{value:r,valueSetter:i}),C.jsx(Xe,{label:e("submit"),onClick:v})]})})]})}zn([{path:"/",element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Du,{})},{path:"success",element:C.jsx(Mu,{})}]}]);function Du(){const{t:e}=qe(),[t,n]=z.useState(""),[r,i]=z.useState(!1),{session:a,mutate:s}=kt(),u=It(),h=async()=>{if(t){const{data:{data:v}}=await bh.create({unit_value:parseFloat(t)});await s(),u("success",{state:{transaction:v}})}};return z.useEffect(()=>{a&&a.contact&&i(!0)},[u,a]),C.jsxs("div",{className:"container m-auto",children:[C.jsx(Ot,{children:C.jsx(Ui,{})}),C.jsx(ur,{isOpen:r,children:C.jsxs("div",{className:"flex flex-col gap-4",children:[C.jsxs("p",{className:"text-center",children:[e("unitValue"),":"]}),C.jsx(Di,{value:t,valueSetter:n}),C.jsx(Xe,{label:e("submit"),onClick:h})]})})]})}function Mu(){const{state:e}=gn(),{t}=qe(),{session:{loyalty_program:n}}=kt(),{contact:r}=yo();return C.jsx("div",{className:"m-auto",children:C.jsx(ml,{children:C.jsxs("div",{className:"mt-8 flex w-96 flex-col gap-4",children:[C.jsxs(He,{size:"lg",weight:"bold",align:"center",children:[t("creditReceptionCreated"),"!"]}),e&&e.transaction&&C.jsxs(He,{color:"text-gray-500",align:"center",children:["+",e.transaction.credits," ",n.custom_credit_name||t("points").toLowerCase()]}),C.jsx("div",{className:"h-24"}),r&&C.jsxs("div",{className:"flex justify-between",children:[C.jsxs(He,{color:"text-gray-200",children:[t("currentCreditBalance"),":"]}),C.jsxs(He,{color:"text-gray-200",children:[r.credit_balance.balance," ",n.custom_credit_name||t("points").toLowerCase()]})]})]})})})}zn([{path:"/",element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Fu,{})},{path:"success",element:C.jsx(Uu,{})}]}]);function Fu(){const{t:e}=qe(),[t,n]=z.useState(""),[r,i]=z.useState(""),[a,s]=z.useState(!1),[u,h]=z.useState(!1),{session:v}=kt(),m=v==null?void 0:v.input_data.scanner_type,b=It(),l=z.useCallback(async()=>{r&&await vo.setContact(v.uuid,{contact_identifier_value:r});const{data:{data:o}}=await Ri.redeemByCode(t);b("success",{state:{voucher:o}})},[t,r,b,v]),g=z.useCallback(async()=>{if(v){s(!0);const{data:{data:o}}=await Ri.get(t);o.contact||v.contact?await l():h(!0),s(!1)}},[t,l,v]);return z.useEffect(()=>{m===Rt.CAMERA&&t&&!a&&(async()=>await g())()},[t,a,m,g,u]),C.jsxs("div",{className:"container m-auto",children:[C.jsxs(Ot,{children:[C.jsx(wo,{dataSetter:n,type:m,label:e("voucherCode")}),m===Rt.HAND_SCANNER&&C.jsx("div",{className:"pt-3",children:C.jsx(Xe,{type:"submit",label:e("redeemVoucher"),onClick:g})})]}),C.jsxs(ur,{isOpen:u,onClose:()=>h(!1),children:[C.jsx("p",{className:"pb-4 text-error-600",children:e("noContactLinkedToVoucher")}),C.jsx(wo,{dataSetter:i,type:m,label:e("contactIdentifier")}),m===Rt.HAND_SCANNER&&C.jsx("div",{className:"pt-3",children:C.jsx(Xe,{type:"submit",label:e("redeemVoucher"),onClick:l})})]})]})}function Uu(){const{t:e}=qe(),{state:t}=gn();return C.jsx("div",{className:"m-auto",children:C.jsx(ml,{children:C.jsx(He,{size:"lg",align:"center",className:"pt-6",children:e("voucherWithCodeSuccessfullyRedeemed",{code:t.voucher.code})})})})}const hv=zn([{path:"/",element:C.jsx(rv,{})},{path:":portalSessionUuid",element:C.jsx(ov,{}),errorElement:C.jsx("div",{children:"No session UUID"})},{path:Zt.REDEEM_GIFTCARD,element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx($a,{})},{path:"redeem/:hash",element:C.jsx(Nu,{})}]},{path:Zt.TOP_UP_GIFTCARD,element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx($a,{})},{path:"top-up/:hash",element:C.jsx(_u,{})}]},{path:Zt.PORTAL,element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Tu,{})},{path:"email",element:C.jsx(Iu,{})},{path:"identifier",element:C.jsx(ju,{})},{path:"register",element:C.jsx(Au,{})}]},{path:Zt.PREPAID,element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Ru,{})},{path:"balance",element:C.jsx(Lu,{})}]},{path:Zt.SAVE,element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Du,{})},{path:"success",element:C.jsx(Mu,{})}]},{path:Zt.VOUCHER,element:C.jsx(zt,{}),children:[{index:!0,element:C.jsx(Fu,{})},{path:"success",element:C.jsx(Uu,{})}]}]),$u=()=>C.jsx(Vy,{router:hv});function pv(e){return C.jsx(mg,{config:e,payload:{type:e.type??Bn.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,...e.amountInCents&&{amount_in_cents:e.amountInCents},...e.allowMultipleGiftcards&&{allow_multiple_giftcards:e.allowMultipleGiftcards},...e.scannerType&&{scanner_type:e.scannerType},...e.enableRegistration&&{enable_registration:e.enableRegistration},...e.enableEmailIdentification&&{enable_email_identification:e.enableEmailIdentification},...e.enableOnScreenKeyboard&&{enable_on_screen_keyboard:e.enableOnScreenKeyboard}},children:C.jsx($u,{})})}function mv({uuid:e,host:t}){const[n,r]=z.useState(!1);return z.useEffect(()=>{n||(it.initialize(void 0,t),r(!0))},[t,n]),n?C.jsxs(z.StrictMode,{children:[C.jsx(al,{sessionUuid:e,children:C.jsxs("div",{className:"flex h-screen w-screen bg-primary-50",children:[e&&C.jsx(pl,{}),C.jsx($u,{})]})}),C.jsx(cs,{position:"bottom-center"})]}):C.jsx(C.Fragment,{children:"Initializing..."})}const gv=Object.freeze(Object.defineProperty({__proto__:null,createWorker:()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
101
+ class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
102
+ class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
103
+ this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
104
+ function ca(a,b){let c=[],d="";b=a.readBits([8,16,16][b]);for(let e=0;e<b;e++){let f=a.readBits(8);c.push(f)}try{d+=decodeURIComponent(c.map(e=>\`%\${("0"+e.toString(16)).substr(-2)}\`).join(""))}catch(e){}return{bytes:c,text:d}}
105
+ function da(a,b){a=new ba(a);let c=9>=b?0:26>=b?1:2;for(b={text:"",bytes:[],chunks:[],version:b};4<=a.available();){var d=a.readBits(4);if(d===D.Terminator)return b;if(d===D.ECI)0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(7)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(14)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(21)}):b.chunks.push({type:B.ECI,assignmentNumber:-1});else if(d===D.Numeric){var e=a,f=[];d="";for(var g=
106
+ e.readBits([10,12,14][c]);3<=g;){var h=e.readBits(10);if(1E3<=h)throw Error("Invalid numeric value above 999");var k=Math.floor(h/100),m=Math.floor(h/10)%10;h%=10;f.push(48+k,48+m,48+h);d+=k.toString()+m.toString()+h.toString();g-=3}if(2===g){g=e.readBits(7);if(100<=g)throw Error("Invalid numeric value above 99");e=Math.floor(g/10);g%=10;f.push(48+e,48+g);d+=e.toString()+g.toString()}else if(1===g){e=e.readBits(4);if(10<=e)throw Error("Invalid numeric value above 9");f.push(48+e);d+=e.toString()}b.text+=
107
+ d;b.bytes.push(...f);b.chunks.push({type:B.Numeric,text:d})}else if(d===D.Alphanumeric){e=a;f=[];d="";for(g=e.readBits([9,11,13][c]);2<=g;)m=e.readBits(11),k=Math.floor(m/45),m%=45,f.push(F[k].charCodeAt(0),F[m].charCodeAt(0)),d+=F[k]+F[m],g-=2;1===g&&(e=e.readBits(6),f.push(F[e].charCodeAt(0)),d+=F[e]);b.text+=d;b.bytes.push(...f);b.chunks.push({type:B.Alphanumeric,text:d})}else if(d===D.Byte)d=ca(a,c),b.text+=d.text,b.bytes.push(...d.bytes),b.chunks.push({type:B.Byte,bytes:d.bytes,text:d.text});
108
+ else if(d===D.Kanji){f=a;d=[];e=f.readBits([8,10,12][c]);for(g=0;g<e;g++)k=f.readBits(13),k=Math.floor(k/192)<<8|k%192,k=7936>k?k+33088:k+49472,d.push(k>>8,k&255);f=(new TextDecoder("shift-jis")).decode(Uint8Array.from(d));b.text+=f;b.bytes.push(...d);b.chunks.push({type:B.Kanji,bytes:d,text:f})}else d===D.StructuredAppend&&b.chunks.push({type:B.StructuredAppend,currentSequence:a.readBits(4),totalSequence:a.readBits(4),parity:a.readBits(8)})}if(0===a.available()||0===a.readBits(a.available()))return b}
109
+ class G{constructor(a,b){if(0===b.length)throw Error("No coefficients.");this.field=a;let c=b.length;if(1<c&&0===b[0]){let d=1;for(;d<c&&0===b[d];)d++;if(d===c)this.coefficients=a.zero.coefficients;else for(this.coefficients=new Uint8ClampedArray(c-d),a=0;a<this.coefficients.length;a++)this.coefficients[a]=b[d+a]}else this.coefficients=b}degree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(a){return this.coefficients[this.coefficients.length-1-a]}addOrSubtract(a){if(this.isZero())return a;
110
+ if(a.isZero())return this;let b=this.coefficients;a=a.coefficients;b.length>a.length&&([b,a]=[a,b]);let c=new Uint8ClampedArray(a.length),d=a.length-b.length;for(var e=0;e<d;e++)c[e]=a[e];for(e=d;e<a.length;e++)c[e]=b[e-d]^a[e];return new G(this.field,c)}multiply(a){if(0===a)return this.field.zero;if(1===a)return this;let b=this.coefficients.length,c=new Uint8ClampedArray(b);for(let d=0;d<b;d++)c[d]=this.field.multiply(this.coefficients[d],a);return new G(this.field,c)}multiplyPoly(a){if(this.isZero()||
111
+ a.isZero())return this.field.zero;let b=this.coefficients,c=b.length;a=a.coefficients;let d=a.length,e=new Uint8ClampedArray(c+d-1);for(let f=0;f<c;f++){let g=b[f];for(let h=0;h<d;h++)e[f+h]=H(e[f+h],this.field.multiply(g,a[h]))}return new G(this.field,e)}multiplyByMonomial(a,b){if(0>a)throw Error("Invalid degree less than 0");if(0===b)return this.field.zero;let c=this.coefficients.length;a=new Uint8ClampedArray(c+a);for(let d=0;d<c;d++)a[d]=this.field.multiply(this.coefficients[d],b);return new G(this.field,
112
+ a)}evaluateAt(a){let b=0;if(0===a)return this.getCoefficient(0);let c=this.coefficients.length;if(1===a)return this.coefficients.forEach(d=>{b^=d}),b;b=this.coefficients[0];for(let d=1;d<c;d++)b=H(this.field.multiply(a,b),this.coefficients[d]);return b}}function H(a,b){return a^b}
113
+ class ea{constructor(a,b,c){this.primitive=a;this.size=b;this.generatorBase=c;this.expTable=Array(this.size);this.logTable=Array(this.size);a=1;for(b=0;b<this.size;b++)this.expTable[b]=a,a*=2,a>=this.size&&(a=(a^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new G(this,Uint8ClampedArray.from([0]));this.one=new G(this,Uint8ClampedArray.from([1]))}multiply(a,b){return 0===a||0===b?0:this.expTable[(this.logTable[a]+this.logTable[b])%(this.size-1)]}inverse(a){if(0===
114
+ a)throw Error("Can't invert 0");return this.expTable[this.size-this.logTable[a]-1]}buildMonomial(a,b){if(0>a)throw Error("Invalid monomial degree less than 0");if(0===b)return this.zero;a=new Uint8ClampedArray(a+1);a[0]=b;return new G(this,a)}log(a){if(0===a)throw Error("Can't take log(0)");return this.logTable[a]}exp(a){return this.expTable[a]}}
115
+ function fa(a,b,c,d){b.degree()<c.degree()&&([b,c]=[c,b]);let e=a.zero;for(var f=a.one;c.degree()>=d/2;){var g=b;let h=e;b=c;e=f;if(b.isZero())return null;c=g;f=a.zero;g=b.getCoefficient(b.degree());for(g=a.inverse(g);c.degree()>=b.degree()&&!c.isZero();){let k=c.degree()-b.degree(),m=a.multiply(c.getCoefficient(c.degree()),g);f=f.addOrSubtract(a.buildMonomial(k,m));c=c.addOrSubtract(b.multiplyByMonomial(k,m))}f=f.multiplyPoly(e).addOrSubtract(h);if(c.degree()>=b.degree())return null}d=f.getCoefficient(0);
116
+ if(0===d)return null;a=a.inverse(d);return[f.multiply(a),c.multiply(a)]}
117
+ function ha(a,b){let c=new Uint8ClampedArray(a.length);c.set(a);a=new ea(285,256,0);var d=new G(a,c),e=new Uint8ClampedArray(b),f=!1;for(var g=0;g<b;g++){var h=d.evaluateAt(a.exp(g+a.generatorBase));e[e.length-1-g]=h;0!==h&&(f=!0)}if(!f)return c;d=new G(a,e);d=fa(a,a.buildMonomial(b,1),d,b);if(null===d)return null;b=d[0];g=b.degree();if(1===g)b=[b.getCoefficient(1)];else{e=Array(g);f=0;for(h=1;h<a.size&&f<g;h++)0===b.evaluateAt(h)&&(e[f]=a.inverse(h),f++);b=f!==g?null:e}if(null==b)return null;e=d[1];
118
+ f=b.length;d=Array(f);for(g=0;g<f;g++){h=a.inverse(b[g]);let k=1;for(let m=0;m<f;m++)g!==m&&(k=a.multiply(k,H(1,a.multiply(b[m],h))));d[g]=a.multiply(e.evaluateAt(h),a.inverse(k));0!==a.generatorBase&&(d[g]=a.multiply(d[g],h))}for(e=0;e<b.length;e++){f=c.length-1-a.log(b[e]);if(0>f)return null;c[f]^=d[e]}return c}
119
+ let I=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,
120
+ dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,
121
+ ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},
122
+ {infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,
123
+ 34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,
124
+ ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},
125
+ {numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},
126
+ {numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,
127
+ dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,
128
+ dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},
129
+ {ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},
130
+ {ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},
131
+ {numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,
132
+ ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,
133
+ 74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,
134
+ versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,
135
+ dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,
136
+ dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},
137
+ {ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},
138
+ {numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},
139
+ {numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},
140
+ {numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},
141
+ {numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,
142
+ ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,
143
+ dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,
144
+ dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
145
+ {ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},
146
+ {numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,
147
+ ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,
148
+ 26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},
149
+ {infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},
150
+ {numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,
151
+ dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},
152
+ {ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,
153
+ dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},
154
+ {ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,
155
+ dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
156
+ {ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,
157
+ dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],
158
+ errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,
159
+ versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},
160
+ {numBlocks:61,dataCodewordsPerBlock:16}]}]}];function J(a,b){a^=b;for(b=0;a;)b++,a&=a-1;return b}function K(a,b){return b<<1|a}
161
+ let ia=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,
162
+ dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,
163
+ formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,
164
+ dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],ja=[a=>0===(a.y+a.x)%2,a=>0===a.y%2,a=>0===a.x%3,a=>0===(a.y+a.x)%3,a=>0===(Math.floor(a.y/2)+Math.floor(a.x/3))%2,a=>0===a.x*a.y%
165
+ 2+a.x*a.y%3,a=>0===(a.y*a.x%2+a.y*a.x%3)%2,a=>0===((a.y+a.x)%2+a.y*a.x%3)%2];
166
+ function ka(a,b,c){c=ja[c.dataMask];let d=a.height;var e=17+4*b.versionNumber;let f=x.createEmpty(e,e);f.setRegion(0,0,9,9,!0);f.setRegion(e-8,0,8,9,!0);f.setRegion(0,e-8,9,8,!0);for(var g of b.alignmentPatternCenters)for(var h of b.alignmentPatternCenters)6===g&&6===h||6===g&&h===e-7||g===e-7&&6===h||f.setRegion(g-2,h-2,5,5,!0);f.setRegion(6,9,1,e-17,!0);f.setRegion(9,6,e-17,1,!0);6<b.versionNumber&&(f.setRegion(e-11,0,3,6,!0),f.setRegion(0,e-11,6,3,!0));b=[];h=g=0;e=!0;for(let k=d-1;0<k;k-=2){6===
167
+ k&&k--;for(let m=0;m<d;m++){let l=e?d-1-m:m;for(let n=0;2>n;n++){let q=k-n;if(!f.get(q,l)){h++;let r=a.get(q,l);c({y:l,x:q})&&(r=!r);g=g<<1|r;8===h&&(b.push(g),g=h=0)}}}e=!e}return b}
168
+ function la(a){var b=a.height,c=Math.floor((b-17)/4);if(6>=c)return I[c-1];c=0;for(var d=5;0<=d;d--)for(var e=b-9;e>=b-11;e--)c=K(a.get(e,d),c);d=0;for(e=5;0<=e;e--)for(let g=b-9;g>=b-11;g--)d=K(a.get(e,g),d);a=Infinity;let f;for(let g of I){if(g.infoBits===c||g.infoBits===d)return g;b=J(c,g.infoBits);b<a&&(f=g,a=b);b=J(d,g.infoBits);b<a&&(f=g,a=b)}if(3>=a)return f}
169
+ function ma(a){let b=0;for(var c=0;8>=c;c++)6!==c&&(b=K(a.get(c,8),b));for(c=7;0<=c;c--)6!==c&&(b=K(a.get(8,c),b));var d=a.height;c=0;for(var e=d-1;e>=d-7;e--)c=K(a.get(8,e),c);for(e=d-8;e<d;e++)c=K(a.get(e,8),c);a=Infinity;d=null;for(let {bits:f,formatInfo:g}of ia){if(f===b||f===c)return g;e=J(b,f);e<a&&(d=g,a=e);b!==c&&(e=J(c,f),e<a&&(d=g,a=e))}return 3>=a?d:null}
170
+ function na(a,b,c){let d=b.errorCorrectionLevels[c],e=[],f=0;d.ecBlocks.forEach(h=>{for(let k=0;k<h.numBlocks;k++)e.push({numDataCodewords:h.dataCodewordsPerBlock,codewords:[]}),f+=h.dataCodewordsPerBlock+d.ecCodewordsPerBlock});if(a.length<f)return null;a=a.slice(0,f);b=d.ecBlocks[0].dataCodewordsPerBlock;for(c=0;c<b;c++)for(var g of e)g.codewords.push(a.shift());if(1<d.ecBlocks.length)for(g=d.ecBlocks[0].numBlocks,b=d.ecBlocks[1].numBlocks,c=0;c<b;c++)e[g+c].codewords.push(a.shift());for(;0<a.length;)for(let h of e)h.codewords.push(a.shift());
171
+ return e}function L(a){let b=la(a);if(!b)return null;var c=ma(a);if(!c)return null;a=ka(a,b,c);var d=na(a,b,c.errorCorrectionLevel);if(!d)return null;c=d.reduce((e,f)=>e+f.numDataCodewords,0);c=new Uint8ClampedArray(c);a=0;for(let e of d){d=ha(e.codewords,e.codewords.length-e.numDataCodewords);if(!d)return null;for(let f=0;f<e.numDataCodewords;f++)c[a++]=d[f]}try{return da(c,b.versionNumber)}catch(e){return null}}
172
+ function M(a,b,c,d){var e=a.x-b.x+c.x-d.x;let f=a.y-b.y+c.y-d.y;if(0===e&&0===f)return{a11:b.x-a.x,a12:b.y-a.y,a13:0,a21:c.x-b.x,a22:c.y-b.y,a23:0,a31:a.x,a32:a.y,a33:1};let g=b.x-c.x;var h=d.x-c.x;let k=b.y-c.y,m=d.y-c.y;c=g*m-h*k;h=(e*m-h*f)/c;e=(g*f-e*k)/c;return{a11:b.x-a.x+h*b.x,a12:b.y-a.y+h*b.y,a13:h,a21:d.x-a.x+e*d.x,a22:d.y-a.y+e*d.y,a23:e,a31:a.x,a32:a.y,a33:1}}
173
+ function oa(a,b,c,d){a=M(a,b,c,d);return{a11:a.a22*a.a33-a.a23*a.a32,a12:a.a13*a.a32-a.a12*a.a33,a13:a.a12*a.a23-a.a13*a.a22,a21:a.a23*a.a31-a.a21*a.a33,a22:a.a11*a.a33-a.a13*a.a31,a23:a.a13*a.a21-a.a11*a.a23,a31:a.a21*a.a32-a.a22*a.a31,a32:a.a12*a.a31-a.a11*a.a32,a33:a.a11*a.a22-a.a12*a.a21}}
174
+ function pa(a,b){var c=oa({x:3.5,y:3.5},{x:b.dimension-3.5,y:3.5},{x:b.dimension-6.5,y:b.dimension-6.5},{x:3.5,y:b.dimension-3.5}),d=M(b.topLeft,b.topRight,b.alignmentPattern,b.bottomLeft),e=d.a11*c.a11+d.a21*c.a12+d.a31*c.a13,f=d.a12*c.a11+d.a22*c.a12+d.a32*c.a13,g=d.a13*c.a11+d.a23*c.a12+d.a33*c.a13,h=d.a11*c.a21+d.a21*c.a22+d.a31*c.a23,k=d.a12*c.a21+d.a22*c.a22+d.a32*c.a23,m=d.a13*c.a21+d.a23*c.a22+d.a33*c.a23,l=d.a11*c.a31+d.a21*c.a32+d.a31*c.a33,n=d.a12*c.a31+d.a22*c.a32+d.a32*c.a33,q=d.a13*
175
+ c.a31+d.a23*c.a32+d.a33*c.a33;c=x.createEmpty(b.dimension,b.dimension);d=(r,u)=>{const p=g*r+m*u+q;return{x:(e*r+h*u+l)/p,y:(f*r+k*u+n)/p}};for(let r=0;r<b.dimension;r++)for(let u=0;u<b.dimension;u++){let p=d(u+.5,r+.5);c.set(u,r,a.get(Math.floor(p.x),Math.floor(p.y)))}return{matrix:c,mappingFunction:d}}let N=(a,b)=>Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2));function O(a){return a.reduce((b,c)=>b+c)}
176
+ function qa(a,b,c){let d=N(a,b),e=N(b,c),f=N(a,c),g,h,k;e>=d&&e>=f?[g,h,k]=[b,a,c]:f>=e&&f>=d?[g,h,k]=[a,b,c]:[g,h,k]=[a,c,b];0>(k.x-h.x)*(g.y-h.y)-(k.y-h.y)*(g.x-h.x)&&([g,k]=[k,g]);return{bottomLeft:g,topLeft:h,topRight:k}}
177
+ function ra(a,b,c,d){d=(O(P(a,c,d,5))/7+O(P(a,b,d,5))/7+O(P(c,a,d,5))/7+O(P(b,a,d,5))/7)/4;if(1>d)throw Error("Invalid module size");b=Math.round(N(a,b)/d);a=Math.round(N(a,c)/d);a=Math.floor((b+a)/2)+7;switch(a%4){case 0:a++;break;case 2:a--}return{dimension:a,moduleSize:d}}
178
+ function Q(a,b,c,d){let e=[{x:Math.floor(a.x),y:Math.floor(a.y)}];var f=Math.abs(b.y-a.y)>Math.abs(b.x-a.x);if(f){var g=Math.floor(a.y);var h=Math.floor(a.x);a=Math.floor(b.y);b=Math.floor(b.x)}else g=Math.floor(a.x),h=Math.floor(a.y),a=Math.floor(b.x),b=Math.floor(b.y);let k=Math.abs(a-g),m=Math.abs(b-h),l=Math.floor(-k/2),n=g<a?1:-1,q=h<b?1:-1,r=!0;for(let u=g,p=h;u!==a+n;u+=n){g=f?p:u;h=f?u:p;if(c.get(g,h)!==r&&(r=!r,e.push({x:g,y:h}),e.length===d+1))break;l+=m;if(0<l){if(p===b)break;p+=q;l-=k}}c=
179
+ [];for(f=0;f<d;f++)e[f]&&e[f+1]?c.push(N(e[f],e[f+1])):c.push(0);return c}function P(a,b,c,d){let e=b.y-a.y,f=b.x-a.x;b=Q(a,b,c,Math.ceil(d/2));a=Q(a,{x:a.x-f,y:a.y-e},c,Math.ceil(d/2));c=b.shift()+a.shift()-1;return a.concat(c).concat(...b)}function R(a,b){let c=O(a)/O(b),d=0;b.forEach((e,f)=>{d+=Math.pow(a[f]-e*c,2)});return{averageSize:c,error:d}}
180
+ function S(a,b,c){try{let d=P(a,{x:-1,y:a.y},c,b.length),e=P(a,{x:a.x,y:-1},c,b.length),f=P(a,{x:Math.max(0,a.x-a.y)-1,y:Math.max(0,a.y-a.x)-1},c,b.length),g=P(a,{x:Math.min(c.width,a.x+a.y)+1,y:Math.min(c.height,a.y+a.x)+1},c,b.length),h=R(d,b),k=R(e,b),m=R(f,b),l=R(g,b),n=(h.averageSize+k.averageSize+m.averageSize+l.averageSize)/4;return Math.sqrt(h.error*h.error+k.error*k.error+m.error*m.error+l.error*l.error)+(Math.pow(h.averageSize-n,2)+Math.pow(k.averageSize-n,2)+Math.pow(m.averageSize-n,2)+
181
+ Math.pow(l.averageSize-n,2))/n}catch(d){return Infinity}}function T(a,b){for(var c=Math.round(b.x);a.get(c,Math.round(b.y));)c--;for(var d=Math.round(b.x);a.get(d,Math.round(b.y));)d++;c=(c+d)/2;for(d=Math.round(b.y);a.get(Math.round(c),d);)d--;for(b=Math.round(b.y);a.get(Math.round(c),b);)b++;return{x:c,y:(d+b)/2}}
182
+ function sa(a){var b=[],c=[];let d=[];var e=[];for(let p=0;p<=a.height;p++){var f=0,g=!1;let t=[0,0,0,0,0];for(let v=-1;v<=a.width;v++){var h=a.get(v,p);if(h===g)f++;else{t=[t[1],t[2],t[3],t[4],f];f=1;g=h;var k=O(t)/7;k=Math.abs(t[0]-k)<k&&Math.abs(t[1]-k)<k&&Math.abs(t[2]-3*k)<3*k&&Math.abs(t[3]-k)<k&&Math.abs(t[4]-k)<k&&!h;var m=O(t.slice(-3))/3;h=Math.abs(t[2]-m)<m&&Math.abs(t[3]-m)<m&&Math.abs(t[4]-m)<m&&h;if(k){let z=v-t[3]-t[4],y=z-t[2];k={startX:y,endX:z,y:p};m=c.filter(w=>y>=w.bottom.startX&&
183
+ y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<m.length?m[0].bottom=k:c.push({top:k,bottom:k})}if(h){let z=v-t[4],y=z-t[3];h={startX:y,y:p,endX:z};k=e.filter(w=>y>=w.bottom.startX&&y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<k.length?
184
+ k[0].bottom=h:e.push({top:h,bottom:h})}}}b.push(...c.filter(v=>v.bottom.y!==p&&2<=v.bottom.y-v.top.y));c=c.filter(v=>v.bottom.y===p);d.push(...e.filter(v=>v.bottom.y!==p));e=e.filter(v=>v.bottom.y===p)}b.push(...c.filter(p=>2<=p.bottom.y-p.top.y));d.push(...e);c=[];for(var l of b)2>l.bottom.y-l.top.y||(b=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4,e=(l.top.y+l.bottom.y+1)/2,a.get(Math.round(b),Math.round(e))&&(f=[l.top.endX-l.top.startX,l.bottom.endX-l.bottom.startX,l.bottom.y-l.top.y+
185
+ 1],f=O(f)/f.length,g=S({x:Math.round(b),y:Math.round(e)},[1,1,3,1,1],a),c.push({score:g,x:b,y:e,size:f})));if(3>c.length)return null;c.sort((p,t)=>p.score-t.score);l=[];for(b=0;b<Math.min(c.length,5);++b){e=c[b];f=[];for(var n of c)n!==e&&f.push(Object.assign(Object.assign({},n),{score:n.score+Math.pow(n.size-e.size,2)/e.size}));f.sort((p,t)=>p.score-t.score);l.push({points:[e,f[0],f[1]],score:e.score+f[0].score+f[1].score})}l.sort((p,t)=>p.score-t.score);let {topRight:q,topLeft:r,bottomLeft:u}=qa(...l[0].points);
186
+ l=U(a,d,q,r,u);n=[];l&&n.push({alignmentPattern:{x:l.alignmentPattern.x,y:l.alignmentPattern.y},bottomLeft:{x:u.x,y:u.y},dimension:l.dimension,topLeft:{x:r.x,y:r.y},topRight:{x:q.x,y:q.y}});l=T(a,q);b=T(a,r);c=T(a,u);(a=U(a,d,l,b,c))&&n.push({alignmentPattern:{x:a.alignmentPattern.x,y:a.alignmentPattern.y},bottomLeft:{x:c.x,y:c.y},topLeft:{x:b.x,y:b.y},topRight:{x:l.x,y:l.y},dimension:a.dimension});return 0===n.length?null:n}
187
+ function U(a,b,c,d,e){let f,g;try{({dimension:f,moduleSize:g}=ra(d,c,e,a))}catch(l){return null}var h=c.x-d.x+e.x,k=c.y-d.y+e.y;c=(N(d,e)+N(d,c))/2/g;e=1-3/c;let m={x:d.x+e*(h-d.x),y:d.y+e*(k-d.y)};b=b.map(l=>{const n=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4;l=(l.top.y+l.bottom.y+1)/2;if(a.get(Math.floor(n),Math.floor(l))){var q=S({x:Math.floor(n),y:Math.floor(l)},[1,1,1],a)+N({x:n,y:l},m);return{x:n,y:l,score:q}}}).filter(l=>!!l).sort((l,n)=>l.score-n.score);return{alignmentPattern:15<=
188
+ c&&b.length?b[0]:m,dimension:f}}
189
+ function V(a){var b=sa(a);if(!b)return null;for(let e of b){b=pa(a,e);var c=b.matrix;if(null==c)c=null;else{var d=L(c);if(d)c=d;else{for(d=0;d<c.width;d++)for(let f=d+1;f<c.height;f++)c.get(d,f)!==c.get(f,d)&&(c.set(d,f,!c.get(d,f)),c.set(f,d,!c.get(f,d)));c=L(c)}}if(c)return{binaryData:c.bytes,data:c.text,chunks:c.chunks,version:c.version,location:{topRightCorner:b.mappingFunction(e.dimension,0),topLeftCorner:b.mappingFunction(0,0),bottomRightCorner:b.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:b.mappingFunction(0,
190
+ e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern},matrix:b.matrix}}return null}let ta={inversionAttempts:"attemptBoth",greyScaleWeights:{red:.2126,green:.7152,blue:.0722,useIntegerApproximation:!1},canOverwriteImage:!0};function W(a,b){Object.keys(b).forEach(c=>{a[c]=b[c]})}
191
+ function X(a,b,c,d={}){let e=Object.create(null);W(e,ta);W(e,d);d="onlyInvert"===e.inversionAttempts||"invertFirst"===e.inversionAttempts;var f="attemptBoth"===e.inversionAttempts||d;var g=e.greyScaleWeights,h=e.canOverwriteImage,k=b*c;if(a.length!==4*k)throw Error("Malformed data passed to binarizer.");var m=0;if(h){var l=new Uint8ClampedArray(a.buffer,m,k);m+=k}l=new A(b,c,l);if(g.useIntegerApproximation)for(var n=0;n<c;n++)for(var q=0;q<b;q++){var r=4*(n*b+q);l.set(q,n,g.red*a[r]+g.green*a[r+1]+
192
+ g.blue*a[r+2]+128>>8)}else for(n=0;n<c;n++)for(q=0;q<b;q++)r=4*(n*b+q),l.set(q,n,g.red*a[r]+g.green*a[r+1]+g.blue*a[r+2]);g=Math.ceil(b/8);n=Math.ceil(c/8);q=g*n;if(h){var u=new Uint8ClampedArray(a.buffer,m,q);m+=q}u=new A(g,n,u);for(q=0;q<n;q++)for(r=0;r<g;r++){var p=Infinity,t=0;for(var v=0;8>v;v++)for(let w=0;8>w;w++){let aa=l.get(8*r+w,8*q+v);p=Math.min(p,aa);t=Math.max(t,aa)}v=(p+t)/2;v=Math.min(255,1.11*v);24>=t-p&&(v=p/2,0<q&&0<r&&(t=(u.get(r,q-1)+2*u.get(r-1,q)+u.get(r-1,q-1))/4,p<t&&(v=t)));
193
+ u.set(r,q,v)}h?(q=new Uint8ClampedArray(a.buffer,m,k),m+=k,q=new x(q,b)):q=x.createEmpty(b,c);r=null;f&&(h?(a=new Uint8ClampedArray(a.buffer,m,k),r=new x(a,b)):r=x.createEmpty(b,c));for(b=0;b<n;b++)for(a=0;a<g;a++){c=g-3;c=2>a?2:a>c?c:a;h=n-3;h=2>b?2:b>h?h:b;k=0;for(m=-2;2>=m;m++)for(p=-2;2>=p;p++)k+=u.get(c+m,h+p);c=k/25;for(h=0;8>h;h++)for(k=0;8>k;k++)m=8*a+h,p=8*b+k,t=l.get(m,p),q.set(m,p,t<=c),f&&r.set(m,p,!(t<=c))}f=f?{binarized:q,inverted:r}:{binarized:q};let {binarized:z,inverted:y}=f;(f=V(d?
194
+ y:z))||"attemptBoth"!==e.inversionAttempts&&"invertFirst"!==e.inversionAttempts||(f=V(d?z:y));return f}X.default=X;let Y="dontInvert",Z={red:77,green:150,blue:29,useIntegerApproximation:!0};
195
+ self.onmessage=a=>{let b=a.data.id,c=a.data.data;switch(a.data.type){case "decode":(a=X(c.data,c.width,c.height,{inversionAttempts:Y,greyScaleWeights:Z}))?self.postMessage({id:b,type:"qrResult",data:a.data,cornerPoints:[a.location.topLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner,a.location.bottomLeftCorner]}):self.postMessage({id:b,type:"qrResult",data:null});break;case "grayscaleWeights":Z.red=c.red;Z.green=c.green;Z.blue=c.blue;Z.useIntegerApproximation=c.useIntegerApproximation;
196
+ break;case "inversionMode":switch(c){case "original":Y="dontInvert";break;case "invert":Y="onlyInvert";break;case "both":Y="attemptBoth";break;default:throw Error("Invalid inversion mode");}break;case "close":self.close()}}
197
+ `]),{type:"application/javascript"}))},Symbol.toStringTag,{value:"Module"}));tt.DefaultSession=mv,tt.PortalRoute=Zt,tt.PortalSession=pv,tt.PortalType=Bn,tt.ScannerType=Rt,tt.SubscriptionStatus=sr,tt.SubscriptionStrategy=In,tt.VoucherStatus=cl,Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"})});