@flarehr/promoted-benefits-ui 1.0.83 → 1.0.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function _(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(o){if(o.ep)return;o.ep=!0;const r=_(o);fetch(o.href,r)}})();var M,p,de,C,ee,pe,j,he,S={},ve=[],Ce=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Q=Array.isArray;function P(e,t){for(var _ in t)e[_]=t[_];return e}function me(e){var t=e.parentNode;t&&t.removeChild(e)}function He(e,t,_){var n,o,r,s={};for(r in t)r=="key"?n=t[r]:r=="ref"?o=t[r]:s[r]=t[r];if(arguments.length>2&&(s.children=arguments.length>3?M.call(arguments,2):_),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)s[r]===void 0&&(s[r]=e.defaultProps[r]);return D(e,s,n,o,null)}function D(e,t,_,n,o){var r={type:e,props:t,key:_,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o??++de,__i:-1,__u:0};return o==null&&p.vnode!=null&&p.vnode(r),r}function E(e){return e.children}function I(e,t){this.props=e,this.context=t}function H(e,t){if(t==null)return e.__?H(e.__,e.__i+1):null;for(var _;t<e.__k.length;t++)if((_=e.__k[t])!=null&&_.__e!=null)return _.__e;return typeof e.type=="function"?H(e):null}function ye(e){var t,_;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((_=e.__k[t])!=null&&_.__e!=null){e.__e=e.__c.base=_.__e;break}return ye(e)}}function q(e){(!e.__d&&(e.__d=!0)&&C.push(e)&&!B.__r++||ee!==p.debounceRendering)&&((ee=p.debounceRendering)||pe)(B)}function B(){var e,t,_,n,o,r,s,c,u;for(C.sort(j);e=C.shift();)e.__d&&(t=C.length,n=void 0,r=(o=(_=e).__v).__e,c=[],u=[],(s=_.__P)&&((n=P({},o)).__v=o.__v+1,p.vnode&&p.vnode(n),J(s,n,o,_.__n,s.ownerSVGElement!==void 0,32&o.__u?[r]:null,c,r??H(o),!!(32&o.__u),u),n.__v=o.__v,n.__.__k[n.__i]=n,ke(c,n,u),n.__e!=r&&ye(n)),C.length>t&&C.sort(j));B.__r=0}function ge(e,t,_,n,o,r,s,c,u,l,f){var i,d,a,y,w,g=n&&n.__k||ve,h=t.length;for(_.__d=u,Ue(_,t,g),u=_.__d,i=0;i<h;i++)(a=_.__k[i])!=null&&typeof a!="boolean"&&typeof a!="function"&&(d=a.__i===-1?S:g[a.__i]||S,a.__i=i,J(e,a,d,o,r,s,c,u,l,f),y=a.__e,a.ref&&d.ref!=a.ref&&(d.ref&&X(d.ref,null,a),f.push(a.ref,a.__c||y,a)),w==null&&y!=null&&(w=y),65536&a.__u||d.__k===a.__k?(y||d.__e!=u||(u=H(d)),u=be(a,u,e)):typeof a.type=="function"&&a.__d!==void 0?u=a.__d:y&&(u=y.nextSibling),a.__d=void 0,a.__u&=-196609);_.__d=u,_.__e=w}function Ue(e,t,_){var n,o,r,s,c,u=t.length,l=_.length,f=l,i=0;for(e.__k=[],n=0;n<u;n++)s=n+i,(o=e.__k[n]=(o=t[n])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?D(null,o,null,null,null):Q(o)?D(E,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?D(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,c=Se(o,_,s,f),o.__i=c,r=null,c!==-1&&(f--,(r=_[c])&&(r.__u|=131072)),r==null||r.__v===null?(c==-1&&i--,typeof o.type!="function"&&(o.__u|=65536)):c!==s&&(c===s+1?i++:c>s?f>u-s?i+=c-s:i--:c<s?c==s-1&&(i=c-s):i=0,c!==n+i&&(o.__u|=65536))):(r=_[s])&&r.key==null&&r.__e&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=H(r)),z(r,r,!1),_[s]=null,f--);if(f)for(n=0;n<l;n++)(r=_[n])!=null&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=H(r)),z(r,r))}function be(e,t,_){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=be(n[o],t,_));return t}e.__e!=t&&(_.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Se(e,t,_,n){var o=e.key,r=e.type,s=_-1,c=_+1,u=t[_];if(u===null||u&&o==u.key&&r===u.type&&!(131072&u.__u))return _;if(n>(u!=null&&!(131072&u.__u)?1:0))for(;s>=0||c<t.length;){if(s>=0){if((u=t[s])&&!(131072&u.__u)&&o==u.key&&r===u.type)return s;s--}if(c<t.length){if((u=t[c])&&!(131072&u.__u)&&o==u.key&&r===u.type)return c;c++}}return-1}function te(e,t,_){t[0]==="-"?e.setProperty(t,_??""):e[t]=_==null?"":typeof _!="number"||Ce.test(t)?_:_+"px"}function L(e,t,_,n,o){var r;e:if(t==="style")if(typeof _=="string")e.style.cssText=_;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)_&&t in _||te(e.style,t,"");if(_)for(t in _)n&&_[t]===n[t]||te(e.style,t,_[t])}else if(t[0]==="o"&&t[1]==="n")r=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=_,_?n?_.u=n.u:(_.u=Date.now(),e.addEventListener(t,r?ne:_e,r)):e.removeEventListener(t,r?ne:_e,r);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=_??"";break e}catch{}typeof _=="function"||(_==null||_===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,_))}}function _e(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(p.event?p.event(e):e)}}function ne(e){if(this.l)return this.l[e.type+!0](p.event?p.event(e):e)}function J(e,t,_,n,o,r,s,c,u,l){var f,i,d,a,y,w,g,h,b,x,N,U,Z,W,R,k=t.type;if(t.constructor!==void 0)return null;128&_.__u&&(u=!!(32&_.__u),r=[c=t.__e=_.__e]),(f=p.__b)&&f(t);e:if(typeof k=="function")try{if(h=t.props,b=(f=k.contextType)&&n[f.__c],x=f?b?b.props.value:f.__:n,_.__c?g=(i=t.__c=_.__c).__=i.__E:("prototype"in k&&k.prototype.render?t.__c=i=new k(h,x):(t.__c=i=new I(h,x),i.constructor=k,i.render=Ee),b&&b.sub(i),i.props=h,i.state||(i.state={}),i.context=x,i.__n=n,d=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=P({},i.__s)),P(i.__s,k.getDerivedStateFromProps(h,i.__s))),a=i.props,y=i.state,i.__v=t,d)k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(k.getDerivedStateFromProps==null&&h!==a&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,x),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,x)===!1||t.__v===_.__v)){for(t.__v!==_.__v&&(i.props=h,i.state=i.__s,i.__d=!1),t.__e=_.__e,t.__k=_.__k,t.__k.forEach(function(A){A&&(A.__=t)}),N=0;N<i._sb.length;N++)i.__h.push(i._sb[N]);i._sb=[],i.__h.length&&s.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,x),i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(a,y,w)})}if(i.context=x,i.props=h,i.__P=e,i.__e=!1,U=p.__r,Z=0,"prototype"in k&&k.prototype.render){for(i.state=i.__s,i.__d=!1,U&&U(t),f=i.render(i.props,i.state,i.context),W=0;W<i._sb.length;W++)i.__h.push(i._sb[W]);i._sb=[]}else do i.__d=!1,U&&U(t),f=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++Z<25);i.state=i.__s,i.getChildContext!=null&&(n=P(P({},n),i.getChildContext())),d||i.getSnapshotBeforeUpdate==null||(w=i.getSnapshotBeforeUpdate(a,y)),ge(e,Q(R=f!=null&&f.type===E&&f.key==null?f.props.children:f)?R:[R],t,_,n,o,r,s,c,u,l),i.base=t.__e,t.__u&=-161,i.__h.length&&s.push(i),g&&(i.__E=i.__=null)}catch(A){t.__v=null,u||r!=null?(t.__e=c,t.__u|=u?160:32,r[r.indexOf(c)]=null):(t.__e=_.__e,t.__k=_.__k),p.__e(A,t,_)}else r==null&&t.__v===_.__v?(t.__k=_.__k,t.__e=_.__e):t.__e=Te(_.__e,t,_,n,o,r,s,u,l);(f=p.diffed)&&f(t)}function ke(e,t,_){t.__d=void 0;for(var n=0;n<_.length;n++)X(_[n],_[++n],_[++n]);p.__c&&p.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(r){r.call(o)})}catch(r){p.__e(r,o.__v)}})}function Te(e,t,_,n,o,r,s,c,u){var l,f,i,d,a,y,w,g=_.props,h=t.props,b=t.type;if(b==="svg"&&(o=!0),r!=null){for(l=0;l<r.length;l++)if((a=r[l])&&"setAttribute"in a==!!b&&(b?a.localName===b:a.nodeType===3)){e=a,r[l]=null;break}}if(e==null){if(b===null)return document.createTextNode(h);e=o?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,h.is&&h),r=null,c=!1}if(b===null)g===h||c&&e.data===h||(e.data=h);else{if(r=r&&M.call(e.childNodes),g=_.props||S,!c&&r!=null)for(g={},l=0;l<e.attributes.length;l++)g[(a=e.attributes[l]).name]=a.value;for(l in g)a=g[l],l=="children"||(l=="dangerouslySetInnerHTML"?i=a:l==="key"||l in h||L(e,l,null,a,o));for(l in h)a=h[l],l=="children"?d=a:l=="dangerouslySetInnerHTML"?f=a:l=="value"?y=a:l=="checked"?w=a:l==="key"||c&&typeof a!="function"||g[l]===a||L(e,l,a,g[l],o);if(f)c||i&&(f.__html===i.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(i&&(e.innerHTML=""),ge(e,Q(d)?d:[d],t,_,n,o&&b!=="foreignObject",r,s,r?r[0]:_.__k&&H(_,0),c,u),r!=null)for(l=r.length;l--;)r[l]!=null&&me(r[l]);c||(l="value",y!==void 0&&(y!==e[l]||b==="progress"&&!y||b==="option"&&y!==g[l])&&L(e,l,y,g[l],!1),l="checked",w!==void 0&&w!==e[l]&&L(e,l,w,g[l],!1))}return e}function X(e,t,_){try{typeof e=="function"?e(t):e.current=t}catch(n){p.__e(n,_)}}function z(e,t,_){var n,o;if(p.unmount&&p.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||X(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(r){p.__e(r,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&z(n[o],t,_||typeof e.type!="function");_||e.__e==null||me(e.__e),e.__=e.__e=e.__d=void 0}function Ee(e,t,_){return this.constructor(e,_)}function Ne(e,t,_){var n,o,r,s;p.__&&p.__(e,t),o=(n=typeof _=="function")?null:_&&_.__k||t.__k,r=[],s=[],J(t,e=(!n&&_||t).__k=He(E,null,[e]),o||S,S,t.ownerSVGElement!==void 0,!n&&_?[_]:o?null:t.firstChild?M.call(t.childNodes):null,r,!n&&_?_:o?o.__e:t.firstChild,n,s),ke(r,e,s)}function we(e,t){var _={__c:t="__cC"+he++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,r;return this.getChildContext||(o=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&o.some(function(c){c.__e=!0,q(c)})},this.sub=function(s){o.push(s);var c=s.componentWillUnmount;s.componentWillUnmount=function(){o.splice(o.indexOf(s),1),c&&c.call(s)}}),n.children}};return _.Provider.__=_.Consumer.contextType=_}M=ve.slice,p={__e:function(e,t,_,n){for(var o,r,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&r.getDerivedStateFromError!=null&&(o.setState(r.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(c){e=c}throw e}},de=0,I.prototype.setState=function(e,t){var _;_=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=P({},this.state),typeof e=="function"&&(e=e(P({},_),this.props)),e&&P(_,e),e!=null&&this.__v&&(t&&this._sb.push(t),q(this))},I.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),q(this))},I.prototype.render=E,C=[],pe=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j=function(e,t){return e.__v.__b-t.__v.__b},B.__r=0,he=0;var We=0;function $(e,t,_,n,o,r){var s,c,u={};for(c in t)c=="ref"?s=t[c]:u[c]=t[c];var l={type:e,props:u,key:_,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--We,__i:-1,__u:0,__source:o,__self:r};if(typeof e=="function"&&(s=e.defaultProps))for(c in s)u[c]===void 0&&(u[c]=s[c]);return p.vnode&&p.vnode(l),l}var T,v,V,oe,G=0,xe=[],F=[],m=p,re=m.__b,ie=m.__r,se=m.diffed,ce=m.__c,le=m.unmount,ue=m.__;function Y(e,t){m.__h&&m.__h(v,e,G||t),G=0;var _=v.__H||(v.__H={__:[],__h:[]});return e>=_.__.length&&_.__.push({__V:F}),_.__[e]}function ae(e){return G=1,Ae($e,e)}function Ae(e,t,_){var n=Y(T++,2);if(n.t=e,!n.__c&&(n.__=[_?_(t):$e(void 0,t),function(c){var u=n.__N?n.__N[0]:n.__[0],l=n.t(u,c);u!==l&&(n.__N=[l,n.__[1]],n.__c.setState({}))}],n.__c=v,!v.u)){var o=function(c,u,l){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(d){return!!d.__c});if(f.every(function(d){return!d.__N}))return!r||r.call(this,c,u,l);var i=!1;return f.forEach(function(d){if(d.__N){var a=d.__[0];d.__=d.__N,d.__N=void 0,a!==d.__[0]&&(i=!0)}}),!(!i&&n.__c.props===c)&&(!r||r.call(this,c,u,l))};v.u=!0;var r=v.shouldComponentUpdate,s=v.componentWillUpdate;v.componentWillUpdate=function(c,u,l){if(this.__e){var f=r;r=void 0,o(c,u,l),r=f}s&&s.call(this,c,u,l)},v.shouldComponentUpdate=o}return n.__N||n.__}function Le(e,t){var _=Y(T++,3);!m.__s&&Oe(_.__H,t)&&(_.__=e,_.i=t,v.__H.__h.push(_))}function De(e){var t=v.context[e.__c],_=Y(T++,9);return _.c=e,t?(_.__==null&&(_.__=!0,t.sub(v)),t.props.value):e.__}function Ie(){for(var e;e=xe.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(O),e.__H.__h.forEach(K),e.__H.__h=[]}catch(t){e.__H.__h=[],m.__e(t,e.__v)}}m.__b=function(e){v=null,re&&re(e)},m.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ue&&ue(e,t)},m.__r=function(e){ie&&ie(e),T=0;var t=(v=e.__c).__H;t&&(V===v?(t.__h=[],v.__h=[],t.__.forEach(function(_){_.__N&&(_.__=_.__N),_.__V=F,_.__N=_.i=void 0})):(t.__h.forEach(O),t.__h.forEach(K),t.__h=[],T=0)),V=v},m.diffed=function(e){se&&se(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(xe.push(t)!==1&&oe===m.requestAnimationFrame||((oe=m.requestAnimationFrame)||Fe)(Ie)),t.__H.__.forEach(function(_){_.i&&(_.__H=_.i),_.__V!==F&&(_.__=_.__V),_.i=void 0,_.__V=F})),V=v=null},m.__c=function(e,t){t.some(function(_){try{_.__h.forEach(O),_.__h=_.__h.filter(function(n){return!n.__||K(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],m.__e(n,_.__v)}}),ce&&ce(e,t)},m.unmount=function(e){le&&le(e);var t,_=e.__c;_&&_.__H&&(_.__H.__.forEach(function(n){try{O(n)}catch(o){t=o}}),_.__H=void 0,t&&m.__e(t,_.__v))};var fe=typeof requestAnimationFrame=="function";function Fe(e){var t,_=function(){clearTimeout(n),fe&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(_,100);fe&&(t=requestAnimationFrame(_))}function O(e){var t=v,_=e.__c;typeof _=="function"&&(e.__c=void 0,_()),v=t}function K(e){var t=v;e.__c=e.__(),v=t}function Oe(e,t){return!e||e.length!==t.length||t.some(function(_,n){return _!==e[n]})}function $e(e,t){return typeof t=="function"?t(e):t}let Pe=we({});const Be=e=>Pe=we({...e}),Me=()=>De(Pe),Re={clientId:"apollo-promoted-benefits-app"},Ve=async(e,t,_,n)=>{const o=new Headers;o.append("Content-Type","application/x-www-form-urlencoded");let r;const s=new URLSearchParams;s.append("grant_type","authorization_code"),s.append("code",t),s.append("client_id",_),s.append("redirect_uri",n);const c=await fetch(`${e}/connect/token`,{method:"POST",headers:o,body:s});return c.ok&&(r=await c.json()),r},je=e=>{if(e)return{accessToken:e.access_token,isLoggedIn:!!e.access_token,expiresIn:e.expires_in}},qe=e=>new URLSearchParams(window.location.search).get(e)??void 0,ze=()=>{const e=window.location.hostname;switch(!0){case(e.startsWith("autodev")||e.startsWith("localhost")):return"https://autodev-identity.flarehr.com";case e.startsWith("test"):return"https://test-identity.flarehr.com";case e.startsWith("sandbox"):return"https://sandbox-identity.flarehr.com";case e.startsWith("identity"):return"https://identity.flarehr.com";default:return}},Ge=async()=>{const e=ze(),t=qe("code"),_=Re.clientId,n=`${window.location.origin}/promoted-benefits/app/v1.0/`;if(!(!e||!t))return je(await Ve(e,t,_,n))},Ke=async(e,t)=>{let _;const n=await fetch(e,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});return n.ok&&(_=await n.json()),_},Qe=()=>{const e=window.location.hostname;switch(!0){case e.startsWith("localhost"):return"/benefits/";case e.startsWith("autodev"):return"https://autodev-partner.flarehr.com/benefits/";case e.startsWith("test"):return"https://test-partner.flarehr.com/benefits/";case e.startsWith("sandbox"):return"https://sandbox-partner.flarehr.com/benefits/";case e.startsWith("partner"):return"https://partner.flarehr.com/benefits/";default:return}},Je=(e,t,_)=>`${e}app/?token=${t}&redirectPath=${_}`,Xe=async(e,t)=>{const _=Qe();if(!_||!t||!e)return;const n=await Ke(`${_}backend/v1.0/current/token`,e);if(!(!n||!n.token))return Je(_,n.token,t)},Ye=()=>{const[e,t]=ae({}),[_,n]=ae(!1);Be(e);const o=Me(),r="/categories/everyday?src=someurlfortracking",s=async()=>{const c=await Xe(o.accessToken,r);if(c){const u=window.open();u&&(u.location=`${c}`)}};return Le(()=>{(async()=>{if(!_){const c=await Ge();c&&t(c),n(!0)}})()},[]),_?o.isLoggedIn?$("div",{className:"text-3xl font-bold",children:[$("h1",{children:"Hello World!"}),$("button",{onClick:s,class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",type:"button",children:"Try apollo benefits"})]}):$(E,{children:$("div",{className:"text-3xl font-bold danger",children:$("h1",{children:"Auth failed"})})}):$("p",{children:"Loading..."})};Ne($(Ye,{}),document.body);
@@ -1 +1 @@
1
- *,: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;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]){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;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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::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}*,: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: }::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: }.text-3xl{font-size:1.875rem;line-height:2.25rem}.font-bold{font-weight:700}
1
+ *,: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;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]){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;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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::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}*,: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: }::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: }.rounded{border-radius:.25rem}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.font-bold{font-weight:700}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}
package/dist/index.html CHANGED
@@ -8,8 +8,8 @@
8
8
  margin: 0;
9
9
  }
10
10
  </style>
11
- <script type="module" crossorigin src="/promoted-benefits/app/v1.0/assets/index-Du0cJXjQ.js"></script>
12
- <link rel="stylesheet" crossorigin href="/promoted-benefits/app/v1.0/assets/index-BRG82v_N.css">
11
+ <script type="module" crossorigin src="/promoted-benefits/app/v1.0/assets/index-DGm1gCq8.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/promoted-benefits/app/v1.0/assets/index-Drn6v6rS.css">
13
13
  </head>
14
14
  <body>
15
15
  </body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/promoted-benefits-ui",
3
- "version": "1.0.83",
3
+ "version": "1.0.85",
4
4
  "description": "Flare Promoted Benefits",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -1 +0,0 @@
1
- (function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))o(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&o(c)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();var M,p,de,C,ee,pe,B,he,N={},ve=[],$e=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Q=Array.isArray;function P(e,_){for(var t in _)e[t]=_[t];return e}function me(e){var _=e.parentNode;_&&_.removeChild(e)}function He(e,_,t){var o,n,r,c={};for(r in _)r=="key"?o=_[r]:r=="ref"?n=_[r]:c[r]=_[r];if(arguments.length>2&&(c.children=arguments.length>3?M.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)c[r]===void 0&&(c[r]=e.defaultProps[r]);return W(e,c,o,n,null)}function W(e,_,t,o,n){var r={type:e,props:_,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++de,__i:-1,__u:0};return n==null&&p.vnode!=null&&p.vnode(r),r}function V(e){return e.children}function D(e,_){this.props=e,this.context=_}function $(e,_){if(_==null)return e.__?$(e.__,e.__i+1):null;for(var t;_<e.__k.length;_++)if((t=e.__k[_])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?$(e):null}function ye(e){var _,t;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,_=0;_<e.__k.length;_++)if((t=e.__k[_])!=null&&t.__e!=null){e.__e=e.__c.base=t.__e;break}return ye(e)}}function j(e){(!e.__d&&(e.__d=!0)&&C.push(e)&&!O.__r++||ee!==p.debounceRendering)&&((ee=p.debounceRendering)||pe)(O)}function O(){var e,_,t,o,n,r,c,s,u;for(C.sort(B);e=C.shift();)e.__d&&(_=C.length,o=void 0,r=(n=(t=e).__v).__e,s=[],u=[],(c=t.__P)&&((o=P({},n)).__v=n.__v+1,p.vnode&&p.vnode(o),J(c,o,n,t.__n,c.ownerSVGElement!==void 0,32&n.__u?[r]:null,s,r??$(n),!!(32&n.__u),u),o.__v=n.__v,o.__.__k[o.__i]=o,ke(s,o,u),o.__e!=r&&ye(o)),C.length>_&&C.sort(B));O.__r=0}function ge(e,_,t,o,n,r,c,s,u,l,f){var i,d,a,y,w,g=o&&o.__k||ve,h=_.length;for(t.__d=u,Se(t,_,g),u=t.__d,i=0;i<h;i++)(a=t.__k[i])!=null&&typeof a!="boolean"&&typeof a!="function"&&(d=a.__i===-1?N:g[a.__i]||N,a.__i=i,J(e,a,d,n,r,c,s,u,l,f),y=a.__e,a.ref&&d.ref!=a.ref&&(d.ref&&X(d.ref,null,a),f.push(a.ref,a.__c||y,a)),w==null&&y!=null&&(w=y),65536&a.__u||d.__k===a.__k?(y||d.__e!=u||(u=$(d)),u=be(a,u,e)):typeof a.type=="function"&&a.__d!==void 0?u=a.__d:y&&(u=y.nextSibling),a.__d=void 0,a.__u&=-196609);t.__d=u,t.__e=w}function Se(e,_,t){var o,n,r,c,s,u=_.length,l=t.length,f=l,i=0;for(e.__k=[],o=0;o<u;o++)c=o+i,(n=e.__k[o]=(n=_[o])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?W(null,n,null,null,null):Q(n)?W(V,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?W(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=e,n.__b=e.__b+1,s=Ne(n,t,c,f),n.__i=s,r=null,s!==-1&&(f--,(r=t[s])&&(r.__u|=131072)),r==null||r.__v===null?(s==-1&&i--,typeof n.type!="function"&&(n.__u|=65536)):s!==c&&(s===c+1?i++:s>c?f>u-c?i+=s-c:i--:s<c?s==c-1&&(i=s-c):i=0,s!==o+i&&(n.__u|=65536))):(r=t[c])&&r.key==null&&r.__e&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=$(r)),z(r,r,!1),t[c]=null,f--);if(f)for(o=0;o<l;o++)(r=t[o])!=null&&!(131072&r.__u)&&(r.__e==e.__d&&(e.__d=$(r)),z(r,r))}function be(e,_,t){var o,n;if(typeof e.type=="function"){for(o=e.__k,n=0;o&&n<o.length;n++)o[n]&&(o[n].__=e,_=be(o[n],_,t));return _}e.__e!=_&&(t.insertBefore(e.__e,_||null),_=e.__e);do _=_&&_.nextSibling;while(_!=null&&_.nodeType===8);return _}function Ne(e,_,t,o){var n=e.key,r=e.type,c=t-1,s=t+1,u=_[t];if(u===null||u&&n==u.key&&r===u.type&&!(131072&u.__u))return t;if(o>(u!=null&&!(131072&u.__u)?1:0))for(;c>=0||s<_.length;){if(c>=0){if((u=_[c])&&!(131072&u.__u)&&n==u.key&&r===u.type)return c;c--}if(s<_.length){if((u=_[s])&&!(131072&u.__u)&&n==u.key&&r===u.type)return s;s++}}return-1}function _e(e,_,t){_[0]==="-"?e.setProperty(_,t??""):e[_]=t==null?"":typeof t!="number"||$e.test(_)?t:t+"px"}function A(e,_,t,o,n){var r;e:if(_==="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(_ in o)t&&_ in t||_e(e.style,_,"");if(t)for(_ in t)o&&t[_]===o[_]||_e(e.style,_,t[_])}else if(_[0]==="o"&&_[1]==="n")r=_!==(_=_.replace(/(PointerCapture)$|Capture$/i,"$1")),_=_.toLowerCase()in e||_==="onFocusOut"||_==="onFocusIn"?_.toLowerCase().slice(2):_.slice(2),e.l||(e.l={}),e.l[_+r]=t,t?o?t.u=o.u:(t.u=Date.now(),e.addEventListener(_,r?ne:te,r)):e.removeEventListener(_,r?ne:te,r);else{if(n)_=_.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(_!=="width"&&_!=="height"&&_!=="href"&&_!=="list"&&_!=="form"&&_!=="tabIndex"&&_!=="download"&&_!=="rowSpan"&&_!=="colSpan"&&_!=="role"&&_ in e)try{e[_]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&_[4]!=="-"?e.removeAttribute(_):e.setAttribute(_,t))}}function te(e){if(this.l){var _=this.l[e.type+!1];if(e.t){if(e.t<=_.u)return}else e.t=Date.now();return _(p.event?p.event(e):e)}}function ne(e){if(this.l)return this.l[e.type+!0](p.event?p.event(e):e)}function J(e,_,t,o,n,r,c,s,u,l){var f,i,d,a,y,w,g,h,b,x,U,S,Z,L,R,k=_.type;if(_.constructor!==void 0)return null;128&t.__u&&(u=!!(32&t.__u),r=[s=_.__e=t.__e]),(f=p.__b)&&f(_);e:if(typeof k=="function")try{if(h=_.props,b=(f=k.contextType)&&o[f.__c],x=f?b?b.props.value:f.__:o,t.__c?g=(i=_.__c=t.__c).__=i.__E:("prototype"in k&&k.prototype.render?_.__c=i=new k(h,x):(_.__c=i=new D(h,x),i.constructor=k,i.render=Ue),b&&b.sub(i),i.props=h,i.state||(i.state={}),i.context=x,i.__n=o,d=i.__d=!0,i.__h=[],i._sb=[]),i.__s==null&&(i.__s=i.state),k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=P({},i.__s)),P(i.__s,k.getDerivedStateFromProps(h,i.__s))),a=i.props,y=i.state,i.__v=_,d)k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(k.getDerivedStateFromProps==null&&h!==a&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(h,x),!i.__e&&(i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(h,i.__s,x)===!1||_.__v===t.__v)){for(_.__v!==t.__v&&(i.props=h,i.state=i.__s,i.__d=!1),_.__e=t.__e,_.__k=t.__k,_.__k.forEach(function(T){T&&(T.__=_)}),U=0;U<i._sb.length;U++)i.__h.push(i._sb[U]);i._sb=[],i.__h.length&&c.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(h,i.__s,x),i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(a,y,w)})}if(i.context=x,i.props=h,i.__P=e,i.__e=!1,S=p.__r,Z=0,"prototype"in k&&k.prototype.render){for(i.state=i.__s,i.__d=!1,S&&S(_),f=i.render(i.props,i.state,i.context),L=0;L<i._sb.length;L++)i.__h.push(i._sb[L]);i._sb=[]}else do i.__d=!1,S&&S(_),f=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++Z<25);i.state=i.__s,i.getChildContext!=null&&(o=P(P({},o),i.getChildContext())),d||i.getSnapshotBeforeUpdate==null||(w=i.getSnapshotBeforeUpdate(a,y)),ge(e,Q(R=f!=null&&f.type===V&&f.key==null?f.props.children:f)?R:[R],_,t,o,n,r,c,s,u,l),i.base=_.__e,_.__u&=-161,i.__h.length&&c.push(i),g&&(i.__E=i.__=null)}catch(T){_.__v=null,u||r!=null?(_.__e=s,_.__u|=u?160:32,r[r.indexOf(s)]=null):(_.__e=t.__e,_.__k=t.__k),p.__e(T,_,t)}else r==null&&_.__v===t.__v?(_.__k=t.__k,_.__e=t.__e):_.__e=Ee(t.__e,_,t,o,n,r,c,u,l);(f=p.diffed)&&f(_)}function ke(e,_,t){_.__d=void 0;for(var o=0;o<t.length;o++)X(t[o],t[++o],t[++o]);p.__c&&p.__c(_,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(r){r.call(n)})}catch(r){p.__e(r,n.__v)}})}function Ee(e,_,t,o,n,r,c,s,u){var l,f,i,d,a,y,w,g=t.props,h=_.props,b=_.type;if(b==="svg"&&(n=!0),r!=null){for(l=0;l<r.length;l++)if((a=r[l])&&"setAttribute"in a==!!b&&(b?a.localName===b:a.nodeType===3)){e=a,r[l]=null;break}}if(e==null){if(b===null)return document.createTextNode(h);e=n?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,h.is&&h),r=null,s=!1}if(b===null)g===h||s&&e.data===h||(e.data=h);else{if(r=r&&M.call(e.childNodes),g=t.props||N,!s&&r!=null)for(g={},l=0;l<e.attributes.length;l++)g[(a=e.attributes[l]).name]=a.value;for(l in g)a=g[l],l=="children"||(l=="dangerouslySetInnerHTML"?i=a:l==="key"||l in h||A(e,l,null,a,n));for(l in h)a=h[l],l=="children"?d=a:l=="dangerouslySetInnerHTML"?f=a:l=="value"?y=a:l=="checked"?w=a:l==="key"||s&&typeof a!="function"||g[l]===a||A(e,l,a,g[l],n);if(f)s||i&&(f.__html===i.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),_.__k=[];else if(i&&(e.innerHTML=""),ge(e,Q(d)?d:[d],_,t,o,n&&b!=="foreignObject",r,c,r?r[0]:t.__k&&$(t,0),s,u),r!=null)for(l=r.length;l--;)r[l]!=null&&me(r[l]);s||(l="value",y!==void 0&&(y!==e[l]||b==="progress"&&!y||b==="option"&&y!==g[l])&&A(e,l,y,g[l],!1),l="checked",w!==void 0&&w!==e[l]&&A(e,l,w,g[l],!1))}return e}function X(e,_,t){try{typeof e=="function"?e(_):e.current=_}catch(o){p.__e(o,t)}}function z(e,_,t){var o,n;if(p.unmount&&p.unmount(e),(o=e.ref)&&(o.current&&o.current!==e.__e||X(o,null,_)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){p.__e(r,_)}o.base=o.__P=null,e.__c=void 0}if(o=e.__k)for(n=0;n<o.length;n++)o[n]&&z(o[n],_,t||typeof e.type!="function");t||e.__e==null||me(e.__e),e.__=e.__e=e.__d=void 0}function Ue(e,_,t){return this.constructor(e,t)}function Le(e,_,t){var o,n,r,c;p.__&&p.__(e,_),n=(o=typeof t=="function")?null:t&&t.__k||_.__k,r=[],c=[],J(_,e=(!o&&t||_).__k=He(V,null,[e]),n||N,N,_.ownerSVGElement!==void 0,!o&&t?[t]:n?null:_.firstChild?M.call(_.childNodes):null,r,!o&&t?t:n?n.__e:_.firstChild,o,c),ke(r,e,c)}function we(e,_){var t={__c:_="__cC"+he++,__:e,Consumer:function(o,n){return o.children(n)},Provider:function(o){var n,r;return this.getChildContext||(n=[],(r={})[_]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&n.some(function(s){s.__e=!0,j(s)})},this.sub=function(c){n.push(c);var s=c.componentWillUnmount;c.componentWillUnmount=function(){n.splice(n.indexOf(c),1),s&&s.call(c)}}),o.children}};return t.Provider.__=t.Consumer.contextType=t}M=ve.slice,p={__e:function(e,_,t,o){for(var n,r,c;_=_.__;)if((n=_.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),c=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,o||{}),c=n.__d),c)return n.__E=n}catch(s){e=s}throw e}},de=0,D.prototype.setState=function(e,_){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=P({},this.state),typeof e=="function"&&(e=e(P({},t),this.props)),e&&P(t,e),e!=null&&this.__v&&(_&&this._sb.push(_),j(this))},D.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),j(this))},D.prototype.render=V,C=[],pe=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,B=function(e,_){return e.__v.__b-_.__v.__b},O.__r=0,he=0;var Te=0;function H(e,_,t,o,n,r){var c,s,u={};for(s in _)s=="ref"?c=_[s]:u[s]=_[s];var l={type:e,props:u,key:t,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Te,__i:-1,__u:0,__source:n,__self:r};if(typeof e=="function"&&(c=e.defaultProps))for(s in c)u[s]===void 0&&(u[s]=c[s]);return p.vnode&&p.vnode(l),l}var E,v,q,oe,G=0,xe=[],F=[],m=p,re=m.__b,ie=m.__r,ce=m.diffed,se=m.__c,le=m.unmount,ue=m.__;function Y(e,_){m.__h&&m.__h(v,e,G||_),G=0;var t=v.__H||(v.__H={__:[],__h:[]});return e>=t.__.length&&t.__.push({__V:F}),t.__[e]}function ae(e){return G=1,Ae(Pe,e)}function Ae(e,_,t){var o=Y(E++,2);if(o.t=e,!o.__c&&(o.__=[t?t(_):Pe(void 0,_),function(s){var u=o.__N?o.__N[0]:o.__[0],l=o.t(u,s);u!==l&&(o.__N=[l,o.__[1]],o.__c.setState({}))}],o.__c=v,!v.u)){var n=function(s,u,l){if(!o.__c.__H)return!0;var f=o.__c.__H.__.filter(function(d){return!!d.__c});if(f.every(function(d){return!d.__N}))return!r||r.call(this,s,u,l);var i=!1;return f.forEach(function(d){if(d.__N){var a=d.__[0];d.__=d.__N,d.__N=void 0,a!==d.__[0]&&(i=!0)}}),!(!i&&o.__c.props===s)&&(!r||r.call(this,s,u,l))};v.u=!0;var r=v.shouldComponentUpdate,c=v.componentWillUpdate;v.componentWillUpdate=function(s,u,l){if(this.__e){var f=r;r=void 0,n(s,u,l),r=f}c&&c.call(this,s,u,l)},v.shouldComponentUpdate=n}return o.__N||o.__}function We(e,_){var t=Y(E++,3);!m.__s&&Oe(t.__H,_)&&(t.__=e,t.i=_,v.__H.__h.push(t))}function De(e){var _=v.context[e.__c],t=Y(E++,9);return t.c=e,_?(t.__==null&&(t.__=!0,_.sub(v)),_.props.value):e.__}function Fe(){for(var e;e=xe.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(I),e.__H.__h.forEach(K),e.__H.__h=[]}catch(_){e.__H.__h=[],m.__e(_,e.__v)}}m.__b=function(e){v=null,re&&re(e)},m.__=function(e,_){e&&_.__k&&_.__k.__m&&(e.__m=_.__k.__m),ue&&ue(e,_)},m.__r=function(e){ie&&ie(e),E=0;var _=(v=e.__c).__H;_&&(q===v?(_.__h=[],v.__h=[],_.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=F,t.__N=t.i=void 0})):(_.__h.forEach(I),_.__h.forEach(K),_.__h=[],E=0)),q=v},m.diffed=function(e){ce&&ce(e);var _=e.__c;_&&_.__H&&(_.__H.__h.length&&(xe.push(_)!==1&&oe===m.requestAnimationFrame||((oe=m.requestAnimationFrame)||Ie)(Fe)),_.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==F&&(t.__=t.__V),t.i=void 0,t.__V=F})),q=v=null},m.__c=function(e,_){_.some(function(t){try{t.__h.forEach(I),t.__h=t.__h.filter(function(o){return!o.__||K(o)})}catch(o){_.some(function(n){n.__h&&(n.__h=[])}),_=[],m.__e(o,t.__v)}}),se&&se(e,_)},m.unmount=function(e){le&&le(e);var _,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(o){try{I(o)}catch(n){_=n}}),t.__H=void 0,_&&m.__e(_,t.__v))};var fe=typeof requestAnimationFrame=="function";function Ie(e){var _,t=function(){clearTimeout(o),fe&&cancelAnimationFrame(_),setTimeout(e)},o=setTimeout(t,100);fe&&(_=requestAnimationFrame(t))}function I(e){var _=v,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),v=_}function K(e){var _=v;e.__c=e.__(),v=_}function Oe(e,_){return!e||e.length!==_.length||_.some(function(t,o){return t!==e[o]})}function Pe(e,_){return typeof _=="function"?_(e):_}let Ce=we({});const Me=e=>Ce=we({...e}),Ve=()=>De(Ce),Re={clientId:"apollo-promoted-benefits-app"},qe=async(e,_,t,o)=>{const n=new Headers;n.append("Content-Type","application/x-www-form-urlencoded");let r;const c=new URLSearchParams;c.append("grant_type","authorization_code"),c.append("code",_),c.append("client_id",t),c.append("redirect_uri",o);const s=await fetch(`${e}/connect/token`,{method:"POST",headers:n,body:c});return s.ok&&(r=await s.json()),r},Be=e=>{if(e)return{accessToken:e.access_token,isLoggedIn:!!e.access_token,expiresIn:e.expires_in}},je=e=>new URLSearchParams(window.location.search).get(e)??void 0,ze=()=>{const e=window.location.hostname;switch(!0){case(e.startsWith("autodev")||e.startsWith("localhost")):return"https://autodev-identity.flarehr.com";case e.startsWith("test"):return"https://test-identity.flarehr.com";case e.startsWith("sandbox"):return"https://sandbox-identity.flarehr.com";case e.startsWith("identity"):return"https://identity.flarehr.com";default:return}},Ge=async()=>{const e=ze(),_=je("code"),t=Re.clientId,o=`${window.location.origin}/promoted-benefits/app/v1.0/`;if(!(!e||!_))return Be(await qe(e,_,t,o))},Ke=()=>{const[e,_]=ae({}),[t,o]=ae(!1);Me(e);const n=Ve();return We(()=>{(async()=>{if(!t){const r=await Ge();r&&_(r),o(!0)}})()},[]),t?n.isLoggedIn?H("div",{className:"text-3xl font-bold",children:H("h1",{children:"Hello World!"})}):H("div",{className:"text-3xl font-bold danger",children:H("h1",{children:"Auth failed"})}):H("p",{children:"Loading..."})};Le(H(Ke,{}),document.body);