@flarehr/superhero-pba-support-admin 1.0.1569 → 1.0.1572

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/bundle.js +1 -1
  2. package/package.json +1 -1
package/build/bundle.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";var t,e,n,i,r,o,s,a,l,c,d,u={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function f(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function y(e,n,i){var r,o,s,a={};for(s in n)"key"==s?r=n[s]:"ref"==s?o=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?t.call(arguments,2):i),"function"==typeof e&&null!=e.defaultProps)for(s in e.defaultProps)void 0===a[s]&&(a[s]=e.defaultProps[s]);return v(e,a,r,o,null)}function v(t,i,r,o,s){var a={type:t,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=e.vnode&&e.vnode(a),a}function b(t){return t.children}function w(t,e){this.props=t,this.context=e}function x(t,e){if(null==e)return t.__?x(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?x(t):null}function _(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return _(t)}}function k(t){(!t.__d&&(t.__d=!0)&&i.push(t)&&!T.__r++||r!==e.debounceRendering)&&((r=e.debounceRendering)||o)(T)}function T(){var t,n,r,o,a,l,c,d;for(i.sort(s);t=i.shift();)t.__d&&(n=i.length,o=void 0,l=(a=(r=t).__v).__e,c=[],d=[],r.__P&&((o=f({},a)).__v=a.__v+1,e.vnode&&e.vnode(o),O(r.__P,o,a,r.__n,r.__P.namespaceURI,32&a.__u?[l]:null,c,null==l?x(a):l,!!(32&a.__u),d),o.__v=a.__v,o.__.__k[o.__i]=o,M(c,o,d),o.__e!=l&&_(o)),i.length>n&&i.sort(s));T.__r=0}function S(t,e,n,i,r,o,s,a,l,c,d){var p,f,g,y,w,_=i&&i.__k||h,k=e.length;for(n.__d=l,function(t,e,n){var i,r,o,s,a,l=e.length,c=n.length,d=c,u=0;for(t.__k=[],i=0;i<l;i++)s=i+u,null!=(r=t.__k[i]=null==(r=e[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?v(null,r,null,null,null):m(r)?v(b,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?v(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=t,r.__b=t.__b+1,a=C(r,n,s,d),r.__i=a,o=null,-1!==a&&(d--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&u--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a===s+1?u++:a>s?d>l-s?u+=a-s:u--:a<s?a==s-1&&(u=a-s):u=0,a!==i+u&&(r.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=x(o)),L(o,o,!1),n[s]=null,d--);if(d)for(i=0;i<c;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==t.__d&&(t.__d=x(o)),L(o,o))}(n,e,_),l=n.__d,p=0;p<k;p++)null!=(g=n.__k[p])&&"boolean"!=typeof g&&"function"!=typeof g&&(f=-1===g.__i?u:_[g.__i]||u,g.__i=p,O(t,g,f,r,o,s,a,l,c,d),y=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&D(f.ref,null,g),d.push(g.ref,g.__c||y,g)),null==w&&null!=y&&(w=y),65536&g.__u||f.__k===g.__k?(l&&!l.isConnected&&(l=x(f)),l=A(g,l,t)):"function"==typeof g.type&&void 0!==g.__d?l=g.__d:y&&(l=y.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=l,n.__e=w}function A(t,e,n){var i,r;if("function"==typeof t.type){for(i=t.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=t,e=A(i[r],e,n));return e}t.__e!=e&&(n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function P(t,e){return e=e||[],null==t||"boolean"==typeof t||(m(t)?t.some((function(t){P(t,e)})):e.push(t)),e}function C(t,e,n,i){var r=t.key,o=t.type,s=n-1,a=n+1,l=e[n];if(null===l||l&&r==l.key&&o===l.type&&!(131072&l.__u))return n;if(i>(null==l||131072&l.__u?0:1))for(;s>=0||a<e.length;){if(s>=0){if((l=e[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function E(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function N(t,e,n,i,r){var o;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||E(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||E(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])o=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?i?n.u=i.u:(n.u=a,t.addEventListener(e,o?c:l,o)):t.removeEventListener(e,o?c:l,o);else{if("http://www.w3.org/2000/svg"==r)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,n))}}function R(t){return function(n){if(this.l){var i=this.l[n.type+t];if(null==n.t)n.t=a++;else if(n.t<i.u)return;return i(e.event?e.event(n):n)}}}function O(n,i,r,o,s,a,l,c,d,h){var p,y,v,_,k,T,A,P,C,E,R,O,M,D,L,V=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(d=!!(32&r.__u),a=[c=i.__e=r.__e]),(p=e.__b)&&p(i);t:if("function"==typeof V)try{if(P=i.props,C=(p=V.contextType)&&o[p.__c],E=p?C?C.props.value:p.__:o,r.__c?A=(y=i.__c=r.__c).__=y.__E:("prototype"in V&&V.prototype.render?i.__c=y=new V(P,E):(i.__c=y=new w(P,E),y.constructor=V,y.render=j),C&&C.sub(y),y.props=P,y.state||(y.state={}),y.context=E,y.__n=o,v=y.__d=!0,y.__h=[],y._sb=[]),null==y.__s&&(y.__s=y.state),null!=V.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=f({},y.__s)),f(y.__s,V.getDerivedStateFromProps(P,y.__s))),_=y.props,k=y.state,y.__v=i,v)null==V.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==V.getDerivedStateFromProps&&P!==_&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(P,E),!y.__e&&(null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(P,y.__s,E)||i.__v===r.__v)){for(i.__v!==r.__v&&(y.props=P,y.state=y.__s,y.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.forEach((function(t){t&&(t.__=i)})),R=0;R<y._sb.length;R++)y.__h.push(y._sb[R]);y._sb=[],y.__h.length&&l.push(y);break t}null!=y.componentWillUpdate&&y.componentWillUpdate(P,y.__s,E),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(_,k,T)}))}if(y.context=E,y.props=P,y.__P=n,y.__e=!1,O=e.__r,M=0,"prototype"in V&&V.prototype.render){for(y.state=y.__s,y.__d=!1,O&&O(i),p=y.render(y.props,y.state,y.context),D=0;D<y._sb.length;D++)y.__h.push(y._sb[D]);y._sb=[]}else do{y.__d=!1,O&&O(i),p=y.render(y.props,y.state,y.context),y.state=y.__s}while(y.__d&&++M<25);y.state=y.__s,null!=y.getChildContext&&(o=f(f({},o),y.getChildContext())),v||null==y.getSnapshotBeforeUpdate||(T=y.getSnapshotBeforeUpdate(_,k)),S(n,m(L=null!=p&&p.type===b&&null==p.key?p.props.children:p)?L:[L],i,r,o,s,a,l,c,d,h),y.base=i.__e,i.__u&=-161,y.__h.length&&l.push(y),A&&(y.__E=y.__=null)}catch(F){i.__v=null,d||null!=a?(i.__e=c,i.__u|=d?160:32,a[a.indexOf(c)]=null):(i.__e=r.__e,i.__k=r.__k),e.__e(F,i,r)}else null==a&&i.__v===r.__v?(i.__k=r.__k,i.__e=r.__e):i.__e=function(e,n,i,r,o,s,a,l,c){var d,h,p,f,y,v,b,w=i.props,_=n.props,k=n.type;if("svg"===k?o="http://www.w3.org/2000/svg":"math"===k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=s)for(d=0;d<s.length;d++)if((y=s[d])&&"setAttribute"in y==!!k&&(k?y.localName===k:3===y.nodeType)){e=y,s[d]=null;break}if(null==e){if(null===k)return document.createTextNode(_);e=document.createElementNS(o,k,_.is&&_),s=null,l=!1}if(null===k)w===_||l&&e.data===_||(e.data=_);else{if(s=s&&t.call(e.childNodes),w=i.props||u,!l&&null!=s)for(w={},d=0;d<e.attributes.length;d++)w[(y=e.attributes[d]).name]=y.value;for(d in w)if(y=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=y;else if("key"!==d&&!(d in _)){if("value"==d&&"defaultValue"in _||"checked"==d&&"defaultChecked"in _)continue;N(e,d,null,y,o)}for(d in _)y=_[d],"children"==d?f=y:"dangerouslySetInnerHTML"==d?h=y:"value"==d?v=y:"checked"==d?b=y:"key"===d||l&&"function"!=typeof y||w[d]===y||N(e,d,y,w[d],o);if(h)l||p&&(h.__html===p.__html||h.__html===e.innerHTML)||(e.innerHTML=h.__html),n.__k=[];else if(p&&(e.innerHTML=""),S(e,m(f)?f:[f],n,i,r,"foreignObject"===k?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:i.__k&&x(i,0),l,c),null!=s)for(d=s.length;d--;)null!=s[d]&&g(s[d]);l||(d="value",void 0!==v&&(v!==e[d]||"progress"===k&&!v||"option"===k&&v!==w[d])&&N(e,d,v,w[d],o),d="checked",void 0!==b&&b!==e[d]&&N(e,d,b,w[d],o))}return e}(r.__e,i,r,o,s,a,l,d,h);(p=e.diffed)&&p(i)}function M(t,n,i){n.__d=void 0;for(var r=0;r<i.length;r++)D(i[r],i[++r],i[++r]);e.__c&&e.__c(n,t),t.some((function(n){try{t=n.__h,n.__h=[],t.some((function(t){t.call(n)}))}catch(i){e.__e(i,n.__v)}}))}function D(t,n,i){try{"function"==typeof t?t(n):t.current=n}catch(r){e.__e(r,i)}}function L(t,n,i){var r,o;if(e.unmount&&e.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||D(r,null,n)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){e.__e(s,n)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],n,i||"function"!=typeof t.type);i||null==t.__e||g(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function j(t,e,n){return this.constructor(t,n)}function V(n,i,r){var o,s,a,l;e.__&&e.__(n,i),s=(o="function"==typeof r)?null:r&&r.__k||i.__k,a=[],l=[],O(i,n=(!o&&r||i).__k=y(b,null,[n]),s||u,u,i.namespaceURI,!o&&r?[r]:s?null:i.firstChild?t.call(i.childNodes):null,a,!o&&r?r:s?s.__e:i.firstChild,o,l),M(a,n,l)}function F(t,e){V(t,e,F)}function U(e,n,i){var r,o,s,a,l=f({},e.props);for(s in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),n)"key"==s?r=n[s]:"ref"==s?o=n[s]:l[s]=void 0===n[s]&&void 0!==a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):i),v(e.type,l,r||e.key,o||e.ref,null)}function B(t,e){var n={__c:e="__cC"+d++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,i;return this.getChildContext||(n=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,k(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}t=h.slice,e={__e:function(t,e,n,i){for(var r,o,s;e=e.__;)if((r=e.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(t)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),s=r.__d),s)return r.__E=r}catch(a){t=a}throw t}},n=0,w.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof t&&(t=t(f({},n),this.props)),t&&f(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},w.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},w.prototype.render=b,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(t,e){return t.__v.__b-e.__v.__b},T.__r=0,a=0,l=R(!1),c=R(!0),d=0;var I=0;function z(t,n,i,r,o,s){n||(n={});var a,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?a=n[l]:c[l]=n[l];var d={type:t,props:c,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--I,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof t&&(a=t.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return e.vnode&&e.vnode(d),d}const $="*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size=\"1\"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")}@media(forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")}@media(forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media(forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.z-10{z-index:10}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-4{grid-column-start:4}.row-span-3{grid-row:span 3 / span 3}.m-4{margin:1rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.ml-1{margin-left:.25rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mt-0{margin-top:0}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-9{margin-top:2.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.min-h-full{min-height:100%}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-1\\/4{width:25%}.w-12{width:3rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-normal{justify-content:normal}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(107 114 128 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-4{padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-wider{letter-spacing:.05em}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-900:hover{--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity))}.hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}@media(min-width:640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:col-span-3{grid-column:span 3 / span 3}.sm\\:col-start-1{grid-column-start:1}.sm\\:col-start-2{grid-column-start:2}.sm\\:col-start-3{grid-column-start:3}.sm\\:col-start-4{grid-column-start:4}.sm\\:row-start-1{grid-row-start:1}.sm\\:-mx-4{margin-left:-1rem;margin-right:-1rem}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-12{margin-left:3rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:mt-6{margin-top:1.5rem}.sm\\:flex{display:flex}.sm\\:table-cell{display:table-cell}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-1\\/2{width:50%}.sm\\:w-10{width:2.5rem}.sm\\:w-3\\/5{width:60%}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:items-baseline{align-items:baseline}.sm\\:justify-center{justify-content:center}.sm\\:gap-10{gap:2.5rem}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:pr-6{padding-right:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-right{text-align:right}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media(min-width:768px){.md\\:mx-0{margin-left:0;margin-right:0}.md\\:rounded-lg{border-radius:.5rem}}@media(min-width:1024px){.lg\\:table-cell{display:table-cell}}@media(min-width:1280px){.xl\\:table-cell{display:table-cell}}@media(min-width:1536px){.\\32xl\\:table-cell{display:table-cell}}";var H,q,W,K,Y=0,X=[],G=[],J=e,Z=J.__b,Q=J.__r,tt=J.diffed,et=J.__c,nt=J.unmount,it=J.__;function rt(t,e){J.__h&&J.__h(q,t,Y||e),Y=0;var n=q.__H||(q.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:G}),n.__[t]}function ot(t){return Y=1,function(t,e,n){var i=rt(H++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):vt(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=q,!q.u)){var r=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return!!t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var s=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(s=!0)}})),!(!s&&i.__c.props===t)&&(!o||o.call(this,t,e,n))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(t,e,n){if(this.__e){var i=o;o=void 0,r(t,e,n),o=i}s&&s.call(this,t,e,n)},q.shouldComponentUpdate=r}return i.__N||i.__}(vt,t)}function st(t,e){var n=rt(H++,3);!J.__s&&yt(n.__H,e)&&(n.__=t,n.i=e,q.__H.__h.push(n))}function at(t,e){var n=rt(H++,4);!J.__s&&yt(n.__H,e)&&(n.__=t,n.i=e,q.__h.push(n))}function lt(t){return Y=5,ct((function(){return{current:t}}),[])}function ct(t,e){var n=rt(H++,7);return yt(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function dt(t,e){return Y=8,ct((function(){return t}),e)}function ut(t){var e=q.context[t.__c],n=rt(H++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(q)),e.props.value):t.__}function ht(){for(var t;t=X.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(ft),t.__H.__h.forEach(gt),t.__H.__h=[]}catch(e){t.__H.__h=[],J.__e(e,t.__v)}}J.__b=function(t){q=null,Z&&Z(t)},J.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),it&&it(t,e)},J.__r=function(t){Q&&Q(t),H=0;var e=(q=t.__c).__H;e&&(W===q?(e.__h=[],q.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=G,t.__N=t.i=void 0}))):(e.__h.forEach(ft),e.__h.forEach(gt),e.__h=[],H=0)),W=q},J.diffed=function(t){tt&&tt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==X.push(e)&&K===J.requestAnimationFrame||((K=J.requestAnimationFrame)||mt)(ht)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==G&&(t.__=t.__V),t.i=void 0,t.__V=G}))),W=q=null},J.__c=function(t,e){e.some((function(t){try{t.__h.forEach(ft),t.__h=t.__h.filter((function(t){return!t.__||gt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],J.__e(n,t.__v)}})),et&&et(t,e)},J.unmount=function(t){nt&&nt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{ft(t)}catch(n){e=n}})),n.__H=void 0,e&&J.__e(e,n.__v))};var pt="function"==typeof requestAnimationFrame;function mt(t){var e,n=function(){clearTimeout(i),pt&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);pt&&(e=requestAnimationFrame(n))}function ft(t){var e=q,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),q=e}function gt(t){var e=q;t.__c=t.__(),q=e}function yt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function vt(t,e){return"function"==typeof e?e(t):e}const bt=function({tabTitles:t,currentTab:e,onChange:n}){const[i,r]=ot(e),o=dt((t=>{r(t),n(t)}),[n]);return z("div",{class:"border-b border-gray-200",children:z("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:t.map((t=>z("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(i===t?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>o(t),children:t},t)))})})};var wt=(t=>(t.Assessment="Assessment",t.Quiz="Quiz",t.Poll="Poll",t.Trivia="Trivia",t.Article="Article",t.Url="Url",t.Contact="Contact",t.Deeplink="Deeplink",t.Advertisement="Advertisement",t))(wt||{}),xt=(t=>(t.Cars="Cars",t.Health="Health",t.Everyday="Everyday",t.Devices="Devices",t.Energy="Energy",t.SavingsAccount="Savings Account*",t.HomeLoan="Home Loan*",t.MobileAndInternet="Mobile & Internet",t))(xt||{});const _t=t=>{const e=t,n=e.response?.data?e.response.data:void 0;return n?.message??e.message},kt=(t,e=3)=>{const n=t.split(" ");return n.length>e?`${n.slice(0,e).join(" ")}...`:t},Tt=(t,e)=>{switch(t){case wt.Trivia:return"Trivia";case wt.Assessment:switch(e){case xt.Cars:return"SalaryPackagingCars";case xt.HomeLoan:return"HomeLoan"}return e.replace(/\s+/g,"");default:return"None"}},St=t=>{switch(t){case xt.SavingsAccount:return["Banking"];case xt.Cars:return["Cars"];case xt.Devices:case xt.Health:case xt.Energy:case xt.Everyday:return[t];case"None":return["Miscellaneous"];case xt.HomeLoan:case xt.MobileAndInternet:default:return[]}},At=t=>{switch(t){case xt.Cars:return["NovatedLease"];case xt.Health:return["HealthInsurance"];case xt.SavingsAccount:return["SavingsAccount"];case xt.Devices:case xt.Energy:return[t];case xt.HomeLoan:return["HomeLoan"];case xt.MobileAndInternet:case xt.Everyday:default:return[]}},Pt=(t,e,n)=>{const i=t.products[0],r=Ct(t,e);r?r.isFeatured=n??!1:i.activities.push({id:e,isFeatured:n??!1})},Ct=(t,e)=>t.products[0].activities.find((t=>t.id===e));function Et(t,e){return function(){return t.apply(e,arguments)}}const{toString:Nt}=Object.prototype,{getPrototypeOf:Rt}=Object,{iterator:Ot,toStringTag:Mt}=Symbol,Dt=(t=>e=>{const n=Nt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Lt=t=>(t=t.toLowerCase(),e=>Dt(e)===t),jt=t=>e=>typeof e===t,{isArray:Vt}=Array,Ft=jt("undefined");function Ut(t){return null!==t&&!Ft(t)&&null!==t.constructor&&!Ft(t.constructor)&&zt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Bt=Lt("ArrayBuffer");const It=jt("string"),zt=jt("function"),$t=jt("number"),Ht=t=>null!==t&&"object"==typeof t,qt=t=>{if("object"!==Dt(t))return!1;const e=Rt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Mt in t||Ot in t)},Wt=Lt("Date"),Kt=Lt("File"),Yt=Lt("Blob"),Xt=Lt("FileList");const Gt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Jt=void 0!==Gt.FormData?Gt.FormData:void 0,Zt=Lt("URLSearchParams"),[Qt,te,ee,ne]=["ReadableStream","Request","Response","Headers"].map(Lt);function ie(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let i,r;if("object"!=typeof t&&(t=[t]),Vt(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{if(Ut(t))return;const r=n?Object.getOwnPropertyNames(t):Object.keys(t),o=r.length;let s;for(i=0;i<o;i++)s=r[i],e.call(null,t[s],s,t)}}function re(t,e){if(Ut(t))return null;e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,se=t=>!Ft(t)&&t!==oe;const ae=(t=>e=>t&&e instanceof t)("undefined"!=typeof Uint8Array&&Rt(Uint8Array)),le=Lt("HTMLFormElement"),ce=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),de=Lt("RegExp"),ue=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};ie(n,((n,r)=>{let o;!1!==(o=e(n,r,t))&&(i[r]=o||n)})),Object.defineProperties(t,i)};const he=Lt("AsyncFunction"),pe=(me="function"==typeof setImmediate,fe=zt(oe.postMessage),me?setImmediate:fe?(ge=`axios@${Math.random()}`,ye=[],oe.addEventListener("message",(({source:t,data:e})=>{t===oe&&e===ge&&ye.length&&ye.shift()()}),!1),t=>{ye.push(t),oe.postMessage(ge,"*")}):t=>setTimeout(t));var me,fe,ge,ye;const ve="undefined"!=typeof queueMicrotask?queueMicrotask.bind(oe):"undefined"!=typeof process&&process.nextTick||pe,be={isArray:Vt,isArrayBuffer:Bt,isBuffer:Ut,isFormData:t=>{let e;return t&&(Jt&&t instanceof Jt||zt(t.append)&&("formdata"===(e=Dt(t))||"object"===e&&zt(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Bt(t.buffer),e},isString:It,isNumber:$t,isBoolean:t=>!0===t||!1===t,isObject:Ht,isPlainObject:qt,isEmptyObject:t=>{if(!Ht(t)||Ut(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(e){return!1}},isReadableStream:Qt,isRequest:te,isResponse:ee,isHeaders:ne,isUndefined:Ft,isDate:Wt,isFile:Kt,isReactNativeBlob:t=>!(!t||void 0===t.uri),isReactNative:t=>t&&void 0!==t.getParts,isBlob:Yt,isRegExp:de,isFunction:zt,isStream:t=>Ht(t)&&zt(t.pipe),isURLSearchParams:Zt,isTypedArray:ae,isFileList:Xt,forEach:ie,merge:function t(){const{caseless:e,skipUndefined:n}=se(this)&&this||{},i={},r=(r,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=e&&re(i,o)||o;qt(i[s])&&qt(r)?i[s]=t(i[s],r):qt(r)?i[s]=t({},r):Vt(r)?i[s]=r.slice():n&&Ft(r)||(i[s]=r)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&ie(arguments[o],r);return i},extend:(t,e,n,{allOwnKeys:i}={})=>(ie(e,((e,i)=>{n&&zt(e)?Object.defineProperty(t,i,{value:Et(e,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:e,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,i)=>{let r,o,s;const a={};if(e=e||{},null==t)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)s=r[o],i&&!i(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&Rt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:Dt,kindOfTest:Lt,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},toArray:t=>{if(!t)return null;if(Vt(t))return t;let e=t.length;if(!$t(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Ot]).call(t);let i;for(;(i=n.next())&&!i.done;){const n=i.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const i=[];for(;null!==(n=t.exec(e));)i.push(n);return i},isHTMLForm:le,hasOwnProperty:ce,hasOwnProp:ce,reduceDescriptors:ue,freezeMethods:t=>{ue(t,((e,n)=>{if(zt(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];zt(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return Vt(t)?i(t):i(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:re,global:oe,isContextDefined:se,isSpecCompliantForm:function(t){return!!(t&&zt(t.append)&&"FormData"===t[Mt]&&t[Ot])},toJSONObject:t=>{const e=new Array(10),n=(t,i)=>{if(Ht(t)){if(e.indexOf(t)>=0)return;if(Ut(t))return t;if(!("toJSON"in t)){e[i]=t;const r=Vt(t)?[]:{};return ie(t,((t,e)=>{const o=n(t,i+1);!Ft(o)&&(r[e]=o)})),e[i]=void 0,r}}return t};return n(t,0)},isAsyncFn:he,isThenable:t=>t&&(Ht(t)||zt(t))&&zt(t.then)&&zt(t.catch),setImmediate:pe,asap:ve,isIterable:t=>null!=t&&zt(t[Ot])};let we=class t extends Error{static from(e,n,i,r,o,s){const a=new t(e.message,n||e.code,i,r,o);return a.cause=e,a.name=e.name,null!=e.status&&null==a.status&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(t,e,n,i,r){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:be.toJSONObject(this.config),code:this.code,status:this.status}}};we.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",we.ERR_BAD_OPTION="ERR_BAD_OPTION",we.ECONNABORTED="ECONNABORTED",we.ETIMEDOUT="ETIMEDOUT",we.ERR_NETWORK="ERR_NETWORK",we.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",we.ERR_DEPRECATED="ERR_DEPRECATED",we.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",we.ERR_BAD_REQUEST="ERR_BAD_REQUEST",we.ERR_CANCELED="ERR_CANCELED",we.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",we.ERR_INVALID_URL="ERR_INVALID_URL";function xe(t){return be.isPlainObject(t)||be.isArray(t)}function _e(t){return be.endsWith(t,"[]")?t.slice(0,-2):t}function ke(t,e,n){return t?t.concat(e).map((function(t,e){return t=_e(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const Te=be.toFlatObject(be,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Se(t,e,n){if(!be.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(n=be.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!be.isUndefined(e[t])}))).metaTokens,r=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&be.isSpecCompliantForm(e);if(!be.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(be.isDate(t))return t.toISOString();if(be.isBoolean(t))return t.toString();if(!a&&be.isBlob(t))throw new we("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(t)||be.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,r){let a=t;if(be.isReactNative(e)&&be.isReactNativeBlob(t))return e.append(ke(r,n,o),l(t)),!1;if(t&&!r&&"object"==typeof t)if(be.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(be.isArray(t)&&function(t){return be.isArray(t)&&!t.some(xe)}(t)||(be.isFileList(t)||be.endsWith(n,"[]"))&&(a=be.toArray(t)))return n=_e(n),a.forEach((function(t,i){!be.isUndefined(t)&&null!==t&&e.append(!0===s?ke([n],i,o):null===s?n:n+"[]",l(t))})),!1;return!!xe(t)||(e.append(ke(r,n,o),l(t)),!1)}const d=[],u=Object.assign(Te,{defaultVisitor:c,convertValue:l,isVisitable:xe});if(!be.isObject(t))throw new TypeError("data must be an object");return function t(n,i){if(!be.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),be.forEach(n,(function(n,o){!0===(!(be.isUndefined(n)||null===n)&&r.call(e,n,be.isString(o)?o.trim():o,i,u))&&t(n,i?i.concat(o):[o])})),d.pop()}}(t),e}function Ae(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Pe(t,e){this._pairs=[],t&&Se(t,this,e)}const Ce=Pe.prototype;function Ee(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ne(t,e,n){if(!e)return t;const i=n&&n.encode||Ee,r=be.isFunction(n)?{serialize:n}:n,o=r&&r.serialize;let s;if(s=o?o(e,r):be.isURLSearchParams(e)?e.toString():new Pe(e,r).toString(i),s){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}Ce.append=function(t,e){this._pairs.push([t,e])},Ce.toString=function(t){const e=t?function(e){return t.call(this,e,Ae)}:Ae;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class Re{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){be.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Me={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},De="undefined"!=typeof window&&"undefined"!=typeof document,Le="object"==typeof navigator&&navigator||void 0,je=De&&(!Le||["ReactNative","NativeScript","NS"].indexOf(Le.product)<0),Ve="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Fe=De&&window.location.href||"http://localhost",Ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:De,hasStandardBrowserEnv:je,hasStandardBrowserWebWorkerEnv:Ve,navigator:Le,origin:Fe},Symbol.toStringTag,{value:"Module"})),...Me};function Be(t){function e(t,n,i,r){let o=t[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=t.length;if(o=!o&&be.isArray(i)?i.length:o,a)return be.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&be.isObject(i[o])||(i[o]=[]);return e(t,n,i[o],r)&&be.isArray(i[o])&&(i[o]=function(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],e[o]=t[o];return e}(i[o])),!s}if(be.isFormData(t)&&be.isFunction(t.entries)){const n={};return be.forEachEntry(t,((t,i)=>{e(function(t){return be.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,n,0)})),n}return null}const Ie={transitional:Oe,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=be.isObject(t);r&&be.isHTMLForm(t)&&(t=new FormData(t));if(be.isFormData(t))return i?JSON.stringify(Be(t)):t;if(be.isArrayBuffer(t)||be.isBuffer(t)||be.isStream(t)||be.isFile(t)||be.isBlob(t)||be.isReadableStream(t))return t;if(be.isArrayBufferView(t))return t.buffer;if(be.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Se(t,new Ue.classes.URLSearchParams,{visitor:function(t,e,n,i){return Ue.isNode&&be.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((o=be.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Se(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),function(t,e,n){if(be.isString(t))try{return(e||JSON.parse)(t),be.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Ie.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(be.isResponse(t)||be.isReadableStream(t))return t;if(t&&be.isString(t)&&(n&&!this.responseType||i)){const n=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(r){if(n){if("SyntaxError"===r.name)throw we.from(r,we.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};be.forEach(["delete","get","head","post","put","patch"],(t=>{Ie.headers[t]={}}));const ze=be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$e=Symbol("internals");function He(t){return t&&String(t).trim().toLowerCase()}function qe(t){return!1===t||null==t?t:be.isArray(t)?t.map(qe):String(t)}function We(t,e,n,i,r){return be.isFunction(i)?i.call(this,e,n):(r&&(e=n),be.isString(e)?be.isString(i)?-1!==e.indexOf(i):be.isRegExp(i)?i.test(e):void 0:void 0)}let Ke=class{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=He(e);if(!r)throw new Error("header name must be a non-empty string");const o=be.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||e]=qe(t))}const o=(t,e)=>be.forEach(t,((t,n)=>r(t,n,e)));if(be.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(be.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))o((t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&ze[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e})(t),e);else if(be.isObject(t)&&be.isIterable(t)){let n,i,r={};for(const e of t){if(!be.isArray(e))throw TypeError("Object iterator must return a key-value pair");r[i=e[0]]=(n=r[i])?be.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}o(r,e)}else null!=t&&r(e,t,n);return this}get(t,e){if(t=He(t)){const n=be.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}(t);if(be.isFunction(e))return e.call(this,t,n);if(be.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=He(t)){const n=be.findKey(this,t);return!(!n||void 0===this[n]||e&&!We(0,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=He(t)){const r=be.findKey(n,t);!r||e&&!We(0,n[r],r,e)||(delete n[r],i=!0)}}return be.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const r=e[n];t&&!We(0,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return be.forEach(this,((i,r)=>{const o=be.findKey(n,r);if(o)return e[o]=qe(i),void delete e[r];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete e[r],e[s]=qe(i),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return be.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&be.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[$e]=this[$e]={accessors:{}}).accessors,n=this.prototype;function i(t){const i=He(t);e[i]||(!function(t,e){const n=be.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}(n,t),e[i]=!0)}return be.isArray(t)?t.forEach(i):i(t),this}};function Ye(t,e){const n=this||Ie,i=e||n,r=Ke.from(i.headers);let o=i.data;return be.forEach(t,(function(t){o=t.call(n,o,r.normalize(),e?e.status:void 0)})),r.normalize(),o}function Xe(t){return!(!t||!t.__CANCEL__)}Ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),be.reduceDescriptors(Ke.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),be.freezeMethods(Ke);let Ge=class extends we{constructor(t,e,n){super(null==t?"canceled":t,we.ERR_CANCELED,e,n),this.name="CanceledError",this.__CANCEL__=!0}};function Je(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Ze=(t,e,n=3)=>{let i=0;const r=function(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=i[s];r||(r=l),n[o]=a,i[o]=l;let d=s,u=0;for(;d!==o;)u+=n[d++],d%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-r<e)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(t,e){let n,i,r=0,o=1e3/e;const s=(e,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),t(...e)};return[(...t)=>{const e=Date.now(),a=e-r;a>=o?s(t,e):(n=t,i||(i=setTimeout((()=>{i=null,s(n)}),o-a)))},()=>n&&s(n)]}((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,l=r(a);i=o;t({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})}),n)},Qe=(t,e)=>{const n=null!=t;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},tn=t=>(...e)=>be.asap((()=>t(...e))),en=Ue.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Ue.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Ue.origin),Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent)):()=>!0,nn=Ue.hasStandardBrowserEnv?{write(t,e,n,i,r,o,s){if("undefined"==typeof document)return;const a=[`${t}=${encodeURIComponent(e)}`];be.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),be.isString(i)&&a.push(`path=${i}`),be.isString(r)&&a.push(`domain=${r}`),!0===o&&a.push("secure"),be.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if("undefined"==typeof document)return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function rn(t,e,n){let i=!("string"==typeof(r=e)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return t&&(i||0==n)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const on=t=>t instanceof Ke?{...t}:t;function sn(t,e){e=e||{};const n={};function i(t,e,n,i){return be.isPlainObject(t)&&be.isPlainObject(e)?be.merge.call({caseless:i},t,e):be.isPlainObject(e)?be.merge({},e):be.isArray(e)?e.slice():e}function r(t,e,n,r){return be.isUndefined(e)?be.isUndefined(t)?void 0:i(void 0,t,0,r):i(t,e,0,r)}function o(t,e){if(!be.isUndefined(e))return i(void 0,e)}function s(t,e){return be.isUndefined(e)?be.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(n,r,o){return o in e?i(n,r):o in t?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e,n)=>r(on(t),on(e),0,!0)};return be.forEach(Object.keys({...t,...e}),(function(i){if("__proto__"===i||"constructor"===i||"prototype"===i)return;const o=be.hasOwnProp(l,i)?l[i]:r,s=o(t[i],e[i],i);be.isUndefined(s)&&o!==a||(n[i]=s)})),n}const an=t=>{const e=sn({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=Ke.from(s),e.url=Ne(rn(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),be.isFormData(n))if(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(be.isFunction(n.getHeaders)){const t=n.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach((([t,n])=>{e.includes(t.toLowerCase())&&s.set(t,n)}))}if(Ue.hasStandardBrowserEnv&&(i&&be.isFunction(i)&&(i=i(e)),i||!1!==i&&en(e.url))){const t=r&&o&&nn.read(o);t&&s.set(r,t)}return e},ln="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const i=an(t);let r=i.data;const o=Ke.from(i.headers).normalize();let s,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:p}=i;function m(){c&&c(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(s),i.signal&&i.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function g(){if(!f)return;const i=Ke.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Je((function(t){e(t),m()}),(function(t){n(t),m()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:t,request:f}),f=null}f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new we("Request aborted",we.ECONNABORTED,t,f)),f=null)},f.onerror=function(e){const i=e&&e.message?e.message:"Network Error",r=new we(i,we.ERR_NETWORK,t,f);r.event=e||null,n(r),f=null},f.ontimeout=function(){let e=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Oe;i.timeoutErrorMessage&&(e=i.timeoutErrorMessage),n(new we(e,r.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,t,f)),f=null},void 0===r&&o.setContentType(null),"setRequestHeader"in f&&be.forEach(o.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),be.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=Ze(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Ze(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(s=e=>{f&&(n(!e||e.type?new Ge(null,t,f):e),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(s),i.signal&&(i.signal.aborted?s():i.signal.addEventListener("abort",s)));const y=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(i.url);y&&-1===Ue.protocols.indexOf(y)?n(new we("Unsupported protocol "+y+":",we.ERR_BAD_REQUEST,t)):f.send(r||null)}))},cn=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,i=new AbortController;const r=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;i.abort(e instanceof we?e:new Ge(e instanceof Error?e.message:e))}};let o=e&&setTimeout((()=>{o=null,r(new we(`timeout of ${e}ms exceeded`,we.ETIMEDOUT))}),e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(r):t.removeEventListener("abort",r)})),t=null)};t.forEach((t=>t.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>be.asap(s),a}},dn=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let i,r=0;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},un=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},hn=(t,e,n,i)=>{const r=async function*(t,e){for await(const n of un(t))yield*dn(n,e)}(t,e);let o,s=0,a=t=>{o||(o=!0,i&&i(t))};return new ReadableStream({async pull(t){try{const{done:e,value:i}=await r.next();if(e)return a(),void t.close();let o=i.byteLength;if(n){let t=s+=o;n(t)}t.enqueue(new Uint8Array(i))}catch(e){throw a(e),e}},cancel:t=>(a(t),r.return())},{highWaterMark:2})},{isFunction:pn}=be,mn=(({Request:t,Response:e})=>({Request:t,Response:e}))(be.global),{ReadableStream:fn,TextEncoder:gn}=be.global,yn=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},vn=t=>{t=be.merge.call({skipUndefined:!0},mn,t);const{fetch:e,Request:n,Response:i}=t,r=e?pn(e):"function"==typeof fetch,o=pn(n),s=pn(i);if(!r)return!1;const a=r&&pn(fn),l=r&&("function"==typeof gn?(t=>e=>t.encode(e))(new gn):async t=>new Uint8Array(await new n(t).arrayBuffer())),c=o&&a&&yn((()=>{let t=!1;const e=new n(Ue.origin,{body:new fn,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),d=s&&a&&yn((()=>be.isReadableStream(new i("").body))),u={stream:d&&(t=>t.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!u[t]&&(u[t]=(e,n)=>{let i=e&&e[t];if(i)return i.call(e);throw new we(`Response type '${t}' is not supported`,we.ERR_NOT_SUPPORT,n)})}));const h=async(t,e)=>{const i=be.toFiniteNumber(t.getContentLength());return null==i?(async t=>{if(null==t)return 0;if(be.isBlob(t))return t.size;if(be.isSpecCompliantForm(t)){const e=new n(Ue.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return be.isArrayBufferView(t)||be.isArrayBuffer(t)?t.byteLength:(be.isURLSearchParams(t)&&(t+=""),be.isString(t)?(await l(t)).byteLength:void 0)})(e):i};return async t=>{let{url:r,method:s,data:a,signal:l,cancelToken:p,timeout:m,onDownloadProgress:f,onUploadProgress:g,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:w}=an(t),x=e||fetch;y=y?(y+"").toLowerCase():"text";let _=cn([l,p&&p.toAbortSignal()],m),k=null;const T=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let S;try{if(g&&c&&"get"!==s&&"head"!==s&&0!==(S=await h(v,a))){let t,e=new n(r,{method:"POST",body:a,duplex:"half"});if(be.isFormData(a)&&(t=e.headers.get("content-type"))&&v.setContentType(t),e.body){const[t,n]=Qe(S,Ze(tn(g)));a=hn(e.body,65536,t,n)}}be.isString(b)||(b=b?"include":"omit");const e=o&&"credentials"in n.prototype,l={...w,signal:_,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:e?b:void 0};k=o&&new n(r,l);let p=await(o?x(k,w):x(r,l));const m=d&&("stream"===y||"response"===y);if(d&&(f||m&&T)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=p[e]}));const e=be.toFiniteNumber(p.headers.get("content-length")),[n,r]=f&&Qe(e,Ze(tn(f),!0))||[];p=new i(hn(p.body,65536,n,(()=>{r&&r(),T&&T()})),t)}y=y||"text";let A=await u[be.findKey(u,y)||"text"](p,t);return!m&&T&&T(),await new Promise(((e,n)=>{Je(e,n,{data:A,headers:Ke.from(p.headers),status:p.status,statusText:p.statusText,config:t,request:k})}))}catch(A){if(T&&T(),A&&"TypeError"===A.name&&/Load failed|fetch/i.test(A.message))throw Object.assign(new we("Network Error",we.ERR_NETWORK,t,k,A&&A.response),{cause:A.cause||A});throw we.from(A,A&&A.code,t,k,A&&A.response)}}},bn=new Map,wn=t=>{let e=t&&t.env||{};const{fetch:n,Request:i,Response:r}=e,o=[i,r,n];let s,a,l=o.length,c=bn;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:vn(e)),c=a;return a};wn();const xn={http:null,xhr:ln,fetch:{get:wn}};be.forEach(xn,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const _n=t=>`- ${t}`,kn=t=>be.isFunction(t)||null===t||!1===t;const Tn={getAdapter:function(t,e){t=be.isArray(t)?t:[t];const{length:n}=t;let i,r;const o={};for(let s=0;s<n;s++){let n;if(i=t[s],r=i,!kn(i)&&(r=xn[(n=String(i)).toLowerCase()],void 0===r))throw new we(`Unknown adapter '${n}'`);if(r&&(be.isFunction(r)||(r=r.get(e))))break;o[n||"#"+s]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let e=n?t.length>1?"since :\n"+t.map(_n).join("\n"):" "+_n(t[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+e,"ERR_NOT_SUPPORT")}return r},adapters:xn};function Sn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ge(null,t)}function An(t){Sn(t),t.headers=Ke.from(t.headers),t.data=Ye.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Tn.getAdapter(t.adapter||Ie.adapter,t)(t).then((function(e){return Sn(t),e.data=Ye.call(t,t.transformResponse,e),e.headers=Ke.from(e.headers),e}),(function(e){return Xe(e)||(Sn(t),e&&e.response&&(e.response.data=Ye.call(t,t.transformResponse,e.response),e.response.headers=Ke.from(e.response.headers))),Promise.reject(e)}))}const Pn="1.13.6",Cn={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Cn[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const En={};Cn.transitional=function(t,e,n){function i(t,e){return"[Axios v"+Pn+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,o)=>{if(!1===t)throw new we(i(r," has been removed"+(e?" in "+e:"")),we.ERR_DEPRECATED);return e&&!En[r]&&(En[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,o)}},Cn.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};const Nn={assertOptions:function(t,e,n){if("object"!=typeof t)throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const o=i[r],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new we("option "+o+" must be "+n,we.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new we("Unknown option "+o,we.ERR_BAD_OPTION)}},validators:Cn},Rn=Nn.validators;let On=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Re,response:new Re}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{n.stack?e&&!String(n.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+e):n.stack=e}catch(i){}}throw n}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=sn(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Nn.assertOptions(n,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean),legacyInterceptorReqResOrdering:Rn.transitional(Rn.boolean)},!1),null!=i&&(be.isFunction(i)?e.paramsSerializer={serialize:i}:Nn.assertOptions(i,{encode:Rn.function,serialize:Rn.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),Nn.assertOptions(e,{baseUrl:Rn.spelling("baseURL"),withXsrfToken:Rn.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=r&&be.merge(r.common,r[e.method]);r&&be.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Ke.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(t){if("function"==typeof t.runWhen&&!1===t.runWhen(e))return;a=a&&t.synchronous;const n=e.transitional||Oe;n&&n.legacyInterceptorReqResOrdering?s.unshift(t.fulfilled,t.rejected):s.push(t.fulfilled,t.rejected)}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let d,u=0;if(!a){const t=[An.bind(this),void 0];for(t.unshift(...s),t.push(...l),d=t.length,c=Promise.resolve(e);u<d;)c=c.then(t[u++],t[u++]);return c}d=s.length;let h=e;for(;u<d;){const t=s[u++],e=s[u++];try{h=t(h)}catch(p){e.call(this,p);break}}try{c=An.call(this,h)}catch(p){return Promise.reject(p)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(t){return Ne(rn((t=sn(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}};be.forEach(["delete","get","head","options"],(function(t){On.prototype[t]=function(e,n){return this.request(sn(n||{},{method:t,url:e,data:(n||{}).data}))}})),be.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(sn(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}On.prototype[t]=e(),On.prototype[t+"Form"]=e(!0)}));const Mn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Mn).forEach((([t,e])=>{Mn[e]=t}));const Dn=function t(e){const n=new On(e),i=Et(On.prototype.request,n);return be.extend(i,On.prototype,n,{allOwnKeys:!0}),be.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return t(sn(e,n))},i}(Ie);Dn.Axios=On,Dn.CanceledError=Ge,Dn.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new Ge(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},Dn.isCancel=Xe,Dn.VERSION=Pn,Dn.toFormData=Se,Dn.AxiosError=we,Dn.Cancel=Dn.CanceledError,Dn.all=function(t){return Promise.all(t)},Dn.spread=function(t){return function(e){return t.apply(null,e)}},Dn.isAxiosError=function(t){return be.isObject(t)&&!0===t.isAxiosError},Dn.mergeConfig=sn,Dn.AxiosHeaders=Ke,Dn.formToJSON=t=>Be(be.isHTMLForm(t)?new FormData(t):t),Dn.getAdapter=Tn.getAdapter,Dn.HttpStatusCode=Mn,Dn.default=Dn;const{Axios:Ln,AxiosError:jn,CanceledError:Vn,isCancel:Fn,CancelToken:Un,VERSION:Bn,all:In,Cancel:zn,isAxiosError:$n,spread:Hn,toFormData:qn,AxiosHeaders:Wn,HttpStatusCode:Kn,formToJSON:Yn,getAdapter:Xn,mergeConfig:Gn}=Dn;let Jn,Zn,Qn;const ti=t=>(t.params={...t.params??{},source:"Admin",channel:"admin"},t),ei=(t,e,n)=>{const i=`${t}/${n}`,r=Dn.create({baseURL:i,headers:{Authorization:`Bearer ${e}`}});switch(r.interceptors.request.use(ti),n){case"customer-profile":Jn=r;break;case"flare-app-identity":Zn=r;break;case"benefits-plan":Qn=r}return r},ni=async(t,e)=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.put(`/_admin/v1.0/categories/${t}`,e)},ii=async(t,e,n,i)=>{if(!Qn)throw new Error("Api has not been initialized");try{if(await Qn.put(`/_admin/v1.0/activities/${t}`,e),n){const e=Ct(n,t);if(e?.isFeatured!==i){Pt(n,t,i??!1);const e=n;await ni(n.id,e)}}}catch(r){throw new Error(`${_t(r)}`)}},ri=t=>{const[e,n]=ot(!1),i=lt(),r=dt((async e=>{try{const n=t.find((t=>t.id===e));if(!n)throw new Error("Category not found");const i={title:n.title,subtitle:n.subtitle,iconUrl:n.iconUrl,enabled:!n.enabled,displayOrder:n.displayOrder,products:n.products};await ni(e,i)}catch(i){throw new Error(`Failed to update category visibility. Error: ${_t(i)}`)}finally{n(!1)}}),[t]),o=dt((async t=>{try{await(async t=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.post("/_admin/v1.0/categories",t)})(t)}catch(e){throw new Error(`${_t(e)}`)}}),[]),s=dt((async(t,e)=>{try{await ni(t,e)}catch(n){throw new Error(`${_t(n)}`)}}),[]);return{isModalOpen:e,handleAction:dt((async t=>{switch(t.type){case"updateVisibility":i.current=t.categoryId,n(!0);break;case"updateCategory":await s(t.categoryId,t.category);break;case"createCategory":await o(t.category);break;default:console.error(`Unhandled action type: ${t}`)}}),[o,s]),handleModalConfirm:dt((async()=>{i.current&&await r(i.current)}),[r]),handleModalCancel:dt((()=>{n(!1)}),[])}};for(var oi,si=[],ai=0;ai<256;++ai)si.push((ai+256).toString(16).slice(1));var li=new Uint8Array(16);function ci(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(li)}const di={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ui(t,e,n){if(di.randomUUID&&!t)return di.randomUUID();var i=(t=t||{}).random||(t.rng||ci)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(t,e=0){return(si[t[e+0]]+si[t[e+1]]+si[t[e+2]]+si[t[e+3]]+"-"+si[t[e+4]]+si[t[e+5]]+"-"+si[t[e+6]]+si[t[e+7]]+"-"+si[t[e+8]]+si[t[e+9]]+"-"+si[t[e+10]]+si[t[e+11]]+si[t[e+12]]+si[t[e+13]]+si[t[e+14]]+si[t[e+15]]).toLowerCase()}(i)}const hi=({title:t,children:e})=>z("div",{className:"mt-2",children:[z("div",{className:"mt-9",children:z("h1",{className:"text-2xl font-semibold text-gray-900",children:t})}),z("div",{className:"w-1/2",children:e})]}),pi=({formFields:t,formData:e,isSubmitting:n,formMode:i,messages:r,categoryId:o,handleInputChange:s})=>z(b,{children:[t.map((t=>t.display&&!t.display(o)?null:z(b,{children:[z("label",{className:"sm:col-start-1",children:t.label}),z("input",{className:"sm:col-start-2 sm:col-span-3 block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm "+("checkbox"===t.type?"w-6 h-full":""),type:t.type,name:t.name,value:(t.type,e[t.name]),checked:"checkbox"===t.type?!!e[t.name]:void 0,disabled:t.disabled&&t.disabled(i.mode),required:t.isRequired,onChange:s})]},t.name))),z("div",{className:"sm:col-start-4 flex justify-end",children:z("button",{className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",type:"submit",disabled:n,children:"create"===i.mode?"Create":"Update"})}),z("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:r.map(((t,e)=>z("div",{className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600 cursor-pointer"),children:t.text},e)))})]}),mi={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},fi=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"subtitle",isRequired:!0,label:"Sub Title",type:"text"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"displayOrder",isRequired:!1,label:"Display Order",type:"number"}],gi=({formMode:t,onChange:e})=>{const{isSubmitting:n,messages:i,formData:r,handleSubmit:o,handleInputChange:s}=((t,e)=>{const[n,i]=ot(!1),[r,o]=ot([]),[s,a]=ot(mi),{handleAction:l}=ri([]);st((()=>{if("update"===t.mode){const e={categoryId:t.initialCategory.id,title:t.initialCategory.title,subtitle:t.initialCategory.subtitle,iconUrl:t.initialCategory.iconUrl,displayOrder:t.initialCategory.displayOrder};a(e)}}),[t]);const c=dt(((t,e)=>{o((n=>[...n,{text:t,type:e}]))}),[]),d=dt((()=>{a({...mi})}),[]),u=dt((()=>{let t=!0;for(const e of fi)!e.isRequired||"text"!==e.type||s[e.name]&&""!==s[e.name].toString().trim()||(c(`${e.label} is required.`,"error"),t=!1);return t}),[s,c]),h=dt((()=>({...s,enabled:!1,products:[{id:ui(),title:s.title,description:s.subtitle,enabled:!0,iconUrl:s.iconUrl,activities:[]}]})),[s]),p=dt((t=>({...s,enabled:t.enabled,products:t.products})),[s]);return{isSubmitting:n,messages:r,formData:s,setMessages:o,handleSubmit:async n=>{if(n.preventDefault(),i(!0),o([]),u())try{if("create"===t.mode){const t=h();await l({type:"createCategory",category:t})}if("update"===t.mode){const e=p(t.initialCategory);await l({type:"updateCategory",categoryId:t.initialCategory.id,category:e})}c(`Category successfully ${"create"===t.mode?"created":"updated"}.`,"success"),d(),e()}catch(r){c(`Error ${"create"===t.mode?"adding":"updating"} category: ${r}`,"error")}finally{i(!1)}else i(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;a((t=>({...t,[n]:"number"===r?Number(i):i})))}}})(t,e),a="create"===t.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return z(hi,{title:a,children:z("form",{onSubmit:o,children:z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:z(pi,{formMode:t,formFields:fi,formData:r,isSubmitting:n,messages:i,handleInputChange:s})})})})},yi=({disabled:t,children:e,onClick:n,...i})=>{const[r,o]=ot(!1);return z("button",{disabled:t||r,onClick:async()=>{if(n&&!r){o(!0);try{await n()}catch(t){console.error("Error executing promise:",t)}finally{o(!1)}}},type:"submit",...i,children:e})};function vi(t,e){for(var n in e)t[n]=e[n];return t}function bi(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function wi(t,e){this.props=t,this.context=e}(wi.prototype=new w).isPureReactComponent=!0,wi.prototype.shouldComponentUpdate=function(t,e){return bi(this.props,t)||bi(this.state,e)};var xi=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),xi&&xi(t)};var _i="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ki=e.__e;e.__e=function(t,e,n,i){if(t.then)for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e);ki(t,e,n,i)};var Ti=e.unmount;function Si(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=vi({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return Si(t,e,n)}))),t}function Ai(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return Ai(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Pi(){this.__u=0,this.t=null,this.__b=null}function Ci(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Ei(){this.u=null,this.o=null}e.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ti&&Ti(t)},(Pi.prototype=new w).__c=function(t,e){var n=e.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Ci(i.__v),o=!1,s=function(){o||(o=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(! --i.__u){if(i.state.__a){var t=i.state.__a;i.__v.__k[0]=Ai(t,t.__c.__P,t.__c.__O)}var e;for(i.setState({__a:i.__b=null});e=i.t.pop();)e.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(s,s)},Pi.prototype.componentWillUnmount=function(){this.t=[]},Pi.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Si(this.__b,n,i.__O=i.__P)}this.__b=null}var r=e.__a&&y(b,null,t.fallback);return r&&(r.__u&=-33),[y(b,null,e.__a?null:t.children),r]};var Ni=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};(Ei.prototype=new w).__a=function(t){var e=this,n=Ci(e.__v),i=e.o.get(t);return i[0]++,function(r){var o=function(){e.props.revealOrder?(i.push(r),Ni(e,t,i)):r()};n?n(o):o()}},Ei.prototype.render=function(t){this.u=null,this.o=new Map;var e=P(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Ei.prototype.componentDidUpdate=Ei.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){Ni(t,n,e)}))};var Ri="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Oi=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Mi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Di=/[A-Z0-9]/g,Li="undefined"!=typeof document,ji=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(w.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var Vi=e.event;function Fi(){}function Ui(){return this.cancelBubble}function Bi(){return this.defaultPrevented}e.event=function(t){return Vi&&(t=Vi(t)),t.persist=Fi,t.isPropagationStopped=Ui,t.isDefaultPrevented=Bi,t.nativeEvent=t};var Ii={enumerable:!1,configurable:!0,get:function(){return this.class}},zi=e.vnode;e.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={};for(var r in e){var o=e[r];if(!("value"===r&&"defaultValue"in e&&null==o||Li&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var s=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"ondoubleclick"===s?r="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||ji(e.type)?"onfocus"===s?r="onfocusin":"onblur"===s?r="onfocusout":Mi.test(r)?r=s:-1===n.indexOf("-")&&Oi.test(r)?r=r.replace(Di,"-$&").toLowerCase():null===o&&(o=void 0):s=r="oninput","oninput"===s&&i[r=s]&&(r="oninputCapture"),i[r]=o}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=P(e.children).forEach((function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=P(e.children).forEach((function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value}))),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Ii)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Ri,zi&&zi(t)};var $i=e.__r;e.__r=function(t){$i&&$i(t),t.__c};var Hi=e.diffed;e.diffed=function(t){Hi&&Hi(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};var qi=at;const Wi=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})),Ki=({isOpen:t,heading:e,message:n,onConfirm:i,onCancel:r})=>t?z("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[z("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),z("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:z("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:z("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[z("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:z("div",{className:"sm:flex sm:items-start",children:[z("div",{className:"mx-auto flex h-10 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:z(Wi,{className:"h-6 w-6 text-red-600"})}),z("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[z("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:e}),z("div",{className:"mt-2",children:z("p",{className:"text-sm text-gray-500",children:n})})]})]})}),z("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[z(yi,{onClick:i,className:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto cursor-pointer",children:"Confirm"}),z("button",{className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto cursor-pointer",onClick:r,children:"Cancel"})]})]})})})]}):null,Yi=({headers:t,renderTableRows:e})=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-20",children:t.map((t=>z("th",{scope:"col",className:t.className,children:t.name},t.name)))})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:e()})]})})}),Xi=({error:t,isModalOpen:e,modalHeading:n,modalTitle:i,tableHeaders:r,headingText:o,buttonText:s,filterElement:a,onCreateButton:l,onModalConfirm:c,renderTableRows:d,handleModalCancel:u})=>z(b,{children:[z("div",{className:"p-4 text-red-700",children:t}),!t&&z("div",{className:"m-4",children:[z("div",{className:"flex items-center",children:[z("div",{className:"flex-auto",children:z("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:o})}),z("div",{className:"ml-16 mt-0 flex-none",children:z("button",{type:"button",className:"block rounded-md bg-indigo-500 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:l,children:s})})]}),a,z(Yi,{headers:r,renderTableRows:d})]}),z(Ki,{isOpen:e,heading:n,message:i,onConfirm:c,onCancel:u})]}),Gi=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Ji=({onClick:t,children:e})=>z("div",{className:"mt-4",children:z("div",{className:"flex justify-normal",children:[z("span",{onClick:t,children:z(Gi,{className:"h-6 w-6 border-0 cursor-pointer"})}),z("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:e})]})}),Zi=({buttonName:t,onClick:e,children:n})=>z(b,{children:[z(Ji,{onClick:e,children:t}),n]}),Qi=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Subtitle",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Activities",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Order",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],tr=t=>{const[e,n]=ot(null),[i,r]=ot({mode:"view"}),{isModalOpen:o,handleAction:s,handleModalConfirm:a,handleModalCancel:l}=ri(t.categories);return z(b,{children:["view"===i.mode&&z(Xi,{error:e,isModalOpen:o,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this category in the app?",tableHeaders:Qi,headingText:"Benefits Plan Categories",buttonText:"New Category",onModalConfirm:async()=>{try{await a(),t.onChange()}catch(e){n(`${e}`)}},handleModalCancel:l,renderTableRows:()=>z(b,{children:t.categories.map((t=>{const e=t.products.reduce(((t,e)=>t+e.activities.length),0);return z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:z("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.title}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t.subtitle}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.displayOrder}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{r({mode:"update",itemId:t.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>(async t=>{await s({type:"updateVisibility",categoryId:t})})(t.id),children:t.enabled?"Disable":"Enable"})})})]},t.id)}))}),onCreateButton:()=>r({mode:"create"})}),"view"!==i.mode&&z(Zi,{buttonName:"Benefits Plan Categories",onClick:()=>{r({mode:"view"})},children:z(gi,{formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialCategory:t.categories.find((t=>t.id===i.itemId))},onChange:t.onChange})})]})},er=({visible:t,children:e})=>{const n=lt(t);return t&&!n.current&&(n.current=!0),n.current?z("div",{hidden:!t,children:e}):null},nr=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"black",height:32,width:32,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})),ir=()=>{const[t,e]=ot(!1),[n,i]=ot([]),[r,o]=ot(!1),s=lt([]),a=lt(),l=dt((async t=>{e(!0),s.current=t;try{const e=await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/activities")).data})(),n=rr(t,e);i(n)}catch(n){throw new Error(`Failed to load activities. Error: ${_t(n)}`)}finally{e(!1)}}),[]),c=dt((async t=>{e(!0);try{const e=await(async t=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${t}`)).data})(t);e.enabled=!e.enabled,await ii(t,e)}catch(n){throw new Error(`Failed to update activity visibility. Error: ${_t(n)}`)}finally{e(!1)}}),[]);return{activities:n,isLoading:t,isModalOpen:r,loadActivities:l,handleAction:dt((async t=>{switch(t.type){case"updateVisibility":a.current=t.activityId,o(!0);break;case"updateActivity":await ii(t.activityId,t.activity,t.selectedCategory,t.isFeaturedActivity);break;case"createActivity":await(async(t,e,n)=>{if(!Qn)throw new Error("Api has not been initialized");try{const i=await Qn.post("/_admin/v1.0/activities",t);if(e){Pt(e,i.data.id,n??!1);const t=e;await ni(e.id,t)}}catch(i){throw new Error(`${_t(i)}`)}})(t.activity,t.selectedCategory,t.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${t}`)}}),[]),handleModalConfirm:dt((async()=>{a.current&&(await c(a.current),o(!1))}),[c]),handleModalCancel:dt((()=>{o(!1)}),[])}},rr=(t,e)=>{const n=or(t);return e.map((t=>({...t,category:n.get(t.id)?.find((()=>!0))})))},or=t=>{const e=sr(t),n=new Map;return e.forEach((({activity:t,categoryId:e,categoryTitle:i})=>{const r=t.id;n.has(r)||n.set(r,[]);const o=n.get(r);o.some((t=>t.id===e))||o.push({id:e,title:i,isFeatured:t.isFeatured})})),n},sr=t=>t.flatMap((t=>t.products.flatMap((e=>e.activities.map((e=>({activity:e,categoryId:t.id,categoryTitle:t.title}))))))),ar="None",lr=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:t=>"update"==t},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"description",isRequired:!0,label:"Sub Title",type:"text"},{name:"points",isRequired:!0,label:"Points",type:"number"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"isFeatured",isRequired:!1,label:"Is Featured",type:"checkbox",display:t=>t!==ar}],cr=[{activityType:wt.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:wt.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:wt.Assessment,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"buttonText",isRequired:!0,label:"Button Text",type:"text"},{name:"primaryLabel",isRequired:!0,label:"Primary Label",type:"text"},{name:"secondaryLabel",isRequired:!0,label:"Secondary label",type:"text"},{name:"allowanceProductId",isRequired:!1,label:"Allowance Product Id",type:"text"}]},{activityType:wt.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:wt.Deeplink,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]}],dr={activityId:"",title:"",description:"",points:0,iconUrl:"",url:"",articleId:"",bannerUrl:"",buttonText:"",primaryLabel:"",secondaryLabel:"",isFeatured:!1,allowanceProductId:""},ur=({formMode:t,categories:e,onChange:n})=>{const{isSubmitting:i,messages:r,formData:o,selectedActivityType:s,currentFormFields:a,selectedCategory:l,handleSubmit:c,handleInputChange:d,handleActivityTypeChange:u,handleCategoryChange:h}=((t,e,n)=>{const[i,r]=ot(wt.Article),[o,s]=ot({id:ar,title:ar}),[a,l]=ot([]),[c,d]=ot(!1),[u,h]=ot(dr),{handleAction:p}=ir(),m=ct((()=>[...lr,...cr.find((t=>t.activityType===i))?.formFields||[]]),[i]),f=dt(((t,e)=>{l((n=>[...n,{text:t,type:e}]))}),[]);st((()=>{if("update"===t.mode){const e=t.initialActivity,n={activityId:e.id,title:e.title,points:e.points,description:e.description,iconUrl:e.iconUrl,url:e.url,articleId:e.articleId,bannerUrl:e.bannerUrl,buttonText:e.buttonText,primaryLabel:e.estimateLabel?.primaryLabel,secondaryLabel:e.estimateLabel?.secondaryLabel,isFeatured:e.category?.isFeatured,allowanceProductId:e.allowanceProductId};h({...n}),r(e.activityType),s(e.category??{id:ar,title:ar})}}),[t]);const g=dt((()=>{h({...dr}),r(wt.Article),s({id:ar,title:ar})}),[]),y=dt((()=>{let t=!0;for(const e of m){const n=u[e.name];!e.isRequired||"text"!==e.type||n&&""!==n.toString().trim()||(f(`${e.label} is required.`,"error"),t=!1)}return t}),[f,m,u]),v=async()=>{const{url:t,articleId:n,bannerUrl:r,buttonText:s,primaryLabel:a,secondaryLabel:l,isFeatured:c,allowanceProductId:d}=u,h={...u,activityType:i,calculationType:Tt(i,o.title),enabled:!1,savingsInCents:0,configurationTags:At(o.title),tags:St(o.title),estimateLabel:a?{primaryLabel:a,secondaryLabel:l}:void 0,url:t||void 0,articleId:n||void 0,bannerUrl:r||void 0,buttonText:s||void 0,allowanceProductId:d?.trim()?d.trim():void 0};let m;o.title!==ar&&(m=e.find((t=>t.id===o.id)));try{await p({type:"createActivity",activity:h,selectedCategory:m,isFeaturedActivity:c}),f("Activity successfully created.","success"),g()}catch(y){throw f(`Error creating activity: ${y}`,"error"),y}},b=async t=>{const{primaryLabel:n,secondaryLabel:i,isFeatured:r,allowanceProductId:s}=u,a={...t,...u,estimateLabel:n?{primaryLabel:n,secondaryLabel:i}:void 0,allowanceProductId:s?.trim()?s.trim():void 0};let l;o.title!==ar&&(l=e.find((t=>t.id===o.id)));try{await p({type:"updateActivity",activityId:t.id,activity:a,selectedCategory:l,isFeaturedActivity:r}),f("Activity successfully updated.","success")}catch(c){throw f(`Error updating activity: ${c}`,"error"),c}};return{isSubmitting:c,messages:a,formData:u,selectedActivityType:i,currentFormFields:m,selectedCategory:o,setMessages:l,handleSubmit:async e=>{if(e.preventDefault(),d(!0),l([]),y())try{"create"===t.mode?await v():"update"===t.mode&&await b(t.initialActivity),n()}finally{d(!1)}else d(!1)},handleInputChange:t=>{const e=t.target,{name:n,value:i,type:r}=e;h((t=>({...t,[n]:"checkbox"===r?e.checked:"number"===r?Number(i):i})))},handleActivityTypeChange:t=>{const e=t.target;r(e.value)},handleCategoryChange:t=>{const n=t.target.value;if(n===ar)s({id:ar,title:ar});else{const t=e.find((t=>t.id===n));t&&s({id:t.id,title:t.title})}}}})(t,e,n),p="create"===t.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return z(hi,{title:p,children:z("form",{onSubmit:c,children:[z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[z("label",{className:"sm:col-start-1",children:"Type"}),z("select",{className:"sm:col-start-2 sm:col-span-2 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s,disabled:"update"===t.mode,onChange:u,children:Object.values(wt).map((t=>z("option",{value:t,children:t},t)))})]}),z("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[z("label",{className:"sm:col-start-1",children:"Category"}),z("select",{className:"sm:col-start-2 sm:col-span-3 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:l.id,disabled:"update"===t.mode,onChange:h,children:[z("option",{value:ar,children:ar}),e.map((t=>z("option",{value:t.id,children:t.title},t.id)))]}),z(pi,{formMode:t,formFields:a,formData:o,isSubmitting:i,messages:r,categoryId:l.id,handleInputChange:d})]})]})})},hr=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Subtitle",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 2xl:table-cell"},{name:"Type",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 xl:table-cell"},{name:"Points",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Category",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],pr="All",mr=({categories:t,onChange:e})=>{const[n,i]=ot(null),[r,o]=ot({mode:"view"}),[s,a]=ot({id:pr,title:pr}),[l,c]=ot([]),{isLoading:d,activities:u,isModalOpen:h,loadActivities:p,handleAction:m,handleModalConfirm:f,handleModalCancel:g}=ir();st((()=>{(async()=>{try{await p(t)}catch(e){i(`${e}`)}})()}),[t,p]),st((()=>{c(s.title===pr?u:u.filter((t=>t.category?.id===s.id)))}),[u,s]);const y=z("div",{className:"flex items-center space-x-2 mt-4",children:[z(nr,{}),z("select",{className:"focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s.id,onChange:e=>{const n=e.target.value;if(n===pr)a({id:pr,title:pr});else{const e=t.find((t=>t.id===n));e&&a({id:e.id,title:e.title})}},children:[z("option",{value:pr,children:pr}),t.map((t=>z("option",{value:t.id,children:t.title},t.id)))]})]});return z(b,{children:["view"===r.mode&&z(b,{children:[d&&z("p",{className:"p-5",children:"Loading..."}),!d&&z(Xi,{error:n,isModalOpen:h,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:hr,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:y,onModalConfirm:async()=>{try{await f(),e()}catch(t){i(`${t}`)}},handleModalCancel:g,renderTableRows:()=>z(b,{children:l.map((t=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:t.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:z("span",{className:"flex justify-center",children:z("img",{src:t.iconUrl,alt:t.title,className:"h-8 w-8"})})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:kt(t.title)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:kt(t.description)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:t.activityType}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.points}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.category?.title??"None"}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:t.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{o({mode:"update",itemId:t.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>m({type:"updateVisibility",activityId:t.id}),children:t.enabled?"Disable":"Enable"})})})]},t.id)))}),onCreateButton:()=>o({mode:"create"})})]}),"view"!==r.mode&&z(Zi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:z(ur,{categories:t,formMode:"create"===r.mode?{mode:"create"}:{mode:"update",initialActivity:u.find((t=>t.id===r.itemId))},onChange:e})})]})};var fr=(t=>(t.Categories="Categories",t.Activities="Activities",t))(fr||{});const gr=()=>{const[t,e]=ot("Categories"),[n,i]=ot([]),[r,o]=ot(!1),[s,a]=ot(null),l=dt((e=>e===t),[t]),c=dt((async()=>{o(!0),a(null);try{const t=(await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/categories")).data})()).categories.sort(((t,e)=>t.displayOrder-e.displayOrder));i(t)}catch(t){console.error(t),a("Failed to load categories.")}finally{o(!1)}}),[]);st((()=>{c()}),[c]);const d=async()=>{await c()};return z(b,{children:[z(bt,{tabTitles:Object.entries(fr).map((([,t])=>t)),currentTab:t,onChange:e}),r&&z("p",{className:"p-5",children:"Loading..."}),s&&z("div",{className:"p-4 text-red-700",children:s}),!r&&z(b,{children:[z(er,{visible:l("Categories"),children:z(tr,{categories:n,onChange:d})}),z(er,{visible:l("Activities"),children:z(mr,{categories:n,onChange:d})})]})]})};function yr(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy(((...e)=>t(...e)),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function vr(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const br=t=>Array.isArray(t);function wr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function xr(t){return"string"==typeof t||Array.isArray(t)}function _r(t){const e=[{},{}];return null==t||t.values.forEach(((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()})),e}function kr(t,e,n,i){if("function"==typeof e){const[r,o]=_r(i);e=e(void 0!==n?n:t.custom,r,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[r,o]=_r(i);e=e(void 0!==n?n:t.custom,r,o)}return e}function Tr(t,e,n){const i=t.getProps();return kr(i,e,void 0!==n?n:i.custom,t)}const Sr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ar=["initial",...Sr],Pr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Cr=new Set(Pr),Er=t=>1e3*t,Nr=t=>t/1e3,Rr={type:"spring",stiffness:500,damping:25,restSpeed:10},Or={type:"keyframes",duration:.8},Mr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dr=(t,{keyframes:e})=>e.length>2?Or:Cr.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Rr:Mr;function Lr(t,e){return t?t[e]||t.default||t:void 0}const jr=!1,Vr=t=>null!==t;function Fr(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(Vr),o=e&&"loop"!==n&&e%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const Ur=t=>t;const Br=["read","resolveKeyframes","update","preRender","render","postRender"];function Ir(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Br.reduce(((t,e)=>(t[e]=function(t){let e=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(e){o.has(e)&&(l.schedule(e),t()),e(s)}const l={schedule:(t,r=!1,s=!1)=>{const a=s&&i?e:n;return r&&o.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),o.delete(t)},process:t=>{s=t,i?r=!0:(i=!0,[e,n]=[n,e],n.clear(),e.forEach(a),i=!1,r&&(r=!1,l.process(t)))}};return l}(o),t)),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:h}=s,p=()=>{const o=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1),r.timestamp=o,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:Br.reduce(((e,o)=>{const a=s[o];return e[o]=(e,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||t(p)),a.schedule(e,o,s)),e}),{}),cancel:t=>{for(let e=0;e<Br.length;e++)s[Br[e]].cancel(t)},state:r,steps:s}}const{schedule:zr,cancel:$r,state:Hr,steps:qr}=Ir("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ur,!0),Wr=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Kr=1e-7,Yr=12;function Xr(t,e,n,i){if(t===e&&n===i)return Ur;const r=e=>function(t,e,n,i,r){let o,s,a=0;do{s=e+(n-e)/2,o=Wr(s,i,r)-t,o>0?n=s:e=s}while(Math.abs(o)>Kr&&++a<Yr);return s}(e,0,1,t,n);return t=>0===t||1===t?t:Wr(r(t),e,i)}const Gr=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Jr=t=>e=>1-t(1-e),Zr=Xr(.33,1.53,.69,.99),Qr=Jr(Zr),to=Gr(Qr),eo=t=>(t*=2)<1?.5*Qr(t):.5*(2-Math.pow(2,-10*(t-1))),no=t=>1-Math.sin(Math.acos(t)),io=Jr(no),ro=Gr(no),oo=t=>/^0[^.\s]+$/u.test(t);let so=Ur;const ao=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),lo=t=>e=>"string"==typeof e&&e.startsWith(t),co=lo("--"),uo=lo("var(--"),ho=t=>!!uo(t)&&po.test(t.split("/*")[0].trim()),po=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function fo(t,e,n=1){const[i,r]=function(t){const e=mo.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${null!=n?n:i}`,r]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return ao(t)?parseFloat(t):t}return ho(r)?fo(r,e,n+1):r}const go=(t,e,n)=>n>e?e:n<t?t:n,yo={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},vo={...yo,transform:t=>go(0,1,t)},bo={...yo,default:1},wo=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),xo=wo("deg"),_o=wo("%"),ko=wo("px"),To=wo("vh"),So=wo("vw"),Ao={..._o,parse:t=>_o.parse(t)/100,transform:t=>_o.transform(100*t)},Po=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Co=t=>t===yo||t===ko,Eo=(t,e)=>parseFloat(t.split(", ")[e]),No=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Eo(r[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?Eo(e[1],t):0}},Ro=new Set(["x","y","z"]),Oo=Pr.filter((t=>!Ro.has(t)));const Mo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:No(4,13),y:No(5,14)};Mo.translateX=Mo.x,Mo.translateY=Mo.y;const Do=t=>e=>e.test(t),Lo=[yo,ko,_o,xo,So,To,{test:t=>"auto"===t,parse:t=>t}],jo=t=>Lo.find(Do(t)),Vo=new Set;let Fo=!1,Uo=!1;function Bo(){if(Uo){const t=Array.from(Vo).filter((t=>t.needsMeasurement)),e=new Set(t.map((t=>t.element))),n=new Map;e.forEach((t=>{const e=function(t){const e=[];return Oo.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e}(t);e.length&&(n.set(t,e),t.render())})),t.forEach((t=>t.measureInitialState())),e.forEach((t=>{t.render();const e=n.get(t);e&&e.forEach((([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)}))})),t.forEach((t=>t.measureEndState())),t.forEach((t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)}))}Uo=!1,Fo=!1,Vo.forEach((t=>t.complete())),Vo.clear()}function Io(){Vo.forEach((t=>{t.readKeyframes(),t.needsMeasurement&&(Uo=!0)}))}class zo{constructor(t,e,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Vo.add(this),Fo||(Fo=!0,zr.read(Io),zr.resolveKeyframes(Bo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let r=0;r<t.length;r++)if(null===t[r])if(0===r){const r=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==r)t[0]=r;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===r&&i.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Vo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Vo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const $o=t=>Math.round(1e5*t)/1e5,Ho=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const qo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Wo=(t,e)=>n=>Boolean("string"==typeof n&&qo.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Ko=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match(Ho);return{[t]:parseFloat(r),[e]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Yo={...yo,transform:t=>Math.round((t=>go(0,255,t))(t))},Xo={test:Wo("rgb","red"),parse:Ko("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Yo.transform(t)+", "+Yo.transform(e)+", "+Yo.transform(n)+", "+$o(vo.transform(i))+")"};const Go={test:Wo("#"),parse:function(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:Xo.transform},Jo={test:Wo("hsl","hue"),parse:Ko("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+_o.transform($o(e))+", "+_o.transform($o(n))+", "+$o(vo.transform(i))+")"},Zo={test:t=>Xo.test(t)||Go.test(t)||Jo.test(t),parse:t=>Xo.test(t)?Xo.parse(t):Jo.test(t)?Jo.parse(t):Go.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?Xo.transform(t):Jo.transform(t)},Qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ts="number",es="color",ns="var",is="var(",rs="${}",os=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ss(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=e.replace(os,(t=>(Zo.test(t)?(i.color.push(o),r.push(es),n.push(Zo.parse(t))):t.startsWith(is)?(i.var.push(o),r.push(ns),n.push(t)):(i.number.push(o),r.push(ts),n.push(parseFloat(t))),++o,rs))).split(rs);return{values:n,split:s,indexes:i,types:r}}function as(t){return ss(t).values}function ls(t){const{split:e,types:n}=ss(t),i=e.length;return t=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],void 0!==t[o]){const e=n[o];r+=e===ts?$o(t[o]):e===es?Zo.transform(t[o]):t[o]}return r}}const cs=t=>"number"==typeof t?0:t;const ds={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(Ho))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Qo))||void 0===n?void 0:n.length)||0)>0},parse:as,createTransformer:ls,getAnimatableNone:function(t){const e=as(t);return ls(t)(e.map(cs))}},us=new Set(["brightness","contrast","saturate","opacity"]);function hs(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(Ho)||[];if(!i)return t;const r=n.replace(i,"");let o=us.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+r+")"}const ps=/\b([a-z-]*)\(.*?\)/gu,ms={...ds,getAnimatableNone:t=>{const e=t.match(ps);return e?e.map(hs).join(" "):t}},fs={borderWidth:ko,borderTopWidth:ko,borderRightWidth:ko,borderBottomWidth:ko,borderLeftWidth:ko,borderRadius:ko,radius:ko,borderTopLeftRadius:ko,borderTopRightRadius:ko,borderBottomRightRadius:ko,borderBottomLeftRadius:ko,width:ko,maxWidth:ko,height:ko,maxHeight:ko,top:ko,right:ko,bottom:ko,left:ko,padding:ko,paddingTop:ko,paddingRight:ko,paddingBottom:ko,paddingLeft:ko,margin:ko,marginTop:ko,marginRight:ko,marginBottom:ko,marginLeft:ko,backgroundPositionX:ko,backgroundPositionY:ko},gs={rotate:xo,rotateX:xo,rotateY:xo,rotateZ:xo,scale:bo,scaleX:bo,scaleY:bo,scaleZ:bo,skew:xo,skewX:xo,skewY:xo,distance:ko,translateX:ko,translateY:ko,translateZ:ko,x:ko,y:ko,z:ko,perspective:ko,transformPerspective:ko,opacity:vo,originX:Ao,originY:Ao,originZ:ko},ys={...yo,transform:Math.round},vs={...fs,...gs,zIndex:ys,size:ko,fillOpacity:vo,strokeOpacity:vo,numOctaves:ys},bs={...vs,color:Zo,backgroundColor:Zo,outlineColor:Zo,fill:Zo,stroke:Zo,borderColor:Zo,borderTopColor:Zo,borderRightColor:Zo,borderBottomColor:Zo,borderLeftColor:Zo,filter:ms,WebkitFilter:ms},ws=t=>bs[t];function xs(t,e){let n=ws(t);return n!==ms&&(n=ds),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const _s=new Set(["auto","none","0"]);class ks extends zo{constructor(t,e,n,i,r){super(t,e,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let a=0;a<t.length;a++){let n=t[a];if("string"==typeof n&&(n=n.trim(),ho(n))){const i=fo(n,e.current);void 0!==i&&(t[a]=i),a===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Po.has(n)||2!==t.length)return;const[i,r]=t,o=jo(i),s=jo(r);if(o!==s)if(Co(o)&&Co(s))for(let a=0;a<t.length;a++){const e=t[a];"string"==typeof e&&(t[a]=parseFloat(e))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let r=0;r<t.length;r++)("number"==typeof(i=t[r])?0===i:null===i||"none"===i||"0"===i||oo(i))&&n.push(r);var i;n.length&&function(t,e,n){let i,r=0;for(;r<t.length&&!i;){const e=t[r];"string"==typeof e&&!_s.has(e)&&ss(e).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=xs(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Mo[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach((([t,n])=>{e.getValue(t).set(n)})),this.resolveNoneKeyframes()}}function Ts(t){return"function"==typeof t}let Ss;function As(){Ss=void 0}const Ps={now:()=>(void 0===Ss&&Ps.set(Hr.isProcessing||jr?Hr.timestamp:performance.now()),Ss),set:t=>{Ss=t,queueMicrotask(As)}},Cs=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ds.test(t)&&"0"!==t||t.startsWith("url(")));class Es{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ps.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:r,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Io(),Bo()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=Ps.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(t,e,n,i){const r=t[0];if(null===r)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],s=Cs(r,e),a=Cs(o,e);return!(!s||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||Ts(n))&&i)}(t,n,i,r)){if(!o)return null==a||a(Fr(t,this.options,e)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(t,e);!1!==c&&(this._resolved={keyframes:t,finalKeyframe:e,...c},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((t=>{this.resolveFinishedPromise=t}))}}function Ns(t,e){return e?t*(1e3/e):0}const Rs=5;function Os(t,e,n){const i=Math.max(e-Rs,0);return Ns(n-t(i),e-i)}const Ms=.001,Ds=.01,Ls=10,js=.05,Vs=1;function Fs({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let r,o,s=1-e;s=go(js,Vs,s),t=go(Ds,Ls,Nr(t)),s<1?(r=e=>{const i=e*s,r=i*t,o=i-n,a=Bs(e,s),l=Math.exp(-r);return Ms-o/a*l},o=e=>{const i=e*s*t,o=i*n+n,a=Math.pow(s,2)*Math.pow(e,2)*t,l=Math.exp(-i),c=Bs(Math.pow(e,2),s);return(-r(e)+Ms>0?-1:1)*((o-a)*l)/c}):(r=e=>Math.exp(-e*t)*((e-n)*t+1)-Ms,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let r=1;r<Us;r++)i-=t(i)/e(i);return i}(r,o,5/t);if(t=Er(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*s*Math.sqrt(i*e),duration:t}}}const Us=12;function Bs(t,e){return t*Math.sqrt(1-e*e)}const Is=["duration","bounce"],zs=["stiffness","damping","mass"];function $s(t,e){return e.some((e=>void 0!==t[e]))}function Hs({keyframes:t,restDelta:e,restSpeed:n,...i}){const r=t[0],o=t[t.length-1],s={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:d,velocity:u,isResolvedFromDuration:h}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!$s(t,zs)&&$s(t,Is)){const n=Fs(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Nr(i.velocity||0)}),p=u||0,m=l/(2*Math.sqrt(a*c)),f=o-r,g=Nr(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=Bs(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:h&&d||null,next:t=>{const i=v(t);if(h)s.done=t>=d;else{let r=0;m<1&&(r=0===t?Er(p):Os(v,t,i));const a=Math.abs(r)<=n,l=Math.abs(o-i)<=e;s.done=a&&l}return s.value=s.done?o:i,s}}}function qs({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=t[0],h={done:!1,value:u},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=u+m,g=void 0===s?f:s(f);g!==f&&(m=g-u);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),b=t=>{const e=y(t),n=v(t);h.done=Math.abs(e)<=c,h.value=h.done?g:n};let w,x;const _=t=>{var e;(e=h.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,x=Hs({keyframes:[h.value,p(h.value)],velocity:Os(v,t,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:t=>{let e=!1;return x||void 0!==w||(e=!0,b(t),_(t)),void 0!==w&&t>=w?x.next(t-w):(!e&&b(t),h)}}}const Ws=Xr(.42,0,1,1),Ks=Xr(0,0,.58,1),Ys=Xr(.42,0,.58,1),Xs=t=>Array.isArray(t)&&"number"==typeof t[0],Gs={linear:Ur,easeIn:Ws,easeInOut:Ys,easeOut:Ks,circIn:no,circInOut:ro,circOut:io,backIn:Qr,backInOut:to,backOut:Zr,anticipate:eo},Js=t=>{if(Xs(t)){so(4===t.length);const[e,n,i,r]=t;return Xr(e,n,i,r)}return"string"==typeof t?Gs[t]:t},Zs=(t,e)=>n=>e(t(n)),Qs=(...t)=>t.reduce(Zs),ta=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},ea=(t,e,n)=>t+(e-t)*n;function na(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function ia(t,e){return n=>n>0?e:t}const ra=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},oa=[Go,Xo,Jo];function sa(t){const e=(n=t,oa.find((t=>t.test(n))));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Jo&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let r=0,o=0,s=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;r=na(a,i,t+1/3),o=na(a,i,t),s=na(a,i,t-1/3)}else r=o=s=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*s),alpha:i}}(i)),i}const aa=(t,e)=>{const n=sa(t),i=sa(e);if(!n||!i)return ia(t,e);const r={...n};return t=>(r.red=ra(n.red,i.red,t),r.green=ra(n.green,i.green,t),r.blue=ra(n.blue,i.blue,t),r.alpha=ea(n.alpha,i.alpha,t),Xo.transform(r))},la=new Set(["none","hidden"]);function ca(t,e){return n=>ea(t,e,n)}function da(t){return"number"==typeof t?ca:"string"==typeof t?ho(t)?ia:Zo.test(t)?aa:pa:Array.isArray(t)?ua:"object"==typeof t?Zo.test(t)?aa:ha:ia}function ua(t,e){const n=[...t],i=n.length,r=t.map(((t,n)=>da(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=r[e](t);return n}}function ha(t,e){const n={...t,...e},i={};for(const r in n)void 0!==t[r]&&void 0!==e[r]&&(i[r]=da(t[r])(t[r],e[r]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const pa=(t,e)=>{const n=ds.createTransformer(e),i=ss(t),r=ss(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?la.has(t)&&!r.values.length||la.has(e)&&!i.values.length?function(t,e){return la.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Qs(ua(function(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const s=e.types[o],a=t.indexes[s][r[s]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):ia(t,e)};function ma(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return ea(t,e,n);return da(t)(t,e)}function fa(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const o=t.length;if(so(o===e.length),1===o)return()=>e[0];if(2===o&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=function(t,e,n){const i=[],r=n||ma,o=t.length-1;for(let s=0;s<o;s++){let n=r(t[s],t[s+1]);if(e){const t=Array.isArray(e)?e[s]||Ur:e;n=Qs(t,n)}i.push(n)}return i}(e,i,r),a=s.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=ta(t[n],t[n+1],e);return s[n](i)};return n?e=>l(go(t[0],t[o-1],e)):l}function ga(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=ta(0,e,i);t.push(ea(n,1,r))}}(e,t.length-1),e}function ya({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=(t=>Array.isArray(t)&&"number"!=typeof t[0])(i)?i.map(Js):Js(i),o={done:!1,value:e[0]},s=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:ga(e),t),a=fa(s,e,{ease:Array.isArray(r)?r:(l=e,c=r,l.map((()=>c||Ys)).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}const va=t=>{const e=({timestamp:e})=>t(e);return{start:()=>zr.update(e,!0),stop:()=>$r(e),now:()=>Hr.isProcessing?Hr.timestamp:Ps.now()}},ba={decay:qs,inertia:qs,tween:ya,keyframes:ya,spring:Hs},wa=t=>t/100;class xa extends Es{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||zo;this.resolver=new o(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=Ts(e)?e:ba[e]||ya;let a,l;s!==ya&&"number"!=typeof t[0]&&(a=Qs(wa,ma(t[0],t[1])),t=[0,100]);const c=s({...this.options,keyframes:t});"mirror"===r&&(l=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=function(t){let e=0,n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}(c));const{calculatedDuration:d}=c,u=d+i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:d,resolvedDuration:u,totalDuration:u*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=n;if(null===this.startTime)return r.next(0);const{delay:u,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-u*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=r;if(h){const t=Math.min(this.currentTime,c)/d;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,h+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/d)):"mirror"===p&&(b=o)),v=go(0,1,n)*d}const w=y?{done:!1,value:a[0]}:b.next(v);s&&(w.value=s(w.value));let{done:x}=w;y||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==i&&(w.value=Fr(a,this.options,i)),f&&f(w.value),_&&this.finish(),w}get duration(){const{resolved:t}=this;return t?Nr(t.calculatedDuration):0}get time(){return Nr(this.currentTime)}set time(t){t=Er(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=Nr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=va,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t((t=>this.tick(t)))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const _a=new Set(["opacity","clipPath","filter","transform"]),ka=(t,e)=>{let n="";const i=Math.max(Math.round(e/10),2);for(let r=0;r<i;r++)n+=t(ta(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ta(t){let e;return()=>(void 0===e&&(e=t()),e)}const Sa={linearEasing:void 0};function Aa(t,e){const n=Ta(t);return()=>{var t;return null!==(t=Sa[e])&&void 0!==t?t:n()}}const Pa=Aa((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}),"linearEasing");function Ca(t){return Boolean("function"==typeof t&&Pa()||!t||"string"==typeof t&&(t in Na||Pa())||Xs(t)||Array.isArray(t)&&t.every(Ca))}const Ea=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Na={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ea([0,.65,.55,1]),circOut:Ea([.55,0,1,.45]),backIn:Ea([.31,.01,.66,-.59]),backOut:Ea([.33,1.53,.69,.99])};function Ra(t,e){return t?"function"==typeof t&&Pa()?ka(t,e):Xs(t)?Ea(t):Array.isArray(t)?t.map((t=>Ra(t,e)||Na.easeOut)):Na[t]:void 0}function Oa(t,e,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const d=Ra(a,r);return Array.isArray(d)&&(c.easing=d),t.animate(c,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}function Ma(t,e){t.timeline=e,t.onfinish=null}const Da=Ta((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const La={anticipate:eo,backInOut:to,circInOut:ro};class ja extends Es{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new ks(r,((t,e)=>this.onKeyframesResolved(t,e)),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){var n;let{duration:i=300,times:r,ease:o,type:s,motionValue:a,name:l,startTime:c}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var d;if("string"==typeof o&&Pa()&&o in La&&(o=La[o]),Ts((d=this.options).type)||"spring"===d.type||!Ca(d.ease)){const{onComplete:e,onUpdate:n,motionValue:a,element:l,...c}=this.options,d=function(t,e){const n=new xa({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const r=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),r.push(i.value),o+=10;return{times:void 0,keyframes:r,duration:o-10,ease:"linear"}}(t,c);1===(t=d.keyframes).length&&(t[1]=t[0]),i=d.duration,r=d.times,o=d.ease,s="keyframes"}const u=Oa(a.owner.current,l,t,{...this.options,duration:i,times:r,ease:o});return u.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(Ma(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(Fr(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:r,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return Nr(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return Nr(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=Er(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return Ur;const{animation:n}=e;Ma(n,t)}else this.pendingTimeline=t;return Ur}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:r,ease:o,times:s}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...c}=this.options,d=new xa({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),u=Er(this.time);t.setWithVelocity(d.sample(u-10).value,d.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=t;return Da()&&n&&_a.has(n)&&e&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const Va=Ta((()=>void 0!==window.ScrollTimeline));class Fa{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,e){return Promise.all(this.animations).then(t).catch(e)}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map((n=>Va()&&n.attachTimeline?n.attachTimeline(t):e(n)));return()=>{n.forEach(((t,e)=>{t&&t(),this.animations[e].stop()}))}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach((e=>e[t]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Ua=(t,e,n,i={},r,o)=>s=>{const a=Lr(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Er(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:r};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||(d={...d,...Dr(t,d)}),d.duration&&(d.duration=Er(d.duration)),d.repeatDelay&&(d.repeatDelay=Er(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),u&&!o&&void 0!==e.get()){const t=Fr(d.keyframes,a);if(void 0!==t)return zr.update((()=>{d.onUpdate(t),d.onComplete()})),new Fa([])}return!o&&ja.supports(d)?new ja(d):new xa(d)},Ba=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Ia=t=>br(t)?t[t.length-1]||0:t;function za(t,e){-1===t.indexOf(e)&&t.push(e)}function $a(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ha{constructor(){this.subscriptions=[]}add(t){return za(this.subscriptions,t),()=>$a(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class qa{constructor(t,e={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Ps.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Ps.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Ha);const n=this.events[t].add(e);return"change"===t?()=>{n(),zr.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ps.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ns(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wa(t,e){return new qa(t,e)}function Ka(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wa(n))}const Ya=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xa="data-"+Ya("framerAppearId");function Ga(t){return t.props[Xa]}const Ja=t=>Boolean(t&&t.getVelocity);function Za(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ja(i)&&i.add))return n.add(e);var i}function Qa({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function tl(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(s=i);const c=[],d=r&&t.animationState&&t.animationState.getState()[r];for(const u in l){const e=t.getValue(u,null!==(o=t.latestValues[u])&&void 0!==o?o:null),i=l[u];if(void 0===i||d&&Qa(d,u))continue;const r={delay:n,...Lr(s||{},u)};let a=!1;if(window.MotionHandoffAnimation){const e=Ga(t);if(e){const t=window.MotionHandoffAnimation(e,u,zr);null!==t&&(r.startTime=t,a=!0)}}Za(t,u),e.start(Ua(u,e,i,t.shouldReduceMotion&&Cr.has(u)?{type:!1}:r,t,a));const h=e.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{zr.update((()=>{a&&function(t,e){const n=Tr(t,e);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o)Ka(t,s,Ia(o[s]))}(t,a)}))})),c}function el(t,e,n={}){var i;const r=Tr(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(tl(t,r,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(t,e,n=0,i=0,r=1,o){const s=[],a=(t.variantChildren.size-1)*i,l=1===r?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(nl).forEach(((t,i)=>{t.notify("AnimationStart",e),s.push(el(t,e,{...o,delay:n+l(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(s)}(t,e,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[s,a]:[a,s];return t().then((()=>e()))}return Promise.all([s(),a(n.delay)])}function nl(t,e){return t.sortNodePosition(e)}const il=Ar.length;function rl(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&rl(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<il;n++){const i=Ar[n],r=t.props[i];(xr(r)||!1===r)&&(e[i]=r)}return e}const ol=[...Sr].reverse(),sl=Sr.length;function al(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const r=e.map((e=>el(t,e,n)));i=Promise.all(r)}else if("string"==typeof e)i=el(t,e,n);else{const r="function"==typeof e?Tr(t,e,n.custom):e;i=Promise.all(tl(t,r,n))}return i.then((()=>{t.notify("AnimationComplete",e)}))}(t,e,n))))}function ll(t){let e=al(t),n=ul(),i=!0;const r=e=>(n,i)=>{var r;const o=Tr(t,i,"exit"===e?null===(r=t.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const{props:s}=t,a=rl(t.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let e=0;e<sl;e++){const h=ol[e],p=n[h],m=void 0!==s[h]?s[h]:a[h],f=xr(m),g=h===o?p.isActive:null;!1===g&&(u=e);let y=m===a[h]&&m!==s[h]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||vr(m)||"boolean"==typeof m)continue;const v=cl(p.prevProp,m);let b=v||h===o&&p.isActive&&!y&&f||e>u&&f,w=!1;const x=Array.isArray(m)?m:[m];let _=x.reduce(r(h),{});!1===g&&(_={});const{prevResolvedValues:k={}}=p,T={...k,..._},S=e=>{b=!0,c.has(e)&&(w=!0,c.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in T){const e=_[t],n=k[t];if(d.hasOwnProperty(t))continue;let i=!1;i=br(e)&&br(n)?!wr(e,n):e!==n,i?null!=e?S(t):c.add(t):void 0!==e&&c.has(t)?S(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=_,p.isActive&&(d={...d,..._}),i&&t.blockInitialAnimation&&(b=!1);b&&(!(y&&v)||w)&&l.push(...x.map((t=>({animation:t,options:{type:h}}))))}if(c.size){const e={};c.forEach((n=>{const i=t.getBaseTarget(n),r=t.getValue(n);r&&(r.liveStyle=!0),e[n]=null!=i?i:null})),l.push({animation:e})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||t.manuallyAnimateOnMount||(h=!1),i=!1,h?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=ul(),i=!0}}}function cl(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!wr(e,t)}function dl(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ul(){return{animate:dl(!0),whileInView:dl(),whileHover:dl(),whileTap:dl(),whileDrag:dl(),whileFocus:dl(),exit:dl()}}class hl{constructor(t){this.isMounted=!1,this.node=t}update(){}}let pl=0;const ml={animation:{Feature:class extends hl{constructor(t){super(t),t.animationState||(t.animationState=ll(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends hl{constructor(){super(...arguments),this.id=pl++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},fl=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function gl(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const yl=t=>e=>fl(e)&&t(e,gl(e));function vl(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function bl(t,e,n,i){return vl(t,e,yl(n),i)}const wl=(t,e)=>Math.abs(t-e);class xl{constructor(t,e,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Tl(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=wl(t.x,e.x),i=wl(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:r}=Hr;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=_l(e,this.transformPagePoint),zr.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Tl("pointercancel"===t.type?this.lastMoveEventInfo:_l(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!fl(t))return;this.dragSnapToOrigin=r,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=_l(gl(t),this.transformPagePoint),{point:s}=o,{timestamp:a}=Hr;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Tl(o,this.history)),this.removeListeners=Qs(bl(this.contextWindow,"pointermove",this.handlePointerMove),bl(this.contextWindow,"pointerup",this.handlePointerUp),bl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),$r(this.updatePoint)}}function _l(t,e){return e?{point:e(t.point)}:t}function kl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Tl({point:t},e){return{point:t,delta:kl(t,Al(e)),offset:kl(t,Sl(e)),velocity:Pl(e,.1)}}function Sl(t){return t[0]}function Al(t){return t[t.length-1]}function Pl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=Al(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Er(e)));)n--;if(!i)return{x:0,y:0};const o=Nr(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Cl(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const El=Cl("dragHorizontal"),Nl=Cl("dragVertical");function Rl(t){let e=!1;if("y"===t)e=Nl();else if("x"===t)e=El();else{const t=El(),n=Nl();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function Ol(){const t=Rl(!0);return!t||(t(),!1)}function Ml(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const Dl=.9999,Ll=1.0001,jl=-.01,Vl=.01;function Fl(t){return t.max-t.min}function Ul(t,e,n,i=.5){t.origin=i,t.originPoint=ea(e.min,e.max,t.origin),t.scale=Fl(n)/Fl(e),t.translate=ea(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Dl&&t.scale<=Ll||isNaN(t.scale))&&(t.scale=1),(t.translate>=jl&&t.translate<=Vl||isNaN(t.translate))&&(t.translate=0)}function Bl(t,e,n,i){Ul(t.x,e.x,n.x,i?i.originX:void 0),Ul(t.y,e.y,n.y,i?i.originY:void 0)}function Il(t,e,n){t.min=n.min+e.min,t.max=t.min+Fl(e)}function zl(t,e,n){t.min=e.min-n.min,t.max=t.min+Fl(e)}function $l(t,e,n){zl(t.x,e.x,n.x),zl(t.y,e.y,n.y)}function Hl(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function ql(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Wl=.35;function Kl(t,e,n){return{min:Yl(t,e),max:Yl(t,n)}}function Yl(t,e){return"number"==typeof t?t:t[e]||0}const Xl=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Gl=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Jl(t){return[t("x"),t("y")]}function Zl({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Ql(t){return void 0===t||1===t}function tc({scale:t,scaleX:e,scaleY:n}){return!Ql(t)||!Ql(e)||!Ql(n)}function ec(t){return tc(t)||nc(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function nc(t){return ic(t.x)||ic(t.y)}function ic(t){return t&&"0%"!==t}function rc(t,e,n){return n+e*(t-n)}function oc(t,e,n,i,r){return void 0!==r&&(t=rc(t,r,i)),rc(t,n,i)+e}function sc(t,e=0,n=1,i,r){t.min=oc(t.min,e,n,i,r),t.max=oc(t.max,e,n,i,r)}function ac(t,{x:e,y:n}){sc(t.x,e.translate,e.scale,e.originPoint),sc(t.y,n.translate,n.scale,n.originPoint)}const lc=.999999999999,cc=1.0000000000001;function dc(t,e){t.min=t.min+e,t.max=t.max+e}function uc(t,e,n,i,r=.5){sc(t,e,n,ea(t.min,t.max,r),i)}function hc(t,e){uc(t.x,e.x,e.scaleX,e.scale,e.originX),uc(t.y,e.y,e.scaleY,e.scale,e.originY)}function pc(t,e){return Zl(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const mc=({current:t})=>t?t.ownerDocument.defaultView:null,fc=new WeakMap;class gc{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gl(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new xl(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(gl(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rl(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jl((t=>{let e=this.getAxisMotionValue(t).get()||0;if(_o.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Fl(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),r&&zr.postRender((()=>r(t,e))),Za(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",e.point,s),this.updateAxis("y",e.point,s),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Jl((t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:mc(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&zr.postRender((()=>r(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!yc(t,i,this.currentDirection))return;const r=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?ea(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?ea(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),r.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,r=this.constraints;e&&Ml(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:r}){return{x:Hl(t.x,n,r),y:Hl(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Wl){return!1===t?t=0:!0===t&&(t=Wl),{x:Kl(t,"left","right"),y:Kl(t,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Jl((t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Ml(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(t,e,n){const i=pc(t,n),{scroll:r}=e;return r&&(dc(i.x,r.offset.x),dc(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ql(t.x,e.x),y:ql(t.y,e.y)}}(i.layout.layoutBox,r);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=Zl(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Jl((s=>{if(!yc(s,e,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?t[s]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(s,u)}));return Promise.all(l).then(s)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return Za(this.visualElement,t),n.start(Ua(t,n,0,e,this.visualElement,!1))}stopAnimation(){Jl((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){Jl((t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()}))}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Jl((e=>{const{drag:n}=this.getProps();if(!yc(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];r.set(t[e]-ea(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Ml(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Jl((t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Fl(t),r=Fl(e);return r>i?n=ta(e.min,e.max-i,t.min):i>r&&(n=ta(t.min,t.max-r,e.min)),go(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Jl((e=>{if(!yc(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:o}=this.constraints[e];n.set(ea(r,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;fc.set(this.visualElement,this);const t=bl(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();Ml(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),zr.read(e);const r=vl(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Jl((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{r(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Wl,dragMomentum:s=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function yc(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const vc=t=>(e,n)=>{t&&zr.postRender((()=>t(e,n)))};const bc=B(null);function wc(){const t=ut(bc);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:i}=t,r=function(){var t=rt(H++,11);if(!t.__){for(var e=q.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}();st((()=>i(r)),[]);const o=dt((()=>n&&n(r)),[r,n]);return!e&&n?[!1,o]:[!0]}const xc=B({}),_c=B({}),kc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Tc(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Sc={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ko.test(t))return t;t=parseFloat(t)}return`${Tc(t,e.target.x)}% ${Tc(t,e.target.y)}%`}},Ac={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=ds.parse(t);if(r.length>5)return i;const o=ds.createTransformer(t),s="number"!=typeof r[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;r[0+s]/=a,r[1+s]/=l;const c=ea(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},Pc={};const{schedule:Cc}=Ir(queueMicrotask,!1);class Ec extends w{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=t;var o;o=Rc,Object.assign(Pc,o),r&&(e.group&&e.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",(()=>{this.safeToRemove()})),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),kc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?o.promote():o.relegate()||zr.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cc.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Nc(t){const[e,n]=wc(),i=ut(xc);return z(Ec,{...t,layoutGroup:i,switchLayoutGroup:ut(_c),isPresent:e,safeToRemove:n})}const Rc={borderRadius:{...Sc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Sc,borderTopRightRadius:Sc,borderBottomLeftRadius:Sc,borderBottomRightRadius:Sc,boxShadow:Ac},Oc=["TopLeft","TopRight","BottomLeft","BottomRight"],Mc=Oc.length,Dc=t=>"string"==typeof t?parseFloat(t):t,Lc=t=>"number"==typeof t||ko.test(t);function jc(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Vc=Uc(0,.5,io),Fc=Uc(.5,.95,Ur);function Uc(t,e,n){return i=>i<t?0:i>e?1:n(ta(t,e,i))}function Bc(t,e){t.min=e.min,t.max=e.max}function Ic(t,e){Bc(t.x,e.x),Bc(t.y,e.y)}function zc(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function $c(t,e,n,i,r){return t=rc(t-=e,1/n,i),void 0!==r&&(t=rc(t,1/r,i)),t}function Hc(t,e,[n,i,r],o,s){!function(t,e=0,n=1,i=.5,r,o=t,s=t){_o.test(e)&&(e=parseFloat(e),e=ea(s.min,s.max,e/100)-s.min);if("number"!=typeof e)return;let a=ea(o.min,o.max,i);t===o&&(a-=e),t.min=$c(t.min,e,n,a,r),t.max=$c(t.max,e,n,a,r)}(t,e[n],e[i],e[r],e.scale,o,s)}const qc=["x","scaleX","originX"],Wc=["y","scaleY","originY"];function Kc(t,e,n,i){Hc(t.x,e,qc,n?n.x:void 0,i?i.x:void 0),Hc(t.y,e,Wc,n?n.y:void 0,i?i.y:void 0)}function Yc(t){return 0===t.translate&&1===t.scale}function Xc(t){return Yc(t.x)&&Yc(t.y)}function Gc(t,e){return t.min===e.min&&t.max===e.max}function Jc(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Zc(t,e){return Jc(t.x,e.x)&&Jc(t.y,e.y)}function Qc(t){return Fl(t.x)/Fl(t.y)}function td(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class ed{constructor(){this.members=[]}add(t){za(this.members,t),t.scheduleRender()}remove(t){if($a(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let i=e;i>=0;i--){const t=this.members[i];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const nd=(t,e)=>t.depth-e.depth;class id{constructor(){this.children=[],this.isDirty=!1}add(t){za(this.children,t),this.isDirty=!0}remove(t){$a(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nd),this.isDirty=!1,this.children.forEach(t)}}function rd(t){const e=Ja(t)?t.get():t;return Ba(e)?e.toValue():e}const od={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},sd="undefined"!=typeof window&&void 0!==window.MotionDebug,ad=["","X","Y","Z"],ld={visibility:"hidden"};let cd=0;function dd(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function ud(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ga(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",zr,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&ud(i)}function hd({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=cd++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,sd&&(od.totalNodes=od.resolvedTargetDeltas=od.recalculatedProjection=0),this.nodes.forEach(fd),this.nodes.forEach(_d),this.nodes.forEach(kd),this.nodes.forEach(gd),sd&&window.MotionDebug.record(od)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new id)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Ha),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=e)instanceof SVGElement&&"svg"!==i.tagName,this.instance=e;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Ps.now(),i=({timestamp:r})=>{const o=r-n;o>=e&&($r(i),t(o-e))};return zr.read(i,!0),()=>$r(i)}(i,250),kc.hasAnimatedSinceResize&&(kc.hasAnimatedSinceResize=!1,this.nodes.forEach(xd))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Ed,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Zc(this.targetLayout,i)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...Lr(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||xd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,$r(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Td),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ud(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let r=0;r<this.path.length;r++){const t=this.path[r];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(vd);this.isUpdating||this.nodes.forEach(bd),this.isUpdating=!1,this.nodes.forEach(wd),this.nodes.forEach(pd),this.nodes.forEach(md),this.clearAllSnapshots();const t=Ps.now();Hr.delta=go(0,1e3/60,t-Hr.timestamp),Hr.timestamp=t,Hr.isProcessing=!0,qr.update.process(Hr),qr.preRender.process(Hr),qr.render.process(Hr),Hr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yd),this.sharedNodes.forEach(Sd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zr.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zr.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Gl(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!r)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Xc(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||ec(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Od((i=n).x),Od(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return Gl();const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(Dd))){const{scroll:t}=this.root;t&&(dc(n.x,t.offset.x),dc(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n=Gl();if(Ic(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let i=0;i<this.path.length;i++){const e=this.path[i],{scroll:r,options:o}=e;e!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&Ic(n,t),dc(n.x,r.offset.x),dc(n.y,r.offset.y))}return n}applyTransform(t,e=!1){const n=Gl();Ic(n,t);for(let i=0;i<this.path.length;i++){const t=this.path[i];!e&&t.options.layoutScroll&&t.scroll&&t!==t.root&&hc(n,{x:-t.scroll.offset.x,y:-t.scroll.offset.y}),ec(t.latestValues)&&hc(n,t.latestValues)}return ec(this.latestValues)&&hc(n,this.latestValues),n}removeTransform(t){const e=Gl();Ic(e,t);for(let n=0;n<this.path.length;n++){const t=this.path[n];if(!t.instance)continue;if(!ec(t.latestValues))continue;tc(t.latestValues)&&t.updateSnapshot();const i=Gl();Ic(i,t.measurePageBox()),Kc(e,t.latestValues,t.snapshot?t.snapshot.layoutBox:void 0,i)}return ec(this.latestValues)&&Kc(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Hr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=Hr.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gl(),this.relativeTargetOrigin=Gl(),$l(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Gl(),this.targetWithTransforms=Gl()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,Il(s.x,a.x,l.x),Il(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ic(this.target,this.layout.layoutBox),ac(this.target,this.targetDelta)):Ic(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gl(),this.relativeTargetOrigin=Gl(),$l(this.relativeTargetOrigin,this.target,t.target),Ic(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}sd&&od.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!tc(this.parent.latestValues)&&!nc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===Hr.timestamp&&(i=!1),i)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;Ic(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const r=n.length;if(!r)return;let o,s;e.x=e.y=1;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&hc(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,ac(t,s)),i&&ec(o.latestValues)&&hc(t,o.latestValues))}e.x<cc&&e.x>lc&&(e.x=1),e.y<cc&&e.y>lc&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms=Gl());const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(zc(this.prevProjectionDelta.x,this.projectionDelta.x),zc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Bl(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&td(this.projectionDelta.x,this.prevProjectionDelta.x)&&td(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),sd&&od.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xl(),this.projectionDelta=Xl(),this.projectionDeltaWithTransform=Xl()}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o=Xl();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const s=Gl(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(Cd));let u;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,h,p,m,f,g;Ad(o.x,t.x,n),Ad(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($l(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=s,g=n,Pd(p.x,m.x,f.x,g),Pd(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,Gc(l.x,h.x)&&Gc(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u=Gl()),Ic(u,this.relativeTarget)),a&&(this.animationValues=r,function(t,e,n,i,r,o){r?(t.opacity=ea(0,void 0!==n.opacity?n.opacity:1,Vc(i)),t.opacityExit=ea(void 0!==e.opacity?e.opacity:1,0,Fc(i))):o&&(t.opacity=ea(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Mc;s++){const r=`border${Oc[s]}Radius`;let o=jc(e,r),a=jc(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Lc(o)===Lc(a)?(t[r]=Math.max(ea(Dc(o),Dc(a),i),0),(_o.test(a)||_o.test(o))&&(t[r]+="%")):t[r]=a)}(e.rotate||n.rotate)&&(t.rotate=ea(e.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&($r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zr.update((()=>{kc.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=Ja(t)?t:Wa(t);return i.start(Ua("",i,e,n)),i.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:r}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Md(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||Gl();const e=Fl(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Fl(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ic(e,n),hc(e,r),Bl(this.projectionDeltaWithTransform,this.layoutCorrected,e,r)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ed);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&dd("z",t,i,this.animationValues);for(let r=0;r<ad.length;r++)dd(`rotate${ad[r]}`,t,i,this.animationValues),dd(`skew${ad[r]}`,t,i,this.animationValues);t.render();for(const r in i)t.setStaticValue(r,i[r]),this.animationValues&&(this.animationValues[r]=i[r]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ld;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=rd(null==t?void 0:t.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=rd(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!ec(this.latestValues)&&(e.transform=r?r({},""):"none",this.hasProjected=!1),e}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const r=t.x.translate/e.x,o=t.y.translate/e.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),r&&(i.transform=r(s,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=s.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const c in Pc){if(void 0===s[c])continue;const{correct:t,applyTo:e}=Pc[c],n="none"===i.transform?s[c]:t(s[c],o);if(e){const t=e.length;for(let r=0;r<t;r++)i[e[r]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=o===this?rd(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(vd),this.root.sharedNodes.clear()}}}function pd(t){t.updateLayout()}function md(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;"size"===r?Jl((t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],r=Fl(i);i.min=e[t].min,i.max=i.min+r})):Md(r,n.layoutBox,e)&&Jl((i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=Fl(e[i]);r.max=r.min+s,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+s)}));const s=Xl();Bl(s,e,n.layoutBox);const a=Xl();o?Bl(a,t.applyTransform(i,!0),n.measuredBox):Bl(a,e,n.layoutBox);const l=!Xc(s);let c=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s=Gl();$l(s,n.layoutBox,r.layoutBox);const a=Gl();$l(a,e,o.layoutBox),Zc(s,a)||(c=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=s,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function fd(t){sd&&od.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function gd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function yd(t){t.clearSnapshot()}function vd(t){t.clearMeasurements()}function bd(t){t.isLayoutDirty=!1}function wd(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xd(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function _d(t){t.resolveTargetDelta()}function kd(t){t.calcProjection()}function Td(t){t.resetSkewAndRotation()}function Sd(t){t.removeLeadSnapshot()}function Ad(t,e,n){t.translate=ea(e.translate,0,n),t.scale=ea(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Pd(t,e,n,i){t.min=ea(e.min,n.min,i),t.max=ea(e.max,n.max,i)}function Cd(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Ed={duration:.45,ease:[.4,0,.1,1]},Nd=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Rd=Nd("applewebkit/")&&!Nd("chrome/")?Math.round:Ur;function Od(t){t.min=Rd(t.min),t.max=Rd(t.max)}function Md(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Qc(e),r=Qc(n),o=.2,!(Math.abs(i-r)<=o));var i,r,o}function Dd(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Ld=hd({attachResizeListener:(t,e)=>vl(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),jd={current:void 0},Vd=hd({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!jd.current){const t=new Ld({});t.mount(window),t.setOptions({layoutScroll:!0}),jd.current=t}return jd.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Fd={pan:{Feature:class extends hl{constructor(){super(...arguments),this.removePointerDownListener=Ur}onPointerDown(t){this.session=new xl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mc(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:vc(t),onStart:vc(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&zr.postRender((()=>i(t,e)))}}}mount(){this.removePointerDownListener=bl(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends hl{constructor(t){super(t),this.removeGroupControls=Ur,this.removeListeners=Ur,this.controls=new gc(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ur}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Vd,MeasureLayout:Nc}};function Ud(t,e){const n=e?"pointerenter":"pointerleave",i=e?"onHoverStart":"onHoverEnd";return bl(t.current,n,((n,r)=>{if("touch"===n.pointerType||Ol())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e);const s=o[i];s&&zr.postRender((()=>s(n,r)))}),{passive:!t.getProps()[i]})}const Bd=(t,e)=>!!e&&(t===e||Bd(t,e.parentElement));function Id(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,gl(n))}const zd=new WeakMap,$d=new WeakMap,Hd=t=>{const e=zd.get(t.target);e&&e(t)},qd=t=>{t.forEach(Hd)};function Wd(t,e,n){const i=function({root:t,...e}){const n=t||document;$d.has(n)||$d.set(n,{});const i=$d.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(qd,{root:t,...e})),i[r]}(e);return zd.set(t,n),i.observe(t),()=>{zd.delete(t),i.unobserve(t)}}const Kd={some:0,all:1};const Yd={inView:{Feature:class extends hl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:r}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:Kd[i]};return Wd(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,r&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends hl{constructor(){super(...arguments),this.removeStartListeners=Ur,this.removeEndListeners=Ur,this.removeAccessibleListeners=Ur,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=bl(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:r}=this.node.getProps(),o=r||Bd(this.node.current,t.target)?n:i;o&&zr.update((()=>o(t,e)))}),{passive:!(n.onTap||n.onPointerUp)}),r=bl(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Qs(i,r),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=vl(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=vl(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&Id("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&zr.postRender((()=>n(t,e)))}))})),Id("down",((t,e)=>{this.startPress(t,e)}))})),e=vl(this.node.current,"blur",(()=>{this.isPressing&&Id("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=Qs(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&zr.postRender((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Ol()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&zr.postRender((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=bl(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=vl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Qs(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends hl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Qs(vl(this.node.current,"focus",(()=>this.onFocus())),vl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends hl{mount(){this.unmount=Qs(Ud(this.node,!0),Ud(this.node,!1))}unmount(){}}}},Xd={layout:{ProjectionNode:Vd,MeasureLayout:Nc}},Gd=B({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Jd=B({}),Zd="undefined"!=typeof window,Qd=Zd?at:st,tu=B({strict:!1});function eu(t,e,n,i,r){var o,s;const{visualElement:a}=ut(Jd),l=ut(tu),c=ut(bc),d=ut(Gd).reducedMotion,u=lt();i=i||l.renderer,!u.current&&i&&(u.current=i(t,{visualState:e,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const h=u.current,p=ut(_c);!h||h.projection||!r||"html"!==h.type&&"svg"!==h.type||function(t,e,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:nu(t.parent)),t.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Ml(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(u.current,n,r,p);const m=lt(!1);qi((()=>{h&&m.current&&h.update(n,c)}));const f=n[Xa],g=lt(Boolean(f)&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,f))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,f)));return Qd((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Cc.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())})),st((()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,f)})),g.current=!1))})),h}function nu(t){if(t)return!1!==t.options.allowProjection?t.projection:nu(t.parent)}function iu(t,e,n){return dt((i=>{i&&t.mount&&t.mount(i),e&&(i?e.mount(i):e.unmount()),n&&("function"==typeof n?n(i):Ml(n)&&(n.current=i))}),[e])}function ru(t){return vr(t.animate)||Ar.some((e=>xr(t[e])))}function ou(t){return Boolean(ru(t)||t.variants)}function su(t){const{initial:e,animate:n}=function(t,e){if(ru(t)){const{initial:e,animate:n}=t;return{initial:!1===e||xr(e)?e:void 0,animate:xr(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,ut(Jd));return ct((()=>({initial:e,animate:n})),[au(e),au(n)])}function au(t){return Array.isArray(t)?t.join(" "):t}const lu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},cu={};for(const Dh in lu)cu[Dh]={isEnabled:t=>lu[Dh].some((e=>!!t[e]))};const du=Symbol.for("motionComponentSymbol");function uu({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){t&&function(t){for(const e in t)cu[e]={...cu[e],...t[e]}}(t);const o=function(t){function e(e){var n=vi({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=_i,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}((function(t,o){let s;const a={...ut(Gd),...t,layoutId:hu(t)},{isStatic:l}=a,c=su(t),d=i(t,l);if(!l&&Zd){ut(tu).strict;const t=function(t){const{drag:e,layout:n}=cu;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);s=t.MeasureLayout,c.visualElement=eu(r,d,a,e,t.ProjectionNode)}return z(Jd.Provider,{value:c,children:[s&&c.visualElement?z(s,{visualElement:c.visualElement,...a}):null,n(r,t,iu(d,c.visualElement,o),d,l,c.visualElement)]})}));return o[du]=r,o}function hu({layoutId:t}){const e=ut(xc).id;return e&&void 0!==t?e+"-"+t:t}const pu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function mu(t){return"string"==typeof t&&!t.includes("-")&&!!(pu.indexOf(t)>-1||/[A-Z]/u.test(t))}function fu(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const o in n)t.style.setProperty(o,n[o])}const gu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function yu(t,e,n,i){fu(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(gu.has(r)?r:Ya(r),e.attrs[r])}function vu(t,{layout:e,layoutId:n}){return Cr.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Pc[t]||"opacity"===t)}function bu(t,e,n){var i;const{style:r}=t,o={};for(const s in r)(Ja(r[s])||e.style&&Ja(e.style[s])||vu(s,t)||void 0!==(null===(i=null==n?void 0:n.getValue(s))||void 0===i?void 0:i.liveStyle))&&(o[s]=r[s]);return o}function wu(t,e,n){const i=bu(t,e,n);for(const r in t)if(Ja(t[r])||Ja(e[r])){i[-1!==Pr.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]}return i}const xu=t=>(e,n)=>{const i=ut(Jd),r=ut(bc),o=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,r,o){const s={latestValues:_u(i,r,o,t),renderState:e()};return n&&(s.mount=t=>n(i,t,s)),s}(t,e,i,r);return n?o():function(t){const e=lt(null);return null===e.current&&(e.current=t()),e.current}(o)};function _u(t,e,n,i){const r={},o=i(t,{});for(const h in o)r[h]=rd(o[h]);let{initial:s,animate:a}=t;const l=ru(t),c=ou(t);e&&c&&!l&&!1!==t.inherit&&(void 0===s&&(s=e.initial),void 0===a&&(a=e.animate));let d=!!n&&!1===n.initial;d=d||!1===s;const u=d?a:s;if(u&&"boolean"!=typeof u&&!vr(u)){const e=Array.isArray(u)?u:[u];for(let n=0;n<e.length;n++){const i=kr(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const i in n){let t=n[i];if(Array.isArray(t)){t=t[d?t.length-1:0]}null!==t&&(r[i]=t)}for(const i in t)r[i]=t[i]}}}return r}const ku=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Tu=()=>({...ku(),attrs:{}}),Su=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Au={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pu=Pr.length;function Cu(t,e,n){const{style:i,vars:r,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const t=e[l];if(Cr.has(l))s=!0;else if(co(l))r[l]=t;else{const e=Su(t,vs[l]);l.startsWith("origin")?(a=!0,o[l]=e):i[l]=e}}if(e.transform||(s||n?i.transform=function(t,e,n){let i="",r=!0;for(let o=0;o<Pu;o++){const s=Pr[o],a=t[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Su(a,vs[s]);l||(r=!1,i+=`${Au[s]||s}(${t}) `),n&&(e[s]=t)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Eu(t,e,n){return"string"==typeof t?t:ko.transform(e+n*t)}const Nu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ru={offset:"strokeDashoffset",array:"strokeDasharray"};function Ou(t,{attrX:e,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(Cu(t,c,u),d)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:p,dimensions:m}=t;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${Eu(e,t.x,t.width)} ${Eu(n,t.y,t.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(t,e,n=1,i=0,r=!0){t.pathLength=1;const o=r?Nu:Ru;t[o.offset]=ko.transform(-i);const s=ko.transform(e),a=ko.transform(n);t[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Mu=t=>"string"==typeof t&&"svg"===t.toLowerCase(),Du={useVisualState:xu({scrapeMotionValuesFromProps:wu,createRenderState:Tu,onMount:(t,e,{renderState:n,latestValues:i})=>{zr.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),zr.render((()=>{Ou(n,i,Mu(e.tagName),t.transformTemplate),yu(e,n)}))}})},Lu={useVisualState:xu({scrapeMotionValuesFromProps:bu,createRenderState:ku})};function ju(t,e,n){for(const i in e)Ja(e[i])||vu(i,n)||(t[i]=e[i])}function Vu(t,e){const n={};return ju(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},e){return ct((()=>{const n=ku();return Cu(n,e,t),Object.assign({},n.vars,n.style)}),[e])}(t,e)),n}function Fu(t,e){const n={},i=Vu(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Uu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Bu(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Uu.has(t)}let Iu=t=>!Bu(t);try{(zu=require("@emotion/is-prop-valid").default)&&(Iu=t=>t.startsWith("on")?!Bu(t):zu(t))}catch(Mh){}var zu;function $u(t,e,n,i){const r=ct((()=>{const n=Tu();return Ou(n,e,Mu(i),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};ju(e,t.style,t),r.style={...e,...r.style}}return r}function Hu(t=!1){return(e,n,i,{latestValues:r},o)=>{const s=(mu(e)?$u:Fu)(n,r,o,e),a=function(t,e,n){const i={};for(const r in t)"values"===r&&"object"==typeof t.values||(Iu(r)||!0===n&&Bu(r)||!e&&!Bu(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}(n,"string"==typeof e,t),l=e!==b?{...a,...s,ref:i}:{},{children:c}=n;return y(e,{...l,children:ct((()=>Ja(c)?c.get():c),[c])})}}function qu(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return uu({...mu(n)?Du:Lu,preloadedFeatures:t,useRender:Hu(i),createVisualElement:e,Component:n})}}const Wu={current:null},Ku={current:!1};const Yu=new WeakMap,Xu=[...Lo,Zo,ds],Gu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ju{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=zo,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=Ps.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,zr.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=ru(e),this.isVariantNode=ou(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const u in d){const t=d[u];void 0!==a[u]&&Ja(t)&&t.set(a[u],!1)}}mount(t){this.current=t,Yu.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((t,e)=>this.bindToMotionValue(e,t))),Ku.current||function(){if(Ku.current=!0,Zd)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Wu.current=t.matches;t.addListener(e),e()}else Wu.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Wu.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Yu.delete(this.current),this.projection&&this.projection.unmount(),$r(this.notifyUpdate),$r(this.render),this.valueSubscriptions.forEach((t=>t())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Cr.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&zr.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,(()=>{i(),r(),o&&o(),e.owner&&e.stop()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in cu){const e=cu[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gl()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let n=0;n<Gu.length;n++){const e=Gu[n];this.propEventSubscriptions[e]&&(this.propEventSubscriptions[e](),delete this.propEventSubscriptions[e]);const i=t["on"+e];i&&(this.propEventSubscriptions[e]=this.on(e,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const r=e[i],o=n[i];if(Ja(r))t.addValue(i,r);else if(Ja(o))t.addValue(i,Wa(r,{owner:t}));else if(o!==r)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(r):e.hasAnimated||e.set(r)}else{const e=t.getStaticValue(i);t.addValue(i,Wa(void 0!==e?e:r,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Wa(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var r;return null!=i&&("string"==typeof i&&(ao(i)||oo(i))?i=parseFloat(i):(r=i,!Xu.find(Do(r))&&ds.test(e)&&(i=xs(t,e))),this.setBaseTarget(t,Ja(i)?i.get():i)),Ja(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=kr(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);r&&(i=r[t])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,t);return void 0===r||Ja(r)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:r}on(t,e){return this.events[t]||(this.events[t]=new Ha),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Zu extends Ju{constructor(){super(...arguments),this.KeyframeResolver=ks}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}}class Qu extends Zu{constructor(){super(...arguments),this.type="html",this.renderInstance=fu}readValueFromInstance(t,e){if(Cr.has(e)){const t=ws(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),r=(co(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return pc(t,e)}build(t,e,n){Cu(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return bu(t,e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ja(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}}class th extends Zu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gl}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Cr.has(e)){const t=ws(e);return t&&t.default||0}return e=gu.has(e)?e:Ya(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return wu(t,e,n)}build(t,e,n){Ou(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){yu(t,e,0,i)}mount(t){this.isSVGTag=Mu(t.tagName),super.mount(t)}}const eh=yr(qu({...ml,...Yd,...Fd,...Xd},((t,e)=>mu(t)?new th(e):new Qu(e,{allowProjection:t!==b}))));var nh=(t=>(t.EmailAddress="EmailAddress",t.MobileNumber="MobileNumber",t.CustomerId="CustomerId",t))(nh||{});const ih=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var rh=(t=>(t.Established="Established",t.Unestablished="Unestablished",t))(rh||{});const oh=t=>!!/\+\d{1,14}$/.test(t),sh=t=>!!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t),ah=()=>{const[t,e]=ot([]),[n,i]=ot(!1),[r,o]=ot(""),[s,a]=ot(!1),[l,c]=ot(!1),d=lt(),u=lt(),h=lt({searchType:nh.MobileNumber,searchValue:""}),p=dt((async(t,n)=>{let r;if(h.current={searchType:t,searchValue:n},i(!0),a(!1),o(""),t===nh.EmailAddress)r=(async t=>{if(!Jn)throw new Error("Api has not been initialized");const e=(t=>({emailAddress:t}))(t);return(await Jn.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(e))).data})(n);else if(t===nh.MobileNumber)r=(async t=>{if(!Jn)throw new Error("Api has not been initialized");const e={mobileNumber:t},n=[],i=await Jn.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(e));return n.push(i.data),n})(n);else{if(t!==nh.CustomerId)return i(!1),void o("Invalid search type.");r=(async t=>{if(!Jn)throw new Error("Api has not been initialized");const e=[],n=await Jn.get(`/_admin/v1.0/customer/${t}`);return e.push(n.data),e})(n)}r.then((t=>{e(t),i(!1),t.length>0?(d.current=t[0].id,a(!0)):o("No results found!")})).catch((()=>{o("Error: Unable to Retrieve Customer Information."),i(!1)}))}),[]),m=async()=>{await p(h.current.searchType,h.current.searchValue)},f=async(t,e)=>{d.current&&(await(async(t,e,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={mobileNumber:e,reason:n};await Zn.put(`/_admin/v1.0/customers/${t}/mobileNumber`,JSON.stringify(i))})(d.current,t,e),h.current.searchType===nh.MobileNumber&&(h.current.searchValue=t),await m())},g=async(t,e)=>{d.current&&(await(async(t,e,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={emailAddress:e,reason:n};await Zn.put(`/_admin/v1.0/customers/${t}/emailAddress`,JSON.stringify(i))})(d.current,t,e),await m())};return{searchFilter:h,searchCustomerResult:t,isLoading:n,isModalOpen:l,error:r,showCustomerDetails:s,searchCustomer:p,handleAction:async e=>{const{action:n}=e;switch(n){case"workplaceUnlink":await(async e=>{t.find((t=>t.apolloProfiles.find((t=>t.profileId===e&&t.status===rh.Established))))&&(c(!0),u.current=e)})(e.profileId);break;case"updateMobileNumber":await f(e.mobileNumber,e.reason);break;case"updateEmailAddress":await g(e.emailAddress,e.reason);break;default:console.error(`Unhandled action type: ${n}`)}},handleModalConfirm:async()=>{u.current&&(async t=>{if(!Jn)throw new Error("Api has not been initialized");await Jn.put(`/_admin/v1.0/workplace-link/${t}/unestablish`)})(u.current).then((async()=>{await m()})).catch((()=>{o("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},lh=()=>{const[t,e]=ot(nh.MobileNumber),[n,i]=ot("+61"),[r,o]=ot({emailAddress:"",mobileNumber:"",customerId:""}),s=dt((()=>{o({emailAddress:"",mobileNumber:"",customerId:""})}),[]),a=dt((t=>!!oh(t)||(o((t=>({...t,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=dt(((t,e)=>{const n=t.trim();if(!n){const{label:t,name:n}=(t=>{const e=ih.find((e=>nh[e.searchType]===nh[t]));return e?{name:e.name,label:e.label}:{name:"",label:""}})(e);return o((e=>({...e,[t]:`Empty ${n}`}))),!1}return!(e===nh.EmailAddress&&!sh(n))||(o((t=>({...t,emailAddress:"Invalid Email Address!"}))),!1)}),[]);return{searchType:t,searchValue:n,errors:r,setSearchType:e,setSearchValue:i,clearErrors:s,isValidSearch:dt(((t,e)=>{switch(t){case nh.EmailAddress:case nh.CustomerId:return l(e,t);case nh.MobileNumber:return a(e);default:return!1}}),[l,a])}},ch=({labelText:t,name:e,type:n,value:i,pattern:r,className:o,allowedKeyPattern:s,required:a,onClick:l,onChange:c,...d})=>{const u=dt((t=>{s&&!s.test(t.key)&&t.preventDefault()}),[s]);return z(b,{children:[t&&z("label",{className:"block text-sm font-bold text-gray-700",children:t}),z("input",{required:a??!1,className:`block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm ${o}`,name:e,type:n,value:i,onKeyPress:u,pattern:r,onClick:l,onChange:c,...d})]})},dh=({message:t,className:e,onClick:n})=>z("div",{className:e,onClick:n,children:t}),uh=t=>{const{searchType:e,searchValue:n,errors:i,setSearchType:r,setSearchValue:o,clearErrors:s,isValidSearch:a}=lh(),[l,c]=ot(!0),d=()=>{s(),c(!1)},u=t=>{const e=t.currentTarget;c(!1),o(e.value),s()};return z(b,{children:z("div",{className:"flex flex-col p-2",children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),z("form",{className:"w-1/3",onSubmit:i=>{i.preventDefault(),a(e,n)&&(c(!0),t.onSubmit(e,n))},children:[z("select",{className:"mt-2 block sm:w-1/2 rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 text-sm leading-6",name:"searchType",id:"searchtype",value:e,onChange:t=>{s();const e=t.currentTarget.value;r(e),o("")},"data-testid":"select",children:ih.map((t=>z("option",{value:t.searchType,children:t.name},t.searchType)))}),z("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[e===nh.EmailAddress&&z(ch,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),e===nh.MobileNumber&&z(ch,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),e===nh.CustomerId&&z(ch,{labelText:"PBA Customer Id",name:"customerId",placeholder:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u})]}),z("div",{className:"mt-2",children:Object.values(i).map(((t,e)=>z(dh,{message:t,className:"text-sm text-red-600 sm:text-right"},e)))}),z("div",{className:"sm:flex justify-end sm:mt-6",children:z("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none "+(l?"bg-gray-400 cursor-not-allowed":""),disabled:l,children:"Search"})})]})]})})},hh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),ph=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),mh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...t},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})),fh=t=>y("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...t},y("path",{d:"M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"})),gh=t=>y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...t},y("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),yh=t=>y("svg",{className:"feather feather-edit",fill:"none",height:24,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...t},y("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),y("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})),vh=t=>{const e=new Date(t);return new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().substring(0,10)},bh=t=>{const[e,n]=ot(t.data.apolloProfiles.length>0),i=t.data.apolloProfiles.length>0,r=ct((()=>t.data.apolloProfiles.slice().sort(((t,e)=>{const n=t.status.localeCompare(e.status);return 0!==n?n:t.profileId.localeCompare(e.profileId)}))),[t.data.apolloProfiles]),o=()=>z(b,{children:z(e?ph:hh,{className:"h-6 w-6 border-0 cursor-pointer"})});return z(b,{children:[z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-2 text-sm",children:z("span",{onClick:()=>{i&&n(!e)},children:[!i&&z(mh,{className:"h-6 w-6 border-0"}),i&&z(o,{})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.id}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.name?.firstName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.name?.lastName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[t.data.email?.value,t.data?.email?.isVerified&&z(gh,{className:"h-4 w-4 border-0"}),t.searchType!==nh.EmailAddress&&z("span",{onClick:()=>t.onEdit("emailAddress"),children:z(yh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[t.data.mobileNumber,t.searchType!==nh.EmailAddress&&z("span",{onClick:()=>t.onEdit("mobileNumber"),children:z(yh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.kyc?.address.state}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.kyc?.dateOfBirth.substring(0,10)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.data.kyc?"True":"False"})]},t.key),e&&z(b,{children:z("tr",{className:"divide-x divide-gray-200",children:z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),z("div",{className:"-mx-4 mt-4 overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:-mx-6 md:mx-0 md:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Partner ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Date"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:r.map(((e,n)=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.profileId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.partnerId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.status}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:vh(e.statusUpdatedAtUtc)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.accountName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("span",{onClick:()=>t.onAction({action:"workplaceUnlink",profileId:e.profileId}),children:z(fh,{className:"h-6 w-6 border-0 "+(e.status===rh.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})})]},n)))})]})})]})})})]})},wh=t=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:t.data.map(((e,n)=>z(bh,{title:"Apollo Profiles",data:e,searchType:t.searchType,onAction:t.onAction,onEdit:t.onEdit},n)))})]})})}),xh=t=>{const{inputValue:e,reason:n,isCustomerIdentityVerified:i,messages:r,isSubmitting:o,setInputValue:s,setReason:a,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:d}=((t,e)=>{const[n,i]=ot(t.value),[r,o]=ot(!1),[s,a]=ot(""),[l,c]=ot([]),[d,u]=ot(!1),h=dt((()=>{c([])}),[]),p=dt((()=>{o(!1),a("")}),[]),m=dt(((t,e)=>{c((n=>[...n,{text:t,type:e}]))}),[]),f=dt((()=>""!==s.trim()),[s]),g=dt((()=>!("emailAddress"===t.type&&!sh(n)&&(m("Please enter a valid email address.","error"),1)||"mobileNumber"===t.type&&!oh(n)&&(m("Please enter a valid mobile number.","error"),1)||!f()&&(m("Reason cannot be empty.","error"),1))),[t.type,n,m,f]),y=dt((e=>{if(e instanceof jn){const n=e.response?.data?.message||`Failed to update ${"emailAddress"===t.type?"email address":"mobile number"}.`;m(n,"error")}else m("An unexpected error occurred.","error")}),[m,t.type]),v=dt((async()=>{if(h(),g()){u(!0);try{await e("emailAddress"===t.type?{action:"updateEmailAddress",emailAddress:n,reason:s}:{action:"updateMobileNumber",mobileNumber:n,reason:s}),m(("emailAddress"===t.type?"Email Address":"Mobile Number")+" Updated.","success"),p()}catch(i){y(i)}finally{u(!1)}}}),[h,g,t.type,p,e,n,s,m,y]);return{inputValue:n,reason:s,isCustomerIdentityVerified:r,messages:l,isSubmitting:d,setIsSubmitting:u,setInputValue:i,setReason:a,setIsVerifiedCustomerIdentity:o,clearMessages:h,handleSubmit:v}})(t.formData,t.onSubmit),u=t=>{const e=t.currentTarget;s(e.value),c()};return z(b,{children:z("div",{className:"flex flex-row mt-6 ml-4",children:z("form",{onSubmit:async t=>{t.preventDefault(),await d()},children:z("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[z("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"mobileNumber"===t.formData.type?"Mobile Number":"Email Address"}),z("div",{className:"sm:col-start-2",children:["mobileNumber"===t.formData.type&&z(ch,{allowedKeyPattern:/[0-9+]/,name:"mobileNumber",placeholder:"",type:"tel",value:e,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:u}),"emailAddress"===t.formData.type&&z(ch,{name:"emailAddress",placeholder:"",type:"email",value:e,className:"w-full",onClick:c,onChange:u})]}),z("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:r.map(((t,e)=>z(dh,{message:t.text,className:"text-sm text-left font-semibold "+("error"===t.type?"text-red-600":"text-green-600")},e)))}),z("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[z("div",{className:"flex h-6 items-center",children:z("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:i,onChange:t=>{const e=t.currentTarget;l(e.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),z("div",{className:"ml-2 text-sm leading-6",children:z("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),z("div",{className:"col-start-2",children:z(ch,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:n,className:"w-full",onClick:c,onChange:t=>{const e=t.currentTarget;a(e.value),c()}})}),z("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:z("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",disabled:o,children:"Update"})})]})})})})},_h=()=>z("div",{className:"w-full p-4 space-y-4 animate-pulse",children:[z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"})]}),[...Array(5)].map(((t,e)=>z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"})]},e)))]}),kh=()=>{const{searchCustomerResult:t,isLoading:e,error:n,showCustomerDetails:i,isModalOpen:r,searchFilter:o,searchCustomer:s,handleAction:a,handleModalConfirm:l,handleModalCancel:c}=ah(),[d,u]=ot("searchResult"),[h,p]=ot(1);return z(b,{children:["searchResult"===d&&z(b,{children:[z(eh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:[z(uh,{onSubmit:s}),!e&&i&&z(eh.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.2},children:z(wh,{data:t,searchType:o.current.searchType,onAction:a,onEdit:t=>{p(1),u("mobileNumber"===t?"editMobileNumber":"editEmailAddress")}})},"customerTable")]},d),e&&z(_h,{}),n&&z("div",{className:"p-4 mt-2 text-red-700",children:n})]}),"searchResult"!==d&&z(eh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:z(Zi,{buttonName:"Customer Management",onClick:()=>{p(-1),u("searchResult")},children:z(xh,{formData:"editMobileNumber"==d?{value:t[0].mobileNumber,type:"mobileNumber"}:{value:t[0].email.value,type:"emailAddress"},onSubmit:a})})},d),z(Ki,{isOpen:r,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c})]})};var Th=(t=>(t.Search="Search",t.BenefitsPlan="Benefits Plan",t))(Th||{});function Sh(){return(Sh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var Ah=["context","children"];function Ph(t){return this.getChildContext=function(){return t.context},U(t.children,function(t,e){if(null==t)return{};var n,i,r={},o=Object.keys(t);for(i=0;i<o.length;i++)e.indexOf(n=o[i])>=0||(r[n]=t[n]);return r}(t,Ah))}function Ch(){var t=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(t),this._vdom=y(Ph,Sh({},this._props,{context:t.detail.context}),function t(e,n){if(3===e.nodeType)return e.data;if(1!==e.nodeType)return null;var i=[],r={},o=0,s=e.attributes,a=e.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(r[s[o].name]=s[o].value,r[Eh(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=t(a[o],null),c=a[o].slot;c?r[c]=y(Oh,{name:c},l):i[o]=l}var d=n?y(Oh,null,i):i;return y(n||e.nodeName.toLowerCase(),r,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?F:V)(this._vdom,this._root)}function Eh(t){return t.replace(/-(\w)/g,(function(t,e){return e?e.toUpperCase():""}))}function Nh(t,e,n){if(this._vdom){var i={};i[t]=n=null==n?void 0:n,i[Eh(t)]=n,this._vdom=U(this._vdom,i),V(this._vdom,this._root)}}function Rh(){V(this._vdom=null,this._root)}function Oh(t,e){var n=this;return y("slot",Sh({},t,{ref:function(t){t?(n.ref=t,n._listener||(n._listener=function(t){t.stopPropagation(),t.detail.context=e},t.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(t,e,n,i){function r(){var e=Reflect.construct(HTMLElement,[],r);return e._vdomComponent=t,e._root=e,e}(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=Ch,r.prototype.attributeChangedCallback=Nh,r.prototype.disconnectedCallback=Rh,n=n||t.observedAttributes||Object.keys(t.propTypes||{}),r.observedAttributes=n,n.forEach((function(t){Object.defineProperty(r.prototype,t,{get:function(){return this._vdom.props[t]},set:function(e){this._vdom?this.attributeChangedCallback(t,null,e):(this._props||(this._props={}),this._props[t]=e,this.connectedCallback());var n=typeof e;null!=e&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(t,e)}})})),customElements.define(e,r)}((t=>{const e={backendUrl:t["backend-url"],accessToken:t["access-token"]};st((()=>{ei(e.backendUrl,e.accessToken,"customer-profile"),ei(e.backendUrl,e.accessToken,"flare-app-identity"),ei(e.backendUrl,e.accessToken,"benefits-plan")}),[e.backendUrl,e.accessToken]);const[n,i]=ot("Search"),r=dt((t=>t===n),[n]);return z(b,{children:[z("style",{children:$.toString()}),z(bt,{tabTitles:Object.entries(Th).map((([,t])=>t)),currentTab:n,onChange:i}),z(er,{visible:r("Search"),children:z(kh,{})}),z(er,{visible:r("Benefits Plan"),children:z(gr,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"])}();
1
+ !function(){"use strict";var e,t,n,i,r,o,s,a,l,c,d,u={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,m=Array.isArray;function f(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function y(t,n,i){var r,o,s,a={};for(s in n)"key"==s?r=n[s]:"ref"==s?o=n[s]:a[s]=n[s];if(arguments.length>2&&(a.children=arguments.length>3?e.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(s in t.defaultProps)void 0===a[s]&&(a[s]=t.defaultProps[s]);return v(t,a,r,o,null)}function v(e,i,r,o,s){var a={type:e,props:i,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==s?++n:s,__i:-1,__u:0};return null==s&&null!=t.vnode&&t.vnode(a),a}function b(e){return e.children}function w(e,t){this.props=e,this.context=t}function x(e,t){if(null==t)return e.__?x(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?x(e):null}function _(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return _(e)}}function k(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!T.__r++||r!==t.debounceRendering)&&((r=t.debounceRendering)||o)(T)}function T(){var e,n,r,o,a,l,c,d;for(i.sort(s);e=i.shift();)e.__d&&(n=i.length,o=void 0,l=(a=(r=e).__v).__e,c=[],d=[],r.__P&&((o=f({},a)).__v=a.__v+1,t.vnode&&t.vnode(o),D(r.__P,o,a,r.__n,r.__P.namespaceURI,32&a.__u?[l]:null,c,null==l?x(a):l,!!(32&a.__u),d),o.__v=a.__v,o.__.__k[o.__i]=o,M(c,o,d),o.__e!=l&&_(o)),i.length>n&&i.sort(s));T.__r=0}function S(e,t,n,i,r,o,s,a,l,c,d){var p,f,g,y,w,_=i&&i.__k||h,k=t.length;for(n.__d=l,function(e,t,n){var i,r,o,s,a,l=t.length,c=n.length,d=c,u=0;for(e.__k=[],i=0;i<l;i++)s=i+u,null!=(r=e.__k[i]=null==(r=t[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?v(null,r,null,null,null):m(r)?v(b,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?v(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,a=E(r,n,s,d),r.__i=a,o=null,-1!==a&&(d--,(o=n[a])&&(o.__u|=131072)),null==o||null===o.__v?(-1==a&&u--,"function"!=typeof r.type&&(r.__u|=65536)):a!==s&&(a===s+1?u++:a>s?d>l-s?u+=a-s:u--:a<s?a==s-1&&(u=a-s):u=0,a!==i+u&&(r.__u|=65536))):(o=n[s])&&null==o.key&&o.__e&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=x(o)),L(o,o,!1),n[s]=null,d--);if(d)for(i=0;i<c;i++)null!=(o=n[i])&&!(131072&o.__u)&&(o.__e==e.__d&&(e.__d=x(o)),L(o,o))}(n,t,_),l=n.__d,p=0;p<k;p++)null!=(g=n.__k[p])&&"boolean"!=typeof g&&"function"!=typeof g&&(f=-1===g.__i?u:_[g.__i]||u,g.__i=p,D(e,g,f,r,o,s,a,l,c,d),y=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&O(f.ref,null,g),d.push(g.ref,g.__c||y,g)),null==w&&null!=y&&(w=y),65536&g.__u||f.__k===g.__k?(l&&!l.isConnected&&(l=x(f)),l=C(g,l,e)):"function"==typeof g.type&&void 0!==g.__d?l=g.__d:y&&(l=y.nextSibling),g.__d=void 0,g.__u&=-196609);n.__d=l,n.__e=w}function C(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=C(i[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function A(e,t){return t=t||[],null==e||"boolean"==typeof e||(m(e)?e.some((function(e){A(e,t)})):t.push(e)),t}function E(e,t,n,i){var r=e.key,o=e.type,s=n-1,a=n+1,l=t[n];if(null===l||l&&r==l.key&&o===l.type&&!(131072&l.__u))return n;if(i>(null==l||131072&l.__u?0:1))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&!(131072&l.__u)&&r==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&!(131072&l.__u)&&r==l.key&&o===l.type)return a;a++}}return-1}function P(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||p.test(t)?n:n+"px"}function N(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||P(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||P(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||"onFocusOut"===t||"onFocusIn"===t?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=a,e.addEventListener(t,o?c:l,o)):e.removeEventListener(t,o?c:l,o);else{if("http://www.w3.org/2000/svg"==r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function R(e){return function(n){if(this.l){var i=this.l[n.type+e];if(null==n.t)n.t=a++;else if(n.t<i.u)return;return i(t.event?t.event(n):n)}}}function D(n,i,r,o,s,a,l,c,d,h){var p,y,v,_,k,T,C,A,E,P,R,D,M,O,L,j=i.type;if(void 0!==i.constructor)return null;128&r.__u&&(d=!!(32&r.__u),a=[c=i.__e=r.__e]),(p=t.__b)&&p(i);e:if("function"==typeof j)try{if(A=i.props,E=(p=j.contextType)&&o[p.__c],P=p?E?E.props.value:p.__:o,r.__c?C=(y=i.__c=r.__c).__=y.__E:("prototype"in j&&j.prototype.render?i.__c=y=new j(A,P):(i.__c=y=new w(A,P),y.constructor=j,y.render=V),E&&E.sub(y),y.props=A,y.state||(y.state={}),y.context=P,y.__n=o,v=y.__d=!0,y.__h=[],y._sb=[]),null==y.__s&&(y.__s=y.state),null!=j.getDerivedStateFromProps&&(y.__s==y.state&&(y.__s=f({},y.__s)),f(y.__s,j.getDerivedStateFromProps(A,y.__s))),_=y.props,k=y.state,y.__v=i,v)null==j.getDerivedStateFromProps&&null!=y.componentWillMount&&y.componentWillMount(),null!=y.componentDidMount&&y.__h.push(y.componentDidMount);else{if(null==j.getDerivedStateFromProps&&A!==_&&null!=y.componentWillReceiveProps&&y.componentWillReceiveProps(A,P),!y.__e&&(null!=y.shouldComponentUpdate&&!1===y.shouldComponentUpdate(A,y.__s,P)||i.__v===r.__v)){for(i.__v!==r.__v&&(y.props=A,y.state=y.__s,y.__d=!1),i.__e=r.__e,i.__k=r.__k,i.__k.forEach((function(e){e&&(e.__=i)})),R=0;R<y._sb.length;R++)y.__h.push(y._sb[R]);y._sb=[],y.__h.length&&l.push(y);break e}null!=y.componentWillUpdate&&y.componentWillUpdate(A,y.__s,P),null!=y.componentDidUpdate&&y.__h.push((function(){y.componentDidUpdate(_,k,T)}))}if(y.context=P,y.props=A,y.__P=n,y.__e=!1,D=t.__r,M=0,"prototype"in j&&j.prototype.render){for(y.state=y.__s,y.__d=!1,D&&D(i),p=y.render(y.props,y.state,y.context),O=0;O<y._sb.length;O++)y.__h.push(y._sb[O]);y._sb=[]}else do{y.__d=!1,D&&D(i),p=y.render(y.props,y.state,y.context),y.state=y.__s}while(y.__d&&++M<25);y.state=y.__s,null!=y.getChildContext&&(o=f(f({},o),y.getChildContext())),v||null==y.getSnapshotBeforeUpdate||(T=y.getSnapshotBeforeUpdate(_,k)),S(n,m(L=null!=p&&p.type===b&&null==p.key?p.props.children:p)?L:[L],i,r,o,s,a,l,c,d,h),y.base=i.__e,i.__u&=-161,y.__h.length&&l.push(y),C&&(y.__E=y.__=null)}catch(I){i.__v=null,d||null!=a?(i.__e=c,i.__u|=d?160:32,a[a.indexOf(c)]=null):(i.__e=r.__e,i.__k=r.__k),t.__e(I,i,r)}else null==a&&i.__v===r.__v?(i.__k=r.__k,i.__e=r.__e):i.__e=function(t,n,i,r,o,s,a,l,c){var d,h,p,f,y,v,b,w=i.props,_=n.props,k=n.type;if("svg"===k?o="http://www.w3.org/2000/svg":"math"===k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=s)for(d=0;d<s.length;d++)if((y=s[d])&&"setAttribute"in y==!!k&&(k?y.localName===k:3===y.nodeType)){t=y,s[d]=null;break}if(null==t){if(null===k)return document.createTextNode(_);t=document.createElementNS(o,k,_.is&&_),s=null,l=!1}if(null===k)w===_||l&&t.data===_||(t.data=_);else{if(s=s&&e.call(t.childNodes),w=i.props||u,!l&&null!=s)for(w={},d=0;d<t.attributes.length;d++)w[(y=t.attributes[d]).name]=y.value;for(d in w)if(y=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)p=y;else if("key"!==d&&!(d in _)){if("value"==d&&"defaultValue"in _||"checked"==d&&"defaultChecked"in _)continue;N(t,d,null,y,o)}for(d in _)y=_[d],"children"==d?f=y:"dangerouslySetInnerHTML"==d?h=y:"value"==d?v=y:"checked"==d?b=y:"key"===d||l&&"function"!=typeof y||w[d]===y||N(t,d,y,w[d],o);if(h)l||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),n.__k=[];else if(p&&(t.innerHTML=""),S(t,m(f)?f:[f],n,i,r,"foreignObject"===k?"http://www.w3.org/1999/xhtml":o,s,a,s?s[0]:i.__k&&x(i,0),l,c),null!=s)for(d=s.length;d--;)null!=s[d]&&g(s[d]);l||(d="value",void 0!==v&&(v!==t[d]||"progress"===k&&!v||"option"===k&&v!==w[d])&&N(t,d,v,w[d],o),d="checked",void 0!==b&&b!==t[d]&&N(t,d,b,w[d],o))}return t}(r.__e,i,r,o,s,a,l,d,h);(p=t.diffed)&&p(i)}function M(e,n,i){n.__d=void 0;for(var r=0;r<i.length;r++)O(i[r],i[++r],i[++r]);t.__c&&t.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(i){t.__e(i,n.__v)}}))}function O(e,n,i){try{"function"==typeof e?e(n):e.current=n}catch(r){t.__e(r,i)}}function L(e,n,i){var r,o;if(t.unmount&&t.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,n)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){t.__e(s,n)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&L(r[o],n,i||"function"!=typeof e.type);i||null==e.__e||g(e.__e),e.__c=e.__=e.__e=e.__d=void 0}function V(e,t,n){return this.constructor(e,n)}function j(n,i,r){var o,s,a,l;t.__&&t.__(n,i),s=(o="function"==typeof r)?null:r&&r.__k||i.__k,a=[],l=[],D(i,n=(!o&&r||i).__k=y(b,null,[n]),s||u,u,i.namespaceURI,!o&&r?[r]:s?null:i.firstChild?e.call(i.childNodes):null,a,!o&&r?r:s?s.__e:i.firstChild,o,l),M(a,n,l)}function I(e,t){j(e,t,I)}function U(t,n,i){var r,o,s,a,l=f({},t.props);for(s in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),n)"key"==s?r=n[s]:"ref"==s?o=n[s]:l[s]=void 0===n[s]&&void 0!==a?a[s]:n[s];return arguments.length>2&&(l.children=arguments.length>3?e.call(arguments,2):i),v(t.type,l,r||t.key,o||t.ref,null)}function F(e,t){var n={__c:t="__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,k(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}e=h.slice,t={__e:function(e,t,n,i){for(var r,o,s;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),s=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),s=r.__d),s)return r.__E=r}catch(a){e=a}throw e}},n=0,w.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),k(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},w.prototype.render=b,i=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},T.__r=0,a=0,l=R(!1),c=R(!0),d=0;var B=0;function z(e,n,i,r,o,s){n||(n={});var a,l,c=n;if("ref"in c)for(l in c={},n)"ref"==l?a=n[l]:c[l]=n[l];var d={type:e,props:c,key:i,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--B,__i:-1,__u:0,__source:o,__self:s};if("function"==typeof e&&(a=e.defaultProps))for(l in a)void 0===c[l]&&(c[l]=a[l]);return t.vnode&&t.vnode(d),d}const $="*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size=\"1\"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")}@media(forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")}@media(forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media(forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.z-10{z-index:10}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.col-start-4{grid-column-start:4}.row-span-3{grid-row:span 3 / span 3}.m-4{margin:1rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-9{margin-top:2.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.hidden{display:none}.h-10{height:2.5rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.min-h-full{min-height:100%}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.w-1\\/4{width:25%}.w-12{width:3rem}.w-4{width:1rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-normal{justify-content:normal}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity))}.divide-gray-500>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(107 114 128 / var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity: 1;background-color:rgb(238 242 255 / var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.bg-purple-50{--tw-bg-opacity: 1;background-color:rgb(250 245 255 / var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity: .75}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-4{padding-bottom:1rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.pt-0{padding-top:0}.pt-0\\.5{padding-top:.125rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity: 1;color:rgb(67 56 202 / var(--tw-text-opacity))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity))}.opacity-50{opacity:.5}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity))}.ring-blue-700\\/10{--tw-ring-color: rgb(29 78 216 / .1)}.ring-gray-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity))}.ring-gray-600\\/10{--tw-ring-color: rgb(75 85 99 / .1)}.ring-green-600\\/20{--tw-ring-color: rgb(22 163 74 / .2)}.ring-indigo-700\\/10{--tw-ring-color: rgb(67 56 202 / .1)}.ring-purple-700\\/10{--tw-ring-color: rgb(126 34 206 / .1)}.ring-red-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity))}.ring-red-600\\/10{--tw-ring-color: rgb(220 38 38 / .1)}.ring-yellow-600\\/20{--tw-ring-color: rgb(202 138 4 / .2)}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:border-gray-300:hover{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.hover\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity))}.hover\\:bg-indigo-900:hover{--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity))}.hover\\:bg-red-50:hover{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\\:text-indigo-800:hover{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity))}.hover\\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.hover\\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.focus\\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity))}.focus\\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:640px){.sm\\:col-span-2{grid-column:span 2 / span 2}.sm\\:col-span-3{grid-column:span 3 / span 3}.sm\\:col-start-1{grid-column-start:1}.sm\\:col-start-2{grid-column-start:2}.sm\\:col-start-3{grid-column-start:3}.sm\\:col-start-4{grid-column-start:4}.sm\\:row-start-1{grid-row-start:1}.sm\\:-mx-4{margin-left:-1rem;margin-right:-1rem}.sm\\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\\:mx-0{margin-left:0;margin-right:0}.sm\\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\\:ml-12{margin-left:3rem}.sm\\:ml-3{margin-left:.75rem}.sm\\:ml-4{margin-left:1rem}.sm\\:mt-0{margin-top:0}.sm\\:mt-6{margin-top:1.5rem}.sm\\:flex{display:flex}.sm\\:table-cell{display:table-cell}.sm\\:grid{display:grid}.sm\\:h-10{height:2.5rem}.sm\\:w-1\\/2{width:50%}.sm\\:w-10{width:2.5rem}.sm\\:w-3\\/5{width:60%}.sm\\:w-auto{width:auto}.sm\\:w-full{width:100%}.sm\\:max-w-lg{max-width:32rem}.sm\\:max-w-xs{max-width:20rem}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.sm\\:flex-row-reverse{flex-direction:row-reverse}.sm\\:items-start{align-items:flex-start}.sm\\:items-center{align-items:center}.sm\\:items-baseline{align-items:baseline}.sm\\:justify-center{justify-content:center}.sm\\:gap-10{gap:2.5rem}.sm\\:gap-4{gap:1rem}.sm\\:rounded-lg{border-radius:.5rem}.sm\\:p-0{padding:0}.sm\\:p-6{padding:1.5rem}.sm\\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\\:pb-4{padding-bottom:1rem}.sm\\:pr-6{padding-right:1.5rem}.sm\\:text-left{text-align:left}.sm\\:text-right{text-align:right}.sm\\:text-sm{font-size:.875rem;line-height:1.25rem}}@media(min-width:768px){.md\\:mx-0{margin-left:0;margin-right:0}.md\\:rounded-lg{border-radius:.5rem}}@media(min-width:1024px){.lg\\:table-cell{display:table-cell}}@media(min-width:1280px){.xl\\:table-cell{display:table-cell}}@media(min-width:1536px){.\\32xl\\:table-cell{display:table-cell}}";var H,q,W,K,Y=0,X=[],G=[],J=t,Z=J.__b,Q=J.__r,ee=J.diffed,te=J.__c,ne=J.unmount,ie=J.__;function re(e,t){J.__h&&J.__h(q,e,Y||t),Y=0;var n=q.__H||(q.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:G}),n.__[e]}function oe(e){return Y=1,function(e,t,n){var i=re(H++,2);if(i.t=e,!i.__c&&(i.__=[n?n(t):ve(void 0,t),function(e){var t=i.__N?i.__N[0]:i.__[0],n=i.t(t,e);t!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=q,!q.u)){var r=function(e,t,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(e){return!!e.__c}));if(r.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var s=!1;return r.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}})),!(!s&&i.__c.props===e)&&(!o||o.call(this,e,t,n))};q.u=!0;var o=q.shouldComponentUpdate,s=q.componentWillUpdate;q.componentWillUpdate=function(e,t,n){if(this.__e){var i=o;o=void 0,r(e,t,n),o=i}s&&s.call(this,e,t,n)},q.shouldComponentUpdate=r}return i.__N||i.__}(ve,e)}function se(e,t){var n=re(H++,3);!J.__s&&ye(n.__H,t)&&(n.__=e,n.i=t,q.__H.__h.push(n))}function ae(e,t){var n=re(H++,4);!J.__s&&ye(n.__H,t)&&(n.__=e,n.i=t,q.__h.push(n))}function le(e){return Y=5,ce((function(){return{current:e}}),[])}function ce(e,t){var n=re(H++,7);return ye(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function de(e,t){return Y=8,ce((function(){return e}),t)}function ue(e){var t=q.context[e.__c],n=re(H++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(q)),t.props.value):e.__}function he(){for(var e;e=X.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fe),e.__H.__h.forEach(ge),e.__H.__h=[]}catch(t){e.__H.__h=[],J.__e(t,e.__v)}}J.__b=function(e){q=null,Z&&Z(e)},J.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ie&&ie(e,t)},J.__r=function(e){Q&&Q(e),H=0;var t=(q=e.__c).__H;t&&(W===q?(t.__h=[],q.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=G,e.__N=e.i=void 0}))):(t.__h.forEach(fe),t.__h.forEach(ge),t.__h=[],H=0)),W=q},J.diffed=function(e){ee&&ee(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==X.push(t)&&K===J.requestAnimationFrame||((K=J.requestAnimationFrame)||me)(he)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==G&&(e.__=e.__V),e.i=void 0,e.__V=G}))),W=q=null},J.__c=function(e,t){t.some((function(e){try{e.__h.forEach(fe),e.__h=e.__h.filter((function(e){return!e.__||ge(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],J.__e(n,e.__v)}})),te&&te(e,t)},J.unmount=function(e){ne&&ne(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{fe(e)}catch(n){t=n}})),n.__H=void 0,t&&J.__e(t,n.__v))};var pe="function"==typeof requestAnimationFrame;function me(e){var t,n=function(){clearTimeout(i),pe&&cancelAnimationFrame(t),setTimeout(e)},i=setTimeout(n,100);pe&&(t=requestAnimationFrame(n))}function fe(e){var t=q,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),q=t}function ge(e){var t=q;e.__c=e.__(),q=t}function ye(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function ve(e,t){return"function"==typeof t?t(e):t}const be=function({tabTitles:e,currentTab:t,onChange:n}){const[i,r]=oe(t),o=de((e=>{r(e),n(e)}),[n]);return z("div",{class:"border-b border-gray-200",children:z("nav",{"aria-label":"Tabs",class:"flex space-x-8 ml-2",children:e.map((e=>z("a",{class:"cursor-pointer border-transparent text-gray-500 whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm "+(i===e?"border-b-2 border-indigo-500 text-indigo-600":"hover:text-gray-700 hover:border-gray-300 "),onClick:()=>o(e),children:e},e)))})})};var we=(e=>(e.Assessment="Assessment",e.Quiz="Quiz",e.Poll="Poll",e.Trivia="Trivia",e.Article="Article",e.Url="Url",e.Contact="Contact",e.Deeplink="Deeplink",e.Advertisement="Advertisement",e))(we||{}),xe=(e=>(e.Cars="Cars",e.Health="Health",e.Everyday="Everyday",e.Devices="Devices",e.Energy="Energy",e.SavingsAccount="Savings Account*",e.HomeLoan="Home Loan*",e.MobileAndInternet="Mobile & Internet",e))(xe||{});const _e=e=>{const t=e,n=t.response?.data?t.response.data:void 0;return n?.message??t.message},ke=(e,t=3)=>{const n=e.split(" ");return n.length>t?`${n.slice(0,t).join(" ")}...`:e},Te=(e,t)=>{switch(e){case we.Trivia:return"Trivia";case we.Assessment:switch(t){case xe.Cars:return"SalaryPackagingCars";case xe.HomeLoan:return"HomeLoan"}return t.replace(/\s+/g,"");default:return"None"}},Se=e=>{switch(e){case xe.SavingsAccount:return["Banking"];case xe.Cars:return["Cars"];case xe.Devices:case xe.Health:case xe.Energy:case xe.Everyday:return[e];case"None":return["Miscellaneous"];case xe.HomeLoan:case xe.MobileAndInternet:default:return[]}},Ce=e=>{switch(e){case xe.Cars:return["NovatedLease"];case xe.Health:return["HealthInsurance"];case xe.SavingsAccount:return["SavingsAccount"];case xe.Devices:case xe.Energy:return[e];case xe.HomeLoan:return["HomeLoan"];case xe.MobileAndInternet:case xe.Everyday:default:return[]}},Ae=(e,t,n)=>{const i=e.products[0],r=Ee(e,t);r?r.isFeatured=n??!1:i.activities.push({id:t,isFeatured:n??!1})},Ee=(e,t)=>e.products[0].activities.find((e=>e.id===t));function Pe(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ne}=Object.prototype,{getPrototypeOf:Re}=Object,{iterator:De,toStringTag:Me}=Symbol,Oe=(e=>t=>{const n=Ne.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Le=e=>(e=e.toLowerCase(),t=>Oe(t)===e),Ve=e=>t=>typeof t===e,{isArray:je}=Array,Ie=Ve("undefined");function Ue(e){return null!==e&&!Ie(e)&&null!==e.constructor&&!Ie(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Fe=Le("ArrayBuffer");const Be=Ve("string"),ze=Ve("function"),$e=Ve("number"),He=e=>null!==e&&"object"==typeof e,qe=e=>{if("object"!==Oe(e))return!1;const t=Re(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Me in e||De in e)},We=Le("Date"),Ke=Le("File"),Ye=Le("Blob"),Xe=Le("FileList");const Ge="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},Je=void 0!==Ge.FormData?Ge.FormData:void 0,Ze=Le("URLSearchParams"),[Qe,et,tt,nt]=["ReadableStream","Request","Response","Headers"].map(Le);function it(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let i,r;if("object"!=typeof e&&(e=[e]),je(e))for(i=0,r=e.length;i<r;i++)t.call(null,e[i],i,e);else{if(Ue(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),o=r.length;let s;for(i=0;i<o;i++)s=r[i],t.call(null,e[s],s,e)}}function rt(e,t){if(Ue(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i,r=n.length;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ot="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,st=e=>!Ie(e)&&e!==ot;const at=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&Re(Uint8Array)),lt=Le("HTMLFormElement"),ct=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dt=Le("RegExp"),ut=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};it(n,((n,r)=>{let o;!1!==(o=t(n,r,e))&&(i[r]=o||n)})),Object.defineProperties(e,i)};const ht=Le("AsyncFunction"),pt=(mt="function"==typeof setImmediate,ft=ze(ot.postMessage),mt?setImmediate:ft?(gt=`axios@${Math.random()}`,yt=[],ot.addEventListener("message",(({source:e,data:t})=>{e===ot&&t===gt&&yt.length&&yt.shift()()}),!1),e=>{yt.push(e),ot.postMessage(gt,"*")}):e=>setTimeout(e));var mt,ft,gt,yt;const vt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ot):"undefined"!=typeof process&&process.nextTick||pt,bt={isArray:je,isArrayBuffer:Fe,isBuffer:Ue,isFormData:e=>{let t;return e&&(Je&&e instanceof Je||ze(e.append)&&("formdata"===(t=Oe(e))||"object"===t&&ze(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Fe(e.buffer),t},isString:Be,isNumber:$e,isBoolean:e=>!0===e||!1===e,isObject:He,isPlainObject:qe,isEmptyObject:e=>{if(!He(e)||Ue(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:Qe,isRequest:et,isResponse:tt,isHeaders:nt,isUndefined:Ie,isDate:We,isFile:Ke,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:Ye,isRegExp:dt,isFunction:ze,isStream:e=>He(e)&&ze(e.pipe),isURLSearchParams:Ze,isTypedArray:at,isFileList:Xe,forEach:it,merge:function e(){const{caseless:t,skipUndefined:n}=st(this)&&this||{},i={},r=(r,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;const s=t&&rt(i,o)||o;qe(i[s])&&qe(r)?i[s]=e(i[s],r):qe(r)?i[s]=e({},r):je(r)?i[s]=r.slice():n&&Ie(r)||(i[s]=r)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&it(arguments[o],r);return i},extend:(e,t,n,{allOwnKeys:i}={})=>(it(t,((t,i)=>{n&&ze(t)?Object.defineProperty(e,i,{value:Pe(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,i)=>{let r,o,s;const a={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),o=r.length;o-- >0;)s=r[o],i&&!i(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&Re(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Oe,kindOfTest:Le,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},toArray:e=>{if(!e)return null;if(je(e))return e;let t=e.length;if(!$e(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[De]).call(e);let i;for(;(i=n.next())&&!i.done;){const n=i.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const i=[];for(;null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:lt,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:ut,freezeMethods:e=>{ut(e,((t,n)=>{if(ze(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];ze(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},i=e=>{e.forEach((e=>{n[e]=!0}))};return je(e)?i(e):i(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:rt,global:ot,isContextDefined:st,isSpecCompliantForm:function(e){return!!(e&&ze(e.append)&&"FormData"===e[Me]&&e[De])},toJSONObject:e=>{const t=new Array(10),n=(e,i)=>{if(He(e)){if(t.indexOf(e)>=0)return;if(Ue(e))return e;if(!("toJSON"in e)){t[i]=e;const r=je(e)?[]:{};return it(e,((e,t)=>{const o=n(e,i+1);!Ie(o)&&(r[t]=o)})),t[i]=void 0,r}}return e};return n(e,0)},isAsyncFn:ht,isThenable:e=>e&&(He(e)||ze(e))&&ze(e.then)&&ze(e.catch),setImmediate:pt,asap:vt,isIterable:e=>null!=e&&ze(e[De])};let wt=class e extends Error{static from(t,n,i,r,o,s){const a=new e(t.message,n||t.code,i,r,o);return a.cause=t,a.name=t.name,null!=t.status&&null==a.status&&(a.status=t.status),s&&Object.assign(a,s),a}constructor(e,t,n,i,r){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:bt.toJSONObject(this.config),code:this.code,status:this.status}}};wt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",wt.ERR_BAD_OPTION="ERR_BAD_OPTION",wt.ECONNABORTED="ECONNABORTED",wt.ETIMEDOUT="ETIMEDOUT",wt.ERR_NETWORK="ERR_NETWORK",wt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",wt.ERR_DEPRECATED="ERR_DEPRECATED",wt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",wt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",wt.ERR_CANCELED="ERR_CANCELED",wt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",wt.ERR_INVALID_URL="ERR_INVALID_URL";function xt(e){return bt.isPlainObject(e)||bt.isArray(e)}function _t(e){return bt.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,n){return e?e.concat(t).map((function(e,t){return e=_t(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Tt=bt.toFlatObject(bt,{},null,(function(e){return/^is[A-Z]/.test(e)}));function St(e,t,n){if(!bt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const i=(n=bt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!bt.isUndefined(t[e])}))).metaTokens,r=n.visitor||c,o=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&bt.isSpecCompliantForm(t);if(!bt.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(bt.isDate(e))return e.toISOString();if(bt.isBoolean(e))return e.toString();if(!a&&bt.isBlob(e))throw new wt("Blob is not supported. Use a Buffer instead.");return bt.isArrayBuffer(e)||bt.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,r){let a=e;if(bt.isReactNative(t)&&bt.isReactNativeBlob(e))return t.append(kt(r,n,o),l(e)),!1;if(e&&!r&&"object"==typeof e)if(bt.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(bt.isArray(e)&&function(e){return bt.isArray(e)&&!e.some(xt)}(e)||(bt.isFileList(e)||bt.endsWith(n,"[]"))&&(a=bt.toArray(e)))return n=_t(n),a.forEach((function(e,i){!bt.isUndefined(e)&&null!==e&&t.append(!0===s?kt([n],i,o):null===s?n:n+"[]",l(e))})),!1;return!!xt(e)||(t.append(kt(r,n,o),l(e)),!1)}const d=[],u=Object.assign(Tt,{defaultVisitor:c,convertValue:l,isVisitable:xt});if(!bt.isObject(e))throw new TypeError("data must be an object");return function e(n,i){if(!bt.isUndefined(n)){if(-1!==d.indexOf(n))throw Error("Circular reference detected in "+i.join("."));d.push(n),bt.forEach(n,(function(n,o){!0===(!(bt.isUndefined(n)||null===n)&&r.call(t,n,bt.isString(o)?o.trim():o,i,u))&&e(n,i?i.concat(o):[o])})),d.pop()}}(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function At(e,t){this._pairs=[],e&&St(e,this,t)}const Et=At.prototype;function Pt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Nt(e,t,n){if(!t)return e;const i=n&&n.encode||Pt,r=bt.isFunction(n)?{serialize:n}:n,o=r&&r.serialize;let s;if(s=o?o(t,r):bt.isURLSearchParams(t)?t.toString():new At(t,r).toString(i),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Et.append=function(e,t){this._pairs.push([e,t])},Et.toString=function(e){const t=e?function(t){return e.call(this,t,Ct)}:Ct;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class Rt{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){bt.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Mt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:At,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ot="undefined"!=typeof window&&"undefined"!=typeof document,Lt="object"==typeof navigator&&navigator||void 0,Vt=Ot&&(!Lt||["ReactNative","NativeScript","NS"].indexOf(Lt.product)<0),jt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,It=Ot&&window.location.href||"http://localhost",Ut={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserEnv:Vt,hasStandardBrowserWebWorkerEnv:jt,navigator:Lt,origin:It},Symbol.toStringTag,{value:"Module"})),...Mt};function Ft(e){function t(e,n,i,r){let o=e[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=r>=e.length;if(o=!o&&bt.isArray(i)?i.length:o,a)return bt.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!s;i[o]&&bt.isObject(i[o])||(i[o]=[]);return t(e,n,i[o],r)&&bt.isArray(i[o])&&(i[o]=function(e){const t={},n=Object.keys(e);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],t[o]=e[o];return t}(i[o])),!s}if(bt.isFormData(e)&&bt.isFunction(e.entries)){const n={};return bt.forEachEntry(e,((e,i)=>{t(function(e){return bt.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),i,n,0)})),n}return null}const Bt={transitional:Dt,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,r=bt.isObject(e);r&&bt.isHTMLForm(e)&&(e=new FormData(e));if(bt.isFormData(e))return i?JSON.stringify(Ft(e)):e;if(bt.isArrayBuffer(e)||bt.isBuffer(e)||bt.isStream(e)||bt.isFile(e)||bt.isBlob(e)||bt.isReadableStream(e))return e;if(bt.isArrayBufferView(e))return e.buffer;if(bt.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return St(e,new Ut.classes.URLSearchParams,{visitor:function(e,t,n,i){return Ut.isNode&&bt.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((o=bt.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return St(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||i?(t.setContentType("application/json",!1),function(e,t,n){if(bt.isString(e))try{return(t||JSON.parse)(e),bt.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Bt.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(bt.isResponse(e)||bt.isReadableStream(e))return e;if(e&&bt.isString(e)&&(n&&!this.responseType||i)){const n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(r){if(n){if("SyntaxError"===r.name)throw wt.from(r,wt.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ut.classes.FormData,Blob:Ut.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bt.forEach(["delete","get","head","post","put","patch"],(e=>{Bt.headers[e]={}}));const zt=bt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$t=Symbol("internals");function Ht(e){return e&&String(e).trim().toLowerCase()}function qt(e){return!1===e||null==e?e:bt.isArray(e)?e.map(qt):String(e)}function Wt(e,t,n,i,r){return bt.isFunction(i)?i.call(this,t,n):(r&&(t=n),bt.isString(t)?bt.isString(i)?-1!==t.indexOf(i):bt.isRegExp(i)?i.test(t):void 0:void 0)}let Kt=class{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function r(e,t,n){const r=Ht(t);if(!r)throw new Error("header name must be a non-empty string");const o=bt.findKey(i,r);(!o||void 0===i[o]||!0===n||void 0===n&&!1!==i[o])&&(i[o||t]=qt(e))}const o=(e,t)=>bt.forEach(e,((e,n)=>r(e,n,t)));if(bt.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(bt.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let n,i,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),i=e.substring(r+1).trim(),!n||t[n]&&zt[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t})(e),t);else if(bt.isObject(e)&&bt.isIterable(e)){let n,i,r={};for(const t of e){if(!bt.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?bt.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=Ht(e)){const n=bt.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}(e);if(bt.isFunction(t))return t.call(this,e,n);if(bt.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ht(e)){const n=bt.findKey(this,e);return!(!n||void 0===this[n]||t&&!Wt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function r(e){if(e=Ht(e)){const r=bt.findKey(n,e);!r||t&&!Wt(0,n[r],r,t)||(delete n[r],i=!0)}}return bt.isArray(e)?e.forEach(r):r(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;for(;n--;){const r=t[n];e&&!Wt(0,this[r],r,e,!0)||(delete this[r],i=!0)}return i}normalize(e){const t=this,n={};return bt.forEach(this,((i,r)=>{const o=bt.findKey(n,r);if(o)return t[o]=qt(i),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();s!==r&&delete t[r],t[s]=qt(i),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return bt.forEach(this,((n,i)=>{null!=n&&!1!==n&&(t[i]=e&&bt.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[$t]=this[$t]={accessors:{}}).accessors,n=this.prototype;function i(e){const i=Ht(e);t[i]||(!function(e,t){const n=bt.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+n,{value:function(e,n,r){return this[i].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[i]=!0)}return bt.isArray(e)?e.forEach(i):i(e),this}};function Yt(e,t){const n=this||Bt,i=t||n,r=Kt.from(i.headers);let o=i.data;return bt.forEach(e,(function(e){o=e.call(n,o,r.normalize(),t?t.status:void 0)})),r.normalize(),o}function Xt(e){return!(!e||!e.__CANCEL__)}Kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),bt.reduceDescriptors(Kt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),bt.freezeMethods(Kt);let Gt=class extends wt{constructor(e,t,n){super(null==e?"canceled":e,wt.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Jt(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Zt=(e,t,n=3)=>{let i=0;const r=function(e,t){e=e||10;const n=new Array(e),i=new Array(e);let r,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=i[s];r||(r=l),n[o]=a,i[o]=l;let d=s,u=0;for(;d!==o;)u+=n[d++],d%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-r<t)return;const h=c&&l-c;return h?Math.round(1e3*u/h):void 0}}(50,250);return function(e,t){let n,i,r=0,o=1e3/t;const s=(t,o=Date.now())=>{r=o,n=null,i&&(clearTimeout(i),i=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=o?s(e,t):(n=e,i||(i=setTimeout((()=>{i=null,s(n)}),o-a)))},()=>n&&s(n)]}((n=>{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-i,l=r(a);i=o;e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&o<=s?(s-o)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),n)},Qt=(e,t)=>{const n=null!=e;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},en=e=>(...t)=>bt.asap((()=>e(...t))),tn=Ut.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ut.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ut.origin),Ut.navigator&&/(msie|trident)/i.test(Ut.navigator.userAgent)):()=>!0,nn=Ut.hasStandardBrowserEnv?{write(e,t,n,i,r,o,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];bt.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),bt.isString(i)&&a.push(`path=${i}`),bt.isString(r)&&a.push(`domain=${r}`),!0===o&&a.push("secure"),bt.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function rn(e,t,n){let i=!("string"==typeof(r=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r));var r;return e&&(i||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const on=e=>e instanceof Kt?{...e}:e;function sn(e,t){t=t||{};const n={};function i(e,t,n,i){return bt.isPlainObject(e)&&bt.isPlainObject(t)?bt.merge.call({caseless:i},e,t):bt.isPlainObject(t)?bt.merge({},t):bt.isArray(t)?t.slice():t}function r(e,t,n,r){return bt.isUndefined(t)?bt.isUndefined(e)?void 0:i(void 0,e,0,r):i(e,t,0,r)}function o(e,t){if(!bt.isUndefined(t))return i(void 0,t)}function s(e,t){return bt.isUndefined(t)?bt.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function a(n,r,o){return o in t?i(n,r):o in e?i(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>r(on(e),on(t),0,!0)};return bt.forEach(Object.keys({...e,...t}),(function(i){if("__proto__"===i||"constructor"===i||"prototype"===i)return;const o=bt.hasOwnProp(l,i)?l[i]:r,s=o(e[i],t[i],i);bt.isUndefined(s)&&o!==a||(n[i]=s)})),n}const an=e=>{const t=sn({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=Kt.from(s),t.url=Nt(rn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),bt.isFormData(n))if(Ut.hasStandardBrowserEnv||Ut.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(bt.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)}))}if(Ut.hasStandardBrowserEnv&&(i&&bt.isFunction(i)&&(i=i(t)),i||!1!==i&&tn(t.url))){const e=r&&o&&nn.read(o);e&&s.set(r,e)}return t},ln="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const i=an(e);let r=i.data;const o=Kt.from(i.headers).normalize();let s,a,l,c,d,{responseType:u,onUploadProgress:h,onDownloadProgress:p}=i;function m(){c&&c(),d&&d(),i.cancelToken&&i.cancelToken.unsubscribe(s),i.signal&&i.signal.removeEventListener("abort",s)}let f=new XMLHttpRequest;function g(){if(!f)return;const i=Kt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());Jt((function(e){t(e),m()}),(function(e){n(e),m()}),{data:u&&"text"!==u&&"json"!==u?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:e,request:f}),f=null}f.open(i.method.toUpperCase(),i.url,!0),f.timeout=i.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(n(new wt("Request aborted",wt.ECONNABORTED,e,f)),f=null)},f.onerror=function(t){const i=t&&t.message?t.message:"Network Error",r=new wt(i,wt.ERR_NETWORK,e,f);r.event=t||null,n(r),f=null},f.ontimeout=function(){let t=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const r=i.transitional||Dt;i.timeoutErrorMessage&&(t=i.timeoutErrorMessage),n(new wt(t,r.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,e,f)),f=null},void 0===r&&o.setContentType(null),"setRequestHeader"in f&&bt.forEach(o.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),bt.isUndefined(i.withCredentials)||(f.withCredentials=!!i.withCredentials),u&&"json"!==u&&(f.responseType=i.responseType),p&&([l,d]=Zt(p,!0),f.addEventListener("progress",l)),h&&f.upload&&([a,c]=Zt(h),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",c)),(i.cancelToken||i.signal)&&(s=t=>{f&&(n(!t||t.type?new Gt(null,e,f):t),f.abort(),f=null)},i.cancelToken&&i.cancelToken.subscribe(s),i.signal&&(i.signal.aborted?s():i.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(i.url);y&&-1===Ut.protocols.indexOf(y)?n(new wt("Unsupported protocol "+y+":",wt.ERR_BAD_REQUEST,e)):f.send(r||null)}))},cn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,i=new AbortController;const r=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;i.abort(t instanceof wt?t:new Gt(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,r(new wt(`timeout of ${t}ms exceeded`,wt.ETIMEDOUT))}),t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)})),e=null)};e.forEach((e=>e.addEventListener("abort",r)));const{signal:a}=i;return a.unsubscribe=()=>bt.asap(s),a}},dn=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let i,r=0;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},un=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},hn=(e,t,n,i)=>{const r=async function*(e,t){for await(const n of un(e))yield*dn(n,t)}(e,t);let o,s=0,a=e=>{o||(o=!0,i&&i(e))};return new ReadableStream({async pull(e){try{const{done:t,value:i}=await r.next();if(t)return a(),void e.close();let o=i.byteLength;if(n){let e=s+=o;n(e)}e.enqueue(new Uint8Array(i))}catch(t){throw a(t),t}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:pn}=bt,mn=(({Request:e,Response:t})=>({Request:e,Response:t}))(bt.global),{ReadableStream:fn,TextEncoder:gn}=bt.global,yn=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},vn=e=>{e=bt.merge.call({skipUndefined:!0},mn,e);const{fetch:t,Request:n,Response:i}=e,r=t?pn(t):"function"==typeof fetch,o=pn(n),s=pn(i);if(!r)return!1;const a=r&&pn(fn),l=r&&("function"==typeof gn?(e=>t=>e.encode(t))(new gn):async e=>new Uint8Array(await new n(e).arrayBuffer())),c=o&&a&&yn((()=>{let e=!1;const t=new n(Ut.origin,{body:new fn,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),d=s&&a&&yn((()=>bt.isReadableStream(new i("").body))),u={stream:d&&(e=>e.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!u[e]&&(u[e]=(t,n)=>{let i=t&&t[e];if(i)return i.call(t);throw new wt(`Response type '${e}' is not supported`,wt.ERR_NOT_SUPPORT,n)})}));const h=async(e,t)=>{const i=bt.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(bt.isBlob(e))return e.size;if(bt.isSpecCompliantForm(e)){const t=new n(Ut.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return bt.isArrayBufferView(e)||bt.isArrayBuffer(e)?e.byteLength:(bt.isURLSearchParams(e)&&(e+=""),bt.isString(e)?(await l(e)).byteLength:void 0)})(t):i};return async e=>{let{url:r,method:s,data:a,signal:l,cancelToken:p,timeout:m,onDownloadProgress:f,onUploadProgress:g,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:w}=an(e),x=t||fetch;y=y?(y+"").toLowerCase():"text";let _=cn([l,p&&p.toAbortSignal()],m),k=null;const T=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let S;try{if(g&&c&&"get"!==s&&"head"!==s&&0!==(S=await h(v,a))){let e,t=new n(r,{method:"POST",body:a,duplex:"half"});if(bt.isFormData(a)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=Qt(S,Zt(en(g)));a=hn(t.body,65536,e,n)}}bt.isString(b)||(b=b?"include":"omit");const t=o&&"credentials"in n.prototype,l={...w,signal:_,method:s.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};k=o&&new n(r,l);let p=await(o?x(k,w):x(r,l));const m=d&&("stream"===y||"response"===y);if(d&&(f||m&&T)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=p[t]}));const t=bt.toFiniteNumber(p.headers.get("content-length")),[n,r]=f&&Qt(t,Zt(en(f),!0))||[];p=new i(hn(p.body,65536,n,(()=>{r&&r(),T&&T()})),e)}y=y||"text";let C=await u[bt.findKey(u,y)||"text"](p,e);return!m&&T&&T(),await new Promise(((t,n)=>{Jt(t,n,{data:C,headers:Kt.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:k})}))}catch(C){if(T&&T(),C&&"TypeError"===C.name&&/Load failed|fetch/i.test(C.message))throw Object.assign(new wt("Network Error",wt.ERR_NETWORK,e,k,C&&C.response),{cause:C.cause||C});throw wt.from(C,C&&C.code,e,k,C&&C.response)}}},bn=new Map,wn=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:r}=t,o=[i,r,n];let s,a,l=o.length,c=bn;for(;l--;)s=o[l],a=c.get(s),void 0===a&&c.set(s,a=l?new Map:vn(t)),c=a;return a};wn();const xn={http:null,xhr:ln,fetch:{get:wn}};bt.forEach(xn,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const _n=e=>`- ${e}`,kn=e=>bt.isFunction(e)||null===e||!1===e;const Tn={getAdapter:function(e,t){e=bt.isArray(e)?e:[e];const{length:n}=e;let i,r;const o={};for(let s=0;s<n;s++){let n;if(i=e[s],r=i,!kn(i)&&(r=xn[(n=String(i)).toLowerCase()],void 0===r))throw new wt(`Unknown adapter '${n}'`);if(r&&(bt.isFunction(r)||(r=r.get(t))))break;o[n||"#"+s]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(_n).join("\n"):" "+_n(e[0]):"as no adapter specified";throw new wt("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r},adapters:xn};function Sn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gt(null,e)}function Cn(e){Sn(e),e.headers=Kt.from(e.headers),e.data=Yt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Tn.getAdapter(e.adapter||Bt.adapter,e)(e).then((function(t){return Sn(e),t.data=Yt.call(e,e.transformResponse,t),t.headers=Kt.from(t.headers),t}),(function(t){return Xt(t)||(Sn(e),t&&t.response&&(t.response.data=Yt.call(e,e.transformResponse,t.response),t.response.headers=Kt.from(t.response.headers))),Promise.reject(t)}))}const An="1.13.6",En={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{En[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Pn={};En.transitional=function(e,t,n){function i(e,t){return"[Axios v"+An+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,o)=>{if(!1===e)throw new wt(i(r," has been removed"+(t?" in "+t:"")),wt.ERR_DEPRECATED);return t&&!Pn[r]&&(Pn[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},En.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Nn={assertOptions:function(e,t,n){if("object"!=typeof e)throw new wt("options must be an object",wt.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const o=i[r],s=t[o];if(s){const t=e[o],n=void 0===t||s(t,o,e);if(!0!==n)throw new wt("option "+o+" must be "+n,wt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new wt("Unknown option "+o,wt.ERR_BAD_OPTION)}},validators:En},Rn=Nn.validators;let Dn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Rt,response:new Rt}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(i){}}throw n}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=sn(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:r}=t;void 0!==n&&Nn.assertOptions(n,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean),legacyInterceptorReqResOrdering:Rn.transitional(Rn.boolean)},!1),null!=i&&(bt.isFunction(i)?t.paramsSerializer={serialize:i}:Nn.assertOptions(i,{encode:Rn.function,serialize:Rn.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Nn.assertOptions(t,{baseUrl:Rn.spelling("baseURL"),withXsrfToken:Rn.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=r&&bt.merge(r.common,r[t.method]);r&&bt.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete r[e]})),t.headers=Kt.concat(o,r);const s=[];let a=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||Dt;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let d,u=0;if(!a){const e=[Cn.bind(this),void 0];for(e.unshift(...s),e.push(...l),d=e.length,c=Promise.resolve(t);u<d;)c=c.then(e[u++],e[u++]);return c}d=s.length;let h=t;for(;u<d;){const e=s[u++],t=s[u++];try{h=e(h)}catch(p){t.call(this,p);break}}try{c=Cn.call(this,h)}catch(p){return Promise.reject(p)}for(u=0,d=l.length;u<d;)c=c.then(l[u++],l[u++]);return c}getUri(e){return Nt(rn((e=sn(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};bt.forEach(["delete","get","head","options"],(function(e){Dn.prototype[e]=function(t,n){return this.request(sn(n||{},{method:e,url:t,data:(n||{}).data}))}})),bt.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,r){return this.request(sn(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Dn.prototype[e]=t(),Dn.prototype[e+"Form"]=t(!0)}));const Mn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Mn).forEach((([e,t])=>{Mn[t]=e}));const On=function e(t){const n=new Dn(t),i=Pe(Dn.prototype.request,n);return bt.extend(i,Dn.prototype,n,{allOwnKeys:!0}),bt.extend(i,n,null,{allOwnKeys:!0}),i.create=function(n){return e(sn(t,n))},i}(Bt);On.Axios=Dn,On.CanceledError=Gt,On.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,r){n.reason||(n.reason=new Gt(e,i,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}},On.isCancel=Xt,On.VERSION=An,On.toFormData=St,On.AxiosError=wt,On.Cancel=On.CanceledError,On.all=function(e){return Promise.all(e)},On.spread=function(e){return function(t){return e.apply(null,t)}},On.isAxiosError=function(e){return bt.isObject(e)&&!0===e.isAxiosError},On.mergeConfig=sn,On.AxiosHeaders=Kt,On.formToJSON=e=>Ft(bt.isHTMLForm(e)?new FormData(e):e),On.getAdapter=Tn.getAdapter,On.HttpStatusCode=Mn,On.default=On;const{Axios:Ln,AxiosError:Vn,CanceledError:jn,isCancel:In,CancelToken:Un,VERSION:Fn,all:Bn,Cancel:zn,isAxiosError:$n,spread:Hn,toFormData:qn,AxiosHeaders:Wn,HttpStatusCode:Kn,formToJSON:Yn,getAdapter:Xn,mergeConfig:Gn}=On;let Jn,Zn,Qn;const ei=e=>(e.params={...e.params??{},source:"Admin",channel:"admin"},e),ti=(e,t,n)=>{const i=`${e}/${n}`,r=On.create({baseURL:i,headers:{Authorization:`Bearer ${t}`}});switch(r.interceptors.request.use(ei),n){case"customer-profile":Jn=r;break;case"flare-app-identity":Zn=r;break;case"benefits-plan":Qn=r}return r},ni=async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.put(`/_admin/v1.0/categories/${e}`,t)},ii=async(e,t,n,i)=>{if(!Qn)throw new Error("Api has not been initialized");try{if(await Qn.put(`/_admin/v1.0/activities/${e}`,t),n){const t=Ee(n,e);if(t?.isFeatured!==i){Ae(n,e,i??!1);const t=n;await ni(n.id,t)}}}catch(r){throw new Error(`${_e(r)}`)}},ri=e=>{const[t,n]=oe(!1),i=le(),r=de((async t=>{try{const n=e.find((e=>e.id===t));if(!n)throw new Error("Category not found");const i={title:n.title,subtitle:n.subtitle,iconUrl:n.iconUrl,enabled:!n.enabled,displayOrder:n.displayOrder,products:n.products};await ni(t,i)}catch(i){throw new Error(`Failed to update category visibility. Error: ${_e(i)}`)}finally{n(!1)}}),[e]),o=de((async e=>{try{await(async e=>{if(!Qn)throw new Error("Api has not been initialized");return await Qn.post("/_admin/v1.0/categories",e)})(e)}catch(t){throw new Error(`${_e(t)}`)}}),[]),s=de((async(e,t)=>{try{await ni(e,t)}catch(n){throw new Error(`${_e(n)}`)}}),[]);return{isModalOpen:t,handleAction:de((async e=>{switch(e.type){case"updateVisibility":i.current=e.categoryId,n(!0);break;case"updateCategory":await s(e.categoryId,e.category);break;case"createCategory":await o(e.category);break;default:console.error(`Unhandled action type: ${e}`)}}),[o,s]),handleModalConfirm:de((async()=>{i.current&&await r(i.current)}),[r]),handleModalCancel:de((()=>{n(!1)}),[])}};for(var oi,si=[],ai=0;ai<256;++ai)si.push((ai+256).toString(16).slice(1));var li=new Uint8Array(16);function ci(){if(!oi&&!(oi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(li)}const di={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ui(e,t,n){if(di.randomUUID&&!e)return di.randomUUID();var i=(e=e||{}).random||(e.rng||ci)();return i[6]=15&i[6]|64,i[8]=63&i[8]|128,function(e,t=0){return(si[e[t+0]]+si[e[t+1]]+si[e[t+2]]+si[e[t+3]]+"-"+si[e[t+4]]+si[e[t+5]]+"-"+si[e[t+6]]+si[e[t+7]]+"-"+si[e[t+8]]+si[e[t+9]]+"-"+si[e[t+10]]+si[e[t+11]]+si[e[t+12]]+si[e[t+13]]+si[e[t+14]]+si[e[t+15]]).toLowerCase()}(i)}const hi=({title:e,children:t})=>z("div",{className:"mt-2",children:[z("div",{className:"mt-9",children:z("h1",{className:"text-2xl font-semibold text-gray-900",children:e})}),z("div",{className:"w-1/2",children:t})]}),pi=({formFields:e,formData:t,isSubmitting:n,formMode:i,messages:r,categoryId:o,handleInputChange:s})=>z(b,{children:[e.map((e=>e.display&&!e.display(o)?null:z(b,{children:[z("label",{className:"sm:col-start-1",children:e.label}),z("input",{className:"sm:col-start-2 sm:col-span-3 block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm "+("checkbox"===e.type?"w-6 h-full":""),type:e.type,name:e.name,value:(e.type,t[e.name]),checked:"checkbox"===e.type?!!t[e.name]:void 0,disabled:e.disabled&&e.disabled(i.mode),required:e.isRequired,onChange:s})]},e.name))),z("div",{className:"sm:col-start-4 flex justify-end",children:z("button",{className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",type:"submit",disabled:n,children:"create"===i.mode?"Create":"Update"})}),z("div",{className:"sm:col-start-1 sm:col-span-3 text-left",children:r.map(((e,t)=>z("div",{className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600 cursor-pointer"),children:e.text},t)))})]}),mi={categoryId:"",title:"",subtitle:"",iconUrl:"",displayOrder:0},fi=[{name:"categoryId",isRequired:!1,label:"Category Id",type:"text",disabled:e=>"update"==e},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"subtitle",isRequired:!0,label:"Sub Title",type:"text"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"displayOrder",isRequired:!1,label:"Display Order",type:"number"}],gi=({formMode:e,onChange:t})=>{const{isSubmitting:n,messages:i,formData:r,handleSubmit:o,handleInputChange:s}=((e,t)=>{const[n,i]=oe(!1),[r,o]=oe([]),[s,a]=oe(mi),{handleAction:l}=ri([]);se((()=>{if("update"===e.mode){const t={categoryId:e.initialCategory.id,title:e.initialCategory.title,subtitle:e.initialCategory.subtitle,iconUrl:e.initialCategory.iconUrl,displayOrder:e.initialCategory.displayOrder};a(t)}}),[e]);const c=de(((e,t)=>{o((n=>[...n,{text:e,type:t}]))}),[]),d=de((()=>{a({...mi})}),[]),u=de((()=>{let e=!0;for(const t of fi)!t.isRequired||"text"!==t.type||s[t.name]&&""!==s[t.name].toString().trim()||(c(`${t.label} is required.`,"error"),e=!1);return e}),[s,c]),h=de((()=>({...s,enabled:!1,products:[{id:ui(),title:s.title,description:s.subtitle,enabled:!0,iconUrl:s.iconUrl,activities:[]}]})),[s]),p=de((e=>({...s,enabled:e.enabled,products:e.products})),[s]);return{isSubmitting:n,messages:r,formData:s,setMessages:o,handleSubmit:async n=>{if(n.preventDefault(),i(!0),o([]),u())try{if("create"===e.mode){const e=h();await l({type:"createCategory",category:e})}if("update"===e.mode){const t=p(e.initialCategory);await l({type:"updateCategory",categoryId:e.initialCategory.id,category:t})}c(`Category successfully ${"create"===e.mode?"created":"updated"}.`,"success"),d(),t()}catch(r){c(`Error ${"create"===e.mode?"adding":"updating"} category: ${r}`,"error")}finally{i(!1)}else i(!1)},handleInputChange:e=>{const t=e.target,{name:n,value:i,type:r}=t;a((e=>({...e,[n]:"number"===r?Number(i):i})))}}})(e,t),a="create"===e.mode?"New Benefits Plan Category":"Update Benefits Plan Category";return z(hi,{title:a,children:z("form",{onSubmit:o,children:z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline sm:gap-10 mt-8",children:z(pi,{formMode:e,formFields:fi,formData:r,isSubmitting:n,messages:i,handleInputChange:s})})})})},yi=({disabled:e,children:t,onClick:n,...i})=>{const[r,o]=oe(!1);return z("button",{disabled:e||r,onClick:async()=>{if(n&&!r){o(!0);try{await n()}catch(e){console.error("Error executing promise:",e)}finally{o(!1)}}},type:"submit",...i,children:t})};function vi(e,t){for(var n in t)e[n]=t[n];return e}function bi(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var i in t)if("__source"!==i&&e[i]!==t[i])return!0;return!1}function wi(e,t){this.props=e,this.context=t}(wi.prototype=new w).isPureReactComponent=!0,wi.prototype.shouldComponentUpdate=function(e,t){return bi(this.props,e)||bi(this.state,t)};var xi=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),xi&&xi(e)};var _i="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var ki=t.__e;t.__e=function(e,t,n,i){if(e.then)for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t);ki(e,t,n,i)};var Ti=t.unmount;function Si(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=vi({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Si(e,t,n)}))),e}function Ci(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ci(e,t,n)})),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Ai(){this.__u=0,this.t=null,this.__b=null}function Ei(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Pi(){this.u=null,this.o=null}t.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ti&&Ti(e)},(Ai.prototype=new w).__c=function(e,t){var n=t.__c,i=this;null==i.t&&(i.t=[]),i.t.push(n);var r=Ei(i.__v),o=!1,s=function(){o||(o=!0,n.__R=null,r?r(a):a())};n.__R=s;var a=function(){if(! --i.__u){if(i.state.__a){var e=i.state.__a;i.__v.__k[0]=Ci(e,e.__c.__P,e.__c.__O)}var t;for(i.setState({__a:i.__b=null});t=i.t.pop();)t.forceUpdate()}};i.__u++||32&t.__u||i.setState({__a:i.__b=i.__v.__k[0]}),e.then(s,s)},Ai.prototype.componentWillUnmount=function(){this.t=[]},Ai.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Si(this.__b,n,i.__O=i.__P)}this.__b=null}var r=t.__a&&y(b,null,e.fallback);return r&&(r.__u&=-33),[y(b,null,t.__a?null:e.children),r]};var Ni=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};(Pi.prototype=new w).__a=function(e){var t=this,n=Ei(t.__v),i=t.o.get(e);return i[0]++,function(r){var o=function(){t.props.revealOrder?(i.push(r),Ni(t,e,i)):r()};n?n(o):o()}},Pi.prototype.render=function(e){this.u=null,this.o=new Map;var t=A(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Pi.prototype.componentDidUpdate=Pi.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){Ni(e,n,t)}))};var Ri="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Di=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Mi=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Oi=/[A-Z0-9]/g,Li="undefined"!=typeof document,Vi=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};w.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(w.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var ji=t.event;function Ii(){}function Ui(){return this.cancelBubble}function Fi(){return this.defaultPrevented}t.event=function(e){return ji&&(e=ji(e)),e.persist=Ii,e.isPropagationStopped=Ui,e.isDefaultPrevented=Fi,e.nativeEvent=e};var Bi={enumerable:!1,configurable:!0,get:function(){return this.class}},zi=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,i={};for(var r in t){var o=t[r];if(!("value"===r&&"defaultValue"in t&&null==o||Li&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var s=r.toLowerCase();"defaultValue"===r&&"value"in t&&null==t.value?r="value":"download"===r&&!0===o?o="":"translate"===s&&"no"===o?o=!1:"ondoubleclick"===s?r="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||Vi(t.type)?"onfocus"===s?r="onfocusin":"onblur"===s?r="onfocusout":Mi.test(r)?r=s:-1===n.indexOf("-")&&Di.test(r)?r=r.replace(Oi,"-$&").toLowerCase():null===o&&(o=void 0):s=r="oninput","oninput"===s&&i[r=s]&&(r="oninputCapture"),i[r]=o}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=A(t.children).forEach((function(e){e.props.selected=-1!=i.value.indexOf(e.props.value)}))),"select"==n&&null!=i.defaultValue&&(i.value=A(t.children).forEach((function(e){e.props.selected=i.multiple?-1!=i.defaultValue.indexOf(e.props.value):i.defaultValue==e.props.value}))),t.class&&!t.className?(i.class=t.class,Object.defineProperty(i,"className",Bi)):(t.className&&!t.class||t.class&&t.className)&&(i.class=i.className=t.className),e.props=i}(e),e.$$typeof=Ri,zi&&zi(e)};var $i=t.__r;t.__r=function(e){$i&&$i(e),e.__c};var Hi=t.diffed;t.diffed=function(e){Hi&&Hi(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var qi=ae;const Wi=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"})),Ki=({isOpen:e,heading:t,message:n,onConfirm:i,onCancel:r})=>e?z("div",{className:"relative z-10","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",children:[z("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),z("div",{className:"fixed inset-0 z-10 w-screen overflow-y-auto",children:z("div",{className:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0",children:z("div",{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[z("div",{className:"bg-white px-4 pb-4 pt-5 sm:p-6 sm:pb-4",children:z("div",{className:"sm:flex sm:items-start",children:[z("div",{className:"mx-auto flex h-10 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10",children:z(Wi,{className:"h-6 w-6 text-red-600"})}),z("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[z("h1",{className:"text-base font-semibold leading-6 text-gray-900",id:"modal-title",children:t}),z("div",{className:"mt-2",children:z("p",{className:"text-sm text-gray-500",children:n})})]})]})}),z("div",{className:"bg-gray-50 px-4 py-3 sm:flex sm:flex-row-reverse sm:px-6",children:[z(yi,{onClick:i,className:"inline-flex w-full justify-center rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 sm:ml-3 sm:w-auto cursor-pointer",children:"Confirm"}),z("button",{className:"mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto cursor-pointer",onClick:r,children:"Cancel"})]})]})})})]}):null,Yi=({headers:e,renderTableRows:t})=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-20",children:e.map((e=>z("th",{scope:"col",className:e.className,children:e.name},e.name)))})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:t()})]})})}),Xi=({error:e,isModalOpen:t,modalHeading:n,modalTitle:i,tableHeaders:r,headingText:o,buttonText:s,filterElement:a,onCreateButton:l,onModalConfirm:c,renderTableRows:d,handleModalCancel:u})=>z(b,{children:[z("div",{className:"p-4 text-red-700",children:e}),!e&&z("div",{className:"m-4",children:[z("div",{className:"flex items-center",children:[z("div",{className:"flex-auto",children:z("h1",{className:"text-base font-semibold leading-6 text-gray-900",children:o})}),z("div",{className:"ml-16 mt-0 flex-none",children:z("button",{type:"button",className:"block rounded-md bg-indigo-500 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:l,children:s})})]}),a,z(Yi,{headers:r,renderTableRows:d})]}),z(Ki,{isOpen:t,heading:n,message:i,onConfirm:c,onCancel:u})]}),Gi=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"#6366F1",className:"size-6",...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})),Ji=({onClick:e,children:t})=>z("div",{className:"mt-4",children:z("div",{className:"flex justify-normal",children:[z("span",{onClick:e,children:z(Gi,{className:"h-6 w-6 border-0 cursor-pointer"})}),z("label",{className:"block text-sm font-bold text-gray-700 pt-0.5 ml-1",children:t})]})}),Zi=({buttonName:e,onClick:t,children:n})=>z(b,{children:[z(Ji,{onClick:t,children:e}),n]}),Qi=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:table-cell"},{name:"Subtitle",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Activities",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Order",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],er=e=>{const[t,n]=oe(null),[i,r]=oe({mode:"view"}),{isModalOpen:o,handleAction:s,handleModalConfirm:a,handleModalCancel:l}=ri(e.categories);return z(b,{children:["view"===i.mode&&z(Xi,{error:t,isModalOpen:o,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this category in the app?",tableHeaders:Qi,headingText:"Benefits Plan Categories",buttonText:"New Category",onModalConfirm:async()=>{try{await a(),e.onChange()}catch(t){n(`${t}`)}},handleModalCancel:l,renderTableRows:()=>z(b,{children:e.categories.map((e=>{const t=e.products.reduce(((e,t)=>e+t.activities.length),0);return z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 items-center justify-center sm:table-cell",children:z("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.title}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:e.subtitle}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:t}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.displayOrder}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{r({mode:"update",itemId:e.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>(async e=>{await s({type:"updateVisibility",categoryId:e})})(e.id),children:e.enabled?"Disable":"Enable"})})})]},e.id)}))}),onCreateButton:()=>r({mode:"create"})}),"view"!==i.mode&&z(Zi,{buttonName:"Benefits Plan Categories",onClick:()=>{r({mode:"view"})},children:z(gi,{formMode:"create"===i.mode?{mode:"create"}:{mode:"update",initialCategory:e.categories.find((e=>"update"===i.mode&&e.id===i.itemId))},onChange:e.onChange})})]})},tr=({visible:e,children:t})=>{const n=le(e);return e&&!n.current&&(n.current=!0),n.current?z("div",{hidden:!e,children:t}):null},nr=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2.5,stroke:"black",height:32,width:32,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})),ir=()=>{const[e,t]=oe(!1),[n,i]=oe([]),[r,o]=oe(!1),s=le([]),a=le(),l=de((async e=>{t(!0),s.current=e;try{const t=await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/activities")).data})(),n=rr(e,t);i(n)}catch(n){throw new Error(`Failed to load activities. Error: ${_e(n)}`)}finally{t(!1)}}),[]),c=de((async e=>{t(!0);try{const t=await(async e=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${e}`)).data})(e);t.enabled=!t.enabled,await ii(e,t)}catch(n){throw new Error(`Failed to update activity visibility. Error: ${_e(n)}`)}finally{t(!1)}}),[]);return{activities:n,isLoading:e,isModalOpen:r,loadActivities:l,handleAction:de((async e=>{switch(e.type){case"updateVisibility":a.current=e.activityId,o(!0);break;case"updateActivity":await ii(e.activityId,e.activity,e.selectedCategory,e.isFeaturedActivity);break;case"createActivity":await(async(e,t,n)=>{if(!Qn)throw new Error("Api has not been initialized");try{const i=await Qn.post("/_admin/v1.0/activities",e);if(t){Ae(t,i.data.id,n??!1);const e=t;await ni(t.id,e)}}catch(i){throw new Error(`${_e(i)}`)}})(e.activity,e.selectedCategory,e.isFeaturedActivity);break;default:console.error(`Unhandled action type: ${e}`)}}),[]),handleModalConfirm:de((async()=>{a.current&&(await c(a.current),o(!1))}),[c]),handleModalCancel:de((()=>{o(!1)}),[])}},rr=(e,t)=>{const n=or(e);return t.map((e=>({...e,category:n.get(e.id)?.find((()=>!0))})))},or=e=>{const t=sr(e),n=new Map;return t.forEach((({activity:e,categoryId:t,categoryTitle:i})=>{const r=e.id;n.has(r)||n.set(r,[]);const o=n.get(r);o.some((e=>e.id===t))||o.push({id:t,title:i,isFeatured:e.isFeatured})})),n},sr=e=>e.flatMap((e=>e.products.flatMap((t=>t.activities.map((t=>({activity:t,categoryId:e.id,categoryTitle:e.title}))))))),ar="None",lr=[{name:"activityId",isRequired:!1,label:"Activity Id",type:"text",disabled:e=>"update"==e},{name:"title",isRequired:!0,label:"Title",type:"text"},{name:"description",isRequired:!0,label:"Sub Title",type:"text"},{name:"points",isRequired:!0,label:"Points",type:"number"},{name:"iconUrl",isRequired:!0,label:"Icon Url",type:"text"},{name:"isFeatured",isRequired:!1,label:"Is Featured",type:"checkbox",display:e=>e!==ar}],cr=[{activityType:we.Advertisement,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:we.Article,formFields:[{name:"articleId",isRequired:!0,label:"Article Id",type:"text"}]},{activityType:we.Assessment,formFields:[{name:"bannerUrl",isRequired:!0,label:"Banner Url",type:"text"},{name:"buttonText",isRequired:!0,label:"Button Text",type:"text"},{name:"primaryLabel",isRequired:!0,label:"Primary Label",type:"text"},{name:"secondaryLabel",isRequired:!0,label:"Secondary label",type:"text"},{name:"allowanceProductId",isRequired:!1,label:"Allowance Product Id",type:"text"}]},{activityType:we.Url,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]},{activityType:we.Deeplink,formFields:[{name:"url",isRequired:!0,label:"Url",type:"text"}]}],dr={activityId:"",title:"",description:"",points:0,iconUrl:"",url:"",articleId:"",bannerUrl:"",buttonText:"",primaryLabel:"",secondaryLabel:"",isFeatured:!1,allowanceProductId:""},ur=({formMode:e,categories:t,onChange:n})=>{const{isSubmitting:i,messages:r,formData:o,selectedActivityType:s,currentFormFields:a,selectedCategory:l,handleSubmit:c,handleInputChange:d,handleActivityTypeChange:u,handleCategoryChange:h}=((e,t,n)=>{const[i,r]=oe(we.Article),[o,s]=oe({id:ar,title:ar}),[a,l]=oe([]),[c,d]=oe(!1),[u,h]=oe(dr),{handleAction:p}=ir(),m=ce((()=>[...lr,...cr.find((e=>e.activityType===i))?.formFields||[]]),[i]),f=de(((e,t)=>{l((n=>[...n,{text:e,type:t}]))}),[]);se((()=>{if("update"===e.mode){const t=e.initialActivity,n={activityId:t.id,title:t.title,points:t.points,description:t.description,iconUrl:t.iconUrl,url:t.url,articleId:t.articleId,bannerUrl:t.bannerUrl,buttonText:t.buttonText,primaryLabel:t.estimateLabel?.primaryLabel,secondaryLabel:t.estimateLabel?.secondaryLabel,isFeatured:t.category?.isFeatured,allowanceProductId:t.allowanceProductId};h({...n}),r(t.activityType),s(t.category??{id:ar,title:ar})}}),[e]);const g=de((()=>{h({...dr}),r(we.Article),s({id:ar,title:ar})}),[]),y=de((()=>{let e=!0;for(const t of m){const n=u[t.name];!t.isRequired||"text"!==t.type||n&&""!==n.toString().trim()||(f(`${t.label} is required.`,"error"),e=!1)}return e}),[f,m,u]),v=async()=>{const{url:e,articleId:n,bannerUrl:r,buttonText:s,primaryLabel:a,secondaryLabel:l,isFeatured:c,allowanceProductId:d}=u,h={...u,activityType:i,calculationType:Te(i,o.title),enabled:!1,savingsInCents:0,configurationTags:Ce(o.title),tags:Se(o.title),estimateLabel:a?{primaryLabel:a,secondaryLabel:l}:void 0,url:e||void 0,articleId:n||void 0,bannerUrl:r||void 0,buttonText:s||void 0,allowanceProductId:d?.trim()?d.trim():void 0};let m;o.title!==ar&&(m=t.find((e=>e.id===o.id)));try{await p({type:"createActivity",activity:h,selectedCategory:m,isFeaturedActivity:c}),f("Activity successfully created.","success"),g()}catch(y){throw f(`Error creating activity: ${y}`,"error"),y}},b=async e=>{const{primaryLabel:n,secondaryLabel:i,isFeatured:r,allowanceProductId:s}=u,a={...e,...u,estimateLabel:n?{primaryLabel:n,secondaryLabel:i}:void 0,allowanceProductId:s?.trim()?s.trim():void 0};let l;o.title!==ar&&(l=t.find((e=>e.id===o.id)));try{await p({type:"updateActivity",activityId:e.id,activity:a,selectedCategory:l,isFeaturedActivity:r}),f("Activity successfully updated.","success")}catch(c){throw f(`Error updating activity: ${c}`,"error"),c}};return{isSubmitting:c,messages:a,formData:u,selectedActivityType:i,currentFormFields:m,selectedCategory:o,setMessages:l,handleSubmit:async t=>{if(t.preventDefault(),d(!0),l([]),y())try{"create"===e.mode?await v():"update"===e.mode&&await b(e.initialActivity),n()}finally{d(!1)}else d(!1)},handleInputChange:e=>{const t=e.target,{name:n,value:i,type:r}=t;h((e=>({...e,[n]:"checkbox"===r?t.checked:"number"===r?Number(i):i})))},handleActivityTypeChange:e=>{const t=e.target;r(t.value)},handleCategoryChange:e=>{const n=e.target.value;if(n===ar)s({id:ar,title:ar});else{const e=t.find((e=>e.id===n));e&&s({id:e.id,title:e.title})}}}})(e,t,n),p="create"===e.mode?"New Benefits Plan Activities":"Update Benefits Plan Activities";return z(hi,{title:p,children:z("form",{onSubmit:c,children:[z("div",{className:"sm:grid sm:grid-cols-4 sm:items-baseline mt-8",children:[z("label",{className:"sm:col-start-1",children:"Type"}),z("select",{className:"sm:col-start-2 sm:col-span-2 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s,disabled:"update"===e.mode,onChange:u,children:Object.values(we).map((e=>z("option",{value:e,children:e},e)))})]}),z("div",{className:"sm:grid sm:grid-cols-3 sm:items-baseline sm:gap-10 mt-8 sm:ml-12",children:[z("label",{className:"sm:col-start-1",children:"Category"}),z("select",{className:"sm:col-start-2 sm:col-span-3 focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:l.id,disabled:"update"===e.mode,onChange:h,children:[z("option",{value:ar,children:ar}),t.map((e=>z("option",{value:e.id,children:e.title},e.id)))]}),z(pi,{formMode:e,formFields:a,formData:o,isSubmitting:i,messages:r,categoryId:l.id,handleInputChange:d})]})]})})},hr=()=>{const[e,t]=oe(!1),[n,i]=oe([]),[r,o]=oe(null),[s,a]=oe(""),[l,c]=oe(!1),[d,u]=oe(null),h=de((async e=>{a(e),t(!0),o(null);try{const t=await(async e=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${e}/steps`)).data})(e);i(t)}catch(n){o(`Failed to load steps. Error: ${_e(n)}`)}finally{t(!1)}}),[]),p=de((e=>{u(e),c(!0)}),[]),m=de((async()=>{if(d)try{await(async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");await Qn.delete(`/_admin/v1.0/activities/${e}/steps/${t}`)})(s,d),c(!1),u(null),await h(s)}catch(e){o(`Failed to delete step. Error: ${_e(e)}`),c(!1),u(null)}}),[d,s,h]),f=de((()=>{c(!1),u(null)}),[]);return{isLoading:e,steps:n,error:r,isDeleteModalOpen:l,loadSteps:h,handleDeleteClick:p,handleDeleteConfirm:m,handleDeleteCancel:f}};var pr=(e=>(e.Ineligible="Ineligible",e.Completion="Completion",e.Content="Content",e.Consent="Consent",e.Question="Question",e))(pr||{}),mr=(e=>(e.Currency="Currency",e.DateTime="DateTime",e.Date="Date",e.Text="Text",e.MultiSelect="MultiSelect",e.SingleSelect="SingleSelect",e.TriviaSingleSelect="TriviaSingleSelect",e.Lookup="Lookup",e))(mr||{}),fr=(e=>(e.String="String",e.DateTime="DateTime",e.Date="Date",e.Integer="Integer",e.Decimal="Decimal",e.Boolean="Boolean",e.Lookup="Lookup",e))(fr||{}),gr=(e=>(e.Default="default",e.Onboarding="onboarding",e.WebBenefits="webBenefits",e))(gr||{});const yr=({activityId:e,steps:t,formMode:n,onChange:i})=>{const r="update"===n.mode,[o,s]=oe(""),[a,l]=oe(pr.Content),[c,d]=oe(""),[u,h]=oe(0),[p,m]=oe(""),[f,g]=oe(""),[y,v]=oe(""),[b,w]=oe([]),[x,_]=oe(""),[k,T]=oe(""),[S,C]=oe(""),[A,E]=oe(""),[P,N]=oe(""),[R,D]=oe([]),[M,O]=oe(""),[L,V]=oe([]),[j,I]=oe(""),[U,F]=oe(0),[B,$]=oe(!1),[H,q]=oe(""),[W,K]=oe(""),[Y,X]=oe(""),[G,J]=oe(""),[Z,Q]=oe(""),[ee,te]=oe([]),[ne,ie]=oe(!1),[re,ae]=oe(!1),[le,ce]=oe(null);se((()=>{if("update"!==n.mode)return;(async()=>{ie(!0),ce(null);try{const t=await(async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get(`/_admin/v1.0/activities/${e}/steps/${t}`)).data.step})(e,n.stepId);s(t.title),l(t.stepType),d(t.buttonText),h(t.progressPercentage),m(t.hint??""),g(t.description??""),v(t.imageUrl??""),w(t.nextSteps??[]),_(t.consentText??""),T(t.template??""),C(t.dataType??""),E(t.customerAttribute??""),N(t.analyticsEvent??""),D(t.options??[]),O(t.correctValue??""),V(t.branching??[]),I(t.lookupUrl??""),F(t.minimumSearchCharacterLength??0),te(t.invalidDays??[]),t.validation&&($(!0),q(t.validation.minimumValue??""),K(t.validation.minimumValueAddDays??""),X(t.validation.maximumValue??""),J(t.validation.matchExpression??""),Q(t.validation.invalidMessage))}catch(t){ce(`Failed to load step. Error: ${_e(t)}`)}finally{ie(!1)}})()}),[e,n]);const de=()=>B&&Z.trim()?{minimumValue:H||void 0,minimumValueAddDays:""!==W?Number(W):void 0,maximumValue:Y||void 0,matchExpression:G||void 0,invalidMessage:Z}:null;if(ne)return z("p",{class:"p-5 text-sm text-gray-500",children:"Loading step…"});const ue=a===pr.Question,he=vr.includes(k),pe=k===mr.TriviaSingleSelect,me=k===mr.Lookup,fe=a===pr.Content||a===pr.Consent||a===pr.Ineligible,ge=a===pr.Content||a===pr.Consent||a===pr.Ineligible||a===pr.Question;return z("div",{class:"m-4 mt-8 max-w-2xl",children:[z("h1",{class:"text-base font-semibold leading-6 text-gray-900 mb-6",children:r?"Edit Step":"New Step"}),le&&z("div",{class:"mb-4 p-4 text-red-700 bg-red-50 rounded-md",children:le}),z("div",{class:"space-y-6",children:[z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Core"}),z(xr,{label:"Step Type",children:r?z("span",{class:"inline-flex items-center rounded-md bg-indigo-50 px-2 py-1 text-sm font-medium text-indigo-700 ring-1 ring-inset ring-indigo-700/10",children:a}):z("select",{value:a,onChange:e=>l(e.target.value),class:br,children:Object.values(pr).map((e=>z("option",{value:e,children:e},e)))})}),z(xr,{label:"Title *",children:z("input",{type:"text",value:o,onInput:e=>s(e.target.value),class:br})}),z(xr,{label:"Button Text *",children:z("input",{type:"text",value:c,onInput:e=>d(e.target.value),class:br})}),z(xr,{label:"Progress Percentage *",children:z("input",{type:"number",min:0,max:100,value:u,onInput:e=>h(Number(e.target.value)),class:br})}),z(xr,{label:"Hint",children:z("input",{type:"text",value:p,onInput:e=>m(e.target.value),class:br})})]}),fe&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Content"}),fe&&z(xr,{label:"Description",children:z("textarea",{value:f,onInput:e=>g(e.target.value),rows:3,class:br})}),fe&&z(xr,{label:"Image URL",children:z("input",{type:"text",value:y,onInput:e=>v(e.target.value),class:br})}),a===pr.Consent&&z(xr,{label:"Consent Text",children:z("textarea",{value:x,onInput:e=>_(e.target.value),rows:3,class:br})})]}),ge&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Next Steps"}),z(_r,{rows:b,allSteps:t,onChange:w})]}),ue&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Question"}),z(xr,{label:"Template",children:z("select",{value:k,onChange:e=>T(e.target.value),class:br,children:[z("option",{value:"",children:"— none —"}),Object.values(mr).map((e=>z("option",{value:e,children:e},e)))]})}),z(xr,{label:"Data Type",children:z("select",{value:S,onChange:e=>C(e.target.value),class:br,children:[z("option",{value:"",children:"— none —"}),Object.values(fr).map((e=>z("option",{value:e,children:e},e)))]})}),z(xr,{label:"Customer Attribute",children:z("input",{type:"text",value:A,onInput:e=>E(e.target.value),class:br})}),z(xr,{label:"Analytics Event",children:z("input",{type:"text",value:P,onInput:e=>N(e.target.value),class:br})})]}),ue&&he&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:["Options",pe&&" — select the correct answer"]}),z(kr,{rows:R,correctValue:M,isTrivia:pe,onChange:D,onCorrectValueChange:O})]}),ue&&k===mr.SingleSelect&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Branching"}),z(Tr,{rows:L,options:R,allSteps:t,onChange:V})]}),ue&&me&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Lookup"}),z(xr,{label:"Lookup URL",children:z("input",{type:"text",value:j,onInput:e=>I(e.target.value),class:br})}),z(xr,{label:"Minimum Search Character Length",children:z("input",{type:"number",min:0,value:U,onInput:e=>F(Number(e.target.value)),class:br})})]}),ue&&z("div",{class:wr,children:[z("div",{class:"flex items-center gap-2",children:[z("input",{type:"checkbox",id:"hasValidation",checked:B,onChange:e=>$(e.target.checked)}),z("label",{for:"hasValidation",class:"text-xs font-semibold uppercase tracking-wide text-gray-500 cursor-pointer",children:"Validation"})]}),B&&z("div",{class:"mt-3 space-y-3",children:[z(xr,{label:"Minimum Value",children:z("input",{type:"text",value:H,onInput:e=>q(e.target.value),class:br})}),z(xr,{label:"Minimum Value Add Days",children:z("input",{type:"number",value:W,onInput:e=>{const t=e.target.value;K(""===t?"":Number(t))},class:br})}),z(xr,{label:"Maximum Value",children:z("input",{type:"text",value:Y,onInput:e=>X(e.target.value),class:br})}),z(xr,{label:"Match Expression",children:z("input",{type:"text",value:G,onInput:e=>J(e.target.value),class:br})}),z(xr,{label:"Invalid Message *",children:z("input",{type:"text",value:Z,onInput:e=>Q(e.target.value),class:br})})]})]}),ue&&z("div",{class:wr,children:[z("p",{class:"text-xs font-semibold uppercase tracking-wide text-gray-500",children:"Invalid Days"}),z(Sr,{tags:ee,onChange:te,placeholder:"e.g. Saturday"})]})]}),z("div",{class:"mt-8 flex justify-end",children:z("button",{type:"button",disabled:re,onClick:async()=>{ae(!0),ce(null);try{const t=vr.includes(k),r=k===mr.TriviaSingleSelect,s=k===mr.Lookup,l=a===pr.Question,d=a===pr.Content||a===pr.Consent||a===pr.Ineligible||a===pr.Question,h=t&&R.length>0?R:null,m=k===mr.SingleSelect&&L.length>0?L:null,g=d&&b.length>0?b:null;"create"===n.mode?await(async(e,t)=>{if(!Qn)throw new Error("Api has not been initialized");await Qn.post(`/_admin/v1.0/activities/${e}/steps`,t)})(e,{stepType:a,title:o,description:f||null,hint:p||null,progressPercentage:u,buttonText:c,template:l&&k?k:null,dataType:l&&S?S:null,options:h,branching:m,correctValue:r&&M?M:null,validation:l?de():null,invalidDays:l&&ee.length>0?ee:null,nextSteps:g,customerAttribute:l&&A?A:null,analyticsEvent:l&&P?P:null,imageUrl:y||null,consentText:a===pr.Consent&&x?x:null,lookupUrl:s&&j?j:null,minimumSearchCharacterLength:s?U:0,default:null}):await(async(e,t,n)=>{if(!Qn)throw new Error("Api has not been initialized");await Qn.put(`/_admin/v1.0/activities/${e}/steps/${t}`,n)})(e,n.stepId,{title:o,description:f||null,hint:p||null,progressPercentage:u,buttonText:c,template:l&&k?k:null,dataType:l&&S?S:null,options:h,branching:m,correctValue:r&&M?M:null,validation:l?de():null,invalidDays:l&&ee.length>0?ee:null,nextSteps:g,customerAttribute:l&&A?A:null,analyticsEvent:l&&P?P:null,imageUrl:y||null,consentText:a===pr.Consent&&x?x:null,lookupUrl:s&&j?j:null,minimumSearchCharacterLength:s?U:0,default:null}),i()}catch(t){ce(`Failed to save step. Error: ${_e(t)}`)}finally{ae(!1)}},class:"rounded-md bg-indigo-500 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 disabled:opacity-50 disabled:cursor-not-allowed",children:re?"Saving…":"Save"})})]})},vr=[mr.SingleSelect,mr.MultiSelect,mr.TriviaSingleSelect],br="block w-full rounded-md border border-gray-300 px-3 py-2 text-sm shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500",wr="border border-gray-200 rounded-md p-4 space-y-4",xr=({label:e,children:t})=>z("div",{children:[z("label",{class:"block text-sm font-medium text-gray-700 mb-1",children:e}),t]}),_r=({rows:e,allSteps:t,onChange:n})=>{const i=(t,i,r)=>n(e.map(((e,n)=>n===t?{...e,[i]:r}:e)));return z("div",{class:"space-y-2",children:[e.map(((r,o)=>z("div",{class:"flex gap-2 items-center",children:[z("select",{class:br,value:r.client,onChange:e=>i(o,"client",e.target.value),children:Object.values(gr).map((e=>z("option",{value:e,children:e},e)))}),z("select",{class:br,value:r.nextStepId,onChange:e=>i(o,"nextStepId",e.target.value),children:[z("option",{value:"",children:"— none —"}),t.map((e=>z("option",{value:e.id,children:e.title},e.id)))]}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>n(e.filter(((e,n)=>n!==t))))(o),children:"✕"})]},o))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>n([...e,{client:gr.Default,nextStepId:""}]),children:"+ Add next step"})]})},kr=({rows:e,correctValue:t,isTrivia:n,onChange:i,onCorrectValueChange:r})=>{const o=(t,n,r)=>i(e.map(((e,i)=>i===t?{...e,[n]:r}:e)));return z("div",{class:"space-y-2",children:[e.map(((s,a)=>z("div",{class:"flex gap-2 items-center",children:[n&&z("input",{type:"radio",name:"correctOption",checked:t===s.value,onChange:()=>r(s.value),title:"Mark as correct answer",class:"mt-1 shrink-0"}),z("input",{class:br,placeholder:"Text (label)",value:s.text,onInput:e=>o(a,"text",e.target.value)}),z("input",{class:br,placeholder:"Value",value:s.value,onInput:e=>o(a,"value",e.target.value)}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>i(e.filter(((e,n)=>n!==t))))(a),children:"✕"})]},a))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>i([...e,{text:"",value:""}]),children:"+ Add option"})]})},Tr=({rows:e,options:t,allSteps:n,onChange:i})=>z("div",{class:"space-y-3",children:[e.map(((r,o)=>z("div",{class:"border border-gray-200 rounded p-3 space-y-2",children:[z("div",{class:"flex gap-2 items-center",children:[z("select",{class:br,value:r.value,onChange:t=>((t,n)=>i(e.map(((e,i)=>i===t?{...e,value:n}:e))))(o,t.target.value),children:[z("option",{value:"",children:"— none —"}),t.map((e=>z("option",{value:e.value,children:e.text},e.value)))]}),z("button",{type:"button",class:"text-red-500 hover:text-red-700 text-sm px-2",onClick:()=>(t=>i(e.filter(((e,n)=>n!==t))))(o),children:"✕"})]}),z("p",{class:"text-xs text-gray-500",children:"Next steps for this branch:"}),z(_r,{rows:r.nextSteps,allSteps:n,onChange:t=>((t,n)=>i(e.map(((e,i)=>i===t?{...e,nextSteps:n}:e))))(o,t)})]},o))),z("button",{type:"button",class:"text-sm text-indigo-600 hover:text-indigo-800",onClick:()=>i([...e,{value:"",nextSteps:[{client:gr.Default,nextStepId:""}]}]),children:"+ Add branch"})]}),Sr=({tags:e,onChange:t,placeholder:n})=>{const[i,r]=oe(""),o=()=>{const n=i.trim();n&&!e.includes(n)&&(t([...e,n]),r(""))};return z("div",{class:"space-y-2",children:[z("div",{class:"flex flex-wrap gap-1",children:e.map((n=>z("span",{class:"inline-flex items-center gap-1 rounded bg-gray-100 px-2 py-0.5 text-xs text-gray-700",children:[n,z("button",{type:"button",class:"text-gray-400 hover:text-red-500",onClick:()=>(n=>t(e.filter((e=>e!==n))))(n),children:"✕"})]},n)))}),z("div",{class:"flex gap-2",children:[z("input",{class:br,placeholder:n??"Add value…",value:i,onInput:e=>r(e.target.value),onKeyDown:e=>"Enter"===e.key&&(e.preventDefault(),o())}),z("button",{type:"button",class:"rounded-md border border-gray-300 px-3 py-2 text-sm hover:bg-gray-50",onClick:o,children:"Add"})]})]})},Cr=[{name:"#",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Step Id",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Type",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Title",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Edit",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Delete",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Ar=({activityId:e})=>{const[t,n]=oe({mode:"list"}),{isLoading:i,steps:r,error:o,isDeleteModalOpen:s,loadSteps:a,handleDeleteClick:l,handleDeleteConfirm:c,handleDeleteCancel:d}=hr();se((()=>{a(e)}),[e,a]);return z(b,{children:["list"===t.mode&&z("div",{className:"mt-2",children:[z("div",{className:"mt-9 flex items-center justify-between",children:[z("div",{children:[z("h1",{className:"text-2xl font-semibold text-gray-900",children:"Activity Steps"}),z("p",{className:"text-sm text-gray-500 mt-1",children:["Activity ID: ",e]})]}),z("button",{type:"button",className:"block rounded-md bg-indigo-500 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-indigo-900 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",onClick:()=>n({mode:"create"}),children:"New Step"})]}),i&&z("p",{className:"p-5",children:"Loading..."}),o&&z("div",{className:"p-4 text-red-700",children:o}),!i&&!o&&r.length>0&&z(Yi,{headers:Cr,renderTableRows:()=>z(b,{children:r.map(((e,t)=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900 pl-4",children:t+1}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:e.id}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:z("span",{className:`inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ${Er(e.stepType)}`,children:e.stepType})}),z("td",{className:"whitespace-nowrap px-3 py-4 text-sm text-gray-500",children:e.title}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>n({mode:"update",stepId:e.id}),children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-red-600 shadow-sm ring-1 ring-inset ring-red-300 hover:bg-red-50",onClick:()=>l(e.id),children:"Delete"})})})]},e.id)))})}),!i&&!o&&0===r.length&&z("p",{className:"mt-4 text-sm text-gray-500",children:"No steps found for this activity."})]}),("create"===t.mode||"update"===t.mode)&&z(Zi,{buttonName:"Activity Steps",onClick:()=>n({mode:"list"}),children:z(yr,{activityId:e,steps:r,formMode:"create"===t.mode?{mode:"create"}:{mode:"update",stepId:t.stepId},onChange:()=>{n({mode:"list"}),a(e)}})}),z(Ki,{isOpen:s,heading:"Delete Step",message:"Are you sure you want to delete this step? This action cannot be undone.",onConfirm:c,onCancel:d})]})},Er=e=>{switch(e){case pr.Question:return"bg-blue-50 text-blue-700 ring-blue-700/10";case pr.Content:return"bg-green-50 text-green-700 ring-green-600/20";case pr.Consent:return"bg-yellow-50 text-yellow-700 ring-yellow-600/20";case pr.Completion:return"bg-purple-50 text-purple-700 ring-purple-700/10";case pr.Ineligible:return"bg-red-50 text-red-700 ring-red-600/10";default:return"bg-gray-50 text-gray-700 ring-gray-600/10"}},Pr=[{name:"Id",className:"px-3 py-3.5 pl-4 text-left text-sm font-semibold text-gray-900"},{name:"Icon",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Title",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell"},{name:"Subtitle",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 2xl:table-cell"},{name:"Type",className:"hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 xl:table-cell"},{name:"Points",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Category",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Enabled",className:"px-3 py-3.5 text-left text-sm font-semibold text-gray-900"},{name:"Update",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Visibility",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"},{name:"Steps",className:"px-3 py-3.5 text-center text-sm font-semibold text-gray-900"}],Nr="All",Rr=({categories:e,onChange:t})=>{const[n,i]=oe(null),[r,o]=oe({mode:"view"}),[s,a]=oe({id:Nr,title:Nr}),[l,c]=oe([]),{isLoading:d,activities:u,isModalOpen:h,loadActivities:p,handleAction:m,handleModalConfirm:f,handleModalCancel:g}=ir();se((()=>{(async()=>{try{await p(e)}catch(t){i(`${t}`)}})()}),[e,p]),se((()=>{c(s.title===Nr?u:u.filter((e=>e.category?.id===s.id)))}),[u,s]);const y=z("div",{className:"flex items-center space-x-2 mt-4",children:[z(nr,{}),z("select",{className:"focus:ring-indigo-500 focus:border-indigo-500 shadow-sm sm:max-w-xs border-gray-300 rounded-md",value:s.id,onChange:t=>{const n=t.target.value;if(n===Nr)a({id:Nr,title:Nr});else{const t=e.find((e=>e.id===n));t&&a({id:t.id,title:t.title})}},children:[z("option",{value:Nr,children:Nr}),e.map((e=>z("option",{value:e.id,children:e.title},e.id)))]})]});return z(b,{children:["view"===r.mode&&z(b,{children:[d&&z("p",{className:"p-5",children:"Loading..."}),!d&&z(Xi,{error:n,isModalOpen:h,modalHeading:"Warning!",modalTitle:"Are you sure you want to change the visibility of this activity in the app?",tableHeaders:Pr,headingText:"Benefits Plan Activities",buttonText:"New Activity",filterElement:y,onModalConfirm:async()=>{try{await f(),t()}catch(e){i(`${e}`)}},handleModalCancel:g,renderTableRows:()=>z(b,{children:l.map((e=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-3 py-4 text-sm font-medium text-gray-900",children:e.id}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 xl:table-cell",children:z("span",{className:"flex justify-center",children:z("img",{src:e.iconUrl,alt:e.title,className:"h-8 w-8"})})}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 lg:table-cell",children:ke(e.title)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 2xl:table-cell",children:ke(e.description)}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 xl:table-cell",children:e.activityType}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.points}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.category?.title??"None"}),z("td",{className:"hidden whitespace-nowrap px-3 py-4 text-sm text-gray-500 sm:table-cell",children:e.enabled?"Yes":"No"}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>{o({mode:"update",itemId:e.id})},children:"Edit"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>m({type:"updateVisibility",activityId:e.id}),children:e.enabled?"Disable":"Enable"})})}),z("td",{className:"whitespace-nowrap px-3 py-4 sm:table-cell",children:z("div",{className:"flex justify-center",children:e.activityType===we.Assessment&&z("button",{type:"button",className:"rounded-md bg-white px-2 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",onClick:()=>o({mode:"steps",activityId:e.id}),children:"Steps"})})})]},e.id)))}),onCreateButton:()=>o({mode:"create"})})]}),("create"===r.mode||"update"===r.mode)&&z(Zi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:z(ur,{categories:e,formMode:"create"===r.mode?{mode:"create"}:{mode:"update",initialActivity:u.find((e=>e.id===r.itemId))},onChange:t})}),"steps"===r.mode&&z(Zi,{buttonName:"Benefits Plan Activities",onClick:()=>{o({mode:"view"})},children:z(Ar,{activityId:r.activityId})})]})};var Dr=(e=>(e.Categories="Categories",e.Activities="Activities",e))(Dr||{});const Mr=()=>{const[e,t]=oe("Categories"),[n,i]=oe([]),[r,o]=oe(!1),[s,a]=oe(null),l=de((t=>t===e),[e]),c=de((async()=>{o(!0),a(null);try{const e=(await(async()=>{if(!Qn)throw new Error("Api has not been initialized");return(await Qn.get("/_admin/v1.0/categories")).data})()).categories.sort(((e,t)=>e.displayOrder-t.displayOrder));i(e)}catch(e){console.error(e),a("Failed to load categories.")}finally{o(!1)}}),[]);se((()=>{c()}),[c]);const d=async()=>{await c()};return z(b,{children:[z(be,{tabTitles:Object.entries(Dr).map((([,e])=>e)),currentTab:e,onChange:t}),r&&z("p",{className:"p-5",children:"Loading..."}),s&&z("div",{className:"p-4 text-red-700",children:s}),!r&&z(b,{children:[z(tr,{visible:l("Categories"),children:z(er,{categories:n,onChange:d})}),z(tr,{visible:l("Activities"),children:z(Rr,{categories:n,onChange:d})})]})]})};function Or(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,i)=>"create"===i?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Lr(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Vr=e=>Array.isArray(e);function jr(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function Ir(e){return"string"==typeof e||Array.isArray(e)}function Ur(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Fr(e,t,n,i){if("function"==typeof t){const[r,o]=Ur(i);t=t(void 0!==n?n:e.custom,r,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[r,o]=Ur(i);t=t(void 0!==n?n:e.custom,r,o)}return t}function Br(e,t,n){const i=e.getProps();return Fr(i,t,void 0!==n?n:i.custom,e)}const zr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$r=["initial",...zr],Hr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qr=new Set(Hr),Wr=e=>1e3*e,Kr=e=>e/1e3,Yr={type:"spring",stiffness:500,damping:25,restSpeed:10},Xr={type:"keyframes",duration:.8},Gr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jr=(e,{keyframes:t})=>t.length>2?Xr:qr.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Yr:Gr;function Zr(e,t){return e?e[t]||e.default||e:void 0}const Qr=!1,eo=e=>null!==e;function to(e,{repeat:t,repeatType:n="loop"},i){const r=e.filter(eo),o=t&&"loop"!==n&&t%2==1?0:r.length-1;return o&&void 0!==i?i:r[o]}const no=e=>e;const io=["read","resolveKeyframes","update","preRender","render","postRender"];function ro(e,t){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=io.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,r=!1,s=!1)=>{const a=s&&i?t:n;return r&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,i?r=!0:(i=!0,[t,n]=[n,t],n.clear(),t.forEach(a),i=!1,r&&(r=!1,l.process(e)))}};return l}(o),e)),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:h}=s,p=()=>{const o=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(o-r.timestamp,40),1),r.timestamp=o,r.isProcessing=!0,a.process(r),l.process(r),c.process(r),d.process(r),u.process(r),h.process(r),r.isProcessing=!1,n&&t&&(i=!1,e(p))};return{schedule:io.reduce(((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,i=!0,r.isProcessing||e(p)),a.schedule(t,o,s)),t}),{}),cancel:e=>{for(let t=0;t<io.length;t++)s[io[t]].cancel(e)},state:r,steps:s}}const{schedule:oo,cancel:so,state:ao,steps:lo}=ro("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:no,!0),co=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,uo=1e-7,ho=12;function po(e,t,n,i){if(e===t&&n===i)return no;const r=t=>function(e,t,n,i,r){let o,s,a=0;do{s=t+(n-t)/2,o=co(s,i,r)-e,o>0?n=s:t=s}while(Math.abs(o)>uo&&++a<ho);return s}(t,0,1,e,n);return e=>0===e||1===e?e:co(r(e),t,i)}const mo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,fo=e=>t=>1-e(1-t),go=po(.33,1.53,.69,.99),yo=fo(go),vo=mo(yo),bo=e=>(e*=2)<1?.5*yo(e):.5*(2-Math.pow(2,-10*(e-1))),wo=e=>1-Math.sin(Math.acos(e)),xo=fo(wo),_o=mo(wo),ko=e=>/^0[^.\s]+$/u.test(e);let To=no;const So=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Co=e=>t=>"string"==typeof t&&t.startsWith(e),Ao=Co("--"),Eo=Co("var(--"),Po=e=>!!Eo(e)&&No.test(e.split("/*")[0].trim()),No=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ro=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Do(e,t,n=1){const[i,r]=function(e){const t=Ro.exec(e);if(!t)return[,];const[,n,i,r]=t;return[`--${null!=n?n:i}`,r]}(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const e=o.trim();return So(e)?parseFloat(e):e}return Po(r)?Do(r,t,n+1):r}const Mo=(e,t,n)=>n>t?t:n<e?e:n,Oo={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Lo={...Oo,transform:e=>Mo(0,1,e)},Vo={...Oo,default:1},jo=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Io=jo("deg"),Uo=jo("%"),Fo=jo("px"),Bo=jo("vh"),zo=jo("vw"),$o={...Uo,parse:e=>Uo.parse(e)/100,transform:e=>Uo.transform(100*e)},Ho=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),qo=e=>e===Oo||e===Fo,Wo=(e,t)=>parseFloat(e.split(", ")[t]),Ko=(e,t)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return Wo(r[1],t);{const t=i.match(/^matrix\((.+)\)$/u);return t?Wo(t[1],e):0}},Yo=new Set(["x","y","z"]),Xo=Hr.filter((e=>!Yo.has(e)));const Go={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ko(4,13),y:Ko(5,14)};Go.translateX=Go.x,Go.translateY=Go.y;const Jo=e=>t=>t.test(e),Zo=[Oo,Fo,Uo,Io,zo,Bo,{test:e=>"auto"===e,parse:e=>e}],Qo=e=>Zo.find(Jo(e)),es=new Set;let ts=!1,ns=!1;function is(){if(ns){const e=Array.from(es).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Xo.forEach((n=>{const i=e.getValue(n);void 0!==i&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var i;null===(i=e.getValue(t))||void 0===i||i.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}ns=!1,ts=!1,es.forEach((e=>e.complete())),es.clear()}function rs(){es.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(ns=!0)}))}class os{constructor(e,t,n,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(es.add(this),ts||(ts=!0,oo.read(rs),oo.resolveKeyframes(is))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:i}=this;for(let r=0;r<e.length;r++)if(null===e[r])if(0===r){const r=null==i?void 0:i.get(),o=e[e.length-1];if(void 0!==r)e[0]=r;else if(n&&t){const i=n.readValue(t,o);null!=i&&(e[0]=i)}void 0===e[0]&&(e[0]=o),i&&void 0===r&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),es.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,es.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ss=e=>Math.round(1e5*e)/1e5,as=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const ls=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cs=(e,t)=>n=>Boolean("string"==typeof n&&ls.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),ds=(e,t,n)=>i=>{if("string"!=typeof i)return i;const[r,o,s,a]=i.match(as);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},us={...Oo,transform:e=>Math.round((e=>Mo(0,255,e))(e))},hs={test:cs("rgb","red"),parse:ds("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+us.transform(e)+", "+us.transform(t)+", "+us.transform(n)+", "+ss(Lo.transform(i))+")"};const ps={test:cs("#"),parse:function(e){let t="",n="",i="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,i+=i,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}},transform:hs.transform},ms={test:cs("hsl","hue"),parse:ds("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Uo.transform(ss(t))+", "+Uo.transform(ss(n))+", "+ss(Lo.transform(i))+")"},fs={test:e=>hs.test(e)||ps.test(e)||ms.test(e),parse:e=>hs.test(e)?hs.parse(e):ms.test(e)?ms.parse(e):ps.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?hs.transform(e):ms.transform(e)},gs=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const ys="number",vs="color",bs="var",ws="var(",xs="${}",_s=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ks(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},r=[];let o=0;const s=t.replace(_s,(e=>(fs.test(e)?(i.color.push(o),r.push(vs),n.push(fs.parse(e))):e.startsWith(ws)?(i.var.push(o),r.push(bs),n.push(e)):(i.number.push(o),r.push(ys),n.push(parseFloat(e))),++o,xs))).split(xs);return{values:n,split:s,indexes:i,types:r}}function Ts(e){return ks(e).values}function Ss(e){const{split:t,types:n}=ks(e),i=t.length;return e=>{let r="";for(let o=0;o<i;o++)if(r+=t[o],void 0!==e[o]){const t=n[o];r+=t===ys?ss(e[o]):t===vs?fs.transform(e[o]):e[o]}return r}}const Cs=e=>"number"==typeof e?0:e;const As={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(as))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(gs))||void 0===n?void 0:n.length)||0)>0},parse:Ts,createTransformer:Ss,getAnimatableNone:function(e){const t=Ts(e);return Ss(e)(t.map(Cs))}},Es=new Set(["brightness","contrast","saturate","opacity"]);function Ps(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[i]=n.match(as)||[];if(!i)return e;const r=n.replace(i,"");let o=Es.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+r+")"}const Ns=/\b([a-z-]*)\(.*?\)/gu,Rs={...As,getAnimatableNone:e=>{const t=e.match(Ns);return t?t.map(Ps).join(" "):e}},Ds={borderWidth:Fo,borderTopWidth:Fo,borderRightWidth:Fo,borderBottomWidth:Fo,borderLeftWidth:Fo,borderRadius:Fo,radius:Fo,borderTopLeftRadius:Fo,borderTopRightRadius:Fo,borderBottomRightRadius:Fo,borderBottomLeftRadius:Fo,width:Fo,maxWidth:Fo,height:Fo,maxHeight:Fo,top:Fo,right:Fo,bottom:Fo,left:Fo,padding:Fo,paddingTop:Fo,paddingRight:Fo,paddingBottom:Fo,paddingLeft:Fo,margin:Fo,marginTop:Fo,marginRight:Fo,marginBottom:Fo,marginLeft:Fo,backgroundPositionX:Fo,backgroundPositionY:Fo},Ms={rotate:Io,rotateX:Io,rotateY:Io,rotateZ:Io,scale:Vo,scaleX:Vo,scaleY:Vo,scaleZ:Vo,skew:Io,skewX:Io,skewY:Io,distance:Fo,translateX:Fo,translateY:Fo,translateZ:Fo,x:Fo,y:Fo,z:Fo,perspective:Fo,transformPerspective:Fo,opacity:Lo,originX:$o,originY:$o,originZ:Fo},Os={...Oo,transform:Math.round},Ls={...Ds,...Ms,zIndex:Os,size:Fo,fillOpacity:Lo,strokeOpacity:Lo,numOctaves:Os},Vs={...Ls,color:fs,backgroundColor:fs,outlineColor:fs,fill:fs,stroke:fs,borderColor:fs,borderTopColor:fs,borderRightColor:fs,borderBottomColor:fs,borderLeftColor:fs,filter:Rs,WebkitFilter:Rs},js=e=>Vs[e];function Is(e,t){let n=js(e);return n!==Rs&&(n=As),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Us=new Set(["auto","none","0"]);class Fs extends os{constructor(e,t,n,i,r){super(e,t,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),Po(n))){const i=Do(n,t.current);void 0!==i&&(e[a]=i),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Ho.has(n)||2!==e.length)return;const[i,r]=e,o=Qo(i),s=Qo(r);if(o!==s)if(qo(o)&&qo(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)("number"==typeof(i=e[r])?0===i:null===i||"none"===i||"0"===i||ko(i))&&n.push(r);var i;n.length&&function(e,t,n){let i,r=0;for(;r<e.length&&!i;){const t=e[r];"string"==typeof t&&!Us.has(t)&&ks(t).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Is(n,i)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Go[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const i=t[t.length-1];void 0!==i&&e.getValue(n,i).jump(i,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,s=i[o];i[o]=Go[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function Bs(e){return"function"==typeof e}let zs;function $s(){zs=void 0}const Hs={now:()=>(void 0===zs&&Hs.set(ao.isProcessing||Qr?ao.timestamp:performance.now()),zs),set:e=>{zs=e,queueMicrotask($s)}},qs=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!As.test(e)&&"0"!==e||e.startsWith("url(")));class Ws{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Hs.now(),this.options={autoplay:e,delay:t,type:n,repeat:i,repeatDelay:r,repeatType:o,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(rs(),is()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Hs.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:r,delay:o,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!function(e,t,n,i){const r=e[0];if(null===r)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=qs(r,t),a=qs(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Bs(n))&&i)}(e,n,i,r)){if(!o)return null==a||a(to(e,this.options,t)),null==s||s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function Ks(e,t){return t?e*(1e3/t):0}const Ys=5;function Xs(e,t,n){const i=Math.max(t-Ys,0);return Ks(n-e(i),t-i)}const Gs=.001,Js=.01,Zs=10,Qs=.05,ea=1;function ta({duration:e=800,bounce:t=.25,velocity:n=0,mass:i=1}){let r,o,s=1-t;s=Mo(Qs,ea,s),e=Mo(Js,Zs,Kr(e)),s<1?(r=t=>{const i=t*s,r=i*e,o=i-n,a=ia(t,s),l=Math.exp(-r);return Gs-o/a*l},o=t=>{const i=t*s*e,o=i*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-i),c=ia(Math.pow(t,2),s);return(-r(t)+Gs>0?-1:1)*((o-a)*l)/c}):(r=t=>Math.exp(-t*e)*((t-n)*e+1)-Gs,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let i=n;for(let r=1;r<na;r++)i-=e(i)/t(i);return i}(r,o,5/e);if(e=Wr(e),isNaN(a))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(a,2)*i;return{stiffness:t,damping:2*s*Math.sqrt(i*t),duration:e}}}const na=12;function ia(e,t){return e*Math.sqrt(1-t*t)}const ra=["duration","bounce"],oa=["stiffness","damping","mass"];function sa(e,t){return t.some((t=>void 0!==e[t]))}function aa({keyframes:e,restDelta:t,restSpeed:n,...i}){const r=e[0],o=e[e.length-1],s={done:!1,value:r},{stiffness:a,damping:l,mass:c,duration:d,velocity:u,isResolvedFromDuration:h}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!sa(e,oa)&&sa(e,ra)){const n=ta(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...i,velocity:-Kr(i.velocity||0)}),p=u||0,m=l/(2*Math.sqrt(a*c)),f=o-r,g=Kr(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),t||(t=y?.005:.5),m<1){const e=ia(g,m);v=t=>{const n=Math.exp(-m*g*t);return o-n*((p+m*g*f)/e*Math.sin(e*t)+f*Math.cos(e*t))}}else if(1===m)v=e=>o-Math.exp(-g*e)*(f+(p+g*f)*e);else{const e=g*Math.sqrt(m*m-1);v=t=>{const n=Math.exp(-m*g*t),i=Math.min(e*t,300);return o-n*((p+m*g*f)*Math.sinh(i)+e*f*Math.cosh(i))/e}}return{calculatedDuration:h&&d||null,next:e=>{const i=v(e);if(h)s.done=e>=d;else{let r=0;m<1&&(r=0===e?Wr(p):Xs(v,e,i));const a=Math.abs(r)<=n,l=Math.abs(o-i)<=t;s.done=a&&l}return s.value=s.done?o:i,s}}}function la({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],h={done:!1,value:u},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let m=n*t;const f=u+m,g=void 0===s?f:s(f);g!==f&&(m=g-u);const y=e=>-m*Math.exp(-e/i),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let w,x;const _=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(w=e,x=aa({keyframes:[h.value,p(h.value)],velocity:Xs(v,e,h.value),damping:r,stiffness:o,restDelta:c,restSpeed:d}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==w||(t=!0,b(e),_(e)),void 0!==w&&e>=w?x.next(e-w):(!t&&b(e),h)}}}const ca=po(.42,0,1,1),da=po(0,0,.58,1),ua=po(.42,0,.58,1),ha=e=>Array.isArray(e)&&"number"==typeof e[0],pa={linear:no,easeIn:ca,easeInOut:ua,easeOut:da,circIn:wo,circInOut:_o,circOut:xo,backIn:yo,backInOut:vo,backOut:go,anticipate:bo},ma=e=>{if(ha(e)){To(4===e.length);const[t,n,i,r]=e;return po(t,n,i,r)}return"string"==typeof e?pa[e]:e},fa=(e,t)=>n=>t(e(n)),ga=(...e)=>e.reduce(fa),ya=(e,t,n)=>{const i=t-e;return 0===i?1:(n-e)/i},va=(e,t,n)=>e+(t-e)*n;function ba(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function wa(e,t){return n=>n>0?t:e}const xa=(e,t,n)=>{const i=e*e,r=n*(t*t-i)+i;return r<0?0:Math.sqrt(r)},_a=[ps,hs,ms];function ka(e){const t=(n=e,_a.find((e=>e.test(n))));var n;if(!Boolean(t))return!1;let i=t.parse(e);return t===ms&&(i=function({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,n/=100;let r=0,o=0,s=0;if(t/=100){const i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;r=ba(a,i,e+1/3),o=ba(a,i,e),s=ba(a,i,e-1/3)}else r=o=s=n;return{red:Math.round(255*r),green:Math.round(255*o),blue:Math.round(255*s),alpha:i}}(i)),i}const Ta=(e,t)=>{const n=ka(e),i=ka(t);if(!n||!i)return wa(e,t);const r={...n};return e=>(r.red=xa(n.red,i.red,e),r.green=xa(n.green,i.green,e),r.blue=xa(n.blue,i.blue,e),r.alpha=va(n.alpha,i.alpha,e),hs.transform(r))},Sa=new Set(["none","hidden"]);function Ca(e,t){return n=>va(e,t,n)}function Aa(e){return"number"==typeof e?Ca:"string"==typeof e?Po(e)?wa:fs.test(e)?Ta:Na:Array.isArray(e)?Ea:"object"==typeof e?fs.test(e)?Ta:Pa:wa}function Ea(e,t){const n=[...e],i=n.length,r=e.map(((e,n)=>Aa(e)(e,t[n])));return e=>{for(let t=0;t<i;t++)n[t]=r[t](e);return n}}function Pa(e,t){const n={...e,...t},i={};for(const r in n)void 0!==e[r]&&void 0!==t[r]&&(i[r]=Aa(e[r])(e[r],t[r]));return e=>{for(const t in i)n[t]=i[t](e);return n}}const Na=(e,t)=>{const n=As.createTransformer(t),i=ks(e),r=ks(t);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Sa.has(e)&&!r.values.length||Sa.has(t)&&!i.values.length?function(e,t){return Sa.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):ga(Ea(function(e,t){var n;const i=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][r[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;i[o]=l,r[s]++}return i}(i,r),r.values),n):wa(e,t)};function Ra(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return va(e,t,n);return Aa(e)(e,t)}function Da(e,t,{clamp:n=!0,ease:i,mixer:r}={}){const o=e.length;if(To(o===t.length),1===o)return()=>t[0];if(2===o&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const i=[],r=n||Ra,o=e.length-1;for(let s=0;s<o;s++){let n=r(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||no:t;n=ga(e,n)}i.push(n)}return i}(t,i,r),a=s.length,l=t=>{let n=0;if(a>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const i=ya(e[n],e[n+1],t);return s[n](i)};return n?t=>l(Mo(e[0],e[o-1],t)):l}function Ma(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const r=ya(0,t,i);e.push(va(n,1,r))}}(t,e.length-1),t}function Oa({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const r=(e=>Array.isArray(e)&&"number"!=typeof e[0])(i)?i.map(ma):ma(i),o={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:Ma(t),e),a=Da(s,t,{ease:Array.isArray(r)?r:(l=t,c=r,l.map((()=>c||ua)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}const La=e=>{const t=({timestamp:t})=>e(t);return{start:()=>oo.update(t,!0),stop:()=>so(t),now:()=>ao.isProcessing?ao.timestamp:Hs.now()}},Va={decay:la,inertia:la,tween:Oa,keyframes:Oa,spring:aa},ja=e=>e/100;class Ia extends Ws{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:i,keyframes:r}=this.options,o=(null==i?void 0:i.KeyframeResolver)||os;this.resolver=new o(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,s=Bs(t)?t:Va[t]||Oa;let a,l;s!==Oa&&"number"!=typeof e[0]&&(a=ga(ja,Ra(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===r&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:d}=c,u=d+i;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:d,resolvedDuration:u,totalDuration:u*(n+1)-i}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=n;if(null===this.startTime)return r.next(0);const{delay:u,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-u*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=r;if(h){const e=Math.min(this.currentTime,c)/d;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1);Boolean(t%2)&&("reverse"===p?(n=1-n,m&&(n-=m/d)):"mirror"===p&&(b=o)),v=Mo(0,1,n)*d}const w=y?{done:!1,value:a[0]}:b.next(v);s&&(w.value=s(w.value));let{done:x}=w;y||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return _&&void 0!==i&&(w.value=to(a,this.options,i)),f&&f(w.value),_&&this.finish(),w}get duration(){const{resolved:e}=this;return e?Kr(e.calculatedDuration):0}get time(){return Kr(this.currentTime)}set time(e){e=Wr(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Kr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=La,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ua=new Set(["opacity","clipPath","filter","transform"]),Fa=(e,t)=>{let n="";const i=Math.max(Math.round(t/10),2);for(let r=0;r<i;r++)n+=e(ya(0,i-1,r))+", ";return`linear(${n.substring(0,n.length-2)})`};function Ba(e){let t;return()=>(void 0===t&&(t=e()),t)}const za={linearEasing:void 0};function $a(e,t){const n=Ba(e);return()=>{var e;return null!==(e=za[t])&&void 0!==e?e:n()}}const Ha=$a((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing");function qa(e){return Boolean("function"==typeof e&&Ha()||!e||"string"==typeof e&&(e in Ka||Ha())||ha(e)||Array.isArray(e)&&e.every(qa))}const Wa=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Ka={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wa([0,.65,.55,1]),circOut:Wa([.55,0,1,.45]),backIn:Wa([.31,.01,.66,-.59]),backOut:Wa([.33,1.53,.69,.99])};function Ya(e,t){return e?"function"==typeof e&&Ha()?Fa(e,t):ha(e)?Wa(e):Array.isArray(e)?e.map((e=>Ya(e,t)||Ka.easeOut)):Ka[e]:void 0}function Xa(e,t,n,{delay:i=0,duration:r=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=Ya(a,r);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:i,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"})}function Ga(e,t){e.timeline=t,e.onfinish=null}const Ja=Ba((()=>Object.hasOwnProperty.call(Element.prototype,"animate")));const Za={anticipate:bo,backInOut:vo,circInOut:_o};class Qa extends Ws{constructor(e){super(e);const{name:t,motionValue:n,element:i,keyframes:r}=this.options;this.resolver=new Fs(r,((e,t)=>this.onKeyframesResolved(e,t)),t,n,i),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:i=300,times:r,ease:o,type:s,motionValue:a,name:l,startTime:c}=this.options;if(!(null===(n=a.owner)||void 0===n?void 0:n.current))return!1;var d;if("string"==typeof o&&Ha()&&o in Za&&(o=Za[o]),Bs((d=this.options).type)||"spring"===d.type||!qa(d.ease)){const{onComplete:t,onUpdate:n,motionValue:a,element:l,...c}=this.options,d=function(e,t){const n=new Ia({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[0]};const r=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),r.push(i.value),o+=10;return{times:void 0,keyframes:r,duration:o-10,ease:"linear"}}(e,c);1===(e=d.keyframes).length&&(e[1]=e[0]),i=d.duration,r=d.times,o=d.ease,s="keyframes"}const u=Xa(a.owner.current,l,e,{...this.options,duration:i,times:r,ease:o});return u.startTime=null!=c?c:this.calcStartTime(),this.pendingTimeline?(Ga(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;a.set(to(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:r,type:s,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Kr(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Kr(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Wr(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return no;const{animation:n}=t;Ga(n,e)}else this.pendingTimeline=e;return no}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:i,type:r,ease:o,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,d=new Ia({...c,keyframes:n,duration:i,type:r,ease:o,times:s,isGenerator:!0}),u=Wr(this.time);e.setWithVelocity(d.sample(u-10).value,d.sample(u).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:r,damping:o,type:s}=e;return Ja()&&n&&Ua.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!i&&"mirror"!==r&&0!==o&&"inertia"!==s}}const el=Ba((()=>void 0!==window.ScrollTimeline));class tl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>el()&&n.attachTimeline?n.attachTimeline(e):t(n)));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const nl=(e,t,n,i={},r,o)=>s=>{const a=Zr(i,e)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c-=Wr(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:r};(function({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(a)||(d={...d,...Jr(e,d)}),d.duration&&(d.duration=Wr(d.duration)),d.repeatDelay&&(d.repeatDelay=Wr(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),u&&!o&&void 0!==t.get()){const e=to(d.keyframes,a);if(void 0!==e)return oo.update((()=>{d.onUpdate(e),d.onComplete()})),new tl([])}return!o&&Qa.supports(d)?new Qa(d):new Ia(d)},il=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),rl=e=>Vr(e)?e[e.length-1]||0:e;function ol(e,t){-1===e.indexOf(t)&&e.push(t)}function sl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class al{constructor(){this.subscriptions=[]}add(e){return ol(this.subscriptions,e),()=>sl(this.subscriptions,e)}notify(e,t,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](e,t,n);else for(let r=0;r<i;r++){const i=this.subscriptions[r];i&&i(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class ll{constructor(e,t={}){this.version="11.11.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Hs.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Hs.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new al);const n=this.events[e].add(t);return"change"===e?()=>{n(),oo.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Hs.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ks(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function cl(e,t){return new ll(e,t)}function dl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,cl(n))}const ul=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hl="data-"+ul("framerAppearId");function pl(e){return e.props[hl]}const ml=e=>Boolean(e&&e.getVelocity);function fl(e,t){const n=e.getValue("willChange");if(i=n,Boolean(ml(i)&&i.add))return n.add(t);var i}function gl({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,i}function yl(e,t,{delay:n=0,transitionOverride:i,type:r}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;i&&(s=i);const c=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const u in l){const t=e.getValue(u,null!==(o=e.latestValues[u])&&void 0!==o?o:null),i=l[u];if(void 0===i||d&&gl(d,u))continue;const r={delay:n,...Zr(s||{},u)};let a=!1;if(window.MotionHandoffAnimation){const t=pl(e);if(t){const e=window.MotionHandoffAnimation(t,u,oo);null!==e&&(r.startTime=e,a=!0)}}fl(e,u),t.start(nl(u,t,i,e.shouldReduceMotion&&qr.has(u)?{type:!1}:r,e,a));const h=t.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{oo.update((()=>{a&&function(e,t){const n=Br(e,t);let{transitionEnd:i={},transition:r={},...o}=n||{};o={...o,...i};for(const s in o)dl(e,s,rl(o[s]))}(e,a)}))})),c}function vl(e,t,n={}){var i;const r=Br(e,t,"exit"===n.type?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(yl(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(i=0)=>{const{delayChildren:r=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,i=0,r=1,o){const s=[],a=(e.variantChildren.size-1)*i,l=1===r?(e=0)=>e*i:(e=0)=>a-e*i;return Array.from(e.variantChildren).sort(bl).forEach(((e,i)=>{e.notify("AnimationStart",t),s.push(vl(e,t,{...o,delay:n+l(i)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,r+i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function bl(e,t){return e.sortNodePosition(t)}const wl=$r.length;function xl(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&xl(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<wl;n++){const i=$r[n],r=e.props[i];(Ir(r)||!1===r)&&(t[i]=r)}return t}const _l=[...zr].reverse(),kl=zr.length;function Tl(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let i;if(e.notify("AnimationStart",t),Array.isArray(t)){const r=t.map((t=>vl(e,t,n)));i=Promise.all(r)}else if("string"==typeof t)i=vl(e,t,n);else{const r="function"==typeof t?Br(e,t,n.custom):t;i=Promise.all(yl(e,r,n))}return i.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}function Sl(e){let t=Tl(e),n=El(),i=!0;const r=t=>(n,i)=>{var r;const o=Br(e,i,"exit"===t?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);if(o){const{transition:e,transitionEnd:t,...i}=o;n={...n,...i,...t}}return n};function o(o){const{props:s}=e,a=xl(e.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let t=0;t<kl;t++){const h=_l[t],p=n[h],m=void 0!==s[h]?s[h]:a[h],f=Ir(m),g=h===o?p.isActive:null;!1===g&&(u=t);let y=m===a[h]&&m!==s[h]&&f;if(y&&i&&e.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||Lr(m)||"boolean"==typeof m)continue;const v=Cl(p.prevProp,m);let b=v||h===o&&p.isActive&&!y&&f||t>u&&f,w=!1;const x=Array.isArray(m)?m:[m];let _=x.reduce(r(h),{});!1===g&&(_={});const{prevResolvedValues:k={}}=p,T={...k,..._},S=t=>{b=!0,c.has(t)&&(w=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in T){const t=_[e],n=k[e];if(d.hasOwnProperty(e))continue;let i=!1;i=Vr(t)&&Vr(n)?!jr(t,n):t!==n,i?null!=t?S(e):c.add(e):void 0!==t&&c.has(e)?S(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=_,p.isActive&&(d={...d,..._}),i&&e.blockInitialAnimation&&(b=!1);b&&(!(y&&v)||w)&&l.push(...x.map((e=>({animation:e,options:{type:h}}))))}if(c.size){const t={};c.forEach((n=>{const i=e.getBaseTarget(n),r=e.getValue(n);r&&(r.liveStyle=!0),t[n]=null!=i?i:null})),l.push({animation:t})}let h=Boolean(l.length);return!i||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(h=!1),i=!1,h?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,i){var r;if(n[t].isActive===i)return Promise.resolve();null===(r=e.variantChildren)||void 0===r||r.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,i)})),n[t].isActive=i;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=El(),i=!0}}}function Cl(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!jr(t,e)}function Al(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function El(){return{animate:Al(!0),whileInView:Al(),whileHover:Al(),whileTap:Al(),whileDrag:Al(),whileFocus:Al(),exit:Al()}}class Pl{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Nl=0;const Rl={animation:{Feature:class extends Pl{constructor(e){super(e),e.animationState||(e.animationState=Sl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Lr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Pl{constructor(){super(...arguments),this.id=Nl++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const i=this.node.animationState.setActive("exit",!e);t&&!e&&i.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Dl=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Ml(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Ol=e=>t=>Dl(t)&&e(t,Ml(t));function Ll(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}function Vl(e,t,n,i){return Ll(e,t,Ol(n),i)}const jl=(e,t)=>Math.abs(e-t);class Il{constructor(e,t,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Bl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=jl(e.x,t.x),i=jl(e.y,t.y);return Math.sqrt(n**2+i**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:i}=e,{timestamp:r}=ao;this.history.push({...i,timestamp:r});const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Ul(t,this.transformPagePoint),oo.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:r}=this.handlers;if(this.dragSnapToOrigin&&r&&r(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Bl("pointercancel"===e.type?this.lastMoveEventInfo:Ul(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),i&&i(e,o)},!Dl(e))return;this.dragSnapToOrigin=r,this.handlers=t,this.transformPagePoint=n,this.contextWindow=i||window;const o=Ul(Ml(e),this.transformPagePoint),{point:s}=o,{timestamp:a}=ao;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Bl(o,this.history)),this.removeListeners=ga(Vl(this.contextWindow,"pointermove",this.handlePointerMove),Vl(this.contextWindow,"pointerup",this.handlePointerUp),Vl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),so(this.updatePoint)}}function Ul(e,t){return t?{point:t(e.point)}:e}function Fl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bl({point:e},t){return{point:e,delta:Fl(e,$l(t)),offset:Fl(e,zl(t)),velocity:Hl(t,.1)}}function zl(e){return e[0]}function $l(e){return e[e.length-1]}function Hl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const r=$l(e);for(;n>=0&&(i=e[n],!(r.timestamp-i.timestamp>Wr(t)));)n--;if(!i)return{x:0,y:0};const o=Kr(r.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const s={x:(r.x-i.x)/o,y:(r.y-i.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function ql(e){let t=null;return()=>{const n=()=>{t=null};return null===t&&(t=e,n)}}const Wl=ql("dragHorizontal"),Kl=ql("dragVertical");function Yl(e){let t=!1;if("y"===e)t=Kl();else if("x"===e)t=Wl();else{const e=Wl(),n=Kl();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Xl(){const e=Yl(!0);return!e||(e(),!1)}function Gl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const Jl=.9999,Zl=1.0001,Ql=-.01,ec=.01;function tc(e){return e.max-e.min}function nc(e,t,n,i=.5){e.origin=i,e.originPoint=va(t.min,t.max,e.origin),e.scale=tc(n)/tc(t),e.translate=va(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Jl&&e.scale<=Zl||isNaN(e.scale))&&(e.scale=1),(e.translate>=Ql&&e.translate<=ec||isNaN(e.translate))&&(e.translate=0)}function ic(e,t,n,i){nc(e.x,t.x,n.x,i?i.originX:void 0),nc(e.y,t.y,n.y,i?i.originY:void 0)}function rc(e,t,n){e.min=n.min+t.min,e.max=e.min+tc(t)}function oc(e,t,n){e.min=t.min-n.min,e.max=e.min+tc(t)}function sc(e,t,n){oc(e.x,t.x,n.x),oc(e.y,t.y,n.y)}function ac(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function lc(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}const cc=.35;function dc(e,t,n){return{min:uc(e,t),max:uc(e,n)}}function uc(e,t){return"number"==typeof e?e:e[t]||0}const hc=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),pc=()=>({x:{min:0,max:0},y:{min:0,max:0}});function mc(e){return[e("x"),e("y")]}function fc({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function gc(e){return void 0===e||1===e}function yc({scale:e,scaleX:t,scaleY:n}){return!gc(e)||!gc(t)||!gc(n)}function vc(e){return yc(e)||bc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bc(e){return wc(e.x)||wc(e.y)}function wc(e){return e&&"0%"!==e}function xc(e,t,n){return n+t*(e-n)}function _c(e,t,n,i,r){return void 0!==r&&(e=xc(e,r,i)),xc(e,n,i)+t}function kc(e,t=0,n=1,i,r){e.min=_c(e.min,t,n,i,r),e.max=_c(e.max,t,n,i,r)}function Tc(e,{x:t,y:n}){kc(e.x,t.translate,t.scale,t.originPoint),kc(e.y,n.translate,n.scale,n.originPoint)}const Sc=.999999999999,Cc=1.0000000000001;function Ac(e,t){e.min=e.min+t,e.max=e.max+t}function Ec(e,t,n,i,r=.5){kc(e,t,n,va(e.min,e.max,r),i)}function Pc(e,t){Ec(e.x,t.x,t.scaleX,t.scale,t.originX),Ec(e.y,t.y,t.scaleY,t.scale,t.originY)}function Nc(e,t){return fc(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(e.getBoundingClientRect(),t))}const Rc=({current:e})=>e?e.ownerDocument.defaultView:null,Dc=new WeakMap;class Mc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=pc(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Il(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Ml(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:i,onDragStart:r}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Yl(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mc((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Uo.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[e];if(i){t=tc(i)*(parseFloat(t)/100)}}}this.originPoint[e]=t})),r&&oo.postRender((()=>r(e,t))),fl(this.visualElement,"transform");const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:r,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(i&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&r&&r(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>mc((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Rc(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=t;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&oo.postRender((()=>r(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:i}=this.getProps();if(!n||!Oc(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},i){return void 0!==t&&e<t?e=i?va(t,e,i.min):Math.max(e,t):void 0!==n&&e>n&&(e=i?va(n,e,i.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,r=this.constraints;t&&Gl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(e,{top:t,left:n,bottom:i,right:r}){return{x:ac(e.x,n,r),y:ac(e.y,t,i)}}(i.layoutBox,t),this.elastic=function(e=cc){return!1===e?e=0:!0===e&&(e=cc),{x:dc(e,"left","right"),y:dc(e,"top","bottom")}}(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&mc((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Gl(e))return!1;const n=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=function(e,t,n){const i=Nc(e,n),{scroll:r}=t;return r&&(Ac(i.x,r.offset.x),Ac(i.y,r.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:lc(e.x,t.x),y:lc(e.y,t.y)}}(i.layout.layoutBox,r);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=fc(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=mc((s=>{if(!Oc(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const c=i?200:1e6,d=i?40:1e7,u={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...l};return this.startAxisValueAnimation(s,u)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return fl(this.visualElement,e),n.start(nl(e,n,0,t,this.visualElement,!1))}stopAnimation(){mc((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){mc((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),i=n[t];return i||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){mc((t=>{const{drag:n}=this.getProps();if(!Oc(t,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(t);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[t];r.set(e[t]-va(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Gl(t)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mc((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();i[e]=function(e,t){let n=.5;const i=tc(e),r=tc(t);return r>i?n=ya(t.min,t.max-i,e.min):i>r&&(n=ya(e.min,e.max-r,t.min)),Mo(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),mc((t=>{if(!Oc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:r,max:o}=this.constraints[t];n.set(va(r,o,i[t]))}))}addListeners(){if(!this.visualElement.current)return;Dc.set(this.visualElement,this);const e=Vl(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Gl(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),oo.read(t);const r=Ll(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(mc((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{r(),e(),i(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=cc,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:s}}}function Oc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Lc=e=>(t,n)=>{e&&oo.postRender((()=>e(t,n)))};const Vc=F(null);function jc(){const e=ue(Vc);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:i}=e,r=function(){var e=re(H++,11);if(!e.__){for(var t=q.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}();se((()=>i(r)),[]);const o=de((()=>n&&n(r)),[r,n]);return!t&&n?[!1,o]:[!0]}const Ic=F({}),Uc=F({}),Fc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Bc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const zc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Fo.test(e))return e;e=parseFloat(e)}return`${Bc(e,t.target.x)}% ${Bc(e,t.target.y)}%`}},$c={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,r=As.parse(e);if(r.length>5)return i;const o=As.createTransformer(e),s="number"!=typeof r[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;r[0+s]/=a,r[1+s]/=l;const c=va(a,l,.5);return"number"==typeof r[2+s]&&(r[2+s]/=c),"number"==typeof r[3+s]&&(r[3+s]/=c),o(r)}},Hc={};const{schedule:qc}=ro(queueMicrotask,!1);class Wc extends w{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:i}=this.props,{projection:r}=e;var o;o=Yc,Object.assign(Hc,o),r&&(t.group&&t.group.add(r),n&&n.register&&i&&n.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",(()=>{this.safeToRemove()})),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Fc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:i,isPresent:r}=this.props,o=n.projection;return o?(o.isPresent=r,i||e.layoutDependency!==t||void 0===t?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||oo.postRender((()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),qc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Kc(e){const[t,n]=jc(),i=ue(Ic);return z(Wc,{...e,layoutGroup:i,switchLayoutGroup:ue(Uc),isPresent:t,safeToRemove:n})}const Yc={borderRadius:{...zc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zc,borderTopRightRadius:zc,borderBottomLeftRadius:zc,borderBottomRightRadius:zc,boxShadow:$c},Xc=["TopLeft","TopRight","BottomLeft","BottomRight"],Gc=Xc.length,Jc=e=>"string"==typeof e?parseFloat(e):e,Zc=e=>"number"==typeof e||Fo.test(e);function Qc(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const ed=nd(0,.5,xo),td=nd(.5,.95,no);function nd(e,t,n){return i=>i<e?0:i>t?1:n(ya(e,t,i))}function id(e,t){e.min=t.min,e.max=t.max}function rd(e,t){id(e.x,t.x),id(e.y,t.y)}function od(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function sd(e,t,n,i,r){return e=xc(e-=t,1/n,i),void 0!==r&&(e=xc(e,1/r,i)),e}function ad(e,t,[n,i,r],o,s){!function(e,t=0,n=1,i=.5,r,o=e,s=e){Uo.test(t)&&(t=parseFloat(t),t=va(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=va(o.min,o.max,i);e===o&&(a-=t),e.min=sd(e.min,t,n,a,r),e.max=sd(e.max,t,n,a,r)}(e,t[n],t[i],t[r],t.scale,o,s)}const ld=["x","scaleX","originX"],cd=["y","scaleY","originY"];function dd(e,t,n,i){ad(e.x,t,ld,n?n.x:void 0,i?i.x:void 0),ad(e.y,t,cd,n?n.y:void 0,i?i.y:void 0)}function ud(e){return 0===e.translate&&1===e.scale}function hd(e){return ud(e.x)&&ud(e.y)}function pd(e,t){return e.min===t.min&&e.max===t.max}function md(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fd(e,t){return md(e.x,t.x)&&md(e.y,t.y)}function gd(e){return tc(e.x)/tc(e.y)}function yd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class vd{constructor(){this.members=[]}add(e){ol(this.members,e),e.scheduleRender()}remove(e){if(sl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let i=t;i>=0;i--){const e=this.members[i];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const bd=(e,t)=>e.depth-t.depth;class wd{constructor(){this.children=[],this.isDirty=!1}add(e){ol(this.children,e),this.isDirty=!0}remove(e){sl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bd),this.isDirty=!1,this.children.forEach(e)}}function xd(e){const t=ml(e)?e.get():e;return il(t)?t.toValue():t}const _d={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},kd="undefined"!=typeof window&&void 0!==window.MotionDebug,Td=["","X","Y","Z"],Sd={visibility:"hidden"};let Cd=0;function Ad(e,t,n,i){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Ed(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=pl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",oo,!(t||i))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Ed(i)}function Pd({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Cd++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,kd&&(_d.totalNodes=_d.resolvedTargetDeltas=_d.recalculatedProjection=0),this.nodes.forEach(Dd),this.nodes.forEach(Ud),this.nodes.forEach(Fd),this.nodes.forEach(Md),kd&&window.MotionDebug.record(_d)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new wd)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new al),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var i;this.isSVG=(i=t)instanceof SVGElement&&"svg"!==i.tagName,this.instance=t;const{layoutId:r,layout:o,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const i=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Hs.now(),i=({timestamp:r})=>{const o=r-n;o>=t&&(so(i),e(o-t))};return oo.read(i,!0),()=>so(i)}(i,250),Fc.hasAnimatedSinceResize&&(Fc.hasAnimatedSinceResize=!1,this.nodes.forEach(Id))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&s&&(r||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const r=this.options.transition||s.getDefaultTransition()||Wd,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!fd(this.targetLayout,i)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Zr(r,"layout"),onPlay:o,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Id(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,so(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Bd),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ed(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let r=0;r<this.path.length;r++){const e=this.path[r];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ld);this.isUpdating||this.nodes.forEach(Vd),this.isUpdating=!1,this.nodes.forEach(jd),this.nodes.forEach(Nd),this.nodes.forEach(Rd),this.clearAllSnapshots();const e=Hs.now();ao.delta=Mo(0,1e3/60,e-ao.timestamp),ao.timestamp=e,ao.isProcessing=!0,lo.update.process(ao),lo.preRender.process(ao),lo.render.process(ao),ao.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Od),this.sharedNodes.forEach(zd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,oo.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){oo.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=pc(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=i(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!r)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!hd(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;e&&(t||vc(this.latestValues)||o)&&(r(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var i;return e&&(n=this.removeTransform(n)),Xd((i=n).x),Xd(i.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return pc();const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(Jd))){const{scroll:e}=this.root;e&&(Ac(n.x,e.offset.x),Ac(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=pc();if(rd(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let i=0;i<this.path.length;i++){const t=this.path[i],{scroll:r,options:o}=t;t!==this.root&&r&&o.layoutScroll&&(r.wasRoot&&rd(n,e),Ac(n.x,r.offset.x),Ac(n.y,r.offset.y))}return n}applyTransform(e,t=!1){const n=pc();rd(n,e);for(let i=0;i<this.path.length;i++){const e=this.path[i];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&Pc(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),vc(e.latestValues)&&Pc(n,e.latestValues)}return vc(this.latestValues)&&Pc(n,this.latestValues),n}removeTransform(e){const t=pc();rd(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!vc(e.latestValues))continue;yc(e.latestValues)&&e.updateSnapshot();const i=pc();rd(i,e.measurePageBox()),dd(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,i)}return vc(this.latestValues)&&dd(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ao.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(e||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(this.layout&&(r||o)){if(this.resolvedRelativeTargetAt=ao.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pc(),this.relativeTargetOrigin=pc(),sc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),rd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=pc(),this.targetWithTransforms=pc()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,rc(s.x,a.x,l.x),rc(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):rd(this.target,this.layout.layoutBox),Tc(this.target,this.targetDelta)):rd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=pc(),this.relativeTargetOrigin=pc(),sc(this.relativeTargetOrigin,this.target,e.target),rd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}kd&&_d.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!yc(this.parent.latestValues)&&!bc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===ao.timestamp&&(i=!1),i)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;rd(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,i=!1){const r=n.length;if(!r)return;let o,s;t.x=t.y=1;for(let a=0;a<r;a++){o=n[a],s=o.projectionDelta;const{visualElement:r}=o.options;r&&r.props.style&&"contents"===r.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Pc(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Tc(e,s)),i&&vc(o.latestValues)&&Pc(e,o.latestValues))}t.x<Cc&&t.x>Sc&&(t.x=1),t.y<Cc&&t.y>Sc&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=pc());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(od(this.prevProjectionDelta.x,this.projectionDelta.x),od(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ic(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&yd(this.projectionDelta.x,this.prevProjectionDelta.x)&&yd(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),kd&&_d.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hc(),this.projectionDelta=hc(),this.projectionDeltaWithTransform=hc()}setAnimationOrigin(e,t=!1){const n=this.snapshot,i=n?n.latestValues:{},r={...this.latestValues},o=hc();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=pc(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(qd));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,h,p,m,f,g;$d(o.x,e.x,n),$d(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sc(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=s,g=n,Hd(p.x,m.x,f.x,g),Hd(p.y,m.y,f.y,g),u&&(l=this.relativeTarget,h=u,pd(l.x,h.x)&&pd(l.y,h.y))&&(this.isProjectionDirty=!1),u||(u=pc()),rd(u,this.relativeTarget)),a&&(this.animationValues=r,function(e,t,n,i,r,o){r?(e.opacity=va(0,void 0!==n.opacity?n.opacity:1,ed(i)),e.opacityExit=va(void 0!==t.opacity?t.opacity:1,0,td(i))):o&&(e.opacity=va(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Gc;s++){const r=`border${Xc[s]}Radius`;let o=Qc(t,r),a=Qc(n,r);void 0===o&&void 0===a||(o||(o=0),a||(a=0),0===o||0===a||Zc(o)===Zc(a)?(e[r]=Math.max(va(Jc(o),Jc(a),i),0),(Uo.test(a)||Uo.test(o))&&(e[r]+="%")):e[r]=a)}(t.rotate||n.rotate)&&(e.rotate=va(t.rotate||0,n.rotate||0,i))}(r,i,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(so(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=oo.update((()=>{Fc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const i=ml(e)?e:cl(e);return i.start(nl("",i,t,n)),i.animation}(0,1e3,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:i,latestValues:r}=e;if(t&&n&&i){if(this!==e&&this.layout&&i&&Gd(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||pc();const t=tc(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const i=tc(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+i}rd(t,n),Pc(t,r),ic(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new vd);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const i={};n.z&&Ad("z",e,i,this.animationValues);for(let r=0;r<Td.length;r++)Ad(`rotate${Td[r]}`,e,i,this.animationValues),Ad(`skew${Td[r]}`,e,i,this.animationValues);e.render();for(const r in i)e.setStaticValue(r,i[r]),this.animationValues&&(this.animationValues[r]=i[r]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Sd;const i={visibility:""},r=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=xd(null==e?void 0:e.pointerEvents)||"",i.transform=r?r(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=xd(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!vc(this.latestValues)&&(t.transform=r?r({},""):"none",this.hasProjected=!1),t}const s=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(e,t,n){let i="";const r=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((r||o||s)&&(i=`translate3d(${r}px, ${o}px, ${s}px) `),1===t.x&&1===t.y||(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:r,rotateY:o,skewX:s,skewY:a}=n;e&&(i=`perspective(${e}px) ${i}`),t&&(i+=`rotate(${t}deg) `),r&&(i+=`rotateX(${r}deg) `),o&&(i+=`rotateY(${o}deg) `),s&&(i+=`skewX(${s}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),r&&(i.transform=r(s,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:i.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const c in Hc){if(void 0===s[c])continue;const{correct:e,applyTo:t}=Hc[c],n="none"===i.transform?s[c]:e(s[c],o);if(t){const e=t.length;for(let r=0;r<e;r++)i[t[r]]=n}else i[c]=n}return this.options.layoutId&&(i.pointerEvents=o===this?xd(null==e?void 0:e.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Ld),this.root.sharedNodes.clear()}}}function Nd(e){e.updateLayout()}function Rd(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:i}=e.layout,{animationType:r}=e.options,o=n.source!==e.layout.source;"size"===r?mc((e=>{const i=o?n.measuredBox[e]:n.layoutBox[e],r=tc(i);i.min=t[e].min,i.max=i.min+r})):Gd(r,n.layoutBox,t)&&mc((i=>{const r=o?n.measuredBox[i]:n.layoutBox[i],s=tc(t[i]);r.max=r.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[i].max=e.relativeTarget[i].min+s)}));const s=hc();ic(s,t,n.layoutBox);const a=hc();o?ic(a,e.applyTransform(i,!0),n.measuredBox):ic(a,t,n.layoutBox);const l=!hd(s);let c=!1;if(!e.resumeFrom){const i=e.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:r,layout:o}=i;if(r&&o){const s=pc();sc(s,n.layoutBox,r.layoutBox);const a=pc();sc(a,t,o.layoutBox),fd(s,a)||(c=!0),i.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=i)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Dd(e){kd&&_d.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Md(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Od(e){e.clearSnapshot()}function Ld(e){e.clearMeasurements()}function Vd(e){e.isLayoutDirty=!1}function jd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Id(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ud(e){e.resolveTargetDelta()}function Fd(e){e.calcProjection()}function Bd(e){e.resetSkewAndRotation()}function zd(e){e.removeLeadSnapshot()}function $d(e,t,n){e.translate=va(t.translate,0,n),e.scale=va(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Hd(e,t,n,i){e.min=va(t.min,n.min,i),e.max=va(t.max,n.max,i)}function qd(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Wd={duration:.45,ease:[.4,0,.1,1]},Kd=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yd=Kd("applewebkit/")&&!Kd("chrome/")?Math.round:no;function Xd(e){e.min=Yd(e.min),e.max=Yd(e.max)}function Gd(e,t,n){return"position"===e||"preserve-aspect"===e&&(i=gd(t),r=gd(n),o=.2,!(Math.abs(i-r)<=o));var i,r,o}function Jd(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Zd=Pd({attachResizeListener:(e,t)=>Ll(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Qd={current:void 0},eu=Pd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Qd.current){const e=new Zd({});e.mount(window),e.setOptions({layoutScroll:!0}),Qd.current=e}return Qd.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),tu={pan:{Feature:class extends Pl{constructor(){super(...arguments),this.removePointerDownListener=no}onPointerDown(e){this.session=new Il(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Lc(e),onStart:Lc(t),onMove:n,onEnd:(e,t)=>{delete this.session,i&&oo.postRender((()=>i(e,t)))}}}mount(){this.removePointerDownListener=Vl(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Pl{constructor(e){super(e),this.removeGroupControls=no,this.removeListeners=no,this.controls=new Mc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||no}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:eu,MeasureLayout:Kc}};function nu(e,t){const n=t?"pointerenter":"pointerleave",i=t?"onHoverStart":"onHoverEnd";return Vl(e.current,n,((n,r)=>{if("touch"===n.pointerType||Xl())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const s=o[i];s&&oo.postRender((()=>s(n,r)))}),{passive:!e.getProps()[i]})}const iu=(e,t)=>!!t&&(e===t||iu(e,t.parentElement));function ru(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ml(n))}const ou=new WeakMap,su=new WeakMap,au=e=>{const t=ou.get(e.target);t&&t(e)},lu=e=>{e.forEach(au)};function cu(e,t,n){const i=function({root:e,...t}){const n=e||document;su.has(n)||su.set(n,{});const i=su.get(n),r=JSON.stringify(t);return i[r]||(i[r]=new IntersectionObserver(lu,{root:e,...t})),i[r]}(t);return ou.set(e,n),i.observe(e),()=>{ou.delete(e),i.unobserve(e)}}const du={some:0,all:1};const uu={inView:{Feature:class extends Pl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:i="some",once:r}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:du[i]};return cu(this.node.current,o,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,r&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=t?n:i;o&&o(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Pl{constructor(){super(...arguments),this.removeStartListeners=no,this.removeEndListeners=no,this.removeAccessibleListeners=no,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=Vl(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:r}=this.node.getProps(),o=r||iu(this.node.current,e.target)?n:i;o&&oo.update((()=>o(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),r=Vl(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ga(i,r),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Ll(this.node.current,"keydown",(e=>{if("Enter"!==e.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Ll(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&ru("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&oo.postRender((()=>n(e,t)))}))})),ru("down",((e,t)=>{this.startPress(e,t)}))})),t=Ll(this.node.current,"blur",(()=>{this.isPressing&&ru("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=ga(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&oo.postRender((()=>n(e,t)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Xl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&oo.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Vl(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Ll(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ga(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Pl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ga(Ll(this.node.current,"focus",(()=>this.onFocus())),Ll(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Pl{mount(){this.unmount=ga(nu(this.node,!0),nu(this.node,!1))}unmount(){}}}},hu={layout:{ProjectionNode:eu,MeasureLayout:Kc}},pu=F({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),mu=F({}),fu="undefined"!=typeof window,gu=fu?ae:se,yu=F({strict:!1});function vu(e,t,n,i,r){var o,s;const{visualElement:a}=ue(mu),l=ue(yu),c=ue(Vc),d=ue(pu).reducedMotion,u=le();i=i||l.renderer,!u.current&&i&&(u.current=i(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d}));const h=u.current,p=ue(Uc);!h||h.projection||!r||"html"!==h.type&&"svg"!==h.type||function(e,t,n,i){const{layoutId:r,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:bu(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Gl(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:c})}(u.current,n,r,p);const m=le(!1);qi((()=>{h&&m.current&&h.update(n,c)}));const f=n[hl],g=le(Boolean(f)&&!(null===(o=window.MotionHandoffIsComplete)||void 0===o?void 0:o.call(window,f))&&(null===(s=window.MotionHasOptimisedAnimation)||void 0===s?void 0:s.call(window,f)));return gu((()=>{h&&(m.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),qc.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())})),se((()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,f)})),g.current=!1))})),h}function bu(e){if(e)return!1!==e.options.allowProjection?e.projection:bu(e.parent)}function wu(e,t,n){return de((i=>{i&&e.mount&&e.mount(i),t&&(i?t.mount(i):t.unmount()),n&&("function"==typeof n?n(i):Gl(n)&&(n.current=i))}),[t])}function xu(e){return Lr(e.animate)||$r.some((t=>Ir(e[t])))}function _u(e){return Boolean(xu(e)||e.variants)}function ku(e){const{initial:t,animate:n}=function(e,t){if(xu(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Ir(t)?t:void 0,animate:Ir(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,ue(mu));return ce((()=>({initial:t,animate:n})),[Tu(t),Tu(n)])}function Tu(e){return Array.isArray(e)?e.join(" "):e}const Su={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Cu={};for(const Jh in Su)Cu[Jh]={isEnabled:e=>Su[Jh].some((t=>!!e[t]))};const Au=Symbol.for("motionComponentSymbol");function Eu({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:r}){e&&function(e){for(const t in e)Cu[t]={...Cu[t],...e[t]}}(e);const o=function(e){function t(t){var n=vi({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=_i,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}((function(e,o){let s;const a={...ue(pu),...e,layoutId:Pu(e)},{isStatic:l}=a,c=ku(e),d=i(e,l);if(!l&&fu){ue(yu).strict;const e=function(e){const{drag:t,layout:n}=Cu;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(a);s=e.MeasureLayout,c.visualElement=vu(r,d,a,t,e.ProjectionNode)}return z(mu.Provider,{value:c,children:[s&&c.visualElement?z(s,{visualElement:c.visualElement,...a}):null,n(r,e,wu(d,c.visualElement,o),d,l,c.visualElement)]})}));return o[Au]=r,o}function Pu({layoutId:e}){const t=ue(Ic).id;return t&&void 0!==e?t+"-"+e:e}const Nu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ru(e){return"string"==typeof e&&!e.includes("-")&&!!(Nu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Du(e,{style:t,vars:n},i,r){Object.assign(e.style,t,r&&r.getProjectionStyles(i));for(const o in n)e.style.setProperty(o,n[o])}const Mu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ou(e,t,n,i){Du(e,t,void 0,i);for(const r in t.attrs)e.setAttribute(Mu.has(r)?r:ul(r),t.attrs[r])}function Lu(e,{layout:t,layoutId:n}){return qr.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Hc[e]||"opacity"===e)}function Vu(e,t,n){var i;const{style:r}=e,o={};for(const s in r)(ml(r[s])||t.style&&ml(t.style[s])||Lu(s,e)||void 0!==(null===(i=null==n?void 0:n.getValue(s))||void 0===i?void 0:i.liveStyle))&&(o[s]=r[s]);return o}function ju(e,t,n){const i=Vu(e,t,n);for(const r in e)if(ml(e[r])||ml(t[r])){i[-1!==Hr.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]}return i}const Iu=e=>(t,n)=>{const i=ue(mu),r=ue(Vc),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},i,r,o){const s={latestValues:Uu(i,r,o,e),renderState:t()};return n&&(s.mount=e=>n(i,e,s)),s}(e,t,i,r);return n?o():function(e){const t=le(null);return null===t.current&&(t.current=e()),t.current}(o)};function Uu(e,t,n,i){const r={},o=i(e,{});for(const h in o)r[h]=xd(o[h]);let{initial:s,animate:a}=e;const l=xu(e),c=_u(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let d=!!n&&!1===n.initial;d=d||!1===s;const u=d?a:s;if(u&&"boolean"!=typeof u&&!Lr(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const i=Fr(e,t[n]);if(i){const{transitionEnd:e,transition:t,...n}=i;for(const i in n){let e=n[i];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(r[i]=e)}for(const i in e)r[i]=e[i]}}}return r}const Fu=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Bu=()=>({...Fu(),attrs:{}}),zu=(e,t)=>t&&"number"==typeof e?t.transform(e):e,$u={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hu=Hr.length;function qu(e,t,n){const{style:i,vars:r,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(qr.has(l))s=!0;else if(Ao(l))r[l]=e;else{const t=zu(e,Ls[l]);l.startsWith("origin")?(a=!0,o[l]=t):i[l]=t}}if(t.transform||(s||n?i.transform=function(e,t,n){let i="",r=!0;for(let o=0;o<Hu;o++){const s=Hr[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=zu(a,Ls[s]);l||(r=!1,i+=`${$u[s]||s}(${e}) `),n&&(t[s]=e)}}return i=i.trim(),n?i=n(t,r?"":i):r&&(i="none"),i}(t,e.transform,n):i.transform&&(i.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;i.transformOrigin=`${e} ${t} ${n}`}}function Wu(e,t,n){return"string"==typeof e?e:Fo.transform(t+n*e)}const Ku={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yu={offset:"strokeDashoffset",array:"strokeDasharray"};function Xu(e,{attrX:t,attrY:n,attrScale:i,originX:r,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},d,u){if(qu(e,c,u),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==r||void 0!==o||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Wu(t,e.x,e.width)} ${Wu(n,e.y,e.height)}`}(m,void 0!==r?r:.5,void 0!==o?o:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&function(e,t,n=1,i=0,r=!0){e.pathLength=1;const o=r?Ku:Yu;e[o.offset]=Fo.transform(-i);const s=Fo.transform(t),a=Fo.transform(n);e[o.array]=`${s} ${a}`}(h,s,a,l,!1)}const Gu=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Ju={useVisualState:Iu({scrapeMotionValuesFromProps:ju,createRenderState:Bu,onMount:(e,t,{renderState:n,latestValues:i})=>{oo.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}})),oo.render((()=>{Xu(n,i,Gu(t.tagName),e.transformTemplate),Ou(t,n)}))}})},Zu={useVisualState:Iu({scrapeMotionValuesFromProps:Vu,createRenderState:Fu})};function Qu(e,t,n){for(const i in t)ml(t[i])||Lu(i,n)||(e[i]=t[i])}function eh(e,t){const n={};return Qu(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return ce((()=>{const n=Fu();return qu(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}function th(e,t){const n={},i=eh(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const nh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ih(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nh.has(e)}let rh=e=>!ih(e);try{(oh=require("@emotion/is-prop-valid").default)&&(rh=e=>e.startsWith("on")?!ih(e):oh(e))}catch(Gh){}var oh;function sh(e,t,n,i){const r=ce((()=>{const n=Bu();return Xu(n,t,Gu(i),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Qu(t,e.style,e),r.style={...t,...r.style}}return r}function ah(e=!1){return(t,n,i,{latestValues:r},o)=>{const s=(Ru(t)?sh:th)(n,r,o,t),a=function(e,t,n){const i={};for(const r in e)"values"===r&&"object"==typeof e.values||(rh(r)||!0===n&&ih(r)||!t&&!ih(r)||e.draggable&&r.startsWith("onDrag"))&&(i[r]=e[r]);return i}(n,"string"==typeof t,e),l=t!==b?{...a,...s,ref:i}:{},{children:c}=n;return y(t,{...l,children:ce((()=>ml(c)?c.get():c),[c])})}}function lh(e,t){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return Eu({...Ru(n)?Ju:Zu,preloadedFeatures:e,useRender:ah(i),createVisualElement:t,Component:n})}}const ch={current:null},dh={current:!1};const uh=new WeakMap,hh=[...Zo,fs,As],ph=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mh{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=os,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Hs.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,oo.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.blockInitialAnimation=Boolean(r),this.isControllingVariants=xu(t),this.isVariantNode=_u(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const u in d){const e=d[u];void 0!==a[u]&&ml(e)&&e.set(a[u],!1)}}mount(e){this.current=e,uh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),dh.current||function(){if(dh.current=!0,fu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ch.current=e.matches;e.addListener(t),t()}else ch.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ch.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uh.delete(this.current),this.projection&&this.projection.unmount(),so(this.notifyUpdate),so(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=qr.has(e),i=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&oo.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),r=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{i(),r(),o&&o(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Cu){const t=Cu[e];if(!t)continue;const{isEnabled:n,Feature:i}=t;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):pc()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<ph.length;n++){const t=ph[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const i=e["on"+t];i&&(this.propEventSubscriptions[t]=this.on(t,i))}this.prevMotionValues=function(e,t,n){for(const i in t){const r=t[i],o=n[i];if(ml(r))e.addValue(i,r);else if(ml(o))e.addValue(i,cl(r,{owner:e}));else if(o!==r)if(e.hasValue(i)){const t=e.getValue(i);!0===t.liveStyle?t.jump(r):t.hasAnimated||t.set(r)}else{const t=e.getStaticValue(i);e.addValue(i,cl(void 0!==t?t:r,{owner:e}))}}for(const i in n)void 0===t[i]&&e.removeValue(i);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=cl(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let i=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=i&&("string"==typeof i&&(So(i)||ko(i))?i=parseFloat(i):(r=i,!hh.find(Jo(r))&&As.test(t)&&(i=Is(e,t))),this.setBaseTarget(e,ml(i)?i.get():i)),ml(i)?i.get():i}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const r=Fr(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);r&&(i=r[e])}if(n&&void 0!==i)return i;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||ml(r)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new al),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class fh extends mh{constructor(){super(...arguments),this.KeyframeResolver=Fs}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class gh extends fh{constructor(){super(...arguments),this.type="html",this.renderInstance=Du}readValueFromInstance(e,t){if(qr.has(t)){const e=js(t);return e&&e.default||0}{const i=(n=e,window.getComputedStyle(n)),r=(Ao(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Nc(e,t)}build(e,t,n){qu(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Vu(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ml(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class yh extends fh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=pc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(qr.has(t)){const e=js(t);return e&&e.default||0}return t=Mu.has(t)?t:ul(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ju(e,t,n)}build(e,t,n){Xu(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,i){Ou(e,t,0,i)}mount(e){this.isSVGTag=Gu(e.tagName),super.mount(e)}}const vh=Or(lh({...Rl,...uu,...tu,...hu},((e,t)=>Ru(e)?new yh(t):new gh(t,{allowProjection:e!==b}))));var bh=(e=>(e.EmailAddress="EmailAddress",e.MobileNumber="MobileNumber",e.CustomerId="CustomerId",e))(bh||{});const wh=[{searchType:"EmailAddress",name:"Email Address",label:"emailAddress"},{searchType:"MobileNumber",name:"Mobile Number",label:"mobileNumber"},{searchType:"CustomerId",name:"PBA Customer Id",label:"customerId"}];var xh=(e=>(e.Established="Established",e.Unestablished="Unestablished",e))(xh||{});const _h=e=>!!/\+\d{1,14}$/.test(e),kh=e=>!!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),Th=()=>{const[e,t]=oe([]),[n,i]=oe(!1),[r,o]=oe(""),[s,a]=oe(!1),[l,c]=oe(!1),d=le(),u=le(),h=le({searchType:bh.MobileNumber,searchValue:""}),p=de((async(e,n)=>{let r;if(h.current={searchType:e,searchValue:n},i(!0),a(!1),o(""),e===bh.EmailAddress)r=(async e=>{if(!Jn)throw new Error("Api has not been initialized");const t=(e=>({emailAddress:e}))(e);return(await Jn.post("/_admin/v1.0/customers/emailAddress",JSON.stringify(t))).data})(n);else if(e===bh.MobileNumber)r=(async e=>{if(!Jn)throw new Error("Api has not been initialized");const t={mobileNumber:e},n=[],i=await Jn.post("/_admin/v1.0/customer/mobileNumber",JSON.stringify(t));return n.push(i.data),n})(n);else{if(e!==bh.CustomerId)return i(!1),void o("Invalid search type.");r=(async e=>{if(!Jn)throw new Error("Api has not been initialized");const t=[],n=await Jn.get(`/_admin/v1.0/customer/${e}`);return t.push(n.data),t})(n)}r.then((e=>{t(e),i(!1),e.length>0?(d.current=e[0].id,a(!0)):o("No results found!")})).catch((()=>{o("Error: Unable to Retrieve Customer Information."),i(!1)}))}),[]),m=async()=>{await p(h.current.searchType,h.current.searchValue)},f=async(e,t)=>{d.current&&(await(async(e,t,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={mobileNumber:t,reason:n};await Zn.put(`/_admin/v1.0/customers/${e}/mobileNumber`,JSON.stringify(i))})(d.current,e,t),h.current.searchType===bh.MobileNumber&&(h.current.searchValue=e),await m())},g=async(e,t)=>{d.current&&(await(async(e,t,n)=>{if(!Zn)throw new Error("Api has not been initialized");const i={emailAddress:t,reason:n};await Zn.put(`/_admin/v1.0/customers/${e}/emailAddress`,JSON.stringify(i))})(d.current,e,t),await m())};return{searchFilter:h,searchCustomerResult:e,isLoading:n,isModalOpen:l,error:r,showCustomerDetails:s,searchCustomer:p,handleAction:async t=>{const{action:n}=t;switch(n){case"workplaceUnlink":await(async t=>{e.find((e=>e.apolloProfiles.find((e=>e.profileId===t&&e.status===xh.Established))))&&(c(!0),u.current=t)})(t.profileId);break;case"updateMobileNumber":await f(t.mobileNumber,t.reason);break;case"updateEmailAddress":await g(t.emailAddress,t.reason);break;default:console.error(`Unhandled action type: ${n}`)}},handleModalConfirm:async()=>{u.current&&(async e=>{if(!Jn)throw new Error("Api has not been initialized");await Jn.put(`/_admin/v1.0/workplace-link/${e}/unestablish`)})(u.current).then((async()=>{await m()})).catch((()=>{o("Error: Unable to Unlink Profile.")})).finally((()=>{c(!1)}))},handleModalCancel:async()=>{c(!1)}}},Sh=()=>{const[e,t]=oe(bh.MobileNumber),[n,i]=oe("+61"),[r,o]=oe({emailAddress:"",mobileNumber:"",customerId:""}),s=de((()=>{o({emailAddress:"",mobileNumber:"",customerId:""})}),[]),a=de((e=>!!_h(e)||(o((e=>({...e,mobileNumber:"Invalid Mobile Number!"}))),!1)),[]),l=de(((e,t)=>{const n=e.trim();if(!n){const{label:e,name:n}=(e=>{const t=wh.find((t=>bh[t.searchType]===bh[e]));return t?{name:t.name,label:t.label}:{name:"",label:""}})(t);return o((t=>({...t,[e]:`Empty ${n}`}))),!1}return!(t===bh.EmailAddress&&!kh(n))||(o((e=>({...e,emailAddress:"Invalid Email Address!"}))),!1)}),[]);return{searchType:e,searchValue:n,errors:r,setSearchType:t,setSearchValue:i,clearErrors:s,isValidSearch:de(((e,t)=>{switch(e){case bh.EmailAddress:case bh.CustomerId:return l(t,e);case bh.MobileNumber:return a(t);default:return!1}}),[l,a])}},Ch=({labelText:e,name:t,type:n,value:i,pattern:r,className:o,allowedKeyPattern:s,required:a,onClick:l,onChange:c,...d})=>{const u=de((e=>{s&&!s.test(e.key)&&e.preventDefault()}),[s]);return z(b,{children:[e&&z("label",{className:"block text-sm font-bold text-gray-700",children:e}),z("input",{required:a??!1,className:`block rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm ${o}`,name:t,type:n,value:i,onKeyPress:u,pattern:r,onClick:l,onChange:c,...d})]})},Ah=({message:e,className:t,onClick:n})=>z("div",{className:t,onClick:n,children:e}),Eh=e=>{const{searchType:t,searchValue:n,errors:i,setSearchType:r,setSearchValue:o,clearErrors:s,isValidSearch:a}=Sh(),[l,c]=oe(!0),d=()=>{s(),c(!1)},u=e=>{const t=e.currentTarget;c(!1),o(t.value),s()};return z(b,{children:z("div",{className:"flex flex-col p-2",children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Search for PBA Customer with Email Address, Mobile Number or CustomerId :"}),z("form",{className:"w-1/3",onSubmit:i=>{i.preventDefault(),a(t,n)&&(c(!0),e.onSubmit(t,n))},children:[z("select",{className:"mt-2 block sm:w-1/2 rounded-md border-0 py-1.5 pl-3 pr-10 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 text-sm leading-6",name:"searchType",id:"searchtype",value:t,onChange:e=>{s();const t=e.currentTarget.value;r(t),o("")},"data-testid":"select",children:wh.map((e=>z("option",{value:e.searchType,children:e.name},e.searchType)))}),z("div",{className:"sm:flex justify-between sm:mt-6 mt-2",children:[t===bh.EmailAddress&&z(Ch,{labelText:"Email Address",name:"emailAddress",placeholder:"users@email.com",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),t===bh.MobileNumber&&z(Ch,{allowedKeyPattern:/[0-9+]/,labelText:"Mobile Number",name:"mobileNumber",placeholder:"+619999999999",type:"tel",value:n,className:"sm:w-3/5",onClick:d,onChange:u}),t===bh.CustomerId&&z(Ch,{labelText:"PBA Customer Id",name:"customerId",placeholder:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",type:"text",value:n,className:"sm:w-3/5",onClick:d,onChange:u})]}),z("div",{className:"mt-2",children:Object.values(i).map(((e,t)=>z(Ah,{message:e,className:"text-sm text-red-600 sm:text-right"},t)))}),z("div",{className:"sm:flex justify-end sm:mt-6",children:z("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none "+(l?"bg-gray-400 cursor-not-allowed":""),disabled:l,children:"Search"})})]})]})})},Ph=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})),Nh=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})),Rh=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,...e},y("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})),Dh=e=>y("svg",{fill:"#000000",width:"800px",height:"800px",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M304.083 405.907c4.686 4.686 4.686 12.284 0 16.971l-44.674 44.674c-59.263 59.262-155.693 59.266-214.961 0-59.264-59.265-59.264-155.696 0-214.96l44.675-44.675c4.686-4.686 12.284-4.686 16.971 0l39.598 39.598c4.686 4.686 4.686 12.284 0 16.971l-44.675 44.674c-28.072 28.073-28.072 73.75 0 101.823 28.072 28.072 73.75 28.073 101.824 0l44.674-44.674c4.686-4.686 12.284-4.686 16.971 0l39.597 39.598zm-56.568-260.216c4.686 4.686 12.284 4.686 16.971 0l44.674-44.674c28.072-28.075 73.75-28.073 101.824 0 28.072 28.073 28.072 73.75 0 101.823l-44.675 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.598 39.598c4.686 4.686 12.284 4.686 16.971 0l44.675-44.675c59.265-59.265 59.265-155.695 0-214.96-59.266-59.264-155.695-59.264-214.961 0l-44.674 44.674c-4.686 4.686-4.686 12.284 0 16.971l39.597 39.598zm234.828 359.28l22.627-22.627c9.373-9.373 9.373-24.569 0-33.941L63.598 7.029c-9.373-9.373-24.569-9.373-33.941 0L7.029 29.657c-9.373 9.373-9.373 24.569 0 33.941l441.373 441.373c9.373 9.372 24.569 9.372 33.941 0z"})),Mh=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"green",className:"w-5 h-5",...e},y("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"})),Oh=e=>y("svg",{className:"feather feather-edit",fill:"none",height:24,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),y("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})),Lh=e=>{const t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset()).toISOString().substring(0,10)},Vh=e=>{const[t,n]=oe(e.data.apolloProfiles.length>0),i=e.data.apolloProfiles.length>0,r=ce((()=>e.data.apolloProfiles.slice().sort(((e,t)=>{const n=e.status.localeCompare(t.status);return 0!==n?n:e.profileId.localeCompare(t.profileId)}))),[e.data.apolloProfiles]),o=()=>z(b,{children:z(t?Nh:Ph,{className:"h-6 w-6 border-0 cursor-pointer"})});return z(b,{children:[z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"whitespace-nowrap px-2 text-sm",children:z("span",{onClick:()=>{i&&n(!t)},children:[!i&&z(Rh,{className:"h-6 w-6 border-0"}),i&&z(o,{})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.id}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.name?.firstName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.name?.lastName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[e.data.email?.value,e.data?.email?.isVerified&&z(Mh,{className:"h-4 w-4 border-0"}),e.searchType!==bh.EmailAddress&&z("span",{onClick:()=>e.onEdit("emailAddress"),children:z(Oh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("div",{className:"flex justify-between items-center",children:[e.data.mobileNumber,e.searchType!==bh.EmailAddress&&z("span",{onClick:()=>e.onEdit("mobileNumber"),children:z(Oh,{className:"h-4 w-4 ml-2 border-0 cursor-pointer hover:text-blue-500"})})]})}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?.address.state}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?.dateOfBirth.substring(0,10)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:e.data.kyc?"True":"False"})]},e.key),t&&z(b,{children:z("tr",{className:"divide-x divide-gray-200",children:z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",colspan:10,children:[z("label",{className:"block text-sm font-bold text-gray-700",children:"Apollo Profiles"}),z("div",{className:"-mx-4 mt-4 overflow-hidden shadow ring-1 ring-black ring-opacity-5 sm:-mx-6 md:mx-0 md:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Profile ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Partner ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Status"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Date"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Account Name"}),z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:r.map(((t,n)=>z("tr",{className:"divide-x divide-gray-200",children:[z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.profileId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.partnerId}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.status}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:Lh(t.statusUpdatedAtUtc)}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:t.accountName}),z("td",{className:"text-gray-500 px-6 py-4 whitespace-nowrap text-sm",children:z("span",{onClick:()=>e.onAction({action:"workplaceUnlink",profileId:t.profileId}),children:z(Dh,{className:"h-6 w-6 border-0 "+(t.status===xh.Established?"cursor-pointer":"cursor-not-allowed opacity-50")})})})]},n)))})]})})]})})})]})},jh=e=>z("div",{className:"-mx-4 mt-8 sm:-mx-4",children:z("div",{className:"inline-block min-w-full overflow-x-auto shadow border-b border-gray-200 align-middle sm:rounded-lg",children:z("table",{className:"min-w-full divide-y divide-gray-500",children:[z("thead",{className:"bg-gray-50",children:z("tr",{className:"divide-x divide-gray-200",children:[z("th",{className:"relative py-3.5 pl-3 pr-4 sm:pr-6",children:z("span",{className:"sr-only",children:"Action"})}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Customer ID"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"First Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Last Name"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Email"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"Mobile"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"State"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"DOB"}),z("th",{className:"px-6 py-4 text-left text-sm font-semibold text-gray-900 uppercase tracking-wider",children:"KYC Check"})]})}),z("tbody",{className:"divide-y divide-gray-200 bg-white",children:e.data.map(((t,n)=>z(Vh,{title:"Apollo Profiles",data:t,searchType:e.searchType,onAction:e.onAction,onEdit:e.onEdit},n)))})]})})}),Ih=e=>{const{inputValue:t,reason:n,isCustomerIdentityVerified:i,messages:r,isSubmitting:o,setInputValue:s,setReason:a,setIsVerifiedCustomerIdentity:l,clearMessages:c,handleSubmit:d}=((e,t)=>{const[n,i]=oe(e.value),[r,o]=oe(!1),[s,a]=oe(""),[l,c]=oe([]),[d,u]=oe(!1),h=de((()=>{c([])}),[]),p=de((()=>{o(!1),a("")}),[]),m=de(((e,t)=>{c((n=>[...n,{text:e,type:t}]))}),[]),f=de((()=>""!==s.trim()),[s]),g=de((()=>!("emailAddress"===e.type&&!kh(n)&&(m("Please enter a valid email address.","error"),1)||"mobileNumber"===e.type&&!_h(n)&&(m("Please enter a valid mobile number.","error"),1)||!f()&&(m("Reason cannot be empty.","error"),1))),[e.type,n,m,f]),y=de((t=>{if(t instanceof Vn){const n=t.response?.data?.message||`Failed to update ${"emailAddress"===e.type?"email address":"mobile number"}.`;m(n,"error")}else m("An unexpected error occurred.","error")}),[m,e.type]),v=de((async()=>{if(h(),g()){u(!0);try{await t("emailAddress"===e.type?{action:"updateEmailAddress",emailAddress:n,reason:s}:{action:"updateMobileNumber",mobileNumber:n,reason:s}),m(("emailAddress"===e.type?"Email Address":"Mobile Number")+" Updated.","success"),p()}catch(i){y(i)}finally{u(!1)}}}),[h,g,e.type,p,t,n,s,m,y]);return{inputValue:n,reason:s,isCustomerIdentityVerified:r,messages:l,isSubmitting:d,setIsSubmitting:u,setInputValue:i,setReason:a,setIsVerifiedCustomerIdentity:o,clearMessages:h,handleSubmit:v}})(e.formData,e.onSubmit),u=e=>{const t=e.currentTarget;s(t.value),c()};return z(b,{children:z("div",{className:"flex flex-row mt-6 ml-4",children:z("form",{onSubmit:async e=>{e.preventDefault(),await d()},children:z("div",{className:"sm:grid sm:grid-cols-6 sm:items-baseline sm:gap-4 mt-4",children:[z("label",{className:"col-start-1 block text-sm font-bold text-gray-700",children:"mobileNumber"===e.formData.type?"Mobile Number":"Email Address"}),z("div",{className:"sm:col-start-2",children:["mobileNumber"===e.formData.type&&z(Ch,{allowedKeyPattern:/[0-9+]/,name:"mobileNumber",placeholder:"",type:"tel",value:t,className:"w-full",onClick:c,pattern:"[0-9+]*",onChange:u}),"emailAddress"===e.formData.type&&z(Ch,{name:"emailAddress",placeholder:"",type:"email",value:t,className:"w-full",onClick:c,onChange:u})]}),z("div",{className:"col-start-4 col-span-3 row-span-3 flex-col text-left",children:r.map(((e,t)=>z(Ah,{message:e.text,className:"text-sm text-left font-semibold "+("error"===e.type?"text-red-600":"text-green-600")},t)))}),z("div",{className:"col-start-2 col-span-2 relative flex items-start",children:[z("div",{className:"flex h-6 items-center",children:z("input",{id:"verifiedCheckbox","aria-describedby":"verified-customer-identity",name:"verifiedCheckbox",type:"checkbox",checked:i,onChange:e=>{const t=e.currentTarget;l(t.checked),c()},className:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600",required:!0})}),z("div",{className:"ml-2 text-sm leading-6",children:z("label",{className:"font-medium text-gray-900",children:"Verified Customer Identity"})})]}),z("div",{className:"col-start-2",children:z(Ch,{name:"reason",placeholder:"Zendesk Ticket ID",type:"text",value:n,className:"w-full",onClick:c,onChange:e=>{const t=e.currentTarget;a(t.value),c()}})}),z("div",{className:"sm:row-start-1 sm:col-start-3 sm:flex sm:justify-center sm:mt-0 mt-2",children:z("button",{type:"submit",className:"bg-indigo-500 hover:bg-indigo-900 text-white font-bold py-1 px-4 rounded focus:outline-none",disabled:o,children:"Update"})})]})})})})},Uh=()=>z("div",{className:"w-full p-4 space-y-4 animate-pulse",children:[z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"}),z("div",{className:"w-1/4 h-4 bg-gray-300 rounded"})]}),[...Array(5)].map(((e,t)=>z("div",{className:"flex space-x-4",children:[z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"}),z("div",{className:"w-1/4 h-6 bg-gray-200 rounded"})]},t)))]}),Fh=()=>{const{searchCustomerResult:e,isLoading:t,error:n,showCustomerDetails:i,isModalOpen:r,searchFilter:o,searchCustomer:s,handleAction:a,handleModalConfirm:l,handleModalCancel:c}=Th(),[d,u]=oe("searchResult"),[h,p]=oe(1);return z(b,{children:["searchResult"===d&&z(b,{children:[z(vh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:[z(Eh,{onSubmit:s}),!t&&i&&z(vh.div,{initial:{y:-50,opacity:0},animate:{y:0,opacity:1},transition:{duration:.5,delay:.2},children:z(jh,{data:e,searchType:o.current.searchType,onAction:a,onEdit:e=>{p(1),u("mobileNumber"===e?"editMobileNumber":"editEmailAddress")}})},"customerTable")]},d),t&&z(Uh,{}),n&&z("div",{className:"p-4 mt-2 text-red-700",children:n})]}),"searchResult"!==d&&z(vh.div,{initial:{x:100*h,opacity:0},animate:{x:0,opacity:1},exit:{x:-100*h,opacity:0},transition:{duration:.5},children:z(Zi,{buttonName:"Customer Management",onClick:()=>{p(-1),u("searchResult")},children:z(Ih,{formData:"editMobileNumber"==d?{value:e[0].mobileNumber,type:"mobileNumber"}:{value:e[0].email.value,type:"emailAddress"},onSubmit:a})})},d),z(Ki,{isOpen:r,heading:"Warning",message:"Are you sure you want to remove workplace access?",onConfirm:l,onCancel:c})]})};var Bh=(e=>(e.Search="Search",e.BenefitsPlan="Benefits Plan",e))(Bh||{});function zh(){return(zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var $h=["context","children"];function Hh(e){return this.getChildContext=function(){return e.context},U(e.children,function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)t.indexOf(n=o[i])>=0||(r[n]=e[n]);return r}(e,$h))}function qh(){var e=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(e),this._vdom=y(Hh,zh({},this._props,{context:e.detail.context}),function e(t,n){if(3===t.nodeType)return t.data;if(1!==t.nodeType)return null;var i=[],r={},o=0,s=t.attributes,a=t.childNodes;for(o=s.length;o--;)"slot"!==s[o].name&&(r[s[o].name]=s[o].value,r[Wh(s[o].name)]=s[o].value);for(o=a.length;o--;){var l=e(a[o],null),c=a[o].slot;c?r[c]=y(Xh,{name:c},l):i[o]=l}var d=n?y(Xh,null,i):i;return y(n||t.nodeName.toLowerCase(),r,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?I:j)(this._vdom,this._root)}function Wh(e){return e.replace(/-(\w)/g,(function(e,t){return t?t.toUpperCase():""}))}function Kh(e,t,n){if(this._vdom){var i={};i[e]=n=null==n?void 0:n,i[Wh(e)]=n,this._vdom=U(this._vdom,i),j(this._vdom,this._root)}}function Yh(){j(this._vdom=null,this._root)}function Xh(e,t){var n=this;return y("slot",zh({},e,{ref:function(e){e?(n.ref=e,n._listener||(n._listener=function(e){e.stopPropagation(),e.detail.context=t},e.addEventListener("_preact",n._listener))):n.ref.removeEventListener("_preact",n._listener)}}))}!function(e,t,n,i){function r(){var t=Reflect.construct(HTMLElement,[],r);return t._vdomComponent=e,t._root=t,t}(r.prototype=Object.create(HTMLElement.prototype)).constructor=r,r.prototype.connectedCallback=qh,r.prototype.attributeChangedCallback=Kh,r.prototype.disconnectedCallback=Yh,n=n||e.observedAttributes||Object.keys(e.propTypes||{}),r.observedAttributes=n,n.forEach((function(e){Object.defineProperty(r.prototype,e,{get:function(){return this._vdom.props[e]},set:function(t){this._vdom?this.attributeChangedCallback(e,null,t):(this._props||(this._props={}),this._props[e]=t,this.connectedCallback());var n=typeof t;null!=t&&"string"!==n&&"boolean"!==n&&"number"!==n||this.setAttribute(e,t)}})})),customElements.define(t,r)}((e=>{const t={backendUrl:e["backend-url"],accessToken:e["access-token"]};se((()=>{ti(t.backendUrl,t.accessToken,"customer-profile"),ti(t.backendUrl,t.accessToken,"flare-app-identity"),ti(t.backendUrl,t.accessToken,"benefits-plan")}),[t.backendUrl,t.accessToken]);const[n,i]=oe("Search"),r=de((e=>e===n),[n]);return z(b,{children:[z("style",{children:$.toString()}),z(be,{tabTitles:Object.entries(Bh).map((([,e])=>e)),currentTab:n,onChange:i}),z(tr,{visible:r("Search"),children:z(Fh,{})}),z(tr,{visible:r("Benefits Plan"),children:z(Mr,{})})]})}),"superhero-pba-support-admin",["backend-url","access-token"])}();