PageSourceSearch

https://static-prod.rinse.com/assets/bundles/index.1.sha256-75f4d927f5.js

js rinse.com collected 2026-09-24 19:08:48 UTC 147,299 bytes, 6 lines download raw bytes

1import{j as fe}from"./client.1.sha256-50f616e95c.js";import{r as p,R as ge}from"./index.1.sha256-275aa2da58.js";import{c as et}from"./index.1.sha256-6e43092ee0.js";import{r as ba}from"./index.1.sha256-0616baa6cb.js";import{_ as ft,a as ie}from"./objectWithoutPropertiesLoose.1.sha256-24a382e74f.js";import{d as xa,e as Sa}from"./styles.1.sha256-f972488f34.js";import{i as Nt}from"./use-isomorphic-layout-effect.browser.esm.1.sha256-9a8f512fe4.js";import{B as wa}from"./Button.1.sha256-13d8b6757a.js";import{m as je,C as Ea,a as Oa,D as Ta}from"./index.1.sha256-e0b008ebbb.js";import{f as Ei}from"./constants.1.sha256-a2c960d1f0.js";import{j as Ra}from"./utils.1.sha256-c32f88f96a.js";import{u as Aa}from"./useEffectOnce.1.sha256-7d6077ea1a.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"8ecb9db47276e8138d94425f1b94c927f2e61580"}}catch{}})();try{(function(){var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="e1213b10-4d6a-4ae9-9cdf-79272a4b5e09",t._sentryDebugIdIdentifier="sentry-dbid-e1213b10-4d6a-4ae9-9cdf-79272a4b5e09")})()}catch{}(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t._sentryModuleMetadata=t._sentryModuleMetadata||{},t._sentryModuleMetadata[new t.Error().stack]=(function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];if(n!=null)for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])}return e})({},t._sentryModuleMetadata[new t.Error().stack],{"_sentryBundlerPluginAppKey:rinse-frontend":!0})}catch{}})();var Pa=Ca()?p.useLayoutEffect:p.useEffect;function Ca(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Da(){var t=p.useState(Object.create(null)),e=t[1];return p.useCallback(function(){e(Object.create(null))},[])}var Na=function(e){var r=e.children,n=e.type,i=n===void 0?"reach-portal":n,a=p.useRef(null),o=p.useRef(null),s=Da();return Pa(function(){if(a.current){var u=a.current.ownerDocument;return o.current=u?.createElement(i),u.body.appendChild(o.current),s(),function(){o.current&&o.current.ownerDocument&&o.current.ownerDocument.body.removeChild(o.current)}}},[i,s]),o.current?ba.createPortal(r,o.current):p.createElement("span",{ref:a})};var T=function(){return T=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},T.apply(this,arguments)};function vn(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function F(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function X(t,e,r){if(arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}var G;(function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"})(G||(G={}));var dt;(function(t){t.Parent="#_parent",t.Internal="#_internal"})(dt||(dt={}));var Yr=G.Start,pn=G.Stop,$t=G.Raise,kr=G.Send,Oi=G.Cancel,ka=G.NullEvent,yn=G.Assign;G.After;G.DoneState;var Ti=G.Log,Ia=G.Init,Jr=G.Invoke;G.ErrorExecution;var Mn=G.ErrorPlatform,ja=G.ErrorCustom,Ri=G.Update,La=G.Choose,za=G.Pure,Ai=".",_n={},Zr="xstate.guard",Fa="",Zt;function gn(t,e,r){r===void 0&&(r=Ai);var n=kt(t,r),i=kt(e,r);return H(i)?H(n)?i===n:!1:H(n)?n in i:Object.keys(n).every(function(a){return a in i?gn(n[a],i[a]):!1})}function Pi(t){try{return H(t)||typeof t=="number"?"".concat(t):t.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Qr(t,e){try{return pt(t)?t:t.toString().split(e)}catch{throw new Error("'".concat(t,"' is not a valid state path."))}}function Ma(t){return typeof t=="object"&&"value"in t&&"context"in t&&"event"in t&&"_event"in t}function kt(t,e){if(Ma(t))return t.value;if(pt(t))return wr(t);if(typeof t!="string")return t;var r=Qr(t,e);return wr(r)}function wr(t){if(t.length===1)return t[0];for(var e={},r=e,n=0;n<t.length-1;n++)n===t.length-2?r[t[n]]=t[n+1]:(r[t[n]]={},r=r[t[n]]);return e}function At(t,e){for(var r={},n=Object.keys(t),i=0;i<n.length;i++){var a=n[i];r[a]=e(t[a],a,t,i)}return r}function Vn(t,e,r){var n,i,a={};try{for(var o=F(Object.keys(t)),s=o.next();!s.done;s=o.next()){var u=s.value,f=t[u];r(f)&&(a[u]=e(f,u,t))}}catch(c){n={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return a}var _a=function(t){return function(e){var r,n,i=e;try{for(var a=F(t),o=a.next();!o.done;o=a.next()){var s=o.value;i=i[s]}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}};function Va(t,e){return function(r){var n,i,a=r;try{for(var o=F(t),s=o.next();!s.done;s=o.next()){var u=s.value;a=a[e][u]}}catch(f){n={error:f}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return a}}function pr(t){if(!t)return[[]];if(H(t))return[[t]];var e=Q(Object.keys(t).map(function(r){var n=t[r];
vendor: 8,912 bytes, line 1
1return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:pr(t[r]).map(function(i){return[r].concat(i)})}));return e}function Q(t){var e;return(e=[]).concat.apply(e,X([],_(t),!1))}function Ci(t){return pt(t)?t:[t]}function Oe(t){return t===void 0?[]:Ci(t)}function Er(t,e,r){var n,i;if(V(t))return t(e,r.data);var a={};try{for(var o=F(Object.keys(t)),s=o.next();!s.done;s=o.next()){var u=s.value,f=t[u];V(f)?a[u]=f(e,r.data):a[u]=f}}catch(c){n={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return a}function Ba(t){return/^(done|error)\./.test(t)}function Bn(t){return!!(t instanceof Promise||t!==null&&(V(t)||typeof t=="object")&&V(t.then))}function $a(t){return t!==null&&typeof t=="object"&&"transition"in t&&typeof t.transition=="function"}function Ha(t,e){var r,n,i=_([[],[]],2),a=i[0],o=i[1];try{for(var s=F(t),u=s.next();!u.done;u=s.next()){var f=u.value;e(f)?a.push(f):o.push(f)}}catch(c){r={error:c}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[a,o]}function Di(t,e){return At(t.states,function(r,n){if(r){var i=(H(e)?void 0:e[n])||(r?r.current:void 0);if(i)return{current:i,states:Di(r,i)}}})}function Ga(t,e){return{current:e,states:Di(t,e)}}function $n(t,e,r,n){var i=t&&r.reduce(function(a,o){var s,u,f=o.assignment,c={state:n,action:o,_event:e},l={};if(V(f))l=f(a,e.data,c);else try{for(var d=F(Object.keys(f)),h=d.next();!h.done;h=d.next()){var g=h.value,m=f[g];l[g]=V(m)?m(a,e.data,c):m}}catch(A){s={error:A}}finally{try{h&&!h.done&&(u=d.return)&&u.call(d)}finally{if(s)throw s.error}}return Object.assign({},a,l)},t);return i}var Wa=function(){};function pt(t){return Array.isArray(t)}function V(t){return typeof t=="function"}function H(t){return typeof t=="string"}function Ni(t,e){if(t)return H(t)?{type:Zr,name:t,predicate:e?e[t]:void 0}:V(t)?{type:Zr,name:t.name,predicate:t}:t}function qa(t){try{return"subscribe"in t&&V(t.subscribe)}catch{return!1}}var Fe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();Zt={},Zt[Fe]=function(){return this},Zt[Symbol.observable]=function(){return this};function ht(t){return!!t&&"__xstatenode"in t}function Ua(t){return!!t&&typeof t.send=="function"}function Ir(t,e){return H(t)||typeof t=="number"?T({type:t},e):t}function ce(t,e){if(!H(t)&&"$$type"in t&&t.$$type==="scxml")return t;var r=Ir(t);return T({name:r.type,data:r,$$type:"scxml",type:"external"},e)}function tt(t,e){var r=Ci(e).map(function(n){return typeof n>"u"||typeof n=="string"||ht(n)?{target:n,event:t}:T(T({},n),{event:t})});return r}function Ka(t){if(!(t===void 0||t===Fa))return Oe(t)}function ki(t,e,r,n,i){var a=t.options.guards,o={state:i,cond:e,_event:n};if(e.type===Zr)return(a?.[e.name]||e.predicate)(r,n.data,o);var s=a?.[e.type];if(!s)throw new Error("Guard '".concat(e.type,"' is not implemented on machine '").concat(t.id,"'."));return s(r,n.data,o)}function Ii(t){return typeof t=="string"?{type:t}:t}function yr(t,e,r){var n=function(){},i=typeof t=="object",a=i?t:null;return{next:((i?t.next:t)||n).bind(a),error:((i?t.error:e)||n).bind(a),complete:((i?t.complete:r)||n).bind(a)}}function Qt(t,e){return"".concat(t,":invocation[").concat(e,"]")}function en(t){return(t.type===$t||t.type===kr&&t.to===dt.Internal)&&typeof t.delay!="number"}var ct=ce({type:Ia});function tn(t,e){return e&&e[t]||void 0}function _t(t,e){var r;if(H(t)||typeof t=="number"){var n=tn(t,e);V(n)?r={type:t,exec:n}:n?r=n:r={type:t,exec:void 0}}else if(V(t))r={type:t.name||t.toString(),exec:t};else{var n=tn(t.type,e);if(V(n))r=T(T({},t),{exec:n});else if(n){var i=n.type||t.type;r=T(T(T({},n),t),{type:i})}else r=t}return r}var Me=function(t,e){if(!t)return[];var r=pt(t)?t:[t];return r.map(function(n){return _t(n,e)})};function mn(t){var e=_t(t);return T(T({id:H(t)?t:e.id},e),{type:e.type})}function Xa(t,e){return{type:$t,event:typeof t=="function"?t:Ir(t),delay:e?e.delay:void 0,id:e?.id}}function Ya(t,e,r,n){var i={_event:r},a=ce(V(t.event)?t.event(e,r.data,i):t.event),o;if(H(t.delay)){var s=n&&n[t.delay];o=V(s)?s(e,r.data,i):s}else o=V(t.delay)?t.delay(e,r.data,i):t.delay;return T(T({},t),{type:$t,_event:a,delay:o})}function Ja(t,e){return{to:e?e.to:void 0,type:kr,event:V(t)?t:Ir(t),delay:e?e.delay:void 0,id:e&&e.id!==void 0?e.id:V(t)?t.name:Pi(t)}}function Za(t,e,r,n){var i={_event:r},a=ce(V(t.event)?t.event(e,r.data,i):t.event),o;if(H(t.delay)){var s=n&&n[t.delay];o=V(s)?s(e,r.data,i):s}else o=V(t.delay)?t.delay(e,r.data,i):t.delay;var u=V(t.to)?t.to(e,r.data,i):t.to;return T(T({},t),{to:u,_event:a,event:a.data,delay:o})}var Qa=function(t,e,r){return T(T({},t),{value:H(t.expr)?t.expr:t.expr(e,r.data,{_event:r})})},eo=function(t){return{type:Oi,sendId:t}};function to(t){var e=mn(t);return{type:G.Start,activity:e,exec:void 0}}function ro(t){var e=V(t)?t:mn(t);return{type:G.Stop,activity:e,exec:void 0}}function no(t,e,r){var n=V(t.activity)?t.activity(e,r.data):t.activity,i=typeof n=="string"?{id:n}:n,a={type:G.Stop,activity:i};return a}var io=function(t){return{type:yn,assignment:t}};function ao(t,e){var r=e?"#".concat(e):"";return"".concat(G.After,"(").concat(t,")").concat(r)}function er(t,e){var r="".concat(G.DoneState,".").concat(t),n={type:r,data:e};return n.toString=function(){return r},n}function gr(t,e){var r="".concat(G.DoneInvoke,".").concat(t),n={type:r,data:e};return n.toString=function(){return r},n}function Pt(t,e){var r="".concat(G.ErrorPlatform,".").concat(t),n={type:r,data:e};return n.toString=function(){return r},n}var oo=function(t){var e,r,n=[];try{for(var i=F(t),a=i.next();!a.done;a=i.next())for(var o=a.value,s=0;s<o.actions.length;){if(o.actions[s].type===yn){n.push(o.actions[s]),o.actions.splice(s,1);continue}s++}}catch(u){e={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n};function Or(t,e,r,n,i,a,o){o===void 0&&(o=!1);var s=o?[]:oo(i),u=s.length?$n(r,n,s,e):r,f=o?[r]:void 0,c=[];function l(g,m){var A;switch(m.type){case $t:{var w=Ya(m,u,n,t.options.delays);return a&&typeof w.delay=="number"&&a(w,u,n),w}case kr:var b=Za(m,u,n,t.options.delays);return a&&b.to!==dt.Internal&&(g==="entry"?c.push(b):a(b,u,n)),b;case Ti:{var S=Qa(m,u,n);return a?.(S,u,n),S}case La:{var C=m,P=(A=C.conds.find(function(Ae){var ae=Ni(Ae.cond,t.options.guards);return!ae||ki(t,ae,u,n,a?void 0:e)}))===null||A===void 0?void 0:A.actions;if(!P)return[];var v=_(Or(t,e,u,n,[{type:g,actions:Me(Oe(P),t.options.actions)}],a,o),2),y=v[0],E=v[1];return u=E,f?.push(u),y}case za:{var P=m.get(u,n.data);if(!P)return[];var R=_(Or(t,e,u,n,[{type:g,actions:Me(Oe(P),t.options.actions)}],a,o),2),D=R[0],O=R[1];return u=O,f?.push(u),D}case pn:{var S=no(m,u,n);return a?.(S,r,n),S}case yn:{u=$n(u,n,[m],a?void 0:e),f?.push(u);break}default:var N=_t(m,t.options.actions),L=N.exec;if(a)a(N,u,n);else if(L&&f){var U=f.length-1,ee=T(T({},N),{exec:function(Ae){for(var ae=[],Y=1;Y<arguments.length;Y++)ae[Y-1]=arguments[Y];L.apply(void 0,X([f[U]],_(ae),!1))}});N=ee}return N}}function d(g){var m,A,w=[];try{for(var b=F(g.actions),S=b.next();!S.done;S=b.next()){var C=S.value,P=l(g.type,C);P&&(w=w.concat(P))}}catch(v){m={error:v}}finally{try{S&&!S.done&&(A=b.return)&&A.call(b)}finally{if(m)throw m.error}}return c.forEach(function(v){a(v,u,n)}),c.length=0,w}var h=Q(i.map(d));return[h,u]}var st=function(t,e){var r=e(t);return r};function ji(t){var e;return e={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}},e[Fe]=function(){return this},e}function so(t,e,r,n){var i,a=Ii(t.src),o=(i=e?.options.services)===null||i===void 0?void 0:i[a.type],s=t.data?Er(t.data,r,n):void 0,u=o?Li(o,t.id,s):ji(t.id);return u.meta=t,u}function Li(t,e,r){var n=ji(e);if(n.deferred=!0,ht(t)){var i=n.state=st(void 0,function(){return(r?t.withContext(r):t).initialState});n.getSnapshot=function(){return i}}return n}function uo(t){try{return typeof t.send=="function"}catch{return!1}}function fo(t){return uo(t)&&"id"in t}function co(t){var e;return T((e={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},e[Fe]=function(){return this},e),t)}var Tr=function(t){return t.type==="atomic"||t.type==="final"};function zi(t){return Object.keys(t.states).map(function(e){return t.states[e]})}function Vt(t){return zi(t).filter(function(e){return e.type!=="history"})}function Fi(t){var e=[t];return Tr(t)?e:e.concat(Q(Vt(t).map(Fi)))}function Ct(t,e){var r,n,i,a,o,s,u,f,c=new Set(t),l=rn(c),d=new Set(e);try{for(var h=F(d),g=h.next();!g.done;g=h.next())for(var m=g.value,A=m.parent;A&&!d.has(A);)d.add(A),A=A.parent}catch(R){r={error:R}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var w=rn(d);try{for(var b=F(d),S=b.next();!S.done;S=b.next()){var m=S.value;if(m.type==="compound"&&(!w.get(m)||!w.get(m).length))l.get(m)?l.get(m).forEach(function(D){return d.add(D)}
1):m.initialStateNodes.forEach(function(D){return d.add(D)});else if(m.type==="parallel")try{for(var C=(o=void 0,F(Vt(m))),P=C.next();!P.done;P=C.next()){var v=P.value;d.has(v)||(d.add(v),l.get(v)?l.get(v).forEach(function(D){return d.add(D)}):v.initialStateNodes.forEach(function(D){return d.add(D)}))}}catch(D){o={error:D}}finally{try{P&&!P.done&&(s=C.return)&&s.call(C)}finally{if(o)throw o.error}}}}catch(R){i={error:R}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}try{for(var y=F(d),E=y.next();!E.done;E=y.next())for(var m=E.value,A=m.parent;A&&!d.has(A);)d.add(A),A=A.parent}catch(R){u={error:R}}finally{try{E&&!E.done&&(f=y.return)&&f.call(y)}finally{if(u)throw u.error}}return d}function Mi(t,e){var r=e.get(t);if(!r)return{};if(t.type==="compound"){var n=r[0];if(n){if(Tr(n))return n.key}else return{}}var i={};return r.forEach(function(a){i[a.key]=Mi(a,e)}),i}function rn(t){var e,r,n=new Map;try{for(var i=F(t),a=i.next();!a.done;a=i.next()){var o=a.value;n.has(o)||n.set(o,[]),o.parent&&(n.has(o.parent)||n.set(o.parent,[]),n.get(o.parent).push(o))}}catch(s){e={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return n}function lo(t,e){var r=Ct([t],e);return Mi(t,rn(r))}function Dt(t,e){return Array.isArray(t)?t.some(function(r){return r===e}):t instanceof Set?t.has(e):!1}function ho(t){return X([],_(new Set(Q(X([],_(t.map(function(e){return e.ownEvents})),!1)))),!1)}function mr(t,e){return e.type==="compound"?Vt(e).some(function(r){return r.type==="final"&&Dt(t,r)}):e.type==="parallel"?Vt(e).every(function(r){return mr(t,r)}):!1}function vo(t){return t===void 0&&(t=[]),t.reduce(function(e,r){return r.meta!==void 0&&(e[r.id]=r.meta),e},{})}function Hn(t){return new Set(Q(t.map(function(e){return e.tags})))}function _i(t,e){if(t===e)return!0;if(t===void 0||e===void 0)return!1;if(H(t)||H(e))return t===e;var r=Object.keys(t),n=Object.keys(e);return r.length===n.length&&r.every(function(i){return _i(t[i],e[i])})}function po(t){return typeof t!="object"||t===null?!1:"value"in t&&"_event"in t}function yo(t,e){var r=t.exec,n=T(T({},t),{exec:r!==void 0?function(){return r(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0});return n}var xe=(function(){function t(e){var r=this,n;this.actions=[],this.activities=_n,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||_n,this.meta=vo(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=(n=Array.isArray(e.tags)?new Set(e.tags):e.tags)!==null&&n!==void 0?n:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return ho(r.configuration)}})}return t.from=function(e,r){if(e instanceof t)return e.context!==r?new t({value:e.value,context:r,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,events:[],configuration:[],transitions:[],children:{}}):e;var n=ct;return new t({value:e,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,r){if(e instanceof t){if(!e.actions.length)return e;var n=ct;return new t({value:e.value,context:r,_event:n,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,r)},t.prototype.toStrings=function(e,r){var n=this;if(e===void 0&&(e=this.value),r===void 0&&(r="."),H(e))return[e];var i=Object.keys(e);return i.concat.apply(i,X([],_(i.map(function(a){return n.toStrings(e[a],r).map(function(o){return a+r+o})})),!1))},t.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var r=e.tags;e.machine;var n=vn(e,["configuration","transitions","tags","machine"]);return T(T({},n),{tags:Array.from(r)})},t.prototype.matches=function(e){return gn(e,this.value)},t.prototype.hasTag=function(e){return this.tags.has(e)},t.prototype.can=function(e){var r;Wa(!!this.machine);var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,e);return!!n?.transitions.length&&n.transitions.some(function(i){return i.target!==void 0||i.actions.length})},t})(),go={deferEvents:!1},Gn=(function(){function t(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=T(T({},go),e)}return t.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents){this.schedule(e);return}this.process(e)}this.flushEvents()},t.prototype.schedule=function(e){if(!this.initialized||this.processingEvent){this.queue.push(e);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},t.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},t})(),Br=new Map,mo=0,wt={bookId:function(){return"x:".concat(mo++)},register:function(t,e){return Br.set(t,e),t},get:function(t){return Br.get(t)},free:function(t){Br.delete(t)}};function bn(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function bo(){var t=bn();if(t&&"__xstate__"in t)return t.__xstate__}function xo(t){if(bn()){var e=bo();e&&e.register(t)}}function So(t,e){e===void 0&&(e={});var r=t.initialState,n=new Set,i=[],a=!1,o=function(){if(!a){for(a=!0;i.length>0;){var f=i.shift();
1r=t.transition(r,f,u),n.forEach(function(c){return c.next(r)})}a=!1}},s=co({id:e.id,send:function(f){i.push(f),o()},getSnapshot:function(){return r},subscribe:function(f,c,l){var d=yr(f,c,l);return n.add(d),d.next(r),{unsubscribe:function(){n.delete(d)}}}}),u={parent:e.parent,self:s,id:e.id||"anonymous",observers:n};return r=t.start?t.start(u):r,s}var wo={sync:!1,autoForward:!1},se;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(se||(se={}));var Eo=(function(){function t(e,r){r===void 0&&(r=t.defaultOptions);var n=this;this.machine=e,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=se.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(c,l){if(pt(c))return n.batch(c),n.state;var d=ce(Ir(c,l));if(n.status===se.Stopped)return n.state;if(n.status!==se.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(d.name,'" was sent to uninitialized service "').concat(n.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
2Event: `).concat(JSON.stringify(d.data)));return n.scheduler.schedule(function(){n.forward(d);var h=n._nextState(d);n.update(h,d)}),n._state},this.sendTo=function(c,l,d){var h=n.parent&&(l===dt.Parent||n.parent.id===l),g=h?n.parent:H(l)?l===dt.Internal?n:n.children.get(l)||wt.get(l):Ua(l)?l:void 0;if(!g){if(!h)throw new Error("Unable to send event to child '".concat(l,"' from service '").concat(n.id,"'."));return}if("machine"in g){if(n.status!==se.Stopped||n.parent!==g||n.state.done){var m=T(T({},c),{name:c.name===ja?"".concat(Pt(n.id)):c.name,origin:n.sessionId});!d&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,m]):g.send(m)}}else!d&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,c.data]):g.send(c.data)},this._exec=function(c,l,d,h){h===void 0&&(h=n.machine.options.actions);var g=c.exec||tn(c.type,h),m=V(g)?g:g?g.exec:c.exec;if(m)try{return m(l,d.data,n.machine.config.predictableActionArguments?{action:c,_event:d}:{action:c,state:n.state,_event:d})}catch(U){throw n.parent&&n.parent.send({type:"xstate.error",data:U}),U}switch(c.type){case $t:{var A=c;n.defer(A);break}case kr:var w=c;if(typeof w.delay=="number"){n.defer(w);return}else w.to?n.sendTo(w._event,w.to,d===ct):n.send(w._event);break;case Oi:n.cancel(c.sendId);break;case Yr:{if(n.status!==se.Running)return;var b=c.activity;if(!n.machine.config.predictableActionArguments&&!n.state.activities[b.id||b.type])break;if(b.type===G.Invoke){var S=Ii(b.src),C=n.machine.options.services?n.machine.options.services[S.type]:void 0,P=b.id,v=b.data,y="autoForward"in b?b.autoForward:!!b.forward;if(!C)return;var E=v?Er(v,l,d):void 0;if(typeof C=="string")return;var R=V(C)?C(l,d.data,{data:E,src:S,meta:b.meta}):C;if(!R)return;var D=void 0;ht(R)&&(R=E?R.withContext(E):R,D={autoForward:y}),n.spawn(R,P,D)}else n.spawnActivity(b);break}case pn:{n.stopChild(c.activity.id);break}case Ti:var O=c,N=O.label,L=O.value;N?n.logger(N,L):n.logger(L);break}};var i=T(T({},t.defaultOptions),r),a=i.clock,o=i.logger,s=i.parent,u=i.id,f=u!==void 0?u:e.id;this.id=f,this.logger=o,this.clock=a,this.parent=s,this.options=i,this.scheduler=new Gn({deferEvents:this.options.deferEvents}),this.sessionId=wt.bookId()}return Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:st(this,function(){return e._initialState=e.machine.initialState,e._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(e,r){var n,i;try{for(var a=F(e.actions),o=a.next();!o.done;o=a.next()){var s=o.value;this.exec(s,e,r)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},t.prototype.update=function(e,r){var n,i,a,o,s,u,f,c,l=this;if(e._sessionid=this.sessionId,this._state=e,(!this.machine.config.predictableActionArguments||r===ct)&&this.options.execute)this.execute(this.state);else for(var d=void 0;d=this._outgoingQueue.shift();)d[0].send(d[1]);
2if(this.children.forEach(function(R){l.state.children[R.id]=R}),this.devTools&&this.devTools.send(r.data,e),e.event)try{for(var h=F(this.eventListeners),g=h.next();!g.done;g=h.next()){var m=g.value;m(e.event)}}catch(R){n={error:R}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}try{for(var A=F(this.listeners),w=A.next();!w.done;w=A.next()){var m=w.value;m(e,e.event)}}catch(R){a={error:R}}finally{try{w&&!w.done&&(o=A.return)&&o.call(A)}finally{if(a)throw a.error}}try{for(var b=F(this.contextListeners),S=b.next();!S.done;S=b.next()){var C=S.value;C(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(R){s={error:R}}finally{try{S&&!S.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(this.state.done){var P=e.configuration.find(function(R){return R.type==="final"&&R.parent===l.machine}),v=P&&P.doneData?Er(P.doneData,e.context,r):void 0;this._doneEvent=gr(this.id,v);try{for(var y=F(this.doneListeners),E=y.next();!E.done;E=y.next()){var m=E.value;m(this._doneEvent)}}catch(R){f={error:R}}finally{try{E&&!E.done&&(c=y.return)&&c.call(y)}finally{if(f)throw f.error}}this._stop(),this._stopChildren(),wt.free(this.sessionId)}},t.prototype.onTransition=function(e){return this.listeners.add(e),this.status===se.Running&&e(this.state,this.state.event),this},t.prototype.subscribe=function(e,r,n){var i=this,a=yr(e,r,n);this.listeners.add(a.next),this.status!==se.NotStarted&&a.next(this.state);var o=function(){i.doneListeners.delete(o),i.stopListeners.delete(o),a.complete()};return this.status===se.Stopped?a.complete():(this.onDone(o),this.onStop(o)),{unsubscribe:function(){i.listeners.delete(a.next),i.doneListeners.delete(o),i.stopListeners.delete(o)}}},t.prototype.onEvent=function(e){return this.eventListeners.add(e),this},t.prototype.onSend=function(e){return this.sendListeners.add(e),this},t.prototype.onChange=function(e){return this.contextListeners.add(e),this},t.prototype.onStop=function(e){return this.stopListeners.add(e),this},t.prototype.onDone=function(e){return this.status===se.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},t.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},t.prototype.start=function(e){var r=this;if(this.status===se.Running)return this;this.machine._init(),wt.register(this.sessionId,this),this.initialized=!0,this.status=se.Running;var n=e===void 0?this.initialState:st(this,function(){return po(e)?r.machine.resolveState(e):r.machine.resolveState(xe.from(e,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(n,ct)}),this},t.prototype._stopChildren=function(){this.children.forEach(function(e){V(e.stop)&&e.stop()}),this.children.clear()},t.prototype._stop=function(){var e,r,n,i,a,o,s,u,f,c;try{for(var l=F(this.listeners),d=l.next();!d.done;d=l.next()){var h=d.value;this.listeners.delete(h)}}catch(y){e={error:y}}finally{try{d&&!d.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}try{for(var g=F(this.stopListeners),m=g.next();!m.done;m=g.next()){var h=m.value;h(),this.stopListeners.delete(h)}}catch(y){n={error:y}}finally{try{m&&!m.done&&(i=g.return)&&i.call(g)}finally{if(n)throw n.error}}try{for(var A=F(this.contextListeners),w=A.next();!w.done;w=A.next()){var h=w.value;this.contextListeners.delete(h)}}catch(y){a={error:y}}
2finally{try{w&&!w.done&&(o=A.return)&&o.call(A)}finally{if(a)throw a.error}}try{for(var b=F(this.doneListeners),S=b.next();!S.done;S=b.next()){var h=S.value;this.doneListeners.delete(h)}}catch(y){s={error:y}}finally{try{S&&!S.done&&(u=b.return)&&u.call(b)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=se.Stopped,this._initialState=void 0;try{for(var C=F(Object.keys(this.delayedEventsMap)),P=C.next();!P.done;P=C.next()){var v=P.value;this.clock.clearTimeout(this.delayedEventsMap[v])}}catch(y){f={error:y}}finally{try{P&&!P.done&&(c=C.return)&&c.call(C)}finally{if(f)throw f.error}}this.scheduler.clear(),this.scheduler=new Gn({deferEvents:this.options.deferEvents})},t.prototype.stop=function(){var e=this,r=this.scheduler;return this._stop(),r.schedule(function(){var n;if(!(!((n=e._state)===null||n===void 0)&&n.done)){var i=ce({type:"xstate.stop"}),a=st(e,function(){var o=Q(X([],_(e.state.configuration),!1).sort(function(l,d){return d.order-l.order}).map(function(l){return Me(l.onExit,e.machine.options.actions)})),s=_(Or(e.machine,e.state,e.state.context,i,[{type:"exit",actions:o}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),u=s[0],f=s[1],c=new xe({value:e.state.value,context:f,_event:i,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:u.filter(function(l){return!en(l)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c});e.update(a,i),e._stopChildren(),wt.free(e.sessionId)}}),this},t.prototype.batch=function(e){var r=this;if(!(this.status===se.NotStarted&&this.options.deferEvents)){if(this.status!==se.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var i,a,o=r.state,s=!1,u=[],f=function(h){var g=ce(h);r.forward(g),o=st(r,function(){return r.machine.transition(o,g,void 0,n||void 0)}),u.push.apply(u,X([],_(r.machine.config.predictableActionArguments?o.actions:o.actions.map(function(m){return yo(m,o)})),!1)),s=s||!!o.changed};try{for(var c=F(e),l=c.next();!l.done;l=c.next()){var d=l.value;f(d)}}catch(h){i={error:h}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}o.changed=s,o.actions=u,r.update(o,ce(e[e.length-1]))})}},t.prototype.sender=function(e){return this.send.bind(this,e)},t.prototype._nextState=function(e,r){var n=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var i=ce(e);if(i.name.indexOf(Mn)===0&&!this.state.nextEvents.some(function(o){return o.indexOf(Mn)===0}))throw i.data.data;var a=st(this,function(){return n.machine.transition(n.state,i,void 0,r||void 0)});return a},t.prototype.nextState=function(e){return this._nextState(e,!1)},t.prototype.forward=function(e){var r,n;try{for(var i=F(this.forwardTo),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.children.get(o);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));s.send(e)}}catch(u){r={error:u}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.defer=function(e){var r=this,n=this.clock.setTimeout(function(){"to"in e&&e.to?r.sendTo(e._event,e.to,!0):r.send(e._event)},e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},t.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},t.prototype.exec=function(e,r,n){n===void 0&&(n=this.machine.options.actions),this._exec(e,r.context,r._event,n)},t.prototype.removeChild=function(e){var r;this.children.delete(e),this.forwardTo.delete(e),(r=this.state)===null||r===void 0||delete r.children[e]},t.prototype.stopChild=function(e){var r=this.children.get(e);r&&(this.removeChild(e),V(r.stop)&&r.stop())},t.prototype.spawn=function(e,r,n){if(this.status!==se.Running)return Li(e,r);
2if(Bn(e))return this.spawnPromise(Promise.resolve(e),r);if(V(e))return this.spawnCallback(e,r);if(fo(e))return this.spawnActor(e,r);if(qa(e))return this.spawnObservable(e,r);if(ht(e))return this.spawnMachine(e,T(T({},n),{id:r}));if($a(e))return this.spawnBehavior(e,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof e,'".'))},t.prototype.spawnMachine=function(e,r){var n=this;r===void 0&&(r={});var i=new t(e,T(T({},this.options),{parent:this,id:r.id||e.id})),a=T(T({},wo),r);a.sync&&i.onTransition(function(s){n.send(Ri,{state:s,id:i.id})});var o=i;return this.children.set(i.id,o),a.autoForward&&this.forwardTo.add(i.id),i.onDone(function(s){n.removeChild(i.id),n.send(ce(s,{origin:i.id}))}).start(),o},t.prototype.spawnBehavior=function(e,r){var n=So(e,{id:r,parent:this});return this.children.set(r,n),n},t.prototype.spawnPromise=function(e,r){var n,i=this,a=!1,o;e.then(function(u){a||(o=u,i.removeChild(r),i.send(ce(gr(r,u),{origin:r})))},function(u){if(!a){i.removeChild(r);var f=Pt(r,u);try{i.send(ce(f,{origin:r}))}catch{i.devTools&&i.devTools.send(f,i.state),i.machine.strict&&i.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(u,f,c){var l=yr(u,f,c),d=!1;return e.then(function(h){d||(l.next(h),!d&&l.complete())},function(h){d||l.error(h)}),{unsubscribe:function(){return d=!0}}},stop:function(){a=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return o}},n[Fe]=function(){return this},n);return this.children.set(r,s),s},t.prototype.spawnCallback=function(e,r){var n,i=this,a=!1,o=new Set,s=new Set,u,f=function(d){u=d,s.forEach(function(h){return h(d)}),!a&&i.send(ce(d,{origin:r}))},c;try{c=e(f,function(d){o.add(d)})}catch(d){this.send(Pt(r,d))}if(Bn(c))return this.spawnPromise(c,r);var l=(n={id:r,send:function(d){return o.forEach(function(h){return h(d)})},subscribe:function(d){var h=yr(d);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){a=!0,V(c)&&c()},toJSON:function(){return{id:r}},getSnapshot:function(){return u}},n[Fe]=function(){return this},n);return this.children.set(r,l),l},t.prototype.spawnObservable=function(e,r){var n,i=this,a,o=e.subscribe(function(u){a=u,i.send(ce(u,{origin:r}))},function(u){i.removeChild(r),i.send(ce(Pt(r,u),{origin:r}))},function(){i.removeChild(r),i.send(ce(gr(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(u,f,c){return e.subscribe(u,f,c)},stop:function(){return o.unsubscribe()},getSnapshot:function(){return a},toJSON:function(){return{id:r}}},n[Fe]=function(){return this},n);return this.children.set(r,s),s},t.prototype.spawnActor=function(e,r){return this.children.set(r,e),e},t.prototype.spawnActivity=function(e){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(r){var n=r(this.state.context,e);this.spawnEffect(e.id,n)}},t.prototype.spawnEffect=function(e,r){var n;this.children.set(e,(n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}},n[Fe]=function(){return this},n))},t.prototype.attachDev=function(){var e=bn();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(T(T({name:this.id,autoPause:!0,stateSanitizer:function(n){return{value:n.value,context:n.context,actions:n.actions}}},r),{features:T({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}xo(this)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[Fe]=function(){return this},t.prototype.getSnapshot=function(){return this.status===se.NotStarted?this.initialState:this._state},t.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,r){return setTimeout(e,r)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},t.interpret=Vi,t})();function Vi(t,e){var r=new Eo(t,e);return r}function Oo(t){if(typeof t=="string"){var e={type:t};return e.toString=function(){return t},e}return t}function tr(t){return T(T({type:Jr},t),{toJSON:function(){t.onDone,t.onError;var e=vn(t,["onDone","onError"]);return T(T({},e),{type:Jr,src:Oo(t.src)})}})}var rr="",nn="#",$r="*",rt={},nt=function(t){return t[0]===nn},To=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},Ro=(function(){function t(e,r,n,i){n===void 0&&(n="context"in e?e.context:void 0);var a=this,o;this.config=e,this._context=n,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(To(),r),this.parent=i?.parent,this.key=this.config.key||i?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Ai),this.id=this.config.id||X([this.machine.key],_(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(o=this.config.schema)!==null&&o!==void 0?o:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?At(this.config.states,function(f,c){var l,d=new t(f,{},void 0,{parent:a,key:c});return Object.assign(a.idMap,T((l={},l[d.id]=d,l),d.idMap)),d}):rt;var s=0;function u(f){var c,l;f.order=s++;try{for(var d=F(zi(f)),h=d.next();!h.done;h=d.next()){var g=h.value;u(g)}}catch(m){c={error:m}}finally{try{h&&!h.done&&(l=d.return)&&l.call(d)}finally{if(c)throw c.error}}}u(this),this.history=this.config.history===!0?"shallow":this.config.history||
vendor: 18,638 bytes, lines 2-4
2!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(f){var c=f.event;return c===rr}):rr in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Oe(this.config.entry||this.config.onEntry).map(function(f){return _t(f)}),this.onExit=Oe(this.config.exit||this.config.onExit).map(function(f){return _t(f)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Oe(this.config.invoke).map(function(f,c){var l,d;if(ht(f)){var h=Qt(a.id,c);return a.machine.options.services=T((l={},l[h]=f,l),a.machine.options.services),tr({src:h,id:h})}else if(H(f.src)){var h=f.id||Qt(a.id,c);return tr(T(T({},f),{id:h,src:f.src}))}else if(ht(f.src)||V(f.src)){var h=f.id||Qt(a.id,c);return a.machine.options.services=T((d={},d[h]=f.src,d),a.machine.options.services),tr(T(T({id:h},f),{src:h}))}else{var g=f.src;return tr(T(T({id:Qt(a.id,c)},f),{src:g}))}}),this.activities=Oe(this.config.activities).concat(this.invoke).map(function(f){return mn(f)}),this.transition=this.transition.bind(this),this.tags=Oe(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Fi(this).forEach(function(e){return e.on})},t.prototype.withConfig=function(e,r){var n=this.options,i=n.actions,a=n.activities,o=n.guards,s=n.services,u=n.delays;return new t(this.config,{actions:T(T({},i),e.actions),activities:T(T({},a),e.activities),guards:T(T({},o),e.guards),services:T(T({},s),e.services),delays:T(T({},u),e.delays)},r??this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return V(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:At(this.states,function(e){return e.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce(function(r,n){return r[n.eventType]=r[n.eventType]||[],r[n.eventType].push(n),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var r=e===rr,n=this.transitions.filter(function(i){var a=i.eventType===e;return r?a:a||i.eventType===$r});return this.__cache.candidates[e]=n,n},t.prototype.getDelayedTransitions=function(){var e=this,r=this.config.after;if(!r)return[];var n=function(a,o){var s=V(a)?"".concat(e.id,":delay[").concat(o,"]"):a,u=ao(s,e.id);return e.onEntry.push(Ja(u,{delay:a})),e.onExit.push(eo(u)),u},i=pt(r)?r.map(function(a,o){var s=n(a.delay,o);return T(T({},a),{event:s})}):Q(Object.keys(r).map(function(a,o){var s=r[a],u=H(s)?{target:s}:s,f=isNaN(+a)?a:+a,c=n(f,o);return Oe(u).map(function(l){return T(T({},l),{event:c,delay:f})})}));return i.map(function(a){var o=a.delay;return T(T({},e.formatTransition(a)),{delay:o})})},t.prototype.getStateNodes=function(e){var r,n=this;if(!e)return[];var i=e instanceof xe?e.value:kt(e,this.delimiter);if(H(i)){var a=this.getStateNode(i).initial;return a!==void 0?this.getStateNodes((r={},r[i]=a,r)):[this,this.states[i]]}var o=Object.keys(i),s=[this];return s.push.apply(s,X([],_(Q(o.map(function(u){return n.getStateNode(u).getStateNodes(i[u])}))),!1)),s},t.prototype.handles=function(e){var r=Pi(e);return this.events.includes(r)},t.prototype.resolveState=function(e){var r=e instanceof xe?e:xe.create(e),n=Array.from(Ct([],this.getStateNodes(r.value)));return new xe(T(T({},r),{value:this.resolve(r.value),configuration:n,done:mr(n,this),tags:Hn(n),machine:this.machine}))},t.prototype.transitionLeafNode=function(e,r,n){var i=this.getStateNode(e),a=i.next(r,n);return!a||!a.transitions.length?this.next(r,n):a},t.prototype.transitionCompoundNode=function(e,r,n){var i=Object.keys(e),a=this.getStateNode(i[0]),o=a._transition(e[i[0]],r,n);return!o||!o.transitions.length?this.next(r,n):o},t.prototype.transitionParallelNode=function(e,r,n){var i,a,o={};try{for(var s=F(Object.keys(e)),u=s.next();!u.done;u=s.next()){var f=u.value,c=e[f];if(c){var l=this.getStateNode(f),d=l._transition(c,r,n);d&&(o[f]=d)}}}catch(w){i={error:w}}finally{try{u&&!u.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}var h=Object.keys(o).map(function(w){return o[w]}),g=Q(h.map(function(w){return w.transitions})),m=h.some(function(w){return w.transitions.length>0});if(!m)return this.next(r,n);var A=Q(Object.keys(o).map(function(w){return o[w].configuration}));return{transitions:g,exitSet:Q(h.map(function(w){return w.exitSet})),configuration:A,source:r,actions:Q(Object.keys(o).map(function(w){return o[w].actions}))}},t.prototype._transition=function(e,r,n){return H(e)?this.transitionLeafNode(e,r,n):Object.keys(e).length===1?this.transitionCompoundNode(e,r,n):this.transitionParallelNode(e,r,n)},t.prototype.getTransitionData=function(e,r){return this._transition(e.value,e,ce(r))},t.prototype.next=function(e,r){var n,i,a=this,o=r.name,s=[],u=[],f;try{for(var c=F(this.getCandidates(o)),l=c.next();!l.done;l=c.next()){var d=l.value,h=d.cond,g=d.in,m=e.context,A=g?H(g)&&nt(g)?e.matches(kt(this.getStateNodeById(g).path,this.delimiter)):gn(kt(g,this.delimiter),_a(this.path.slice(0,-2))(e.value)):!0,w=!1;try{w=!h||ki(this.machine,h,m,r,e)}catch(C){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(o,"' in state node '").concat(this.id,`':
3`).concat(C.message))}if(w&&A){d.target!==void 0&&(u=d.target),s.push.apply(s,X([],_(d.actions),!1)),f=d;break}}}catch(C){n={error:C}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}if(f){if(!u.length)return{transitions:[f],exitSet:[],configuration:e.value?[this]:[],source:e,actions:s};var b=Q(u.map(function(C){return a.getRelativeStateNodes(C,e.historyValue)})),S=!!f.internal;return{transitions:[f],exitSet:S?[]:Q(u.map(function(C){return a.getPotentiallyReenteringNodes(C)})),configuration:b,source:e,actions:s}}},t.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var r=[],n=this,i=e;n&&n!==i;)r.push(n),n=n.parent;return n!==i?[]:(r.push(i),r)},t.prototype.getActions=function(e,r,n,i,a,o,s){var u,f,c,l,d=this,h=o?Ct([],this.getStateNodes(o.value)):[],g=new Set;try{for(var m=F(Array.from(e).sort(function(O,N){return O.order-N.order})),A=m.next();!A.done;A=m.next()){var w=A.value;(!Dt(h,w)||Dt(n.exitSet,w)||w.parent&&g.has(w.parent))&&g.add(w)}}catch(O){u={error:O}}finally{try{A&&!A.done&&(f=m.return)&&f.call(m)}finally{if(u)throw u.error}}try{for(var b=F(h),S=b.next();!S.done;S=b.next()){var w=S.value;(!Dt(e,w)||Dt(n.exitSet,w.parent))&&n.exitSet.push(w)}}catch(O){c={error:O}}finally{try{S&&!S.done&&(l=b.return)&&l.call(b)}finally{if(c)throw c.error}}n.exitSet.sort(function(O,N){return N.order-O.order});var C=Array.from(g).sort(function(O,N){return O.order-N.order}),P=new Set(n.exitSet),v=Q(C.map(function(O){var N=[];if(O.type!=="final")return N;var L=O.parent;if(!L.parent)return N;N.push(er(O.id,O.doneData),er(L.id,O.doneData?Er(O.doneData,i,a):void 0));var U=L.parent;return U.type==="parallel"&&Vt(U).every(function(ee){return mr(n.configuration,ee)})&&N.push(er(U.id)),N})),y=C.map(function(O){var N=O.onEntry,L=O.activities.map(function(U){return to(U)});return{type:"entry",actions:Me(s?X(X([],_(N),!1),_(L),!1):X(X([],_(L),!1),_(N),!1),d.machine.options.actions)}}).concat({type:"state_done",actions:v.map(function(O){return Xa(O)})}),E=Array.from(P).map(function(O){return{type:"exit",actions:Me(X(X([],_(O.onExit),!1),_(O.activities.map(function(N){return ro(N)})),!1),d.machine.options.actions)}}),R=E.concat({type:"transition",actions:Me(n.actions,this.machine.options.actions)}).concat(y);if(r){var D=Me(Q(X([],_(e),!1).sort(function(O,N){return N.order-O.order}).map(function(O){return O.onExit})),this.machine.options.actions).filter(function(O){return!en(O)});return R.concat({type:"stop",actions:D})}return R},t.prototype.transition=function(e,r,n,i){e===void 0&&(e=this.initialState);var a=ce(r),o;if(e instanceof xe)o=n===void 0?e:this.resolveState(xe.from(e,n));else{var s=H(e)?this.resolve(wr(this.getResolvedPath(e))):this.resolve(e),u=n??this.machine.context;o=this.resolveState(xe.from(s,u))}if(this.strict&&!this.events.includes(a.name)&&!Ba(a.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(a.name,"'"));var f=this._transition(o.value,o,a)||{transitions:[],configuration:[],exitSet:[],source:o,actions:[]},c=Ct([],this.getStateNodes(o.value)),l=f.configuration.length?Ct(c,f.configuration):c;return f.configuration=X([],_(l),!1),this.resolveTransition(f,o,o.context,i,a)},t.prototype.resolveRaisedTransition=function(e,r,n,i){var a,o=e.actions;return e=this.transition(e,r,void 0,i),e._event=n,e.event=n.data,(a=e.actions).unshift.apply(a,X([],_(o),!1)),e},t.prototype.resolveTransition=function(e,r,n,i,a){var o,s,u,f,c=this;a===void 0&&(a=ct);var l=e.configuration,d=!r||e.transitions.length>0,h=d?e.configuration:r?r.configuration:[],g=mr(h,this),m=d?lo(this.machine,l):void 0,A=r?r.historyValue?r.historyValue:e.source?this.machine.historyValue(r.value):void 0:void 0,w=this.getActions(new Set(h),g,e,n,a,r,i),b=r?T({},r.activities):{};try{for(var S=F(w),C=S.next();!C.done;C=S.next()){var P=C.value;try{for(var v=(u=void 0,F(P.actions)),y=v.next();!y.done;y=v.next()){var E=y.value;E.type===Yr?b[E.activity.id||E.activity.type]=E:E.type===pn&&(b[E.activity.id||E.activity.type]=!1)}}catch(he){u={error:he}}finally{try{y&&!y.done&&(f=v.return)&&f.call(v)}finally{if(u)throw u.error}}}}catch(he){o={error:he}}finally{try{C&&!C.done&&(s=S.return)&&s.call(S)}finally{if(o)throw o.error}}var R=_(Or(this,r,n,a,w,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),D=R[0],O=R[1],N=_(Ha(D,en),2),L=N[0],U=N[1],ee=D.filter(function(he){var Pe;return he.type===Yr&&((Pe=he.activity)===null||Pe===void 0?void 0:Pe.type)===Jr}),Ae=ee.reduce(function(he,Pe){return he[Pe.activity.id]=so(Pe.activity,c.machine,O,a),he},r?T({},r.children):{}),ae=new xe({value:m||r.value,context:O,_event:a,_sessionid:r?r._sessionid:null,historyValue:m?A?Ga(A,m):void 0:r?r.historyValue:void 0,history:!m||e.source?r:void 0,actions:m?U:[],activities:m?b:r?r.activities:{},events:[],configuration:h,transitions:e.transitions,children:Ae,done:g,tags:Hn(h),machine:this}),Y=n!==O;ae.changed=a.name===Ri||Y;var oe=ae.history;oe&&delete oe.history;var re=!g&&(this._transient||l.some(function(he){return he._transient}));if(!d&&(!re||a.name===rr))return ae;var te=ae;if(!g)for(re&&(te=this.resolveRaisedTransition(te,{type:ka},a,i));L.length;){var W=L.shift();te=this.resolveRaisedTransition(te,W._event,a,i)}var Ve=te.changed||(oe?!!te.actions.length||Y||typeof oe.value!=typeof te.value||!_i(te.value,oe.value):void 0);return te.changed=Ve,te.history=oe,te},t.prototype.getStateNode=function(e){if(nt(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[e];if(!r)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return r},t.prototype.getStateNodeById=function(e){var r=nt(e)?e.slice(nn.length):e;if(r===this.id)return this;var n=this.machine.idMap[r];if(!n)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return n},t.prototype.getStateNodeByPath=function(e){if(typeof e=="string"&&nt(e))try{return this.getStateNodeById(e.slice(1))}catch{}for(var r=Qr(e,this.delimiter).slice(),n=this;r.length;){var i=r.shift();if(!i.length)break;n=n.getStateNode(i)}return n},t.prototype.resolve=function(e){var r,n=this;if(!e)return this.initialStateValue||rt;switch(this.type){case"parallel":return At(this.initialStateValue,function(a,o){return a?n.getStateNode(o).resolve(e[o]||a):rt});case"compound":if(H(e)){var i=this.getStateNode(e);return i.type==="parallel"||i.type==="compound"?(r={},r[e]=i.initialStateValue,r):e}return Object.keys(e).length?At(e,function(a,o){return a?n.getStateNode(o).resolve(a):rt}):this.initialStateValue||{};default:return e||rt}},t.prototype.getResolvedPath=function(e){if(nt(e)){var r=this.machine.idMap[e.slice(nn.length)];if(!r)throw new Error("Unable to find state node '".concat(e,"'"));return r.path}return Qr(e,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=Vn(this.states,function(n){return n.initialStateValue||rt},function(n){return n.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));r=Tr(this.states[this.initial])?this.initial:(e={},e[this.initial]=this.states[this.initial].initialStateValue,e)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(e,r){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(t.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var e;if(this.type==="history"){var r=this.config;H(r.target)?e=nt(r.target)?wr(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:e=r.target}return e},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(e,r,n){return n===void 0&&(n=!0),n?e.type==="history"?e.resolveHistory(r):e.initialStateNodes:[e]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var e=this;if(Tr(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var r=pr(this.initialStateValue);return Q(r.map(function(n){return e.getFromRelativePath(n)}))},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var r=_(e),n=r[0],i=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var a=this.getStateNode(n);if(a.type==="history")return a.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(i)},t.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:Vn(this.states,function(r,n){if(!e)return r.historyValue();var i=H(e)?void 0:e[n];return r.historyValue(i||r.initialStateValue)},function(r){return!r.history})}},t.prototype.resolveHistory=function(e){var r=this;if(this.type!=="history")return[this];var n=this.parent;if(!e){var i=this.target;return i?Q(pr(i).map(function(o){return n.getFromRelativePath(o)})):n.initialStateNodes}var a=Va(n.path,"states")(e).current;return H(a)?[n.getStateNode(a)]:Q(pr(a).map(function(o){return r.history==="deep"?n.getFromRelativePath(o):[n.states[o[0]]]}))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var e=this,r=Q(Object.keys(this.states).map(function(n){return e.states[n].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var e,r,n,i;if(this.__cache.events)return this.__cache.events;var a=this.states,o=new Set(this.ownEvents);if(a)try{for(var s=F(Object.keys(a)),u=s.next();!u.done;u=s.next()){var f=u.value,c=a[f];if(c.states)try{for(var l=(n=void 0,F(c.events)),d=l.next();!d.done;d=l.next()){var h=d.value;o.add("".concat(h))}}catch(g){n={error:g}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}}}catch(g){e={error:g}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(e)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(e){var r=this;if(e!==void 0)return e.map(function(n){if(!H(n))return n;var i=n[0]===r.delimiter;if(i&&!r.parent)return r.getStateNodeByPath(n.slice(1));var a=i?r.key+n:n;if(r.parent)try{var o=r.parent.getStateNodeByPath(a);return o}catch(s){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
4`).concat(s.message))}else return r.getStateNodeByPath(a)})},t.prototype.formatTransition=function(e){var r=this,n=Ka(e.target),i="internal"in e?e.internal:n?n.some(function(u){return H(u)&&u[0]===r.delimiter}):!0,a=this.machine.options.guards,o=this.resolveTarget(n),s=T(T({},e),{actions:Me(Oe(e.actions)),cond:Ni(e.cond,a),target:o,source:this,internal:i,eventType:e.event,toJSON:function(){return T(T({},s),{target:s.target?s.target.map(function(u){return"#".concat(u.id)}):void 0,source:"#".concat(r.id)})}});return s},t.prototype.formatTransitions=function(){var e,r,n=this,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var a=this.config.on,o=$r,s=a[o],u=s===void 0?[]:s,f=vn(a,[typeof o=="symbol"?o:o+""]);i=Q(Object.keys(f).map(function(b){var S=tt(b,f[b]);return S}).concat(tt($r,u)))}var c=this.config.always?tt("",this.config.always):[],l=this.config.onDone?tt(String(er(this.id
4)),this.config.onDone):[],d=Q(this.invoke.map(function(b){var S=[];return b.onDone&&S.push.apply(S,X([],_(tt(String(gr(b.id)),b.onDone)),!1)),b.onError&&S.push.apply(S,X([],_(tt(String(Pt(b.id)),b.onError)),!1)),S})),h=this.after,g=Q(X(X(X(X([],_(l),!1),_(d),!1),_(i),!1),_(c),!1).map(function(b){return Oe(b).map(function(S){return n.formatTransition(S)})}));try{for(var m=F(h),A=m.next();!A.done;A=m.next()){var w=A.value;g.push(w)}}catch(b){e={error:b}}finally{try{A&&!A.done&&(r=m.return)&&r.call(m)}finally{if(e)throw e.error}}return g},t})();function Ao(t,e,r){return r===void 0&&(r=t.context),new Ro(t,e,r)}var Po=io,an;(function(t){t[t.Effect=1]="Effect",t[t.LayoutEffect=2]="LayoutEffect"})(an||(an={}));function Wn(t){var e=p.useRef();return e.current||(e.current={v:t()}),e.current.v}var Co=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},Do=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function No(t,e){var r,n,i=Co([[],[]],2),a=i[0],o=i[1];try{for(var s=Do(t),u=s.next();!u.done;u=s.next()){var f=u.value;e(f)?a.push(f):o.push(f)}}catch(c){r={error:c}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[a,o]}var Et=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},qn=function(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))};function Un(t,e){var r=t.exec,n=r(e.context,e._event.data,{action:t,state:e,_event:e._event});n()}function ko(t){var e=p.useRef([]),r=p.useRef([]);Nt(function(){var n=t.subscribe(function(i){var a,o;if(i.actions.length){var s=i.actions.filter(function(l){return typeof l.exec=="function"&&"__effect"in l.exec}),u=Et(No(s,function(l){return l.exec.__effect===an.Effect}),2),f=u[0],c=u[1];(a=e.current).push.apply(a,qn([],Et(f.map(function(l){return[l,i]})),!1)),(o=r.current).push.apply(o,qn([],Et(c.map(function(l){return[l,i]})),!1))}});return function(){n.unsubscribe()}},[]),Nt(function(){for(;r.current.length;){var n=Et(r.current.shift(),2),i=n[0],a=n[1];Un(i,a)}}),p.useEffect(function(){for(;e.current.length;){var n=Et(e.current.shift(),2),i=n[0],a=n[1];Un(i,a)}})}var It=function(){return It=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},It.apply(this,arguments)},Io=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function jo(t,e,r){if(typeof t=="object")return t;var n=function(){};return{next:t,error:e||n,complete:r||n}}function Lo(t,e,r){e===void 0&&(e={});var n=Wn(function(){return typeof t=="function"?t():t}),i=e.context,a=e.guards,o=e.actions,s=e.activities,u=e.services,f=e.delays,c=e.state,l=Io(e,["context","guards","actions","activities","services","delays","state"]),d=Wn(function(){var h={context:i,guards:a,actions:o,activities:s,services:u,delays:f},g=n.withConfig(h,function(){return It(It({},n.context),i)});return Vi(g,It({deferEvents:!0},l))});return Nt(function(){var h;return r&&(h=d.subscribe(jo(r))),function(){h?.unsubscribe()}},[r]),Nt(function(){return d.start(c?xe.create(c):void 0),function(){d.stop()}},[]),Nt(function(){Object.assign(d.machine.options.actions,o),Object.assign(d.machine.options.guards,a),Object.assign(d.machine.options.activities,s),Object.assign(d.machine.options.services,u),Object.assign(d.machine.options.delays,f)},[o,a,s,u,f]),ko(d),d}var zo=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a};function Fo(t,e){e===void 0&&(e={});var r=p.useCallback(function(s){var u=s.changed===void 0&&Object.keys(s.
4children).length;(s.changed||u)&&o(s)},[]),n=Lo(t,e,r),i=zo(p.useState(function(){var s=n.machine.initialState;return e.state?xe.create(e.state):s}),2),a=i[0],o=i[1];return[a,n.send,n]}const z={arr:Array.isArray,obj:t=>Object.prototype.toString.call(t)==="[object Object]",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0,nul:t=>t===null,set:t=>t instanceof Set,map:t=>t instanceof Map,equ(t,e){if(typeof t!=typeof e)return!1;if(z.str(t)||z.num(t))return t===e;if(z.obj(t)&&z.obj(e)&&Object.keys(t).length+Object.keys(e).length===0)return!0;let r;for(r in t)if(!(r in e))return!1;for(r in e)if(t[r]!==e[r])return!1;return z.und(r)?t===e:!0}};function Mo(t,e){return r=>(z.arr(r)?r:Object.keys(r)).reduce((n,i)=>{const a=i;return n[a]=t(a),n},t)}function _o(){const t=p.useState(!1),e=t[1];return p.useCallback(()=>e(n=>!n),[])}function $e(t,e){return z.und(t)||z.nul(t)?e:t}function nr(t){return z.und(t)?[]:z.arr(t)?t:[t]}function ut(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return z.fun(t)?t(...r):t}function Vo(t){return t.to,t.from,t.config,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.delay,t.attach,t.destroyed,t.interpolateTo,t.ref,t.lazy,ft(t,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}function Hr(t){const e=Vo(t);if(z.und(e))return ie({to:e},t);const r=Object.keys(t).reduce((n,i)=>z.und(e[i])?ie({},n,{[i]:t[i]}):n,{});return ie({to:e},r)}function Bo(t,e){return e&&(z.fun(e)?e(t):z.obj(e)&&(e.current=t)),t}class Te{constructor(){this.payload=void 0,this.children=[]}getAnimatedValue(){return this.getValue()}getPayload(){return this.payload||this}attach(){}detach(){}getChildren(){return this.children}addChild(e){this.children.length===0&&this.attach(),this.children.push(e)}removeChild(e){const r=this.children.indexOf(e);this.children.splice(r,1),this.children.length===0&&this.detach()}}class on extends Te{constructor(){super(...arguments),this.payload=[],this.attach=()=>this.payload.forEach(e=>e instanceof Te&&e.addChild(this)),this.detach=()=>this.payload.forEach(e=>e instanceof Te&&e.removeChild(this))}}class Bi extends Te{constructor(){super(...arguments),this.payload={},this.attach=()=>Object.values(this.payload).forEach(e=>e instanceof Te&&e.addChild(this)),this.detach=()=>Object.values(this.payload).forEach(e=>e instanceof Te&&e.removeChild(this))}getValue(e){e===void 0&&(e=!1);const r={};for(const n in this.payload){const i=this.payload[n];e&&!(i instanceof Te)||(r[n]=i instanceof Te?i[e?"getAnimatedValue":"getValue"]():i)}return r}getAnimatedValue(){return this.getValue(!0)}}let xn;function $o(t,e){xn={fn:t,transform:e}}let $i;function Ho(t){$i=t}let Hi=t=>typeof window<"u"?window.requestAnimationFrame(t):-1,Rr;function Go(t){Rr=t}let Gi=()=>Date.now(),Wo=t=>t.current,Wi;function qo(t){Wi=t}class Uo extends Bi{constructor(e,r){super(),this.update=void 0,this.payload=e.style?ie({},e,{style:Wi(e.style)}):e,this.update=r,this.attach()}}const Ko=t=>z.fun(t)&&!(t.prototype instanceof ge.Component),Xo=t=>p.forwardRef((r,n)=>{const i=_o(),a=p.useRef(!0),o=p.useRef(null),s=p.useRef(null),u=p.useCallback(d=>{const h=o.current,g=()=>{let m=!1;s.current&&(m=xn.fn(s.current,o.current.getAnimatedValue())),(!s.current||m===!1)&&i()};o.current=new Uo(d,g),h&&h.detach()},[]);p.useEffect(()=>()=>{a.current=!1,o.current&&o.current.detach()},[]),p.useImperativeHandle(n,()=>Wo(s)),u(r);const f=o.current.getValue();f.scrollTop,f.scrollLeft;const c=ft(f,["scrollTop","scrollLeft"]),l=Ko(t)?void 0:d=>s.current=Bo(d,n);return ge.createElement(t,ie({},c,{ref:l}))});let jt=!1;const Ge=new Set,qi=()=>
4{if(!jt)return!1;let t=Gi();for(let e of Ge){let r=!1;for(let n=0;n<e.configs.length;n++){let i=e.configs[n],a,o;for(let s=0;s<i.animatedValues.length;s++){let u=i.animatedValues[s];if(u.done)continue;let f=i.fromValues[s],c=i.toValues[s],l=u.lastPosition,d=c instanceof Te,h=Array.isArray(i.initialVelocity)?i.initialVelocity[s]:i.initialVelocity;if(d&&(c=c.getValue()),i.immediate){u.setValue(c),u.done=!0;continue}if(typeof f=="string"||typeof c=="string"){u.setValue(c),u.done=!0;continue}if(i.duration!==void 0)l=f+i.easing((t-u.startTime)/i.duration)*(c-f),a=t>=u.startTime+i.duration;else if(i.decay)l=f+h/(1-.998)*(1-Math.exp(-.0020000000000000018*(t-u.startTime))),a=Math.abs(u.lastPosition-l)<.1,a&&(c=l);else{o=u.lastTime!==void 0?u.lastTime:t,h=u.lastVelocity!==void 0?u.lastVelocity:i.initialVelocity,t>o+64&&(o=t);let g=Math.floor(t-o);for(let b=0;b<g;++b){let S=-i.tension*(l-c),C=-i.friction*h,P=(S+C)/i.mass;h=h+P*1/1e3,l=l+h*1/1e3}let m=i.clamp&&i.tension!==0?f<c?l>c:l<c:!1,A=Math.abs(h)<=i.precision,w=i.tension!==0?Math.abs(c-l)<=i.precision:!0;a=m||A&&w,u.lastVelocity=h,u.lastTime=t}d&&!i.toValues[s].done&&(a=!1),a?(u.value!==c&&(l=c),u.done=!0):r=!0,u.setValue(l),u.lastPosition=l}e.props.onFrame&&(e.values[i.name]=i.interpolation.getValue())}e.props.onFrame&&e.props.onFrame(e.values),r||(Ge.delete(e),e.stop(!0))}return Ge.size?Hi(qi):jt=!1,jt},Yo=t=>{Ge.has(t)||Ge.add(t),jt||(jt=!0,Hi(qi))},Jo=t=>{Ge.has(t)&&Ge.delete(t)};function Ar(t,e,r){if(typeof t=="function")return t;if(Array.isArray(t))return Ar({range:t,output:e,extrapolate:r});if(Rr&&typeof t.output[0]=="string")return Rr(t);const n=t,i=n.output,a=n.range||[0,1],o=n.extrapolateLeft||n.extrapolate||"extend",s=n.extrapolateRight||n.extrapolate||"extend",u=n.easing||(f=>f);return f=>{const c=Qo(f,a);return Zo(f,a[c],a[c+1],i[c],i[c+1],u,o,s,n.map)}}function Zo(t,e,r,n,i,a,o,s,u){let f=u?u(t):t;if(f<e){if(o==="identity")return f;o==="clamp"&&(f=e)}if(f>r){if(s==="identity")return f;s==="clamp"&&(f=r)}return n===i?n:e===r?t<=e?n:i:(e===-1/0?f=-f:r===1/0?f=f-e:f=(f-e)/(r-e),f=a(f),n===-1/0?f=-f:i===1/0?f=f+n:f=f*(i-n)+n,f)}function Qo(t,e){for(var r=1;r<e.length-1&&!(e[r]>=t);++r);return r-1}class vt extends on{constructor(e,r,n,i){super(),this.calc=void 0,this.payload=e instanceof on&&!(e instanceof vt)?e.getPayload():Array.isArray(e)?e:[e],this.calc=Ar(r,n,i)}getValue(){return this.calc(...this.payload.map(e=>e.getValue()))}updateConfig(e,r,n){this.calc=Ar(e,r,n)}interpolate(e,r,n){return new vt(this,e,r,n)}}const it=(t,e,r)=>t&&new vt(t,e,r),es={default:{tension:170,friction:26}};
4function Ui(t,e){"update"in t?e.add(t):t.getChildren().forEach(r=>Ui(r,e))}class sn extends Te{constructor(e){var r;super(),r=this,this.animatedStyles=new Set,this.value=void 0,this.startPosition=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.startTime=void 0,this.lastTime=void 0,this.done=!1,this.setValue=function(n,i){i===void 0&&(i=!0),r.value=n,i&&r.flush()},this.value=e,this.startPosition=e,this.lastPosition=e}flush(){this.animatedStyles.size===0&&Ui(this,this.animatedStyles),this.animatedStyles.forEach(e=>e.update())}clearStyles(){this.animatedStyles.clear()}getValue(){return this.value}interpolate(e,r,n){return new vt(this,e,r,n)}}class ts extends on{constructor(e){super(),this.payload=e.map(r=>new sn(r))}setValue(e,r){r===void 0&&(r=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((n,i)=>this.payload[i].setValue(n,r)):this.payload.forEach(n=>n.setValue(e,r))}getValue(){return this.payload.map(e=>e.getValue())}interpolate(e,r){return new vt(this,e,r)}}let rs=0,ns=class{constructor(){this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=()=>this.interpolations,this.id=rs++}update(e){if(!e)return this;const r=Hr(e),n=r.delay,i=n===void 0?0:n,a=r.to,o=ft(r,["delay","to"]);if(z.arr(a)||z.fun(a))this.queue.push(ie({},o,{delay:i,to:a}));else if(a){let s={};Object.entries(a).forEach(u=>{let f=u[0],c=u[1];const l=ie({to:{[f]:c},delay:ut(i,f)},o),d=s[l.delay]&&s[l.delay].to;s[l.delay]=ie({},s[l.delay],l,{to:ie({},d,l.to)})}),this.queue=Object.values(s)}return this.queue=this.queue.sort((s,u)=>s.delay-u.delay),this.diff(o),this}start(e){if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach(i=>{let a=i.from,o=a===void 0?{}:a,s=i.to,u=s===void 0?{}:s;z.obj(o)&&(this.merged=ie({},o,this.merged)),z.obj(u)&&(this.merged=ie({},this.merged,u))});const r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((i,a)=>{let o=i.delay,s=ft(i,["delay"]);const u=c=>{a===n.length-1&&r===this.guid&&c&&(this.idle=!0,this.props.onRest&&this.props.onRest(this.merged)),e&&e()};let f=z.arr(s.to)||z.fun(s.to);o?setTimeout(()=>{r===this.guid&&(f?this.runAsync(s,u):this.diff(s).start(u))},o):f?this.runAsync(s,u):this.diff(s).start(u)})}else z.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),Yo(this);return this}stop(e){return this.listeners.forEach(r=>r(e)),this.listeners=[],this}pause(e){return this.stop(!0),e&&Jo(this),this}runAsync(e,r){var n=this;e.delay;let i=ft(e,["delay"]);const a=this.local;let o=Promise.resolve(void 0);if(z.arr(i.to))for(let s=0;s<i.to.length;s++){const u=s,f=ie({},i,Hr(i.to[u]));z.arr(f.config)&&(f.config=f.config[u]),o=o.then(()=>{if(a===this.guid)return new Promise(c=>this.diff(f).start(c))})}else if(z.fun(i.to)){let s=0,u;o=o.then(()=>i.to(f=>{const c=ie({},i,Hr(f));
4if(z.arr(c.config)&&(c.config=c.config[s]),s++,a===this.guid)return u=new Promise(l=>this.diff(c).start(l))},function(f){return f===void 0&&(f=!0),n.stop(f)}).then(()=>u))}o.then(r)}diff(e){this.props=ie({},this.props,e);let r=this.props,n=r.from,i=n===void 0?{}:n,a=r.to,o=a===void 0?{}:a,s=r.config,u=s===void 0?{}:s,f=r.reverse,c=r.attach,l=r.reset,d=r.immediate;if(f){var h=[o,i];i=h[0],o=h[1]}this.merged=ie({},i,this.merged,o),this.hasChanged=!1;let g=c&&c(this);if(this.animations=Object.entries(this.merged).reduce((m,A)=>{let w=A[0],b=A[1],S=m[w]||{};const C=z.num(b),P=z.str(b)&&!b.startsWith("#")&&!/\d/.test(b)&&!$i[b],v=z.arr(b),y=!C&&!v&&!P;let E=z.und(i[w])?b:i[w],R=C||v||P?b:1,D=ut(u,w);g&&(R=g.animations[w].parent);let O=S.parent,N=S.interpolation,L=nr(g?R.getPayload():R),U,ee=b;y&&(ee=Rr({range:[0,1],output:[b,b]})(1));let Ae=N&&N.getValue();const Y=!z.und(O)&&S.animatedValues.some(W=>!W.done),oe=!z.equ(ee,Ae),re=!z.equ(ee,S.previous),te=!z.equ(D,S.config);if(l||re&&oe||te){if(C||P)O=N=S.parent||new sn(E);else if(v)O=N=S.parent||new ts(E);else if(y){let W=S.interpolation&&S.interpolation.calc(S.parent.value);W=W!==void 0&&!l?W:E,S.parent?(O=S.parent,O.setValue(0,!1)):O=new sn(0);const Ve={output:[W,b]};S.interpolation?(N=S.interpolation,S.interpolation.updateConfig(Ve)):N=O.interpolate(Ve)}return L=nr(g?R.getPayload():R),U=nr(O.getPayload()),l&&!y&&O.setValue(E,!1),this.hasChanged=!0,U.forEach(W=>{W.startPosition=W.value,W.lastPosition=W.value,W.lastVelocity=Y?W.lastVelocity:void 0,W.lastTime=Y?W.lastTime:void 0,W.startTime=Gi(),W.done=!1,W.animatedStyles.clear()}),ut(d,w)&&O.setValue(y?R:b,!1),ie({},m,{[w]:ie({},S,{name:w,parent:O,interpolation:N,animatedValues:U,toValues:L,previous:ee,config:D,fromValues:nr(O.getValue()),immediate:ut(d,w),initialVelocity:$e(D.velocity,0),clamp:$e(D.clamp,!1),precision:$e(D.precision,.01),tension:$e(D.tension,170),friction:$e(D.friction,26),mass:$e(D.mass,1),duration:D.duration,easing:$e(D.easing,W=>W),decay:D.decay})})}else return oe?m:(y&&(O.setValue(1,!1),N.updateConfig({output:[ee,ee]})),O.done=!0,this.hasChanged=!0,ie({},m,{[w]:ie({},m[w],{previous:ee})}))},this.animations),this.hasChanged){this.configs=Object.values(this.animations),this.values={},this.interpolations={};for(let m in this.animations)this.interpolations[m]=this.animations[m].interpolation,this.values[m]=this.animations[m].interpolation.getValue()}return this}destroy(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0}};const is=(t,e)=>{const r=p.useRef(!1),n=p.useRef(),i=z.fun(e),a=p.useMemo(()=>{n.current&&(n.current.map(l=>l.destroy()),n.current=void 0);let c;return[new Array(t).fill().map((l,d)=>{const h=new ns,g=i?ut(e,d,h):e[d];return d===0&&(c=g.ref),h.update(g),c||h.start(),h}),c]},[t]),o=a[0],s=a[1];n.current=o,p.useImperativeHandle(s,()=>({start:()=>Promise.all(n.current.map(c=>new Promise(l=>c.start(l)))),stop:c=>n.current.forEach(l=>l.stop(c)),get controllers(){return n.current}}));const u=p.useMemo(()=>c=>n.current.map((l,d)=>{l.update(i?ut(c,d,l):c[d]),s||l.start()}),[t]);p.useEffect(()=>{r.current?i||u(e):s||n.current.forEach(c=>c.start())}),p.useEffect(()=>(r.current=!0,()=>n.current.forEach(c=>c.destroy())),[]);const f=n.current.map(c=>c.getValues());return i?[f,u,c=>n.current.forEach(l=>l.pause(c))]:f},as=t=>{const e=z.fun(t),r=is(1,e?t:[t]),n=r[0],i=r[1],a=r[2];return e?[n[0],i,a]:n};class os extends Bi{constructor(e){e===void 0&&(e={}),super(),e.transform&&!(e.transform instanceof Te)&&(e=xn.transform(e)),this.payload=e}}const Pr={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},Re="[-+]?\\d*\\.?\\d+",Cr=Re+"%";function jr(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const ss=new RegExp("rgb"+jr(Re,Re,Re)),us=new RegExp("rgba"+jr(Re,Re,Re,Re)),fs=new RegExp("hsl"+jr(Re,Cr,Cr)),cs=new RegExp("hsla"
4+jr(Re,Cr,Cr,Re)),ls=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ds=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hs=/^#([0-9a-fA-F]{6})$/,vs=/^#([0-9a-fA-F]{8})$/;function ps(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=hs.exec(t))?parseInt(e[1]+"ff",16)>>>0:Pr.hasOwnProperty(t)?Pr[t]:(e=ss.exec(t))?(at(e[1])<<24|at(e[2])<<16|at(e[3])<<8|255)>>>0:(e=us.exec(t))?(at(e[1])<<24|at(e[2])<<16|at(e[3])<<8|Yn(e[4]))>>>0:(e=ls.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=vs.exec(t))?parseInt(e[1],16)>>>0:(e=ds.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=fs.exec(t))?(Kn(Xn(e[1]),ir(e[2]),ir(e[3]))|255)>>>0:(e=cs.exec(t))?(Kn(Xn(e[1]),ir(e[2]),ir(e[3]))|Yn(e[4]))>>>0:null}function Gr(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Kn(t,e,r){const n=r<.5?r*(1+e):r+e-r*e,i=2*r-n,a=Gr(i,n,t+1/3),o=Gr(i,n,t),s=Gr(i,n,t-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function at(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function Xn(t){return(parseFloat(t)%360+360)%360/360}function Yn(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function ir(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function Jn(t){let e=ps(t);if(e===null)return t;e=e||0;let r=(e&4278190080)>>>24,n=(e&16711680)>>>16,i=(e&65280)>>>8,a=(e&255)/255;return`rgba(${r}, ${n}, ${i}, ${a})`}const ar=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ys=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,gs=new RegExp(`(${Object.keys(Pr).join("|")})`,"g"),ms=t=>{const e=t.output.map(i=>i.replace(ys,Jn)).map(i=>i.replace(gs,Jn)),r=e[0].match(ar).map(()=>[]);e.forEach(i=>{i.match(ar).forEach((a,o)=>r[o].push(+a))});const n=e[0].match(ar).map((i,a)=>Ar(ie({},t,{output:r[a]})));return i=>{let a=0;return e[0].replace(ar,()=>n[a++](i)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(o,s,u,f,c)=>`rgba(${Math.round(s)}, ${Math.round(u)}, ${Math.round(f)}, ${c})`)}};let Lt={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};const bs=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),xs=["Webkit","Ms","Moz","O"];Lt=Object.keys(Lt).reduce((t,e)=>(xs.forEach(r=>t[bs(r,e)]=t[e]),t),Lt);function Ss(t,e,r){return e==null||typeof e=="boolean"||e===""?"":!r&&typeof e=="number"&&e!==0&&!(Lt.hasOwnProperty(t)&&Lt[t])?e+"px":(""+e).trim()}const Zn={};qo(t=>new os(t));Go(ms);Ho(Pr);$o((t,e)=>{if(t.nodeType&&t.setAttribute!==void 0){const i=e.style,a=e.children,o=e.scrollTop,s=e.scrollLeft,u=ft(e,["style","children","scrollTop","scrollLeft"]),f=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter";o!==void 0&&(t.scrollTop=o),s!==void 0&&(t.scrollLeft=s),a!==void 0&&(t.textContent=a);for(let c in i)if(i.hasOwnProperty(c)){var r=c.indexOf("--")===0,n=Ss(c,i[c],r);c==="float"&&(c="cssFloat"),r?t.style.setProperty(c,n):t.style[c]=n}for(let c in u){const l=f?c:Zn[c]||(Zn[c]=c.replace(/([A-Z])/g,d=>"-"+d.toLowerCase()));typeof t.getAttribute(l)<"u"&&t.setAttribute(l,u[c])}return}else return!1},t=>t);const ws=["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"],Es=Mo(Xo),Os=Es(ws);function Qn(t,e){return t.map(function(r,n){return r+e[n]})}function Ki(t,e){return t.map(function(r,n){return r-e[n]})}function un(t){return Math.hypot.apply(Math,t)}function Ts(t,e,r){var n=un(e),i=n===0?0:1/n,a=r===0?0:1/r,o=a*n,s=e.map(function(c){return a*c}),u=e.map(function(c){return i*c}),f=un(t);return{velocities:s,velocity:o,distance:f,direction:u}}function fn(t){return Math.sign?Math.sign(t):+(t>0)-+(t<0)||+t}function Rs(t,e,r){return Math.max(e,Math.min(t,r))}function As(t,e){return Math.pow(t,e*5)}function ei(t,e,r){return e===0||Math.abs(e)===1/0?As(t,r):t*e*r/(e+r*t)}function zt(t,e,r,n){return n===void 0&&(n=.15),n===0?Rs(t,e,r):t<e?-ei(e-t,r-e,n)+e:t>r?+ei(t-r,r-e,n)+r:t}function Ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Cs(t,e,r){return e&&Ps(t.prototype,e),t}function ye(){return ye=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
4for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ye.apply(this,arguments)}function Xi(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Ds(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}function or(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ns(t,e){if(t){if(typeof t=="string")return ti(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ti(t,e)}}function ti(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Lr(t,e){var r;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(r=Ns(t))||e){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
5In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return r=t[Symbol.iterator](),r.next.bind(r)}function Yi(){}function Ji(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.length===0?Yi:e.length===1?e[0]:function(){for(var n,i=Lr(e),a;!(a=i()).done;){var o=a.value;n=o.apply(this,arguments)||n}return n}}function _e(t,e){if(t===void 0){if(e===void 0)throw new Error("Mu
5st define fallback value if undefined is expected");t=e}return Array.isArray(t)?t:[t,t]}function sr(t){if(typeof t=="function"){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return t.apply(void 0,r)}else return t}function Sn(t,e){t===void 0&&(t={});for(var r={},n=0,i=Object.entries(e);n<i.length;n++){var a=i[n],o=a[0],s=a[1];switch(typeof s){case"function":r[o]=s.call(r,t[o],o,t);break;case"object":r[o]=Sn(t[o],s);break;case"boolean":s&&(r[o]=t[o]);break}}return r}var ks=180,Is=.15,js=.5,Ls=60,zs={threshold:function(e){return e===void 0&&(e=0),_e(e)},rubberband:function(e){switch(e===void 0&&(e=0),e){case!0:return _e(Is);case!1:return _e(0);default:return _e(e)}},enabled:function(e){return e===void 0&&(e=!0),e},triggerAllEvents:function(e){return e===void 0&&(e=!1),e},initial:function(e){return e===void 0&&(e=0),typeof e=="function"?e:_e(e)}},Zi=ye({},zs,{axis:!0,lockDirection:function(e){return e===void 0&&(e=!1),e},bounds:function(e){if(e===void 0&&(e={}),typeof e=="function")return function(l){return Zi.bounds(e(l))};var r=e,n=r.left,i=n===void 0?-1/0:n,a=r.right,o=a===void 0?1/0:a,s=r.top,u=s===void 0?-1/0:s,f=r.bottom,c=f===void 0?1/0:f;return[[i,o],[u,c]]}}),Fs=typeof window<"u"&&window.document&&window.document.createElement,Ms={enabled:function(e){return e===void 0&&(e=!0),e},domTarget:!0,window:(function(t){function e(r){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e})(function(t){return t===void 0&&(t=Fs?window:void 0),t}),eventOptions:function(e){var r=e===void 0?{}:e,n=r.passive,i=n===void 0?!0:n,a=r.capture,o=a===void 0?!1:a;
5return{passive:i,capture:o}}},_s=ye({},Zi,{threshold:function(e,r,n){var i=n.filterTaps,a=i===void 0?!1:i,o=n.lockDirection,s=o===void 0?!1:o,u=n.axis,f=u===void 0?void 0:u,c=_e(e,a?3:s||f?1:0);return this.filterTaps=a||c[0]+c[1]>0,c},swipeVelocity:function(e){return e===void 0&&(e=js),_e(e)},swipeDistance:function(e){return e===void 0&&(e=Ls),_e(e)},delay:function(e){switch(e===void 0&&(e=0),e){case!0:return ks;case!1:return 0;default:return e}}});function Vs(t){return t===void 0&&(t={}),Sn(t,Ms)}function Bs(t){return t===void 0&&(t={}),Sn(t,_s)}function $s(t){var e=t.domTarget,r=t.eventOptions,n=t.window,i=t.enabled,a=Ds(t,["domTarget","eventOptions","window","enabled"]),o=Vs({domTarget:e,eventOptions:r,window:n,enabled:i});return o.drag=Bs(a),o}function Ot(t){return ye({_active:!1,_blocked:!1,_intentional:[!1,!1],_movement:[0,0],_initial:[0,0],_bounds:[[-1/0,1/0],[-1/0,1/0]],_lastEventType:void 0,event:void 0,intentional:!1,values:[0,0],velocities:[0,0],delta:[0,0],movement:[0,0],offset:[0,0],lastOffset:[0,0],direction:[0,0],initial:[0,0],previous:[0,0],first:!1,last:!1,active:!1,timeStamp:0,startTime:0,elapsedTime:0,cancel:Yi,canceled:!1,memo:void 0,args:void 0},t)}function Qi(){var t={hovering:!1,scrolling:!1,wheeling:!1,dragging:!1,moving:!1,pinching:!1,touches:0,buttons:0,down:!1,shiftKey:!1,altKey:!1,metaKey:!1,ctrlKey:!1},e=Ot({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0,_isTap:!0,_delayedEvent:!1,_pointerId:void 0,tap:!1,swipe:[0,0]}),r=Ot({da:[0,0],vdva:[0,0],origin:void 0,turns:0}),n=Ot({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),i=Ot({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0}),a=Ot({axis:void 0,xy:[0,0],vxvy:[0,0],velocity:0,distance:0});return{shared:t,drag:e,pinch:r,wheel:n,move:i,scroll:a}}var He=new Map,Hs=(function(){function t(r,n){var i=this;n===void 0&&(n=[]),this.controller=r,this.args=n,this.debounced=!0,this.setTimeout=function(a,o){var s;o===void 0&&(o=140),clearTimeout(i.controller.timeouts[i.stateKey]);for(var u=arguments.length,f=new Array(u>2?u-2:0),c=2;c<u;c++)f[c-2]=arguments[c];i.controller.timeouts[i.stateKey]=(s=window).setTimeout.apply(s,[a,o].concat(f))},this.clearTimeout=function(){clearTimeout(i.controller.timeouts[i.stateKey])},this.fireGestureHandler=function(a){if(a===void 0&&(a=!1),i.state._blocked)return i.debounced||(i.state._active=!1,i.clean()),null;if(!a&&!i.state.intentional&&!i.config.triggerAllEvents)return null;if(i.state.intentional){var o=i.state.active,s=i.state._active;i.state.active=s,i.state.first=s&&!o,i.state.last=o&&!s,i.controller.state.shared[i.ingKey]=s}var u=ye({},i.controller.state.shared,i.state,i.mapStateValues(i.state)),f=i.handler(u);return i.state.memo=f!==void 0?f:i.state.memo,i.state._active||i.clean(),u}}var e=t.prototype;return e.updateSharedState=function(n){Object.assign(this.controller.state.shared,n)},e.updateGestureState=function(n){Object.assign(this.state,n)},e.checkIntentionality=function(n,i){return{_intentional:n,_blocked:!1}},e.getMovement=function(n){var i=this.config,a=i.initial,o=i.bounds,s=i.rubberband,u=i.threshold,f=this.state,c=f._bounds,l=f._initial,d=f._active,h=f._intentional,g=f.lastOffset,m=f.movement,A=this.getInternalMovement(n,this.state),w=h[0]===!1?ri(A[0],u[0]):h[0],b=h[1]===!1?ri(A[1],u[1]):h[1],S=this.checkIntentionality([w,b],A);if(S._blocked)return ye({},S,{_movement:A,delta:[0,0]});var C=S._intentional,P=A,v,y;if(C[0]!==!1&&h[0]===!1&&(y=sr(a,this.state),v=sr(o,this.state),l[0]=y[0],c[0]=v[0]),C[1]!==!1&&h[1]===!1){var E,R;y=(E=y)!=null?E:sr(a,this.state),v=(R=v)!=null?R:sr(o,this.state),l[1]=y[1],c[1]=v[1]}var D=[C[0]!==!1?A[0]-C[0]:l[0],C[1]!==!1?A[1]-C[1]:l[1]],O=Qn(D,g),N=d?s:[0,0];return D=ni(c,Qn(D,l),N),ye({},S,{intentional:C[0]!==!1||C[1]!==!1,_initial:l,_movement:P,movement:D,values:n,offset:ni(c,O,N),delta:Ki(D,m)})},e.clean=function(){this.clearTimeout()}
5,Cs(t,[{key:"config",get:function(){return this.controller.config[this.stateKey]}},{key:"enabled",get:function(){return this.controller.config.enabled&&this.config.enabled}},{key:"state",get:function(){return this.controller.state[this.stateKey]}},{key:"handler",get:function(){return this.controller.handlers[this.stateKey]}}]),t})();function ri(t,e){return Math.abs(t)>=e?fn(t)*e:!1}function ni(t,e,r){var n=e[0],i=e[1],a=r[0],o=r[1],s=t[0],u=s[0],f=s[1],c=t[1],l=c[0],d=c[1];return[zt(n,u,f,a),zt(i,l,d,o)]}function Wr(t,e,r){var n=t.state,i=t.args,a=e.timeStamp,o=e.type,s=n.values,u=r?0:a-n.startTime;return{_lastEventType:o,event:e,timeStamp:a,elapsedTime:u,args:i,previous:s}}function Gs(t,e,r){var n=t.state.offset,i=r.timeStamp;return ye({},Qi()[t.stateKey],{_active:!0,values:e,initial:e,offset:n,lastOffset:n,startTime:i})}function Ws(t,e){return function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return t.call.apply(t,[this,ye({},e,{event:r})].concat(i))}}var qs=function(e){var r=this;this.classes=e,this.bind=function(){for(var n={},i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];for(var s=Lr(r.classes),u;!(u=s()).done;){var f=u.value;new f(r,a).addBindings(n)}for(var c=0,l=Object.entries(r.nativeRefs);c<l.length;c++){var d=l[c],h=d[0],g=d[1];cn(n,h,Ws(g,ye({},r.state.shared,{args:a})))}return r.config.domTarget?Ys(r,n):Js(r,n)},this.effect=function(){return r.config.domTarget&&r.bind(),r.clean},this.clean=function(){var n=ta(r.config),i=r.config.eventOptions;n&&Ht(n,ea(r.domListeners),i),Object.values(r.timeouts).forEach(clearTimeout),Us(r)},this.state=Qi(),this.timeouts={},this.domListeners=[],this.windowListeners={}};function Us(t){var e=t.config,r=e.window,n=e.eventOptions,i=t.windowListeners;if(r){for(var a in i){var o=i[a];Ht(r,o,n)}t.windowListeners={}}}function Ks(t,e){var r=t.config,n=t.windowListeners;r.window&&(Ht(r.window,n[e],r.eventOptions),delete n[e])}function Xs(t,e,r){var n=t.config,i=t.windowListeners;r===void 0&&(r=[]),n.window&&(Ht(n.window,i[e],n.eventOptions),ra(n.window,i[e]=r,n.eventOptions))}function Ys(t,e){var r=t.config,n=t.domListeners,i=ta(r);if(!i)throw new Error("domTarget must be defined");var a=r.eventOptions;Ht(i,ea(n),a);for(var o=0,s=Object.entries(e);o<s.length;o++){var u=s[o],f=u[0],c=u[1],l=f.slice(2).toLowerCase();n.push([l,Ji.apply(void 0,c)])}ra(i,n,a)}function Js(t,e){for(var r=t.config,n={},i=r.eventOptions.capture?"Capture":"",a=0,o=Object.entries(e);a<o.length;a++){var s=o[a],u=s[0],f=s[1],c=Array.isArray(f)?f:[f],l=u+i;n[l]=Ji.apply(void 0,c)}return n}function ea(t){return t===void 0&&(t=[]),t.splice(0,t.length)}function ta(t){var e=t.domTarget;return e&&"current"in e?e.current:e}function cn(t,e,r){t[e]||(t[e]=[]),t[e].push(r)}function ra(t,e,r){e===void 0&&(e=[]),r===void 0&&(r={});for(var n=Lr(e),i;!(i=n()).done;){var a=i.value,o=a[0],s=a[1];t.addEventListener(o,s,r)}}function Ht(t,e,r){e===void 0&&(e=[]),r===void 0&&(r={});for(var n=Lr(e),i;!(i=n()).done;){var a=i.value,o=a[0],s=a[1];t.removeEventListener(o,s,r)}}function Zs(t,e,r){r===void 0&&(r={});var n=eu(t),i=ge.useMemo(function(){return new qs(n)},[]);return i.config=e,i.handlers=t,i.nativeRefs=r,ge.useEffect(i.effect,[]),i.config.domTarget?Qs:i.bind}function Qs(){}function eu(t){var e=new Set;return t.drag&&e.add(He.get("drag")),t.wheel&&e.add(He.get("wheel")),t.scroll&&e.add(He.get("scroll")),t.move&&e.add(He.get("move")),t.pinch&&e.add(He.get("pinch")),t.hover&&e.add(He.get("hover")),e}var tu=(function(t){Xi(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.getInternalMovement=function(i,a){return Ki(i,a.initial)},r.checkIntentionality=function(i,a){if(i[0]===!1&&i[1]===!1)return{_intentional:i,axis:this.state.axis};var o=a.map(Math.abs),s=o[0],u=o[1],f=this.state.axis||(s>u?"x":s<u?"y":void 0);return!this.config.axis&&!this.config.lockDirection?{_intentional:i,_blocked:!1,axis:f}:f?this.config.axis&&f!==this.config.axis?{_intentional:i,_blocked:!0,axis:f}:(i[f==="x"?1:0]=!1,{_intentional:i,_blocked:!1,axis:f}):{_intentional:[!1,!1],_blocked:!1,axis:f}},r.getKinematics=function(i,a){var o=this.getMovement(i);if(!o._blocked){var s=a.timeStamp-this.state.timeStamp;Object.assign(o,Ts(o.movement,o.delta,s))}return o},r.mapStateValues=function(i){return{xy:i.values,vxvy:i.velocities}},e})(Hs);function na(t){if("touches"in t){var e=t.targetTouches,r=t.changedTouches;return e.length>0?e:r}return null}function ii(t){var e="buttons"in t?t.buttons:0,r=na(t),n=r&&r.length||0,i=n>0||e>0,a=t.shiftKey,o=t.altKey,s=t.metaKey,u=t.ctrlKey;return{touches:n,down:i,buttons:e,shiftKey:a,altKey:o,metaKey:s,ctrlKey:u}}function ai(t){var e=na(t),r=e?e[0]:t,n=r.clientX,i=r.clientY;return[n,i]}var ru=3,nu=220,iu=(function(t){Xi(e,t);function e(){var n;return n=t.apply(this,arguments)||this,n.ingKey="dragging",n.stateKey="drag",n.onDragStart=function(i){!n.enabled||n.state._active||(Xs(n.controller,n.stateKey,[["pointermove",n.onDragChange],["pointerup",n.onDragEnd],["pointercancel",n.onDragEnd]]),n.updateGestureState({_pointerId:i.pointerId}),n.config.delay>0?(n.state._delayedEvent=!0,"persist"in i&&typeof i.persist=="function"&&i.persist(),n.setTimeout(n.startDrag.bind(or(n)),n.config.delay,i)):n.startDrag(i))},n.onDragChange=function(i){if(!n.state.canceled&&i.pointerId===n.state._pointerId){if(!n.state._active){n.state._delayedEvent&&(n.clearTimeout(),n.startDrag(i));return}var a=ii(i);if(!a.down){n.onDragEnd(i);return}n.updateSharedState(a);var o=ai(i),s=n.getKinematics(o,i),u=Wr(or(n),i),f=n.state._isTap,c=un(s._movement);f&&c>=ru&&(f=!1),n.updateGestureState(ye({},u,s,{_isTap:f})),n.fireGestureHandler()}},n.onDragEnd=function(i){if(i.pointerId===n.state._pointerId){n.state._active=!1,n.updateSharedState({down:!1,buttons:0,touches:0});var a=n.state._isTap,o=n.state.velocities,s=o[0],u=o[1],f=n.state.movement,c=f[0],l=f[1],d=n.state._intentional,h=d[0],g=d[1],m=n.config.swipeVelocity,A=m[0],w=m[1],b=n.config.swipeDistance,S=b[0],C=b[1],P=ye({},Wr(or(n),i),n.getMovement(n.state.values)),v=[0,0];P.elapsedTime<nu&&(h!==!1&&Math.abs(s)>A&&Math.abs(c)>S&&(v[0]=fn(s)),g!==!1&&Math.abs(u)>w&&Math.abs(l)>C&&(v[1]=fn(u))),n.updateGestureState(ye({},P,{tap:a,swipe:v})),n.fireGestureHandler(a===!0)}}
5,n.clean=function(){t.prototype.clean.call(or(n)),n.state._delayedEvent=!1,Ks(n.controller,n.stateKey)},n.onCancel=function(){n.state.canceled||(n.updateGestureState({canceled:!0}),n.state._active=!1,n.updateSharedState({down:!1,buttons:0,touches:0}),requestAnimationFrame(function(){return n.fireGestureHandler()}))},n.onClick=function(i){n.state._isTap||i.stopPropagation()},n}var r=e.prototype;return r.startDrag=function(i){var a=ai(i);this.updateSharedState(ii(i)),this.updateGestureState(ye({},Gs(this,a,i),Wr(this,i,!0),{_pointerId:i.pointerId,cancel:this.onCancel})),this.updateGestureState(this.getMovement(a)),this.fireGestureHandler()},r.addBindings=function(i){if(cn(i,"onPointerDown",this.onDragStart),this.config.filterTaps){var a=this.controller.config.eventOptions.capture?"onClick":"onClickCapture";cn(i,a,this.onClick)}},e})(tu);function au(t,e){var r,n=[],i,a=!1;function o(){for(var s=arguments.length,u=new Array(s),f=0;f<s;f++)u[f]=arguments[f];return a&&r===this&&e(u,n)||(i=t.apply(this,u),a=!0,r=this,n=u),i}return o}function br(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var r,n,i;if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!br(t[n],e[n]))return!1;return!0}var a;if(typeof Map=="function"&&t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(a=t.entries();!(n=a.next()).done;)if(!e.has(n.value[0]))return!1;for(a=t.entries();!(n=a.next()).done;)if(!br(n.value[1],e.get(n.value[0])))return!1;return!0}if(typeof Set=="function"&&t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(a=t.entries();!(n=a.next()).done;)if(!e.has(n.value[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,i[n]))return!1;if(typeof Element<"u"&&t instanceof Element)return!1;for(n=r;n--!==0;)if(!(i[n]==="_owner"&&t.$$typeof)&&!br(t[i[n]],e[i[n]]))return!1;return!0}return t!==t&&e!==e}function ou(t,e){try{return br(t,e)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}}function su(t,e){e===void 0&&(e={}),He.set("drag",iu);var r=p.useRef();return r.current||(r.current=au($s,ou)),Zs({drag:t},r.current(e))}var ia=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Dr=ia.join(","),aa=typeof Element>"u",Ue=aa?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ln=!aa&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},oa=function(e,r,n){var i=Array.prototype.slice.apply(e.querySelectorAll(Dr));return r&&Ue.call(e,Dr)&&i.unshift(e),i=i.filter(n),i},sa=function t(e,r,n){for(var i=[],a=Array.from(e);a.length;){var o=a.shift();if(o.tagName==="SLOT"){var s=o.assignedElements(),u=s.length?s:o.children,f=t(u,!0,n);n.flatten?i.push.apply(i,f):i.push({scope:o,candidates:f})}else{var c=Ue.call(o,Dr);c&&n.filter(o)&&(r||!e.includes(o))&&i.push(o);var l=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),d=!n.shadowRootFilter||n.shadowRootFilter(o);if(l&&d){var h=t(l===!0?o.children:l.children,!0,n);n.flatten?i.push.apply(i,h):i.push({scope:o,candidates:h})}else a.unshift.apply(a,o.children)}}return i},ua=function(e,r){return e.tabIndex<0&&(r||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},uu=function(e,r){return e.tabIndex===r.tabIndex?e.documentOrder-r.documentOrder:e.tabIndex-r.tabIndex},fa=function(e){return e.tagName==="INPUT"},fu=function(e){return fa(e)&&e.type==="hidden"},cu=function(e){var r=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return r},lu=function(e,r){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===r)return e[n]},du=function(e){if(!e.name)return!0;var r=e.form||ln(e),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=n(window.CSS.escape(e.name));else try{i=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=lu(i,e.form);return!a||a===e},hu=function(e){return fa(e)&&e.type==="radio"},vu=function(e){return hu(e)&&!du(e)},oi=function(e){var r=e.getBoundingClientRect(),n=r.width,i=r.height;return n===0&&i===0},pu=function(e,r){var n=r.displayCheck,i=r.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=Ue.call(e,"details>summary:first-of-type"),o=a?e.parentElement:e;if(Ue.call(o,"details:not([open]) *"))return!0;var s=ln(e).host,u=s?.ownerDocument.contains(s)||e.ownerDocument.contains(e);if(!n||n==="full"){if(typeof i=="function"){for(var f=e;e;){var c=e.parentElement,l=ln(e);if(c&&!c.shadowRoot&&i(c)===!0)return oi(e);e.assignedSlot?e=e.assignedSlot:!c&&l!==e.ownerDocument?e=l.host:e=c}e=f}if(u)return!e.getClientRects().length}else if(n==="non-zero-area")return oi(e);return!1}
vendor: 5,207 bytes, line 5
5,yu=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var r=e.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var i=r.children.item(n);if(i.tagName==="LEGEND")return Ue.call(r,"fieldset[disabled] *")?!0:!i.contains(e)}return!0}r=r.parentElement}return!1},Nr=function(e,r){return!(r.disabled||fu(r)||pu(r,e)||cu(r)||yu(r))},dn=function(e,r){return!(vu(r)||ua(r)<0||!Nr(e,r))},gu=function(e){var r=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},mu=function t(e){var r=[],n=[];return e.forEach(function(i,a){var o=!!i.scope,s=o?i.scope:i,u=ua(s,o),f=o?t(i.candidates):s;u===0?o?r.push.apply(r,f):r.push(s):n.push({documentOrder:a,tabIndex:u,item:i,isScope:o,content:f})}),n.sort(uu).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(r)},bu=function(e,r){r=r||{};var n;return r.getShadowRoot?n=sa([e],r.includeContainer,{filter:dn.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:gu}):n=oa(e,r.includeContainer,dn.bind(null,r)),mu(n)},xu=function(e,r){r=r||{};var n;return r.getShadowRoot?n=sa([e],r.includeContainer,{filter:Nr.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):n=oa(e,r.includeContainer,Nr.bind(null,r)),n},ur=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Ue.call(e,Dr)===!1?!1:dn(r,e)},Su=ia.concat("iframe").join(","),qr=function(e,r){if(r=r||{},!e)throw new Error("No node provided");return Ue.call(e,Su)===!1?!1:Nr(r,e)};function si(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ui(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?si(Object(r),!0).forEach(function(n){wu(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):si(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function wu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var fi=(function(){var t=[];return{activateTrap:function(r){if(t.length>0){var n=t[t.length-1];n!==r&&n.pause()}var i=t.indexOf(r);i===-1||t.splice(i,1),t.push(r)},deactivateTrap:function(r){var n=t.indexOf(r);n!==-1&&t.splice(n,1),t.length>0&&t[t.length-1].unpause()}}})(),Eu=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Ou=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},Tu=function(e){return e.key==="Tab"||e.keyCode===9},ci=function(e){return setTimeout(e,0)},li=function(e,r){var n=-1;return e.every(function(i,a){return r(i)?(n=a,!1):!0}),n},Tt=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return typeof e=="function"?e.apply(void 0,n):e},fr=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Ru=function(e,r){var n=r?.document||document,i=ui({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},r),a={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},o,s=function(v,y,E){return v&&v[y]!==void 0?v[y]:i[E||y]},u=function(v){return a.containerGroups.findIndex(function(y){var E=y.container,R=y.tabbableNodes;return E.contains(v)||R.find(function(D){return D===v})})},f=function(v){var y=i[v];if(typeof y=="function"){for(var E=arguments.length,R=new Array(E>1?E-1:0),D=1;D<E;D++)R[D-1]=arguments[D];y=y.apply(void 0,R)}if(y===!0&&(y=void 0),!y){if(y===void 0||y===!1)return y;throw new Error("`".concat(v,"` was specified but was not a node, or did not return a node"))}var O=y;if(typeof y=="string"&&(O=n.querySelector(y),!O))throw new Error("`".concat(v,"` as selector refers to no known node"));return O},c=function(){var v=f("initialFocus");if(v===!1)return!1;if(v===void 0)if(u(n.activeElement)>=0)v=n.activeElement;else{var y=a.tabbableGroups[0],E=y&&y.firstTabbableNode;v=E||f("fallbackFocus")}if(!v)throw new Error("Your focus-trap needs to have at least one focusable element");return v},l=function(){if(a.containerGroups=a.containers.map(function(v){var y=bu(v,i.tabbableOptions),E=xu(v,i.tabbableOptions);return{container:v,tabbableNodes:y,focusableNodes:E,firstTabbableNode:y.length>0?y[0]:null,lastTabbableNode:y.length>0?y[y.length-1]:null,nextTabbableNode:function(D){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,N=E.findIndex(function(L){return L===D});if(!(N<0))return O?E.slice(N+1).find(function(L){return ur(L,i.tabbableOptions)}):E.slice(0,N).reverse().find(function(L){return ur(L,i.tabbableOptions)})}}}),a.tabbableGroups=a.containerGroups.filter(function(v){return v.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!f("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function P(v){if(v!==!1&&v!==n.activeElement){if(!v||!v.focus){P(c());return}
5v.focus({preventScroll:!!i.preventScroll}),a.mostRecentlyFocusedNode=v,Eu(v)&&v.select()}},h=function(v){var y=f("setReturnFocus",v);return y||(y===!1?!1:v)},g=function(v){var y=fr(v);if(!(u(y)>=0)){if(Tt(i.clickOutsideDeactivates,v)){o.deactivate({returnFocus:i.returnFocusOnDeactivate&&!qr(y,i.tabbableOptions)});return}Tt(i.allowOutsideClick,v)||v.preventDefault()}},m=function(v){var y=fr(v),E=u(y)>=0;E||y instanceof Document?E&&(a.mostRecentlyFocusedNode=y):(v.stopImmediatePropagation(),d(a.mostRecentlyFocusedNode||c()))},A=function(v){var y=fr(v);l();var E=null;if(a.tabbableGroups.length>0){var R=u(y),D=R>=0?a.containerGroups[R]:void 0;if(R<0)v.shiftKey?E=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:E=a.tabbableGroups[0].firstTabbableNode;else if(v.shiftKey){var O=li(a.tabbableGroups,function(ae){var Y=ae.firstTabbableNode;return y===Y});if(O<0&&(D.container===y||qr(y,i.tabbableOptions)&&!ur(y,i.tabbableOptions)&&!D.nextTabbableNode(y,!1))&&(O=R),O>=0){var N=O===0?a.tabbableGroups.length-1:O-1,L=a.tabbableGroups[N];E=L.lastTabbableNode}}else{var U=li(a.tabbableGroups,function(ae){var Y=ae.lastTabbableNode;return y===Y});if(U<0&&(D.container===y||qr(y,i.tabbableOptions)&&!ur(y,i.tabbableOptions)&&!D.nextTabbableNode(y))&&(U=R),U>=0){var ee=U===a.tabbableGroups.length-1?0:U+1,Ae=a.tabbableGroups[ee];E=Ae.firstTabbableNode}}}else E=f("fallbackFocus");E&&(v.preventDefault(),d(E))},w=function(v){if(Ou(v)&&Tt(i.escapeDeactivates,v)!==!1){v.preventDefault(),o.deactivate();return}if(Tu(v)){A(v);return}},b=function(v){var y=fr(v);u(y)>=0||Tt(i.clickOutsideDeactivates,v)||Tt(i.allowOutsideClick,v)||(v.preventDefault(),v.stopImmediatePropagation())},S=function(){if(a.active)return fi.activateTrap(o),a.delayInitialFocusTimer=i.delayInitialFocus?ci(function(){d(c())}):d(c()),n.addEventListener("focusin",m,!0),n.addEventListener("mousedown",g,{capture:!0,passive:!1}),n.addEventListener("touchstart",g,{capture:!0,passive:!1}),n.addEventListener("click",b,{capture:!0,passive:!1}),n.addEventListener("keydown",w,{capture:!0,passive:!1}),o},C=function(){if(a.active)return n.removeEventListener("focusin",m,!0),n.removeEventListener("mousedown",g,!0),n.removeEventListener("touchstart",g,!0),n.removeEventListener("click",b,!0),n.removeEventListener("keydown",w,!0),o};return o={get active(){return a.active},get paused(){return a.paused},activate:function(v){if(a.active)return this;var y=s(v,"onActivate"),E=s(v,"onPostActivate"),R=s(v,"checkCanFocusTrap");R||l(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=n.activeElement,y&&y();var D=function(){R&&l(),S(),E&&E()};return R?(R(a.containers.concat()).then(D,D),this):(D(),this)},deactivate:function(v){if(!a.active)return this;var y=ui({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},v);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,C(),a.active=!1,a.paused=!1,fi.deactivateTrap(o);var E=s(y,"onDeactivate"),R=s(y,"onPostDeactivate"),D=s(y,"checkCanReturnFocus"),O=s(y,"returnFocus","returnFocusOnDeactivate");E&&E();var N=function(){ci(function(){O&&d(h(a.nodeFocusedBeforeActivation)),R&&R()})};return O&&D?(D(h(a.nodeFocusedBeforeActivation)).then(N,N),this):(N(),this)},pause:function(){return a.paused||!a.active?this:(a.paused=!0,C(),this)},unpause:function(){return!a.paused||!a.active?this:(a.paused=!1,l(),S(),this)}
5,updateContainerElements:function(v){var y=[].concat(v).filter(Boolean);return a.containers=y.map(function(E){return typeof E=="string"?n.querySelector(E):E}),a.active&&l(),this}},o.updateContainerElements(e),o},We=[],Au=function(){return We.some(function(t){return t.activeTargets.length>0})},Pu=function(){return We.some(function(t){return t.skippedTargets.length>0})},di="ResizeObserver loop completed with undelivered notifications.",Cu=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:di}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=di),window.dispatchEvent(t)},Bt;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Bt||(Bt={}));var qe=function(t){return Object.freeze(t)},Du=(function(){function t(e,r){this.inlineSize=e,this.blockSize=r,qe(this)}return t})(),ca=(function(){function t(e,r,n,i){return this.x=e,this.y=r,this.width=n,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,qe(this)}return t.prototype.toJSON=function(){var e=this,r=e.x,n=e.y,i=e.top,a=e.right,o=e.bottom,s=e.left,u=e.width,f=e.height;return{x:r,y:n,top:i,right:a,bottom:o,left:s,width:u,height:f}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),wn=function(t){return t instanceof SVGElement&&"getBBox"in t},la=function(t){if(wn(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||t.getClientRects().length)},hi=function(t){var e;if(t instanceof Element)return!0;var r=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},Nu=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ft=typeof window<"u"?window:{},cr=new WeakMap,vi=/auto|scroll/,ku=/^tb|vertical/,Iu=/msie|trident/i.test(Ft.navigator&&Ft.navigator.userAgent),De=function(t){return parseFloat(t||"0")},lt=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=0),r===void 0&&(r=!1),new Du((r?e:t)||0,(r?t:e)||0)},pi=qe({devicePixelContentBoxSize:lt(),borderBoxSize:lt(),contentBoxSize:lt(),contentRect:new ca(0,0,0,0)}),da=function(t,e){if(e===void 0&&(e=!1),cr.has(t)&&!e)return cr.get(t);if(la(t))return cr.set(t,pi),pi;var r=getComputedStyle(t),n=wn(t)&&t.ownerSVGElement&&t.getBBox(),i=!Iu&&r.boxSizing==="border-box",a=ku.test(r.writingMode||""),o=!n&&vi.test(r.overflowY||""),s=!n&&vi.test(r.overflowX||""),u=n?0:De(r.paddingTop),f=n?0:De(r.paddingRight),c=n?0:De(r.paddingBottom),l=n?0:De(r.paddingLeft),d=n?0:De(r.borderTopWidth),h=n?0:De(r.borderRightWidth),g=n?0:De(r.borderBottomWidth),m=n?0:De(r.borderLeftWidth),A=l+f,w=u+c,b=m+h,S=d+g,C=s?t.offsetHeight-S-t.clientHeight:0,P=o?t.offsetWidth-b-t.clientWidth:0,v=i?A+b:0,y=i?w+S:0,E=n?n.width:De(r.width)-v-P,R=n?n.height:De(r.height)-y-C,D=E+A+P+b,O=R+w+C+S,N=qe({devicePixelContentBoxSize:lt(Math.round(E*devicePixelRatio),Math.round(R*devicePixelRatio),a),borderBoxSize:lt(D,O,a),contentBoxSize:lt(E,R,a),contentRect:new ca(l,u,E,R)});return cr.set(t,N),N},ha=function(t,e,r){var n=da(t,r),i=n.borderBoxSize,a=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(e){case Bt.DEVICE_PIXEL_CONTENT_BOX:return o;case Bt.BORDER_BOX:return i;default:return a}},ju=(function(){function t(e){var r=da(e);this.target=e,this.contentRect=r.contentRect,this.borderBoxSize=qe([r.borderBoxSize]),this.contentBoxSize=qe([r.contentBoxSize]),this.devicePixelContentBoxSize=qe([r.devicePixelContentBoxSize])}return t})(),va=function(t){if(la(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},Lu=function(){var t=1/0,e=[];We.forEach(function(o){if(o.activeTargets.length!==0){var s=[];o.activeTargets.forEach(function(f){var c=new ju(f.target),l=va(f.target);s.push(c),f.lastReportedSize=ha(f.target,f.observedBox),l<t&&(t=l)}),e.push(function(){o.callback.call(o.observer,s,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++){var i=n[r];i()}return t},yi=function(t){We.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEac
5h(function(i){i.isActive()&&(va(i.target)>t?r.activeTargets.push(i):r.skippedTargets.push(i))})})},zu=function(){var t=0;for(yi(t);Au();)t=Lu(),yi(t);return Pu()&&Cu(),t>0},Ur,pa=[],Fu=function(){return pa.splice(0).forEach(function(t){return t()})},Mu=function(t){if(!Ur){var e=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return Fu()}).observe(r,n),Ur=function(){r.textContent="".concat(e?e--:e++)}}pa.push(t),Ur()},_u=function(t){Mu(function(){requestAnimationFrame(t)})},xr=0,Vu=function(){return!!xr},Bu=250,$u={attributes:!0,characterData:!0,childList:!0,subtree:!0},gi=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],mi=function(t){return t===void 0&&(t=0),Date.now()+t},Kr=!1,Hu=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var r=this;if(e===void 0&&(e=Bu),!Kr){Kr=!0;var n=mi(e);_u(function(){var i=!1;try{i=zu()}finally{if(Kr=!1,e=n-mi(),!Vu())return;i?r.run(1e3):e>0?r.run(e):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,r=function(){return e.observer&&e.observer.observe(document.body,$u)};document.body?r():Ft.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),gi.forEach(function(r){return Ft.addEventListener(r,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),gi.forEach(function(r){return Ft.removeEventListener(r,e.listener,!0)}),this.stopped=!0)},t})(),hn=new Hu,bi=function(t){!xr&&t>0&&hn.start(),xr+=t,!xr&&hn.stop()},Gu=function(t){return!wn(t)&&!Nu(t)&&getComputedStyle(t).display==="inline"},Wu=(function(){function t(e,r){this.target=e,this.observedBox=r||Bt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=ha(this.target,this.observedBox,!0);return Gu(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),qu=(function(){function t(e,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=r}return t})(),lr=new WeakMap,xi=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},dr=(function(){function t(){}return t.connect=function(e,r){var n=new qu(e,r);lr.set(e,n)},t.observe=function(e,r,n){var i=lr.get(e),a=i.observationTargets.length===0;xi(i.observationTargets,r)<0&&(a&&We.push(i),i.observationTargets.push(new Wu(r,n&&n.box)),bi(1),hn.schedule())},t.unobserve=function(e,r){var n=lr.get(e),i=xi(n.observationTargets,r),a=n.observationTargets.length===1;i>=0&&(a&&We.splice(We.indexOf(n),1),n.observationTargets.splice(i,1),bi(-1))},t.disconnect=function(e){var r=this,n=lr.get(e);n.observationTargets.slice().forEach(function(i){return r.unobserve(e,i.target)}),n.activeTargets.splice(0,n.activeTargets.length)},t})(),Uu=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");dr.connect(this,e)}return t.prototype.observe=function(e,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hi(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");dr.observe(this,e,r)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!hi(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");dr.unobserve(this,e)},t.prototype.disconnect=function(){dr.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();function de(){return de=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
5for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},de.apply(this,arguments)}function Sr(t,e){if(t==null)return{};var r,n,i={},a=Object.keys(t);for(n=0;n<a.length;n++)e.indexOf(r=a[n])>=0||(i[r]=t[r]);return i}var Mt=typeof window<"u"?p.useLayoutEffect:p.useEffect;function Rt(t,e,r){return e=(e=+e)==e?e:0,r=(r=+r)==r?r:0,(t=+t)==t&&(t=(t=t<=r?t:r)>=e?t:e),t}function hr(t){var e=Math.round(t);if(Number.isNaN(t))throw new TypeError("Found a NaN! Check your snapPoints / defaultSnap / snapTo ");return e}var Ku={box:"border-box"};function Xr(t,e){var r=e.label,n=e.enabled,i=e.resizeSourceRef,a=p.useState(0),o=a[0],s=a[1];p.useDebugValue(r+": "+o);var u=p.useCallback(function(f){s(f[0].borderBoxSize[0].blockSize),i.current="element"},[i]);return Mt(function(){if(t.current&&n){var f=new Uu(u);return f.observe(t.current,Ku),function(){f.disconnect()}}},[t,u,n]),n?o:0}function le(t){return t===void 0&&(t=1e3),new Promise(function(e){return setTimeout(e,t)})}var Si={DRAG:{target:"#overlay.dragging",actions:"onOpenEnd"}},wi={RESIZE:{target:"#overlay.resizing",actions:"onOpenEnd"}},Xu=Ao({id:"overlay",initial:"closed",context:{initialState:"CLOSED"},states:{closed:{on:{OPEN:"opening",CLOSE:void 0}},opening:{initial:"start",states:{start:{invoke:{src:"onOpenStart",onDone:"transition"}},transition:{always:[{target:"immediately",cond:"initiallyOpen"},{target:"smoothly",cond:"initiallyClosed"}]},immediately:{initial:"open",states:{open:{invoke:{src:"openImmediately",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"#overlay.opening.end"},on:de({},Si,wi)}}},smoothly:{initial:"visuallyHidden",states:{visuallyHidden:{invoke:{src:"renderVisuallyHidden",onDone:"activating"}},activating:{invoke:{src:"activate",onDone:"open"}},open:{invoke:{src:"openSmoothly",onDone:"#overlay.opening.end"},on:de({},Si,wi)}}},end:{invoke:{src:"onOpenEnd",onDone:"done"},on:{CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:de({},{CLOSE:{target:"#overlay.closing",actions:"onOpenCancel"}}),onDone:"open"},open:{on:{DRAG:"#overlay.dragging",SNAP:"snapping",RESIZE:"resizing"}},dragging:{on:{SNAP:"snapping"}},snapping:{initial:"start",states:{start:{invoke:{src:"onSnapStart",onDone:"snappingSmoothly"},entry:[Po({y:function(t,e){return e.payload.y},velocity:function(t,e){return e.payload.velocity},snapSource:function(t,e){var r=e.payload.source;return r===void 0?"custom":r}})]},snappingSmoothly:{invoke:{src:"snapSmoothly",onDone:"end"}},end:{invoke:{src:"onSnapEnd",onDone:"done"},on:{RESIZE:"#overlay.resizing",SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{SNAP:{target:"snapping",actions:"onSnapEnd"},RESIZE:{target:"#overlay.resizing",actions:"onSnapCancel"},DRAG:{target:"#overlay.dragging",actions:"onSnapCancel"},CLOSE:{target:"#overlay.closing",actions:"onSnapCancel"}},onDone:"open"},resizing:{initial:"start",states:{start:{invoke:{src:"onResizeStart",onDone:"resizingSmoothly"}},resizingSmoothly:{invoke:{src:"resizeSmoothly",onDone:"end"}},end:{invoke:{src:"onResizeEnd",onDone:"done"},on:{SNAP:"#overlay.snapping",CLOSE:"#overlay.closing",DRAG:"#overlay.dragging"}},done:{type:"final"}},on:{RESIZE:{target:"resizing",actions:"onResizeEnd"},SNAP:{target:"snapping",actions:"onResizeCancel"},DRAG:{target:"#overlay.dragging",actions:"onResizeCancel"},CLOSE:{target:"#overlay.closing",actions:"onResizeCancel"}},onDone:"open"},closing:{initial:"start",states:{start:{invoke:{src:"onCloseStart",onDone:"deactivating"},on:{OPEN:{target:"#overlay.open",actions:"onCloseCancel"}}},deactivating:{invoke:{src:"deactivate",onDone:"closingSmoothly"}},closingSmoothly:{invoke:{src:"closeSmoothly",onDone:"end"}},end:{invoke:{src:"onCloseEnd",onDone:"done"},on:{OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}}},done:{type:"final"}},on:{CLOSE:void 0,OPEN:{target:"#overlay.opening",actions:"onCloseCancel"}},onDone:"closed"}},on:{CLOSE:"closing"}},{actions:{onOpenCancel:function(t,e){},onSnapCancel:function(t,e){},onResizeCancel:function(t,e){},onCloseCancel:function(t,e){},onOpenEnd:function(t,e){},onSnapEnd:function(t,e){},onRezizeEnd:function(t,e){}},services:{onSnapStart:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenStart:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseStart:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeStart:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},onSnapEnd:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},onOpenEnd:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},onCloseEnd:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},onResizeEnd:function(){try{return Promise.resolve(le()).then(function(){})}catch(t){return Promise.reject(t)}},renderVisuallyHidden:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}},activate:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}},deactivate:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}},openSmoothly:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}},openImmediately:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}},snapSmoothly:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}},resizeSmoothly:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}},closeSmoothly:function(t,e){try{return Promise.resolve(le()).then(function(){})}catch(r){return Promise.reject(r)}}},guards:{initiallyClosed:function(t){return t.initialState==="CLOSED"},initiallyOpen:function(t){return t.initialState==="OPEN"}}}),Yu=["children","sibling","className","footer","header","open","initialState","lastSnapRef","initialFocusRef","onDismiss","maxHeight","defaultSnap","snapPoints","blocking","scrollLocking","style","onSpringStart","onSpringCancel","onSpringEnd","reserveScrollBarGap","expandOnContentDrag"],Ju=["velocity"],Zu=["onRest","config"],ya=es.default,Qu=ya.tension,vr=ya.friction,ef=ge.forwardRef(function(t,e){var r=t.children,n=t.sibling,i=t.className,a=t.footer,o=t.header,s=t.open,u=t.initialState,f=t.lastSnapRef,c=t.initialFocusRef,l=t.onDismiss,d=t.maxHeight,h=t.defaultSnap,g=h===void 0?rf:h,m=t.snapPoints,A=m===void 0?nf:m,w=t.blocking,b=w===void 0||w,S=t.scrollLocking,C=S===void 0||S,P=t.style,v=t.onSpringStart,y=t.onSpringCancel,E=t.onSpringEnd,R=t.reserveScrollBarGap,D=R===void 0?b:R,O=t.expandOnContentDrag,N=O!==void 0&&O,L=Sr(t,Yu),U=(function(){var x=p.useState(!1),I=x[0],k=x[1],M=p.useState({}),J=M[0],B=M[1],q=p.useCallback(function(K){return B(function(Z){var j;return de({},Z,((j={})[K]=!1,j))}),function(){B(function(Z){var j;return de({},Z,((j={})[K]=!0,j))})}},[]);return p.useEffect(function(){var K=Object.values(J);K.length!==0&&K.every(Boolean)&&k(!0)},[J]),{ready:I,registerReady:q}})(),ee=U.ready,Ae=U.registerReady,ae=p.useRef(!1),Y=p.useRef(v),oe=p.useRef(y),re=p.useRef(E);p.useEffect(function(){Y.current=v,oe.current=y,re.current=E},[y,v,E]);var te,W,Ve=as(function(){return{y:0,ready:0,maxHeight:0,minSnap:0,maxSnap:0}}),he=Ve[0],Pe=Ve[1],zr=p.useRef(null),yt=p.useRef(null),En=p.useRef(null),On=p.useRef(null),Tn=p.useRef(null),Rn=p.useRef(null),Ne=p.useRef(0),Ke=p.useRef(),Fr=p.useRef(!1),Le=(te=p.useMemo(function(){return typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null},[]),W=p.useRef(te?.matches),p.useDebugValue(W.current?"reduce":"no-preference"),p.useEffect(function(){var x=function(I){W.current=I.matches};return te?.addListener(x),function(){return te?.removeListener(x)}},[te]),W),Xe=(function(x){var I=x.targetRef,k=x.enabled,M=x.reserveScrollBarGap,J=p.useRef({activate:function(){throw new TypeError("Tried to activate scroll lock too early")},deactivate:function(){}});return p.useDebugValue(k?"Enabled":"Disabled"),p.useEffect(function(){if(!k)return J.current.deactivate(),void(J.current={activate:function(){},deactivate:function(){}});var B=I.current,q=!1;J.current={activate:function(){q||(q=!0,xa(B,{allowTouchMove:function(K){return K.closest("[data-body-scroll-lock-ignore]")},reserveScrollBarGap:M}))},deactivate:function(){q&&(q=!1,Sa(B))}}},[k,I,M]),J}
5)({targetRef:yt,enabled:ee&&C,reserveScrollBarGap:D}),Ye=(function(x){var I=x.targetRef,k=x.enabled,M=p.useRef({activate:function(){throw new TypeError("Tried to activate aria hider too early")},deactivate:function(){}});return p.useDebugValue(k?"Enabled":"Disabled"),p.useEffect(function(){if(!k)return M.current.deactivate(),void(M.current={activate:function(){},deactivate:function(){}});var J=I.current,B=!1,q=[],K=[];M.current={activate:function(){if(!B){B=!0;var Z=J.parentNode;document.querySelectorAll("body > *").forEach(function(j){if(j!==Z){var $=j.getAttribute("aria-hidden");$!==null&&$!=="false"||(q.push($),K.push(j),j.setAttribute("aria-hidden","true"))}})}},deactivate:function(){B&&(B=!1,K.forEach(function(Z,j){var $=q[j];$===null?Z.removeAttribute("aria-hidden"):Z.setAttribute("aria-hidden",$)}),q=[],K=[])}}},[I,k]),M})({targetRef:zr,enabled:ee&&b}),Je=(function(x){var I=x.targetRef,k=x.fallbackRef,M=x.initialFocusRef,J=x.enabled,B=p.useRef({activate:function(){throw new TypeError("Tried to activate focus trap too early")},deactivate:function(){}});return p.useDebugValue(J?"Enabled":"Disabled"),p.useEffect(function(){if(!J)return B.current.deactivate(),void(B.current={activate:function(){},deactivate:function(){}});var q=k.current,K=Ru(I.current,{onActivate:void 0,initialFocus:M?function(){return M?.current||q}:void 0,fallbackFocus:q,escapeDeactivates:!1,clickOutsideDeactivates:!1}),Z=!1;B.current={activate:function(){try{return Z?Promise.resolve():(Z=!0,Promise.resolve(K.activate()).then(function(){return Promise.resolve(new Promise(function(j){return setTimeout(function(){return j(void 0)},0)})).then(function(){})}))}catch(j){return Promise.reject(j)}},deactivate:function(){Z&&(Z=!1,K.deactivate())}}},[J,k,M,I]),B})({targetRef:zr,fallbackRef:Rn,initialFocusRef:c||void 0,enabled:ee&&b&&c!==!1}),Gt=(function(x){var I=x.getSnapPoints,k=x.heightRef,M=x.lastSnapRef,J=x.ready,B=(function(ue){var we=ue.contentRef,Ie=ue.controlledMaxHeight,pe=ue.footerEnabled,Be=ue.footerRef,Qe=ue.headerEnabled,Ee=ue.headerRef,xt=ue.registerReady,Kt=ue.resizeSourceRef,Pn=p.useMemo(function(){return xt("contentHeight")},[xt]),Cn=(function(St,In,Xt){var Yt=p.useMemo(function(){return In("maxHeight")},[In]),jn=p.useState(function(){return hr(St)||typeof window<"u"?window.innerHeight:0}),Ln=jn[0],Vr=jn[1],zn=Ln>0,Jt=p.useRef(0);return p.useDebugValue(St?"controlled":"auto"),p.useEffect(function(){zn&&Yt()},[zn,Yt]),Mt(function(){if(St)return Vr(hr(St)),void(Xt.current="maxheightprop");var Fn=function(){Jt.current||(Jt.current=requestAnimationFrame(function(){Vr(window.innerHeight),Xt.current="window",Jt.current=0}))};return window.addEventListener("resize",Fn),Vr(window.innerHeight),Xt.current="window",Yt(),function(){window.removeEventListener("resize",Fn),cancelAnimationFrame(Jt.current)}},[St,Yt,Xt]),Ln})(Ie,xt,Kt),Mr=Xr(Ee,{label:"headerHeight",enabled:Qe,resizeSourceRef:Kt}),Dn=Xr(we,{label:"contentHeight",enabled:!0,resizeSourceRef:Kt}),_r=Xr(Be,{label:"footerHeight",enabled:pe,resizeSourceRef:Kt}),Nn=Math.min(Cn-Mr-_r,Dn)+Mr+_r;p.useDebugValue("minHeight: "+Nn);var kn=Dn>0;return p.useEffect(function(){kn&&Pn()},[kn,Pn]),{maxHeight:Cn,minHeight:Nn,headerHeight:Mr,footerHeight:_r}})({contentRef:x.contentRef,controlledMaxHeight:x.controlledMaxHeight,footerEnabled:x.footerEnabled,footerRef:x.footerRef,headerEnabled:x.headerEnabled,headerRef:x.headerRef,registerReady:x.registerReady,resizeSourceRef:x.resizeSourceRef}),q=B.maxHeight,K=B.minHeight,Z=B.headerHeight,j=B.footerHeight,$=(function(ue,we){var Ie=[].concat(ue).map(hr).reduce(function(Ee,xt){return Ee.add(Rt(xt,0,we)),Ee},new Set),pe=Array.from(Ie),Be=Math.min.apply(Math,pe);if(Number.isNaN(Be))throw new TypeError("minSnap is NaN");var Qe=Math.max.apply(Math,pe);if(Number.isNaN(Qe))throw new TypeError("maxSnap is NaN");return{snapPoints:pe,minSnap:Be,maxSnap:Qe}})(J?I({height:k.current,footerHeight:j,headerHeight:Z,minHeight:K,maxHeight:q}):[0],q),be=$.snapPoints,Ze=$.minSnap,Se=$.maxSnap;return p.useDebugValue("minSnap: "+Ze+", maxSnap:"+Se),{minSnap:Ze,maxSnap:Se,findSnap:function(ue){var we=hr(typeof ue=="function"?ue({footerHeight:j,headerHeight:Z,height:k.current,minHeight:K,maxHeight:q,snapPoints:be,lastSnap:M.current}):ue);return be.reduce(function(Ie,pe){return Math.abs(pe-we)<Math.abs(Ie-we)?pe:Ie},Ze)},maxHeight:q}})({contentRef:En,controlledMaxHeight:d,footerEnabled:!!a,footerRef:Tn,getSnapPoints:A,headerEnabled:o!==!1,headerRef:On,heightRef:Ne,lastSnapRef:f,ready:ee,registerReady:Ae,resizeSourceRef:Ke}),gt=Gt.minSnap,mt=Gt.maxSnap,bt=Gt.maxHeight,Wt=Gt.findSnap,ke=p.useRef(bt),me=p.useRef(gt),ne=p.useRef(mt),qt=p.useRef(Wt),Ce=p.useRef(0);Mt(function(){ke.current=bt,ne.current=mt,me.current=gt,qt.current=Wt,Ce.current=Wt(g)},[Wt,g,bt,mt,gt]);var ve=p.useCallback(function(x){var I=x.onRest,k=x.config,M=(k=k===void 0?{}:k).velocity,J=M===void 0?1:M,B=Sr(k,Ju),q=Sr(x,Zu);return new Promise(function(K){return Pe(de({},q,{config:de({velocity:J},B,{mass:1,tension:Qu,friction:Math.max(vr,vr+(vr-vr*J))}),onRest:function(){var Z=[].slice.call(arguments);K.apply(void 0,Z),I?.apply(void 0,Z)}}))})},[Pe]),An=Fo(Xu,{devTools:!1,actions:{onOpenCancel:p.useCallback(function(){return oe.current==null?void 0:oe.current({type:"OPEN"})},[]),onSnapCancel:p.useCallback(function(x){return oe.current==null?void 0:oe.current({type:"SNAP",source:x.snapSource})},[]),onCloseCancel:p.useCallback(function(){return oe.current==null?void 0:oe.current({type:"CLOSE"})},[]),onResizeCancel:p.useCallback(function(){return oe.current==null?void 0:oe.current({type:"RESIZE",source:Ke.current})},[]),onOpenEnd:p.useCallback(function(){return re.current==null?void 0:re.current({type:"OPEN"})},[]),onSnapEnd:p.useCallback(function(x,I){return re.current==null?void 0:re.current({type:"SNAP",source:x.snapSource})},[]),onResizeEnd:p.useCallback(function(){return re.current==null?void 0:re.current({type:"RESIZE",source:Ke.current})},[])},context:{initialState:u},services:{onSnapStart:p.useCallback(function(x,I){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"SNAP",source:I.payload.source||"custom"}))}catch(k){return Promise.reject(k)}},[]),onOpenStart:p.useCallback(function(){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"OPEN"}))}catch(x){return Promise.reject(x)}},[]),onCloseStart:p.useCallback(function(){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"CLOSE"}))}catch(x){return Promise.reject(x)}},[]),onResizeStart:p.useCallback(function(){try{return Promise.resolve(Y.current==null?void 0:Y.current({type:"RESIZE",source:Ke.current}))}catch(x){return Promise.reject(x)}},[]),onSnapEnd:p.useCallback(function(x,I){try{return Promise.resolve(re.current==null?void 0:re.current({type:"SNAP",source:x.snapSource}))}catch(k){return Promise.reject(k)}},[]),onOpenEnd:p.useCallback(function(){try{return Promise.resolve(re.current==null?void 0:re.current({type:"OPEN"}))}catch(x){return Promise.reject(x)}},[]),onCloseEnd:p.useCallback(function(){try{return Promise.resolve(re.current==null?void 0:re.current({type:"CLOSE"}))}catch(x){return Promise.reject(x)}},[]),onResizeEnd:p.useCallback(function(){try{return Promise.resolve(re.current==null?void 0:re.current({type:"RESIZE",source:Ke.current}))}catch(x){return Promise.reject(x)}},[]),renderVisuallyHidden:p.useCallback(function(x,I){try{return Promise.resolve(ve({y:Ce.current,ready:0,maxHeight:ke.current,maxSnap:ne.current,minSnap:Ce.current,immediate:!0})).then(function(){})}catch(k){return Promise.reject(k)}},[ve]),activate:p.useCallback(function(x,I){try{return ae.current=!0,Promise.resolve(Promise.all([Xe.current.activate(),Je.current.activate(),Ye.current.activate()])).then(function(){})}catch(k){return Promise.reject(k)}},[Ye,Je,Xe]),deactivate:p.useCallback(function(){try{return Xe.current.deactivate(),Je.current.deactivate(),Ye.current.deactivate(),ae.current=!1,Promise.resolve()}catch(x){return Promise.reject(x)}},[Ye,Je,Xe]),openImmediately:p.useCallback(function(){try{return Ne.current=Ce.current,Promise.resolve(ve({y:Ce.current,ready:1,maxHeight:ke.current,maxSnap:ne.current,minSnap:Ce.current,immediate:!0})).then(function(){})}catch(x){return Promise.reject(x)}},[ve]),openSmoothly:p.useCallback(function(){try{return Promise.resolve(ve({y:0,ready:1,maxHeight:ke.current,maxSnap:ne.current,minSnap:Ce.current,immediate:!0})).then(function(){return Ne.current=Ce.current,Promise.resolve(ve({y:Ce.current,ready:1,maxHeight:ke.current,maxSnap:ne.current,minSnap:Ce.current,immediate:Le.current})).then(function(){})})}catch(x){return Promise.reject(x)}},[ve,Le]),snapSmoothly:p.useCallback(function(x,I){try{var k=qt.current(x.y);return Ne.current=k,f.current=k,Promise.resolve(ve({y:k,ready:1,maxHeight:ke.current,maxSnap:ne.current,minSnap:me.current,immediate:Le.current,config:{velocity:x.velocity}})).then(function(){})}catch(M){return Promise.reject(M)}},[ve,f,Le]),resizeSmoothly:p.useCallback(function(){try{var x=qt.current(Ne.current);return Ne.current=x,f.current=x,Promise.resolve(ve({y:x,ready:1,maxHeight:ke.current,maxSnap:ne.current,minSnap:me.current,immediate:Ke.current!=="element"||Le.current})).then(function(){})}catch(I){return Promise.reject(I)}},[ve,f,Le]),closeSmoothly:p.useCallback(function(x,I){try{return ve({minSnap:Ne.current,immediate:!0}),Ne.current=0,Promise.resolve(ve({y:0,maxHeight:ke.current,maxSnap:ne.current,immediate:Le.current})).then(function(){return Promise.resolve(ve({ready:0,immediate:!0})).then(function(){})})}catch(k){return Promise.reject(k)}},[ve,Le])}}),ga=An[0],ze=An[1];p.useEffect(function(){ee&&ze(s?"OPEN":"CLOSE")},[s,ze,ee]),Mt(function(){(bt||mt||gt)&&ze("RESIZE")},[bt,mt,gt,ze]),p.useEffect(function(){return function(){Xe.current.deactivate(),Je.current.deactivate(),Ye.current.deactivate()}},[Ye,Je,Xe]),p.useImperativeHandle(e,function(){return{snapTo:function(x,I){var k=I===void 0?{}:I,M=k.velocity,J=M===void 0?1:M,B=k.source,q=B===void 0?"custom"
5:B;ze("SNAP",{payload:{y:qt.current(x),velocity:J,source:q}})},get height(){return Ne.current}}},[ze]),p.useEffect(function(){var x=yt.current,I=function(M){Fr.current&&M.preventDefault()},k=function(M){x.scrollTop<0&&(requestAnimationFrame(function(){x.style.overflow="hidden",x.scrollTop=0,x.style.removeProperty("overflow")}),M.preventDefault())};return N&&(x.addEventListener("scroll",I),x.addEventListener("touchmove",I),x.addEventListener("touchstart",k)),function(){x.removeEventListener("scroll",I),x.removeEventListener("touchmove",I),x.removeEventListener("touchstart",k)}},[N,yt]);var Ut=su(function(x){var I=x.args,k=(I=I===void 0?[]:I)[0],M=(k=k===void 0?{}:k).closeOnTap,J=M!==void 0&&M,B=k.isContentDragging,q=B!==void 0&&B,K=x.cancel,Z=x.direction[1],j=x.down,$=x.first,be=x.last,Ze=x.memo,Se=Ze===void 0?he.y.getValue():Ze,ue=x.tap,we=x.velocity,Ie=-1*x.movement[1];if(!ae.current)return K(),Se;if(l&&J&&ue)return K(),setTimeout(function(){return l()},0),Se;if(ue)return Se;var pe=Se+Ie,Be=Ie*we,Qe=Math.max(me.current,Math.min(ne.current,pe+2*Be));if(!j&&l&&Z>0&&pe+Be<me.current/2)return K(),l(),Se;var Ee=j?l||me.current!==ne.current?zt(pe,l?0:me.current,ne.current,.55):pe<me.current?zt(pe,me.current,2*ne.current,.55):zt(pe,me.current/2,ne.current,.55):Qe;return N&&q?(Ee>=ne.current&&(Ee=ne.current),Se===ne.current&&yt.current.scrollTop>0&&(Ee=ne.current),Fr.current=Ee<ne.current):Fr.current=!1,$&&ze("DRAG"),be?(ze("SNAP",{payload:{y:Ee,velocity:we>.05?we:1,source:"dragging"}}),Se):(Pe({y:Ee,ready:1,maxHeight:ke.current,maxSnap:ne.current,minSnap:me.current,immediate:!0,config:{velocity:we}}),Se)},{filterTaps:!0});if(Number.isNaN(ne.current))throw new TypeError("maxSnapRef is NaN!!");if(Number.isNaN(me.current))throw new TypeError("minSnapRef is NaN!!");var ma=(function(x){var I,k=x.spring,M=it([k.y,k.maxHeight],function(j,$){return Math.round(Rt($-j,0,16))+"px"}),J=it([k.y,k.minSnap,k.maxSnap],function(j,$,be){return Rt(j,$,be)+"px"}),B=it([k.y,k.minSnap,k.maxSnap],function(j,$,be){return j<$?$-j+"px":j>be?be-j+"px":"0px"}),q=it([k.y,k.maxSnap],function(j,$){return j>=$?Math.ceil(j-$):0}),K=it([k.y,k.minSnap],function(j,$){if(!$)return 0;var be=Math.max($/2-45,0);return Rt((j-be)*(1/(Math.min($/2+45,$)-be)+0),0,1)}),Z=it([k.y,k.minSnap],function(j,$){return $?Rt(j/$,0,1):0});return(I={})["--rsbs-content-opacity"]=K,I["--rsbs-backdrop-opacity"]=Z,I["--rsbs-antigap-scale-y"]=q,I["--rsbs-overlay-translate-y"]=B,I["--rsbs-overlay-rounded"]=M,I["--rsbs-overlay-h"]=J,I})({spring:he});return ge.createElement(Os.div,de({},L,{"data-rsbs-root":!0,"data-rsbs-state":tf.find(ga.matches),"data-rsbs-is-blocking":b,"data-rsbs-is-dismissable":!!l,"data-rsbs-has-header":!!o,"data-rsbs-has-footer":!!a,className:i,ref:zr,style:de({},ma,P,{opacity:he.ready})}),n,b&&ge.createElement("div",de({key:"backdrop","data-rsbs-backdrop":!0},Ut({closeOnTap:!0}))),ge.createElement("div",{key:"overlay","aria-modal":"true",role:"dialog","data-rsbs-overlay":!0,tabIndex:-1,ref:Rn,onKeyDown:function(x){x.key==="Escape"&&(x.stopPropagation(),l&&l())}},o!==!1&&ge.createElement("div",de({key:"header","data-rsbs-header":!0,ref:On},Ut()),o),ge.createElement("div",de({key:"scroll","data-rsbs-scroll":!0,ref:yt},N?Ut({isContentDragging:!0}):{}),ge.createElement("div",{"data-rsbs-content":!0,ref:En},r)),a&&ge.createElement("div",de({key:"footer",ref:Tn,"data-rsbs-footer":!0},Ut()),a)))}),tf=["closed","opening","open","closing","dragging","snapping","resizing"];function rf(t){var e=t.lastSnap;return e??Math.min.apply(Math,t.snapPoints)}function nf(t){return t.minHeight}var af=["onSpringStart","onSpringEnd","skipInitialTransition"],of=p.forwardRef(function(t,e){var r=t.onSpringStart,n=t.onSpringEnd,i=t.skipInitialTransition,a=Sr(t,af),o=p.useState(!1),s=o[0],u=o[1],f=p.useRef(),c=p.useRef(null),l=p.useRef(i&&a.open?"OPEN":"CLOSED");Mt(function(){if(a.open)return cancelAnimationFrame(f.current),u(!0),function(){l.current="CLOSED"}},[a.open]);var d=p.useCallback(function(g){return Promise.resolve(r?.(g)).then(function(){g.type==="OPEN"&&cancelAnimationFrame(f.current)})},[r]),h=p.useCallback(function(g){return Promise.resolve(n?.(g)).then(function(){g.type==="CLOSE"&&(f.current=requestAnimationFrame(function(){return u(!1)}))})},[n]);return s?ge.createElement(Na,{"data-rsbs-portal":!0},ge.createElement(ef,de({},a,{lastSnapRef:c,ref:e,initialState:l.current,onSpringStart:d,onSpringEnd:h}))):null});const sf="_withCloseButton_1bfmv_14",uf="_buttonCloseWrapper_1bfmv_14",ff="_imageTopWrapper_1bfmv_18",cf="_imageTopWrapperWithImageTopOverlay_1bfmv_24",lf="_withAboveTitle_1bfmv_46",df="_withImageTop_1bfmv_49",ot={withCloseButton:sf,buttonCloseWrapper:uf,imageTopWrapper:ff,imageTopWrapperWithImageTopOverlay:cf,withAboveTitle:lf,withImageTop:df},Rf=Ei,Af=({aboveTitleContent:t,ariaLabel:e,applyBodyScrollLock:r=!0,belowTitleContent:n,classes:i,children:a,closeModal:o,footer:s,fullScreen:u=!1,hideCloseIcon:f=!1,id:c,imageTop:l,imageTopOverlay:d,modalStyle:h=Ta.Default,onBackPress:g,showModal:m,snapPoints:A,title:w})=>{const b=()=>
5Ra()<Ei,[S,C]=p.useState(b()),P=()=>{C(b())};Aa(()=>(window.addEventListener("resize",P,!1),()=>{window.removeEventListener("resize",P)})),p.useEffect(()=>{m&&S&&requestAnimationFrame(()=>{const L=document.querySelector("[data-rsbs-content]");L instanceof HTMLElement&&(L.scrollTop=0)})},[m,S]);const v=p.useId(),y=`${v}-label`,E=`${v}-title`,R=!!e,D=u?({maxHeight:L})=>[L]:A,O=fe.jsxs(of,{"aria-labelledby":R?y:E,blocking:!1,className:et("background--light",i?.bottomSheet,{[ot.withCloseButton]:!f,[ot.withAboveTitle]:!!t,[ot.withImageTop]:!!l}),id:c,footer:s,snapPoints:D,header:fe.jsxs(fe.Fragment,{children:[!!l&&fe.jsxs("div",{className:et(je.imageTopWrapper,ot.imageTopWrapper,!!d&&ot.imageTopWrapperWithImageTopOverlay),children:[fe.jsx("img",{className:je.imageTop,src:l,alt:""}),d]}),!!g&&fe.jsx(wa,{as:"button",className:je.buttonBack,onClick:g,"aria-label":"Back",children:fe.jsx("span",{className:"rinse-icon rinse-icon--arrow-left-long","aria-hidden":"true"})}),!f&&fe.jsx("div",{className:et(je.buttonCloseWrapper,ot.buttonCloseWrapper),children:fe.jsx(Ea,{classes:{container:je.buttonClose,icon:je.buttonCloseIcon},onClick:o,testId:"close-modal-button"})})]}),onDismiss:o,open:m,sibling:fe.jsx("div",{"data-rsbs-backdrop":"true",onClick:L=>{L.stopPropagation(),L.preventDefault(),o()}}),children:[R&&fe.jsx("div",{id:y,className:"sr-only",children:e}),(t||w)&&fe.jsxs("div",{className:et(je.titleWrapper,i?.titleWrapper),children:[t&&fe.jsx("div",{className:"overline",children:t}),w&&fe.jsx("h3",{id:E,className:et(je.title,i?.title),"aria-hidden":e?"true":void 0,children:w}),n&&fe.jsx("div",{className:i?.belowTitleContent,children:n})]}),fe.jsx("div",{className:et(je.body,i?.body),children:a})]}),N=fe.jsx(Oa,{aboveTitleContent:t,ariaLabel:e,applyBodyScrollLock:r,belowTitleContent:n,classes:{body:i?.body,content:i?.modalContent,header:i?.modalHeader,modal:i?.modal,modalInnerContainer:i?.modalInnerContainer,modalContainer:i?.modalContainer,modalRoot:i?.modalRoot,title:i?.title,titleWrapper:i?.titleWrapper},closeModal:o,hideCloseIcon:f,id:c,mediaTop:l,modalStyle:h,onBackPress:g,showModal:m,title:w,footer:s,children:a});return S?O:N};export{Af as B,Rf as M,ot as m};
6//# sourceMappingURL=index.1.sha256-75f4d927f5.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.