@clickview/auth 0.70.0-rc.2 → 0.70.0-rc.4

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.
@@ -52,10 +52,10 @@ __p+='`),t}),a+=`';
52
52
  `),de=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,fe=new Map;function pe(e){var t=fe.get(e);if(t===void 0){if(!de.test(e))throw Error(n(65,e));t=u(`<`+e),fe.set(e,t)}return t}var me=u(`<!DOCTYPE html>`);function he(e,t,r,i,a){switch(t){case`select`:e.push(pe(`select`));var o=null,s=null;for(p in r)if(f.call(r,p)){var c=r[p];if(c!=null)switch(p){case`children`:o=c;break;case`dangerouslySetInnerHTML`:s=c;break;case`defaultValue`:case`value`:break;default:ae(e,i,p,c)}}return e.push(oe),se(e,s,o),o;case`option`:s=a.selectedValue,e.push(pe(`option`));var u=c=null,d=null,p=null;for(o in r)if(f.call(r,o)&&(t=r[o],t!=null))switch(o){case`children`:c=t;break;case`selected`:d=t;break;case`dangerouslySetInnerHTML`:p=t;break;case`value`:u=t;default:ae(e,i,o,t)}if(s!=null)if(r=u===null?ce(c):``+u,D(s)){for(i=0;i<s.length;i++)if(``+s[i]===r){e.push(le);break}}else``+s===r&&e.push(le);else d&&e.push(le);return e.push(oe),se(e,p,c),c;case`textarea`:for(c in e.push(pe(`textarea`)),p=s=o=null,r)if(f.call(r,c)&&(u=r[c],u!=null))switch(c){case`children`:p=u;break;case`value`:o=u;break;case`defaultValue`:s=u;break;case`dangerouslySetInnerHTML`:throw Error(n(91));default:ae(e,i,c,u)}if(o===null&&s!==null&&(o=s),e.push(oe),p!=null){if(o!=null)throw Error(n(92));if(D(p)&&1<p.length)throw Error(n(93));o=``+p}return typeof o==`string`&&o[0]===`
53
53
  `&&e.push(G),o!==null&&e.push(l(w(``+o))),null;case`input`:for(s in e.push(pe(`input`)),u=p=c=o=null,r)if(f.call(r,s)&&(d=r[s],d!=null))switch(s){case`children`:case`dangerouslySetInnerHTML`:throw Error(n(399,`input`));case`defaultChecked`:u=d;break;case`defaultValue`:c=d;break;case`checked`:p=d;break;case`value`:o=d;break;default:ae(e,i,s,d)}return p===null?u!==null&&ae(e,i,`checked`,u):ae(e,i,`checked`,p),o===null?c!==null&&ae(e,i,`value`,c):ae(e,i,`value`,o),e.push(W),null;case`menuitem`:for(var m in e.push(pe(`menuitem`)),r)if(f.call(r,m)&&(o=r[m],o!=null))switch(m){case`children`:case`dangerouslySetInnerHTML`:throw Error(n(400));default:ae(e,i,m,o)}return e.push(oe),null;case`listing`:case`pre`:for(u in e.push(pe(t)),s=o=null,r)if(f.call(r,u)&&(c=r[u],c!=null))switch(u){case`children`:o=c;break;case`dangerouslySetInnerHTML`:s=c;break;default:ae(e,i,u,c)}if(e.push(oe),s!=null){if(o!=null)throw Error(n(60));if(typeof s!=`object`||!(`__html`in s))throw Error(n(61));r=s.__html,r!=null&&(typeof r==`string`&&0<r.length&&r[0]===`
54
54
  `?e.push(G,l(r)):e.push(l(``+r)))}return typeof o==`string`&&o[0]===`
55
- `&&e.push(G),o;case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`img`:case`keygen`:case`link`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:for(var h in e.push(pe(t)),r)if(f.call(r,h)&&(o=r[h],o!=null))switch(h){case`children`:case`dangerouslySetInnerHTML`:throw Error(n(399,t));default:ae(e,i,h,o)}return e.push(W),null;case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return ue(e,r,t,i);case`html`:return a.insertionMode===0&&e.push(me),ue(e,r,t,i);default:if(t.indexOf(`-`)===-1&&typeof r.is!=`string`)return ue(e,r,t,i);for(d in e.push(pe(t)),s=o=null,r)if(f.call(r,d)&&(c=r[d],c!=null))switch(d){case`children`:o=c;break;case`dangerouslySetInnerHTML`:s=c;break;case`style`:U(e,i,c);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:break;default:g(d)&&typeof c!=`function`&&typeof c!=`symbol`&&e.push(te,l(d),ne,l(w(c)),re)}return e.push(oe),se(e,s,o),o}}var ge=u(`</`),_e=u(`>`),ve=u(`<template id="`),ye=u(`"></template>`),be=u(`<!--$-->`),xe=u(`<!--$?--><template id="`),Se=u(`"></template>`),Ce=u(`<!--$!-->`),we=u(`<!--/$-->`);function Te(e,t,r){if(a(e,xe),r===null)throw Error(n(395));return a(e,r),o(e,Se)}var Ee=u(`<div hidden id="`),De=u(`">`),Oe=u(`</div>`),K=u(`<svg aria-hidden="true" style="display:none" id="`),ke=u(`">`),Ae=u(`</svg>`),q=u(`<math aria-hidden="true" style="display:none" id="`),J=u(`">`),je=u(`</math>`),Me=u(`<table hidden id="`),Ne=u(`">`),Pe=u(`</table>`),Fe=u(`<table hidden><tbody id="`),Ie=u(`">`),Le=u(`</tbody></table>`),Re=u(`<table hidden><tr id="`),ze=u(`">`),Be=u(`</tr></table>`),Ve=u(`<table hidden><colgroup id="`),He=u(`">`),Ue=u(`</colgroup></table>`);function We(e,t,r,i){switch(r.insertionMode){case 0:case 1:return a(e,Ee),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,De);case 2:return a(e,K),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,ke);case 3:return a(e,q),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,J);case 4:return a(e,Me),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,Ne);case 5:return a(e,Fe),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,Ie);case 6:return a(e,Re),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,ze);case 7:return a(e,Ve),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,He);default:throw Error(n(397))}}function Ge(e,t){switch(t.insertionMode){case 0:case 1:return o(e,Oe);case 2:return o(e,Ae);case 3:return o(e,je);case 4:return o(e,Pe);case 5:return o(e,Le);case 6:return o(e,Be);case 7:return o(e,Ue);default:throw Error(n(397))}}var Ke=u(`function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("`),qe=u(`$RS("`),Je=u(`","`),Ye=u(`")<\/script>`),Xe=u(`function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("`),Ze=u(`$RC("`),Qe=u(`","`),$e=u(`")<\/script>`),et=u(`function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("`),tt=u(`$RX("`),nt=u(`")<\/script>`),rt=Object.assign,it=Symbol.for(`react.element`),at=Symbol.for(`react.portal`),ot=Symbol.for(`react.fragment`),st=Symbol.for(`react.strict_mode`),ct=Symbol.for(`react.profiler`),lt=Symbol.for(`react.provider`),ut=Symbol.for(`react.context`),dt=Symbol.for(`react.forward_ref`),ft=Symbol.for(`react.suspense`),pt=Symbol.for(`react.suspense_list`),mt=Symbol.for(`react.memo`),ht=Symbol.for(`react.lazy`),gt=Symbol.for(`react.scope`),_t=Symbol.for(`react.debug_trace_mode`),vt=Symbol.for(`react.legacy_hidden`),yt=Symbol.for(`react.default_value`),bt=Symbol.iterator;function xt(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ot:return`Fragment`;case at:return`Portal`;case ct:return`Profiler`;case st:return`StrictMode`;case ft:return`Suspense`;case pt:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ut:return(e.displayName||`Context`)+`.Consumer`;case lt:return(e._context.displayName||`Context`)+`.Provider`;case dt:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case mt:return t=e.displayName||null,t===null?xt(e.type)||`Memo`:t;case ht:t=e._payload,e=e._init;try{return xt(e(t))}catch{}}return null}var St={};function Ct(e,t){if(e=e.contextTypes,!e)return St;var n={},r;for(r in e)n[r]=t[r];return n}var wt=null;function Tt(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var r=t.parent;if(e===null){if(r!==null)throw Error(n(401))}else{if(r===null)throw Error(n(401));Tt(e,r)}t.context._currentValue=t.value}}function Et(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&Et(e)}function Dt(e){var t=e.parent;t!==null&&Dt(t),e.context._currentValue=e.value}function Ot(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(n(402));e.depth===t.depth?Tt(e,t):Ot(e,t)}function kt(e,t){var r=t.parent;if(r===null)throw Error(n(402));e.depth===r.depth?Tt(e,r):kt(e,r),t.context._currentValue=t.value}function At(e){var t=wt;t!==e&&(t===null?Dt(e):e===null?Et(t):t.depth===e.depth?Tt(t,e):t.depth>e.depth?Ot(t,e):kt(t,e),wt=e)}var jt={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Mt(e,t,n,r){var i=e.state===void 0?null:e.state;e.updater=jt,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var o=t.contextType;if(e.context=typeof o==`object`&&o?o._currentValue:r,o=t.getDerivedStateFromProps,typeof o==`function`&&(o=o(n,i),i=o==null?i:rt({},i,o),e.state=i),typeof t.getDerivedStateFromProps!=`function`&&typeof e.getSnapshotBeforeUpdate!=`function`&&(typeof e.UNSAFE_componentWillMount==`function`||typeof e.componentWillMount==`function`))if(t=e.state,typeof e.componentWillMount==`function`&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount==`function`&&e.UNSAFE_componentWillMount(),t!==e.state&&jt.enqueueReplaceState(e,e.state,null),a.queue!==null&&0<a.queue.length)if(t=a.queue,o=a.replace,a.queue=null,a.replace=!1,o&&t.length===1)e.state=t[0];else{for(a=o?t[0]:e.state,i=!0,o=+!!o;o<t.length;o++){var s=t[o];s=typeof s==`function`?s.call(e,a,n,r):s,s!=null&&(i?(i=!1,a=rt({},a,s)):rt(a,s))}e.state=a}else a.queue=null}var Nt={id:1,overflow:``};function Pt(e,t,n){var r=e.id;e=e.overflow;var i=32-Ft(r)-1;r&=~(1<<i),n+=1;var a=32-Ft(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-Ft(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var Ft=Math.clz32?Math.clz32:Rt,It=Math.log,Lt=Math.LN2;function Rt(e){return e>>>=0,e===0?32:31-(It(e)/Lt|0)|0}function zt(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Bt=typeof Object.is==`function`?Object.is:zt,Vt=null,Ht=null,Ut=null,Wt=null,Gt=!1,Kt=!1,qt=0,Jt=null,Yt=0;function Xt(){if(Vt===null)throw Error(n(321));return Vt}function Zt(){if(0<Yt)throw Error(n(312));return{memoizedState:null,queue:null,next:null}}function Qt(){return Wt===null?Ut===null?(Gt=!1,Ut=Wt=Zt()):(Gt=!0,Wt=Ut):Wt.next===null?(Gt=!1,Wt=Wt.next=Zt()):(Gt=!0,Wt=Wt.next),Wt}function $t(){Ht=Vt=null,Kt=!1,Ut=null,Yt=0,Wt=Jt=null}function en(e,t){return typeof t==`function`?t(e):t}function tn(e,t,n){if(Vt=Xt(),Wt=Qt(),Gt){var r=Wt.queue;if(t=r.dispatch,Jt!==null&&(n=Jt.get(r),n!==void 0)){Jt.delete(r),r=Wt.memoizedState;do r=e(r,n.action),n=n.next;while(n!==null);return Wt.memoizedState=r,[r,t]}return[Wt.memoizedState,t]}return e=e===en?typeof t==`function`?t():t:n===void 0?t:n(t),Wt.memoizedState=e,e=Wt.queue={last:null,dispatch:null},e=e.dispatch=rn.bind(null,Vt,e),[Wt.memoizedState,e]}function nn(e,t){if(Vt=Xt(),Wt=Qt(),t=t===void 0?null:t,Wt!==null){var n=Wt.memoizedState;if(n!==null&&t!==null){var r=n[1];a:if(r===null)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!Bt(t[i],r[i])){r=!1;break a}r=!0}if(r)return n[0]}}return e=e(),Wt.memoizedState=[e,t],e}function rn(e,t,r){if(25<=Yt)throw Error(n(301));if(e===Vt)if(Kt=!0,e={action:r,next:null},Jt===null&&(Jt=new Map),r=Jt.get(t),r===void 0)Jt.set(t,e);else{for(t=r;t.next!==null;)t=t.next;t.next=e}}function an(){throw Error(n(394))}function on(){}var sn={readContext:function(e){return e._currentValue},useContext:function(e){return Xt(),e._currentValue},useMemo:nn,useReducer:tn,useRef:function(e){Vt=Xt(),Wt=Qt();var t=Wt.memoizedState;return t===null?(e={current:e},Wt.memoizedState=e):t},useState:function(e){return tn(en,e)},useInsertionEffect:on,useLayoutEffect:function(){},useCallback:function(e,t){return nn(function(){return e},t)},useImperativeHandle:on,useEffect:on,useDebugValue:on,useDeferredValue:function(e){return Xt(),e},useTransition:function(){return Xt(),[!1,an]},useId:function(){var e=Ht.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-Ft(e)-1)).toString(32)+t;var r=cn;if(r===null)throw Error(n(404));return t=qt++,e=`:`+r.idPrefix+`R`+e,0<t&&(e+=`H`+t.toString(32)),e+`:`},useMutableSource:function(e,t){return Xt(),t(e._source)},useSyncExternalStore:function(e,t,r){if(r===void 0)throw Error(n(407));return r()}},cn=null,ln=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function un(e){console.error(e)}function dn(){}function fn(e,t,n,r,i,a,o,s,c){var l=[],u=new Set;return t={destination:null,responseState:t,progressiveChunkSize:r===void 0?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:u,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:i===void 0?un:i,onAllReady:a===void 0?dn:a,onShellReady:o===void 0?dn:o,onShellError:s===void 0?dn:s,onFatalError:c===void 0?dn:c},n=mn(t,0,null,n),n.parentFlushed=!0,e=pn(t,e,null,n,u,St,null,Nt),l.push(e),t}function pn(e,t,n,r,i,a,o,s){e.allPendingTasks++,n===null?e.pendingRootTasks++:n.pendingTasks++;var c={node:t,ping:function(){var t=e.pingedTasks;t.push(c),t.length===1&&On(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:o,treeContext:s};return i.add(c),c}function mn(e,t,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n}}function hn(e,t){e=e.onError,e(t)}function gn(e,t){var n=e.onShellError;n(t),n=e.onFatalError,n(t),e.destination===null?(e.status=1,e.fatalError=t):(e.status=2,d(e.destination,t))}function _n(e,t,n,r,i){for(Vt={},Ht=t,qt=0,e=n(r,i);Kt;)Kt=!1,qt=0,Yt+=1,Wt=null,e=n(r,i);return $t(),e}function vn(e,t,r,i){var a=r.render(),o=i.childContextTypes;if(o!=null){var s=t.legacyContext;if(typeof r.getChildContext!=`function`)i=s;else{for(var c in r=r.getChildContext(),r)if(!(c in o))throw Error(n(108,xt(i)||`Unknown`,c));i=rt({},s,r)}t.legacyContext=i,xn(e,t,a),t.legacyContext=s}else xn(e,t,a)}function yn(e,t){if(e&&e.defaultProps){for(var n in t=rt({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function bn(e,t,r,i,a){if(typeof r==`function`)if(r.prototype&&r.prototype.isReactComponent){a=Ct(r,t.legacyContext);var o=r.contextType;o=new r(i,typeof o==`object`&&o?o._currentValue:a),Mt(o,r,i,a),vn(e,t,o,r)}else{o=Ct(r,t.legacyContext),a=_n(e,t,r,i,o);var s=qt!==0;if(typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0)Mt(a,r,i,o),vn(e,t,a,r);else if(s){i=t.treeContext,t.treeContext=Pt(i,1,0);try{xn(e,t,a)}finally{t.treeContext=i}}else xn(e,t,a)}else if(typeof r==`string`)switch(a=t.blockedSegment,o=he(a.chunks,r,i,e.responseState,a.formatContext),s=a.formatContext,a.formatContext=R(s,r,i),Cn(e,t,o),a.formatContext=s,r){case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`img`:case`input`:case`keygen`:case`link`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:break;default:a.chunks.push(ge,l(r),_e)}else{switch(r){case vt:case _t:case st:case ct:case ot:xn(e,t,i.children);return;case pt:xn(e,t,i.children);return;case gt:throw Error(n(343));case ft:a:{r=t.blockedBoundary,a=t.blockedSegment,o=i.fallback,i=i.children,s=new Set;var c={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:s},u=mn(e,a.chunks.length,c,a.formatContext);a.children.push(u);var d=mn(e,0,null,a.formatContext);d.parentFlushed=!0,t.blockedBoundary=c,t.blockedSegment=d;try{if(Cn(e,t,i),d.status=1,En(c,d),c.pendingTasks===0)break a}catch(t){d.status=4,hn(e,t),c.forceClientRender=!0}finally{t.blockedBoundary=r,t.blockedSegment=a}t=pn(e,o,r,u,s,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof r==`object`&&r)switch(r.$$typeof){case dt:if(i=_n(e,t,r.render,i,a),qt!==0){r=t.treeContext,t.treeContext=Pt(r,1,0);try{xn(e,t,i)}finally{t.treeContext=r}}else xn(e,t,i);return;case mt:r=r.type,i=yn(r,i),bn(e,t,r,i,a);return;case lt:if(a=i.children,r=r._context,i=i.value,o=r._currentValue,r._currentValue=i,s=wt,wt=i={parent:s,depth:s===null?0:s.depth+1,context:r,parentValue:o,value:i},t.context=i,xn(e,t,a),e=wt,e===null)throw Error(n(403));i=e.parentValue,e.context._currentValue=i===yt?e.context._defaultValue:i,e=wt=e.parent,t.context=e;return;case ut:i=i.children,i=i(r._currentValue),xn(e,t,i);return;case ht:a=r._init,r=a(r._payload),i=yn(r,i),bn(e,t,r,i,void 0);return}throw Error(n(130,r==null?r:typeof r,``))}}function xn(e,t,r){if(t.node=r,typeof r==`object`&&r){switch(r.$$typeof){case it:bn(e,t,r.type,r.props,r.ref);return;case at:throw Error(n(257));case ht:var i=r._init;r=i(r._payload),xn(e,t,r);return}if(D(r)){Sn(e,t,r);return}if(typeof r!=`object`||!r?i=null:(i=bt&&r[bt]||r[`@@iterator`],i=typeof i==`function`?i:null),i&&=i.call(r)){if(r=i.next(),!r.done){var a=[];do a.push(r.value),r=i.next();while(!r.done);Sn(e,t,a)}return}throw t=Object.prototype.toString.call(r),Error(n(31,t===`[object Object]`?`object with keys {`+Object.keys(r).join(`, `)+`}`:t))}typeof r==`string`?r!==``&&t.blockedSegment.chunks.push(l(w(r)),z):typeof r==`number`&&(e=``+r,e!==``&&t.blockedSegment.chunks.push(l(w(e)),z))}function Sn(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=Pt(a,r,i);try{Cn(e,t,n[i])}finally{t.treeContext=a}}}function Cn(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return xn(e,t,n)}catch(c){if($t(),typeof c==`object`&&c&&typeof c.then==`function`){n=c;var o=t.blockedSegment,s=mn(e,o.chunks.length,null,o.formatContext);o.children.push(s),e=pn(e,t.node,t.blockedBoundary,s,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,At(a)}else throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,At(a),c}}function wn(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,Dn(this,t,e)}function Tn(e){var t=e.blockedBoundary;e.blockedSegment.status=3,t===null?(this.allPendingTasks--,this.status!==2&&(this.status=2,this.destination!==null&&this.destination.close())):(t.pendingTasks--,t.forceClientRender||(t.forceClientRender=!0,t.parentFlushed&&this.clientRenderedBoundaries.push(t)),t.fallbackAbortableTasks.forEach(Tn,this),t.fallbackAbortableTasks.clear(),this.allPendingTasks--,this.allPendingTasks===0&&(e=this.onAllReady,e()))}function En(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,n.status===1&&En(e,n)}else e.completedSegments.push(t)}function Dn(e,t,r){if(t===null){if(r.parentFlushed){if(e.completedRootSegment!==null)throw Error(n(389));e.completedRootSegment=r}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=dn,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(r.parentFlushed&&r.status===1&&En(t,r),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(wn,e),t.fallbackAbortableTasks.clear()):r.parentFlushed&&r.status===1&&(En(t,r),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function On(e){if(e.status!==2){var t=wt,n=ln.current;ln.current=sn;var r=cn;cn=e.responseState;try{var i=e.pingedTasks,a;for(a=0;a<i.length;a++){var o=i[a],s=e,c=o.blockedSegment;if(c.status===0){At(o.context);try{xn(s,o,o.node),o.abortSet.delete(o),c.status=1,Dn(s,o.blockedBoundary,c)}catch(e){if($t(),typeof e==`object`&&e&&typeof e.then==`function`){var l=o.ping;e.then(l,l)}else{o.abortSet.delete(o),c.status=4;var u=o.blockedBoundary,d=e;if(hn(s,d),u===null?gn(s,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.parentFlushed&&s.clientRenderedBoundaries.push(u))),s.allPendingTasks--,s.allPendingTasks===0){var f=s.onAllReady;f()}}}}}i.splice(0,a),e.destination!==null&&Pn(e,e.destination)}catch(t){hn(e,t),gn(e,t)}finally{cn=r,ln.current=n,n===sn&&At(t)}}}function kn(e,t,r){switch(r.parentFlushed=!0,r.status){case 0:var i=r.id=e.nextSegmentId++;return e=e.responseState,a(t,ve),a(t,e.placeholderPrefix),e=l(i.toString(16)),a(t,e),o(t,ye);case 1:r.status=2;var s=!0;i=r.chunks;var c=0;r=r.children;for(var u=0;u<r.length;u++){for(s=r[u];c<s.index;c++)a(t,i[c]);s=An(e,t,s)}for(;c<i.length-1;c++)a(t,i[c]);return c<i.length&&(s=o(t,i[c])),s;default:throw Error(n(390))}}function An(e,t,r){var i=r.boundary;if(i===null)return kn(e,t,r);if(i.parentFlushed=!0,i.forceClientRender)o(t,Ce),kn(e,t,r);else if(0<i.pendingTasks){i.rootSegmentID=e.nextSegmentId++,0<i.completedSegments.length&&e.partialBoundaries.push(i);var a=e.responseState,s=a.nextSuspenseID++;a=u(a.boundaryPrefix+s.toString(16)),i=i.id=a,Te(t,e.responseState,i),kn(e,t,r)}else if(i.byteSize>e.progressiveChunkSize)i.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(i),Te(t,e.responseState,i.id),kn(e,t,r);else{if(o(t,be),r=i.completedSegments,r.length!==1)throw Error(n(391));An(e,t,r[0])}return o(t,we)}function jn(e,t,n){return We(t,e.responseState,n.formatContext,n.id),An(e,t,n),Ge(t,n.formatContext)}function Mn(e,t,r){for(var i=r.completedSegments,s=0;s<i.length;s++)Nn(e,t,r,i[s]);if(i.length=0,e=e.responseState,i=r.id,r=r.rootSegmentID,a(t,e.startInlineScript),e.sentCompleteBoundaryFunction?a(t,Ze):(e.sentCompleteBoundaryFunction=!0,a(t,Xe)),i===null)throw Error(n(395));return r=l(r.toString(16)),a(t,i),a(t,Qe),a(t,e.segmentPrefix),a(t,r),o(t,$e)}function Nn(e,t,r,i){if(i.status===2)return!0;var s=i.id;if(s===-1){if((i.id=r.rootSegmentID)===-1)throw Error(n(392));return jn(e,t,i)}return jn(e,t,i),e=e.responseState,a(t,e.startInlineScript),e.sentCompleteSegmentFunction?a(t,qe):(e.sentCompleteSegmentFunction=!0,a(t,Ke)),a(t,e.segmentPrefix),s=l(s.toString(16)),a(t,s),a(t,Je),a(t,e.placeholderPrefix),a(t,s),o(t,Ye)}function Pn(e,t){r=new Uint8Array(512),i=0;try{var c=e.completedRootSegment;if(c!==null&&e.pendingRootTasks===0){An(e,t,c),e.completedRootSegment=null;var l=e.responseState.bootstrapChunks;for(c=0;c<l.length-1;c++)a(t,l[c]);c<l.length&&o(t,l[c])}var u=e.clientRenderedBoundaries,d;for(d=0;d<u.length;d++){l=t;var f=e.responseState,p=u[d].id;if(a(l,f.startInlineScript),f.sentClientRenderFunction?a(l,tt):(f.sentClientRenderFunction=!0,a(l,et)),p===null)throw Error(n(395));if(a(l,p),!o(l,nt)){e.destination=null,d++,u.splice(0,d);return}}u.splice(0,d);var m=e.completedBoundaries;for(d=0;d<m.length;d++)if(!Mn(e,t,m[d])){e.destination=null,d++,m.splice(0,d);return}m.splice(0,d),s(t),r=new Uint8Array(512),i=0;var h=e.partialBoundaries;for(d=0;d<h.length;d++){var g=h[d];a:{u=e,f=t;var _=g.completedSegments;for(p=0;p<_.length;p++)if(!Nn(u,f,g,_[p])){p++,_.splice(0,p);var v=!1;break a}_.splice(0,p),v=!0}if(!v){e.destination=null,d++,h.splice(0,d);return}}h.splice(0,d);var y=e.completedBoundaries;for(d=0;d<y.length;d++)if(!Mn(e,t,y[d])){e.destination=null,d++,y.splice(0,d);return}y.splice(0,d)}finally{s(t),e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.close()}}function Fn(e){try{var t=e.abortableTasks;t.forEach(Tn,e),t.clear(),e.destination!==null&&Pn(e,e.destination)}catch(t){hn(e,t),gn(e,t)}}e.renderToReadableStream=function(e,t){return new Promise(function(n,r){var i,a,o=new Promise(function(e,t){a=e,i=t}),s=fn(e,F(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),L(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,a,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){if(s.status===1)s.status=2,d(e,s.fatalError);else if(s.status!==2&&s.destination===null){s.destination=e;try{Pn(s,e)}catch(e){hn(s,e),gn(s,e)}}},cancel:function(){Fn(s)}});e.allReady=o,n(e)},function(e){o.catch(function(){}),r(e)},i);if(t&&t.signal){var c=t.signal,l=function(){Fn(s),c.removeEventListener(`abort`,l)};c.addEventListener(`abort`,l)}On(s)})},e.version=`18.1.0`})),ZS=o((e=>{var t=YS(),n=XS();e.version=t.version,e.renderToString=t.renderToString,e.renderToStaticMarkup=t.renderToStaticMarkup,e.renderToNodeStream=t.renderToNodeStream,e.renderToStaticNodeStream=t.renderToStaticNodeStream,e.renderToReadableStream=n.renderToReadableStream}))(),QS={getSvg(e){return(0,ZS.renderToStaticMarkup)((0,Q.jsx)(e,{...this.getCommonSvgProps()}))},getCommonSvgProps(){return{viewBox:`0 0 24 24`,role:`img`,"aria-hidden":`true`}}},$S=`d-inline-block svg-container`,eC=`span`,tC=function(e){return e.Standard=`std`,e.XXS=`xxs`,e.ExtraSmall=`xs`,e.Small=`sm`,e.Medium=`md`,e.Large=`lg`,e.ExtraLarge=`xlg`,e.XXL=`xxlg`,e}({});function nC(e){let{svg:t,className:n=$S,tagName:r=eC,size:i=`std`,onClick:a,title:o,tooltipSpanHackClassName:s,tooltipPlacement:c=`right`,tooltipSpanHack:l=!1,tooltipShow:u}=e,d=r,f={className:`${n} ${i}`,onClick:i_.isFunction(a)?a:null},p=t;return(0,Q.jsx)(JS,{title:o,placement:c,spanHack:l,spanHackClassName:s,show:u,children:(0,Q.jsx)(d,{...f,children:p&&(0,Q.jsx)(p,{...QS.getCommonSvgProps()})})})}function rC(e){return(0,Q.jsx)(`svg`,{...e,children:(0,Q.jsx)(`path`,{d:`m13.026 4.377 8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0M12 5 3.5 19h17zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2m.75-3.677a.69.69 0 0 1-.7.677.69.69 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677s.7.303.7.677z`,fill:`currentColor`})})}var iC={bars:`_bars_1gyu0_1`},aC={weak:`red`,fair:`orange`,good:`blue`,strong:`green`};function oC(e){switch(e){case 0:case 1:return`weak`;case 2:return`fair`;case 3:return`good`;case 4:return`strong`}return null}function sC(e,t,n){return t===0&&e===0?`bg-red`:e<=t-1?`bg-${aC[n]}`:`bg-light`}function cC(e){let t=oC(e.score);return(0,Q.jsxs)(`div`,{className:nd(`pb-3`,e.className),children:[(0,Q.jsx)(`ul`,{className:nd(`list-group list-group-horizontal d-flex gap-2`,iC.bars),children:Array.from({length:4},(n,r)=>(0,Q.jsx)(`li`,{className:nd(`list-group-item rounded-pill border-0 flex-grow-1 py-1`,sC(r,e.score,t))},`password-block_${r}`))}),(0,Q.jsx)(`div`,{className:nd(`mb-1 text-end`),children:t&&(0,Q.jsx)(`span`,{className:nd(`text-${aC[t]}`),children:e.strengthText})}),(e.warning||e.suggestions?.length>0)&&(0,Q.jsxs)(`div`,{className:`bg-light-orange d-flex gap-3 py-2 px-3`,children:[(0,Q.jsx)(nC,{svg:rC,className:`d-inline-block svg-container text-orange`,size:tC.Standard}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`span`,{children:e.suggestionHeader}),(0,Q.jsxs)(`ul`,{className:`mb-0`,children:[e.warning&&(0,Q.jsx)(`li`,{className:`mt-1`,children:e.warning}),e.suggestions?.map((e,t)=>(0,Q.jsx)(`li`,{className:`mt-1`,children:e},`suggestion-${t}`))]})]})]})]})}var lC=(e,t)=>{let[n,r]=Z.useState(e);return Z.useEffect(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n},uC=`modulepreload`,dC=function(e){return`/`+e},fC={},pC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=dC(t,n),t=s(t),t in fC)return;fC[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:uC,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},mC=150,hC=[`clickview`],gC=null;function _C(){return gC||=vC().catch(e=>{throw gC=null,e}),gC}async function vC(){let[e,t,n]=await Promise.all([pC(()=>import(`./DZiTrzZf.chunk.js`),[]),pC(()=>import(`./B7AxsMtH.chunk.js`),__vite__mapDeps([0,1])),pC(()=>import(`./DFawGnSF.chunk.js`),__vite__mapDeps([2,1]))]);return new e.ZxcvbnFactory({graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary,userInputs:hC}})}function yC(e){let t=lC(e,mC),[n,r]=Z.useState(null);return Z.useEffect(()=>{if(!t){r(null);return}let e=!1;async function n(){try{let n=await _C();e||r(n.check(t))}catch{e||r(null)}}return n(),()=>{e=!0}},[t]),n}var bC=[`extendedRepeat`,`simpleRepeat`];function xC(){let[e,t]=Z.useState(``),n=yC(e),r=n?.feedback?.warning,i=r&&_p.getWarningPhrase(r),a=n?.feedback.suggestions.filter(e=>_p.getSuggestPhrase(e)&&e!==r&&!(e===`repeated`&&bC.includes(r))).map(e=>_p.getSuggestPhrase(e)),o=n?.score;return{password:e,setPassword:t,passwordCheck:n,warning:i,suggestions:a,passwordScore:o,passwordStrength:(0,mp.capitalize)(oC(o))||``}}function SC(e){let{error:t,spinner:n,onClickContinue:r}=e;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme}),(0,Q.jsx)(up,{}),(0,Q.jsx)(`p`,{className:`text-center mb-4 mt-2`,children:`Your password has been updated`}),t&&(0,Q.jsx)(`p`,{className:`text-danger text-center mb-4 mt-2`,children:t}),(0,Q.jsx)(id,{className:`btn btn-lg w-100 btn-dark`,showSpinner:n,onClick:r,children:`Continue`})]})}function CC(e){let{submit:t}=e,{password:n,setPassword:r,warning:i,suggestions:a,passwordScore:o,passwordStrength:s,passwordCheck:c}=xC(),[l,u]=Z.useState(``),[d,f]=Z.useState(``),[p,m]=Z.useState(!1),[h,g]=Z.useState(null),{productName:_}=Ld.getDefinition(e.theme);function v(e){r(e.target.value),f(``)}function y(e){u(e.target.value),f(``)}function b(){let[e,t]=tp.isPasswordValid(n,l,!0);return t&&f(t),e}function x(e){e.preventDefault(),b()&&(m(!0),t(l).then(e=>{m(!1),g(e)}).catch(e=>{m(!1),f(e.userMessage||`Something went wrong`)}))}function S(){try{m(!0),zd(h,e)}catch(e){m(!1),f(e.userMessage||`Something went wrong`)}}return h?(0,Q.jsx)(SC,{error:d,spinner:p,onClickContinue:S,theme:e.theme}):(0,Q.jsxs)(`form`,{onSubmit:x,children:[(0,Q.jsxs)(rd,{onClickBack:e.onClickBack,theme:e.theme,title:e.heading,children:[`Create a new password to secure your `,(0,Q.jsx)(`strong`,{children:_}),` account`]}),(0,Q.jsxs)(`div`,{className:`mb-4`,children:[(0,Q.jsx)(qf,{className:`mb-3`,placeholder:`Enter your new password`,autoFocus:!0,value:n,onChange:v,name:`new-password`,autoComplete:`new-password`,hasError:!!d,"aria-invalid":!!d,"aria-errormessage":`new-passwordError`}),c&&(0,Q.jsx)(`div`,{className:`mt-n2`,children:(0,Q.jsx)(cC,{score:o,suggestions:a,warning:i,suggestionHeader:`Suggested ways to strengthen your password:`,strengthText:s})}),(0,Q.jsx)(qf,{id:`confirm-new-password`,label:`Confirm Password`,placeholder:`Enter your password confirmation`,value:l,onChange:y,name:`new-password`,autoComplete:`new-password`,hasError:!!d,"aria-invalid":!!d,"aria-errormessage":`new-passwordError`}),!!d&&(0,Q.jsx)(Cf,{name:`new-password`,children:d})]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:p,children:`Update password`})]})}function wC(e){let{email:t,code:n,navigate:r}=e;function i(e){return xd.post(`/ajax/login/reset-password`,{email:t,code:n,newPassword:e})}function a(){r({step:`forgot-password`,backStep:`username`})}return(0,Q.jsx)(CC,{heading:`Reset password`,submit:i,onClickBack:a,...e})}function TC(e){function t(e){return xd.post(`/ajax/login/change-password`,{newPassword:e})}return(0,Q.jsx)(CC,{heading:`Change password`,submit:t,...e})}function EC(e){let{navigate:t,backStep:n}=e,[r]=Z.useState(e.userId||``),[i,a]=Z.useState(e.username||``),[o,s]=Z.useState(!1),[c,l]=Z.useState(``);function u(e){a(e.target.value.trim())}function d(t){if(t.preventDefault(),!i){l(`Please provide an email or username`);return}s(!0),xd.post(`/ajax/login/send-self-activation-code`,{userId:r}).then(t=>zd(t,e,{userId:r,username:i})).catch(e=>{s(!1),l(e.userMessage||`Something went wrong`)})}function f(){t({step:n})}return(0,Q.jsxs)(`form`,{onSubmit:d,children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:n&&f,title:`Verify your email`,children:`We will send you a verification code to your email to activate your account.`}),(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(ud,{name:`email`,value:i,type:`username`,disabled:!0,onChange:u,isError:!!c,"aria-invalid":!!c,"aria-errormessage":`emailError`}),!!c&&(0,Q.jsx)(Cf,{name:`email`,children:c})]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:o,children:`Send verification code`}),(0,Q.jsx)(`p`,{className:`text-start mt-3`,children:`Single Sign On customers should contact their network administrator to activate their account.`})]})}function DC(e){let{navigate:t,userId:n,username:r,theme:i}=e;function a(){t({step:`self-activation`})}function o(){t({step:`self-activation`,userId:n})}function s(t){return xd.post(`/ajax/login/check-self-activation-code`,{code:t,userId:n}).then(n=>zd(n,e,{code:t}))}return(0,Q.jsx)(cp,{navigate:t,theme:i,title:`Enter code`,description:(0,Q.jsxs)(Q.Fragment,{children:[`Please enter the `,(0,Q.jsx)(`strong`,{children:`6 digit`}),` code we've sent to `,(0,Q.jsx)(`strong`,{children:r})]}),submit:s,onBack:a,onResend:o,...e})}var OC={badge:`_badge_1l0uk_1`};function kC(e){return(0,Q.jsx)(`span`,{className:`rounded-pill d-inline-block mb-1 badge-white border border-dark rounded-pill ${OC.badge}`,children:e.children})}function AC(e){let{navigate:t}=e;function n(){t({step:e.backStep})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:e.backStep?n:null,className:{description:`text-center`},children:!!e.email&&(0,Q.jsx)(kC,{children:e.email})}),(0,Q.jsx)(`span`,{className:`h4 mb-3 d-block text-center`,children:`Contact Support`}),(0,Q.jsxs)(`p`,{className:`text-center`,children:[`Please get in touch with our `,(0,Q.jsx)(`strong`,{children:`Product Support Team`}),` by emailing `,(0,Q.jsx)(`a`,{className:`text-info`,href:`mailto:support@clickvieweducation.com`,children:`support@clickvieweducation.com`}),` for further assistance.`]})]})}function jC(e){let t=fd(e.errorCode);return(0,Q.jsxs)(`div`,{className:`text-center`,children:[(0,Q.jsx)(rd,{theme:e.theme}),(0,Q.jsx)(`img`,{className:`img-fluid mb-4`,alt:`error`,src:`/images/errors/${t.errorImage||`default-v2.png`}`}),(0,Q.jsxs)(`div`,{className:`d-flex flex-column gap-3`,children:[(0,Q.jsx)(`h1`,{className:`h3 mb-0`,children:t.preferServerError?e.message:t.message}),!!t.additionalInformation&&(0,Q.jsx)(`p`,{className:`mb-0`,children:t.additionalInformation}),!!t.moreInfoUrl&&(0,Q.jsx)(`p`,{className:`mb-0`,children:(0,Q.jsx)(`a`,{href:t.moreInfoUrl,className:`text-info`,children:`Learn more`})}),(0,Q.jsx)(MC,{errorCode:e.errorCode,traceId:e.traceId})]})]})}function MC(e){return(0,Q.jsxs)(`div`,{className:`text-secondary small w-100`,children:[(0,Q.jsxs)(`p`,{className:`m-0`,children:[`Error Code: `,e.errorCode]}),(0,Q.jsxs)(`p`,{className:`m-0`,children:[`RequestId: `,e.traceId]})]})}function NC(e){let{token:t,email:n,userId:r,navigate:i}=e,[a,o]=Z.useState(!1);function s(){o(!0),xd.post(`/ajax/verify-email`,{token:t,email:n,userId:r}).then(t=>zd(t,e)).catch(()=>{i({step:`error`,errorCode:`invalid-token`})})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(rd,{theme:e.theme,title:`Before you proceed...`,children:[`Your email address `,(0,Q.jsx)(`strong`,{children:n}),` is already in use with another account. By continuing you will remove your email from the other account.`]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`button`,showSpinner:a,onClick:s,children:`Continue anyway`})]})}function PC(e){let{email:t,code:n,navigate:r}=e,[i,a]=Z.useState(!1);function o(){r({step:`verify-email`,email:t})}function s(){a(!0),xd.post(`/ajax/login/verify-email`,{email:t,code:n,acknowledgeEmailInUse:!0}).then(t=>zd(t,e)).catch(()=>{r({step:`error`,errorCode:`invalid-token`})})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(rd,{onClickBack:o,theme:e.theme,title:`Before you proceed...`,children:[`Your email address `,(0,Q.jsx)(`strong`,{children:t}),` is already in use with another account. By continuing you will remove your email from the other account.`]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`button`,showSpinner:i,onClick:s,children:`Continue anyway`})]})}var FC=function(e){return e.NotNow=`not-now`,e.NoEmail=`no-email`,e.EmailNotReceived=`email-not-received`,e.Other=`other`,e}(FC||{});function IC(e){let{returnUrl:t,navigate:n,backStep:r}=e,[i,a]=Z.useState(),[o,s]=Z.useState(),[c,l]=Z.useState(!1),[u,d]=Z.useState(``),{productName:f}=Ld.getDefinition(e.theme);function p(){return i===`other`?tp.containsValidText(o)&&tp.isValidLength(o):Object.values(FC).includes(i)}function m(){n({step:r||`verify-email`})}function h(e){a(e)}function g(e){let t=e.target.value,n=``;tp.containsValidText(t)?tp.exceedsMaxLength(t)&&(n=`Your reason is too long`):n=`Your reason contains an invalid character or symbol`,d(n),s(t)}function _(n){if(n.preventDefault(),!p())return;l(!0);let r=i===`other`?`other:${o}`:i;xd.post(`/ajax/login/skip-verify-email`,{reason:r,returnUrl:t}).then(t=>zd(t,e)).catch(e=>{l(!1),d(e.userMessage||`Something went wrong`)})}return(0,Q.jsxs)(`form`,{onSubmit:_,children:[(0,Q.jsx)(rd,{onClickBack:m,theme:e.theme,title:`Let us know why you aren't able to verify`,className:{description:`mt-0 mb-0`},children:`Verifying will increase the security of your account and improve features on ClickView.`}),(0,Q.jsxs)(`div`,{className:`mb-4`,children:[(0,Q.jsxs)(`div`,{className:`form-check my-3`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`not-now`,name:`not-now`,checked:i===`not-now`,onChange:()=>h(`not-now`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`not-now`,children:`Not the right time`})]}),(0,Q.jsxs)(`div`,{className:`form-check my-3`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`no-email`,name:`no-email`,checked:i===`no-email`,onChange:()=>h(`no-email`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`no-email`,children:`I don't have an email address`})]}),(0,Q.jsxs)(`div`,{className:`form-check my-3`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`email-not-received`,name:`email-not-received`,checked:i===`email-not-received`,onChange:()=>h(`email-not-received`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`email-not-received`,children:`I didn't receive a verification email`})]}),(0,Q.jsxs)(`div`,{className:`form-check mt-3 mb-2`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`other`,name:`other`,checked:i===`other`,onChange:()=>h(`other`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`other`,children:`Other reasons (please specify)`})]}),i===`other`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${u?`is-invalid`:``}`,type:`text`,placeholder:`Enter your reason`,name:`reason`,onChange:g,autoComplete:`off`,"aria-invalid":!!u,"aria-errormessage":`reasonError`}),!!u&&(0,Q.jsx)(Cf,{name:`reason`,children:u})]})]}),(0,Q.jsxs)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,disabled:!p(),showSpinner:c,children:[`Continue to `,f]})]})}function LC(e){let{logoutId:t}=e,[n,r]=Z.useState(!1),{productName:i}=Ld.getDefinition(e.theme);function a(){r(!0)}return(0,Q.jsxs)(`form`,{onSubmit:a,action:`/logout`,method:`post`,children:[(0,Q.jsxs)(rd,{theme:e.theme,title:`Logout`,children:[`Would you like to logout of `,i,`?`]}),(0,Q.jsx)(`input`,{type:`hidden`,name:`logoutId`,value:t||``}),(0,Q.jsx)(`input`,{type:`hidden`,name:`__RequestVerificationToken`,value:xd.getXsrfToken()}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:n,children:`Yes`})]})}function RC(e){let{postLogoutRedirectUri:t,clientName:n,signOutIframeUrl:r,automaticRedirectAfterSignOut:i}=e;return Z.useEffect(()=>{!i||!t||(window.location.href=t)},[i,t]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Logged out`,children:`You are now logged out.`}),t&&(0,Q.jsxs)(`p`,{children:[`Click `,(0,Q.jsx)(`a`,{href:t,className:`text-info`,children:`here`}),` to return to the `,n,` application.`]}),r&&(0,Q.jsx)(`iframe`,{width:0,height:0,frameBorder:0,src:r})]})}function zC(e){let{navigate:t,organisation:n,orgCustomers:r,backStep:i}=e,[a,o]=Z.useState(null),[s,c]=Z.useState(null);async function l(t){try{await xd.post(`/ajax/external/join-organisation-customer`,{customerId:t}),zd(await xd.post(`/ajax/login/select-customer`,{customerId:t}),e)}catch(e){c(e.userMessage||`Something went wrong. Please try again.`)}}function u(e){l(e.id)}function d(){t({step:`contact-support`,backStep:`organisation-select-customer`})}function f(){a&&l(a.id)}function p(){t({step:`select-customer`,backStep:`organisation-select-customer`})}function m(){t({step:i,backStep:null})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:i&&m}),(0,Q.jsxs)(`span`,{className:`h4 mb-3 d-block text-left`,children:[`To sign in, select a school from `,n.name]}),!!e.email&&(0,Q.jsx)(`p`,{className:`text-left`,children:(0,Q.jsx)(kC,{children:e.email})}),!!r?.length&&(0,Q.jsx)(`div`,{className:`mb-4`,children:r.length>10?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Schools`}),(0,Q.jsx)(`div`,{className:`mb-3`,children:(0,Q.jsx)(Bf,{id:`school`,item:a,items:r,onSelect:o,getName:e=>e.name,clearData:()=>o(null),placeholder:`Select a school`,size:`lg`,cantFindText:`My school is not listed`,onCantFind:d})}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-4`,disabled:!a,onClick:f,children:`Continue`})]}):(0,Q.jsxs)(`div`,{children:[r.map((e,t)=>(0,Q.jsx)(kf,{onClick:()=>u(e),text:e.name,icon:jf.buildAvatarUrl(e.logoUrl,{size:`small`})||Af,className:`mb-3`,iconColor:`dark`},t)),(0,Q.jsx)(`button`,{className:`text-info`,onClick:d,children:`My school is not listed`})]})}),e.hasExistingCustomers&&!i&&(0,Q.jsxs)(`button`,{className:`h5 d-flex w-100`,onClick:p,children:[`View my existing schools`,(0,Q.jsx)(`span`,{className:`ms-auto`,children:(0,Q.jsx)(Ef,{})})]}),s&&(0,Q.jsx)(`div`,{className:`text-danger text-center`,children:s})]})}function BC(e){if(!e)return{firstName:``,surname:``,source:``};let t=e.split(` `).filter(e=>e.length);return{firstName:t.shift(),surname:t.join(` `),source:e}}function VC(e){let{value:t,onChange:n,error:r,autoFocus:i}=e;return Z.useEffect(()=>{e.onChange(BC(e.value))},[]),(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`label`,{htmlFor:`name`,children:`Full name`}),(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${!!r&&`is-invalid`}`,type:`text`,name:`name`,id:`name`,value:t,placeholder:`Enter your full name`,autoFocus:i,autoComplete:`name`,onChange:e=>n(BC(e.target.value)),"aria-errormessage":`nameError`}),!!r&&(0,Q.jsx)(Cf,{name:`name`,children:r})]})}var $=function(e){return e.AU=`au`,e.NZ=`nz`,e.UK=`uk`,e.US=`us`,e.CA=`ca`,e}({}),HC=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Coordinator`,`Digital Technology Coordinator`,`SSO / SLSO`,`IT`,`Head of Department`,`Head of Subject`,`Assistant Principal`,`Deputy Principal`,`Principal`,`Business Manager`],UC=[`Teacher`,`Librarian / Teacher Librarian`,`IT/LRC`,`e-Learning/ICT Coordinator`,`Head of Key Stage`,`Head of Department`,`Subject Lead`,`Assistant Head Teacher`,`Deputy Head Teacher`,`Head Teacher`],WC=[`Teacher`,`Librarian / Teacher Librarian`,`Head of Department`,`Instructional Technology Specialist`,`Curriculum Coordinator`,`School Leadership`,`District Leadership`,`Academic Coach`,`Principal`,`IT / IT Specialist`],GC=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Leader`,`e-Learning Coordinator`,`IT`,`Head of Department`,`Head of Faculty`,`Learning Support`,`Learning Assistant`,`Deputy Principal`,`Assistant Principal`,`Principal`],KC=[`Teacher`,`Librarian / Teacher Librarian`,`Educational Assistant (EA)`,`Learning Support Teacher / Resource Teacher`,`Department Head / Manager`,`Curriculum Coordinator / Consultant`,`School Counsellor / Guidance Counsellor`,`Vice-Principal`,`Principal`,`Superintendent`,`Director of Education`],qC=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teaching Assistant`,`Researcher`,`IT`],JC=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teacher`,`Teaching Assistant`,`Researcher`,`IT`],YC={[$.AU]:HC,[$.NZ]:GC,[$.UK]:UC,[$.US]:WC,[$.CA]:KC},XC={[$.AU]:qC,[$.UK]:JC};function ZC(e){let t=e.countryCode?.toLowerCase();return e.isTertiary?XC[t]||qC:YC[t]||WC}function QC(e){return e?.toLowerCase().includes(`student`)||e?.toLowerCase().includes(`parent`)}var $C=`OTHER`;function ew(e){let{error:t,onChange:n,countryCode:r,isTertiary:i,autoFocus:a}=e,[o,s]=Z.useState(``),[c,l]=Z.useState(``),u=ZC({countryCode:r,isTertiary:i});function d(e){s(e.target.value),l(``),n(e.target.value===$C?``:e.target.value)}function f(e){l(e.target.value),n(e.target.value)}let p=o===$C;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`label`,{htmlFor:`jobTitle`,children:`Job Title`}),(0,Q.jsxs)(`select`,{className:`form-select form-select-lg ${o.length?`text-dark`:`text-secondary`} ${!!t&&`is-invalid`}`,value:o,placeholder:`Role`,onChange:d,autoFocus:a,name:`jobTitle`,id:`jobTitle`,"aria-invalid":!!t&&!p,"aria-errormessage":t&&!p?`jobTitleError`:void 0,children:[(0,Q.jsx)(`option`,{value:``,disabled:!0,className:`text-secondary`,children:`What do you do?`}),u.map((e,t)=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},t)),(0,Q.jsx)(`option`,{value:$C,className:`text-dark`,children:`Other`})]}),!!t&&!p&&(0,Q.jsx)(Cf,{name:`jobTitle`,children:t})]}),p&&(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${!!t&&`is-invalid`}`,type:`text`,value:c,placeholder:`Enter your role`,autoFocus:!0,onChange:f,name:`role`,"aria-invalid":!!t,"aria-errormessage":`roleError`}),!!t&&(0,Q.jsx)(Cf,{name:`role`,children:t})]})]})}function tw(e){let{allowNameChange:t,allowJobTitleChange:n,errors:r,spinner:i,countryCode:a,setErrors:o}=e,[s,c]=Z.useState(),[l,u]=Z.useState(``),[d,f]=Z.useState(``),{password:p,setPassword:m,warning:h,suggestions:g,passwordScore:_,passwordStrength:v,passwordCheck:y}=xC();function b(e){m(e.target.value),o({...r,password:``})}function x(e){f(e.target.value),o({...r,password:``})}function S(e){c(e),o({...r,fullName:``})}function C(e){u(e),o({...r,jobTitle:``})}function w(r){r.preventDefault();let i={password:p,confirmPassword:d};t&&(i.firstName=s.firstName,i.surname=s.surname),n&&(i.jobTitle=l),e.onSubmit(i)}function T(){return t?`fullName`:n?`jobTitle`:`password`}let E=T();return(0,Q.jsxs)(`form`,{onSubmit:w,children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[t&&(0,Q.jsx)(VC,{value:s?.source||``,onChange:S,error:r.fullName,autoFocus:E===`fullName`}),n&&(0,Q.jsx)(ew,{error:r.jobTitle,onChange:C,countryCode:a,autoFocus:E===`jobTitle`,isTertiary:e.isTertiary}),(0,Q.jsx)(qf,{placeholder:`Enter your password`,value:p,onChange:b,name:`new-password`,autoComplete:`new-password`,hasError:!!r.password,autoFocus:E===`password`,"aria-errormessage":`new-passwordError`,className:nd(e.requireConfirmPassword&&`mb-3`)}),!r.password&&y&&(0,Q.jsx)(`div`,{className:`mt-n2`,children:(0,Q.jsx)(cC,{score:_,suggestions:g,warning:h,suggestionHeader:`Suggested ways to strengthen your password:`,strengthText:v})}),e.requireConfirmPassword&&(0,Q.jsx)(qf,{id:`confirm-new-password`,label:`Confirm password`,placeholder:`Enter your password confirmation`,value:d,onChange:x,name:`new-password`,autoComplete:`new-password`,hasError:!!r.password,"aria-invalid":!!r.password,"aria-errormessage":`new-passwordError`}),!!r.password&&(0,Q.jsx)(Cf,{name:`new-password`,children:r.password})]}),!!r.default&&(0,Q.jsx)(`div`,{className:`text-danger my-3`,children:r.default}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:i,children:`Get Started`})]})}var nw=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),rw=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),iw=o(((e,t)=>{var n=rw();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),aw=o(((e,t)=>{var n=iw(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),ow=o(((e,t)=>{var n=iw();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),sw=o(((e,t)=>{var n=iw();function r(e){return n(this.__data__,e)>-1}t.exports=r})),cw=o(((e,t)=>{var n=iw();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),lw=o(((e,t)=>{var n=nw(),r=aw(),i=ow(),a=sw(),o=cw();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),uw=o(((e,t)=>{var n=lw();function r(){this.__data__=new n,this.size=0}t.exports=r})),dw=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),fw=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),pw=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),mw=o(((e,t)=>{t.exports=typeof globalThis==`object`&&globalThis&&globalThis.Object===Object&&globalThis})),hw=o(((e,t)=>{var n=mw(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),gw=o(((e,t)=>{t.exports=hw().Symbol})),_w=o(((e,t)=>{var n=gw(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),vw=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),yw=o(((e,t)=>{var n=gw(),r=_w(),i=vw(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),bw=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),xw=o(((e,t)=>{var n=yw(),r=bw(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Sw=o(((e,t)=>{t.exports=hw()[`__core-js_shared__`]})),Cw=o(((e,t)=>{var n=Sw(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),ww=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),Tw=o(((e,t)=>{var n=xw(),r=Cw(),i=bw(),a=ww(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),Ew=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Dw=o(((e,t)=>{var n=Tw(),r=Ew();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Ow=o(((e,t)=>{t.exports=Dw()(hw(),`Map`)})),kw=o(((e,t)=>{t.exports=Dw()(Object,`create`)})),Aw=o(((e,t)=>{var n=kw();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),jw=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Mw=o(((e,t)=>{var n=kw(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Nw=o(((e,t)=>{var n=kw(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Pw=o(((e,t)=>{var n=kw(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),Fw=o(((e,t)=>{var n=Aw(),r=jw(),i=Mw(),a=Nw(),o=Pw();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Iw=o(((e,t)=>{var n=Fw(),r=lw(),i=Ow();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),Lw=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Rw=o(((e,t)=>{var n=Lw();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),zw=o(((e,t)=>{var n=Rw();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),Bw=o(((e,t)=>{var n=Rw();function r(e){return n(this,e).get(e)}t.exports=r})),Vw=o(((e,t)=>{var n=Rw();function r(e){return n(this,e).has(e)}t.exports=r})),Hw=o(((e,t)=>{var n=Rw();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),Uw=o(((e,t)=>{var n=Iw(),r=zw(),i=Bw(),a=Vw(),o=Hw();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Ww=o(((e,t)=>{var n=lw(),r=Ow(),i=Uw(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),Gw=o(((e,t)=>{var n=lw(),r=uw(),i=dw(),a=fw(),o=pw(),s=Ww();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),Kw=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n})),qw=o(((e,t)=>{var n=Dw();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Jw=o(((e,t)=>{var n=qw();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Yw=o(((e,t)=>{var n=Jw(),r=rw(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),Xw=o(((e,t)=>{var n=Yw(),r=Jw();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),Zw=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Qw=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),$w=o(((e,t)=>{var n=yw(),r=Qw(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),eT=o(((e,t)=>{var n=$w(),r=Qw(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),tT=o(((e,t)=>{t.exports=Array.isArray})),nT=o(((e,t)=>{function n(){return!1}t.exports=n})),rT=o(((e,t)=>{var n=hw(),r=nT(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),iT=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),aT=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),oT=o(((e,t)=>{var n=yw(),r=aT(),i=Qw(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),sT=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),cT=o(((e,t)=>{var n=mw(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),lT=o(((e,t)=>{var n=oT(),r=sT(),i=cT(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),uT=o(((e,t)=>{var n=Zw(),r=eT(),i=tT(),a=rT(),o=iT(),s=lT(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),dT=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),fT=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),pT=o(((e,t)=>{t.exports=fT()(Object.keys,Object)})),mT=o(((e,t)=>{var n=dT(),r=pT(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),hT=o(((e,t)=>{var n=xw(),r=aT();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),gT=o(((e,t)=>{var n=uT(),r=mT(),i=hT();function a(e){return i(e)?n(e):r(e)}t.exports=a})),_T=o(((e,t)=>{var n=Xw(),r=gT();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),vT=o(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),yT=o(((e,t)=>{var n=bw(),r=dT(),i=vT(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),bT=o(((e,t)=>{var n=uT(),r=yT(),i=hT();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),xT=o(((e,t)=>{var n=Xw(),r=bT();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),ST=o(((e,t)=>{var n=hw(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),CT=o(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),wT=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),TT=o(((e,t)=>{function n(){return[]}t.exports=n})),ET=o(((e,t)=>{var n=wT(),r=TT(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),DT=o(((e,t)=>{var n=Xw(),r=ET();function i(e,t){return n(e,r(e),t)}t.exports=i})),OT=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),kT=o(((e,t)=>{t.exports=fT()(Object.getPrototypeOf,Object)})),AT=o(((e,t)=>{var n=OT(),r=kT(),i=ET(),a=TT();t.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=r(e);return t}:a})),jT=o(((e,t)=>{var n=Xw(),r=AT();function i(e,t){return n(e,r(e),t)}t.exports=i})),MT=o(((e,t)=>{var n=OT(),r=tT();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),NT=o(((e,t)=>{var n=MT(),r=ET(),i=gT();function a(e){return n(e,i,r)}t.exports=a})),PT=o(((e,t)=>{var n=MT(),r=AT(),i=bT();function a(e){return n(e,i,r)}t.exports=a})),FT=o(((e,t)=>{t.exports=Dw()(hw(),`DataView`)})),IT=o(((e,t)=>{t.exports=Dw()(hw(),`Promise`)})),LT=o(((e,t)=>{t.exports=Dw()(hw(),`Set`)})),RT=o(((e,t)=>{t.exports=Dw()(hw(),`WeakMap`)})),zT=o(((e,t)=>{var n=FT(),r=Ow(),i=IT(),a=LT(),o=RT(),s=yw(),c=ww(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),BT=o(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]==`string`&&n.call(e,`index`)&&(r.index=e.index,r.input=e.input),r}t.exports=r})),VT=o(((e,t)=>{t.exports=hw().Uint8Array})),HT=o(((e,t)=>{var n=VT();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),UT=o(((e,t)=>{var n=HT();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}t.exports=r})),WT=o(((e,t)=>{var n=/\w*$/;function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=r})),GT=o(((e,t)=>{var n=gw(),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a})),KT=o(((e,t)=>{var n=HT();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),qT=o(((e,t)=>{var n=HT(),r=UT(),i=WT(),a=GT(),o=KT(),s=`[object Boolean]`,c=`[object Date]`,l=`[object Map]`,u=`[object Number]`,d=`[object RegExp]`,f=`[object Set]`,p=`[object String]`,m=`[object Symbol]`,h=`[object ArrayBuffer]`,g=`[object DataView]`,_=`[object Float32Array]`,v=`[object Float64Array]`,y=`[object Int8Array]`,b=`[object Int16Array]`,x=`[object Int32Array]`,S=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`;function E(e,t,E){var D=e.constructor;switch(t){case h:return n(e);case s:case c:return new D(+e);case g:return r(e,E);case _:case v:case y:case b:case x:case S:case C:case w:case T:return o(e,E);case l:return new D;case u:case p:return new D(e);case d:return i(e);case f:return new D;case m:return a(e)}}t.exports=E})),JT=o(((e,t)=>{var n=bw(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),YT=o(((e,t)=>{var n=JT(),r=kT(),i=dT();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),XT=o(((e,t)=>{var n=zT(),r=Qw(),i=`[object Map]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),ZT=o(((e,t)=>{var n=XT(),r=sT(),i=cT(),a=i&&i.isMap;t.exports=a?r(a):n})),QT=o(((e,t)=>{var n=zT(),r=Qw(),i=`[object Set]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),$T=o(((e,t)=>{var n=QT(),r=sT(),i=cT(),a=i&&i.isSet;t.exports=a?r(a):n})),eE=o(((e,t)=>{var n=Gw(),r=Kw(),i=Yw(),a=_T(),o=xT(),s=ST(),c=CT(),l=DT(),u=jT(),d=NT(),f=PT(),p=zT(),m=BT(),h=qT(),g=YT(),_=tT(),v=rT(),y=ZT(),b=bw(),x=$T(),S=gT(),C=bT(),w=1,T=2,E=4,D=`[object Arguments]`,O=`[object Array]`,k=`[object Boolean]`,A=`[object Date]`,j=`[object Error]`,M=`[object Function]`,N=`[object GeneratorFunction]`,P=`[object Map]`,F=`[object Number]`,I=`[object Object]`,L=`[object RegExp]`,R=`[object Set]`,z=`[object String]`,B=`[object Symbol]`,V=`[object WeakMap]`,H=`[object ArrayBuffer]`,ee=`[object DataView]`,U=`[object Float32Array]`,te=`[object Float64Array]`,ne=`[object Int8Array]`,re=`[object Int16Array]`,ie=`[object Int32Array]`,ae=`[object Uint8Array]`,oe=`[object Uint8ClampedArray]`,W=`[object Uint16Array]`,se=`[object Uint32Array]`,ce={};ce[D]=ce[O]=ce[H]=ce[ee]=ce[k]=ce[A]=ce[U]=ce[te]=ce[ne]=ce[re]=ce[ie]=ce[P]=ce[F]=ce[I]=ce[L]=ce[R]=ce[z]=ce[B]=ce[ae]=ce[oe]=ce[W]=ce[se]=!0,ce[j]=ce[M]=ce[V]=!1;function le(e,t,O,k,A,j){var P,F=t&w,L=t&T,R=t&E;if(O&&(P=A?O(e,k,A,j):O(e)),P!==void 0)return P;if(!b(e))return e;var z=_(e);if(z){if(P=m(e),!F)return c(e,P)}else{var B=p(e),V=B==M||B==N;if(v(e))return s(e,F);if(B==I||B==D||V&&!A){if(P=L||V?{}:g(e),!F)return L?u(e,o(P,e)):l(e,a(P,e))}else{if(!ce[B])return A?e:{};P=h(e,B,F)}}j||=new n;var H=j.get(e);if(H)return H;j.set(e,P),x(e)?e.forEach(function(n){P.add(le(n,t,O,n,e,j))}):y(e)&&e.forEach(function(n,r){P.set(r,le(n,t,O,r,e,j))});var ee=z?void 0:(R?L?f:d:L?C:S)(e);return r(ee||e,function(n,r){ee&&(r=n,n=e[r]),i(P,r,le(n,t,O,r,e,j))}),P}t.exports=le})),tE=o(((e,t)=>{var n=eE(),r=1,i=4;function a(e){return n(e,r|i)}t.exports=a})),nE=o(((e,t)=>{var n=yw(),r=Qw(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),rE=o(((e,t)=>{var n=tT(),r=nE(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),iE=o(((e,t)=>{var n=Uw(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),aE=o(((e,t)=>{var n=iE(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),oE=o(((e,t)=>{var n=aE(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),sE=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),cE=o(((e,t)=>{var n=gw(),r=sE(),i=tT(),a=nE(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),lE=o(((e,t)=>{var n=cE();function r(e){return e==null?``:n(e)}t.exports=r})),uE=o(((e,t)=>{var n=tT(),r=rE(),i=oE(),a=lE();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),dE=o(((e,t)=>{var n=nE(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),fE=o(((e,t)=>{var n=uE(),r=dE();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),pE=o(((e,t)=>{var n=fE();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),mE=l(tE()),hE=l(pE()),gE={isEmpty(e){return Tm(e)},values(e){return Wm(e)},keys(e){return wm(e)},deepClone(e){return(0,mE.default)(e)},getEnumKeys(e){return Object.keys(e).filter(e=>!(parseInt(e)>=0))},isObject(e){return zp(e)},isEqual(e,t){return Am(e,t)},omit(e,t){return Lg(e,t)},pick(e,t){return Ig(e,t)},removeEmptyKeys(e){return Object.entries(e).filter(([,e])=>e!=null).reduce((e,[t,n])=>({...e,[t]:n}),{})},flattenObjectToString(e,t=``,n=`,`){return Object.keys(e).sort().map(n=>{let r=t?`${t}.${n}`:n;return typeof e[n]==`object`&&!Array.isArray(e[n])?gE.flattenObjectToString(e[n],r):`${r}:${e[n]}`}).join(n)},get(e,t,n){return(0,hE.default)(e,t,n)},swapKeysAndValues(e){return Object.entries(e).reduce((e,[t,n])=>({...e,[n]:t}),{})}},_E=function(e){return e[e.Unclassified=0]=`Unclassified`,e[e.Active=1]=`Active`,e[e.Prospect=2]=`Prospect`,e[e.LostCustomer=3]=`LostCustomer`,e[e.Disabled=4]=`Disabled`,e[e.Other=5]=`Other`,e}({}),vE=function(e){return e.Unclassified=`Unclassified`,e.Active=`Active`,e.Prospect=`Prospect`,e.LostCustomer=`LostCustomer`,e.Disabled=`Disabled`,e.Other=`Other`,e}({}),yE={[qu.Unclassified]:Ku.Unclassified,[qu.Primary]:Ku.Primary,[qu.Secondary]:Ku.Secondary,[qu.K12]:Ku.K12,[qu.Tertiary]:Ku.Tertiary,[qu.NonEducational]:Ku.NonEducational,[qu.Partners]:Ku.Partners,[qu.Internal]:Ku.Internal,[qu.Other]:Ku.Other,[qu.ClickView]:Ku.ClickView,[qu.System]:Ku.System},bE=gE.swapKeysAndValues(yE),xE={[vE.Unclassified]:_E.Unclassified,[vE.Active]:_E.Active,[vE.Prospect]:_E.Prospect,[vE.LostCustomer]:_E.LostCustomer,[vE.Disabled]:_E.Disabled,[vE.Other]:_E.Other},SE=gE.swapKeysAndValues(xE),CE={getCustomerType(e){return typeof e==`string`?yE[e]||Ku.Unclassified:e},getCustomerTypeString(e){return bE[e]||qu.Unclassified},getCustomerStatusString(e){return SE[e]||vE.Unclassified}};function wE(e){switch(e.errorCode.toString()){case`user.invalid-first-name`:case`user.invalid-surname`:return{fullName:e.userMessage};case`user.invalid-password`:case`user.same-password`:case`user.password-too-short`:return{password:e.userMessage};case`user.invalid-jobtitle`:return{default:e.userMessage};default:return{}}}function TE(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({}),{productName:a}=Ld.getDefinition(e.theme);function o(t){let{jobTitle:n,password:a,confirmPassword:o}=t,{firstName:s,surname:c}=t,l={},[u,d]=tp.isPasswordValid(a,o,e.requireConfirmPassword);return u||(l.password=d),e.allowNameChange&&(!s||!c)&&(l.fullName=`Please enter your full name.`),e.allowJobTitleChange&&!n?.length&&(l.jobTitle=`Please enter your role..`),i({...r,...l}),!Object.keys(l).length}function s(t){if(!o(t))return;let r={token:e.token,appLink:e.appLink,userId:e.userId,email:e.email,password:t.password};e.allowNameChange&&(r.firstName=t.firstName,r.surname=t.surname),e.allowJobTitleChange&&(r.jobTitle=t.jobTitle),n(!0),xd.post(`/ajax/activate/complete`,r).then(t=>zd(t,e)).catch(c)}function c(e){n(!1);let t=wE(e);i({...r,...t})}let l=e.customers?.some(e=>CE.getCustomerType(e.customerType)===Ku.Tertiary);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Welcome to ${a}`,children:`Create a password to login and get started`}),(0,Q.jsx)(tw,{allowNameChange:e.allowNameChange,allowJobTitleChange:e.allowJobTitleChange,errors:r,setErrors:i,onSubmit:s,spinner:t,requireConfirmPassword:e.requireConfirmPassword,countryCode:e.countryCode,isTertiary:l})]})}function EE(e){return(0,Q.jsx)(`div`,{className:`svg-container d-flex justify-content-center align-items-center ${e.className}`,children:(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,Q.jsx)(`path`,{d:`M18.7827 5.19245C19.0472 5.47531 19.074 5.96669 18.8425 6.28996L9.93345 18.7344C9.81748 18.8964 9.65175 18.9924 9.47572 18.9996C9.29969 19.0067 9.12911 18.9244 9.00457 18.7722L5.18639 14.1055C4.93787 13.8018 4.93787 13.3093 5.18639 13.0056C5.4349 12.7019 5.83783 12.7019 6.08634 13.0056L9.42354 17.0844L17.8847 5.26562C18.1161 4.94235 18.5182 4.90959 18.7827 5.19245Z`})})})}var DE={name:`_name_bthu2_1`,background:`_background_bthu2_4`,spinnerButton:`_spinnerButton_bthu2_7`,containerNotJoined:`_containerNotJoined_bthu2_11`,checkCircle:`_checkCircle_bthu2_18`,checkIcon:`_checkIcon_bthu2_22`,logo:`_logo_bthu2_27`};function OE(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(!1),[a,o]=Z.useState(!1),s;s=typeof e.icon==`function`?e.icon:()=>(0,Q.jsx)(`img`,{alt:`icon`,className:`w-100 h-100 border rounded-circle border`,src:e.icon});function c(){n(!0),e.onClickJoin().then(()=>i(!0)).finally(()=>n(!1))}function l(){let t=`py-2 btn btn-lg mb-3 w-100`;return r?{onClick:e.onClickLogin,role:`button`,tabIndex:0,className:`${t} bg-light-blue`}:{className:`${t} bg-light-blue cursor-default ${DE.containerNotJoined}`}}return(0,Q.jsx)(`div`,{...l(),children:(0,Q.jsxs)(`div`,{className:`py-1 d-flex align-items-center`,children:[!a&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`icon-circle rounded-circle text-white me-2 bg-blue d-flex justify-content-center align-items-center ${DE.logo}`,children:(0,Q.jsx)(s,{})}),(0,Q.jsx)(`span`,{className:`h6 mb-0 text-start me-2 ${DE.name}`,children:e.customerName})]}),r&&(0,Q.jsxs)(`div`,{className:`d-flex align-items-center ms-auto`,children:[(0,Q.jsx)(`div`,{className:`rounded-circle bg-green text-white me-2 d-flex align-items-center justify-content-center ${DE.checkCircle}`,children:(0,Q.jsx)(EE,{className:DE.checkIcon})}),(0,Q.jsx)(`div`,{className:`font-size-normal fw-semibold`,children:`Joined`}),(0,Q.jsx)(`span`,{className:`ms-1`,children:(0,Q.jsx)(Ef,{})})]}),!r&&!a&&(0,Q.jsxs)(`span`,{className:`ms-auto d-flex align-items-center`,children:[(0,Q.jsx)(id,{onClick:c,className:`btn btn-outline-dark font-weight-600 text-nowrap ${DE.spinnerButton}`,showSpinner:t,children:`Accept invite`}),e.canDeletePendingInvites&&(0,Q.jsx)(`button`,{onClick:()=>o(!0),className:`btn btn-link p-0 mx-1`,children:(0,Q.jsx)(`div`,{className:`svg-container`,children:(0,Q.jsx)(ad,{})})})]}),!r&&a&&(0,Q.jsxs)(`div`,{className:`font-size-normal d-flex align-items-center text-nowrap py-1`,children:[(0,Q.jsx)(`div`,{children:`Are you sure?`}),`\xA0`,(0,Q.jsx)(`button`,{className:`btn btn-link text-danger p-0`,onClick:e.onClickReject,children:`Decline invitation`}),`\xA0|\xA0`,(0,Q.jsx)(`button`,{className:`btn btn-link text-info p-0`,onClick:()=>o(!1),children:`Go back`})]})]})})}function kE(e){let{navigate:t,customers:n,returnUrl:r,isChangeCustomer:i,organisation:a,backStep:o,email:s}=e,[c,l]=Z.useState(null),[u,d]=Z.useState(null),[f,p]=Z.useState([]),m=e.pendingInvites?.filter(e=>!f.includes(e.customerId))??[],h=!!a&&!o;function g(){if(!s){t({step:`verify-email`,canSkip:!1});return}e.navigate({step:`prospect-select`,backStep:`select-customer`})}function _(t){let n=i?`/ajax/change-customer`:`/ajax/login/select-customer`;xd.post(n,{customerId:t,returnUrl:r}).then(t=>zd(t,e,{backStep:`select-customer`})).catch(e=>{d(e.userMessage||`Something went wrong. Please try again.`)})}function v(e){_(e.id)}function y(){c&&_(c.id)}function b(e){return new Promise((t,n)=>{xd.post(`/ajax/login/accept-invite`,{userProfileId:e}).then(t).catch(e=>{d(e.userMessage||`Something went wrong. Please try again.`),n()})})}function x(e,t){xd.post(`/ajax/login/deny-invite`,{userProfileId:t}).then(()=>{p(t=>t.concat(e))}).catch(e=>{d(e.userMessage||`Something went wrong. Please try again.`)})}function S(){t({step:`organisation-select-customer`,backStep:`select-customer`})}function C(){t({step:o,backStep:null})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:o&&C,title:`Welcome back ${e.firstName||``} 👋`,children:!!e.email&&(0,Q.jsx)(kC,{children:e.email})}),(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Schools`}),n?.length?(0,Q.jsx)(Q.Fragment,{children:n.length>4?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`mb-3`,children:(0,Q.jsx)(Bf,{id:`school`,item:c,items:n,onSelect:l,getName:e=>e.name,clearData:()=>l(null),placeholder:`Select a school`,size:`lg`})}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,disabled:!c,onClick:y,children:`Continue`})]}):(0,Q.jsx)(Q.Fragment,{children:n?.map((e,t)=>(0,Q.jsx)(kf,{onClick:()=>v(e),text:e.name,icon:jf.buildAvatarUrl(e.logoUrl,{size:`small`})||Af,className:`mb-3`},t))})}):(0,Q.jsxs)(`div`,{className:`border border-secondary-subtle rounded-3 w-100 p-3 mb-3 d-flex align-items-center`,children:[(0,Q.jsx)(`span`,{className:`icon-circle rounded-circle text-white me-2 bg-secondary d-flex justify-content-center align-items-center`,children:(0,Q.jsx)(Af,{})}),(0,Q.jsx)(`span`,{className:`mb-0 fst-italic text-secondary`,children:`You currently don't have access to any schools`})]}),!!m?.length&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Pending Invitations`}),m.map(t=>(0,Q.jsx)(OE,{customerName:t.name,icon:jf.buildAvatarUrl(t.logoUrl,{size:`small`})||Af,onClickJoin:()=>b(t.userProfileId),onClickReject:()=>x(t.customerId,t.userProfileId),onClickLogin:()=>_(t.customerId),canDeletePendingInvites:e.canDeletePendingInvites},t.userProfileId))]}),!n?.length&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Waiting on a school admin?`}),(0,Q.jsx)(`p`,{className:`text-secondary mb-0`,children:s?(0,Q.jsxs)(Q.Fragment,{children:[`Ask them to invite `,(0,Q.jsx)(`strong`,{children:s}),` to access your school.`]}):(0,Q.jsx)(Q.Fragment,{children:`Speak to your school admin to get added in their ClickView admin console.`})})]}),e.showCreateProspect&&(0,Q.jsx)(`hr`,{}),e.showCreateProspect&&(0,Q.jsxs)(`div`,{className:`d-flex align-items-center justify-content-between mb-3`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Evaluating ClickView on your own?`}),(0,Q.jsx)(`p`,{className:`text-secondary mb-0`,children:`Start a free trial.`})]}),(0,Q.jsx)(`button`,{className:`btn btn-outline-dark font-weight-600 text-nowrap ms-3`,onClick:g,children:`Start trial`})]}),!h&&dd.contactSupport&&(0,Q.jsxs)(`p`,{className:`text-center text-secondary mt-5`,children:[`Stuck, or think this is wrong? `,(0,Q.jsx)(`a`,{href:dd.contactSupport,target:`_blank`,children:`Contact support`})]})]}),h&&(0,Q.jsx)(`div`,{className:`text-center mt-3`,children:(0,Q.jsxs)(`button`,{className:`btn btn-link text-info`,onClick:S,children:[`Sign into another school in `,(0,Q.jsx)(`strong`,{children:a.name})]})}),u&&(0,Q.jsx)(`div`,{className:`text-danger text-center`,children:u})]})}var AE=dd.marketingSite,jE={[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/trial/`,[$.AU]:`/contact-us/sales`,[$.US]:`/contact-us/sales`,[$.CA]:`/contact-us/sales`};function ME(e,t){let{email:n,firstName:r,surname:i,salesforceId:a,countryCode:o}=e;if(!n)return null;let s=AE[o.toLowerCase()]||AE[$.US];if(!s)return null;let c={email:n};return r&&(c.fname=r),i&&(c.sname=i),a&&(c.id=a),`${s}${t}?${new URLSearchParams(c).toString()}`}function NE(e){let t=jE[e.countryCode.toLowerCase()]||jE[$.US];return t?ME(e,t):null}function PE(e){return ME(e,`/contact-us/trial-upgrade/`)}function FE(e){return!(!e||e.toLowerCase()===`teacher`)}var IE={[$.AU]:`02 9509 2600`,[$.UK]:`+44 (0)333 207 6595`,[$.NZ]:`09 916 1156`,[$.US]:`+1 (312) 763-9491`,[$.CA]:`+1 (312) 763-9491`};function LE(e){let{email:t,firstName:n,surname:r,jobTitle:i,countryCode:a,salesforceId:o,userType:s}=e,c={email:t,firstName:n,surname:r,countryCode:a,salesforceId:o},l=IE[a.toLowerCase()]||IE[$.US],u=NE(c),d=PE(c),{productName:f}=Ld.getDefinition(e.theme);return(0,Q.jsxs)(`div`,{className:`text-center`,children:[(0,Q.jsx)(rd,{theme:e.theme}),(0,Q.jsx)(`img`,{className:`img-fluid mb-4`,alt:`error`,src:`/images/errors/trial-expired.png`}),(0,Q.jsxs)(`h1`,{className:`h2`,children:[`Your `,f,` trial has ended`]}),s===`Learner`?(0,Q.jsx)(Q.Fragment,{}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`p`,{children:[`Learn more about how to upgrade and access all features available on `,f,`.`]}),(0,Q.jsx)(`div`,{className:`text-center`,children:u&&FE(i)?(0,Q.jsx)(`a`,{href:u,className:`btn btn-lg btn-dark`,children:`Book a call`}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`a`,{href:d,className:`btn btn-lg btn-dark w-100`,children:`Request upgrade`}),l&&(0,Q.jsxs)(`p`,{children:[`or `,(0,Q.jsx)(`br`,{}),`Speak to a team member on `,(0,Q.jsx)(`b`,{children:(0,Q.jsx)(`a`,{href:`tel:${l}`,children:l})})]})]})})]})]})}var RE=o(((e,t)=>{(function(){var e,n,r,i,a,o;typeof performance<`u`&&performance!==null&&performance.now?t.exports=function(){return performance.now()}:typeof process<`u`&&process!==null&&process.hrtime?(t.exports=function(){return(e()-a)/1e6},n=process.hrtime,e=function(){var e=n();return e[0]*1e9+e[1]},i=e(),o=process.uptime()*1e9,a=i-o):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(e)})),zE=o(((e,t)=>{for(var n=RE(),r=typeof window>`u`?globalThis:window,i=[`moz`,`webkit`],a=`AnimationFrame`,o=r[`request`+a],s=r[`cancel`+a]||r[`cancelRequest`+a],c=0;!o&&c<i.length;c++)o=r[i[c]+`Request`+a],s=r[i[c]+`Cancel`+a]||r[i[c]+`CancelRequest`+a];if(!o||!s){var l=0,u=0,d=[],f=1e3/60;o=function(e){if(d.length===0){var t=n(),r=Math.max(0,f-(t-l));l=r+t,setTimeout(function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(e){setTimeout(function(){throw e},0)}},Math.round(r))}return d.push({handle:++u,callback:e,cancelled:!1}),u},s=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}t.exports=function(e){return o.call(r,e)},t.exports.cancel=function(){s.apply(r,arguments)},t.exports.polyfill=function(e){e||=r,e.requestAnimationFrame=o,e.cancelAnimationFrame=s}})),BE=o(((e,t)=>{var n=null,r=[`Webkit`,`Moz`,`O`,`ms`];t.exports=function(e){n||=document.createElement(`div`);var t=n.style;if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),a=r.length;a>=0;a--){var o=r[a]+i;if(o in t)return o}return!1}})),VE=o(((e,t)=>{t.exports=a;var n=/\s/,r=/(_|-|\.|:)/,i=/([a-z][A-Z]|[A-Z][a-z])/;function a(e){return n.test(e)?e.toLowerCase():r.test(e)?(s(e)||e).toLowerCase():i.test(e)?l(e).toLowerCase():e.toLowerCase()}var o=/[\W_]+(.|$)/g;function s(e){return e.replace(o,function(e,t){return t?` `+t:``})}var c=/(.)([A-Z]+)/g;function l(e){return e.replace(c,function(e,t,n){return t+` `+n.toLowerCase().split(``).join(` `)})}})),HE=o(((e,t)=>{var n=VE();t.exports=r;function r(e){return n(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?` `+t:``}).trim()}})),UE=o(((e,t)=>{var n=HE();t.exports=r;function r(e){return n(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}})),WE=o(((e,t)=>{var n={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};t.exports=function(e,t){return typeof t==`number`&&!n[e]?t+`px`:t}})),GE=o(((e,t)=>{var n=BE(),r=UE(),i={float:`cssFloat`},a=WE();function o(e,t,n){var r=i[t];if(r===void 0&&(r=c(t)),r){if(n===void 0)return e.style[r];e.style[r]=a(r,n)}}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&o(e,n,t[n])}function c(e){var t=r(e),a=n(t);return i[t]=i[e]=i[a]=a,a}function l(){arguments.length===2?typeof arguments[1]==`string`?arguments[0].style.cssText=arguments[1]:s(arguments[0],arguments[1]):o(arguments[0],arguments[1],arguments[2])}t.exports=l,t.exports.set=l,t.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(t,n){return t[n]=o(e,n||``),t},{}):o(e,t||``)}})),KE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){return typeof e==`string`}})),qE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var t=n(GE());function n(e){return e&&e.__esModule?e:{default:e}}var r=!1;function i(){if((!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&r!==!1)return r;if(typeof document<`u`){var e=document.createElement(`div`);(0,t.default)(e,{width:100,height:100,position:`absolute`,top:-9999,overflow:`scroll`,MsOverflowStyle:`scrollbar`}),document.body.appendChild(e),r=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else r=0;return r||0}})),JE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!1}})),YE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=e.clientWidth,n=getComputedStyle(e),r=n.paddingLeft,i=n.paddingRight;return t-parseFloat(r)-parseFloat(i)}})),XE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=e.clientHeight,n=getComputedStyle(e),r=n.paddingTop,i=n.paddingBottom;return t-parseFloat(r)-parseFloat(i)}})),ZE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.containerStyleDefault={position:`relative`,overflow:`hidden`,width:`100%`,height:`100%`},e.containerStyleAutoHeight={height:`auto`},e.viewStyleDefault={position:`absolute`,top:0,left:0,right:0,bottom:0,overflow:`scroll`,WebkitOverflowScrolling:`touch`},e.viewStyleAutoHeight={position:`relative`,top:void 0,left:void 0,right:void 0,bottom:void 0},e.viewStyleUniversalInitial={overflow:`hidden`,marginRight:0,marginBottom:0},e.trackHorizontalStyleDefault={position:`absolute`,height:6},e.trackVerticalStyleDefault={position:`absolute`,width:6},e.thumbHorizontalStyleDefault={position:`relative`,display:`block`,height:`100%`},e.thumbVerticalStyleDefault={position:`relative`,display:`block`,width:`100%`},e.disableSelectStyle={userSelect:`none`},e.disableSelectStyleReset={userSelect:``}})),QE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};e.renderViewDefault=a,e.renderTrackHorizontalDefault=o,e.renderTrackVerticalDefault=s,e.renderThumbHorizontalDefault=c,e.renderThumbVerticalDefault=l;var n=r(zu());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return n.default.createElement(`div`,e)}function o(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{right:2,bottom:2,left:2,borderRadius:3});return n.default.createElement(`div`,t({style:o},a))}function s(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{right:2,bottom:2,top:2,borderRadius:3});return n.default.createElement(`div`,t({style:o},a))}function c(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{cursor:`pointer`,borderRadius:`inherit`,backgroundColor:`rgba(0,0,0,.2)`});return n.default.createElement(`div`,t({style:o},a))}function l(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{cursor:`pointer`,borderRadius:`inherit`,backgroundColor:`rgba(0,0,0,.2)`});return n.default.createElement(`div`,t({style:o},a))}})),$E=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=zE(),i=h(r),a=h(GE()),o=zu(),s=h(A_()),c=h(KE()),l=h(qE()),u=h(JE()),d=h(YE()),f=h(XE()),p=ZE(),m=QE();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function v(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function y(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var b=function(e){y(s,e);function s(e){var t;_(this,s);var n=[...arguments].slice(1),r=v(this,(t=s.__proto__||Object.getPrototypeOf(s)).call.apply(t,[this,e].concat(n)));return r.getScrollLeft=r.getScrollLeft.bind(r),r.getScrollTop=r.getScrollTop.bind(r),r.getScrollWidth=r.getScrollWidth.bind(r),r.getScrollHeight=r.getScrollHeight.bind(r),r.getClientWidth=r.getClientWidth.bind(r),r.getClientHeight=r.getClientHeight.bind(r),r.getValues=r.getValues.bind(r),r.getThumbHorizontalWidth=r.getThumbHorizontalWidth.bind(r),r.getThumbVerticalHeight=r.getThumbVerticalHeight.bind(r),r.getScrollLeftForOffset=r.getScrollLeftForOffset.bind(r),r.getScrollTopForOffset=r.getScrollTopForOffset.bind(r),r.scrollLeft=r.scrollLeft.bind(r),r.scrollTop=r.scrollTop.bind(r),r.scrollToLeft=r.scrollToLeft.bind(r),r.scrollToTop=r.scrollToTop.bind(r),r.scrollToRight=r.scrollToRight.bind(r),r.scrollToBottom=r.scrollToBottom.bind(r),r.handleTrackMouseEnter=r.handleTrackMouseEnter.bind(r),r.handleTrackMouseLeave=r.handleTrackMouseLeave.bind(r),r.handleHorizontalTrackMouseDown=r.handleHorizontalTrackMouseDown.bind(r),r.handleVerticalTrackMouseDown=r.handleVerticalTrackMouseDown.bind(r),r.handleHorizontalThumbMouseDown=r.handleHorizontalThumbMouseDown.bind(r),r.handleVerticalThumbMouseDown=r.handleVerticalThumbMouseDown.bind(r),r.handleWindowResize=r.handleWindowResize.bind(r),r.handleScroll=r.handleScroll.bind(r),r.handleDrag=r.handleDrag.bind(r),r.handleDragEnd=r.handleDragEnd.bind(r),r.state={didMountUniversal:!1},r}return n(s,[{key:`componentDidMount`,value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:`componentDidMountUniversal`,value:function(){this.props.universal&&this.setState({didMountUniversal:!0})}},{key:`componentDidUpdate`,value:function(){this.update()}},{key:`componentWillUnmount`,value:function(){this.removeListeners(),(0,r.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:`getScrollLeft`,value:function(){return this.view?this.view.scrollLeft:0}},{key:`getScrollTop`,value:function(){return this.view?this.view.scrollTop:0}},{key:`getScrollWidth`,value:function(){return this.view?this.view.scrollWidth:0}},{key:`getScrollHeight`,value:function(){return this.view?this.view.scrollHeight:0}},{key:`getClientWidth`,value:function(){return this.view?this.view.clientWidth:0}},{key:`getClientHeight`,value:function(){return this.view?this.view.clientHeight:0}},{key:`getValues`,value:function(){var e=this.view||{},t=e.scrollLeft,n=t===void 0?0:t,r=e.scrollTop,i=r===void 0?0:r,a=e.scrollWidth,o=a===void 0?0:a,s=e.scrollHeight,c=s===void 0?0:s,l=e.clientWidth,u=l===void 0?0:l,d=e.clientHeight,f=d===void 0?0:d;return{left:n/(o-u)||0,top:i/(c-f)||0,scrollLeft:n,scrollTop:i,scrollWidth:o,scrollHeight:c,clientWidth:u,clientHeight:f}}},{key:`getThumbHorizontalWidth`,value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollWidth,a=r.clientWidth,o=(0,d.default)(this.trackHorizontal),s=Math.ceil(a/i*o);return o<=s?0:t||Math.max(s,n)}},{key:`getThumbVerticalHeight`,value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollHeight,a=r.clientHeight,o=(0,f.default)(this.trackVertical),s=Math.ceil(a/i*o);return o<=s?0:t||Math.max(s,n)}},{key:`getScrollLeftForOffset`,value:function(e){var t=this.view,n=t.scrollWidth,r=t.clientWidth;return e/((0,d.default)(this.trackHorizontal)-this.getThumbHorizontalWidth())*(n-r)}},{key:`getScrollTopForOffset`,value:function(e){var t=this.view,n=t.scrollHeight,r=t.clientHeight;return e/((0,f.default)(this.trackVertical)-this.getThumbVerticalHeight())*(n-r)}},{key:`scrollLeft`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:`scrollTop`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:`scrollToLeft`,value:function(){this.view&&(this.view.scrollLeft=0)}},{key:`scrollToTop`,value:function(){this.view&&(this.view.scrollTop=0)}},{key:`scrollToRight`,value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:`scrollToBottom`,value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:`addListeners`,value:function(){if(!(typeof document>`u`||!this.view)){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.addEventListener(`scroll`,this.handleScroll),(0,l.default)()&&(t.addEventListener(`mouseenter`,this.handleTrackMouseEnter),t.addEventListener(`mouseleave`,this.handleTrackMouseLeave),t.addEventListener(`mousedown`,this.handleHorizontalTrackMouseDown),n.addEventListener(`mouseenter`,this.handleTrackMouseEnter),n.addEventListener(`mouseleave`,this.handleTrackMouseLeave),n.addEventListener(`mousedown`,this.handleVerticalTrackMouseDown),r.addEventListener(`mousedown`,this.handleHorizontalThumbMouseDown),i.addEventListener(`mousedown`,this.handleVerticalThumbMouseDown),window.addEventListener(`resize`,this.handleWindowResize))}}},{key:`removeListeners`,value:function(){if(!(typeof document>`u`||!this.view)){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.removeEventListener(`scroll`,this.handleScroll),(0,l.default)()&&(t.removeEventListener(`mouseenter`,this.handleTrackMouseEnter),t.removeEventListener(`mouseleave`,this.handleTrackMouseLeave),t.removeEventListener(`mousedown`,this.handleHorizontalTrackMouseDown),n.removeEventListener(`mouseenter`,this.handleTrackMouseEnter),n.removeEventListener(`mouseleave`,this.handleTrackMouseLeave),n.removeEventListener(`mousedown`,this.handleVerticalTrackMouseDown),r.removeEventListener(`mousedown`,this.handleHorizontalThumbMouseDown),i.removeEventListener(`mousedown`,this.handleVerticalThumbMouseDown),window.removeEventListener(`resize`,this.handleWindowResize),this.teardownDragging())}}},{key:`handleScroll`,value:function(e){var t=this,n=this.props,r=n.onScroll,i=n.onScrollFrame;r&&r(e),this.update(function(e){var n=e.scrollLeft,r=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=r,i&&i(e)}),this.detectScrolling()}},{key:`handleScrollStart`,value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:`handleScrollStartAutoHide`,value:function(){this.props.autoHide&&this.showTracks()}},{key:`handleScrollStop`,value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:`handleScrollStopAutoHide`,value:function(){this.props.autoHide&&this.hideTracks()}},{key:`handleWindowResize`,value:function(){(0,l.default)(!1),this.forceUpdate()}},{key:`handleHorizontalTrackMouseDown`,value:function(e){e.preventDefault();var t=e.target,n=e.clientX,r=t.getBoundingClientRect().left,i=this.getThumbHorizontalWidth(),a=Math.abs(r-n)-i/2;this.view.scrollLeft=this.getScrollLeftForOffset(a)}},{key:`handleVerticalTrackMouseDown`,value:function(e){e.preventDefault();var t=e.target,n=e.clientY,r=t.getBoundingClientRect().top,i=this.getThumbVerticalHeight(),a=Math.abs(r-n)-i/2;this.view.scrollTop=this.getScrollTopForOffset(a)}},{key:`handleHorizontalThumbMouseDown`,value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,r=t.offsetWidth,i=t.getBoundingClientRect().left;this.prevPageX=r-(n-i)}},{key:`handleVerticalThumbMouseDown`,value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,r=t.offsetHeight,i=t.getBoundingClientRect().top;this.prevPageY=r-(n-i)}},{key:`setupDragging`,value:function(){(0,a.default)(document.body,p.disableSelectStyle),document.addEventListener(`mousemove`,this.handleDrag),document.addEventListener(`mouseup`,this.handleDragEnd),document.onselectstart=u.default}},{key:`teardownDragging`,value:function(){(0,a.default)(document.body,p.disableSelectStyleReset),document.removeEventListener(`mousemove`,this.handleDrag),document.removeEventListener(`mouseup`,this.handleDragEnd),document.onselectstart=void 0}},{key:`handleDragStart`,value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:`handleDrag`,value:function(e){if(this.prevPageX){var t=e.clientX,n=this.trackHorizontal.getBoundingClientRect().left,r=this.getThumbHorizontalWidth()-this.prevPageX,i=-n+t-r;this.view.scrollLeft=this.getScrollLeftForOffset(i)}if(this.prevPageY){var a=e.clientY,o=this.trackVertical.getBoundingClientRect().top,s=this.getThumbVerticalHeight()-this.prevPageY,c=-o+a-s;this.view.scrollTop=this.getScrollTopForOffset(c)}return!1}},{key:`handleDragEnd`,value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:`handleDragEndAutoHide`,value:function(){this.props.autoHide&&this.hideTracks()}},{key:`handleTrackMouseEnter`,value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:`handleTrackMouseEnterAutoHide`,value:function(){this.props.autoHide&&this.showTracks()}},{key:`handleTrackMouseLeave`,value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:`handleTrackMouseLeaveAutoHide`,value:function(){this.props.autoHide&&this.hideTracks()}},{key:`showTracks`,value:function(){clearTimeout(this.hideTracksTimeout),(0,a.default)(this.trackHorizontal,{opacity:1}),(0,a.default)(this.trackVertical,{opacity:1})}},{key:`hideTracks`,value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,a.default)(e.trackHorizontal,{opacity:0}),(0,a.default)(e.trackVertical,{opacity:0})},t)}}},{key:`detectScrolling`,value:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop},100))}},{key:`raf`,value:function(e){var t=this;this.requestFrame&&i.default.cancel(this.requestFrame),this.requestFrame=(0,i.default)(function(){t.requestFrame=void 0,e()})}},{key:`update`,value:function(e){var t=this;this.raf(function(){return t._update(e)})}},{key:`_update`,value:function(e){var t=this.props,n=t.onUpdate,r=t.hideTracksWhenNotNeeded,i=this.getValues();if((0,l.default)()){var o=i.scrollLeft,s=i.clientWidth,c=i.scrollWidth,u=(0,d.default)(this.trackHorizontal),p=this.getThumbHorizontalWidth(),m={width:p,transform:`translateX(`+o/(c-s)*(u-p)+`px)`},h=i.scrollTop,g=i.clientHeight,_=i.scrollHeight,v=(0,f.default)(this.trackVertical),y=this.getThumbVerticalHeight(),b={height:y,transform:`translateY(`+h/(_-g)*(v-y)+`px)`};if(r){var x={visibility:c>s?`visible`:`hidden`},S={visibility:_>g?`visible`:`hidden`};(0,a.default)(this.trackHorizontal,x),(0,a.default)(this.trackVertical,S)}(0,a.default)(this.thumbHorizontal,m),(0,a.default)(this.thumbVertical,b)}n&&n(i),typeof e==`function`&&e(i)}},{key:`render`,value:function(){var e=this,n=(0,l.default)(),r=this.props;r.onScroll,r.onScrollFrame,r.onScrollStart,r.onScrollStop,r.onUpdate;var i=r.renderView,a=r.renderTrackHorizontal,s=r.renderTrackVertical,u=r.renderThumbHorizontal,d=r.renderThumbVertical,f=r.tagName;r.hideTracksWhenNotNeeded;var m=r.autoHide;r.autoHideTimeout;var h=r.autoHideDuration;r.thumbSize,r.thumbMinSize;var _=r.universal,v=r.autoHeight,y=r.autoHeightMin,b=r.autoHeightMax,x=r.style,S=r.children,C=g(r,[`onScroll`,`onScrollFrame`,`onScrollStart`,`onScrollStop`,`onUpdate`,`renderView`,`renderTrackHorizontal`,`renderTrackVertical`,`renderThumbHorizontal`,`renderThumbVertical`,`tagName`,`hideTracksWhenNotNeeded`,`autoHide`,`autoHideTimeout`,`autoHideDuration`,`thumbSize`,`thumbMinSize`,`universal`,`autoHeight`,`autoHeightMin`,`autoHeightMax`,`style`,`children`]),w=this.state.didMountUniversal,T=t({},p.containerStyleDefault,v&&t({},p.containerStyleAutoHeight,{minHeight:y,maxHeight:b}),x),E=t({},p.viewStyleDefault,{marginRight:n?-n:0,marginBottom:n?-n:0},v&&t({},p.viewStyleAutoHeight,{minHeight:(0,c.default)(y)?`calc(`+y+` + `+n+`px)`:y+n,maxHeight:(0,c.default)(b)?`calc(`+b+` + `+n+`px)`:b+n}),v&&_&&!w&&{minHeight:y,maxHeight:b},_&&!w&&p.viewStyleUniversalInitial),D={transition:`opacity `+h+`ms`,opacity:0},O=t({},p.trackHorizontalStyleDefault,m&&D,(!n||_&&!w)&&{display:`none`}),k=t({},p.trackVerticalStyleDefault,m&&D,(!n||_&&!w)&&{display:`none`});return(0,o.createElement)(f,t({},C,{style:T,ref:function(t){e.container=t}}),[(0,o.cloneElement)(i({style:E}),{key:`view`,ref:function(t){e.view=t}},S),(0,o.cloneElement)(a({style:O}),{key:`trackHorizontal`,ref:function(t){e.trackHorizontal=t}},(0,o.cloneElement)(u({style:p.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,o.cloneElement)(s({style:k}),{key:`trackVertical`,ref:function(t){e.trackVertical=t}},(0,o.cloneElement)(d({style:p.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),s}(o.Component);e.default=b,b.propTypes={onScroll:s.default.func,onScrollFrame:s.default.func,onScrollStart:s.default.func,onScrollStop:s.default.func,onUpdate:s.default.func,renderView:s.default.func,renderTrackHorizontal:s.default.func,renderTrackVertical:s.default.func,renderThumbHorizontal:s.default.func,renderThumbVertical:s.default.func,tagName:s.default.string,thumbSize:s.default.number,thumbMinSize:s.default.number,hideTracksWhenNotNeeded:s.default.bool,autoHide:s.default.bool,autoHideTimeout:s.default.number,autoHideDuration:s.default.number,autoHeight:s.default.bool,autoHeightMin:s.default.oneOfType([s.default.number,s.default.string]),autoHeightMax:s.default.oneOfType([s.default.number,s.default.string]),universal:s.default.bool,style:s.default.object,children:s.default.node},b.defaultProps={renderView:m.renderViewDefault,renderTrackHorizontal:m.renderTrackHorizontalDefault,renderTrackVertical:m.renderTrackVerticalDefault,renderThumbHorizontal:m.renderThumbHorizontalDefault,renderThumbVertical:m.renderThumbVerticalDefault,tagName:`div`,thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}})),eD=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=n($E());function n(e){return e&&e.__esModule?e:{default:e}}e.default=t.default,e.Scrollbars=t.default}))(),tD={avatar:`_avatar_14f3v_1`,circle:`_circle_14f3v_1`};function nD(e){return e.logoUrl?(0,Q.jsx)(`div`,{className:`h-100`,children:(0,Q.jsx)(`img`,{alt:e.customerName,className:`rounded-circle ${tD.avatar}`,src:e.logoUrl})}):(0,Q.jsx)(`div`,{className:`${tD.circle} ${e.colourClass||`bg-ultramarine`} text-white rounded-circle`,children:(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`svg-container lg`,children:(0,Q.jsx)(`path`,{d:`M 19.53125,14.5438 H 16.9875 v -4.28056 l 0.34144,0.15522 c 0.0629,0.0286 0.12884,0.0421 0.19372,0.0421 0.17815,0 0.34843,-0.10215 0.427,-0.2749 0.10712,-0.23569 0.003,-0.51357 -0.23278,-0.62069 L 12.46875,7.17941 V 5.43956 h 1.53962 c 0.25885,0 0.46875,-0.20987 0.46875,-0.46875 V 4.46875 C 14.47712,4.20987 14.26722,4 14.00837,4 H 12 C 11.74116,4 11.53125,4.20987 11.53125,4.46875 V 7.17941 L 6.28316,9.56494 c -0.23566,0.10712 -0.33991,0.385 -0.23272,0.62068 0.10706,0.23569 0.385,0.33985 0.62065,0.23275 l 0.34144,-0.15521 v 4.28059 H 4.46875 C 4.20991,14.54375 4,14.75362 4,15.0125 v 4.51875 C 4,19.79012 4.20991,20 4.46875,20 h 3.0125 3.0125 3.01244 3.0125 3.01256 C 19.79016,20.00005 20,19.79017 20,19.5313 V 15.01255 C 20,14.75367 19.79016,14.5438 19.53125,14.5438 Z M 7.0125,19.06255 H 4.9375 V 15.4813 h 2.075 z m 6.02497,0 h -2.07494 v -2.07497 h 2.07494 z m 3.01253,-4.05 v 4.05 h -2.075 v -2.54372 c 0,-0.25887 -0.20984,-0.46875 -0.46875,-0.46875 h -3.01244 c -0.25884,0 -0.46875,0.20988 -0.46875,0.46875 v 2.54372 h -2.075 v -4.05 H 7.95 V 9.83708 L 12,7.99617 16.05,9.83708 Z m 3.0125,4.05 h -2.075 V 15.4813 h 2.075 z M 12,10.0608 c -1.089,0 -1.97497,0.88594 -1.97497,1.97497 0,1.089 0.88597,1.975 1.97497,1.975 1.08906,0 1.97497,-0.886 1.97497,-1.975 0,-1.08903 -0.88594,-1.97497 -1.97497,-1.97497 z m 0,3.01244 c -0.57203,0 -1.03747,-0.46544 -1.03747,-1.0375 0,-0.57203 0.46544,-1.03747 1.03747,-1.03747 0.57209,0 1.03747,0.4654 1.03747,1.03747 0,0.57209 -0.46541,1.0375 -1.03747,1.0375 z`})})})}var rD=[`second`,`minute`,`hour`,`day`,`week`,`month`,`year`];function iD(e,t){if(t===0)return[`just now`,`right now`];var n=rD[Math.floor(t/2)];return e>1&&(n+=`s`),[e+` `+n+` ago`,`in `+e+` `+n]}var aD=[`秒`,`分钟`,`小时`,`天`,`周`,`个月`,`年`];function oD(e,t){if(t===0)return[`刚刚`,`片刻后`];var n=aD[~~(t/2)];return[e+` `+n+`前`,e+` `+n+`后`]}var sD={},cD=function(e,t){sD[e]=t},lD=function(e){return sD[e]||sD.en_US},uD=[60,60,24,7,365/7/12,12];function dD(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||``).trim().replace(/\.\d+/,``).replace(/-/,`/`).replace(/-/,`/`).replace(/(\d)T(\d)/,`$1 $2`).replace(/Z/,` UTC`).replace(/([+-]\d\d):?(\d\d)/,` $1$2`),new Date(e))}function fD(e,t){var n=+(e<0);e=Math.abs(e);for(var r=e,i=0;e>=uD[i]&&i<uD.length;i++)e/=uD[i];return e=Math.floor(e),i*=2,e>(i===0?9:1)&&(i+=1),t(e,i,r)[n].replace(`%s`,e.toString())}function pD(e,t){return((t?dD(t):new Date)-+dD(e))/1e3}var mD=function(e,t,n){return fD(pD(e,n&&n.relativeDate),lD(t))};cD(`en_US`,iD),cD(`zh_CN`,oD);var hD={tile:`_tile_wesrn_1`,avatar:`_avatar_wesrn_5`,email:`_email_wesrn_9`,subheading:`_subheading_wesrn_12`};function gD(e){let t=jf.buildAvatarUrl(e.avatarUrl,{size:`small`});return(0,Q.jsxs)(`div`,{className:`container my-4 p-3 rounded-3 ${hD.tile}`,children:[(0,Q.jsx)(`p`,{className:`${hD.subheading} mb-0`,children:`Account:`}),(0,Q.jsxs)(`div`,{className:`d-flex align-items-center pb-3`,children:[(0,Q.jsx)(`div`,{className:`h-100`,children:(0,Q.jsx)(`img`,{alt:`Avatar`,className:`rounded-circle ${hD.avatar}`,src:t})}),(0,Q.jsxs)(`div`,{className:`ms-2`,children:[(0,Q.jsxs)(`p`,{className:`mb-1 text-break mt-2`,children:[e.firstName,` `,e.surname]}),(0,Q.jsx)(`p`,{className:`mb-1 ${hD.email}`,children:e.email}),(0,Q.jsx)(`p`,{className:`m-0 text-secondary`,children:e.lastSignInTime?(0,Q.jsxs)(Q.Fragment,{children:[`Last logged in `,mD(e.lastSignInTime)]}):(0,Q.jsx)(Q.Fragment,{children:`No login history`})})]})]}),(0,Q.jsx)(`p`,{className:hD.subheading,children:`Has access to:`}),e.customers?.length?(0,Q.jsx)(eD.Scrollbars,{autoHeightMax:200,autoHeight:!0,children:(0,Q.jsx)(`div`,{className:`mb-n2`,children:e.customers.map(e=>(0,Q.jsxs)(`div`,{className:`d-flex align-items-center mb-2`,children:[(0,Q.jsx)(nD,{logoUrl:jf.buildAvatarUrl(e.logoUrl,{size:`small`}),customerName:e.name}),(0,Q.jsx)(`p`,{className:`mb-0 ms-2 text-break`,children:e.name})]},e.id))})}):(0,Q.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,Q.jsx)(nD,{logoUrl:``,colourClass:`bg-gray-500`}),(0,Q.jsx)(`p`,{className:`mb-0 ms-2 text-break text-secondary`,children:`No schools`})]})]})}function _D(e){let[t,n]=Z.useState(``),[r,i]=Z.useState(!1);function a(){i(!0);let t={userId:e.userId,email:e.email,idpId:e.idpId,externalUserId:e.externalUserId};xd.post(`/ajax/external/link-account`,t).then(t=>zd(t,e)).catch(e=>{i(!1),n(e.userMessage||`Something went wrong`)})}function o(){xd.post(`/ajax/external/continue`,{returnUrl:e.returnUrl,createWithoutEmail:!0}).then(t=>zd(t,e,{createWithoutEmail:!0})).catch(e=>{i(!1),n(e.userMessage||`Something went wrong`)})}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`It looks like you already have an account`,children:`We've found an existing account using the same email - would you like to link your accounts?`}),(0,Q.jsx)(gD,{firstName:e.firstName,surname:e.surname,avatarUrl:e.avatarUrl,email:e.email,lastSignInTime:e.lastSignInTime,customers:e.customers}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,showSpinner:r,type:`button`,onClick:a,children:`Link existing account`}),!!t&&(0,Q.jsx)(Cf,{name:`linkAccount`,children:t}),e.showCreateNewAccount&&(0,Q.jsx)(`button`,{className:`btn btn-link text-info w-100 mt-2 no-sso-link`,onClick:o,children:`Create new account`})]})}function vD(e){let{navigate:t,userId:n,email:r,externalUserId:i,idpId:a,returnUrl:o,theme:s}=e;function c(){t({step:`link-account`})}function l(){return xd.post(`/ajax/external/continue`,{returnUrl:o}).then(t=>zd(t,e))}function u(e){return xd.post(`/ajax/external/link-account-code`,{code:e,userId:n,email:r,idpId:a,externalUserId:i}).then(l)}return(0,Q.jsx)(cp,{navigate:t,theme:s,title:`Enter code`,description:(0,Q.jsxs)(Q.Fragment,{children:[`Please enter the `,(0,Q.jsx)(`strong`,{children:`6 digit`}),` code we've sent to `,(0,Q.jsx)(`strong`,{children:r})]}),submit:u,onBack:c,...e})}function yD(e){let{value:t,onChange:n,error:r,autoFocus:i}=e;return(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`label`,{htmlFor:`username`,children:`Email`}),(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${!!r&&`is-invalid`}`,type:`email`,name:`username`,id:`username`,value:t,placeholder:`Enter your email`,autoFocus:!!i,onChange:e=>n(e.target.value),disabled:e.disabled,"aria-invalid":!!r,"aria-errormessage":`usernameError`}),!!r&&(0,Q.jsx)(Cf,{name:`username`,children:r})]})}function bD(e){let[t,n]=Z.useState(e.email||``),[r,i]=Z.useState({source:e.firstName||``}),{password:a,setPassword:o,warning:s,suggestions:c,passwordScore:l,passwordStrength:u,passwordCheck:d}=xC(),[f,p]=Z.useState(``);function m(t){i(t),e.setErrors({...e.errors,fullName:``})}function h(t){o(t.target.value),e.setErrors({...e.errors,password:``})}function g(t){n(t),e.setErrors({...e.errors,email:``})}function _(t){p(t),e.setErrors({...e.errors,jobTitle:``})}function v(n){n.preventDefault();let{firstName:i,surname:o}=r,s={firstName:i,surname:o,password:a,email:t};e.allowJobTitleChange&&(s.jobTitle=f),e.onSubmit(s)}let y=!e.email,b=e.errors.general||!y&&e.errors.email;return(0,Q.jsxs)(`form`,{onSubmit:v,children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(VC,{value:r.source||``,onChange:m,error:e.errors.fullName,autoFocus:!0}),y&&(0,Q.jsx)(yD,{value:t,onChange:g,error:e.errors.email,disabled:!!e.email}),e.allowJobTitleChange&&(0,Q.jsx)(ew,{error:e.errors.jobTitle,onChange:_,countryCode:e.countryCode,autoFocus:!1,isTertiary:CE.getCustomerType(e.customerType)===Ku.Tertiary}),(0,Q.jsx)(qf,{placeholder:`Enter your password`,value:a,onChange:h,name:`new-password`,autoComplete:`new-password`,hasError:!!e.errors.password,"aria-invalid":!!e.errors.password,"aria-errormessage":`new-passwordError`}),!!e.errors.password&&(0,Q.jsx)(Cf,{name:`new-password`,children:e.errors.password}),!e.errors.password&&d&&(0,Q.jsx)(`div`,{children:(0,Q.jsx)(cC,{score:l,suggestions:c,warning:s,suggestionHeader:`Suggested ways to strengthen your password:`,strengthText:u})})]}),!!b&&(0,Q.jsx)(`div`,{className:`text-danger my-3`,children:b}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:e.spinner,children:`Get Started`})]})}function xD(e){switch(e.errorCode.toString()){case`user.invalid-first-name`:case`user.invalid-surname`:return{fullName:e.userMessage};case`user.invalid-password`:case`user.same-password`:case`user.password-too-short`:return{password:e.userMessage};case`user.invalid-email`:return{email:e.userMessage};case`invalid-token`:case`user.already-activated`:return{general:e.userMessage};case`user.invalid-jobtitle`:return{jobTitle:e.userMessage};default:return{}}}function SD(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({}),{productName:a}=Ld.getDefinition(e.theme);function o(t){let{firstName:n,surname:a,email:o,jobTitle:s,password:c}=t,l={},[u,d]=tp.isPasswordValid(c,``,!1);return u||(l.password=d),!e.email&&!tp.isEmail(o)&&(l.email=`Please enter a valid email.`),(!n||!a)&&(l.fullName=`Please enter your full name.`),e.allowJobTitleChange&&!s?.length&&(l.jobTitle=`Please enter your role..`),i({...r,...l}),!Object.keys(l).length}function s(t){if(!o(t))return;let r={email:e.email||t.email,firstName:t.firstName,surname:t.surname,invitationToken:e.invitationToken,password:t.password};e.allowJobTitleChange&&(r.jobTitle=t.jobTitle),n(!0),xd.post(`/ajax/invite`,r).then(t=>zd(t,e)).catch(c)}function c(e){n(!1);let t=xD(e);i({...r,...t})}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Welcome to ${a}!`,children:(0,Q.jsx)(`p`,{children:`Please fill out the form below to create your account`})}),(0,Q.jsx)(bD,{allowJobTitleChange:e.allowJobTitleChange,countryCode:e.countryCode,email:e.email,firstName:e.firstName,spinner:t,errors:r,setErrors:i,onSubmit:s,customerType:e.customer?.customerType})]})}function CD(e){let{returnUrl:t,customer:n}=e;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`d-flex justify-content-center my-5 px-2 px-lg-4`,children:(0,Q.jsx)(`img`,{src:`/images/invites/invite-accepted-v2.png`,className:`w-100 mx-auto h-auto`})}),(0,Q.jsx)(`div`,{className:`mb-3 d-flex justify-content-center`,children:(0,Q.jsx)(nD,{logoUrl:n.logoUrl,customerName:n.name})}),(0,Q.jsx)(rd,{theme:e.theme,className:{title:`text-center`,description:`text-center`},title:`Welcome to`,children:n.name}),t&&(0,Q.jsx)(`a`,{role:`button`,href:t,className:`btn btn-dark btn-lg w-100 text-decoration-none`,children:`Continue`})]})}var wD={selected:`_selected_1ryhi_1`};function TD(e){let{returnUrl:t,navigate:n}=e,[r,i]=Z.useState(null),{productName:a}=Ld.getDefinition(e.theme);function o(){if(!r)return;let i={returnUrl:t,userType:r===`staff`?1:2,createWithoutEmail:!!e.createWithoutEmail};xd.post(`/ajax/external/continue`,i).then(t=>zd(t,e,{createWithoutEmail:!1})).catch(e=>{n({step:`error`,errorCode:e.errorCode,traceId:e.traceId})})}let s=`btn btn-lg w-100 mb-3 border-dark`;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Let's get you started with ${a}`}),(0,Q.jsx)(`button`,{className:`${s} ${r===`staff`?wD.selected:``}`,onClick:()=>i(`staff`),children:`I am an educator`}),(0,Q.jsx)(`button`,{className:`${s} ${r===`learner`?wD.selected:``}`,onClick:()=>i(`learner`),children:`I am a student`}),(0,Q.jsx)(`button`,{className:`btn btn-dark btn-lg w-100`,disabled:!r,onClick:o,children:`Continue`})]})}var ED=o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e["@clickview/braze-client"]=r():n[`@clickview/braze-client`]=r()})(self,(()=>(()=>{var e,t,n={8322:e=>{e.exports=function(e){var t=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|a>>>20)+n|0)&n|~a&r)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|a>>>20)+n|0)&n|~a&r)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|a>>>20)+n|0)&n|~a&r)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|a>>>20)+n|0)&n|~a&r)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|a>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+a|0)&n|a&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|a>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+a|0)&n|a&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|a>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+a|0)&n|a&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|a>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&n|a&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|a>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|a>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|a>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|a>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function a(e){var t,i,a,o,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(u,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(u,a),u}function o(e){var n,r=``;for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function s(e){var t;for(t=0;t<e.length;t+=1)e[t]=o(e[t]);return e.join(``)}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return s(a(`hello`)),typeof ArrayBuffer>`u`||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,n){var r,i,a,o,s=this.byteLength,c=e(t,s),l=s;return n!==void 0&&(l=e(n,s)),c>l?new ArrayBuffer(0):(r=l-c,i=new ArrayBuffer(r),a=new Uint8Array(i),o=new Uint8Array(this,c,r),a.set(o),i)}}(),u.prototype.append=function(e){return this.appendBinary(c(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),n=s(this._hash),e&&(n=l(n)),this.reset(),n},u.prototype.reset=function(){return this._buff=``,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var r,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,e),o=0;o<16;o+=1)e[o]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),a=parseInt(r[1],16)||0,e[14]=i,e[15]=a,n(this._hash,e)},u.hash=function(e,t){return u.hashBinary(c(e),t)},u.hashBinary=function(e,t){var n=s(a(e));return t?l(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var t,r,a,o,s,c=(r=this._buff.buffer,a=e,o=!0,(s=new Uint8Array(r.byteLength+a.byteLength)).set(new Uint8Array(r)),s.set(new Uint8Array(a),r.byteLength),o?s:s.buffer),l=c.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)n(this._hash,i(c.subarray(t-64,t)));return this._buff=t-64<l?new Uint8Array(c.buffer.slice(t-64)):new Uint8Array,this},u.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r[t]<<(t%4<<3);return this._finish(a,i),n=s(this._hash),e&&(n=l(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e,t=u.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),a=new Uint8Array(i);for(n=0;n<r;n+=1)a[n]=e.charCodeAt(n);return t?a:i}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var r=s(function(e){var t,r,a,o,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.subarray(t-64,t)));for(r=(e=t-64<l?e.subarray(t-64):new Uint8Array).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)a[t>>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(u,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(u,a),u}(new Uint8Array(e)));return t?l(r):r},u}()},2730:(e,t,n)=>{n.d(t,{G:()=>r,r:()=>i});let r={CustomEvent:`ce`,Pr:`p`,_u:`pc`,vc:`ca`,Ea:`i`,qs:`ie`,M:`cci`,R:`ccic`,I:`ccc`,F:`ccd`,ql:`ss`,xl:`se`,Oi:`si`,Ei:`sc`,Gi:`sbc`,Cc:`sfe`,mo:`iec`,Uu:`lr`,zu:`uae`,O:`ci`,$:`cc`,Ju:`lcaa`,Eu:`lcar`,On:`inc`,Ln:`add`,Rn:`rem`,$n:`set`,Bn:`ncam`,Ku:`sgu`,Fr:`ffi`},i={Ar:`feed_displayed`,Ec:`content_cards_displayed`}},7070:(e,t,n)=>{n.d(t,{Z:()=>r});let r={W:function(){let e=(e=!1)=>{let t=(Math.random().toString(16)+`000000000`).substr(2,8);return e?`-`+t.substr(0,4)+`-`+t.substr(4,4):t};return e()+e(!0)+e(!0)+e()}}},5522:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t){this.database=e,this.vd=t,this.parent=typeof window>`u`?self:window,this.database=e,this.vd=t}Dd(){if(`indexedDB`in this.parent)return this.parent.indexedDB}isSupported(){try{if(this.Dd()==null)return!1;{let e=this.Dd()?.open(`Braze IndexedDB Support Test`);if(e&&(e.onupgradeneeded=()=>e.result.close(),e.onsuccess=()=>e.result.close()),typeof window<`u`){let e=window,t=e.chrome||e.browser||e.pd;if(t&&t.runtime&&t.runtime.id)return this.vd.info(`Not using IndexedDB for storage because we are running inside an extension`),!1}return!0}}catch(e){return this.vd.info(`Not using IndexedDB for storage due to following error: `+e),!1}}Bd(e,t){let n=this.Dd()?.open(this.database.Sd,this.database.VERSION);if(n==null)return typeof t==`function`&&t(),!1;let r=this;return n.onupgradeneeded=e=>{r.vd.info(`Upgrading indexedDB `+r.database.Sd+` to v`+r.database.VERSION+`...`);let t=e.target?.result;for(let e in r.database.ss){let n=e;r.database.ss.hasOwnProperty(e)&&!t.objectStoreNames.contains(r.database.ss[n])&&t.createObjectStore(r.database.ss[n])}},n.onsuccess=n=>{let i=n.target?.result;i.onversionchange=()=>{i.close(),typeof t==`function`&&t(),r.vd.error(`Needed to close the database unexpectedly because of an upgrade in another tab`)},e(i)},n.onerror=e=>{let n=e;return r.vd.info(`Could not open indexedDB `+r.database.Sd+` v`+r.database.VERSION+`: `+n.target?.errorCode),typeof t==`function`&&t(),!0},!0}setItem(e,t,n,r,i){if(!this.isSupported())return typeof i==`function`&&i(),!1;let a=this;return this.Bd((o=>{if(!o.objectStoreNames.contains(e))return a.vd.error(`Could not store object `+t+` in `+e+` on indexedDB `+a.database.Sd+` - `+e+` is not a valid objectStore`),typeof i==`function`&&i(),void o.close();let s=o.transaction([e],`readwrite`);s.oncomplete=()=>o.close();let c=s.objectStore(e).put(n,t);c.onerror=()=>{a.vd.error(`Could not store object `+t+` in `+e+` on indexedDB `+a.database.Sd),typeof i==`function`&&i()},c.onsuccess=()=>{typeof r==`function`&&r()}}),i)}getItem(e,t,n){if(!this.isSupported())return!1;let r=this;return this.Bd((i=>{if(!i.objectStoreNames.contains(e))return r.vd.error(`Could not retrieve object `+t+` in `+e+` on indexedDB `+r.database.Sd+` - `+e+` is not a valid objectStore`),void i.close();let a=i.transaction([e],`readonly`);a.oncomplete=()=>i.close();let o=a.objectStore(e).get(t);o.onerror=()=>{r.vd.error(`Could not retrieve object `+t+` in `+e+` on indexedDB `+r.database.Sd)},o.onsuccess=e=>{let t=e.target?.result;t!=null&&n(t)}}))}jr(e,t,n){if(!this.isSupported())return typeof n==`function`&&n(),!1;let r=this;return this.Bd((i=>{if(!i.objectStoreNames.contains(e))return r.vd.error(`Could not retrieve last record from `+e+` on indexedDB `+r.database.Sd+` - `+e+` is not a valid objectStore`),typeof n==`function`&&n(),void i.close();let a=i.transaction([e],`readonly`);a.oncomplete=()=>i.close();let o=a.objectStore(e).openCursor(null,`prev`);o.onerror=()=>{r.vd.error(`Could not open cursor for `+e+` on indexedDB `+r.database.Sd),typeof n==`function`&&n()},o.onsuccess=e=>{let r=e.target?.result;r!=null&&r.value!=null&&r.key!=null?t(r.key,r.value):typeof n==`function`&&n()}}),n)}re(e,t){if(!this.isSupported())return!1;let n=this;return this.Bd((r=>{if(!r.objectStoreNames.contains(e))return n.vd.error(`Could not delete record `+t+` from `+e+` on indexedDB `+n.database.Sd+` - `+e+` is not a valid objectStore`),void r.close();let i=r.transaction([e],`readwrite`);i.oncomplete=()=>r.close(),i.objectStore(e).delete(t).onerror=()=>{n.vd.error(`Could not delete record `+t+` from `+e+` on indexedDB `+n.database.Sd)}}))}Zt(e,t){if(!this.isSupported())return!1;let n=this;return this.Bd((r=>{if(!r.objectStoreNames.contains(e))return n.vd.error(`Could not retrieve objects from `+e+` on indexedDB `+n.database.Sd+` - `+e+` is not a valid objectStore`),void r.close();let i=r.transaction([e],`readwrite`);i.oncomplete=()=>r.close();let a=i.objectStore(e),o=a.openCursor(),s=[];o.onerror=()=>{s.length>0?(n.vd.info(`Cursor closed midway through for `+e+` on indexedDB `+n.database.Sd),t(s)):n.vd.error(`Could not open cursor for `+e+` on indexedDB `+n.database.Sd)},o.onsuccess=e=>{let n=e.target?.result;n==null?s.length>0&&t(s):(n.value!=null&&n.key!=null&&(a.delete(n.key).onsuccess=()=>{s.push(n.value)}),typeof n.continue==`function`&&n.continue())}}))}clearData(){if(!this.isSupported())return!1;let e=[];for(let t in this.database.ss){let n=t;this.database.ss.hasOwnProperty(t)&&this.database.ss[n]!==this.database.ss.ae&&e.push(this.database.ss[n])}let t=this;return this.Bd((function(n){let r=n.transaction(e,`readwrite`);r.oncomplete=()=>n.close();for(let n=0;n<e.length;n++){let i=e[n];r.objectStore(i).clear().onerror=function(){t.vd.error(`Could not clear `+this.source.name+` on indexedDB `+t.database.Sd)}}r.onerror=function(){t.vd.error(`Could not clear object stores on indexedDB `+t.database.Sd)}}))}}r.Yt={Qt:{Sd:`AppboyServiceWorkerAsyncStorage`,VERSION:6,ss:{$a:`data`,hr:`pushClicks`,cu:`pushSubscribed`,Cd:`fallbackDevice`,ts:`cardUpdates`,ae:`optOut`,wr:`pendingData`,jh:`sdkAuthenticationSignature`},ie:1}}},335:(e,t,n)=>{n.d(t,{Z:()=>i});let r={init:function(e){e===void 0&&r.zg!==void 0||(r.zg=!!e),r.t||=!0},destroy:function(){r.t=!1,r.zg=void 0,r.vd=void 0},setLogger:function(e){typeof e==`function`?(r.init(),r.vd=e):r.info(`Ignoring setLogger call since logger is not a function`)},toggleLogging:function(){r.init(),r.zg?(console.log(`Disabling Braze logging`),r.zg=!1):(console.log(`Enabled Braze logging`),r.zg=!0)},info:function(e){if(r.zg){let t=`Braze: `+e;r.vd==null?console.log(t):r.vd(t)}},warn:function(e){if(r.zg){let t=`Braze SDK Warning: `+e+` (v5.3.1)`;r.vd==null?console.warn(t):r.vd(t)}},error:function(e){if(r.zg){let t=`Braze SDK Error: `+e+` (v5.3.1)`;r.vd==null?console.error(t):r.vd(t)}}},i=r},7529:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(5563),i=n(9179),a=n(4673),o=n(335),s=n(2730),c=n(5966);class l{constructor(e){this.u=e,this.u=e}h(e,t){let n=new a.Z;if(e.p(),e.url==null||e.url===``)return o.Z.info(`Card ${e.id} has no url. Not logging click to Braze servers.`),n;if(t&&e.id&&this.u){let t=this.u.j(c.I.C.v)||{};t[e.id]=!0,this.u.k(c.I.C.v,t)}let r=this.D([e]);if(r==null)return n;let l=t?s.G.I:s.G.$;return i.Z.q(l,r)}B(e){let t=new a.Z;if(!e.N())return o.Z.info(`Card ${e.id} refused this dismissal. Ignoring analytics event.`),t;if(e.id&&this.u){let t=this.u.j(c.I.C.A)||{};t[e.id]=!0,this.u.k(c.I.C.A,t)}let n=this.D([e]);return n==null?t:i.Z.q(s.G.F,n)}G(e,t){let n=new a.Z(!0),o=[],l=[],u={};this.u&&(u=t?this.u.j(c.I.C.H)||{}:this.u.j(c.I.C.J)||{});for(let t of e)t.K(),t instanceof r.Z?l.push(t):o.push(t),t.id&&(u[t.id]=!0);let d=this.D(o),f=this.D(l);if(d==null&&f==null)return n.L=!1,n;if(this.u&&(t?this.u.k(c.I.C.H,u):this.u.k(c.I.C.J,u)),d!=null){let e=t?s.G.M:s.G.O,r=i.Z.q(e,d);n.P(r)}if(f!=null&&t){let e=i.Z.q(s.G.R,f);n.P(e)}return n}D(e){let t,n=null;for(let r=0;r<e.length;r++)t=e[r].id,t!=null&&t!==``&&(n||={},n.ids=n.ids||[],n.ids.push(t));return n}}var u=n(5825);let d={t:!1,i:null,m:()=>(d.o(),d.i||=new l(u.ZP.l()),d.i),o:()=>{d.t||=(u.ZP.g(d),!0)},destroy:()=>{d.i=null,d.t=!1}},f=d},5608:(e,t,n)=>{n.d(t,{CG:()=>m,Dj:()=>h,Ji:()=>l,Zw:()=>d,pq:()=>f,ql:()=>c,rW:()=>u,sv:()=>p});var r=n(5242),i=n(1507),a=n(420),o=n(2080),s=n(7070);function c(e){return e!=null&&!!e.getAttribute(`data-ab-had-top-impression`)}function l(e){e?.setAttribute(`data-ab-had-top-impression`,`true`)}function u(e){return e!=null&&!!e.getAttribute(`data-ab-had-bottom-impression`)}function d(e){e?.setAttribute(`data-ab-had-bottom-impression`,`true`)}function f(e){if(e!=null){let t=e.querySelectorAll(`.ab-unread-indicator`)[0];t!=null&&(t.className+=` read`)}}function p(e){return e.getAttribute(`data-ab-card-id`)}function m(e,t){let n=t.querySelectorAll(`.ab-image-area`),r,i=0;n.length>0&&(i=n[0].offsetWidth);for(let t of e)if(r=t.T,r&&t.imageUrl&&typeof t.aspectRatio==`number`){let e=i/t.aspectRatio;e&&(r.style.height=`${e}px`)}}function h(e,t,n){let c=document.createElement(`div`);c.className=`ab-card ab-effect-card `+e._,e.id&&(c.setAttribute(`data-ab-card-id`,e.id),c.setAttribute(`id`,e.id)),c.setAttribute(`role`,`article`),c.setAttribute(`tabindex`,`0`);let l=``,u=!1;e.url&&e.url!==``&&(l=e.url,u=!0);let d=r=>(f(c),u&&(t(e),(0,a.S)(l,n,r)),!1);if(e.pinned){let e=document.createElement(`div`);e.className=`ab-pinned-indicator`;let t=document.createElement(`i`);t.className=`fa fa-star`,e.appendChild(t),c.appendChild(e)}if(e.imageUrl&&e.imageUrl!==``){let t=document.createElement(`div`);t.className=`ab-image-area`;let n=document.createElement(`img`);if(n.setAttribute(`src`,e.imageUrl),n.onload=()=>{c.style.height=`auto`},function(e,t){let n=``;e.title||e.description||(n=`Feed Image`),t.setAttribute(`alt`,n)}(e,n),t.appendChild(n),c.className+=` with-image`,u&&!e.S){let e=document.createElement(`a`);e.setAttribute(`href`,l),e.onclick=d,e.appendChild(t),c.appendChild(e)}else c.appendChild(t)}let p=document.createElement(`div`);if(p.className=`ab-card-body`,e.dismissible){e.logCardDismissal=()=>(0,o.K)(e);let t=(0,r.B)(`Dismiss Card`,void 0,e.dismissCard.bind(e));c.appendChild(t),(0,i.FZ)(p,i.mQ.U,(e=>{c.className+=` ab-swiped-left`,t.onclick(e)})),(0,i.FZ)(p,i.mQ.V,(e=>{c.className+=` ab-swiped-right`,t.onclick(e)}))}let m=``,h=!1;if(e.title&&e.title!==``&&(m=e.title,h=!0),h){let e=document.createElement(`h1`);if(e.className=`ab-title`,e.id=s.Z.W(),c.setAttribute(`aria-labelledby`,e.id),u){let t=document.createElement(`a`);t.setAttribute(`href`,l),t.onclick=d,t.appendChild(document.createTextNode(m)),e.appendChild(t)}else e.appendChild(document.createTextNode(m));p.appendChild(e)}let g=document.createElement(`div`);if(g.className=h?`ab-description`:`ab-description ab-no-title`,g.id=s.Z.W(),c.setAttribute(`aria-describedby`,g.id),e.description&&g.appendChild(document.createTextNode(e.description)),u){let t=document.createElement(`div`);t.className=`ab-url-area`;let n=document.createElement(`a`);n.setAttribute(`href`,l),e.linkText&&n.appendChild(document.createTextNode(e.linkText)),n.onclick=d,t.appendChild(n),g.appendChild(t)}p.appendChild(g),c.appendChild(p);let _=document.createElement(`div`);return _.className=`ab-unread-indicator`,e.viewed&&(_.className+=` read`),c.appendChild(_),e.T=c,c}},1280:(e,t,n)=>{n.d(t,{d:()=>c});var r=n(2857),i=n(7529),a=n(7671),o=n(5825),s=n(335);function c(e,t){return!!o.ZP.X()&&(e instanceof r.Z?i.Z.m().h(e,t).L:(s.Z.error(`card `+a.U4),!1))}},2080:(e,t,n)=>{n.d(t,{K:()=>c});var r=n(2857),i=n(7529),a=n(7671),o=n(5825),s=n(335);function c(e){return!!o.ZP.X()&&(e instanceof r.Z?i.Z.m().B(e).L:(s.Z.error(`card `+a.U4),!1))}},1066:(e,t,n)=>{n.d(t,{p:()=>l});var r=n(2857),i=n(7529),a=n(5825),o=n(2893),s=n(7671),c=n(335);function l(e,t){if(!a.ZP.X())return!1;if(!(0,o.kJ)(e))return c.Z.error(`cards must be an array`),!1;for(let t of e)if(!(t instanceof r.Z))return c.Z.error(`Each card in cards ${s.U4}`),!1;return i.Z.m().G(e,t).L}},2857:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(7750),i=n(7671),a=n(4663),o=n(335);class s{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.id=e,this.viewed=t,this.title=n,this.imageUrl=r,this.description=i,this.created=a,this.updated=o,this.categories=s,this.expiresAt=c,this.url=l,this.linkText=u,this.aspectRatio=d,this.extras=f,this.pinned=p,this.dismissible=m,this.clicked=h,this.id=e,this.viewed=t||!1,this.title=n||``,this.imageUrl=r,this.description=i||``,this.created=a||null,this.updated=o||null,this.categories=s||[],this.expiresAt=c||null,this.url=l,this.linkText=u,d==null?this.aspectRatio=null:(d=parseFloat(d.toString()),this.aspectRatio=isNaN(d)?null:d),this.extras=f||{},this.pinned=p||!1,this.dismissible=m||!1,this.dismissed=!1,this.clicked=h||!1,this.isControl=!1,this.test=!1,this.Et=null,this.Tt=null}subscribeToClickedEvent(e){return this.Nt().It(e)}subscribeToDismissedEvent(e){return this.St().It(e)}removeSubscription(e){this.Nt().removeSubscription(e),this.St().removeSubscription(e)}removeAllSubscriptions(){this.Nt().removeAllSubscriptions(),this.St().removeAllSubscriptions()}dismissCard(){if(!this.dismissible||this.dismissed)return;typeof this.logCardDismissal==`function`&&this.logCardDismissal();let e=this.T;!e&&this.id&&(e=document.getElementById(this.id)),e&&(e.style.height=e.offsetHeight+`px`,e.className+=` ab-hide`,setTimeout((function(){e&&e.parentNode&&(e.style.height=`0`,e.style.margin=`0`,setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),s.At))}),i.rF))}Nt(){return this.Et??=new a.Z,this.Et}St(){return this.Tt??=new a.Z,this.Tt}K(){this.viewed=!0}p(){this.viewed=!0,this.clicked=!0,this.Nt().Dt()}N(){return!(!this.dismissible||this.dismissed||(this.dismissed=!0,this.St().Dt(),0))}Ct(e){if(e==null||e[s.Rt.ht]!==this.id)return!0;if(e[s.Rt.Lt])return!1;if(e[s.Rt.nt]!=null&&this.updated!=null&&parseInt(e[s.Rt.nt])<(0,r.FX)(this.updated.valueOf()))return!0;if(e[s.Rt.et]&&!this.viewed&&(this.viewed=!0),e[s.Rt.zt]&&!this.clicked&&(this.clicked=e[s.Rt.zt]),e[s.Rt.rt]!=null&&(this.title=e[s.Rt.rt]),e[s.Rt.ot]!=null&&(this.imageUrl=e[s.Rt.ot]),e[s.Rt.ct]!=null&&(this.description=e[s.Rt.ct]),e[s.Rt.nt]!=null){let t=(0,r.X2)(e[s.Rt.nt]);t!=null&&(this.updated=t)}if(e[s.Rt.lt]!=null){let t;t=e[s.Rt.lt]===s._t?null:(0,r.X2)(e[s.Rt.lt]),this.expiresAt=t}if(e[s.Rt.URL]!=null&&(this.url=e[s.Rt.URL]),e[s.Rt.ft]!=null&&(this.linkText=e[s.Rt.ft]),e[s.Rt.xt]!=null){let t=parseFloat(e[s.Rt.xt].toString());this.aspectRatio=isNaN(t)?null:t}return e[s.Rt.bt]!=null&&(this.extras=e[s.Rt.bt]),e[s.Rt.gt]!=null&&(this.pinned=e[s.Rt.gt]),e[s.Rt.jt]!=null&&(this.dismissible=e[s.Rt.jt]),e[s.Rt.kt]!=null&&(this.test=e[s.Rt.kt]),!0}Y(){o.Z.error(`Must be implemented in a subclass`)}}s._t=-1,s.Rt={ht:`id`,et:`v`,jt:`db`,Lt:`r`,nt:`ca`,gt:`p`,lt:`ea`,bt:`e`,Z:`tp`,ot:`i`,rt:`tt`,ct:`ds`,URL:`u`,ft:`dm`,xt:`ar`,zt:`cl`,kt:`t`},s.it={st:`captioned_image`,Ot:`text_announcement`,Mt:`short_news`,Pt:`banner_image`,Ut:`control`},s.tt={ht:`id`,et:`v`,jt:`db`,dt:`cr`,nt:`ca`,gt:`p`,ut:`t`,lt:`ea`,bt:`e`,Z:`tp`,ot:`i`,rt:`tt`,ct:`ds`,URL:`u`,ft:`dm`,xt:`ar`,zt:`cl`,kt:`s`},s.Gt={Xt:`ADVERTISING`,vt:`ANNOUNCEMENTS`,Vt:`NEWS`,Wt:`SOCIAL`},s.At=400},5563:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(2857);class i extends r.Z{constructor(e,t,n,r,i,a){super(e,t,null,null,null,null,n,null,r,null,null,null,i,a),this.isControl=!0,this._=`ab-control-card`,this.S=!1}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.Ut,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.kt]=this.test,e}}},5899:(e,t,n)=>{n.d(t,{xA:()=>d,D5:()=>f,rN:()=>p});var r=n(2857);class i extends r.Z{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){super(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h),this._=`ab-classic-card`,this.S=!0}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.Mt,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.rt]=this.title,e[r.Z.tt.ot]=this.imageUrl,e[r.Z.tt.ct]=this.description,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.dt]=this.created,e[r.Z.tt.ut]=this.categories,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.URL]=this.url,e[r.Z.tt.ft]=this.linkText,e[r.Z.tt.xt]=this.aspectRatio,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.jt]=this.dismissible,e[r.Z.tt.zt]=this.clicked,e[r.Z.tt.kt]=this.test,e}}class a extends r.Z{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){super(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h),this._=`ab-captioned-image`,this.S=!0,this.test=!1}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.st,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.rt]=this.title,e[r.Z.tt.ot]=this.imageUrl,e[r.Z.tt.ct]=this.description,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.dt]=this.created,e[r.Z.tt.ut]=this.categories,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.URL]=this.url,e[r.Z.tt.ft]=this.linkText,e[r.Z.tt.xt]=this.aspectRatio,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.jt]=this.dismissible,e[r.Z.tt.zt]=this.clicked,e[r.Z.tt.kt]=this.test,e}}class o extends r.Z{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p){super(e,t,null,n,null,r,i,a,o,s,c,l,u,d,f,p),this._=`ab-image-only`,this.S=!1,this.test=!1}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.Pt,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.ot]=this.imageUrl,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.dt]=this.created,e[r.Z.tt.ut]=this.categories,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.URL]=this.url,e[r.Z.tt.ft]=this.linkText,e[r.Z.tt.xt]=this.aspectRatio,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.jt]=this.dismissible,e[r.Z.tt.zt]=this.clicked,e[r.Z.tt.kt]=this.test,e}}var s=n(5563),c=n(7750),l=n(335);function u(e,t,n,c,u,d,f,p,m,h,g,_,v,y,b,x,S,C){let w;if(t===r.Z.it.Ot||t===r.Z.it.Mt)w=new i(e,n,c,u,d,f,p,m,h,g,_,v,y,b,x,S);else if(t===r.Z.it.st)w=new a(e,n,c,u,d,f,p,m,h,g,_,v,y,b,x,S);else if(t===r.Z.it.Pt)w=new o(e,n,u,f,p,m,h,g,_,v,y,b,x,S);else{if(t!==r.Z.it.Ut)return l.Z.error(`Ignoring card with unknown type `+t),null;w=new s.Z(e,n,p,h,y,b)}return C&&(w.test=C),w}function d(e){if(e[r.Z.Rt.Lt])return null;let t=e[r.Z.Rt.ht],n=e[r.Z.Rt.Z],i=e[r.Z.Rt.et],a=e[r.Z.Rt.rt],o=e[r.Z.Rt.ot],s=e[r.Z.Rt.ct],l=(0,c.X2)(e[r.Z.Rt.nt]),d=l,f;return f=e[r.Z.Rt.lt]===r.Z._t?null:(0,c.X2)(e[r.Z.Rt.lt]),u(t,n,i,a,o,s,d,l,null,f,e[r.Z.Rt.URL],e[r.Z.Rt.ft],e[r.Z.Rt.xt],e[r.Z.Rt.bt],e[r.Z.Rt.gt],e[r.Z.Rt.jt],e[r.Z.Rt.zt],e[r.Z.Rt.kt]||!1)}function f(e){return u(e.id,e.type,e.viewed,e.title,e.image,e.description,(0,c.X2)(e.created),(0,c.X2)(e.updated),e.categories,(0,c.X2)(e.expires_at),e.url,e.domain,e.aspect_ratio,e.extras,!1,!1)}function p(e){return u(e[r.Z.tt.ht],e[r.Z.tt.Z],e[r.Z.tt.et],e[r.Z.tt.rt],e[r.Z.tt.ot],e[r.Z.tt.ct],(0,c.Rd)(e[r.Z.tt.dt]),(0,c.Rd)(e[r.Z.tt.nt]),e[r.Z.tt.ut],(0,c.Rd)(e[r.Z.tt.lt]),e[r.Z.tt.URL],e[r.Z.tt.ft],e[r.Z.tt.xt],e[r.Z.tt.bt],e[r.Z.tt.gt],e[r.Z.tt.jt],e[r.Z.tt.zt],e[r.Z.tt.kt]||!1)||void 0}},4790:(e,t,n)=>{n.r(t),n.d(t,{changeUser:()=>c});var r=n(5825),i=n(8548),a=n(335),o=n(7615),s=n(3905);function c(e,t){if(!r.ZP.X())return;if(e==null||e.length===0||e!=e)return void a.Z.error(`changeUser requires a non-empty userId.`);if((0,i.E)(e)>o.Z.lr)return void a.Z.error(`Rejected user id "${e}" because it is longer than ${o.Z.lr} bytes.`);if(t!=null&&!(0,s.ro)(t,`set signature for new user`,`signature`))return;let n=r.ZP.cr();n&&n.changeUser(e.toString(),r.ZP.gr(),t)}},6243:(e,t,n)=>{n.d(t,{P:()=>i});var r=n(5825);function i(){if(r.ZP.X())return r.ZP.pr()}},420:(e,t,n)=>{n.d(t,{S:()=>f});var r=n(335),i=n(7671),a=n(5825),o=n(3046),s=n(3695),c=n(5806),l=n(3905),u=n(5319),d=n(6243);function f(e,t,f){if(a.ZP.X())if(l.y9.test(e)){let t=(0,o.OL)(e);if(!t)return;let f=e=>{if(!(0,l.zR)(e))return void r.Z.error(`Decoded Braze Action json is invalid: ${JSON.stringify(e,null,2)}`);let t=o.A9.properties.type,p=o.A9.properties.oo,m=o.A9.properties.eo,h=e[t];if(h===o.A9.types.ro){let t=e[p];for(let e of t)f(e)}else{let t=e[m],l,f;switch(h){case o.A9.types.logCustomEvent:Promise.resolve().then(n.bind(n,1454)).then((({logCustomEvent:e})=>{a.ZP.so()?(f=Array.prototype.slice.call(t),e(...f)):r.Z.error(i.Go)}));break;case o.A9.types.requestPushPermission:Promise.resolve().then(n.bind(n,2261)).then((({requestPushPermission:e})=>{a.ZP.so()?s.Z.browser===`Safari`&&s.Z.OS===c.T.io?window.navigator.standalone&&e():e():r.Z.error(i.Go)}));break;case o.A9.types.setEmailNotificationSubscriptionType:case o.A9.types.setPushNotificationSubscriptionType:case o.A9.types.setCustomUserAttribute:case o.A9.types.addToSubscriptionGroup:case o.A9.types.removeFromSubscriptionGroup:case o.A9.types.addToCustomAttributeArray:case o.A9.types.removeFromCustomAttributeArray:l=(0,d.P)(),l&&l[h](...Array.prototype.slice.call(t));break;case o.A9.types.no:case o.A9.types.ao:f=Array.prototype.slice.call(t),u.SD.openUri(...f);break;default:r.Z.info(`Ignoring unknown Braze Action: ${h}`)}}};f(t)}else u.SD.openUri(e,t,f)}},1454:(e,t,n)=>{n.r(t),n.d(t,{logCustomEvent:()=>d});var r=n(5825),i=n(9179),a=n(335),o=n(2730),s=n(4365),c=n(9342),l=n(3905),u=n(7671);function d(e,t){if(!r.ZP.X())return!1;if(e==null||e.length<=0)return a.Z.error(`logCustomEvent requires a non-empty eventName, got "${e}". Ignoring event.`),!1;if(!(0,l.zM)(e,`log custom event`,`the event name`))return!1;let[n,d]=(0,l.lg)(t,u._P,`eventProperties`,`log custom event "${e}"`,`event`);if(!n)return!1;let f=r.ZP.ir();if(f&&f.me(e))return a.Z.info(`Custom Event "${e}" is blocklisted, ignoring.`),!1;let p=i.Z.q(o.G.CustomEvent,{n:e,p:d});if(p.L){a.Z.info(`Logged custom event "${e}".`);for(let n of p.ge)c.n.rr().fe(s.Z.ue,[e,t],n)}return p.L}},4650:(e,t,n)=>{n.r(t),n.d(t,{requestImmediateDataFlush:()=>i});var r=n(5825);function i(e){if(!r.ZP.X())return;let t=r.ZP.cr();t&&t.requestImmediateDataFlush(e)}},3340:(e,t,n)=>{n.d(t,{V:()=>f,q:()=>d});var r=n(1792),i=n(8376),a=n(4410),o=n(1090),s=n(4072),c=n(3811),l=n(6616),u=n(335);function d(e){if(!e)return null;if(e.is_control)return i.Z.fromJson(e);let t=e.type;t!=null&&(t=t.toUpperCase());let n=e.message,d=e.text_align_message,f=e.slide_from,p=e.extras,m=e.trigger_id,h=e.click_action,g=e.uri,_=e.open_target,v=e.message_close,y=e.duration,b=e.icon,x=e.image_url,S=e.image_style,C=e.icon_color,w=e.icon_bg_color,T=e.bg_color,E=e.text_color,D=e.close_btn_color,O=e.header,k=e.text_align_header,A=e.header_text_color,j=e.frame_color,M=[],N=e.btns;N??=[];for(let e=0;e<N.length;e++)M.push(s.Z.fromJson(N[e]));let P=e.crop_type,F=e.orientation,I=e.animate_in,L=e.animate_out,R=e.html_id,z=e.css;R!=null&&R!==``&&z!=null&&z!==``||(R=void 0,z=void 0);let B=e.message_extras,V;if(t===c.Z.it||t===r.Z.qe.Ve)V=new c.Z(n,d,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,I,L,O,k,A,j,M,P,R,z,B);else if(t===a.Z.it)V=new a.Z(n,d,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,I,L,O,k,A,j,M,P,F,R,z,B);else if(t===l.Z.it)V=new l.Z(n,d,f,p,m,h,g,_,v,y,b,x,C,w,T,E,D,I,L,R,z,B);else{if(t!==o.Z.it&&t!==r.Z.qe.$e&&t!==r.Z.qe.We)return void u.Z.error(`Ignoring message with unknown type `+t);{let t=e.message_fields;V=new o.Z(n,p,m,v,y,I,L,j,R,z,t,B),V.trusted=e.trusted||!1}}return V.we=t,V}function f(e){let t=[];for(let n of e)t.push(new s.Z(n.text,n.backgroundColor,n.textColor,n.borderColor,n.clickAction,n.uri,n.id));return t}},1087:(e,t,n)=>{n.d(t,{Z:()=>D});var r=n(1843),i=n(5825),a=n(8376),o=n(1090),s=n(1792),c=n(4072),l=n(9179),u=n(3340),d=n(6504),f=n(4673),p=n(2730),m=n(335),h=n(4663),g=n(2246),_=n(3905),v=n(3046),y=n(4556),b=n(6870),x=n(5966),S=n(4410),C=n(3811),w=n(6616);class T{constructor(e,t,n,r){this.qt=e,this.ri=t,this.u=n,this.wt=r,this.qt=e,this.ri=t,this.u=n,this.wt=r,this._e=new h.Z,i.ZP.$t(this._e),this.Xe=1e3,this.Ye=6e4,this.Ze=null}Mi(){return this._e}_i(e){return this._e.It(e)}Pi(){return this.Ze}$i(e){this.Ze=e}q(e,t,n,r){let i=new f.Z,s;if(e instanceof a.Z)s={trigger_ids:[e.triggerId]};else{if(t===p.G.Ei||e instanceof o.Z&&t===p.G.Gi){if(!e.p(r))return m.Z.info(`This in-app message has already received a click. Ignoring analytics event.`),i}else if(t===p.G.Oi&&!e.K())return m.Z.info(`This in-app message has already received an impression. Ignoring analytics event.`),i;s=this.Xi(e)}return s==null?i:(e.messageExtras&&(s.message_extras=e.messageExtras),n!=null&&(s.bid=n),l.Z.q(t,s))}Hi(e,t){let n=new f.Z;if(!e.p())return m.Z.info(`This in-app message button has already received a click. Ignoring analytics event.`),n;let r=this.Xi(t);return r==null?n:e.id===c.Z.Ji?(m.Z.info(`This in-app message button does not have a tracking id. Not logging event to Braze servers.`),n):(e.id!=null&&(r.bid=e.id),l.Z.q(p.G.Gi,r))}Ki(e){let t=e.messageFields;return t!=null&&t.is_push_primer||!1}Li(e){if(!(e instanceof s.Z))return;let t=e=>{if(!e)return;let t=(0,v.OL)(e);return(0,v.je)(t)?(0,v.Tu)(v.yi.Qi,`In-App Message`):(0,v.zA)(t)&&!y.Z.Vi()?(0,v.Tu)(v.yi.Wi,`In-App Message`):void 0};if(this.Ki(e)&&!y.Z.Vi())return`In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.`;let n=e.buttons||[],r;for(let e of n)if(e.clickAction===s.Z.ClickAction.URI&&e.uri&&_.y9.test(e.uri)&&(r=t(e.uri),r))return r;return e.clickAction===s.Z.ClickAction.URI&&e.uri&&_.y9.test(e.uri)?t(e.uri):void 0}Yi(e,t,n,i){let a=this.qt;if(!a)return;let o=a.Zi(!1,!1),s=a.Js(o);s.template={trigger_id:e.triggerId,trigger_event_type:t},n!=null&&(s.template.data=n.Ir());let c=a.$s(s,b.Z.Ps.Mr);a.Xs(s,((a=-1)=>{if(!this.qt)return;let o=new Date().valueOf();b.Z._s(this.u,b.Z.Ps.Mr,o),a!==-1&&c.push([`X-Braze-Req-Tokens-Remaining`,a.toString()]),r.Z.Gs({url:`${this.qt.Hs()}/template/`,data:s,headers:c,L:t=>{if(b.Z.Qs(this.u,b.Z.Ps.Mr,1),!this.qt.Ks(s,t,c))return void(typeof e.Tr==`function`&&e.Tr());if(this.qt.Os(),t==null||t.templated_message==null)return;let n=t.templated_message;if(n.type!==g.Z._r.Br)return;let r=(0,u.q)(n.data);if(r==null)return;let i=this.Li(r);if(i)return m.Z.error(i),void(typeof e.Tr==`function`&&e.Tr());typeof e.Er==`function`&&e.Er(r)},error:r=>{let a=`getting user personalization for message ${e.triggerId}`;if(new Date().valueOf()-e.Gr<e.Nr){b.Z.Ys(this.u,b.Z.Ps.Mr);let r=Math.min(e.Nr,this.Ye),o=this.Xe;i??=o;let s=Math.min(r,(0,d.R)(o,3*i));a+=`. Retrying in ${s} ms`,setTimeout((()=>{this.Yi(e,t,n,s)}),s)}this.qt.Vs(r,a)}})}),b.Z.Ps.Mr)}Xi(e){if(e.triggerId==null)return m.Z.info(`The in-app message has no analytics id. Not logging event to Braze servers.`),null;let t={};return e.triggerId!=null&&(t.trigger_ids=[e.triggerId]),t}je(e){return!!this.u&&!(!(e&&e instanceof s.Z&&e.constructor!==s.Z)||e instanceof a.Z)&&this.u.k(x.I.C.Cr,e.Y())}Ue(){if(!this.u)return null;let e=this.u.j(x.I.C.Cr);if(!e)return null;let t;switch(e.type){case s.Z.qe.Or:t=S.Z.Xr(e);break;case s.Z.qe.Hr:case s.Z.qe.$e:case s.Z.qe.We:t=o.Z.Xr(e);break;case s.Z.qe.Jr:case s.Z.qe.Ve:t=C.Z.Xr(e);break;case s.Z.qe.Kr:t=w.Z.Xr(e)}return t&&this.Lr(),t}Lr(){this.u&&this.u.ti(x.I.C.Cr)}}let E={i:null,t:!1,m:()=>(E.o(),E.i||=new T(i.ZP.nr(),i.ZP.zr(),i.ZP.l(),i.ZP.er()),E.i),o:()=>{E.t||=(i.ZP.g(E),!0)},destroy:()=>{E.i=null,E.t=!1}},D=E},8376:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t){this.triggerId=e,this.messageExtras=t,this.triggerId=e,this.messageExtras=t,this.extras={},this.isControl=!0}static fromJson(e){return new r(e.trigger_id,e.message_extras)}}},4410:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(3340),i=n(1792);class a extends i.Z{constructor(e,t,n,r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k){c||=i.Z.DismissType.MANUAL,E||=i.Z.Orientation.PORTRAIT,super(e,t,void 0,n,r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T||=i.Z.CropType.CENTER_CROP,E,D,O,k),this.De=i.Z.TextAlignment.CENTER}Y(){return super.Y(a.it)}static Xr(e){return new a(e[i.Z.tt.Vr],e[i.Z.tt.Wr],e[i.Z.tt.bt],e[i.Z.tt.Yr],e[i.Z.tt.Zr],e[i.Z.tt.URI],e[i.Z.tt.ea],e[i.Z.tt.ra],e[i.Z.tt.sa],e[i.Z.tt.ta],e[i.Z.tt.ot],e[i.Z.tt.ia],e[i.Z.tt.aa],e[i.Z.tt.oa],e[i.Z.tt.pa],e[i.Z.tt.ma],e[i.Z.tt.na],e[i.Z.tt.ua],e[i.Z.tt.ca],e[i.Z.tt.fa],e[i.Z.tt.da],e[i.Z.tt.la],e[i.Z.tt.ga],(0,r.V)(e[i.Z.tt.ja]),e[i.Z.tt.xa],e[i.Z.tt.za],e[i.Z.tt.ha],e[i.Z.tt.CSS],e[i.Z.tt.va])}}a.it=i.Z.qe.Or},1090:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(1792);class i extends r.Z{constructor(e,t,n,i,a,o,s,c,l,u,d,f){super(e,void 0,void 0,t,n,void 0,void 0,void 0,i||=r.Z.DismissType.MANUAL,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,o,s,void 0,void 0,void 0,c,void 0,void 0,void 0,l,u,f),this.messageFields=d,this.messageFields=d}do(){return!1}p(e){if(this.we===r.Z.qe.Hr){if(this.vo)return!1;this.vo=!0}return this.Et.Dt(e),!0}Y(){let e=super.Y(i.it);return e[r.Z.tt.uo]=this.messageFields,e}static Xr(e){return new i(e[r.Z.tt.Vr],e[r.Z.tt.bt],e[r.Z.tt.Yr],e[r.Z.tt.ra],e[r.Z.tt.sa],e[r.Z.tt.ua],e[r.Z.tt.ca],e[r.Z.tt.ga],e[r.Z.tt.ha],e[r.Z.tt.CSS],e[r.Z.tt.uo],e[r.Z.tt.va])}}i.it=r.Z.qe.Hr},4072:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(1792),i=n(4663);class a{constructor(e,t,n,o,s,c,l){this.text=e,this.backgroundColor=t,this.textColor=n,this.borderColor=o,this.clickAction=s,this.uri=c,this.id=l,this.text=e||``,this.backgroundColor=t||r.Z.th.sh,this.textColor=n||r.Z.th.ih,this.borderColor=o||this.backgroundColor,this.clickAction=s||r.Z.ClickAction.NONE,this.uri=c,l??=a.Ji,this.id=l,this.vo=!1,this.Et=new i.Z}subscribeToClickedEvent(e){return this.Et.It(e)}removeSubscription(e){this.Et.removeSubscription(e)}removeAllSubscriptions(){this.Et.removeAllSubscriptions()}p(){return!this.vo&&(this.vo=!0,this.Et.Dt(),!0)}static fromJson(e){return new a(e.text,e.bg_color,e.text_color,e.border_color,e.click_action,e.uri,e.id)}}a.Ji=-1},1792:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(5825),i=n(3695),a=n(1507),o=n(7429),s=n(4663),c=n(7048);class l{constructor(e,t,n,r,i,a,o,c,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j){this.message=e,this.messageAlignment=t,this.slideFrom=n,this.extras=r,this.triggerId=i,this.clickAction=a,this.uri=o,this.openTarget=c,this.dismissType=u,this.duration=d,this.icon=f,this.imageUrl=p,this.imageStyle=m,this.iconColor=h,this.iconBackgroundColor=g,this.backgroundColor=_,this.textColor=v,this.closeButtonColor=y,this.animateIn=b,this.animateOut=x,this.header=S,this.headerAlignment=C,this.headerTextColor=w,this.frameColor=T,this.buttons=E,this.cropType=D,this.orientation=O,this.htmlId=k,this.css=A,this.messageExtras=j,this.message=e,this.messageAlignment=t||l.TextAlignment.CENTER,this.duration=d||5e3,this.slideFrom=n||l.SlideFrom.BOTTOM,this.extras=r||{},this.triggerId=i,this.clickAction=a||l.ClickAction.NONE,this.uri=o,this.openTarget=c||l.OpenTarget.NONE,this.dismissType=u||l.DismissType.AUTO_DISMISS,this.icon=f,this.imageUrl=p,this.imageStyle=m||l.ImageStyle.TOP,this.iconColor=h||l.th.ih,this.iconBackgroundColor=g||l.th.sh,this.backgroundColor=_||l.th.ih,this.textColor=v||l.th.hh,this.closeButtonColor=y||l.th.eh,this.animateIn=b,this.animateIn??=!0,this.animateOut=x,this.animateOut??=!0,this.header=S,this.headerAlignment=C||l.TextAlignment.CENTER,this.headerTextColor=w||l.th.hh,this.frameColor=T||l.th.Eh,this.buttons=E||[],this.cropType=D||l.CropType.FIT_CENTER,this.orientation=O,this.htmlId=k,this.css=A,this.isControl=!1,this.messageExtras=j,this.nh=!1,this.Th=!1,this.vo=!1,this.oh=!1,this.Me=null,this.ke=null,this.Et=new s.Z,this.rh=new s.Z,this.De=l.TextAlignment.CENTER}subscribeToClickedEvent(e){return this.Et.It(e)}subscribeToDismissedEvent(e){return this.rh.It(e)}removeSubscription(e){this.Et.removeSubscription(e),this.rh.removeSubscription(e)}removeAllSubscriptions(){this.Et.removeAllSubscriptions(),this.rh.removeAllSubscriptions()}closeMessage(){this.Ae(this.Me)}ze(){return!0}do(){return this.ze()}xe(){return this.htmlId!=null&&this.htmlId.length>4}Ce(){return this.xe()&&this.css!=null&&this.css.length>0}ve(){if(this.xe()&&this.Ce())return this.htmlId+`-css`}K(){return!this.Th&&(this.Th=!0,!0)}Ur(){return this.Th}p(e){return!this.vo&&(this.vo=!0,this.Et.Dt(),!0)}N(){return!this.oh&&(this.oh=!0,this.rh.Dt(),!0)}hide(e){if(e&&e.parentNode){let t=e.closest(`.ab-iam-root`);if(t??=e,this.ze()&&t.parentNode!=null){let e=t.parentNode.classList;e&&e.contains(l.lh)&&e.remove(l.lh),document.body.removeEventListener(`touchmove`,l.uh)}t.className=t.className.replace(l.ah,l.Ih)}return this.animateOut||!1}Ae(e,t){if(e==null)return;let n;this.Me=null,n=e.className.indexOf(`ab-in-app-message`)===-1?e.getElementsByClassName(`ab-in-app-message`)[0]:e;let r=!1;n&&(r=this.hide(n));let a=document.body,o;a!=null&&(o=a.scrollTop);let s=()=>{if(e&&e.parentNode){let t=e.closest(`.ab-iam-root`);t??=e,t.parentNode&&t.parentNode.removeChild(t)}let n=this.ve();if(n!=null){let e=document.getElementById(n);e&&e.parentNode&&e.parentNode.removeChild(e)}a!=null&&i.Z.browser===`Safari`&&(a.scrollTop=o),t?t():this.N()};r?setTimeout(s,l.Ah):s(),this.ke&&this.ke.focus()}Je(){return document.createTextNode(this.message||``)}Ge(e){let t=``;this.message||this.header||!this.ze()||(t=`Modal Image`),e.setAttribute(`alt`,t)}static uh(e){if(e.targetTouches&&e.targetTouches.length>1)return;let t=e.target;t&&t.classList&&t.classList.contains(`ab-message-text`)&&t.scrollHeight>t.clientHeight||document.querySelector(`.${l.lh}`)&&e.cancelable&&e.preventDefault()}Oh(e){let t=e.parentNode;this.ze()&&t!=null&&this.orientation!==l.Orientation.LANDSCAPE&&(t.classList!=null&&t.classList.add(l.lh),document.body.addEventListener(`touchmove`,l.uh,!!(0,a.QZ)()&&{passive:!1})),e.className+=` `+l.ah}static _h(e){if(e.keyCode===o.m.mh&&!r.ZP.nn(r.JY.Lh)&&document.querySelectorAll(`.ab-modal-interactions`).length>0){let e=document.getElementsByClassName(`ab-html-message`),t=!1;for(let n of e){let e=null;(0,c.f)(n)&&n.contentWindow&&(e=n.contentWindow.document.getElementsByClassName(`ab-programmatic-close-button`)[0]),e!=null&&((0,a.$j)(e),t=!0)}if(!t){let e=document.querySelectorAll(`.ab-modal-interactions > .ab-close-button`)[0];e!=null&&(0,a.$j)(e)}}}Nh(){this.nh||r.ZP.nn(r.JY.Lh)||(document.addEventListener(`keydown`,l._h,!1),r.ZP.Sh((()=>{document.removeEventListener(`keydown`,l._h)})),this.nh=!0)}Y(e){let t={};return e?(t[l.tt.Vr]=this.message,t[l.tt.Wr]=this.messageAlignment,t[l.tt.Rh]=this.slideFrom,t[l.tt.bt]=this.extras,t[l.tt.Yr]=this.triggerId,t[l.tt.Zr]=this.clickAction,t[l.tt.URI]=this.uri,t[l.tt.ea]=this.openTarget,t[l.tt.ra]=this.dismissType,t[l.tt.sa]=this.duration,t[l.tt.ta]=this.icon,t[l.tt.ot]=this.imageUrl,t[l.tt.ia]=this.imageStyle,t[l.tt.aa]=this.iconColor,t[l.tt.oa]=this.iconBackgroundColor,t[l.tt.pa]=this.backgroundColor,t[l.tt.ma]=this.textColor,t[l.tt.na]=this.closeButtonColor,t[l.tt.ua]=this.animateIn,t[l.tt.ca]=this.animateOut,t[l.tt.fa]=this.header,t[l.tt.da]=this.headerAlignment,t[l.tt.la]=this.headerTextColor,t[l.tt.ga]=this.frameColor,t[l.tt.ja]=this.buttons,t[l.tt.xa]=this.cropType,t[l.tt.za]=this.orientation,t[l.tt.ha]=this.htmlId,t[l.tt.CSS]=this.css,t[l.tt.Z]=e,t[l.tt.va]=this.messageExtras,t):t}}l.th={hh:4281545523,ih:4294967295,sh:4278219733,Mh:4293914607,Dh:4283782485,Eh:3224580915,eh:4288387995},l.Be={Ch:`hd`,Le:`ias`,dh:`of`,Uh:`do`,bh:`umt`,Ph:`tf`,ph:`te`},l.SlideFrom={TOP:`TOP`,BOTTOM:`BOTTOM`},l.ClickAction={NEWS_FEED:`NEWS_FEED`,URI:`URI`,NONE:`NONE`},l.DismissType={AUTO_DISMISS:`AUTO_DISMISS`,MANUAL:`SWIPE`},l.OpenTarget={NONE:`NONE`,BLANK:`BLANK`},l.ImageStyle={TOP:`TOP`,GRAPHIC:`GRAPHIC`},l.Orientation={PORTRAIT:`PORTRAIT`,LANDSCAPE:`LANDSCAPE`},l.TextAlignment={START:`START`,CENTER:`CENTER`,END:`END`},l.CropType={CENTER_CROP:`CENTER_CROP`,FIT_CENTER:`FIT_CENTER`},l.qe={Kr:`SLIDEUP`,Jr:`MODAL`,Ve:`MODAL_STYLED`,Or:`FULL`,Hr:`WEB_HTML`,$e:`HTML`,We:`HTML_FULL`},l.Ah=500,l.fh=200,l.ah=`ab-show`,l.Ih=`ab-hide`,l.lh=`ab-pause-scrolling`,l.tt={Vr:`m`,Wr:`ma`,Rh:`sf`,bt:`e`,Yr:`ti`,Zr:`ca`,URI:`u`,ea:`oa`,ra:`dt`,sa:`d`,ta:`i`,ot:`iu`,ia:`is`,aa:`ic`,oa:`ibc`,pa:`bc`,ma:`tc`,na:`cbc`,ua:`ai`,ca:`ao`,fa:`h`,da:`ha`,la:`htc`,ga:`fc`,ja:`b`,xa:`ct`,za:`o`,ha:`hi`,CSS:`css`,Z:`type`,uo:`messageFields`,va:`me`}},3811:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(3340),i=n(1792);class a extends i.Z{constructor(e,t,n,r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O){super(e,t,void 0,n,r,a,o,s,c||=i.Z.DismissType.MANUAL,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T||=i.Z.CropType.FIT_CENTER,void 0,E,D,O),this.De=i.Z.TextAlignment.CENTER}Y(){return super.Y(a.it)}static Xr(e){return new a(e[i.Z.tt.Vr],e[i.Z.tt.Wr],e[i.Z.tt.bt],e[i.Z.tt.Yr],e[i.Z.tt.Zr],e[i.Z.tt.URI],e[i.Z.tt.ea],e[i.Z.tt.ra],e[i.Z.tt.sa],e[i.Z.tt.ta],e[i.Z.tt.ot],e[i.Z.tt.ia],e[i.Z.tt.aa],e[i.Z.tt.oa],e[i.Z.tt.pa],e[i.Z.tt.ma],e[i.Z.tt.na],e[i.Z.tt.ua],e[i.Z.tt.ca],e[i.Z.tt.fa],e[i.Z.tt.da],e[i.Z.tt.la],e[i.Z.tt.ga],(0,r.V)(e[i.Z.tt.ja]),e[i.Z.tt.xa],e[i.Z.tt.ha],e[i.Z.tt.CSS],e[i.Z.tt.va])}}a.it=i.Z.qe.Jr},6616:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(1792),i=n(1507);class a extends r.Z{constructor(e,t,n,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S){g||=r.Z.th.Dh,h||=r.Z.th.Mh,super(e,t||=r.Z.TextAlignment.START,n,i,a,o,s,c,l,u,d,f,void 0,p,m,h,g,_,v,y,void 0,void 0,void 0,void 0,void 0,void 0,void 0,b,x,S),this.De=r.Z.TextAlignment.START}ze(){return!1}Je(){let e=document.createElement(`span`);return e.appendChild(document.createTextNode(this.message||``)),e}Oh(e){let t=e.getElementsByClassName(`ab-in-app-message`)[0];i.lP.po(t,!0,!0)||(this.slideFrom===r.Z.SlideFrom.TOP?t.style.top=`0px`:t.style.bottom=`0px`),super.Oh(e)}Y(){return super.Y(a.it)}static Xr(e){return new a(e[r.Z.tt.Vr],e[r.Z.tt.Wr],e[r.Z.tt.Rh],e[r.Z.tt.bt],e[r.Z.tt.Yr],e[r.Z.tt.Zr],e[r.Z.tt.URI],e[r.Z.tt.ea],e[r.Z.tt.ra],e[r.Z.tt.sa],e[r.Z.tt.ta],e[r.Z.tt.ot],e[r.Z.tt.aa],e[r.Z.tt.oa],e[r.Z.tt.pa],e[r.Z.tt.ma],e[r.Z.tt.na],e[r.Z.tt.ua],e[r.Z.tt.ca],e[r.Z.tt.ha],e[r.Z.tt.CSS],e[r.Z.tt.va])}}a.it=r.Z.qe.Kr},7048:(e,t,n)=>{n.d(t,{E:()=>i,f:()=>r});let r=e=>e!==null&&e.tagName===`IFRAME`;function i(e){var t;if(e.tagName===`SCRIPT`)(t=e.parentNode)==null||t.replaceChild(function(e){let t=document.createElement(`script`);t.text=e.innerHTML;for(let n of e.attributes)t.setAttribute(n.name,n.value);return t}(e),e);else for(let t of e.childNodes)i(t);return e}},4127:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var r=n(5825),i=n(2893),a=n(3552),o=n(335);let s=function(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/\-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r};var c=n(5966),l=n(7615),u=n(5319),d=n(4556),f=n(8031);class p{constructor(e,t,n,r,i,a,o,s,c,l){this.sn=e,this.rn=t,this.on=n,this.un=i,this.an=a,this.yt=o,this.cn=s,this.hn=c,this.u=l,this.sn=e,this.rn=t,this.on=n,this.fn=r+`/safari/`+t,this.un=i||`/service-worker.js`,this.an=a,this.yt=o,this.cn=s||!1,this.hn=c||!1,this.u=l,this.ln=d.Z.dn(),this.pn=d.Z.bn()}mn(){return this.hn}yn(e,t,n,r,i){e.unsubscribe().then((e=>{e?this.vn(t,n,r,i):(o.Z.error(`Failed to unsubscribe device from push.`),typeof i==`function`&&i(!1))})).catch((e=>{o.Z.error(`Push unsubscription error: `+e),typeof i==`function`&&i(!1)}))}gn(e,t,n){var r;let i=(e=>{if(typeof e==`string`)return e;if(e.endpoint.indexOf(`https://android.googleapis.com/gcm/send`)!==0)return e.endpoint;let t=e.endpoint,n=e;return n.wn&&e.endpoint.indexOf(n.wn)===-1&&(t=e.endpoint+`/`+n.wn),t})(e),a=null,s=null,c=e;if(c.getKey!=null)try{let e=Array.from(new Uint8Array(c.getKey(`p256dh`))),t=Array.from(new Uint8Array(c.getKey(`auth`)));a=btoa(String.fromCharCode.apply(null,e)),s=btoa(String.fromCharCode.apply(null,t))}catch(e){o.Z.error((0,f.e)(e))}let l=(e=>{let t;return e.options&&(t=e.options.applicationServerKey)&&t.byteLength&&t.byteLength>0?btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(t)))).replace(/\+/g,`-`).replace(/\//g,`_`):null})(c);(r=this.sn)==null||r.kn(i,t,a,s,l),i&&typeof n==`function`&&n(i,a,s)}Pn(){var e;(e=this.sn)==null||e.Dn(!0)}Sn(e,t){var n;(n=this.sn)==null||n.Dn(!1),o.Z.info(e),typeof t==`function`&&t(!1)}An(e,t,n,r){if(t.permission==="default")try{window.safari.pushNotification.requestPermission(this.fn,e,{api_key:this.rn,device_id:this.on?.ce().id||``},(t=>{t.permission===`granted`&&this.sn&&this.sn.setPushNotificationSubscriptionType(l.Z.NotificationSubscriptionTypes.OPTED_IN),this.An(e,t,n,r)}))}catch(e){this.Sn(`Could not request permission for push: `+e,r)}else t.permission===`denied`?this.Sn(`The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.`,r):t.permission===`granted`&&(o.Z.info(`Device successfully subscribed to push.`),this.gn(t.deviceToken,new Date,n))}requestPermission(e,t,n){let r=r=>{switch(r){case`granted`:typeof e==`function`&&e();return;case`default`:typeof t==`function`&&t();return;case`denied`:typeof n==`function`&&n();return;default:o.Z.error(`Received unexpected permission result `+r)}},i=!1;if(window.Notification.permission!=="default")r(Notification.permission);else{let e=window.Notification.requestPermission((e=>{i&&r(e)}));e?e.then((e=>{r(e)})):i=!0}}vn(e,t,n,r){let i={userVisibleOnly:!0};t!=null&&(i.applicationServerKey=t),e.pushManager.subscribe(i).then((e=>{o.Z.info(`Device successfully subscribed to push.`),this.gn(e,new Date,n)})).catch((e=>{d.Z.isPushBlocked()?(o.Z.info(`Permission for push notifications was denied.`),typeof r==`function`&&r(!1)):(o.Z.error(`Push subscription failed: `+e),typeof r==`function`&&r(!0))}))}jn(){return this.cn?navigator.serviceWorker.getRegistration(this.un):navigator.serviceWorker.register(this.un).then((()=>navigator.serviceWorker.ready.then((e=>(e&&typeof e.update==`function`&&e.update().catch((e=>{o.Z.info(`ServiceWorker update failed: `+e)})),e)))))}xn(e){this.cn||(e.unregister(),o.Z.info(`Service worker successfully unregistered.`))}subscribe(e,t){if(!d.Z.isPushSupported())return o.Z.info(p.Nn),void(typeof t==`function`&&t(!1));if(this.ln){if(!this.cn&&window.location!=null){let e=this.un;e.indexOf(window.location.host)===-1&&(e=window.location.host+e),e.indexOf(window.location.protocol)===-1&&(e=window.location.protocol+`//`+e);let n=e.substr(0,e.lastIndexOf(`/`)+1);if(u.SD.Un().indexOf(n)!==0)return o.Z.error(`Cannot subscribe to push from a path higher than the service worker location (tried to subscribe from `+window.location.pathname+` but service worker is at `+e+`)`),void(typeof t==`function`&&t(!0))}if(d.Z.isPushBlocked())return void this.Sn(`Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.`,t);if(this.yt&&!this.yt.Wn()&&this.yt.ii()===0)return o.Z.info(`Waiting for VAPID key from server config before subscribing to push.`),void this.yt._n((()=>{this.subscribe(e,t)}));let n=()=>{o.Z.info(`Permission for push notifications was denied.`),typeof t==`function`&&t(!1)},r=()=>{let e=`Permission for push notifications was ignored.`;d.Z.isPushBlocked()&&(e+=` The browser has automatically blocked further permission requests for a period (probably 1 week).`),o.Z.info(e),typeof t==`function`&&t(!0)},f=d.Z.isPushPermissionGranted();this.requestPermission(()=>{!f&&this.sn&&this.sn.setPushNotificationSubscriptionType(l.Z.NotificationSubscriptionTypes.OPTED_IN),this.jn().then((n=>{if(n==null)return o.Z.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to false or ensure that your service worker is registered before calling registerPush."),void(typeof t==`function`&&t(!0));n.pushManager.getSubscription().then((r=>{let l=null;if(this.yt?.Wn()!=null&&(l=s(this.yt.Wn())),r){let s,u=null,d=null;if(this.u&&(s=this.u.j(c.I.C.In)),s&&!(0,i.kJ)(s)){let e;try{e=a.Z.qn(s).Vn}catch{e=null}e==null||isNaN(e.getTime())||e.getTime()===0||(u=e,d=new Date(u),d.setMonth(u.getMonth()+6))}l!=null&&r.options&&r.options.applicationServerKey&&r.options.applicationServerKey.byteLength&&r.options.applicationServerKey.byteLength>0&&!(0,i.Xy)(l,new Uint8Array(r.options.applicationServerKey))?(r.options.applicationServerKey.byteLength>12?o.Z.info(`Device was already subscribed to push using a different VAPID provider, creating new subscription.`):o.Z.info(`Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription.`),this.yn(r,n,l,e,t)):r.expirationTime&&new Date(r.expirationTime).valueOf()<=new Date().valueOf()?(o.Z.info(`Push subscription is expired, creating new subscription.`),this.yn(r,n,l,e,t)):s&&(0,i.kJ)(s)?this.yn(r,n,l,e,t):d==null?(o.Z.info(`No push subscription creation date found, creating new subscription.`),this.yn(r,n,l,e,t)):d.valueOf()<=new Date().valueOf()?(o.Z.info(`Push subscription older than 6 months, creating new subscription.`),this.yn(r,n,l,e,t)):(o.Z.info(`Device already subscribed to push, sending existing subscription to backend.`),this.gn(r,u,e))}else this.vn(n,l,e,t)})).catch((e=>{o.Z.error(`Error checking current push subscriptions: `+e)}))})).catch((e=>{o.Z.error(`ServiceWorker registration failed: `+e)}))},r,n)}else if(this.pn){if(this.an==null||this.an===``)return o.Z.error(`You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari`),void(typeof t==`function`&&t(!0));let n=window.safari.pushNotification.permission(this.an);this.An(this.an,n,e,t)}}unsubscribe(e,t){if(!d.Z.isPushSupported())return o.Z.info(p.Nn),void(typeof t==`function`&&t());this.ln?navigator.serviceWorker.getRegistration(this.un).then((n=>{n?n.pushManager.getSubscription().then((r=>{r?(this.Pn(),r.unsubscribe().then((r=>{r?(o.Z.info(`Device successfully unsubscribed from push.`),typeof e==`function`&&e()):(o.Z.error(`Failed to unsubscribe device from push.`),typeof t==`function`&&t()),this.xn(n)})).catch((e=>{o.Z.error(`Push unsubscription error: `+e),typeof t==`function`&&t()}))):(o.Z.info(`Device already unsubscribed from push.`),typeof e==`function`&&e())})).catch((e=>{o.Z.error(`Error unsubscribing from push: `+e),typeof t==`function`&&t()})):(o.Z.info(`Device already unsubscribed from push.`),typeof e==`function`&&e())})):this.pn&&(this.Pn(),o.Z.info(`Device unsubscribed from push.`),typeof e==`function`&&e())}}p.Nn=`Push notifications are not supported in this browser.`;let m={t:!1,i:null,m:()=>(m.o(),m.i||=new p(r.ZP.pr(),r.ZP.ba(),r.ZP.te(),r.ZP.Hs(),r.ZP.nn(r.JY.wa),r.ZP.nn(r.JY.ya),r.ZP.ir(),r.ZP.nn(r.JY.Ma),r.ZP.nn(r.JY._a),r.ZP.l()),m.i),o:()=>{m.t||=(r.ZP.g(m),!0)},destroy:()=>{m.i=null,m.t=!1}},h=m},2261:(e,t,n)=>{n.r(t),n.d(t,{requestPushPermission:()=>a});var r=n(5825),i=n(4127);function a(e,t){if(r.ZP.X())return i.default.m().subscribe(((t,n,i)=>{let a=r.ZP.cr();a&&a.requestImmediateDataFlush(),typeof e==`function`&&e(t,n,i)}),t)}},7824:(e,t,n)=>{n.r(t),n.d(t,{unregisterPush:()=>a});var r=n(5825),i=n(4127);function a(e,t){if(r.ZP.X())return i.default.m().unsubscribe(e,t)}},4556:(e,t,n)=>{n.d(t,{Z:()=>i});let r={dn:()=>`serviceWorker`in navigator&&typeof ServiceWorkerRegistration<`u`&&`showNotification`in ServiceWorkerRegistration.prototype&&`PushManager`in window,bn:()=>`safari`in window&&`pushNotification`in window.safari&&typeof window.safari.pushNotification.permission==`function`&&typeof window.safari.pushNotification.requestPermission==`function`,isPushSupported:()=>r.dn()||r.bn(),isPushBlocked:()=>{let e=r.isPushSupported()&&`Notification`in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission===`denied`,t=r.isPushSupported()&&(!(`Notification`in window)||window.Notification==null);return e||t},isPushPermissionGranted:()=>r.isPushSupported()&&`Notification`in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission===`granted`,Vi:()=>!r.isPushBlocked()&&r.isPushSupported()&&!r.isPushPermissionGranted()},i=r},7615:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(2893),i=n(335),a=n(2730),o=n(3905),s=n(7671),c=n(7750);class l{constructor(e,t){this.wt=e,this.zi=t,this.wt=e,this.zi=t}getUserId(e){let t=this.wt.getUserId();if(typeof e!=`function`)return t;i.Z.warn("The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)"),e(t)}addAlias(e,t){return!(0,o.ro)(e,`add alias`,`the alias`,!1)||e.length<=0?(i.Z.error(`addAlias requires a non-empty alias`),!1):!(0,o.ro)(t,`add alias`,`the label`,!1)||t.length<=0?(i.Z.error(`addAlias requires a non-empty label`),!1):this.zi.Cn(e,t).L}setFirstName(e){return!!(0,o.ro)(e,`set first name`,`the firstName`,!0)&&this.wt.nu(`first_name`,e)}setLastName(e){return!!(0,o.ro)(e,`set last name`,`the lastName`,!0)&&this.wt.nu(`last_name`,e)}setEmail(e){return e===null||(0,o.vV)(e)?this.wt.nu(`email`,e):(i.Z.error(`Cannot set email address - "${e}" did not pass RFC-5322 validation.`),!1)}setGender(e){return typeof e==`string`&&(e=e.toLowerCase()),!(e!==null&&!(0,r.fk)(l.Genders,e,`Gender "${e}" is not a valid gender.`,`User.Genders`))&&this.wt.nu(`gender`,e)}setDateOfBirth(e,t,n){return e===null&&t===null&&n===null?this.wt.nu(`dob`,null):(e=e==null?null:parseInt(e.toString()),t=t==null?null:parseInt(t.toString()),n=n==null?null:parseInt(n.toString()),e==null||t==null||n==null||isNaN(e)||isNaN(t)||isNaN(n)||t>12||t<1||n>31||n<1?(i.Z.error(`Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);`),!1):this.wt.nu(`dob`,`${e}-${t}-${n}`))}setCountry(e){return!!(0,o.ro)(e,`set country`,`the country`,!0)&&this.wt.nu(`country`,e)}setHomeCity(e){return!!(0,o.ro)(e,`set home city`,`the homeCity`,!0)&&this.wt.nu(`home_city`,e)}setLanguage(e){return!!(0,o.ro)(e,`set language`,`the language`,!0)&&this.wt.nu(`language`,e)}setEmailNotificationSubscriptionType(e){return!!(0,r.fk)(l.NotificationSubscriptionTypes,e,`Email notification setting "${e}" is not a valid subscription type.`,`User.NotificationSubscriptionTypes`)&&this.wt.nu(`email_subscribe`,e)}setPushNotificationSubscriptionType(e){return!!(0,r.fk)(l.NotificationSubscriptionTypes,e,`Push notification setting "${e}" is not a valid subscription type.`,`User.NotificationSubscriptionTypes`)&&this.wt.nu(`push_subscribe`,e)}setPhoneNumber(e){return!!(0,o.ro)(e,`set phone number`,`the phoneNumber`,!0)&&(e===null||e.match(l.En)?this.wt.nu(`phone`,e):(i.Z.error(`Cannot set phone number - "${e}" did not pass validation.`),!1))}setLastKnownLocation(e,t,n,r,a){return e==null||t==null?(i.Z.error(`Cannot set last-known location - latitude and longitude are required.`),!1):(e=parseFloat(e.toString()),t=parseFloat(t.toString()),n!=null&&(n=parseFloat(n.toString())),r!=null&&(r=parseFloat(r.toString())),a!=null&&(a=parseFloat(a.toString())),isNaN(e)||isNaN(t)||n!=null&&isNaN(n)||r!=null&&isNaN(r)||a!=null&&isNaN(a)?(i.Z.error(`Cannot set last-known location - all supplied parameters must be numeric.`),!1):e>90||e<-90||t>180||t<-180?(i.Z.error(`Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively.`),!1):n!=null&&n<0||a!=null&&a<0?(i.Z.error(`Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.`),!1):this.zi.setLastKnownLocation(this.wt.getUserId(),e,t,r,n,a).L)}setCustomUserAttribute(e,t,n){if(!(0,o.bj)(e))return!1;let i=t=>{let[n]=(0,o.lg)(t,s.db,`attribute value`,`set custom user attribute "${e}"`,`custom user attribute`);return n};if((0,r.kJ)(t)){let[n,r]=(0,o.$g)(e,t);if(!n&&!r&&t.length!==0)return!1;if(n||t.length===0)return this.zi.Fn(a.G.$n,e,t).L;for(let e of t)if(!i(e))return!1}else if((0,r.Kn)(t)){if(!i(t))return!1;if(n)return this.zi.Fn(a.G.Bn,e,t).L}else if(t===void 0||!(0,o.UO)(t)||((0,r.J_)(t)&&(t=(0,c.BT)(t)),typeof t==`string`&&!(0,o.zM)(t,`set custom user attribute "${e}"`,`the element in the given array`)))return!1;return this.wt.setCustomUserAttribute(e,t)}addToCustomAttributeArray(e,t){return!!(0,o.zM)(e,`add to custom user attribute array`,`the given key`)&&!(t!=null&&!(0,o.zM)(t,`add to custom user attribute array`,`the given value`))&&this.zi.Fn(a.G.Ln,e,t).L}removeFromCustomAttributeArray(e,t){return!!(0,o.zM)(e,`remove from custom user attribute array`,`the given key`)&&!(t!=null&&!(0,o.zM)(t,`remove from custom user attribute array`,`the given value`))&&this.zi.Fn(a.G.Rn,e,t).L}incrementCustomUserAttribute(e,t){if(!(0,o.zM)(e,`increment custom user attribute`,`the given key`))return!1;t??=1;let n=parseInt(t.toString());return isNaN(n)||n!==parseFloat(t.toString())?(i.Z.error(`Cannot increment custom user attribute because the given incrementValue "${t}" is not an integer.`),!1):this.zi.Fn(a.G.On,e,n).L}setCustomLocationAttribute(e,t,n){return!!(0,o.zM)(e,`set custom location attribute`,`the given key`)&&((t!==null||n!==null)&&(t=t==null?null:parseFloat(t.toString()),n=n==null?null:parseFloat(n.toString()),t==null&&n!=null||t!=null&&n==null||t!=null&&(isNaN(t)||t>90||t<-90)||n!=null&&(isNaN(n)||n>180||n<-180))?(i.Z.error(`Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal.`),!1):this.zi.Gn(e,t,n).L)}addToSubscriptionGroup(e){return!(0,o.ro)(e,`add user to subscription group`,`subscription group ID`,!1)||e.length<=0?(i.Z.error(`addToSubscriptionGroup requires a non-empty subscription group ID`),!1):this.zi.Hn(e,l.Kn.SUBSCRIBED).L}removeFromSubscriptionGroup(e){return!(0,o.ro)(e,`remove user from subscription group`,`subscription group ID`,!1)||e.length<=0?(i.Z.error(`removeFromSubscriptionGroup requires a non-empty subscription group ID`),!1):this.zi.Hn(e,l.Kn.UNSUBSCRIBED).L}kn(e,t,n,r,i){this.wt.kn(e,t,n,r,i),this.zi.Mn()}Dn(e){this.wt.Dn(e)}}l.Genders={MALE:`m`,FEMALE:`f`,OTHER:`o`,UNKNOWN:`u`,NOT_APPLICABLE:`n`,PREFER_NOT_TO_SAY:`p`},l.NotificationSubscriptionTypes={OPTED_IN:`opted_in`,SUBSCRIBED:`subscribed`,UNSUBSCRIBED:`unsubscribed`},l.En=/^[0-9 .\\(\\)\\+\\-]+$/,l.Kn={SUBSCRIBED:`subscribed`,UNSUBSCRIBED:`unsubscribed`},l.Yn=`user_id`,l.lu=`custom`,l.lr=997},67:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(335),i=n(5563);class a{constructor(e,t){this.cards=e,this.lastUpdated=t,this.cards=e,this.lastUpdated=t}getUnreadCardCount(){let e=0;for(let t of this.cards)t.viewed||t instanceof i.Z||e++;return e}dr(){r.Z.error(`Must be implemented in a subclass`)}logCardImpressions(e){r.Z.error(`Must be implemented in a subclass`)}logCardClick(e){r.Z.error(`Must be implemented in a subclass`)}sr(){r.Z.error(`Must be implemented in a subclass`)}}a.ur=6e4,a.Ah=500,a.Co=1e4},158:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){}Ns(e){}changeUser(e=!1){}clearData(e=!1){}}},7671:(e,t,n)=>{n.d(t,{De:()=>i,Fz:()=>r,Go:()=>l,S6:()=>m,Tt:()=>p,U4:()=>a,Up:()=>u,Y$:()=>d,_P:()=>s,dH:()=>f,db:()=>c,rF:()=>o});let r=100,i=`inAppMessage must be an InAppMessage object`,a=`must be a Card object`,o=500,s=`logCustomEvent`,c=`setCustomUserAttribute`,l=`Braze must be initialized before calling methods.`,u=30,d=30,f=72e5,p=3,m=1},9179:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(335),i=n(5825),a=n(7559),o=n(4673);let s={q:(e,t,n)=>{let s=new o.Z,c=i.ZP.zr();if(!c)return r.Z.info(`Not logging event with type "${e}" because the current session ID could not be found.`),s;let l=c.wo();return s.ge.push(new a.Z(n||i.ZP.er()?.getUserId(),e,new Date().valueOf(),l,t)),s.L=i.ZP.l()?.xo(s.ge)||!1,s}}},1311:(e,t,n)=>{n.d(t,{cP:()=>b,tQ:()=>S,cz:()=>w,Yz:()=>E,cV:()=>T,GB:()=>O,Of:()=>D});var r=n(67),i=n(5608),a=n(1507),o=n(5563),s=n(2857),c=n(2893),l=n(7429),u=n(5825),d=n(3695),f=n(335);let p={en:{NO_CARDS_MESSAGE:`We have no updates for you at this time.<br/>Please check again later.`,FEED_TIMEOUT_MESSAGE:`Sorry, this refresh timed out.<br/>Please try again later.`},ar:{NO_CARDS_MESSAGE:`ليس لدينا أي تحديث. يرجى التحقق مرة أخرى لاحقاً`,FEED_TIMEOUT_MESSAGE:`يرجى تكرار المحاولة لاحقا`},cs:{NO_CARDS_MESSAGE:`V tuto chvíli pro vás nemáme žádné aktualizace.<br/>Zkontrolujte prosím znovu později.`,FEED_TIMEOUT_MESSAGE:`Prosím zkuste to znovu později.`},da:{NO_CARDS_MESSAGE:`Vi har ingen updates.<br/>Prøv venligst senere.`,FEED_TIMEOUT_MESSAGE:`Prøv venligst senere.`},de:{NO_CARDS_MESSAGE:`Derzeit sind keine Updates verfügbar.<br/>Bitte später noch einmal versuchen.`,FEED_TIMEOUT_MESSAGE:`Bitte später noch einmal versuchen.`},es:{NO_CARDS_MESSAGE:`No tenemos actualizaciones.<br/>Por favor compruébelo más tarde.`,FEED_TIMEOUT_MESSAGE:`Por favor inténtelo más tarde.`},"es-mx":{NO_CARDS_MESSAGE:`No tenemos ninguna actualización.<br/>Vuelva a verificar más tarde.`,FEED_TIMEOUT_MESSAGE:`Por favor, vuelva a intentarlo más tarde.`},et:{NO_CARDS_MESSAGE:`Uuendusi pole praegu saadaval.<br/>Proovige hiljem uuesti.`,FEED_TIMEOUT_MESSAGE:`Palun proovige hiljem uuesti.`},fi:{NO_CARDS_MESSAGE:`Päivityksiä ei ole saatavilla.<br/>Tarkista myöhemmin uudelleen.`,FEED_TIMEOUT_MESSAGE:`Yritä myöhemmin uudelleen.`},fr:{NO_CARDS_MESSAGE:`Aucune mise à jour disponible.<br/>Veuillez vérifier ultérieurement.`,FEED_TIMEOUT_MESSAGE:`Veuillez réessayer ultérieurement.`},he:{NO_CARDS_MESSAGE:`.אין לנו עדכונים. בבקשה בדוק שוב בקרוב`,FEED_TIMEOUT_MESSAGE:`.בבקשה נסה שוב בקרוב`},hi:{NO_CARDS_MESSAGE:`हमारे पास कोई अपडेट नहीं हैं। कृपया बाद में फिर से जाँच करें.।`,FEED_TIMEOUT_MESSAGE:`कृपया बाद में दोबारा प्रयास करें।.`},id:{NO_CARDS_MESSAGE:`Kami tidak memiliki pembaruan. Coba lagi nanti.`,FEED_TIMEOUT_MESSAGE:`Coba lagi nanti.`},it:{NO_CARDS_MESSAGE:`Non ci sono aggiornamenti.<br/>Ricontrollare più tardi.`,FEED_TIMEOUT_MESSAGE:`Riprovare più tardi.`},ja:{NO_CARDS_MESSAGE:`アップデートはありません。<br/>後でもう一度確認してください。`,FEED_TIMEOUT_MESSAGE:`後でもう一度試してください。`},ko:{NO_CARDS_MESSAGE:`업데이트가 없습니다. 다음에 다시 확인해 주십시오.`,FEED_TIMEOUT_MESSAGE:`나중에 다시 시도해 주십시오.`},ms:{NO_CARDS_MESSAGE:`Tiada kemas kini. Sila periksa kemudian.`,FEED_TIMEOUT_MESSAGE:`Sila cuba kemudian.`},nl:{NO_CARDS_MESSAGE:`Er zijn geen updates.<br/>Probeer het later opnieuw.`,FEED_TIMEOUT_MESSAGE:`Probeer het later opnieuw.`},no:{NO_CARDS_MESSAGE:`Vi har ingen oppdateringer.<br/>Vennligst sjekk igjen senere.`,FEED_TIMEOUT_MESSAGE:`Vennligst prøv igjen senere.`},pl:{NO_CARDS_MESSAGE:`Brak aktualizacji.<br/>Proszę sprawdzić ponownie później.`,FEED_TIMEOUT_MESSAGE:`Proszę spróbować ponownie później.`},pt:{NO_CARDS_MESSAGE:`Não temos atualizações.<br/>Por favor, verifique mais tarde.`,FEED_TIMEOUT_MESSAGE:`Por favor, tente mais tarde.`},"pt-br":{NO_CARDS_MESSAGE:`Não temos nenhuma atualização.<br/>Verifique novamente mais tarde.`,FEED_TIMEOUT_MESSAGE:`Tente novamente mais tarde.`},ru:{NO_CARDS_MESSAGE:`Обновления недоступны.<br/>Пожалуйста, проверьте снова позже.`,FEED_TIMEOUT_MESSAGE:`Пожалуйста, повторите попытку позже.`},sv:{NO_CARDS_MESSAGE:`Det finns inga uppdateringar.<br/>Försök igen senare.`,FEED_TIMEOUT_MESSAGE:`Försök igen senare.`},th:{NO_CARDS_MESSAGE:`เราไม่มีการอัพเดต กรุณาตรวจสอบภายหลัง.`,FEED_TIMEOUT_MESSAGE:`กรุณาลองใหม่ภายหลัง.`},uk:{NO_CARDS_MESSAGE:`Оновлення недоступні.<br/>ласка, перевірте знову пізніше.`,FEED_TIMEOUT_MESSAGE:`Будь ласка, спробуйте ще раз пізніше.`},vi:{NO_CARDS_MESSAGE:`Chúng tôi không có cập nhật nào.<br/>Vui lòng kiểm tra lại sau.`,FEED_TIMEOUT_MESSAGE:`Vui lòng thử lại sau.`},"zh-hk":{NO_CARDS_MESSAGE:`暫時沒有更新.<br/>請稍候再試.`,FEED_TIMEOUT_MESSAGE:`請稍候再試.`},"zh-hans":{NO_CARDS_MESSAGE:`暂时没有更新.<br/>请稍后再试.`,FEED_TIMEOUT_MESSAGE:`请稍候再试.`},"zh-hant":{NO_CARDS_MESSAGE:`暫時沒有更新.<br/>請稍候再試.`,FEED_TIMEOUT_MESSAGE:`請稍候再試.`},"zh-tw":{NO_CARDS_MESSAGE:`暫時沒有更新.<br/>請稍候再試.`,FEED_TIMEOUT_MESSAGE:`請稍候再試.`},zh:{NO_CARDS_MESSAGE:`暂时没有更新.<br/>请稍后再试.`,FEED_TIMEOUT_MESSAGE:`请稍候再试.`}};class m{constructor(e,t=!1){if(this.language=e,e!=null&&(e=e.toLowerCase()),e!=null&&p[e]==null){let t=e.indexOf(`-`);t>0&&(e=e.substring(0,t))}if(p[e]==null){let n=`Braze does not yet have a localization for language `+e+`, defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.`;t?f.Z.error(n):f.Z.info(n),e=`en`}this.language=e}get(e){return p[this.language][e]}}let h={t:!1,i:null,m:()=>{if(h.o(),!h.i){let e=d.Z.language,t=!1;u.ZP.nn(u.JY.zn)&&(e=u.ZP.nn(u.JY.zn),t=!0),h.i=new m(e,t)}return h.i},o:()=>{h.t||=(u.ZP.g(h),!0)},destroy:()=>{h.i=null,h.t=!1}},g=h;var _=n(7070),v=n(3905),y=n(3046);let b=`data-last-requested-refresh`,x={};function S(e){e&&(e.className=e.className.replace(`ab-show`,`ab-hide`),setTimeout((()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),r.Z.Ah));let t=e.getAttribute(`data-update-subscription-id`);var n;t!=null&&(n=t,u.ZP.X()&&u.ZP.removeSubscription(n));let i=e.getAttribute(`data-listener-id`);i!=null&&(window.removeEventListener(`scroll`,x[i]),delete x[i])}function C(e,t){let n=document.createElement(`div`);if(n.className=`ab-feed-body`,n.setAttribute(`aria-label`,`Feed`),n.setAttribute(`role`,`feed`),e.lastUpdated==null){let e=document.createElement(`div`);e.className=`ab-no-cards-message`;let t=document.createElement(`i`);t.className=`fa fa-spinner fa-spin fa-4x ab-initial-spinner`,e.appendChild(t),n.appendChild(e)}else{let r=!1,a=t=>e.logCardClick(t);for(let s of e.cards){let c=s instanceof o.Z;!c||e.dr()?(n.appendChild((0,i.Dj)(s,a,t)),r||=!c):f.Z.error(`Received a control card for a legacy news feed. Control cards are only supported with content cards.`)}if(!r){let e=document.createElement(`div`);e.className=`ab-no-cards-message`,e.innerHTML=g.m().get(`NO_CARDS_MESSAGE`)||``,e.setAttribute(`role`,`article`),n.appendChild(e)}}return n}function w(e,t){if(e!=null&&t!=null){let n=[],r=t.querySelectorAll(`.ab-card`);e.yo||={};for(let t=0;t<r.length;t++){let o=(0,i.sv)(r[t]),s=(0,a.rJ)(r[t]),c=(0,a.Fr)(r[t]);if(e.yo[o]){s||c||(0,i.pq)(r[t]);continue}let l=(0,i.ql)(r[t]),u=(0,i.rW)(r[t]),d=l,f=u;if(!l&&s&&(l=!0,(0,i.Ji)(r[t])),!u&&c&&(u=!0,(0,i.Zw)(r[t])),l&&u){if(d&&f)continue;for(let t of e.cards)if(t.id===o){e.yo[t.id]=!0,n.push(t);break}}}n.length>0&&e.logCardImpressions(n)}}function T(e,t){if(e==null||t==null)return;t.setAttribute(`aria-busy`,`true`);let n=t.querySelectorAll(`.ab-refresh-button`)[0];n!=null&&(n.className+=` fa-spin`);let i=new Date().valueOf().toString();t.setAttribute(`data-last-requested-refresh`,i),setTimeout((()=>{if(t.getAttribute(`data-last-requested-refresh`)===i){let e=t.querySelectorAll(`.fa-spin`);for(let t=0;t<e.length;t++)e[t].className=e[t].className.replace(/fa-spin/g,``);let n=t.querySelectorAll(`.ab-initial-spinner`)[0];if(n!=null){let e=document.createElement(`span`);e.innerHTML=g.m().get(`FEED_TIMEOUT_MESSAGE`)||``,n.parentNode!=null&&(n.parentNode.appendChild(e),n.parentNode.removeChild(n))}t.getAttribute(`aria-busy`)===`true`&&t.setAttribute(`aria-busy`,`false`)}}),r.Z.Co),e.sr()}function E(e,t,n){let r=document.createElement(`div`);r.className=`ab-feed ab-hide ab-effect-slide`,r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-label`,`Feed`),r.setAttribute(`tabindex`,`-1`);let i=document.createElement(`div`);i.className=`ab-feed-buttons-wrapper`,i.setAttribute(`role`,`group`),r.appendChild(i);let a=document.createElement(`i`);a.className=`fa fa-times ab-close-button`,a.setAttribute(`aria-label`,`Close Feed`),a.setAttribute(`tabindex`,`0`),a.setAttribute(`role`,`button`);let o=e=>{S(r),e.stopPropagation()};a.addEventListener(`keydown`,(e=>{e.keyCode!==l.m.Fo&&e.keyCode!==l.m.To||o(e)})),a.onclick=o;let s=document.createElement(`i`);s.className=`fa fa-refresh ab-refresh-button`,e&&e.lastUpdated==null&&(s.className+=` fa-spin`),s.setAttribute(`aria-label`,`Refresh Feed`),s.setAttribute(`tabindex`,`0`),s.setAttribute(`role`,`button`);let c=t=>{T(e,r),t.stopPropagation()};s.addEventListener(`keydown`,(e=>{e.keyCode!==l.m.Fo&&e.keyCode!==l.m.To||c(e)})),s.onclick=c,i.appendChild(s),i.appendChild(a),r.appendChild(C(e,t));let u=()=>w(e,r);if(r.addEventListener(`scroll`,u),!n){window.addEventListener(`scroll`,u);let e=_.Z.W();x[e]=u,r.setAttribute(`data-listener-id`,e)}return r}function D(e,t,n,r,i){if(!(0,c.kJ)(t))return;let a=[];for(let e of t)if(e instanceof s.Z){if(e.url&&v.y9.test(e.url)){let t=(0,y.OL)(e.url);if((0,y.je)(t)){f.Z.error((0,y.Tu)(y.yi.Qi,`Content Card`));continue}}a.push(e)}if(e.cards=a,e.lastUpdated=n,r!=null)if(r.setAttribute(`aria-busy`,`false`),e.lastUpdated==null)S(r);else{let t=r.querySelectorAll(`.ab-feed-body`)[0];if(t!=null){let n=C(e,i);t.parentNode&&t.parentNode.replaceChild(n,t),w(e,n.parentNode)}}}function O(e,t){e&&t.setAttribute(`data-update-subscription-id`,e)}},5825:(e,t,n)=>{n.d(t,{JY:()=>U,ZP:()=>te});var r=n(5966),i=n(4663),a=n(5522),o=n(335);class s{constructor(e,t,n){this.u=e,this.Jn=t,this.Qn=n,this.u=e,this.Jn=t||!1,this.Qn=n,this.Xn=new i.Z,this.Zn=0,this.gh=1}Fh(){return this.Jn}kh(){return this.u.j(r.I.C.wh)}setSdkAuthenticationSignature(e){let t=this.kh();this.u.k(r.I.C.wh,e);let n=a.Z.Yt.Qt;new a.Z(n,o.Z).setItem(n.ss.jh,this.gh,e),t!==e&&this.Os()}xh(){this.u.ti(r.I.C.wh);let e=a.Z.Yt.Qt;new a.Z(e,o.Z).re(e.ss.jh,this.gh)}subscribeToSdkAuthenticationFailures(e){return this.Qn.It(e)}qh(e){this.Qn.Dt(e)}yh(){this.Xn.removeAllSubscriptions()}Bh(){this.Zn+=1}Gh(){return this.Zn}Os(){this.Zn=0}}var c=n(158),l=n(3695);class u{constructor(e){this.id=e,this.id=e}Ir(){let e={};return this.browser!=null&&(e.browser=this.browser),this.Ia!=null&&(e.browser_version=this.Ia),this.os!=null&&(e.os_version=this.os),this.resolution!=null&&(e.resolution=this.resolution),this.language!=null&&(e.locale=this.language),this.timeZone!=null&&(e.time_zone=this.timeZone),this.userAgent!=null&&(e.user_agent=this.userAgent),e}}let d={BROWSER:`browser`,BROWSER_VERSION:`browserVersion`,OS:`os`,RESOLUTION:`resolution`,LANGUAGE:`language`,TIME_ZONE:`timeZone`,USER_AGENT:`userAgent`};var f=n(2308),p=n(7070),m=n(2893),h=n(8031);class g{constructor(e,t){this.u=e,this.ka=t,this.u=e,t??=(0,m.VO)(d),this.ka=t}ce(e=!0){let t=this.u.tu(r.I.iu.Uo);t??(t=new f.Z(p.Z.W()),e&&this.u.uu(r.I.iu.Uo,t));let n=new u(t.eu);for(let e=0;e<this.ka.length;e++)switch(this.ka[e]){case d.BROWSER:n.browser=l.Z.browser;break;case d.BROWSER_VERSION:n.Ia=l.Z.version;break;case d.OS:n.os=this.Ta();break;case d.RESOLUTION:n.Da=screen.width+`x`+screen.height;break;case d.LANGUAGE:n.language=l.Z.language;break;case d.TIME_ZONE:n.timeZone=this.Sa(new Date);break;case d.USER_AGENT:n.userAgent=l.Z.userAgent}return n}Ta(){if(l.Z.Oa())return l.Z.Oa();let e=this.u.j(r.I.C.Ca);return e&&e.os_version?e.os_version:l.Z.Ta()}Sa(e){let t=!1;if(typeof Intl<`u`&&typeof Intl.DateTimeFormat==`function`)try{if(typeof Intl.DateTimeFormat().resolvedOptions==`function`){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e!=null&&e!==``)return e}}catch(e){o.Z.info(`Intl.DateTimeFormat threw an error, cannot detect user's time zone:`+(0,h.e)(e)),t=!0}if(t)return``;let n=e.getTimezoneOffset();return this.Fa(n)}Fa(e){let t=Math.trunc(e/60),n=Math.trunc(e%60),r=`GMT`;return e!==0&&(r+=e<0?`+`:`-`,r+=(`00`+Math.abs(t)).slice(-2)+`:`+(`00`+Math.abs(n)).slice(-2)),r}}var _=n(3826),v=n(7559),y=n(7750),b=n(9179),x=n(2730),S=n(6870),C=n(7671),w=n(8982);class T{constructor(e,t,n,r,i,a,o,s,c,l,u,d){this.on=e,this.u=t,this.zo=n,this.wt=r,this.ri=i,this.yt=a,this.rn=o,this.Go=s,this.Wo=c,this.Vo=l,this.appVersion=u,this.Xh=d,this.$h=e=>e==null?``:`${e} `,this.on=e,this.u=t,this.zo=n,this.wt=r,this.ri=i,this.yt=a,this.rn=o,this.Go=s,this.Wo=c,this.Vo=l,this.appVersion=u,this.Xh=d,this.Hh=[`npm`]}Js(e,t=!1,n=!1){let i=this.on.ce(!n),a=i.Ir(),o=this.u.j(r.I.C.Ca);(0,m.Xy)(o,a)||(e.device=a),e.api_key=this.rn,e.time=(0,y.FX)(new Date().valueOf(),!0);let s=this.u.j(r.I.C.Yh)||[],c=this.u.j(r.I.C.Jh)||``;if(this.Hh.length>0&&(!(0,m.Xy)(s,this.Hh)||c!==this.ri.Si())&&(e.sdk_metadata=this.Hh),e.sdk_version=this.Wo,this.Vo&&(e.sdk_flavor=this.Vo),e.app_version=this.appVersion,e.app_version_code=this.Xh,e.device_id=i.id,t){let t=this.wt.getUserId();t!=null&&(e.user_id=t)}if(!e.user_id&&!this.zo.Fh()){let t=(0,w.q)(this.u);t&&(e.alias=t)}return e}Ks(e,t,n){let r=t.auth_error,i=t.error;if(!r&&!i)return!0;if(r){let t;this.zo.Bh();let i={errorCode:r.error_code};for(let e of n)(0,m.kJ)(e)&&e[0]===`X-Braze-Auth-Signature`&&(i.signature=e[1]);e.respond_with&&e.respond_with.user_id?i.userId=e.respond_with.user_id:e.user_id&&(i.userId=e.user_id);let a=r.reason;return a?(i.reason=a,t=`due to ${a}`):t=`with error code ${r.error_code}.`,this.zo.Fh()||(t+=` Please use the "enableSdkAuthentication" initialization option to enable authentication.`),o.Z.error(`SDK Authentication failed ${t}`),this.Qh(e.events||[],e.attributes||[]),this.zo.qh(i),!1}if(i){let n,r=i;switch(r){case _.Z.Zh:return n=`Received successful response with empty body.`,b.Z.q(x.G.qs,{e:n}),o.Z.info(n),!1;case _.Z.Ra:return n=`Received successful response with invalid JSON`,b.Z.q(x.G.qs,{e:n+`: `+t.response}),o.Z.info(n),!1;case _.Z.qa:r=`The API key "${e.api_key}" is invalid for the baseUrl ${this.Go}`;break;case _.Z.Aa:r=`Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.`;break;case _.Z.Ba:r=`No device identifier. Please contact support@braze.com`}o.Z.error(`Backend error: `+r)}return!1}Na(e,t,n,r){return!!(e&&e.length!==0||t&&t.length!==0||n||r)}Xa(e,t,n,r,i=!1){let a=[],o=e=>e||``,s=o(this.wt.getUserId()),c=this.Zi(e,t),l=[],u=[],d,f=null;if(n.length>0){let e=[];for(let t of n){if(d=t.Ir(),this.zo.Fh()){if(s&&!d.user_id){f||={},f.events||=[],f.events.push(d);continue}if(o(d.user_id)!==s){u.push(d);continue}}e.push(d)}e.length>0&&(c.events=e)}if(r.length>0){let e=[];for(let t of r)t&&(this.zo.Fh()&&o(t.user_id)!==s?l.push(t):e.push(t));e.length>0&&(c.attributes=e)}if(this.Qh(u,l),c=this.Js(c,!0,i),f){f=this.Js(f,!1,i);let e={requestData:f,headers:this.$s(f,S.Z.Ps.$a)};a.push(e)}if(c&&!this.Na(c.events,c.attributes,e,t))return f?a:null;let p={requestData:c,headers:this.$s(c,S.Z.Ps.$a)};return a.push(p),a}Qh(e,t){if(e){let t=[];for(let n of e){let e=v.Z.fromJson(n);e.time=(0,y.Pn)(e.time),t.push(e)}this.u.xo(t)}if(t)for(let e of t)this.u.La(e)}Vs(e,t){let n=`HTTP error `;e!=null&&(n+=e+` `),n+=t,o.Z.error(n)}qr(e){return b.Z.q(x.G.Ea,{n:e})}Zi(e,t,n){let r={};e&&(r.feed=!0),t&&(r.triggers=!0);let i=n??this.wt.getUserId();if(i&&(r.user_id=i),!r.user_id&&!this.zo.Fh()){let e=(0,w.q)(this.u);e&&(r.alias=e)}return r.config={config_time:this.yt.ii()},{respond_with:r}}Ka(e){let t=new Date().valueOf(),n=C.dH.toString(),r=S.Z.Pa(this.u,e);return r!==-1&&(n=(t-r).toString()),n}$s(e,t,n=!1){let i=[[`X-Braze-Api-Key`,this.rn]],a=this.Ka(t);i.push([`X-Braze-Last-Req-Ms-Ago`,a]);let o=S.Z.Ua(this.u,t).toString();i.push([`X-Braze-Req-Attempt`,o]);let s=!1;if(e.respond_with!=null&&e.respond_with.triggers&&(i.push([`X-Braze-TriggersRequest`,`true`]),s=!0),e.respond_with!=null&&e.respond_with.feed&&(i.push([`X-Braze-FeedRequest`,`true`]),s=!0),t===S.Z.Ps.Bs){i.push([`X-Braze-ContentCardsRequest`,`true`]);let e=this.u.j(r.I.C.As);e&&n||(e=0,this.u.k(r.I.C.As,e)),i.push([`BRAZE-SYNC-RETRY-COUNT`,e.toString()]),s=!0}if(t===S.Z.Ps.bi&&(i.push([`X-Braze-FeatureFlagsRequest`,`true`]),s=!0),s&&i.push([`X-Braze-DataRequest`,`true`]),this.zo.Fh()){let e=this.zo.kh();e!=null&&i.push([`X-Braze-Auth-Signature`,e])}return i}Ga(e,t,n,r){window.setTimeout((()=>{o.Z.info(`Retrying rate limited ${this.$h(r)}SDK request.`),this.Xs(t,n,r)}),e)}Xs(e,t,n,i){if(!this.Ha(n))return o.Z.info(`${this.$h(n)}SDK request being rate limited.`),void(typeof i==`function`&&i());let a=this.Wa();if(!a.Ya)return o.Z.info(`${this.$h(n)}SDK request being rate limited. Request will be retried in ${Math.trunc(a.Ja/1e3)} seconds.`),void this.Ga(a.Ja,e,t,n);this.u.k(r.I.C.Qa,new Date().valueOf());let s=e.device;s&&s.os_version instanceof Promise?s.os_version.then((n=>{e.device.os_version=n,t(a.Va)})):t(a.Va)}Za(e){var t;(t=this.u)==null||t.k(r.I.C.au,e)}du(e,t){let n=this.fu();n??={},n[e]=t,this.u.k(r.I.C.vu,n)}Ru(){return this.u?.j(r.I.C.au)}fu(){return this.u?.j(r.I.C.vu)}gu(e,t,n,r,i=``){let a;if(i){let e=this.fu();a=e==null||isNaN(e[i])?t:e[i]}else a=this.Ru(),(a==null||isNaN(a))&&(a=t);let o=(e-r)/1e3;return a=Math.min(a+o/n,t),a}pu(e,t){return Math.max(0,(1-e)*t*1e3)}bu(e,t=``){let n={Ya:!0,Va:-1,Ja:0};if(e??=!0,!e&&!t)return n;let i,a,o=null;if(e)o=this.u?.j(r.I.C.Qa);else{let e=S.Z.qu(this.u);if(e==null||e[t]==null)return n;o=e[t]}if(o==null||isNaN(o)||(e?(i=this.yt?.Au()||-1,a=this.yt?.Du()||-1):(i=this.yt?.Tu(t)||-1,a=this.yt?.ku(t)||-1),i===-1||a===-1))return n;let s=new Date().valueOf(),c=this.gu(s,i,a,o,t);return c<1?(n.Ya=!1,n.Ja=this.pu(c,a),n):(c=Math.trunc(c)-1,n.Va=c,e?this.Za(c):this.du(t,c),n)}Wa(){return this.bu(!0)}Ha(e){let t=this.bu(!1,e);return!(t&&!t.Ya)}Os(){this.zo.Os()}Hs(){return this.Go}addSdkMetadata(e){for(let t of e)this.Hh.indexOf(t)===-1&&this.Hh.push(t)}}var E=n(1843),D=n(6504),O=n(4673),k=n(4556);class A{constructor(e,t,n,r,a,o,s,c,l,u){this.rn=e,this.baseUrl=t,this.ri=n,this.on=r,this.wt=a,this.yt=o,this.u=s,this.wu=c,this.zo=l,this.qt=u,this.rn=e,this.baseUrl=t,this.yu=0,this.fE=s.dE()||0,this.ju=null,this.ri=n,this.on=r,this.wt=a,this.yt=o,this.u=s,this.zo=l,this.qt=u,this.wu=c,this.Su=new i.Z,this.$u=null,this.Cu=50,this.Fu=!1}Lu(e,t){return!e&&!t&&this.zo.Gh()>=this.Cu}Mu(e){let t=this.ri.Gl();if(e.length>0){let n=this.wt.getUserId();for(let r of e){let e=!r.userId&&!n||r.userId===n;r.type===x.G.ql&&e&&(t=!0)}}return t}Pu(e=!1,t=!1,n=!0,i,a,s,c=!1,l=!1){n&&this.xu();let u=this.u.AE(),d=this.u.OE(),f=!1,p=(e,t,o=-1)=>{let c=!1,l=new Date().valueOf();S.Z._s(this.u,S.Z.Ps.$a,l),o!==-1&&t.push([`X-Braze-Req-Tokens-Remaining`,o.toString()]),E.Z.Gs({url:this.baseUrl+`/data/`,data:e,headers:t,L:n=>{e.respond_with!=null&&e.respond_with.triggers&&(this.yu=Math.max(this.yu-1,0)),this.qt.Ks(e,n,t)?(this.zo.Os(),this.yt.al(n),e.respond_with!=null&&e.respond_with.user_id!=this.wt.getUserId()||(e.device!=null&&this.u.k(r.I.C.Ca,e.device),e.sdk_metadata!=null&&(this.u.k(r.I.C.Yh,e.sdk_metadata),this.u.k(r.I.C.Jh,this.ri.Si())),this.wu(n),S.Z.Qs(this.u,S.Z.Ps.$a,1),typeof i==`function`&&i())):n.auth_error&&(c=!0)},error:()=>{e.respond_with!=null&&e.respond_with.triggers&&(this.yu=Math.max(this.yu-1,0)),this.qt.Qh(e.events,e.attributes),typeof a==`function`&&a()},Ws:e=>{if(typeof s==`function`&&s(e),n&&!f){if(e&&!c)this.Iu();else{S.Z.Ys(this.u,S.Z.Ps.$a);let e=this.ju;(e==null||e<1e3*this.fE)&&(e=1e3*this.fE),this.Iu(Math.min(3e5,(0,D.R)(1e3*this.fE,3*e)))}f=!0}}})},m=this.Mu(u),h=t||m;if(this.Lu(c,m))return void o.Z.info(`Declining to flush data due to 50 consecutive authentication failures`);if(n&&!this.qt.Na(u,d,e,h))return this.Iu(),void(typeof s==`function`&&s(!0));let g=this.qt.Xa(e,h,u,d,l);h&&this.yu++;let _=!1;if(g)for(let e of g)this.qt.Xs(e.requestData,(t=>p(e.requestData,e.headers,t)),S.Z.Ps.$a,a),_=!0;this.zo.Fh()&&n&&!_?this.Iu():m&&(o.Z.info(`Invoking new session subscriptions`),this.Su.Dt())}Nu(){return this.yu>0}Iu(e=1e3*this.fE){this.Fu||(this.xu(),this.$u=window.setTimeout((()=>{if(document.hidden){let e=`visibilitychange`,t=()=>{document.hidden||(document.removeEventListener(e,t,!1),this.Pu())};document.addEventListener(e,t,!1)}else this.Pu()}),e),this.ju=e)}xu(){this.$u!=null&&(clearTimeout(this.$u),this.$u=null)}initialize(){this.Fu=!1,this.Iu()}destroy(){this.Su.removeAllSubscriptions(),this.zo.yh(),this.xu(),this.Fu=!0,this.Pu(void 0,void 0,!1,void 0,void 0,void 0,void 0,!0),this.$u=null}mr(e){return this.Su.It(e)}openSession(){let e=this.ri.Si()!==this.ri.wo();e&&(this.u.cE(r.I.iu.Uo),this.u.cE(r.I.iu.su)),this.Pu(void 0,!1,void 0,(()=>{this.u.ti(r.I.C.vi)})),this.Mn(),e&&Promise.resolve().then(n.bind(n,4127)).then((e=>{if(this.Fu)return;let t=e.default.m();if(t!=null&&(k.Z.isPushPermissionGranted()||k.Z.isPushBlocked())){let e=()=>{t.mn()?o.Z.info(`Push token maintenance is disabled, not refreshing token for backend.`):t.subscribe()},n=(t,n)=>{n&&e()},i=()=>{let t=this.u.j(r.I.C.In);(t==null||t)&&e()},s=a.Z.Yt.Qt;new a.Z(s,o.Z).jr(s.ss.cu,n,i)}}))}Ou(){this.u.ti(r.I.C.gi),this.u.ti(r.I.C.ws),this.u.ti(r.I.C.Cr)}changeUser(e,t,n){let i=this.wt.getUserId();if(i!==e){this.ri.yl(),this.Ou(),i!=null&&this.Pu(void 0,!1,void 0,void 0,void 0),this.wt.ou(e),n?this.zo.setSdkAuthenticationSignature(n):this.zo.xh();for(let e=0;e<t.length;e++)t[e].changeUser(i==null);i!=null&&this.u.ti(r.I.C.J),this.u.ti(r.I.C.Ca),this.u.ti(r.I.C.nE),this.u.ti(r.I.C._E),this.openSession(),o.Z.info(`Changed user to "`+e+`".`)}else{let t=`Doing nothing.`;n&&this.zo.kh()!==n&&(this.zo.setSdkAuthenticationSignature(n),t=`Updated SDK authentication signature`),o.Z.info(`Current user is already ${e}. ${t}`)}}requestImmediateDataFlush(e){this.xu(),this.ri.wo(),this.Pu(void 0,void 0,void 0,void 0,(()=>{o.Z.error(`Failed to flush data, request will be retried automatically.`)}),e,!0)}requestFeedRefresh(){this.ri.wo(),this.Pu(!0)}$r(e,t){this.ri.wo(),o.Z.info(`Requesting explicit trigger refresh.`),this.Pu(void 0,!0,void 0,e,t)}Cn(e,t){let n=x.G.zu,i={a:e,l:t},a=b.Z.q(n,i);return a&&(o.Z.info(`Logged alias ${e} with label ${t}`),this.u.k(r.I.C._E,i)),a}Fn(e,t,n){if(this.yt.hu(t))return o.Z.info(`Custom Attribute "${t}" is blocklisted, ignoring.`),new O.Z;let r={key:t,value:n},i=b.Z.q(e,r);if(i){let e=typeof n==`object`?JSON.stringify(n,null,2):n;o.Z.info(`Logged custom attribute: ${t} with value: ${e}`)}return i}setLastKnownLocation(e,t,n,r,i,a){let s={latitude:t,longitude:n};r!=null&&(s.altitude=r),i!=null&&(s.ll_accuracy=i),a!=null&&(s.alt_accuracy=a);let c=b.Z.q(x.G.Uu,s,e||void 0);return c&&o.Z.info(`Set user last known location as ${JSON.stringify(s,null,2)}`),c}kr(e,t){let n=this.ri.wo();return new v.Z(this.wt.getUserId(),x.G._u,e,n,{cid:t})}Bu(e,t){return new a.Z(e,t)}Mn(){let e=a.Z.Yt.Qt;this.Bu(e,o.Z).setItem(e.ss.$a,1,{baseUrl:this.baseUrl,data:{api_key:this.rn,device_id:this.on.ce().id},userId:this.wt.getUserId(),sdkAuthEnabled:this.zo.Fh()})}yr(e){for(let t of e)if(t.api_key===this.rn)this.qt.Qh(t.events,t.attributes);else{let e=a.Z.Yt.Qt;new a.Z(e,o.Z).setItem(e.ss.wr,p.Z.W(),t)}}Gn(e,t,n){if(this.yt.hu(e))return o.Z.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new O.Z;let r,i;return t===null&&n===null?(r=x.G.Eu,i={key:e}):(r=x.G.Ju,i={key:e,latitude:t,longitude:n}),b.Z.q(r,i)}Hn(e,t){let n={group_id:e,status:t};return b.Z.q(x.G.Ku,n)}}class j{constructor(e=0,t=[],n=[],r=[],i=null,a=null,o={enabled:!1},s={enabled:!1,refresh_rate_limit:void 0},c={enabled:!0,capacity:C.Up,refill_rate:C.Y$,endpoint_overrides:{}}){this.hl=e,this.gl=t,this.fl=n,this.bl=r,this.Rl=i,this.cl=a,this.ml=o,this.hi=s,this.ol=c,this.hl=e,this.gl=t,this.fl=n,this.bl=r,this.Rl=i,this.cl=a,this.ml=o,this.hi=s,this.ol=c}Y(){return{s:`5.3.1`,l:this.hl,e:this.gl,a:this.fl,p:this.bl,m:this.Rl,v:this.cl,c:this.ml,f:this.hi,grl:this.ol}}static qn(e){let t=e.l;return e.s!==`5.3.1`&&(t=0),new j(t,e.e,e.a,e.p,e.m,e.v,e.c,e.f,e.grl)}}class M{constructor(e){this.u=e,this.u=e,this.tl=new i.Z,this.el=new i.Z,this.il=new i.Z,this.sl=null,this.rl=null}ll(){if(this.rl==null){let e=this.u.j(r.I.C.ul);this.rl=e==null?new j:j.qn(e)}return this.rl}ii(){return this.ll().hl}al(e){if(e!=null&&e.config!=null){let t=e.config;if(t.time>this.ll().hl){let e=new j(t.time,t.events_blacklist,t.attributes_blacklist,t.purchases_blacklist,t.messaging_session_timeout,t.vapid_public_key,t.content_cards,t.feature_flags,(e=>e??this.ll().ol)(t.global_request_rate_limit)),n=!1;e.cl!=null&&this.Wn()!==e.cl&&(n=!0);let i=!1;e.ml.enabled!=null&&this.si()!==e.ml.enabled&&(i=!0);let a=!1;e.hi.enabled!=null&&this.ci()!==e.hi.enabled&&(a=!0),this.rl=e,this.u.k(r.I.C.ul,e.Y()),n&&this.tl.Dt(),i&&this.el.Dt(),a&&this.il.Dt()}}}_n(e){let t=this.tl.It(e);return this.sl&&this.tl.removeSubscription(this.sl),this.sl=t,t}Is(e){return this.el.It(e)}ji(e){return this.il.It(e)}me(e){return this.ll().gl.indexOf(e)!==-1}hu(e){return this.ll().fl.indexOf(e)!==-1}Dr(e){return this.ll().bl.indexOf(e)!==-1}dl(){return this.ll().Rl}Wn(){return this.ll().cl}si(){return this.ll().ml.enabled||!1}Cl(){let e=this.ll().ol;return!(!e||e.enabled==null)&&e.enabled}Au(){if(!this.Cl())return-1;let e=this.ll().ol;return e.capacity==null||e.capacity<10?-1:e.capacity}Du(){if(!this.Cl())return-1;let e=this.ll().ol;return e.refill_rate==null||e.refill_rate<=0?-1:e.refill_rate}vl(e){let t=this.ll().ol.endpoint_overrides;return t==null?null:t[e]}Tu(e){let t=this.vl(e);return t==null||isNaN(t.capacity)||t.capacity<=0?-1:t.capacity}ku(e){let t=this.vl(e);return t==null||isNaN(t.refill_rate)||t.refill_rate<=0?-1:t.refill_rate}ci(){return this.ll().hi.enabled&&this.Ri()==null?(b.Z.q(x.G.qs,{e:`Missing feature flag refresh_rate_limit.`}),!1):this.ll().hi.enabled||!1}Ri(){return this.ll().hi.refresh_rate_limit}}class N{constructor(e,t,n,r){this.u=e,this.wt=t,this.yt=n,this.wl=r,this.u=e,this.wt=t,this.yt=n,this.Sl=1e3,(r==null||isNaN(r))&&(r=1800),r<this.Sl/1e3&&(o.Z.info(`Specified session timeout of `+r+`s is too small, using the minimum session timeout of `+this.Sl/1e3+`s instead.`),r=this.Sl/1e3),this.wl=r}jl(e,t){return new v.Z(this.wt.getUserId(),x.G.xl,e,t.eu,{d:(0,y.FX)(e-t.Dl)})}Si(){let e=this.u.tu(r.I.iu.El);return e==null?null:e.eu}Gl(){let e=new Date().valueOf(),t=this.yt.dl(),n=this.u.j(r.I.C.Nl);if(n!=null&&t==null)return!1;let i=!1;return n==null?i=!0:t!=null&&(i=e-n>1e3*t),i&&this.u.k(r.I.C.Nl,e),i}zl(e,t){return t==null||t.Hl==null||!(e-t.Dl<this.Sl)&&t.Hl<e}wo(){let e=new Date().valueOf(),t=e+1e3*this.wl,n=this.u.tu(r.I.iu.El);if(this.zl(e,n)){let i=`Generating session start event with time `+e;if(n!=null){let e=n.Wl;e-n.Dl<this.Sl&&(e=n.Dl+this.Sl),this.u.kl(this.jl(e,n)),i+=` (old session ended `+e+`)`}i+=`. Will expire `+t.valueOf(),o.Z.info(i);let a=new f.Z(p.Z.W(),t);return this.u.kl(new v.Z(this.wt.getUserId(),x.G.ql,e,a.eu)),this.u.uu(r.I.iu.El,a),this.u.j(r.I.C.Nl)??this.u.k(r.I.C.Nl,e),a.eu}if(n!=null)return n.Wl=e,n.Hl=t,this.u.uu(r.I.iu.El,n),n.eu}yl(){let e=this.u.tu(r.I.iu.El);e!=null&&(this.u.Al(r.I.iu.El),this.u.kl(this.jl(new Date().valueOf(),e)))}}let P={Qo:function(e,t=!1){let n=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(r.I.C.ec,`true`),localStorage.getItem(r.I.C.ec)&&(localStorage.removeItem(r.I.C.ec),n=!0)}catch(e){if(!(e instanceof Error&&(e.name===`QuotaExceededError`||e.name===`NS_ERROR_DOM_QUOTA_REACHED`)&&localStorage.length>0))throw e;n=!0}}catch{o.Z.info(`Local Storage not supported!`)}let i=P.oc(),a=new r.Z.tc(e,i&&!t,n),s;return s=n?new r.Z.rc(e):new r.Z.ac,new r.Z(a,s)},oc:function(){return navigator.cookieEnabled||`cookie`in document&&(document.cookie.length>0||(document.cookie=`test`).indexOf.call(document.cookie,`test`)>-1)}},F=P;var I=n(9342),L=n(8548),R=n(3552),z=n(7615);class B{constructor(e,t){this.yt=e,this.u=t,this.yt=e,this.u=t}getUserId(){let e=this.u.tu(r.I.iu.su);if(e==null)return null;let t=e.eu,n=(0,L.E)(t);if(n>z.Z.lr){for(;n>z.Z.lr;)t=t.slice(0,t.length-1),n=(0,L.E)(t);e.eu=t,this.u.uu(r.I.iu.su,e)}return t}ou(e){let t=this.getUserId()==null;this.u.uu(r.I.iu.su,new f.Z(e)),t&&this.u.ru(e)}setCustomUserAttribute(e,t){if(this.yt.hu(e))return o.Z.info(`Custom Attribute "`+e+`" is blocklisted, ignoring.`),!1;let n={};return n[e]=t,this.nu(z.Z.lu,n,!0)}nu(e,t,n=!1,r=!1){let i=this.u.mu(this.getUserId(),e,t),a=``,s=e,c=t;return n&&(a=` custom`,typeof t==`object`&&(s=Object.keys(t)[0],c=t[s],typeof c==`object`&&(c=JSON.stringify(c,null,2)))),!r&&i&&o.Z.info(`Logged${a} attribute ${s} with value ${c}`),i}kn(e,t,n,i,s){this.nu(`push_token`,e,!1,!0),this.nu(`custom_push_public_key`,n,!1,!0),this.nu(`custom_push_user_auth`,i,!1,!0),this.nu(`custom_push_vapid_public_key`,s,!1,!0);let c=a.Z.Yt.Qt,l=new a.Z(c,o.Z),u=new R.Z(e,t,n,i,s);this.u.k(r.I.C.In,u.Y()),l.setItem(c.ss.cu,c.ie,!0)}Dn(e){if(this.nu(`push_token`,null,!1,!0),this.nu(`custom_push_public_key`,null,!1,!0),this.nu(`custom_push_user_auth`,null,!1,!0),this.nu(`custom_push_vapid_public_key`,null,!1,!0),e){let e=a.Z.Yt.Qt,t=new a.Z(e,o.Z);this.u.k(r.I.C.In,!1),t.setItem(e.ss.cu,e.ie,!1)}}}var V=n(1148),H=n(5319);let ee={Eo:`allowCrawlerActivity`,_o:`baseUrl`,Io:`noCookies`,Ao:`devicePropertyAllowlist`,_a:`disablePushTokenMaintenance`,So:`enableLogging`,No:`enableSdkAuthentication`,Ma:`manageServiceWorkerExternally`,Oo:`minimumIntervalBetweenTriggerActionsInSeconds`,Po:`sessionTimeoutInSeconds`,Ro:`appVersion`,Lo:`appVersionNumber`,wa:`serviceWorkerLocation`,ya:`safariWebsitePushId`,zn:`localization`,bo:`contentSecurityNonce`,Do:`allowUserSuppliedJavascript`,jo:`inAppMessageZIndex`,ho:`openInAppMessagesInNewTab`,en:`openNewsFeedCardsInNewTab`,Lh:`requireExplicitInAppMessageDismissal`,Mo:`doNotLoadFontAwesome`,Uo:`deviceId`,Bo:`sdkFlavor`,tn:`openCardsInNewTab`},U={Eo:`allowCrawlerActivity`,_o:`baseUrl`,Io:`noCookies`,Ao:`devicePropertyAllowlist`,_a:`disablePushTokenMaintenance`,So:`enableLogging`,No:`enableSdkAuthentication`,Ma:`manageServiceWorkerExternally`,Oo:`minimumIntervalBetweenTriggerActionsInSeconds`,Po:`sessionTimeoutInSeconds`,Ro:`appVersion`,Lo:`appVersionNumber`,wa:`serviceWorkerLocation`,ya:`safariWebsitePushId`,zn:`localization`,bo:`contentSecurityNonce`,Do:`allowUserSuppliedJavascript`,jo:`inAppMessageZIndex`,ho:`openInAppMessagesInNewTab`,tn:`openCardsInNewTab`,en:`openNewsFeedCardsInNewTab`,Lh:`requireExplicitInAppMessageDismissal`,Mo:`doNotLoadFontAwesome`,Uo:`deviceId`,Bo:`sdkFlavor`},te=new class{constructor(){this.rn=``,this.Wo=``,this.Vo=void 0,this.zo=null,this.on=null,this.qt=null,this.zi=null,this.yt=null,this.ri=null,this.u=null,this.wt=null,this.Go=``,this.Ko=!1,this.$o=!1,this.qo=new i.Z,this.Jo=new i.Z,this.options={},this.Yo=[],this.Ho=[],this._e=[],this.Wo=`5.3.1`}Xo(e){this.qo.It(e)}Sh(e){this.Jo.It(e)}initialize(e,t){if(this.so())return o.Z.info(`Braze has already been initialized with an API key.`),!0;this.options=t||{};let a=this.nn(U.So),c=(0,V.L)(H.SD.Un());if(c&&c.brazeLogging===`true`&&(a=!0),o.Z.init(a),o.Z.info(`Initialization Options: ${JSON.stringify(this.options,null,2)}`),e==null||e===``||typeof e!=`string`)return o.Z.error(`Braze requires a valid API key to be initialized.`),!1;this.rn=e;let u=this.nn(U._o);if(u==null||u===``||typeof u!=`string`)return o.Z.error(`Braze requires a valid baseUrl to be initialized.`),!1;!1===/^https?:/.test(u)&&(u=`https://${u}`);let p=u;if(u=document.createElement(`a`),u.href=p,u.pathname===`/`&&(u=`${u}api/v3`),this.Go=u.toString(),l.Z.Zo&&!this.nn(U.Eo))return o.Z.info(`Ignoring activity from crawler bot `+navigator.userAgent),this.$o=!0,!1;let h=this.nn(U.Io)||!1;if(this.u=F.Qo(e,h),h&&this.u.Wh(e),new r.Z.ee(null,!0).br(r.I.se))return o.Z.info(`Ignoring all activity due to previous opt out`),this.$o=!0,!1;for(let e of(0,m.XP)(this.options))(0,m.VO)(ee).indexOf(e)===-1&&o.Z.warn(`Ignoring unknown initialization option '${e}'.`);let _=[`mparticle`,`wordpress`,`tealium`];if(this.nn(U.Bo)!=null){let e=this.nn(U.Bo);_.indexOf(e)===-1?o.Z.error(`Invalid sdk flavor passed: `+e):this.Vo=e}let v=this.nn(ee.Ao);if(v!=null)if((0,m.kJ)(v)){let e=[];for(let t=0;t<v.length;t++)(0,m.fk)(d,v[t],`devicePropertyAllowlist contained an invalid value.`,`DeviceProperties`)&&e.push(v[t]);v=e}else o.Z.error(`devicePropertyAllowlist must be an array. Defaulting to all properties.`),v=null;let y=this.nn(U.Uo);if(y){let e=new f.Z(y);this.u.uu(r.I.iu.Uo,e)}this.on=new g(this.u,v),this.yt=new M(this.u),this.wt=new B(this.yt,this.u),this.ri=new N(this.u,this.wt,this.yt,this.nn(U.Po));let b=new i.Z;return this.zo=new s(this.u,this.nn(U.No),b),this.$t(b),this.qt=new T(this.on,this.u,this.zo,this.wt,this.ri,this.yt,this.rn,this.Go,this.Wo,this.Vo||``,this.nn(U.Ro),this.nn(U.Lo)),this.zi=new A(this.rn,this.Go,this.ri,this.on,this.wt,this.yt,this.u,(e=>{if(this.so())for(let t of this.gr())t.Ns(e)}),this.zo,this.qt),this.zi.initialize(),h||this.u.Vh(),o.Z.info(`Initialized for the Braze backend at "${this.nn(U._o)}" with API key "${this.rn}".`),I.n.o(),this.yt.ji((()=>{var e;this.Ko&&(e=this.yt)!=null&&e.ci()&&n.e(787).then(n.bind(n,9787)).then((e=>{this.Ko&&(0,e.default)()}))})),this.zi.mr((()=>{var e;this.Ko&&(e=this.yt)!=null&&e.ci()&&n.e(787).then(n.bind(n,9787)).then((e=>{this.Ko&&(0,e.default)(void 0,void 0,!0)}))})),this.qo.Dt(this.options),this.Ko=!0,!0}destroy(e){if(o.Z.destroy(),this.so()){this.Jo.Dt(),this.Jo.removeAllSubscriptions();for(let e of this.Yo)e.destroy();this.Yo=[];for(let e of this.Ho)e.clearData(!1);this.Ho=[],this.removeAllSubscriptions(),this._e=[],this.zi!=null&&this.zi.destroy(),this.zi=null,this.zo=null,this.on=null,this.qt=null,this.yt=null,this.ri=null,this.wt=null,this.options={},this.Vo=void 0,this.Ko=!1,this.$o=!1,e&&(this.u=null)}}X(){return!(this.Kh()||!this.so()&&(console.warn(C.Go),1))}ba(){return this.rn}Sr(){return this.zo}Hs(){return this.Go}te(){return this.on}nr(){return this.qt}nn(e){return this.options[e]}gr(){return this.Ho}cr(){return this.zi}ir(){return this.yt}zr(){return this.ri}l(){return this.u}pr(){if(this.wt&&this.zi)return new z.Z(this.wt,this.zi)}er(){return this.wt}tr(){return!0===this.nn(U.Do)}g(e){let t=!1;for(let n of this.Yo)n===e&&(t=!0);t||this.Yo.push(e)}ar(e){let t=!1;for(let n of this.Ho)n.constructor===e.constructor&&(t=!0);e instanceof c.Z&&!t&&this.Ho.push(e)}$t(e){e instanceof i.Z&&this._e.push(e)}removeAllSubscriptions(){if(this.X())for(let e of this._e)e.removeAllSubscriptions()}removeSubscription(e){if(this.X())for(let t of this._e)t.removeSubscription(e)}oe(e){this.$o=e}so(){return this.Ko}Kh(){return this.$o}Ds(){return this.Wo}}},5966:(e,t,n)=>{n.d(t,{I:()=>d,Z:()=>f});var r=n(7559),i=n(2308),a=n(2893),o=n(2730),s=n(335),c=n(7615),l=n(3695),u=n(8031);let d={iu:{su:`ab.storage.userId`,Uo:`ab.storage.deviceId`,El:`ab.storage.sessionId`},C:{ec:`ab.test`,tE:`ab.storage.events`,eE:`ab.storage.attributes`,sE:`ab.storage.attributes.anonymous_user`,Ca:`ab.storage.device`,Yh:`ab.storage.sdk_metadata`,Jh:`ab.storage.session_id_for_cached_metadata`,In:`ab.storage.pushToken`,Ui:`ab.storage.newsFeed`,ki:`ab.storage.lastNewsFeedRefresh`,J:`ab.storage.cardImpressions`,ul:`ab.storage.serverConfig`,rE:`ab.storage.triggers`,oE:`ab.storage.triggers.ts`,Nl:`ab.storage.messagingSessionStart`,ws:`ab.storage.cc`,gs:`ab.storage.ccLastFullSync`,ys:`ab.storage.ccLastCardUpdated`,nE:`ab.storage.ccRateLimitCurrentTokenCount`,au:`ab.storage.globalRateLimitCurrentTokenCount`,vu:`ab.storage.dynamicRateLimitCurrentTokenCount`,v:`ab.storage.ccClicks`,H:`ab.storage.ccImpressions`,A:`ab.storage.ccDismissals`,aE:`ab.storage.lastDisplayedTriggerTimesById`,iE:`ab.storage.lastDisplayedTriggerTime`,EE:`ab.storage.triggerFireInstancesById`,wh:`ab.storage.signature`,As:`ab.storage.brazeSyncRetryCount`,Ss:`ab.storage.sdkVersion`,gi:`ab.storage.ff`,vi:`ab.storage.ffImpressions`,xi:`ab.storage.ffLastRefreshAt`,Di:`ab.storage.ff.sessionId`,lE:`ab.storage.lastReqToEndpoint`,SE:`ab.storage.requestAttempts`,Cr:`ab.storage.deferredIam`,Qa:`ab.storage.lastSdkReq`,_E:`ab.storage.alias`},se:`ab.optOut`};class f{constructor(e,t){this.uE=e,this.TE=t,this.uE=e,this.TE=t}Wh(e){let t=(0,a.XP)(d.iu),n=new f.ee(e);for(let e of t)n.remove(d.iu[e])}uu(e,t){let n=null;t!=null&&t instanceof i.Z&&(n=t.Y()),this.uE.store(e,n)}cE(e){let t=this.tu(e);t!=null&&(t.Wl=new Date().valueOf(),this.uu(e,t))}tu(e){let t=this.uE.br(e),n=(e=>{let t;try{t=JSON.parse(e)}catch{t=null}return t})(t),r;if(n)r=i.Z.qn(n)||null,r&&this.uu(e,r);else{let n=i.Z.hE(t);r=i.Z.qn(n)||null,n!==t&&r&&this.uu(e,r)}return r}Al(e){this.uE.remove(e)}Vh(){let e=(0,a.XP)(d.iu),t;for(let n of e)t=this.tu(d.iu[n]),t!=null&&this.uu(d.iu[n],t)}xo(e){let t;if(e==null||e.length===0)return!1;t=(0,a.kJ)(e)?e:[e];let n=this.TE.br(d.C.tE);n!=null&&(0,a.kJ)(n)||(n=[]);for(let e=0;e<t.length;e++)n.push(t[e].Y());return this.TE.store(d.C.tE,n)}kl(e){return e!=null&&this.xo([e])}AE(){let e=this.TE.br(d.C.tE);this.TE.remove(d.C.tE),e??=[];let t=[],n=!1,i=null;if((0,a.kJ)(e))for(let n=0;n<e.length;n++)r.Z.RE(e[n])?t.push(r.Z.qn(e[n])):i=n;else n=!0;if(n||i!=null){let a=`Stored events could not be deserialized as Events`;n&&(a+=`, was `+Object.prototype.toString.call(e)+` not an array`),i!=null&&(a+=`, value at index `+i+` does not look like an event`),a+=`, serialized values were of type `+typeof e+`: `+JSON.stringify(e),t.push(new r.Z(null,o.G.qs,new Date().valueOf(),null,{e:a}))}return t}k(e,t){return!!(0,a.fk)(d.C,e,`StorageManager cannot store object.`,`STORAGE_KEYS.OBJECTS`)&&this.TE.store(e,t)}j(e){return!!(0,a.fk)(d.C,e,`StorageManager cannot retrieve object.`,`STORAGE_KEYS.OBJECTS`)&&this.TE.br(e)}ti(e){return!!(0,a.fk)(d.C,e,`StorageManager cannot remove object.`,`STORAGE_KEYS.OBJECTS`)&&(this.TE.remove(e),!0)}clearData(){let e=(0,a.XP)(d.iu),t=(0,a.XP)(d.C);for(let t=0;t<e.length;t++){let n=e[t];this.uE.remove(d.iu[n])}for(let e=0;e<t.length;e++){let n=t[e];this.TE.remove(d.C[n])}}gE(e){return e||d.C.sE}La(e){let t=this.TE.br(d.C.eE);t??={};let n=this.gE(e[c.Z.Yn]),r=t[n];for(let i in e)i!==c.Z.Yn&&(t[n]==null||r&&r[i]==null)&&this.mu(e[c.Z.Yn],i,e[i])}mu(e,t,n){let r=this.TE.br(d.C.eE);r??={};let i=this.gE(e),a=r[i];if(a??(a={},e!=null&&(a[c.Z.Yn]=e)),t===c.Z.lu){a[t]??(a[t]={});for(let e in n)a[t][e]=n[e]}else a[t]=n;return r[i]=a,this.TE.store(d.C.eE,r)}OE(){let e=this.TE.br(d.C.eE);this.TE.remove(d.C.eE);let t=[];for(let n in e)e[n]!=null&&t.push(e[n]);return t}ru(e){let t=this.TE.br(d.C.eE);if(t!=null){let n=this.gE(null),r=t[n];r!=null&&(t[n]=void 0,this.TE.store(d.C.eE,t),r[c.Z.Yn]=e,this.La(r))}let n=this.tu(d.iu.El),r=null;n!=null&&(r=n.eu);let i=this.AE();if(i!=null)for(let t=0;t<i.length;t++){let n=i[t];n.userId==null&&n.sessionId==r&&(n.userId=e),this.kl(n)}}dE(){return this.TE.fE}}f.rc=class{constructor(e){this.rn=e,this.rn=e,this.fE=l.Z.IE()?3:10}bE(e){return e+`.`+this.rn}store(e,t){let n={v:t};try{return localStorage.setItem(this.bE(e),JSON.stringify(n)),!0}catch(e){return s.Z.info(`Storage failure: `+(0,u.e)(e)),!1}}br(e){try{let t=null,n=localStorage.getItem(this.bE(e));return n!=null&&(t=JSON.parse(n)),t==null?null:t.v}catch(e){return s.Z.info(`Storage retrieval failure: `+(0,u.e)(e)),null}}remove(e){try{localStorage.removeItem(this.bE(e))}catch(e){return s.Z.info(`Storage removal failure: `+(0,u.e)(e)),!1}}},f.ac=class{constructor(){this.mE={},this.KE=5242880,this.fE=3}store(e,t){let n={value:t},r=this.YE(t);return r>this.KE?(s.Z.info(`Storage failure: object is ≈`+r+` bytes which is greater than the max of `+this.KE),!1):(this.mE[e]=n,!0)}YE(e){let t=[],n=[e],r=0;for(;n.length;){let e=n.pop();if(typeof e==`boolean`)r+=4;else if(typeof e==`string`)r+=2*e.length;else if(typeof e==`number`)r+=8;else if(typeof e==`object`&&t.indexOf(e)===-1){let r,i;t.push(e);for(let t in e)i=e,r=t,n.push(i[r])}}return r}br(e){let t=this.mE[e];return t==null?null:t.value}remove(e){this.mE[e]=null}},f.ee=class{constructor(e,t){this.rn=e,this.NE=t,this.rn=e,this.CE=this.GE(),this.DE=576e3,this.NE=!!t}bE(e){return this.rn==null?e:e+`.`+this.rn}GE(){let e=0,t=document.location.hostname,n=t.split(`.`);for(;e<n.length-1&&document.cookie.indexOf(`ab._gd=ab._gd`)===-1;)e++,t=`.`+n.slice(-1-e).join(`.`),document.cookie=`ab._gd=ab._gd;domain=`+t+`;`;return document.cookie=`ab._gd=;expires=`+new Date(0).toUTCString()+`;domain=`+t+`;`,t}ne(){let e=new Date;return e.setTime(e.getTime()+60*this.DE*1e3),e.getFullYear()}ME(){let e=(0,a.VO)(d.iu),t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n];for(;r.charAt(0)===` `;)r=r.substring(1);let i=!1;for(let t=0;t<e.length;t++)if(r.indexOf(e[t])===0){i=!0;break}if(i){let e=r.split(`=`)[0];e.indexOf(`.`+this.rn)===-1&&this.pE(e)}}}store(e,t){this.ME();let n=new Date;n.setTime(n.getTime()+60*this.DE*1e3);let r=`expires=`+n.toUTCString(),i=`domain=`+this.CE,a;a=this.NE?t:encodeURIComponent(t);let o=this.bE(e)+`=`+a+`;`+r+`;`+i+`;path=/`;return o.length>=4093?(s.Z.info(`Storage failure: string is `+o.length+` chars which is too large to store as a cookie.`),!1):(document.cookie=o,!0)}br(e){let t=[],n=this.bE(e)+`=`,r=document.cookie.split(`;`);for(let i=0;i<r.length;i++){let a=r[i];for(;a.charAt(0)===` `;)a=a.substring(1);if(a.indexOf(n)===0)try{let e;e=this.NE?a.substring(n.length,a.length):decodeURIComponent(a.substring(n.length,a.length)),t.push(e)}catch(t){return s.Z.info(`Storage retrieval failure: `+(0,u.e)(t)),this.remove(e),null}}return t.length>0?t[t.length-1]:null}remove(e){this.pE(this.bE(e))}pE(e){let t=e+`=;expires=`+new Date(0).toUTCString();document.cookie=t,document.cookie=t+`;path=/`;let n=t+`;domain=`+this.CE;document.cookie=n,document.cookie=n+`;path=/`}},f.tc=class{constructor(e,t,n){this.rn=e,this.vE=[],t&&this.vE.push(new f.ee(e)),n&&this.vE.push(new f.rc(e)),this.vE.push(new f.ac)}store(e,t){let n=!0;for(let r=0;r<this.vE.length;r++)n=this.vE[r].store(e,t)&&n;return n}br(e){for(let t=0;t<this.vE.length;t++){let n=this.vE[t].br(e);if(n!=null)return n}return null}remove(e){new f.ee(this.rn).remove(e);for(let t=0;t<this.vE.length;t++)this.vE[t].remove(e)}}},4663:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(7070);class i{constructor(){this._e={}}It(e){if(typeof e!=`function`)return null;let t=r.Z.W();return this._e[t]=e,t}removeSubscription(e){delete this._e[e]}removeAllSubscriptions(){this._e={}}ic(){return Object.keys(this._e).length}Dt(e){let t=[];for(let n in this._e){let r=this._e[n];t.push(r(e))}return t}}},8982:(e,t,n)=>{n.d(t,{q:()=>i});var r=n(5966);function i(e){let t=e?.j(r.I.C._E),n;return t&&(n={label:t.l,name:t.a}),n}},3826:(e,t,n)=>{n.d(t,{Z:()=>r});let r={qa:`invalid_api_key`,Aa:`blacklisted`,Ba:`no_device_identifier`,Ra:`invalid_json_response`,Zh:`empty_response`,__:`sdk_auth_error`}},7559:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(5825),i=n(8982),a=n(2893),o=n(7750);class s{constructor(e,t,n,r,i){this.userId=e,this.type=t,this.time=n,this.sessionId=r,this.data=i,this.userId=e,this.type=t,this.time=(0,o._0)(n),this.sessionId=r,this.data=i}Ir(){let e={name:this.type,time:(0,o.FX)(this.time),data:this.data||{},session_id:this.sessionId};this.userId!=null&&(e.user_id=this.userId);let t=r.ZP.Sr()?.Fh()||!1;if(!e.user_id&&!t){let t=(0,i.q)(r.ZP.l());t&&(e.alias=t)}return e}Y(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(e){return new s(e.user_id,e.name,e.time,e.session_id,e.data)}static RE(e){return e!=null&&(0,a.Kn)(e)&&e.t!=null&&e.t!==``}static qn(e){return new s(e.u,e.t,e.ts,e.s,e.d)}}},2308:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(7070),i=n(335),a=n(2893),o=n(8031);class s{constructor(e,t,n){this.eu=e,e??=r.Z.W(),!n||isNaN(n)?this.Dl=new Date().valueOf():this.Dl=n,this.eu=e,this.Wl=new Date().valueOf(),this.Hl=t}Y(){return`g:${encodeURIComponent(this.eu)}|e:${this.Hl}|c:${this.Dl}|l:${this.Wl}`}static hE(e){if(typeof e!=`string`)return null;let t=e.lastIndexOf(`|e:`),n=e.substring(0,t),r=n.split(`g:`)[1],i;return i=/[|:]/.test(r)?encodeURIComponent(r):r,e.replace(n,`g:${i}`)}static qn(e){let t;if(typeof e==`string`)try{let n=e.split(`|`);if(!(0,a.kJ)(n)||n.length!==4)return null;let r=e=>e.split(`:`)[1],i=e=>{let t=parseInt(r(e));if(!isNaN(t))return t};t=new s(decodeURIComponent(r(n[0])),i(n[1]),i(n[2])),t.Wl=i(n[3])}catch(t){i.Z.info(`Unable to parse cookie string ${e}, failed with error: ${(0,o.e)(t)}`)}else{if(e==null||e.g==null)return null;t=new s(e.g,e.e,e.c),t.Wl=e.l}return t}}},3552:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(7750);class i{constructor(e,t,n,r,i){this.endpoint=e,this.Vn=t,this.publicKey=n,this.Vl=r,this.cl=i,this.endpoint=e||null,this.Vn=t||null,this.publicKey=n||null,this.Vl=r||null,this.cl=i||null}Y(){return{e:this.endpoint,c:this.Vn,p:this.publicKey,u:this.Vl,v:this.cl}}static qn(e){return new i(e.e,(0,r.Rd)(e.c),e.p,e.u,e.v)}}},4673:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e=!1,t=[]){this.L=e,this.ge=t,this.L=e,this.ge=t}P(e){this.L=this.L&&e.L,this.ge.push(...e.ge)}}},4365:(e,t,n)=>{n.d(t,{Z:()=>r});let r={OPEN:`open`,Rr:`purchase`,vr:`push_click`,ue:`custom_event`,Qr:`iam_click`,kt:`test`}},2246:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(7750),i=n(335);class a{constructor(e){this.Bl=e,this.Bl=e}Jl(e){return this.Bl==null||this.Bl===e[0]}static fromJson(e){return new a(e?e.event_name:null)}Y(){return this.Bl}}var o=n(2893);class s{constructor(e,t,n,i){this.Tl=e,this._l=t,this.comparator=n,this.Ll=i,this.Tl=e,this._l=t,this.comparator=n,this.Ll=i,this._l===s.Ol.Il&&this.comparator!==s.Ql.Ul&&this.comparator!==s.Ql.Xl&&this.comparator!==s.Ql.Fl&&this.comparator!==s.Ql.Kl&&(this.Ll=(0,r.X2)(this.Ll))}Jl(e){let t=null;switch(e!=null&&(t=e[this.Tl]),this.comparator){case s.Ql.Pl:return t!=null&&t.valueOf()===this.Ll.valueOf();case s.Ql.Yl:return t==null||t.valueOf()!==this.Ll.valueOf();case s.Ql.Zl:return t!=null&&typeof t==typeof this.Ll&&t>this.Ll;case s.Ql.Ul:return this._l===s.Ol.Il?t!=null&&(0,o.J_)(t)&&(0,r.$N)(t)<=this.Ll.valueOf():t!=null&&typeof t==typeof this.Ll&&t>=this.Ll;case s.Ql.$l:return t!=null&&typeof t==typeof this.Ll&&t<this.Ll;case s.Ql.Xl:return this._l===s.Ol.Il?t!=null&&(0,o.J_)(t)&&(0,r.$N)(t)>=this.Ll.valueOf():t!=null&&typeof t==typeof this.Ll&&t<=this.Ll;case s.Ql.Hu:return t!=null&&typeof t==`string`&&typeof t==typeof this.Ll&&t.match(this.Ll)!=null;case s.Ql.Qu:return t!=null;case s.Ql.Xu:return t==null;case s.Ql.Fl:return t!=null&&(0,o.J_)(t)&&(0,r.yo)(t)<this.Ll;case s.Ql.Kl:return t!=null&&(0,o.J_)(t)&&(0,r.yo)(t)>this.Ll;case s.Ql.Gu:return t==null||typeof t!=typeof this.Ll||typeof t!=`string`||t.match(this.Ll)==null}return!1}static fromJson(e){return new s(e.property_key,e.property_type,e.comparator,e.property_value)}Y(){let e=this.Ll;return(0,o.J_)(this.Ll)&&(e=(0,r.FX)(e.valueOf())),{k:this.Tl,t:this._l,c:this.comparator,v:e}}static qn(e){return new s(e.k,e.t,e.c,e.v)}}s.Ol={Vu:`boolean`,Wu:`number`,Yu:`string`,Il:`date`},s.Ql={Pl:1,Yl:2,Zl:3,Ul:4,$l:5,Xl:6,Hu:10,Qu:11,Xu:12,Fl:15,Kl:16,Gu:17};class c{constructor(e){this.filters=e,this.filters=e}Jl(e){let t=!0;for(let n=0;n<this.filters.length;n++){let r=this.filters[n],i=!1;for(let t=0;t<r.length;t++)if(r[t].Jl(e)){i=!0;break}if(!i){t=!1;break}}return t}static fromJson(e){if(e==null||!(0,o.kJ)(e))return null;let t=[];for(let n=0;n<e.length;n++){let r=[],i=e[n];for(let e=0;e<i.length;e++)r.push(s.fromJson(i[e]));t.push(r)}return new c(t)}Y(){let e=[];for(let t=0;t<this.filters.length;t++){let n=this.filters[t],r=[];for(let e=0;e<n.length;e++)r.push(n[e].Y());e.push(r)}return e}static qn(e){let t=[];for(let n=0;n<e.length;n++){let r=[],i=e[n];for(let e=0;e<i.length;e++)r.push(s.qn(i[e]));t.push(r)}return new c(t)}}class l{constructor(e,t){this.Bl=e,this.Ml=t,this.Bl=e,this.Ml=t}Jl(e){if(this.Bl==null||this.Ml==null)return!1;let t=e[0],n=e[1];return t===this.Bl&&this.Ml.Jl(n)}static fromJson(e){return new l(e?e.event_name:null,e?c.fromJson(e.property_filters):null)}Y(){return{e:this.Bl,pf:this.Ml?this.Ml.Y():null}}}class u{constructor(e,t){this.Zu=e,this.tf=t,this.Zu=e,this.tf=t}Jl(e){if(this.Zu==null)return!1;let t=g.if(e[0],this.Zu);if(!t)return!1;let n=this.tf==null||this.tf.length===0;if(this.tf!=null){for(let t=0;t<this.tf.length;t++)if(this.tf[t]===e[1]){n=!0;break}}return t&&n}static fromJson(e){return new u(e?e.id:null,e?e.buttons:null)}Y(){return this.Zu}}class d{constructor(e){this.productId=e,this.productId=e}Jl(e){return this.productId==null||e[0]===this.productId}static fromJson(e){return new d(e?e.product_id:null)}Y(){return this.productId}}class f{constructor(e,t){this.productId=e,this.Ml=t,this.productId=e,this.Ml=t}Jl(e){if(this.productId==null||this.Ml==null)return!1;let t=e[0],n=e[1];return t===this.productId&&this.Ml.Jl(n)}static fromJson(e){return new f(e?e.product_id:null,e?c.fromJson(e.property_filters):null)}Y(){return{id:this.productId,pf:this.Ml?this.Ml.Y():null}}}class p{constructor(e){this.Zu=e,this.Zu=e}Jl(e){return this.Zu==null||g.if(e[0],this.Zu)}static fromJson(e){return new p(e?e.campaign_id:null)}Y(){return this.Zu}}var m=n(4365),h=n(8031);class g{constructor(e,t){this.type=e,this.data=t,this.type=e,this.data=t}sc(e,t){return g.cc[this.type]===e&&(this.data==null||this.data.Jl(t))}static if(e,t){let n=null;try{n=window.atob(e)}catch(t){return i.Z.info(`Failed to unencode analytics id `+e+`: `+(0,h.e)(t)),!1}return t===n.split(`_`)[0]}static fromJson(e){let t=e.type,n=null;switch(t){case g._r.OPEN:case g._r.kt:break;case g._r.Rr:n=d.fromJson(e.data);break;case g._r.nc:n=f.fromJson(e.data);break;case g._r.vr:n=p.fromJson(e.data);break;case g._r.ue:n=a.fromJson(e.data);break;case g._r.lc:n=l.fromJson(e.data);break;case g._r.Qr:n=u.fromJson(e.data)}return new g(t,n)}Y(){return{t:this.type,d:this.data?this.data.Y():null}}static qn(e){let t,n=null;switch(e.t){case g._r.OPEN:case g._r.kt:break;case g._r.Rr:n=new d(e.d);break;case g._r.nc:t=e.d||{},n=new f(t.id,c.qn(t.pf||[]));break;case g._r.vr:n=new p(e.d);break;case g._r.ue:n=new a(e.d);break;case g._r.lc:t=e.d||{},n=new l(t.e,c.qn(t.pf||[]));break;case g._r.Qr:n=new u(e.d)}return new g(e.t,n)}}g._r={OPEN:`open`,Rr:`purchase`,nc:`purchase_property`,vr:`push_click`,ue:`custom_event`,lc:`custom_event_property`,Qr:`iam_click`,kt:`test`},g.cc={},g.cc[g._r.OPEN]=m.Z.OPEN,g.cc[g._r.Rr]=m.Z.Rr,g.cc[g._r.nc]=m.Z.Rr,g.cc[g._r.vr]=m.Z.vr,g.cc[g._r.ue]=m.Z.ue,g.cc[g._r.lc]=m.Z.ue,g.cc[g._r.Qr]=m.Z.Qr,g.cc[g._r.kt]=m.Z.kt;class _{constructor(e,t=[],n,r,i=0,a,o,s=0,c=_.td,l,u,d){this.id=e,this.sd=t,this.startTime=n,this.endTime=r,this.priority=i,this.type=a,this.data=o,this.ed=s,this.rd=c,this.Nr=l,this.hd=u,this.od=d,this.id=e,this.sd=t||[],n===void 0&&(n=null),this.startTime=n,r===void 0&&(r=null),this.endTime=r,this.priority=i||0,this.type=a,this.ed=s||0,l??=1e3*(this.ed+30),this.Nr=l,this.data=o,c!=null&&(this.rd=c),this.hd=u,this.od=d||null}nd(e){return this.od==null||this.rd!==_.td&&e-this.od>=1e3*this.rd}ad(e){this.od=e}ud(e){let t=e+1e3*this.ed;return Math.max(t-new Date().valueOf(),0)}dd(e){let t=new Date().valueOf()-e,n=e==null||isNaN(t)||this.Nr==null||t<this.Nr;return n||i.Z.info(`Trigger action ${this.type} is no longer eligible for display - fired ${t}ms ago and has a timeout of ${this.Nr}ms.`),!n}static fromJson(e){let t=e.id,n=[];for(let t=0;t<e.trigger_condition.length;t++)n.push(g.fromJson(e.trigger_condition[t]));let i=(0,r.X2)(e.start_time),a=(0,r.X2)(e.end_time),s=e.priority,c=e.type,l=e.delay,u=e.re_eligibility,d=e.timeout,f=e.data,p=e.min_seconds_since_last_trigger;return(0,o.fk)(_._r,c,`Could not construct Trigger from server data`,`Trigger.Types`)?new _(t,n,i,a,s,c,f,l,u,d,p):null}Y(){let e=[];for(let t=0;t<this.sd.length;t++)e.push(this.sd[t].Y());return{i:this.id,c:e,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.ed,r:this.rd,tm:this.Nr,ss:this.hd,ld:this.od}}static qn(e){let t=[],n=e.c||[];for(let e=0;e<n.length;e++)t.push(g.qn(n[e]));return new _(e.i,t,(0,r.Rd)(e.s),(0,r.Rd)(e.e),e.p,e.t,e.da,e.d,e.r,e.tm,e.ss,e.ld)}}_._r={Br:`inapp`,md:`templated_iam`},_.td=-1},9342:(e,t,n)=>{n.d(t,{n:()=>h});var r=n(1087),i=n(5825),a=n(158),o=n(3340),s=n(7559),c=n(2893),l=n(5966);class u{constructor(e,t,n,r,i){this.triggerId=e,this.Er=t,this.Tr=n,this.Gr=r,this.Nr=i,this.triggerId=e,this.Er=t,this.Tr=n,this.Gr=r,this.Nr=i}static fromJson(e,t,n,r,i){return e==null||e.trigger_id==null?null:new u(e.trigger_id,t,n,r,i)}}var d=n(2246),f=n(4365),p=n(335);class m extends a.Z{constructor(e,t,n,r,i){super(),this.tg=e,this.Jt=t,this.u=n,this.zi=r,this.ig=i,this.tg=e,this.Jt=t,this.u=n,this.zi=r,this.ig=i,this.sg=[],this.eg=[],this.hg=null,this.ng={},this.og={},this.triggers=[],this.lg=0,this.ag(),this.gg()}fg(){if(this.u){this.hg=this.u.j(l.I.C.iE)||this.hg,this.ng=this.u.j(l.I.C.EE)||this.ng,this.og=this.u.j(l.I.C.aE)||this.og;for(let e=0;e<this.triggers.length;e++){let t=this.triggers[e];t.id&&this.og[t.id]!=null&&t.ad(this.og[t.id])}}}ag(){if(!this.u)return;this.lg=this.u.j(l.I.C.oE)||0;let e=this.u.j(l.I.C.rE)||[],t=[];for(let n=0;n<e.length;n++)t.push(d.Z.qn(e[n]));this.triggers=t,this.fg()}gg(){let e=this,t=function(t,n,r,i,a){return function(){e.cg(t,n,r,i,a)}},n={};for(let e of this.triggers)e.id&&(n[e.id]=e);let r=!1;for(let e=0;e<this.triggers.length;e++){let i=this.triggers[e];if(i.id&&this.ng[i.id]!=null){let e=this.ng[i.id],a=[];for(let r=0;r<e.length;r++){let o=e[r],l=i.ud(o.Gr||0);if(l>0){let e,r;a.push(o),o.ug!=null&&(e=o.ug),o.dg!=null&&s.Z.RE(o.dg)&&(r=s.Z.qn(o.dg));let u=[];if(o.pg&&(0,c.kJ)(o.pg))for(let e=0;e<o.pg.length;e++){let t=n[o.pg[e]];t!=null&&u.push(t)}this.eg.push(window.setTimeout(t(i,o.Gr||0,e,r,u),l))}}this.ng[i.id].length>a.length&&(this.ng[i.id]=a,r=!0,this.ng[i.id].length===0&&delete this.ng[i.id])}}r&&this.u&&this.u.k(l.I.C.EE,this.ng)}mg(){if(!this.u)return;let e=[];for(let t=0;t<this.triggers.length;t++)e.push(this.triggers[t].Y());this.lg=new Date().valueOf(),this.u.k(l.I.C.rE,e),this.u.k(l.I.C.oE,this.lg)}bg(){this.u&&((this.u.j(l.I.C.oE)||0)>this.lg?this.ag():this.fg())}Ns(e){let t=!1;if(e!=null&&e.triggers){this.ig.Lr(),this.fg();let n={},r={};this.triggers=[];for(let i=0;i<e.triggers.length;i++){let a=d.Z.fromJson(e.triggers[i]);if(a){a.id&&this.og[a.id]!=null&&(a.ad(this.og[a.id]),n[a.id]=this.og[a.id]),a.id&&this.ng[a.id]!=null&&(r[a.id]=this.ng[a.id]);for(let e=0;e<a.sd.length;e++)if(a.sd[e].sc(f.Z.kt,null)){t=!0;break}this.triggers.push(a)}}(0,c.Xy)(this.og,n)||(this.og=n,this.u&&this.u.k(l.I.C.aE,this.og)),(0,c.Xy)(this.ng,r)||(this.ng=r,this.u&&this.u.k(l.I.C.EE,this.ng)),this.mg(),t&&(p.Z.info(`Trigger with test condition found, firing test.`),this.fe(f.Z.kt)),this.fe(f.Z.OPEN);let i=this.sg,a;this.sg=[];for(let e=0;e<i.length;e++)a=Array.prototype.slice.call(i[e]),this.fe(...a)}}cg(e,t,n,r,i){let a=r=>{this.fg();let i=new Date().valueOf();e.dd(t)||(!1===navigator.onLine&&e.type===d.Z._r.Br&&r.imageUrl?p.Z.info(`Not showing ${e.type} trigger action ${e.id} due to offline state.`):e.nd(i)&&this.wg(e,i,n)?this.Jt.ic()===0?p.Z.info(`Not displaying trigger ${e.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`):(this.Jt.Dt([r]),this.yg(e,i)):p.Z.info(`Not displaying trigger ${e.id} because display time fell outside of the acceptable time window.`))},s=()=>{this.fg();let a=i.pop();if(a!=null)if(this.Tg(a,t,n,r,i),a.dd(t)){let e=`Server aborted in-app message display, but the timeout on fallback trigger ${a.id} has already elapsed.`;i.length>0&&(e+=` Continuing to fall back.`),p.Z.info(e),s()}else{p.Z.info(`Server aborted in-app message display. Falling back to lower priority ${a.type} trigger action ${e.id}.`);let o=1e3*a.ed-(new Date().valueOf()-t);o>0?this.eg.push(window.setTimeout((()=>{this.cg(a,t,n,r,i)}),o)):this.cg(a,t,n,r,i)}},c,l,f;switch(e.type){case d.Z._r.Br:if(c=(0,o.q)(e.data),c==null){p.Z.error(`Could not parse trigger data for trigger ${e.id}, ignoring.`);break}if(l=this.ig.Li(c),l){p.Z.error(l),s();break}a(c);break;case d.Z._r.md:if(f=u.fromJson(e.data,a,s,t,e.Nr||0),f==null){p.Z.error(`Could not parse trigger data for trigger ${e.id}, ignoring.`);break}this.ig.Yi(f,n,r);break;default:p.Z.error(`Trigger ${e.id} was of unexpected type ${e.type}, ignoring.`)}}fe(e,t=null,n){if(!(0,c.fk)(f.Z,e,`Cannot fire trigger action.`,`TriggerEvents`))return;if(this.zi&&this.zi.Nu())return p.Z.info(`Trigger sync is currently in progress, awaiting sync completion before firing trigger event.`),void this.sg.push(arguments);this.bg();let r=new Date().valueOf(),i=r-(this.hg||0),a=!0,o=!0,s=[];for(let n=0;n<this.triggers.length;n++){let i=this.triggers[n],c=r+1e3*i.ed;if(i.nd(c)&&(i.startTime==null||i.startTime.valueOf()<=r)&&(i.endTime==null||i.endTime.valueOf()>=r)){let n=!1;for(let r=0;r<i.sd.length;r++)if(i.sd[r].sc(e,t)){n=!0;break}n&&(a=!1,this.wg(i,c,e)&&(o=!1,s.push(i)))}}if(a)return void p.Z.info(`Trigger event ${e} did not match any trigger conditions.`);if(o)return void p.Z.info(`Ignoring ${e} trigger event because a trigger was displayed ${i/1e3}s ago.`);s.sort(((e,t)=>e.priority-t.priority));let l=s.pop();l!=null&&(p.Z.info(`Firing ${l.type} trigger action ${l.id} from trigger event ${e}.`),this.Tg(l,r,e,n,s),l.ed===0?this.cg(l,r,e,n,s):this.eg.push(window.setTimeout((()=>{this.cg(l,r,e,n,s)}),1e3*l.ed)))}changeUser(e=!1){if(this.triggers=[],this.u&&this.u.ti(l.I.C.rE),!e){this.sg=[],this.hg=null,this.og={},this.ng={};for(let e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[],this.u&&(this.u.ti(l.I.C.iE),this.u.ti(l.I.C.aE),this.u.ti(l.I.C.EE))}}clearData(){this.triggers=[],this.hg=null,this.og={},this.ng={};for(let e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[]}wg(e,t,n){if(this.hg==null)return!0;if(n===f.Z.kt)return p.Z.info(`Ignoring minimum interval between trigger because it is a test type.`),!0;let r=e.hd;return r??=this.tg,t-this.hg>=1e3*r}Tg(e,t,n,r,i){this.fg(),e.id&&(this.ng[e.id]=this.ng[e.id]||[]);let a={},o;a.Gr=t,a.ug=n,r!=null&&(o=r.Y()),a.dg=o;let s=[];for(let e of i)e.id&&s.push(e.id);a.pg=s,e.id&&this.ng[e.id].push(a),this.u&&this.u.k(l.I.C.EE,this.ng)}yg(e,t){this.fg(),e.ad(t),this.hg=t,e.id&&(this.og[e.id]=t),this.u&&(this.u.k(l.I.C.iE,t),this.u.k(l.I.C.aE,this.og))}}let h={t:!1,provider:null,rr:()=>(h.o(),h.provider||h.rg(),h.provider),rg:()=>{if(!h.provider){let e=i.ZP.nn(i.JY.Oo);h.provider=new m(e??30,r.Z.m().Mi(),i.ZP.l(),i.ZP.cr(),r.Z.m()),i.ZP.ar(h.provider)}},o:()=>{h.t||=(h.rg(),i.ZP.g(h),!0)},destroy:()=>{h.provider=null,h.t=!1}}},5333:(e,t,n)=>{n.d(t,{e:()=>i});var r=n(5825);function i(e,t,n){let i=e||document.querySelector(`head`),a=`ab-${t}-css-definitions-${`5.3.1`.replace(/\./g,`-`)}`;if(!i)return;let o=i.ownerDocument||document;if(o.getElementById(a)==null){let e=o.createElement(`style`);e.innerHTML=n||``,e.id=a;let t=r.ZP.nn(r.JY.bo);t!=null&&e.setAttribute(`nonce`,t),i.appendChild(e)}}},6959:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(5333),i=n(6524);function a(){(0,r.e)(void 0,`feed`,`body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}`),(0,i.N)()}},6524:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(5825);function i(){if(!r.ZP.nn(r.JY.Mo)&&document.querySelector(`link[rel=stylesheet][href="https://use.fontawesome.com/7f85a56ba4.css"]`)===null){let e=document.createElement(`link`);e.setAttribute(`rel`,`stylesheet`),e.setAttribute(`href`,`https://use.fontawesome.com/7f85a56ba4.css`),document.getElementsByTagName(`head`)[0].appendChild(e)}}},3046:(e,t,n)=>{n.d(t,{A9:()=>s,OL:()=>u,Tu:()=>l,je:()=>f,yi:()=>c,zA:()=>p});var r=n(335),i=n(8031),a=n(8548),o=n(3905);let s={types:{ro:`container`,logCustomEvent:`logCustomEvent`,setEmailNotificationSubscriptionType:`setEmailNotificationSubscriptionType`,setPushNotificationSubscriptionType:`setPushNotificationSubscriptionType`,setCustomUserAttribute:`setCustomUserAttribute`,requestPushPermission:`requestPushPermission`,addToSubscriptionGroup:`addToSubscriptionGroup`,removeFromSubscriptionGroup:`removeFromSubscriptionGroup`,addToCustomAttributeArray:`addToCustomAttributeArray`,removeFromCustomAttributeArray:`removeFromCustomAttributeArray`,no:`openLink`,ao:`openLinkInWebView`},properties:{type:`type`,oo:`steps`,eo:`args`}},c={Qi:`unknownBrazeAction`,Wi:`noPushPrompt`},l=(e,t)=>{switch(e){case c.Qi:return`${t} contains an unknown braze action type and will not be displayed.`;case c.Wi:return`${t} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`;default:return``}};function u(e){try{let t=e.match(o.y9),n=t?t[0].length:null,i=n?e.substring(n):null;if(n==null||n>e.length-1||!i)return void r.Z.error(`Did not find base64 encoded brazeAction in url to process : ${e}`);let s=(0,a.T)(i);return s?JSON.parse(s):void r.Z.error(`Failed to decode base64 encoded brazeAction: ${i}`)}catch(t){r.Z.error(`Failed to process brazeAction URL ${e} : ${(0,i.e)(t)}`);return}}function d(e,t){let n=!1;if(t){for(let r of t)if(n||=e(r),n)return!0}return!1}function f(e){let t=s.properties.type,n=s.properties.oo;try{if(e==null)return!0;let r=e[t];return r===s.types.ro?d(f,e[n]):!(0,o.OM)(r)}catch{return!0}}function p(e){if(!e||!(0,o.zR)(e))return!1;let t=s.properties.type,n=s.properties.oo,r=e[t];return r===s.types.ro?d(p,e[n]):r===s.types.requestPushPermission}},3695:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(2893);class i{constructor(){}ef(){}rf(){}Ta(e){}static sf(e,t){if(e&&t){if(e=e.toLowerCase(),(0,r.kJ)(t.ff)){for(let n=0;n<t.ff.length;n++)if(e.indexOf(t.ff[n].toLowerCase())!==-1)return t.identity}else if(e.indexOf(t.ff.toLowerCase())!==-1)return t.identity}}}var a=n(5806);class o extends i{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){let e=this.hc();this.browser=e.browser||`Unknown Browser`,this.version=e.version||`Unknown Version`}this.OS=null}ef(){return this.browser}rf(){return this.version}Ta(e){if(this.OS)return Promise.resolve(this.OS);let t=t=>{for(let n=0;n<e.length;n++){let r=o.sf(t,e[n]);if(r)return this.OS=r,this.OS}return t};return this.userAgentData.platform?Promise.resolve(t(this.userAgentData.platform)):this.getHighEntropyValues().then((e=>e.platform?t(e.platform):navigator.platform)).catch((()=>navigator.platform))}hc(){let e={},t=this.userAgentData.brands;if(t&&t.length)for(let n of t){let t=this.uc(a.s),r=n.brand.match(t);if(r&&r.length>0){e.browser=r[0],e.version=n.version;break}}return e}uc(e){let t=[];for(let n in e){let r=n;t.push(e[r])}return RegExp(`(`+t.join(`|`)+`)`,`i`)}getHighEntropyValues(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues([`platform`]):Promise.reject()}}class s extends i{constructor(){super(),this.fd=s.hc(navigator.userAgent||``)}ef(){return this.fd[0]||`Unknown Browser`}rf(){return this.fd[1]||`Unknown Version`}Ta(e){for(let t=0;t<e.length;t++){let n=e[t].string,r=s.sf(n,e[t]);if(r)return r===a.T.Pg&&navigator.maxTouchPoints>1&&(r=a.T.io),Promise.resolve(r)}return Promise.resolve(navigator.platform)}static hc(e){let t,n=e.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(e.indexOf(`(Web0S; Linux/SmartTV)`)!==-1)return[`LG Smart TV`,null];if(e.indexOf(`CrKey`)!==-1)return[`Chromecast`,null];if(e.indexOf(`BRAVIA`)!==-1||e.indexOf(`SonyCEBrowser`)!==-1||e.indexOf(`SonyDTV`)!==-1)return[`Sony Smart TV`,null];if(e.indexOf(`PhilipsTV`)!==-1)return[`Philips Smart TV`,null];if(e.match(/\b(Roku)\b/))return[`Roku`,null];if(e.match(/\bAFTM\b/))return[`Amazon Fire Stick`,null];if(n[1]===a.s.rO&&(t=e.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),t!=null))return t=t.slice(1),t[0]=t[0].replace(`OPR`,a.s.oO),t[0]=t[0].replace(`EdgA`,a.s.eO),t[0]===`Edg`&&(t[0]=a.s.eO),[t[0],t[1]];if(n[1]===a.s.Bg&&(t=e.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),t!=null))return t=t.slice(1),t[0]=t[0].replace(`EdgiOS`,a.s.eO),[t[0],t[1]];if(n=n[2]?[n[1],n[2]]:[null,null],n[0]===a.s.Bg&&(t=e.match(/version\/(\.?\d+(\.\d+)*)/i))!=null&&n.splice(1,1,t[1]),(t=e.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))!=null&&n.splice(1,1,t[2]),n[0]===a.s.oO&&(t=e.match(/mini\/(\.?\d+(\.\d+)*)/i))!=null)return[`Opera Mini`,t[1]||``];if(n[0]){let e=n[0].toLowerCase();e===`crios`&&(n[0]=a.s.rO),e===`tizen`&&(n[0]=`Samsung Smart TV`,n[1]=null),e===`samsungbrowser`&&(n[0]=`Samsung Browser`)}return n}}class c{constructor(){let e=navigator.userAgentData?o:s;this.Sg=new e,this.userAgent=navigator.userAgent,this.browser=this.Sg.ef(),this.version=this.Sg.rf(),this.OS=null,this.Ta().then((e=>this.OS=e));let t=navigator;this.language=(t.userLanguage||t.language||t.browserLanguage||t.systemLanguage||``).toLowerCase(),this.Zo=c.vg(this.userAgent)}IE(){return this.browser===a.s.Bg}Oa(){return this.OS||null}Ta(){return this.OS?Promise.resolve(this.OS):this.Sg.Ta(c.kg).then((e=>(this.OS=e,e)))}static vg(e){e=e.toLowerCase();let t=[`googlebot`,`bingbot`,`slurp`,`duckduckbot`,`baiduspider`,`yandex`,`facebookexternalhit`,`sogou`,`ia_archiver`,`https://github.com/prerender/prerender`,`aolbuild`,`bingpreview`,`msnbot`,`adsbot`,`mediapartners-google`,`teoma`,`taiko`];for(let n=0;n<t.length;n++)if(e.indexOf(t[n])!==-1)return!0;return!1}}c.kg=[{string:navigator.platform,ff:`Win`,identity:a.T.Og},{string:navigator.platform,ff:`Mac`,identity:a.T.Pg},{string:navigator.platform,ff:`BlackBerry`,identity:`BlackBerry`},{string:navigator.platform,ff:`FreeBSD`,identity:`FreeBSD`},{string:navigator.platform,ff:`OpenBSD`,identity:`OpenBSD`},{string:navigator.platform,ff:`Nintendo`,identity:`Nintendo`},{string:navigator.platform,ff:`SunOS`,identity:`SunOS`},{string:navigator.platform,ff:`PlayStation`,identity:`PlayStation`},{string:navigator.platform,ff:`X11`,identity:`X11`},{string:navigator.userAgent,ff:[`iPhone`,`iPad`,`iPod`],identity:a.T.io},{string:navigator.platform,ff:`Pike v`,identity:a.T.io},{string:navigator.userAgent,ff:[`Web0S`],identity:`WebOS`},{string:navigator.platform,ff:[`Linux armv7l`,`Android`],identity:a.T.xg},{string:navigator.userAgent,ff:[`Android`],identity:a.T.xg},{string:navigator.platform,ff:`Linux`,identity:`Linux`}];let l=new c},2893:(e,t,n)=>{n.d(t,{J_:()=>s,Kn:()=>c,VO:()=>i,XP:()=>u,Xy:()=>d,fk:()=>a,jV:()=>l,kJ:()=>o});var r=n(335);function i(e){let t=[],n;for(let r in e)n=r,Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==void 0&&t.push(e[n]);return t}function a(e,t,n,a){let o=i(e);return o.indexOf(t)!==-1||(r.Z.error(`${n} Valid values from ${a} are "${o.join(`"/"`)}".`),!1)}function o(e){return Array.isArray?Array.isArray(e):Object.prototype.toString.call(e)===`[object Array]`}function s(e){return Object.prototype.toString.call(e)===`[object Date]`}function c(e){return Object.prototype.toString.call(e)===`[object Object]`}function l(e,...t){e??=[];let n=[],r=arguments.length;for(let t=0,i=e.length;t<i;t++){let i=e[t];if(n.indexOf(i)!==-1)continue;let a=1;for(a=1;a<r&&arguments[a].indexOf(i)!==-1;a++);a===r&&n.push(i)}return n}function u(e){let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}function d(e,t){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;let n=e.toString();if(n!==t.toString())return!1;switch(n){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t}let r=n===`[object Array]`;if(!r){if(typeof e!=`object`||typeof t!=`object`)return!1;let n=e.constructor,r=t.constructor;if(n!==r&&!(typeof n==`function`&&n instanceof n&&typeof r==`function`&&r instanceof r)&&`constructor`in e&&`constructor`in t)return!1}let i=[],a=[],o=i.length;for(;o--;)if(i[o]===e)return a[o]===t;if(i.push(e),a.push(t),r){if(o=e.length,o!==t.length)return!1;for(;o--;)if(!d(e[o],t[o]))return!1}else{let n=u(e),r;if(o=n.length,u(t).length!==o)return!1;for(;o--;)if(r=n[o],!Object.prototype.hasOwnProperty.call(t,r)||!d(e[r],t[r]))return!1}return i.pop(),a.pop(),!0}},5242:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(1507),i=n(7429);function a(e,t,n){let a=document.createElement(`button`);a.setAttribute(`aria-label`,e),a.setAttribute(`tabindex`,`0`),a.setAttribute(`role`,`button`),(0,r.lj)(a,`touchstart`),a.className=`ab-close-button`;let o=(0,r.MK)(`0 0 15 15`,`M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z`,t);return a.appendChild(o),a.addEventListener(`keydown`,(e=>{e.keyCode!==i.m.Fo&&e.keyCode!==i.m.To||(n(),e.stopPropagation())})),a.onclick=e=>{n(),e.stopPropagation()},a}},7750:(e,t,n)=>{n.d(t,{$N:()=>u,BT:()=>s,FX:()=>i,Pn:()=>a,Rd:()=>c,X2:()=>o,_0:()=>l,yo:()=>d});var r=n(2893);function i(e,t=!1){let n=e/1e3;return t&&(n=Math.floor(n)),n}function a(e){return 1e3*e}function o(e){if(e==null)return null;let t=parseInt(e.toString());return isNaN(t)?null:new Date(1e3*t)}function s(e){return e!=null&&(0,r.J_)(e)?e.toISOString().replace(/\.[0-9]{3}Z$/,``):e}function c(e){return e==null||e===``?null:new Date(e)}function l(e){return e==null||e===``?new Date().valueOf():e}function u(e){return(new Date().valueOf()-e.valueOf())/1e3}function d(e){return(e.valueOf()-new Date().valueOf())/1e3}},5806:(e,t,n)=>{n.d(t,{T:()=>i,s:()=>r});let r={rO:`Chrome`,eO:`Edge`,oO:`Opera`,Bg:`Safari`,OO:`Firefox`},i={xg:`Android`,io:`iOS`,Pg:`Mac`,Og:`Windows`}},1507:(e,t,n)=>{n.d(t,{$j:()=>d,FZ:()=>f,Fr:()=>u,MK:()=>p,QZ:()=>s,lP:()=>a,lj:()=>c,mQ:()=>o,rJ:()=>l});var r=n(335),i=n(8031);let a={dc:null,po:function(e,t=!1,n=!1,r=!1){if(e==null)return!1;t||=!1,n||=!1;let i=e.getBoundingClientRect();return i!=null&&(i.top>=0&&i.top<=(window.innerHeight||document.documentElement.clientHeight)||!t)&&(i.left>=0||!r)&&(i.bottom>=0&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!n)&&(i.right<=(window.innerWidth||document.documentElement.clientWidth)||!r)}},o={Re:`up`,Se:`down`,U:`left`,V:`right`};function s(){if(a.dc==null){a.dc=!1;try{let e=Object.defineProperty({},"passive",{get:()=>{a.dc=!0}});window.addEventListener(`testPassive`,(()=>{}),e),window.removeEventListener(`testPassive`,(()=>{}),e)}catch(e){r.Z.error((0,i.e)(e))}}return a.dc}function c(e,t,n=(()=>{})){e.addEventListener(t,n,!!s()&&{passive:!0})}function l(e){return a.po(e,!0,!1,!1)}function u(e){return a.po(e,!1,!0,!1)}function d(e){if(e.onclick){let t=document.createEvent(`MouseEvents`);t.initEvent(`click`,!0,!0),e.onclick.apply(e,[t])}}function f(e,t,n){let r=null,i=null;c(e,`touchstart`,(e=>{r=e.touches[0].clientX,i=e.touches[0].clientY})),c(e,`touchmove`,(a=>{if(r==null||i==null)return;let s=r-a.touches[0].clientX,c=i-a.touches[0].clientY;Math.abs(s)>Math.abs(c)&&Math.abs(s)>=25?((s>0&&t===o.U||s<0&&t===o.V)&&n(a),r=null,i=null):Math.abs(c)>=25&&((c>0&&t===o.Re&&e.scrollTop===e.scrollHeight-e.offsetHeight||c<0&&t===o.Se&&e.scrollTop===0)&&n(a),r=null,i=null)}))}function p(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`);i.setAttribute(`viewBox`,e),i.setAttribute(`xmlns`,r);let a=document.createElementNS(r,`path`);return a.setAttribute(`d`,t),n!=null&&a.setAttribute(`fill`,n),i.appendChild(a),i}},8031:(e,t,n)=>{n.d(t,{e:()=>r});let r=e=>e instanceof Error?e.message:String(e)},7429:(e,t,n)=>{n.d(t,{m:()=>r});let r={Fo:32,lo:9,To:13,mh:27}},6504:(e,t,n)=>{n.d(t,{R:()=>r});let r=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e)},1843:(e,t,n)=>{n.d(t,{D:()=>o,Z:()=>s});var r=n(335),i=n(3826),a=n(8031);let o=e=>{let t={},n=e.toString().split(`\r
55
+ `&&e.push(G),o;case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`img`:case`keygen`:case`link`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:for(var h in e.push(pe(t)),r)if(f.call(r,h)&&(o=r[h],o!=null))switch(h){case`children`:case`dangerouslySetInnerHTML`:throw Error(n(399,t));default:ae(e,i,h,o)}return e.push(W),null;case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return ue(e,r,t,i);case`html`:return a.insertionMode===0&&e.push(me),ue(e,r,t,i);default:if(t.indexOf(`-`)===-1&&typeof r.is!=`string`)return ue(e,r,t,i);for(d in e.push(pe(t)),s=o=null,r)if(f.call(r,d)&&(c=r[d],c!=null))switch(d){case`children`:o=c;break;case`dangerouslySetInnerHTML`:s=c;break;case`style`:U(e,i,c);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:break;default:g(d)&&typeof c!=`function`&&typeof c!=`symbol`&&e.push(te,l(d),ne,l(w(c)),re)}return e.push(oe),se(e,s,o),o}}var ge=u(`</`),_e=u(`>`),ve=u(`<template id="`),ye=u(`"></template>`),be=u(`<!--$-->`),xe=u(`<!--$?--><template id="`),Se=u(`"></template>`),Ce=u(`<!--$!-->`),we=u(`<!--/$-->`);function Te(e,t,r){if(a(e,xe),r===null)throw Error(n(395));return a(e,r),o(e,Se)}var Ee=u(`<div hidden id="`),De=u(`">`),Oe=u(`</div>`),K=u(`<svg aria-hidden="true" style="display:none" id="`),ke=u(`">`),Ae=u(`</svg>`),q=u(`<math aria-hidden="true" style="display:none" id="`),J=u(`">`),je=u(`</math>`),Me=u(`<table hidden id="`),Ne=u(`">`),Pe=u(`</table>`),Fe=u(`<table hidden><tbody id="`),Ie=u(`">`),Le=u(`</tbody></table>`),Re=u(`<table hidden><tr id="`),ze=u(`">`),Be=u(`</tr></table>`),Ve=u(`<table hidden><colgroup id="`),He=u(`">`),Ue=u(`</colgroup></table>`);function We(e,t,r,i){switch(r.insertionMode){case 0:case 1:return a(e,Ee),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,De);case 2:return a(e,K),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,ke);case 3:return a(e,q),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,J);case 4:return a(e,Me),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,Ne);case 5:return a(e,Fe),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,Ie);case 6:return a(e,Re),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,ze);case 7:return a(e,Ve),a(e,t.segmentPrefix),a(e,l(i.toString(16))),o(e,He);default:throw Error(n(397))}}function Ge(e,t){switch(t.insertionMode){case 0:case 1:return o(e,Oe);case 2:return o(e,Ae);case 3:return o(e,je);case 4:return o(e,Pe);case 5:return o(e,Le);case 6:return o(e,Be);case 7:return o(e,Ue);default:throw Error(n(397))}}var Ke=u(`function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("`),qe=u(`$RS("`),Je=u(`","`),Ye=u(`")<\/script>`),Xe=u(`function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("`),Ze=u(`$RC("`),Qe=u(`","`),$e=u(`")<\/script>`),et=u(`function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()};$RX("`),tt=u(`$RX("`),nt=u(`")<\/script>`),rt=Object.assign,it=Symbol.for(`react.element`),at=Symbol.for(`react.portal`),ot=Symbol.for(`react.fragment`),st=Symbol.for(`react.strict_mode`),ct=Symbol.for(`react.profiler`),lt=Symbol.for(`react.provider`),ut=Symbol.for(`react.context`),dt=Symbol.for(`react.forward_ref`),ft=Symbol.for(`react.suspense`),pt=Symbol.for(`react.suspense_list`),mt=Symbol.for(`react.memo`),ht=Symbol.for(`react.lazy`),gt=Symbol.for(`react.scope`),_t=Symbol.for(`react.debug_trace_mode`),vt=Symbol.for(`react.legacy_hidden`),yt=Symbol.for(`react.default_value`),bt=Symbol.iterator;function xt(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ot:return`Fragment`;case at:return`Portal`;case ct:return`Profiler`;case st:return`StrictMode`;case ft:return`Suspense`;case pt:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ut:return(e.displayName||`Context`)+`.Consumer`;case lt:return(e._context.displayName||`Context`)+`.Provider`;case dt:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case mt:return t=e.displayName||null,t===null?xt(e.type)||`Memo`:t;case ht:t=e._payload,e=e._init;try{return xt(e(t))}catch{}}return null}var St={};function Ct(e,t){if(e=e.contextTypes,!e)return St;var n={},r;for(r in e)n[r]=t[r];return n}var wt=null;function Tt(e,t){if(e!==t){e.context._currentValue=e.parentValue,e=e.parent;var r=t.parent;if(e===null){if(r!==null)throw Error(n(401))}else{if(r===null)throw Error(n(401));Tt(e,r)}t.context._currentValue=t.value}}function Et(e){e.context._currentValue=e.parentValue,e=e.parent,e!==null&&Et(e)}function Dt(e){var t=e.parent;t!==null&&Dt(t),e.context._currentValue=e.value}function Ot(e,t){if(e.context._currentValue=e.parentValue,e=e.parent,e===null)throw Error(n(402));e.depth===t.depth?Tt(e,t):Ot(e,t)}function kt(e,t){var r=t.parent;if(r===null)throw Error(n(402));e.depth===r.depth?Tt(e,r):kt(e,r),t.context._currentValue=t.value}function At(e){var t=wt;t!==e&&(t===null?Dt(e):e===null?Et(t):t.depth===e.depth?Tt(t,e):t.depth>e.depth?Ot(t,e):kt(t,e),wt=e)}var jt={isMounted:function(){return!1},enqueueSetState:function(e,t){e=e._reactInternals,e.queue!==null&&e.queue.push(t)},enqueueReplaceState:function(e,t){e=e._reactInternals,e.replace=!0,e.queue=[t]},enqueueForceUpdate:function(){}};function Mt(e,t,n,r){var i=e.state===void 0?null:e.state;e.updater=jt,e.props=n,e.state=i;var a={queue:[],replace:!1};e._reactInternals=a;var o=t.contextType;if(e.context=typeof o==`object`&&o?o._currentValue:r,o=t.getDerivedStateFromProps,typeof o==`function`&&(o=o(n,i),i=o==null?i:rt({},i,o),e.state=i),typeof t.getDerivedStateFromProps!=`function`&&typeof e.getSnapshotBeforeUpdate!=`function`&&(typeof e.UNSAFE_componentWillMount==`function`||typeof e.componentWillMount==`function`))if(t=e.state,typeof e.componentWillMount==`function`&&e.componentWillMount(),typeof e.UNSAFE_componentWillMount==`function`&&e.UNSAFE_componentWillMount(),t!==e.state&&jt.enqueueReplaceState(e,e.state,null),a.queue!==null&&0<a.queue.length)if(t=a.queue,o=a.replace,a.queue=null,a.replace=!1,o&&t.length===1)e.state=t[0];else{for(a=o?t[0]:e.state,i=!0,o=+!!o;o<t.length;o++){var s=t[o];s=typeof s==`function`?s.call(e,a,n,r):s,s!=null&&(i?(i=!1,a=rt({},a,s)):rt(a,s))}e.state=a}else a.queue=null}var Nt={id:1,overflow:``};function Pt(e,t,n){var r=e.id;e=e.overflow;var i=32-Ft(r)-1;r&=~(1<<i),n+=1;var a=32-Ft(t)+i;if(30<a){var o=i-i%5;return a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,{id:1<<32-Ft(t)+i|n<<i|r,overflow:a+e}}return{id:1<<a|n<<i|r,overflow:e}}var Ft=Math.clz32?Math.clz32:Rt,It=Math.log,Lt=Math.LN2;function Rt(e){return e>>>=0,e===0?32:31-(It(e)/Lt|0)|0}function zt(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Bt=typeof Object.is==`function`?Object.is:zt,Vt=null,Ht=null,Ut=null,Wt=null,Gt=!1,Kt=!1,qt=0,Jt=null,Yt=0;function Xt(){if(Vt===null)throw Error(n(321));return Vt}function Zt(){if(0<Yt)throw Error(n(312));return{memoizedState:null,queue:null,next:null}}function Qt(){return Wt===null?Ut===null?(Gt=!1,Ut=Wt=Zt()):(Gt=!0,Wt=Ut):Wt.next===null?(Gt=!1,Wt=Wt.next=Zt()):(Gt=!0,Wt=Wt.next),Wt}function $t(){Ht=Vt=null,Kt=!1,Ut=null,Yt=0,Wt=Jt=null}function en(e,t){return typeof t==`function`?t(e):t}function tn(e,t,n){if(Vt=Xt(),Wt=Qt(),Gt){var r=Wt.queue;if(t=r.dispatch,Jt!==null&&(n=Jt.get(r),n!==void 0)){Jt.delete(r),r=Wt.memoizedState;do r=e(r,n.action),n=n.next;while(n!==null);return Wt.memoizedState=r,[r,t]}return[Wt.memoizedState,t]}return e=e===en?typeof t==`function`?t():t:n===void 0?t:n(t),Wt.memoizedState=e,e=Wt.queue={last:null,dispatch:null},e=e.dispatch=rn.bind(null,Vt,e),[Wt.memoizedState,e]}function nn(e,t){if(Vt=Xt(),Wt=Qt(),t=t===void 0?null:t,Wt!==null){var n=Wt.memoizedState;if(n!==null&&t!==null){var r=n[1];a:if(r===null)r=!1;else{for(var i=0;i<r.length&&i<t.length;i++)if(!Bt(t[i],r[i])){r=!1;break a}r=!0}if(r)return n[0]}}return e=e(),Wt.memoizedState=[e,t],e}function rn(e,t,r){if(25<=Yt)throw Error(n(301));if(e===Vt)if(Kt=!0,e={action:r,next:null},Jt===null&&(Jt=new Map),r=Jt.get(t),r===void 0)Jt.set(t,e);else{for(t=r;t.next!==null;)t=t.next;t.next=e}}function an(){throw Error(n(394))}function on(){}var sn={readContext:function(e){return e._currentValue},useContext:function(e){return Xt(),e._currentValue},useMemo:nn,useReducer:tn,useRef:function(e){Vt=Xt(),Wt=Qt();var t=Wt.memoizedState;return t===null?(e={current:e},Wt.memoizedState=e):t},useState:function(e){return tn(en,e)},useInsertionEffect:on,useLayoutEffect:function(){},useCallback:function(e,t){return nn(function(){return e},t)},useImperativeHandle:on,useEffect:on,useDebugValue:on,useDeferredValue:function(e){return Xt(),e},useTransition:function(){return Xt(),[!1,an]},useId:function(){var e=Ht.treeContext,t=e.overflow;e=e.id,e=(e&~(1<<32-Ft(e)-1)).toString(32)+t;var r=cn;if(r===null)throw Error(n(404));return t=qt++,e=`:`+r.idPrefix+`R`+e,0<t&&(e+=`H`+t.toString(32)),e+`:`},useMutableSource:function(e,t){return Xt(),t(e._source)},useSyncExternalStore:function(e,t,r){if(r===void 0)throw Error(n(407));return r()}},cn=null,ln=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function un(e){console.error(e)}function dn(){}function fn(e,t,n,r,i,a,o,s,c){var l=[],u=new Set;return t={destination:null,responseState:t,progressiveChunkSize:r===void 0?12800:r,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:u,pingedTasks:l,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:i===void 0?un:i,onAllReady:a===void 0?dn:a,onShellReady:o===void 0?dn:o,onShellError:s===void 0?dn:s,onFatalError:c===void 0?dn:c},n=mn(t,0,null,n),n.parentFlushed=!0,e=pn(t,e,null,n,u,St,null,Nt),l.push(e),t}function pn(e,t,n,r,i,a,o,s){e.allPendingTasks++,n===null?e.pendingRootTasks++:n.pendingTasks++;var c={node:t,ping:function(){var t=e.pingedTasks;t.push(c),t.length===1&&On(e)},blockedBoundary:n,blockedSegment:r,abortSet:i,legacyContext:a,context:o,treeContext:s};return i.add(c),c}function mn(e,t,n,r){return{status:0,id:-1,index:t,parentFlushed:!1,chunks:[],children:[],formatContext:r,boundary:n}}function hn(e,t){e=e.onError,e(t)}function gn(e,t){var n=e.onShellError;n(t),n=e.onFatalError,n(t),e.destination===null?(e.status=1,e.fatalError=t):(e.status=2,d(e.destination,t))}function _n(e,t,n,r,i){for(Vt={},Ht=t,qt=0,e=n(r,i);Kt;)Kt=!1,qt=0,Yt+=1,Wt=null,e=n(r,i);return $t(),e}function vn(e,t,r,i){var a=r.render(),o=i.childContextTypes;if(o!=null){var s=t.legacyContext;if(typeof r.getChildContext!=`function`)i=s;else{for(var c in r=r.getChildContext(),r)if(!(c in o))throw Error(n(108,xt(i)||`Unknown`,c));i=rt({},s,r)}t.legacyContext=i,xn(e,t,a),t.legacyContext=s}else xn(e,t,a)}function yn(e,t){if(e&&e.defaultProps){for(var n in t=rt({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function bn(e,t,r,i,a){if(typeof r==`function`)if(r.prototype&&r.prototype.isReactComponent){a=Ct(r,t.legacyContext);var o=r.contextType;o=new r(i,typeof o==`object`&&o?o._currentValue:a),Mt(o,r,i,a),vn(e,t,o,r)}else{o=Ct(r,t.legacyContext),a=_n(e,t,r,i,o);var s=qt!==0;if(typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0)Mt(a,r,i,o),vn(e,t,a,r);else if(s){i=t.treeContext,t.treeContext=Pt(i,1,0);try{xn(e,t,a)}finally{t.treeContext=i}}else xn(e,t,a)}else if(typeof r==`string`)switch(a=t.blockedSegment,o=he(a.chunks,r,i,e.responseState,a.formatContext),s=a.formatContext,a.formatContext=R(s,r,i),Cn(e,t,o),a.formatContext=s,r){case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`img`:case`input`:case`keygen`:case`link`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:break;default:a.chunks.push(ge,l(r),_e)}else{switch(r){case vt:case _t:case st:case ct:case ot:xn(e,t,i.children);return;case pt:xn(e,t,i.children);return;case gt:throw Error(n(343));case ft:a:{r=t.blockedBoundary,a=t.blockedSegment,o=i.fallback,i=i.children,s=new Set;var c={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:s},u=mn(e,a.chunks.length,c,a.formatContext);a.children.push(u);var d=mn(e,0,null,a.formatContext);d.parentFlushed=!0,t.blockedBoundary=c,t.blockedSegment=d;try{if(Cn(e,t,i),d.status=1,En(c,d),c.pendingTasks===0)break a}catch(t){d.status=4,hn(e,t),c.forceClientRender=!0}finally{t.blockedBoundary=r,t.blockedSegment=a}t=pn(e,o,r,u,s,t.legacyContext,t.context,t.treeContext),e.pingedTasks.push(t)}return}if(typeof r==`object`&&r)switch(r.$$typeof){case dt:if(i=_n(e,t,r.render,i,a),qt!==0){r=t.treeContext,t.treeContext=Pt(r,1,0);try{xn(e,t,i)}finally{t.treeContext=r}}else xn(e,t,i);return;case mt:r=r.type,i=yn(r,i),bn(e,t,r,i,a);return;case lt:if(a=i.children,r=r._context,i=i.value,o=r._currentValue,r._currentValue=i,s=wt,wt=i={parent:s,depth:s===null?0:s.depth+1,context:r,parentValue:o,value:i},t.context=i,xn(e,t,a),e=wt,e===null)throw Error(n(403));i=e.parentValue,e.context._currentValue=i===yt?e.context._defaultValue:i,e=wt=e.parent,t.context=e;return;case ut:i=i.children,i=i(r._currentValue),xn(e,t,i);return;case ht:a=r._init,r=a(r._payload),i=yn(r,i),bn(e,t,r,i,void 0);return}throw Error(n(130,r==null?r:typeof r,``))}}function xn(e,t,r){if(t.node=r,typeof r==`object`&&r){switch(r.$$typeof){case it:bn(e,t,r.type,r.props,r.ref);return;case at:throw Error(n(257));case ht:var i=r._init;r=i(r._payload),xn(e,t,r);return}if(D(r)){Sn(e,t,r);return}if(typeof r!=`object`||!r?i=null:(i=bt&&r[bt]||r[`@@iterator`],i=typeof i==`function`?i:null),i&&=i.call(r)){if(r=i.next(),!r.done){var a=[];do a.push(r.value),r=i.next();while(!r.done);Sn(e,t,a)}return}throw t=Object.prototype.toString.call(r),Error(n(31,t===`[object Object]`?`object with keys {`+Object.keys(r).join(`, `)+`}`:t))}typeof r==`string`?r!==``&&t.blockedSegment.chunks.push(l(w(r)),z):typeof r==`number`&&(e=``+r,e!==``&&t.blockedSegment.chunks.push(l(w(e)),z))}function Sn(e,t,n){for(var r=n.length,i=0;i<r;i++){var a=t.treeContext;t.treeContext=Pt(a,r,i);try{Cn(e,t,n[i])}finally{t.treeContext=a}}}function Cn(e,t,n){var r=t.blockedSegment.formatContext,i=t.legacyContext,a=t.context;try{return xn(e,t,n)}catch(c){if($t(),typeof c==`object`&&c&&typeof c.then==`function`){n=c;var o=t.blockedSegment,s=mn(e,o.chunks.length,null,o.formatContext);o.children.push(s),e=pn(e,t.node,t.blockedBoundary,s,t.abortSet,t.legacyContext,t.context,t.treeContext).ping,n.then(e,e),t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,At(a)}else throw t.blockedSegment.formatContext=r,t.legacyContext=i,t.context=a,At(a),c}}function wn(e){var t=e.blockedBoundary;e=e.blockedSegment,e.status=3,Dn(this,t,e)}function Tn(e){var t=e.blockedBoundary;e.blockedSegment.status=3,t===null?(this.allPendingTasks--,this.status!==2&&(this.status=2,this.destination!==null&&this.destination.close())):(t.pendingTasks--,t.forceClientRender||(t.forceClientRender=!0,t.parentFlushed&&this.clientRenderedBoundaries.push(t)),t.fallbackAbortableTasks.forEach(Tn,this),t.fallbackAbortableTasks.clear(),this.allPendingTasks--,this.allPendingTasks===0&&(e=this.onAllReady,e()))}function En(e,t){if(t.chunks.length===0&&t.children.length===1&&t.children[0].boundary===null){var n=t.children[0];n.id=t.id,n.parentFlushed=!0,n.status===1&&En(e,n)}else e.completedSegments.push(t)}function Dn(e,t,r){if(t===null){if(r.parentFlushed){if(e.completedRootSegment!==null)throw Error(n(389));e.completedRootSegment=r}e.pendingRootTasks--,e.pendingRootTasks===0&&(e.onShellError=dn,t=e.onShellReady,t())}else t.pendingTasks--,t.forceClientRender||(t.pendingTasks===0?(r.parentFlushed&&r.status===1&&En(t,r),t.parentFlushed&&e.completedBoundaries.push(t),t.fallbackAbortableTasks.forEach(wn,e),t.fallbackAbortableTasks.clear()):r.parentFlushed&&r.status===1&&(En(t,r),t.completedSegments.length===1&&t.parentFlushed&&e.partialBoundaries.push(t)));e.allPendingTasks--,e.allPendingTasks===0&&(e=e.onAllReady,e())}function On(e){if(e.status!==2){var t=wt,n=ln.current;ln.current=sn;var r=cn;cn=e.responseState;try{var i=e.pingedTasks,a;for(a=0;a<i.length;a++){var o=i[a],s=e,c=o.blockedSegment;if(c.status===0){At(o.context);try{xn(s,o,o.node),o.abortSet.delete(o),c.status=1,Dn(s,o.blockedBoundary,c)}catch(e){if($t(),typeof e==`object`&&e&&typeof e.then==`function`){var l=o.ping;e.then(l,l)}else{o.abortSet.delete(o),c.status=4;var u=o.blockedBoundary,d=e;if(hn(s,d),u===null?gn(s,d):(u.pendingTasks--,u.forceClientRender||(u.forceClientRender=!0,u.parentFlushed&&s.clientRenderedBoundaries.push(u))),s.allPendingTasks--,s.allPendingTasks===0){var f=s.onAllReady;f()}}}}}i.splice(0,a),e.destination!==null&&Pn(e,e.destination)}catch(t){hn(e,t),gn(e,t)}finally{cn=r,ln.current=n,n===sn&&At(t)}}}function kn(e,t,r){switch(r.parentFlushed=!0,r.status){case 0:var i=r.id=e.nextSegmentId++;return e=e.responseState,a(t,ve),a(t,e.placeholderPrefix),e=l(i.toString(16)),a(t,e),o(t,ye);case 1:r.status=2;var s=!0;i=r.chunks;var c=0;r=r.children;for(var u=0;u<r.length;u++){for(s=r[u];c<s.index;c++)a(t,i[c]);s=An(e,t,s)}for(;c<i.length-1;c++)a(t,i[c]);return c<i.length&&(s=o(t,i[c])),s;default:throw Error(n(390))}}function An(e,t,r){var i=r.boundary;if(i===null)return kn(e,t,r);if(i.parentFlushed=!0,i.forceClientRender)o(t,Ce),kn(e,t,r);else if(0<i.pendingTasks){i.rootSegmentID=e.nextSegmentId++,0<i.completedSegments.length&&e.partialBoundaries.push(i);var a=e.responseState,s=a.nextSuspenseID++;a=u(a.boundaryPrefix+s.toString(16)),i=i.id=a,Te(t,e.responseState,i),kn(e,t,r)}else if(i.byteSize>e.progressiveChunkSize)i.rootSegmentID=e.nextSegmentId++,e.completedBoundaries.push(i),Te(t,e.responseState,i.id),kn(e,t,r);else{if(o(t,be),r=i.completedSegments,r.length!==1)throw Error(n(391));An(e,t,r[0])}return o(t,we)}function jn(e,t,n){return We(t,e.responseState,n.formatContext,n.id),An(e,t,n),Ge(t,n.formatContext)}function Mn(e,t,r){for(var i=r.completedSegments,s=0;s<i.length;s++)Nn(e,t,r,i[s]);if(i.length=0,e=e.responseState,i=r.id,r=r.rootSegmentID,a(t,e.startInlineScript),e.sentCompleteBoundaryFunction?a(t,Ze):(e.sentCompleteBoundaryFunction=!0,a(t,Xe)),i===null)throw Error(n(395));return r=l(r.toString(16)),a(t,i),a(t,Qe),a(t,e.segmentPrefix),a(t,r),o(t,$e)}function Nn(e,t,r,i){if(i.status===2)return!0;var s=i.id;if(s===-1){if((i.id=r.rootSegmentID)===-1)throw Error(n(392));return jn(e,t,i)}return jn(e,t,i),e=e.responseState,a(t,e.startInlineScript),e.sentCompleteSegmentFunction?a(t,qe):(e.sentCompleteSegmentFunction=!0,a(t,Ke)),a(t,e.segmentPrefix),s=l(s.toString(16)),a(t,s),a(t,Je),a(t,e.placeholderPrefix),a(t,s),o(t,Ye)}function Pn(e,t){r=new Uint8Array(512),i=0;try{var c=e.completedRootSegment;if(c!==null&&e.pendingRootTasks===0){An(e,t,c),e.completedRootSegment=null;var l=e.responseState.bootstrapChunks;for(c=0;c<l.length-1;c++)a(t,l[c]);c<l.length&&o(t,l[c])}var u=e.clientRenderedBoundaries,d;for(d=0;d<u.length;d++){l=t;var f=e.responseState,p=u[d].id;if(a(l,f.startInlineScript),f.sentClientRenderFunction?a(l,tt):(f.sentClientRenderFunction=!0,a(l,et)),p===null)throw Error(n(395));if(a(l,p),!o(l,nt)){e.destination=null,d++,u.splice(0,d);return}}u.splice(0,d);var m=e.completedBoundaries;for(d=0;d<m.length;d++)if(!Mn(e,t,m[d])){e.destination=null,d++,m.splice(0,d);return}m.splice(0,d),s(t),r=new Uint8Array(512),i=0;var h=e.partialBoundaries;for(d=0;d<h.length;d++){var g=h[d];a:{u=e,f=t;var _=g.completedSegments;for(p=0;p<_.length;p++)if(!Nn(u,f,g,_[p])){p++,_.splice(0,p);var v=!1;break a}_.splice(0,p),v=!0}if(!v){e.destination=null,d++,h.splice(0,d);return}}h.splice(0,d);var y=e.completedBoundaries;for(d=0;d<y.length;d++)if(!Mn(e,t,y[d])){e.destination=null,d++,y.splice(0,d);return}y.splice(0,d)}finally{s(t),e.allPendingTasks===0&&e.pingedTasks.length===0&&e.clientRenderedBoundaries.length===0&&e.completedBoundaries.length===0&&t.close()}}function Fn(e){try{var t=e.abortableTasks;t.forEach(Tn,e),t.clear(),e.destination!==null&&Pn(e,e.destination)}catch(t){hn(e,t),gn(e,t)}}e.renderToReadableStream=function(e,t){return new Promise(function(n,r){var i,a,o=new Promise(function(e,t){a=e,i=t}),s=fn(e,F(t?t.identifierPrefix:void 0,t?t.nonce:void 0,t?t.bootstrapScriptContent:void 0,t?t.bootstrapScripts:void 0,t?t.bootstrapModules:void 0),L(t?t.namespaceURI:void 0),t?t.progressiveChunkSize:void 0,t?t.onError:void 0,a,function(){var e=new ReadableStream({type:`bytes`,pull:function(e){if(s.status===1)s.status=2,d(e,s.fatalError);else if(s.status!==2&&s.destination===null){s.destination=e;try{Pn(s,e)}catch(e){hn(s,e),gn(s,e)}}},cancel:function(){Fn(s)}});e.allReady=o,n(e)},function(e){o.catch(function(){}),r(e)},i);if(t&&t.signal){var c=t.signal,l=function(){Fn(s),c.removeEventListener(`abort`,l)};c.addEventListener(`abort`,l)}On(s)})},e.version=`18.1.0`})),ZS=o((e=>{var t=YS(),n=XS();e.version=t.version,e.renderToString=t.renderToString,e.renderToStaticMarkup=t.renderToStaticMarkup,e.renderToNodeStream=t.renderToNodeStream,e.renderToStaticNodeStream=t.renderToStaticNodeStream,e.renderToReadableStream=n.renderToReadableStream}))(),QS={getSvg(e){return(0,ZS.renderToStaticMarkup)((0,Q.jsx)(e,{...this.getCommonSvgProps()}))},getCommonSvgProps(){return{viewBox:`0 0 24 24`,role:`img`,"aria-hidden":`true`}}},$S=`d-inline-block svg-container`,eC=`span`,tC=function(e){return e.Standard=`std`,e.XXS=`xxs`,e.ExtraSmall=`xs`,e.Small=`sm`,e.Medium=`md`,e.Large=`lg`,e.ExtraLarge=`xlg`,e.XXL=`xxlg`,e}({});function nC(e){let{svg:t,className:n=$S,tagName:r=eC,size:i=`std`,onClick:a,title:o,tooltipSpanHackClassName:s,tooltipPlacement:c=`right`,tooltipSpanHack:l=!1,tooltipShow:u}=e,d=r,f={className:`${n} ${i}`,onClick:i_.isFunction(a)?a:null},p=t;return(0,Q.jsx)(JS,{title:o,placement:c,spanHack:l,spanHackClassName:s,show:u,children:(0,Q.jsx)(d,{...f,children:p&&(0,Q.jsx)(p,{...QS.getCommonSvgProps()})})})}function rC(e){return(0,Q.jsx)(`svg`,{...e,children:(0,Q.jsx)(`path`,{d:`m13.026 4.377 8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0M12 5 3.5 19h17zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2m.75-3.677a.69.69 0 0 1-.7.677.69.69 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677s.7.303.7.677z`,fill:`currentColor`})})}var iC={bars:`_bars_1gyu0_1`},aC={weak:`red`,fair:`orange`,good:`blue`,strong:`green`};function oC(e){switch(e){case 0:case 1:return`weak`;case 2:return`fair`;case 3:return`good`;case 4:return`strong`}return null}function sC(e,t,n){return t===0&&e===0?`bg-red`:e<=t-1?`bg-${aC[n]}`:`bg-light`}function cC(e){let t=oC(e.score);return(0,Q.jsxs)(`div`,{className:nd(`pb-3`,e.className),children:[(0,Q.jsx)(`ul`,{className:nd(`list-group list-group-horizontal d-flex gap-2`,iC.bars),children:Array.from({length:4},(n,r)=>(0,Q.jsx)(`li`,{className:nd(`list-group-item rounded-pill border-0 flex-grow-1 py-1`,sC(r,e.score,t))},`password-block_${r}`))}),(0,Q.jsx)(`div`,{className:nd(`mb-1 text-end`),children:t&&(0,Q.jsx)(`span`,{className:nd(`text-${aC[t]}`),children:e.strengthText})}),(e.warning||e.suggestions?.length>0)&&(0,Q.jsxs)(`div`,{className:`bg-light-orange d-flex gap-3 py-2 px-3`,children:[(0,Q.jsx)(nC,{svg:rC,className:`d-inline-block svg-container text-orange`,size:tC.Standard}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`span`,{children:e.suggestionHeader}),(0,Q.jsxs)(`ul`,{className:`mb-0`,children:[e.warning&&(0,Q.jsx)(`li`,{className:`mt-1`,children:e.warning}),e.suggestions?.map((e,t)=>(0,Q.jsx)(`li`,{className:`mt-1`,children:e},`suggestion-${t}`))]})]})]})]})}var lC=(e,t)=>{let[n,r]=Z.useState(e);return Z.useEffect(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n},uC=`modulepreload`,dC=function(e){return`/`+e},fC={},pC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=dC(t,n),t=s(t),t in fC)return;fC[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:uC,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},mC=150,hC=[`clickview`],gC=null;function _C(){return gC||=vC().catch(e=>{throw gC=null,e}),gC}async function vC(){let[e,t,n]=await Promise.all([pC(()=>import(`./DZiTrzZf.chunk.js`),[]),pC(()=>import(`./B7AxsMtH.chunk.js`),__vite__mapDeps([0,1])),pC(()=>import(`./DFawGnSF.chunk.js`),__vite__mapDeps([2,1]))]);return new e.ZxcvbnFactory({graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary,userInputs:hC}})}function yC(e){let t=lC(e,mC),[n,r]=Z.useState(null);return Z.useEffect(()=>{if(!t){r(null);return}let e=!1;async function n(){try{let n=await _C();e||r(n.check(t))}catch{e||r(null)}}return n(),()=>{e=!0}},[t]),n}var bC=[`extendedRepeat`,`simpleRepeat`];function xC(){let[e,t]=Z.useState(``),n=yC(e),r=n?.feedback?.warning,i=r&&_p.getWarningPhrase(r),a=n?.feedback.suggestions.filter(e=>_p.getSuggestPhrase(e)&&e!==r&&!(e===`repeated`&&bC.includes(r))).map(e=>_p.getSuggestPhrase(e)),o=n?.score;return{password:e,setPassword:t,passwordCheck:n,warning:i,suggestions:a,passwordScore:o,passwordStrength:(0,mp.capitalize)(oC(o))||``}}function SC(e){let{error:t,spinner:n,onClickContinue:r}=e;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme}),(0,Q.jsx)(up,{}),(0,Q.jsx)(`p`,{className:`text-center mb-4 mt-2`,children:`Your password has been updated`}),t&&(0,Q.jsx)(`p`,{className:`text-danger text-center mb-4 mt-2`,children:t}),(0,Q.jsx)(id,{className:`btn btn-lg w-100 btn-dark`,showSpinner:n,onClick:r,children:`Continue`})]})}function CC(e){let{submit:t}=e,{password:n,setPassword:r,warning:i,suggestions:a,passwordScore:o,passwordStrength:s,passwordCheck:c}=xC(),[l,u]=Z.useState(``),[d,f]=Z.useState(``),[p,m]=Z.useState(!1),[h,g]=Z.useState(null),{productName:_}=Ld.getDefinition(e.theme);function v(e){r(e.target.value),f(``)}function y(e){u(e.target.value),f(``)}function b(){let[e,t]=tp.isPasswordValid(n,l,!0);return t&&f(t),e}function x(e){e.preventDefault(),b()&&(m(!0),t(l).then(e=>{m(!1),g(e)}).catch(e=>{m(!1),f(e.userMessage||`Something went wrong`)}))}function S(){try{m(!0),zd(h,e)}catch(e){m(!1),f(e.userMessage||`Something went wrong`)}}return h?(0,Q.jsx)(SC,{error:d,spinner:p,onClickContinue:S,theme:e.theme}):(0,Q.jsxs)(`form`,{onSubmit:x,children:[(0,Q.jsxs)(rd,{onClickBack:e.onClickBack,theme:e.theme,title:e.heading,children:[`Create a new password to secure your `,(0,Q.jsx)(`strong`,{children:_}),` account`]}),(0,Q.jsxs)(`div`,{className:`mb-4`,children:[(0,Q.jsx)(qf,{className:`mb-3`,placeholder:`Enter your new password`,autoFocus:!0,value:n,onChange:v,name:`new-password`,autoComplete:`new-password`,hasError:!!d,"aria-invalid":!!d,"aria-errormessage":`new-passwordError`}),c&&(0,Q.jsx)(`div`,{className:`mt-n2`,children:(0,Q.jsx)(cC,{score:o,suggestions:a,warning:i,suggestionHeader:`Suggested ways to strengthen your password:`,strengthText:s})}),(0,Q.jsx)(qf,{id:`confirm-new-password`,label:`Confirm Password`,placeholder:`Enter your password confirmation`,value:l,onChange:y,name:`new-password`,autoComplete:`new-password`,hasError:!!d,"aria-invalid":!!d,"aria-errormessage":`new-passwordError`}),!!d&&(0,Q.jsx)(Cf,{name:`new-password`,children:d})]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:p,children:`Update password`})]})}function wC(e){let{email:t,code:n,navigate:r}=e;function i(e){return xd.post(`/ajax/login/reset-password`,{email:t,code:n,newPassword:e})}function a(){r({step:`forgot-password`,backStep:`username`})}return(0,Q.jsx)(CC,{heading:`Reset password`,submit:i,onClickBack:a,...e})}function TC(e){function t(e){return xd.post(`/ajax/login/change-password`,{newPassword:e})}return(0,Q.jsx)(CC,{heading:`Change password`,submit:t,...e})}function EC(e){let{navigate:t,backStep:n}=e,[r]=Z.useState(e.userId||``),[i,a]=Z.useState(e.username||``),[o,s]=Z.useState(!1),[c,l]=Z.useState(``);function u(e){a(e.target.value.trim())}function d(t){if(t.preventDefault(),!i){l(`Please provide an email or username`);return}s(!0),xd.post(`/ajax/login/send-self-activation-code`,{userId:r}).then(t=>zd(t,e,{userId:r,username:i})).catch(e=>{s(!1),l(e.userMessage||`Something went wrong`)})}function f(){t({step:n})}return(0,Q.jsxs)(`form`,{onSubmit:d,children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:n&&f,title:`Verify your email`,children:`We will send you a verification code to your email to activate your account.`}),(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(ud,{name:`email`,value:i,type:`username`,disabled:!0,onChange:u,isError:!!c,"aria-invalid":!!c,"aria-errormessage":`emailError`}),!!c&&(0,Q.jsx)(Cf,{name:`email`,children:c})]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:o,children:`Send verification code`}),(0,Q.jsx)(`p`,{className:`text-start mt-3`,children:`Single Sign On customers should contact their network administrator to activate their account.`})]})}function DC(e){let{navigate:t,userId:n,username:r,theme:i}=e;function a(){t({step:`self-activation`})}function o(){t({step:`self-activation`,userId:n})}function s(t){return xd.post(`/ajax/login/check-self-activation-code`,{code:t,userId:n}).then(n=>zd(n,e,{code:t}))}return(0,Q.jsx)(cp,{navigate:t,theme:i,title:`Enter code`,description:(0,Q.jsxs)(Q.Fragment,{children:[`Please enter the `,(0,Q.jsx)(`strong`,{children:`6 digit`}),` code we've sent to `,(0,Q.jsx)(`strong`,{children:r})]}),submit:s,onBack:a,onResend:o,...e})}var OC={badge:`_badge_1l0uk_1`};function kC(e){return(0,Q.jsx)(`span`,{className:`rounded-pill d-inline-block mb-1 badge-white border border-dark rounded-pill ${OC.badge}`,children:e.children})}function AC(e){let{navigate:t}=e;function n(){t({step:e.backStep})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:e.backStep?n:null,className:{description:`text-center`},children:!!e.email&&(0,Q.jsx)(kC,{children:e.email})}),(0,Q.jsx)(`span`,{className:`h4 mb-3 d-block text-center`,children:`Contact Support`}),(0,Q.jsxs)(`p`,{className:`text-center`,children:[`Please get in touch with our `,(0,Q.jsx)(`strong`,{children:`Product Support Team`}),` by emailing `,(0,Q.jsx)(`a`,{className:`text-info`,href:`mailto:support@clickvieweducation.com`,children:`support@clickvieweducation.com`}),` for further assistance.`]})]})}function jC(e){let t=fd(e.errorCode);return(0,Q.jsxs)(`div`,{className:`text-center`,children:[(0,Q.jsx)(rd,{theme:e.theme}),(0,Q.jsx)(`img`,{className:`img-fluid mb-4`,alt:`error`,src:`/images/errors/${t.errorImage||`default-v2.png`}`}),(0,Q.jsxs)(`div`,{className:`d-flex flex-column gap-3`,children:[(0,Q.jsx)(`h1`,{className:`h3 mb-0`,children:t.preferServerError?e.message:t.message}),!!t.additionalInformation&&(0,Q.jsx)(`p`,{className:`mb-0`,children:t.additionalInformation}),!!t.moreInfoUrl&&(0,Q.jsx)(`p`,{className:`mb-0`,children:(0,Q.jsx)(`a`,{href:t.moreInfoUrl,className:`text-info`,children:`Learn more`})}),(0,Q.jsx)(MC,{errorCode:e.errorCode,traceId:e.traceId})]})]})}function MC(e){return(0,Q.jsxs)(`div`,{className:`text-secondary small w-100`,children:[(0,Q.jsxs)(`p`,{className:`m-0`,children:[`Error Code: `,e.errorCode]}),(0,Q.jsxs)(`p`,{className:`m-0`,children:[`RequestId: `,e.traceId]})]})}function NC(e){let{token:t,email:n,userId:r,navigate:i}=e,[a,o]=Z.useState(!1);function s(){o(!0),xd.post(`/ajax/verify-email`,{token:t,email:n,userId:r}).then(t=>zd(t,e)).catch(()=>{i({step:`error`,errorCode:`invalid-token`})})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(rd,{theme:e.theme,title:`Before you proceed...`,children:[`Your email address `,(0,Q.jsx)(`strong`,{children:n}),` is already in use with another account. By continuing you will remove your email from the other account.`]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`button`,showSpinner:a,onClick:s,children:`Continue anyway`})]})}function PC(e){let{email:t,code:n,navigate:r}=e,[i,a]=Z.useState(!1);function o(){r({step:`verify-email`,email:t})}function s(){a(!0),xd.post(`/ajax/login/verify-email`,{email:t,code:n,acknowledgeEmailInUse:!0}).then(t=>zd(t,e)).catch(()=>{r({step:`error`,errorCode:`invalid-token`})})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(rd,{onClickBack:o,theme:e.theme,title:`Before you proceed...`,children:[`Your email address `,(0,Q.jsx)(`strong`,{children:t}),` is already in use with another account. By continuing you will remove your email from the other account.`]}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`button`,showSpinner:i,onClick:s,children:`Continue anyway`})]})}var FC=function(e){return e.NotNow=`not-now`,e.NoEmail=`no-email`,e.EmailNotReceived=`email-not-received`,e.Other=`other`,e}(FC||{});function IC(e){let{returnUrl:t,navigate:n,backStep:r}=e,[i,a]=Z.useState(),[o,s]=Z.useState(),[c,l]=Z.useState(!1),[u,d]=Z.useState(``),{productName:f}=Ld.getDefinition(e.theme);function p(){return i===`other`?tp.containsValidText(o)&&tp.isValidLength(o):Object.values(FC).includes(i)}function m(){n({step:r||`verify-email`})}function h(e){a(e)}function g(e){let t=e.target.value,n=``;tp.containsValidText(t)?tp.exceedsMaxLength(t)&&(n=`Your reason is too long`):n=`Your reason contains an invalid character or symbol`,d(n),s(t)}function _(n){if(n.preventDefault(),!p())return;l(!0);let r=i===`other`?`other:${o}`:i;xd.post(`/ajax/login/skip-verify-email`,{reason:r,returnUrl:t}).then(t=>zd(t,e)).catch(e=>{l(!1),d(e.userMessage||`Something went wrong`)})}return(0,Q.jsxs)(`form`,{onSubmit:_,children:[(0,Q.jsx)(rd,{onClickBack:m,theme:e.theme,title:`Let us know why you aren't able to verify`,className:{description:`mt-0 mb-0`},children:`Verifying will increase the security of your account and improve features on ClickView.`}),(0,Q.jsxs)(`div`,{className:`mb-4`,children:[(0,Q.jsxs)(`div`,{className:`form-check my-3`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`not-now`,name:`not-now`,checked:i===`not-now`,onChange:()=>h(`not-now`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`not-now`,children:`Not the right time`})]}),(0,Q.jsxs)(`div`,{className:`form-check my-3`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`no-email`,name:`no-email`,checked:i===`no-email`,onChange:()=>h(`no-email`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`no-email`,children:`I don't have an email address`})]}),(0,Q.jsxs)(`div`,{className:`form-check my-3`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`email-not-received`,name:`email-not-received`,checked:i===`email-not-received`,onChange:()=>h(`email-not-received`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`email-not-received`,children:`I didn't receive a verification email`})]}),(0,Q.jsxs)(`div`,{className:`form-check mt-3 mb-2`,children:[(0,Q.jsx)(`input`,{className:`form-check-input`,type:`radio`,id:`other`,name:`other`,checked:i===`other`,onChange:()=>h(`other`)}),(0,Q.jsx)(`label`,{className:`form-check-label`,htmlFor:`other`,children:`Other reasons (please specify)`})]}),i===`other`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${u?`is-invalid`:``}`,type:`text`,placeholder:`Enter your reason`,name:`reason`,onChange:g,autoComplete:`off`,"aria-invalid":!!u,"aria-errormessage":`reasonError`}),!!u&&(0,Q.jsx)(Cf,{name:`reason`,children:u})]})]}),(0,Q.jsxs)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,disabled:!p(),showSpinner:c,children:[`Continue to `,f]})]})}function LC(e){let{logoutId:t}=e,[n,r]=Z.useState(!1),{productName:i}=Ld.getDefinition(e.theme);function a(){r(!0)}return(0,Q.jsxs)(`form`,{onSubmit:a,action:`/logout`,method:`post`,children:[(0,Q.jsxs)(rd,{theme:e.theme,title:`Logout`,children:[`Would you like to logout of `,i,`?`]}),(0,Q.jsx)(`input`,{type:`hidden`,name:`logoutId`,value:t||``}),(0,Q.jsx)(`input`,{type:`hidden`,name:`__RequestVerificationToken`,value:xd.getXsrfToken()}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:n,children:`Yes`})]})}function RC(e){let{postLogoutRedirectUri:t,clientName:n,signOutIframeUrl:r,automaticRedirectAfterSignOut:i}=e;return Z.useEffect(()=>{!i||!t||(window.location.href=t)},[i,t]),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Logged out`,children:`You are now logged out.`}),t&&(0,Q.jsxs)(`p`,{children:[`Click `,(0,Q.jsx)(`a`,{href:t,className:`text-info`,children:`here`}),` to return to the `,n,` application.`]}),r&&(0,Q.jsx)(`iframe`,{width:0,height:0,frameBorder:0,src:r})]})}function zC(e){let{navigate:t,organisation:n,orgCustomers:r,backStep:i}=e,[a,o]=Z.useState(null),[s,c]=Z.useState(null);async function l(t){try{await xd.post(`/ajax/external/join-organisation-customer`,{customerId:t}),zd(await xd.post(`/ajax/login/select-customer`,{customerId:t}),e)}catch(e){c(e.userMessage||`Something went wrong. Please try again.`)}}function u(e){l(e.id)}function d(){t({step:`contact-support`,backStep:`organisation-select-customer`})}function f(){a&&l(a.id)}function p(){t({step:`select-customer`,backStep:`organisation-select-customer`})}function m(){t({step:i,backStep:null})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:i&&m}),(0,Q.jsxs)(`span`,{className:`h4 mb-3 d-block text-left`,children:[`To sign in, select a school from `,n.name]}),!!e.email&&(0,Q.jsx)(`p`,{className:`text-left`,children:(0,Q.jsx)(kC,{children:e.email})}),!!r?.length&&(0,Q.jsx)(`div`,{className:`mb-4`,children:r.length>10?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Schools`}),(0,Q.jsx)(`div`,{className:`mb-3`,children:(0,Q.jsx)(Bf,{id:`school`,item:a,items:r,onSelect:o,getName:e=>e.name,clearData:()=>o(null),placeholder:`Select a school`,size:`lg`,cantFindText:`My school is not listed`,onCantFind:d})}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-4`,disabled:!a,onClick:f,children:`Continue`})]}):(0,Q.jsxs)(`div`,{children:[r.map((e,t)=>(0,Q.jsx)(kf,{onClick:()=>u(e),text:e.name,icon:jf.buildAvatarUrl(e.logoUrl,{size:`small`})||Af,className:`mb-3`,iconColor:`dark`},t)),(0,Q.jsx)(`button`,{className:`text-info`,onClick:d,children:`My school is not listed`})]})}),e.hasExistingCustomers&&!i&&(0,Q.jsxs)(`button`,{className:`h5 d-flex w-100`,onClick:p,children:[`View my existing schools`,(0,Q.jsx)(`span`,{className:`ms-auto`,children:(0,Q.jsx)(Ef,{})})]}),s&&(0,Q.jsx)(`div`,{className:`text-danger text-center`,children:s})]})}function BC(e){if(!e)return{firstName:``,surname:``,source:``};let t=e.split(` `).filter(e=>e.length);return{firstName:t.shift(),surname:t.join(` `),source:e}}function VC(e){let{value:t,onChange:n,error:r,autoFocus:i}=e;return Z.useEffect(()=>{e.onChange(BC(e.value))},[]),(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`label`,{htmlFor:`name`,children:`Full name`}),(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${!!r&&`is-invalid`}`,type:`text`,name:`name`,id:`name`,value:t,placeholder:`Enter your full name`,autoFocus:i,autoComplete:`name`,onChange:e=>n(BC(e.target.value)),"aria-errormessage":`nameError`}),!!r&&(0,Q.jsx)(Cf,{name:`name`,children:r})]})}var $=function(e){return e.AU=`au`,e.NZ=`nz`,e.UK=`uk`,e.US=`us`,e.CA=`ca`,e}({}),HC=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Coordinator`,`Digital Technology Coordinator`,`SSO / SLSO`,`IT`,`Head of Department`,`Head of Subject`,`Assistant Principal`,`Deputy Principal`,`Principal`,`Business Manager`],UC=[`Teacher`,`Librarian / Teacher Librarian`,`IT/LRC`,`e-Learning/ICT Coordinator`,`Head of Key Stage`,`Head of Department`,`Subject Lead`,`Assistant Head Teacher`,`Deputy Head Teacher`,`Head Teacher`],WC=[`Teacher`,`Librarian / Teacher Librarian`,`Head of Department`,`Instructional Technology Specialist`,`Curriculum Coordinator`,`School Leadership`,`District Leadership`,`Academic Coach`,`Principal`,`IT / IT Specialist`],GC=[`Teacher`,`Librarian / Teacher Librarian`,`Curriculum Leader`,`e-Learning Coordinator`,`IT`,`Head of Department`,`Head of Faculty`,`Learning Support`,`Learning Assistant`,`Deputy Principal`,`Assistant Principal`,`Principal`],KC=[`Teacher`,`Librarian / Teacher Librarian`,`Educational Assistant (EA)`,`Learning Support Teacher / Resource Teacher`,`Department Head / Manager`,`Curriculum Coordinator / Consultant`,`School Counsellor / Guidance Counsellor`,`Vice-Principal`,`Principal`,`Superintendent`,`Director of Education`],qC=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teaching Assistant`,`Researcher`,`IT`],JC=[`Professor`,`Lecturer`,`Course Coordinator / Administrator`,`Digital Learning Manager`,`Tutor`,`Teaching Fellow`,`Librarian`,`Learning Technologist`,`Teacher`,`Teaching Assistant`,`Researcher`,`IT`],YC={[$.AU]:HC,[$.NZ]:GC,[$.UK]:UC,[$.US]:WC,[$.CA]:KC},XC={[$.AU]:qC,[$.UK]:JC};function ZC(e){let t=e.countryCode?.toLowerCase();return e.isTertiary?XC[t]||qC:YC[t]||WC}function QC(e){return e?.toLowerCase().includes(`student`)||e?.toLowerCase().includes(`parent`)}var $C=`OTHER`;function ew(e){let{error:t,onChange:n,countryCode:r,isTertiary:i,autoFocus:a}=e,[o,s]=Z.useState(``),[c,l]=Z.useState(``),u=ZC({countryCode:r,isTertiary:i});function d(e){s(e.target.value),l(``),n(e.target.value===$C?``:e.target.value)}function f(e){l(e.target.value),n(e.target.value)}let p=o===$C;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`label`,{htmlFor:`jobTitle`,children:`Job Title`}),(0,Q.jsxs)(`select`,{className:`form-select form-select-lg ${o.length?`text-dark`:`text-secondary`} ${!!t&&`is-invalid`}`,value:o,placeholder:`Role`,onChange:d,autoFocus:a,name:`jobTitle`,id:`jobTitle`,"aria-invalid":!!t&&!p,"aria-errormessage":t&&!p?`jobTitleError`:void 0,children:[(0,Q.jsx)(`option`,{value:``,disabled:!0,className:`text-secondary`,children:`What do you do?`}),u.map((e,t)=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},t)),(0,Q.jsx)(`option`,{value:$C,className:`text-dark`,children:`Other`})]}),!!t&&!p&&(0,Q.jsx)(Cf,{name:`jobTitle`,children:t})]}),p&&(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${!!t&&`is-invalid`}`,type:`text`,value:c,placeholder:`Enter your role`,autoFocus:!0,onChange:f,name:`role`,"aria-invalid":!!t,"aria-errormessage":`roleError`}),!!t&&(0,Q.jsx)(Cf,{name:`role`,children:t})]})]})}function tw(e){let{allowNameChange:t,allowJobTitleChange:n,errors:r,spinner:i,countryCode:a,setErrors:o}=e,[s,c]=Z.useState(),[l,u]=Z.useState(``),[d,f]=Z.useState(``),{password:p,setPassword:m,warning:h,suggestions:g,passwordScore:_,passwordStrength:v,passwordCheck:y}=xC();function b(e){m(e.target.value),o({...r,password:``})}function x(e){f(e.target.value),o({...r,password:``})}function S(e){c(e),o({...r,fullName:``})}function C(e){u(e),o({...r,jobTitle:``})}function w(r){r.preventDefault();let i={password:p,confirmPassword:d};t&&(i.firstName=s.firstName,i.surname=s.surname),n&&(i.jobTitle=l),e.onSubmit(i)}function T(){return t?`fullName`:n?`jobTitle`:`password`}let E=T();return(0,Q.jsxs)(`form`,{onSubmit:w,children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[t&&(0,Q.jsx)(VC,{value:s?.source||``,onChange:S,error:r.fullName,autoFocus:E===`fullName`}),n&&(0,Q.jsx)(ew,{error:r.jobTitle,onChange:C,countryCode:a,autoFocus:E===`jobTitle`,isTertiary:e.isTertiary}),(0,Q.jsx)(qf,{placeholder:`Enter your password`,value:p,onChange:b,name:`new-password`,autoComplete:`new-password`,hasError:!!r.password,autoFocus:E===`password`,"aria-errormessage":`new-passwordError`,className:nd(e.requireConfirmPassword&&`mb-3`)}),!r.password&&y&&(0,Q.jsx)(cC,{score:_,suggestions:g,warning:h,suggestionHeader:`Suggested ways to strengthen your password:`,strengthText:v}),e.requireConfirmPassword&&(0,Q.jsx)(qf,{id:`confirm-new-password`,label:`Confirm password`,placeholder:`Enter your password confirmation`,value:d,onChange:x,name:`new-password`,autoComplete:`new-password`,hasError:!!r.password,"aria-invalid":!!r.password,"aria-errormessage":`new-passwordError`}),!!r.password&&(0,Q.jsx)(Cf,{name:`new-password`,children:r.password})]}),!!r.default&&(0,Q.jsx)(`div`,{className:`text-danger my-3`,children:r.default}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:i,children:`Get Started`})]})}var nw=o(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),rw=o(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),iw=o(((e,t)=>{var n=rw();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),aw=o(((e,t)=>{var n=iw(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),ow=o(((e,t)=>{var n=iw();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),sw=o(((e,t)=>{var n=iw();function r(e){return n(this.__data__,e)>-1}t.exports=r})),cw=o(((e,t)=>{var n=iw();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),lw=o(((e,t)=>{var n=nw(),r=aw(),i=ow(),a=sw(),o=cw();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),uw=o(((e,t)=>{var n=lw();function r(){this.__data__=new n,this.size=0}t.exports=r})),dw=o(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),fw=o(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),pw=o(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),mw=o(((e,t)=>{t.exports=typeof globalThis==`object`&&globalThis&&globalThis.Object===Object&&globalThis})),hw=o(((e,t)=>{var n=mw(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),gw=o(((e,t)=>{t.exports=hw().Symbol})),_w=o(((e,t)=>{var n=gw(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),vw=o(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),yw=o(((e,t)=>{var n=gw(),r=_w(),i=vw(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),bw=o(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),xw=o(((e,t)=>{var n=yw(),r=bw(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),Sw=o(((e,t)=>{t.exports=hw()[`__core-js_shared__`]})),Cw=o(((e,t)=>{var n=Sw(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),ww=o(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),Tw=o(((e,t)=>{var n=xw(),r=Cw(),i=bw(),a=ww(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),Ew=o(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),Dw=o(((e,t)=>{var n=Tw(),r=Ew();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),Ow=o(((e,t)=>{t.exports=Dw()(hw(),`Map`)})),kw=o(((e,t)=>{t.exports=Dw()(Object,`create`)})),Aw=o(((e,t)=>{var n=kw();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),jw=o(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),Mw=o(((e,t)=>{var n=kw(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),Nw=o(((e,t)=>{var n=kw(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),Pw=o(((e,t)=>{var n=kw(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),Fw=o(((e,t)=>{var n=Aw(),r=jw(),i=Mw(),a=Nw(),o=Pw();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Iw=o(((e,t)=>{var n=Fw(),r=lw(),i=Ow();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),Lw=o(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),Rw=o(((e,t)=>{var n=Lw();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),zw=o(((e,t)=>{var n=Rw();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),Bw=o(((e,t)=>{var n=Rw();function r(e){return n(this,e).get(e)}t.exports=r})),Vw=o(((e,t)=>{var n=Rw();function r(e){return n(this,e).has(e)}t.exports=r})),Hw=o(((e,t)=>{var n=Rw();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),Uw=o(((e,t)=>{var n=Iw(),r=zw(),i=Bw(),a=Vw(),o=Hw();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),Ww=o(((e,t)=>{var n=lw(),r=Ow(),i=Uw(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),Gw=o(((e,t)=>{var n=lw(),r=uw(),i=dw(),a=fw(),o=pw(),s=Ww();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),Kw=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n})),qw=o(((e,t)=>{var n=Dw();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Jw=o(((e,t)=>{var n=qw();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Yw=o(((e,t)=>{var n=Jw(),r=rw(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),Xw=o(((e,t)=>{var n=Yw(),r=Jw();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),Zw=o(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Qw=o(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),$w=o(((e,t)=>{var n=yw(),r=Qw(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),eT=o(((e,t)=>{var n=$w(),r=Qw(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),tT=o(((e,t)=>{t.exports=Array.isArray})),nT=o(((e,t)=>{function n(){return!1}t.exports=n})),rT=o(((e,t)=>{var n=hw(),r=nT(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),iT=o(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),aT=o(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),oT=o(((e,t)=>{var n=yw(),r=aT(),i=Qw(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),sT=o(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),cT=o(((e,t)=>{var n=mw(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),lT=o(((e,t)=>{var n=oT(),r=sT(),i=cT(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),uT=o(((e,t)=>{var n=Zw(),r=eT(),i=tT(),a=rT(),o=iT(),s=lT(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),dT=o(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),fT=o(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),pT=o(((e,t)=>{t.exports=fT()(Object.keys,Object)})),mT=o(((e,t)=>{var n=dT(),r=pT(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),hT=o(((e,t)=>{var n=xw(),r=aT();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),gT=o(((e,t)=>{var n=uT(),r=mT(),i=hT();function a(e){return i(e)?n(e):r(e)}t.exports=a})),_T=o(((e,t)=>{var n=Xw(),r=gT();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),vT=o(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),yT=o(((e,t)=>{var n=bw(),r=dT(),i=vT(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),bT=o(((e,t)=>{var n=uT(),r=yT(),i=hT();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),xT=o(((e,t)=>{var n=Xw(),r=bT();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),ST=o(((e,t)=>{var n=hw(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),CT=o(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),wT=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),TT=o(((e,t)=>{function n(){return[]}t.exports=n})),ET=o(((e,t)=>{var n=wT(),r=TT(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),DT=o(((e,t)=>{var n=Xw(),r=ET();function i(e,t){return n(e,r(e),t)}t.exports=i})),OT=o(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),kT=o(((e,t)=>{t.exports=fT()(Object.getPrototypeOf,Object)})),AT=o(((e,t)=>{var n=OT(),r=kT(),i=ET(),a=TT();t.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=r(e);return t}:a})),jT=o(((e,t)=>{var n=Xw(),r=AT();function i(e,t){return n(e,r(e),t)}t.exports=i})),MT=o(((e,t)=>{var n=OT(),r=tT();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),NT=o(((e,t)=>{var n=MT(),r=ET(),i=gT();function a(e){return n(e,i,r)}t.exports=a})),PT=o(((e,t)=>{var n=MT(),r=AT(),i=bT();function a(e){return n(e,i,r)}t.exports=a})),FT=o(((e,t)=>{t.exports=Dw()(hw(),`DataView`)})),IT=o(((e,t)=>{t.exports=Dw()(hw(),`Promise`)})),LT=o(((e,t)=>{t.exports=Dw()(hw(),`Set`)})),RT=o(((e,t)=>{t.exports=Dw()(hw(),`WeakMap`)})),zT=o(((e,t)=>{var n=FT(),r=Ow(),i=IT(),a=LT(),o=RT(),s=yw(),c=ww(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),BT=o(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]==`string`&&n.call(e,`index`)&&(r.index=e.index,r.input=e.input),r}t.exports=r})),VT=o(((e,t)=>{t.exports=hw().Uint8Array})),HT=o(((e,t)=>{var n=VT();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),UT=o(((e,t)=>{var n=HT();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}t.exports=r})),WT=o(((e,t)=>{var n=/\w*$/;function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=r})),GT=o(((e,t)=>{var n=gw(),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a})),KT=o(((e,t)=>{var n=HT();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),qT=o(((e,t)=>{var n=HT(),r=UT(),i=WT(),a=GT(),o=KT(),s=`[object Boolean]`,c=`[object Date]`,l=`[object Map]`,u=`[object Number]`,d=`[object RegExp]`,f=`[object Set]`,p=`[object String]`,m=`[object Symbol]`,h=`[object ArrayBuffer]`,g=`[object DataView]`,_=`[object Float32Array]`,v=`[object Float64Array]`,y=`[object Int8Array]`,b=`[object Int16Array]`,x=`[object Int32Array]`,S=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`;function E(e,t,E){var D=e.constructor;switch(t){case h:return n(e);case s:case c:return new D(+e);case g:return r(e,E);case _:case v:case y:case b:case x:case S:case C:case w:case T:return o(e,E);case l:return new D;case u:case p:return new D(e);case d:return i(e);case f:return new D;case m:return a(e)}}t.exports=E})),JT=o(((e,t)=>{var n=bw(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),YT=o(((e,t)=>{var n=JT(),r=kT(),i=dT();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),XT=o(((e,t)=>{var n=zT(),r=Qw(),i=`[object Map]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),ZT=o(((e,t)=>{var n=XT(),r=sT(),i=cT(),a=i&&i.isMap;t.exports=a?r(a):n})),QT=o(((e,t)=>{var n=zT(),r=Qw(),i=`[object Set]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),$T=o(((e,t)=>{var n=QT(),r=sT(),i=cT(),a=i&&i.isSet;t.exports=a?r(a):n})),eE=o(((e,t)=>{var n=Gw(),r=Kw(),i=Yw(),a=_T(),o=xT(),s=ST(),c=CT(),l=DT(),u=jT(),d=NT(),f=PT(),p=zT(),m=BT(),h=qT(),g=YT(),_=tT(),v=rT(),y=ZT(),b=bw(),x=$T(),S=gT(),C=bT(),w=1,T=2,E=4,D=`[object Arguments]`,O=`[object Array]`,k=`[object Boolean]`,A=`[object Date]`,j=`[object Error]`,M=`[object Function]`,N=`[object GeneratorFunction]`,P=`[object Map]`,F=`[object Number]`,I=`[object Object]`,L=`[object RegExp]`,R=`[object Set]`,z=`[object String]`,B=`[object Symbol]`,V=`[object WeakMap]`,H=`[object ArrayBuffer]`,ee=`[object DataView]`,U=`[object Float32Array]`,te=`[object Float64Array]`,ne=`[object Int8Array]`,re=`[object Int16Array]`,ie=`[object Int32Array]`,ae=`[object Uint8Array]`,oe=`[object Uint8ClampedArray]`,W=`[object Uint16Array]`,se=`[object Uint32Array]`,ce={};ce[D]=ce[O]=ce[H]=ce[ee]=ce[k]=ce[A]=ce[U]=ce[te]=ce[ne]=ce[re]=ce[ie]=ce[P]=ce[F]=ce[I]=ce[L]=ce[R]=ce[z]=ce[B]=ce[ae]=ce[oe]=ce[W]=ce[se]=!0,ce[j]=ce[M]=ce[V]=!1;function le(e,t,O,k,A,j){var P,F=t&w,L=t&T,R=t&E;if(O&&(P=A?O(e,k,A,j):O(e)),P!==void 0)return P;if(!b(e))return e;var z=_(e);if(z){if(P=m(e),!F)return c(e,P)}else{var B=p(e),V=B==M||B==N;if(v(e))return s(e,F);if(B==I||B==D||V&&!A){if(P=L||V?{}:g(e),!F)return L?u(e,o(P,e)):l(e,a(P,e))}else{if(!ce[B])return A?e:{};P=h(e,B,F)}}j||=new n;var H=j.get(e);if(H)return H;j.set(e,P),x(e)?e.forEach(function(n){P.add(le(n,t,O,n,e,j))}):y(e)&&e.forEach(function(n,r){P.set(r,le(n,t,O,r,e,j))});var ee=z?void 0:(R?L?f:d:L?C:S)(e);return r(ee||e,function(n,r){ee&&(r=n,n=e[r]),i(P,r,le(n,t,O,r,e,j))}),P}t.exports=le})),tE=o(((e,t)=>{var n=eE(),r=1,i=4;function a(e){return n(e,r|i)}t.exports=a})),nE=o(((e,t)=>{var n=yw(),r=Qw(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),rE=o(((e,t)=>{var n=tT(),r=nE(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),iE=o(((e,t)=>{var n=Uw(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),aE=o(((e,t)=>{var n=iE(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),oE=o(((e,t)=>{var n=aE(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),sE=o(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),cE=o(((e,t)=>{var n=gw(),r=sE(),i=tT(),a=nE(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),lE=o(((e,t)=>{var n=cE();function r(e){return e==null?``:n(e)}t.exports=r})),uE=o(((e,t)=>{var n=tT(),r=rE(),i=oE(),a=lE();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),dE=o(((e,t)=>{var n=nE(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),fE=o(((e,t)=>{var n=uE(),r=dE();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),pE=o(((e,t)=>{var n=fE();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),mE=l(tE()),hE=l(pE()),gE={isEmpty(e){return Tm(e)},values(e){return Wm(e)},keys(e){return wm(e)},deepClone(e){return(0,mE.default)(e)},getEnumKeys(e){return Object.keys(e).filter(e=>!(parseInt(e)>=0))},isObject(e){return zp(e)},isEqual(e,t){return Am(e,t)},omit(e,t){return Lg(e,t)},pick(e,t){return Ig(e,t)},removeEmptyKeys(e){return Object.entries(e).filter(([,e])=>e!=null).reduce((e,[t,n])=>({...e,[t]:n}),{})},flattenObjectToString(e,t=``,n=`,`){return Object.keys(e).sort().map(n=>{let r=t?`${t}.${n}`:n;return typeof e[n]==`object`&&!Array.isArray(e[n])?gE.flattenObjectToString(e[n],r):`${r}:${e[n]}`}).join(n)},get(e,t,n){return(0,hE.default)(e,t,n)},swapKeysAndValues(e){return Object.entries(e).reduce((e,[t,n])=>({...e,[n]:t}),{})}},_E=function(e){return e[e.Unclassified=0]=`Unclassified`,e[e.Active=1]=`Active`,e[e.Prospect=2]=`Prospect`,e[e.LostCustomer=3]=`LostCustomer`,e[e.Disabled=4]=`Disabled`,e[e.Other=5]=`Other`,e}({}),vE=function(e){return e.Unclassified=`Unclassified`,e.Active=`Active`,e.Prospect=`Prospect`,e.LostCustomer=`LostCustomer`,e.Disabled=`Disabled`,e.Other=`Other`,e}({}),yE={[qu.Unclassified]:Ku.Unclassified,[qu.Primary]:Ku.Primary,[qu.Secondary]:Ku.Secondary,[qu.K12]:Ku.K12,[qu.Tertiary]:Ku.Tertiary,[qu.NonEducational]:Ku.NonEducational,[qu.Partners]:Ku.Partners,[qu.Internal]:Ku.Internal,[qu.Other]:Ku.Other,[qu.ClickView]:Ku.ClickView,[qu.System]:Ku.System},bE=gE.swapKeysAndValues(yE),xE={[vE.Unclassified]:_E.Unclassified,[vE.Active]:_E.Active,[vE.Prospect]:_E.Prospect,[vE.LostCustomer]:_E.LostCustomer,[vE.Disabled]:_E.Disabled,[vE.Other]:_E.Other},SE=gE.swapKeysAndValues(xE),CE={getCustomerType(e){return typeof e==`string`?yE[e]||Ku.Unclassified:e},getCustomerTypeString(e){return bE[e]||qu.Unclassified},getCustomerStatusString(e){return SE[e]||vE.Unclassified}};function wE(e){switch(e.errorCode.toString()){case`user.invalid-first-name`:case`user.invalid-surname`:return{fullName:e.userMessage};case`user.invalid-password`:case`user.same-password`:case`user.password-too-short`:return{password:e.userMessage};case`user.invalid-jobtitle`:return{default:e.userMessage};default:return{}}}function TE(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({}),{productName:a}=Ld.getDefinition(e.theme);function o(t){let{jobTitle:n,password:a,confirmPassword:o}=t,{firstName:s,surname:c}=t,l={},[u,d]=tp.isPasswordValid(a,o,e.requireConfirmPassword);return u||(l.password=d),e.allowNameChange&&(!s||!c)&&(l.fullName=`Please enter your full name.`),e.allowJobTitleChange&&!n?.length&&(l.jobTitle=`Please enter your role..`),i({...r,...l}),!Object.keys(l).length}function s(t){if(!o(t))return;let r={token:e.token,appLink:e.appLink,userId:e.userId,email:e.email,password:t.password};e.allowNameChange&&(r.firstName=t.firstName,r.surname=t.surname),e.allowJobTitleChange&&(r.jobTitle=t.jobTitle),n(!0),xd.post(`/ajax/activate/complete`,r).then(t=>zd(t,e)).catch(c)}function c(e){n(!1);let t=wE(e);i({...r,...t})}let l=e.customers?.some(e=>CE.getCustomerType(e.customerType)===Ku.Tertiary);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Welcome to ${a}`,children:`Create a password to login and get started`}),(0,Q.jsx)(tw,{allowNameChange:e.allowNameChange,allowJobTitleChange:e.allowJobTitleChange,errors:r,setErrors:i,onSubmit:s,spinner:t,requireConfirmPassword:e.requireConfirmPassword,countryCode:e.countryCode,isTertiary:l})]})}function EE(e){return(0,Q.jsx)(`div`,{className:`svg-container d-flex justify-content-center align-items-center ${e.className}`,children:(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,Q.jsx)(`path`,{d:`M18.7827 5.19245C19.0472 5.47531 19.074 5.96669 18.8425 6.28996L9.93345 18.7344C9.81748 18.8964 9.65175 18.9924 9.47572 18.9996C9.29969 19.0067 9.12911 18.9244 9.00457 18.7722L5.18639 14.1055C4.93787 13.8018 4.93787 13.3093 5.18639 13.0056C5.4349 12.7019 5.83783 12.7019 6.08634 13.0056L9.42354 17.0844L17.8847 5.26562C18.1161 4.94235 18.5182 4.90959 18.7827 5.19245Z`})})})}var DE={name:`_name_bthu2_1`,background:`_background_bthu2_4`,spinnerButton:`_spinnerButton_bthu2_7`,containerNotJoined:`_containerNotJoined_bthu2_11`,checkCircle:`_checkCircle_bthu2_18`,checkIcon:`_checkIcon_bthu2_22`,logo:`_logo_bthu2_27`};function OE(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(!1),[a,o]=Z.useState(!1),s;s=typeof e.icon==`function`?e.icon:()=>(0,Q.jsx)(`img`,{alt:`icon`,className:`w-100 h-100 border rounded-circle border`,src:e.icon});function c(){n(!0),e.onClickJoin().then(()=>i(!0)).finally(()=>n(!1))}function l(){let t=`py-2 btn btn-lg mb-3 w-100`;return r?{onClick:e.onClickLogin,role:`button`,tabIndex:0,className:`${t} bg-light-blue`}:{className:`${t} bg-light-blue cursor-default ${DE.containerNotJoined}`}}return(0,Q.jsx)(`div`,{...l(),children:(0,Q.jsxs)(`div`,{className:`py-1 d-flex align-items-center`,children:[!a&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`icon-circle rounded-circle text-white me-2 bg-blue d-flex justify-content-center align-items-center ${DE.logo}`,children:(0,Q.jsx)(s,{})}),(0,Q.jsx)(`span`,{className:`h6 mb-0 text-start me-2 ${DE.name}`,children:e.customerName})]}),r&&(0,Q.jsxs)(`div`,{className:`d-flex align-items-center ms-auto`,children:[(0,Q.jsx)(`div`,{className:`rounded-circle bg-green text-white me-2 d-flex align-items-center justify-content-center ${DE.checkCircle}`,children:(0,Q.jsx)(EE,{className:DE.checkIcon})}),(0,Q.jsx)(`div`,{className:`font-size-normal fw-semibold`,children:`Joined`}),(0,Q.jsx)(`span`,{className:`ms-1`,children:(0,Q.jsx)(Ef,{})})]}),!r&&!a&&(0,Q.jsxs)(`span`,{className:`ms-auto d-flex align-items-center`,children:[(0,Q.jsx)(id,{onClick:c,className:`btn btn-outline-dark font-weight-600 text-nowrap ${DE.spinnerButton}`,showSpinner:t,children:`Accept invite`}),e.canDeletePendingInvites&&(0,Q.jsx)(`button`,{onClick:()=>o(!0),className:`btn btn-link p-0 mx-1`,children:(0,Q.jsx)(`div`,{className:`svg-container`,children:(0,Q.jsx)(ad,{})})})]}),!r&&a&&(0,Q.jsxs)(`div`,{className:`font-size-normal d-flex align-items-center text-nowrap py-1`,children:[(0,Q.jsx)(`div`,{children:`Are you sure?`}),`\xA0`,(0,Q.jsx)(`button`,{className:`btn btn-link text-danger p-0`,onClick:e.onClickReject,children:`Decline invitation`}),`\xA0|\xA0`,(0,Q.jsx)(`button`,{className:`btn btn-link text-info p-0`,onClick:()=>o(!1),children:`Go back`})]})]})})}function kE(e){let{navigate:t,customers:n,returnUrl:r,isChangeCustomer:i,organisation:a,backStep:o,email:s}=e,[c,l]=Z.useState(null),[u,d]=Z.useState(null),[f,p]=Z.useState([]),m=e.pendingInvites?.filter(e=>!f.includes(e.customerId))??[],h=!!a&&!o;function g(){if(!s){t({step:`verify-email`,canSkip:!1});return}e.navigate({step:`prospect-select`,backStep:`select-customer`})}function _(t){let n=i?`/ajax/change-customer`:`/ajax/login/select-customer`;xd.post(n,{customerId:t,returnUrl:r}).then(t=>zd(t,e,{backStep:`select-customer`})).catch(e=>{d(e.userMessage||`Something went wrong. Please try again.`)})}function v(e){_(e.id)}function y(){c&&_(c.id)}function b(e){return new Promise((t,n)=>{xd.post(`/ajax/login/accept-invite`,{userProfileId:e}).then(t).catch(e=>{d(e.userMessage||`Something went wrong. Please try again.`),n()})})}function x(e,t){xd.post(`/ajax/login/deny-invite`,{userProfileId:t}).then(()=>{p(t=>t.concat(e))}).catch(e=>{d(e.userMessage||`Something went wrong. Please try again.`)})}function S(){t({step:`organisation-select-customer`,backStep:`select-customer`})}function C(){t({step:o,backStep:null})}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:o&&C,title:`Welcome back ${e.firstName||``} 👋`,children:!!e.email&&(0,Q.jsx)(kC,{children:e.email})}),(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Schools`}),n?.length?(0,Q.jsx)(Q.Fragment,{children:n.length>4?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`mb-3`,children:(0,Q.jsx)(Bf,{id:`school`,item:c,items:n,onSelect:l,getName:e=>e.name,clearData:()=>l(null),placeholder:`Select a school`,size:`lg`})}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,disabled:!c,onClick:y,children:`Continue`})]}):(0,Q.jsx)(Q.Fragment,{children:n?.map((e,t)=>(0,Q.jsx)(kf,{onClick:()=>v(e),text:e.name,icon:jf.buildAvatarUrl(e.logoUrl,{size:`small`})||Af,className:`mb-3`},t))})}):(0,Q.jsxs)(`div`,{className:`border border-secondary-subtle rounded-3 w-100 p-3 mb-3 d-flex align-items-center`,children:[(0,Q.jsx)(`span`,{className:`icon-circle rounded-circle text-white me-2 bg-secondary d-flex justify-content-center align-items-center`,children:(0,Q.jsx)(Af,{})}),(0,Q.jsx)(`span`,{className:`mb-0 fst-italic text-secondary`,children:`You currently don't have access to any schools`})]}),!!m?.length&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Pending Invitations`}),m.map(t=>(0,Q.jsx)(OE,{customerName:t.name,icon:jf.buildAvatarUrl(t.logoUrl,{size:`small`})||Af,onClickJoin:()=>b(t.userProfileId),onClickReject:()=>x(t.customerId,t.userProfileId),onClickLogin:()=>_(t.customerId),canDeletePendingInvites:e.canDeletePendingInvites},t.userProfileId))]}),!n?.length&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Waiting on a school admin?`}),(0,Q.jsx)(`p`,{className:`text-secondary mb-0`,children:s?(0,Q.jsxs)(Q.Fragment,{children:[`Ask them to invite `,(0,Q.jsx)(`strong`,{children:s}),` to access your school.`]}):(0,Q.jsx)(Q.Fragment,{children:`Speak to your school admin to get added in their ClickView admin console.`})})]}),e.showCreateProspect&&(0,Q.jsx)(`hr`,{}),e.showCreateProspect&&(0,Q.jsxs)(`div`,{className:`d-flex align-items-center justify-content-between mb-3`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`font-weight-600 mb-1`,children:`Evaluating ClickView on your own?`}),(0,Q.jsx)(`p`,{className:`text-secondary mb-0`,children:`Start a free trial.`})]}),(0,Q.jsx)(`button`,{className:`btn btn-outline-dark font-weight-600 text-nowrap ms-3`,onClick:g,children:`Start trial`})]}),!h&&dd.contactSupport&&(0,Q.jsxs)(`p`,{className:`text-center text-secondary mt-5`,children:[`Stuck, or think this is wrong? `,(0,Q.jsx)(`a`,{href:dd.contactSupport,target:`_blank`,children:`Contact support`})]})]}),h&&(0,Q.jsx)(`div`,{className:`text-center mt-3`,children:(0,Q.jsxs)(`button`,{className:`btn btn-link text-info`,onClick:S,children:[`Sign into another school in `,(0,Q.jsx)(`strong`,{children:a.name})]})}),u&&(0,Q.jsx)(`div`,{className:`text-danger text-center`,children:u})]})}var AE=dd.marketingSite,jE={[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/trial/`,[$.AU]:`/contact-us/sales`,[$.US]:`/contact-us/sales`,[$.CA]:`/contact-us/sales`};function ME(e,t){let{email:n,firstName:r,surname:i,salesforceId:a,countryCode:o}=e;if(!n)return null;let s=AE[o.toLowerCase()]||AE[$.US];if(!s)return null;let c={email:n};return r&&(c.fname=r),i&&(c.sname=i),a&&(c.id=a),`${s}${t}?${new URLSearchParams(c).toString()}`}function NE(e){let t=jE[e.countryCode.toLowerCase()]||jE[$.US];return t?ME(e,t):null}function PE(e){return ME(e,`/contact-us/trial-upgrade/`)}function FE(e){return!(!e||e.toLowerCase()===`teacher`)}var IE={[$.AU]:`02 9509 2600`,[$.UK]:`+44 (0)333 207 6595`,[$.NZ]:`09 916 1156`,[$.US]:`+1 (312) 763-9491`,[$.CA]:`+1 (312) 763-9491`};function LE(e){let{email:t,firstName:n,surname:r,jobTitle:i,countryCode:a,salesforceId:o,userType:s}=e,c={email:t,firstName:n,surname:r,countryCode:a,salesforceId:o},l=IE[a.toLowerCase()]||IE[$.US],u=NE(c),d=PE(c),{productName:f}=Ld.getDefinition(e.theme);return(0,Q.jsxs)(`div`,{className:`text-center`,children:[(0,Q.jsx)(rd,{theme:e.theme}),(0,Q.jsx)(`img`,{className:`img-fluid mb-4`,alt:`error`,src:`/images/errors/trial-expired.png`}),(0,Q.jsxs)(`h1`,{className:`h2`,children:[`Your `,f,` trial has ended`]}),s===`Learner`?(0,Q.jsx)(Q.Fragment,{}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`p`,{children:[`Learn more about how to upgrade and access all features available on `,f,`.`]}),(0,Q.jsx)(`div`,{className:`text-center`,children:u&&FE(i)?(0,Q.jsx)(`a`,{href:u,className:`btn btn-lg btn-dark`,children:`Book a call`}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`a`,{href:d,className:`btn btn-lg btn-dark w-100`,children:`Request upgrade`}),l&&(0,Q.jsxs)(`p`,{children:[`or `,(0,Q.jsx)(`br`,{}),`Speak to a team member on `,(0,Q.jsx)(`b`,{children:(0,Q.jsx)(`a`,{href:`tel:${l}`,children:l})})]})]})})]})]})}var RE=o(((e,t)=>{(function(){var e,n,r,i,a,o;typeof performance<`u`&&performance!==null&&performance.now?t.exports=function(){return performance.now()}:typeof process<`u`&&process!==null&&process.hrtime?(t.exports=function(){return(e()-a)/1e6},n=process.hrtime,e=function(){var e=n();return e[0]*1e9+e[1]},i=e(),o=process.uptime()*1e9,a=i-o):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(e)})),zE=o(((e,t)=>{for(var n=RE(),r=typeof window>`u`?globalThis:window,i=[`moz`,`webkit`],a=`AnimationFrame`,o=r[`request`+a],s=r[`cancel`+a]||r[`cancelRequest`+a],c=0;!o&&c<i.length;c++)o=r[i[c]+`Request`+a],s=r[i[c]+`Cancel`+a]||r[i[c]+`CancelRequest`+a];if(!o||!s){var l=0,u=0,d=[],f=1e3/60;o=function(e){if(d.length===0){var t=n(),r=Math.max(0,f-(t-l));l=r+t,setTimeout(function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(l)}catch(e){setTimeout(function(){throw e},0)}},Math.round(r))}return d.push({handle:++u,callback:e,cancelled:!1}),u},s=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}t.exports=function(e){return o.call(r,e)},t.exports.cancel=function(){s.apply(r,arguments)},t.exports.polyfill=function(e){e||=r,e.requestAnimationFrame=o,e.cancelAnimationFrame=s}})),BE=o(((e,t)=>{var n=null,r=[`Webkit`,`Moz`,`O`,`ms`];t.exports=function(e){n||=document.createElement(`div`);var t=n.style;if(e in t)return e;for(var i=e.charAt(0).toUpperCase()+e.slice(1),a=r.length;a>=0;a--){var o=r[a]+i;if(o in t)return o}return!1}})),VE=o(((e,t)=>{t.exports=a;var n=/\s/,r=/(_|-|\.|:)/,i=/([a-z][A-Z]|[A-Z][a-z])/;function a(e){return n.test(e)?e.toLowerCase():r.test(e)?(s(e)||e).toLowerCase():i.test(e)?l(e).toLowerCase():e.toLowerCase()}var o=/[\W_]+(.|$)/g;function s(e){return e.replace(o,function(e,t){return t?` `+t:``})}var c=/(.)([A-Z]+)/g;function l(e){return e.replace(c,function(e,t,n){return t+` `+n.toLowerCase().split(``).join(` `)})}})),HE=o(((e,t)=>{var n=VE();t.exports=r;function r(e){return n(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?` `+t:``}).trim()}})),UE=o(((e,t)=>{var n=HE();t.exports=r;function r(e){return n(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}})),WE=o(((e,t)=>{var n={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0};t.exports=function(e,t){return typeof t==`number`&&!n[e]?t+`px`:t}})),GE=o(((e,t)=>{var n=BE(),r=UE(),i={float:`cssFloat`},a=WE();function o(e,t,n){var r=i[t];if(r===void 0&&(r=c(t)),r){if(n===void 0)return e.style[r];e.style[r]=a(r,n)}}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&o(e,n,t[n])}function c(e){var t=r(e),a=n(t);return i[t]=i[e]=i[a]=a,a}function l(){arguments.length===2?typeof arguments[1]==`string`?arguments[0].style.cssText=arguments[1]:s(arguments[0],arguments[1]):o(arguments[0],arguments[1],arguments[2])}t.exports=l,t.exports.set=l,t.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(t,n){return t[n]=o(e,n||``),t},{}):o(e,t||``)}})),KE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){return typeof e==`string`}})),qE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var t=n(GE());function n(e){return e&&e.__esModule?e:{default:e}}var r=!1;function i(){if((!(arguments.length>0&&arguments[0]!==void 0)||arguments[0])&&r!==!1)return r;if(typeof document<`u`){var e=document.createElement(`div`);(0,t.default)(e,{width:100,height:100,position:`absolute`,top:-9999,overflow:`scroll`,MsOverflowStyle:`scrollbar`}),document.body.appendChild(e),r=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}else r=0;return r||0}})),JE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!1}})),YE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=e.clientWidth,n=getComputedStyle(e),r=n.paddingLeft,i=n.paddingRight;return t-parseFloat(r)-parseFloat(i)}})),XE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(e){var t=e.clientHeight,n=getComputedStyle(e),r=n.paddingTop,i=n.paddingBottom;return t-parseFloat(r)-parseFloat(i)}})),ZE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.containerStyleDefault={position:`relative`,overflow:`hidden`,width:`100%`,height:`100%`},e.containerStyleAutoHeight={height:`auto`},e.viewStyleDefault={position:`absolute`,top:0,left:0,right:0,bottom:0,overflow:`scroll`,WebkitOverflowScrolling:`touch`},e.viewStyleAutoHeight={position:`relative`,top:void 0,left:void 0,right:void 0,bottom:void 0},e.viewStyleUniversalInitial={overflow:`hidden`,marginRight:0,marginBottom:0},e.trackHorizontalStyleDefault={position:`absolute`,height:6},e.trackVerticalStyleDefault={position:`absolute`,width:6},e.thumbHorizontalStyleDefault={position:`relative`,display:`block`,height:`100%`},e.thumbVerticalStyleDefault={position:`relative`,display:`block`,width:`100%`},e.disableSelectStyle={userSelect:`none`},e.disableSelectStyleReset={userSelect:``}})),QE=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};e.renderViewDefault=a,e.renderTrackHorizontalDefault=o,e.renderTrackVerticalDefault=s,e.renderThumbHorizontalDefault=c,e.renderThumbVerticalDefault=l;var n=r(zu());function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return n.default.createElement(`div`,e)}function o(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{right:2,bottom:2,left:2,borderRadius:3});return n.default.createElement(`div`,t({style:o},a))}function s(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{right:2,bottom:2,top:2,borderRadius:3});return n.default.createElement(`div`,t({style:o},a))}function c(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{cursor:`pointer`,borderRadius:`inherit`,backgroundColor:`rgba(0,0,0,.2)`});return n.default.createElement(`div`,t({style:o},a))}function l(e){var r=e.style,a=i(e,[`style`]),o=t({},r,{cursor:`pointer`,borderRadius:`inherit`,backgroundColor:`rgba(0,0,0,.2)`});return n.default.createElement(`div`,t({style:o},a))}})),$E=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=zE(),i=h(r),a=h(GE()),o=zu(),s=h(A_()),c=h(KE()),l=h(qE()),u=h(JE()),d=h(YE()),f=h(XE()),p=ZE(),m=QE();function h(e){return e&&e.__esModule?e:{default:e}}function g(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function v(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return t&&(typeof t==`object`||typeof t==`function`)?t:e}function y(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var b=function(e){y(s,e);function s(e){var t;_(this,s);var n=[...arguments].slice(1),r=v(this,(t=s.__proto__||Object.getPrototypeOf(s)).call.apply(t,[this,e].concat(n)));return r.getScrollLeft=r.getScrollLeft.bind(r),r.getScrollTop=r.getScrollTop.bind(r),r.getScrollWidth=r.getScrollWidth.bind(r),r.getScrollHeight=r.getScrollHeight.bind(r),r.getClientWidth=r.getClientWidth.bind(r),r.getClientHeight=r.getClientHeight.bind(r),r.getValues=r.getValues.bind(r),r.getThumbHorizontalWidth=r.getThumbHorizontalWidth.bind(r),r.getThumbVerticalHeight=r.getThumbVerticalHeight.bind(r),r.getScrollLeftForOffset=r.getScrollLeftForOffset.bind(r),r.getScrollTopForOffset=r.getScrollTopForOffset.bind(r),r.scrollLeft=r.scrollLeft.bind(r),r.scrollTop=r.scrollTop.bind(r),r.scrollToLeft=r.scrollToLeft.bind(r),r.scrollToTop=r.scrollToTop.bind(r),r.scrollToRight=r.scrollToRight.bind(r),r.scrollToBottom=r.scrollToBottom.bind(r),r.handleTrackMouseEnter=r.handleTrackMouseEnter.bind(r),r.handleTrackMouseLeave=r.handleTrackMouseLeave.bind(r),r.handleHorizontalTrackMouseDown=r.handleHorizontalTrackMouseDown.bind(r),r.handleVerticalTrackMouseDown=r.handleVerticalTrackMouseDown.bind(r),r.handleHorizontalThumbMouseDown=r.handleHorizontalThumbMouseDown.bind(r),r.handleVerticalThumbMouseDown=r.handleVerticalThumbMouseDown.bind(r),r.handleWindowResize=r.handleWindowResize.bind(r),r.handleScroll=r.handleScroll.bind(r),r.handleDrag=r.handleDrag.bind(r),r.handleDragEnd=r.handleDragEnd.bind(r),r.state={didMountUniversal:!1},r}return n(s,[{key:`componentDidMount`,value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:`componentDidMountUniversal`,value:function(){this.props.universal&&this.setState({didMountUniversal:!0})}},{key:`componentDidUpdate`,value:function(){this.update()}},{key:`componentWillUnmount`,value:function(){this.removeListeners(),(0,r.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:`getScrollLeft`,value:function(){return this.view?this.view.scrollLeft:0}},{key:`getScrollTop`,value:function(){return this.view?this.view.scrollTop:0}},{key:`getScrollWidth`,value:function(){return this.view?this.view.scrollWidth:0}},{key:`getScrollHeight`,value:function(){return this.view?this.view.scrollHeight:0}},{key:`getClientWidth`,value:function(){return this.view?this.view.clientWidth:0}},{key:`getClientHeight`,value:function(){return this.view?this.view.clientHeight:0}},{key:`getValues`,value:function(){var e=this.view||{},t=e.scrollLeft,n=t===void 0?0:t,r=e.scrollTop,i=r===void 0?0:r,a=e.scrollWidth,o=a===void 0?0:a,s=e.scrollHeight,c=s===void 0?0:s,l=e.clientWidth,u=l===void 0?0:l,d=e.clientHeight,f=d===void 0?0:d;return{left:n/(o-u)||0,top:i/(c-f)||0,scrollLeft:n,scrollTop:i,scrollWidth:o,scrollHeight:c,clientWidth:u,clientHeight:f}}},{key:`getThumbHorizontalWidth`,value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollWidth,a=r.clientWidth,o=(0,d.default)(this.trackHorizontal),s=Math.ceil(a/i*o);return o<=s?0:t||Math.max(s,n)}},{key:`getThumbVerticalHeight`,value:function(){var e=this.props,t=e.thumbSize,n=e.thumbMinSize,r=this.view,i=r.scrollHeight,a=r.clientHeight,o=(0,f.default)(this.trackVertical),s=Math.ceil(a/i*o);return o<=s?0:t||Math.max(s,n)}},{key:`getScrollLeftForOffset`,value:function(e){var t=this.view,n=t.scrollWidth,r=t.clientWidth;return e/((0,d.default)(this.trackHorizontal)-this.getThumbHorizontalWidth())*(n-r)}},{key:`getScrollTopForOffset`,value:function(e){var t=this.view,n=t.scrollHeight,r=t.clientHeight;return e/((0,f.default)(this.trackVertical)-this.getThumbVerticalHeight())*(n-r)}},{key:`scrollLeft`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollLeft=e)}},{key:`scrollTop`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.view&&(this.view.scrollTop=e)}},{key:`scrollToLeft`,value:function(){this.view&&(this.view.scrollLeft=0)}},{key:`scrollToTop`,value:function(){this.view&&(this.view.scrollTop=0)}},{key:`scrollToRight`,value:function(){this.view&&(this.view.scrollLeft=this.view.scrollWidth)}},{key:`scrollToBottom`,value:function(){this.view&&(this.view.scrollTop=this.view.scrollHeight)}},{key:`addListeners`,value:function(){if(!(typeof document>`u`||!this.view)){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.addEventListener(`scroll`,this.handleScroll),(0,l.default)()&&(t.addEventListener(`mouseenter`,this.handleTrackMouseEnter),t.addEventListener(`mouseleave`,this.handleTrackMouseLeave),t.addEventListener(`mousedown`,this.handleHorizontalTrackMouseDown),n.addEventListener(`mouseenter`,this.handleTrackMouseEnter),n.addEventListener(`mouseleave`,this.handleTrackMouseLeave),n.addEventListener(`mousedown`,this.handleVerticalTrackMouseDown),r.addEventListener(`mousedown`,this.handleHorizontalThumbMouseDown),i.addEventListener(`mousedown`,this.handleVerticalThumbMouseDown),window.addEventListener(`resize`,this.handleWindowResize))}}},{key:`removeListeners`,value:function(){if(!(typeof document>`u`||!this.view)){var e=this.view,t=this.trackHorizontal,n=this.trackVertical,r=this.thumbHorizontal,i=this.thumbVertical;e.removeEventListener(`scroll`,this.handleScroll),(0,l.default)()&&(t.removeEventListener(`mouseenter`,this.handleTrackMouseEnter),t.removeEventListener(`mouseleave`,this.handleTrackMouseLeave),t.removeEventListener(`mousedown`,this.handleHorizontalTrackMouseDown),n.removeEventListener(`mouseenter`,this.handleTrackMouseEnter),n.removeEventListener(`mouseleave`,this.handleTrackMouseLeave),n.removeEventListener(`mousedown`,this.handleVerticalTrackMouseDown),r.removeEventListener(`mousedown`,this.handleHorizontalThumbMouseDown),i.removeEventListener(`mousedown`,this.handleVerticalThumbMouseDown),window.removeEventListener(`resize`,this.handleWindowResize),this.teardownDragging())}}},{key:`handleScroll`,value:function(e){var t=this,n=this.props,r=n.onScroll,i=n.onScrollFrame;r&&r(e),this.update(function(e){var n=e.scrollLeft,r=e.scrollTop;t.viewScrollLeft=n,t.viewScrollTop=r,i&&i(e)}),this.detectScrolling()}},{key:`handleScrollStart`,value:function(){var e=this.props.onScrollStart;e&&e(),this.handleScrollStartAutoHide()}},{key:`handleScrollStartAutoHide`,value:function(){this.props.autoHide&&this.showTracks()}},{key:`handleScrollStop`,value:function(){var e=this.props.onScrollStop;e&&e(),this.handleScrollStopAutoHide()}},{key:`handleScrollStopAutoHide`,value:function(){this.props.autoHide&&this.hideTracks()}},{key:`handleWindowResize`,value:function(){(0,l.default)(!1),this.forceUpdate()}},{key:`handleHorizontalTrackMouseDown`,value:function(e){e.preventDefault();var t=e.target,n=e.clientX,r=t.getBoundingClientRect().left,i=this.getThumbHorizontalWidth(),a=Math.abs(r-n)-i/2;this.view.scrollLeft=this.getScrollLeftForOffset(a)}},{key:`handleVerticalTrackMouseDown`,value:function(e){e.preventDefault();var t=e.target,n=e.clientY,r=t.getBoundingClientRect().top,i=this.getThumbVerticalHeight(),a=Math.abs(r-n)-i/2;this.view.scrollTop=this.getScrollTopForOffset(a)}},{key:`handleHorizontalThumbMouseDown`,value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientX,r=t.offsetWidth,i=t.getBoundingClientRect().left;this.prevPageX=r-(n-i)}},{key:`handleVerticalThumbMouseDown`,value:function(e){e.preventDefault(),this.handleDragStart(e);var t=e.target,n=e.clientY,r=t.offsetHeight,i=t.getBoundingClientRect().top;this.prevPageY=r-(n-i)}},{key:`setupDragging`,value:function(){(0,a.default)(document.body,p.disableSelectStyle),document.addEventListener(`mousemove`,this.handleDrag),document.addEventListener(`mouseup`,this.handleDragEnd),document.onselectstart=u.default}},{key:`teardownDragging`,value:function(){(0,a.default)(document.body,p.disableSelectStyleReset),document.removeEventListener(`mousemove`,this.handleDrag),document.removeEventListener(`mouseup`,this.handleDragEnd),document.onselectstart=void 0}},{key:`handleDragStart`,value:function(e){this.dragging=!0,e.stopImmediatePropagation(),this.setupDragging()}},{key:`handleDrag`,value:function(e){if(this.prevPageX){var t=e.clientX,n=this.trackHorizontal.getBoundingClientRect().left,r=this.getThumbHorizontalWidth()-this.prevPageX,i=-n+t-r;this.view.scrollLeft=this.getScrollLeftForOffset(i)}if(this.prevPageY){var a=e.clientY,o=this.trackVertical.getBoundingClientRect().top,s=this.getThumbVerticalHeight()-this.prevPageY,c=-o+a-s;this.view.scrollTop=this.getScrollTopForOffset(c)}return!1}},{key:`handleDragEnd`,value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:`handleDragEndAutoHide`,value:function(){this.props.autoHide&&this.hideTracks()}},{key:`handleTrackMouseEnter`,value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:`handleTrackMouseEnterAutoHide`,value:function(){this.props.autoHide&&this.showTracks()}},{key:`handleTrackMouseLeave`,value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:`handleTrackMouseLeaveAutoHide`,value:function(){this.props.autoHide&&this.hideTracks()}},{key:`showTracks`,value:function(){clearTimeout(this.hideTracksTimeout),(0,a.default)(this.trackHorizontal,{opacity:1}),(0,a.default)(this.trackVertical,{opacity:1})}},{key:`hideTracks`,value:function(){var e=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var t=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,a.default)(e.trackHorizontal,{opacity:0}),(0,a.default)(e.trackVertical,{opacity:0})},t)}}},{key:`detectScrolling`,value:function(){var e=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){e.lastViewScrollLeft===e.viewScrollLeft&&e.lastViewScrollTop===e.viewScrollTop&&(clearInterval(e.detectScrollingInterval),e.scrolling=!1,e.handleScrollStop()),e.lastViewScrollLeft=e.viewScrollLeft,e.lastViewScrollTop=e.viewScrollTop},100))}},{key:`raf`,value:function(e){var t=this;this.requestFrame&&i.default.cancel(this.requestFrame),this.requestFrame=(0,i.default)(function(){t.requestFrame=void 0,e()})}},{key:`update`,value:function(e){var t=this;this.raf(function(){return t._update(e)})}},{key:`_update`,value:function(e){var t=this.props,n=t.onUpdate,r=t.hideTracksWhenNotNeeded,i=this.getValues();if((0,l.default)()){var o=i.scrollLeft,s=i.clientWidth,c=i.scrollWidth,u=(0,d.default)(this.trackHorizontal),p=this.getThumbHorizontalWidth(),m={width:p,transform:`translateX(`+o/(c-s)*(u-p)+`px)`},h=i.scrollTop,g=i.clientHeight,_=i.scrollHeight,v=(0,f.default)(this.trackVertical),y=this.getThumbVerticalHeight(),b={height:y,transform:`translateY(`+h/(_-g)*(v-y)+`px)`};if(r){var x={visibility:c>s?`visible`:`hidden`},S={visibility:_>g?`visible`:`hidden`};(0,a.default)(this.trackHorizontal,x),(0,a.default)(this.trackVertical,S)}(0,a.default)(this.thumbHorizontal,m),(0,a.default)(this.thumbVertical,b)}n&&n(i),typeof e==`function`&&e(i)}},{key:`render`,value:function(){var e=this,n=(0,l.default)(),r=this.props;r.onScroll,r.onScrollFrame,r.onScrollStart,r.onScrollStop,r.onUpdate;var i=r.renderView,a=r.renderTrackHorizontal,s=r.renderTrackVertical,u=r.renderThumbHorizontal,d=r.renderThumbVertical,f=r.tagName;r.hideTracksWhenNotNeeded;var m=r.autoHide;r.autoHideTimeout;var h=r.autoHideDuration;r.thumbSize,r.thumbMinSize;var _=r.universal,v=r.autoHeight,y=r.autoHeightMin,b=r.autoHeightMax,x=r.style,S=r.children,C=g(r,[`onScroll`,`onScrollFrame`,`onScrollStart`,`onScrollStop`,`onUpdate`,`renderView`,`renderTrackHorizontal`,`renderTrackVertical`,`renderThumbHorizontal`,`renderThumbVertical`,`tagName`,`hideTracksWhenNotNeeded`,`autoHide`,`autoHideTimeout`,`autoHideDuration`,`thumbSize`,`thumbMinSize`,`universal`,`autoHeight`,`autoHeightMin`,`autoHeightMax`,`style`,`children`]),w=this.state.didMountUniversal,T=t({},p.containerStyleDefault,v&&t({},p.containerStyleAutoHeight,{minHeight:y,maxHeight:b}),x),E=t({},p.viewStyleDefault,{marginRight:n?-n:0,marginBottom:n?-n:0},v&&t({},p.viewStyleAutoHeight,{minHeight:(0,c.default)(y)?`calc(`+y+` + `+n+`px)`:y+n,maxHeight:(0,c.default)(b)?`calc(`+b+` + `+n+`px)`:b+n}),v&&_&&!w&&{minHeight:y,maxHeight:b},_&&!w&&p.viewStyleUniversalInitial),D={transition:`opacity `+h+`ms`,opacity:0},O=t({},p.trackHorizontalStyleDefault,m&&D,(!n||_&&!w)&&{display:`none`}),k=t({},p.trackVerticalStyleDefault,m&&D,(!n||_&&!w)&&{display:`none`});return(0,o.createElement)(f,t({},C,{style:T,ref:function(t){e.container=t}}),[(0,o.cloneElement)(i({style:E}),{key:`view`,ref:function(t){e.view=t}},S),(0,o.cloneElement)(a({style:O}),{key:`trackHorizontal`,ref:function(t){e.trackHorizontal=t}},(0,o.cloneElement)(u({style:p.thumbHorizontalStyleDefault}),{ref:function(t){e.thumbHorizontal=t}})),(0,o.cloneElement)(s({style:k}),{key:`trackVertical`,ref:function(t){e.trackVertical=t}},(0,o.cloneElement)(d({style:p.thumbVerticalStyleDefault}),{ref:function(t){e.thumbVertical=t}}))])}}]),s}(o.Component);e.default=b,b.propTypes={onScroll:s.default.func,onScrollFrame:s.default.func,onScrollStart:s.default.func,onScrollStop:s.default.func,onUpdate:s.default.func,renderView:s.default.func,renderTrackHorizontal:s.default.func,renderTrackVertical:s.default.func,renderThumbHorizontal:s.default.func,renderThumbVertical:s.default.func,tagName:s.default.string,thumbSize:s.default.number,thumbMinSize:s.default.number,hideTracksWhenNotNeeded:s.default.bool,autoHide:s.default.bool,autoHideTimeout:s.default.number,autoHideDuration:s.default.number,autoHeight:s.default.bool,autoHeightMin:s.default.oneOfType([s.default.number,s.default.string]),autoHeightMax:s.default.oneOfType([s.default.number,s.default.string]),universal:s.default.bool,style:s.default.object,children:s.default.node},b.defaultProps={renderView:m.renderViewDefault,renderTrackHorizontal:m.renderTrackHorizontalDefault,renderTrackVertical:m.renderTrackVerticalDefault,renderThumbHorizontal:m.renderThumbHorizontalDefault,renderThumbVertical:m.renderThumbVerticalDefault,tagName:`div`,thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}})),eD=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=n($E());function n(e){return e&&e.__esModule?e:{default:e}}e.default=t.default,e.Scrollbars=t.default}))(),tD={avatar:`_avatar_14f3v_1`,circle:`_circle_14f3v_1`};function nD(e){return e.logoUrl?(0,Q.jsx)(`div`,{className:`h-100`,children:(0,Q.jsx)(`img`,{alt:e.customerName,className:`rounded-circle ${tD.avatar}`,src:e.logoUrl})}):(0,Q.jsx)(`div`,{className:`${tD.circle} ${e.colourClass||`bg-ultramarine`} text-white rounded-circle`,children:(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,className:`svg-container lg`,children:(0,Q.jsx)(`path`,{d:`M 19.53125,14.5438 H 16.9875 v -4.28056 l 0.34144,0.15522 c 0.0629,0.0286 0.12884,0.0421 0.19372,0.0421 0.17815,0 0.34843,-0.10215 0.427,-0.2749 0.10712,-0.23569 0.003,-0.51357 -0.23278,-0.62069 L 12.46875,7.17941 V 5.43956 h 1.53962 c 0.25885,0 0.46875,-0.20987 0.46875,-0.46875 V 4.46875 C 14.47712,4.20987 14.26722,4 14.00837,4 H 12 C 11.74116,4 11.53125,4.20987 11.53125,4.46875 V 7.17941 L 6.28316,9.56494 c -0.23566,0.10712 -0.33991,0.385 -0.23272,0.62068 0.10706,0.23569 0.385,0.33985 0.62065,0.23275 l 0.34144,-0.15521 v 4.28059 H 4.46875 C 4.20991,14.54375 4,14.75362 4,15.0125 v 4.51875 C 4,19.79012 4.20991,20 4.46875,20 h 3.0125 3.0125 3.01244 3.0125 3.01256 C 19.79016,20.00005 20,19.79017 20,19.5313 V 15.01255 C 20,14.75367 19.79016,14.5438 19.53125,14.5438 Z M 7.0125,19.06255 H 4.9375 V 15.4813 h 2.075 z m 6.02497,0 h -2.07494 v -2.07497 h 2.07494 z m 3.01253,-4.05 v 4.05 h -2.075 v -2.54372 c 0,-0.25887 -0.20984,-0.46875 -0.46875,-0.46875 h -3.01244 c -0.25884,0 -0.46875,0.20988 -0.46875,0.46875 v 2.54372 h -2.075 v -4.05 H 7.95 V 9.83708 L 12,7.99617 16.05,9.83708 Z m 3.0125,4.05 h -2.075 V 15.4813 h 2.075 z M 12,10.0608 c -1.089,0 -1.97497,0.88594 -1.97497,1.97497 0,1.089 0.88597,1.975 1.97497,1.975 1.08906,0 1.97497,-0.886 1.97497,-1.975 0,-1.08903 -0.88594,-1.97497 -1.97497,-1.97497 z m 0,3.01244 c -0.57203,0 -1.03747,-0.46544 -1.03747,-1.0375 0,-0.57203 0.46544,-1.03747 1.03747,-1.03747 0.57209,0 1.03747,0.4654 1.03747,1.03747 0,0.57209 -0.46541,1.0375 -1.03747,1.0375 z`})})})}var rD=[`second`,`minute`,`hour`,`day`,`week`,`month`,`year`];function iD(e,t){if(t===0)return[`just now`,`right now`];var n=rD[Math.floor(t/2)];return e>1&&(n+=`s`),[e+` `+n+` ago`,`in `+e+` `+n]}var aD=[`秒`,`分钟`,`小时`,`天`,`周`,`个月`,`年`];function oD(e,t){if(t===0)return[`刚刚`,`片刻后`];var n=aD[~~(t/2)];return[e+` `+n+`前`,e+` `+n+`后`]}var sD={},cD=function(e,t){sD[e]=t},lD=function(e){return sD[e]||sD.en_US},uD=[60,60,24,7,365/7/12,12];function dD(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||``).trim().replace(/\.\d+/,``).replace(/-/,`/`).replace(/-/,`/`).replace(/(\d)T(\d)/,`$1 $2`).replace(/Z/,` UTC`).replace(/([+-]\d\d):?(\d\d)/,` $1$2`),new Date(e))}function fD(e,t){var n=+(e<0);e=Math.abs(e);for(var r=e,i=0;e>=uD[i]&&i<uD.length;i++)e/=uD[i];return e=Math.floor(e),i*=2,e>(i===0?9:1)&&(i+=1),t(e,i,r)[n].replace(`%s`,e.toString())}function pD(e,t){return((t?dD(t):new Date)-+dD(e))/1e3}var mD=function(e,t,n){return fD(pD(e,n&&n.relativeDate),lD(t))};cD(`en_US`,iD),cD(`zh_CN`,oD);var hD={tile:`_tile_wesrn_1`,avatar:`_avatar_wesrn_5`,email:`_email_wesrn_9`,subheading:`_subheading_wesrn_12`};function gD(e){let t=jf.buildAvatarUrl(e.avatarUrl,{size:`small`});return(0,Q.jsxs)(`div`,{className:`container my-4 p-3 rounded-3 ${hD.tile}`,children:[(0,Q.jsx)(`p`,{className:`${hD.subheading} mb-0`,children:`Account:`}),(0,Q.jsxs)(`div`,{className:`d-flex align-items-center pb-3`,children:[(0,Q.jsx)(`div`,{className:`h-100`,children:(0,Q.jsx)(`img`,{alt:`Avatar`,className:`rounded-circle ${hD.avatar}`,src:t})}),(0,Q.jsxs)(`div`,{className:`ms-2`,children:[(0,Q.jsxs)(`p`,{className:`mb-1 text-break mt-2`,children:[e.firstName,` `,e.surname]}),(0,Q.jsx)(`p`,{className:`mb-1 ${hD.email}`,children:e.email}),(0,Q.jsx)(`p`,{className:`m-0 text-secondary`,children:e.lastSignInTime?(0,Q.jsxs)(Q.Fragment,{children:[`Last logged in `,mD(e.lastSignInTime)]}):(0,Q.jsx)(Q.Fragment,{children:`No login history`})})]})]}),(0,Q.jsx)(`p`,{className:hD.subheading,children:`Has access to:`}),e.customers?.length?(0,Q.jsx)(eD.Scrollbars,{autoHeightMax:200,autoHeight:!0,children:(0,Q.jsx)(`div`,{className:`mb-n2`,children:e.customers.map(e=>(0,Q.jsxs)(`div`,{className:`d-flex align-items-center mb-2`,children:[(0,Q.jsx)(nD,{logoUrl:jf.buildAvatarUrl(e.logoUrl,{size:`small`}),customerName:e.name}),(0,Q.jsx)(`p`,{className:`mb-0 ms-2 text-break`,children:e.name})]},e.id))})}):(0,Q.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,Q.jsx)(nD,{logoUrl:``,colourClass:`bg-gray-500`}),(0,Q.jsx)(`p`,{className:`mb-0 ms-2 text-break text-secondary`,children:`No schools`})]})]})}function _D(e){let[t,n]=Z.useState(``),[r,i]=Z.useState(!1);function a(){i(!0);let t={userId:e.userId,email:e.email,idpId:e.idpId,externalUserId:e.externalUserId};xd.post(`/ajax/external/link-account`,t).then(t=>zd(t,e)).catch(e=>{i(!1),n(e.userMessage||`Something went wrong`)})}function o(){xd.post(`/ajax/external/continue`,{returnUrl:e.returnUrl,createWithoutEmail:!0}).then(t=>zd(t,e,{createWithoutEmail:!0})).catch(e=>{i(!1),n(e.userMessage||`Something went wrong`)})}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`It looks like you already have an account`,children:`We've found an existing account using the same email - would you like to link your accounts?`}),(0,Q.jsx)(gD,{firstName:e.firstName,surname:e.surname,avatarUrl:e.avatarUrl,email:e.email,lastSignInTime:e.lastSignInTime,customers:e.customers}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,showSpinner:r,type:`button`,onClick:a,children:`Link existing account`}),!!t&&(0,Q.jsx)(Cf,{name:`linkAccount`,children:t}),e.showCreateNewAccount&&(0,Q.jsx)(`button`,{className:`btn btn-link text-info w-100 mt-2 no-sso-link`,onClick:o,children:`Create new account`})]})}function vD(e){let{navigate:t,userId:n,email:r,externalUserId:i,idpId:a,returnUrl:o,theme:s}=e;function c(){t({step:`link-account`})}function l(){return xd.post(`/ajax/external/continue`,{returnUrl:o}).then(t=>zd(t,e))}function u(e){return xd.post(`/ajax/external/link-account-code`,{code:e,userId:n,email:r,idpId:a,externalUserId:i}).then(l)}return(0,Q.jsx)(cp,{navigate:t,theme:s,title:`Enter code`,description:(0,Q.jsxs)(Q.Fragment,{children:[`Please enter the `,(0,Q.jsx)(`strong`,{children:`6 digit`}),` code we've sent to `,(0,Q.jsx)(`strong`,{children:r})]}),submit:u,onBack:c,...e})}function yD(e){let{value:t,onChange:n,error:r,autoFocus:i}=e;return(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`label`,{htmlFor:`username`,children:`Email`}),(0,Q.jsx)(`input`,{className:`form-control form-control-lg ${!!r&&`is-invalid`}`,type:`email`,name:`username`,id:`username`,value:t,placeholder:`Enter your email`,autoFocus:!!i,onChange:e=>n(e.target.value),disabled:e.disabled,"aria-invalid":!!r,"aria-errormessage":`usernameError`}),!!r&&(0,Q.jsx)(Cf,{name:`username`,children:r})]})}function bD(e){let[t,n]=Z.useState(e.email||``),[r,i]=Z.useState({source:e.firstName||``}),{password:a,setPassword:o,warning:s,suggestions:c,passwordScore:l,passwordStrength:u,passwordCheck:d}=xC(),[f,p]=Z.useState(``);function m(t){i(t),e.setErrors({...e.errors,fullName:``})}function h(t){o(t.target.value),e.setErrors({...e.errors,password:``})}function g(t){n(t),e.setErrors({...e.errors,email:``})}function _(t){p(t),e.setErrors({...e.errors,jobTitle:``})}function v(n){n.preventDefault();let{firstName:i,surname:o}=r,s={firstName:i,surname:o,password:a,email:t};e.allowJobTitleChange&&(s.jobTitle=f),e.onSubmit(s)}let y=!e.email,b=e.errors.general||!y&&e.errors.email;return(0,Q.jsxs)(`form`,{onSubmit:v,children:[(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(VC,{value:r.source||``,onChange:m,error:e.errors.fullName,autoFocus:!0}),y&&(0,Q.jsx)(yD,{value:t,onChange:g,error:e.errors.email,disabled:!!e.email}),e.allowJobTitleChange&&(0,Q.jsx)(ew,{error:e.errors.jobTitle,onChange:_,countryCode:e.countryCode,autoFocus:!1,isTertiary:CE.getCustomerType(e.customerType)===Ku.Tertiary}),(0,Q.jsx)(qf,{placeholder:`Enter your password`,value:a,onChange:h,name:`new-password`,autoComplete:`new-password`,hasError:!!e.errors.password,"aria-invalid":!!e.errors.password,"aria-errormessage":`new-passwordError`}),!!e.errors.password&&(0,Q.jsx)(Cf,{name:`new-password`,children:e.errors.password}),!e.errors.password&&d&&(0,Q.jsx)(`div`,{children:(0,Q.jsx)(cC,{score:l,suggestions:c,warning:s,suggestionHeader:`Suggested ways to strengthen your password:`,strengthText:u})})]}),!!b&&(0,Q.jsx)(`div`,{className:`text-danger my-3`,children:b}),(0,Q.jsx)(id,{className:`btn btn-dark btn-lg w-100`,type:`submit`,showSpinner:e.spinner,children:`Get Started`})]})}function xD(e){switch(e.errorCode.toString()){case`user.invalid-first-name`:case`user.invalid-surname`:return{fullName:e.userMessage};case`user.invalid-password`:case`user.same-password`:case`user.password-too-short`:return{password:e.userMessage};case`user.invalid-email`:return{email:e.userMessage};case`invalid-token`:case`user.already-activated`:return{general:e.userMessage};case`user.invalid-jobtitle`:return{jobTitle:e.userMessage};default:return{}}}function SD(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({}),{productName:a}=Ld.getDefinition(e.theme);function o(t){let{firstName:n,surname:a,email:o,jobTitle:s,password:c}=t,l={},[u,d]=tp.isPasswordValid(c,``,!1);return u||(l.password=d),!e.email&&!tp.isEmail(o)&&(l.email=`Please enter a valid email.`),(!n||!a)&&(l.fullName=`Please enter your full name.`),e.allowJobTitleChange&&!s?.length&&(l.jobTitle=`Please enter your role..`),i({...r,...l}),!Object.keys(l).length}function s(t){if(!o(t))return;let r={email:e.email||t.email,firstName:t.firstName,surname:t.surname,invitationToken:e.invitationToken,password:t.password};e.allowJobTitleChange&&(r.jobTitle=t.jobTitle),n(!0),xd.post(`/ajax/invite`,r).then(t=>zd(t,e)).catch(c)}function c(e){n(!1);let t=xD(e);i({...r,...t})}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Welcome to ${a}!`,children:(0,Q.jsx)(`p`,{children:`Please fill out the form below to create your account`})}),(0,Q.jsx)(bD,{allowJobTitleChange:e.allowJobTitleChange,countryCode:e.countryCode,email:e.email,firstName:e.firstName,spinner:t,errors:r,setErrors:i,onSubmit:s,customerType:e.customer?.customerType})]})}function CD(e){let{returnUrl:t,customer:n}=e;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`d-flex justify-content-center my-5 px-2 px-lg-4`,children:(0,Q.jsx)(`img`,{src:`/images/invites/invite-accepted-v2.png`,className:`w-100 mx-auto h-auto`})}),(0,Q.jsx)(`div`,{className:`mb-3 d-flex justify-content-center`,children:(0,Q.jsx)(nD,{logoUrl:n.logoUrl,customerName:n.name})}),(0,Q.jsx)(rd,{theme:e.theme,className:{title:`text-center`,description:`text-center`},title:`Welcome to`,children:n.name}),t&&(0,Q.jsx)(`a`,{role:`button`,href:t,className:`btn btn-dark btn-lg w-100 text-decoration-none`,children:`Continue`})]})}var wD={selected:`_selected_1ryhi_1`};function TD(e){let{returnUrl:t,navigate:n}=e,[r,i]=Z.useState(null),{productName:a}=Ld.getDefinition(e.theme);function o(){if(!r)return;let i={returnUrl:t,userType:r===`staff`?1:2,createWithoutEmail:!!e.createWithoutEmail};xd.post(`/ajax/external/continue`,i).then(t=>zd(t,e,{createWithoutEmail:!1})).catch(e=>{n({step:`error`,errorCode:e.errorCode,traceId:e.traceId})})}let s=`btn btn-lg w-100 mb-3 border-dark`;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,title:`Let's get you started with ${a}`}),(0,Q.jsx)(`button`,{className:`${s} ${r===`staff`?wD.selected:``}`,onClick:()=>i(`staff`),children:`I am an educator`}),(0,Q.jsx)(`button`,{className:`${s} ${r===`learner`?wD.selected:``}`,onClick:()=>i(`learner`),children:`I am a student`}),(0,Q.jsx)(`button`,{className:`btn btn-dark btn-lg w-100`,disabled:!r,onClick:o,children:`Continue`})]})}var ED=o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e["@clickview/braze-client"]=r():n[`@clickview/braze-client`]=r()})(self,(()=>(()=>{var e,t,n={8322:e=>{e.exports=function(e){var t=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+t[1]-389564586|0)<<12|a>>>20)+n|0)&n|~a&r)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&n)+t[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+t[5]+1200080426|0)<<12|a>>>20)+n|0)&n|~a&r)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&n)+t[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+t[9]-1958414417|0)<<12|a>>>20)+n|0)&n|~a&r)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&n)+t[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&i|~r&a)+t[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+t[13]-40341101|0)<<12|a>>>20)+n|0)&n|~a&r)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&n)+t[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+t[6]-1069501632|0)<<9|a>>>23)+n|0)&r|n&~r)+t[11]+643717713|0)<<14|i>>>18)+a|0)&n|a&~n)+t[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+t[10]+38016083|0)<<9|a>>>23)+n|0)&r|n&~r)+t[15]-660478335|0)<<14|i>>>18)+a|0)&n|a&~n)+t[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+t[14]-1019803690|0)<<9|a>>>23)+n|0)&r|n&~r)+t[3]-187363961|0)<<14|i>>>18)+a|0)&n|a&~n)+t[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r&a|i&~a)+t[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+t[2]-51403784|0)<<9|a>>>23)+n|0)&r|n&~r)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&n|a&~n)+t[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+t[8]-2022574463|0)<<11|a>>>21)+n|0)^n^r)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^n)+t[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+t[4]+1272893353|0)<<11|a>>>21)+n|0)^n^r)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^n)+t[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+t[0]-358537222|0)<<11|a>>>21)+n|0)^n^r)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^n)+t[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((a=((a+=((n=((n+=(r^i^a)+t[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+t[12]-421815835|0)<<11|a>>>21)+n|0)^n^r)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^n)+t[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~n))+t[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~n))+t[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~n))+t[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((a=((a+=(r^((n=((n+=(i^(r|~a))+t[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+n|0)^((i=((i+=(n^(a|~r))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~n))+t[9]-343485551|0)<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function a(e){var t,i,a,o,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,r(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(u,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(u,a),u}function o(e){var n,r=``;for(n=0;n<4;n+=1)r+=t[e>>8*n+4&15]+t[e>>8*n&15];return r}function s(e){var t;for(t=0;t<e.length;t+=1)e[t]=o(e[t]);return e.join(``)}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e){var t,n=[],r=e.length;for(t=0;t<r-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return s(a(`hello`)),typeof ArrayBuffer>`u`||ArrayBuffer.prototype.slice||function(){function e(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(t,n){var r,i,a,o,s=this.byteLength,c=e(t,s),l=s;return n!==void 0&&(l=e(n,s)),c>l?new ArrayBuffer(0):(r=l-c,i=new ArrayBuffer(r),a=new Uint8Array(i),o=new Uint8Array(this,c,r),a.set(o),i)}}(),u.prototype.append=function(e){return this.appendBinary(c(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)n(this._hash,r(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),n=s(this._hash),e&&(n=l(n)),this.reset(),n},u.prototype.reset=function(){return this._buff=``,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var r,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(n(this._hash,e),o=0;o<16;o+=1)e[o]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),a=parseInt(r[1],16)||0,e[14]=i,e[15]=a,n(this._hash,e)},u.hash=function(e,t){return u.hashBinary(c(e),t)},u.hashBinary=function(e,t){var n=s(a(e));return t?l(n):n},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var t,r,a,o,s,c=(r=this._buff.buffer,a=e,o=!0,(s=new Uint8Array(r.byteLength+a.byteLength)).set(new Uint8Array(r)),s.set(new Uint8Array(a),r.byteLength),o?s:s.buffer),l=c.length;for(this._length+=e.byteLength,t=64;t<=l;t+=64)n(this._hash,i(c.subarray(t-64,t)));return this._buff=t-64<l?new Uint8Array(c.buffer.slice(t-64)):new Uint8Array,this},u.ArrayBuffer.prototype.end=function(e){var t,n,r=this._buff,i=r.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<i;t+=1)a[t>>2]|=r[t]<<(t%4<<3);return this._finish(a,i),n=s(this._hash),e&&(n=l(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e,t=u.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,r=e.length,i=new ArrayBuffer(r),a=new Uint8Array(i);for(n=0;n<r;n+=1)a[n]=e.charCodeAt(n);return t?a:i}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var r=s(function(e){var t,r,a,o,s,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.subarray(t-64,t)));for(r=(e=t-64<l?e.subarray(t-64):new Uint8Array).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)a[t>>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(n(u,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*l).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,n(u,a),u}(new Uint8Array(e)));return t?l(r):r},u}()},2730:(e,t,n)=>{n.d(t,{G:()=>r,r:()=>i});let r={CustomEvent:`ce`,Pr:`p`,_u:`pc`,vc:`ca`,Ea:`i`,qs:`ie`,M:`cci`,R:`ccic`,I:`ccc`,F:`ccd`,ql:`ss`,xl:`se`,Oi:`si`,Ei:`sc`,Gi:`sbc`,Cc:`sfe`,mo:`iec`,Uu:`lr`,zu:`uae`,O:`ci`,$:`cc`,Ju:`lcaa`,Eu:`lcar`,On:`inc`,Ln:`add`,Rn:`rem`,$n:`set`,Bn:`ncam`,Ku:`sgu`,Fr:`ffi`},i={Ar:`feed_displayed`,Ec:`content_cards_displayed`}},7070:(e,t,n)=>{n.d(t,{Z:()=>r});let r={W:function(){let e=(e=!1)=>{let t=(Math.random().toString(16)+`000000000`).substr(2,8);return e?`-`+t.substr(0,4)+`-`+t.substr(4,4):t};return e()+e(!0)+e(!0)+e()}}},5522:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t){this.database=e,this.vd=t,this.parent=typeof window>`u`?self:window,this.database=e,this.vd=t}Dd(){if(`indexedDB`in this.parent)return this.parent.indexedDB}isSupported(){try{if(this.Dd()==null)return!1;{let e=this.Dd()?.open(`Braze IndexedDB Support Test`);if(e&&(e.onupgradeneeded=()=>e.result.close(),e.onsuccess=()=>e.result.close()),typeof window<`u`){let e=window,t=e.chrome||e.browser||e.pd;if(t&&t.runtime&&t.runtime.id)return this.vd.info(`Not using IndexedDB for storage because we are running inside an extension`),!1}return!0}}catch(e){return this.vd.info(`Not using IndexedDB for storage due to following error: `+e),!1}}Bd(e,t){let n=this.Dd()?.open(this.database.Sd,this.database.VERSION);if(n==null)return typeof t==`function`&&t(),!1;let r=this;return n.onupgradeneeded=e=>{r.vd.info(`Upgrading indexedDB `+r.database.Sd+` to v`+r.database.VERSION+`...`);let t=e.target?.result;for(let e in r.database.ss){let n=e;r.database.ss.hasOwnProperty(e)&&!t.objectStoreNames.contains(r.database.ss[n])&&t.createObjectStore(r.database.ss[n])}},n.onsuccess=n=>{let i=n.target?.result;i.onversionchange=()=>{i.close(),typeof t==`function`&&t(),r.vd.error(`Needed to close the database unexpectedly because of an upgrade in another tab`)},e(i)},n.onerror=e=>{let n=e;return r.vd.info(`Could not open indexedDB `+r.database.Sd+` v`+r.database.VERSION+`: `+n.target?.errorCode),typeof t==`function`&&t(),!0},!0}setItem(e,t,n,r,i){if(!this.isSupported())return typeof i==`function`&&i(),!1;let a=this;return this.Bd((o=>{if(!o.objectStoreNames.contains(e))return a.vd.error(`Could not store object `+t+` in `+e+` on indexedDB `+a.database.Sd+` - `+e+` is not a valid objectStore`),typeof i==`function`&&i(),void o.close();let s=o.transaction([e],`readwrite`);s.oncomplete=()=>o.close();let c=s.objectStore(e).put(n,t);c.onerror=()=>{a.vd.error(`Could not store object `+t+` in `+e+` on indexedDB `+a.database.Sd),typeof i==`function`&&i()},c.onsuccess=()=>{typeof r==`function`&&r()}}),i)}getItem(e,t,n){if(!this.isSupported())return!1;let r=this;return this.Bd((i=>{if(!i.objectStoreNames.contains(e))return r.vd.error(`Could not retrieve object `+t+` in `+e+` on indexedDB `+r.database.Sd+` - `+e+` is not a valid objectStore`),void i.close();let a=i.transaction([e],`readonly`);a.oncomplete=()=>i.close();let o=a.objectStore(e).get(t);o.onerror=()=>{r.vd.error(`Could not retrieve object `+t+` in `+e+` on indexedDB `+r.database.Sd)},o.onsuccess=e=>{let t=e.target?.result;t!=null&&n(t)}}))}jr(e,t,n){if(!this.isSupported())return typeof n==`function`&&n(),!1;let r=this;return this.Bd((i=>{if(!i.objectStoreNames.contains(e))return r.vd.error(`Could not retrieve last record from `+e+` on indexedDB `+r.database.Sd+` - `+e+` is not a valid objectStore`),typeof n==`function`&&n(),void i.close();let a=i.transaction([e],`readonly`);a.oncomplete=()=>i.close();let o=a.objectStore(e).openCursor(null,`prev`);o.onerror=()=>{r.vd.error(`Could not open cursor for `+e+` on indexedDB `+r.database.Sd),typeof n==`function`&&n()},o.onsuccess=e=>{let r=e.target?.result;r!=null&&r.value!=null&&r.key!=null?t(r.key,r.value):typeof n==`function`&&n()}}),n)}re(e,t){if(!this.isSupported())return!1;let n=this;return this.Bd((r=>{if(!r.objectStoreNames.contains(e))return n.vd.error(`Could not delete record `+t+` from `+e+` on indexedDB `+n.database.Sd+` - `+e+` is not a valid objectStore`),void r.close();let i=r.transaction([e],`readwrite`);i.oncomplete=()=>r.close(),i.objectStore(e).delete(t).onerror=()=>{n.vd.error(`Could not delete record `+t+` from `+e+` on indexedDB `+n.database.Sd)}}))}Zt(e,t){if(!this.isSupported())return!1;let n=this;return this.Bd((r=>{if(!r.objectStoreNames.contains(e))return n.vd.error(`Could not retrieve objects from `+e+` on indexedDB `+n.database.Sd+` - `+e+` is not a valid objectStore`),void r.close();let i=r.transaction([e],`readwrite`);i.oncomplete=()=>r.close();let a=i.objectStore(e),o=a.openCursor(),s=[];o.onerror=()=>{s.length>0?(n.vd.info(`Cursor closed midway through for `+e+` on indexedDB `+n.database.Sd),t(s)):n.vd.error(`Could not open cursor for `+e+` on indexedDB `+n.database.Sd)},o.onsuccess=e=>{let n=e.target?.result;n==null?s.length>0&&t(s):(n.value!=null&&n.key!=null&&(a.delete(n.key).onsuccess=()=>{s.push(n.value)}),typeof n.continue==`function`&&n.continue())}}))}clearData(){if(!this.isSupported())return!1;let e=[];for(let t in this.database.ss){let n=t;this.database.ss.hasOwnProperty(t)&&this.database.ss[n]!==this.database.ss.ae&&e.push(this.database.ss[n])}let t=this;return this.Bd((function(n){let r=n.transaction(e,`readwrite`);r.oncomplete=()=>n.close();for(let n=0;n<e.length;n++){let i=e[n];r.objectStore(i).clear().onerror=function(){t.vd.error(`Could not clear `+this.source.name+` on indexedDB `+t.database.Sd)}}r.onerror=function(){t.vd.error(`Could not clear object stores on indexedDB `+t.database.Sd)}}))}}r.Yt={Qt:{Sd:`AppboyServiceWorkerAsyncStorage`,VERSION:6,ss:{$a:`data`,hr:`pushClicks`,cu:`pushSubscribed`,Cd:`fallbackDevice`,ts:`cardUpdates`,ae:`optOut`,wr:`pendingData`,jh:`sdkAuthenticationSignature`},ie:1}}},335:(e,t,n)=>{n.d(t,{Z:()=>i});let r={init:function(e){e===void 0&&r.zg!==void 0||(r.zg=!!e),r.t||=!0},destroy:function(){r.t=!1,r.zg=void 0,r.vd=void 0},setLogger:function(e){typeof e==`function`?(r.init(),r.vd=e):r.info(`Ignoring setLogger call since logger is not a function`)},toggleLogging:function(){r.init(),r.zg?(console.log(`Disabling Braze logging`),r.zg=!1):(console.log(`Enabled Braze logging`),r.zg=!0)},info:function(e){if(r.zg){let t=`Braze: `+e;r.vd==null?console.log(t):r.vd(t)}},warn:function(e){if(r.zg){let t=`Braze SDK Warning: `+e+` (v5.3.1)`;r.vd==null?console.warn(t):r.vd(t)}},error:function(e){if(r.zg){let t=`Braze SDK Error: `+e+` (v5.3.1)`;r.vd==null?console.error(t):r.vd(t)}}},i=r},7529:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(5563),i=n(9179),a=n(4673),o=n(335),s=n(2730),c=n(5966);class l{constructor(e){this.u=e,this.u=e}h(e,t){let n=new a.Z;if(e.p(),e.url==null||e.url===``)return o.Z.info(`Card ${e.id} has no url. Not logging click to Braze servers.`),n;if(t&&e.id&&this.u){let t=this.u.j(c.I.C.v)||{};t[e.id]=!0,this.u.k(c.I.C.v,t)}let r=this.D([e]);if(r==null)return n;let l=t?s.G.I:s.G.$;return i.Z.q(l,r)}B(e){let t=new a.Z;if(!e.N())return o.Z.info(`Card ${e.id} refused this dismissal. Ignoring analytics event.`),t;if(e.id&&this.u){let t=this.u.j(c.I.C.A)||{};t[e.id]=!0,this.u.k(c.I.C.A,t)}let n=this.D([e]);return n==null?t:i.Z.q(s.G.F,n)}G(e,t){let n=new a.Z(!0),o=[],l=[],u={};this.u&&(u=t?this.u.j(c.I.C.H)||{}:this.u.j(c.I.C.J)||{});for(let t of e)t.K(),t instanceof r.Z?l.push(t):o.push(t),t.id&&(u[t.id]=!0);let d=this.D(o),f=this.D(l);if(d==null&&f==null)return n.L=!1,n;if(this.u&&(t?this.u.k(c.I.C.H,u):this.u.k(c.I.C.J,u)),d!=null){let e=t?s.G.M:s.G.O,r=i.Z.q(e,d);n.P(r)}if(f!=null&&t){let e=i.Z.q(s.G.R,f);n.P(e)}return n}D(e){let t,n=null;for(let r=0;r<e.length;r++)t=e[r].id,t!=null&&t!==``&&(n||={},n.ids=n.ids||[],n.ids.push(t));return n}}var u=n(5825);let d={t:!1,i:null,m:()=>(d.o(),d.i||=new l(u.ZP.l()),d.i),o:()=>{d.t||=(u.ZP.g(d),!0)},destroy:()=>{d.i=null,d.t=!1}},f=d},5608:(e,t,n)=>{n.d(t,{CG:()=>m,Dj:()=>h,Ji:()=>l,Zw:()=>d,pq:()=>f,ql:()=>c,rW:()=>u,sv:()=>p});var r=n(5242),i=n(1507),a=n(420),o=n(2080),s=n(7070);function c(e){return e!=null&&!!e.getAttribute(`data-ab-had-top-impression`)}function l(e){e?.setAttribute(`data-ab-had-top-impression`,`true`)}function u(e){return e!=null&&!!e.getAttribute(`data-ab-had-bottom-impression`)}function d(e){e?.setAttribute(`data-ab-had-bottom-impression`,`true`)}function f(e){if(e!=null){let t=e.querySelectorAll(`.ab-unread-indicator`)[0];t!=null&&(t.className+=` read`)}}function p(e){return e.getAttribute(`data-ab-card-id`)}function m(e,t){let n=t.querySelectorAll(`.ab-image-area`),r,i=0;n.length>0&&(i=n[0].offsetWidth);for(let t of e)if(r=t.T,r&&t.imageUrl&&typeof t.aspectRatio==`number`){let e=i/t.aspectRatio;e&&(r.style.height=`${e}px`)}}function h(e,t,n){let c=document.createElement(`div`);c.className=`ab-card ab-effect-card `+e._,e.id&&(c.setAttribute(`data-ab-card-id`,e.id),c.setAttribute(`id`,e.id)),c.setAttribute(`role`,`article`),c.setAttribute(`tabindex`,`0`);let l=``,u=!1;e.url&&e.url!==``&&(l=e.url,u=!0);let d=r=>(f(c),u&&(t(e),(0,a.S)(l,n,r)),!1);if(e.pinned){let e=document.createElement(`div`);e.className=`ab-pinned-indicator`;let t=document.createElement(`i`);t.className=`fa fa-star`,e.appendChild(t),c.appendChild(e)}if(e.imageUrl&&e.imageUrl!==``){let t=document.createElement(`div`);t.className=`ab-image-area`;let n=document.createElement(`img`);if(n.setAttribute(`src`,e.imageUrl),n.onload=()=>{c.style.height=`auto`},function(e,t){let n=``;e.title||e.description||(n=`Feed Image`),t.setAttribute(`alt`,n)}(e,n),t.appendChild(n),c.className+=` with-image`,u&&!e.S){let e=document.createElement(`a`);e.setAttribute(`href`,l),e.onclick=d,e.appendChild(t),c.appendChild(e)}else c.appendChild(t)}let p=document.createElement(`div`);if(p.className=`ab-card-body`,e.dismissible){e.logCardDismissal=()=>(0,o.K)(e);let t=(0,r.B)(`Dismiss Card`,void 0,e.dismissCard.bind(e));c.appendChild(t),(0,i.FZ)(p,i.mQ.U,(e=>{c.className+=` ab-swiped-left`,t.onclick(e)})),(0,i.FZ)(p,i.mQ.V,(e=>{c.className+=` ab-swiped-right`,t.onclick(e)}))}let m=``,h=!1;if(e.title&&e.title!==``&&(m=e.title,h=!0),h){let e=document.createElement(`h1`);if(e.className=`ab-title`,e.id=s.Z.W(),c.setAttribute(`aria-labelledby`,e.id),u){let t=document.createElement(`a`);t.setAttribute(`href`,l),t.onclick=d,t.appendChild(document.createTextNode(m)),e.appendChild(t)}else e.appendChild(document.createTextNode(m));p.appendChild(e)}let g=document.createElement(`div`);if(g.className=h?`ab-description`:`ab-description ab-no-title`,g.id=s.Z.W(),c.setAttribute(`aria-describedby`,g.id),e.description&&g.appendChild(document.createTextNode(e.description)),u){let t=document.createElement(`div`);t.className=`ab-url-area`;let n=document.createElement(`a`);n.setAttribute(`href`,l),e.linkText&&n.appendChild(document.createTextNode(e.linkText)),n.onclick=d,t.appendChild(n),g.appendChild(t)}p.appendChild(g),c.appendChild(p);let _=document.createElement(`div`);return _.className=`ab-unread-indicator`,e.viewed&&(_.className+=` read`),c.appendChild(_),e.T=c,c}},1280:(e,t,n)=>{n.d(t,{d:()=>c});var r=n(2857),i=n(7529),a=n(7671),o=n(5825),s=n(335);function c(e,t){return!!o.ZP.X()&&(e instanceof r.Z?i.Z.m().h(e,t).L:(s.Z.error(`card `+a.U4),!1))}},2080:(e,t,n)=>{n.d(t,{K:()=>c});var r=n(2857),i=n(7529),a=n(7671),o=n(5825),s=n(335);function c(e){return!!o.ZP.X()&&(e instanceof r.Z?i.Z.m().B(e).L:(s.Z.error(`card `+a.U4),!1))}},1066:(e,t,n)=>{n.d(t,{p:()=>l});var r=n(2857),i=n(7529),a=n(5825),o=n(2893),s=n(7671),c=n(335);function l(e,t){if(!a.ZP.X())return!1;if(!(0,o.kJ)(e))return c.Z.error(`cards must be an array`),!1;for(let t of e)if(!(t instanceof r.Z))return c.Z.error(`Each card in cards ${s.U4}`),!1;return i.Z.m().G(e,t).L}},2857:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(7750),i=n(7671),a=n(4663),o=n(335);class s{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.id=e,this.viewed=t,this.title=n,this.imageUrl=r,this.description=i,this.created=a,this.updated=o,this.categories=s,this.expiresAt=c,this.url=l,this.linkText=u,this.aspectRatio=d,this.extras=f,this.pinned=p,this.dismissible=m,this.clicked=h,this.id=e,this.viewed=t||!1,this.title=n||``,this.imageUrl=r,this.description=i||``,this.created=a||null,this.updated=o||null,this.categories=s||[],this.expiresAt=c||null,this.url=l,this.linkText=u,d==null?this.aspectRatio=null:(d=parseFloat(d.toString()),this.aspectRatio=isNaN(d)?null:d),this.extras=f||{},this.pinned=p||!1,this.dismissible=m||!1,this.dismissed=!1,this.clicked=h||!1,this.isControl=!1,this.test=!1,this.Et=null,this.Tt=null}subscribeToClickedEvent(e){return this.Nt().It(e)}subscribeToDismissedEvent(e){return this.St().It(e)}removeSubscription(e){this.Nt().removeSubscription(e),this.St().removeSubscription(e)}removeAllSubscriptions(){this.Nt().removeAllSubscriptions(),this.St().removeAllSubscriptions()}dismissCard(){if(!this.dismissible||this.dismissed)return;typeof this.logCardDismissal==`function`&&this.logCardDismissal();let e=this.T;!e&&this.id&&(e=document.getElementById(this.id)),e&&(e.style.height=e.offsetHeight+`px`,e.className+=` ab-hide`,setTimeout((function(){e&&e.parentNode&&(e.style.height=`0`,e.style.margin=`0`,setTimeout((function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),s.At))}),i.rF))}Nt(){return this.Et??=new a.Z,this.Et}St(){return this.Tt??=new a.Z,this.Tt}K(){this.viewed=!0}p(){this.viewed=!0,this.clicked=!0,this.Nt().Dt()}N(){return!(!this.dismissible||this.dismissed||(this.dismissed=!0,this.St().Dt(),0))}Ct(e){if(e==null||e[s.Rt.ht]!==this.id)return!0;if(e[s.Rt.Lt])return!1;if(e[s.Rt.nt]!=null&&this.updated!=null&&parseInt(e[s.Rt.nt])<(0,r.FX)(this.updated.valueOf()))return!0;if(e[s.Rt.et]&&!this.viewed&&(this.viewed=!0),e[s.Rt.zt]&&!this.clicked&&(this.clicked=e[s.Rt.zt]),e[s.Rt.rt]!=null&&(this.title=e[s.Rt.rt]),e[s.Rt.ot]!=null&&(this.imageUrl=e[s.Rt.ot]),e[s.Rt.ct]!=null&&(this.description=e[s.Rt.ct]),e[s.Rt.nt]!=null){let t=(0,r.X2)(e[s.Rt.nt]);t!=null&&(this.updated=t)}if(e[s.Rt.lt]!=null){let t;t=e[s.Rt.lt]===s._t?null:(0,r.X2)(e[s.Rt.lt]),this.expiresAt=t}if(e[s.Rt.URL]!=null&&(this.url=e[s.Rt.URL]),e[s.Rt.ft]!=null&&(this.linkText=e[s.Rt.ft]),e[s.Rt.xt]!=null){let t=parseFloat(e[s.Rt.xt].toString());this.aspectRatio=isNaN(t)?null:t}return e[s.Rt.bt]!=null&&(this.extras=e[s.Rt.bt]),e[s.Rt.gt]!=null&&(this.pinned=e[s.Rt.gt]),e[s.Rt.jt]!=null&&(this.dismissible=e[s.Rt.jt]),e[s.Rt.kt]!=null&&(this.test=e[s.Rt.kt]),!0}Y(){o.Z.error(`Must be implemented in a subclass`)}}s._t=-1,s.Rt={ht:`id`,et:`v`,jt:`db`,Lt:`r`,nt:`ca`,gt:`p`,lt:`ea`,bt:`e`,Z:`tp`,ot:`i`,rt:`tt`,ct:`ds`,URL:`u`,ft:`dm`,xt:`ar`,zt:`cl`,kt:`t`},s.it={st:`captioned_image`,Ot:`text_announcement`,Mt:`short_news`,Pt:`banner_image`,Ut:`control`},s.tt={ht:`id`,et:`v`,jt:`db`,dt:`cr`,nt:`ca`,gt:`p`,ut:`t`,lt:`ea`,bt:`e`,Z:`tp`,ot:`i`,rt:`tt`,ct:`ds`,URL:`u`,ft:`dm`,xt:`ar`,zt:`cl`,kt:`s`},s.Gt={Xt:`ADVERTISING`,vt:`ANNOUNCEMENTS`,Vt:`NEWS`,Wt:`SOCIAL`},s.At=400},5563:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(2857);class i extends r.Z{constructor(e,t,n,r,i,a){super(e,t,null,null,null,null,n,null,r,null,null,null,i,a),this.isControl=!0,this._=`ab-control-card`,this.S=!1}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.Ut,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.kt]=this.test,e}}},5899:(e,t,n)=>{n.d(t,{xA:()=>d,D5:()=>f,rN:()=>p});var r=n(2857);class i extends r.Z{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){super(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h),this._=`ab-classic-card`,this.S=!0}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.Mt,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.rt]=this.title,e[r.Z.tt.ot]=this.imageUrl,e[r.Z.tt.ct]=this.description,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.dt]=this.created,e[r.Z.tt.ut]=this.categories,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.URL]=this.url,e[r.Z.tt.ft]=this.linkText,e[r.Z.tt.xt]=this.aspectRatio,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.jt]=this.dismissible,e[r.Z.tt.zt]=this.clicked,e[r.Z.tt.kt]=this.test,e}}class a extends r.Z{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){super(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h),this._=`ab-captioned-image`,this.S=!0,this.test=!1}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.st,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.rt]=this.title,e[r.Z.tt.ot]=this.imageUrl,e[r.Z.tt.ct]=this.description,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.dt]=this.created,e[r.Z.tt.ut]=this.categories,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.URL]=this.url,e[r.Z.tt.ft]=this.linkText,e[r.Z.tt.xt]=this.aspectRatio,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.jt]=this.dismissible,e[r.Z.tt.zt]=this.clicked,e[r.Z.tt.kt]=this.test,e}}class o extends r.Z{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f,p){super(e,t,null,n,null,r,i,a,o,s,c,l,u,d,f,p),this._=`ab-image-only`,this.S=!1,this.test=!1}Y(){let e={};return e[r.Z.tt.Z]=r.Z.it.Pt,e[r.Z.tt.ht]=this.id,e[r.Z.tt.et]=this.viewed,e[r.Z.tt.ot]=this.imageUrl,e[r.Z.tt.nt]=this.updated,e[r.Z.tt.dt]=this.created,e[r.Z.tt.ut]=this.categories,e[r.Z.tt.lt]=this.expiresAt,e[r.Z.tt.URL]=this.url,e[r.Z.tt.ft]=this.linkText,e[r.Z.tt.xt]=this.aspectRatio,e[r.Z.tt.bt]=this.extras,e[r.Z.tt.gt]=this.pinned,e[r.Z.tt.jt]=this.dismissible,e[r.Z.tt.zt]=this.clicked,e[r.Z.tt.kt]=this.test,e}}var s=n(5563),c=n(7750),l=n(335);function u(e,t,n,c,u,d,f,p,m,h,g,_,v,y,b,x,S,C){let w;if(t===r.Z.it.Ot||t===r.Z.it.Mt)w=new i(e,n,c,u,d,f,p,m,h,g,_,v,y,b,x,S);else if(t===r.Z.it.st)w=new a(e,n,c,u,d,f,p,m,h,g,_,v,y,b,x,S);else if(t===r.Z.it.Pt)w=new o(e,n,u,f,p,m,h,g,_,v,y,b,x,S);else{if(t!==r.Z.it.Ut)return l.Z.error(`Ignoring card with unknown type `+t),null;w=new s.Z(e,n,p,h,y,b)}return C&&(w.test=C),w}function d(e){if(e[r.Z.Rt.Lt])return null;let t=e[r.Z.Rt.ht],n=e[r.Z.Rt.Z],i=e[r.Z.Rt.et],a=e[r.Z.Rt.rt],o=e[r.Z.Rt.ot],s=e[r.Z.Rt.ct],l=(0,c.X2)(e[r.Z.Rt.nt]),d=l,f;return f=e[r.Z.Rt.lt]===r.Z._t?null:(0,c.X2)(e[r.Z.Rt.lt]),u(t,n,i,a,o,s,d,l,null,f,e[r.Z.Rt.URL],e[r.Z.Rt.ft],e[r.Z.Rt.xt],e[r.Z.Rt.bt],e[r.Z.Rt.gt],e[r.Z.Rt.jt],e[r.Z.Rt.zt],e[r.Z.Rt.kt]||!1)}function f(e){return u(e.id,e.type,e.viewed,e.title,e.image,e.description,(0,c.X2)(e.created),(0,c.X2)(e.updated),e.categories,(0,c.X2)(e.expires_at),e.url,e.domain,e.aspect_ratio,e.extras,!1,!1)}function p(e){return u(e[r.Z.tt.ht],e[r.Z.tt.Z],e[r.Z.tt.et],e[r.Z.tt.rt],e[r.Z.tt.ot],e[r.Z.tt.ct],(0,c.Rd)(e[r.Z.tt.dt]),(0,c.Rd)(e[r.Z.tt.nt]),e[r.Z.tt.ut],(0,c.Rd)(e[r.Z.tt.lt]),e[r.Z.tt.URL],e[r.Z.tt.ft],e[r.Z.tt.xt],e[r.Z.tt.bt],e[r.Z.tt.gt],e[r.Z.tt.jt],e[r.Z.tt.zt],e[r.Z.tt.kt]||!1)||void 0}},4790:(e,t,n)=>{n.r(t),n.d(t,{changeUser:()=>c});var r=n(5825),i=n(8548),a=n(335),o=n(7615),s=n(3905);function c(e,t){if(!r.ZP.X())return;if(e==null||e.length===0||e!=e)return void a.Z.error(`changeUser requires a non-empty userId.`);if((0,i.E)(e)>o.Z.lr)return void a.Z.error(`Rejected user id "${e}" because it is longer than ${o.Z.lr} bytes.`);if(t!=null&&!(0,s.ro)(t,`set signature for new user`,`signature`))return;let n=r.ZP.cr();n&&n.changeUser(e.toString(),r.ZP.gr(),t)}},6243:(e,t,n)=>{n.d(t,{P:()=>i});var r=n(5825);function i(){if(r.ZP.X())return r.ZP.pr()}},420:(e,t,n)=>{n.d(t,{S:()=>f});var r=n(335),i=n(7671),a=n(5825),o=n(3046),s=n(3695),c=n(5806),l=n(3905),u=n(5319),d=n(6243);function f(e,t,f){if(a.ZP.X())if(l.y9.test(e)){let t=(0,o.OL)(e);if(!t)return;let f=e=>{if(!(0,l.zR)(e))return void r.Z.error(`Decoded Braze Action json is invalid: ${JSON.stringify(e,null,2)}`);let t=o.A9.properties.type,p=o.A9.properties.oo,m=o.A9.properties.eo,h=e[t];if(h===o.A9.types.ro){let t=e[p];for(let e of t)f(e)}else{let t=e[m],l,f;switch(h){case o.A9.types.logCustomEvent:Promise.resolve().then(n.bind(n,1454)).then((({logCustomEvent:e})=>{a.ZP.so()?(f=Array.prototype.slice.call(t),e(...f)):r.Z.error(i.Go)}));break;case o.A9.types.requestPushPermission:Promise.resolve().then(n.bind(n,2261)).then((({requestPushPermission:e})=>{a.ZP.so()?s.Z.browser===`Safari`&&s.Z.OS===c.T.io?window.navigator.standalone&&e():e():r.Z.error(i.Go)}));break;case o.A9.types.setEmailNotificationSubscriptionType:case o.A9.types.setPushNotificationSubscriptionType:case o.A9.types.setCustomUserAttribute:case o.A9.types.addToSubscriptionGroup:case o.A9.types.removeFromSubscriptionGroup:case o.A9.types.addToCustomAttributeArray:case o.A9.types.removeFromCustomAttributeArray:l=(0,d.P)(),l&&l[h](...Array.prototype.slice.call(t));break;case o.A9.types.no:case o.A9.types.ao:f=Array.prototype.slice.call(t),u.SD.openUri(...f);break;default:r.Z.info(`Ignoring unknown Braze Action: ${h}`)}}};f(t)}else u.SD.openUri(e,t,f)}},1454:(e,t,n)=>{n.r(t),n.d(t,{logCustomEvent:()=>d});var r=n(5825),i=n(9179),a=n(335),o=n(2730),s=n(4365),c=n(9342),l=n(3905),u=n(7671);function d(e,t){if(!r.ZP.X())return!1;if(e==null||e.length<=0)return a.Z.error(`logCustomEvent requires a non-empty eventName, got "${e}". Ignoring event.`),!1;if(!(0,l.zM)(e,`log custom event`,`the event name`))return!1;let[n,d]=(0,l.lg)(t,u._P,`eventProperties`,`log custom event "${e}"`,`event`);if(!n)return!1;let f=r.ZP.ir();if(f&&f.me(e))return a.Z.info(`Custom Event "${e}" is blocklisted, ignoring.`),!1;let p=i.Z.q(o.G.CustomEvent,{n:e,p:d});if(p.L){a.Z.info(`Logged custom event "${e}".`);for(let n of p.ge)c.n.rr().fe(s.Z.ue,[e,t],n)}return p.L}},4650:(e,t,n)=>{n.r(t),n.d(t,{requestImmediateDataFlush:()=>i});var r=n(5825);function i(e){if(!r.ZP.X())return;let t=r.ZP.cr();t&&t.requestImmediateDataFlush(e)}},3340:(e,t,n)=>{n.d(t,{V:()=>f,q:()=>d});var r=n(1792),i=n(8376),a=n(4410),o=n(1090),s=n(4072),c=n(3811),l=n(6616),u=n(335);function d(e){if(!e)return null;if(e.is_control)return i.Z.fromJson(e);let t=e.type;t!=null&&(t=t.toUpperCase());let n=e.message,d=e.text_align_message,f=e.slide_from,p=e.extras,m=e.trigger_id,h=e.click_action,g=e.uri,_=e.open_target,v=e.message_close,y=e.duration,b=e.icon,x=e.image_url,S=e.image_style,C=e.icon_color,w=e.icon_bg_color,T=e.bg_color,E=e.text_color,D=e.close_btn_color,O=e.header,k=e.text_align_header,A=e.header_text_color,j=e.frame_color,M=[],N=e.btns;N??=[];for(let e=0;e<N.length;e++)M.push(s.Z.fromJson(N[e]));let P=e.crop_type,F=e.orientation,I=e.animate_in,L=e.animate_out,R=e.html_id,z=e.css;R!=null&&R!==``&&z!=null&&z!==``||(R=void 0,z=void 0);let B=e.message_extras,V;if(t===c.Z.it||t===r.Z.qe.Ve)V=new c.Z(n,d,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,I,L,O,k,A,j,M,P,R,z,B);else if(t===a.Z.it)V=new a.Z(n,d,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,I,L,O,k,A,j,M,P,F,R,z,B);else if(t===l.Z.it)V=new l.Z(n,d,f,p,m,h,g,_,v,y,b,x,C,w,T,E,D,I,L,R,z,B);else{if(t!==o.Z.it&&t!==r.Z.qe.$e&&t!==r.Z.qe.We)return void u.Z.error(`Ignoring message with unknown type `+t);{let t=e.message_fields;V=new o.Z(n,p,m,v,y,I,L,j,R,z,t,B),V.trusted=e.trusted||!1}}return V.we=t,V}function f(e){let t=[];for(let n of e)t.push(new s.Z(n.text,n.backgroundColor,n.textColor,n.borderColor,n.clickAction,n.uri,n.id));return t}},1087:(e,t,n)=>{n.d(t,{Z:()=>D});var r=n(1843),i=n(5825),a=n(8376),o=n(1090),s=n(1792),c=n(4072),l=n(9179),u=n(3340),d=n(6504),f=n(4673),p=n(2730),m=n(335),h=n(4663),g=n(2246),_=n(3905),v=n(3046),y=n(4556),b=n(6870),x=n(5966),S=n(4410),C=n(3811),w=n(6616);class T{constructor(e,t,n,r){this.qt=e,this.ri=t,this.u=n,this.wt=r,this.qt=e,this.ri=t,this.u=n,this.wt=r,this._e=new h.Z,i.ZP.$t(this._e),this.Xe=1e3,this.Ye=6e4,this.Ze=null}Mi(){return this._e}_i(e){return this._e.It(e)}Pi(){return this.Ze}$i(e){this.Ze=e}q(e,t,n,r){let i=new f.Z,s;if(e instanceof a.Z)s={trigger_ids:[e.triggerId]};else{if(t===p.G.Ei||e instanceof o.Z&&t===p.G.Gi){if(!e.p(r))return m.Z.info(`This in-app message has already received a click. Ignoring analytics event.`),i}else if(t===p.G.Oi&&!e.K())return m.Z.info(`This in-app message has already received an impression. Ignoring analytics event.`),i;s=this.Xi(e)}return s==null?i:(e.messageExtras&&(s.message_extras=e.messageExtras),n!=null&&(s.bid=n),l.Z.q(t,s))}Hi(e,t){let n=new f.Z;if(!e.p())return m.Z.info(`This in-app message button has already received a click. Ignoring analytics event.`),n;let r=this.Xi(t);return r==null?n:e.id===c.Z.Ji?(m.Z.info(`This in-app message button does not have a tracking id. Not logging event to Braze servers.`),n):(e.id!=null&&(r.bid=e.id),l.Z.q(p.G.Gi,r))}Ki(e){let t=e.messageFields;return t!=null&&t.is_push_primer||!1}Li(e){if(!(e instanceof s.Z))return;let t=e=>{if(!e)return;let t=(0,v.OL)(e);return(0,v.je)(t)?(0,v.Tu)(v.yi.Qi,`In-App Message`):(0,v.zA)(t)&&!y.Z.Vi()?(0,v.Tu)(v.yi.Wi,`In-App Message`):void 0};if(this.Ki(e)&&!y.Z.Vi())return`In-App Message contains a push prompt, but is not eligible for a push prompt. Ignoring.`;let n=e.buttons||[],r;for(let e of n)if(e.clickAction===s.Z.ClickAction.URI&&e.uri&&_.y9.test(e.uri)&&(r=t(e.uri),r))return r;return e.clickAction===s.Z.ClickAction.URI&&e.uri&&_.y9.test(e.uri)?t(e.uri):void 0}Yi(e,t,n,i){let a=this.qt;if(!a)return;let o=a.Zi(!1,!1),s=a.Js(o);s.template={trigger_id:e.triggerId,trigger_event_type:t},n!=null&&(s.template.data=n.Ir());let c=a.$s(s,b.Z.Ps.Mr);a.Xs(s,((a=-1)=>{if(!this.qt)return;let o=new Date().valueOf();b.Z._s(this.u,b.Z.Ps.Mr,o),a!==-1&&c.push([`X-Braze-Req-Tokens-Remaining`,a.toString()]),r.Z.Gs({url:`${this.qt.Hs()}/template/`,data:s,headers:c,L:t=>{if(b.Z.Qs(this.u,b.Z.Ps.Mr,1),!this.qt.Ks(s,t,c))return void(typeof e.Tr==`function`&&e.Tr());if(this.qt.Os(),t==null||t.templated_message==null)return;let n=t.templated_message;if(n.type!==g.Z._r.Br)return;let r=(0,u.q)(n.data);if(r==null)return;let i=this.Li(r);if(i)return m.Z.error(i),void(typeof e.Tr==`function`&&e.Tr());typeof e.Er==`function`&&e.Er(r)},error:r=>{let a=`getting user personalization for message ${e.triggerId}`;if(new Date().valueOf()-e.Gr<e.Nr){b.Z.Ys(this.u,b.Z.Ps.Mr);let r=Math.min(e.Nr,this.Ye),o=this.Xe;i??=o;let s=Math.min(r,(0,d.R)(o,3*i));a+=`. Retrying in ${s} ms`,setTimeout((()=>{this.Yi(e,t,n,s)}),s)}this.qt.Vs(r,a)}})}),b.Z.Ps.Mr)}Xi(e){if(e.triggerId==null)return m.Z.info(`The in-app message has no analytics id. Not logging event to Braze servers.`),null;let t={};return e.triggerId!=null&&(t.trigger_ids=[e.triggerId]),t}je(e){return!!this.u&&!(!(e&&e instanceof s.Z&&e.constructor!==s.Z)||e instanceof a.Z)&&this.u.k(x.I.C.Cr,e.Y())}Ue(){if(!this.u)return null;let e=this.u.j(x.I.C.Cr);if(!e)return null;let t;switch(e.type){case s.Z.qe.Or:t=S.Z.Xr(e);break;case s.Z.qe.Hr:case s.Z.qe.$e:case s.Z.qe.We:t=o.Z.Xr(e);break;case s.Z.qe.Jr:case s.Z.qe.Ve:t=C.Z.Xr(e);break;case s.Z.qe.Kr:t=w.Z.Xr(e)}return t&&this.Lr(),t}Lr(){this.u&&this.u.ti(x.I.C.Cr)}}let E={i:null,t:!1,m:()=>(E.o(),E.i||=new T(i.ZP.nr(),i.ZP.zr(),i.ZP.l(),i.ZP.er()),E.i),o:()=>{E.t||=(i.ZP.g(E),!0)},destroy:()=>{E.i=null,E.t=!1}},D=E},8376:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t){this.triggerId=e,this.messageExtras=t,this.triggerId=e,this.messageExtras=t,this.extras={},this.isControl=!0}static fromJson(e){return new r(e.trigger_id,e.message_extras)}}},4410:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(3340),i=n(1792);class a extends i.Z{constructor(e,t,n,r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k){c||=i.Z.DismissType.MANUAL,E||=i.Z.Orientation.PORTRAIT,super(e,t,void 0,n,r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T||=i.Z.CropType.CENTER_CROP,E,D,O,k),this.De=i.Z.TextAlignment.CENTER}Y(){return super.Y(a.it)}static Xr(e){return new a(e[i.Z.tt.Vr],e[i.Z.tt.Wr],e[i.Z.tt.bt],e[i.Z.tt.Yr],e[i.Z.tt.Zr],e[i.Z.tt.URI],e[i.Z.tt.ea],e[i.Z.tt.ra],e[i.Z.tt.sa],e[i.Z.tt.ta],e[i.Z.tt.ot],e[i.Z.tt.ia],e[i.Z.tt.aa],e[i.Z.tt.oa],e[i.Z.tt.pa],e[i.Z.tt.ma],e[i.Z.tt.na],e[i.Z.tt.ua],e[i.Z.tt.ca],e[i.Z.tt.fa],e[i.Z.tt.da],e[i.Z.tt.la],e[i.Z.tt.ga],(0,r.V)(e[i.Z.tt.ja]),e[i.Z.tt.xa],e[i.Z.tt.za],e[i.Z.tt.ha],e[i.Z.tt.CSS],e[i.Z.tt.va])}}a.it=i.Z.qe.Or},1090:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(1792);class i extends r.Z{constructor(e,t,n,i,a,o,s,c,l,u,d,f){super(e,void 0,void 0,t,n,void 0,void 0,void 0,i||=r.Z.DismissType.MANUAL,a,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,o,s,void 0,void 0,void 0,c,void 0,void 0,void 0,l,u,f),this.messageFields=d,this.messageFields=d}do(){return!1}p(e){if(this.we===r.Z.qe.Hr){if(this.vo)return!1;this.vo=!0}return this.Et.Dt(e),!0}Y(){let e=super.Y(i.it);return e[r.Z.tt.uo]=this.messageFields,e}static Xr(e){return new i(e[r.Z.tt.Vr],e[r.Z.tt.bt],e[r.Z.tt.Yr],e[r.Z.tt.ra],e[r.Z.tt.sa],e[r.Z.tt.ua],e[r.Z.tt.ca],e[r.Z.tt.ga],e[r.Z.tt.ha],e[r.Z.tt.CSS],e[r.Z.tt.uo],e[r.Z.tt.va])}}i.it=r.Z.qe.Hr},4072:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(1792),i=n(4663);class a{constructor(e,t,n,o,s,c,l){this.text=e,this.backgroundColor=t,this.textColor=n,this.borderColor=o,this.clickAction=s,this.uri=c,this.id=l,this.text=e||``,this.backgroundColor=t||r.Z.th.sh,this.textColor=n||r.Z.th.ih,this.borderColor=o||this.backgroundColor,this.clickAction=s||r.Z.ClickAction.NONE,this.uri=c,l??=a.Ji,this.id=l,this.vo=!1,this.Et=new i.Z}subscribeToClickedEvent(e){return this.Et.It(e)}removeSubscription(e){this.Et.removeSubscription(e)}removeAllSubscriptions(){this.Et.removeAllSubscriptions()}p(){return!this.vo&&(this.vo=!0,this.Et.Dt(),!0)}static fromJson(e){return new a(e.text,e.bg_color,e.text_color,e.border_color,e.click_action,e.uri,e.id)}}a.Ji=-1},1792:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(5825),i=n(3695),a=n(1507),o=n(7429),s=n(4663),c=n(7048);class l{constructor(e,t,n,r,i,a,o,c,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j){this.message=e,this.messageAlignment=t,this.slideFrom=n,this.extras=r,this.triggerId=i,this.clickAction=a,this.uri=o,this.openTarget=c,this.dismissType=u,this.duration=d,this.icon=f,this.imageUrl=p,this.imageStyle=m,this.iconColor=h,this.iconBackgroundColor=g,this.backgroundColor=_,this.textColor=v,this.closeButtonColor=y,this.animateIn=b,this.animateOut=x,this.header=S,this.headerAlignment=C,this.headerTextColor=w,this.frameColor=T,this.buttons=E,this.cropType=D,this.orientation=O,this.htmlId=k,this.css=A,this.messageExtras=j,this.message=e,this.messageAlignment=t||l.TextAlignment.CENTER,this.duration=d||5e3,this.slideFrom=n||l.SlideFrom.BOTTOM,this.extras=r||{},this.triggerId=i,this.clickAction=a||l.ClickAction.NONE,this.uri=o,this.openTarget=c||l.OpenTarget.NONE,this.dismissType=u||l.DismissType.AUTO_DISMISS,this.icon=f,this.imageUrl=p,this.imageStyle=m||l.ImageStyle.TOP,this.iconColor=h||l.th.ih,this.iconBackgroundColor=g||l.th.sh,this.backgroundColor=_||l.th.ih,this.textColor=v||l.th.hh,this.closeButtonColor=y||l.th.eh,this.animateIn=b,this.animateIn??=!0,this.animateOut=x,this.animateOut??=!0,this.header=S,this.headerAlignment=C||l.TextAlignment.CENTER,this.headerTextColor=w||l.th.hh,this.frameColor=T||l.th.Eh,this.buttons=E||[],this.cropType=D||l.CropType.FIT_CENTER,this.orientation=O,this.htmlId=k,this.css=A,this.isControl=!1,this.messageExtras=j,this.nh=!1,this.Th=!1,this.vo=!1,this.oh=!1,this.Me=null,this.ke=null,this.Et=new s.Z,this.rh=new s.Z,this.De=l.TextAlignment.CENTER}subscribeToClickedEvent(e){return this.Et.It(e)}subscribeToDismissedEvent(e){return this.rh.It(e)}removeSubscription(e){this.Et.removeSubscription(e),this.rh.removeSubscription(e)}removeAllSubscriptions(){this.Et.removeAllSubscriptions(),this.rh.removeAllSubscriptions()}closeMessage(){this.Ae(this.Me)}ze(){return!0}do(){return this.ze()}xe(){return this.htmlId!=null&&this.htmlId.length>4}Ce(){return this.xe()&&this.css!=null&&this.css.length>0}ve(){if(this.xe()&&this.Ce())return this.htmlId+`-css`}K(){return!this.Th&&(this.Th=!0,!0)}Ur(){return this.Th}p(e){return!this.vo&&(this.vo=!0,this.Et.Dt(),!0)}N(){return!this.oh&&(this.oh=!0,this.rh.Dt(),!0)}hide(e){if(e&&e.parentNode){let t=e.closest(`.ab-iam-root`);if(t??=e,this.ze()&&t.parentNode!=null){let e=t.parentNode.classList;e&&e.contains(l.lh)&&e.remove(l.lh),document.body.removeEventListener(`touchmove`,l.uh)}t.className=t.className.replace(l.ah,l.Ih)}return this.animateOut||!1}Ae(e,t){if(e==null)return;let n;this.Me=null,n=e.className.indexOf(`ab-in-app-message`)===-1?e.getElementsByClassName(`ab-in-app-message`)[0]:e;let r=!1;n&&(r=this.hide(n));let a=document.body,o;a!=null&&(o=a.scrollTop);let s=()=>{if(e&&e.parentNode){let t=e.closest(`.ab-iam-root`);t??=e,t.parentNode&&t.parentNode.removeChild(t)}let n=this.ve();if(n!=null){let e=document.getElementById(n);e&&e.parentNode&&e.parentNode.removeChild(e)}a!=null&&i.Z.browser===`Safari`&&(a.scrollTop=o),t?t():this.N()};r?setTimeout(s,l.Ah):s(),this.ke&&this.ke.focus()}Je(){return document.createTextNode(this.message||``)}Ge(e){let t=``;this.message||this.header||!this.ze()||(t=`Modal Image`),e.setAttribute(`alt`,t)}static uh(e){if(e.targetTouches&&e.targetTouches.length>1)return;let t=e.target;t&&t.classList&&t.classList.contains(`ab-message-text`)&&t.scrollHeight>t.clientHeight||document.querySelector(`.${l.lh}`)&&e.cancelable&&e.preventDefault()}Oh(e){let t=e.parentNode;this.ze()&&t!=null&&this.orientation!==l.Orientation.LANDSCAPE&&(t.classList!=null&&t.classList.add(l.lh),document.body.addEventListener(`touchmove`,l.uh,!!(0,a.QZ)()&&{passive:!1})),e.className+=` `+l.ah}static _h(e){if(e.keyCode===o.m.mh&&!r.ZP.nn(r.JY.Lh)&&document.querySelectorAll(`.ab-modal-interactions`).length>0){let e=document.getElementsByClassName(`ab-html-message`),t=!1;for(let n of e){let e=null;(0,c.f)(n)&&n.contentWindow&&(e=n.contentWindow.document.getElementsByClassName(`ab-programmatic-close-button`)[0]),e!=null&&((0,a.$j)(e),t=!0)}if(!t){let e=document.querySelectorAll(`.ab-modal-interactions > .ab-close-button`)[0];e!=null&&(0,a.$j)(e)}}}Nh(){this.nh||r.ZP.nn(r.JY.Lh)||(document.addEventListener(`keydown`,l._h,!1),r.ZP.Sh((()=>{document.removeEventListener(`keydown`,l._h)})),this.nh=!0)}Y(e){let t={};return e?(t[l.tt.Vr]=this.message,t[l.tt.Wr]=this.messageAlignment,t[l.tt.Rh]=this.slideFrom,t[l.tt.bt]=this.extras,t[l.tt.Yr]=this.triggerId,t[l.tt.Zr]=this.clickAction,t[l.tt.URI]=this.uri,t[l.tt.ea]=this.openTarget,t[l.tt.ra]=this.dismissType,t[l.tt.sa]=this.duration,t[l.tt.ta]=this.icon,t[l.tt.ot]=this.imageUrl,t[l.tt.ia]=this.imageStyle,t[l.tt.aa]=this.iconColor,t[l.tt.oa]=this.iconBackgroundColor,t[l.tt.pa]=this.backgroundColor,t[l.tt.ma]=this.textColor,t[l.tt.na]=this.closeButtonColor,t[l.tt.ua]=this.animateIn,t[l.tt.ca]=this.animateOut,t[l.tt.fa]=this.header,t[l.tt.da]=this.headerAlignment,t[l.tt.la]=this.headerTextColor,t[l.tt.ga]=this.frameColor,t[l.tt.ja]=this.buttons,t[l.tt.xa]=this.cropType,t[l.tt.za]=this.orientation,t[l.tt.ha]=this.htmlId,t[l.tt.CSS]=this.css,t[l.tt.Z]=e,t[l.tt.va]=this.messageExtras,t):t}}l.th={hh:4281545523,ih:4294967295,sh:4278219733,Mh:4293914607,Dh:4283782485,Eh:3224580915,eh:4288387995},l.Be={Ch:`hd`,Le:`ias`,dh:`of`,Uh:`do`,bh:`umt`,Ph:`tf`,ph:`te`},l.SlideFrom={TOP:`TOP`,BOTTOM:`BOTTOM`},l.ClickAction={NEWS_FEED:`NEWS_FEED`,URI:`URI`,NONE:`NONE`},l.DismissType={AUTO_DISMISS:`AUTO_DISMISS`,MANUAL:`SWIPE`},l.OpenTarget={NONE:`NONE`,BLANK:`BLANK`},l.ImageStyle={TOP:`TOP`,GRAPHIC:`GRAPHIC`},l.Orientation={PORTRAIT:`PORTRAIT`,LANDSCAPE:`LANDSCAPE`},l.TextAlignment={START:`START`,CENTER:`CENTER`,END:`END`},l.CropType={CENTER_CROP:`CENTER_CROP`,FIT_CENTER:`FIT_CENTER`},l.qe={Kr:`SLIDEUP`,Jr:`MODAL`,Ve:`MODAL_STYLED`,Or:`FULL`,Hr:`WEB_HTML`,$e:`HTML`,We:`HTML_FULL`},l.Ah=500,l.fh=200,l.ah=`ab-show`,l.Ih=`ab-hide`,l.lh=`ab-pause-scrolling`,l.tt={Vr:`m`,Wr:`ma`,Rh:`sf`,bt:`e`,Yr:`ti`,Zr:`ca`,URI:`u`,ea:`oa`,ra:`dt`,sa:`d`,ta:`i`,ot:`iu`,ia:`is`,aa:`ic`,oa:`ibc`,pa:`bc`,ma:`tc`,na:`cbc`,ua:`ai`,ca:`ao`,fa:`h`,da:`ha`,la:`htc`,ga:`fc`,ja:`b`,xa:`ct`,za:`o`,ha:`hi`,CSS:`css`,Z:`type`,uo:`messageFields`,va:`me`}},3811:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(3340),i=n(1792);class a extends i.Z{constructor(e,t,n,r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O){super(e,t,void 0,n,r,a,o,s,c||=i.Z.DismissType.MANUAL,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T||=i.Z.CropType.FIT_CENTER,void 0,E,D,O),this.De=i.Z.TextAlignment.CENTER}Y(){return super.Y(a.it)}static Xr(e){return new a(e[i.Z.tt.Vr],e[i.Z.tt.Wr],e[i.Z.tt.bt],e[i.Z.tt.Yr],e[i.Z.tt.Zr],e[i.Z.tt.URI],e[i.Z.tt.ea],e[i.Z.tt.ra],e[i.Z.tt.sa],e[i.Z.tt.ta],e[i.Z.tt.ot],e[i.Z.tt.ia],e[i.Z.tt.aa],e[i.Z.tt.oa],e[i.Z.tt.pa],e[i.Z.tt.ma],e[i.Z.tt.na],e[i.Z.tt.ua],e[i.Z.tt.ca],e[i.Z.tt.fa],e[i.Z.tt.da],e[i.Z.tt.la],e[i.Z.tt.ga],(0,r.V)(e[i.Z.tt.ja]),e[i.Z.tt.xa],e[i.Z.tt.ha],e[i.Z.tt.CSS],e[i.Z.tt.va])}}a.it=i.Z.qe.Jr},6616:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(1792),i=n(1507);class a extends r.Z{constructor(e,t,n,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S){g||=r.Z.th.Dh,h||=r.Z.th.Mh,super(e,t||=r.Z.TextAlignment.START,n,i,a,o,s,c,l,u,d,f,void 0,p,m,h,g,_,v,y,void 0,void 0,void 0,void 0,void 0,void 0,void 0,b,x,S),this.De=r.Z.TextAlignment.START}ze(){return!1}Je(){let e=document.createElement(`span`);return e.appendChild(document.createTextNode(this.message||``)),e}Oh(e){let t=e.getElementsByClassName(`ab-in-app-message`)[0];i.lP.po(t,!0,!0)||(this.slideFrom===r.Z.SlideFrom.TOP?t.style.top=`0px`:t.style.bottom=`0px`),super.Oh(e)}Y(){return super.Y(a.it)}static Xr(e){return new a(e[r.Z.tt.Vr],e[r.Z.tt.Wr],e[r.Z.tt.Rh],e[r.Z.tt.bt],e[r.Z.tt.Yr],e[r.Z.tt.Zr],e[r.Z.tt.URI],e[r.Z.tt.ea],e[r.Z.tt.ra],e[r.Z.tt.sa],e[r.Z.tt.ta],e[r.Z.tt.ot],e[r.Z.tt.aa],e[r.Z.tt.oa],e[r.Z.tt.pa],e[r.Z.tt.ma],e[r.Z.tt.na],e[r.Z.tt.ua],e[r.Z.tt.ca],e[r.Z.tt.ha],e[r.Z.tt.CSS],e[r.Z.tt.va])}}a.it=r.Z.qe.Kr},7048:(e,t,n)=>{n.d(t,{E:()=>i,f:()=>r});let r=e=>e!==null&&e.tagName===`IFRAME`;function i(e){var t;if(e.tagName===`SCRIPT`)(t=e.parentNode)==null||t.replaceChild(function(e){let t=document.createElement(`script`);t.text=e.innerHTML;for(let n of e.attributes)t.setAttribute(n.name,n.value);return t}(e),e);else for(let t of e.childNodes)i(t);return e}},4127:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var r=n(5825),i=n(2893),a=n(3552),o=n(335);let s=function(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/\-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r};var c=n(5966),l=n(7615),u=n(5319),d=n(4556),f=n(8031);class p{constructor(e,t,n,r,i,a,o,s,c,l){this.sn=e,this.rn=t,this.on=n,this.un=i,this.an=a,this.yt=o,this.cn=s,this.hn=c,this.u=l,this.sn=e,this.rn=t,this.on=n,this.fn=r+`/safari/`+t,this.un=i||`/service-worker.js`,this.an=a,this.yt=o,this.cn=s||!1,this.hn=c||!1,this.u=l,this.ln=d.Z.dn(),this.pn=d.Z.bn()}mn(){return this.hn}yn(e,t,n,r,i){e.unsubscribe().then((e=>{e?this.vn(t,n,r,i):(o.Z.error(`Failed to unsubscribe device from push.`),typeof i==`function`&&i(!1))})).catch((e=>{o.Z.error(`Push unsubscription error: `+e),typeof i==`function`&&i(!1)}))}gn(e,t,n){var r;let i=(e=>{if(typeof e==`string`)return e;if(e.endpoint.indexOf(`https://android.googleapis.com/gcm/send`)!==0)return e.endpoint;let t=e.endpoint,n=e;return n.wn&&e.endpoint.indexOf(n.wn)===-1&&(t=e.endpoint+`/`+n.wn),t})(e),a=null,s=null,c=e;if(c.getKey!=null)try{let e=Array.from(new Uint8Array(c.getKey(`p256dh`))),t=Array.from(new Uint8Array(c.getKey(`auth`)));a=btoa(String.fromCharCode.apply(null,e)),s=btoa(String.fromCharCode.apply(null,t))}catch(e){o.Z.error((0,f.e)(e))}let l=(e=>{let t;return e.options&&(t=e.options.applicationServerKey)&&t.byteLength&&t.byteLength>0?btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(t)))).replace(/\+/g,`-`).replace(/\//g,`_`):null})(c);(r=this.sn)==null||r.kn(i,t,a,s,l),i&&typeof n==`function`&&n(i,a,s)}Pn(){var e;(e=this.sn)==null||e.Dn(!0)}Sn(e,t){var n;(n=this.sn)==null||n.Dn(!1),o.Z.info(e),typeof t==`function`&&t(!1)}An(e,t,n,r){if(t.permission==="default")try{window.safari.pushNotification.requestPermission(this.fn,e,{api_key:this.rn,device_id:this.on?.ce().id||``},(t=>{t.permission===`granted`&&this.sn&&this.sn.setPushNotificationSubscriptionType(l.Z.NotificationSubscriptionTypes.OPTED_IN),this.An(e,t,n,r)}))}catch(e){this.Sn(`Could not request permission for push: `+e,r)}else t.permission===`denied`?this.Sn(`The user has blocked notifications from this site, or Safari push is not configured in the Braze dashboard.`,r):t.permission===`granted`&&(o.Z.info(`Device successfully subscribed to push.`),this.gn(t.deviceToken,new Date,n))}requestPermission(e,t,n){let r=r=>{switch(r){case`granted`:typeof e==`function`&&e();return;case`default`:typeof t==`function`&&t();return;case`denied`:typeof n==`function`&&n();return;default:o.Z.error(`Received unexpected permission result `+r)}},i=!1;if(window.Notification.permission!=="default")r(Notification.permission);else{let e=window.Notification.requestPermission((e=>{i&&r(e)}));e?e.then((e=>{r(e)})):i=!0}}vn(e,t,n,r){let i={userVisibleOnly:!0};t!=null&&(i.applicationServerKey=t),e.pushManager.subscribe(i).then((e=>{o.Z.info(`Device successfully subscribed to push.`),this.gn(e,new Date,n)})).catch((e=>{d.Z.isPushBlocked()?(o.Z.info(`Permission for push notifications was denied.`),typeof r==`function`&&r(!1)):(o.Z.error(`Push subscription failed: `+e),typeof r==`function`&&r(!0))}))}jn(){return this.cn?navigator.serviceWorker.getRegistration(this.un):navigator.serviceWorker.register(this.un).then((()=>navigator.serviceWorker.ready.then((e=>(e&&typeof e.update==`function`&&e.update().catch((e=>{o.Z.info(`ServiceWorker update failed: `+e)})),e)))))}xn(e){this.cn||(e.unregister(),o.Z.info(`Service worker successfully unregistered.`))}subscribe(e,t){if(!d.Z.isPushSupported())return o.Z.info(p.Nn),void(typeof t==`function`&&t(!1));if(this.ln){if(!this.cn&&window.location!=null){let e=this.un;e.indexOf(window.location.host)===-1&&(e=window.location.host+e),e.indexOf(window.location.protocol)===-1&&(e=window.location.protocol+`//`+e);let n=e.substr(0,e.lastIndexOf(`/`)+1);if(u.SD.Un().indexOf(n)!==0)return o.Z.error(`Cannot subscribe to push from a path higher than the service worker location (tried to subscribe from `+window.location.pathname+` but service worker is at `+e+`)`),void(typeof t==`function`&&t(!0))}if(d.Z.isPushBlocked())return void this.Sn(`Notifications from this site are blocked. This may be a temporary embargo or a permanent denial.`,t);if(this.yt&&!this.yt.Wn()&&this.yt.ii()===0)return o.Z.info(`Waiting for VAPID key from server config before subscribing to push.`),void this.yt._n((()=>{this.subscribe(e,t)}));let n=()=>{o.Z.info(`Permission for push notifications was denied.`),typeof t==`function`&&t(!1)},r=()=>{let e=`Permission for push notifications was ignored.`;d.Z.isPushBlocked()&&(e+=` The browser has automatically blocked further permission requests for a period (probably 1 week).`),o.Z.info(e),typeof t==`function`&&t(!0)},f=d.Z.isPushPermissionGranted();this.requestPermission(()=>{!f&&this.sn&&this.sn.setPushNotificationSubscriptionType(l.Z.NotificationSubscriptionTypes.OPTED_IN),this.jn().then((n=>{if(n==null)return o.Z.error("No service worker registration. Set the `manageServiceWorkerExternally` initialization option to false or ensure that your service worker is registered before calling registerPush."),void(typeof t==`function`&&t(!0));n.pushManager.getSubscription().then((r=>{let l=null;if(this.yt?.Wn()!=null&&(l=s(this.yt.Wn())),r){let s,u=null,d=null;if(this.u&&(s=this.u.j(c.I.C.In)),s&&!(0,i.kJ)(s)){let e;try{e=a.Z.qn(s).Vn}catch{e=null}e==null||isNaN(e.getTime())||e.getTime()===0||(u=e,d=new Date(u),d.setMonth(u.getMonth()+6))}l!=null&&r.options&&r.options.applicationServerKey&&r.options.applicationServerKey.byteLength&&r.options.applicationServerKey.byteLength>0&&!(0,i.Xy)(l,new Uint8Array(r.options.applicationServerKey))?(r.options.applicationServerKey.byteLength>12?o.Z.info(`Device was already subscribed to push using a different VAPID provider, creating new subscription.`):o.Z.info(`Attempting to upgrade a gcm_sender_id-based push registration to VAPID - depending on the browser this may or may not result in the same gcm_sender_id-based subscription.`),this.yn(r,n,l,e,t)):r.expirationTime&&new Date(r.expirationTime).valueOf()<=new Date().valueOf()?(o.Z.info(`Push subscription is expired, creating new subscription.`),this.yn(r,n,l,e,t)):s&&(0,i.kJ)(s)?this.yn(r,n,l,e,t):d==null?(o.Z.info(`No push subscription creation date found, creating new subscription.`),this.yn(r,n,l,e,t)):d.valueOf()<=new Date().valueOf()?(o.Z.info(`Push subscription older than 6 months, creating new subscription.`),this.yn(r,n,l,e,t)):(o.Z.info(`Device already subscribed to push, sending existing subscription to backend.`),this.gn(r,u,e))}else this.vn(n,l,e,t)})).catch((e=>{o.Z.error(`Error checking current push subscriptions: `+e)}))})).catch((e=>{o.Z.error(`ServiceWorker registration failed: `+e)}))},r,n)}else if(this.pn){if(this.an==null||this.an===``)return o.Z.error(`You must supply the safariWebsitePushId initialization option in order to use registerPush on Safari`),void(typeof t==`function`&&t(!0));let n=window.safari.pushNotification.permission(this.an);this.An(this.an,n,e,t)}}unsubscribe(e,t){if(!d.Z.isPushSupported())return o.Z.info(p.Nn),void(typeof t==`function`&&t());this.ln?navigator.serviceWorker.getRegistration(this.un).then((n=>{n?n.pushManager.getSubscription().then((r=>{r?(this.Pn(),r.unsubscribe().then((r=>{r?(o.Z.info(`Device successfully unsubscribed from push.`),typeof e==`function`&&e()):(o.Z.error(`Failed to unsubscribe device from push.`),typeof t==`function`&&t()),this.xn(n)})).catch((e=>{o.Z.error(`Push unsubscription error: `+e),typeof t==`function`&&t()}))):(o.Z.info(`Device already unsubscribed from push.`),typeof e==`function`&&e())})).catch((e=>{o.Z.error(`Error unsubscribing from push: `+e),typeof t==`function`&&t()})):(o.Z.info(`Device already unsubscribed from push.`),typeof e==`function`&&e())})):this.pn&&(this.Pn(),o.Z.info(`Device unsubscribed from push.`),typeof e==`function`&&e())}}p.Nn=`Push notifications are not supported in this browser.`;let m={t:!1,i:null,m:()=>(m.o(),m.i||=new p(r.ZP.pr(),r.ZP.ba(),r.ZP.te(),r.ZP.Hs(),r.ZP.nn(r.JY.wa),r.ZP.nn(r.JY.ya),r.ZP.ir(),r.ZP.nn(r.JY.Ma),r.ZP.nn(r.JY._a),r.ZP.l()),m.i),o:()=>{m.t||=(r.ZP.g(m),!0)},destroy:()=>{m.i=null,m.t=!1}},h=m},2261:(e,t,n)=>{n.r(t),n.d(t,{requestPushPermission:()=>a});var r=n(5825),i=n(4127);function a(e,t){if(r.ZP.X())return i.default.m().subscribe(((t,n,i)=>{let a=r.ZP.cr();a&&a.requestImmediateDataFlush(),typeof e==`function`&&e(t,n,i)}),t)}},7824:(e,t,n)=>{n.r(t),n.d(t,{unregisterPush:()=>a});var r=n(5825),i=n(4127);function a(e,t){if(r.ZP.X())return i.default.m().unsubscribe(e,t)}},4556:(e,t,n)=>{n.d(t,{Z:()=>i});let r={dn:()=>`serviceWorker`in navigator&&typeof ServiceWorkerRegistration<`u`&&`showNotification`in ServiceWorkerRegistration.prototype&&`PushManager`in window,bn:()=>`safari`in window&&`pushNotification`in window.safari&&typeof window.safari.pushNotification.permission==`function`&&typeof window.safari.pushNotification.requestPermission==`function`,isPushSupported:()=>r.dn()||r.bn(),isPushBlocked:()=>{let e=r.isPushSupported()&&`Notification`in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission===`denied`,t=r.isPushSupported()&&(!(`Notification`in window)||window.Notification==null);return e||t},isPushPermissionGranted:()=>r.isPushSupported()&&`Notification`in window&&window.Notification!=null&&window.Notification.permission!=null&&window.Notification.permission===`granted`,Vi:()=>!r.isPushBlocked()&&r.isPushSupported()&&!r.isPushPermissionGranted()},i=r},7615:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(2893),i=n(335),a=n(2730),o=n(3905),s=n(7671),c=n(7750);class l{constructor(e,t){this.wt=e,this.zi=t,this.wt=e,this.zi=t}getUserId(e){let t=this.wt.getUserId();if(typeof e!=`function`)return t;i.Z.warn("The callback for getUserId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getUser().getUserId()`)"),e(t)}addAlias(e,t){return!(0,o.ro)(e,`add alias`,`the alias`,!1)||e.length<=0?(i.Z.error(`addAlias requires a non-empty alias`),!1):!(0,o.ro)(t,`add alias`,`the label`,!1)||t.length<=0?(i.Z.error(`addAlias requires a non-empty label`),!1):this.zi.Cn(e,t).L}setFirstName(e){return!!(0,o.ro)(e,`set first name`,`the firstName`,!0)&&this.wt.nu(`first_name`,e)}setLastName(e){return!!(0,o.ro)(e,`set last name`,`the lastName`,!0)&&this.wt.nu(`last_name`,e)}setEmail(e){return e===null||(0,o.vV)(e)?this.wt.nu(`email`,e):(i.Z.error(`Cannot set email address - "${e}" did not pass RFC-5322 validation.`),!1)}setGender(e){return typeof e==`string`&&(e=e.toLowerCase()),!(e!==null&&!(0,r.fk)(l.Genders,e,`Gender "${e}" is not a valid gender.`,`User.Genders`))&&this.wt.nu(`gender`,e)}setDateOfBirth(e,t,n){return e===null&&t===null&&n===null?this.wt.nu(`dob`,null):(e=e==null?null:parseInt(e.toString()),t=t==null?null:parseInt(t.toString()),n=n==null?null:parseInt(n.toString()),e==null||t==null||n==null||isNaN(e)||isNaN(t)||isNaN(n)||t>12||t<1||n>31||n<1?(i.Z.error(`Cannot set date of birth - parameters should comprise a valid date e.g. setDateOfBirth(1776, 7, 4);`),!1):this.wt.nu(`dob`,`${e}-${t}-${n}`))}setCountry(e){return!!(0,o.ro)(e,`set country`,`the country`,!0)&&this.wt.nu(`country`,e)}setHomeCity(e){return!!(0,o.ro)(e,`set home city`,`the homeCity`,!0)&&this.wt.nu(`home_city`,e)}setLanguage(e){return!!(0,o.ro)(e,`set language`,`the language`,!0)&&this.wt.nu(`language`,e)}setEmailNotificationSubscriptionType(e){return!!(0,r.fk)(l.NotificationSubscriptionTypes,e,`Email notification setting "${e}" is not a valid subscription type.`,`User.NotificationSubscriptionTypes`)&&this.wt.nu(`email_subscribe`,e)}setPushNotificationSubscriptionType(e){return!!(0,r.fk)(l.NotificationSubscriptionTypes,e,`Push notification setting "${e}" is not a valid subscription type.`,`User.NotificationSubscriptionTypes`)&&this.wt.nu(`push_subscribe`,e)}setPhoneNumber(e){return!!(0,o.ro)(e,`set phone number`,`the phoneNumber`,!0)&&(e===null||e.match(l.En)?this.wt.nu(`phone`,e):(i.Z.error(`Cannot set phone number - "${e}" did not pass validation.`),!1))}setLastKnownLocation(e,t,n,r,a){return e==null||t==null?(i.Z.error(`Cannot set last-known location - latitude and longitude are required.`),!1):(e=parseFloat(e.toString()),t=parseFloat(t.toString()),n!=null&&(n=parseFloat(n.toString())),r!=null&&(r=parseFloat(r.toString())),a!=null&&(a=parseFloat(a.toString())),isNaN(e)||isNaN(t)||n!=null&&isNaN(n)||r!=null&&isNaN(r)||a!=null&&isNaN(a)?(i.Z.error(`Cannot set last-known location - all supplied parameters must be numeric.`),!1):e>90||e<-90||t>180||t<-180?(i.Z.error(`Cannot set last-known location - latitude and longitude are bounded by ±90 and ±180 respectively.`),!1):n!=null&&n<0||a!=null&&a<0?(i.Z.error(`Cannot set last-known location - accuracy and altitudeAccuracy may not be negative.`),!1):this.zi.setLastKnownLocation(this.wt.getUserId(),e,t,r,n,a).L)}setCustomUserAttribute(e,t,n){if(!(0,o.bj)(e))return!1;let i=t=>{let[n]=(0,o.lg)(t,s.db,`attribute value`,`set custom user attribute "${e}"`,`custom user attribute`);return n};if((0,r.kJ)(t)){let[n,r]=(0,o.$g)(e,t);if(!n&&!r&&t.length!==0)return!1;if(n||t.length===0)return this.zi.Fn(a.G.$n,e,t).L;for(let e of t)if(!i(e))return!1}else if((0,r.Kn)(t)){if(!i(t))return!1;if(n)return this.zi.Fn(a.G.Bn,e,t).L}else if(t===void 0||!(0,o.UO)(t)||((0,r.J_)(t)&&(t=(0,c.BT)(t)),typeof t==`string`&&!(0,o.zM)(t,`set custom user attribute "${e}"`,`the element in the given array`)))return!1;return this.wt.setCustomUserAttribute(e,t)}addToCustomAttributeArray(e,t){return!!(0,o.zM)(e,`add to custom user attribute array`,`the given key`)&&!(t!=null&&!(0,o.zM)(t,`add to custom user attribute array`,`the given value`))&&this.zi.Fn(a.G.Ln,e,t).L}removeFromCustomAttributeArray(e,t){return!!(0,o.zM)(e,`remove from custom user attribute array`,`the given key`)&&!(t!=null&&!(0,o.zM)(t,`remove from custom user attribute array`,`the given value`))&&this.zi.Fn(a.G.Rn,e,t).L}incrementCustomUserAttribute(e,t){if(!(0,o.zM)(e,`increment custom user attribute`,`the given key`))return!1;t??=1;let n=parseInt(t.toString());return isNaN(n)||n!==parseFloat(t.toString())?(i.Z.error(`Cannot increment custom user attribute because the given incrementValue "${t}" is not an integer.`),!1):this.zi.Fn(a.G.On,e,n).L}setCustomLocationAttribute(e,t,n){return!!(0,o.zM)(e,`set custom location attribute`,`the given key`)&&((t!==null||n!==null)&&(t=t==null?null:parseFloat(t.toString()),n=n==null?null:parseFloat(n.toString()),t==null&&n!=null||t!=null&&n==null||t!=null&&(isNaN(t)||t>90||t<-90)||n!=null&&(isNaN(n)||n>180||n<-180))?(i.Z.error(`Received invalid values for latitude and/or longitude. Latitude and longitude are bounded by ±90 and ±180 respectively, or must both be null for removal.`),!1):this.zi.Gn(e,t,n).L)}addToSubscriptionGroup(e){return!(0,o.ro)(e,`add user to subscription group`,`subscription group ID`,!1)||e.length<=0?(i.Z.error(`addToSubscriptionGroup requires a non-empty subscription group ID`),!1):this.zi.Hn(e,l.Kn.SUBSCRIBED).L}removeFromSubscriptionGroup(e){return!(0,o.ro)(e,`remove user from subscription group`,`subscription group ID`,!1)||e.length<=0?(i.Z.error(`removeFromSubscriptionGroup requires a non-empty subscription group ID`),!1):this.zi.Hn(e,l.Kn.UNSUBSCRIBED).L}kn(e,t,n,r,i){this.wt.kn(e,t,n,r,i),this.zi.Mn()}Dn(e){this.wt.Dn(e)}}l.Genders={MALE:`m`,FEMALE:`f`,OTHER:`o`,UNKNOWN:`u`,NOT_APPLICABLE:`n`,PREFER_NOT_TO_SAY:`p`},l.NotificationSubscriptionTypes={OPTED_IN:`opted_in`,SUBSCRIBED:`subscribed`,UNSUBSCRIBED:`unsubscribed`},l.En=/^[0-9 .\\(\\)\\+\\-]+$/,l.Kn={SUBSCRIBED:`subscribed`,UNSUBSCRIBED:`unsubscribed`},l.Yn=`user_id`,l.lu=`custom`,l.lr=997},67:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(335),i=n(5563);class a{constructor(e,t){this.cards=e,this.lastUpdated=t,this.cards=e,this.lastUpdated=t}getUnreadCardCount(){let e=0;for(let t of this.cards)t.viewed||t instanceof i.Z||e++;return e}dr(){r.Z.error(`Must be implemented in a subclass`)}logCardImpressions(e){r.Z.error(`Must be implemented in a subclass`)}logCardClick(e){r.Z.error(`Must be implemented in a subclass`)}sr(){r.Z.error(`Must be implemented in a subclass`)}}a.ur=6e4,a.Ah=500,a.Co=1e4},158:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){}Ns(e){}changeUser(e=!1){}clearData(e=!1){}}},7671:(e,t,n)=>{n.d(t,{De:()=>i,Fz:()=>r,Go:()=>l,S6:()=>m,Tt:()=>p,U4:()=>a,Up:()=>u,Y$:()=>d,_P:()=>s,dH:()=>f,db:()=>c,rF:()=>o});let r=100,i=`inAppMessage must be an InAppMessage object`,a=`must be a Card object`,o=500,s=`logCustomEvent`,c=`setCustomUserAttribute`,l=`Braze must be initialized before calling methods.`,u=30,d=30,f=72e5,p=3,m=1},9179:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(335),i=n(5825),a=n(7559),o=n(4673);let s={q:(e,t,n)=>{let s=new o.Z,c=i.ZP.zr();if(!c)return r.Z.info(`Not logging event with type "${e}" because the current session ID could not be found.`),s;let l=c.wo();return s.ge.push(new a.Z(n||i.ZP.er()?.getUserId(),e,new Date().valueOf(),l,t)),s.L=i.ZP.l()?.xo(s.ge)||!1,s}}},1311:(e,t,n)=>{n.d(t,{cP:()=>b,tQ:()=>S,cz:()=>w,Yz:()=>E,cV:()=>T,GB:()=>O,Of:()=>D});var r=n(67),i=n(5608),a=n(1507),o=n(5563),s=n(2857),c=n(2893),l=n(7429),u=n(5825),d=n(3695),f=n(335);let p={en:{NO_CARDS_MESSAGE:`We have no updates for you at this time.<br/>Please check again later.`,FEED_TIMEOUT_MESSAGE:`Sorry, this refresh timed out.<br/>Please try again later.`},ar:{NO_CARDS_MESSAGE:`ليس لدينا أي تحديث. يرجى التحقق مرة أخرى لاحقاً`,FEED_TIMEOUT_MESSAGE:`يرجى تكرار المحاولة لاحقا`},cs:{NO_CARDS_MESSAGE:`V tuto chvíli pro vás nemáme žádné aktualizace.<br/>Zkontrolujte prosím znovu později.`,FEED_TIMEOUT_MESSAGE:`Prosím zkuste to znovu později.`},da:{NO_CARDS_MESSAGE:`Vi har ingen updates.<br/>Prøv venligst senere.`,FEED_TIMEOUT_MESSAGE:`Prøv venligst senere.`},de:{NO_CARDS_MESSAGE:`Derzeit sind keine Updates verfügbar.<br/>Bitte später noch einmal versuchen.`,FEED_TIMEOUT_MESSAGE:`Bitte später noch einmal versuchen.`},es:{NO_CARDS_MESSAGE:`No tenemos actualizaciones.<br/>Por favor compruébelo más tarde.`,FEED_TIMEOUT_MESSAGE:`Por favor inténtelo más tarde.`},"es-mx":{NO_CARDS_MESSAGE:`No tenemos ninguna actualización.<br/>Vuelva a verificar más tarde.`,FEED_TIMEOUT_MESSAGE:`Por favor, vuelva a intentarlo más tarde.`},et:{NO_CARDS_MESSAGE:`Uuendusi pole praegu saadaval.<br/>Proovige hiljem uuesti.`,FEED_TIMEOUT_MESSAGE:`Palun proovige hiljem uuesti.`},fi:{NO_CARDS_MESSAGE:`Päivityksiä ei ole saatavilla.<br/>Tarkista myöhemmin uudelleen.`,FEED_TIMEOUT_MESSAGE:`Yritä myöhemmin uudelleen.`},fr:{NO_CARDS_MESSAGE:`Aucune mise à jour disponible.<br/>Veuillez vérifier ultérieurement.`,FEED_TIMEOUT_MESSAGE:`Veuillez réessayer ultérieurement.`},he:{NO_CARDS_MESSAGE:`.אין לנו עדכונים. בבקשה בדוק שוב בקרוב`,FEED_TIMEOUT_MESSAGE:`.בבקשה נסה שוב בקרוב`},hi:{NO_CARDS_MESSAGE:`हमारे पास कोई अपडेट नहीं हैं। कृपया बाद में फिर से जाँच करें.।`,FEED_TIMEOUT_MESSAGE:`कृपया बाद में दोबारा प्रयास करें।.`},id:{NO_CARDS_MESSAGE:`Kami tidak memiliki pembaruan. Coba lagi nanti.`,FEED_TIMEOUT_MESSAGE:`Coba lagi nanti.`},it:{NO_CARDS_MESSAGE:`Non ci sono aggiornamenti.<br/>Ricontrollare più tardi.`,FEED_TIMEOUT_MESSAGE:`Riprovare più tardi.`},ja:{NO_CARDS_MESSAGE:`アップデートはありません。<br/>後でもう一度確認してください。`,FEED_TIMEOUT_MESSAGE:`後でもう一度試してください。`},ko:{NO_CARDS_MESSAGE:`업데이트가 없습니다. 다음에 다시 확인해 주십시오.`,FEED_TIMEOUT_MESSAGE:`나중에 다시 시도해 주십시오.`},ms:{NO_CARDS_MESSAGE:`Tiada kemas kini. Sila periksa kemudian.`,FEED_TIMEOUT_MESSAGE:`Sila cuba kemudian.`},nl:{NO_CARDS_MESSAGE:`Er zijn geen updates.<br/>Probeer het later opnieuw.`,FEED_TIMEOUT_MESSAGE:`Probeer het later opnieuw.`},no:{NO_CARDS_MESSAGE:`Vi har ingen oppdateringer.<br/>Vennligst sjekk igjen senere.`,FEED_TIMEOUT_MESSAGE:`Vennligst prøv igjen senere.`},pl:{NO_CARDS_MESSAGE:`Brak aktualizacji.<br/>Proszę sprawdzić ponownie później.`,FEED_TIMEOUT_MESSAGE:`Proszę spróbować ponownie później.`},pt:{NO_CARDS_MESSAGE:`Não temos atualizações.<br/>Por favor, verifique mais tarde.`,FEED_TIMEOUT_MESSAGE:`Por favor, tente mais tarde.`},"pt-br":{NO_CARDS_MESSAGE:`Não temos nenhuma atualização.<br/>Verifique novamente mais tarde.`,FEED_TIMEOUT_MESSAGE:`Tente novamente mais tarde.`},ru:{NO_CARDS_MESSAGE:`Обновления недоступны.<br/>Пожалуйста, проверьте снова позже.`,FEED_TIMEOUT_MESSAGE:`Пожалуйста, повторите попытку позже.`},sv:{NO_CARDS_MESSAGE:`Det finns inga uppdateringar.<br/>Försök igen senare.`,FEED_TIMEOUT_MESSAGE:`Försök igen senare.`},th:{NO_CARDS_MESSAGE:`เราไม่มีการอัพเดต กรุณาตรวจสอบภายหลัง.`,FEED_TIMEOUT_MESSAGE:`กรุณาลองใหม่ภายหลัง.`},uk:{NO_CARDS_MESSAGE:`Оновлення недоступні.<br/>ласка, перевірте знову пізніше.`,FEED_TIMEOUT_MESSAGE:`Будь ласка, спробуйте ще раз пізніше.`},vi:{NO_CARDS_MESSAGE:`Chúng tôi không có cập nhật nào.<br/>Vui lòng kiểm tra lại sau.`,FEED_TIMEOUT_MESSAGE:`Vui lòng thử lại sau.`},"zh-hk":{NO_CARDS_MESSAGE:`暫時沒有更新.<br/>請稍候再試.`,FEED_TIMEOUT_MESSAGE:`請稍候再試.`},"zh-hans":{NO_CARDS_MESSAGE:`暂时没有更新.<br/>请稍后再试.`,FEED_TIMEOUT_MESSAGE:`请稍候再试.`},"zh-hant":{NO_CARDS_MESSAGE:`暫時沒有更新.<br/>請稍候再試.`,FEED_TIMEOUT_MESSAGE:`請稍候再試.`},"zh-tw":{NO_CARDS_MESSAGE:`暫時沒有更新.<br/>請稍候再試.`,FEED_TIMEOUT_MESSAGE:`請稍候再試.`},zh:{NO_CARDS_MESSAGE:`暂时没有更新.<br/>请稍后再试.`,FEED_TIMEOUT_MESSAGE:`请稍候再试.`}};class m{constructor(e,t=!1){if(this.language=e,e!=null&&(e=e.toLowerCase()),e!=null&&p[e]==null){let t=e.indexOf(`-`);t>0&&(e=e.substring(0,t))}if(p[e]==null){let n=`Braze does not yet have a localization for language `+e+`, defaulting to English. Please contact us if you are willing and able to help us translate our SDK into this language.`;t?f.Z.error(n):f.Z.info(n),e=`en`}this.language=e}get(e){return p[this.language][e]}}let h={t:!1,i:null,m:()=>{if(h.o(),!h.i){let e=d.Z.language,t=!1;u.ZP.nn(u.JY.zn)&&(e=u.ZP.nn(u.JY.zn),t=!0),h.i=new m(e,t)}return h.i},o:()=>{h.t||=(u.ZP.g(h),!0)},destroy:()=>{h.i=null,h.t=!1}},g=h;var _=n(7070),v=n(3905),y=n(3046);let b=`data-last-requested-refresh`,x={};function S(e){e&&(e.className=e.className.replace(`ab-show`,`ab-hide`),setTimeout((()=>{e&&e.parentNode&&e.parentNode.removeChild(e)}),r.Z.Ah));let t=e.getAttribute(`data-update-subscription-id`);var n;t!=null&&(n=t,u.ZP.X()&&u.ZP.removeSubscription(n));let i=e.getAttribute(`data-listener-id`);i!=null&&(window.removeEventListener(`scroll`,x[i]),delete x[i])}function C(e,t){let n=document.createElement(`div`);if(n.className=`ab-feed-body`,n.setAttribute(`aria-label`,`Feed`),n.setAttribute(`role`,`feed`),e.lastUpdated==null){let e=document.createElement(`div`);e.className=`ab-no-cards-message`;let t=document.createElement(`i`);t.className=`fa fa-spinner fa-spin fa-4x ab-initial-spinner`,e.appendChild(t),n.appendChild(e)}else{let r=!1,a=t=>e.logCardClick(t);for(let s of e.cards){let c=s instanceof o.Z;!c||e.dr()?(n.appendChild((0,i.Dj)(s,a,t)),r||=!c):f.Z.error(`Received a control card for a legacy news feed. Control cards are only supported with content cards.`)}if(!r){let e=document.createElement(`div`);e.className=`ab-no-cards-message`,e.innerHTML=g.m().get(`NO_CARDS_MESSAGE`)||``,e.setAttribute(`role`,`article`),n.appendChild(e)}}return n}function w(e,t){if(e!=null&&t!=null){let n=[],r=t.querySelectorAll(`.ab-card`);e.yo||={};for(let t=0;t<r.length;t++){let o=(0,i.sv)(r[t]),s=(0,a.rJ)(r[t]),c=(0,a.Fr)(r[t]);if(e.yo[o]){s||c||(0,i.pq)(r[t]);continue}let l=(0,i.ql)(r[t]),u=(0,i.rW)(r[t]),d=l,f=u;if(!l&&s&&(l=!0,(0,i.Ji)(r[t])),!u&&c&&(u=!0,(0,i.Zw)(r[t])),l&&u){if(d&&f)continue;for(let t of e.cards)if(t.id===o){e.yo[t.id]=!0,n.push(t);break}}}n.length>0&&e.logCardImpressions(n)}}function T(e,t){if(e==null||t==null)return;t.setAttribute(`aria-busy`,`true`);let n=t.querySelectorAll(`.ab-refresh-button`)[0];n!=null&&(n.className+=` fa-spin`);let i=new Date().valueOf().toString();t.setAttribute(`data-last-requested-refresh`,i),setTimeout((()=>{if(t.getAttribute(`data-last-requested-refresh`)===i){let e=t.querySelectorAll(`.fa-spin`);for(let t=0;t<e.length;t++)e[t].className=e[t].className.replace(/fa-spin/g,``);let n=t.querySelectorAll(`.ab-initial-spinner`)[0];if(n!=null){let e=document.createElement(`span`);e.innerHTML=g.m().get(`FEED_TIMEOUT_MESSAGE`)||``,n.parentNode!=null&&(n.parentNode.appendChild(e),n.parentNode.removeChild(n))}t.getAttribute(`aria-busy`)===`true`&&t.setAttribute(`aria-busy`,`false`)}}),r.Z.Co),e.sr()}function E(e,t,n){let r=document.createElement(`div`);r.className=`ab-feed ab-hide ab-effect-slide`,r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-label`,`Feed`),r.setAttribute(`tabindex`,`-1`);let i=document.createElement(`div`);i.className=`ab-feed-buttons-wrapper`,i.setAttribute(`role`,`group`),r.appendChild(i);let a=document.createElement(`i`);a.className=`fa fa-times ab-close-button`,a.setAttribute(`aria-label`,`Close Feed`),a.setAttribute(`tabindex`,`0`),a.setAttribute(`role`,`button`);let o=e=>{S(r),e.stopPropagation()};a.addEventListener(`keydown`,(e=>{e.keyCode!==l.m.Fo&&e.keyCode!==l.m.To||o(e)})),a.onclick=o;let s=document.createElement(`i`);s.className=`fa fa-refresh ab-refresh-button`,e&&e.lastUpdated==null&&(s.className+=` fa-spin`),s.setAttribute(`aria-label`,`Refresh Feed`),s.setAttribute(`tabindex`,`0`),s.setAttribute(`role`,`button`);let c=t=>{T(e,r),t.stopPropagation()};s.addEventListener(`keydown`,(e=>{e.keyCode!==l.m.Fo&&e.keyCode!==l.m.To||c(e)})),s.onclick=c,i.appendChild(s),i.appendChild(a),r.appendChild(C(e,t));let u=()=>w(e,r);if(r.addEventListener(`scroll`,u),!n){window.addEventListener(`scroll`,u);let e=_.Z.W();x[e]=u,r.setAttribute(`data-listener-id`,e)}return r}function D(e,t,n,r,i){if(!(0,c.kJ)(t))return;let a=[];for(let e of t)if(e instanceof s.Z){if(e.url&&v.y9.test(e.url)){let t=(0,y.OL)(e.url);if((0,y.je)(t)){f.Z.error((0,y.Tu)(y.yi.Qi,`Content Card`));continue}}a.push(e)}if(e.cards=a,e.lastUpdated=n,r!=null)if(r.setAttribute(`aria-busy`,`false`),e.lastUpdated==null)S(r);else{let t=r.querySelectorAll(`.ab-feed-body`)[0];if(t!=null){let n=C(e,i);t.parentNode&&t.parentNode.replaceChild(n,t),w(e,n.parentNode)}}}function O(e,t){e&&t.setAttribute(`data-update-subscription-id`,e)}},5825:(e,t,n)=>{n.d(t,{JY:()=>U,ZP:()=>te});var r=n(5966),i=n(4663),a=n(5522),o=n(335);class s{constructor(e,t,n){this.u=e,this.Jn=t,this.Qn=n,this.u=e,this.Jn=t||!1,this.Qn=n,this.Xn=new i.Z,this.Zn=0,this.gh=1}Fh(){return this.Jn}kh(){return this.u.j(r.I.C.wh)}setSdkAuthenticationSignature(e){let t=this.kh();this.u.k(r.I.C.wh,e);let n=a.Z.Yt.Qt;new a.Z(n,o.Z).setItem(n.ss.jh,this.gh,e),t!==e&&this.Os()}xh(){this.u.ti(r.I.C.wh);let e=a.Z.Yt.Qt;new a.Z(e,o.Z).re(e.ss.jh,this.gh)}subscribeToSdkAuthenticationFailures(e){return this.Qn.It(e)}qh(e){this.Qn.Dt(e)}yh(){this.Xn.removeAllSubscriptions()}Bh(){this.Zn+=1}Gh(){return this.Zn}Os(){this.Zn=0}}var c=n(158),l=n(3695);class u{constructor(e){this.id=e,this.id=e}Ir(){let e={};return this.browser!=null&&(e.browser=this.browser),this.Ia!=null&&(e.browser_version=this.Ia),this.os!=null&&(e.os_version=this.os),this.resolution!=null&&(e.resolution=this.resolution),this.language!=null&&(e.locale=this.language),this.timeZone!=null&&(e.time_zone=this.timeZone),this.userAgent!=null&&(e.user_agent=this.userAgent),e}}let d={BROWSER:`browser`,BROWSER_VERSION:`browserVersion`,OS:`os`,RESOLUTION:`resolution`,LANGUAGE:`language`,TIME_ZONE:`timeZone`,USER_AGENT:`userAgent`};var f=n(2308),p=n(7070),m=n(2893),h=n(8031);class g{constructor(e,t){this.u=e,this.ka=t,this.u=e,t??=(0,m.VO)(d),this.ka=t}ce(e=!0){let t=this.u.tu(r.I.iu.Uo);t??(t=new f.Z(p.Z.W()),e&&this.u.uu(r.I.iu.Uo,t));let n=new u(t.eu);for(let e=0;e<this.ka.length;e++)switch(this.ka[e]){case d.BROWSER:n.browser=l.Z.browser;break;case d.BROWSER_VERSION:n.Ia=l.Z.version;break;case d.OS:n.os=this.Ta();break;case d.RESOLUTION:n.Da=screen.width+`x`+screen.height;break;case d.LANGUAGE:n.language=l.Z.language;break;case d.TIME_ZONE:n.timeZone=this.Sa(new Date);break;case d.USER_AGENT:n.userAgent=l.Z.userAgent}return n}Ta(){if(l.Z.Oa())return l.Z.Oa();let e=this.u.j(r.I.C.Ca);return e&&e.os_version?e.os_version:l.Z.Ta()}Sa(e){let t=!1;if(typeof Intl<`u`&&typeof Intl.DateTimeFormat==`function`)try{if(typeof Intl.DateTimeFormat().resolvedOptions==`function`){let e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(e!=null&&e!==``)return e}}catch(e){o.Z.info(`Intl.DateTimeFormat threw an error, cannot detect user's time zone:`+(0,h.e)(e)),t=!0}if(t)return``;let n=e.getTimezoneOffset();return this.Fa(n)}Fa(e){let t=Math.trunc(e/60),n=Math.trunc(e%60),r=`GMT`;return e!==0&&(r+=e<0?`+`:`-`,r+=(`00`+Math.abs(t)).slice(-2)+`:`+(`00`+Math.abs(n)).slice(-2)),r}}var _=n(3826),v=n(7559),y=n(7750),b=n(9179),x=n(2730),S=n(6870),C=n(7671),w=n(8982);class T{constructor(e,t,n,r,i,a,o,s,c,l,u,d){this.on=e,this.u=t,this.zo=n,this.wt=r,this.ri=i,this.yt=a,this.rn=o,this.Go=s,this.Wo=c,this.Vo=l,this.appVersion=u,this.Xh=d,this.$h=e=>e==null?``:`${e} `,this.on=e,this.u=t,this.zo=n,this.wt=r,this.ri=i,this.yt=a,this.rn=o,this.Go=s,this.Wo=c,this.Vo=l,this.appVersion=u,this.Xh=d,this.Hh=[`npm`]}Js(e,t=!1,n=!1){let i=this.on.ce(!n),a=i.Ir(),o=this.u.j(r.I.C.Ca);(0,m.Xy)(o,a)||(e.device=a),e.api_key=this.rn,e.time=(0,y.FX)(new Date().valueOf(),!0);let s=this.u.j(r.I.C.Yh)||[],c=this.u.j(r.I.C.Jh)||``;if(this.Hh.length>0&&(!(0,m.Xy)(s,this.Hh)||c!==this.ri.Si())&&(e.sdk_metadata=this.Hh),e.sdk_version=this.Wo,this.Vo&&(e.sdk_flavor=this.Vo),e.app_version=this.appVersion,e.app_version_code=this.Xh,e.device_id=i.id,t){let t=this.wt.getUserId();t!=null&&(e.user_id=t)}if(!e.user_id&&!this.zo.Fh()){let t=(0,w.q)(this.u);t&&(e.alias=t)}return e}Ks(e,t,n){let r=t.auth_error,i=t.error;if(!r&&!i)return!0;if(r){let t;this.zo.Bh();let i={errorCode:r.error_code};for(let e of n)(0,m.kJ)(e)&&e[0]===`X-Braze-Auth-Signature`&&(i.signature=e[1]);e.respond_with&&e.respond_with.user_id?i.userId=e.respond_with.user_id:e.user_id&&(i.userId=e.user_id);let a=r.reason;return a?(i.reason=a,t=`due to ${a}`):t=`with error code ${r.error_code}.`,this.zo.Fh()||(t+=` Please use the "enableSdkAuthentication" initialization option to enable authentication.`),o.Z.error(`SDK Authentication failed ${t}`),this.Qh(e.events||[],e.attributes||[]),this.zo.qh(i),!1}if(i){let n,r=i;switch(r){case _.Z.Zh:return n=`Received successful response with empty body.`,b.Z.q(x.G.qs,{e:n}),o.Z.info(n),!1;case _.Z.Ra:return n=`Received successful response with invalid JSON`,b.Z.q(x.G.qs,{e:n+`: `+t.response}),o.Z.info(n),!1;case _.Z.qa:r=`The API key "${e.api_key}" is invalid for the baseUrl ${this.Go}`;break;case _.Z.Aa:r=`Sorry, we are not currently accepting your requests. If you think this is in error, please contact us.`;break;case _.Z.Ba:r=`No device identifier. Please contact support@braze.com`}o.Z.error(`Backend error: `+r)}return!1}Na(e,t,n,r){return!!(e&&e.length!==0||t&&t.length!==0||n||r)}Xa(e,t,n,r,i=!1){let a=[],o=e=>e||``,s=o(this.wt.getUserId()),c=this.Zi(e,t),l=[],u=[],d,f=null;if(n.length>0){let e=[];for(let t of n){if(d=t.Ir(),this.zo.Fh()){if(s&&!d.user_id){f||={},f.events||=[],f.events.push(d);continue}if(o(d.user_id)!==s){u.push(d);continue}}e.push(d)}e.length>0&&(c.events=e)}if(r.length>0){let e=[];for(let t of r)t&&(this.zo.Fh()&&o(t.user_id)!==s?l.push(t):e.push(t));e.length>0&&(c.attributes=e)}if(this.Qh(u,l),c=this.Js(c,!0,i),f){f=this.Js(f,!1,i);let e={requestData:f,headers:this.$s(f,S.Z.Ps.$a)};a.push(e)}if(c&&!this.Na(c.events,c.attributes,e,t))return f?a:null;let p={requestData:c,headers:this.$s(c,S.Z.Ps.$a)};return a.push(p),a}Qh(e,t){if(e){let t=[];for(let n of e){let e=v.Z.fromJson(n);e.time=(0,y.Pn)(e.time),t.push(e)}this.u.xo(t)}if(t)for(let e of t)this.u.La(e)}Vs(e,t){let n=`HTTP error `;e!=null&&(n+=e+` `),n+=t,o.Z.error(n)}qr(e){return b.Z.q(x.G.Ea,{n:e})}Zi(e,t,n){let r={};e&&(r.feed=!0),t&&(r.triggers=!0);let i=n??this.wt.getUserId();if(i&&(r.user_id=i),!r.user_id&&!this.zo.Fh()){let e=(0,w.q)(this.u);e&&(r.alias=e)}return r.config={config_time:this.yt.ii()},{respond_with:r}}Ka(e){let t=new Date().valueOf(),n=C.dH.toString(),r=S.Z.Pa(this.u,e);return r!==-1&&(n=(t-r).toString()),n}$s(e,t,n=!1){let i=[[`X-Braze-Api-Key`,this.rn]],a=this.Ka(t);i.push([`X-Braze-Last-Req-Ms-Ago`,a]);let o=S.Z.Ua(this.u,t).toString();i.push([`X-Braze-Req-Attempt`,o]);let s=!1;if(e.respond_with!=null&&e.respond_with.triggers&&(i.push([`X-Braze-TriggersRequest`,`true`]),s=!0),e.respond_with!=null&&e.respond_with.feed&&(i.push([`X-Braze-FeedRequest`,`true`]),s=!0),t===S.Z.Ps.Bs){i.push([`X-Braze-ContentCardsRequest`,`true`]);let e=this.u.j(r.I.C.As);e&&n||(e=0,this.u.k(r.I.C.As,e)),i.push([`BRAZE-SYNC-RETRY-COUNT`,e.toString()]),s=!0}if(t===S.Z.Ps.bi&&(i.push([`X-Braze-FeatureFlagsRequest`,`true`]),s=!0),s&&i.push([`X-Braze-DataRequest`,`true`]),this.zo.Fh()){let e=this.zo.kh();e!=null&&i.push([`X-Braze-Auth-Signature`,e])}return i}Ga(e,t,n,r){window.setTimeout((()=>{o.Z.info(`Retrying rate limited ${this.$h(r)}SDK request.`),this.Xs(t,n,r)}),e)}Xs(e,t,n,i){if(!this.Ha(n))return o.Z.info(`${this.$h(n)}SDK request being rate limited.`),void(typeof i==`function`&&i());let a=this.Wa();if(!a.Ya)return o.Z.info(`${this.$h(n)}SDK request being rate limited. Request will be retried in ${Math.trunc(a.Ja/1e3)} seconds.`),void this.Ga(a.Ja,e,t,n);this.u.k(r.I.C.Qa,new Date().valueOf());let s=e.device;s&&s.os_version instanceof Promise?s.os_version.then((n=>{e.device.os_version=n,t(a.Va)})):t(a.Va)}Za(e){var t;(t=this.u)==null||t.k(r.I.C.au,e)}du(e,t){let n=this.fu();n??={},n[e]=t,this.u.k(r.I.C.vu,n)}Ru(){return this.u?.j(r.I.C.au)}fu(){return this.u?.j(r.I.C.vu)}gu(e,t,n,r,i=``){let a;if(i){let e=this.fu();a=e==null||isNaN(e[i])?t:e[i]}else a=this.Ru(),(a==null||isNaN(a))&&(a=t);let o=(e-r)/1e3;return a=Math.min(a+o/n,t),a}pu(e,t){return Math.max(0,(1-e)*t*1e3)}bu(e,t=``){let n={Ya:!0,Va:-1,Ja:0};if(e??=!0,!e&&!t)return n;let i,a,o=null;if(e)o=this.u?.j(r.I.C.Qa);else{let e=S.Z.qu(this.u);if(e==null||e[t]==null)return n;o=e[t]}if(o==null||isNaN(o)||(e?(i=this.yt?.Au()||-1,a=this.yt?.Du()||-1):(i=this.yt?.Tu(t)||-1,a=this.yt?.ku(t)||-1),i===-1||a===-1))return n;let s=new Date().valueOf(),c=this.gu(s,i,a,o,t);return c<1?(n.Ya=!1,n.Ja=this.pu(c,a),n):(c=Math.trunc(c)-1,n.Va=c,e?this.Za(c):this.du(t,c),n)}Wa(){return this.bu(!0)}Ha(e){let t=this.bu(!1,e);return!(t&&!t.Ya)}Os(){this.zo.Os()}Hs(){return this.Go}addSdkMetadata(e){for(let t of e)this.Hh.indexOf(t)===-1&&this.Hh.push(t)}}var E=n(1843),D=n(6504),O=n(4673),k=n(4556);class A{constructor(e,t,n,r,a,o,s,c,l,u){this.rn=e,this.baseUrl=t,this.ri=n,this.on=r,this.wt=a,this.yt=o,this.u=s,this.wu=c,this.zo=l,this.qt=u,this.rn=e,this.baseUrl=t,this.yu=0,this.fE=s.dE()||0,this.ju=null,this.ri=n,this.on=r,this.wt=a,this.yt=o,this.u=s,this.zo=l,this.qt=u,this.wu=c,this.Su=new i.Z,this.$u=null,this.Cu=50,this.Fu=!1}Lu(e,t){return!e&&!t&&this.zo.Gh()>=this.Cu}Mu(e){let t=this.ri.Gl();if(e.length>0){let n=this.wt.getUserId();for(let r of e){let e=!r.userId&&!n||r.userId===n;r.type===x.G.ql&&e&&(t=!0)}}return t}Pu(e=!1,t=!1,n=!0,i,a,s,c=!1,l=!1){n&&this.xu();let u=this.u.AE(),d=this.u.OE(),f=!1,p=(e,t,o=-1)=>{let c=!1,l=new Date().valueOf();S.Z._s(this.u,S.Z.Ps.$a,l),o!==-1&&t.push([`X-Braze-Req-Tokens-Remaining`,o.toString()]),E.Z.Gs({url:this.baseUrl+`/data/`,data:e,headers:t,L:n=>{e.respond_with!=null&&e.respond_with.triggers&&(this.yu=Math.max(this.yu-1,0)),this.qt.Ks(e,n,t)?(this.zo.Os(),this.yt.al(n),e.respond_with!=null&&e.respond_with.user_id!=this.wt.getUserId()||(e.device!=null&&this.u.k(r.I.C.Ca,e.device),e.sdk_metadata!=null&&(this.u.k(r.I.C.Yh,e.sdk_metadata),this.u.k(r.I.C.Jh,this.ri.Si())),this.wu(n),S.Z.Qs(this.u,S.Z.Ps.$a,1),typeof i==`function`&&i())):n.auth_error&&(c=!0)},error:()=>{e.respond_with!=null&&e.respond_with.triggers&&(this.yu=Math.max(this.yu-1,0)),this.qt.Qh(e.events,e.attributes),typeof a==`function`&&a()},Ws:e=>{if(typeof s==`function`&&s(e),n&&!f){if(e&&!c)this.Iu();else{S.Z.Ys(this.u,S.Z.Ps.$a);let e=this.ju;(e==null||e<1e3*this.fE)&&(e=1e3*this.fE),this.Iu(Math.min(3e5,(0,D.R)(1e3*this.fE,3*e)))}f=!0}}})},m=this.Mu(u),h=t||m;if(this.Lu(c,m))return void o.Z.info(`Declining to flush data due to 50 consecutive authentication failures`);if(n&&!this.qt.Na(u,d,e,h))return this.Iu(),void(typeof s==`function`&&s(!0));let g=this.qt.Xa(e,h,u,d,l);h&&this.yu++;let _=!1;if(g)for(let e of g)this.qt.Xs(e.requestData,(t=>p(e.requestData,e.headers,t)),S.Z.Ps.$a,a),_=!0;this.zo.Fh()&&n&&!_?this.Iu():m&&(o.Z.info(`Invoking new session subscriptions`),this.Su.Dt())}Nu(){return this.yu>0}Iu(e=1e3*this.fE){this.Fu||(this.xu(),this.$u=window.setTimeout((()=>{if(document.hidden){let e=`visibilitychange`,t=()=>{document.hidden||(document.removeEventListener(e,t,!1),this.Pu())};document.addEventListener(e,t,!1)}else this.Pu()}),e),this.ju=e)}xu(){this.$u!=null&&(clearTimeout(this.$u),this.$u=null)}initialize(){this.Fu=!1,this.Iu()}destroy(){this.Su.removeAllSubscriptions(),this.zo.yh(),this.xu(),this.Fu=!0,this.Pu(void 0,void 0,!1,void 0,void 0,void 0,void 0,!0),this.$u=null}mr(e){return this.Su.It(e)}openSession(){let e=this.ri.Si()!==this.ri.wo();e&&(this.u.cE(r.I.iu.Uo),this.u.cE(r.I.iu.su)),this.Pu(void 0,!1,void 0,(()=>{this.u.ti(r.I.C.vi)})),this.Mn(),e&&Promise.resolve().then(n.bind(n,4127)).then((e=>{if(this.Fu)return;let t=e.default.m();if(t!=null&&(k.Z.isPushPermissionGranted()||k.Z.isPushBlocked())){let e=()=>{t.mn()?o.Z.info(`Push token maintenance is disabled, not refreshing token for backend.`):t.subscribe()},n=(t,n)=>{n&&e()},i=()=>{let t=this.u.j(r.I.C.In);(t==null||t)&&e()},s=a.Z.Yt.Qt;new a.Z(s,o.Z).jr(s.ss.cu,n,i)}}))}Ou(){this.u.ti(r.I.C.gi),this.u.ti(r.I.C.ws),this.u.ti(r.I.C.Cr)}changeUser(e,t,n){let i=this.wt.getUserId();if(i!==e){this.ri.yl(),this.Ou(),i!=null&&this.Pu(void 0,!1,void 0,void 0,void 0),this.wt.ou(e),n?this.zo.setSdkAuthenticationSignature(n):this.zo.xh();for(let e=0;e<t.length;e++)t[e].changeUser(i==null);i!=null&&this.u.ti(r.I.C.J),this.u.ti(r.I.C.Ca),this.u.ti(r.I.C.nE),this.u.ti(r.I.C._E),this.openSession(),o.Z.info(`Changed user to "`+e+`".`)}else{let t=`Doing nothing.`;n&&this.zo.kh()!==n&&(this.zo.setSdkAuthenticationSignature(n),t=`Updated SDK authentication signature`),o.Z.info(`Current user is already ${e}. ${t}`)}}requestImmediateDataFlush(e){this.xu(),this.ri.wo(),this.Pu(void 0,void 0,void 0,void 0,(()=>{o.Z.error(`Failed to flush data, request will be retried automatically.`)}),e,!0)}requestFeedRefresh(){this.ri.wo(),this.Pu(!0)}$r(e,t){this.ri.wo(),o.Z.info(`Requesting explicit trigger refresh.`),this.Pu(void 0,!0,void 0,e,t)}Cn(e,t){let n=x.G.zu,i={a:e,l:t},a=b.Z.q(n,i);return a&&(o.Z.info(`Logged alias ${e} with label ${t}`),this.u.k(r.I.C._E,i)),a}Fn(e,t,n){if(this.yt.hu(t))return o.Z.info(`Custom Attribute "${t}" is blocklisted, ignoring.`),new O.Z;let r={key:t,value:n},i=b.Z.q(e,r);if(i){let e=typeof n==`object`?JSON.stringify(n,null,2):n;o.Z.info(`Logged custom attribute: ${t} with value: ${e}`)}return i}setLastKnownLocation(e,t,n,r,i,a){let s={latitude:t,longitude:n};r!=null&&(s.altitude=r),i!=null&&(s.ll_accuracy=i),a!=null&&(s.alt_accuracy=a);let c=b.Z.q(x.G.Uu,s,e||void 0);return c&&o.Z.info(`Set user last known location as ${JSON.stringify(s,null,2)}`),c}kr(e,t){let n=this.ri.wo();return new v.Z(this.wt.getUserId(),x.G._u,e,n,{cid:t})}Bu(e,t){return new a.Z(e,t)}Mn(){let e=a.Z.Yt.Qt;this.Bu(e,o.Z).setItem(e.ss.$a,1,{baseUrl:this.baseUrl,data:{api_key:this.rn,device_id:this.on.ce().id},userId:this.wt.getUserId(),sdkAuthEnabled:this.zo.Fh()})}yr(e){for(let t of e)if(t.api_key===this.rn)this.qt.Qh(t.events,t.attributes);else{let e=a.Z.Yt.Qt;new a.Z(e,o.Z).setItem(e.ss.wr,p.Z.W(),t)}}Gn(e,t,n){if(this.yt.hu(e))return o.Z.info(`Custom Attribute "${e}" is blocklisted, ignoring.`),new O.Z;let r,i;return t===null&&n===null?(r=x.G.Eu,i={key:e}):(r=x.G.Ju,i={key:e,latitude:t,longitude:n}),b.Z.q(r,i)}Hn(e,t){let n={group_id:e,status:t};return b.Z.q(x.G.Ku,n)}}class j{constructor(e=0,t=[],n=[],r=[],i=null,a=null,o={enabled:!1},s={enabled:!1,refresh_rate_limit:void 0},c={enabled:!0,capacity:C.Up,refill_rate:C.Y$,endpoint_overrides:{}}){this.hl=e,this.gl=t,this.fl=n,this.bl=r,this.Rl=i,this.cl=a,this.ml=o,this.hi=s,this.ol=c,this.hl=e,this.gl=t,this.fl=n,this.bl=r,this.Rl=i,this.cl=a,this.ml=o,this.hi=s,this.ol=c}Y(){return{s:`5.3.1`,l:this.hl,e:this.gl,a:this.fl,p:this.bl,m:this.Rl,v:this.cl,c:this.ml,f:this.hi,grl:this.ol}}static qn(e){let t=e.l;return e.s!==`5.3.1`&&(t=0),new j(t,e.e,e.a,e.p,e.m,e.v,e.c,e.f,e.grl)}}class M{constructor(e){this.u=e,this.u=e,this.tl=new i.Z,this.el=new i.Z,this.il=new i.Z,this.sl=null,this.rl=null}ll(){if(this.rl==null){let e=this.u.j(r.I.C.ul);this.rl=e==null?new j:j.qn(e)}return this.rl}ii(){return this.ll().hl}al(e){if(e!=null&&e.config!=null){let t=e.config;if(t.time>this.ll().hl){let e=new j(t.time,t.events_blacklist,t.attributes_blacklist,t.purchases_blacklist,t.messaging_session_timeout,t.vapid_public_key,t.content_cards,t.feature_flags,(e=>e??this.ll().ol)(t.global_request_rate_limit)),n=!1;e.cl!=null&&this.Wn()!==e.cl&&(n=!0);let i=!1;e.ml.enabled!=null&&this.si()!==e.ml.enabled&&(i=!0);let a=!1;e.hi.enabled!=null&&this.ci()!==e.hi.enabled&&(a=!0),this.rl=e,this.u.k(r.I.C.ul,e.Y()),n&&this.tl.Dt(),i&&this.el.Dt(),a&&this.il.Dt()}}}_n(e){let t=this.tl.It(e);return this.sl&&this.tl.removeSubscription(this.sl),this.sl=t,t}Is(e){return this.el.It(e)}ji(e){return this.il.It(e)}me(e){return this.ll().gl.indexOf(e)!==-1}hu(e){return this.ll().fl.indexOf(e)!==-1}Dr(e){return this.ll().bl.indexOf(e)!==-1}dl(){return this.ll().Rl}Wn(){return this.ll().cl}si(){return this.ll().ml.enabled||!1}Cl(){let e=this.ll().ol;return!(!e||e.enabled==null)&&e.enabled}Au(){if(!this.Cl())return-1;let e=this.ll().ol;return e.capacity==null||e.capacity<10?-1:e.capacity}Du(){if(!this.Cl())return-1;let e=this.ll().ol;return e.refill_rate==null||e.refill_rate<=0?-1:e.refill_rate}vl(e){let t=this.ll().ol.endpoint_overrides;return t==null?null:t[e]}Tu(e){let t=this.vl(e);return t==null||isNaN(t.capacity)||t.capacity<=0?-1:t.capacity}ku(e){let t=this.vl(e);return t==null||isNaN(t.refill_rate)||t.refill_rate<=0?-1:t.refill_rate}ci(){return this.ll().hi.enabled&&this.Ri()==null?(b.Z.q(x.G.qs,{e:`Missing feature flag refresh_rate_limit.`}),!1):this.ll().hi.enabled||!1}Ri(){return this.ll().hi.refresh_rate_limit}}class N{constructor(e,t,n,r){this.u=e,this.wt=t,this.yt=n,this.wl=r,this.u=e,this.wt=t,this.yt=n,this.Sl=1e3,(r==null||isNaN(r))&&(r=1800),r<this.Sl/1e3&&(o.Z.info(`Specified session timeout of `+r+`s is too small, using the minimum session timeout of `+this.Sl/1e3+`s instead.`),r=this.Sl/1e3),this.wl=r}jl(e,t){return new v.Z(this.wt.getUserId(),x.G.xl,e,t.eu,{d:(0,y.FX)(e-t.Dl)})}Si(){let e=this.u.tu(r.I.iu.El);return e==null?null:e.eu}Gl(){let e=new Date().valueOf(),t=this.yt.dl(),n=this.u.j(r.I.C.Nl);if(n!=null&&t==null)return!1;let i=!1;return n==null?i=!0:t!=null&&(i=e-n>1e3*t),i&&this.u.k(r.I.C.Nl,e),i}zl(e,t){return t==null||t.Hl==null||!(e-t.Dl<this.Sl)&&t.Hl<e}wo(){let e=new Date().valueOf(),t=e+1e3*this.wl,n=this.u.tu(r.I.iu.El);if(this.zl(e,n)){let i=`Generating session start event with time `+e;if(n!=null){let e=n.Wl;e-n.Dl<this.Sl&&(e=n.Dl+this.Sl),this.u.kl(this.jl(e,n)),i+=` (old session ended `+e+`)`}i+=`. Will expire `+t.valueOf(),o.Z.info(i);let a=new f.Z(p.Z.W(),t);return this.u.kl(new v.Z(this.wt.getUserId(),x.G.ql,e,a.eu)),this.u.uu(r.I.iu.El,a),this.u.j(r.I.C.Nl)??this.u.k(r.I.C.Nl,e),a.eu}if(n!=null)return n.Wl=e,n.Hl=t,this.u.uu(r.I.iu.El,n),n.eu}yl(){let e=this.u.tu(r.I.iu.El);e!=null&&(this.u.Al(r.I.iu.El),this.u.kl(this.jl(new Date().valueOf(),e)))}}let P={Qo:function(e,t=!1){let n=!1;try{if(localStorage&&localStorage.getItem)try{localStorage.setItem(r.I.C.ec,`true`),localStorage.getItem(r.I.C.ec)&&(localStorage.removeItem(r.I.C.ec),n=!0)}catch(e){if(!(e instanceof Error&&(e.name===`QuotaExceededError`||e.name===`NS_ERROR_DOM_QUOTA_REACHED`)&&localStorage.length>0))throw e;n=!0}}catch{o.Z.info(`Local Storage not supported!`)}let i=P.oc(),a=new r.Z.tc(e,i&&!t,n),s;return s=n?new r.Z.rc(e):new r.Z.ac,new r.Z(a,s)},oc:function(){return navigator.cookieEnabled||`cookie`in document&&(document.cookie.length>0||(document.cookie=`test`).indexOf.call(document.cookie,`test`)>-1)}},F=P;var I=n(9342),L=n(8548),R=n(3552),z=n(7615);class B{constructor(e,t){this.yt=e,this.u=t,this.yt=e,this.u=t}getUserId(){let e=this.u.tu(r.I.iu.su);if(e==null)return null;let t=e.eu,n=(0,L.E)(t);if(n>z.Z.lr){for(;n>z.Z.lr;)t=t.slice(0,t.length-1),n=(0,L.E)(t);e.eu=t,this.u.uu(r.I.iu.su,e)}return t}ou(e){let t=this.getUserId()==null;this.u.uu(r.I.iu.su,new f.Z(e)),t&&this.u.ru(e)}setCustomUserAttribute(e,t){if(this.yt.hu(e))return o.Z.info(`Custom Attribute "`+e+`" is blocklisted, ignoring.`),!1;let n={};return n[e]=t,this.nu(z.Z.lu,n,!0)}nu(e,t,n=!1,r=!1){let i=this.u.mu(this.getUserId(),e,t),a=``,s=e,c=t;return n&&(a=` custom`,typeof t==`object`&&(s=Object.keys(t)[0],c=t[s],typeof c==`object`&&(c=JSON.stringify(c,null,2)))),!r&&i&&o.Z.info(`Logged${a} attribute ${s} with value ${c}`),i}kn(e,t,n,i,s){this.nu(`push_token`,e,!1,!0),this.nu(`custom_push_public_key`,n,!1,!0),this.nu(`custom_push_user_auth`,i,!1,!0),this.nu(`custom_push_vapid_public_key`,s,!1,!0);let c=a.Z.Yt.Qt,l=new a.Z(c,o.Z),u=new R.Z(e,t,n,i,s);this.u.k(r.I.C.In,u.Y()),l.setItem(c.ss.cu,c.ie,!0)}Dn(e){if(this.nu(`push_token`,null,!1,!0),this.nu(`custom_push_public_key`,null,!1,!0),this.nu(`custom_push_user_auth`,null,!1,!0),this.nu(`custom_push_vapid_public_key`,null,!1,!0),e){let e=a.Z.Yt.Qt,t=new a.Z(e,o.Z);this.u.k(r.I.C.In,!1),t.setItem(e.ss.cu,e.ie,!1)}}}var V=n(1148),H=n(5319);let ee={Eo:`allowCrawlerActivity`,_o:`baseUrl`,Io:`noCookies`,Ao:`devicePropertyAllowlist`,_a:`disablePushTokenMaintenance`,So:`enableLogging`,No:`enableSdkAuthentication`,Ma:`manageServiceWorkerExternally`,Oo:`minimumIntervalBetweenTriggerActionsInSeconds`,Po:`sessionTimeoutInSeconds`,Ro:`appVersion`,Lo:`appVersionNumber`,wa:`serviceWorkerLocation`,ya:`safariWebsitePushId`,zn:`localization`,bo:`contentSecurityNonce`,Do:`allowUserSuppliedJavascript`,jo:`inAppMessageZIndex`,ho:`openInAppMessagesInNewTab`,en:`openNewsFeedCardsInNewTab`,Lh:`requireExplicitInAppMessageDismissal`,Mo:`doNotLoadFontAwesome`,Uo:`deviceId`,Bo:`sdkFlavor`,tn:`openCardsInNewTab`},U={Eo:`allowCrawlerActivity`,_o:`baseUrl`,Io:`noCookies`,Ao:`devicePropertyAllowlist`,_a:`disablePushTokenMaintenance`,So:`enableLogging`,No:`enableSdkAuthentication`,Ma:`manageServiceWorkerExternally`,Oo:`minimumIntervalBetweenTriggerActionsInSeconds`,Po:`sessionTimeoutInSeconds`,Ro:`appVersion`,Lo:`appVersionNumber`,wa:`serviceWorkerLocation`,ya:`safariWebsitePushId`,zn:`localization`,bo:`contentSecurityNonce`,Do:`allowUserSuppliedJavascript`,jo:`inAppMessageZIndex`,ho:`openInAppMessagesInNewTab`,tn:`openCardsInNewTab`,en:`openNewsFeedCardsInNewTab`,Lh:`requireExplicitInAppMessageDismissal`,Mo:`doNotLoadFontAwesome`,Uo:`deviceId`,Bo:`sdkFlavor`},te=new class{constructor(){this.rn=``,this.Wo=``,this.Vo=void 0,this.zo=null,this.on=null,this.qt=null,this.zi=null,this.yt=null,this.ri=null,this.u=null,this.wt=null,this.Go=``,this.Ko=!1,this.$o=!1,this.qo=new i.Z,this.Jo=new i.Z,this.options={},this.Yo=[],this.Ho=[],this._e=[],this.Wo=`5.3.1`}Xo(e){this.qo.It(e)}Sh(e){this.Jo.It(e)}initialize(e,t){if(this.so())return o.Z.info(`Braze has already been initialized with an API key.`),!0;this.options=t||{};let a=this.nn(U.So),c=(0,V.L)(H.SD.Un());if(c&&c.brazeLogging===`true`&&(a=!0),o.Z.init(a),o.Z.info(`Initialization Options: ${JSON.stringify(this.options,null,2)}`),e==null||e===``||typeof e!=`string`)return o.Z.error(`Braze requires a valid API key to be initialized.`),!1;this.rn=e;let u=this.nn(U._o);if(u==null||u===``||typeof u!=`string`)return o.Z.error(`Braze requires a valid baseUrl to be initialized.`),!1;!1===/^https?:/.test(u)&&(u=`https://${u}`);let p=u;if(u=document.createElement(`a`),u.href=p,u.pathname===`/`&&(u=`${u}api/v3`),this.Go=u.toString(),l.Z.Zo&&!this.nn(U.Eo))return o.Z.info(`Ignoring activity from crawler bot `+navigator.userAgent),this.$o=!0,!1;let h=this.nn(U.Io)||!1;if(this.u=F.Qo(e,h),h&&this.u.Wh(e),new r.Z.ee(null,!0).br(r.I.se))return o.Z.info(`Ignoring all activity due to previous opt out`),this.$o=!0,!1;for(let e of(0,m.XP)(this.options))(0,m.VO)(ee).indexOf(e)===-1&&o.Z.warn(`Ignoring unknown initialization option '${e}'.`);let _=[`mparticle`,`wordpress`,`tealium`];if(this.nn(U.Bo)!=null){let e=this.nn(U.Bo);_.indexOf(e)===-1?o.Z.error(`Invalid sdk flavor passed: `+e):this.Vo=e}let v=this.nn(ee.Ao);if(v!=null)if((0,m.kJ)(v)){let e=[];for(let t=0;t<v.length;t++)(0,m.fk)(d,v[t],`devicePropertyAllowlist contained an invalid value.`,`DeviceProperties`)&&e.push(v[t]);v=e}else o.Z.error(`devicePropertyAllowlist must be an array. Defaulting to all properties.`),v=null;let y=this.nn(U.Uo);if(y){let e=new f.Z(y);this.u.uu(r.I.iu.Uo,e)}this.on=new g(this.u,v),this.yt=new M(this.u),this.wt=new B(this.yt,this.u),this.ri=new N(this.u,this.wt,this.yt,this.nn(U.Po));let b=new i.Z;return this.zo=new s(this.u,this.nn(U.No),b),this.$t(b),this.qt=new T(this.on,this.u,this.zo,this.wt,this.ri,this.yt,this.rn,this.Go,this.Wo,this.Vo||``,this.nn(U.Ro),this.nn(U.Lo)),this.zi=new A(this.rn,this.Go,this.ri,this.on,this.wt,this.yt,this.u,(e=>{if(this.so())for(let t of this.gr())t.Ns(e)}),this.zo,this.qt),this.zi.initialize(),h||this.u.Vh(),o.Z.info(`Initialized for the Braze backend at "${this.nn(U._o)}" with API key "${this.rn}".`),I.n.o(),this.yt.ji((()=>{var e;this.Ko&&(e=this.yt)!=null&&e.ci()&&n.e(787).then(n.bind(n,9787)).then((e=>{this.Ko&&(0,e.default)()}))})),this.zi.mr((()=>{var e;this.Ko&&(e=this.yt)!=null&&e.ci()&&n.e(787).then(n.bind(n,9787)).then((e=>{this.Ko&&(0,e.default)(void 0,void 0,!0)}))})),this.qo.Dt(this.options),this.Ko=!0,!0}destroy(e){if(o.Z.destroy(),this.so()){this.Jo.Dt(),this.Jo.removeAllSubscriptions();for(let e of this.Yo)e.destroy();this.Yo=[];for(let e of this.Ho)e.clearData(!1);this.Ho=[],this.removeAllSubscriptions(),this._e=[],this.zi!=null&&this.zi.destroy(),this.zi=null,this.zo=null,this.on=null,this.qt=null,this.yt=null,this.ri=null,this.wt=null,this.options={},this.Vo=void 0,this.Ko=!1,this.$o=!1,e&&(this.u=null)}}X(){return!(this.Kh()||!this.so()&&(console.warn(C.Go),1))}ba(){return this.rn}Sr(){return this.zo}Hs(){return this.Go}te(){return this.on}nr(){return this.qt}nn(e){return this.options[e]}gr(){return this.Ho}cr(){return this.zi}ir(){return this.yt}zr(){return this.ri}l(){return this.u}pr(){if(this.wt&&this.zi)return new z.Z(this.wt,this.zi)}er(){return this.wt}tr(){return!0===this.nn(U.Do)}g(e){let t=!1;for(let n of this.Yo)n===e&&(t=!0);t||this.Yo.push(e)}ar(e){let t=!1;for(let n of this.Ho)n.constructor===e.constructor&&(t=!0);e instanceof c.Z&&!t&&this.Ho.push(e)}$t(e){e instanceof i.Z&&this._e.push(e)}removeAllSubscriptions(){if(this.X())for(let e of this._e)e.removeAllSubscriptions()}removeSubscription(e){if(this.X())for(let t of this._e)t.removeSubscription(e)}oe(e){this.$o=e}so(){return this.Ko}Kh(){return this.$o}Ds(){return this.Wo}}},5966:(e,t,n)=>{n.d(t,{I:()=>d,Z:()=>f});var r=n(7559),i=n(2308),a=n(2893),o=n(2730),s=n(335),c=n(7615),l=n(3695),u=n(8031);let d={iu:{su:`ab.storage.userId`,Uo:`ab.storage.deviceId`,El:`ab.storage.sessionId`},C:{ec:`ab.test`,tE:`ab.storage.events`,eE:`ab.storage.attributes`,sE:`ab.storage.attributes.anonymous_user`,Ca:`ab.storage.device`,Yh:`ab.storage.sdk_metadata`,Jh:`ab.storage.session_id_for_cached_metadata`,In:`ab.storage.pushToken`,Ui:`ab.storage.newsFeed`,ki:`ab.storage.lastNewsFeedRefresh`,J:`ab.storage.cardImpressions`,ul:`ab.storage.serverConfig`,rE:`ab.storage.triggers`,oE:`ab.storage.triggers.ts`,Nl:`ab.storage.messagingSessionStart`,ws:`ab.storage.cc`,gs:`ab.storage.ccLastFullSync`,ys:`ab.storage.ccLastCardUpdated`,nE:`ab.storage.ccRateLimitCurrentTokenCount`,au:`ab.storage.globalRateLimitCurrentTokenCount`,vu:`ab.storage.dynamicRateLimitCurrentTokenCount`,v:`ab.storage.ccClicks`,H:`ab.storage.ccImpressions`,A:`ab.storage.ccDismissals`,aE:`ab.storage.lastDisplayedTriggerTimesById`,iE:`ab.storage.lastDisplayedTriggerTime`,EE:`ab.storage.triggerFireInstancesById`,wh:`ab.storage.signature`,As:`ab.storage.brazeSyncRetryCount`,Ss:`ab.storage.sdkVersion`,gi:`ab.storage.ff`,vi:`ab.storage.ffImpressions`,xi:`ab.storage.ffLastRefreshAt`,Di:`ab.storage.ff.sessionId`,lE:`ab.storage.lastReqToEndpoint`,SE:`ab.storage.requestAttempts`,Cr:`ab.storage.deferredIam`,Qa:`ab.storage.lastSdkReq`,_E:`ab.storage.alias`},se:`ab.optOut`};class f{constructor(e,t){this.uE=e,this.TE=t,this.uE=e,this.TE=t}Wh(e){let t=(0,a.XP)(d.iu),n=new f.ee(e);for(let e of t)n.remove(d.iu[e])}uu(e,t){let n=null;t!=null&&t instanceof i.Z&&(n=t.Y()),this.uE.store(e,n)}cE(e){let t=this.tu(e);t!=null&&(t.Wl=new Date().valueOf(),this.uu(e,t))}tu(e){let t=this.uE.br(e),n=(e=>{let t;try{t=JSON.parse(e)}catch{t=null}return t})(t),r;if(n)r=i.Z.qn(n)||null,r&&this.uu(e,r);else{let n=i.Z.hE(t);r=i.Z.qn(n)||null,n!==t&&r&&this.uu(e,r)}return r}Al(e){this.uE.remove(e)}Vh(){let e=(0,a.XP)(d.iu),t;for(let n of e)t=this.tu(d.iu[n]),t!=null&&this.uu(d.iu[n],t)}xo(e){let t;if(e==null||e.length===0)return!1;t=(0,a.kJ)(e)?e:[e];let n=this.TE.br(d.C.tE);n!=null&&(0,a.kJ)(n)||(n=[]);for(let e=0;e<t.length;e++)n.push(t[e].Y());return this.TE.store(d.C.tE,n)}kl(e){return e!=null&&this.xo([e])}AE(){let e=this.TE.br(d.C.tE);this.TE.remove(d.C.tE),e??=[];let t=[],n=!1,i=null;if((0,a.kJ)(e))for(let n=0;n<e.length;n++)r.Z.RE(e[n])?t.push(r.Z.qn(e[n])):i=n;else n=!0;if(n||i!=null){let a=`Stored events could not be deserialized as Events`;n&&(a+=`, was `+Object.prototype.toString.call(e)+` not an array`),i!=null&&(a+=`, value at index `+i+` does not look like an event`),a+=`, serialized values were of type `+typeof e+`: `+JSON.stringify(e),t.push(new r.Z(null,o.G.qs,new Date().valueOf(),null,{e:a}))}return t}k(e,t){return!!(0,a.fk)(d.C,e,`StorageManager cannot store object.`,`STORAGE_KEYS.OBJECTS`)&&this.TE.store(e,t)}j(e){return!!(0,a.fk)(d.C,e,`StorageManager cannot retrieve object.`,`STORAGE_KEYS.OBJECTS`)&&this.TE.br(e)}ti(e){return!!(0,a.fk)(d.C,e,`StorageManager cannot remove object.`,`STORAGE_KEYS.OBJECTS`)&&(this.TE.remove(e),!0)}clearData(){let e=(0,a.XP)(d.iu),t=(0,a.XP)(d.C);for(let t=0;t<e.length;t++){let n=e[t];this.uE.remove(d.iu[n])}for(let e=0;e<t.length;e++){let n=t[e];this.TE.remove(d.C[n])}}gE(e){return e||d.C.sE}La(e){let t=this.TE.br(d.C.eE);t??={};let n=this.gE(e[c.Z.Yn]),r=t[n];for(let i in e)i!==c.Z.Yn&&(t[n]==null||r&&r[i]==null)&&this.mu(e[c.Z.Yn],i,e[i])}mu(e,t,n){let r=this.TE.br(d.C.eE);r??={};let i=this.gE(e),a=r[i];if(a??(a={},e!=null&&(a[c.Z.Yn]=e)),t===c.Z.lu){a[t]??(a[t]={});for(let e in n)a[t][e]=n[e]}else a[t]=n;return r[i]=a,this.TE.store(d.C.eE,r)}OE(){let e=this.TE.br(d.C.eE);this.TE.remove(d.C.eE);let t=[];for(let n in e)e[n]!=null&&t.push(e[n]);return t}ru(e){let t=this.TE.br(d.C.eE);if(t!=null){let n=this.gE(null),r=t[n];r!=null&&(t[n]=void 0,this.TE.store(d.C.eE,t),r[c.Z.Yn]=e,this.La(r))}let n=this.tu(d.iu.El),r=null;n!=null&&(r=n.eu);let i=this.AE();if(i!=null)for(let t=0;t<i.length;t++){let n=i[t];n.userId==null&&n.sessionId==r&&(n.userId=e),this.kl(n)}}dE(){return this.TE.fE}}f.rc=class{constructor(e){this.rn=e,this.rn=e,this.fE=l.Z.IE()?3:10}bE(e){return e+`.`+this.rn}store(e,t){let n={v:t};try{return localStorage.setItem(this.bE(e),JSON.stringify(n)),!0}catch(e){return s.Z.info(`Storage failure: `+(0,u.e)(e)),!1}}br(e){try{let t=null,n=localStorage.getItem(this.bE(e));return n!=null&&(t=JSON.parse(n)),t==null?null:t.v}catch(e){return s.Z.info(`Storage retrieval failure: `+(0,u.e)(e)),null}}remove(e){try{localStorage.removeItem(this.bE(e))}catch(e){return s.Z.info(`Storage removal failure: `+(0,u.e)(e)),!1}}},f.ac=class{constructor(){this.mE={},this.KE=5242880,this.fE=3}store(e,t){let n={value:t},r=this.YE(t);return r>this.KE?(s.Z.info(`Storage failure: object is ≈`+r+` bytes which is greater than the max of `+this.KE),!1):(this.mE[e]=n,!0)}YE(e){let t=[],n=[e],r=0;for(;n.length;){let e=n.pop();if(typeof e==`boolean`)r+=4;else if(typeof e==`string`)r+=2*e.length;else if(typeof e==`number`)r+=8;else if(typeof e==`object`&&t.indexOf(e)===-1){let r,i;t.push(e);for(let t in e)i=e,r=t,n.push(i[r])}}return r}br(e){let t=this.mE[e];return t==null?null:t.value}remove(e){this.mE[e]=null}},f.ee=class{constructor(e,t){this.rn=e,this.NE=t,this.rn=e,this.CE=this.GE(),this.DE=576e3,this.NE=!!t}bE(e){return this.rn==null?e:e+`.`+this.rn}GE(){let e=0,t=document.location.hostname,n=t.split(`.`);for(;e<n.length-1&&document.cookie.indexOf(`ab._gd=ab._gd`)===-1;)e++,t=`.`+n.slice(-1-e).join(`.`),document.cookie=`ab._gd=ab._gd;domain=`+t+`;`;return document.cookie=`ab._gd=;expires=`+new Date(0).toUTCString()+`;domain=`+t+`;`,t}ne(){let e=new Date;return e.setTime(e.getTime()+60*this.DE*1e3),e.getFullYear()}ME(){let e=(0,a.VO)(d.iu),t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n];for(;r.charAt(0)===` `;)r=r.substring(1);let i=!1;for(let t=0;t<e.length;t++)if(r.indexOf(e[t])===0){i=!0;break}if(i){let e=r.split(`=`)[0];e.indexOf(`.`+this.rn)===-1&&this.pE(e)}}}store(e,t){this.ME();let n=new Date;n.setTime(n.getTime()+60*this.DE*1e3);let r=`expires=`+n.toUTCString(),i=`domain=`+this.CE,a;a=this.NE?t:encodeURIComponent(t);let o=this.bE(e)+`=`+a+`;`+r+`;`+i+`;path=/`;return o.length>=4093?(s.Z.info(`Storage failure: string is `+o.length+` chars which is too large to store as a cookie.`),!1):(document.cookie=o,!0)}br(e){let t=[],n=this.bE(e)+`=`,r=document.cookie.split(`;`);for(let i=0;i<r.length;i++){let a=r[i];for(;a.charAt(0)===` `;)a=a.substring(1);if(a.indexOf(n)===0)try{let e;e=this.NE?a.substring(n.length,a.length):decodeURIComponent(a.substring(n.length,a.length)),t.push(e)}catch(t){return s.Z.info(`Storage retrieval failure: `+(0,u.e)(t)),this.remove(e),null}}return t.length>0?t[t.length-1]:null}remove(e){this.pE(this.bE(e))}pE(e){let t=e+`=;expires=`+new Date(0).toUTCString();document.cookie=t,document.cookie=t+`;path=/`;let n=t+`;domain=`+this.CE;document.cookie=n,document.cookie=n+`;path=/`}},f.tc=class{constructor(e,t,n){this.rn=e,this.vE=[],t&&this.vE.push(new f.ee(e)),n&&this.vE.push(new f.rc(e)),this.vE.push(new f.ac)}store(e,t){let n=!0;for(let r=0;r<this.vE.length;r++)n=this.vE[r].store(e,t)&&n;return n}br(e){for(let t=0;t<this.vE.length;t++){let n=this.vE[t].br(e);if(n!=null)return n}return null}remove(e){new f.ee(this.rn).remove(e);for(let t=0;t<this.vE.length;t++)this.vE[t].remove(e)}}},4663:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(7070);class i{constructor(){this._e={}}It(e){if(typeof e!=`function`)return null;let t=r.Z.W();return this._e[t]=e,t}removeSubscription(e){delete this._e[e]}removeAllSubscriptions(){this._e={}}ic(){return Object.keys(this._e).length}Dt(e){let t=[];for(let n in this._e){let r=this._e[n];t.push(r(e))}return t}}},8982:(e,t,n)=>{n.d(t,{q:()=>i});var r=n(5966);function i(e){let t=e?.j(r.I.C._E),n;return t&&(n={label:t.l,name:t.a}),n}},3826:(e,t,n)=>{n.d(t,{Z:()=>r});let r={qa:`invalid_api_key`,Aa:`blacklisted`,Ba:`no_device_identifier`,Ra:`invalid_json_response`,Zh:`empty_response`,__:`sdk_auth_error`}},7559:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(5825),i=n(8982),a=n(2893),o=n(7750);class s{constructor(e,t,n,r,i){this.userId=e,this.type=t,this.time=n,this.sessionId=r,this.data=i,this.userId=e,this.type=t,this.time=(0,o._0)(n),this.sessionId=r,this.data=i}Ir(){let e={name:this.type,time:(0,o.FX)(this.time),data:this.data||{},session_id:this.sessionId};this.userId!=null&&(e.user_id=this.userId);let t=r.ZP.Sr()?.Fh()||!1;if(!e.user_id&&!t){let t=(0,i.q)(r.ZP.l());t&&(e.alias=t)}return e}Y(){return{u:this.userId,t:this.type,ts:this.time,s:this.sessionId,d:this.data}}static fromJson(e){return new s(e.user_id,e.name,e.time,e.session_id,e.data)}static RE(e){return e!=null&&(0,a.Kn)(e)&&e.t!=null&&e.t!==``}static qn(e){return new s(e.u,e.t,e.ts,e.s,e.d)}}},2308:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(7070),i=n(335),a=n(2893),o=n(8031);class s{constructor(e,t,n){this.eu=e,e??=r.Z.W(),!n||isNaN(n)?this.Dl=new Date().valueOf():this.Dl=n,this.eu=e,this.Wl=new Date().valueOf(),this.Hl=t}Y(){return`g:${encodeURIComponent(this.eu)}|e:${this.Hl}|c:${this.Dl}|l:${this.Wl}`}static hE(e){if(typeof e!=`string`)return null;let t=e.lastIndexOf(`|e:`),n=e.substring(0,t),r=n.split(`g:`)[1],i;return i=/[|:]/.test(r)?encodeURIComponent(r):r,e.replace(n,`g:${i}`)}static qn(e){let t;if(typeof e==`string`)try{let n=e.split(`|`);if(!(0,a.kJ)(n)||n.length!==4)return null;let r=e=>e.split(`:`)[1],i=e=>{let t=parseInt(r(e));if(!isNaN(t))return t};t=new s(decodeURIComponent(r(n[0])),i(n[1]),i(n[2])),t.Wl=i(n[3])}catch(t){i.Z.info(`Unable to parse cookie string ${e}, failed with error: ${(0,o.e)(t)}`)}else{if(e==null||e.g==null)return null;t=new s(e.g,e.e,e.c),t.Wl=e.l}return t}}},3552:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(7750);class i{constructor(e,t,n,r,i){this.endpoint=e,this.Vn=t,this.publicKey=n,this.Vl=r,this.cl=i,this.endpoint=e||null,this.Vn=t||null,this.publicKey=n||null,this.Vl=r||null,this.cl=i||null}Y(){return{e:this.endpoint,c:this.Vn,p:this.publicKey,u:this.Vl,v:this.cl}}static qn(e){return new i(e.e,(0,r.Rd)(e.c),e.p,e.u,e.v)}}},4673:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e=!1,t=[]){this.L=e,this.ge=t,this.L=e,this.ge=t}P(e){this.L=this.L&&e.L,this.ge.push(...e.ge)}}},4365:(e,t,n)=>{n.d(t,{Z:()=>r});let r={OPEN:`open`,Rr:`purchase`,vr:`push_click`,ue:`custom_event`,Qr:`iam_click`,kt:`test`}},2246:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(7750),i=n(335);class a{constructor(e){this.Bl=e,this.Bl=e}Jl(e){return this.Bl==null||this.Bl===e[0]}static fromJson(e){return new a(e?e.event_name:null)}Y(){return this.Bl}}var o=n(2893);class s{constructor(e,t,n,i){this.Tl=e,this._l=t,this.comparator=n,this.Ll=i,this.Tl=e,this._l=t,this.comparator=n,this.Ll=i,this._l===s.Ol.Il&&this.comparator!==s.Ql.Ul&&this.comparator!==s.Ql.Xl&&this.comparator!==s.Ql.Fl&&this.comparator!==s.Ql.Kl&&(this.Ll=(0,r.X2)(this.Ll))}Jl(e){let t=null;switch(e!=null&&(t=e[this.Tl]),this.comparator){case s.Ql.Pl:return t!=null&&t.valueOf()===this.Ll.valueOf();case s.Ql.Yl:return t==null||t.valueOf()!==this.Ll.valueOf();case s.Ql.Zl:return t!=null&&typeof t==typeof this.Ll&&t>this.Ll;case s.Ql.Ul:return this._l===s.Ol.Il?t!=null&&(0,o.J_)(t)&&(0,r.$N)(t)<=this.Ll.valueOf():t!=null&&typeof t==typeof this.Ll&&t>=this.Ll;case s.Ql.$l:return t!=null&&typeof t==typeof this.Ll&&t<this.Ll;case s.Ql.Xl:return this._l===s.Ol.Il?t!=null&&(0,o.J_)(t)&&(0,r.$N)(t)>=this.Ll.valueOf():t!=null&&typeof t==typeof this.Ll&&t<=this.Ll;case s.Ql.Hu:return t!=null&&typeof t==`string`&&typeof t==typeof this.Ll&&t.match(this.Ll)!=null;case s.Ql.Qu:return t!=null;case s.Ql.Xu:return t==null;case s.Ql.Fl:return t!=null&&(0,o.J_)(t)&&(0,r.yo)(t)<this.Ll;case s.Ql.Kl:return t!=null&&(0,o.J_)(t)&&(0,r.yo)(t)>this.Ll;case s.Ql.Gu:return t==null||typeof t!=typeof this.Ll||typeof t!=`string`||t.match(this.Ll)==null}return!1}static fromJson(e){return new s(e.property_key,e.property_type,e.comparator,e.property_value)}Y(){let e=this.Ll;return(0,o.J_)(this.Ll)&&(e=(0,r.FX)(e.valueOf())),{k:this.Tl,t:this._l,c:this.comparator,v:e}}static qn(e){return new s(e.k,e.t,e.c,e.v)}}s.Ol={Vu:`boolean`,Wu:`number`,Yu:`string`,Il:`date`},s.Ql={Pl:1,Yl:2,Zl:3,Ul:4,$l:5,Xl:6,Hu:10,Qu:11,Xu:12,Fl:15,Kl:16,Gu:17};class c{constructor(e){this.filters=e,this.filters=e}Jl(e){let t=!0;for(let n=0;n<this.filters.length;n++){let r=this.filters[n],i=!1;for(let t=0;t<r.length;t++)if(r[t].Jl(e)){i=!0;break}if(!i){t=!1;break}}return t}static fromJson(e){if(e==null||!(0,o.kJ)(e))return null;let t=[];for(let n=0;n<e.length;n++){let r=[],i=e[n];for(let e=0;e<i.length;e++)r.push(s.fromJson(i[e]));t.push(r)}return new c(t)}Y(){let e=[];for(let t=0;t<this.filters.length;t++){let n=this.filters[t],r=[];for(let e=0;e<n.length;e++)r.push(n[e].Y());e.push(r)}return e}static qn(e){let t=[];for(let n=0;n<e.length;n++){let r=[],i=e[n];for(let e=0;e<i.length;e++)r.push(s.qn(i[e]));t.push(r)}return new c(t)}}class l{constructor(e,t){this.Bl=e,this.Ml=t,this.Bl=e,this.Ml=t}Jl(e){if(this.Bl==null||this.Ml==null)return!1;let t=e[0],n=e[1];return t===this.Bl&&this.Ml.Jl(n)}static fromJson(e){return new l(e?e.event_name:null,e?c.fromJson(e.property_filters):null)}Y(){return{e:this.Bl,pf:this.Ml?this.Ml.Y():null}}}class u{constructor(e,t){this.Zu=e,this.tf=t,this.Zu=e,this.tf=t}Jl(e){if(this.Zu==null)return!1;let t=g.if(e[0],this.Zu);if(!t)return!1;let n=this.tf==null||this.tf.length===0;if(this.tf!=null){for(let t=0;t<this.tf.length;t++)if(this.tf[t]===e[1]){n=!0;break}}return t&&n}static fromJson(e){return new u(e?e.id:null,e?e.buttons:null)}Y(){return this.Zu}}class d{constructor(e){this.productId=e,this.productId=e}Jl(e){return this.productId==null||e[0]===this.productId}static fromJson(e){return new d(e?e.product_id:null)}Y(){return this.productId}}class f{constructor(e,t){this.productId=e,this.Ml=t,this.productId=e,this.Ml=t}Jl(e){if(this.productId==null||this.Ml==null)return!1;let t=e[0],n=e[1];return t===this.productId&&this.Ml.Jl(n)}static fromJson(e){return new f(e?e.product_id:null,e?c.fromJson(e.property_filters):null)}Y(){return{id:this.productId,pf:this.Ml?this.Ml.Y():null}}}class p{constructor(e){this.Zu=e,this.Zu=e}Jl(e){return this.Zu==null||g.if(e[0],this.Zu)}static fromJson(e){return new p(e?e.campaign_id:null)}Y(){return this.Zu}}var m=n(4365),h=n(8031);class g{constructor(e,t){this.type=e,this.data=t,this.type=e,this.data=t}sc(e,t){return g.cc[this.type]===e&&(this.data==null||this.data.Jl(t))}static if(e,t){let n=null;try{n=window.atob(e)}catch(t){return i.Z.info(`Failed to unencode analytics id `+e+`: `+(0,h.e)(t)),!1}return t===n.split(`_`)[0]}static fromJson(e){let t=e.type,n=null;switch(t){case g._r.OPEN:case g._r.kt:break;case g._r.Rr:n=d.fromJson(e.data);break;case g._r.nc:n=f.fromJson(e.data);break;case g._r.vr:n=p.fromJson(e.data);break;case g._r.ue:n=a.fromJson(e.data);break;case g._r.lc:n=l.fromJson(e.data);break;case g._r.Qr:n=u.fromJson(e.data)}return new g(t,n)}Y(){return{t:this.type,d:this.data?this.data.Y():null}}static qn(e){let t,n=null;switch(e.t){case g._r.OPEN:case g._r.kt:break;case g._r.Rr:n=new d(e.d);break;case g._r.nc:t=e.d||{},n=new f(t.id,c.qn(t.pf||[]));break;case g._r.vr:n=new p(e.d);break;case g._r.ue:n=new a(e.d);break;case g._r.lc:t=e.d||{},n=new l(t.e,c.qn(t.pf||[]));break;case g._r.Qr:n=new u(e.d)}return new g(e.t,n)}}g._r={OPEN:`open`,Rr:`purchase`,nc:`purchase_property`,vr:`push_click`,ue:`custom_event`,lc:`custom_event_property`,Qr:`iam_click`,kt:`test`},g.cc={},g.cc[g._r.OPEN]=m.Z.OPEN,g.cc[g._r.Rr]=m.Z.Rr,g.cc[g._r.nc]=m.Z.Rr,g.cc[g._r.vr]=m.Z.vr,g.cc[g._r.ue]=m.Z.ue,g.cc[g._r.lc]=m.Z.ue,g.cc[g._r.Qr]=m.Z.Qr,g.cc[g._r.kt]=m.Z.kt;class _{constructor(e,t=[],n,r,i=0,a,o,s=0,c=_.td,l,u,d){this.id=e,this.sd=t,this.startTime=n,this.endTime=r,this.priority=i,this.type=a,this.data=o,this.ed=s,this.rd=c,this.Nr=l,this.hd=u,this.od=d,this.id=e,this.sd=t||[],n===void 0&&(n=null),this.startTime=n,r===void 0&&(r=null),this.endTime=r,this.priority=i||0,this.type=a,this.ed=s||0,l??=1e3*(this.ed+30),this.Nr=l,this.data=o,c!=null&&(this.rd=c),this.hd=u,this.od=d||null}nd(e){return this.od==null||this.rd!==_.td&&e-this.od>=1e3*this.rd}ad(e){this.od=e}ud(e){let t=e+1e3*this.ed;return Math.max(t-new Date().valueOf(),0)}dd(e){let t=new Date().valueOf()-e,n=e==null||isNaN(t)||this.Nr==null||t<this.Nr;return n||i.Z.info(`Trigger action ${this.type} is no longer eligible for display - fired ${t}ms ago and has a timeout of ${this.Nr}ms.`),!n}static fromJson(e){let t=e.id,n=[];for(let t=0;t<e.trigger_condition.length;t++)n.push(g.fromJson(e.trigger_condition[t]));let i=(0,r.X2)(e.start_time),a=(0,r.X2)(e.end_time),s=e.priority,c=e.type,l=e.delay,u=e.re_eligibility,d=e.timeout,f=e.data,p=e.min_seconds_since_last_trigger;return(0,o.fk)(_._r,c,`Could not construct Trigger from server data`,`Trigger.Types`)?new _(t,n,i,a,s,c,f,l,u,d,p):null}Y(){let e=[];for(let t=0;t<this.sd.length;t++)e.push(this.sd[t].Y());return{i:this.id,c:e,s:this.startTime,e:this.endTime,p:this.priority,t:this.type,da:this.data,d:this.ed,r:this.rd,tm:this.Nr,ss:this.hd,ld:this.od}}static qn(e){let t=[],n=e.c||[];for(let e=0;e<n.length;e++)t.push(g.qn(n[e]));return new _(e.i,t,(0,r.Rd)(e.s),(0,r.Rd)(e.e),e.p,e.t,e.da,e.d,e.r,e.tm,e.ss,e.ld)}}_._r={Br:`inapp`,md:`templated_iam`},_.td=-1},9342:(e,t,n)=>{n.d(t,{n:()=>h});var r=n(1087),i=n(5825),a=n(158),o=n(3340),s=n(7559),c=n(2893),l=n(5966);class u{constructor(e,t,n,r,i){this.triggerId=e,this.Er=t,this.Tr=n,this.Gr=r,this.Nr=i,this.triggerId=e,this.Er=t,this.Tr=n,this.Gr=r,this.Nr=i}static fromJson(e,t,n,r,i){return e==null||e.trigger_id==null?null:new u(e.trigger_id,t,n,r,i)}}var d=n(2246),f=n(4365),p=n(335);class m extends a.Z{constructor(e,t,n,r,i){super(),this.tg=e,this.Jt=t,this.u=n,this.zi=r,this.ig=i,this.tg=e,this.Jt=t,this.u=n,this.zi=r,this.ig=i,this.sg=[],this.eg=[],this.hg=null,this.ng={},this.og={},this.triggers=[],this.lg=0,this.ag(),this.gg()}fg(){if(this.u){this.hg=this.u.j(l.I.C.iE)||this.hg,this.ng=this.u.j(l.I.C.EE)||this.ng,this.og=this.u.j(l.I.C.aE)||this.og;for(let e=0;e<this.triggers.length;e++){let t=this.triggers[e];t.id&&this.og[t.id]!=null&&t.ad(this.og[t.id])}}}ag(){if(!this.u)return;this.lg=this.u.j(l.I.C.oE)||0;let e=this.u.j(l.I.C.rE)||[],t=[];for(let n=0;n<e.length;n++)t.push(d.Z.qn(e[n]));this.triggers=t,this.fg()}gg(){let e=this,t=function(t,n,r,i,a){return function(){e.cg(t,n,r,i,a)}},n={};for(let e of this.triggers)e.id&&(n[e.id]=e);let r=!1;for(let e=0;e<this.triggers.length;e++){let i=this.triggers[e];if(i.id&&this.ng[i.id]!=null){let e=this.ng[i.id],a=[];for(let r=0;r<e.length;r++){let o=e[r],l=i.ud(o.Gr||0);if(l>0){let e,r;a.push(o),o.ug!=null&&(e=o.ug),o.dg!=null&&s.Z.RE(o.dg)&&(r=s.Z.qn(o.dg));let u=[];if(o.pg&&(0,c.kJ)(o.pg))for(let e=0;e<o.pg.length;e++){let t=n[o.pg[e]];t!=null&&u.push(t)}this.eg.push(window.setTimeout(t(i,o.Gr||0,e,r,u),l))}}this.ng[i.id].length>a.length&&(this.ng[i.id]=a,r=!0,this.ng[i.id].length===0&&delete this.ng[i.id])}}r&&this.u&&this.u.k(l.I.C.EE,this.ng)}mg(){if(!this.u)return;let e=[];for(let t=0;t<this.triggers.length;t++)e.push(this.triggers[t].Y());this.lg=new Date().valueOf(),this.u.k(l.I.C.rE,e),this.u.k(l.I.C.oE,this.lg)}bg(){this.u&&((this.u.j(l.I.C.oE)||0)>this.lg?this.ag():this.fg())}Ns(e){let t=!1;if(e!=null&&e.triggers){this.ig.Lr(),this.fg();let n={},r={};this.triggers=[];for(let i=0;i<e.triggers.length;i++){let a=d.Z.fromJson(e.triggers[i]);if(a){a.id&&this.og[a.id]!=null&&(a.ad(this.og[a.id]),n[a.id]=this.og[a.id]),a.id&&this.ng[a.id]!=null&&(r[a.id]=this.ng[a.id]);for(let e=0;e<a.sd.length;e++)if(a.sd[e].sc(f.Z.kt,null)){t=!0;break}this.triggers.push(a)}}(0,c.Xy)(this.og,n)||(this.og=n,this.u&&this.u.k(l.I.C.aE,this.og)),(0,c.Xy)(this.ng,r)||(this.ng=r,this.u&&this.u.k(l.I.C.EE,this.ng)),this.mg(),t&&(p.Z.info(`Trigger with test condition found, firing test.`),this.fe(f.Z.kt)),this.fe(f.Z.OPEN);let i=this.sg,a;this.sg=[];for(let e=0;e<i.length;e++)a=Array.prototype.slice.call(i[e]),this.fe(...a)}}cg(e,t,n,r,i){let a=r=>{this.fg();let i=new Date().valueOf();e.dd(t)||(!1===navigator.onLine&&e.type===d.Z._r.Br&&r.imageUrl?p.Z.info(`Not showing ${e.type} trigger action ${e.id} due to offline state.`):e.nd(i)&&this.wg(e,i,n)?this.Jt.ic()===0?p.Z.info(`Not displaying trigger ${e.id} because neither automaticallyShowInAppMessages() nor subscribeToInAppMessage() were called.`):(this.Jt.Dt([r]),this.yg(e,i)):p.Z.info(`Not displaying trigger ${e.id} because display time fell outside of the acceptable time window.`))},s=()=>{this.fg();let a=i.pop();if(a!=null)if(this.Tg(a,t,n,r,i),a.dd(t)){let e=`Server aborted in-app message display, but the timeout on fallback trigger ${a.id} has already elapsed.`;i.length>0&&(e+=` Continuing to fall back.`),p.Z.info(e),s()}else{p.Z.info(`Server aborted in-app message display. Falling back to lower priority ${a.type} trigger action ${e.id}.`);let o=1e3*a.ed-(new Date().valueOf()-t);o>0?this.eg.push(window.setTimeout((()=>{this.cg(a,t,n,r,i)}),o)):this.cg(a,t,n,r,i)}},c,l,f;switch(e.type){case d.Z._r.Br:if(c=(0,o.q)(e.data),c==null){p.Z.error(`Could not parse trigger data for trigger ${e.id}, ignoring.`);break}if(l=this.ig.Li(c),l){p.Z.error(l),s();break}a(c);break;case d.Z._r.md:if(f=u.fromJson(e.data,a,s,t,e.Nr||0),f==null){p.Z.error(`Could not parse trigger data for trigger ${e.id}, ignoring.`);break}this.ig.Yi(f,n,r);break;default:p.Z.error(`Trigger ${e.id} was of unexpected type ${e.type}, ignoring.`)}}fe(e,t=null,n){if(!(0,c.fk)(f.Z,e,`Cannot fire trigger action.`,`TriggerEvents`))return;if(this.zi&&this.zi.Nu())return p.Z.info(`Trigger sync is currently in progress, awaiting sync completion before firing trigger event.`),void this.sg.push(arguments);this.bg();let r=new Date().valueOf(),i=r-(this.hg||0),a=!0,o=!0,s=[];for(let n=0;n<this.triggers.length;n++){let i=this.triggers[n],c=r+1e3*i.ed;if(i.nd(c)&&(i.startTime==null||i.startTime.valueOf()<=r)&&(i.endTime==null||i.endTime.valueOf()>=r)){let n=!1;for(let r=0;r<i.sd.length;r++)if(i.sd[r].sc(e,t)){n=!0;break}n&&(a=!1,this.wg(i,c,e)&&(o=!1,s.push(i)))}}if(a)return void p.Z.info(`Trigger event ${e} did not match any trigger conditions.`);if(o)return void p.Z.info(`Ignoring ${e} trigger event because a trigger was displayed ${i/1e3}s ago.`);s.sort(((e,t)=>e.priority-t.priority));let l=s.pop();l!=null&&(p.Z.info(`Firing ${l.type} trigger action ${l.id} from trigger event ${e}.`),this.Tg(l,r,e,n,s),l.ed===0?this.cg(l,r,e,n,s):this.eg.push(window.setTimeout((()=>{this.cg(l,r,e,n,s)}),1e3*l.ed)))}changeUser(e=!1){if(this.triggers=[],this.u&&this.u.ti(l.I.C.rE),!e){this.sg=[],this.hg=null,this.og={},this.ng={};for(let e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[],this.u&&(this.u.ti(l.I.C.iE),this.u.ti(l.I.C.aE),this.u.ti(l.I.C.EE))}}clearData(){this.triggers=[],this.hg=null,this.og={},this.ng={};for(let e=0;e<this.eg.length;e++)clearTimeout(this.eg[e]);this.eg=[]}wg(e,t,n){if(this.hg==null)return!0;if(n===f.Z.kt)return p.Z.info(`Ignoring minimum interval between trigger because it is a test type.`),!0;let r=e.hd;return r??=this.tg,t-this.hg>=1e3*r}Tg(e,t,n,r,i){this.fg(),e.id&&(this.ng[e.id]=this.ng[e.id]||[]);let a={},o;a.Gr=t,a.ug=n,r!=null&&(o=r.Y()),a.dg=o;let s=[];for(let e of i)e.id&&s.push(e.id);a.pg=s,e.id&&this.ng[e.id].push(a),this.u&&this.u.k(l.I.C.EE,this.ng)}yg(e,t){this.fg(),e.ad(t),this.hg=t,e.id&&(this.og[e.id]=t),this.u&&(this.u.k(l.I.C.iE,t),this.u.k(l.I.C.aE,this.og))}}let h={t:!1,provider:null,rr:()=>(h.o(),h.provider||h.rg(),h.provider),rg:()=>{if(!h.provider){let e=i.ZP.nn(i.JY.Oo);h.provider=new m(e??30,r.Z.m().Mi(),i.ZP.l(),i.ZP.cr(),r.Z.m()),i.ZP.ar(h.provider)}},o:()=>{h.t||=(h.rg(),i.ZP.g(h),!0)},destroy:()=>{h.provider=null,h.t=!1}}},5333:(e,t,n)=>{n.d(t,{e:()=>i});var r=n(5825);function i(e,t,n){let i=e||document.querySelector(`head`),a=`ab-${t}-css-definitions-${`5.3.1`.replace(/\./g,`-`)}`;if(!i)return;let o=i.ownerDocument||document;if(o.getElementById(a)==null){let e=o.createElement(`style`);e.innerHTML=n||``,e.id=a;let t=r.ZP.nn(r.JY.bo);t!=null&&e.setAttribute(`nonce`,t),i.appendChild(e)}}},6959:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(5333),i=n(6524);function a(){(0,r.e)(void 0,`feed`,`body>.ab-feed{position:fixed;top:0;right:0;bottom:0;width:421px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}body>.ab-feed .ab-feed-body{position:absolute;top:0;left:0;right:0;border:none;border-left:1px solid #d0d0d0;padding-top:70px;min-height:100%}body>.ab-feed .ab-initial-spinner{float:none}body>.ab-feed .ab-no-cards-message{position:absolute;width:100%;margin-left:-20px;top:40%}.ab-feed{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);-moz-box-shadow:0 1px 7px 1px rgba(66,82,113,.15);box-shadow:0 1px 7px 1px rgba(66,82,113,.15);width:402px;background-color:#eee;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:13px;line-height:130%;letter-spacing:normal;overflow-y:auto;overflow-x:visible;z-index:9011;-webkit-overflow-scrolling:touch}.ab-feed :focus,.ab-feed:focus{outline:0}.ab-feed .ab-feed-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border:1px solid #d0d0d0;border-top:none;padding:20px 20px 0 20px}.ab-feed.ab-effect-slide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px);-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-feed.ab-effect-slide.ab-show{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-feed.ab-effect-slide.ab-hide{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card{position:relative;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100%;border:1px solid #d0d0d0;margin-bottom:20px;overflow:hidden;background-color:#fff;-webkit-transition:height .4s ease-in-out,margin .4s ease-in-out;-moz-transition:height .4s ease-in-out,margin .4s ease-in-out;-o-transition:height .4s ease-in-out,margin .4s ease-in-out;transition:height .4s ease-in-out,margin .4s ease-in-out}.ab-feed .ab-card .ab-pinned-indicator{position:absolute;right:0;top:0;margin-right:-1px;width:0;height:0;border-style:solid;border-width:0 24px 24px 0;border-color:transparent #1676d0 transparent transparent}.ab-feed .ab-card .ab-pinned-indicator .fa-star{position:absolute;right:-21px;top:2px;font-size:9px;color:#fff}.ab-feed .ab-card.ab-effect-card.ab-hide{-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;-o-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-left{-webkit-transform:translateX(-450px);-moz-transform:translateX(-450px);-ms-transform:translateX(-450px);transform:translateX(-450px)}.ab-feed .ab-card.ab-effect-card.ab-hide.ab-swiped-right{-webkit-transform:translateX(450px);-moz-transform:translateX(450px);-ms-transform:translateX(450px);transform:translateX(450px)}.ab-feed .ab-card.ab-effect-card.ab-hide:not(.ab-swiped-left):not(.ab-swiped-right){opacity:0}.ab-feed .ab-card .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021;opacity:0;-webkit-transition:.5s;-moz-transition:.5s;-o-transition:.5s;transition:.5s}.ab-feed .ab-card .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-feed .ab-card .ab-close-button svg.ab-chevron{display:none}.ab-feed .ab-card .ab-close-button:active{background-color:transparent}.ab-feed .ab-card .ab-close-button:focus{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover{background-color:transparent}.ab-feed .ab-card .ab-close-button:hover svg{fill-opacity:.8}.ab-feed .ab-card .ab-close-button:hover{opacity:1}.ab-feed .ab-card .ab-close-button:focus{opacity:1}.ab-feed .ab-card a{float:none;color:inherit;text-decoration:none}.ab-feed .ab-card a:hover{text-decoration:underline}.ab-feed .ab-card .ab-image-area{float:none;display:inline-block;vertical-align:top;line-height:0;overflow:hidden;width:100%;-webkit-box-sizing:initial;-moz-box-sizing:initial;box-sizing:initial}.ab-feed .ab-card .ab-image-area img{float:none;height:auto;width:100%}.ab-feed .ab-card.ab-image-only .ab-card-body{display:none}.ab-feed .ab-card .ab-card-body{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:inline-block;width:100%;position:relative}.ab-feed .ab-card .ab-unread-indicator{position:absolute;bottom:0;margin-right:-1px;width:100%;height:5px;background-color:#1676d0}.ab-feed .ab-card .ab-unread-indicator.read{background-color:transparent}.ab-feed .ab-card .ab-title{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:18px;line-height:130%;padding:20px 25px 0 25px}.ab-feed .ab-card .ab-description{float:none;color:#545454;padding:15px 25px 20px 25px;word-wrap:break-word;white-space:pre-wrap}.ab-feed .ab-card .ab-description.ab-no-title{padding-top:20px}.ab-feed .ab-card .ab-url-area{float:none;color:#1676d0;margin-top:12px;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-feed .ab-card.ab-classic-card .ab-card-body{min-height:40px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.ab-feed .ab-card.ab-classic-card.with-image .ab-card-body{min-height:100px;padding-left:72px}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area{width:60px;height:60px;padding:20px 0 25px 25px;position:absolute}.ab-feed .ab-card.ab-classic-card.with-image .ab-image-area img{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;max-width:100%;max-height:100%;width:auto;height:auto}.ab-feed .ab-card.ab-classic-card.with-image .ab-title{background-color:transparent;font-size:16px}.ab-feed .ab-card.ab-classic-card.with-image .ab-description{padding-top:10px}.ab-feed .ab-card.ab-control-card{height:0;width:0;margin:0;border:0}.ab-feed .ab-feed-buttons-wrapper{float:none;position:relative;background-color:#282828;height:50px;-webkit-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);-moz-box-shadow:0 2px 3px 0 rgba(178,178,178,.5);box-shadow:0 2px 3px 0 rgba(178,178,178,.5);z-index:1}.ab-feed .ab-feed-buttons-wrapper .ab-close-button,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{float:none;cursor:pointer;color:#fff;font-size:18px;padding:16px;-webkit-transition:.2s;-moz-transition:.2s;-o-transition:.2s;transition:.2s}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover,.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{font-size:22px}.ab-feed .ab-feed-buttons-wrapper .ab-close-button{float:right}.ab-feed .ab-feed-buttons-wrapper .ab-close-button:hover{padding-top:12px;padding-right:14px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button{padding-left:17px}.ab-feed .ab-feed-buttons-wrapper .ab-refresh-button:hover{padding-top:13px;padding-left:14px}.ab-feed .ab-no-cards-message{text-align:center;margin-bottom:20px}@media (max-width:600px){body>.ab-feed{width:100%}}`),(0,i.N)()}},6524:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(5825);function i(){if(!r.ZP.nn(r.JY.Mo)&&document.querySelector(`link[rel=stylesheet][href="https://use.fontawesome.com/7f85a56ba4.css"]`)===null){let e=document.createElement(`link`);e.setAttribute(`rel`,`stylesheet`),e.setAttribute(`href`,`https://use.fontawesome.com/7f85a56ba4.css`),document.getElementsByTagName(`head`)[0].appendChild(e)}}},3046:(e,t,n)=>{n.d(t,{A9:()=>s,OL:()=>u,Tu:()=>l,je:()=>f,yi:()=>c,zA:()=>p});var r=n(335),i=n(8031),a=n(8548),o=n(3905);let s={types:{ro:`container`,logCustomEvent:`logCustomEvent`,setEmailNotificationSubscriptionType:`setEmailNotificationSubscriptionType`,setPushNotificationSubscriptionType:`setPushNotificationSubscriptionType`,setCustomUserAttribute:`setCustomUserAttribute`,requestPushPermission:`requestPushPermission`,addToSubscriptionGroup:`addToSubscriptionGroup`,removeFromSubscriptionGroup:`removeFromSubscriptionGroup`,addToCustomAttributeArray:`addToCustomAttributeArray`,removeFromCustomAttributeArray:`removeFromCustomAttributeArray`,no:`openLink`,ao:`openLinkInWebView`},properties:{type:`type`,oo:`steps`,eo:`args`}},c={Qi:`unknownBrazeAction`,Wi:`noPushPrompt`},l=(e,t)=>{switch(e){case c.Qi:return`${t} contains an unknown braze action type and will not be displayed.`;case c.Wi:return`${t} contains a push prompt braze action, but is not eligible for a push prompt. Ignoring.`;default:return``}};function u(e){try{let t=e.match(o.y9),n=t?t[0].length:null,i=n?e.substring(n):null;if(n==null||n>e.length-1||!i)return void r.Z.error(`Did not find base64 encoded brazeAction in url to process : ${e}`);let s=(0,a.T)(i);return s?JSON.parse(s):void r.Z.error(`Failed to decode base64 encoded brazeAction: ${i}`)}catch(t){r.Z.error(`Failed to process brazeAction URL ${e} : ${(0,i.e)(t)}`);return}}function d(e,t){let n=!1;if(t){for(let r of t)if(n||=e(r),n)return!0}return!1}function f(e){let t=s.properties.type,n=s.properties.oo;try{if(e==null)return!0;let r=e[t];return r===s.types.ro?d(f,e[n]):!(0,o.OM)(r)}catch{return!0}}function p(e){if(!e||!(0,o.zR)(e))return!1;let t=s.properties.type,n=s.properties.oo,r=e[t];return r===s.types.ro?d(p,e[n]):r===s.types.requestPushPermission}},3695:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(2893);class i{constructor(){}ef(){}rf(){}Ta(e){}static sf(e,t){if(e&&t){if(e=e.toLowerCase(),(0,r.kJ)(t.ff)){for(let n=0;n<t.ff.length;n++)if(e.indexOf(t.ff[n].toLowerCase())!==-1)return t.identity}else if(e.indexOf(t.ff.toLowerCase())!==-1)return t.identity}}}var a=n(5806);class o extends i{constructor(){if(super(),this.userAgentData=navigator.userAgentData,this.browser=null,this.version=null,this.userAgentData){let e=this.hc();this.browser=e.browser||`Unknown Browser`,this.version=e.version||`Unknown Version`}this.OS=null}ef(){return this.browser}rf(){return this.version}Ta(e){if(this.OS)return Promise.resolve(this.OS);let t=t=>{for(let n=0;n<e.length;n++){let r=o.sf(t,e[n]);if(r)return this.OS=r,this.OS}return t};return this.userAgentData.platform?Promise.resolve(t(this.userAgentData.platform)):this.getHighEntropyValues().then((e=>e.platform?t(e.platform):navigator.platform)).catch((()=>navigator.platform))}hc(){let e={},t=this.userAgentData.brands;if(t&&t.length)for(let n of t){let t=this.uc(a.s),r=n.brand.match(t);if(r&&r.length>0){e.browser=r[0],e.version=n.version;break}}return e}uc(e){let t=[];for(let n in e){let r=n;t.push(e[r])}return RegExp(`(`+t.join(`|`)+`)`,`i`)}getHighEntropyValues(){return this.userAgentData.getHighEntropyValues?this.userAgentData.getHighEntropyValues([`platform`]):Promise.reject()}}class s extends i{constructor(){super(),this.fd=s.hc(navigator.userAgent||``)}ef(){return this.fd[0]||`Unknown Browser`}rf(){return this.fd[1]||`Unknown Version`}Ta(e){for(let t=0;t<e.length;t++){let n=e[t].string,r=s.sf(n,e[t]);if(r)return r===a.T.Pg&&navigator.maxTouchPoints>1&&(r=a.T.io),Promise.resolve(r)}return Promise.resolve(navigator.platform)}static hc(e){let t,n=e.match(/(samsungbrowser|tizen|roku|konqueror|icab|crios|opera|ucbrowser|chrome|safari|firefox|camino|msie|trident(?=\/))\/?\s*(\.?\d+(\.\d+)*)/i)||[];if(e.indexOf(`(Web0S; Linux/SmartTV)`)!==-1)return[`LG Smart TV`,null];if(e.indexOf(`CrKey`)!==-1)return[`Chromecast`,null];if(e.indexOf(`BRAVIA`)!==-1||e.indexOf(`SonyCEBrowser`)!==-1||e.indexOf(`SonyDTV`)!==-1)return[`Sony Smart TV`,null];if(e.indexOf(`PhilipsTV`)!==-1)return[`Philips Smart TV`,null];if(e.match(/\b(Roku)\b/))return[`Roku`,null];if(e.match(/\bAFTM\b/))return[`Amazon Fire Stick`,null];if(n[1]===a.s.rO&&(t=e.match(/\b(OPR|Edge|EdgA|Edg|UCBrowser)\/(\.?\d+(\.\d+)*)/),t!=null))return t=t.slice(1),t[0]=t[0].replace(`OPR`,a.s.oO),t[0]=t[0].replace(`EdgA`,a.s.eO),t[0]===`Edg`&&(t[0]=a.s.eO),[t[0],t[1]];if(n[1]===a.s.Bg&&(t=e.match(/\b(EdgiOS)\/(\.?\d+(\.\d+)*)/),t!=null))return t=t.slice(1),t[0]=t[0].replace(`EdgiOS`,a.s.eO),[t[0],t[1]];if(n=n[2]?[n[1],n[2]]:[null,null],n[0]===a.s.Bg&&(t=e.match(/version\/(\.?\d+(\.\d+)*)/i))!=null&&n.splice(1,1,t[1]),(t=e.match(/\b(UCBrowser)\/(\.?\d+(\.\d+)*)/))!=null&&n.splice(1,1,t[2]),n[0]===a.s.oO&&(t=e.match(/mini\/(\.?\d+(\.\d+)*)/i))!=null)return[`Opera Mini`,t[1]||``];if(n[0]){let e=n[0].toLowerCase();e===`crios`&&(n[0]=a.s.rO),e===`tizen`&&(n[0]=`Samsung Smart TV`,n[1]=null),e===`samsungbrowser`&&(n[0]=`Samsung Browser`)}return n}}class c{constructor(){let e=navigator.userAgentData?o:s;this.Sg=new e,this.userAgent=navigator.userAgent,this.browser=this.Sg.ef(),this.version=this.Sg.rf(),this.OS=null,this.Ta().then((e=>this.OS=e));let t=navigator;this.language=(t.userLanguage||t.language||t.browserLanguage||t.systemLanguage||``).toLowerCase(),this.Zo=c.vg(this.userAgent)}IE(){return this.browser===a.s.Bg}Oa(){return this.OS||null}Ta(){return this.OS?Promise.resolve(this.OS):this.Sg.Ta(c.kg).then((e=>(this.OS=e,e)))}static vg(e){e=e.toLowerCase();let t=[`googlebot`,`bingbot`,`slurp`,`duckduckbot`,`baiduspider`,`yandex`,`facebookexternalhit`,`sogou`,`ia_archiver`,`https://github.com/prerender/prerender`,`aolbuild`,`bingpreview`,`msnbot`,`adsbot`,`mediapartners-google`,`teoma`,`taiko`];for(let n=0;n<t.length;n++)if(e.indexOf(t[n])!==-1)return!0;return!1}}c.kg=[{string:navigator.platform,ff:`Win`,identity:a.T.Og},{string:navigator.platform,ff:`Mac`,identity:a.T.Pg},{string:navigator.platform,ff:`BlackBerry`,identity:`BlackBerry`},{string:navigator.platform,ff:`FreeBSD`,identity:`FreeBSD`},{string:navigator.platform,ff:`OpenBSD`,identity:`OpenBSD`},{string:navigator.platform,ff:`Nintendo`,identity:`Nintendo`},{string:navigator.platform,ff:`SunOS`,identity:`SunOS`},{string:navigator.platform,ff:`PlayStation`,identity:`PlayStation`},{string:navigator.platform,ff:`X11`,identity:`X11`},{string:navigator.userAgent,ff:[`iPhone`,`iPad`,`iPod`],identity:a.T.io},{string:navigator.platform,ff:`Pike v`,identity:a.T.io},{string:navigator.userAgent,ff:[`Web0S`],identity:`WebOS`},{string:navigator.platform,ff:[`Linux armv7l`,`Android`],identity:a.T.xg},{string:navigator.userAgent,ff:[`Android`],identity:a.T.xg},{string:navigator.platform,ff:`Linux`,identity:`Linux`}];let l=new c},2893:(e,t,n)=>{n.d(t,{J_:()=>s,Kn:()=>c,VO:()=>i,XP:()=>u,Xy:()=>d,fk:()=>a,jV:()=>l,kJ:()=>o});var r=n(335);function i(e){let t=[],n;for(let r in e)n=r,Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==void 0&&t.push(e[n]);return t}function a(e,t,n,a){let o=i(e);return o.indexOf(t)!==-1||(r.Z.error(`${n} Valid values from ${a} are "${o.join(`"/"`)}".`),!1)}function o(e){return Array.isArray?Array.isArray(e):Object.prototype.toString.call(e)===`[object Array]`}function s(e){return Object.prototype.toString.call(e)===`[object Date]`}function c(e){return Object.prototype.toString.call(e)===`[object Object]`}function l(e,...t){e??=[];let n=[],r=arguments.length;for(let t=0,i=e.length;t<i;t++){let i=e[t];if(n.indexOf(i)!==-1)continue;let a=1;for(a=1;a<r&&arguments[a].indexOf(i)!==-1;a++);a===r&&n.push(i)}return n}function u(e){let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}function d(e,t){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;let n=e.toString();if(n!==t.toString())return!1;switch(n){case`[object RegExp]`:case`[object String]`:return``+e==``+t;case`[object Number]`:return+e==+e?+e==0?1/e==1/t:+e==+t:+t!=+t;case`[object Date]`:case`[object Boolean]`:return+e==+t}let r=n===`[object Array]`;if(!r){if(typeof e!=`object`||typeof t!=`object`)return!1;let n=e.constructor,r=t.constructor;if(n!==r&&!(typeof n==`function`&&n instanceof n&&typeof r==`function`&&r instanceof r)&&`constructor`in e&&`constructor`in t)return!1}let i=[],a=[],o=i.length;for(;o--;)if(i[o]===e)return a[o]===t;if(i.push(e),a.push(t),r){if(o=e.length,o!==t.length)return!1;for(;o--;)if(!d(e[o],t[o]))return!1}else{let n=u(e),r;if(o=n.length,u(t).length!==o)return!1;for(;o--;)if(r=n[o],!Object.prototype.hasOwnProperty.call(t,r)||!d(e[r],t[r]))return!1}return i.pop(),a.pop(),!0}},5242:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(1507),i=n(7429);function a(e,t,n){let a=document.createElement(`button`);a.setAttribute(`aria-label`,e),a.setAttribute(`tabindex`,`0`),a.setAttribute(`role`,`button`),(0,r.lj)(a,`touchstart`),a.className=`ab-close-button`;let o=(0,r.MK)(`0 0 15 15`,`M15 1.5L13.5 0l-6 6-6-6L0 1.5l6 6-6 6L1.5 15l6-6 6 6 1.5-1.5-6-6 6-6z`,t);return a.appendChild(o),a.addEventListener(`keydown`,(e=>{e.keyCode!==i.m.Fo&&e.keyCode!==i.m.To||(n(),e.stopPropagation())})),a.onclick=e=>{n(),e.stopPropagation()},a}},7750:(e,t,n)=>{n.d(t,{$N:()=>u,BT:()=>s,FX:()=>i,Pn:()=>a,Rd:()=>c,X2:()=>o,_0:()=>l,yo:()=>d});var r=n(2893);function i(e,t=!1){let n=e/1e3;return t&&(n=Math.floor(n)),n}function a(e){return 1e3*e}function o(e){if(e==null)return null;let t=parseInt(e.toString());return isNaN(t)?null:new Date(1e3*t)}function s(e){return e!=null&&(0,r.J_)(e)?e.toISOString().replace(/\.[0-9]{3}Z$/,``):e}function c(e){return e==null||e===``?null:new Date(e)}function l(e){return e==null||e===``?new Date().valueOf():e}function u(e){return(new Date().valueOf()-e.valueOf())/1e3}function d(e){return(e.valueOf()-new Date().valueOf())/1e3}},5806:(e,t,n)=>{n.d(t,{T:()=>i,s:()=>r});let r={rO:`Chrome`,eO:`Edge`,oO:`Opera`,Bg:`Safari`,OO:`Firefox`},i={xg:`Android`,io:`iOS`,Pg:`Mac`,Og:`Windows`}},1507:(e,t,n)=>{n.d(t,{$j:()=>d,FZ:()=>f,Fr:()=>u,MK:()=>p,QZ:()=>s,lP:()=>a,lj:()=>c,mQ:()=>o,rJ:()=>l});var r=n(335),i=n(8031);let a={dc:null,po:function(e,t=!1,n=!1,r=!1){if(e==null)return!1;t||=!1,n||=!1;let i=e.getBoundingClientRect();return i!=null&&(i.top>=0&&i.top<=(window.innerHeight||document.documentElement.clientHeight)||!t)&&(i.left>=0||!r)&&(i.bottom>=0&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)||!n)&&(i.right<=(window.innerWidth||document.documentElement.clientWidth)||!r)}},o={Re:`up`,Se:`down`,U:`left`,V:`right`};function s(){if(a.dc==null){a.dc=!1;try{let e=Object.defineProperty({},"passive",{get:()=>{a.dc=!0}});window.addEventListener(`testPassive`,(()=>{}),e),window.removeEventListener(`testPassive`,(()=>{}),e)}catch(e){r.Z.error((0,i.e)(e))}}return a.dc}function c(e,t,n=(()=>{})){e.addEventListener(t,n,!!s()&&{passive:!0})}function l(e){return a.po(e,!0,!1,!1)}function u(e){return a.po(e,!1,!0,!1)}function d(e){if(e.onclick){let t=document.createEvent(`MouseEvents`);t.initEvent(`click`,!0,!0),e.onclick.apply(e,[t])}}function f(e,t,n){let r=null,i=null;c(e,`touchstart`,(e=>{r=e.touches[0].clientX,i=e.touches[0].clientY})),c(e,`touchmove`,(a=>{if(r==null||i==null)return;let s=r-a.touches[0].clientX,c=i-a.touches[0].clientY;Math.abs(s)>Math.abs(c)&&Math.abs(s)>=25?((s>0&&t===o.U||s<0&&t===o.V)&&n(a),r=null,i=null):Math.abs(c)>=25&&((c>0&&t===o.Re&&e.scrollTop===e.scrollHeight-e.offsetHeight||c<0&&t===o.Se&&e.scrollTop===0)&&n(a),r=null,i=null)}))}function p(e,t,n){let r=`http://www.w3.org/2000/svg`,i=document.createElementNS(r,`svg`);i.setAttribute(`viewBox`,e),i.setAttribute(`xmlns`,r);let a=document.createElementNS(r,`path`);return a.setAttribute(`d`,t),n!=null&&a.setAttribute(`fill`,n),i.appendChild(a),i}},8031:(e,t,n)=>{n.d(t,{e:()=>r});let r=e=>e instanceof Error?e.message:String(e)},7429:(e,t,n)=>{n.d(t,{m:()=>r});let r={Fo:32,lo:9,To:13,mh:27}},6504:(e,t,n)=>{n.d(t,{R:()=>r});let r=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e)},1843:(e,t,n)=>{n.d(t,{D:()=>o,Z:()=>s});var r=n(335),i=n(3826),a=n(8031);let o=e=>{let t={},n=e.toString().split(`\r
56
56
  `);if(!n)return t;let r,i;for(let e of n)e&&(r=e.slice(0,e.indexOf(`:`)).toLowerCase().trim(),i=e.slice(e.indexOf(`:`)+1).trim(),t[r]=i);return t},s={Gs:e=>{let t,n;try{let a=()=>{r.Z.error(`This browser does not have any supported ajax options!`)},o=!1;if(window.XMLHttpRequest&&(o=!0),!o)return void a();t=new XMLHttpRequest;let s=()=>{typeof e.error==`function`&&e.error(t.status),typeof e.Ws==`function`&&e.Ws(!1)};t.onload=()=>{let n=!1;if(t.readyState===4)if(n=t.status>=200&&t.status<300||t.status===304,n){if(typeof e.L==`function`){let n,r;try{n=JSON.parse(t.responseText),r=t.getAllResponseHeaders()}catch{let n={error:t.responseText===``?i.Z.Zh:i.Z.Ra,response:t.responseText};(0,e.L)(n,r)}n&&e.L(n,r)}typeof e.Ws==`function`&&e.Ws(!0)}else s()},t.onerror=()=>{s()},t.ontimeout=()=>{s()},n=JSON.stringify(e.data),t.open(`POST`,e.url,!0),t.setRequestHeader(`Content-type`,`application/json`),t.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`);let c=e.headers||[];for(let e of c)t.setRequestHeader(e[0],e[1]);t.send(n)}catch(e){r.Z.error(`Network request error: ${(0,a.e)(e)}`)}}}},6870:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(7671),i=n(5966);let a={Ps:{$a:`data`,Bs:`content_cards/sync`,bi:`feature_flags/sync`,Mr:`template`},qu:e=>e?.j(i.I.C.lE),sm:e=>e?.j(i.I.C.SE),nm:(e,t)=>{e?.k(i.I.C.lE,t)},um:(e,t)=>{e?.k(i.I.C.SE,t)},Pa:(e,t)=>{if(!e||!t)return-1;let n=a.qu(e);if(n==null)return-1;let r=n[t];return r==null||isNaN(r)?-1:r},Ua:(e,t)=>{let n=r.S6;if(!e||!t)return n;let i=a.sm(e);return i==null?n:(n=i[t],n==null||isNaN(n)?r.S6:n)},_s:(e,t,n)=>{if(!e||!t)return;let r=a.qu(e);r??={},r[t]=n,a.nm(e,r)},Qs:(e,t,n)=>{if(!e||!t)return;let r=a.sm(e);r??={},r[t]=n,a.um(e,r)},Ys:(e,t)=>{if(!e||!t)return;let n=a.Ua(e,t);a.Qs(e,t,n+1)}},o=a},8548:(e,t,n)=>{n.d(t,{E:()=>i,T:()=>a});var r=n(335);function i(e){let t=e.length;for(let n=e.length-1;n>=0;n--){let r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}function a(e){try{e=e.replace(/-/g,`+`).replace(/_/g,`/`);let t=window.atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);let r=new Uint16Array(n.buffer);return String.fromCharCode(...r)}catch(e){return r.Z.error(`Unable to decode Base64: `+e),null}}},1148:(e,t,n)=>{function r(e){e??=``;let t=e.split(`?`).slice(1).join(`?`),n={};if(t!=null){let e=t.split(`&`);for(let t=0;t<e.length;t++){let r=e[t].split(`=`);r[0]!==``&&(n[r[0]]=r[1])}}return n}function i(e){return!(!e||(e=e.toString().toLowerCase()).lastIndexOf(`javascript:`,0)!==0&&e.lastIndexOf(`data:`,0)!==0)}n.d(t,{L:()=>r,o:()=>i})},3905:(e,t,n)=>{n.d(t,{$g:()=>x,OM:()=>w,UO:()=>g,bj:()=>h,lg:()=>b,ro:()=>y,vV:()=>S,y9:()=>p,zM:()=>m,zR:()=>C});var r=n(2893),i=n(8548),a=n(335),o=n(7750),s=n(3046),c=n(7671);let l=/^[^\x00-\x1F\x22]+$/,u=/[$.]/,d=[`$add`,`$update`,`$remove`,`$identifier_key`,`$identifier_value`,`$new_object`,`$time`,`$google_ad_personalization`,`$google_ad_user_data`],f=new RegExp(/^.+@.+\..+$/),p=/^brazeActions:\/\/v\d+\//;function m(e,t,n){let r=e!=null&&typeof e==`string`&&(e===``||e.match(l)!=null);return r||a.Z.error(`Cannot ${t} because ${n} "${e}" is invalid.`),r}function h(e){return e!=null&&e.match(u)&&d.indexOf(e)===-1&&a.Z.warn(`Custom attribute keys cannot contain '$' or '.'`),m(e,`set custom user attribute`,`the given key`)}function g(e){let t=typeof e;return e==null||t===`number`||t===`boolean`||(0,r.J_)(e)||t===`string`}function _(e,t,n){let i=n!==-1;if(i&&n>50)return a.Z.error(`Nested attributes cannot be more than 50 levels deep.`),!1;let s=i?n+1:-1;if((0,r.kJ)(e)&&(0,r.kJ)(t)){for(let n=0;n<e.length&&n<t.length;n++)if((0,r.J_)(e[n])&&(t[n]=(0,o.BT)(e[n])),!_(e[n],t[n],s))return!1}else{if(!(0,r.Kn)(e))return g(e);for(let n of(0,r.XP)(e)){let a=e[n];if(i&&!h(n)||((0,r.J_)(a)&&(t[n]=(0,o.BT)(a)),!_(a,t[n],s)))return!1}}return!0}function v(e,t,n,i,o){let s;return s=(0,r.Kn)(e)||(0,r.kJ)(e)?_(e,t,o?1:-1):g(e),s||a.Z.error(`Cannot ${n} because ${i} "${e}" is invalid.`),s}function y(e,t,n,r=!1){let i=typeof e==`string`||e===null&&r;return i||a.Z.error(`Cannot ${t} because ${n} "${e}" is invalid.`),i}function b(e,t,n,s,l){if(e??={},typeof e!=`object`||(0,r.kJ)(e))return a.Z.error(`${t} requires that ${n} be an object. Ignoring ${l}.`),[!1,null];let u,d;t===c.db?(u=76800,d=`75KB`):(u=51200,d=`50KB`);let f=JSON.stringify(e);if((0,i.E)(f)>u)return a.Z.error(`Could not ${s} because ${n} was greater than the max size of ${d}.`),[!1,null];let p;try{p=JSON.parse(f)}catch{return a.Z.error(`Could not ${s} because ${n} did not contain valid JSON.`),[!1,null]}for(let n in e){if(t===c.db&&!h(n)||!m(n,s,`the ${l} property name`))return[!1,null];let i=e[n];if(t===c.db||i!=null){if((0,r.J_)(i)&&(p[n]=(0,o.BT)(i)),!v(i,p[n],s,`the ${l} property "${n}"`,t===c.db))return[!1,null]}else delete e[n],delete p[n]}return[!0,p]}function x(e,t){let n=!1,i=!1,o=()=>{a.Z.error(`Custom attribute arrays must be either string arrays or object arrays.`)};for(let a of t)if(typeof a==`string`){if(i)return o(),[!1,!1];if(!m(a,`set custom user attribute "${e}"`,`the element in the given array`))return[!1,!1];n=!0}else{if(!(0,r.Kn)(a)||n)return o(),[!1,!1];if(!b(a,c.db,`attribute value`,`set custom user attribute "${e}"`,`custom user attribute`))return[!1,!1];i=!0}return[n,i]}function S(e){return typeof e==`string`&&e.toLowerCase().match(f)!=null}function C(e){if(!(s.A9.properties.type in e))return!1;switch(e[s.A9.properties.type]){case s.A9.types.ro:if(s.A9.properties.oo in e)return!0;break;case s.A9.types.logCustomEvent:case s.A9.types.setEmailNotificationSubscriptionType:case s.A9.types.setPushNotificationSubscriptionType:case s.A9.types.setCustomUserAttribute:case s.A9.types.addToSubscriptionGroup:case s.A9.types.removeFromSubscriptionGroup:case s.A9.types.addToCustomAttributeArray:case s.A9.types.removeFromCustomAttributeArray:case s.A9.types.no:case s.A9.types.ao:if(s.A9.properties.eo in e)return!0;break;case s.A9.types.requestPushPermission:return!0;default:return!1}return!1}function w(e){let t=!1;return Object.keys(s.A9.types).forEach((n=>{s.A9.types[n]!==e.toString()||(t=!0)})),t}},5319:(e,t,n)=>{n.d(t,{SD:()=>i,eh:()=>r});let r={PORTRAIT:0,LANDSCAPE:1},i={openUri:function(e,t,n){e&&(t||n!=null&&n.metaKey?window.open(e):window.location=e)},fo:function(){return screen.width<=600},co:function(){if(`orientation`in window)return Math.abs(window.orientation)===90||window.orientation===270?r.LANDSCAPE:r.PORTRAIT;let e=window;if(`screen`in e){let t=e.screen.orientation||screen.mozOrientation||screen.msOrientation;return typeof t==`object`&&t&&(t=t.type),t===`landscape-primary`||t===`landscape-secondary`?r.LANDSCAPE:r.PORTRAIT}return r.PORTRAIT},Un:function(){return window.location.href}}}},r={};function i(e){var t=r[e];if(t!==void 0)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.m=n,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+`.js`,i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t=`@clickview/braze-client:`,i.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var s,c;if(a!==void 0)for(var l=document.getElementsByTagName(`script`),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute(`src`)==n||d.getAttribute(`data-webpack`)==t+a){s=d;break}}s||(c=!0,(s=document.createElement(`script`)).charset=`utf-8`,s.timeout=120,i.nc&&s.setAttribute(`nonce`,i.nc),s.setAttribute(`data-webpack`,t+a),s.src=n),e[n]=[r];var f=(t,r)=>{s.onerror=s.onload=null,clearTimeout(p);var i=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},p=setTimeout(f.bind(null,void 0,{type:`timeout`,target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),c&&document.head.appendChild(s)}},i.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})},i.p=``,(()=>{var e={143:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(r!==0)if(r)n.push(r[2]);else{var a=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=a);var o=i.p+i.u(t),s=Error();i.l(o,(n=>{if(i.o(e,t)&&((r=e[t])!==0&&(e[t]=void 0),r)){var a=n&&(n.type===`load`?`missing`:n.type),o=n&&n.target&&n.target.src;s.message=`Loading chunk `+t+` failed.
57
57
  (`+a+`: `+o+`)`,s.name=`ChunkLoadError`,s.type=a,s.request=o,r[1](s)}}),`chunk-`+t,t)}};var t=(t,n)=>{var r,a,[o,s,c]=n,l=0;if(o.some((t=>e[t]!==0))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);c&&c(i)}for(t&&t(n);l<o.length;l++)a=o[l],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunk_clickview_braze_client=self.webpackChunk_clickview_braze_client||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var a={};return(()=>{i.r(a),i.d(a,{BrazeClient:()=>Kt,ClassHookMarketingFormEvent:()=>gt,CountryCode:()=>lt,CustomUserAttributes:()=>bt,DefaultUserAttributes:()=>yt,EventUserAttributes:()=>xt,MarketingFormEvent:()=>ft,MarketingUserEvent:()=>dt,PageEvent:()=>ut,ProductEvent:()=>_t,ProductFormEvent:()=>pt,StreamableFormEvent:()=>mt,StreamableMarketingFormEvent:()=>ht,getInstance:()=>qt});var e=i(5825),t=i(1087),n=i(5333),r=i(6524);function o(){(0,n.e)(void 0,`iam`,`.ab-pause-scrolling,body.ab-pause-scrolling,html.ab-pause-scrolling{overflow:hidden;touch-action:none}.ab-iam-root.v3{position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;z-index:9011;-webkit-tap-highlight-color:transparent}.ab-iam-root.v3:focus{outline:0}.ab-iam-root.v3.ab-effect-fullscreen,.ab-iam-root.v3.ab-effect-html,.ab-iam-root.v3.ab-effect-modal{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-show,.ab-iam-root.v3.ab-effect-html.ab-show,.ab-iam-root.v3.ab-effect-modal.ab-show{opacity:1}.ab-iam-root.v3.ab-effect-fullscreen.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-html.ab-show.ab-animate-in,.ab-iam-root.v3.ab-effect-modal.ab-show.ab-animate-in{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide,.ab-iam-root.v3.ab-effect-html.ab-hide,.ab-iam-root.v3.ab-effect-modal.ab-hide{opacity:0}.ab-iam-root.v3.ab-effect-fullscreen.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-html.ab-hide.ab-animate-out,.ab-iam-root.v3.ab-effect-modal.ab-hide.ab-animate-out{-webkit-transition:opacity .5s;-moz-transition:opacity .5s;-o-transition:opacity .5s;transition:opacity .5s}.ab-iam-root.v3.ab-effect-slide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-show .ab-in-app-message{-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.ab-iam-root.v3.ab-effect-slide.ab-show.ab-animate-in .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message{-webkit-transform:translateX(535px);-moz-transform:translateX(535px);-ms-transform:translateX(535px);transform:translateX(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-left{-webkit-transform:translateX(-535px);-moz-transform:translateX(-535px);-ms-transform:translateX(-535px);transform:translateX(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-up{-webkit-transform:translateY(-535px);-moz-transform:translateY(-535px);-ms-transform:translateY(-535px);transform:translateY(-535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide .ab-in-app-message.ab-swiped-down{-webkit-transform:translateY(535px);-moz-transform:translateY(535px);-ms-transform:translateY(535px);transform:translateY(535px)}.ab-iam-root.v3.ab-effect-slide.ab-hide.ab-animate-out .ab-in-app-message{-webkit-transition:transform .5s ease-in-out;-moz-transition:transform .5s ease-in-out;-o-transition:transform .5s ease-in-out;transition:transform .5s ease-in-out}.ab-iam-root.v3 .ab-ios-scroll-wrapper{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;pointer-events:all;touch-action:auto;-webkit-overflow-scrolling:touch}.ab-iam-root.v3 .ab-in-app-message{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:fixed;text-align:center;-webkit-box-shadow:0 0 4px rgba(0,0,0,.3);-moz-box-shadow:0 0 4px rgba(0,0,0,.3);box-shadow:0 0 4px rgba(0,0,0,.3);line-height:normal;letter-spacing:normal;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;z-index:9011;max-width:100%;overflow:hidden;display:inline-block;pointer-events:all;color:#333;color-scheme:normal}.ab-iam-root.v3 .ab-in-app-message.ab-no-shadow{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.ab-iam-root.v3 .ab-in-app-message :focus,.ab-iam-root.v3 .ab-in-app-message:focus{outline:0}.ab-iam-root.v3 .ab-in-app-message.ab-clickable{cursor:pointer}.ab-iam-root.v3 .ab-in-app-message.ab-background{background-color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-text{float:none;line-height:1.5;margin:20px 25px;max-width:100%;overflow:hidden;overflow-y:auto;vertical-align:text-bottom;word-wrap:break-word;white-space:pre-wrap;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-text.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar{-webkit-appearance:none;width:14px}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-thumb{-webkit-appearance:none;border:4px solid transparent;background-clip:padding-box;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;background-color:rgba(0,0,0,.2)}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-button{width:0;height:0;display:none}.ab-iam-root.v3 .ab-in-app-message .ab-message-text::-webkit-scrollbar-corner{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-header{float:none;letter-spacing:0;margin:0;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;display:block;font-size:20px;margin-bottom:10px;line-height:1.3}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.start-aligned{text-align:start}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.end-aligned{text-align:end}.ab-iam-root.v3 .ab-in-app-message .ab-message-header.center-aligned{text-align:center}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal,.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;cursor:pointer;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;font-size:14px;font-weight:700;margin:20px;margin-top:calc(constant(safe-area-inset-top,0) + 20px);margin-right:calc(constant(safe-area-inset-right,0) + 20px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 20px);margin-left:calc(constant(safe-area-inset-left,0) + 20px);margin-top:calc(env(safe-area-inset-top,0) + 20px);margin-right:calc(env(safe-area-inset-right,0) + 20px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 20px);margin-left:calc(env(safe-area-inset-left,0) + 20px);max-height:150px;padding:10px;right:0;background-color:#efefef}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.simulate-phone .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-message-text{opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:active .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:focus .ab-close-button svg.ab-chevron,.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable:hover .ab-close-button svg.ab-chevron{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 25px 5px 10px;max-width:430px;vertical-align:middle;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{display:block;max-height:150px;overflow:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:365px;border-top:0;border-bottom:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;background-color:transparent;background-size:15px;border:none;width:15px;min-width:15px;height:15px;cursor:pointer;display:block;font-size:15px;line-height:0;padding-top:15px;padding-right:15px;padding-left:15px;padding-bottom:15px;position:absolute;right:0;top:0;z-index:9021}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;fill:#9b9b9b;height:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg.ab-chevron{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:active{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:focus{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover{background-color:transparent}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button:hover svg{fill-opacity:.8}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{float:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:table-cell;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;vertical-align:top;width:60px;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area.ab-icon-area{width:auto}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{float:none;width:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message.ab-modal{font-size:14px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{float:none;position:relative;display:block;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area .ab-center-cropped-img,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area .ab-center-cropped-img{background-size:cover;background-repeat:no-repeat;background-position:50% 50%;position:absolute;top:0;right:0;bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-icon,.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-icon{margin-top:20px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{padding:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-text,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-text{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-message-buttons{bottom:0;left:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{float:none;height:auto;margin:0}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area img,.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{display:block;top:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none}.ab-iam-root.v3 .ab-in-app-message.ab-modal{padding-top:20px;width:450px;max-width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone{max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal.simulate-phone.graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text{max-height:660px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-image{max-height:524.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-icon{max-height:610px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons{margin-bottom:93px;max-height:587px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-image{max-height:451.82758621px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-message-text.ab-with-buttons.ab-with-icon{max-height:537px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area{margin-top:-20px;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area img{max-width:100%;max-height:155.17241379px}.ab-iam-root.v3 .ab-in-app-message.ab-modal .ab-image-area.ab-icon-area{height:auto}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic{width:auto;overflow:hidden}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-modal.graphic .ab-image-area img{width:auto;max-height:720px;max-width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen{width:450px;max-height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape{width:720px;max-height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-image-area{height:225px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape.graphic .ab-image-area{height:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape .ab-message-text{max-height:112px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text{max-height:247px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-message-text.ab-with-buttons{margin-bottom:93px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area{height:360px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.graphic .ab-image-area{height:720px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.simulate-phone.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-html-message{background-color:transparent;border:none;height:100%;overflow:auto;position:relative;touch-action:auto;width:100%}.ab-iam-root.v3 .ab-in-app-message .ab-message-buttons{position:absolute;bottom:0;width:100%;padding:17px 25px 30px 25px;z-index:inherit;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ab-iam-root.v3 .ab-in-app-message .ab-message-button{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;cursor:pointer;display:inline-block;font-size:14px;font-weight:700;font-family:'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;height:44px;line-height:normal;letter-spacing:normal;margin:0;max-width:100%;min-width:80px;padding:0 12px;position:relative;text-transform:none;width:48%;width:calc(50% - 5px);border:1px solid #1b78cf;-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease;overflow:hidden;word-wrap:break-word;text-overflow:ellipsis;word-wrap:normal;white-space:nowrap}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type{float:left;background-color:#fff;color:#1b78cf}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:last-of-type{float:right;background-color:#1b78cf;color:#fff}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:first-of-type:last-of-type{float:none;width:auto}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:after{-webkit-transition:.2s ease;-moz-transition:.2s ease;-o-transition:.2s ease;transition:.2s ease}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:hover{opacity:.8}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:active:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.08)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button:focus:after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.15)}.ab-iam-root.v3 .ab-in-app-message .ab-message-button a{color:inherit;text-decoration:inherit}.ab-iam-root.v3 .ab-in-app-message img{float:none;display:inline-block}.ab-iam-root.v3 .ab-in-app-message .ab-icon{float:none;display:inline-block;padding:10px;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px}.ab-iam-root.v3 .ab-in-app-message .ab-icon .fa{float:none;font-size:30px;width:30px}.ab-iam-root.v3 .ab-start-hidden{visibility:hidden}.ab-iam-root.v3 .ab-centered{margin:auto;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ab-iam-root.v3{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ab-iam-root.v3 .ab-page-blocker{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9001;pointer-events:all;background-color:rgba(51,51,51,.75)}@media (max-width:600px){.ab-iam-root.v3 .ab-in-app-message.ab-slideup{max-height:66px;margin:10px;margin-top:calc(constant(safe-area-inset-top,0) + 10px);margin-right:calc(constant(safe-area-inset-right,0) + 10px);margin-bottom:calc(constant(safe-area-inset-bottom,0) + 10px);margin-left:calc(constant(safe-area-inset-left,0) + 10px);margin-top:calc(env(safe-area-inset-top,0) + 10px);margin-right:calc(env(safe-area-inset-right,0) + 10px);margin-bottom:calc(env(safe-area-inset-bottom,0) + 10px);margin-left:calc(env(safe-area-inset-left,0) + 10px);max-width:90%;max-width:calc(100% - 40px);min-width:90%;min-width:calc(100% - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button{display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-close-button svg:not(.ab-chevron){display:none}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button{display:block;height:20px;padding:0 20px 0 18px;pointer-events:none;top:50%;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:12px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-close-button svg.ab-chevron{display:inline}.ab-iam-root.v3 .ab-in-app-message.ab-slideup.ab-clickable .ab-message-text{border-right-width:40px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text{max-width:100%;border-right-width:10px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text span{max-height:66px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-icon,.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-message-text.ab-with-image{max-width:80%;max-width:calc(100% - 50px - 5px - 10px - 25px)}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area{width:50px;height:50px}.ab-iam-root.v3 .ab-in-app-message.ab-slideup .ab-image-area img{max-width:100%;max-height:100%;width:auto;height:auto}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape{-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-close-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape .ab-message-text.ab-with-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic),.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape:not(.graphic) .ab-message-buttons,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen:not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic{display:block}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-image-area,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.graphic .ab-message-button,.ab-iam-root.v3 .ab-in-app-message:not(.force-desktop).ab-fullscreen.landscape.graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:480px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-width:91%;max-width:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-width:91vw;max-width:calc(100vw - 30px)}}@media (max-height:750px){.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop){max-height:91%;max-height:calc(100% - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop).graphic .ab-image-area img{max-height:91vh;max-height:calc(100vh - 30px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text{max-height:65vh;max-height:calc(100vh - 30px - 60px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-image{max-height:45vh;max-height:calc(100vh - 30px - 155.17241379310346px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-icon{max-height:45vh;max-height:calc(100vh - 30px - 70px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons{max-height:50vh;max-height:calc(100vh - 30px - 93px - 40px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-image{max-height:30vh;max-height:calc(100vh - 30px - 155.17241379310346px - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-modal:not(.force-desktop) .ab-message-text.ab-with-buttons.ab-with-icon{max-height:30vh;max-height:calc(100vh - 30px - 70px - 93px - 20px)}}@media (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen .ab-image-area img{max-height:100%;max-width:100%}}@media (max-height:750px) and (min-width:601px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important;width:450px}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen:not(.landscape):not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-height:480px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}@media (max-width:750px){.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop){-webkit-transition:top none;-moz-transition:top none;-o-transition:top none;transition:top none;top:0;right:0;bottom:0;left:0;height:100%;width:100%;max-height:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:none;-moz-transform:none;-ms-transform:none;transform:none;height:auto!important}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-close-button{margin-right:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-right:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0));margin-left:calc(constant(safe-area-inset-bottom,0) + constant(safe-area-inset-top,0));margin-left:calc(env(safe-area-inset-bottom,0) + env(safe-area-inset-top,0))}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-image-area,.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-image-area{height:50%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text{max-height:48%;max-height:calc(50% - 20px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop) .ab-message-text.ab-with-buttons{margin-bottom:20px;max-height:30%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).landscape .ab-message-text.ab-with-buttons{max-height:20%;max-height:calc(50% - 93px - 20px)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic){padding-bottom:0;padding-bottom:constant(safe-area-inset-bottom,0);padding-bottom:env(safe-area-inset-bottom,0)}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop):not(.graphic) .ab-message-buttons{padding-top:0;position:relative}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic{display:block}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-image-area{height:100%}.ab-iam-root.v3 .ab-in-app-message.ab-fullscreen.landscape:not(.force-desktop).graphic .ab-message-button{margin-bottom:0;margin-bottom:constant(safe-area-inset-bottom,0);margin-bottom:env(safe-area-inset-bottom,0)}}`),(0,r.N)()}var s=i(8376),c=i(1090),l=i(1792),u=i(6616),d=i(4410),f=i(3811),p=i(1507),m=i(5242);function h(e,t){return e==null?``:(e=parseInt(e.toString()),isNaN(e)?``:(t&&!isNaN(parseFloat(t.toString()))||(t=1),`rgba(`+[(16711680&(e>>>=0))>>>16,(65280&e)>>>8,255&e,((4278190080&e)>>>24)/255*t].join(`,`)+`)`))}var g=i(7671),_=i(335),v=i(2730);function y(n){if(!e.ZP.X())return!1;if(!(n instanceof l.Z||n instanceof s.Z))return _.Z.error(g.De),!1;let r=n instanceof s.Z?v.G.mo:v.G.Oi;return t.Z.m().q(n,r).L}var b=i(4365),x=i(9342);function S(n){if(!e.ZP.X())return!1;if(!(n instanceof l.Z))return _.Z.error(g.De),!1;let r=t.Z.m().q(n,v.G.Ei);if(r){n.Ur()||y(n);for(let e=0;e<r.ge.length;e++)x.n.rr().fe(b.Z.Qr,[n.triggerId],r.ge[e])}return r.L}var C=i(420),w=i(3695);function T(n,r,i){if(!e.ZP.X())return!1;if(!(n instanceof c.Z))return _.Z.error(`inAppMessage argument to logInAppMessageHtmlClick must be an HtmlMessage object.`),!1;let a=v.G.Ei;r!=null&&(a=v.G.Gi);let o=t.Z.m().q(n,a,r,i);if(o.L)for(let e=0;e<o.ge.length;e++)x.n.rr().fe(b.Z.Qr,[n.triggerId,r],o.ge[e]);return o.L}var E=i(6243),D=i(2893),O=i(5806),k=i(1148),A=i(5319),j=i(7048),M=i(4072);function N(n,r){if(!e.ZP.X())return!1;if(!(n instanceof M.Z))return _.Z.error(`button must be an InAppMessageButton object`),!1;if(!(r instanceof l.Z))return _.Z.error(g.De),!1;let i=t.Z.m().Hi(n,r);if(i.L)for(let e=0;e<i.ge.length;e++)x.n.rr().fe(b.Z.Qr,[r.triggerId,n.id?.toString()],i.ge[e]);return i.L}var P=i(7429);let F=e=>{let t=e.querySelectorAll(`.ab-close-button, .ab-message-text, .ab-message-button`),n;for(let e=0;e<t.length;e++)n=t[e],n.tabIndex=0;if(t.length>0){let n=t[0],r=t[t.length-1];e.addEventListener(`keydown`,(t=>{let i=document.activeElement;t.keyCode===P.m.lo&&(t.shiftKey||i!==r&&i!==e?!t.shiftKey||i!==n&&i!==e||(t.preventDefault(),r.focus()):(t.preventDefault(),n.focus()))}))}},I=(e,t)=>{t.setAttribute(`role`,`dialog`),t.setAttribute(`aria-modal`,`true`),t.setAttribute(`aria-label`,`Modal Message`),e&&t.setAttribute(`aria-labelledby`,e)},L=(e,t,n,r)=>{if(e.buttons&&e.buttons.length>0){let i=document.createElement(`div`);i.className=`ab-message-buttons`,n.appendChild(i);let a=n.getElementsByClassName(`ab-message-text`)[0];a!=null&&(a.className+=` ab-with-buttons`);let o=i=>a=>(e.Ae(n,(()=>{N(i,e),i.clickAction===l.Z.ClickAction.URI?(0,C.S)(i.uri||``,r||e.openTarget===l.Z.OpenTarget.BLANK,a):i.clickAction===l.Z.ClickAction.NEWS_FEED&&t()})),a.stopPropagation(),!1);for(let t=0;t<e.buttons.length;t++){let n=e.buttons[t],r=document.createElement(`button`);r.className=`ab-message-button`,r.setAttribute(`type`,`button`),(0,p.lj)(r,`touchstart`);let a=n.text;n.text===``&&(a=`\xA0`),r.appendChild(document.createTextNode(a)),e.Ce()||(r.style.backgroundColor=h(n.backgroundColor),r.style.color=h(n.textColor),r.style.borderColor=h(n.borderColor)),r.onclick=o(n),i.appendChild(r)}}};var R=i(7070);function z(t,n,r){if(!e.ZP.X())return;if(o(),t==null)return!1;if(t instanceof s.Z)return _.Z.info(`User received control for a multivariate test, logging to Braze servers.`),y(t),!0;if(!(t instanceof l.Z)||t.constructor===l.Z)return!1;t.Nh();let a=t instanceof c.Z;if(a&&!t.trusted&&!e.ZP.tr())return _.Z.error(`HTML in-app messages are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these messages.`),!1;if(n??=document.body,t.ze()&&n.querySelectorAll(`.ab-modal-interactions`).length>0)return _.Z.info(`Cannot show in-app message ${t.message} because another message is being shown.`),!1;if(A.SD.fo()){let e=A.SD.co();if(e===A.eh.PORTRAIT&&t.orientation===l.Z.Orientation.LANDSCAPE||e===A.eh.LANDSCAPE&&t.orientation===l.Z.Orientation.PORTRAIT){let n=e===A.eh.PORTRAIT?`portrait`:`landscape`,r=t.orientation===l.Z.Orientation.PORTRAIT?`portrait`:`landscape`;return _.Z.info(`Not showing ${r} in-app message ${t.message} because the screen is currently ${n}`),!1}}if(!e.ZP.tr()){let e=!1;if(t.buttons&&t.buttons.length>0){let n=t.buttons;for(let t=0;t<n.length;t++)if(n[t].clickAction===l.Z.ClickAction.URI){let r=n[t].uri;e=(0,k.o)(r)}}else t.clickAction===l.Z.ClickAction.URI&&(e=(0,k.o)(t.uri));if(e)return _.Z.error(`Javascript click actions are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable these actions.`),!1}let v=document.createElement(`div`);if(v.className=`ab-iam-root v3`,v.className+=function(e){let t=``;return e.animateIn&&(t+=` ab-animate-in`),e.animateOut&&(t+=` ab-animate-out`),e instanceof d.Z?t+=` ab-effect-fullscreen`:e instanceof c.Z?t+=` ab-effect-html`:e instanceof f.Z?t+=` ab-effect-modal`:e instanceof u.Z&&(t+=` ab-effect-slide`),t}(t),v.setAttribute(`role`,`complementary`),t.xe()&&(v.id=t.htmlId),e.ZP.nn(e.JY.jo)&&(v.style.zIndex=(e.ZP.nn(e.JY.jo)+1).toString()),n.appendChild(v),t.Ce()){let n=document.createElement(`style`);n.innerHTML=t.css,n.id=t.ve(),e.ZP.nn(e.JY.bo)!=null&&n.setAttribute(`nonce`,e.ZP.nn(e.JY.bo)),document.getElementsByTagName(`head`)[0].appendChild(n)}let b=t instanceof u.Z,x=function(t,n,r,a,o,s,v,y=document.body){if(t.ke=document.activeElement,t instanceof c.Z)return function(t,n,r,a,o,s){let c=document.createElement(`iframe`);c.setAttribute(`title`,`Modal Message`),o&&(c.style.zIndex=(o+1).toString());let u=e=>{let n=e.getAttribute(`href`),r=e.onclick;return i=>{if(r!=null&&typeof r==`function`&&!1===r.bind(e)(i))return;let o=(0,k.L)(n).abButtonId;if(o!=null&&o!==``||(o=e.getAttribute(`id`)||void 0),n!=null&&n!==``&&n.indexOf(`#`)!==0){let r=(e.getAttribute(`target`)||``).toLowerCase().replace(`_`,``)===`blank`,s=a||t.openTarget===l.Z.OpenTarget.BLANK||r,u=()=>{T(t,o,n),A.SD.openUri(n,s,i)};s?u():t.Ae(c,u)}else T(t,o,n||void 0);return i.stopPropagation(),!1}},d=(e,t,n)=>{let r=`([\\w]+)\\s*=\\s*document.createElement\\(['"]${n}['"]\\)`,i=e.match(new RegExp(r));if(i){let n=`${i[1]}.setAttribute("nonce", "${t}")`;return`${e.slice(0,i.index+i[0].length)};${n};${e.slice(i.index+i[0].length)}`}return null};if(c.onload=()=>{let a=null;if(s!=null){a=document.createElement(`html`),a.innerHTML=t.message||``;let e=a.getElementsByTagName(`style`);for(let t=0;t<e.length;t++)e[t].setAttribute(`nonce`,s);let n=a.getElementsByTagName(`script`);for(let e=0;e<n.length;e++){n[e].setAttribute(`nonce`,s),n[e].innerHTML=n[e].innerHTML.replace(/<style>/g,`<style nonce='${s}'>`);let t=d(n[e].innerHTML,s,`script`);t&&(n[e].innerHTML=t);let r=d(n[e].innerHTML,s,`style`);r&&(n[e].innerHTML=r)}}let o=c.contentWindow;o.focus();let f=o.document.querySelector(`html`);f&&(f.innerHTML=a?a.innerHTML:t.message||``,(0,j.E)(f));let p=o.document.getElementsByTagName(`head`)[0];if(p!=null){if(t.Ce()){let e=document.createElement(`style`);e.innerHTML=t.css||``,e.id=t.ve()||``,s!=null&&e.setAttribute(`nonce`,s),p.appendChild(e)}let e=o.document.createElement(`base`);e!=null&&(e.setAttribute(`target`,`_parent`),p.appendChild(e))}let m=o.document.getElementsByTagName(`title`);m&&m.length>0&&c.setAttribute(`title`,m[0].textContent||``);let h={closeMessage:function(){t.Ae(c)},logClick:function(){T(t,...arguments)},display:{},web:{}},v=function(){return function(){let t=arguments;Promise.resolve().then(i.bind(i,2261)).then((n=>{e.ZP.so()?n.requestPushPermission(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))}},y={requestImmediateDataFlush:function(){let t=arguments;Promise.resolve().then(i.bind(i,4650)).then((({requestImmediateDataFlush:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},logCustomEvent:function(){let t=arguments;Promise.resolve().then(i.bind(i,1454)).then((({logCustomEvent:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},logPurchase:function(){let t=arguments;i.e(364).then(i.bind(i,1364)).then((({logPurchase:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},unregisterPush:function(){let t=arguments;Promise.resolve().then(i.bind(i,7824)).then((({unregisterPush:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))},requestPushPermission:v(),changeUser:function(){let t=arguments;Promise.resolve().then(i.bind(i,4790)).then((({changeUser:n})=>{e.ZP.so()?n(...Array.prototype.slice.call(t)):_.Z.error(g.Go)}))}},b=function(e){return function(){y[e](...Array.prototype.slice.call(arguments))}};for(let e of(0,D.XP)(y))h[e]=b(e);let x=[`setFirstName`,`setLastName`,`setEmail`,`setGender`,`setDateOfBirth`,`setCountry`,`setHomeCity`,`setEmailNotificationSubscriptionType`,`setLanguage`,`addAlias`,`setPushNotificationSubscriptionType`,`setPhoneNumber`,`setCustomUserAttribute`,`addToCustomAttributeArray`,`removeFromCustomAttributeArray`,`incrementCustomUserAttribute`,`setCustomLocationAttribute`,`addToSubscriptionGroup`,`removeFromSubscriptionGroup`],S=function(e){return function(){let t=(0,E.P)();t&&t[e](...Array.prototype.slice.call(arguments))}},C={};for(let e=0;e<x.length;e++)C[x[e]]=S(x[e]);h.getUser=function(){return C};let w={showFeed:n},O=function(e){return function(){let n=arguments;t.Ae(c,(function(){w[e](...Array.prototype.slice.call(n))}))}},k=h.display;for(let e of(0,D.XP)(w))k[e]=O(e);let A={registerAppboyPushMessages:v()},M=function(e){return function(){A[e](...Array.prototype.slice.call(arguments))}},N=h.web;for(let e of(0,D.XP)(A))N[e]=M(e);if(o.appboyBridge=h,o.brazeBridge=h,t.we!==l.Z.qe.$e){let e=o.document.getElementsByTagName(`a`);for(let t=0;t<e.length;t++)e[t].onclick=u(e[t]);let t=o.document.getElementsByTagName(`button`);for(let e=0;e<t.length;e++)t[e].onclick=u(t[e])}let P=o.document.body;if(P!=null){t.xe()&&(P.id=t.htmlId||``);let e=document.createElement(`hidden`);e.onclick=h.closeMessage,e.className=`ab-programmatic-close-button`,P.appendChild(e)}o.dispatchEvent(new CustomEvent(`ab.BridgeReady`)),c.className.indexOf(`ab-start-hidden`)!==-1&&(c.className=c.className.replace(`ab-start-hidden`,``),r(c)),document.activeElement!==c&&c.focus()},c.className=`ab-in-app-message ab-start-hidden ab-html-message ab-modal-interactions`,w.Z.OS===O.T.io){let e=document.createElement(`div`);return e.className=`ab-ios-scroll-wrapper`,e.appendChild(c),t.Me=e,e}return t.Me=c,c}(t,n,r,o,s,v);let b=function(e,t,n,r,i,a,o=document.body){let s=null,c=document.createElement(`div`);var u;c.className=`ab-in-app-message ab-start-hidden ab-background`,a&&(c.style.zIndex=(a+1).toString()),e.ze()&&(c.className+=` ab-modal-interactions`,c.setAttribute(`tabindex`,`-1`)),e.Ce()||(c.style.color=h(e.textColor),c.style.backgroundColor=h(e.backgroundColor),(u=e.backgroundColor)!=null&&(u=parseInt(u.toString()),!isNaN(u)&&!((4278190080&u)>>>24))&&(c.className+=` ab-no-shadow`));let d=()=>{c.className.indexOf(`ab-start-hidden`)!==-1&&(c.className=c.className.replace(`ab-start-hidden`,``),document.querySelectorAll(`.ab-iam-img-loading`).length>0?r(`Cannot show in-app message ${e.message} because another message is being shown.`,l.Z.Be.Le):n(c))},f=(t=!0)=>{let n=document.querySelectorAll(`.ab-iam-root`);n&&n.length!==0||(n=o.querySelectorAll(`.ab-iam-root`)),n&&n.length>0&&(n[0].classList.remove(`ab-iam-img-loading`),s&&=(clearTimeout(s),null),t?d():_.Z.error(`Cannot show in-app message ${e.message} because the image failed to load.`))};e.imageStyle===l.Z.ImageStyle.GRAPHIC&&(c.className+=` graphic`),e.orientation===l.Z.Orientation.LANDSCAPE&&(c.className+=` landscape`),e.buttons!=null&&e.buttons.length===0&&(e.clickAction!==l.Z.ClickAction.NONE&&(c.className+=` ab-clickable`),c.onclick=n=>(e.Ae(c,(()=>{S(e),e.clickAction===l.Z.ClickAction.URI?(0,C.S)(e.uri||``,i||e.openTarget===l.Z.OpenTarget.BLANK,n):e.clickAction===l.Z.ClickAction.NEWS_FEED&&t()})),n.stopPropagation(),!1));let g=(0,m.B)(`Close Message`,e.Ce()?void 0:h(e.closeButtonColor),(()=>{e.Ae(c)}));c.appendChild(g),a&&(g.style.zIndex=(a+2).toString());let v=document.createElement(`div`);v.className=`ab-message-text`;let y=(e.messageAlignment||e.De).toLowerCase();v.className+=` `+y+`-aligned`;let b=!1,x=document.createElement(`div`);if(x.className=`ab-image-area`,e.imageUrl){if(e.cropType===l.Z.CropType.CENTER_CROP){let t=document.createElement(`span`);t.className=`ab-center-cropped-img`,t.style.backgroundImage=`url(`+e.imageUrl+`)`,t.setAttribute(`role`,`img`),t.setAttribute(`aria-label`,`Modal Image`),e.Ge(t),x.appendChild(t)}else{let t=document.createElement(`img`);if(t.setAttribute(`src`,e.imageUrl),e.Ge(t),document.querySelectorAll(`.ab-iam-img-loading`).length===0){b=!0;let e=document.querySelectorAll(`.ab-iam-root`);e&&e.length>0&&e[0].classList.add(`ab-iam-img-loading`),s=window.setTimeout((()=>{f(!1)}),6e4),t.onload=()=>{f()},t.onerror=()=>{f(!1)}}x.appendChild(t)}c.appendChild(x),v.className+=` ab-with-image`}else if(e.icon){x.className+=` ab-icon-area`;let t=document.createElement(`span`);t.className=`ab-icon`,e.Ce()||(t.style.backgroundColor=h(e.iconBackgroundColor),t.style.color=h(e.iconColor));let n=document.createElement(`i`);n.className=`fa`,n.appendChild(document.createTextNode(e.icon)),n.setAttribute(`aria-hidden`,`true`),t.appendChild(n),x.appendChild(t),c.appendChild(x),v.className+=` ab-with-icon`}if((0,p.lj)(v,`touchstart`),e.header&&e.header.length>0){let t=document.createElement(`h1`);t.className=`ab-message-header`,e.He=R.Z.W(),t.id=e.He;let n=(e.headerAlignment||l.Z.TextAlignment.CENTER).toLowerCase();t.className+=` `+n+`-aligned`,e.Ce()||(t.style.color=h(e.headerTextColor)),t.appendChild(document.createTextNode(e.header)),v.appendChild(t)}return v.appendChild(e.Je()),c.appendChild(v),b||d(),e.Me=c,c}(t,n,r,a,o,s,y);if(t instanceof d.Z||t instanceof f.Z){let e=t instanceof d.Z?`ab-fullscreen`:`ab-modal`;b.className+=` ${e} ab-centered`,L(t,n,b,o),F(b),I(t.He,b)}else if(t instanceof u.Z){b.className+=` ab-slideup`;let e=b.getElementsByClassName(`ab-close-button`)[0];if(e!=null){let n=(0,p.MK)(`0 0 11.38 19.44`,`M11.38 9.72l-9.33 9.72L0 17.3l7.27-7.58L0 2.14 2.05 0l9.33 9.72z`,t.Ce()?void 0:h(t.closeButtonColor));n.setAttribute(`class`,`ab-chevron`),e.appendChild(n)}let n,r;(0,p.FZ)(b,p.mQ.U,(t=>{b.className+=` ab-swiped-left`,e!=null&&e.onclick!=null&&e.onclick(t)})),(0,p.FZ)(b,p.mQ.V,(t=>{b.className+=` ab-swiped-right`,e!=null&&e.onclick!=null&&e.onclick(t)})),t.slideFrom===l.Z.SlideFrom.TOP?(n=p.mQ.Re,r=` ab-swiped-up`):(n=p.mQ.Se,r=` ab-swiped-down`),(0,p.FZ)(b,n,(t=>{b.className+=r,e!=null&&e.onclick!=null&&e.onclick(t)}))}return b}(t,(()=>{i.e(864).then(i.bind(i,4864)).then((t=>{e.ZP.so()?t.showFeed():_.Z.error(g.Go)}))}),(n=>{if(t.ze()&&t.do()){let r=document.createElement(`div`);if(r.className=`ab-page-blocker`,t.Ce()||(r.style.backgroundColor=h(t.frameColor)),e.ZP.nn(e.JY.jo)&&(r.style.zIndex=e.ZP.nn(e.JY.jo).toString()),v.appendChild(r),!e.ZP.nn(e.JY.Lh)){let e=new Date().valueOf();r.onclick=r=>{new Date().valueOf()-e>l.Z.fh&&(t.Ae(n),r.stopPropagation())}}v.appendChild(n),n.focus(),t.Oh(v)}else if(b){let e=document.querySelectorAll(`.ab-slideup`),r=null;for(let t=e.length-1;t>=0;t--)if(e[t]!==n){r=e[t];break}if(t.slideFrom===l.Z.SlideFrom.TOP){let e=0;r!=null&&(e=r.offsetTop+r.offsetHeight),n.style.top=Math.max(e,0)+`px`}else{let e=0;r!=null&&(e=(window.innerHeight||document.documentElement.clientHeight)-r.offsetTop),n.style.bottom=Math.max(e,0)+`px`}}else if(a&&!e.ZP.nn(e.JY.Lh)){let e=t;(0,j.f)(n)&&n.contentWindow&&n.contentWindow.addEventListener(`keydown`,(function(t){t.keyCode===P.m.mh&&e.closeMessage()}))}y(t),t.dismissType===l.Z.DismissType.AUTO_DISMISS&&setTimeout((()=>{v.contains(n)&&t.Ae(n)}),t.duration),typeof r==`function`&&r()}),(e=>{_.Z.info(e)}),e.ZP.nn(e.JY.ho),e.ZP.nn(e.JY.jo),e.ZP.nn(e.JY.bo),n);return(a||b)&&(v.appendChild(x),t.Oh(v)),!0}function B(n){if(e.ZP.X())return typeof n==`function`?t.Z.m()._i((function(e){return n(e[0]),e.slice(1)})):null}var V=i(5522),H=i(1454),ee=i(2261),U=i(7824),te=i(4790),ne=i(4650),re=i(1843),ie=i(158),ae=i(67),oe=i(1066),W=i(1280);function se(t,n){if(e.ZP.X())return _e.rr().xs(t,n)}class ce extends ae.Z{constructor(e,t){super(e,t)}getUnviewedCardCount(){return super.getUnreadCardCount()}logCardImpressions(e){(0,oe.p)(e,!0)}logCardClick(e){return(0,W.d)(e,!0)}sr(){se()}dr(){return!0}}ce.ur=6e4;var le=i(7750),ue=i(5899),G=i(5966),de=i(4663),fe=i(9179),pe=i(6870),me=i(6504);class he extends ie.Z{constructor(t,n,r,i,a){super(),this.wt=t,this.u=n,this.yt=r,this.Ft=i,this.qt=a,this.wt=t,this.u=n,this.yt=r,this.Ft=i,this.qt=a,this.Jt=new de.Z,e.ZP.$t(this.Jt),this.Bt=0,this.Ht=0,this.cards=[],this.Kt();let o=V.Z.Yt.Qt;new V.Z(o,_.Z).Zt(o.ss.ts,(e=>{this.es(e)})),this.hs=null,this.rs=null,this.ns=null,this.os=null,this.ls=null,this.us=10,this.cs=0}fs(){return this.hs}ds(e){this.hs=e}ps(){return this.rs}vs(e){this.rs=e}Kt(){if(!this.u)return;let e=this.u.j(G.I.C.ws)||[],t=[];for(let n=0;n<e.length;n++){let r=(0,ue.rN)(e[n]);r!=null&&t.push(r)}this.cards=this.Cs(this.bs(t,!1)),this.Bt=this.u.j(G.I.C.gs)||this.Bt,this.Ht=this.u.j(G.I.C.ys)||this.Ht}js(e,t=!1,n=0,r=0){let i;if(t){i=[];for(let e of this.cards)e.test&&i.push(e)}else i=this.cards.slice();for(let n=0;n<e.length;n++){let r=e[n],a=null;for(let e=0;e<this.cards.length;e++)if(r.id===this.cards[e].id){a=this.cards[e];break}if(t){let e=(0,ue.xA)(r);a!=null&&a.viewed&&e&&(e.viewed=!0),e!=null&&i.push(e)}else if(a==null){let e=(0,ue.xA)(r);e!=null&&i.push(e)}else if(!a.Ct(r)){for(let e=0;e<i.length;e++)if(r.id===i[e].id){i.splice(e,1);break}}}this.cards=this.Cs(this.bs(i,t)),this.Rs(),this.Bt=n,this.Ht=r,this.u&&(this.u.k(G.I.C.gs,this.Bt),this.u.k(G.I.C.ys,this.Ht))}Ns(t){if(this.Ts()&&t!=null&&t.cards){this.u&&this.u.k(G.I.C.Ss,e.ZP.Ds());let n=t.full_sync;n||this.Kt(),this.js(t.cards,n,t.last_full_sync_at,t.last_card_updated_at),this.Jt.Dt(this.Us(!0))}}ks(e){this.u&&this.u.k(G.I.C.As,e)}Fs(e,t,n){let r=()=>{this.xs(t,n,!0)},i=e?(0,re.D)(e):null,a;if(this.zs(),!i||!i[`retry-after`])return void this.ks(0);let o=i[`retry-after`];if(isNaN(o)&&!isNaN(Date.parse(o)))a=Date.parse(o)-new Date().getTime(),a<0&&r();else{if(isNaN(parseFloat(o.toString()))){fe.Z.q(v.G.qs,{e:`Received unexpected value for retry-after header in /sync response: `+o}),this.ks(0);return}a=1e3*parseFloat(o.toString())}this.ns=window.setTimeout((()=>{r()}),a);let s=0;this.u&&(s=this.u.j(G.I.C.As)),(s==null||isNaN(parseInt(s.toString())))&&(s=0),this.ks(parseInt(s.toString())+1)}es(e){if(!this.Ts())return;this.Kt();let t=this.cards.slice(),n=null;n=this.wt?.getUserId();for(let r=0;r<e.length;r++)if(n===e[r].userId||n==null&&e[r].userId==null){let n=e[r].card,i=null;for(let e=0;e<this.cards.length;e++)if(n.id===this.cards[e].id){i=this.cards[e];break}if(i==null){let e=(0,ue.xA)(n);e!=null&&t.push(e)}else if(!i.Ct(n)){for(let e=0;e<t.length;e++)if(n.id===t[e].id){t.splice(e,1);break}}}this.cards=this.Cs(this.bs(t,!1)),this.Rs(),this.Jt.Dt(this.Us(!0))}bs(e,t){let n={},r={},i={};this.u&&(n=this.u.j(G.I.C.v)||{},r=this.u.j(G.I.C.H)||{},i=this.u.j(G.I.C.A)||{});let a={},o={},s={};for(let t=0;t<e.length;t++){let c=e[t].id;c&&(n[c]&&(e[t].clicked=!0,a[c]=!0),r[c]&&(e[t].viewed=!0,o[c]=!0),i[c]&&(e[t].dismissed=!0,s[c]=!0))}return t&&this.u&&(this.u.k(G.I.C.v,a),this.u.k(G.I.C.H,o),this.u.k(G.I.C.A,s)),e}Cs(e){let t=[],n=new Date,r={};this.u&&(r=this.u.j(G.I.C.A)||{});let i=!1;for(let a=0;a<e.length;a++){let o=e[a].url;if(!this.Ft&&o&&(0,k.o)(o)){_.Z.error(`Card with url ${o} will not be displayed because Javascript URLs are disabled. Use the "allowUserSuppliedJavascript" option for braze.initialize to enable this card.`);continue}let s=e[a].expiresAt,c=!0;if(s!=null&&(c=s>=n),c&&=!e[a].dismissed,c)t.push(e[a]);else{let t=e[a].id;t&&(r[t]=!0),i=!0}}return i&&this.u&&this.u.k(G.I.C.A,r),t}Rs(){var e;let t=[];for(let e=0;e<this.cards.length;e++)t.push(this.cards[e].Y());(e=this.u)==null||e.k(G.I.C.ws,t)}zs(){this.ns&&=(clearTimeout(this.ns),null)}Es(){this.os!=null&&(clearTimeout(this.os),this.os=null)}Ls(e=1e3*this.us,t,n){this.Es(),this.os=window.setTimeout((()=>{this.xs(t,n,!0)}),e),this.ls=e}xs(t,n,r=!1,i=!0){var a;let o=this.qt,s=this.u;if(!o||!s)return void(typeof n==`function`&&n());if(!r&&(this.zs(),this.ks(0)),!this.Ts())return void((a=this.yt)==null||a.Is((()=>{this.xs(t,n)})));i&&this.Es();let c=o.Js({},!0);s.j(G.I.C.Ss)!==e.ZP.Ds()&&this.Ms(),c.last_full_sync_at=this.Bt,c.last_card_updated_at=this.Ht;let l=o.$s(c,pe.Z.Ps.Bs,r),u=!1;o.Xs(c,((e=-1)=>{if(this.u){let e=new Date().valueOf();pe.Z._s(this.u,pe.Z.Ps.Bs,e)}e!==-1&&l.push([`X-Braze-Req-Tokens-Remaining`,e.toString()]),re.Z.Gs({url:`${o.Hs()}/content_cards/sync`,data:c,headers:l,L:(e,r)=>{if(!o.Ks(c,e,l))return u=!0,void(typeof n==`function`&&n());o.Os(),this.Fs(r,t,n),this.Ns(e),u=!1,pe.Z.Qs(this.u,pe.Z.Ps.Bs,1),typeof t==`function`&&t()},error:e=>{o.Vs(e,`retrieving content cards`),u=!0,typeof n==`function`&&n()},Ws:()=>{if(u&&i&&!this.os&&this.cs+1<g.Tt){pe.Z.Ys(this.u,pe.Z.Ps.Bs);let e=this.ls;(e==null||e<1e3*this.us)&&(e=1e3*this.us),this.Ls(Math.min(3e5,(0,me.R)(1e3*this.us,3*e)),t,n),this.cs+=1}}})}),pe.Z.Ps.Bs,n)}Us(e){e||this.Kt();let t=this.Cs(this.cards);t.sort(((e,t)=>e.pinned&&!t.pinned?-1:t.pinned&&!e.pinned?1:e.updated&&t.updated&&e.updated>t.updated?-1:e.updated&&t.updated&&t.updated>e.updated?1:0));let n=Math.max(this.Ht||0,this.Bt||0);return n===0&&(n=void 0),this.u&&this.u.j(G.I.C.ys)===this.Ht&&n===void 0&&(n=this.Ht),new ce(t,(0,le.X2)(n))}Zs(e){return this.Jt.It(e)}Ms(){this.Bt=0,this.Ht=0,this.u&&(this.u.ti(G.I.C.gs),this.u.ti(G.I.C.ys))}changeUser(e){e||(this.cards=[],this.Jt.Dt(new ce(this.cards.slice(),null)),this.u&&(this.u.ti(G.I.C.ws),this.u.ti(G.I.C.v),this.u.ti(G.I.C.H),this.u.ti(G.I.C.A))),this.Ms()}clearData(e){this.Bt=0,this.Ht=0,this.cards=[],this.Jt.Dt(new ce(this.cards.slice(),null)),e&&this.u&&(this.u.ti(G.I.C.ws),this.u.ti(G.I.C.v),this.u.ti(G.I.C.H),this.u.ti(G.I.C.A),this.u.ti(G.I.C.gs),this.u.ti(G.I.C.ys))}Ts(){return!(!this.yt||!this.yt.si()&&(this.yt.ii()!==0&&this.ei(),1))}ei(){this.Jt.Dt(new ce([],new Date)),this.u&&this.u.ti(G.I.C.ws)}}let ge={t:!1,provider:null,rr:()=>(ge.o(),ge.provider||(ge.provider=new he(e.ZP.er(),e.ZP.l(),e.ZP.ir(),e.ZP.tr(),e.ZP.nr()),e.ZP.ar(ge.provider)),ge.provider),o:()=>{ge.t||=(e.ZP.g(ge),!0)},destroy:()=>{ge.provider=null,ge.t=!1}},_e=ge;function ve(t){if(!e.ZP.X())return;let n=_e.rr(),r=n.Zs(t);if(!n.ps()){let t=e.ZP.cr();if(t){let e=t.mr((()=>{n.xs()}));e&&n.vs(e)}}return r}var ye=i(1311),be=i(5608),xe=i(6959);function Se(t,n){if(!e.ZP.X())return;(0,xe.B)();let r=!1;t??(t=document.body,r=!0);let i=e.ZP.nn(e.JY.tn)||e.ZP.nn(e.JY.en)||!1,a=_e.rr().Us(!1);typeof n==`function`&&(0,ye.Of)(a,n(a.cards.slice()),a.lastUpdated,null,i);let o=(0,ye.Yz)(a,i,r),s=_e.rr(),c=s.fs();(a.lastUpdated==null||new Date().valueOf()-a.lastUpdated.valueOf()>ce.ur)&&(c==null||new Date().valueOf()-c>ce.ur)&&(_.Z.info(`Cached content cards were older than max TTL of ${ce.ur} ms, requesting an update from the server.`),(0,ye.cV)(a,o),s.ds(new Date().valueOf()));let l=new Date().valueOf(),u=ve((function(e){let t=o.querySelectorAll(`.ab-refresh-button`)[0];if(t!=null){let e=500,n=e-=new Date().valueOf()-l,r=o.getAttribute(ye.cP);r&&(n=parseInt(r),isNaN(n)||(e-=new Date().valueOf()-n)),setTimeout((function(){t.className=t.className.replace(/fa-spin/g,``)}),Math.max(e,0))}let r=e.cards;typeof n==`function`&&(r=n(r.slice())),(0,ye.Of)(a,r,e.lastUpdated,o,i)}));(0,ye.GB)(u,o);let d=function(e){let t=e.querySelectorAll(`.ab-feed`),n=null;for(let r=0;r<t.length;r++)t[r].parentNode===e&&(n=t[r]);n==null?e.appendChild(o):((0,ye.tQ)(n),n.parentNode!=null&&n.parentNode.replaceChild(o,n)),setTimeout((function(){o.className=o.className.replace(`ab-hide`,`ab-show`)}),0),r&&o.focus(),(0,ye.cz)(a,o),(0,be.CG)(a.cards,e)};var f;t==null?window.onload=(f=window.onload,function(){typeof f==`function`&&f(new Event(`oldLoad`)),d(document.body)}):d(t)}var Ce=i(2080);function we(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Te={get screenWidth(){return window.screen.width},get screenHeight(){return window.screen.height},get queryString(){return window.location.search},get queryParams(){var e,t=Te.queryString,n=new URLSearchParams(t),r={},i=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return we(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
58
58
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(n.keys());try{for(i.s();!(e=i.n()).done;){var a=e.value;if(!(a in r)){var o=n.getAll(a);o.length>1?r[a]=o:r[a]=o[0]}}}catch(e){i.e(e)}finally{i.f()}return r&&Object.keys(r).length?JSON.stringify(r):t},get referrer(){return window.document.referrer},get title(){return window.document.title},get pathname(){return window.location.pathname},get hostname(){return window.location.hostname},get requestUrl(){return Te.hostname+Te.pathname},decodeURIComponent:function(e){return window.decodeURIComponent(e)}},Ee=Te,De={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i},Oe=`Unknown`;function K(e,t,n){if(!t)return{name:e,version:Oe};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():Oe}}var ke=function(){var e=window.navigator.userAgent;return De.mobileDevice.test(e)?De.iphone.test(e)?`iPhone`:De.ipad.test(e)?`iPad`:De.android.test(e)?`Android`:De.blackberry.test(e)?`Blackberry`:De.windowsPhone.test(e)?`Windows Phone`:Oe:`Desktop`},Ae={getEventDataPayload:function(e,t){var n={product:this.getProductData(t),client:this.getClientData(),request:this.getRequestData()};e.data&&Object.keys(e.data).length&&(n.data=e.data),e.actionType&&(n.action_type=e.actionType);var r=Ee.requestUrl;return r&&(n.request_url=r),n},getProductData:function(e){var t={name:e.name,version:e.version};return e.locale&&(t.locale=e.locale),t},getClientData:function(){return{os:(e=window.navigator.userAgent,De.android.test(e)?K(`Android`,De.androidVersion,e):De.iphone.test(e)||De.ipad.test(e)?K(`iOS`,De.iosVersion,e):De.linux.test(e)?K(`Linux`,null,e):De.unix.test(e)?K(`Unix`,null,e):De.mac.test(e)?K(`Macintosh`,De.osxVersion,e):De.windows.test(e)?function(e,t){var n={name:`Windows`,version:null};return De.win2000.test(t)&&(n.version=`2000`),De.winXP.test(t)&&(n.version=`XP`),De.winVista.test(t)&&(n.version=`Vista`),De.win7.test(t)&&(n.version=`7`),De.win8.test(t)&&(n.version=`8`),De.win81.test(t)&&(n.version=`8.1`),De.win10.test(t)&&(n.version=`10`),n.version||=Oe,n}(0,e):De.blackberry.test(e)?K(`BlackBerry`,De.blackberryVersion,e):De.windowsPhone.test(e)?K(`Windows Phone`,De.windowsPhoneVersion,e):{name:Oe,version:Oe}),device:{type:ke(),resolution:`${Ee.screenWidth}x${Ee.screenHeight}`}};var e},getRequestData:function(){var e=Ee.queryParams,t=Ee.referrer,n=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`&`,t=Ee.queryString;if(t.length){var n=Ee.decodeURIComponent(t.substring(1)),r=RegExp(`((utm_[^=]+)=([^\\`+e+`]+))`,`gi`),i=n.match(r);if(i&&i.length){var a=i.reduce((function(e,t){var n=t.split(`=`);return e[n[0].split(`_`)[1]]=n[1],e}),{});if(Object.keys(a).length)return a}}}(),r={page_name:Ee.title,host_name:Ee.hostname,path_name:Ee.pathname};return e.length&&(r.query_params=e),t.length&&(r.referrer=t),n&&(r.utms=n),r}},q=function(e){throw Error(e)},J=function(e){var t=[...arguments].slice(1);console.error(e,t)};function je(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Me(e){return Me=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Me(e)}var Ne=RegExp(`[A-Za-z0-9 _.,!"'/$]*`),Pe=RegExp(`^[a-z]+(?:_[a-z]+)*$`),Fe=[`productName`,`productVersion`,`apiKey`,`baseUrl`],Ie={clientUserAttributeValue:function(e){return typeof e==`boolean`||!(!e||typeof e==`string`&&(!e.length||!(e.length<=255)||e[0]===`$`||!Ne.test(e)))},isSnakeCase:function(e){return Pe.test(e)},additionalData:function(e){if(Me(e)!==`object`||e===null)return!0;if(Array.isArray(e)){var t,n=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if(typeof e==`string`)return je(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
59
59
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(!Ie.additionalData(r))return!1}}catch(e){n.e(e)}finally{n.f()}}else for(var i in e){if(!Ie.isSnakeCase(i))return J(`'${i}' in additional data provided does not follow 'snake_case' naming convention.`),!1;var a=e[i];if(Me(a)===`object`&&a!==null&&!Ie.additionalData(a))return!1}return!0},accountAddress:function(e){if(!e||Me(e)!==`object`)return!1;var t=Object.keys(e);return!(t.length===0||t.length>2||t.length===1&&!t.includes(`country_code`)||t.length===2&&!t.includes(`country_code`)&&!t.includes(`province`)||typeof e.country_code!=`string`||t.includes(`province`)&&typeof e.province!=`string`)},brazeClientOptions:function(e){e||q(`No Client options provided.`),Fe.forEach((function(t){e.hasOwnProperty(t)||q(`Cannot find the required "${t}" attribute in client options.`)}))}};function Le(e){return Le=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Le(e)}function Re(){Re=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a=typeof Symbol==`function`?Symbol:{},o=a.iterator||`@@iterator`,s=a.asyncIterator||`@@asyncIterator`,c=a.toStringTag||`@@toStringTag`;function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},``)}catch{l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,o=Object.create(a.prototype);return i(o,`_invoke`,{value:T(e,n,new k(r||[]))}),o}function d(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}t.wrap=u;var f=`suspendedStart`,p=`executing`,m=`completed`,h={};function g(){}function _(){}function v(){}var y={};l(y,o,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(A([])));x&&x!==n&&r.call(x,o)&&(y=x);var S=v.prototype=g.prototype=Object.create(y);function C(e){[`next`,`throw`,`return`].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function n(i,a,o,s){var c=d(e[i],e,a);if(c.type!==`throw`){var l=c.arg,u=l.value;return u&&Le(u)==`object`&&r.call(u,`__await`)?t.resolve(u.__await).then((function(e){n(`next`,e,o,s)}),(function(e){n(`throw`,e,o,s)})):t.resolve(u).then((function(e){l.value=e,o(l)}),(function(e){return n(`throw`,e,o,s)}))}s(c.arg)}var a;i(this,`_invoke`,{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function T(t,n,r){var i=f;return function(a,o){if(i===p)throw Error(`Generator is already running`);if(i===m){if(a===`throw`)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=E(s,r);if(c){if(c===h)continue;return c}}if(r.method===`next`)r.sent=r._sent=r.arg;else if(r.method===`throw`){if(i===f)throw i=m,r.arg;r.dispatchException(r.arg)}else r.method===`return`&&r.abrupt(`return`,r.arg);i=p;var l=d(t,n,r);if(l.type===`normal`){if(i=r.done?m:`suspendedYield`,l.arg===h)continue;return{value:l.arg,done:r.done}}l.type===`throw`&&(i=m,r.method=`throw`,r.arg=l.arg)}}}function E(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,r===`throw`&&t.iterator.return&&(n.method=`return`,n.arg=e,E(t,n),n.method===`throw`)||r!==`return`&&(n.method=`throw`,n.arg=TypeError(`The iterator does not provide a '`+r+`' method`)),h;var a=d(i,t.iterator,n.arg);if(a.type===`throw`)return n.method=`throw`,n.arg=a.arg,n.delegate=null,h;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,n.method!==`return`&&(n.method=`next`,n.arg=e),n.delegate=null,h):o:(n.method=`throw`,n.arg=TypeError(`iterator result is not an object`),n.delegate=null,h)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:`root`}],e.forEach(D,this),this.reset(!0)}function A(t){if(t||t===``){var n=t[o];if(n)return n.call(t);if(typeof t.next==`function`)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw TypeError(Le(t)+` is not iterable`)}return _.prototype=v,i(S,`constructor`,{value:v,configurable:!0}),i(v,`constructor`,{value:_,configurable:!0}),_.displayName=l(v,c,`GeneratorFunction`),t.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===_||(t.displayName||t.name)===`GeneratorFunction`)},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,`GeneratorFunction`)),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(w.prototype),l(w.prototype,s,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,a){a===void 0&&(a=Promise);var o=new w(u(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},C(S),l(S,c,`Generator`),l(S,o,(function(){return this})),l(S,`toString`,(function(){return`[object Generator]`})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=A,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method=`next`,this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)n.charAt(0)===`t`&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type=`throw`,s.arg=t,n.next=r,i&&(n.method=`next`,n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if(o.tryLoc===`root`)return i(`end`);if(o.tryLoc<=this.prev){var c=r.call(o,`catchLoc`),l=r.call(o,`finallyLoc`);if(c&&l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!l)throw Error(`try statement without catch or finally`);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,`finallyLoc`)&&this.prev<i.finallyLoc){var a=i;break}}a&&(e===`break`||e===`continue`)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method=`next`,this.next=a.finallyLoc,h):this.complete(o)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;O(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},this.method===`next`&&(this.arg=e),h}},t}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Be(r.key),r)}}function Be(e){var t=function(e,t){if(Le(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Le(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Le(t)==`symbol`?t:t+``}var Ve=function(){function n(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),Ie.brazeClientOptions(e),this.options=e,this.initialize()}var r,i,a;return r=n,i=[{key:`initialize`,value:function(){var n=this.options.apiKey,r={baseUrl:this.options.baseUrl,enableLogging:this.options.enableLogging,allowUserSuppliedJavascript:this.options.allowUserSuppliedJavascript,minimumIntervalBetweenTriggerActionsInSeconds:this.options.minimumIntervalBetweenTriggerActionsInSeconds,doNotLoadFontAwesome:!0};e.ZP.initialize(n,r)||q(`Cannot initialize client. Please make sure your "apiKey" and "baseUrl" is valid.`),this.options.automaticallyShowInAppMessages&&function(){if(!e.ZP.X())return;o();let n=t.Z.m();if(n.Pi()==null){let e=B((e=>z(e)));n.$i(e)}n.Pi()}()}},{key:`openSession`,value:function(){(function(){if(!e.ZP.X())return;let t=e.ZP.cr();if(!t)return;t.openSession();let n=V.Z.Yt.Qt,r=new V.Z(n,_.Z);r.jr(n.ss.hr,((e,i)=>{let a=i.lastClick,o=i.trackingString;_.Z.info(`Firing push click trigger from ${o} push click at ${a}`);let s=t.kr(a,o),c=function(){x.n.rr().fe(b.Z.vr,[o],s)};t.$r(c,c),r.re(n.ss.hr,e)})),r.Zt(n.ss.wr,(function(e){t.yr(e)}))})()}},{key:`logEvent`,value:function(e){var t=Ae.getEventDataPayload(e,{name:this.options.productName,version:this.options.productVersion,locale:this.options?.locale});return H.logCustomEvent(e.type,t)}},{key:`getUserId`,value:function(){return this.getBrazeUser().getUserId()}},{key:`setCustomUserAttribute`,value:function(e,t){var n=this.getBrazeUser();return Ie.clientUserAttributeValue(t)||q(`Invalid custom user attribute value: '${t}' for key: '${e}'`),n.setCustomUserAttribute(e,t)}},{key:`bulkSetCustomUserAttributes`,value:function(e){var t=this;Object.keys(e).length||q(`Cannot bulk set emptry object for custom user attributes`),Object.keys(e).forEach((function(n){var r=e[n];t.setCustomUserAttribute(n,r)}))}},{key:`requestPushPermission`,value:function(e,t){ee.requestPushPermission(e,t)}},{key:`unregisterPush`,value:function(e,t){U.unregisterPush(e,t)}},{key:`setAlias`,value:function(e,t){this.getBrazeUser().addAlias(t,e)}},{key:`setUser`,value:function(e){te.changeUser(e)}},{key:`setUserFirstName`,value:function(e){this.getBrazeUser().setFirstName(e)}},{key:`setUserLastName`,value:function(e){this.getBrazeUser().setLastName(e)}},{key:`setUserEmail`,value:function(e){this.getBrazeUser().setEmail(e)}},{key:`setUserCountry`,value:function(e){this.getBrazeUser().setCountry(e)}},{key:`setUserPhone`,value:function(e){this.getBrazeUser().setPhoneNumber(e)}},{key:`setUserGender`,value:function(e){this.getBrazeUser().setGender(e)}},{key:`setUserEmailNotificationSubscriptionType`,value:function(e){return this.getBrazeUser().setEmailNotificationSubscriptionType(e)}},{key:`sendData`,value:function(e){e&&typeof e==`function`?ne.requestImmediateDataFlush(e):ne.requestImmediateDataFlush()}},{key:`hasUser`,value:function(){try{if(this.getBrazeUser())return!0}catch{return!1}finally{return!1}}},{key:`getBrazeUser`,value:function(){var e=E.P();return e||q(`No valid user found!`),e}},{key:`getContentCardsV2`,value:function(){return function(){if(e.ZP.X())return _e.rr().Us(!1)}()}},{key:`showContentCards`,value:function(e,t){return Se(e,t)}},{key:`getContentCards`,value:function(){return e=this,t=void 0,n=void 0,r=Re().mark((function e(){return Re().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(`return`,new Promise((function(e,t){Se(null,(function(n){return n?e(n):t(Error(`No content cards found.`)),n}))})));case 1:case`end`:return e.stop()}}),e)})),new(n||=Promise)((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}));var e,t,n,r}},{key:`hideCards`,value:function(t){(function(t){if(!e.ZP.X())return;let n=document.querySelectorAll(`.ab-feed`);for(let e=0;e<n.length;e++)(t==null||t!=null&&n[e].parentNode===t)&&(0,ye.tQ)(n[e])})(t)}},{key:`logContentCardDismissal`,value:function(e){e||q(`No "card" provided in "logContentCardDismissal"`),Ce.K(e)}},{key:`logContentCardClick`,value:function(e){e||q(`No "card" provided in "logContentCardClick"`),W.d(e,!0)}},{key:`logContentCardImpressions`,value:function(e){var t;e&&e.length||q(`No "cards" provided in "logContentCardImpressions"`),t=e,(0,oe.p)(t,!0)}},{key:`requestContentCardRefresh`,value:function(e,t){return se(e,t)}},{key:`subscribeToContentCardUpdate`,value:function(e){return e||q(`No "subscriber" provided in "subscribeToContentCardUpdate"`),ve(e)}},{key:`subscribeToInAppMessage`,value:function(e){return e||q(`No "callback" provided in "subscribeToInAppMessage".`),B(e)}},{key:`showInAppMessage`,value:function(e,t,n){return e||q(`Invalid "inAppMessage" provided in "showInAppMessage".`),z(e,t,n)}},{key:`logInAppMessageClick`,value:function(e){return e||q(`Invalid "inAppMessage" provided in "logInAppMessageClick".`),S(e)}},{key:`logInAppMessageButtonClick`,value:function(e,t){return e&&t||q(`Invalid params supplied in "logInAppMessageButtonClick".`),N(e,t)}},{key:`logInAppMessageHtmlClick`,value:function(e,t,n){return e||q(`Invalid "inAppMessage" provided in "logInAppMessageHtmlClick".`),T(e,t,n)}},{key:`logInAppMessageImpression`,value:function(e){return e||q(`Invalid "inAppMessage" provided in "logInAppMessageImpression".`),y(e)}}],a=[{key:`getInstance`,value:function(e){return this._instance||=new this(e)}}],i&&ze(r.prototype,i),a&&ze(r,a),Object.defineProperty(r,"prototype",{writable:!1}),n}();function He(e){return He=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},He(e)}function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,We(r.key),r)}}function We(e){var t=function(e,t){if(He(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(He(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return He(t)==`symbol`?t:t+``}var Ge=function(){function e(t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.options=t,this.apiClient=t.apiClient}var t,n;return t=e,(n=[{key:`safelyExecute`,value:function(e){try{return e()}catch(e){e instanceof Error&&J(e.message),typeof e==`string`&&J(e)}}}])&&Ue(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ke(e){return Ke=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ke(e)}function qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Je(r.key),r)}}function Je(e){var t=function(e,t){if(Ke(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ke(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ke(t)==`symbol`?t:t+``}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function Xe(e){var t=Qe();return function(){var n,r=$e(e);if(t){var i=$e(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ze(this,n)}}function Ze(e,t){if(t&&(Ke(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function Qe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Qe=function(){return!!e})()}function $e(e){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$e(e)}var et=function(e){(function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)})(i,e);var t,n,r=Xe(i);function i(e){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),r.call(this,e)}return t=i,(n=[{key:`getAll`,value:function(){return this.apiClient.getContentCardsV2()}},{key:`getContentCards`,value:function(){return this.apiClient.getContentCards()}},{key:`show`,value:function(e,t){return this.apiClient.showContentCards(e,t)}},{key:`hide`,value:function(e){return this.apiClient.hideCards(e)}},{key:`logDismissal`,value:function(e){return this.apiClient.logContentCardDismissal(e)}},{key:`logClick`,value:function(e){return this.apiClient.logContentCardClick(e)}},{key:`logImpressions`,value:function(e){return this.apiClient.logContentCardImpressions(e)}},{key:`requestRefresh`,value:function(e,t){return this.apiClient.requestContentCardRefresh(e,t)}},{key:`subscribe`,value:function(e){return this.apiClient.subscribeToContentCardUpdate(e)}}])&&qe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(Ge);function tt(e){return tt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},tt(e)}function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,rt(r.key),r)}}function rt(e){var t=function(e,t){if(tt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(tt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return tt(t)==`symbol`?t:t+``}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}function at(e){var t=st();return function(){var n,r=ct(e);if(t){var i=ct(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ot(this,n)}}function ot(e,t){if(t&&(tt(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function st(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(st=function(){return!!e})()}function ct(e){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ct(e)}var lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct=function(e){(function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&it(e,t)})(i,e);var t,n,r=at(i);function i(e){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),r.call(this,e)}return t=i,(n=[{key:`show`,value:function(e,t,n){return this.apiClient.showInAppMessage(e,t,n)}},{key:`logMessageClick`,value:function(e){return this.apiClient.logInAppMessageClick(e)}},{key:`logButtonClick`,value:function(e,t){return this.apiClient.logInAppMessageButtonClick(e,t)}},{key:`logHtmlMessageClick`,value:function(e,t,n){return this.apiClient.logInAppMessageHtmlClick(e,t,n)}},{key:`logImpression`,value:function(e){return this.apiClient.logInAppMessageImpression(e)}},{key:`subscribe`,value:function(e){return this.apiClient.subscribeToInAppMessage(e)}}])&&nt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(Ge),wt={all:[`streamable`,`clickview`],cv:[`clickview`],sl:[`streamable`],none:[]};(function(e){e.AU=`au`,e.NZ=`nz`,e.UK=`uk`,e.US=`us`})(lt||={}),function(e){e.PageView=`page_view`}(ut||={}),function(e){e.ButtonClick=`marketing_button_click`,e.LinkClick=`marketing_link_click`}(dt||={}),function(e){e.FreeTrialSignup=`marketing_free_trial_signup`,e.DemoSignup=`marketing_demo_signup`,e.PostFreeTrialSubmission=`marketing_post_free_trial_submission`,e.FormSubmission=`marketing_form_submission`,e.ContactFormSubmission=`marketing_contact_us_submission`,e.CallBooked=`marketing_call_booked`,e.NewsletterSignup=`cv_marketing_newsletter_sign_up`,e.MarketingTradeshowSubmission=`marketing_tradeshow_submission`,e.LandingPageFormSubmission=`cv_marketing_lp_form_submission`,e.MarketingReferralFormSubmission=`cv_marketing_mdc_referral`}(ft||={}),function(e){e.ProductTrailRequested=`product_trial_requested`,e.FormSubmission=`product_form_submission`,e.TrialUpgradeRequested=`product_trial_upgrade_requested`,e.OlympicsOfferSubmission=`product_olympics_offer_submission`,e.BdmTrialRequested=`cv_product_bdm_trial_requested`,e.ClickViewPilotRequested=`cv_product_pilot_requested`,e.ClickViewLivePilotRequested=`cl_product_pilot_requested`}(pt||={}),function(e){e.ContactUsFormSubmit=`streamable_contact_us_submission`,e.LivestreamBookingFormSubmit=`streamable_livestream_booking_submission`}(mt||={}),function(e){e.TrialRequested=`sl_marketing_trial_requested`,e.HalloweenFormSubmission=`sl_marketing_halloween_submission`,e.NewsletterSignup=`sl_marketing_newsletter_sign_up`,e.RequestPricing=`sl_marketing_pricing_requested`,e.LandingPageFormSubmission=`sl_marketing_lp_form_submission`,e.ContactUsFormSubmit=`sl_marketing_contact_us_submission`}(ht||={}),function(e){e.ContactUsFormSubmit=`ch_marketing_contact_us_submission`}(gt||={}),function(e){e.ExploreTopics=`product_explore_topics`,e.Stream=`product_stream`,e.Search=`product_search`,e.SearchClickthrough=`product_search_clickthrough`,e.ClickBookACall=`product_book_a_call_clicked`,e.Share=`product_share`,e.DownloadResource=`product_download_resource`,e.Invite=`product_invite_send`,e.PlayerDeviceCta=`product_player_devices_cta`,e.SettingsIntegrations=`product_settings_integrations`}(_t||={}),function(e){e.AddToSubscriptionGroups=`add_to_subscription_groups`}(vt||={}),function(e){e.FirstName=`first_name`,e.LastName=`last_name`,e.Email=`email`,e.Phone=`phone_number`}(yt||={}),function(e){e.CrmId=`cvc_id`,e.JobTitle=`job_title`,e.AccountOwner=`account_owner`,e.Department=`department`,e.AccountName=`account_name`,e.AccountType=`account_type`,e.OrgType=`organisation_type`,e.OrgSubType=`organisation_sub_type`,e.SyncToCrm=`sync_to_crm`,e.MasterId=`master_id`,e.AccountAddress=`account_address`,e.Source=`source`}(bt||={}),function(e){e.AccountCity=`account_city`,e.AccountState=`account_state`,e.AccountPostCode=`account_post_code`,e.AccountCountry=`account_country`,e.HowCanWeHelp=`how_can_we_help`,e.ReasonForInterest=`reason_for_interest`,e.Conversion=`conversion`,e.ContactUsComment=`contact_us_comment`,e.ReferredBy=`referred_by`,e.ReferredBySchool=`referred_by_school`,e.ReferralSubmittedBy=`referral_submitted_by`,e.ReferralType=`referral_type`,e.Variant=`variant`}(xt||={}),function(e){e.Marketing=`marketing_id`,e.Product=`master_id`,e.Email=`email`}(St||={});function Tt(e){return Tt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Tt(e)}function Et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Dt(r.key),r)}}function Dt(e){var t=function(e,t){if(Tt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Tt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Tt(t)==`symbol`?t:t+``}function Ot(e,t){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ot(e,t)}function kt(e){var t=jt();return function(){var n,r=Mt(e);if(t){var i=Mt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return At(this,n)}}function At(e,t){if(t&&(Tt(t)==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e)}function jt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jt=function(){return!!e})()}function Mt(e){return Mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mt(e)}var Nt=function(e){(function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ot(e,t)})(i,e);var t,n,r=kt(i);function i(e){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),r.call(this,e)}return t=i,n=[{key:`logForm`,value:function(e){this.log(e),function(e){switch(e?.internalOptions?.subscriptionGroups){case`all`:case`cv`:case`sl`:return!0;default:return!1}}(e)&&this.logInternal({eventType:vt.AddToSubscriptionGroups,additionalData:{products:wt[e.internalOptions?.subscriptionGroups]}})}},{key:`logAnalytics`,value:function(e){this.log(e,!1)}},{key:`logInternal`,value:function(e){var t=e.eventType,n=e.additionalData,r={type:t,data:{}};Ie.additionalData(n)&&(r.data=Object.assign({},n)),this.apiClient.logEvent(r),this.apiClient.sendData()}},{key:`log`,value:function(e){var t=e.eventType,n=e.actionType,r=e.additionalData,i=e.callback,a=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],o=this.options.getPayload();Ie.additionalData(r)&&(o=Object.assign(Object.assign({},o),r));var s={type:t,data:o};n&&(s.actionType=n);var c=this.apiClient.logEvent(s);a?this.apiClient.sendData(i):typeof i!=`function`||i(c)}}],n&&Et(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(Ge),Pt=i(8322),Ft=i.n(Pt);function It(e){return It=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},It(e)}function Lt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if(typeof e==`string`)return Rt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rt(e,t):void 0}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
60
60
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Rt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var zt={removeEmptyKeys:function(e){var t=this;if(Array.isArray(e))return e;var n=Object.assign({},e);return Object.entries(n).filter((function(e){var t=Lt(e,2)[1];return!(t==null||typeof t==`string`&&!t.length||It(t)===`object`&&Object.keys(t).length===0)})).reduce((function(e,n){var r,i,a,o=Lt(n,2),s=o[0],c=o[1];return Object.assign(Object.assign({},e),(r={},i=s,a=c===Object(c)?t.removeEmptyKeys(c):c,(i=function(e){var t=function(e,t){if(It(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(It(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return It(t)==`symbol`?t:t+``}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r))}),{})}};function Bt(e){return Bt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Bt(e)}function Vt(e,t,n){return(t=function(e){var t=function(e,t){if(Bt(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Bt(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Bt(t)==`symbol`?t:t+``}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ht={getDefaultUserAttributes:function(e){var t;return zt.removeEmptyKeys((Vt(t={},yt.Email,e.email),Vt(t,yt.FirstName,e?.firstName),Vt(t,yt.LastName,e?.lastName),Vt(t,yt.Phone,e?.phone),t))},getCustomUserAttributesWithoutSource:function(e){var t,n=zt.removeEmptyKeys({province:e?.custom?.accountAddress?.province,country_code:e?.custom?.accountAddress?.countryCode}),r=(Vt(t={},bt.AccountName,e?.custom?.accountName),Vt(t,bt.AccountType,e?.custom?.accountType),Vt(t,bt.CrmId,e?.custom?.crmId),Vt(t,bt.Department,e?.custom?.department),Vt(t,bt.JobTitle,e?.custom?.jobTitle),Vt(t,bt.MasterId,e?.custom?.masterId),Vt(t,bt.OrgSubType,e?.custom?.orgSubType),Vt(t,bt.OrgType,e?.custom?.orgType),Vt(t,bt.SyncToCrm,e?.custom?.syncToCrm),t);return Ie.accountAddress(n)&&(r[bt.AccountAddress]=n),zt.removeEmptyKeys(r)},getCustomUserAttributes:function(e){var t=Ht.getCustomUserAttributesWithoutSource(e);return zt.removeEmptyKeys(Object.assign(Object.assign({},t),Vt({},bt.Source,function(e){if(e.custom?.source&&e.custom.source.length){var t=Object.keys(Ht.getDefaultUserAttributes(e)),n=Object.keys(Ht.getCustomUserAttributesWithoutSource(e));return{$add:[{name:e.custom.source,attributes:[].concat(t,n)}]}}q(`No source provided for braze user.`)}(e))))},getEventUserAttributes:function(e){var t;return zt.removeEmptyKeys((Vt(t={},xt.AccountCity,e?.event?.accountCity),Vt(t,xt.AccountCountry,e?.event?.accountCity),Vt(t,xt.AccountPostCode,e?.event?.accountPostCode),Vt(t,xt.AccountState,e?.event?.accountState),Vt(t,xt.ContactUsComment,e?.event?.contactUsComment),Vt(t,xt.Conversion,e?.event?.conversion),Vt(t,xt.HowCanWeHelp,e?.event?.howCanWeHelp),Vt(t,xt.ReasonForInterest,e?.event?.reasonForInterest),Vt(t,xt.ReferredBy,e?.event?.referredBy),Vt(t,xt.ReferredBySchool,e?.event?.referredBySchool),Vt(t,xt.ReferralSubmittedBy,e?.event?.referralSubmittedBy),Vt(t,xt.ReferralType,e?.event?.referralType),Vt(t,xt.Variant,e?.event?.variant),t))},getExtraUserAttributes:function(e){return Bt(e.extra)===`object`?zt.removeEmptyKeys(e.extra):{}},getPayload:function(e){if(!e)return{};var t=Ht.getDefaultUserAttributes(e),n=Ht.getCustomUserAttributes(e),r=Ht.getEventUserAttributes(e),i=Ht.getExtraUserAttributes(e),a=Ie.additionalData(i),o=Object.assign(Object.assign(Object.assign({},t),n),r);return a?Object.assign(Object.assign({},o),i):o},getEmailHash:function(e){var t=e.trim().toLowerCase();return Ft().hash(t)}};function Ut(e){return Ut=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ut(e)}function Wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Gt(r.key),r)}}function Gt(e){var t=function(e,t){if(Ut(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,`string`);if(Ut(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return Ut(t)==`symbol`?t:t+``}var Kt=function(){function e(t){var n=t.apiOptions,r=t.shouldInitialize,i=r===void 0||r,a=t.allowAnonymous,o=a!==void 0&&a,s=t.subscriptions;(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.initialized=!1,this.apiOptions=n,this.subscriptions=s,this.allowAnonymous=o,i&&this.initialize()}var t,n;return t=e,(n=[{key:`initialize`,value:function(){var e=this;this.isInitialized()?function(e){var t=[...arguments].slice(1);console.warn(e,t)}(`BrazeClient has already been initialized!`):(this.apiClient=Ve.getInstance(this.apiOptions),this.cardsModule=new et({apiClient:this.apiClient}),this.bamModule=new Ct({apiClient:this.apiClient}),this.eventModule=new Nt({apiClient:this.apiClient,getPayload:function(){return Ht.getPayload(e.user)}}),this.initialized=!0)}},{key:`isInitialized`,value:function(){return this.initialized}},{key:`getUser`,value:function(){return this.isInitialized()?this.validateUser()?this.user:null:(J(`BrazeClient has not been initialized.`),null)}},{key:`card`,get:function(){return this.isInitialized()?this.cardsModule:(J(`BrazeClient has not been initialized.`),null)}},{key:`bam`,get:function(){return this.isInitialized()?this.bamModule:(J(`BrazeClient has not been initialized.`),null)}},{key:`event`,get:function(){return this.isInitialized()?this.allowAnonymous||this.validateUser()?this.eventModule:(J("Anon events are disabled! Please invoke `setUser` before logging events!"),null):(J(`BrazeClient has not been initialized.`),null)}},{key:`setUser`,value:function(e){this.isInitialized()?(this.user=e,this.startSession(),this.logUserAttributes()):J("Trying to `setUser` but the client has not been initialized")}},{key:`setUserInit`,value:function(e){this.isInitialized()||this.initialize(),this.setUser(e)}},{key:`allowAnonymousSessions`,value:function(){this.allowAnonymous=!0}},{key:`api`,value:function(){return this.isInitialized()?this.apiClient:null}},{key:`setEmailNotificationSubscriptionType`,value:function(e){return this.isInitialized()&&this.validateUser()?this.apiClient.setUserEmailNotificationSubscriptionType(e):null}},{key:`validateUser`,value:function(){return!!this.user||(J(`No user has been set!`),!1)}},{key:`startSession`,value:function(){this.allowAnonymous||this.validateUser()?(this.enableSubscriptions(),this.user&&this.apiClient.setUser(Ht.getEmailHash(this.user.email)),this.apiClient.openSession()):J(`No user provided and cannot start anonymous sessions!`)}},{key:`enableSubscriptions`,value:function(){var e,t;(e=this.subscriptions)!=null&&e.subscribeToInAppMessage&&typeof this.subscriptions.subscribeToInAppMessage==`function`&&this.apiClient.subscribeToInAppMessage(this.subscriptions.subscribeToInAppMessage),(t=this.subscriptions)!=null&&t.subscribeToContentCards&&typeof this.subscriptions.subscribeToContentCards==`function`&&this.apiClient.subscribeToContentCardUpdate(this.subscriptions.subscribeToContentCards)}},{key:`logUserAttributes`,value:function(){if(this.validateUser()){this.apiClient.setUserEmail(this.user.email),this.user.firstName&&this.apiClient.setUserFirstName(this.user.firstName),this.user.lastName&&this.apiClient.setUserLastName(this.user.lastName),this.user.phone&&this.apiClient.setUserPhone(this.user.phone),this.user.country&&this.apiClient.setUserCountry(this.user.country);var e=Ht.getCustomUserAttributes(this.user);this.apiClient.bulkSetCustomUserAttributes(e)}}}])&&Wt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function qt(e){return Ve.getInstance(e)}})(),a})()))}))();function DD(e){(0,Z.useEffect)(()=>{let t=OD(e?.additionalData);t?.attributionData&&rf.setAttributionData(t.attributionData),t?.utms&&gf.setUtmParameters(t.utms)},[])}function OD(e){if(!e?.attribution?.length)return null;try{let{r:t,utms:n}=JSON.parse(e.attribution);return{attributionData:rf.decodeRValue(t),utms:n}}catch(e){let t=e instanceof Error?e.message:e?.toString();console.error(t)}}var kD=function(e){return e.Lite=`lite`,e.Auth=`auth`,e}({});function AD(e){return{productName:kD.Auth,prospectStatus:t=>`${e}/v1/prospects/${t}/trial-status`,createTrial:`/ajax/trials/new`,searchProspect:`${e}/v1/search/prospects`,createProspect:`/ajax/trials/prospects`,prospectLookups:t=>`${e}/v1/prospects/${t}/lookups`,joinRequest:`/ajax/trials/join-request`}}var jD=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function MD(e,t,n,r){let i,a,o,s=t||[0],c=(n||=0)>>>3,l=r===-1?3:0;for(i=0;i<e.length;i+=1)o=i+c,a=o>>>2,s.length<=a&&s.push(0),s[a]|=e[i]<<8*(l+o%4*r);return{value:s,binLen:8*e.length+n}}function ND(e,t,n){switch(t){case`UTF8`:case`UTF16BE`:case`UTF16LE`:break;default:throw Error(`encoding must be UTF8, UTF16BE, or UTF16LE`)}switch(e){case`HEX`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s;if(e.length%2!=0)throw Error(`String of HEX type must be in byte increments`);let c=t||[0],l=(n||=0)>>>3,u=r===-1?3:0;for(i=0;i<e.length;i+=2){if(a=parseInt(e.substr(i,2),16),isNaN(a))throw Error(`String of HEX type contains invalid characters`);for(s=(i>>>1)+l,o=s>>>2;c.length<=o;)c.push(0);c[o]|=a<<8*(u+s%4*r)}return{value:c,binLen:4*e.length+n}}(e,t,r,n)};case`TEXT`:return function(e,r,i){return function(e,t,n,r,i){let a,o,s,c,l,u,d,f,p=0,m=n||[0],h=(r||=0)>>>3;if(t===`UTF8`)for(d=i===-1?3:0,s=0;s<e.length;s+=1)for(a=e.charCodeAt(s),o=[],128>a?o.push(a):2048>a?(o.push(192|a>>>6),o.push(128|63&a)):55296>a||57344<=a?o.push(224|a>>>12,128|a>>>6&63,128|63&a):(s+=1,a=65536+((1023&a)<<10|1023&e.charCodeAt(s)),o.push(240|a>>>18,128|a>>>12&63,128|a>>>6&63,128|63&a)),c=0;c<o.length;c+=1){for(u=p+h,l=u>>>2;m.length<=l;)m.push(0);m[l]|=o[c]<<8*(d+u%4*i),p+=1}else for(d=i===-1?2:0,f=t===`UTF16LE`&&i!==1||t!==`UTF16LE`&&i===1,s=0;s<e.length;s+=1){for(a=e.charCodeAt(s),!0===f&&(c=255&a,a=c<<8|a>>>8),u=p+h,l=u>>>2;m.length<=l;)m.push(0);m[l]|=a<<8*(d+u%4*i),p+=2}return{value:m,binLen:8*p+r}}(e,t,r,i,n)};case`B64`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s,c,l,u,d=0,f=t||[0],p=(n||=0)>>>3,m=r===-1?3:0,h=e.indexOf(`=`);if(e.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw Error(`Invalid character in base-64 string`);if(e=e.replace(/=/g,``),h!==-1&&h<e.length)throw Error(`Invalid '=' found in base-64 string`);for(a=0;a<e.length;a+=4){for(c=e.substr(a,4),s=0,o=0;o<c.length;o+=1)i=jD.indexOf(c.charAt(o)),s|=i<<18-6*o;for(o=0;o<c.length-1;o+=1){for(u=d+p,l=u>>>2;f.length<=l;)f.push(0);f[l]|=(s>>>16-8*o&255)<<8*(m+u%4*r),d+=1}}return{value:f,binLen:8*d+n}}(e,t,r,n)};case`BYTES`:return function(e,t,r){return function(e,t,n,r){let i,a,o,s,c=t||[0],l=(n||=0)>>>3,u=r===-1?3:0;for(a=0;a<e.length;a+=1)i=e.charCodeAt(a),s=a+l,o=s>>>2,c.length<=o&&c.push(0),c[o]|=i<<8*(u+s%4*r);return{value:c,binLen:8*e.length+n}}(e,t,r,n)};case`ARRAYBUFFER`:return function(e,t,r){return function(e,t,n,r){return MD(new Uint8Array(e),t,n,r)}(e,t,r,n)};case`UINT8ARRAY`:return function(e,t,r){return MD(e,t,r,n)};default:throw Error(`format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY`)}}function PD(e,t,n,r){switch(e){case`HEX`:return function(e){return function(e,t,n,r){let i=`0123456789abcdef`,a,o,s=``,c=t/8,l=n===-1?3:0;for(a=0;a<c;a+=1)o=e[a>>>2]>>>8*(l+a%4*n),s+=i.charAt(o>>>4&15)+i.charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,t,n,r)};case`B64`:return function(e){return function(e,t,n,r){let i,a,o,s,c,l=``,u=t/8,d=n===-1?3:0;for(i=0;i<u;i+=3)for(s=i+1<u?e[i+1>>>2]:0,c=i+2<u?e[i+2>>>2]:0,o=(e[i>>>2]>>>8*(d+i%4*n)&255)<<16|(s>>>8*(d+n*((i+1)%4))&255)<<8|c>>>8*(d+n*((i+2)%4))&255,a=0;a<4;a+=1)l+=8*i+6*a<=t?jD.charAt(o>>>6*(3-a)&63):r.b64Pad;return l}(e,t,n,r)};case`BYTES`:return function(e){return function(e,t,n){let r,i,a=``,o=t/8,s=n===-1?3:0;for(r=0;r<o;r+=1)i=e[r>>>2]>>>8*(s+r%4*n)&255,a+=String.fromCharCode(i);return a}(e,t,n)};case`ARRAYBUFFER`:return function(e){return function(e,t,n){let r,i=t/8,a=new ArrayBuffer(i),o=new Uint8Array(a),s=n===-1?3:0;for(r=0;r<i;r+=1)o[r]=e[r>>>2]>>>8*(s+r%4*n)&255;return a}(e,t,n)};case`UINT8ARRAY`:return function(e){return function(e,t,n){let r,i=t/8,a=n===-1?3:0,o=new Uint8Array(i);for(r=0;r<i;r+=1)o[r]=e[r>>>2]>>>8*(a+r%4*n)&255;return o}(e,t,n)};default:throw Error(`format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY`)}}function FD(e){let t={outputUpper:!1,b64Pad:`=`,outputLen:-1},n=e||{},r=`Output length must be a multiple of 8`;if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw Error(r);t.outputLen=n.shakeLen}if(typeof t.outputUpper!=`boolean`)throw Error(`Invalid outputUpper formatting option`);if(typeof t.b64Pad!=`string`)throw Error(`Invalid b64Pad formatting option`);return t}var ID=class{constructor(e,t,n){let r=n||{};if(this.t=t,this.i=r.encoding||`UTF8`,this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw Error(`numRounds must a integer >= 1`);this.o=e,this.h=[],this.u=0,this.l=!1,this.A=0,this.p=!1,this.U=[],this.R=[]}update(e){let t,n=0,r=this.T>>>5,i=this.F(e,this.h,this.u),a=i.binLen,o=i.value,s=a>>>5;for(t=0;t<s;t+=r)n+this.T<=a&&(this.m=this.g(o.slice(t,t+r),this.m),n+=this.T);return this.A+=n,this.h=o.slice(n>>>5),this.u=a%this.T,this.l=!0,this}getHash(e,t){let n,r,i=this.B,a=FD(t);if(this.v){if(a.outputLen===-1)throw Error(`Output length must be specified in options`);i=a.outputLen}let o=PD(e,i,this.H,a);if(this.p&&this.C)return o(this.C(a));for(r=this.Y(this.h.slice(),this.u,this.A,this.I(this.m),i),n=1;n<this.numRounds;n+=1)this.v&&i%32!=0&&(r[r.length-1]&=16777215>>>24-i%32),r=this.Y(r,i,0,this.L(this.o),i);return o(r)}setHMACKey(e,t,n){if(!this.M)throw Error(`Variant does not support HMAC`);if(this.l)throw Error(`Cannot set MAC key after calling update`);let r=ND(t,(n||{}).encoding||`UTF8`,this.H);this.N(r(e))}N(e){let t=this.T>>>3,n=t/4-1,r;if(this.numRounds!==1)throw Error(`Cannot set numRounds with MAC`);if(this.p)throw Error(`MAC key already set`);for(t<e.binLen/8&&(e.value=this.Y(e.value,e.binLen,0,this.L(this.o),this.B));e.value.length<=n;)e.value.push(0);for(r=0;r<=n;r+=1)this.U[r]=909522486^e.value[r],this.R[r]=1549556828^e.value[r];this.m=this.g(this.U,this.m),this.A=this.T,this.p=!0}getHMAC(e,t){let n=FD(t);return PD(e,this.B,this.H,n)(this.S())}S(){let e;if(!this.p)throw Error(`Cannot call getHMAC without first setting MAC key`);let t=this.Y(this.h.slice(),this.u,this.A,this.I(this.m),this.B);return e=this.g(this.R,this.L(this.o)),e=this.Y(t,this.B,this.T,e,this.B),e}};function LD(e,t){return e<<t|e>>>32-t}function RD(e,t,n){return e^t^n}function zD(e,t,n){return e&t^e&n^t&n}function BD(e,t){let n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function VD(e,t,n,r,i){let a=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(a>>>16))<<16|65535&a}function HD(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function UD(e,t){let n,r,i,a,o,s,c,l=[];for(n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],c=0;c<80;c+=1)l[c]=c<16?e[c]:LD(l[c-3]^l[c-8]^l[c-14]^l[c-16],1),s=c<20?VD(LD(n,5),(u=r)&i^~u&a,o,1518500249,l[c]):c<40?VD(LD(n,5),RD(r,i,a),o,1859775393,l[c]):c<60?VD(LD(n,5),zD(r,i,a),o,2400959708,l[c]):VD(LD(n,5),RD(r,i,a),o,3395469782,l[c]),o=a,a=i,i=LD(r,30),r=n,n=s;var u;return t[0]=BD(n,t[0]),t[1]=BD(r,t[1]),t[2]=BD(i,t[2]),t[3]=BD(a,t[3]),t[4]=BD(o,t[4]),t}function WD(e,t,n,r){let i,a=15+(t+65>>>9<<4),o=t+n;for(;e.length<=a;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[a]=4294967295&o,e[a-1]=o/4294967296|0,i=0;i<e.length;i+=16)r=UD(e.slice(i,i+16),r);return r}var GD=class extends ID{constructor(e,t,n){if(e!==`SHA-1`)throw Error(`Chosen SHA variant is not supported`);super(e,t,n);let r=n||{};this.M=!0,this.C=this.S,this.H=-1,this.F=ND(this.t,this.i,this.H),this.g=UD,this.I=function(e){return e.slice()},this.L=HD,this.Y=WD,this.m=[1732584193,4023233417,2562383102,271733878,3285377520],this.T=512,this.B=160,this.v=!1,r.hmacKey&&this.N(function(e,t,n,r){let i=e+` must include a value and format`;if(!t){if(!r)throw Error(i);return r}if(t.value===void 0||!t.format)throw Error(i);return ND(t.format,t.encoding||`UTF8`,n)(t.value)}(`hmacKey`,r.hmacKey,this.H))}},KD=function(e){return e.CvApSoutheast1=`cv-ap-southeast-1`,e.CvApSoutheast2=`cv-ap-southeast-2`,e.CvEuWest1=`cv-eu-west-1`,e.CvNaWest1=`cv-na-west-1`,e}({}),qD={CvApSoutheast1:{systemName:KD.CvApSoutheast1},CvApSoutheast2:{systemName:KD.CvApSoutheast2},CvEuWest1:{systemName:KD.CvEuWest1},CvNaWest1:{systemName:KD.CvNaWest1}},JD=function(e){return e.Staff=`Staff`,e.Learner=`Learner`,e.Unknown=`Unknown`,e.System=`System`,e}({}),YD=3,XD=5e3,ZD=6,QD={},$D=class{constructor(e){this.key=e.toString()}getCount(){return QD[this.key]||0}increment(){QD[this.key]=this.getCount()+1}reset(){delete QD[this.key]}shouldBreak(){return this.getCount()>=ZD}},eO=class{constructor(){this.attempt=0}async wait(){await new Promise(e=>setTimeout(e,XD*2**this.attempt)),this.attempt++}};async function tO(e,t){let n=new eO,r=new $D(e);async function i(){let n=await fetch(e,t);if(n.status>=500&&!r.shouldBreak())throw Error(`Server error: ${n.status}`);return n.ok&&r.reset(),n}for(let e=1;e<=YD;e++)try{return await i()}catch(t){if(e>=YD||r.shouldBreak())throw t;r.increment(),await n.wait()}}var nO=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function rO(e){return typeof e==`string`&&nO.test(e)}var iO=[];for(let e=0;e<256;++e)iO.push((e+256).toString(16).slice(1));function aO(e,t=0){return(iO[e[t+0]]+iO[e[t+1]]+iO[e[t+2]]+iO[e[t+3]]+`-`+iO[e[t+4]]+iO[e[t+5]]+`-`+iO[e[t+6]]+iO[e[t+7]]+`-`+iO[e[t+8]]+iO[e[t+9]]+`-`+iO[e[t+10]]+iO[e[t+11]]+iO[e[t+12]]+iO[e[t+13]]+iO[e[t+14]]+iO[e[t+15]]).toLowerCase()}var oO,sO=new Uint8Array(16);function cO(){if(!oO){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);oO=crypto.getRandomValues.bind(crypto)}return oO(sO)}var lO={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function uO(e,t,n){if(lO.randomUUID&&!t&&!e)return lO.randomUUID();e||={};let r=e.random??e.rng?.()??cO();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return aO(r)}function dO(e){if(!rO(e))throw TypeError(`Invalid UUID`);return parseInt(e.slice(14,15),16)}var fO=`cv:session:`,pO=`cv:window:v2:`,mO=1e3*60*30,hO=4;function gO(e){if(e===Hd.LocalStorage)return qd.isAvailable()?qd:Yd;if(e===Hd.SessionStorage)return Jd.isAvailable()?Jd:Yd}function _O(e){return new Date().getTime()+e}function vO(){return uO()}function yO(e,t){return e+(t||`0`)}function bO(e){return new Date().getTime()>e}function xO(e){return!(typeof e!=`object`||typeof e?.id!=`string`||!rO(e.id)||dO(e.id)!==hO||typeof e?.ttl!=`number`||e?.ttl<=0||isNaN(e?.ttl))}function SO(e,t,n){let r=gO(n),i=yO(e,t),a=r.get(i);return!xO(a)||bO(a?.ttl)?null:a}function CO(e,t,n,r){let i=gO(n),a=yO(e,t),o={id:vO(),ttl:_O(r)};return i.set(a,o),o}function wO(e,t,n,r,i){let a=gO(n),o=yO(e,t);a.set(o,{id:r.id,ttl:_O(i)})}function TO(e,t,n){let r=gO(n);if(!r?.isAvailable())return;let i=yO(e,t);r.remove(i)}var EO=null,DO={getClientSessionData(e){let t=SO(fO,e,Hd.LocalStorage);t?wO(fO,e,Hd.LocalStorage,t,mO):t=CO(fO,e,Hd.LocalStorage,mO);let n=SO(pO,e,Hd.SessionStorage);return n?EO===null&&wO(pO,e,Hd.SessionStorage,n,mO):n=CO(pO,e,Hd.SessionStorage,EO??mO),{id:t.id,windowId:n.id}},resetClientSession(e){TO(fO,e,Hd.LocalStorage),TO(pO,e,Hd.SessionStorage)},lockWindowSession(e,t){EO=t;let n=SO(pO,e,Hd.SessionStorage);n&&wO(pO,e,Hd.SessionStorage,n,t)},unlockWindowSession(e){EO=null;let t=SO(pO,e,Hd.SessionStorage);t&&wO(pO,e,Hd.SessionStorage,t,mO)}},OO={isObject(e){let t=typeof e;return t===`function`||t===`object`&&!!e},isFunction(e){return typeof e==`function`}},kO={safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith(`/`)||(n+=`/`),t&&(n+=t.startsWith(`/`)?t.slice(1):t),n}},AO={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i},jO=`Unknown`;function MO(e,t,n){let[r]=t.exec(n)||[];return r||=jO,{name:e,version:r}}function NO(e,t,n){if(!t)return{name:e,version:jO};let r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():jO}}function PO(e,t){let n={name:e,version:null};return AO.win2000.test(t)&&(n.version=`2000`),AO.winXP.test(t)&&(n.version=`XP`),AO.winVista.test(t)&&(n.version=`Vista`),AO.win7.test(t)&&(n.version=`7`),AO.win8.test(t)&&(n.version=`8`),AO.win81.test(t)&&(n.version=`8.1`),AO.win10.test(t)&&(n.version=`10`),n.version||=jO,n}var FO={getDeviceType(){let e=window.navigator.userAgent;return AO.mobileDevice.test(e)?AO.iphone.test(e)?`iPhone`:AO.ipad.test(e)?`iPad`:AO.android.test(e)?`Android`:AO.blackberry.test(e)?`Blackberry`:AO.windowsPhone.test(e)?`Windows Phone`:jO:`Desktop`},getOperatingSystem(){let e=window.navigator.userAgent;return AO.android.test(e)?NO(`Android`,AO.androidVersion,e):AO.iphone.test(e)||AO.ipad.test(e)?NO(`iOS`,AO.iosVersion,e):AO.linux.test(e)?NO(`Linux`,null,e):AO.unix.test(e)?NO(`Unix`,null,e):AO.mac.test(e)?NO(`Macintosh`,AO.osxVersion,e):AO.windows.test(e)?PO(`Windows`,e):AO.blackberry.test(e)?NO(`BlackBerry`,AO.blackberryVersion,e):AO.windowsPhone.test(e)?NO(`Windows Phone`,AO.windowsPhoneVersion,e):{name:jO,version:jO}},getBrowser(){let e=window.navigator.userAgent;return AO.chrome.test(e)?MO(`Chrome`,AO.generalVersion,e):AO.firefox.test(e)?MO(`Firefox`,AO.generalVersion,e):AO.safari.test(e)?MO(`Safari`,AO.generalVersion,e):AO.ie.test(e)?MO(`Internet Explorer`,AO.ieVersion,e):AO.edge.test(e)?MO(`Edge`,AO.edgeVersion,e):AO.opera.test(e)?MO(`Opera`,AO.operaVersion,e):{name:jO,version:jO}},isTouchScreen(){return!!(`ontouchstart`in window||navigator.maxTouchPoints)}},IO={name:`@clickview/analytics`,version:`2.3.0`,description:`Analytics`,main:`dist/app.js`,types:`dist/analytics/src/app.d.ts`,type:`module`,private:!0,repository:{type:`git`,url:`https://gitlab.cvinternal.net/front-end/clickview`},scripts:{start:`npm run build`,"type-check":`tsc --noEmit`,build:`npm run type-check && node ../../../node_modules/vite/bin/vite.js build`,prebuild:`npm run clean`,clean:`npx rimraf dist`},author:``,license:`ISC`,devDependencies:{"tsc-alias":`1.8.16`},dependencies:{jssha:`3.3.1`,uuid:`11.1.1`}},LO=`zXJL9nOHxzDlMUDjiP41`,RO=`unknown`,zO=class{constructor(e){this.options=e,this.initialize()}initialize(){this.validateOptions(),this.options.logUtmParameters&&(this.utmParameters=gf.getUtmParameters()),this.options.logAttributionData&&(this.attributionData=rf.getDecodedAttributionData())}get name(){return`CollectionApiClient`}async log(e){if(Array.isArray(e))return this.logBulk(e);this.shouldLog(e)&&(this.validateEvent(e),await this.postData(await this.formatData(e)))}async logBulk(e){let t=e.filter(e=>this.shouldLog(e));if(!t.length)return;t.forEach(e=>this.validateEvent(e));let n=await Promise.all(t.map(e=>this.formatData(e)));await this.postData(n)}validateOptions(){if(!OO.isFunction(this.options.getUser))throw Error(`getUser option is required.`)}shouldLog(e){return!OO.isFunction(this.options.shouldLog)||this.options.shouldLog(e)}async postData(e){let t=await this.getRegionalUrl(this.options.collectionApiUrls),n=JSON.stringify(e),r={"Content-Type":`application/json`,...this.getSignatureHeader(n)},i=kO.safeUrlConcat(t,`/v1/ingest`);Array.isArray(e)&&(i=kO.safeUrlConcat(i,`/bulk`));try{let e=await tO(i,{method:`POST`,mode:`cors`,headers:r,body:n});e.ok||this.logError(Error(`CollectionApiClient failed to log event. Status: ${e.status} ${e.statusText}`),!1,this.getResponseAsObject(e))}catch(e){this.logError(e)}}getResponseAsObject(e){return{headers:e.headers,ok:e.ok,redirected:e.redirected,status:e.status,statusText:e.statusText,type:e.type,url:e.url,body:e.text()}}getSignatureHeader(e){let t=new GD(`SHA-1`,`TEXT`,{hmacKey:{value:LO,format:`TEXT`,encoding:`UTF8`}});return t.update(e),{"cv-analytics-signature":`${this.options.collectionApiClientId}.${t.getHash(`B64`)}`}}async getRegionalUrl(e){switch((await this.getRegion()).systemName){case KD.CvEuWest1:return e.cvEuWest1;case KD.CvApSoutheast2:return e.cvApSoutheast2;case KD.CvNaWest1:return e.cvNaWest1;case KD.CvApSoutheast1:default:return e.cvApSoutheast1}}validateEvent(e){typeof e.type!=`string`&&this.logError(Error(`Event type is required.`),!0),OO.isObject(e.actionContext)||this.logError(Error(`Event actionContext is required.`),!0),e.actionContext.entity||this.logError(Error(`Event actionContext entity is required.`),!0)}async formatData(e){return{type:e.type,data:await this.getEventData(e),metadata:this.getEventMetadata(e)}}async getEventData(e){let t=e.actionContext,n=this.getPlatformMetadata(),r=await this.getUserData(),i=await this.getSessionData(),a={name:this.options.productName,version:this.options.productVersion};this.options.productVariant&&(a.variant=this.options.productVariant);let o={user:r,action:t,platform:n,product:a,session:i};this.utmParameters&&(o.utm=this.utmParameters);let s=this.extractData(e),c=Object.keys(o).map(e=>e.toLowerCase()),l=Object.keys(s).map(e=>e.toLowerCase());return c.forEach(e=>{l.includes(e)&&this.logError(Error(`${e} is a reserved key.`),!0)}),{...o,...s}}extractData(e){return OO.isFunction(this.options.formatData)?this.options.formatData(e):{[e.actionContext.entity]:e.data}}async getUserData(){let e;try{e=await this.options.getProfileId?.()}catch(e){this.logError(e)}try{let t=await this.options.getUser();return t?.id?{id:t.id,role:t.role?.toLowerCase()||RO,userGroup:(t.userGroup??JD.Unknown).toLowerCase(),yearGroup:this.normalizeYearGroup(t.yearGroup),profileId:e,customer:{id:t.customerId,name:t.customerName,customerGuid:t.customerGuid,crmId:t.crmId,country:t.countryCode,region:await this.getRegion(),openCustomer:!1,accessPolicy:t.accessPolicy}}:e?{profileId:e}:void 0}catch(e){this.logError(e)}}async getRegion(){let e=this.options.regionName;try{let t=await this.options.getUser();t?.instanceRegion&&(e=t.instanceRegion)}catch(e){this.logError(e)}return e||this.logError(Error(`RegionName is not set.`),!0),this.getRegionByName(e.toLowerCase())}async getSessionData(){try{let e=await this.options.getUser();return{...DO.getClientSessionData(e?.id),authSessionId:e?.sessionId}}catch(e){return console.error(e),DO.getClientSessionData(null)}}getPlatformMetadata(){let e={url:window.location.href,referrer:document.referrer};return this.attributionData?.internalReferrer&&(e.internalReferrer=this.attributionData.internalReferrer),this.attributionData?.originalReferrer&&(e.originalReferrer=this.attributionData.originalReferrer),{browser:FO.getBrowser(),os:FO.getOperatingSystem(),request:e,screenResolution:`${window.screen.width}x${window.screen.height}`,viewportResolution:`${window.innerWidth}x${window.innerHeight}`}}getEventMetadata(e){return{client:{name:`${this.name}.ts`,version:IO.version,region:this.getRegionByName(this.options.regionName)},timestamp:new Date().toISOString(),eventVersion:e.eventVersion}}getRegionByName(e){let t;return Object.values(qD).forEach(n=>{n.systemName===e&&(t=n)}),t}normalizeYearGroup(e){return e?e.toLowerCase().split(` `).join(`_`):RO}logError(e,t,...n){if(this.options.logError&&this.options.logError(e,...n),t)throw e}},BO=function(e){return e.Stream=`cv_product_stream`,e.WebPlayerStream=`cv_product_webplayer_stream`,e.StreamProgress=`cv_product_stream_progress`,e.PreviewStreamProgress=`cv_product_preview_stream_progress`,e.StreamBuffering=`cv_product_stream_buffering`,e.Login=`cv_product_login`,e.LoginSsoRedirect=`cv_product_login_sso_redirect`,e.LoginFailed=`cv_product_login_failed`,e.Search=`cv_product_search`,e.InstantSearch=`cv_product_instant_search`,e.SearchEmptyResult=`cv_product_search_empty_result`,e.Filter=`cv_product_search_filter`,e.SearchLanding=`cv_product_search_landing`,e.Share=`cv_product_share`,e.Unshare=`cv_product_unshare`,e.WorkspaceAdd=`cv_product_tv_add`,e.Rename=`cv_product_rename`,e.Move=`cv_product_move`,e.Sort=`cv_product_sort`,e.Create=`cv_product_create`,e.Delete=`cv_product_delete`,e.Associate=`cv_product_associate`,e.Dissociate=`cv_product_dissociate`,e.Edit=`cv_product_edit`,e.Approve=`cv_product_approve`,e.Reject=`cv_product_reject`,e.Disable=`cv_product_disable`,e.Upload=`cv_product_upload`,e.Download=`cv_product_download`,e.Navigate=`cv_product_navigate`,e.Click=`cv_product_click`,e.Suggest=`cv_product_suggest`,e.EditAssoc=`cv_product_edit_assoc`,e.Play=`cv_product_play`,e.Favourite=`cv_product_favourite`,e.Follow=`cv_product_follow`,e.Prefer=`cv_product_prefer`,e.Print=`cv_product_print`,e.Copy=`cv_product_copy`,e.Activate=`cv_product_activate`,e.VerifyEmail=`cv_product_verify_email`,e.ChangePassword=`cv_product_change_password`,e.ManageGroup=`cv_product_manage_group`,e.Export=`cv_product_export`,e.SendEmail=`cv_product_send_email`,e.Publish=`cv_product_publish`,e.Submit=`cv_product_submit`,e.Complete=`cv_product_complete`,e.Archive=`cv_product_archive`,e.Promote=`cv_product_promote`,e.Demote=`cv_product_demote`,e.BulkAction=`cv_product_bulk_action`,e.Remove=`cv_product_remove`,e.Dismiss=`cv_product_dismiss`,e.Open=`cv_product_open`,e.Hide=`cv_product_hide`,e.PageView=`cv_product_page_view`,e.Select=`cv_product_select`,e.SwitchCustomer=`cv_product_switch_customer`,e.Focus=`cv_product_focus`,e.Blur=`cv_product_blur`,e.Hover=`cv_product_hover`,e.Unhover=`cv_product_unhover`,e.SetAccess=`cv_product_set_access`,e.AddToLocalCache=`cv_product_add_to_lc`,e.ResolveWarning=`cv_product_resolve_warning`,e.DismissWarning=`cv_product_dismiss_warning`,e}({}),VO=function(e){return e.Folder=`folder`,e.Video=`video`,e.Rating=`rating`,e.Series=`series`,e.Library=`library`,e.Resource=`resource`,e.Tag=`tag`,e.Subtitle=`subtitle`,e.Chapter=`chapter`,e.Resolution=`resolution`,e.PlaybackSpeed=`playback_speed`,e.Device=`device`,e.Restriction=`restriction`,e.Interactive=`interactive`,e.Interaction=`interaction`,e.PDF=`pdf`,e.CustomerSetting=`customer_setting`,e.UserSetting=`user_setting`,e.LibraryRequest=`staff_request`,e.Logo=`logo`,e.Pagination=`pagination`,e.Thumbnail=`thumbnail`,e.Banner=`banner`,e.Link=`link`,e.Playlist=`playlist`,e.Playlists=`playlists`,e.Person=`person`,e.Company=`company`,e.Classroom=`classroom`,e.ClassroomGroup=`classroom_group`,e.Classification=`classification`,e.ShareLink=`share_link`,e.DirectShare=`direct_share`,e.Upload=`upload`,e.SearchResults=`search_results`,e.SearchSuggestion=`search_suggestion`,e.Audience=`audience`,e.User=`user`,e.Clip=`clip`,e.UserChannel=`user_channel`,e.Widget=`widget`,e.Url=`url`,e.SocialShare=`social_share`,e.Presentation=`presentation`,e.BatchJob=`batch_job`,e.DeepLink=`deep_link`,e.Feedback=`feedback`,e.AppLink=`app_link`,e.SignUp=`sign_up`,e.FileGeneratorJob=`file_generator_job`,e.ExportLibraries=`export_libraries`,e.Product=`product`,e.Customer=`customer`,e.SpecialEvent=`special_event`,e.Region=`region`,e.ProductTip=`product_tip`,e.Livestream=`livestream`,e.DevicesCta=`devices_cta`,e.Integration=`integration`,e.Faq=`faq`,e.MixedMedia=`mixed_media`,e.TableOfContents=`table_of_contents`,e.Author=`author`,e.Glance=`glance`,e.Filter=`filter`,e.NotificationSetting=`notification_setting`,e.Transcript=`transcript`,e.CurriculumCode=`curriculum_code`,e.Assign=`assign`,e.PartnerProfile=`partner_profile`,e.Upsell=`upsell`,e}({}),HO=function(e){return e.TopNav=`top_nav`,e.LeftNav=`left_nav`,e.Footer=`footer`,e.Popup=`popup`,e.Banner=`banner`,e.VideoList=`video_list`,e.VideoListItem=`video_list_item`,e.VideoListHeader=`video_header`,e.VideoThumbnail=`video_thumbnail`,e.ExpandableVideoThumbnail=`expandable_video_thumbnail`,e.VideoItemPreview=`video_item_preview`,e.InteractiveItemPreview=`interactive_item_preview`,e.ClipItemPreview=`clip_item_preview`,e.VideoDetails=`video_details`,e.InteractiveDetails=`interactive_details`,e.ClipDetails=`clip_details`,e.VideoDetailsHeader=`video_details_header`,e.EditVideoDetails=`edit_video_details`,e.EditInteractiveVideoDetails=`edit_interactive_video_details`,e.EditClipDetails=`edit_clip_details`,e.EditVideoChapters=`edit_video_chapters`,e.EditVideoResources=`edit_video_resources`,e.PreviewVideoResources=`preview_video_resources`,e.VideoUpload=`video_upload`,e.VideoRequest=`video_request`,e.Pagination=`pagination`,e.LibraryHeader=`library_header`,e.LibraryTiles=`library_tiles`,e.LibraryRequestDetails=`staff_request_details`,e.Libraries=`libraries`,e.SubFolderList=`sub_folder_list`,e.AwaitingReviewVideoListHeader=`awaiting_review_video_list_header`,e.AwaitingReviewVideoItem=`awaiting_review_video_item`,e.PastReleasesHeader=`past_releases_header`,e.MigrationWarnings=`migration_warnings`,e.PlaylistListHeader=`playlist_list_header`,e.PlaylistListItem=`playlist_list_item`,e.SeriesListItem=`series_list_item`,e.SeriesWithVideos=`series_with_videos`,e.PlaylistWithVideos=`playlist_with_videos`,e.Dropdown=`dropdown`,e.ViewCurriculumLinks=`view_curriculum_links`,e.SearchBar=`search_bar`,e.InstantSearch=`instant_search`,e.SearchFilters=`search_filters`,e.FeaturedSeriesSearchResult=`featured_series_search_result`,e.ExchangeSearchGroupItem=`exchange_search_group_item`,e.StaffManager=`staff_manager`,e.StaffManagerListItem=`staff_manager_list_item`,e.StudentManager=`student_manager`,e.ViewStudentVideos=`view_student_videos`,e.StudentManagerListItem=`student_manager_list_item`,e.EditUser=`edit_user`,e.UserAuditLog=`user_audit_log`,e.BulkUserActionsWizard=`bulk_user_actions_wizard`,e.BulkUserUploadWizard=`bulk_user_upload_wizard`,e.Classroom=`classroom`,e.ClassroomsList=`classrooms_list`,e.ClassroomsListItem=`classrooms_list_item`,e.ManageClassroomStudents=`manage_classroom_students`,e.ManageClassroomStudentListItem=`manage_classroom_student_list_item`,e.ManageClassroomGroups=`manage_classroom_groups`,e.ManageClassroomGroupListItem=`manage_classroom_group_list_item`,e.ManageClassroomTeachers=`manage_classroom_teachers`,e.ManageClassroomTeacherListItem=`manage_classroom_teachers_list_item`,e.ArchivedClassrooms=`archived_classrooms`,e.PreviewInteractive=`preview_interactive`,e.PreviewSharedInteractive=`preview_shared_interactive`,e.PreviewInteractiveQuestions=`preview_interactive_questions`,e.EditInteractive=`edit_interactive`,e.EditInteractiveDetails=`edit_interactive_details`,e.PlaySharedInteractive=`play_shared_interactive`,e.PlayInteractive=`play_interactive`,e.InteractiveListItem=`interactive_list_item`,e.DeleteInteractive=`delete_interactive`,e.NewInteractive=`new_interactive`,e.CopyInteractive=`copy_interactive`,e.UnpublishInteractive=`unpublish_interactive`,e.ShareInteractive=`share_interactive`,e.PlayPage=`play_page`,e.Player=`player`,e.FloatingPlayer=`floating_player`,e.InteractivePlayer=`interactive_player`,e.EmbeddedPlayer=`embedded_player`,e.CreateClipPlayer=`create_clip_player`,e.PlayClip=`play_clip`,e.PlaySharedClip=`play_shared_clip`,e.ClipListItem=`clip_list_item`,e.ContentUpdatesBanner=`content_updates_banner`,e.ContentUpdatesClassificationBanner=`content_updates_classification_banner`,e.PreferencesSettings=`preferences_settings`,e.NotificationSettings=`notification_settings`,e.TopicsOnboarding=`topics_onboarding`,e.MyUploads=`my_uploads`,e.MyVideos=`my_videos`,e.Playlists=`playlists`,e.SlidingList=`sliding_list`,e.HeroBannerItem=`hero_banner_item`,e.SlidingListItem=`sliding_list_item`,e.ClassificationListItem=`classification_list_item`,e.ClassificationComingSoon=`classification_coming_soon`,e.ClassificationHero=`classification_hero`,e.ClassificationFooter=`classification_footer`,e.Classification=`classification`,e.PresentationClassifications=`presentation_classifications`,e.Dashboard=`dashboard`,e.TeachingLevelBanner=`teaching_level_banner`,e.UpsellBanner=`upsell_banner`,e.FreemiumBanner=`freemium_banner`,e.DiscoverFooter=`discover_footer`,e.ProductBanner=`product_banner`,e.UserOptions=`user_options`,e.MagicTabs=`magic_tabs`,e.Settings=`settings`,e.StudentFeed=`student_feed`,e.MyShares=`my_shares`,e.SharedByMe=`shared_by_me`,e.SharedWithMe=`shared_with_me`,e.Insights=`insights`,e.Error=`error_view`,e.UpgradeForm=`upgrade_form`,e.ClassroomGuide=`classroom_guide`,e.TeachingResources=`teaching_resources`,e.ResourcesGuidancePopup=`resources_guidance_popup`,e.InteractivesGuidancePopup=`interactives_guidance_popup`,e.CurriculumGuidancePopup=`curriculum_guidance_popup`,e.TopVideos=`top_videos`,e.VideoViewsList=`video_views_list`,e.VideoOverview=`video_overview`,e.StudentReachPopup=`student_reach_popup`,e.VideoHighlight=`video_highlight`,e.ClassroomViewsPopup=`classroom_views_popup`,e.GiveFeedbackPopup=`give_feedback_popup`,e.LibraryRequestSettings=`library_request_settings`,e.LibraryRequestAutoApprovalSettings=`auto_approval_settings`,e.OpenInAppPrompt=`open_in_app_prompt`,e.UseAppButton=`use_app_button`,e.Launchpad=`launchpad`,e.EditableSubjectPreferencesWidget=`editable_subject_preferences_widget`,e.ThumbnailHeroMediaWidget=`thumbnail_hero_media_widget`,e.ThumbnailFixedListMediaLargeWidget=`thumbnail_fixed_list_media_large`,e.FilterSlidingPillListSmallWidget=`filter_sliding_pill_list_small`,e.CircleLogoSlidingListWidget=`circle_logo_sliding_list_widget`,e.RectangularLogoSlidingListWidget=`rectangular_logo_sliding_list_widget`,e.HeroBannerSmallWidget=`hero_banner_small`,e.EventIconSlidingListWidget=`event_icon_sliding_list_widget`,e.FaqQuestionWidget=`faq_question_widget`,e.FaqQuestionAccordionWidget=`faq_question_accordion_widget`,e.SubjectStatsWidgetItem=`subject_stats_widget_item`,e.AuthorReviewerWidget=`author_reviewer_widget`,e.ThumbnailFixedListMediaSmallWidget=`thumbnail_fixed_list_media_small_widget`,e.ThumbnailFixedListFolderSmallWidget=`thumbnail_fixed_list_folder_small_widget`,e.ThumbnailVerticalListWidget=`thumbnail_vertical_list_widget`,e.ThumbnailFixedListSmallWidget=`thumbnail_fixed_list_small_widget`,e.PosterFixedListLargeWidget=`poster_fixed_list_large_widget`,e.CurriculumResourcesAccordionWidget=`curriculum_resources_accordion_widget`,e.SearchCurriculumCodeWidget=`search_curriculum_code_widget`,e.ExchangeLinksWidget=`exchange_links_widget`,e.TableOfContents=`table_of_contents`,e.SignUpPopup=`sign_up_popup`,e.SignUpPage=`sign_up_page`,e.TrialBanner=`trial_banner`,e.InviteColleaguePopup=`invite_colleague_popup`,e.AuthProspectSelect=`auth_prospect_select`,e.GatedBanner=`gated_banner`,e.GatedEmptyState=`gated_empty_state`,e.GatedPopup=`gated_popup`,e.WelcomePopup=`welcome_popup`,e.WatchHistoryLanding=`watch_history_landing`,e.MyFavouritesLanding=`my_favourites_landing`,e.MyVideoLanding=`my_videos_landing`,e.PlaylistsLanding=`playlists_landing`,e.MySharesLanding=`myshares_landing`,e.PremiumFeatures=`premium_features`,e.NotificationsDropdown=`notifications_dropdown`,e.CalendarNav=`calendar_nav`,e.CalendarDay=`calendar_day`,e.CalendarPopup=`calendar_popup`,e.RegionMap=`region_map`,e.OnboardingSelectRoleScreen=`onboarding_select_role_screen`,e.OnboardingSchoolLevelScreen=`onboarding_school_level_screen`,e.OnboardingAudiencePreferencesScreen=`onboarding_audience_preferences_screen`,e.OnboardingSelectCurriculumScreen=`onboarding_select_curriculum_screen`,e.OnboardingSubjectsScreen=`onboarding_subjects_screen`,e.ProductTips=`product_tips`,e.LivestreamBookingForm=`booking_form`,e.DateRangeFilter=`date_range_selector`,e.AudienceFilter=`audience_filter`,e.AssignFlowView=`assign_flow_view`,e.ContentPartnerDashboard=`content_partner_dashboard`,e.ContentPartnerDashboardVideoBanner=`content_partner_dashboard_video_banner`,e.UpsellRequestForm=`upsell_request_form`,e.UpsellProductInfo=`upsell_product_info`,e.Global=`global`,e}({}),UO=function(e){return e.Start=`start`,e.Complete=`complete`,e.Save=`save`,e.Discard=`discard`,e.Next=`next`,e.Back=`back`,e}({}),WO=function(e){return e.SignIn=`sign_in`,e.SignUp=`sign_up`,e.SignOut=`sign_out`,e.SwitchAccount=`switch_account`,e.TopNavButton=`top_nav_button`,e.Educator=`educator`,e.Student=`student`,e.TermsAndConditions=`terms_and_conditions`,e.PrivacyPolicy=`privacy_policy`,e.EnterEmail=`enter_email`,e.ClosePopup=`close_popup`,e.Back=`back`,e.UseMyLocation=`use_my_location`,e.TrialCreated=`trial_created`,e.TrialRequested=`trial_requested`,e.DeadEnd=`dead_end`,e.CantFindSchool=`cant_find_school`,e.ResendEmail=`resend_email`,e.ContactUs=`contact_us`,e.InviteColleague=`invite_colleague`,e.PremiumFeatures=`premium_features`,e.Upgrade=`upgrade`,e.FindSchool=`find_school`,e.AddToBraze=`add_to_braze`,e.RequestAccess=`request_access`,e.AutoJoin=`auto_join`,e.WrongEmail=`wrong_email`,e.RequestBdmTrial=`request_bdm_trial`,e.SkipIdpSelect=`skip_idp_select`,e}({}),GO=function(e){return e[e.V1=1]=`V1`,e[e.V2=2]=`V2`,e[e.V3=3]=`V3`,e[e.V4=4]=`V4`,e[e.V5=5]=`V5`,e}({}),KO={first(e){return zg(e)},firstFew(e,t){return zg(e,t)},last(e){return Vg(e)},lastFew(e,t){return Vg(e,t)},max(e,t){return Sg(e,t)},cloneAndReplaceAtIdx(e,t,n,r=null){let i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[...i,...Array(t+1-i.length).fill(r)]),i.splice(t,1,n),i},moveItem(e,t,n){let r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},isEmpty(e){return e&&!e.length},findIndex(e,t){return tg(e,t)},findWhere(e,t){return cg(e,t)},where(e,t){return xg(e,t)},groupBy(e,t){return Ag(e,t)},countBy(e,t){return Mg(e,t)},flatten(e,t){return Ug(e,t)},flatMap(e,t){return Ug(e.map(t),!0)},intersection(...e){return Jg(...e)},addOrRemove(e,t){let n=e.indexOf(t);return n===-1?e.push(t):e.splice(n,1),e},addOrRemoveImmutable(e,t){let n=e.indexOf(t),r=gE.deepClone(e);return n===-1?[...r,t]:[...r.slice(0,n),...r.slice(n+1)]},sortBy(e,t){return Og(e,t)},chunk(e,t){return $g(e,t)},uniq(e,t){return Kg(e,t)},toObject(e,t){return e.reduce((e,n)=>Object.assign(e,gE.isObject(n)?{[n[t]]:n}:{[t]:n}),{})},findIndexById(e,t){return e.findIndex(e=>e.id===t.id)},removeItem(e,t){let n=this.findIndex(e,t);return n===-1?e:this.removeItemFromIndex(e,n)},removeItemFromIndex(e,t){return[...e.slice(0,t),...e.slice(t+1)]},findMatchedIdIndex(e,t){return e.findIndex(e=>e.id?.toString()===t.toString())},shuffle(e){return Dg(e)},findLast(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]},findLastIndex(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}},qO=`OTHER`;function JO(e,t){return t.includes(e)?e:e?qO:``}function YO(e){let{error:t,onChange:n,countryCode:r,isTertiary:i}=e,a=ZC({countryCode:r,isTertiary:i}),o=JO(e.initialValue,a),[s,c]=Z.useState(o),[l,u]=Z.useState(o===qO?e.initialValue:``);Z.useEffect(()=>{c(JO(e.initialValue,a))},[e.initialValue]);function d(e){c(e.target.value),u(``),n(e.target.value===qO?``:e.target.value)}function f(e){u(e.target.value),n(e.target.value)}let p=s===qO;return(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsxs)(`label`,{htmlFor:e.id,className:e.labelClassName,children:[`Job title`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsxs)(`div`,{className:`mb-2`,children:[(0,Q.jsxs)(`select`,{id:e.id,name:e.id,className:`form-select ${e.size===`lg`?`form-select-lg`:``} ${s.length?`text-dark`:`text-secondary`} ${!!t&&`is-invalid`}`,value:s,placeholder:`Role`,onChange:d,children:[(0,Q.jsx)(`option`,{value:``,disabled:!0,className:`text-secondary`,children:e.placeholder?e.placeholder:(0,Q.jsx)(Q.Fragment,{children:`What do you do?`})}),a.map((e,t)=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},t)),(0,Q.jsx)(`option`,{value:qO,className:`text-dark`,children:`Other`})]}),!!t&&!p&&(0,Q.jsx)(Cf,{name:e.id,children:t})]}),p&&(0,Q.jsxs)(`div`,{className:`mb-3`,children:[(0,Q.jsx)(`input`,{className:`form-control ${e.size===`lg`?`form-select-lg`:``} ${!!t&&`is-invalid`}`,type:`text`,value:l,placeholder:`What do you do?`,autoFocus:!0,onChange:f}),!!t&&(0,Q.jsx)(Cf,{name:e.id,children:t})]})]})}var XO=function(e){return e.AU=`cv-ap-southeast-1`,e.NZ=`cv-ap-southeast-2`,e.UK=`cv-eu-west-1`,e.US=`cv-na-west-1`,e}({}),ZO=[`uk`,`gb`,`gg`,`im`,`je`,`ie`],QO={au:$.AU,nz:$.NZ,us:$.US,uk:$.UK,ca:$.CA,gb:$.UK,gg:$.UK,im:$.UK,je:$.UK,ie:$.UK,al:$.UK,ad:$.UK,am:$.UK,at:$.UK,az:$.UK,by:$.UK,be:$.UK,ba:$.UK,bg:$.UK,hr:$.UK,cy:$.UK,cz:$.UK,dk:$.UK,ee:$.UK,fi:$.UK,fr:$.UK,de:$.UK,ge:$.UK,gr:$.UK,hu:$.UK,is:$.UK,it:$.UK,lv:$.UK,li:$.UK,lt:$.UK,lu:$.UK,mt:$.UK,md:$.UK,mc:$.UK,me:$.UK,nl:$.UK,mk:$.UK,no:$.UK,pl:$.UK,pt:$.UK,ro:$.UK,ru:$.UK,sm:$.UK,rs:$.UK,sk:$.UK,si:$.UK,es:$.UK,se:$.UK,ch:$.UK,tr:$.UK,ua:$.UK,va:$.UK},$O={au:KD.CvApSoutheast1,uk:KD.CvEuWest1,us:KD.CvNaWest1,nz:KD.CvApSoutheast2,ca:KD.CvNaWest1},ek={au:XO.AU,uk:XO.UK,us:XO.US,nz:XO.NZ,ca:XO.US},tk={getRegionName(e){return $O[tk.getCountryCode(e)]},getInstanceRegion(e){return ek[tk.getCountryCode(e)]},getCountryCode(e){return QO[e?.toLowerCase()]||$.US},isCountryCodeUK(e){return ZO.includes(e.toLowerCase())},isCountryCodeAU(e){return e?.toLowerCase()===$.AU},isCountryCodeUS(e){return e?.toLowerCase()===$.US},isCountryCodeNZ(e){return e?.toLowerCase()===$.NZ},isSupportedCountryCode(e){return Object.keys(QO).includes(e?.toLowerCase())},getLocalizedLocalityPlaceholderPhrase(e){if(e){if(tk.isCountryCodeUK(e))return`E.g. CR0 3RL or 36 Factory Lane`;if(tk.isCountryCodeAU(e)||tk.isCountryCodeNZ(e))return`E.g. 2212 or Revesby`;if(tk.isCountryCodeUS(e))return`E.g. 95826 or Sacramento`}},getLocalizedLocalityPlaceholderText(e){if(!e)return;let t=tk.getLocalizedLocalityPlaceholderPhrase(e);if(t)return t}};function nk(e){if(!e)return{firstName:``,surname:``};let[t,...n]=e.split(` `).filter(e=>e.length);return{firstName:t,surname:n?.join(` `)}}function rk(e){let{showSpinner:t,children:n,style:r,spinnerText:i,...a}=e,o=Z.useRef(null),[{width:s,height:c},l]=Z.useState({}),[u,d]=Z.useState(t);Z.useEffect(()=>{if(!t){l({});return}let e=o.current,n=e.offsetHeight,r=e.offsetWidth;!n||!r||l({width:r,height:n})},[t]),Z.useLayoutEffect(()=>{d(t)},[t]);let f={...r};return s&&(f.width=`${s+1}px`),c&&(f.height=`${c+1}px`),(0,Q.jsx)(Ev,{ref:o,disabled:t,style:f,...a,children:u?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Ox,{as:`span`,animation:`border`,role:`status`,size:`sm`}),!!i&&(0,Q.jsx)(`span`,{className:`ps-1`,children:i})]}):n})}var ik=/\$+[\w\s]?/,ak=/^\+?\d{4,255}$/,ok=255;function sk(e){let[t,n]=Z.useState({fullname:``,jobTitle:``,phone:``});function r(n){n?.preventDefault(),d(t)&&e.handleSubmitForm(t)}function i(e){e.preventDefault(),l(`fullname`,e.target.value),u(`fullname`),u(`submission`)}function a(e){e.preventDefault(),l(`phone`,e.target.value.trim()),u(`phone`),u(`submission`)}function o(e){l(`jobTitle`,e),u(`jobTitle`),u(`submission`)}function s(){l(`fullname`,``),u(`fullname`),u(`submission`)}function c(){l(`phone`,``),u(`phone`),u(`submission`)}function l(e,t){n(n=>({...n,[e]:t}))}function u(t){if(!Object.keys(e.errors).length||!e.errors[t])return;let n={...e.errors};delete n[t],e.setErrors(n)}function d(t){let{fullname:n,jobTitle:r,phone:i}=t,{firstName:a,surname:o}=nk(n),s={};return(!a||!o)&&(s.fullname=`Please enter your full name.`),(ik.test(a)||ik.test(o))&&(s.fullname=`Please enter your full name.`),n.length>ok&&(s.fullname=`Full name cannot exceed max length of ${ok} characters.`),r?.length||(s.jobTitle=`Please enter your job title.`),ik.test(r)&&(s.jobTitle=`Please enter a valid job title.`),r.length>ok&&(s.jobTitle=`Job title cannot exceed max length of ${ok} characters.`),i?.length||(s.phone=`Please enter your phone number.`),(ik.test(i)||!ak.test(i))&&(s.phone=`Please enter a valid phone number.`),e.setErrors(s),!Object.keys(s).length}function f(){let{fullname:n,jobTitle:r,phone:i}=t;return!(!n.length||!r.length||!i.length||Object.keys(e.errors).length)}return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`A little more about you`}),(0,Q.jsx)(`p`,{children:`Please enter your details.`}),(0,Q.jsxs)(`form`,{onSubmit:r,"aria-errormessage":`brazeFormError`,children:[(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`fullname-input`,children:`Full name`}),(0,Q.jsx)(Ff,{value:t.fullname,onChange:i,name:`fullname-input`,id:`fullname-input`,type:`text`,className:`form-control form-control-lg ${e.errors.fullname?.length?`is-invalid`:``}`,placeholder:`Enter your name`,onClickClear:s,autoFocus:!0,"aria-errormessage":`fullname-inputError`}),e.errors.fullname&&(0,Q.jsx)(Cf,{name:`fullname-input`,children:e.errors.fullname})]}),(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`phone-input`,children:`Contact number`}),(0,Q.jsx)(Ff,{value:t.phone,onChange:a,name:`phone-input`,id:`phone-input`,type:`tel`,className:`form-control form-control-lg ${e.errors.phone?.length?`is-invalid`:``}`,placeholder:`Enter your phone number`,onClickClear:c,"aria-errormessage":`phone-inputError`}),e.errors.phone&&(0,Q.jsx)(Cf,{name:`phone-input`,children:e.errors.phone})]}),(0,Q.jsxs)(`div`,{className:`form-group text-start`,children:[(0,Q.jsx)(`label`,{className:`d-block fw-bold mb-1`,htmlFor:`jobTitle-select`,children:`Job title`}),(0,Q.jsx)(YO,{id:`jobTitle-select`,countryCode:tk.getCountryCode(e.country),onChange:o,error:e.errors?.jobTitle,size:`lg`,labelClassName:`d-none`,isTertiary:e.isTertiary})]}),!!e.errors?.submission&&(0,Q.jsx)(Cf,{name:`brazeForm`,className:`form-group`,children:e.errors.submission}),(0,Q.jsx)(`div`,{className:`form-group mb-1`,children:(0,Q.jsx)(rk,{className:`btn-lg w-100`,variant:`dark`,onClick:()=>r(),showSpinner:e.loading,disabled:e.loading||!f(),children:`Submit`})})]})]})}var ck=function(e){return e.Unavailable=`unavailable`,e.Expired=`expired`,e.Active=`active`,e.NotRequired=`not-required`,e.Available=`available`,e.Unsupported=`unsupported`,e.UserAutoJoinAllowed=`user-auto-join-allowed`,e.UserJoinApprovalRequired=`user-join-approval-required`,e.InvalidEmail=`invalid-email`,e.BdmTrialAvailable=`bdm-trial-available`,e}({}),lk=function(e){return e.Staff=`staff`,e.Learner=`learner`,e}({}),uk=l(o(((e,t)=>{(function(n){if(typeof e==`object`)t.exports=n();else if(typeof define==`function`&&define.amd)define(n);else{var r;try{r=window}catch{r=self}r.SparkMD5=n()}})(function(e){var t=[`0`,`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`a`,`b`,`c`,`d`,`e`,`f`];function n(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n+=(r&i|~r&a)+t[0]-680876936|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[1]-389564586|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[2]+606105819|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[3]-1044525330|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[4]-176418897|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[5]+1200080426|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[6]-1473231341|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[7]-45705983|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[8]+1770035416|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[9]-1958414417|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[10]-42063|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[11]-1990404162|0,r=(r<<22|r>>>10)+i|0,n+=(r&i|~r&a)+t[12]+1804603682|0,n=(n<<7|n>>>25)+r|0,a+=(n&r|~n&i)+t[13]-40341101|0,a=(a<<12|a>>>20)+n|0,i+=(a&n|~a&r)+t[14]-1502002290|0,i=(i<<17|i>>>15)+a|0,r+=(i&a|~i&n)+t[15]+1236535329|0,r=(r<<22|r>>>10)+i|0,n+=(r&a|i&~a)+t[1]-165796510|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[6]-1069501632|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[11]+643717713|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[0]-373897302|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[5]-701558691|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[10]+38016083|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[15]-660478335|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[4]-405537848|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[9]+568446438|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[14]-1019803690|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[3]-187363961|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[8]+1163531501|0,r=(r<<20|r>>>12)+i|0,n+=(r&a|i&~a)+t[13]-1444681467|0,n=(n<<5|n>>>27)+r|0,a+=(n&i|r&~i)+t[2]-51403784|0,a=(a<<9|a>>>23)+n|0,i+=(a&r|n&~r)+t[7]+1735328473|0,i=(i<<14|i>>>18)+a|0,r+=(i&n|a&~n)+t[12]-1926607734|0,r=(r<<20|r>>>12)+i|0,n+=(r^i^a)+t[5]-378558|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[8]-2022574463|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[11]+1839030562|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[14]-35309556|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[1]-1530992060|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[4]+1272893353|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[7]-155497632|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[10]-1094730640|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[13]+681279174|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[0]-358537222|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[3]-722521979|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[6]+76029189|0,r=(r<<23|r>>>9)+i|0,n+=(r^i^a)+t[9]-640364487|0,n=(n<<4|n>>>28)+r|0,a+=(n^r^i)+t[12]-421815835|0,a=(a<<11|a>>>21)+n|0,i+=(a^n^r)+t[15]+530742520|0,i=(i<<16|i>>>16)+a|0,r+=(i^a^n)+t[2]-995338651|0,r=(r<<23|r>>>9)+i|0,n+=(i^(r|~a))+t[0]-198630844|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[7]+1126891415|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[14]-1416354905|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[5]-57434055|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[12]+1700485571|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[3]-1894986606|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[10]-1051523|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[1]-2054922799|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[8]+1873313359|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[15]-30611744|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[6]-1560198380|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[13]+1309151649|0,r=(r<<21|r>>>11)+i|0,n+=(i^(r|~a))+t[4]-145523070|0,n=(n<<6|n>>>26)+r|0,a+=(r^(n|~i))+t[11]-1120210379|0,a=(a<<10|a>>>22)+n|0,i+=(n^(a|~r))+t[2]+718787259|0,i=(i<<15|i>>>17)+a|0,r+=(a^(i|~n))+t[9]-343485551|0,r=(r<<21|r>>>11)+i|0,e[0]=n+e[0]|0,e[1]=r+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function r(e){var t=[],n;for(n=0;n<64;n+=4)t[n>>2]=e.charCodeAt(n)+(e.charCodeAt(n+1)<<8)+(e.charCodeAt(n+2)<<16)+(e.charCodeAt(n+3)<<24);return t}function i(e){var t=[],n;for(n=0;n<64;n+=4)t[n>>2]=e[n]+(e[n+1]<<8)+(e[n+2]<<16)+(e[n+3]<<24);return t}function a(e){var t=e.length,i=[1732584193,-271733879,-1732584194,271733878],a,o,s,c,l,u;for(a=64;a<=t;a+=64)n(i,r(e.substring(a-64,a)));for(e=e.substring(a-64),o=e.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<o;a+=1)s[a>>2]|=e.charCodeAt(a)<<(a%4<<3);if(s[a>>2]|=128<<(a%4<<3),a>55)for(n(i,s),a=0;a<16;a+=1)s[a]=0;return c=t*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(c[2],16),u=parseInt(c[1],16)||0,s[14]=l,s[15]=u,n(i,s),i}function o(e){var t=e.length,r=[1732584193,-271733879,-1732584194,271733878],a,o,s,c,l,u;for(a=64;a<=t;a+=64)n(r,i(e.subarray(a-64,a)));for(e=a-64<t?e.subarray(a-64):new Uint8Array,o=e.length,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a=0;a<o;a+=1)s[a>>2]|=e[a]<<(a%4<<3);if(s[a>>2]|=128<<(a%4<<3),a>55)for(n(r,s),a=0;a<16;a+=1)s[a]=0;return c=t*8,c=c.toString(16).match(/(.*?)(.{0,8})$/),l=parseInt(c[2],16),u=parseInt(c[1],16)||0,s[14]=l,s[15]=u,n(r,s),r}function s(e){var n=``,r;for(r=0;r<4;r+=1)n+=t[e>>r*8+4&15]+t[e>>r*8&15];return n}function c(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join(``)}c(a(`hello`)),typeof ArrayBuffer<`u`&&!ArrayBuffer.prototype.slice&&(function(){function t(e,t){return e=e|0||0,e<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,r){var i=this.byteLength,a=t(n,i),o=i,s,c,l,u;return r!==e&&(o=t(r,i)),a>o?new ArrayBuffer(0):(s=o-a,c=new ArrayBuffer(s),l=new Uint8Array(c),u=new Uint8Array(this,a,s),l.set(u),c)}})();function l(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function u(e,t){var n=e.length,r=new ArrayBuffer(n),i=new Uint8Array(r),a;for(a=0;a<n;a+=1)i[a]=e.charCodeAt(a);return t?i:r}function d(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function f(e,t,n){var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e)),r.set(new Uint8Array(t),e.byteLength),n?r:r.buffer}function p(e){var t=[],n=e.length,r;for(r=0;r<n-1;r+=2)t.push(parseInt(e.substr(r,2),16));return String.fromCharCode.apply(String,t)}function m(){this.reset()}return m.prototype.append=function(e){return this.appendBinary(l(e)),this},m.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t=this._buff.length,i;for(i=64;i<=t;i+=64)n(this._hash,r(this._buff.substring(i-64,i)));return this._buff=this._buff.substring(i-64),this},m.prototype.end=function(e){var t=this._buff,n=t.length,r,i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],a;for(r=0;r<n;r+=1)i[r>>2]|=t.charCodeAt(r)<<(r%4<<3);return this._finish(i,n),a=c(this._hash),e&&(a=p(a)),this.reset(),a},m.prototype.reset=function(){return this._buff=``,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},m.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},m.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},m.prototype._finish=function(e,t){var r=t,i,a,o;if(e[r>>2]|=128<<(r%4<<3),r>55)for(n(this._hash,e),r=0;r<16;r+=1)e[r]=0;i=this._length*8,i=i.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(i[2],16),o=parseInt(i[1],16)||0,e[14]=a,e[15]=o,n(this._hash,e)},m.hash=function(e,t){return m.hashBinary(l(e),t)},m.hashBinary=function(e,t){var n=c(a(e));return t?p(n):n},m.ArrayBuffer=function(){this.reset()},m.ArrayBuffer.prototype.append=function(e){var t=f(this._buff.buffer,e,!0),r=t.length,a;for(this._length+=e.byteLength,a=64;a<=r;a+=64)n(this._hash,i(t.subarray(a-64,a)));return this._buff=a-64<r?new Uint8Array(t.buffer.slice(a-64)):new Uint8Array,this},m.ArrayBuffer.prototype.end=function(e){var t=this._buff,n=t.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,a;for(i=0;i<n;i+=1)r[i>>2]|=t[i]<<(i%4<<3);return this._finish(r,n),a=c(this._hash),e&&(a=p(a)),this.reset(),a},m.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array,this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},m.ArrayBuffer.prototype.getState=function(){var e=m.prototype.getState.call(this);return e.buff=d(e.buff),e},m.ArrayBuffer.prototype.setState=function(e){return e.buff=u(e.buff,!0),m.prototype.setState.call(this,e)},m.ArrayBuffer.prototype.destroy=m.prototype.destroy,m.ArrayBuffer.prototype._finish=m.prototype._finish,m.ArrayBuffer.hash=function(e,t){var n=c(o(new Uint8Array(e)));return t?p(n):n},m})}))()),dk={secondary:{label:`Secondary`,isTertiary:!1},"primary & secondary":{label:`Primary & Secondary`,isTertiary:!1},k12:{label:`Primary & Secondary`,isTertiary:!1},primary:{label:`Primary`,isTertiary:!1},special:{label:`Special`,isTertiary:!1},university:{label:`University`,isTertiary:!0},middle:{label:`Middle`,isTertiary:!1},"fe college":{label:`FE College`,isTertiary:!0},"high school":{label:`Secondary`,isTertiary:!1},elementary:{label:`Primary`,isTertiary:!1},"middle school":{label:`Middle`,isTertiary:!1},tafe:{label:`TAFE`,isTertiary:!0},college:{label:`FE College`,isTertiary:!0},"sixth form college":{label:`Sixth Form College`,isTertiary:!0}},fk={england:`ENG`,scotland:`SCT`,wales:`WLS`,"northern ireland":`NIR`},pk={hashedEmail(e){let t=e.trim().toLowerCase();return uk.default.hash(t)},removeEmptyKeys(e){if(Array.isArray(e))return e;let t={...e};return Object.entries(t).filter(([,e])=>!(e==null||typeof e==`string`&&!e.length)).reduce((e,[t,n])=>({...e,[t]:n===Object(n)?pk.removeEmptyKeys(n):n}),{})},Conversions:{TRIAL_UPGRADE_REQUEST:`Request - Trial Upgrade`,FREE_TRIAL_REQUEST:`Request - Free Trial`,START_FREE_TRIAL:`Start - Free Trial`,RequestPilot:`Request - Pilot`},Sources:{CV_PRODUCT_TRIAL_REQUESTED:`cv_product_trial_requested`,CV_PRODUCT_FORM_SUBMISSION:`cv_product_form_submission`,CV_PRODUCT_BDM_TRIAL_REQUESTED:`cv_product_bdm_trial_requested`,CV_PRODUCT_TRIAL_UPGRADE_REQUESTED:`cv_product_trial_upgrade_requested`,CV_LIVE_PILOT_REQUESTED:`cl_product_pilot_requested`,CV_PILOT_REQUESTED:`cv_product_pilot_requested`},getSchoolType(e){if(!e)return;let t=e.toLowerCase();return[`unknown`,`other`].includes(t)?void 0:dk[t]?.label||e},isTertiarySchool(e){return dk[e?.toLowerCase()]?.isTertiary||!1},parseProvince(e){return e.length?fk[e.toLowerCase()]||e:``},getConversionName(e,t){return t?.length?`${e} - ${t}`:e}};function mk(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({});Z.useEffect(()=>{e.userType===lk.Learner&&e.complete({completionStep:`trial-status`,trialCreated:!1,trialStatus:ck.Unsupported})},[]);function a(e){if(QC(e.jobTitle)){c();return}o(e)}async function o(a){if(t)return;if(e.userType===lk.Learner){i({...r,submission:`Something went wrong! Please try again later.`});return}e.logUserAction({},{actionType:BO.Click,workflowPhase:UO.Next,descriptor:WO.AddToBraze}),n(!0);let{firstName:o,surname:l}=nk(a.fullname),u=await e.getCrmIdForProspect(e.prospectId);try{let t={email:e.email,firstName:o,lastName:l,phone:a.phone,custom:{crmId:u,orgSubType:pk.getSchoolType(e?.schoolType),accountName:e?.schoolName,jobTitle:a.jobTitle,accountAddress:{countryCode:e?.country,province:pk.parseProvince(e?.province||``)},syncToCrm:!0,source:pk.Sources.CV_PRODUCT_TRIAL_REQUESTED},event:{accountCountry:e?.country,accountPostCode:e?.schoolPostCode,conversion:pk.getConversionName(pk.Conversions.FREE_TRIAL_REQUEST,e.entryPage?.metadata?.conversionSuffix)}},n={prospect_id:e?.prospectId};e.logBrazeEvent({user:t,event:{eventType:ED.ProductFormEvent.ProductTrailRequested,additionalData:n,callback:s}})}catch{i({...r,submission:`Something went wrong! Please try again later.`})}Object.keys(r).length||c()}function s(e){i(e?{}:{...r,submission:`Something went wrong! Please try again later.`}),n(!1)}function c(){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null})}return(0,Q.jsx)(sk,{loading:t,errors:r,setErrors:i,country:e.country||e.geoLocation?.countryCode,logUserAction:e.logUserAction,handleSubmitForm:a,isTertiary:pk.isTertiarySchool(e.schoolType)})}var hk=e=>`The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`,gk=e=>`The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`,_k=(e,t)=>`Failed to create Trusted Types policy "${e}": ${t instanceof Error?t.message:String(t)}.\n\nIf your Content Security Policy uses "require-trusted-types-for 'script'", allow this policy with "trusted-types ${e} google-maps-api-loader google-maps-api#html lit-html". The "google-maps-api-loader", "lit-html", and "google-maps-api#html" policies are required for full Maps JavaScript API execution. Falling back to a string script URL.`,vk=`@googlemaps/js-api-loader`,yk={createScriptURL:e=>e},bk;function xk(){if(bk)return bk;let e=globalThis.trustedTypes;if(!e)return bk=yk,bk;try{bk=e.createPolicy(vk,{createScriptURL:e=>e})}catch(e){_k(vk,e),bk=yk}return bk}function Sk(e,t){e.src=xk().createScriptURL(t)}var Ck=e=>{var t,n,r,i=`The Google Maps JavaScript API`,a=`google`,o=`importLibrary`,s=document,c=window,l=c[a]||(c[a]={}),u=l.maps||={},d=new Set,f=new URLSearchParams,p=()=>t||=new Promise(async(o,c)=>{for(r in await(n=s.createElement(`script`)),f.set(`libraries`,[...d]+``),e)f.set(r.replace(/[A-Z]/g,e=>`_`+e[0].toLowerCase()),e[r]);f.set(`callback`,a+`.maps.__ib__`),Sk(n,`https://maps.googleapis.com/maps/api/js?`+f),u.__ib__=o,n.onerror=()=>t=c(Error(i+` could not load.`)),n.nonce=s.querySelector(`script[nonce]`)?.nonce||``,s.head.append(n)});u[o]?console.warn(i+` only loads once. Ignoring:`,e):u[o]=(e,...t)=>d.add(e)&&p().then(()=>u[o](e,...t))},wk=!1;function Tk(e){if(wk){hk(e);return}e.apiKey&&(e.key||=e.apiKey),Dk(e),wk=!0}async function Ek(e){if(!window?.google?.maps?.importLibrary)throw Error(`google.maps.importLibrary is not installed.`);return await google.maps.importLibrary(e)}function Dk(e){let t=!!window.google?.maps?.importLibrary;t&&gk(e),t||Ck(e)}var Ok=!1;function kk(e){Ok||=(Tk({key:e,v:`weekly`}),!0)}function Ak(e){let t=e.libraries||[`places`],[n,r]=Z.useState(!1);Z.useEffect(()=>{let e=!1;return i().then(()=>!e&&r(!0)).catch(()=>!e&&r(!1)),()=>{e=!0}},[]);function i(){return kk(e.apiKey),Promise.all(t.map(e=>Ek(e)))}function a(e,t){i().then(()=>{r(!0),e&&e()}).catch(e=>{r(!1),t&&t(e)})}return{scriptLoaded:n,onGoogleApiReady:a}}function jk(e){let{scriptLoaded:t}=Ak({apiKey:e.googleApiKey,libraries:[`places`]});return t}var Mk=`us`,Nk=`country:placeholder:text`;function Pk(e){let t=tk.getLocalizedLocalityPlaceholderText(e?.countryCode);if(t)return t;let n=qd.cacheGet(`${Nk}:${e?.countryCode}`);if(n)return n}function Fk(){return String.fromCharCode(96+kx.getRandomInt(26))}function Ik({apiKey:e,geoLocation:t,makeRequest:n=!0,template:r=`E.g. [placeholder]`,templateKey:i=`[placeholder]`}){let a=jk({googleApiKey:e}),[o,s]=Z.useState(()=>Pk(t));Z.useEffect(()=>{if(o||!a||!n)return;let e=t?.countryCode||Mk;l(Fk(),e)},[o,a,t,n]);function c(e,t){qd.cacheSet(`${Nk}:${t}`,e,86400),s(e)}async function l(e,t){try{let{suggestions:n}=await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:e,includedPrimaryTypes:[`(cities)`],includedRegionCodes:[t],region:t,sessionToken:new google.maps.places.AutocompleteSessionToken}),a=n[kx.getRandomInt(n.length)]?.placePrediction?.text.toString();if(!a){c(tk.getLocalizedLocalityPlaceholderText(Mk),t);return}c(r.replace(i,a),t)}catch{c(tk.getLocalizedLocalityPlaceholderText(Mk),t)}}return o}function Lk(e,t){let n,r,i,a;for(let e of t)for(let t of e.types)t===`locality`&&(n=e.value),t===`administrative_area_level_1`&&(r=e.value),t===`postal_code`&&(a=e.value),t===`country`&&(i=e.value);return{locality:e,country:i,postalCode:a,city:n,province:r}}var Rk={getPlaceDetails(e){return Lk(e.formatted_address,e.address_components.map(e=>({types:e.types,value:e.short_name})))},getPlaceDetailsFromPlace(e){return Lk(e.formattedAddress,(e.addressComponents||[]).map(e=>({types:e.types,value:e.shortText})))}},zk={1:`geocoderPermissionDenied`,2:`geocoderUnavailable`,3:`geocoderTimeout`};function Bk(e){let[t,n]=Z.useState({}),{onGoogleApiReady:r}=Ak({apiKey:e.apiKey,libraries:[`geocoding`,`core`]});function i(){r(()=>{window.navigator.geolocation.getCurrentPosition(a,o)})}function a(e){let{latitude:t,longitude:r}=e.coords,i=new google.maps.LatLng(t,r);new google.maps.Geocoder().geocode({location:i},(e,i)=>{if(i!==google.maps.GeocoderStatus.OK)return;let a=e.find(e=>e.types.includes(`locality`)||e.types.includes(`administrative_area_level_2`)),o=Rk.getPlaceDetails(a);n({...o,longitude:r,latitude:t})})}function o(t){let n=zk[t.code];n||=`geocoderUnknown`,e.onPositionError(`We are unable to access your location. Please try again later.`)}return{placeDetails:t,onClickGetCurrentLocation:i}}function Vk({search:e,makePredicition:t,geoLocation:n,apiKey:r}){let i=jk({googleApiKey:r}),a=lC(e,300),[o,s]=Z.useState(),c=Z.useRef();Z.useEffect(()=>{if(i){if(a?.length===0||!t){s(void 0);return}l(a)}},[a,t,i]);async function l(e){let t=n?.countryCode||`us`;c.current||=new google.maps.places.AutocompleteSessionToken;try{let{suggestions:r}=await google.maps.places.AutocompleteSuggestion.fetchAutocompleteSuggestions({input:e,includedRegionCodes:n?.isFallback?void 0:[t],region:t,includedPrimaryTypes:[`locality`,`sublocality`,`postal_code`],sessionToken:c.current});s(r.map(e=>e.placePrediction).filter(Boolean))}catch{s(void 0)}}async function u(e,t){try{let n=e.toPlace();await n.fetchFields({fields:[`addressComponents`,`formattedAddress`,`location`]});let r=n.location.lng(),i=n.location.lat(),{locality:a,country:o,postalCode:s,city:c,province:l}=Rk.getPlaceDetailsFromPlace(n);t({longitude:r,latitude:i,locality:a,country:o,city:c,postalCode:s,province:l})}catch{}finally{c.current=void 0}}return{localityPredicitions:o,getPlaceInfo:u}}function Hk(){return(0,Q.jsx)(`svg`,{viewBox:`0 0 24 24`,children:(0,Q.jsx)(`path`,{d:`m12.00559,20.40189c4.60881,0 8.37242,-3.78424 8.37242,-8.40189c0,-4.61764 -3.76361,-8.40187 -8.37242,-8.40187c-4.62002,0 -8.38365,3.78422 -8.38365,8.40187c0,4.61765 3.76364,8.40189 8.38365,8.40189zm0,-1.65557c-3.75235,0 -6.67085,-2.96208 -6.67085,-6.74632c0,-3.7842 2.91851,-6.74625 6.67085,-6.74625c3.74105,0 6.67084,2.96206 6.67084,6.74625c0,3.78424 -2.92978,6.74632 -6.67084,6.74632zm-10.14151,-6.02552l6.01731,0c0.40566,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208l-6.01731,0c-0.40566,0 -0.72117,0.31536 -0.72117,0.7208c0,0.40544 0.31551,0.7208 0.72118,0.7208l-0.00001,0zm14.25442,0l6.0174,0c0.40565,0 0.72118,-0.31536 0.72118,-0.7208c0,-0.40544 -0.31553,-0.7208 -0.72118,-0.7208l-6.0174,0c-0.40565,0 -0.72118,0.31536 -0.72118,0.7208c0,0.40544 0.31553,0.7208 0.72118,0.7208zm-4.12417,-4.1221c0.40566,0 0.72118,-0.31534 0.72118,-0.70952l0,-6.02547c0,-0.40544 -0.31552,-0.7208 -0.72118,-0.7208c-0.3944,0 -0.7099,0.31536 -0.7099,0.7208l0,6.02547c0,0.39418 0.31551,0.70952 0.7099,0.70952zm0,14.25838c0.40566,0 0.72118,-0.3154 0.72118,-0.72077l0,-6.02541c0,-0.39425 -0.31552,-0.70965 -0.72118,-0.70965c-0.3944,0 -0.7099,0.3154 -0.7099,0.70965l0,6.02541c0,0.40538 0.31551,0.72077 0.7099,0.72077z`})})}var Uk={baseText:`_baseText_bmazz_1`,dropdown:`_dropdown_bmazz_4`,suggestionContainer:`_suggestionContainer_bmazz_7`,suggestionContainerInner:`_suggestionContainerInner_bmazz_13`,suggestionItem:`_suggestionItem_bmazz_18`,suggestionLoading:`_suggestionLoading_bmazz_18`,noSuggestion:`_noSuggestion_bmazz_18`,large:`_large_bmazz_22`,selected:`_selected_bmazz_32`,useMyLocation:`_useMyLocation_bmazz_36`};function Wk(e){let{predictions:t,getPlaceInfo:n,selectedIndex:r}=e;return(0,Q.jsx)(Q.Fragment,{children:t.map((e,t)=>(0,Q.jsx)(Lf,{className:`${Uk.suggestionItem} ${r-1===t?Uk.selected:``}`,onKeyDown:t=>t.key===`Enter`&&n(e),onMouseDown:()=>n(e),onClick:()=>n(e),children:e.text.toString()},e.placeId))})}function Gk(e){let t=Z.useRef(null),[n,r]=Z.useState(e.data?.schoolLocality||``),[i,a]=Z.useState(!1),o=Ik({apiKey:e.googleMapsApiKey,geoLocation:e.geoLocation}),{localityPredicitions:s,getPlaceInfo:c}=Vk({search:n,makePredicition:i,geoLocation:e.geoLocation,apiKey:e.googleMapsApiKey}),{placeDetails:l,onClickGetCurrentLocation:u}=Bk({apiKey:e.googleMapsApiKey,onPositionError:b}),d=+!!window.navigator.geolocation,{selectedIndex:f,onKeyDown:p,containerRef:m,hide:h,onBlur:g,onFocus:_}=If({onSelected:C,itemCount:(s?.length??0)+d,hideOnBlur:e.hideOnBlur}),[v,y]=Z.useState();Z.useEffect(()=>{w(l)},[l]);function b(e){a(!0),y(e)}function x(t){v&&y(void 0),i||a(!0),(e.data?.longitude||e.data?.latitude||e.data?.schoolLocality)&&e.clearData(),r(t)}function S(){x(``),t.current.focus()}function C(e){if(!s)return;if(e===s.length){E();return}let t=s[e];t&&T(t)}function w(t){e.setData({schoolLocality:t.locality,country:t.country,province:t.province,schoolPostCode:t.postalCode,longitude:t.longitude,latitude:t.latitude}),t.locality&&r(t.locality)}function T(e){i&&a(!1),c(e,w)}function E(t){t?.preventDefault(),a(!1),u(),e.logUserAction?.({},{actionType:BO.Click,descriptor:WO.UseMyLocation})}function D(){let t=`form-control`;return e.size===`lg`&&(t+=` form-control-lg`),t}let O=s?.length&&!e.data?.schoolLocality?.length,k=window.navigator.geolocation&&!e.data?.schoolLocality?.length,A=e.labelClassName||`d-block text-center mb-3 fw-normal ${Uk.baseText}`,j=`form-group position-relative text-start`;return e.size===`lg`&&(j+=` ${Uk.large}`),(0,Q.jsxs)(`div`,{className:j,children:[(0,Q.jsxs)(`label`,{className:A,htmlFor:`locality-input`,children:[`ZIP code or city`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsx)(Ff,{type:`text`,value:n,onChange:e=>x(e.currentTarget.value),id:`locality-input`,className:D(),ref:t,autoComplete:`off`,placeholder:o||`Loading...`,disabled:e.disabled||!o,autoFocus:e?.autoFocus,onClickClear:S,onKeyDown:p,onFocus:_,onBlur:g}),(0,Q.jsxs)(`div`,{className:`position-absolute z-1 w-100 ${Uk.dropdown} ${h?`d-none`:``}`,children:[!!O&&(0,Q.jsx)(`div`,{className:Uk.suggestionContainer,children:(0,Q.jsxs)(`div`,{className:Uk.suggestionContainerInner,ref:m,children:[(0,Q.jsx)(Wk,{predictions:s,getPlaceInfo:T,selectedIndex:f}),window.navigator.geolocation&&e.useGeoLocationApi&&(0,Q.jsx)(Lf,{className:nd(Uk.suggestionItem,`px-1`,f-1===s.length?Uk.selected:``),onClick:E,children:(0,Q.jsxs)(`div`,{className:`btn btn-link info-link btn-with-icon bg-transparent py-0 pe-1`,children:[(0,Q.jsx)(Hk,{}),`Use my current location`]})})]})}),k&&!O&&e.useGeoLocationApi&&(0,Q.jsx)(`div`,{className:`d-flex ${Uk.useMyLocation}`,children:(0,Q.jsxs)(`button`,{onClick:E,className:`btn btn-link info-link bg-white btn-with-icon`,children:[(0,Q.jsx)(Hk,{}),`Use my current location`]})}),!!v&&(0,Q.jsx)(`div`,{className:`text-danger p-2`,children:v})]})]})}var Kk=function(e){return e.GET=`GET`,e.POST=`POST`,e.PUT=`PUT`,e.DELETE=`DELETE`,e}({}),qk=class extends Error{constructor(e,t=`Error`){super(t),this.body=e}},Jk={prepareQuery(e,t){let n=e;return Object.keys(t).forEach((e,r)=>{t[e]&&(r===0?n+=`?`:n+=`&`,n+=`${e}=${encodeURIComponent(t[e])}`)}),n}};function Yk(e){let t={method:Kk.GET,headers:{"Content-type":`application/json`}};e.method&&(t={...t,method:e.method}),e.init&&(t={...t,...e.init});let n=e.url;return t.method===Kk.GET&&e.data?n=Jk.prepareQuery(n,e.data):e.data&&(t={...t,body:JSON.stringify(e.data)}),{init:t,url:n}}var Xk={async asyncFetch(e){let t=Yk(e),n=await fetch(t.url,t.init);if(!n.ok)throw new qk(await n.json());if(n.status!==204)return await n.json()},async asyncFetchPlain(e){let t=Yk(e),n=await fetch(t.url,t.init);if(n.ok)return await n.text()},fetch(e){let t=Yk(e);return fetch(t.url,t.init).then(e=>{if(e.status!==204)return e.json()}).then(t=>(e.success&&e.success(t),t)).catch(t=>(e.error&&e.error(),t)).finally(()=>{e.always&&e.always()})}},Zk={search(e,t,n,r,i){let a={longitude:t.longitude,latitude:t.latitude};t.query&&(a.query=t.query),Xk.fetch({url:e,data:a,success:n,error:r,always:i})},async create(e,t){return Xk.asyncFetch({url:e.createProspect,method:Kk.POST,data:t})},getLookups(e,t){return Xk.asyncFetch({url:e.prospectLookups(t)})}},Qk=/\/$/,$k={urlBuilder(e,t){let n=Object.entries(t).map(([e,t])=>e&&Array.isArray(t)?t.map(t=>`${e}=${encodeURIComponent(t)}`).join(`&`):e&&t!=null?`${e}=${encodeURIComponent(t)}`:``).reduce((e,t)=>t?e?`${e}&${t}`:t:e,``);return n?`${e}?${n}`:e},buildFilter(e){let t=[];if(e.limit&&t.push(`limit:${e.limit}`),e.cursor&&t.push(`page:${e.cursor}`),e.before&&t.push(`dateCreated:...${e.before}`),t.length)return t.join(`,`)},makeHttps(e){return typeof e!=`string`||e.indexOf(`http://`)===-1||(e=e.replace(`http://`,`https://`)),e},safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith(`/`)||(n+=`/`),t&&(n+=t.startsWith(`/`)?t.slice(1):t),n},removeTrailingSlash(e){if(typeof e==`string`)return e.replace(Qk,``)},getHostname(e){if(!e)return window.location.hostname;try{return new URL(e).hostname}catch{return null}},isValidUrl(e){try{return new URL(e),!0}catch{return!1}}},eA={checkTrialStatus(e,t){if(e.productName!==kD.Lite)return Promise.reject();let n={email:t.email};return Xk.asyncFetch({url:e.userStatus,data:n})},checkUserIdps(e,t){return e.productName===kD.Lite?Xk.asyncFetch({url:e.idps,data:{email:t}}):Promise.reject()},checkProspectTrialStatus(e,t,n,r,i){let a=e.prospectStatus(t.prospectId);a=$k.urlBuilder(a,{email:t.email}),Xk.fetch({url:a,success:n,error:r,always:i})},createTrial(e,t){return Xk.asyncFetch({url:e.createTrial,method:Kk.POST,data:t})},resendTrialEmail(e,t,n){if(e.productName!==kD.Lite)return Promise.reject();let r={email:n.email,appLink:n?.appLink};return Xk.asyncFetch({url:e.resendTrialEmail(t),method:Kk.POST,data:r})},createJoinRequest(e,t){let n=e.productName===kD.Auth?e.joinRequest:e.joinRequest(t.customerId),r=e.productName===kD.Auth?t:{email:t.email};return Xk.asyncFetch({url:n,method:Kk.POST,data:r})},createAutoJoinRequest(e,t){return e.productName===kD.Lite?Xk.asyncFetch({url:e.autoJoin,method:Kk.POST,data:t}):Promise.reject()}},tA=[`Primary`,`Secondary`,`K12`,`Special`,`TAFE`,`University`],nA=[`Primary`,`Secondary`,`Primary & Secondary`,`Special`,`Sixth Form College`,`FE College`,`University`,`Other`],rA=[`Elementary`,`Middle School`,`High School`,`College`,`Other`],iA={au:tA,nz:tA,uk:nA,us:rA,ca:rA};function aA(e){return iA[tk.getCountryCode(e)]||rA}var oA=function(e){return e.Published=`Published`,e.Draft=`Draft`,e}({});function sA(e){let[t,n]=Z.useState({prospectId:e.prospectId,schoolName:e.schoolName,schoolType:e.schoolType,schoolLocality:e.schoolLocality,country:e.country,province:e.province,city:e.city,longitude:e.longitude,latitude:e.latitude}),[r,i]=Z.useState(),[a,o]=Z.useState(!1),s=aA(t.country||e.geoLocation?.countryCode);function c(){let{schoolName:e,schoolType:n,country:r}=t;return!!(e&&n&&r)}function l(e,t){n(n=>({...n,[e]:t}))}function u(e){let{longitude:t,latitude:n,schoolLocality:r,country:i,city:a,province:o}=e;t&&l(`longitude`,t),n&&l(`latitude`,n),i&&l(`country`,i),a&&l(`city`,a),o&&l(`province`,o),r&&l(`schoolLocality`,r)}function d(){l(`schoolLocality`,void 0),l(`longitude`,void 0),l(`latitude`,void 0),l(`city`,void 0),l(`province`,void 0),l(`country`,void 0),i(``)}function f(e){let t=e.target.value;l(`schoolType`,t)}function p(e){l(`schoolName`,e.target.value)}async function m(n){let r={email:e.email,custom:{accountName:t?.schoolName,accountAddress:{countryCode:t?.country,province:pk.parseProvince(t.province)},orgSubType:pk.getSchoolType(t?.schoolType),syncToCrm:!0,source:pk.Sources.CV_PRODUCT_FORM_SUBMISSION},event:{accountCountry:t?.country,accountPostCode:t?.schoolPostCode,accountState:pk.parseProvince(t.province)}},i={form_type:`trial-sign-up`,prospect_id:t?.prospectId};e.logBrazeEvent({user:r,event:{eventType:ED.ProductFormEvent.FormSubmission,additionalData:i,callback:n}})}async function h(n){if(n.preventDefault(),!c())return;e.logUserAction(t,{actionType:BO.Click,workflowPhase:UO.Next,descriptor:WO.CantFindSchool}),o(!0);let r;try{if(r=await Zk.create(e.ajaxUrls,{name:t.schoolName,status:oA.Draft,countryCode:t.country,prospectType:t.schoolType,city:t.city,postCode:t.schoolPostCode,province:pk.parseProvince(t.province)}),!r.id){o(!1),i(`Error. Something went wrong.`);return}}catch{o(!1),i(`Error. Something went wrong.`);return}if(e.userTrialStatus===ck.BdmTrialAvailable){if(e.userType!==lk.Staff){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null});return}e.nextStep({step:`request-bdm-trial`,...t});return}try{let n={prospectId:r.id,email:e.email,userType:e.userType,appLink:e.pageAppLinkString,signupVariant:e.signupVariant,attribution:{...rf.getDecodedAttributionData(),utms:gf.getUtmParameters()},conversion:pk.getConversionName(pk.Conversions.START_FREE_TRIAL,e.entryPage?.metadata?.conversionSuffix)},i=await eA.createTrial(e.ajaxUrls,n);e.createOrUpdateProfile&&e.createOrUpdateProfile({masterId:i.id,email:e.email,countryCode:t?.country});let a={completionStep:`trial-status`,email:e.email,userId:i.id,prospectId:r.id,schoolName:t.schoolName,schoolLocality:t.schoolLocality,country:t.country,schoolType:t.schoolType,city:t.city,schoolPostCode:t.schoolPostCode,latitude:t.latitude,longitude:t.longitude,province:t.province,trialStatus:ck.Available,trialCreated:!0,customerId:i.data?.customerId};if(e?.userType===lk.Staff){await m(t=>{t||console.error(`Failed to submit create trial data to braze.`),e.complete(a)});return}e.complete(a)}catch(n){if(!n.body){o(!1),i(`Error. Something went wrong.`);return}let a=n;if(a.body.status===400&&a.body.type===`trial-not-available`){e.nextStep({step:`add-to-braze`,...t,prospectId:r.id,trialStatus:ck.Unavailable});return}console.error(n)}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Tell us more about your school`}),(0,Q.jsx)(`p`,{children:`Please enter your school details.`}),(0,Q.jsxs)(`div`,{className:`text-start`,children:[(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsx)(`label`,{className:`d-block`,htmlFor:`school-name-input`,children:`Name of school`}),(0,Q.jsx)(`input`,{type:`text`,value:t?.schoolName||``,onChange:p,id:`school-name-input`,className:`form-control form-control-lg`,autoComplete:`off`,placeholder:`Enter name of school`,autoFocus:!0})]}),(0,Q.jsxs)(`div`,{className:`form-group`,children:[(0,Q.jsx)(`label`,{className:`d-block`,htmlFor:`school-type-select`,children:`Type of school`}),(0,Q.jsxs)(`select`,{id:`school-type-select`,className:`form-select form-select-lg ${t.schoolType?``:`text-secondary`}`,autoComplete:`off`,value:t.schoolType||`none`,onChange:f,children:[(0,Q.jsx)(`option`,{value:`none`,className:`text-secondary`,disabled:!0,children:`Select type of school`}),s.map(e=>(0,Q.jsx)(`option`,{value:e,className:`text-dark`,children:e},e))]})]}),(0,Q.jsx)(Gk,{data:t,setData:u,clearData:d,disabled:!1,labelClassName:`d-block`,geoLocation:e.geoLocation,logUserAction:e.logUserAction,googleMapsApiKey:e.googleMapsApiKey,autoFocus:!1,size:`lg`,useGeoLocationApi:!0}),r&&(0,Q.jsx)(`div`,{className:`text-danger mb-3`,children:r})]}),c()&&(0,Q.jsx)(rk,{className:`btn-lg w-100`,variant:`dark`,onClick:h,showSpinner:a,disabled:a,children:`Get started`})]})}function cA(e,t){return t?`${e} ${t}`:e}function lA(e){return(0,Q.jsx)(`h1`,{className:cA(`text-center mb-2 h4`,e.className),children:e.children})}function uA(e){return(0,Q.jsx)(`div`,{className:cA(`text-center text-sm px-2 px-lg-4`,e.className),children:e.children})}function dA(e){return(0,Q.jsx)(`p`,{className:cA(``,e.className),children:e.children})}var fA={Heading:lA,Body:uA,Message:dA};function pA(e){return(0,Q.jsx)(`div`,{className:`d-flex justify-content-center my-4 px-2 px-lg-4`,children:(0,Q.jsx)(`img`,{src:{[ck.Available]:e.imageUrls.statusImages.available,[ck.Active]:e.imageUrls.statusImages.active,[ck.Expired]:e.imageUrls.statusImages.expired,[ck.NotRequired]:e.imageUrls.statusImages.notRequired,[ck.Unavailable]:e.imageUrls.statusImages.unavailable,[ck.Unsupported]:e.imageUrls.statusImages.unsupported,[ck.UserAutoJoinAllowed]:e.imageUrls.statusImages.notRequired,[ck.UserJoinApprovalRequired]:e.imageUrls.statusImages.notRequired,[ck.InvalidEmail]:``,[ck.BdmTrialAvailable]:``}[e.trialStatus],className:`w-100 h-auto`})})}function mA(e){return Z.useEffect(()=>{e.logUserAction({},{actionType:BO.Create,descriptor:WO.TrialRequested,workflowPhase:UO.Complete})},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(pA,{trialStatus:ck.Available,imageUrls:e.imageUrls}),(0,Q.jsxs)(fA.Body,{className:`mb-3`,children:[(0,Q.jsx)(fA.Heading,{children:`Submitted!`}),(0,Q.jsx)(fA.Message,{children:`Thank you for your interest in trialing ClickView. We will be in touch with you as soon as possible.`})]})]})}function hA(e){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(pA,{trialStatus:ck.Available,imageUrls:e.imageUrls}),(0,Q.jsxs)(fA.Body,{className:`mb-3`,children:[(0,Q.jsx)(fA.Heading,{children:`You've requested access!`}),(0,Q.jsx)(fA.Message,{children:`We've sent a request to your ClickView admin. Once your account is ready, you'll receive an email notification with instructions on how to get started with ClickView.`})]})]})}var gA={Marketing:{au:`https://www.clickvieweducation.com/en-au`,us:`https://www.clickvieweducation.com`,nz:`https://www.clickview.co.nz`,uk:`https://www.clickview.co.uk`,ca:`https://www.clickvieweducation.com/en-ca`},Support:{au:`https://www.clickviewsupport.com/hc/en-au`,uk:`https://www.clickviewsupport.com/hc/en-au#gb`,nz:`https://www.clickviewsupport.com/hc/en-au#nz`,us:`https://www.clickviewsupport.com/hc/en-au#us`,ca:`https://www.clickviewsupport.com/hc/en-au#ca`}},_A={[$.AU]:`/contact-us/sales`,[$.US]:`/contact-us/sales`,[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/trial`,[$.CA]:`/contact-us/sales`},vA={[$.AU]:`/resources/free-student-resources`,[$.US]:`/resources/free-student-resources`,[$.NZ]:`/free-student-resources/`,[$.UK]:`/free-student-resources/`,[$.CA]:`/resources/free-student-resources`},yA={getMarketingUrlForGeoLocation(e){let t=tk.getCountryCode(e?.countryCode);return gA.Marketing[t]||gA.Marketing.us},getMarketingSalesContactForGeoLocation(e){let t=tk.getCountryCode(e?.countryCode);return`${yA.getMarketingUrlForGeoLocation(e)}${_A[t]}`},getFreeResourcesForGeoLocation(e){let t=tk.getCountryCode(e?.countryCode);return`${this.getMarketingUrlForGeoLocation({countryCode:t})}${vA[t]}`},getTermsAndConditionsLink(){return this.getMarketingUrlForGeoLocation($.US)+`/terms-and-conditions/`},getPrivacyPolicyLink(){return this.getMarketingUrlForGeoLocation($.US)+`/privacy-policy/`},getSupportUrlForGeoLocation(e){let t=tk.getCountryCode(e?.countryCode);return gA.Support[t]||gA.Support.us}};function bA(e){let t=e?.previousStepIds&&e.previousStepIds[e.previousStepIds.length-1]===`find-school`,n=e?.schoolName||`Your school`;return(0,Q.jsxs)(fA.Body,{className:`mb-3`,children:[t?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(fA.Heading,{children:[n,(0,Q.jsx)(`br`,{}),`already has ClickView 🎉`]}),(0,Q.jsxs)(fA.Message,{className:`mt-3`,children:[`If your school has SSO\xA0`,(0,Q.jsx)(`a`,{href:e.getSignInUrl({email:e.email,customerId:e.customerId}),className:`info-link`,children:`click here to sign in.`})]}),(0,Q.jsx)(fA.Message,{children:`Otherwise please contact your school admin for access.`})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(fA.Heading,{children:`Good News!`}),(0,Q.jsxs)(fA.Message,{children:[`An account already exists for:`,(0,Q.jsx)(`br`,{}),` `,(0,Q.jsx)(`strong`,{children:e.email})]}),(0,Q.jsx)(fA.Message,{children:(0,Q.jsx)(`a`,{href:e.getSignInUrl({email:e.email}),className:`btn btn-dark btn-lg w-100`,children:`Sign into ClickView`})})]}),(0,Q.jsxs)(fA.Message,{children:[`Need Help?\xA0`,(0,Q.jsx)(`a`,{href:yA.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,target:`_blank`,children:`Contact our Help Centre.`})]})]})}function xA(e){let t=yA.getMarketingSalesContactForGeoLocation(e.geoLocation),n=e?.previousStepIds&&e.previousStepIds[e.previousStepIds.length-1]===`find-school`,r=e?.schoolName||`Your school`;return(0,Q.jsxs)(fA.Body,{children:[(0,Q.jsx)(fA.Heading,{children:n?`${r} trial has expired`:`Your trial has expired`}),(0,Q.jsxs)(fA.Message,{children:[`Please contact our\xA0`,(0,Q.jsx)(`a`,{href:t,className:`info-link`,target:`_blank`,children:`ClickView Sales Team`})]})]})}function SA(e){let t=yA.getMarketingSalesContactForGeoLocation(e.geoLocation);return(0,Q.jsxs)(fA.Body,{children:[(0,Q.jsxs)(fA.Heading,{children:[`Your school no longer`,(0,Q.jsx)(`br`,{}),` has access to ClickView`]}),(0,Q.jsxs)(fA.Message,{children:[`Please contact our `,(0,Q.jsx)(`a`,{href:t,className:`info-link`,children:`ClickView Sales Team`}),` for more information.`]})]})}function CA(){return(0,Q.jsxs)(fA.Body,{children:[(0,Q.jsxs)(fA.Heading,{className:`px-2 px-lg-4`,children:[`ClickView isn't currently `,(0,Q.jsx)(`br`,{}),` available for your school`]}),(0,Q.jsx)(fA.Message,{children:`We're working hard to get ClickView ready for more people.`})]})}var wA=1;function TA(e){let[t,n]=Z.useState(0),[r,i]=Z.useState(!1);async function a(r){r?.preventDefault();try{await eA.resendTrialEmail(e.ajaxUrls,e.userId,{email:e.email,appLink:e.pageAppLinkString}),n(t+1)}catch{i(!0)}e.logUserAction({},{actionType:BO.Click,descriptor:WO.ResendEmail})}function o(t){t?.preventDefault(),e.logUserAction({},{actionType:BO.Click,descriptor:WO.WrongEmail}),e.nextStep({step:`enter-email`,userType:e.userType})}if(e?.email)return(0,Q.jsxs)(fA.Body,{children:[(0,Q.jsx)(fA.Heading,{children:`Check your inbox!`}),(0,Q.jsxs)(fA.Message,{children:[`An email has been sent to `,(0,Q.jsx)(`strong`,{children:e.email}),`.`]}),!!e.userId&&(0,Q.jsxs)(Q.Fragment,{children:[t<wA?(0,Q.jsx)(`button`,{onClick:a,className:`btn btn-outline-dark btn-lg mb-3`,children:`Resend verification email`}):(0,Q.jsx)(fA.Message,{children:`✅ Email has been resent!`}),(0,Q.jsxs)(fA.Message,{children:[`Wrong email?\xA0`,(0,Q.jsx)(`button`,{onClick:o,className:`btn info-link p-0 align-top border-0`,children:`Update email address`})]}),r&&(0,Q.jsxs)(fA.Message,{className:`mb-0 text-danger`,children:[`❌ There was a problem resending the email. Please try again later or contact our \xA0`,(0,Q.jsx)(`a`,{href:yA.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,children:`support`})]})]})]})}var EA={[ck.Available]:TA,[ck.Active]:bA,[ck.Expired]:xA,[ck.NotRequired]:bA,[ck.Unavailable]:SA,[ck.Unsupported]:CA,[ck.UserAutoJoinAllowed]:bA,[ck.UserJoinApprovalRequired]:bA,[ck.InvalidEmail]:null,[ck.BdmTrialAvailable]:null};function DA(e){let t=EA[e.trialStatus];return t?(0,Q.jsx)(t,{...e}):(0,Q.jsx)(Q.Fragment,{})}function OA(e){return Z.useEffect(()=>{let t={actionType:BO.Create,descriptor:WO.DeadEnd,workflowPhase:UO.Discard};e.trialCreated&&(t.descriptor=WO.TrialCreated,t.workflowPhase=UO.Complete),e.logUserAction({},t)},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(pA,{trialStatus:e.trialStatus,imageUrls:e.imageUrls}),(0,Q.jsx)(DA,{...e})]})}var kA=`young-student`;function AA(e){let t=yA.getFreeResourcesForGeoLocation(e.geoLocation);return Z.useEffect(()=>{qd.set(kA,!0)},[]),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(pA,{trialStatus:ck.Active,imageUrls:e.imageUrls}),(0,Q.jsxs)(fA.Body,{className:`mb-3`,children:[(0,Q.jsx)(fA.Heading,{children:`Discover our free content`}),(0,Q.jsx)(fA.Message,{children:`Click the button below to explore our videos`}),(0,Q.jsx)(`a`,{href:t,className:`btn btn-lg btn-dark w-100`,target:`_blank`,children:`Start watching now`})]})]})}var jA={"trial-status":OA,"added-to-braze":mA,"young-student":AA,"requested-access":hA};function MA(e){let t=jA[e.completionStep];return(0,Q.jsx)(`div`,{className:`d-flex justify-content-center flex-column mx-auto px-2`,children:(0,Q.jsx)(t,{...e})})}var NA=function(e){return e.Popup=`popup-form`,e.FullPage=`full-page-form`,e}({}),PA={day:`_day_cmdpc_1`,month:`_month_cmdpc_4`,year:`_year_cmdpc_7`},FA=120,IA=16;function LA(e,t,n){let r=new Date(RA(e,t,n));return!isNaN(+r)}function RA(e,t,n){return`${e.padStart(4,`0`)}-${t.padStart(2,`0`)}-${n.padStart(2,`0`)}`}function zA(e){let[t,n]=Z.useState(``),[r,i]=Z.useState(``),[a,o]=Z.useState(``),[s,c]=Z.useState(null);function l(e){n(e.target.value),c(null)}function u(e){i(e.target.value),c(null)}function d(e){o(e.target.value),c(null)}function f(){return!t||!r||!a?(c(`Please enter your date of birth`),!1):LA(a,r,t)?+a>h?(c(`Please enter a date in the past`),!1):+a<h-FA?(c(`Please enter a realistic date of birth`),!1):!0:(c(`Please enter a valid date`),!1)}function p(n){if(n.preventDefault(),!f())return;let i=new Date(RA(a,r,t)),o=h-IA,s=new Date;if(s.setFullYear(o),i>s){e.complete({completionStep:`young-student`,trialCreated:!1,trialStatus:null});return}e.nextStep({step:`enter-email`,userType:e.userType})}let m=e.type===NA.Popup,h=new Date().getFullYear(),g=nd(`d-inline-block`,m?`text-center`:`text-start`),_=`form-control form-control-lg ${s?`is-invalid`:``}`,v=`order-0`,y=`order-3`,b=tk.isCountryCodeUS(e.geoLocation.countryCode);return b&&(v=`order-3`,y=`order-0`),(0,Q.jsxs)(`form`,{onSubmit:p,noValidate:!0,children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Tell us a little about yourself`}),(0,Q.jsx)(`p`,{children:`Please enter your date of birth`}),(0,Q.jsxs)(`div`,{className:`my-4`,children:[(0,Q.jsxs)(`fieldset`,{className:nd(`d-flex`,m?`justify-content-center`:`justify-content-start`),"aria-describedby":`dateOfBirthError`,children:[(0,Q.jsxs)(`div`,{className:`${g} ${v}`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`day`,children:`Day`}),(0,Q.jsx)(`input`,{id:`day`,type:`number`,className:`${_} ${PA.day}`,min:`1`,max:`31`,placeholder:`DD`,value:t,onChange:l,autoFocus:!b,tabIndex:b?2:1})]}),(0,Q.jsx)(`span`,{className:`h1 fw-normal mt-4 mb-0 mx-2 order-1 ${s?`text-danger`:``}`,children:`/`}),(0,Q.jsxs)(`div`,{className:`${g} ${y}`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`month`,children:`Month`}),(0,Q.jsx)(`input`,{id:`month`,type:`number`,className:`${_} ${PA.month}`,min:`1`,max:`12`,placeholder:`MM`,value:r,onChange:u,autoFocus:b,tabIndex:b?1:2})]}),(0,Q.jsx)(`span`,{className:`h1 fw-normal mt-4 mb-0 mx-2 order-4 ${s?`text-danger`:``}`,children:`/`}),(0,Q.jsxs)(`div`,{className:`${g} order-5`,children:[(0,Q.jsx)(`label`,{className:`mb-0`,htmlFor:`year`,children:`Year`}),(0,Q.jsx)(`input`,{id:`year`,name:`year`,type:`number`,className:`${_} ${PA.year}`,min:h-120,max:h,placeholder:`YYYY`,value:a,onChange:d,tabIndex:3})]})]}),!!s&&(0,Q.jsx)(Cf,{name:`dateofBirth`,children:s})]}),(0,Q.jsx)(`button`,{type:`submit`,className:`btn btn-lg btn-dark w-100`,children:`Continue`})]})}function BA(e){return(0,Q.jsxs)(Q.Fragment,{children:[`Have a ClickView account already?`,(0,Q.jsx)(`a`,{href:e.link,className:`info-link ms-1`,onClick:e.onClick,children:`Sign in`})]})}function VA(){let e={},t=rf.getEncodedAttributionData();t&&(e.r=t);let n=gf.getUtmParameters();return n&&(e.utms=n),JSON.stringify(e)}var HA=new RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),UA={[$.AU]:`valerie.frizzle@school.edu.au`,[$.UK]:`valerie.frizzle@school.gov.uk`,[$.US]:`valerie.frizzle@school.gov`,[$.NZ]:`valerie.frizzle@school.nz`,[$.CA]:`valerie.frizzle@school.ca`},WA={[$.AU]:`/contact-us/support`,[$.US]:`/contact-us/support`,[$.NZ]:`/contact-us/`,[$.UK]:`/contact-us/technical/`,[$.CA]:`/contact-us/support`};function GA(e){return`${yA.getMarketingUrlForGeoLocation(e)}${WA[tk.getCountryCode(e?.countryCode)]}`}function KA(e){return UA[tk.getCountryCode(e.countryCode)]||UA.us}var qA=[ck.Expired,ck.NotRequired,ck.Unavailable,ck.Unsupported,ck.Active];function JA(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(e?.email||``),[a,o]=Z.useState(),s=GA(e.geoLocation);async function c(){o(``);let t;try{t=await eA.checkTrialStatus(e.ajaxUrls,{email:r})}catch{o(`Something went wrong! Please try again later.`);return}if(t.status===ck.InvalidEmail){o(`Please use your school email address.`);return}if(e.logUserAction({},{actionType:BO.Click,workflowPhase:UO.Next,descriptor:WO.EnterEmail}),qA.includes(t.status)){e.complete({completionStep:`trial-status`,email:r,trialStatus:t.status,trialCreated:!1});return}try{let n=await eA.checkUserIdps(e.ajaxUrls,r);if(n.length){e.nextStep({step:`select-idp`,email:r,userTrialStatus:t.status,idps:n});return}}catch{o(`Something went wrong! Please try again later.`);return}e.nextStep({step:`find-school`,email:r,userTrialStatus:t.status})}function l(){e.logUserAction({},{actionType:BO.Click,descriptor:WO.ContactUs})}function u(){return r.length?HA.test(r)?!0:(o(`Please use your school email address.`),!1):(o(`Please enter your school email address.`),!1)}function d(){e.logUserAction({},{actionType:BO.Click,descriptor:WO.SignIn})}function f(e){e.preventDefault(),i(e.target.value),o(``)}async function p(e){e?.preventDefault(),u()&&(n(!0),await c(),n(!1))}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:``,children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Let's set up your account`}),(0,Q.jsx)(`p`,{children:`Enter your school email address`})]}),(0,Q.jsxs)(`form`,{onSubmit:p,noValidate:!0,children:[(0,Q.jsxs)(`div`,{className:`form-group mb-3`,children:[(0,Q.jsx)(Ff,{value:r,onChange:f,name:`email-input`,id:`email-input`,type:`email`,className:`form-control form-control-lg ${a?`is-invalid`:``}`,placeholder:KA(e.geoLocation),autoComplete:`false`,autoCorrect:`false`,autoFocus:!0,onClickClear:()=>i(``),"aria-errormessage":`email-inputError`}),a&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Cf,{name:`error-input`,children:a}),(0,Q.jsxs)(`small`,{children:[`Having an issue with your email?`,(0,Q.jsx)(`a`,{href:s,className:`info-link ps-1`,target:`_blank`,onClick:l,children:`Contact our team`})]})]})]}),(0,Q.jsx)(rk,{showSpinner:t,variant:`dark`,className:`btn-lg mb-3 w-100`,disabled:t,onClick:p,children:`Continue`})]}),e.userType===lk.Staff&&(0,Q.jsx)(Sf,{idps:e.globalIdps,className:`mt-n3`,attribution:VA()}),(0,Q.jsx)(`div`,{className:`text-center`,children:(0,Q.jsx)(BA,{link:e.getSignInUrl({email:r}),onClick:d})})]})}function YA(e){switch(e?.body?.type){case`user-type-not-supported`:return`Students may not request to join schools.`;case`join-request-already-pending`:return`Your request is awaiting administrator approval.`;case`join-request-already-denied`:return`Your request has been denied by an administrator.`;default:return`Something went wrong.`}}var XA=function(e){return e.MasterId=`master_id`,e.CrmId=`crm_id`,e.SalesforceId=`salesforce_id`,e}({});function ZA(e){let[t,n]=Z.useState(null);async function r(){try{let t=(await Zk.getLookups(e.ajaxUrls,e.prospectId)).find(e=>e.type===XA.MasterId)?.externalId;if(!t){n(`Something went wrong.`);return}await eA.createJoinRequest(e.ajaxUrls,{customerId:t,email:e.email}),e.logUserAction({},{actionType:BO.Click,descriptor:WO.RequestAccess}),e.complete({completionStep:`requested-access`,trialCreated:!1,trialStatus:ck.UserJoinApprovalRequired})}catch(e){n(YA(e))}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(pA,{trialStatus:ck.UserJoinApprovalRequired,imageUrls:e.imageUrls}),(0,Q.jsx)(fA.Body,{className:`mb-3`,children:(0,Q.jsxs)(fA.Heading,{children:[e.schoolName,(0,Q.jsx)(`br`,{}),`already has ClickView 🎉`]})}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,onClick:r,children:`Request access`}),t&&(0,Q.jsx)(`p`,{className:`text-danger text-center mb-2`,children:t}),(0,Q.jsxs)(fA.Message,{className:`text-center`,children:[`Need Help?\xA0`,(0,Q.jsx)(`a`,{href:yA.getSupportUrlForGeoLocation(e.geoLocation),className:`info-link`,target:`_blank`,children:`Contact our Help Centre.`})]})]})}var QA={createUser(e,t){if(e.productName!==kD.Lite)return Promise.reject();let{email:n,source:r,syncToCrm:i,instanceRegion:a}=t;return Xk.asyncFetch({url:e.brazeCreateUser,method:Kk.POST,data:{email:n,source:r,syncToCrm:i,instanceRegion:a}})}};function $A(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState({});function a(e){if(QC(e.jobTitle)){l();return}s(e)}function o(){let t=tk.getCountryCode(e.country||e.geoLocation?.countryCode);return tk.getInstanceRegion(t)}async function s(a){if(t)return;if(e.userType===lk.Learner){i({...r,submission:`Something went wrong! Please try again later.`});return}e.logUserAction({},{actionType:BO.Click,workflowPhase:UO.Next,descriptor:WO.RequestBdmTrial}),n(!0);let{firstName:s,surname:u}=nk(a.fullname);try{await QA.createUser(e.ajaxUrls,{email:e.email,source:pk.Sources.CV_PRODUCT_BDM_TRIAL_REQUESTED,syncToCrm:!0,instanceRegion:o()});let t={email:e.email,firstName:s,lastName:u,phone:a.phone,custom:{orgSubType:pk.getSchoolType(e?.schoolType),accountName:e?.schoolName,jobTitle:a.jobTitle,accountAddress:{countryCode:e?.country,province:pk.parseProvince(e?.province||``)},source:pk.Sources.CV_PRODUCT_BDM_TRIAL_REQUESTED},event:{conversion:pk.getConversionName(pk.Conversions.FREE_TRIAL_REQUEST,e.entryPage?.metadata?.conversionSuffix)}},n={prospect_id:e?.prospectId};e.logBrazeEvent({user:t,event:{eventType:ED.ProductFormEvent.BdmTrialRequested,additionalData:n,callback:c}})}catch{i({...r,submission:`Something went wrong! Please try again later.`})}Object.keys(r).length||l()}function c(e){i(e?{}:{...r,submission:`Something went wrong! Please try again later.`}),n(!1)}function l(){e.complete({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null})}return(0,Q.jsx)(sk,{loading:t,errors:r,setErrors:i,country:e.country||e.geoLocation?.countryCode,logUserAction:e.logUserAction,handleSubmitForm:a,isTertiary:pk.isTertiarySchool(e.schoolType)})}function ej(e){let{loading:t,canSubmitForm:n,setSubmissionError:r,prospectStatus:i,userType:a,logStepEvent:o,logUserAction:s,nextStep:c,data:l,productName:u,ajaxUrls:d,complete:f,setLoadingState:p,email:m,userTrialStatus:h,pageAppLinkString:g,setProperty:_,logBrazeEvent:v,createOrUpdateProfile:y,signupVariant:b}=e;function x(){c({step:`add-to-braze`,trialStatus:i,...l}),o()}function S(){if(o(),a!==lk.Staff){f({completionStep:`added-to-braze`,trialCreated:!1,trialStatus:null});return}c({step:`request-bdm-trial`,...l})}function C(){c({step:`request-access`,...l}),o()}async function w(){try{await eA.createAutoJoinRequest(d,{prospectId:l.prospectId,email:m}),s({},{actionType:BO.Click,descriptor:WO.AutoJoin}),f({completionStep:`trial-status`,trialCreated:!0,trialStatus:ck.Available,...l})}catch{r(`Something went wrong! Please try again later.`),p(!1);return}}async function T(){let e;l?.prospectId&&i===ck.NotRequired&&(e=(await Zk.getLookups(d,l.prospectId)).find(e=>e.type===XA.MasterId)?.externalId),f({completionStep:`trial-status`,trialStatus:i,trialCreated:!1,customerId:e,...l}),o()}function E(){return i===ck.Active||i===ck.Available||i===ck.UserAutoJoinAllowed&&u===kD.Auth}async function D(){if(a!==lk.Staff)return;let e={email:m,custom:{accountName:l?.schoolName,accountAddress:{countryCode:l?.country,province:pk.parseProvince(l.province)},orgSubType:pk.getSchoolType(l?.schoolType),syncToCrm:!0,source:pk.Sources.CV_PRODUCT_FORM_SUBMISSION},event:{accountCountry:l?.country,accountPostCode:l?.schoolPostCode,accountState:pk.parseProvince(l.province),variant:b}},t={form_type:`trial-sign-up`,prospect_id:l?.prospectId};v({user:e,event:{eventType:ED.ProductFormEvent.FormSubmission,additionalData:t}})}async function O(){p(!0);let t;try{t=await eA.createTrial(d,{signupVariant:b,userType:a,email:m,prospectId:l?.prospectId,appLink:g,attribution:{...rf.getDecodedAttributionData(),utms:gf.getUtmParameters()},conversion:pk.getConversionName(pk.Conversions.START_FREE_TRIAL,e?.entryPage?.metadata?.conversionSuffix)})}catch{r(`Something went wrong! Please try again later.`),p(!1);return}i===ck.UserAutoJoinAllowed&&s({},{actionType:BO.Click,descriptor:WO.AutoJoin}),_(`userId`,t.id),f({completionStep:`trial-status`,userId:t.id,trialCreated:!0,trialStatus:ck.Available,customerId:t.data?.customerId,...l}),D(),y&&y({masterId:t.id,email:m,countryCode:l?.country}),o()}return async function(){if(!t){if(!n()){r(`Something went wrong! Please try again later.`);return}if(h===ck.BdmTrialAvailable)return S();if(a===lk.Staff){if(i===ck.Unsupported)return x();if(i===ck.UserJoinApprovalRequired)return C();if(i===ck.UserAutoJoinAllowed&&u===kD.Lite)return await w()}return E()?await O():await T()}}}var tj=50;function nj(e){return e.toLowerCase().split(` `).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function rj(e){let t=[];return e.city&&t.push(nj(e.city)),e.province&&t.push(e.province),e.postCode&&t.push(e.postCode),t.join(` `)}function ij(e){let{filteredSchoolsList:t,getSchoolName:n,onSchoolSuggestionClick:r,selectedIndex:i}=e;return(0,Q.jsx)(Q.Fragment,{children:t.map((e,t)=>(0,Q.jsxs)(Lf,{className:`${Uk.suggestionItem} ${i-1===t?Uk.selected:``}`,onKeyDown:t=>t.key===`Enter`&&r(e),onMouseDown:()=>r(e),onClick:()=>r(e),children:[n(e),` `,(0,Q.jsx)(`br`,{}),(0,Q.jsx)(`small`,{className:`text-secondary`,children:rj(e)})]},e.id))})}function aj(e){return(0,Q.jsx)(`div`,{className:`info-link ${Uk.suggestionItem} ${Uk.noSuggestion} ${e.selected?Uk.selected:``}`,onKeyDown:t=>t.key===`Enter`&&e.handleNoSuggestion(),onMouseDown:e.handleNoSuggestion,onClick:e.handleNoSuggestion,children:`Can't find your school?`})}function oj(e){let t=Z.useRef(null),[n,r]=Z.useState(!0),[i,a]=Z.useState(e.data.schoolName&&e.data.schoolPostCode?e.data.schoolName+`, `+e.data.schoolPostCode:e.data.schoolName?e.data.schoolName:``),[o,s]=Z.useState(),c=lC(i,250),{selectedIndex:l,onKeyDown:u,containerRef:d,hide:f,onBlur:p,onFocus:m}=If({onSelected:h,itemCount:(o?.length??0)+1,hideOnBlur:e.hideOnBlur});function h(t){if(!o&&!t)return;if(t===o.length){e.onClickNoSuggestions(i);return}let n=o[t];n&&C(n)}let g=!!e.data?.prospectId,_=n&&!g,v=!n&&!g&&o?.length<tj,y=o?.length&&!g;Z.useEffect(()=>{if(!g){if(!c.length){S();return}if(!g&&c.length>1&&c===i){S(c);return}}},[c,g]);function b(t){(e.data.schoolName||e.data.prospectId)&&e.clearData(),t!==i&&a(t)}function x(){b(``),t.current.focus()}function S(t){if(!e.data.latitude&&!e.data.longitude){r(!1);return}r(!0);let n={latitude:e.data.latitude,longitude:e.data.longitude};t&&t.length&&(n.query=t),Zk.search(e.searchUrl,n,e=>s(e),null,()=>r(!1))}function C(t){a(w(t)),e.setData({prospectId:t.id,schoolName:t.name,schoolPostCode:t.postCode,schoolType:t.prospectType,province:t.province,city:t.city,country:t.countryCode})}function w(e){return e.name}let T=(y||_||v)&&!e.disabled&&!f,E=!_&&!v&&o?.length>=tj,D=`form-control`,O=`form-group position-relative text-start`;return e.size===`lg`&&(D+=` form-control-lg`,O+=` ${Uk.large}`),(0,Q.jsxs)(`div`,{className:O,children:[(0,Q.jsxs)(`label`,{className:e.labelClassName,htmlFor:`school-input`,children:[`School`,e.required&&(0,Q.jsx)(`span`,{className:`text-danger`,children:`*`})]}),(0,Q.jsx)(Ff,{id:`school-input`,value:i,onChange:e=>b(e.currentTarget.value),ref:t,className:D,type:`text`,autoComplete:`off`,placeholder:e.placeholder||`Search for your school`,disabled:e.disabled,autoFocus:!0,onClickClear:x,onKeyDown:u,onFocus:m,onBlur:p}),(0,Q.jsx)(`div`,{className:`position-absolute z-1 w-100 ${Uk.dropdown} ${f?`d-none`:``}`,children:(0,Q.jsx)(`div`,{className:`${Uk.suggestionContainer} ${T?``:`d-none`}`,children:(0,Q.jsxs)(`div`,{className:Uk.suggestionContainerInner,ref:d,children:[y?(0,Q.jsx)(ij,{filteredSchoolsList:o,onSchoolSuggestionClick:C,getSchoolName:w,selectedIndex:l}):_&&(0,Q.jsx)(`div`,{className:`${Uk.suggestionLoading} py-4 d-flex justify-content-center`,children:(0,Q.jsx)(Ox,{animation:`border`})}),E&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`hr`,{className:`my-0`}),(0,Q.jsx)(`div`,{className:`${Uk.suggestionItem} ${Uk.noSuggestion} text-secondary text-center`,children:(0,Q.jsxs)(`small`,{children:[`Can't find your school? `,(0,Q.jsx)(`br`,{}),` Try searching to narrow the results`]})})]}),!_&&v&&(0,Q.jsx)(aj,{selected:l===o.length+1,handleNoSuggestion:()=>{e.onClickNoSuggestions(i)}})]})})})]})}function sj(e){return e?.toLowerCase()===`au`?`Enter your school postcode or suburb`:e?.toLowerCase()===`us`?`Enter your school ZIP code or city`:e?.toLowerCase()===`ca`?`Enter your school postal code or city`:`Enter your school postcode or city`}function cj(e){let{email:t,userType:n}=e,[r,i]=Z.useState({schoolLocality:e.schoolLocality,country:e.country,longitude:e.longitude,latitude:e.latitude,city:e.city,province:e.province,prospectId:e.prospectId,schoolName:e.schoolName,schoolType:e.schoolType,schoolPostCode:e.schoolPostCode}),[a,o]=Z.useState(e.trialStatus),[s,c]=Z.useState(),[l,u]=Z.useState(!1),[d,f]=Z.useState(!1),[p,m]=Z.useState(!1),h=ej({...e,prospectStatus:a,loading:l,data:r,canSubmitForm:_,setSubmissionError:c,logStepEvent:v,setLoadingState:y,setProperty:b});function g(){return!!(r&&r.schoolLocality&&r.longitude&&r.latitude)}function _(){if(!r||!t||!n)return!1;let{prospectId:e}=r;return!!(t&&n&&e)}function v(){let t={actionType:BO.Click,descriptor:WO.FindSchool,workflowPhase:UO.Next};e.logUserAction(r||{},t)}function y(e){f(e),m(e),u(e)}function b(t,n){t===`prospectId`&&n&&(u(!0),eA.checkProspectTrialStatus(e.ajaxUrls,{prospectId:n.toString(),email:e.email},e=>{o(e.status)},()=>{console.log(`error`)},()=>{u(!1)})),i(e=>({...e,[t]:n}))}function x(){b(`schoolLocality`,void 0),b(`longitude`,void 0),b(`latitude`,void 0),b(`city`,void 0),b(`province`,void 0),b(`country`,void 0),S()}function S(){b(`prospectId`,void 0),b(`schoolName`,``),b(`schoolPostCode`,void 0),c(void 0)}function C(t){e.nextStep({step:`cant-find-school`,prospectId:r.prospectId,schoolName:t,schoolLocality:r.schoolLocality,longitude:r.longitude,latitude:r.latitude,country:r.country,city:r.city,province:r.province}),e.logUserAction({},{actionType:BO.Click,descriptor:WO.CantFindSchool,workflowPhase:UO.Next})}function w(e){b(`prospectId`,e.prospectId),b(`schoolName`,e.schoolName),b(`schoolPostCode`,e.schoolPostCode),b(`schoolType`,e.schoolType),b(`province`,e.province),b(`city`,e.city),b(`country`,e.country)}function T(e){let{longitude:t,latitude:n,schoolLocality:r,country:i,city:a,province:o}=e;t&&b(`longitude`,t),n&&b(`latitude`,n),i&&b(`country`,i),a&&b(`city`,a),o&&b(`province`,o),r&&b(`schoolLocality`,r)}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Let's find your school`}),(0,Q.jsx)(`p`,{children:sj(e.geoLocation?.countryCode)}),(0,Q.jsx)(Gk,{data:r,setData:T,clearData:x,disabled:d,geoLocation:e.geoLocation,labelClassName:`d-none`,logUserAction:e.logUserAction,googleMapsApiKey:e.googleMapsApiKey,autoFocus:!0,size:`lg`,useGeoLocationApi:!0}),g()&&(0,Q.jsx)(oj,{data:r,setData:w,clearData:S,disabled:p,searchUrl:e.ajaxUrls.searchProspect,onClickNoSuggestions:C,size:`lg`,labelClassName:`d-none`}),s&&(0,Q.jsx)(`p`,{className:`text-danger mb-2`,children:s}),_()&&(0,Q.jsx)(rk,{className:`btn-lg w-100`,variant:`dark`,onClick:h,showSpinner:d||p||l,disabled:d||p||l,children:`Get started`})]})}var lj=[`38A2E8`,`7A76E8`,`40BCC3`,`F7847B`];function uj(e){let[t,n]=Z.useState(null);function r(e){if(!e)return;let t=window.location.pathname+window.location.search;window.location.href=`/challenge?idp=${e.id}&redirectUrl=`+encodeURIComponent(t)}function i(){e.logUserAction({},{actionType:BO.Click,workflowPhase:UO.Next,descriptor:WO.SkipIdpSelect}),e.nextStep({step:`find-school`,email:e.email,userTrialStatus:e.userTrialStatus})}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`h1`,{className:`h4`,children:`Does your school already have ClickView?`}),(0,Q.jsx)(`p`,{children:`Find your school from the list below`}),e.idps.length>4?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(Bf,{id:`idp`,item:t,items:e.idps,onSelect:n,getName:e=>e.name,clearData:()=>n(null),placeholder:`Select a school`,size:`lg`}),(0,Q.jsx)(`button`,{className:`btn btn-lg btn-dark w-100 mb-3`,disabled:!t,onClick:()=>r(t),children:`Continue`})]}):e.idps.map((e,t)=>(0,Q.jsx)(`button`,{className:`btn btn-lg w-100 mb-3`,onClick:()=>r(e),style:{backgroundColor:`#${lj[t%lj.length]}`,color:`#FFF`},children:e.name},t)),(0,Q.jsx)(`button`,{className:`btn btn-link text-info w-100 no-sso-link`,onClick:i,children:`My school does not have ClickView`})]})}var dj={hoverArea:`_hoverArea_1i8nr_1`,defaultImage:`_defaultImage_1i8nr_1`,activeImage:`_activeImage_1i8nr_1`,hoverImage:`_hoverImage_1i8nr_4`};function fj(e){let{as:t=`div`,className:n,...r}=e;return(0,Q.jsx)(t,{className:nd(n,dj.hoverArea),...r,children:e.children})}function pj(e){return e.active?(0,Q.jsx)(`img`,{src:e.src.hovered,className:nd(dj.activeImage,e.className?.hovered)}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`img`,{src:e.src.default,className:nd(dj.defaultImage,e.className?.default)}),(0,Q.jsx)(`img`,{src:e.src.hovered,className:nd(dj.hoverImage,e.className?.hovered)})]})}var mj={Area:fj,Image:pj},hj={userTypeOption:`_userTypeOption_e39ge_1`,selected:`_selected_e39ge_4`,image:`_image_e39ge_8`};function gj(e){return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(mj.Area,{as:Lf,className:`ratio ratio-1x1 d-none d-md-block`,onClick:()=>e.onClick(e.type),children:(0,Q.jsxs)(`div`,{className:nd(`d-flex flex-fill flex-column justify-content-center border rounded-3 mx-auto gap-3 p-3`,hj.userTypeOption,e.selected&&hj.selected),children:[(0,Q.jsx)(mj.Image,{active:e.selected,src:{default:e.defaultImageSrc,hovered:e.hoveredImageSrc},className:{default:nd(`rounded-top mx-auto pb-2 w-auto`,hj.image),hovered:nd(`rounded-top mx-auto pb-2 w-auto`,hj.image)}}),(0,Q.jsx)(`span`,{className:`h4`,children:e.buttonText})]})}),(0,Q.jsx)(Lf,{className:`btn btn-lg btn-outline-dark w-100 d-md-none d-block mx-auto`,onClick:()=>e.onClick(e.type),children:e.buttonText})]})}var _j=function(e){return e.ClickView=`clickview`,e.ClickViewLive=`clickview-live`,e.Bundle=`bundle`,e}({}),vj={[NA.Popup]:{[_j.ClickViewLive]:{title:`Tune in to live programs without leaving the classroom`,description:`Let's get you set up so you can access ClickView Live. Who would you like to sign up as?`},[_j.ClickView]:{title:`Access thousands of standard-aligned videos`,description:`Let's get you set up so you can access ClickView. Who would you like to sign up as?`},[_j.Bundle]:{title:`Access thousands of standard-aligned videos`,description:`Let's get you set up so you can access ClickView. Who would you like to sign up as?`}},[NA.FullPage]:{[_j.ClickViewLive]:{title:`Let’s create your ClickView Live account`},[_j.ClickView]:{title:`Let’s create your ClickView account`},[_j.Bundle]:{title:`Let’s create your ClickView account`}}},yj={[NA.Popup]:{itemClassName:`col-md-6 col-lg-4 col-xl-5`,containerClassName:`col-11`,titleClassName:`h4`},[NA.FullPage]:{itemClassName:`col-12 col-md-6`,containerClassName:`col-10 col-xl-8`,titleClassName:`h2 mb-3`}};function bj(e){let{signupVariant:t}=e,{title:n,description:r}=vj[e.type][t];function i(t){if(e.logUserAction({userType:t},{actionType:BO.Click,workflowPhase:UO.Next,descriptor:t===lk.Staff?WO.Educator:WO.Student}),t===lk.Staff){e.nextStep({step:`enter-email`,userType:t});return}e.nextStep({step:`enter-age`,userType:t})}let a=yj[e.type];return(0,Q.jsx)(`div`,{className:`row justify-content-center`,children:(0,Q.jsxs)(`div`,{className:a.containerClassName,children:[(0,Q.jsx)(`h1`,{className:a.titleClassName,children:n}),r&&(0,Q.jsx)(`p`,{className:`mb-3`,children:r}),(0,Q.jsxs)(`div`,{className:`row justify-content-center text-center g-3`,children:[(0,Q.jsx)(`div`,{className:a.itemClassName,children:(0,Q.jsx)(gj,{type:lk.Staff,buttonText:`I am an educator`,defaultImageSrc:e.imageUrls.educator?.default,hoveredImageSrc:e.imageUrls.educator?.hovered,onClick:i,selected:e.userType===lk.Staff})}),(0,Q.jsx)(`div`,{className:a.itemClassName,children:(0,Q.jsx)(gj,{type:lk.Learner,buttonText:`I am a student`,defaultImageSrc:e.imageUrls.student?.default,hoveredImageSrc:e.imageUrls.student?.hovered,onClick:i,selected:e.userType===lk.Learner})})]})]})})}var xj={"select-type":bj,"enter-email":JA,"find-school":cj,"cant-find-school":sA,completed:MA,"add-to-braze":mk,"enter-age":zA,"request-access":ZA,"request-bdm-trial":$A,"select-idp":uj};function Sj(e){let{state:t,geoLocation:n,layout:r,hasPreviousStep:i,googleMapsApiKey:a,pageAppLinkString:o,entryPage:s,back:c,nextStep:l,complete:u,logUserAction:d,logBrazeEvent:f,imageUrls:p,ajaxUrls:m,productName:h,getSignInUrl:g,globalIdps:_,createOrUpdateProfile:v,getCrmIdForProspect:y,signupVariant:b,type:x}=e,S=xj[t.currentStepId],C={...t,geoLocation:n,googleMapsApiKey:a,pageAppLinkString:o,entryPage:s,back:c,nextStep:l,complete:u,logUserAction:d,imageUrls:p,ajaxUrls:m,productName:h,getSignInUrl:g,logBrazeEvent:f,globalIdps:_,createOrUpdateProfile:v,getCrmIdForProspect:y,signupVariant:b,type:x},w=r;if(!w)return(0,Q.jsx)(S,{...C});let T=KO.last(e.state.previousStepIds)===`completed`;return(0,Q.jsx)(w,{geoLocation:e.geoLocation,currentStep:t.currentStepId,previousStep:c,closeApp:e.close,logUserAction:d,hasPreviousStep:i,showBackButton:!T,imageUrls:e.imageUrls,getSignInUrl:g,children:(0,Q.jsx)(S,{...C})})}var Cj=[`email`,`longitude`,`latitude`,`trialCreated`,`idps`],wj={filterBlacklistedKeys(e){let t={...e};return Cj.forEach(e=>delete t[e]),t}};function Tj(e){let t=[...e.previousStepIds],n=t.pop();return{...e,previousStepIds:t,currentStepId:n}}function Ej(e){return Object.entries(e).filter(([,e])=>e!==null).reduce((e,[t,n])=>({...e,[t]:n}),{})}function Dj(e,t){let n={...e,previousStepIds:[...e.previousStepIds,e.currentStepId],currentStepId:t.step};if(t.step===`select-type`)return{...n};if(t.step===`enter-email`||t.step===`enter-age`)return{...n,userType:t.userType};if(t.step===`select-idp`)return{...n,email:t.email,userTrialStatus:t.userTrialStatus,idps:t.idps};if(t.step===`find-school`)return{...n,email:t.email,userTrialStatus:t.userTrialStatus};if(t.step===`cant-find-school`)return{...n,prospectId:t.prospectId,schoolName:t.schoolName,schoolLocality:t.schoolLocality,country:t.country,longitude:t.longitude,latitude:t.latitude,city:t.city,province:t.province};if(t.step===`add-to-braze`||t.step===`completed`||t.step===`request-access`||t.step===`request-bdm-trial`){let e={...t};return delete e.type,delete e.step,e=Ej(e),{...n,...e}}}function Oj(e,t){switch(t.type){case`nextStep`:return Dj(e,t);case`back`:return Tj(e)}}var kj=({location:e,initialValues:t,entryPage:n,onStepUpdate:r,externalLogUserAction:i})=>{let a={currentStepId:`select-type`,previousStepIds:[],...pk.removeEmptyKeys(t)},[o,s]=Z.useReducer(Oj,a);Z.useEffect(()=>{r?.(o)},[o.currentStepId]);function c(){s({type:`back`})}function l(e){s({type:`nextStep`,...e})}function u(e){s({type:`nextStep`,step:`completed`,...e})}function d(t,r){let a={...o,...t},s=wj.filterBlacklistedKeys(a),c={currentStepId:o.currentStepId,...s};n&&(c.entryPage=n),i(Object.entries(c).filter(([,e])=>e!==void 0).reduce((e,[t,n])=>({...e,[t]:n}),{}),{entity:VO.SignUp,location:e,...r})}return{state:o,back:c,nextStep:l,complete:u,hasPreviousStep:!!o.previousStepIds.length,logUserAction:d}},Aj={statusImages:{available:`/images/sign-up/available-v2.png`,active:`/images/sign-up/active-v2.png`,expired:`/images/sign-up/expired-v2.png`,notRequired:`/images/sign-up/active-v2.png`,unavailable:`/images/sign-up/unavailable-v2.png`,unsupported:`/images/sign-up/unavailable-v2.png`,autoJoin:`/images/sign-up/active-v2.png`,requestAccess:`/images/sign-up/active-v2.png`}};function jj(e){let t={currentStepId:`find-school`,previousStepIds:[],email:e.email,userType:lk.Staff},n=e.geoLocation?.countryCode?e.geoLocation:{countryCode:$.US,isFallback:!0},{complete:r,...i}=kj({location:HO.AuthProspectSelect,initialValues:t,externalLogUserAction:d}),[a,o]=Z.useState(null);Z.useEffect(()=>{xd.get(`/ajax/config`).then(e=>o(e))},[]);let s=AD(a?.gatewayApi),c=Z.useMemo(()=>{if(!a)return null;let e={cvApSoutheast1:a.analytics[KD.CvApSoutheast1].collectionApi,cvApSoutheast2:a.analytics[KD.CvApSoutheast2].collectionApi,cvEuWest1:a.analytics[KD.CvEuWest1].collectionApi,cvNaWest1:a.analytics[KD.CvNaWest1].collectionApi};return new zO({productName:`auth.web`,productVersion:a.version,regionName:tk.getRegionName(n?.countryCode),collectionApiUrls:e,collectionApiClientId:`cv_auth`,getUser:()=>null,logAttributionData:!0,logUtmParameters:!0})},[a]),l=Z.useMemo(()=>{if(!a?.braze)return null;let e=a.braze[tk.getRegionName(n?.countryCode)];return new ED.BrazeClient({apiOptions:{apiKey:e.apiKey,baseUrl:e.url,productName:`auth.web`,productVersion:a.version,allowUserSuppliedJavascript:!1,automaticallyShowInAppMessages:!1}})},[a]);DD({additionalData:e.additionalData});function u(e){if(!l)return;let t=rf.getDecodedAttributionData(),n=e.event?.additionalData||{};t?.originalReferrer&&(n.original_referrer=t.originalReferrer),t?.internalReferrer&&(n.internal_referrer=t.internalReferrer);let r={...e.event,additionalData:n};l.setUserInit(e.user),l.event.log(r)}function d(e,t){c?.log({type:t.actionType,data:e,actionContext:{productArea:`prospect_select`,entity:t.entity,location:t.location,descriptor:t.descriptor,workflowPhase:t.workflowPhase},eventVersion:t.eventVersion||GO.V1})}function f(t){if(!t.trialCreated){r(t);return}xd.post(`/ajax/login/select-customer`,{customerId:t.customerId,returnUrl:e.returnUrl}).then(t=>zd(t,e))}function p(){e.navigate({step:e.backStep,backStep:null})}async function m(e){try{return(await xd.get(s.prospectLookups(e))).find(e=>e.type===XA.CrmId)?.externalId}catch{return}}if(!a)return(0,Q.jsx)(Q.Fragment,{});let h={...i,type:NA.FullPage,signupVariant:_j.ClickView,complete:f,googleMapsApiKey:a.googleMapsApiKey,ajaxUrls:s,imageUrls:Aj,geoLocation:n,productName:kD.Auth,getSignInUrl:()=>``,logBrazeEvent:u,getCrmIdForProspect:m};return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(rd,{theme:e.theme,onClickBack:!!e.backStep&&p}),(0,Q.jsx)(Sj,{...h})]})}function Mj(e){return(0,Q.jsxs)(`div`,{className:`text-center`,children:[(0,Q.jsx)(rd,{theme:e.theme}),(0,Q.jsx)(`img`,{className:`img-fluid mb-4`,alt:`error`,src:`/images/errors/email-not-allowed-v2.png`}),(0,Q.jsx)(`h1`,{className:`h2 mb-3`,children:`Oops! Make sure to use your school email address`}),(0,Q.jsx)(`p`,{className:`mb-3`,children:`This includes the email you use to sign in to Google or Microsoft.`}),(0,Q.jsx)(`a`,{href:e.liteUrl+`sign-up`,className:`btn btn-lg btn-dark w-100 text-decoration-none`,children:`Try again`})]})}var Nj={username:Zu,"username-input":wf,"username-or-guest":Tf,"guest-selection":Wf,password:Jf,"select-idp":Xf,error:jC,"verify-email":np,"verify-email-check-code":lp,"verify-email-link-success":dp,"verify-email-skip-reason":IC,"forgot-password":fp,"forgot-password-check-code":pp,"reset-password":wC,"change-password":TC,"self-activation":EC,"self-activation-check-code":DC,"verify-email-link-email-in-use":NC,"verify-email-code-email-in-use":PC,logout:LC,loggedout:RC,"activate-user":TE,"select-customer":kE,"trial-expired":LE,"link-account":_D,"link-account-code":vD,invite:SD,"invite-success":CD,"select-user-type":TD,"prospect-select":jj,"email-not-allowed":Mj,"organisation-select-customer":zC,"contact-support":AC};function Pj(e,t){if(t.type!==`navigate`)return e;let n=Object.keys(t.data).reduce((e,n)=>{if(n!==`bannerType`)return t.data[n]!==void 0&&(e={...e,[n]:t.data[n]}),e},{});return t.data.clearUsername&&(n.username=void 0,n.clearUsername=void 0),{...e,...n}}function Fj(e,t){return t.type===`setBanner`?{...e,bannerType:t.data.bannerType}:e}function Ij(e,t){switch(t.type){case`navigate`:return Pj(e,t);case`setBanner`:return Fj(e,t)}}var Lj={footer:`_footer_psbd8_1`};function Rj(e){return(0,Q.jsx)(`div`,{className:`text-center p-2 text-secondary small`,children:(0,Q.jsxs)(`ul`,{className:`d-flex flex-wrap list-unstyled justify-content-center`,children:[(0,Q.jsx)(`li`,{children:(0,Q.jsxs)(`span`,{children:[`2003 - `,new Date().getFullYear(),` © ClickView Pty Limited`]})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`a`,{href:e.privacyPolicyUrl,className:`text-secondary`,children:(0,Q.jsx)(`strong`,{children:`Privacy Policy`})})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`a`,{href:e.termsAndConditionsUrl,className:`text-secondary`,children:(0,Q.jsx)(`strong`,{children:`Terms and Conditions`})})}),`\xA0|\xA0`,(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`span`,{children:e.version})})]})})}function zj(e){return(0,Q.jsx)(`footer`,{className:Lj.footer,children:(0,Q.jsx)(Rj,{...e})})}var Bj=`M317.302 140.594C356.23 163.069 356.23 219.257 317.302 241.731L87.9302 374.159C36.1933 404.029 -21.7046 346.131 8.16593 294.394L50.9108 220.359C61.3416 202.293 61.3416 180.034 50.9109 161.967L8.16512 87.9294C-21.7052 36.1925 36.1927 -21.7052 87.9295 8.16518L317.302 140.594Z`;function Vj(){return(0,Q.jsxs)(`svg`,{viewBox:`0 0 2420 383`,children:[(0,Q.jsx)(`title`,{children:`ClickView Logo`}),(0,Q.jsx)(`path`,{fill:`#f8981d`,d:Bj}),(0,Q.jsx)(`path`,{fill:`#313543`,d:`M611.506 37.93c32.531 0 61.155 7.86 85.686 23.732 24.569 15.898 42.448 38.445 53.64 67.43l2.553 6.609h-55.686l-1.301-2.829c-7.699-16.724-18.767-29.458-33.196-38.377l-.11-.069-.014-.01c-13.652-8.57-30.142-13.096-49.669-13.371l-1.903-.014c-19.522 0-36.885 4.537-52.213 13.522-15.305 8.973-27.345 21.774-36.129 38.544l-.015.029c-8.74 16.421-13.202 35.916-13.202 58.645 0 22.414 4.447 41.908 13.188 58.62l.847 1.564.825 1.465c8.613 15.034 20.102 26.719 34.486 35.152 15.328 8.985 32.691 13.521 52.213 13.521l1.906-.013c19.595-.268 36.134-4.686 49.812-13.045 14.419-8.92 25.48-21.649 33.175-38.367l1.3-2.826h55.708l-2.58 6.622c-11.198 28.71-29.078 51.11-53.635 67l-.091.058-.031.017c-24.507 15.544-53.089 23.239-85.564 23.239-27.772 0-53.222-6.451-76.248-19.403l-.022-.013-.007-.004-.117-.066-.021-.015c-22.685-13.233-40.648-31.506-53.841-54.737-13.252-23.335-19.83-49.632-19.83-78.769 0-29.136 6.578-55.434 19.83-78.768 13.169-23.468 31.098-41.866 53.747-55.1l.016-.012.205-.118c23.032-13.244 48.497-19.843 76.288-19.843M853.29 344.778h-48.522V37.935h48.522zm108.133 0H912.9V125.985h48.523zM937.586 37.93c8.392 0 15.617 3.072 21.365 9.12l.557.571c5.665 5.944 8.519 13.236 8.519 21.603 0 8.638-3.042 16.128-9.076 22.174-5.748 6.047-12.973 9.121-21.365 9.121-8.649 0-16.147-3.05-22.197-9.099-6.049-6.049-9.098-13.547-9.098-22.196 0-8.648 3.049-16.147 9.098-22.196s13.548-9.098 22.197-9.098m883.954 306.848h-48.52V125.985h48.52zM1797.71 37.93c8.39 0 15.61 3.072 21.36 9.12l.56.571c5.66 5.944 8.52 13.236 8.52 21.603 0 8.638-3.04 16.128-9.08 22.174-5.75 6.047-12.97 9.121-21.36 9.121-8.65 0-16.15-3.05-22.2-9.099s-9.1-13.547-9.1-22.196c0-8.648 3.05-16.147 9.1-22.196s13.55-9.098 22.2-9.098m-685.63 88.056c.18-.001.55-.007.8-.007h.02l1.27.007c.22-.001.58-.007.87-.007l1.23.005c25.71.192 47.32 6.421 64.47 19.041 17.63 12.79 29.21 30.547 34.76 52.985l1.49 6.025h-50.78l-1-3.522c-.03-.077-.03-.089-.05-.138-3.68-8.706-9.16-15.814-16.48-21.406l-.01-.012-.08-.064c-9.02-7.051-20.36-10.823-34.31-11.058l-1.42-.011c-18.69.005-33.52 6.889-44.94 20.703v.013l-.07.082c-3.49 4.155-6.47 8.877-8.93 14.186-3.21 9.073-4.87 19.779-4.87 32.199l.01 1.197.01 1.149c.2 11.745 1.9 21.943 5 30.664 2.43 5.277 5.37 9.989 8.8 14.153 11.43 13.858 26.29 20.763 45.01 20.763l1.37-.011c14-.221 25.37-3.876 34.4-10.69 7.21-5.445 12.74-12.723 16.56-21.979.01-.015.01-.03.02-.051l1.03-3.483h50.85l-1.64 6.118c-5.82 21.7-17.53 39.258-35.06 52.487l-.14.103-.04.022c-17.34 12.78-38.78 19.123-63.98 19.319l-1.21.005c-.21 0-.53-.004-.68-.005l-1.45.009h-.03c-.4 0-.82-.006-1.16-.009l-.91.005h-.02c-20.35 0-38.67-4.463-54.82-13.501l-.03-.013-.09-.053c-15.42-8.796-27.62-21.14-36.53-36.934l-.01-.014-.01-.014-.82-1.481-.01-.013-.01-.014c-8.73-16.072-13.15-34.684-13.42-55.69v-.023l-.01-1.99v-.026c0-21.601 4.42-40.66 13.45-57.012v-.005l.82-1.481.01-.013.01-.015c8.91-15.794 21.11-28.138 36.53-36.934l.09-.053.03-.014c16.15-9.038 34.47-13.501 54.82-13.501h.02zm483.02 158.82 89.96-246.876h51.35l-115.78 306.848h-51.48L1453.37 37.93h51.77zm375.01-158.827c19.94 0 37.78 4.354 53.37 13.192 15.55 8.809 27.53 21.032 35.85 36.604l.66 1.205.01.013v.013c7.04 13.033 10.99 27.498 11.91 43.315q.21 3.607.21 7.301v1.239c-.05 6.217-.43 12.744-1.13 19.576l-.45 4.359h-156.39c.98 8.318 3.05 15.659 6.15 22.076a60 60 0 0 0 8.24 10.724c11.63 11.489 25.5 17.231 41.88 17.334 13.51-.053 24.36-3.558 32.89-10.222 6.94-5.49 12.28-12.323 16.04-20.561l1.3-2.839h50.42l-1.73 6.17c-5.75 20.496-17.3 37.279-34.51 50.223l-.01.009-.02.009-.01.011c-17.36 12.794-38.78 19.047-63.92 19.047l-.21-.001-.07-.001-.46.002h-.02c-19.96 0-38.04-4.488-54.1-13.557l-.01-.004-.01-.006-.01-.004v-.003c-15.78-9.051-28.19-21.853-37.22-38.29l-.02-.029-.08-.162c-8.77-16.289-13.23-34.896-13.5-55.694v-.026l-.01-1.968v-.025c0-21.589 4.32-40.745 13.12-57.32 8.66-16.295 20.76-28.919 36.28-37.747l.74-.418c16.08-9.071 34.4-13.544 54.82-13.545m-1.7 41.839c-14.73 0-27.09 4.424-37.36 13.179-8.74 7.62-14.31 17.908-16.51 31.206h108.22c-.65-8.377-3-15.493-6.92-21.486l-.04-.065-.01-.01c-4.73-7.419-11.19-12.981-19.49-16.726l-.02-.007-.04-.023-.05-.023-.04-.017c-8.2-3.989-17.41-6.028-27.74-6.028m372.35 176.959h-46.41l-45.08-148.561-45.08 148.561h-46.39l-68.68-218.797h49.14l42.94 156.786 46.36-156.786h46.09l45.2 156.683L2361 125.98l47.88-.002zM1309.64 210.55l73.43-84.564h61.94l-103.03 109.019 103.39 109.773h-60.74l-74.99-84.406v84.406h-48.52V37.935h48.52z`})]})}var Hj=function(e){return e[e.Audience=1]=`Audience`,e[e.Category=2]=`Category`,e[e.Channel=3]=`Channel`,e[e.Chapter=4]=`Chapter`,e[e.Comment=5]=`Comment`,e[e.OwnerComment=6]=`OwnerComment`,e[e.Image=7]=`Image`,e[e.Thumbnail=8]=`Thumbnail`,e[e.Avatar=9]=`Avatar`,e[e.Banner=10]=`Banner`,e[e.Video=11]=`Video`,e[e.Trailer=12]=`Trailer`,e[e.Rating=13]=`Rating`,e[e.Topic=14]=`Topic`,e[e.Series=15]=`Series`,e[e.Season=16]=`Season`,e[e.HostedMediaObjectCollection=17]=`HostedMediaObjectCollection`,e[e.ExchangeCollection=18]=`ExchangeCollection`,e[e.CustomMediaObjectCollection=19]=`CustomMediaObjectCollection`,e[e.Playlist=20]=`Playlist`,e[e.ClickViewTvCollection=21]=`ClickViewTvCollection`,e[e.ClickViewProductionsCollection=22]=`ClickViewProductionsCollection`,e[e.User=23]=`User`,e[e.SystemUser=24]=`SystemUser`,e[e.Customer=25]=`Customer`,e[e.Country=26]=`Country`,e[e.Organisation=28]=`Organisation`,e[e.SystemOrganisation=29]=`SystemOrganisation`,e[e.Group=30]=`Group`,e[e.SystemGroup=31]=`SystemGroup`,e[e.FlagReason=32]=`FlagReason`,e[e.Library=33]=`Library`,e[e.Interactive=34]=`Interactive`,e[e.WorkspaceCollection=35]=`WorkspaceCollection`,e[e.Conversation=36]=`Conversation`,e[e.Message=37]=`Message`,e[e.Notification=38]=`Notification`,e[e.Clip=39]=`Clip`,e[e.Link=40]=`Link`,e[e.UserChannel=41]=`UserChannel`,e[e.Resource=42]=`Resource`,e[e.VideoStream=43]=`VideoStream`,e[e.AudioStream=44]=`AudioStream`,e[e.Tag=45]=`Tag`,e[e.Subtitle=46]=`Subtitle`,e[e.LicencedContentCollection=47]=`LicencedContentCollection`,e[e.PublicCollection=48]=`PublicCollection`,e[e.CategoryTree=49]=`CategoryTree`,e[e.Logo=50]=`Logo`,e[e.Permission=51]=`Permission`,e[e.Subject=52]=`Subject`,e[e.Field=53]=`Field`,e[e.Company=54]=`Company`,e[e.Person=55]=`Person`,e[e.Cover=56]=`Cover`,e[e.Poster=57]=`Poster`,e[e.SubjectAudience=58]=`SubjectAudience`,e[e.TallPoster=60]=`TallPoster`,e[e.Classroom=67]=`Classroom`,e[e.ClassroomGroup=68]=`ClassroomGroup`,e[e.UserProfile=74]=`UserProfile`,e[e.PartnerProfile=78]=`PartnerProfile`,e[e.LearningLevel=79]=`LearningLevel`,e}({}),Uj={left:`_left_1r3w0_1`,leftWithImage:`_leftWithImage_1r3w0_10`,bgCover:`_bgCover_1r3w0_14`,bgFull:`_bgFull_1r3w0_17`,right:`_right_1r3w0_20`,rightContent:`_rightContent_1r3w0_28`,narrowContent:`_narrowContent_1r3w0_34`,logo:`_logo_1r3w0_37`,buttonContainer:`_buttonContainer_1r3w0_43`,blur:`_blur_1r3w0_53`,imageContainer:`_imageContainer_1r3w0_65`,imagePosition:`_imagePosition_1r3w0_73`,image:`_image_1r3w0_65`,thumbnail:`_thumbnail_1r3w0_87`,tallposter:`_tallposter_1r3w0_90`,cover:`_cover_1r3w0_96`,contentBody:`_contentBody_1r3w0_102`,contentBodyBase:`_contentBodyBase_1r3w0_106`};function Wj(e){switch(e){case Hj.Video:case Hj.Interactive:case Hj.Clip:return Uj.thumbnail;case Hj.Subject:case Hj.Playlist:return Uj.cover;case Hj.Series:return Uj.tallposter;default:return``}}function Gj(e){return(0,Q.jsx)(`div`,{className:`d-flex`,children:e.children})}function Kj(e){return(0,Q.jsx)(`div`,{className:`${Uj.left} ${e.className?e.className:``}`,children:e.children})}function qj(e){let[t,n]=Z.useState(!1),[r,i]=Z.useState(``);return Z.useEffect(()=>{if(!e.imageUrl){let t=e.fallbackImages[Math.floor(Math.random()*e.fallbackImages.length)];i(t.bgUrl);return}let t=new Image;return t.onload=()=>n(!0),t.src=e.imageUrl,()=>t.onload=null},[e.imageUrl]),(0,Q.jsx)(`div`,{className:`${Uj.left} ${Uj.leftWithImage} ${Uj.bgCover} bg-light`,style:{backgroundImage:r?`url('${r}')`:``},children:t&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:Uj.blur,style:{backgroundImage:`url('${e.imageUrl}')`}}),(0,Q.jsx)(`div`,{className:`${Uj.imageContainer} ${Wj(e.objectType)}`,children:(0,Q.jsx)(`div`,{className:Uj.imagePosition,children:(0,Q.jsx)(`img`,{className:Uj.image,src:e.imageUrl,alt:e.title})})})]})})}function Jj(e){let[t,n]=Z.useState(``);return Z.useEffect(()=>{let t=e.images[Math.floor(Math.random()*e.images.length)];n(t.bgUrl)},[]),(0,Q.jsx)(`div`,{className:`${Uj.left} bg-blue d-flex align-items-center`,children:t&&(0,Q.jsx)(`img`,{className:`img-fluid`,src:t,draggable:!1})})}var Yj={cover:Uj.bgCover,full:Uj.bgFull};function Xj(e){let t={backgroundImage:e.imageUrl?`url("${e.imageUrl}")`:``};return e.backgroundColor&&(t.backgroundColor=e.backgroundColor),(0,Q.jsx)(`div`,{className:`${Uj.left} ${Uj.leftWithImage} ${Yj[e.imageSize||`cover`]} d-flex align-items-center`,style:t,title:e.title})}function Zj(e){return(0,Q.jsx)(`div`,{className:`${Uj.right} ${e.className?e.className:``}`,children:e.children})}function Qj(e){let t=e?.logoComponent||Vj;return(0,Q.jsxs)(`div`,{className:`position-relative`,children:[!!e.bannerComponent&&e.bannerComponent,(0,Q.jsx)(`div`,{className:nd(Uj.logo,`position-absolute`,e.className?.logoContainer),children:(0,Q.jsx)(t,{})}),e.children]})}function $j(e){return(0,Q.jsx)(`div`,{className:nd(Uj.rightContent,`d-flex flex-column justify-content-center h-100`,e?.className),children:e.children})}var eM={base:Uj.contentBodyBase,full:``};function tM(e){let t=eM[e.width||`base`];return(0,Q.jsx)(`div`,{className:nd(Uj.contentBody,t,`m-auto p-3`,e.className),children:e.children})}Gj.NarrowContent=nM;function nM(e){return(0,Q.jsx)(`div`,{className:`${Uj.narrowContent} mx-auto w-100 ${e.className?e.className:``}`,children:e.children})}function rM(e){return(0,Q.jsx)(`div`,{className:nd(`position-fixed bg-white d-flex align-items-center`,Uj.buttonContainer,e?.className),children:e.children})}Gj.Left=Kj,Gj.LeftImage=qj,Gj.LeftProductImage=Jj,Gj.LeftImageWithBackground=Xj,Gj.Right=Zj,Gj.Header=Qj,Gj.Content=$j,Gj.ContentBody=tM,Gj.Buttons=rM;function iM(){function e(n){n.key===`Tab`&&(document.body.classList.add(`user-is-tabbing`),window.removeEventListener(`keydown`,e),window.addEventListener(`mousedown`,t))}function t(){document.body.classList.remove(`user-is-tabbing`),window.removeEventListener(`mousedown`,t),window.addEventListener(`keydown`,e)}(0,Z.useEffect)(()=>(window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)),[])}var aM={full:`_full_vw1kz_1`,themeBannerClearance:`_themeBannerClearance_vw1kz_9`};function oM(e){return e.imageType===`background`?(0,Q.jsx)(Gj.LeftImageWithBackground,{imageUrl:e.imageUrl}):e.imageType===`image`?(0,Q.jsx)(Gj.LeftImageWithBackground,{imageUrl:e.imageUrl,imageSize:`full`,backgroundColor:e.backgroundColor,title:e.title}):(0,Q.jsx)(Q.Fragment,{})}function sM(e){let{children:t,footer:n,bannerType:r,theme:i}=e,[a,o]=Z.useState(null);iM();let{imageUrls:s,imageType:c,backgroundColor:l,banner:u,title:d,logoComponent:f,bannerSpacer:p}=Ld.getDefinition(i),m=s[e.geoLocation?.countryCode?.toLowerCase()]||s.default;Z.useEffect(()=>{let e=Math.floor(Math.random()*m.length);o(m[e])},[]);let h=c!==`none`,g=!!r,_=[`plugin`].includes(r);return(0,Q.jsxs)(Gj,{children:[h&&(0,Q.jsx)(oM,{title:d,imageUrl:a,imageType:c,backgroundColor:l}),(0,Q.jsxs)(Gj.Right,{className:nd(!h&&aM.full),children:[(0,Q.jsx)(Gj.Header,{bannerComponent:!!u&&(0,Q.jsx)(Cd,{bannerType:u}),logoComponent:f,className:{logoContainer:!!u&&aM.themeBannerClearance}}),(0,Q.jsxs)(Gj.Content,{className:nd(!h&&`px-0 w-100`,`pb-0`),children:[!_&&(0,Q.jsx)(Cd,{bannerType:r}),(0,Q.jsxs)(Gj.ContentBody,{children:[t,!_&&g&&(0,Q.jsx)(p,{})]}),(0,Q.jsx)(zj,{...n})]})]})]})}function cM(e){let{step:t,returnUrl:n,data:r={},footer:i,geoLocation:a,theme:o,additionalData:s}=e,[c,l]=Z.useReducer(Ij,{step:t,returnUrl:n,geoLocation:a,theme:o,additionalData:s,...r});function u(e){l({type:`navigate`,data:e})}let d=Nj[c.step];return d||zd({step:t,data:r},null),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(sM,{footer:{...i,...c},bannerType:c.bannerType,step:t,theme:o,geoLocation:a,children:!!d&&(0,Q.jsx)(d,{navigate:u,dispatch:l,...c})}),!1]})}function lM(e){let{id:t,returnUrl:n,footer:r,region:i,config:a,theme:o,additionalData:s}=e,c=e.currentStep||{};(0,Gu.createRoot)(document.getElementById(t)).render((0,Q.jsx)(cM,{returnUrl:n,step:c.step,data:{...a,...c.data},footer:r,geoLocation:i,theme:c.data?.theme||o,additionalData:s}))}window.cvauth={start:lM};
61
- //# sourceMappingURL=index-ONpk5m_v.js.map
61
+ //# sourceMappingURL=index-cUFAvLru.js.map