aiware-js 1.0.0-master.1907 → 1.0.0-master.1908

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.
package/index.umd.js CHANGED
@@ -3228,7 +3228,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3228
3228
  fill: #212121;
3229
3229
  stroke-width: 0px;
3230
3230
  }
3231
- `})}),(0,NN.jsx)(`g`,{id:`primary`,children:(0,NN.jsxs)(`g`,{id:`veritone_logo_primary_RGB_cosmos`,children:[(0,NN.jsxs)(`g`,{children:[(0,NN.jsx)(`path`,{className:`cls-1`,d:`M159.5026259.8501463c-1.611277,0-2.9787507.550335-4.0643658,1.6363683-1.0860333,1.0860333-1.6367865,2.453507-1.6367865,4.064784,0,1.5502216.5507531,2.8863312,1.6363683,3.9694372,1.0847788,1.0864515,2.4522524,1.6372047,4.064784,1.6372047,1.5418579,0,2.8888403-.5461531,4.0041468-1.6238227,1.1261794-1.0877061,1.6970055-2.4279975,1.6970055-3.9828192,0-1.6158771-.5708261-2.9875326-1.6978419-4.078166-1.1161428-1.0768332-2.4631253-1.6229863-4.0033104-1.6229863Z`}),(0,NN.jsx)(`polygon`,{className:`cls-1`,points:`154.841132 22.7520748 154.841132 69.6152806 164.0696926 69.6152806 164.0696926 19.9386786 154.841132 22.7520748`})]}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M88.9585505,18.7109702c-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046ZM99.7327372,31.1215252c2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319,2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M189.3478424,0l-9.2289833,2.8298759v16.8261985h-10.7729322v8.5669923h10.7729322v23.7835865c0,5.878882,1.4904208,10.3321624,4.4290254,13.2356393,2.934841,2.9018041,7.4642314,4.3729883,13.4631333,4.3729883h5.8901731v-8.5674105h-5.8901731c-3.1543895,0-5.4117664-.657391-6.7089845-1.9541909-1.2967999-1.2972181-1.9541909-3.5863773-1.9541909-6.8034949v-24.0671177h14.5533486v-8.5669923h-14.5533486V0Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M231.6546328,18.7109702c-7.3768302,0-13.6550815,2.5041077-18.6599513,7.4433221-5.0086335,4.9442326-7.5482872,11.1622649-7.5482872,18.4813852,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0031971,4.9387962,11.2818665,7.4437402,18.6599513,7.4437402,7.378503,0,13.656336-2.5045259,18.6599513-7.4437402,5.0086335-4.9425599,7.5482872-11.1605921,7.5482872-18.480967,0-7.3191203-2.5396536-13.5371526-7.5482872-18.4813852-5.0048698-4.9392144-11.2831211-7.4433221-18.6599513-7.4433221ZM231.6546328,61.8039534c-4.7857395,0-8.6937031-1.6108588-11.9467849-4.9245778-3.2589364-3.3179008-4.8434494-7.322884-4.8434494-12.2436981,0-4.8526495,1.6296773-8.9717979,4.8434494-12.2436981l.0004182-.0004182c3.2526636-3.3133008,7.1606272-4.9241596,11.9463667-4.9241596,4.8476313,0,8.7710679,1.5953859,11.9936219,4.8769044,3.1828262,3.2417907,4.7966124,7.3772484,4.7966124,12.2913715,0,4.9153777-1.6137862,9.0508354-4.7966124,12.2913715-3.2217177,3.2815185-7.1447361,4.8769044-11.9936219,4.8769044Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M289.395475,18.7109702c-4.3780066,0-8.2838792,1.2817452-11.6101438,3.8092713-2.0119008,1.5288941-3.6804695,3.3910837-4.9914878,5.5639867v-8.428154h-9.2285652v49.9592063h9.2285652v-28.3815597c0-4.0217107,1.3164547-7.2643377,4.0254744-9.9135565,2.7136197-2.656328,6.0854667-3.9472733,10.3079075-3.9472733,3.8268352,0,6.9444242,1.2997272,9.5309148,3.9732009,2.5956908,2.6851829,3.8573629,5.9194462,3.8573629,9.8876289v28.3815597h9.2289833v-29.2321534c0-6.1711952-1.9240814-11.3763769-5.7195525-15.4704341-3.8176351-4.1149665-8.7397038-6.2017229-14.6294587-6.2017229Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M359.7852391,26.8551748c-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796ZM330.1629166,31.0817974c2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655,2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319Z`}),(0,NN.jsxs)(`g`,{children:[(0,NN.jsx)(`polygon`,{className:`cls-1`,points:`55.314171 18.9725847 27.6383499 61.7193071 33.3546939 70.5603847 66.7413769 18.9725847 55.314171 18.9725847`}),(0,NN.jsx)(`polygon`,{className:`cls-1`,points:`32.5518799 51.5991531 11.4276733 18.9726882 0 18.9726882 21.1152954 51.5991531 32.5518799 51.5991531`})]}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M148.2136224,19.1065266c-4.7230092-.8650191-8.9683997-.1471853-12.6188146,2.1290521-2.4020294,1.4985026-4.3988104,3.7671606-5.9704166,6.7739455v-8.3157235l-9.2285412,2.8133903v47.1080896h9.2285412v-28.3815751c0-4.7233759,1.7275933-8.2898072,5.2813108-10.903446,3.5830568-2.6349098,7.7975189-3.3627679,12.8822567-2.2275831l1.3038855.2916811v-9.126954l-.8782218-.1608769Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M366.5136132,66.7238363v-.3888638h2.3283219v.3888638h-.9575771v2.4790067h-.4131678v-2.4790067h-.9575771ZM369.2453813,66.3349725h.4812189l1.0207674,2.1047253,1.0159066-2.1047253h.4812189v2.8678704h-.4131678v-2.0950037l-.9381339,1.8908502h-.2965086l-.9381339-1.8859894v2.0901429h-.4131678v-2.8678704Z`})]})})]}),adf=(0,rdf.forwardRef)(idf)})),sdf,cdf=s((()=>{sdf=`data:image/png;base64,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`})),ldf=s((()=>{})),PN,udf,ddf=s((()=>{W(),ldf(),PN=L(),udf=({showLogoInFooter:e,loginConfigs:t})=>(0,PN.jsxs)(B,{sx:{textAlign:`center`,"& #aiware-logo":{width:`110px`,marginTop:`5px`}},"data-testid":`aiware-auth-footer`,children:[e&&!t?.hideVeritoneBranding&&(0,PN.jsxs)(H,{sx:{justifyContent:`center`,alignItems:`center`},children:[(0,PN.jsx)(z,{sx:{color:`#5C6269`},variant:`caption`,children:`Powered by`}),(0,PN.jsx)(`img`,{id:`aiware-logo`,draggable:!1,src:`data:image/png;base64,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`,alt:`aiWARE Logo`})]}),e&&!t?.hideVeritoneBranding&&(0,PN.jsxs)(z,{sx:{marginBottom:`18px`,marginTop:`50px`,fontFamily:`Nunito`,fontSize:`10px`,lineHeight:`16px`,color:`#5C6269`},children:[`© `,new Date().getFullYear(),` Veritone, Inc., All Rights Reserved.`,` `,(0,PN.jsxs)(`a`,{href:`https://www.veritone.com/terms`,target:`_blank`,style:{color:`#0C53B0`,textDecoration:`none`},rel:`noreferrer`,children:[`Terms of Service`,` `]})]})]})}));function fdf(){return(0,FN.jsx)(`img`,{draggable:`false`,id:`veritone-v-mark-png`,src:sdf,alt:`Veritone Logo`})}var pdf,FN,mdf,IN,hdf,LN=s((()=>{pdf=d(m()),odf(),cdf(),Hm(),rh(),ddf(),FN=L(),mdf=`500px`,IN=({children:e,showLogoInFooter:t=!0,loginConfigs:n})=>{let[r,i]=pdf.useState(!1);return(0,FN.jsx)(nh,{children:(0,FN.jsxs)(B,{sx:{display:`flex`,alignItems:`center`,flexDirection:`column`,justifyContent:`space-between`,height:`100vh`},children:[(0,FN.jsxs)(B,{sx:{maxWidth:mdf,width:`100%`},children:[n?.logo&&!r?(0,FN.jsx)(hdf,{logoSrc:n.logo,onError:e=>{i(!0)}}):(0,FN.jsxs)(B,{sx:{marginTop:`calc(100vh * 0.2)`,marginBottom:`calc(100vh * 0.06)`,textAlign:`center`,position:`relative`,maxWidth:mdf,marginLeft:`auto`,marginRight:`auto`,"& #veritone-logo-svg":{width:`220px`},"& #veritone-v-mark-png":{position:`absolute`,bottom:`-115%`,left:`5%`,pointerEvents:`none`}},children:[!n?.hideVeritoneBranding&&(0,FN.jsx)(fdf,{}),!n?.hideVeritoneBranding&&(0,FN.jsx)(adf,{id:`veritone-logo-svg`})]}),e]}),(0,FN.jsx)(udf,{showLogoInFooter:t,loginConfigs:n})]})})},hdf=({logoSrc:e,onError:t})=>{let[n,r]=pdf.useState(0),[i,a]=pdf.useState(0);return(0,FN.jsx)(B,{sx:{width:`207px`,height:`118px`,maxWidth:`100vw`,display:`flex`,alignCenter:`center`,justifyContent:`center`,margin:`0 auto`,marginBlockStart:`min(calc(100vh * 0.1), calc(${n}px * 0.5))`,marginBlockEnd:`30px`,textAlign:`center`},children:(0,FN.jsx)(`img`,{style:{pointerEvents:`none`,objectFit:`contain`,width:`100%`,height:`100%`},onLoad:e=>{r(e.target.naturalHeight),a(e.target.naturalWidth)},src:e,alt:`instance-logo`,onError:t})})}})),gdf,_df,vdf,ydf,bdf=s((()=>{W(),gdf=Z(),_df=L(),vdf=(0,gdf.makeStyles)()(()=>({btnWrapper:{display:`flex`,alignItems:`center`,width:`100%`,justifyContent:`center`,flexDirection:`column`},openIdLogo:{width:`24px`,height:`24px`,marginRight:`8px`},openIdBtn:{width:`368px`,marginTop:`20px`,height:`56px`,border:`1px solid #DADFE8`,borderRadius:`4px`,fontFamily:`Nunito`,fontStyle:`normal`,fontWeight:`600`,fontSize:`18px`,lineHeight:`24px`,letterSpacing:`-1.30385e-09px`,textTransform:`none`,"&:hover, &:focus":{border:`1px solid #DADFE8`,color:`#2A323C`}}})),ydf=({openIdItems:e,redirectUrl:t})=>{let{classes:n}=vdf(),r=e=>`Login with `+(e.length>20?e.substring(0,20)+`...`:e),i=e=>{let n=t?btoa(t):``;window.location.href=e+(n?`?redirectUrlEncoded=${encodeURIComponent(n)}&redirectUrl=${encodeURIComponent(t)}`:``)};return(0,_df.jsx)(B,{className:n.btnWrapper,children:e&&e.map((e,t)=>(0,_df.jsxs)(V,{variant:`outlined`,"data-testid":`os-auth-openId-button-${t}`,className:n.openIdBtn,onClick:()=>i(e.loginUrl),sx:{backgroundColor:e.loginButtonStyle&&e.loginButtonStyle.btnColor?e.loginButtonStyle.btnColor:`#FFFFFF`,"&:hover, &:focus":{backgroundColor:e.loginButtonStyle&&e.loginButtonStyle.btnColor?e.loginButtonStyle.btnColor:`#FFFFFF`}},children:[e.loginButtonStyle&&e.loginButtonStyle.btnLogo&&(0,_df.jsx)(`img`,{className:n.openIdLogo,alt:`icon`,src:e.loginButtonStyle.btnLogo,"data-testid":`os-auth-openId-image-${t}`}),(0,_df.jsx)(`span`,{"data-testid":`os-auth-openId-name-${t}`,style:{marginTop:`3px`,color:e.loginButtonStyle&&e.loginButtonStyle.btnTextColor?e.loginButtonStyle.btnTextColor:`#2A323C`},children:e?.name&&r(e.name)})]},e.connectId))})}}));function xdf(){let{slug:e}=DQd(),t=QA(),[n,r]=(0,Sdf.useState)(),[i,a]=(0,Sdf.useState)(null);return(0,Sdf.useEffect)(()=>{if(n===void 0){r(!0);return}else if(n){if(e){(async()=>{let n=await tuf(e);if(!n){t(window.location.pathname.replace(`/${e}`,``)+window.location.search),r(!1);return}a(n),r(!1)})();return}r(!1)}},[e,n]),{slug:e,slugUri:e?`/${e}`:``,loginConfigs:i,isLoadingLoginConfigs:n}}var Sdf,Cdf=s((()=>{Sdf=d(m()),ij(),ON()})),wdf,Tdf,Edf,RN,Ddf,Odf=s((()=>{wdf=d(m(),1),Tdf=L(),Edf=wdf.createContext(void 0),RN=e=>{let t=wdf.useContext(Edf);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ddf=({client:e,children:t})=>(wdf.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Tdf.jsx)(Edf.Provider,{value:e,children:t}))}));function kdf(e){setTimeout(e,0)}var Adf,jdf,zN,Mdf=s((()=>{Adf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},jdf=class{#e=Adf;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},zN=new jdf}));function BN(){}function Ndf(e,t){return typeof e==`function`?e(t):e}function Pdf(e){return typeof e==`number`&&e>=0&&e!==1/0}function Fdf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function VN(e,t){return typeof e==`function`?e(t):e}function Idf(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Rdf(o,t.options))return!1}else if(!zdf(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ldf(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(HN(t.options.mutationKey)!==HN(a))return!1}else if(!zdf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Rdf(e,t){return(t?.queryKeyHashFn||HN)(e)}function HN(e){return JSON.stringify(e,(e,t)=>Udf(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function zdf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!zdf(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!zdf(e[r],t[r]))return!1;return!0}return!1}function Bdf(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Hdf(e)&&Hdf(t);if(!r&&!(Udf(e)&&Udf(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:$df.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Bdf(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Vdf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Hdf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Udf(e){if(!Wdf(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Wdf(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Wdf(e){return Object.prototype.toString.call(e)===`[object Object]`}function Gdf(e){return new Promise(t=>{zN.setTimeout(t,e)})}function Kdf(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Bdf(e,t)}function qdf(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Jdf(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}function Ydf(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===eff?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xdf(e,t){return typeof e==`function`?e(...t):!!e}function Zdf(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Qdf,$df,eff,UN=s((()=>{Mdf(),Qdf=typeof window>`u`||`Deno`in globalThis,$df=Object.prototype.hasOwnProperty,eff=Symbol()})),tff,nff,rff=s((()=>{UN(),tff=()=>Qdf,nff=()=>tff()})),WN,iff=s((()=>{WN=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}})),aff,off,sff=s((()=>{iff(),aff=class extends WN{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},off=new aff}));function cff(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=lff,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var lff,GN,KN=s((()=>{Mdf(),lff=kdf,GN=cff()})),uff,dff,fff=s((()=>{iff(),uff=class extends WN{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}},dff=new uff}));function pff(e){return Math.min(1e3*2**e,3e4)}function mff(e){return(e??`online`)===`online`?dff.isOnline():!0}function hff(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(BN);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new gff(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>off.isFocused()&&(e.networkMode===`always`||dff.isOnline())&&e.canRun(),p=()=>mff(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(nff()?0:3),a=e.retryDelay??pff,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),Gdf(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var gff,_ff=s((()=>{UN(),rff(),sff(),fff(),gff=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}}})),vff,yff=s((()=>{Mdf(),UN(),rff(),vff=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pdf(this.gcTime)&&(this.#e=zN.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(nff()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(zN.clearTimeout(this.#e),this.#e=void 0)}}}));function bff(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Zdf(e,()=>t.signal,()=>n=!0)},u=Ydf(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Jdf:qdf;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Sff:xff,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:xff(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function xff(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Sff(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Cff=s((()=>{UN()}));function wff(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mff(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Tff(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Eff(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Dff,Off=s((()=>{UN(),KN(),_ff(),yff(),Cff(),Dff=class extends vff{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Eff(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Eff(this.options);e.data!==void 0&&(this.setState(Tff(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Kdf(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(BN).catch(BN):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>VN(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eff||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>VN(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Fdf(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ydf(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?bff(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=hff({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof gff&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof gff){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...wff(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Tff(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),GN.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}}}));function kff(e,t){return VN(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&VN(t.retryOnMount,e)===!1)}function Aff(e,t){return kff(e,t)||e.state.data!==void 0&&jff(e,t,t.refetchOnMount)}function jff(e,t,n){if(VN(t.enabled,e)!==!1&&VN(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Nff(e,t)}return!1}function Mff(e,t,n,r){return(e!==t||VN(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Nff(e,n)}function Nff(e,t){return VN(t.enabled,e)!==!1&&e.isStaleByTime(VN(t.staleTime,e))}var Pff,Fff=s((()=>{Mdf(),UN(),rff(),iff(),sff(),KN(),Off(),Pff=class extends WN{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Aff(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jff(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jff(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof VN(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Vdf(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Mff(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||VN(this.options.enabled,this.#t)!==VN(t.enabled,this.#t)||VN(this.options.staleTime,this.#t)!==VN(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||VN(this.options.enabled,this.#t)!==VN(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Vdf(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(BN)),t}#h(e){return!nff()&&VN(this.options.enabled,this.#t)!==!1&&Pdf(e)}#g(){this.#b();let e=VN(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Fdf(this.#r.dataUpdatedAt,e)+1;this.#u=zN.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,!(this.#f===0||!this.#h(this.#f))&&(this.#d=zN.setInterval(()=>{(this.options.refetchIntervalInBackground||off.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(zN.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(zN.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Aff(e,t),o=i&&Mff(e,n,t,r);(a||o)&&(l={...l,...wff(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Kdf(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Kdf(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Nff(e,t),refetch:this.refetch,isEnabled:VN(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Vdf(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();GN.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}}}));function Iff(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Lff,Rff=s((()=>{KN(),_ff(),yff(),Lff=class extends vff{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Iff(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=hff({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),GN.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}}}));function zff(e){return e.options.scope?.id}var Bff,Vff=s((()=>{UN(),iff(),KN(),Rff(),Bff=class extends WN{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Lff({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=zff(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=zff(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=zff(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=zff(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){GN.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ldf(t,e))}findAll(e={}){return this.getAll().filter(t=>Ldf(e,t))}notify(e){GN.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return GN.batch(()=>Promise.all(e.map(e=>e.continue().catch(BN))))}}})),Hff,Uff=s((()=>{UN(),iff(),KN(),Rff(),Hff=class extends WN{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Vdf(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&HN(t.mutationKey)!==HN(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Iff();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){GN.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}}})),Wff,Gff=s((()=>{UN(),iff(),KN(),Off(),Wff=class extends WN{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Rdf(r,t),a=this.get(i);return a||(a=new Dff({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){GN.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Idf(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Idf(e,t)):t}notify(e){GN.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){GN.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){GN.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}})),Kff,qff=s((()=>{UN(),sff(),KN(),fff(),Vff(),Gff(),Kff=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Wff,this.#t=e.mutationCache||new Bff,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=off.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=dff.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(VN(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Ndf(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return GN.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;GN.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return GN.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=GN.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(BN).catch(BN)}invalidateQueries(e,t={}){return GN.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=GN.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(BN)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(BN)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(VN(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(VN(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(BN).catch(BN)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(BN).catch(BN)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return dff.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(HN(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{zdf(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(HN(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{zdf(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Rdf(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===eff&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}}})),Jff=s((()=>{UN(),KN(),Fff(),Uff(),qff()})),Yff,Xff,Zff,Qff=s((()=>{Yff=d(m(),1),Xff=Yff.createContext(!1),Zff=()=>Yff.useContext(Xff),Xff.Provider}));function $ff(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var epf,tpf,npf,rpf=s((()=>{epf=d(m(),1),L(),tpf=epf.createContext($ff()),npf=()=>epf.useContext(tpf)})),ipf,apf,opf,spf,cpf=s((()=>{ipf=d(m(),1),Jff(),apf=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Xdf(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},opf=e=>{ipf.useEffect(()=>{e.clearReset()},[e])},spf=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Xdf(n,[e.error,r]))})),lpf,upf,dpf,fpf=s((()=>{lpf=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},upf=(e,t)=>e?.suspense&&t.isPending,dpf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()})}));function ppf(e,t,n){let r=Zff(),i=npf(),a=RN(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,lpf(o),apf(o,i,s),opf(i);let[l]=mpf.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(mpf.useSyncExternalStore(mpf.useCallback(e=>{let t=d?l.subscribe(GN.batchCalls(e)):BN;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),mpf.useEffect(()=>{l.setOptions(o)},[o,l]),upf(o,u))throw dpf(o,l,i);if(spf({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}var mpf,hpf=s((()=>{Odf(),Qff(),rpf(),cpf(),fpf(),mpf=d(m(),1),Jff()}));function gpf(e,t){return ppf(e,Pff,t)}var _pf=s((()=>{hpf(),Jff()}));function qN(e,t){let n=RN(t),[r]=vpf.useState(()=>new Hff(n,e));vpf.useEffect(()=>{r.setOptions(e)},[r,e]);let i=vpf.useSyncExternalStore(vpf.useCallback(e=>r.subscribe(GN.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=vpf.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(BN)},[r]);if(i.error&&Xdf(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var vpf,ypf=s((()=>{Odf(),vpf=d(m(),1),Jff()})),bpf=s((()=>{Odf(),_pf(),ypf(),Jff()}));function xpf(e){let{data:t,isLoading:n}=gpf({enabled:!!e,queryKey:Cpf.orgSignUpConfig(e??``),queryFn:()=>ruf(e),retry:1,retryDelay:500});return{config:t??null,isLoading:n}}function JN(){let{slug:e}=DQd(),t=QA(),n=()=>{t(Tpf)},{data:r,isLoading:i}=gpf({queryKey:Cpf.registrationConfig(e??``),queryFn:async()=>{if(!e)return n(),null;try{return await ruf(e)||(n(),null)}catch(e){throw n(),e}},retry:!1}),a=e?`/${e}`:``,o=(0,Spf.useMemo)(()=>r?r.files.find(e=>e.type===`termsOfService`&&e.status===`active`)??null:null,[r]),s=(0,Spf.useMemo)(()=>r?r.files.find(e=>e.type===`privacyPolicy`&&e.status===`active`)??null:null,[r]);return{slug:e,slugUri:a,registerUri:wpf(e??``),config:r??null,tosFile:o,privacyPolicyUrl:s,isLoading:i}}var Spf,Cpf,wpf,Tpf,Epf,Dpf,Opf,YN=s((()=>{ij(),bpf(),ON(),Spf=d(m()),Cpf={registrationConfig:e=>[`registration-config`,e],orgSignUpConfig:e=>[`org-sign-up-config`,e]},wpf=e=>`/ui/auth/signup/${e}`,Tpf=`/ui/auth/login`,Epf=()=>qN({mutationFn:ouf}),Dpf=()=>qN({mutationFn:suf}),Opf=()=>qN({mutationFn:cuf})})),kpf,XN,Apf=s((()=>{m(),ip(),kpf=L(),XN=({onClick:e,text:t,type:n})=>(0,kpf.jsx)(z,{sx:{fontFamily:`Nunito`,fontSize:`14px`,lineHeight:`20px`,letterSpacing:`-1.30385e-09px`,color:`#0C53B0`,cursor:`pointer`},onClick:e,"data-testid":`os-auth-${n}-link-button`,children:t})})),jpf,Mpf,Npf=s((()=>{m(),Hm(),yh(),ip(),jpf=L(),Mpf=()=>(0,jpf.jsxs)(B,{sx:{marginTop:`20px`,position:`relative`},children:[(0,jpf.jsx)(vh,{sx:{margin:`0 14px`,color:`#D5DFE9`}}),(0,jpf.jsx)(z,{sx:{color:`#D5DFE9`,fontSize:`14px`,margin:0,top:`-12px`,padding:`0 10px`,position:`absolute`,left:`calc(50% - 15px)`,background:`#FFFFFF`,fontFamily:`Nunito`,letterSpacing:`- 1.30385e-09px`,fontStyle:`normal`,fontWeight:`normal`},children:`or`})]})})),Ppf,Fpf,Ipf,Lpf,Rpf=s((()=>{W(),Ppf=Z(),ij(),q(),xuf(),yN(),CN(),Fpf=L(),Ipf=(0,Ppf.makeStyles)()((e,{label:t,buttonColor:n,buttonTextColor:r})=>{let i=t===`Sign Up`;return{button:{position:`absolute`,right:i?`220px`:`40px`,top:`30px`,background:i?n||`#212121`:`none`,border:i?`none`:`1px solid #5C6269`,color:i?r||`#FFFFFF`:`#5C6269`,borderRadius:`4px`,paddingLeft:`14px`,paddingRight:`14px`,fontWeight:400,"&:hover":{background:i?n||`#212121`:`none`,opacity:.9}}}}),Lpf=({label:e=`Sign Up`,navigateTo:t=`sign-up`,buttonColor:n,buttonTextColor:r})=>{let i=QA(),a=G(Flf),o=()=>{let e=gN().signupUrl||``;t===`sign-up`&&e?window.location.href=e:i(`/ui/auth/${t}`)},{classes:s}=Ipf({label:e,buttonColor:n,buttonTextColor:r});return(0,Fpf.jsx)(V,{className:s.button,onClick:o,disabled:t!==`sign-up`&&a===`loading`,children:e})}}));function zpf(e){return(0,ZN.jsx)(xh,{...e,direction:`up`})}var Bpf,ZN,QN,$N,Vpf,Hpf=s((()=>{W(),KS(),Bpf=d(m()),ZN=L(),QN=function(e){return e.EnvError=`EnvError`,e.RegistrationNotApproved=`RegistrationNotApproved`,e.AccountExists=`AccountExists`,e.RegistrationConfigurationInvalid=`RegistrationConfigurationInvalid`,e.RegistrationError=`RegistrationError`,e.Unauthorized=`401`,e.CaptchaError=`CaptchaError`,e.Forbidden=`403`,e.InviteExists=`409`,e}({}),$N={EnvError:{title:`Environment Error`,description:`Due to a temporary issue the environment data could not be fully retrieved. Please select from the available environments or try again later.`},RegistrationNotApproved:{title:`Registration Not Approved`,description:`This email address is not approved for registration.`},AccountExists:{title:`Account Already Exists`,description:`An account with this email address already belongs to this organization. Please sign in instead.`},RegistrationConfigurationInvalid:{title:`Registration Error`,description:`This registration page is not configured correctly. Contact the organization administrator.`},CaptchaError:{title:`Captcha Error`,description:`reCAPTCHA verification failed. Please try again.`},RegistrationError:{description:`An error occurred during registration. Please try again.`},401:{title:`Authentication Required`,description:`Your session has expired or you are not authorized. Please log in again or contact your administrator.`},403:{title:`Access Denied`,description:`You do not have permission to access the requested resource.`},409:{title:`Invite Already Exists`,description:`An invite for this email already exists. Please check your inbox or contact your administrator.`}},Vpf=e=>{let{open:t,message:n,onClose:r}=e,[i,a]=(0,Bpf.useState)(``),[o,s]=(0,Bpf.useState)(``);return(0,Bpf.useEffect)(()=>{n&&(a(n.title??``),s(n.description))},[n]),(0,ZN.jsx)(Eg,{"data-testid":`os-auth-desktop-snackbar`,onClose:r,ContentProps:{sx:{backgroundColor:`#465364`}},anchorOrigin:{vertical:`bottom`,horizontal:`right`},TransitionComponent:zpf,open:t,message:(0,ZN.jsx)(()=>(0,ZN.jsxs)(H,{sx:{gap:`10px`,position:`relative`,transform:`translate(5px, -5px)`,paddingBlockStart:`10px`,paddingInlineEnd:`10px`},children:[i&&(0,ZN.jsx)(z,{variant:`h6`,children:i}),(0,ZN.jsx)(z,{sx:{width:`350px`,fontSize:`14px`},variant:`body1`,children:o}),(0,ZN.jsx)(Xf,{sx:{position:`absolute`,top:i?0:`5px`,right:0,color:`#FFF`},onClick:r,size:`small`,children:(0,ZN.jsx)(pS,{fontSize:`small`})})]}),{}),autoHideDuration:6e3})}})),eP,tP,Upf,Wpf=s((()=>{eP=d(m()),ij(),Uuf(),$uf(),ndf(),LN(),xN(),bdf(),ON(),Cdf(),YN(),CN(),Hm(),Apf(),Npf(),yN(),SO(),Rpf(),W(),Yx(),Hpf(),tP=L(),Upf=(0,eP.memo)(({allowVanityDomain:e,onLoginSuccess:t})=>{let[n,r]=(0,eP.useState)(1),[i,a]=(0,eP.useState)(``),[o,s]=(0,eP.useState)([]),[c,l]=(0,eP.useState)(``),[u,d]=(0,eP.useState)(``),[f,p]=(0,eP.useState)(``),[m,h]=(0,eP.useState)(!1),[g,_]=(0,eP.useState)(!1),[v,y]=(0,eP.useState)(!1),[b,x]=(0,eP.useState)([]),[S,C]=(0,eP.useState)(``),[w,T]=(0,eP.useState)({aiwareInstanceName:`aiWARE US`,coreAdminApiUrl:_N(),coreGraphqlApiUrl:gN().baseUrl}),[E,D]=(0,eP.useState)(null),{disableEnvironmentDiscovery:O,hubUrl:k}=gN(),A=!O,j=QA(),{slug:M,slugUri:ee,loginConfigs:te,isLoadingLoginConfigs:ne}=xdf(),{config:re}=xpf(M);(0,eP.useEffect)(()=>{let e=new URL(window.location.href),t=e.searchParams.get(`redirect`),n=e.searchParams.get(`openIdRedirect`),r=e.searchParams.get(`email`),i=e.searchParams.get(`from`),o=e.searchParams.get(`error`);n&&(t=n),t&&rlf(t)&&a(t+e.hash),r&&(l(r),_(!0)),i&&C(i),o&&$N[o]&&D($N[o])},[]);let ie=(0,eP.useCallback)(async e=>{y(!1);let t=te?.organizationInfo?.guid,n=await Jlf(c,e,t);n.find(e=>e.required)&&y(!0),s(n)},[c,te]),ae=e=>b.find(t=>t.coreGraphqlApiUrl===e)?.aiwareInstanceName,oe=(0,eP.useCallback)(async()=>{let e=(e=!1)=>{_(!1),r(2),e&&D($N[QN.EnvError])};if(!A||!k){await ie(w.coreAdminApiUrl),e();return}try{let t=await Xlf(c);if(!t||!t.success||t.count<=0){await ie(_N()),e(!0);return}let n=t.result.map(e=>({aiwareInstanceID:e.aiwareInstanceID,aiwareInstanceName:e.AiwareInstanceName,coreGraphqlApiUrl:e.GraphqlEndpoint,coreAdminApiUrl:e.GraphqlEndpoint.replace(`/v3/graphql`,``)})),r=n[0],i=alf(`last-login-instance-url`),a=n.find(e=>e.coreGraphqlApiUrl===i),o=n.find(e=>e.coreGraphqlApiUrl===gN().baseUrl);a?r=a:o&&(r=o),T(r),x(n),await ie(r.coreAdminApiUrl),e()}catch(t){console.error(t),await ie(_N()),e(!0)}},[c,k,A,w.coreAdminApiUrl,ie]),se=e=>{l(e),p(``)};(0,eP.useEffect)(()=>{g&&c&&oe().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},[g,c,oe]);let ce=async()=>{if(!u){p(`Password is required`);return}h(!0);let n=await Zlf(c,u,e??!1,w.coreGraphqlApiUrl);if(h(!1),n&&n.ok){let e=await n.json();if(e.errors&&e.errors.length){if(e.errors[0].name===`not_found`){p(`Email or Password is incorrect`);return}p(`Something went wrong with login. Please try again`);return}try{let t=e?.data?.userLogin?.token;if(t){let{userSettings:e,userId:n}=await iuf(t);if(e&&e.length){let r=e.find(e=>e.key===`customRegistrationId`);if(r&&r.value){let a=await nuf(r.value);if(a&&a.files&&a.files.length){let r=a.files.find(e=>e.type===`termsOfService`&&e.status===`active`);if(!e.find(e=>e.key===r?.fileId)){j({pathname:`/ui/auth/signup/${a.slug}/terms-of-service`,search:`?userId=${encodeURIComponent(n)}&token=${encodeURIComponent(t)}&redirect=${encodeURIComponent(i)}&referer=login`});return}}}}}}catch(e){oD(e)}if(olf(`last-login-instance-url`,w.coreGraphqlApiUrl,365),i){if(S===`org-registration`){let t=e?.data?.userLogin?.token;window.location.href=i+`/terms-of-service?email=${encodeURIComponent(c)}&token=${encodeURIComponent(t)}`;return}window.location.href=i}else if(t){let n=e?.data?.userLogin?.token;t(n)}else{let e=w.coreAdminApiUrl?w.coreAdminApiUrl+`/api/admin/switch-app`:gN().switchAppUrl;window.location.href=e+`/default`}}else p(`Something went wrong with login. Please try again`)},le=e=>{f&&p(``),d(e)},ue=()=>{j(`/ui/auth/forgot${ee}`,{state:{emailFromLogin:c}})},de=async e=>{let t=e.target.value,n=b.find(e=>e.coreGraphqlApiUrl===t);n&&(T(n),await ie(n.coreAdminApiUrl))},fe=()=>{S===`org-registration`&&i?window.location.href=i:r(1)};(0,eP.useEffect)(()=>{},[]);let pe=gN();return ne===!1?(0,tP.jsxs)(IN,{loginConfigs:te,children:[(0,tP.jsx)(Vpf,{open:!!E,message:E,onClose:()=>D(null)}),pe.signupUrl&&!M&&(0,tP.jsx)(Lpf,{}),M&&re&&(0,tP.jsx)(Lpf,{navigateTo:`signup/${M}/join`,buttonColor:te?.buttonColor,buttonTextColor:te?.buttonTextColor}),(0,tP.jsxs)(`div`,{style:{display:n===1?`block`:`none`},children:[(0,tP.jsx)(bN,{text:`Welcome back`}),(0,tP.jsx)(Huf,{email:c,setEmail:se,onNextStep:()=>{_(!0)},isLoading:g,buttonText:`Continue`,buttonColor:te?.buttonColor,buttonTextColor:te?.buttonTextColor}),pe?.displaySystemUseInLogin&&(0,tP.jsxs)(H,{gap:4,mt:8,sx:{maxWidth:`558px`},children:[(0,tP.jsx)(z,{variant:`body1`,"data-test":`fedramp-system-use-notice`,"data-testid":`fedramp-system-use-notice-1`,sx:{fontSize:`12px`,lineHeight:`16px`,fontWeight:`400`,textAlign:`justify`},children:`The use of the system is restricted to authorized users only. The system and equipment are subject to monitoring to ensure proper performance of applicable security features or procedures. Such monitoring may result in the acquisition, recording, and analysis of all data being communicated, transmitted, processed or stored in the application/system, including but not limited to information stored locally on the hard drive by the user. There is no right of privacy in the system. If monitoring reveals possible evidence of criminal activity, such evidence may be provided to law enforcement personnel, and other personnel in conjunction with the report of improper or unauthorized use.`}),(0,tP.jsx)(z,{variant:`body1`,"data-test":`fedramp-system-use-notice`,"data-testid":`fedramp-system-use-notice-2`,sx:{fontSize:`12px`,lineHeight:`16px`,fontWeight:`400`,textAlign:`center`},children:`ANYONE USING THE SYSTEM EXPRESSLY CONSENTS TO US HC MONITORING FOR NETWORK ADMINISTRATION AND SECURITY PURPOSES.`})]})]}),(0,tP.jsx)(`div`,{style:{display:n===2?`block`:`none`},children:(0,tP.jsxs)(B,{sx:{maxWidth:`368px`,width:`100%`,marginInlineStart:`auto`,marginInlineEnd:`auto`},children:[S===`org-registration`&&(0,tP.jsx)(H,{mt:8,children:(0,tP.jsx)(z,{"data-testid":`os-auth-org-registration-email-message`,variant:`body1`,sx:{fontSize:`18px`,textAlign:`justify`,marginBottom:`30px`},children:`This email has an existing aiWARE account, to continue the registration process please authenticate below.`})}),(0,tP.jsx)(bN,{text:v?`Choose Authentication Option for`:`Enter Password for`,subText:c}),` `,A&&b.length>0&&(0,tP.jsx)(yg,{value:w.coreGraphqlApiUrl,onChange:de,disabled:b.length<2,"data-testid":`os-auth-env-dropdown-select`,sx:{width:`100%`,height:`52px`,marginBottom:`15px`},renderValue:e=>(0,tP.jsxs)(H,{direction:`row`,alignItems:`center`,children:[(0,tP.jsx)(tbt,{sx:{width:`27px`,height:`26px`,color:b.length<2?`#9CA8B4`:`#555F7C`,marginRight:`8px`}}),(0,tP.jsx)(`span`,{children:ae(e)})]}),children:b.map(e=>(0,tP.jsx)(ug,{"data-testid":`os-auth-env-dropdown-item`,value:e.coreGraphqlApiUrl,children:e.aiwareInstanceName},e.aiwareInstanceName))}),v?(0,tP.jsxs)(tP.Fragment,{children:[o&&o.length>0&&(0,tP.jsx)(ydf,{openIdItems:o,redirectUrl:i}),(0,tP.jsx)(B,{sx:{mt:`20px`},children:(0,tP.jsx)(XN,{onClick:()=>fe(),text:`Back to Login`,type:`login`})})]}):(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)(Quf,{password:u,errorMessage:f,onPasswordChange:le,onPressEnter:()=>{ce().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})}}),(0,tP.jsx)(B,{sx:{mt:`14px`},children:(0,tP.jsx)(XN,{onClick:ue,text:`Forgot Password?`,type:`forgot`})}),(0,tP.jsx)(B,{sx:{mt:`25px`},children:(0,tP.jsx)(SN,{onClick:()=>{ce().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},text:`Login`,type:`login`,loading:m,buttonColor:te?.buttonColor,buttonTextColor:te?.buttonTextColor})}),o&&o.length>0&&(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)(Mpf,{}),` `,(0,tP.jsx)(ydf,{openIdItems:o,redirectUrl:i})]}),(0,tP.jsx)(B,{sx:{mt:`20px`},children:(0,tP.jsx)(XN,{onClick:()=>fe(),text:`Back to Login`,type:`login`})})]})]})})]}):(0,tP.jsx)(tdf,{})})})),Gpf,nP,Kpf,qpf=s((()=>{Gpf=d(m()),ij(),LN(),xN(),Uuf(),ON(),Hm(),ndf(),Apf(),CN(),SO(),Cdf(),nP=L(),Kpf=()=>{let[e,t]=(0,Gpf.useState)(``),[n,r]=(0,Gpf.useState)(!1),[i,a]=(0,Gpf.useState)(1),o=QA(),{state:s}=ZA(),{slugUri:c,loginConfigs:l,isLoadingLoginConfigs:u}=xdf();(0,Gpf.useEffect)(()=>{s&&s.emailFromLogin&&t(s.emailFromLogin)},[s]);let d=async()=>{r(!0);try{let t=await(await Qlf(e))?.json();if(t.errors&&t.errors.length){alert(`Something went wrong. Please try again.`),r(!1);return}r(!1),a(2)}catch{alert(`Something went wrong. Please try again.`),r(!1)}};return u===!1?(0,nP.jsxs)(IN,{loginConfigs:l,children:[i===1?(0,nP.jsxs)(nP.Fragment,{children:[(0,nP.jsx)(bN,{text:`Forgot Password`,subText:`Enter your registered email to reset your password.`}),(0,nP.jsx)(Huf,{email:e,setEmail:t,onNextStep:()=>{d().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},isLoading:n,buttonText:`Send`,buttonColor:l?.buttonColor,buttonTextColor:l?.buttonTextColor})]}):(0,nP.jsxs)(nP.Fragment,{children:[(0,nP.jsx)(bN,{text:`Password reset requested`,subText:`Your password reset will be sent to the email provided if it matches our records.`}),(0,nP.jsx)(B,{sx:{mt:`25px`},children:(0,nP.jsx)(SN,{onClick:()=>{d().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},text:`Request Password Again`,type:`reset-pw`,loading:n,buttonColor:l?.buttonColor,buttonTextColor:l?.buttonTextColor})})]}),(0,nP.jsx)(B,{sx:{mt:`20px`},children:(0,nP.jsx)(XN,{onClick:()=>{o(`/ui/auth/login${c}`)},text:`Back to Login`,type:`login`})})]}):(0,nP.jsx)(tdf,{})}})),Jpf,Ypf,Xpf=s((()=>{m(),ij(),LN(),xN(),CN(),Jpf=L(),Ypf=()=>{let e=QA();return(0,Jpf.jsxs)(IN,{children:[(0,Jpf.jsx)(bN,{text:`Authentication Restriction`,subText:`Authenticating with this OpenID provider has been restricted by an admin of your account. We are sorry for the inconvenience. Please return to the login screen and choose another authentication provider.`,type:`restricted-provider`}),(0,Jpf.jsx)(SN,{onClick:()=>e(`/ui/auth/login`),text:`Back to Login`,type:`back-to-login`,loading:!1})]})}})),rP,iP,Zpf,Qpf=s((()=>{rP=d(m()),LN(),xN(),CN(),Apf(),ij(),Hm(),Uuf(),$uf(),ON(),yN(),SO(),iP=L(),Zpf=()=>{let[e,t]=(0,rP.useState)(1),[n,r]=(0,rP.useState)(``),[i,a]=(0,rP.useState)(``),o=QA(),[s,c]=(0,rP.useState)(!1),[l,u]=(0,rP.useState)(``),[d,f]=(0,rP.useState)(``);(0,rP.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get(`session`);e&&u(e)},[]),(0,rP.useEffect)(()=>{f(``)},[n,i]);let p=async()=>{if(!s){c(!0);try{let e=await Ylf(n,i,l);e.status===200?window.location.href=`${window.aiwareConfig?.switchAppUrl||_N().replace(`api`,`aiware`)+`/switch-app`}/default`:e.status===404?f(`Email or Password is incorrect.`):f(`Something went wrong. Please try again.`)}catch{f(`Something went wrong. Please try again.`)}finally{c(!1)}}};return(0,iP.jsx)(IN,{children:e===1?(0,iP.jsxs)(iP.Fragment,{children:[(0,iP.jsx)(bN,{text:`Account Does Not Exist`,subText:`This AiWARE account does not exist. Are you sure you’re using the correct Authentication Provider?`,type:`link-oid`}),(0,iP.jsx)(SN,{onClick:()=>t(2),text:`Link to Existing Account`,type:`oid-linking`,loading:!1}),(0,iP.jsx)(B,{sx:{mt:`14px`},children:(0,iP.jsx)(XN,{onClick:()=>o(`/ui/auth/login`),text:`Back to Login`,type:`login`})})]}):(0,iP.jsxs)(iP.Fragment,{children:[(0,iP.jsx)(bN,{text:`Link Account`,subText:`Provide the email and password to your aiWARE account.`}),(0,iP.jsx)(Huf,{email:n,setEmail:r}),(0,iP.jsx)(B,{sx:{mt:`20px`},children:(0,iP.jsx)(Quf,{password:i,onPasswordChange:a,onPressEnter:()=>{p().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},errorMessage:d,autoFocus:!1})}),(0,iP.jsx)(B,{sx:{mt:`14px`},children:(0,iP.jsx)(XN,{onClick:()=>o(`/ui/auth/forgot`),text:`Forgot Password?`,type:`forgot`})}),(0,iP.jsx)(B,{sx:{mt:`25px`},children:(0,iP.jsx)(SN,{onClick:()=>{p().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},text:`Link Account & Login`,type:`link-oid`,loading:s})}),(0,iP.jsx)(B,{sx:{mt:`20px`},children:(0,iP.jsx)(XN,{onClick:()=>o(`/ui/auth/login`),text:`Back to Login`,type:`login`})})]})})}})),$pf,emf,tmf=s((()=>{m(),ij(),LN(),Auf(),yN(),Hm(),$pf=L(),emf=()=>{let e=QA(),t=new URLSearchParams(window.location.search),n=t.get(`username`)||``,r=t.get(`resettoken`)||``,i=t.get(`organizationinviteid`)||``,a=t.get(`redirect`),o=nlf(r),s=o?o.enablePasswordRestriction:!1;return(0,$pf.jsx)(IN,{children:(0,$pf.jsx)(B,{sx:{width:`368px`},children:(0,$pf.jsx)(Duf,{resetToken:r,username:n,organizationInviteId:i,onSuccess:()=>{a?window.location.href=a:e(`/ui/auth/reset-password/success`)},requiresPasswordRestriction:s,isNewPage:!0,containerWidth:`100%`})})})}})),nmf,rmf,imf=s((()=>{m(),ij(),LN(),xN(),CN(),nmf=L(),rmf=()=>{let e=QA();return(0,nmf.jsxs)(IN,{children:[(0,nmf.jsx)(bN,{text:`Password Changed Successfully`,subText:`Your new password has been set for your aiWARE account successfully.`,type:`reset-password-success`}),(0,nmf.jsx)(SN,{onClick:()=>e(`/ui/auth/login`),text:`Continue`,type:`back-to-login`,loading:!1})]})}})),amf,omf,smf=s((()=>{amf=Z(),omf=(0,amf.makeStyles)()(()=>({button:{position:`absolute`,left:`40px`,top:`30px`,border:`none`,color:`#5C6269`,borderRadius:`4px`,paddingLeft:`14px`,paddingRight:`14px`,fontWeight:400},select:{height:`52px`,width:`100%`,marginTop:`20px`,textAlign:`left`},menu:{"& > .MuiPopover-paper, & > .Sdk-MuiPopover-paper":{padding:`0`},"& > .MuiPaper-root > ul, > .Sdk-MuiPaper-root > ul":{padding:`5px`}},stepOneFullWidthInput:{height:`52px`,width:`100%`},stepOneHalfWidthInputContainer:{display:`flex`,justifyContent:`space-between`,width:`100%`,marginTop:`20px`},stepOneHalfWidthInput:{height:`52px`,width:`calc(50% - 10px)`},stepTwoContainer:{width:`542px`,textAlign:`center`,maxWidth:`85vw`},stepTwoTextField:{height:`52px`,width:`100%`},menuItem:{width:`100%`},autoCompleteContainer:{width:`100%`,display:`flex`,justifyContent:`center`},autoComplete:{width:`100%`,marginTop:`20px`,height:`52px`},formInputTopMargin:{marginTop:`20px`},formInputTopDoubleMargin:{marginTop:`40px`},previewBox:{width:`164px`,height:`164px`,borderRadius:`5px`,border:`2px dashed #D5DFE9`,padding:`10px`,boxSizing:`border-box`,cursor:`pointer`},logoLanding:{width:`140px`,height:`140px`,background:`rgba(247, 247, 247, 0.80)`,display:`flex`,alignItems:`center`,justifyContent:`center`},addIcon:{fill:`#555F7C`},logoDescriptionText:{textAlign:`left`},logoUploadBtn:{borderRadius:`4px`,border:`1px solid #5C6269`,color:`#5C6269`,fontWeight:`400`,padding:`8px 15px`},orgLogoPreview:{width:`164px`,height:`164px`},errorMessage:{color:`red`},confirmationText:{fontSize:`22px`,color:`#2A323C`,lineHeight:`28px`}}))})),cmf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z`}),`ArrowBack`)})),lmf,aP,umf,dmf=s((()=>{lmf=d(m()),q(),xuf(),xN(),W(),CN(),smf(),Uuf(),aP=L(),umf=()=>{let e=(0,lmf.useRef)(),t=K(),n=G(Llf),r=G(Rlf),i=!!Object.entries(r).find(([e,t])=>t)||!!Object.keys(r).find(e=>!n[e])||!Buf(`email`in n&&n?.email||``),{classes:a}=omf(),o=e=>{e.key===`Enter`&&(t(EN.validate()),i||s())},s=()=>{t(EN.setStep(2))};return(0,aP.jsxs)(`div`,{style:{maxWidth:`85vw`},children:[(0,aP.jsx)(bN,{text:`Sign Up for your aiWARE account`,type:`sign-up`}),(0,aP.jsx)(s_,{id:`email`,"data-testid":`os-auth-email-input-field`,label:`email`in r&&r.email?`Please provide a valid email`:`Email`,InputProps:{type:`email`},variant:`outlined`,value:`email`in n&&n?.email,autoComplete:`email`,autoFocus:!0,className:a.stepOneFullWidthInput,error:`email`in r&&r.email,onChange:e=>t(EN.setValue({key:`email`,value:e.target.value.trim()})),onKeyDown:o}),(0,aP.jsxs)(B,{className:a.stepOneHalfWidthInputContainer,children:[(0,aP.jsx)(s_,{id:`firstName`,"data-testid":`os-auth-firstName-input-field`,label:`First Name`,variant:`outlined`,value:`firstName`in n&&n?.firstName,autoComplete:`given-name`,className:a.stepOneHalfWidthInput,error:`firstName`in r&&r.firstName,onChange:e=>t(EN.setValue({key:`firstName`,value:e.target.value})),onKeyDown:o}),(0,aP.jsx)(s_,{id:`lastName`,"data-testid":`os-auth-lastName-input-field`,label:`Last Name`,variant:`outlined`,value:`lastName`in n&&n?.lastName,autoComplete:`family-name`,className:a.stepOneHalfWidthInput,error:`lastName`in r&&r.lastName,onChange:e=>t(EN.setValue({key:`lastName`,value:e.target.value})),onKeyDown:o})]}),(0,aP.jsx)(SN,{onClick:s,text:`Continue`,type:`Continue`,disableButton:i,className:a.formInputTopMargin,ref:e?.current?e:void 0})]})}})),fmf,pmf=s((()=>{fmf=JSON.parse(`[{"label":"Afghanistan","id":"AF"},{"label":"Åland Islands","id":"AX"},{"label":"Albania","id":"AL"},{"label":"Algeria","id":"DZ"},{"label":"American Samoa","id":"AS"},{"label":"Andorra","id":"AD"},{"label":"Angola","id":"AO"},{"label":"Anguilla","id":"AI"},{"label":"Antarctica","id":"AQ"},{"label":"Antigua and Barbuda","id":"AG"},{"label":"Argentina","id":"AR"},{"label":"Armenia","id":"AM"},{"label":"Aruba","id":"AW"},{"label":"Australia","id":"AU"},{"label":"Austria","id":"AT"},{"label":"Azerbaijan","id":"AZ"},{"label":"Bahamas","id":"BS"},{"label":"Bahrain","id":"BH"},{"label":"Bangladesh","id":"BD"},{"label":"Barbados","id":"BB"},{"label":"Belarus","id":"BY"},{"label":"Belgium","id":"BE"},{"label":"Belize","id":"BZ"},{"label":"Benin","id":"BJ"},{"label":"Bermuda","id":"BM"},{"label":"Bhutan","id":"BT"},{"label":"Bolivia","id":"BO"},{"label":"Bosnia and Herzegovina","id":"BA"},{"label":"Botswana","id":"BW"},{"label":"Bouvet Island","id":"BV"},{"label":"Brazil","id":"BR"},{"label":"British Indian Ocean Territory","id":"IO"},{"label":"Brunei Darussalam","id":"BN"},{"label":"Bulgaria","id":"BG"},{"label":"Burkina Faso","id":"BF"},{"label":"Burundi","id":"BI"},{"label":"Cambodia","id":"KH"},{"label":"Cameroon","id":"CM"},{"label":"Canada","id":"CA"},{"label":"Cape Verde","id":"CV"},{"label":"Cayman Islands","id":"KY"},{"label":"Central African Republic","id":"CF"},{"label":"Chad","id":"TD"},{"label":"Chile","id":"CL"},{"label":"China","id":"CN"},{"label":"Christmas Island","id":"CX"},{"label":"Cocos (Keeling) Islands","id":"CC"},{"label":"Colombia","id":"CO"},{"label":"Comoros","id":"KM"},{"label":"Congo","id":"CG"},{"label":"Congo, The Democratic Republic of the","id":"CD"},{"label":"Cook Islands","id":"CK"},{"label":"Costa Rica","id":"CR"},{"label":"Cote D'Ivoire","id":"CI"},{"label":"Croatia","id":"HR"},{"label":"Cuba","id":"CU"},{"label":"Cyprus","id":"CY"},{"label":"Czech Republic","id":"CZ"},{"label":"Denmark","id":"DK"},{"label":"Djibouti","id":"DJ"},{"label":"Dominica","id":"DM"},{"label":"Dominican Republic","id":"DO"},{"label":"Ecuador","id":"EC"},{"label":"Egypt","id":"EG"},{"label":"El Salvador","id":"SV"},{"label":"Equatorial Guinea","id":"GQ"},{"label":"Eritrea","id":"ER"},{"label":"Estonia","id":"EE"},{"label":"Ethiopia","id":"ET"},{"label":"Falkland Islands (Malvinas)","id":"FK"},{"label":"Faroe Islands","id":"FO"},{"label":"Fiji","id":"FJ"},{"label":"Finland","id":"FI"},{"label":"France","id":"FR"},{"label":"French Guiana","id":"GF"},{"label":"French Polynesia","id":"PF"},{"label":"French Southern Territories","id":"TF"},{"label":"Gabon","id":"GA"},{"label":"Gambia","id":"GM"},{"label":"Georgia","id":"GE"},{"label":"Germany","id":"DE"},{"label":"Ghana","id":"GH"},{"label":"Gibraltar","id":"GI"},{"label":"Greece","id":"GR"},{"label":"Greenland","id":"GL"},{"label":"Grenada","id":"GD"},{"label":"Guadeloupe","id":"GP"},{"label":"Guam","id":"GU"},{"label":"Guatemala","id":"GT"},{"label":"Guernsey","id":"GG"},{"label":"Guinea","id":"GN"},{"label":"Guinea-Bissau","id":"GW"},{"label":"Guyana","id":"GY"},{"label":"Haiti","id":"HT"},{"label":"Heard Island and Mcdonald Islands","id":"HM"},{"label":"Holy See (Vatican City State)","id":"VA"},{"label":"Honduras","id":"HN"},{"label":"Hong Kong","id":"HK"},{"label":"Hungary","id":"HU"},{"label":"Iceland","id":"IS"},{"label":"India","id":"IN"},{"label":"Indonesia","id":"ID"},{"label":"Iran, Islamic Republic Of","id":"IR"},{"label":"Iraq","id":"IQ"},{"label":"Ireland","id":"IE"},{"label":"Isle of Man","id":"IM"},{"label":"Israel","id":"IL"},{"label":"Italy","id":"IT"},{"label":"Jamaica","id":"JM"},{"label":"Japan","id":"JP"},{"label":"Jersey","id":"JE"},{"label":"Jordan","id":"JO"},{"label":"Kazakhstan","id":"KZ"},{"label":"Kenya","id":"KE"},{"label":"Kiribati","id":"KI"},{"label":"Korea, Democratic People'S Republic of","id":"KP"},{"label":"Korea, Republic of","id":"KR"},{"label":"Kuwait","id":"KW"},{"label":"Kyrgyzstan","id":"KG"},{"label":"Lao People'S Democratic Republic","id":"LA"},{"label":"Latvia","id":"LV"},{"label":"Lebanon","id":"LB"},{"label":"Lesotho","id":"LS"},{"label":"Liberia","id":"LR"},{"label":"Libyan Arab Jamahiriya","id":"LY"},{"label":"Liechtenstein","id":"LI"},{"label":"Lithuania","id":"LT"},{"label":"Luxembourg","id":"LU"},{"label":"Macao","id":"MO"},{"label":"Macedonia, The Former Yugoslav Republic of","id":"MK"},{"label":"Madagascar","id":"MG"},{"label":"Malawi","id":"MW"},{"label":"Malaysia","id":"MY"},{"label":"Maldives","id":"MV"},{"label":"Mali","id":"ML"},{"label":"Malta","id":"MT"},{"label":"Marshall Islands","id":"MH"},{"label":"Martinique","id":"MQ"},{"label":"Mauritania","id":"MR"},{"label":"Mauritius","id":"MU"},{"label":"Mayotte","id":"YT"},{"label":"Mexico","id":"MX"},{"label":"Micronesia, Federated States of","id":"FM"},{"label":"Moldova, Republic of","id":"MD"},{"label":"Monaco","id":"MC"},{"label":"Mongolia","id":"MN"},{"label":"Montserrat","id":"MS"},{"label":"Morocco","id":"MA"},{"label":"Mozambique","id":"MZ"},{"label":"Myanmar","id":"MM"},{"label":"Namibia","id":"NA"},{"label":"Nauru","id":"NR"},{"label":"Nepal","id":"NP"},{"label":"Netherlands","id":"NL"},{"label":"Netherlands Antilles","id":"AN"},{"label":"New Caledonia","id":"NC"},{"label":"New Zealand","id":"NZ"},{"label":"Nicaragua","id":"NI"},{"label":"Niger","id":"NE"},{"label":"Nigeria","id":"NG"},{"label":"Niue","id":"NU"},{"label":"Norfolk Island","id":"NF"},{"label":"Northern Mariana Islands","id":"MP"},{"label":"Norway","id":"NO"},{"label":"Oman","id":"OM"},{"label":"Pakistan","id":"PK"},{"label":"Palau","id":"PW"},{"label":"Palestinian Territory, Occupied","id":"PS"},{"label":"Panama","id":"PA"},{"label":"Papua New Guinea","id":"PG"},{"label":"Paraguay","id":"PY"},{"label":"Peru","id":"PE"},{"label":"Philippines","id":"PH"},{"label":"Pitcairn","id":"PN"},{"label":"Poland","id":"PL"},{"label":"Portugal","id":"PT"},{"label":"Puerto Rico","id":"PR"},{"label":"Qatar","id":"QA"},{"label":"Reunion","id":"RE"},{"label":"Romania","id":"RO"},{"label":"Russian Federation","id":"RU"},{"label":"RWANDA","id":"RW"},{"label":"Saint Helena","id":"SH"},{"label":"Saint Kitts and Nevis","id":"KN"},{"label":"Saint Lucia","id":"LC"},{"label":"Saint Pierre and Miquelon","id":"PM"},{"label":"Saint Vincent and the Grenadines","id":"VC"},{"label":"Samoa","id":"WS"},{"label":"San Marino","id":"SM"},{"label":"Sao Tome and Principe","id":"ST"},{"label":"Saudi Arabia","id":"SA"},{"label":"Senegal","id":"SN"},{"label":"Serbia and Montenegro","id":"CS"},{"label":"Seychelles","id":"SC"},{"label":"Sierra Leone","id":"SL"},{"label":"Singapore","id":"SG"},{"label":"Slovakia","id":"SK"},{"label":"Slovenia","id":"SI"},{"label":"Solomon Islands","id":"SB"},{"label":"Somalia","id":"SO"},{"label":"South Africa","id":"ZA"},{"label":"South Georgia and the South Sandwich Islands","id":"GS"},{"label":"Spain","id":"ES"},{"label":"Sri Lanka","id":"LK"},{"label":"Sudan","id":"SD"},{"label":"Surilabel","id":"SR"},{"label":"Svalbard and Jan Mayen","id":"SJ"},{"label":"Swaziland","id":"SZ"},{"label":"Sweden","id":"SE"},{"label":"Switzerland","id":"CH"},{"label":"Syrian Arab Republic","id":"SY"},{"label":"Taiwan, Province of China","id":"TW"},{"label":"Tajikistan","id":"TJ"},{"label":"Tanzania, United Republic of","id":"TZ"},{"label":"Thailand","id":"TH"},{"label":"Timor-Leste","id":"TL"},{"label":"Togo","id":"TG"},{"label":"Tokelau","id":"TK"},{"label":"Tonga","id":"TO"},{"label":"Trinidad and Tobago","id":"TT"},{"label":"Tunisia","id":"TN"},{"label":"Turkey","id":"TR"},{"label":"Turkmenistan","id":"TM"},{"label":"Turks and Caicos Islands","id":"TC"},{"label":"Tuvalu","id":"TV"},{"label":"Uganda","id":"UG"},{"label":"Ukraine","id":"UA"},{"label":"United Arab Emirates","id":"AE"},{"label":"United Kingdom","id":"GB"},{"label":"United States","id":"US"},{"label":"United States Minor Outlying Islands","id":"UM"},{"label":"Uruguay","id":"UY"},{"label":"Uzbekistan","id":"UZ"},{"label":"Vanuatu","id":"VU"},{"label":"Venezuela","id":"VE"},{"label":"Viet Nam","id":"VN"},{"label":"Virgin Islands, British","id":"VG"},{"label":"Virgin Islands, U.S.","id":"VI"},{"label":"Wallis and Futuna","id":"WF"},{"label":"Western Sahara","id":"EH"},{"label":"Yemen","id":"YE"},{"label":"Zambia","id":"ZM"},{"label":"Zimbabwe","id":"ZW"}]`)})),mmf,hmf=s((()=>{mmf=`Accounting.Airlines/Aviation.Alternative Dispute Resolution.Alternative Medicine.Animation.Apparel & Fashion.Architecture & Planning.Arts & Crafts.Automotive.Aviation & Aerospace.Banking.Biotechnology.Broadcast Media.Building Materials.Business Supplies & Equipment.Capital Markets.Chemicals.Civic & Social Organization.Civil Engineering.Commercial Real Estate.Computer & Network Security.Computer Games.Computer Hardware.Computer Networking.Computer Software.Construction.Consumer Electronics.Consumer Goods.Consumer Services.Cosmetics.Dairy.Defense & Space.Design.Education Management.E-learning.Electrical & Electronic Manufacturing.Entertainment.Environmental Services.Events Services.Executive Office.Facilities Services.Farming.Financial Services.Fine Art.Fishery.Food & Beverages.Food Production.Fundraising.Furniture.Gambling & Casinos.Glass, Ceramics & Concrete.Government Administration.Government Relations.Graphic Design.Health, Wellness & Fitness.Higher Education.Hospital & Health Care.Hospitality.Human Resources.Import & Export.Individual & Family Services.Industrial Automation.Information Services.Information Technology & Services.Insurance.International Affairs.International Trade & Development.Internet.Investment Banking/Venture.Investment Management.Judiciary.Law Enforcement.Law Practice.Legal Services.Legislative Office.Leisure & Travel.Libraries.Logistics & Supply Chain.Luxury Goods & Jewelry.Machinery.Management Consulting.Maritime.Marketing & Advertising.Market Research.Mechanical or Industrial Engineering.Media Production.Medical Device.Medical Practice.Mental Health Care.Military.Mining & Metals.Motion Pictures & Film.Museums & Institutions.Music.Nanotechnology.Newspapers.Nonprofit Organization Management.Oil & Energy.Online Publishing.Outsourcing/Offshoring.Package/Freight Delivery.Packaging & Containers.Paper & Forest Products.Performing Arts.Pharmaceuticals.Philanthropy.Photography.Plastics.Political Organization.Primary/Secondary.Printing.Professional Training.Program Development.Public Policy.Public Relations.Public Safety.Publishing.Railroad Manufacture.Ranching.Real Estate.Recreational.Facilities & Services.Religious Institutions.Renewables & Environment.Research.Restaurants.Retail.Security & Investigations.Semiconductors.Shipbuilding.Sporting Goods.Sports.Staffing & Recruiting.Supermarkets.Telecommunications.Textiles.Think Tanks.Tobacco.Translation & Localization.Transportation/Trucking/Railroad.Utilities.Venture Capital.Veterinary.Warehousing.Wholesale.Wine & Spirits.Wireless.Writing & Editing`.split(`.`)})),gmf,oP,_mf,vmf,ymf,bmf=s((()=>{gmf=d(m()),q(),xuf(),xN(),W(),CN(),pmf(),hmf(),smf(),ij(),oP=L(),_mf=[`1-10`,`10-50`,`50-100`,`100-500`,`500-1000`,`> 1000`],vmf=mmf.map(e=>({id:e,label:e})),ymf=()=>{let e=(0,gmf.useRef)(),t=K(),n=G(Llf),r=G(Rlf),i=G(Flf),a=!!Object.keys(r).find(e=>r[e])||!!Object.keys(r).find(e=>!n[e])||i===`loading`,{classes:o}=omf(),s=QA(),c=()=>{t(EN.createUserStart())},l=e=>{e.key===`Enter`&&(t(EN.validate()),a||c())};return(0,oP.jsxs)(B,{className:o.stepTwoContainer,children:[(0,oP.jsx)(bN,{text:i===`success`?``:`Let's set up your Organization`,type:`info`}),i===`success`?(0,oP.jsxs)(B,{children:[(0,oP.jsx)(z,{"data-testid":`os-auth.sign-up.success-message`,variant:`body1`,className:o.confirmationText,children:`Thank you for registering! A confirmation email has been sent with an activation link for your new aiWARE account.`}),(0,oP.jsx)(SN,{onClick:()=>s(`/ui/auth/login`),text:`Return To Homepage`,className:o.formInputTopDoubleMargin,type:`return`})]}):(0,oP.jsxs)(oP.Fragment,{children:[(0,oP.jsx)(s_,{id:`orgName`,"data-testid":`os-auth-orgName-input-field`,label:`Organization Name`,variant:`outlined`,value:`orgName`in n&&n?.orgName,autoComplete:`organization`,autoFocus:!0,className:o.stepTwoTextField,error:`orgName`in r&&r.orgName,onChange:e=>t(EN.setValue({key:`orgName`,value:e.target.value})),onKeyDown:l,disabled:i===`loading`}),(0,oP.jsxs)(wh,{sx:{width:`100%`},children:[(0,oP.jsx)(Bh,{id:`os-auth.sign-up.teamSize`,className:o.formInputTopMargin,children:`Team Size`}),(0,oP.jsx)(yg,{labelId:`os-auth.sign-up.teamSize`,id:`os-auth.sign-up.teamSize`,"data-testid":`os-auth-team-size-input-field`,value:`teamSize`in n&&n?.teamSize,className:o.select,MenuProps:{className:o.menu},label:`Team Size`,onChange:e=>t(EN.setValue({key:`teamSize`,value:e.target.value||``})),disabled:i===`loading`,children:_mf.map(e=>(0,oP.jsx)(ug,{value:e,className:o.menuItem,children:e}))})]}),(0,oP.jsx)(B,{className:o.autoCompleteContainer,children:(0,oP.jsx)(Tm,{disablePortal:!0,id:`os-auth.sign-up.country-autocomplete`,"data-testid":`os-auth.sign-up.country-autocomplete`,options:fmf,value:`country`in n&&fmf.find(e=>e.id===n.country),onChange:(e,n)=>t(EN.setValue({key:`country`,value:(n||{}).id||``})),className:o.autoComplete,autoComplete:!0,renderInput:e=>(0,oP.jsx)(s_,{...e,label:`Country`,autoComplete:`country`,onKeyDown:l,disabled:i===`loading`})})}),(0,oP.jsx)(B,{className:o.autoCompleteContainer,children:(0,oP.jsx)(Tm,{disablePortal:!0,id:`os-auth.sign-up.industry-autocomplete`,"data-testid":`os-auth.sign-up.industry-autocomplete`,options:vmf,value:`industry`in n&&vmf.find(e=>e.id===n.industry),onChange:(e,n)=>t(EN.setValue({key:`industry`,value:(n||{}).id||``})),className:o.autoComplete,renderInput:e=>(0,oP.jsx)(s_,{...e,label:`Industry`,onKeyDown:l,disabled:i===`loading`})})}),(0,oP.jsx)(SN,{onClick:c,text:`Create Account`,type:`create-account`,disableButton:a,className:o.formInputTopDoubleMargin,ref:e?.current?e:void 0,loading:i===`loading`})]})]})}})),xmf,Smf,sP,Cmf,wmf=s((()=>{q(),xuf(),smf(),pk(),LN(),Rpf(),W(),xmf=d(cmf()),dmf(),bmf(),Smf=d(m()),yN(),sP=L(),Cmf=()=>{let e=G(Ilf),t=K(),{classes:n}=omf(),r=G(Flf);return(0,Smf.useEffect)(()=>{t(EN.resetState()),vN(`local`)||vN(`dev`)||window.location.href.includes(`localhost`)?t(EN.setEnv(`dev`)):vN(`stage`)?t(EN.setEnv(`stage`)):t(EN.setEnv(`prod`))},[]),(0,sP.jsx)(fk,{modules:[buf()],children:(0,sP.jsxs)(IN,{showLogoInFooter:!1,children:[(0,sP.jsx)(Lpf,{label:`Login`,navigateTo:`login`}),e===2&&r!==`success`&&(0,sP.jsxs)(V,{className:n.button,onClick:()=>t(EN.setStep(1)),disabled:r===`loading`,children:[(0,sP.jsx)(xmf.default,{fontSize:`small`,sx:{marginRight:`5px`}}),` Back`]}),(0,sP.jsx)(`div`,{children:e===1?(0,sP.jsx)(umf,{}):(0,sP.jsx)(ymf,{})})]})})}})),Tmf,Emf,Dmf,Omf=s((()=>{ij(),pk(),LN(),Euf(),Tmf=d(m()),q(),xuf(),yN(),Emf=L(),Dmf=()=>{let[e]=nj(),[t,n]=(0,Tmf.useState)(``),[r,i]=(0,Tmf.useState)(``),[a,o]=(0,Tmf.useState)(``),s=QA(),c=G(Flf),l=K();return(0,Tmf.useEffect)(()=>{let t=e.get(`useruuid`)||``,r=e.get(`token`)||``,a=e.get(`username`)||``;t&&r?(n(t),o(r),i(a)):s(`/ui/auth/login`)},[]),(0,Tmf.useEffect)(()=>{l(EN.resetState()),vN(`local`)||vN(`dev`)?l(EN.setEnv(`dev`)):vN(`stage`)?l(EN.setEnv(`stage`)):l(EN.setEnv(`prod`))},[]),(0,Tmf.useEffect)(()=>{c===`success`&&s(`/ui/auth/plans?${new URLSearchParams({userId:t,username:r}).toString()}`)},[c]),(0,Emf.jsx)(fk,{modules:[buf()],children:(0,Emf.jsx)(IN,{showLogoInFooter:!1,children:(0,Emf.jsx)(Tuf,{userId:t,token:a})})})}})),kmf,Amf,jmf,Mmf,Nmf,Pmf=s((()=>{ij(),kmf=d(m()),yN(),xN(),LN(),W(),Amf=L(),jmf={dev:`prctbl_1No7MMIyHt9R0gSlZV4mqouD`,stage:`prctbl_1NkvOrInolL392yPOejCV1RT`,prod:`prctbl_1Nj36dInolL392yPggkeo88e`},Mmf={dev:`pk_test_51No7B2IyHt9R0gSl5J4qqbZvRVLokabSDFw36G58tO1oxXO4mJzXmV0FvszOAfJcb25d5HgqZSlFIyMbL9bTFTb700vr9Fvgb9`,stage:`pk_test_51NNcicInolL392yPuFClPywpUYp0ppNltcHBEdkPNkpMgmagbymPCeal9Dl3dDYn63IOfIafuobscqZhCJQfp3KN00Th3bxbLx`,prod:`pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP`},Nmf=()=>{let e=ZA(),t=new URLSearchParams(e.search),[n,r]=(0,kmf.useState)(``),[i,a]=(0,kmf.useState)(``);return(0,kmf.useEffect)(()=>{let e=t.get(`userId`)||``,n=t.get(`username`)||``;e&&n&&(r(e),a(n),olf(`userId`,e,7),olf(`username`,n,7));let i=document.createElement(`script`);return i.src=`https://js.stripe.com/v3/pricing-table.js`,i.async=!0,document.body.appendChild(i),()=>{document.body.removeChild(i)}},[]),(0,Amf.jsxs)(IN,{showLogoInFooter:!1,children:[(0,Amf.jsx)(bN,{text:`Choose your aiWARE Account Plan`}),(0,Amf.jsx)(B,{sx:{width:`100vw`},children:(0,Amf.jsx)(`stripe-pricing-table`,{"pricing-table-id":(()=>{let e=ilf();return gN().stripePricingPlanId||jmf[e]})(),"publishable-key":(()=>{let e=ilf();return gN().stripePublishableKey||Mmf[e]})(),"customer-email":i,"client-reference-id":n})})]})}})),Fmf,Imf,Lmf,cP,Rmf,zmf,Bmf=s((()=>{W(),bd(),rx(),Fmf=d(m()),yN(),Imf=Z(),Lmf=d(gC()),ij(),cP=L(),Rmf=(0,Imf.makeStyles)()(e=>({paymentResultMessage:{color:`#2A323C`,textTransform:`none`,marginTop:e.spacing(4),fontSize:`18px`,fontWeight:600,lineHeight:`24px`,letterSpacing:`-1.3038520263464193e-9px`,textAlign:`center`},instanceProvisionedMessage:{color:`#2A323C`,textTransform:`none`,marginBottom:e.spacing(4),fontSize:`18px`,fontWeight:600,lineHeight:`24px`,letterSpacing:`-1.3038520263464193e-9px`,textAlign:`center`},linearProgress:{height:`7px`,backgroundColor:`#D9D9D9`,marginTop:e.spacing(2),borderRadius:`20px`},paymentResultLogo:{height:`200px`,width:`200px`},paymentResultContainer:{position:`fixed`,width:`100%`,height:`100vh`,top:`0`,left:`0`,backgroundColor:`#ffffff`,display:`flex`,justifyContent:`center`,alignItems:`center`,flexDirection:`column`,textAlign:`center`,fontSize:`14px`},loaderAnimation:{height:`200px`,width:`405px`,marginBottom:e.spacing(3)}})),zmf=()=>{let e=QA(),[t,n]=(0,Fmf.useState)(``),[r,i]=(0,Fmf.useState)(!1),[a,o]=(0,Fmf.useState)(!1),{classes:s}=Rmf();return(0,Fmf.useEffect)(()=>{let r=alf(`userId`),s,c;return r&&t!==`timeout`&&(i(!0),s=setInterval(async()=>{let t=await(await fetch(`${gN().hubUrl}/account_requests?userID=${r}&type=new`)).json(),{accountRequestStatus:i}=t?.result?.[0]||{};t&&(i===`done`||i===`error`?(clearInterval(s),clearTimeout(c),n(i),i===`done`&&setTimeout(()=>{e(`/ui/auth/login`)},2e3)):i===`requested`&&!a&&(setTimeout(()=>{clearInterval(s),clearTimeout(c),n(`timeout`)},12e4),o(!0)))},1e3),c=setTimeout(()=>{clearInterval(s)},12e4)),()=>{clearInterval(s),clearTimeout(c)}},[t,a]),(0,cP.jsxs)(B,{className:s.paymentResultContainer,children:[(0,cP.jsx)(B,{className:s.loaderAnimation,id:`loaderAnimation`,children:(0,cP.jsx)(`img`,{src:Tlt,alt:`aiware-logo`,className:s.paymentResultLogo})}),r&&t!==`done`&&t!==`error`&&t!==`timeout`&&(0,cP.jsxs)(B,{sx:{height:`200px`,width:`405px`},children:[(0,cP.jsx)(Gi,{injectFirst:!0,children:(0,cP.jsx)(Hh,{color:`primary`,className:s.linearProgress})}),(0,cP.jsx)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-in-progress`,className:s.paymentResultMessage,children:`Creating your custom experience...`})]}),!r&&(0,cP.jsx)(z,{variant:`body1`,className:s.paymentResultMessage,children:`Oops! Looks like the URL you are trying to access is invalid`}),t===`done`&&(0,cP.jsx)(jm,{in:!0,timeout:1e3,easing:`cubic-bezier(0.4, 0, 1, 1)`,children:(0,cP.jsx)(B,{sx:{height:`200px`,width:`405px`},children:(0,cP.jsx)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-success`,className:(0,Lmf.default)(s.paymentResultMessage),children:`Your new instance is now ready! Taking you to the login page...`})})}),t===`error`&&(0,cP.jsxs)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-error`,className:s.paymentResultMessage,children:[`An error occurred when creating your Organization.`,(0,cP.jsx)(`br`,{}),` Please contact support`]}),t===`timeout`&&(0,cP.jsxs)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-timeout`,className:s.paymentResultMessage,children:[`Creating your custom experience is taking longer than expected.`,(0,cP.jsx)(`br`,{}),`Please reach out to customer support`,` `,(0,cP.jsx)(`a`,{href:`mailto:support@veritone.com`,style:{color:`#0E6EEC`},children:`support@veritone.com`})]})]})}})),Vmf,Hmf,Umf,Wmf,Gmf=s((()=>{w$d(),X(),pk(),Vmf=d(m()),q(),VHe(),Hmf=L(),Umf=()=>{let e=K(),t=G(ZYd),n=G(gJe);return(0,Vmf.useEffect)(()=>{if(n===`failure`){let e=window.location.search;window.location.href=`/ui/auth/login${e}`,iVe(null),window.analytics?.reset?.()}else t?.status===`success`&&(iVe(null),window.analytics?.reset?.(),e(NUd()))},[e,t,n]),null},Wmf=({aiwareInit:e})=>{let[t,n]=(0,Vmf.useState)(!1);return(0,Vmf.useEffect)(()=>{e?.().then(()=>{n(!0)})},[e]),t?(0,Hmf.jsx)(fk,{modules:[yZd()],children:(0,Hmf.jsx)(Umf,{})}):null}})),lP,Kmf,qmf,Jmf,Ymf,Xmf,Zmf,Qmf,$mf,ehf=s((()=>{W(),ij(),YN(),CN(),lP=L(),Kmf={maxWidth:517},qmf={width:368,mx:`auto`},Jmf=/^[^\s@<>]{1,64}@[^\s@<>]{1,253}$/,Ymf={submitted:`Thank you for registering. Your request must be approved before you can join. If approved you will receive an invitation shortly.`,invited:`Thank you for registering. A confirmation email has been sent with an activation link for your new account.`},Xmf=()=>{let e=QA(),[t]=nj(),n=t.get(`status`),r=[`submitted`,`approved`,`invited`].includes(n??``)?n:`submitted`,i=t.get(`email`),a=i&&Jmf.test(i)?i:null,{config:o,slugUri:s}=JN(),c=()=>{let e=`/ui/auth/login${s}`,n=t.get(`email`);return n&&r===`approved`?`${e}?email=${encodeURIComponent(n)}`:e};return(0,lP.jsxs)(H,{gap:3,sx:Kmf,children:[(0,lP.jsx)(Zmf,{inviteStatus:r,email:a}),(0,lP.jsx)($mf,{onClick:()=>{e(c())},buttonColor:o?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:o?.uiSettings?.registrationButtonStyle?.textColor})]})},Zmf=({inviteStatus:e,email:t})=>(0,lP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-register-success-message`,children:e===`approved`?(0,lP.jsx)(Qmf,{email:t}):Ymf[e]}),Qmf=({email:e})=>(0,lP.jsxs)(lP.Fragment,{children:[`Thanks for registering! We’ve sent a verification email to`,` `,(0,lP.jsx)(`strong`,{children:e||`your email address`}),`. Please click the link in that email to verify your address before logging in. Don’t see it? Check your spam or junk folder.`]}),$mf=({buttonColor:e,buttonTextColor:t,onClick:n})=>(0,lP.jsx)(B,{sx:qmf,children:(0,lP.jsx)(SN,{type:`button`,text:`Continue to Login`,onClick:n,buttonColor:e,buttonTextColor:t})})})),thf,uP,nhf,rhf,ihf,ahf,ohf,shf,chf=s((()=>{thf=d(m()),W(),ij(),CN(),LN(),ON(),uP=L(),nhf={maxWidth:517},rhf={width:368,mx:`auto`},ihf=()=>{let[e]=nj(),t=QA(),n=e.get(`token`)??``,[r,i]=(0,thf.useState)(`loading`),[a,o]=(0,thf.useState)(0);return(0,thf.useEffect)(()=>{if(!n){i(`error`);return}uuf(n).then(e=>{e.ok?i(`success`):(o(e.status),i(`error`))})},[n]),(0,uP.jsx)(IN,{loginConfigs:{hideVeritoneBranding:!0},children:(0,uP.jsxs)(H,{gap:3,sx:nhf,"data-testid":`os-auth-self-service-email-verification`,children:[r===`loading`&&(0,uP.jsx)(ahf,{}),r===`success`&&(0,uP.jsx)(ohf,{}),r===`error`&&(0,uP.jsx)(shf,{status:a,hasToken:!!n}),r!==`loading`&&(0,uP.jsx)(B,{sx:rhf,children:(0,uP.jsx)(SN,{type:`button`,text:r===`success`?`Continue to Login`:`Return to Homepage`,onClick:()=>t(`/ui/auth/login`)})})]})})},ahf=()=>(0,uP.jsxs)(H,{alignItems:`center`,gap:2,children:[(0,uP.jsx)(Qm,{size:40}),(0,uP.jsx)(z,{variant:`body1`,textAlign:`center`,children:`Verifying your email address…`})]}),ohf=()=>(0,uP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-email-verification-success`,children:`Your email has been verified. Your account is ready — please log in to continue.`}),shf=({status:e,hasToken:t})=>(0,uP.jsx)(z,{variant:`body1`,textAlign:`center`,color:`error`,"data-testid":`os-auth-email-verification-error`,children:!t||e===401?`This verification link is invalid or has expired. Please contact your administrator for a new invitation.`:`Something went wrong while verifying your email. Please try again or contact your administrator.`})})),lhf,dP,uhf,dhf,fhf,phf,mhf,hhf,ghf,_hf=s((()=>{lhf=d(m()),W(),ij(),CN(),LN(),ON(),dP=L(),uhf={maxWidth:517},dhf={width:368,mx:`auto`},fhf={approve:`The registration request has been approved. The applicant will receive an email to complete their account setup.`,deny:`The registration request has been denied.`},phf=()=>{let[e]=nj(),t=QA(),n=e.get(`token`)??``,r=e.get(`action`)??``,i=r===`approve`||r===`deny`?r:null,[a,o]=(0,lhf.useState)(`loading`),[s,c]=(0,lhf.useState)(0);return(0,lhf.useEffect)(()=>{if(!n||!i){o(`error`);return}luf(n,i).then(e=>{e.ok?o(`success`):(c(e.status),o(`error`))})},[n,i]),(0,dP.jsx)(IN,{loginConfigs:{hideVeritoneBranding:!0},children:(0,dP.jsxs)(H,{gap:3,sx:uhf,"data-testid":`os-auth-self-service-admin-review`,children:[a===`loading`&&(0,dP.jsx)(mhf,{action:i}),a===`success`&&i&&(0,dP.jsx)(hhf,{action:i}),a===`error`&&(0,dP.jsx)(ghf,{status:s,hasValidParams:!!(n&&i)}),a!==`loading`&&(0,dP.jsx)(B,{sx:dhf,children:(0,dP.jsx)(SN,{type:`button`,text:`Return to Homepage`,onClick:()=>t(`/ui/auth/login`)})})]})})},mhf=({action:e})=>(0,dP.jsxs)(H,{alignItems:`center`,gap:2,children:[(0,dP.jsx)(Qm,{size:40}),(0,dP.jsxs)(z,{variant:`body1`,textAlign:`center`,children:[e===`approve`?`Approving`:e===`deny`?`Denying`:`Processing`,` the registration request…`]})]}),hhf=({action:e})=>(0,dP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-admin-review-success`,children:fhf[e]}),ghf=({status:e,hasValidParams:t})=>{let n;return n=t?e===401?`This link has expired or is invalid. Please use a current link from your invitation email.`:e===400?`This request has already been reviewed or is no longer pending. No further action is needed.`:`Something went wrong while processing this request. Please try again or contact support.`:`This link is missing required parameters and cannot be processed.`,(0,dP.jsx)(z,{variant:`body1`,textAlign:`center`,color:`error`,"data-testid":`os-auth-admin-review-error`,children:n})}})),vhf,fP,yhf,bhf,xhf,Shf,Chf,whf,Thf=s((()=>{vhf=d(m()),W(),ij(),CN(),LN(),ON(),fP=L(),yhf={maxWidth:517},bhf={width:368,mx:`auto`},xhf=()=>{let[e]=nj(),t=QA(),n=e.get(`token`)??``,[r,i]=(0,vhf.useState)(`loading`),a=(0,vhf.useRef)(null);return(0,vhf.useEffect)(()=>{if(!n){i(`missing-token`);return}a.current!==n&&(a.current=n,duf(n).then(()=>{i(`success`)}).catch(()=>{i(`error`)}))},[n]),(0,fP.jsx)(IN,{loginConfigs:{hideVeritoneBranding:!0},children:(0,fP.jsxs)(H,{gap:3,sx:yhf,"data-testid":`os-auth-trial-verify`,children:[r===`loading`&&(0,fP.jsx)(Shf,{}),r===`success`&&(0,fP.jsx)(Chf,{}),(r===`error`||r===`missing-token`)&&(0,fP.jsx)(whf,{missingToken:r===`missing-token`}),r!==`loading`&&(0,fP.jsx)(B,{sx:bhf,children:r===`error`?(0,fP.jsx)(SN,{type:`button`,text:`Try Again`,onClick:()=>window.location.reload()}):(0,fP.jsx)(SN,{type:`button`,text:`Go to Login`,onClick:()=>t(`/ui/auth/login`)})})]})})},Shf=()=>(0,fP.jsxs)(H,{alignItems:`center`,gap:2,children:[(0,fP.jsx)(Qm,{size:40}),(0,fP.jsx)(z,{variant:`body1`,textAlign:`center`,children:`Verifying your account…`})]}),Chf=()=>(0,fP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-trial-verify-success`,children:`Your account has been verified. You can now log in to continue.`}),whf=({missingToken:e})=>(0,fP.jsx)(z,{variant:`body1`,textAlign:`center`,color:`error`,"data-testid":`os-auth-trial-verify-error`,children:e?`This verification link is invalid or has expired. Please request a new one.`:`Something went wrong while verifying your account. Please try again.`})})),Ehf,Dhf,Ohf=s((()=>{SO(),W(),vw(),ij(),YN(),Uuf(),Ehf=L(),Dhf=()=>{let e=QA(),t=lw(),n=Epf(),r=Dpf(),{config:i,slug:a,registerUri:o,isLoading:s}=JN(),c=s||n.isPending||r.isPending,l=async()=>{try{let a=t.getValues(`email`);if(!(await n.mutateAsync(a)).available){e({pathname:`/ui/auth/login`,search:`?email=${encodeURIComponent(a)}&from=org-registration&redirect=${encodeURIComponent(window.location.href)}`});return}let s=await r.mutateAsync({id:i?.id??``,email:a,redirectUrl:`${window.location.origin}/ui/auth/signup`});s.message===`Verification email sent`?e({pathname:`${o}/confirm`,search:`?email=${a}`}):s.message===`domain not allowed`&&t.setError(`email`,{type:`manual`,message:`Your email does not match the requirements to join this Organization, registration is only available to certain domains.`})}catch(e){t.setError(`email`,{type:`manual`,message:`An error occurred, please try again later.`}),oD(e)}};return(0,Ehf.jsx)(mw,{name:`email`,rules:{required:`Email is required`},render:({field:e,fieldState:t})=>(0,Ehf.jsxs)(Ehf.Fragment,{children:[(0,Ehf.jsx)(Huf,{buttonText:`Continue`,error:!!t.error,email:e.value,setEmail:e.onChange,isLoading:c,buttonColor:i?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:i?.uiSettings?.registrationButtonStyle?.textColor,onNextStep:l}),t.error&&(0,Ehf.jsx)(z,{variant:`body2`,color:`error`,mt:3,maxWidth:368,"data-testid":`os-auth-register-email-error-message`,children:t.error.message})]})})}})),khf,pP,Ahf,jhf,Mhf,Nhf,Phf,Fhf=s((()=>{W(),khf=d(m()),ij(),YN(),CN(),pP=L(),Ahf={maxWidth:517},jhf={width:368,mx:`auto`},Mhf=()=>{let e=QA(),[t]=nj(),{config:n,slugUri:r}=JN(),i=()=>{let e=`/ui/auth/login${r}`,n=decodeURIComponent(t.get(`email`));return n?`${e}?email=${encodeURIComponent(n)}`:e},a=()=>{e(i())};return(0,khf.useEffect)(()=>{t.has(`email`)||a()},[t]),(0,pP.jsxs)(H,{gap:3,sx:Ahf,"data-testid":`os-auth-register-confirmation`,children:[(0,pP.jsx)(Nhf,{}),(0,pP.jsx)(Phf,{onClick:a,buttonColor:n?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:n?.uiSettings?.registrationButtonStyle?.textColor})]})},Nhf=()=>(0,pP.jsx)(z,{variant:`body1`,textAlign:`center`,children:`Thank you for your interest in registration. We've sent you an email to confirm your identity, that contains the registration link for the rest of the process.`}),Phf=({buttonColor:e,buttonTextColor:t,onClick:n})=>(0,pP.jsx)(B,{sx:jhf,children:(0,pP.jsx)(SN,{type:`button`,text:`Return to Homepage`,onClick:n,buttonColor:e,buttonTextColor:t,testId:`return-back-home`})})})),mP,hP,Ihf,Lhf,Rhf,zhf,Bhf=s((()=>{W(),ij(),mP=d(m()),YN(),CN(),ON(),yN(),hP=L(),Ihf={buttonContainer:{width:368,mx:`auto`},privacyPolicy:{fontFamily:`Nunito`,fontSize:`14px`,lineHeight:`20px`,letterSpacing:`-1.30385e-09px`,color:`#0C53B0`,cursor:`pointer`,textDecoration:`none`},iframe:{width:`100%`,height:`424px`},iframeStyles:{border:`1px solid #E0E0E0`,borderRadius:`6px`}},Lhf=async(e,t)=>{let n=await fetch(e);if(t===`unknown`){let e=n.headers.get(`content-type`);t=e?.includes(`pdf`)?`pdf`:e?.includes(`text`)?`text`:`unknown`}return{content:t===`pdf`?URL.createObjectURL(await n.blob()):await n.text(),fileType:t}},Rhf=(e,t)=>`
3231
+ `})}),(0,NN.jsx)(`g`,{id:`primary`,children:(0,NN.jsxs)(`g`,{id:`veritone_logo_primary_RGB_cosmos`,children:[(0,NN.jsxs)(`g`,{children:[(0,NN.jsx)(`path`,{className:`cls-1`,d:`M159.5026259.8501463c-1.611277,0-2.9787507.550335-4.0643658,1.6363683-1.0860333,1.0860333-1.6367865,2.453507-1.6367865,4.064784,0,1.5502216.5507531,2.8863312,1.6363683,3.9694372,1.0847788,1.0864515,2.4522524,1.6372047,4.064784,1.6372047,1.5418579,0,2.8888403-.5461531,4.0041468-1.6238227,1.1261794-1.0877061,1.6970055-2.4279975,1.6970055-3.9828192,0-1.6158771-.5708261-2.9875326-1.6978419-4.078166-1.1161428-1.0768332-2.4631253-1.6229863-4.0033104-1.6229863Z`}),(0,NN.jsx)(`polygon`,{className:`cls-1`,points:`154.841132 22.7520748 154.841132 69.6152806 164.0696926 69.6152806 164.0696926 19.9386786 154.841132 22.7520748`})]}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M88.9585505,18.7109702c-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046ZM99.7327372,31.1215252c2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319,2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M189.3478424,0l-9.2289833,2.8298759v16.8261985h-10.7729322v8.5669923h10.7729322v23.7835865c0,5.878882,1.4904208,10.3321624,4.4290254,13.2356393,2.934841,2.9018041,7.4642314,4.3729883,13.4631333,4.3729883h5.8901731v-8.5674105h-5.8901731c-3.1543895,0-5.4117664-.657391-6.7089845-1.9541909-1.2967999-1.2972181-1.9541909-3.5863773-1.9541909-6.8034949v-24.0671177h14.5533486v-8.5669923h-14.5533486V0Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M231.6546328,18.7109702c-7.3768302,0-13.6550815,2.5041077-18.6599513,7.4433221-5.0086335,4.9442326-7.5482872,11.1622649-7.5482872,18.4813852,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0031971,4.9387962,11.2818665,7.4437402,18.6599513,7.4437402,7.378503,0,13.656336-2.5045259,18.6599513-7.4437402,5.0086335-4.9425599,7.5482872-11.1605921,7.5482872-18.480967,0-7.3191203-2.5396536-13.5371526-7.5482872-18.4813852-5.0048698-4.9392144-11.2831211-7.4433221-18.6599513-7.4433221ZM231.6546328,61.8039534c-4.7857395,0-8.6937031-1.6108588-11.9467849-4.9245778-3.2589364-3.3179008-4.8434494-7.322884-4.8434494-12.2436981,0-4.8526495,1.6296773-8.9717979,4.8434494-12.2436981l.0004182-.0004182c3.2526636-3.3133008,7.1606272-4.9241596,11.9463667-4.9241596,4.8476313,0,8.7710679,1.5953859,11.9936219,4.8769044,3.1828262,3.2417907,4.7966124,7.3772484,4.7966124,12.2913715,0,4.9153777-1.6137862,9.0508354-4.7966124,12.2913715-3.2217177,3.2815185-7.1447361,4.8769044-11.9936219,4.8769044Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M289.395475,18.7109702c-4.3780066,0-8.2838792,1.2817452-11.6101438,3.8092713-2.0119008,1.5288941-3.6804695,3.3910837-4.9914878,5.5639867v-8.428154h-9.2285652v49.9592063h9.2285652v-28.3815597c0-4.0217107,1.3164547-7.2643377,4.0254744-9.9135565,2.7136197-2.656328,6.0854667-3.9472733,10.3079075-3.9472733,3.8268352,0,6.9444242,1.2997272,9.5309148,3.9732009,2.5956908,2.6851829,3.8573629,5.9194462,3.8573629,9.8876289v28.3815597h9.2289833v-29.2321534c0-6.1711952-1.9240814-11.3763769-5.7195525-15.4704341-3.8176351-4.1149665-8.7397038-6.2017229-14.6294587-6.2017229Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M359.7852391,26.8551748c-4.9459054-5.4042391-11.3320491-8.1442046-18.9811194-8.1442046-7.2555558,0-13.4250783,2.5066168-18.3366923,7.4508494-4.9095231,4.9433963-7.3989942,11.1589194-7.3989942,18.4738578,0,7.3203749,2.5396536,13.5384071,7.5482872,18.480967,5.0036153,4.9392144,11.2814483,7.4437402,18.6599513,7.4437402,5.3502928,0,10.155269-1.3448915,14.2815266-3.9974558,4.1195666-2.6483824,7.2706106-6.2142685,9.3648943-10.5977115l.4834249-1.0120141-8.0208392-3.3843927-.4416062.9195947c-1.4159834,2.9507321-3.5090126,5.3139105-6.2213777,7.0238798-2.7094378,1.7087148-5.8558817,2.5751996-9.3515123,2.5751996-4.5565727,0-8.4636999-1.448602-11.6134893-4.3060783-2.8737856-2.6040545-4.6556832-5.9307373-5.3076377-9.9018473h41.8242019l.073601-.9911047c.5871355-7.893292-1.6204772-14.6332224-6.5626189-20.0332796ZM330.1629166,31.0817974c2.9988237-2.5864906,6.5789282-3.8979271,10.6412031-3.8979271,4.1827129,0,7.8079817,1.3248185,10.7741867,3.937655,2.6626008,2.3477055,4.4148071,5.2892375,5.2194001,8.758104h-32.0482291c.9028671-3.5182127,2.7203107-6.4731267,5.4134392-8.7978319Z`}),(0,NN.jsxs)(`g`,{children:[(0,NN.jsx)(`polygon`,{className:`cls-1`,points:`55.314171 18.9725847 27.6383499 61.7193071 33.3546939 70.5603847 66.7413769 18.9725847 55.314171 18.9725847`}),(0,NN.jsx)(`polygon`,{className:`cls-1`,points:`32.5518799 51.5991531 11.4276733 18.9726882 0 18.9726882 21.1152954 51.5991531 32.5518799 51.5991531`})]}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M148.2136224,19.1065266c-4.7230092-.8650191-8.9683997-.1471853-12.6188146,2.1290521-2.4020294,1.4985026-4.3988104,3.7671606-5.9704166,6.7739455v-8.3157235l-9.2285412,2.8133903v47.1080896h9.2285412v-28.3815751c0-4.7233759,1.7275933-8.2898072,5.2813108-10.903446,3.5830568-2.6349098,7.7975189-3.3627679,12.8822567-2.2275831l1.3038855.2916811v-9.126954l-.8782218-.1608769Z`}),(0,NN.jsx)(`path`,{className:`cls-1`,d:`M366.5136132,66.7238363v-.3888638h2.3283219v.3888638h-.9575771v2.4790067h-.4131678v-2.4790067h-.9575771ZM369.2453813,66.3349725h.4812189l1.0207674,2.1047253,1.0159066-2.1047253h.4812189v2.8678704h-.4131678v-2.0950037l-.9381339,1.8908502h-.2965086l-.9381339-1.8859894v2.0901429h-.4131678v-2.8678704Z`})]})})]}),adf=(0,rdf.forwardRef)(idf)})),sdf,cdf=s((()=>{sdf=`data:image/png;base64,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`})),ldf=s((()=>{})),PN,udf,ddf=s((()=>{W(),ldf(),PN=L(),udf=({showLogoInFooter:e,loginConfigs:t})=>(0,PN.jsxs)(B,{sx:{textAlign:`center`,"& #aiware-logo":{width:`110px`,marginTop:`5px`}},"data-testid":`aiware-auth-footer`,children:[e&&!t?.hideVeritoneBranding&&(0,PN.jsxs)(H,{sx:{justifyContent:`center`,alignItems:`center`},children:[(0,PN.jsx)(z,{sx:{color:`#5C6269`},variant:`caption`,children:`Powered by`}),(0,PN.jsx)(`img`,{id:`aiware-logo`,draggable:!1,src:`data:image/png;base64,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`,alt:`aiWARE Logo`})]}),e&&!t?.hideVeritoneBranding&&(0,PN.jsxs)(z,{sx:{marginBottom:`18px`,marginTop:`50px`,fontFamily:`Nunito`,fontSize:`10px`,lineHeight:`16px`,color:`#5C6269`},children:[`© `,new Date().getFullYear(),` Veritone, Inc., All Rights Reserved.`,` `,(0,PN.jsxs)(`a`,{href:`https://www.veritone.com/terms`,target:`_blank`,style:{color:`#0C53B0`,textDecoration:`none`},rel:`noreferrer`,children:[`Terms of Service`,` `]})]})]})}));function fdf(){return(0,FN.jsx)(`img`,{draggable:`false`,id:`veritone-v-mark-png`,src:sdf,alt:`Veritone Logo`})}var pdf,FN,mdf,IN,hdf,LN=s((()=>{pdf=d(m()),odf(),cdf(),Hm(),rh(),ddf(),FN=L(),mdf=`500px`,IN=({children:e,showLogoInFooter:t=!0,loginConfigs:n})=>{let[r,i]=pdf.useState(!1);return(0,FN.jsx)(nh,{children:(0,FN.jsxs)(B,{sx:{display:`flex`,alignItems:`center`,flexDirection:`column`,justifyContent:`space-between`,height:`100vh`},children:[(0,FN.jsxs)(B,{sx:{maxWidth:mdf,width:`100%`},children:[n?.logo&&!r?(0,FN.jsx)(hdf,{logoSrc:n.logo,onError:e=>{i(!0)}}):(0,FN.jsxs)(B,{sx:{marginTop:`calc(100vh * 0.2)`,marginBottom:`calc(100vh * 0.06)`,textAlign:`center`,position:`relative`,maxWidth:mdf,marginLeft:`auto`,marginRight:`auto`,"& #veritone-logo-svg":{width:`220px`},"& #veritone-v-mark-png":{position:`absolute`,bottom:`-115%`,left:`5%`,pointerEvents:`none`}},children:[!n?.hideVeritoneBranding&&(0,FN.jsx)(fdf,{}),!n?.hideVeritoneBranding&&(0,FN.jsx)(adf,{id:`veritone-logo-svg`})]}),e]}),(0,FN.jsx)(udf,{showLogoInFooter:t,loginConfigs:n})]})})},hdf=({logoSrc:e,onError:t})=>{let[n,r]=pdf.useState(0),[i,a]=pdf.useState(0);return(0,FN.jsx)(B,{sx:{width:`207px`,height:`118px`,maxWidth:`100vw`,display:`flex`,alignCenter:`center`,justifyContent:`center`,margin:`0 auto`,marginBlockStart:`min(calc(100vh * 0.1), calc(${n}px * 0.5))`,marginBlockEnd:`30px`,textAlign:`center`},children:(0,FN.jsx)(`img`,{style:{pointerEvents:`none`,objectFit:`contain`,width:`100%`,height:`100%`},onLoad:e=>{r(e.target.naturalHeight),a(e.target.naturalWidth)},src:e,alt:`instance-logo`,onError:t})})}})),gdf,_df,vdf,ydf,bdf=s((()=>{W(),gdf=Z(),_df=L(),vdf=(0,gdf.makeStyles)()(()=>({btnWrapper:{display:`flex`,alignItems:`center`,width:`100%`,justifyContent:`center`,flexDirection:`column`},openIdLogo:{width:`24px`,height:`24px`,marginRight:`8px`},openIdBtn:{width:`368px`,marginTop:`20px`,height:`56px`,border:`1px solid #DADFE8`,borderRadius:`4px`,fontFamily:`Nunito`,fontStyle:`normal`,fontWeight:`600`,fontSize:`18px`,lineHeight:`24px`,letterSpacing:`-1.30385e-09px`,textTransform:`none`,"&:hover, &:focus":{border:`1px solid #DADFE8`,color:`#2A323C`}}})),ydf=({openIdItems:e,redirectUrl:t})=>{let{classes:n}=vdf(),r=e=>`Login with `+(e.length>20?e.substring(0,20)+`...`:e),i=e=>{let n=t?btoa(t):``;window.location.href=e+(n?`?redirectUrlEncoded=${encodeURIComponent(n)}&redirectUrl=${encodeURIComponent(t)}`:``)};return(0,_df.jsx)(B,{className:n.btnWrapper,children:e&&e.map((e,t)=>(0,_df.jsxs)(V,{variant:`outlined`,"data-testid":`os-auth-openId-button-${t}`,className:n.openIdBtn,onClick:()=>i(e.loginUrl),sx:{backgroundColor:e.loginButtonStyle&&e.loginButtonStyle.btnColor?e.loginButtonStyle.btnColor:`#FFFFFF`,"&:hover, &:focus":{backgroundColor:e.loginButtonStyle&&e.loginButtonStyle.btnColor?e.loginButtonStyle.btnColor:`#FFFFFF`}},children:[e.loginButtonStyle&&e.loginButtonStyle.btnLogo&&(0,_df.jsx)(`img`,{className:n.openIdLogo,alt:`icon`,src:e.loginButtonStyle.btnLogo,"data-testid":`os-auth-openId-image-${t}`}),(0,_df.jsx)(`span`,{"data-testid":`os-auth-openId-name-${t}`,style:{marginTop:`3px`,color:e.loginButtonStyle&&e.loginButtonStyle.btnTextColor?e.loginButtonStyle.btnTextColor:`#2A323C`},children:e?.name&&r(e.name)})]},e.connectId))})}}));function xdf(){let{slug:e}=DQd(),t=QA(),[n,r]=(0,Sdf.useState)(),[i,a]=(0,Sdf.useState)(null);return(0,Sdf.useEffect)(()=>{if(n===void 0){r(!0);return}else if(n){if(e){(async()=>{let n=await tuf(e);if(!n){t(window.location.pathname.replace(`/${e}`,``)+window.location.search),r(!1);return}a(n),r(!1)})();return}r(!1)}},[e,n]),{slug:e,slugUri:e?`/${e}`:``,loginConfigs:i,isLoadingLoginConfigs:n}}var Sdf,Cdf=s((()=>{Sdf=d(m()),ij(),ON()})),wdf,Tdf,Edf,RN,Ddf,Odf=s((()=>{wdf=d(m(),1),Tdf=L(),Edf=wdf.createContext(void 0),RN=e=>{let t=wdf.useContext(Edf);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Ddf=({client:e,children:t})=>(wdf.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Tdf.jsx)(Edf.Provider,{value:e,children:t}))}));function kdf(e){setTimeout(e,0)}var Adf,jdf,zN,Mdf=s((()=>{Adf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},jdf=class{#e=Adf;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},zN=new jdf}));function BN(){}function Ndf(e,t){return typeof e==`function`?e(t):e}function Pdf(e){return typeof e==`number`&&e>=0&&e!==1/0}function Fdf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function VN(e,t){return typeof e==`function`?e(t):e}function Idf(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Rdf(o,t.options))return!1}else if(!zdf(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ldf(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(HN(t.options.mutationKey)!==HN(a))return!1}else if(!zdf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Rdf(e,t){return(t?.queryKeyHashFn||HN)(e)}function HN(e){return JSON.stringify(e,(e,t)=>Udf(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function zdf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!zdf(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!zdf(e[r],t[r]))return!1;return!0}return!1}function Bdf(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Hdf(e)&&Hdf(t);if(!r&&!(Udf(e)&&Udf(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:$df.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Bdf(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Vdf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Hdf(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Udf(e){if(!Wdf(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Wdf(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Wdf(e){return Object.prototype.toString.call(e)===`[object Object]`}function Gdf(e){return new Promise(t=>{zN.setTimeout(t,e)})}function Kdf(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Bdf(e,t)}function qdf(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Jdf(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}function Ydf(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===eff?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xdf(e,t){return typeof e==`function`?e(...t):!!e}function Zdf(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Qdf,$df,eff,UN=s((()=>{Mdf(),Qdf=typeof window>`u`||`Deno`in globalThis,$df=Object.prototype.hasOwnProperty,eff=Symbol()})),tff,nff,rff=s((()=>{UN(),tff=()=>Qdf,nff=()=>tff()})),WN,iff=s((()=>{WN=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}})),aff,off,sff=s((()=>{iff(),aff=class extends WN{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},off=new aff}));function cff(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=lff,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var lff,GN,KN=s((()=>{Mdf(),lff=kdf,GN=cff()})),uff,dff,fff=s((()=>{iff(),uff=class extends WN{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}},dff=new uff}));function pff(e){return Math.min(1e3*2**e,3e4)}function mff(e){return(e??`online`)===`online`?dff.isOnline():!0}function hff(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(BN);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new gff(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>off.isFocused()&&(e.networkMode===`always`||dff.isOnline())&&e.canRun(),p=()=>mff(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(nff()?0:3),a=e.retryDelay??pff,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),Gdf(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var gff,_ff=s((()=>{UN(),rff(),sff(),fff(),gff=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}}})),vff,yff=s((()=>{Mdf(),UN(),rff(),vff=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Pdf(this.gcTime)&&(this.#e=zN.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(nff()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(zN.clearTimeout(this.#e),this.#e=void 0)}}}));function bff(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Zdf(e,()=>t.signal,()=>n=!0)},u=Ydf(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?Jdf:qdf;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Sff:xff,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:xff(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function xff(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Sff(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Cff=s((()=>{UN()}));function wff(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:mff(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Tff(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Eff(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Dff,Off=s((()=>{UN(),KN(),_ff(),yff(),Cff(),Dff=class extends vff{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Eff(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Eff(this.options);e.data!==void 0&&(this.setState(Tff(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Kdf(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(BN).catch(BN):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>VN(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eff||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>VN(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Fdf(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ydf(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?bff(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=hff({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof gff&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof gff){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...wff(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Tff(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),GN.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}}}));function kff(e,t){return VN(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&VN(t.retryOnMount,e)===!1)}function Aff(e,t){return kff(e,t)||e.state.data!==void 0&&jff(e,t,t.refetchOnMount)}function jff(e,t,n){if(VN(t.enabled,e)!==!1&&VN(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Nff(e,t)}return!1}function Mff(e,t,n,r){return(e!==t||VN(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Nff(e,n)}function Nff(e,t){return VN(t.enabled,e)!==!1&&e.isStaleByTime(VN(t.staleTime,e))}var Pff,Fff=s((()=>{Mdf(),UN(),rff(),iff(),sff(),KN(),Off(),Pff=class extends WN{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Aff(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jff(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jff(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof VN(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Vdf(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Mff(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||VN(this.options.enabled,this.#t)!==VN(t.enabled,this.#t)||VN(this.options.staleTime,this.#t)!==VN(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||VN(this.options.enabled,this.#t)!==VN(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Vdf(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(BN)),t}#h(e){return!nff()&&VN(this.options.enabled,this.#t)!==!1&&Pdf(e)}#g(){this.#b();let e=VN(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Fdf(this.#r.dataUpdatedAt,e)+1;this.#u=zN.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,!(this.#f===0||!this.#h(this.#f))&&(this.#d=zN.setInterval(()=>{(this.options.refetchIntervalInBackground||off.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(zN.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(zN.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Aff(e,t),o=i&&Mff(e,n,t,r);(a||o)&&(l={...l,...wff(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Kdf(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Kdf(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Nff(e,t),refetch:this.refetch,isEnabled:VN(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Vdf(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();GN.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}}}));function Iff(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Lff,Rff=s((()=>{KN(),_ff(),yff(),Lff=class extends vff{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Iff(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=hff({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),GN.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}}}));function zff(e){return e.options.scope?.id}var Bff,Vff=s((()=>{UN(),iff(),KN(),Rff(),Bff=class extends WN{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Lff({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=zff(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=zff(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=zff(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=zff(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){GN.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ldf(t,e))}findAll(e={}){return this.getAll().filter(t=>Ldf(e,t))}notify(e){GN.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return GN.batch(()=>Promise.all(e.map(e=>e.continue().catch(BN))))}}})),Hff,Uff=s((()=>{UN(),iff(),KN(),Rff(),Hff=class extends WN{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Vdf(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&HN(t.mutationKey)!==HN(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Iff();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){GN.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}}})),Wff,Gff=s((()=>{UN(),iff(),KN(),Off(),Wff=class extends WN{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Rdf(r,t),a=this.get(i);return a||(a=new Dff({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){GN.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Idf(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Idf(e,t)):t}notify(e){GN.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){GN.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){GN.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}})),Kff,qff=s((()=>{UN(),sff(),KN(),fff(),Vff(),Gff(),Kff=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Wff,this.#t=e.mutationCache||new Bff,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=off.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=dff.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(VN(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Ndf(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return GN.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;GN.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return GN.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=GN.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(BN).catch(BN)}invalidateQueries(e,t={}){return GN.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=GN.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(BN)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(BN)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(VN(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(VN(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(BN).catch(BN)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(BN).catch(BN)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return dff.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(HN(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{zdf(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(HN(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{zdf(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Rdf(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===eff&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}}})),Jff=s((()=>{UN(),KN(),Fff(),Uff(),qff()})),Yff,Xff,Zff,Qff=s((()=>{Yff=d(m(),1),Xff=Yff.createContext(!1),Zff=()=>Yff.useContext(Xff),Xff.Provider}));function $ff(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var epf,tpf,npf,rpf=s((()=>{epf=d(m(),1),L(),tpf=epf.createContext($ff()),npf=()=>epf.useContext(tpf)})),ipf,apf,opf,spf,cpf=s((()=>{ipf=d(m(),1),Jff(),apf=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Xdf(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},opf=e=>{ipf.useEffect(()=>{e.clearReset()},[e])},spf=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Xdf(n,[e.error,r]))})),lpf,upf,dpf,fpf=s((()=>{lpf=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},upf=(e,t)=>e?.suspense&&t.isPending,dpf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()})}));function ppf(e,t,n){let r=Zff(),i=npf(),a=RN(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,lpf(o),apf(o,i,s),opf(i);let[l]=mpf.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(mpf.useSyncExternalStore(mpf.useCallback(e=>{let t=d?l.subscribe(GN.batchCalls(e)):BN;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),mpf.useEffect(()=>{l.setOptions(o)},[o,l]),upf(o,u))throw dpf(o,l,i);if(spf({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}var mpf,hpf=s((()=>{Odf(),Qff(),rpf(),cpf(),fpf(),mpf=d(m(),1),Jff()}));function gpf(e,t){return ppf(e,Pff,t)}var _pf=s((()=>{hpf(),Jff()}));function qN(e,t){let n=RN(t),[r]=vpf.useState(()=>new Hff(n,e));vpf.useEffect(()=>{r.setOptions(e)},[r,e]);let i=vpf.useSyncExternalStore(vpf.useCallback(e=>r.subscribe(GN.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=vpf.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(BN)},[r]);if(i.error&&Xdf(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var vpf,ypf=s((()=>{Odf(),vpf=d(m(),1),Jff()})),bpf=s((()=>{Odf(),_pf(),ypf(),Jff()}));function xpf(e){let{data:t,isLoading:n}=gpf({enabled:!!e,queryKey:Cpf.orgSignUpConfig(e??``),queryFn:()=>ruf(e),retry:1,retryDelay:500});return{config:t??null,isLoading:n}}function JN(){let{slug:e}=DQd(),t=QA(),n=()=>{t(Tpf)},{data:r,isLoading:i}=gpf({queryKey:Cpf.registrationConfig(e??``),queryFn:async()=>{if(!e)return n(),null;try{return await ruf(e)||(n(),null)}catch(e){throw n(),e}},retry:!1}),a=e?`/${e}`:``,o=(0,Spf.useMemo)(()=>r?r.files.find(e=>e.type===`termsOfService`&&e.status===`active`)??null:null,[r]),s=(0,Spf.useMemo)(()=>r?r.files.find(e=>e.type===`privacyPolicy`&&e.status===`active`)??null:null,[r]);return{slug:e,slugUri:a,registerUri:wpf(e??``),config:r??null,tosFile:o,privacyPolicyUrl:s,isLoading:i}}var Spf,Cpf,wpf,Tpf,Epf,Dpf,Opf,YN=s((()=>{ij(),bpf(),ON(),Spf=d(m()),Cpf={registrationConfig:e=>[`registration-config`,e],orgSignUpConfig:e=>[`org-sign-up-config`,e]},wpf=e=>`/ui/auth/signup/${e}`,Tpf=`/ui/auth/login`,Epf=()=>qN({mutationFn:ouf}),Dpf=()=>qN({mutationFn:suf}),Opf=()=>qN({mutationFn:cuf})})),kpf,XN,Apf=s((()=>{m(),ip(),kpf=L(),XN=({onClick:e,text:t,type:n})=>(0,kpf.jsx)(z,{sx:{fontFamily:`Nunito`,fontSize:`14px`,lineHeight:`20px`,letterSpacing:`-1.30385e-09px`,color:`#0C53B0`,cursor:`pointer`},onClick:e,"data-testid":`os-auth-${n}-link-button`,children:t})})),jpf,Mpf,Npf=s((()=>{m(),Hm(),yh(),ip(),jpf=L(),Mpf=()=>(0,jpf.jsxs)(B,{sx:{marginTop:`20px`,position:`relative`},children:[(0,jpf.jsx)(vh,{sx:{margin:`0 14px`,color:`#D5DFE9`}}),(0,jpf.jsx)(z,{sx:{color:`#D5DFE9`,fontSize:`14px`,margin:0,top:`-12px`,padding:`0 10px`,position:`absolute`,left:`calc(50% - 15px)`,background:`#FFFFFF`,fontFamily:`Nunito`,letterSpacing:`- 1.30385e-09px`,fontStyle:`normal`,fontWeight:`normal`},children:`or`})]})})),Ppf,Fpf,Ipf,Lpf,Rpf=s((()=>{W(),Ppf=Z(),ij(),q(),xuf(),yN(),CN(),Fpf=L(),Ipf=(0,Ppf.makeStyles)()((e,{label:t,buttonColor:n,buttonTextColor:r})=>{let i=t===`Sign Up`;return{button:{position:`absolute`,right:i?`220px`:`40px`,top:`30px`,background:i?n||`#212121`:`none`,border:i?`none`:`1px solid #5C6269`,color:i?r||`#FFFFFF`:`#5C6269`,borderRadius:`4px`,paddingLeft:`14px`,paddingRight:`14px`,fontWeight:400,"&:hover":{background:i?n||`#212121`:`none`,opacity:.9}}}}),Lpf=({label:e=`Sign Up`,navigateTo:t=`sign-up`,buttonColor:n,buttonTextColor:r})=>{let i=QA(),a=G(Flf),o=()=>{let e=gN().signupUrl||``;t===`sign-up`&&e?window.location.href=e:i(`/ui/auth/${t}`)},{classes:s}=Ipf({label:e,buttonColor:n,buttonTextColor:r});return(0,Fpf.jsx)(V,{className:s.button,onClick:o,disabled:t!==`sign-up`&&a===`loading`,children:e})}}));function zpf(e){return(0,ZN.jsx)(xh,{...e,direction:`up`})}var Bpf,ZN,QN,$N,Vpf,Hpf=s((()=>{W(),KS(),Bpf=d(m()),ZN=L(),QN=function(e){return e.EnvError=`EnvError`,e.RegistrationNotApproved=`RegistrationNotApproved`,e.AccountExists=`AccountExists`,e.RegistrationConfigurationInvalid=`RegistrationConfigurationInvalid`,e.RegistrationError=`RegistrationError`,e.Unauthorized=`401`,e.CaptchaError=`CaptchaError`,e.Forbidden=`403`,e.InviteExists=`409`,e}({}),$N={EnvError:{title:`Environment Error`,description:`Due to a temporary issue the environment data could not be fully retrieved. Please select from the available environments or try again later.`},RegistrationNotApproved:{title:`Registration Not Approved`,description:`This email address is not approved for registration.`},AccountExists:{title:`Account Already Exists`,description:`An account with this email address already belongs to this organization. Please sign in instead.`},RegistrationConfigurationInvalid:{title:`Registration Error`,description:`This registration page is not configured correctly. Contact the organization administrator.`},CaptchaError:{title:`Captcha Error`,description:`reCAPTCHA verification failed. Please try again.`},RegistrationError:{description:`An error occurred during registration. Please try again.`},401:{title:`Authentication Required`,description:`Your session has expired or you are not authorized. Please log in again or contact your administrator.`},403:{title:`Access Denied`,description:`You do not have permission to access the requested resource.`},409:{title:`Invite Already Exists`,description:`An invite for this email already exists. Please check your inbox or contact your administrator.`}},Vpf=e=>{let{open:t,message:n,onClose:r}=e,[i,a]=(0,Bpf.useState)(``),[o,s]=(0,Bpf.useState)(``);return(0,Bpf.useEffect)(()=>{n&&(a(n.title??``),s(n.description))},[n]),(0,ZN.jsx)(Eg,{"data-testid":`os-auth-desktop-snackbar`,onClose:r,ContentProps:{sx:{backgroundColor:`#465364`}},anchorOrigin:{vertical:`bottom`,horizontal:`right`},TransitionComponent:zpf,open:t,message:(0,ZN.jsx)(()=>(0,ZN.jsxs)(H,{sx:{gap:`10px`,position:`relative`,transform:`translate(5px, -5px)`,paddingBlockStart:`10px`,paddingInlineEnd:`10px`},children:[i&&(0,ZN.jsx)(z,{variant:`h6`,children:i}),(0,ZN.jsx)(z,{sx:{width:`350px`,fontSize:`14px`},variant:`body1`,children:o}),(0,ZN.jsx)(Xf,{sx:{position:`absolute`,top:i?0:`5px`,right:0,color:`#FFF`},onClick:r,size:`small`,children:(0,ZN.jsx)(pS,{fontSize:`small`})})]}),{}),autoHideDuration:6e3})}})),eP,tP,Upf,Wpf=s((()=>{eP=d(m()),ij(),Uuf(),$uf(),ndf(),LN(),xN(),bdf(),ON(),Cdf(),YN(),CN(),Hm(),Apf(),Npf(),yN(),SO(),Rpf(),W(),Yx(),Hpf(),tP=L(),Upf=(0,eP.memo)(({allowVanityDomain:e,onLoginSuccess:t})=>{let[n,r]=(0,eP.useState)(1),[i,a]=(0,eP.useState)(``),[o,s]=(0,eP.useState)([]),[c,l]=(0,eP.useState)(``),[u,d]=(0,eP.useState)(``),[f,p]=(0,eP.useState)(``),[m,h]=(0,eP.useState)(!1),[g,_]=(0,eP.useState)(!1),[v,y]=(0,eP.useState)(!1),[b,x]=(0,eP.useState)([]),[S,C]=(0,eP.useState)(``),[w,T]=(0,eP.useState)({aiwareInstanceName:`aiWARE US`,coreAdminApiUrl:_N(),coreGraphqlApiUrl:gN().baseUrl}),[E,D]=(0,eP.useState)(null),{disableEnvironmentDiscovery:O,hubUrl:k}=gN(),A=!O,j=QA(),{slug:M,slugUri:ee,loginConfigs:te,isLoadingLoginConfigs:ne}=xdf(),{config:re}=xpf(M);(0,eP.useEffect)(()=>{let e=new URL(window.location.href),t=e.searchParams.get(`redirect`),n=e.searchParams.get(`openIdRedirect`),r=e.searchParams.get(`email`),i=e.searchParams.get(`from`),o=e.searchParams.get(`error`);n&&(t=n),t&&rlf(t)&&a(t+e.hash),r&&(l(r),_(!0)),i&&C(i),o&&$N[o]&&D($N[o])},[]);let ie=(0,eP.useCallback)(async e=>{y(!1);let t=te?.organizationInfo?.guid,n=await Jlf(c,e,t);n.find(e=>e.required)&&y(!0),s(n)},[c,te]),ae=e=>b.find(t=>t.coreGraphqlApiUrl===e)?.aiwareInstanceName,oe=(0,eP.useCallback)(async()=>{let e=(e=!1)=>{_(!1),r(2),e&&D($N[QN.EnvError])};if(!A||!k){await ie(w.coreAdminApiUrl),e();return}try{let t=await Xlf(c);if(!t||!t.success||t.count<=0){await ie(_N()),e(!0);return}let n=t.result.map(e=>({aiwareInstanceID:e.aiwareInstanceID,aiwareInstanceName:e.AiwareInstanceName,coreGraphqlApiUrl:e.GraphqlEndpoint,coreAdminApiUrl:e.GraphqlEndpoint.replace(`/v3/graphql`,``)})),r=n[0],i=alf(`last-login-instance-url`),a=n.find(e=>e.coreGraphqlApiUrl===i),o=n.find(e=>e.coreGraphqlApiUrl===gN().baseUrl);a?r=a:o&&(r=o),T(r),x(n),await ie(r.coreAdminApiUrl),e()}catch(t){console.error(t),await ie(_N()),e(!0)}},[c,k,A,w.coreAdminApiUrl,ie]),se=e=>{l(e),p(``)};(0,eP.useEffect)(()=>{g&&c&&oe().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},[g,c,oe]);let ce=async()=>{if(!u){p(`Password is required`);return}h(!0);let n=await Zlf(c,u,e??!1,w.coreGraphqlApiUrl);if(h(!1),n&&n.ok){let e=await n.json();if(e.errors&&e.errors.length){if(e.errors[0].name===`not_found`){p(`Email or Password is incorrect`);return}p(`Something went wrong with login. Please try again`);return}try{let t=e?.data?.userLogin?.token;if(t){let{userSettings:e,userId:n}=await iuf(t);if(e&&e.length){let r=e.find(e=>e.key===`customRegistrationId`);if(r&&r.value){let a=await nuf(r.value),o=a?.files?.find(e=>e.type===`termsOfService`&&e.status===`active`);if(a&&o&&!e.some(e=>e.key===o.fileId)){j({pathname:`/ui/auth/signup/${a.slug}/terms-of-service`,search:`?userId=${encodeURIComponent(n)}&token=${encodeURIComponent(t)}&redirect=${encodeURIComponent(i)}&referer=login`});return}}}}}catch(e){oD(e)}if(olf(`last-login-instance-url`,w.coreGraphqlApiUrl,365),i){if(S===`org-registration`){let t=e?.data?.userLogin?.token;window.location.href=i+`/terms-of-service?email=${encodeURIComponent(c)}&token=${encodeURIComponent(t)}`;return}window.location.href=i}else if(t){let n=e?.data?.userLogin?.token;t(n)}else{let e=w.coreAdminApiUrl?w.coreAdminApiUrl+`/api/admin/switch-app`:gN().switchAppUrl;window.location.href=e+`/default`}}else p(`Something went wrong with login. Please try again`)},le=e=>{f&&p(``),d(e)},ue=()=>{j(`/ui/auth/forgot${ee}`,{state:{emailFromLogin:c}})},de=async e=>{let t=e.target.value,n=b.find(e=>e.coreGraphqlApiUrl===t);n&&(T(n),await ie(n.coreAdminApiUrl))},fe=()=>{S===`org-registration`&&i?window.location.href=i:r(1)};(0,eP.useEffect)(()=>{},[]);let pe=gN();return ne===!1?(0,tP.jsxs)(IN,{loginConfigs:te,children:[(0,tP.jsx)(Vpf,{open:!!E,message:E,onClose:()=>D(null)}),pe.signupUrl&&!M&&(0,tP.jsx)(Lpf,{}),M&&re&&(0,tP.jsx)(Lpf,{navigateTo:`signup/${M}/join`,buttonColor:te?.buttonColor,buttonTextColor:te?.buttonTextColor}),(0,tP.jsxs)(`div`,{style:{display:n===1?`block`:`none`},children:[(0,tP.jsx)(bN,{text:`Welcome back`}),(0,tP.jsx)(Huf,{email:c,setEmail:se,onNextStep:()=>{_(!0)},isLoading:g,buttonText:`Continue`,buttonColor:te?.buttonColor,buttonTextColor:te?.buttonTextColor}),pe?.displaySystemUseInLogin&&(0,tP.jsxs)(H,{gap:4,mt:8,sx:{maxWidth:`558px`},children:[(0,tP.jsx)(z,{variant:`body1`,"data-test":`fedramp-system-use-notice`,"data-testid":`fedramp-system-use-notice-1`,sx:{fontSize:`12px`,lineHeight:`16px`,fontWeight:`400`,textAlign:`justify`},children:`The use of the system is restricted to authorized users only. The system and equipment are subject to monitoring to ensure proper performance of applicable security features or procedures. Such monitoring may result in the acquisition, recording, and analysis of all data being communicated, transmitted, processed or stored in the application/system, including but not limited to information stored locally on the hard drive by the user. There is no right of privacy in the system. If monitoring reveals possible evidence of criminal activity, such evidence may be provided to law enforcement personnel, and other personnel in conjunction with the report of improper or unauthorized use.`}),(0,tP.jsx)(z,{variant:`body1`,"data-test":`fedramp-system-use-notice`,"data-testid":`fedramp-system-use-notice-2`,sx:{fontSize:`12px`,lineHeight:`16px`,fontWeight:`400`,textAlign:`center`},children:`ANYONE USING THE SYSTEM EXPRESSLY CONSENTS TO US HC MONITORING FOR NETWORK ADMINISTRATION AND SECURITY PURPOSES.`})]})]}),(0,tP.jsx)(`div`,{style:{display:n===2?`block`:`none`},children:(0,tP.jsxs)(B,{sx:{maxWidth:`368px`,width:`100%`,marginInlineStart:`auto`,marginInlineEnd:`auto`},children:[S===`org-registration`&&(0,tP.jsx)(H,{mt:8,children:(0,tP.jsx)(z,{"data-testid":`os-auth-org-registration-email-message`,variant:`body1`,sx:{fontSize:`18px`,textAlign:`justify`,marginBottom:`30px`},children:`This email has an existing aiWARE account, to continue the registration process please authenticate below.`})}),(0,tP.jsx)(bN,{text:v?`Choose Authentication Option for`:`Enter Password for`,subText:c}),` `,A&&b.length>0&&(0,tP.jsx)(yg,{value:w.coreGraphqlApiUrl,onChange:de,disabled:b.length<2,"data-testid":`os-auth-env-dropdown-select`,sx:{width:`100%`,height:`52px`,marginBottom:`15px`},renderValue:e=>(0,tP.jsxs)(H,{direction:`row`,alignItems:`center`,children:[(0,tP.jsx)(tbt,{sx:{width:`27px`,height:`26px`,color:b.length<2?`#9CA8B4`:`#555F7C`,marginRight:`8px`}}),(0,tP.jsx)(`span`,{children:ae(e)})]}),children:b.map(e=>(0,tP.jsx)(ug,{"data-testid":`os-auth-env-dropdown-item`,value:e.coreGraphqlApiUrl,children:e.aiwareInstanceName},e.aiwareInstanceName))}),v?(0,tP.jsxs)(tP.Fragment,{children:[o&&o.length>0&&(0,tP.jsx)(ydf,{openIdItems:o,redirectUrl:i}),(0,tP.jsx)(B,{sx:{mt:`20px`},children:(0,tP.jsx)(XN,{onClick:()=>fe(),text:`Back to Login`,type:`login`})})]}):(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)(Quf,{password:u,errorMessage:f,onPasswordChange:le,onPressEnter:()=>{ce().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})}}),(0,tP.jsx)(B,{sx:{mt:`14px`},children:(0,tP.jsx)(XN,{onClick:ue,text:`Forgot Password?`,type:`forgot`})}),(0,tP.jsx)(B,{sx:{mt:`25px`},children:(0,tP.jsx)(SN,{onClick:()=>{ce().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},text:`Login`,type:`login`,loading:m,buttonColor:te?.buttonColor,buttonTextColor:te?.buttonTextColor})}),o&&o.length>0&&(0,tP.jsxs)(tP.Fragment,{children:[(0,tP.jsx)(Mpf,{}),` `,(0,tP.jsx)(ydf,{openIdItems:o,redirectUrl:i})]}),(0,tP.jsx)(B,{sx:{mt:`20px`},children:(0,tP.jsx)(XN,{onClick:()=>fe(),text:`Back to Login`,type:`login`})})]})]})})]}):(0,tP.jsx)(tdf,{})})})),Gpf,nP,Kpf,qpf=s((()=>{Gpf=d(m()),ij(),LN(),xN(),Uuf(),ON(),Hm(),ndf(),Apf(),CN(),SO(),Cdf(),nP=L(),Kpf=()=>{let[e,t]=(0,Gpf.useState)(``),[n,r]=(0,Gpf.useState)(!1),[i,a]=(0,Gpf.useState)(1),o=QA(),{state:s}=ZA(),{slugUri:c,loginConfigs:l,isLoadingLoginConfigs:u}=xdf();(0,Gpf.useEffect)(()=>{s&&s.emailFromLogin&&t(s.emailFromLogin)},[s]);let d=async()=>{r(!0);try{let t=await(await Qlf(e))?.json();if(t.errors&&t.errors.length){alert(`Something went wrong. Please try again.`),r(!1);return}r(!1),a(2)}catch{alert(`Something went wrong. Please try again.`),r(!1)}};return u===!1?(0,nP.jsxs)(IN,{loginConfigs:l,children:[i===1?(0,nP.jsxs)(nP.Fragment,{children:[(0,nP.jsx)(bN,{text:`Forgot Password`,subText:`Enter your registered email to reset your password.`}),(0,nP.jsx)(Huf,{email:e,setEmail:t,onNextStep:()=>{d().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},isLoading:n,buttonText:`Send`,buttonColor:l?.buttonColor,buttonTextColor:l?.buttonTextColor})]}):(0,nP.jsxs)(nP.Fragment,{children:[(0,nP.jsx)(bN,{text:`Password reset requested`,subText:`Your password reset will be sent to the email provided if it matches our records.`}),(0,nP.jsx)(B,{sx:{mt:`25px`},children:(0,nP.jsx)(SN,{onClick:()=>{d().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},text:`Request Password Again`,type:`reset-pw`,loading:n,buttonColor:l?.buttonColor,buttonTextColor:l?.buttonTextColor})})]}),(0,nP.jsx)(B,{sx:{mt:`20px`},children:(0,nP.jsx)(XN,{onClick:()=>{o(`/ui/auth/login${c}`)},text:`Back to Login`,type:`login`})})]}):(0,nP.jsx)(tdf,{})}})),Jpf,Ypf,Xpf=s((()=>{m(),ij(),LN(),xN(),CN(),Jpf=L(),Ypf=()=>{let e=QA();return(0,Jpf.jsxs)(IN,{children:[(0,Jpf.jsx)(bN,{text:`Authentication Restriction`,subText:`Authenticating with this OpenID provider has been restricted by an admin of your account. We are sorry for the inconvenience. Please return to the login screen and choose another authentication provider.`,type:`restricted-provider`}),(0,Jpf.jsx)(SN,{onClick:()=>e(`/ui/auth/login`),text:`Back to Login`,type:`back-to-login`,loading:!1})]})}})),rP,iP,Zpf,Qpf=s((()=>{rP=d(m()),LN(),xN(),CN(),Apf(),ij(),Hm(),Uuf(),$uf(),ON(),yN(),SO(),iP=L(),Zpf=()=>{let[e,t]=(0,rP.useState)(1),[n,r]=(0,rP.useState)(``),[i,a]=(0,rP.useState)(``),o=QA(),[s,c]=(0,rP.useState)(!1),[l,u]=(0,rP.useState)(``),[d,f]=(0,rP.useState)(``);(0,rP.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get(`session`);e&&u(e)},[]),(0,rP.useEffect)(()=>{f(``)},[n,i]);let p=async()=>{if(!s){c(!0);try{let e=await Ylf(n,i,l);e.status===200?window.location.href=`${window.aiwareConfig?.switchAppUrl||_N().replace(`api`,`aiware`)+`/switch-app`}/default`:e.status===404?f(`Email or Password is incorrect.`):f(`Something went wrong. Please try again.`)}catch{f(`Something went wrong. Please try again.`)}finally{c(!1)}}};return(0,iP.jsx)(IN,{children:e===1?(0,iP.jsxs)(iP.Fragment,{children:[(0,iP.jsx)(bN,{text:`Account Does Not Exist`,subText:`This AiWARE account does not exist. Are you sure you’re using the correct Authentication Provider?`,type:`link-oid`}),(0,iP.jsx)(SN,{onClick:()=>t(2),text:`Link to Existing Account`,type:`oid-linking`,loading:!1}),(0,iP.jsx)(B,{sx:{mt:`14px`},children:(0,iP.jsx)(XN,{onClick:()=>o(`/ui/auth/login`),text:`Back to Login`,type:`login`})})]}):(0,iP.jsxs)(iP.Fragment,{children:[(0,iP.jsx)(bN,{text:`Link Account`,subText:`Provide the email and password to your aiWARE account.`}),(0,iP.jsx)(Huf,{email:n,setEmail:r}),(0,iP.jsx)(B,{sx:{mt:`20px`},children:(0,iP.jsx)(Quf,{password:i,onPasswordChange:a,onPressEnter:()=>{p().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},errorMessage:d,autoFocus:!1})}),(0,iP.jsx)(B,{sx:{mt:`14px`},children:(0,iP.jsx)(XN,{onClick:()=>o(`/ui/auth/forgot`),text:`Forgot Password?`,type:`forgot`})}),(0,iP.jsx)(B,{sx:{mt:`25px`},children:(0,iP.jsx)(SN,{onClick:()=>{p().catch(e=>{oD(`Error: ${JSON.stringify(e)}`)})},text:`Link Account & Login`,type:`link-oid`,loading:s})}),(0,iP.jsx)(B,{sx:{mt:`20px`},children:(0,iP.jsx)(XN,{onClick:()=>o(`/ui/auth/login`),text:`Back to Login`,type:`login`})})]})})}})),$pf,emf,tmf=s((()=>{m(),ij(),LN(),Auf(),yN(),Hm(),$pf=L(),emf=()=>{let e=QA(),t=new URLSearchParams(window.location.search),n=t.get(`username`)||``,r=t.get(`resettoken`)||``,i=t.get(`organizationinviteid`)||``,a=t.get(`redirect`),o=nlf(r),s=o?o.enablePasswordRestriction:!1;return(0,$pf.jsx)(IN,{children:(0,$pf.jsx)(B,{sx:{width:`368px`},children:(0,$pf.jsx)(Duf,{resetToken:r,username:n,organizationInviteId:i,onSuccess:()=>{a?window.location.href=a:e(`/ui/auth/reset-password/success`)},requiresPasswordRestriction:s,isNewPage:!0,containerWidth:`100%`})})})}})),nmf,rmf,imf=s((()=>{m(),ij(),LN(),xN(),CN(),nmf=L(),rmf=()=>{let e=QA();return(0,nmf.jsxs)(IN,{children:[(0,nmf.jsx)(bN,{text:`Password Changed Successfully`,subText:`Your new password has been set for your aiWARE account successfully.`,type:`reset-password-success`}),(0,nmf.jsx)(SN,{onClick:()=>e(`/ui/auth/login`),text:`Continue`,type:`back-to-login`,loading:!1})]})}})),amf,omf,smf=s((()=>{amf=Z(),omf=(0,amf.makeStyles)()(()=>({button:{position:`absolute`,left:`40px`,top:`30px`,border:`none`,color:`#5C6269`,borderRadius:`4px`,paddingLeft:`14px`,paddingRight:`14px`,fontWeight:400},select:{height:`52px`,width:`100%`,marginTop:`20px`,textAlign:`left`},menu:{"& > .MuiPopover-paper, & > .Sdk-MuiPopover-paper":{padding:`0`},"& > .MuiPaper-root > ul, > .Sdk-MuiPaper-root > ul":{padding:`5px`}},stepOneFullWidthInput:{height:`52px`,width:`100%`},stepOneHalfWidthInputContainer:{display:`flex`,justifyContent:`space-between`,width:`100%`,marginTop:`20px`},stepOneHalfWidthInput:{height:`52px`,width:`calc(50% - 10px)`},stepTwoContainer:{width:`542px`,textAlign:`center`,maxWidth:`85vw`},stepTwoTextField:{height:`52px`,width:`100%`},menuItem:{width:`100%`},autoCompleteContainer:{width:`100%`,display:`flex`,justifyContent:`center`},autoComplete:{width:`100%`,marginTop:`20px`,height:`52px`},formInputTopMargin:{marginTop:`20px`},formInputTopDoubleMargin:{marginTop:`40px`},previewBox:{width:`164px`,height:`164px`,borderRadius:`5px`,border:`2px dashed #D5DFE9`,padding:`10px`,boxSizing:`border-box`,cursor:`pointer`},logoLanding:{width:`140px`,height:`140px`,background:`rgba(247, 247, 247, 0.80)`,display:`flex`,alignItems:`center`,justifyContent:`center`},addIcon:{fill:`#555F7C`},logoDescriptionText:{textAlign:`left`},logoUploadBtn:{borderRadius:`4px`,border:`1px solid #5C6269`,color:`#5C6269`,fontWeight:`400`,padding:`8px 15px`},orgLogoPreview:{width:`164px`,height:`164px`},errorMessage:{color:`red`},confirmationText:{fontSize:`22px`,color:`#2A323C`,lineHeight:`28px`}}))})),cmf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z`}),`ArrowBack`)})),lmf,aP,umf,dmf=s((()=>{lmf=d(m()),q(),xuf(),xN(),W(),CN(),smf(),Uuf(),aP=L(),umf=()=>{let e=(0,lmf.useRef)(),t=K(),n=G(Llf),r=G(Rlf),i=!!Object.entries(r).find(([e,t])=>t)||!!Object.keys(r).find(e=>!n[e])||!Buf(`email`in n&&n?.email||``),{classes:a}=omf(),o=e=>{e.key===`Enter`&&(t(EN.validate()),i||s())},s=()=>{t(EN.setStep(2))};return(0,aP.jsxs)(`div`,{style:{maxWidth:`85vw`},children:[(0,aP.jsx)(bN,{text:`Sign Up for your aiWARE account`,type:`sign-up`}),(0,aP.jsx)(s_,{id:`email`,"data-testid":`os-auth-email-input-field`,label:`email`in r&&r.email?`Please provide a valid email`:`Email`,InputProps:{type:`email`},variant:`outlined`,value:`email`in n&&n?.email,autoComplete:`email`,autoFocus:!0,className:a.stepOneFullWidthInput,error:`email`in r&&r.email,onChange:e=>t(EN.setValue({key:`email`,value:e.target.value.trim()})),onKeyDown:o}),(0,aP.jsxs)(B,{className:a.stepOneHalfWidthInputContainer,children:[(0,aP.jsx)(s_,{id:`firstName`,"data-testid":`os-auth-firstName-input-field`,label:`First Name`,variant:`outlined`,value:`firstName`in n&&n?.firstName,autoComplete:`given-name`,className:a.stepOneHalfWidthInput,error:`firstName`in r&&r.firstName,onChange:e=>t(EN.setValue({key:`firstName`,value:e.target.value})),onKeyDown:o}),(0,aP.jsx)(s_,{id:`lastName`,"data-testid":`os-auth-lastName-input-field`,label:`Last Name`,variant:`outlined`,value:`lastName`in n&&n?.lastName,autoComplete:`family-name`,className:a.stepOneHalfWidthInput,error:`lastName`in r&&r.lastName,onChange:e=>t(EN.setValue({key:`lastName`,value:e.target.value})),onKeyDown:o})]}),(0,aP.jsx)(SN,{onClick:s,text:`Continue`,type:`Continue`,disableButton:i,className:a.formInputTopMargin,ref:e?.current?e:void 0})]})}})),fmf,pmf=s((()=>{fmf=JSON.parse(`[{"label":"Afghanistan","id":"AF"},{"label":"Åland Islands","id":"AX"},{"label":"Albania","id":"AL"},{"label":"Algeria","id":"DZ"},{"label":"American Samoa","id":"AS"},{"label":"Andorra","id":"AD"},{"label":"Angola","id":"AO"},{"label":"Anguilla","id":"AI"},{"label":"Antarctica","id":"AQ"},{"label":"Antigua and Barbuda","id":"AG"},{"label":"Argentina","id":"AR"},{"label":"Armenia","id":"AM"},{"label":"Aruba","id":"AW"},{"label":"Australia","id":"AU"},{"label":"Austria","id":"AT"},{"label":"Azerbaijan","id":"AZ"},{"label":"Bahamas","id":"BS"},{"label":"Bahrain","id":"BH"},{"label":"Bangladesh","id":"BD"},{"label":"Barbados","id":"BB"},{"label":"Belarus","id":"BY"},{"label":"Belgium","id":"BE"},{"label":"Belize","id":"BZ"},{"label":"Benin","id":"BJ"},{"label":"Bermuda","id":"BM"},{"label":"Bhutan","id":"BT"},{"label":"Bolivia","id":"BO"},{"label":"Bosnia and Herzegovina","id":"BA"},{"label":"Botswana","id":"BW"},{"label":"Bouvet Island","id":"BV"},{"label":"Brazil","id":"BR"},{"label":"British Indian Ocean Territory","id":"IO"},{"label":"Brunei Darussalam","id":"BN"},{"label":"Bulgaria","id":"BG"},{"label":"Burkina Faso","id":"BF"},{"label":"Burundi","id":"BI"},{"label":"Cambodia","id":"KH"},{"label":"Cameroon","id":"CM"},{"label":"Canada","id":"CA"},{"label":"Cape Verde","id":"CV"},{"label":"Cayman Islands","id":"KY"},{"label":"Central African Republic","id":"CF"},{"label":"Chad","id":"TD"},{"label":"Chile","id":"CL"},{"label":"China","id":"CN"},{"label":"Christmas Island","id":"CX"},{"label":"Cocos (Keeling) Islands","id":"CC"},{"label":"Colombia","id":"CO"},{"label":"Comoros","id":"KM"},{"label":"Congo","id":"CG"},{"label":"Congo, The Democratic Republic of the","id":"CD"},{"label":"Cook Islands","id":"CK"},{"label":"Costa Rica","id":"CR"},{"label":"Cote D'Ivoire","id":"CI"},{"label":"Croatia","id":"HR"},{"label":"Cuba","id":"CU"},{"label":"Cyprus","id":"CY"},{"label":"Czech Republic","id":"CZ"},{"label":"Denmark","id":"DK"},{"label":"Djibouti","id":"DJ"},{"label":"Dominica","id":"DM"},{"label":"Dominican Republic","id":"DO"},{"label":"Ecuador","id":"EC"},{"label":"Egypt","id":"EG"},{"label":"El Salvador","id":"SV"},{"label":"Equatorial Guinea","id":"GQ"},{"label":"Eritrea","id":"ER"},{"label":"Estonia","id":"EE"},{"label":"Ethiopia","id":"ET"},{"label":"Falkland Islands (Malvinas)","id":"FK"},{"label":"Faroe Islands","id":"FO"},{"label":"Fiji","id":"FJ"},{"label":"Finland","id":"FI"},{"label":"France","id":"FR"},{"label":"French Guiana","id":"GF"},{"label":"French Polynesia","id":"PF"},{"label":"French Southern Territories","id":"TF"},{"label":"Gabon","id":"GA"},{"label":"Gambia","id":"GM"},{"label":"Georgia","id":"GE"},{"label":"Germany","id":"DE"},{"label":"Ghana","id":"GH"},{"label":"Gibraltar","id":"GI"},{"label":"Greece","id":"GR"},{"label":"Greenland","id":"GL"},{"label":"Grenada","id":"GD"},{"label":"Guadeloupe","id":"GP"},{"label":"Guam","id":"GU"},{"label":"Guatemala","id":"GT"},{"label":"Guernsey","id":"GG"},{"label":"Guinea","id":"GN"},{"label":"Guinea-Bissau","id":"GW"},{"label":"Guyana","id":"GY"},{"label":"Haiti","id":"HT"},{"label":"Heard Island and Mcdonald Islands","id":"HM"},{"label":"Holy See (Vatican City State)","id":"VA"},{"label":"Honduras","id":"HN"},{"label":"Hong Kong","id":"HK"},{"label":"Hungary","id":"HU"},{"label":"Iceland","id":"IS"},{"label":"India","id":"IN"},{"label":"Indonesia","id":"ID"},{"label":"Iran, Islamic Republic Of","id":"IR"},{"label":"Iraq","id":"IQ"},{"label":"Ireland","id":"IE"},{"label":"Isle of Man","id":"IM"},{"label":"Israel","id":"IL"},{"label":"Italy","id":"IT"},{"label":"Jamaica","id":"JM"},{"label":"Japan","id":"JP"},{"label":"Jersey","id":"JE"},{"label":"Jordan","id":"JO"},{"label":"Kazakhstan","id":"KZ"},{"label":"Kenya","id":"KE"},{"label":"Kiribati","id":"KI"},{"label":"Korea, Democratic People'S Republic of","id":"KP"},{"label":"Korea, Republic of","id":"KR"},{"label":"Kuwait","id":"KW"},{"label":"Kyrgyzstan","id":"KG"},{"label":"Lao People'S Democratic Republic","id":"LA"},{"label":"Latvia","id":"LV"},{"label":"Lebanon","id":"LB"},{"label":"Lesotho","id":"LS"},{"label":"Liberia","id":"LR"},{"label":"Libyan Arab Jamahiriya","id":"LY"},{"label":"Liechtenstein","id":"LI"},{"label":"Lithuania","id":"LT"},{"label":"Luxembourg","id":"LU"},{"label":"Macao","id":"MO"},{"label":"Macedonia, The Former Yugoslav Republic of","id":"MK"},{"label":"Madagascar","id":"MG"},{"label":"Malawi","id":"MW"},{"label":"Malaysia","id":"MY"},{"label":"Maldives","id":"MV"},{"label":"Mali","id":"ML"},{"label":"Malta","id":"MT"},{"label":"Marshall Islands","id":"MH"},{"label":"Martinique","id":"MQ"},{"label":"Mauritania","id":"MR"},{"label":"Mauritius","id":"MU"},{"label":"Mayotte","id":"YT"},{"label":"Mexico","id":"MX"},{"label":"Micronesia, Federated States of","id":"FM"},{"label":"Moldova, Republic of","id":"MD"},{"label":"Monaco","id":"MC"},{"label":"Mongolia","id":"MN"},{"label":"Montserrat","id":"MS"},{"label":"Morocco","id":"MA"},{"label":"Mozambique","id":"MZ"},{"label":"Myanmar","id":"MM"},{"label":"Namibia","id":"NA"},{"label":"Nauru","id":"NR"},{"label":"Nepal","id":"NP"},{"label":"Netherlands","id":"NL"},{"label":"Netherlands Antilles","id":"AN"},{"label":"New Caledonia","id":"NC"},{"label":"New Zealand","id":"NZ"},{"label":"Nicaragua","id":"NI"},{"label":"Niger","id":"NE"},{"label":"Nigeria","id":"NG"},{"label":"Niue","id":"NU"},{"label":"Norfolk Island","id":"NF"},{"label":"Northern Mariana Islands","id":"MP"},{"label":"Norway","id":"NO"},{"label":"Oman","id":"OM"},{"label":"Pakistan","id":"PK"},{"label":"Palau","id":"PW"},{"label":"Palestinian Territory, Occupied","id":"PS"},{"label":"Panama","id":"PA"},{"label":"Papua New Guinea","id":"PG"},{"label":"Paraguay","id":"PY"},{"label":"Peru","id":"PE"},{"label":"Philippines","id":"PH"},{"label":"Pitcairn","id":"PN"},{"label":"Poland","id":"PL"},{"label":"Portugal","id":"PT"},{"label":"Puerto Rico","id":"PR"},{"label":"Qatar","id":"QA"},{"label":"Reunion","id":"RE"},{"label":"Romania","id":"RO"},{"label":"Russian Federation","id":"RU"},{"label":"RWANDA","id":"RW"},{"label":"Saint Helena","id":"SH"},{"label":"Saint Kitts and Nevis","id":"KN"},{"label":"Saint Lucia","id":"LC"},{"label":"Saint Pierre and Miquelon","id":"PM"},{"label":"Saint Vincent and the Grenadines","id":"VC"},{"label":"Samoa","id":"WS"},{"label":"San Marino","id":"SM"},{"label":"Sao Tome and Principe","id":"ST"},{"label":"Saudi Arabia","id":"SA"},{"label":"Senegal","id":"SN"},{"label":"Serbia and Montenegro","id":"CS"},{"label":"Seychelles","id":"SC"},{"label":"Sierra Leone","id":"SL"},{"label":"Singapore","id":"SG"},{"label":"Slovakia","id":"SK"},{"label":"Slovenia","id":"SI"},{"label":"Solomon Islands","id":"SB"},{"label":"Somalia","id":"SO"},{"label":"South Africa","id":"ZA"},{"label":"South Georgia and the South Sandwich Islands","id":"GS"},{"label":"Spain","id":"ES"},{"label":"Sri Lanka","id":"LK"},{"label":"Sudan","id":"SD"},{"label":"Surilabel","id":"SR"},{"label":"Svalbard and Jan Mayen","id":"SJ"},{"label":"Swaziland","id":"SZ"},{"label":"Sweden","id":"SE"},{"label":"Switzerland","id":"CH"},{"label":"Syrian Arab Republic","id":"SY"},{"label":"Taiwan, Province of China","id":"TW"},{"label":"Tajikistan","id":"TJ"},{"label":"Tanzania, United Republic of","id":"TZ"},{"label":"Thailand","id":"TH"},{"label":"Timor-Leste","id":"TL"},{"label":"Togo","id":"TG"},{"label":"Tokelau","id":"TK"},{"label":"Tonga","id":"TO"},{"label":"Trinidad and Tobago","id":"TT"},{"label":"Tunisia","id":"TN"},{"label":"Turkey","id":"TR"},{"label":"Turkmenistan","id":"TM"},{"label":"Turks and Caicos Islands","id":"TC"},{"label":"Tuvalu","id":"TV"},{"label":"Uganda","id":"UG"},{"label":"Ukraine","id":"UA"},{"label":"United Arab Emirates","id":"AE"},{"label":"United Kingdom","id":"GB"},{"label":"United States","id":"US"},{"label":"United States Minor Outlying Islands","id":"UM"},{"label":"Uruguay","id":"UY"},{"label":"Uzbekistan","id":"UZ"},{"label":"Vanuatu","id":"VU"},{"label":"Venezuela","id":"VE"},{"label":"Viet Nam","id":"VN"},{"label":"Virgin Islands, British","id":"VG"},{"label":"Virgin Islands, U.S.","id":"VI"},{"label":"Wallis and Futuna","id":"WF"},{"label":"Western Sahara","id":"EH"},{"label":"Yemen","id":"YE"},{"label":"Zambia","id":"ZM"},{"label":"Zimbabwe","id":"ZW"}]`)})),mmf,hmf=s((()=>{mmf=`Accounting.Airlines/Aviation.Alternative Dispute Resolution.Alternative Medicine.Animation.Apparel & Fashion.Architecture & Planning.Arts & Crafts.Automotive.Aviation & Aerospace.Banking.Biotechnology.Broadcast Media.Building Materials.Business Supplies & Equipment.Capital Markets.Chemicals.Civic & Social Organization.Civil Engineering.Commercial Real Estate.Computer & Network Security.Computer Games.Computer Hardware.Computer Networking.Computer Software.Construction.Consumer Electronics.Consumer Goods.Consumer Services.Cosmetics.Dairy.Defense & Space.Design.Education Management.E-learning.Electrical & Electronic Manufacturing.Entertainment.Environmental Services.Events Services.Executive Office.Facilities Services.Farming.Financial Services.Fine Art.Fishery.Food & Beverages.Food Production.Fundraising.Furniture.Gambling & Casinos.Glass, Ceramics & Concrete.Government Administration.Government Relations.Graphic Design.Health, Wellness & Fitness.Higher Education.Hospital & Health Care.Hospitality.Human Resources.Import & Export.Individual & Family Services.Industrial Automation.Information Services.Information Technology & Services.Insurance.International Affairs.International Trade & Development.Internet.Investment Banking/Venture.Investment Management.Judiciary.Law Enforcement.Law Practice.Legal Services.Legislative Office.Leisure & Travel.Libraries.Logistics & Supply Chain.Luxury Goods & Jewelry.Machinery.Management Consulting.Maritime.Marketing & Advertising.Market Research.Mechanical or Industrial Engineering.Media Production.Medical Device.Medical Practice.Mental Health Care.Military.Mining & Metals.Motion Pictures & Film.Museums & Institutions.Music.Nanotechnology.Newspapers.Nonprofit Organization Management.Oil & Energy.Online Publishing.Outsourcing/Offshoring.Package/Freight Delivery.Packaging & Containers.Paper & Forest Products.Performing Arts.Pharmaceuticals.Philanthropy.Photography.Plastics.Political Organization.Primary/Secondary.Printing.Professional Training.Program Development.Public Policy.Public Relations.Public Safety.Publishing.Railroad Manufacture.Ranching.Real Estate.Recreational.Facilities & Services.Religious Institutions.Renewables & Environment.Research.Restaurants.Retail.Security & Investigations.Semiconductors.Shipbuilding.Sporting Goods.Sports.Staffing & Recruiting.Supermarkets.Telecommunications.Textiles.Think Tanks.Tobacco.Translation & Localization.Transportation/Trucking/Railroad.Utilities.Venture Capital.Veterinary.Warehousing.Wholesale.Wine & Spirits.Wireless.Writing & Editing`.split(`.`)})),gmf,oP,_mf,vmf,ymf,bmf=s((()=>{gmf=d(m()),q(),xuf(),xN(),W(),CN(),pmf(),hmf(),smf(),ij(),oP=L(),_mf=[`1-10`,`10-50`,`50-100`,`100-500`,`500-1000`,`> 1000`],vmf=mmf.map(e=>({id:e,label:e})),ymf=()=>{let e=(0,gmf.useRef)(),t=K(),n=G(Llf),r=G(Rlf),i=G(Flf),a=!!Object.keys(r).find(e=>r[e])||!!Object.keys(r).find(e=>!n[e])||i===`loading`,{classes:o}=omf(),s=QA(),c=()=>{t(EN.createUserStart())},l=e=>{e.key===`Enter`&&(t(EN.validate()),a||c())};return(0,oP.jsxs)(B,{className:o.stepTwoContainer,children:[(0,oP.jsx)(bN,{text:i===`success`?``:`Let's set up your Organization`,type:`info`}),i===`success`?(0,oP.jsxs)(B,{children:[(0,oP.jsx)(z,{"data-testid":`os-auth.sign-up.success-message`,variant:`body1`,className:o.confirmationText,children:`Thank you for registering! A confirmation email has been sent with an activation link for your new aiWARE account.`}),(0,oP.jsx)(SN,{onClick:()=>s(`/ui/auth/login`),text:`Return To Homepage`,className:o.formInputTopDoubleMargin,type:`return`})]}):(0,oP.jsxs)(oP.Fragment,{children:[(0,oP.jsx)(s_,{id:`orgName`,"data-testid":`os-auth-orgName-input-field`,label:`Organization Name`,variant:`outlined`,value:`orgName`in n&&n?.orgName,autoComplete:`organization`,autoFocus:!0,className:o.stepTwoTextField,error:`orgName`in r&&r.orgName,onChange:e=>t(EN.setValue({key:`orgName`,value:e.target.value})),onKeyDown:l,disabled:i===`loading`}),(0,oP.jsxs)(wh,{sx:{width:`100%`},children:[(0,oP.jsx)(Bh,{id:`os-auth.sign-up.teamSize`,className:o.formInputTopMargin,children:`Team Size`}),(0,oP.jsx)(yg,{labelId:`os-auth.sign-up.teamSize`,id:`os-auth.sign-up.teamSize`,"data-testid":`os-auth-team-size-input-field`,value:`teamSize`in n&&n?.teamSize,className:o.select,MenuProps:{className:o.menu},label:`Team Size`,onChange:e=>t(EN.setValue({key:`teamSize`,value:e.target.value||``})),disabled:i===`loading`,children:_mf.map(e=>(0,oP.jsx)(ug,{value:e,className:o.menuItem,children:e}))})]}),(0,oP.jsx)(B,{className:o.autoCompleteContainer,children:(0,oP.jsx)(Tm,{disablePortal:!0,id:`os-auth.sign-up.country-autocomplete`,"data-testid":`os-auth.sign-up.country-autocomplete`,options:fmf,value:`country`in n&&fmf.find(e=>e.id===n.country),onChange:(e,n)=>t(EN.setValue({key:`country`,value:(n||{}).id||``})),className:o.autoComplete,autoComplete:!0,renderInput:e=>(0,oP.jsx)(s_,{...e,label:`Country`,autoComplete:`country`,onKeyDown:l,disabled:i===`loading`})})}),(0,oP.jsx)(B,{className:o.autoCompleteContainer,children:(0,oP.jsx)(Tm,{disablePortal:!0,id:`os-auth.sign-up.industry-autocomplete`,"data-testid":`os-auth.sign-up.industry-autocomplete`,options:vmf,value:`industry`in n&&vmf.find(e=>e.id===n.industry),onChange:(e,n)=>t(EN.setValue({key:`industry`,value:(n||{}).id||``})),className:o.autoComplete,renderInput:e=>(0,oP.jsx)(s_,{...e,label:`Industry`,onKeyDown:l,disabled:i===`loading`})})}),(0,oP.jsx)(SN,{onClick:c,text:`Create Account`,type:`create-account`,disableButton:a,className:o.formInputTopDoubleMargin,ref:e?.current?e:void 0,loading:i===`loading`})]})]})}})),xmf,Smf,sP,Cmf,wmf=s((()=>{q(),xuf(),smf(),pk(),LN(),Rpf(),W(),xmf=d(cmf()),dmf(),bmf(),Smf=d(m()),yN(),sP=L(),Cmf=()=>{let e=G(Ilf),t=K(),{classes:n}=omf(),r=G(Flf);return(0,Smf.useEffect)(()=>{t(EN.resetState()),vN(`local`)||vN(`dev`)||window.location.href.includes(`localhost`)?t(EN.setEnv(`dev`)):vN(`stage`)?t(EN.setEnv(`stage`)):t(EN.setEnv(`prod`))},[]),(0,sP.jsx)(fk,{modules:[buf()],children:(0,sP.jsxs)(IN,{showLogoInFooter:!1,children:[(0,sP.jsx)(Lpf,{label:`Login`,navigateTo:`login`}),e===2&&r!==`success`&&(0,sP.jsxs)(V,{className:n.button,onClick:()=>t(EN.setStep(1)),disabled:r===`loading`,children:[(0,sP.jsx)(xmf.default,{fontSize:`small`,sx:{marginRight:`5px`}}),` Back`]}),(0,sP.jsx)(`div`,{children:e===1?(0,sP.jsx)(umf,{}):(0,sP.jsx)(ymf,{})})]})})}})),Tmf,Emf,Dmf,Omf=s((()=>{ij(),pk(),LN(),Euf(),Tmf=d(m()),q(),xuf(),yN(),Emf=L(),Dmf=()=>{let[e]=nj(),[t,n]=(0,Tmf.useState)(``),[r,i]=(0,Tmf.useState)(``),[a,o]=(0,Tmf.useState)(``),s=QA(),c=G(Flf),l=K();return(0,Tmf.useEffect)(()=>{let t=e.get(`useruuid`)||``,r=e.get(`token`)||``,a=e.get(`username`)||``;t&&r?(n(t),o(r),i(a)):s(`/ui/auth/login`)},[]),(0,Tmf.useEffect)(()=>{l(EN.resetState()),vN(`local`)||vN(`dev`)?l(EN.setEnv(`dev`)):vN(`stage`)?l(EN.setEnv(`stage`)):l(EN.setEnv(`prod`))},[]),(0,Tmf.useEffect)(()=>{c===`success`&&s(`/ui/auth/plans?${new URLSearchParams({userId:t,username:r}).toString()}`)},[c]),(0,Emf.jsx)(fk,{modules:[buf()],children:(0,Emf.jsx)(IN,{showLogoInFooter:!1,children:(0,Emf.jsx)(Tuf,{userId:t,token:a})})})}})),kmf,Amf,jmf,Mmf,Nmf,Pmf=s((()=>{ij(),kmf=d(m()),yN(),xN(),LN(),W(),Amf=L(),jmf={dev:`prctbl_1No7MMIyHt9R0gSlZV4mqouD`,stage:`prctbl_1NkvOrInolL392yPOejCV1RT`,prod:`prctbl_1Nj36dInolL392yPggkeo88e`},Mmf={dev:`pk_test_51No7B2IyHt9R0gSl5J4qqbZvRVLokabSDFw36G58tO1oxXO4mJzXmV0FvszOAfJcb25d5HgqZSlFIyMbL9bTFTb700vr9Fvgb9`,stage:`pk_test_51NNcicInolL392yPuFClPywpUYp0ppNltcHBEdkPNkpMgmagbymPCeal9Dl3dDYn63IOfIafuobscqZhCJQfp3KN00Th3bxbLx`,prod:`pk_live_51NNcicInolL392yPxizaLizsnPFeNfU1QgFBOG7bB44OLhLcQDc7CyH8hlyweN6VDDLr2lB9lLyiUh1KGBaSEjPS00uSQ1sFFP`},Nmf=()=>{let e=ZA(),t=new URLSearchParams(e.search),[n,r]=(0,kmf.useState)(``),[i,a]=(0,kmf.useState)(``);return(0,kmf.useEffect)(()=>{let e=t.get(`userId`)||``,n=t.get(`username`)||``;e&&n&&(r(e),a(n),olf(`userId`,e,7),olf(`username`,n,7));let i=document.createElement(`script`);return i.src=`https://js.stripe.com/v3/pricing-table.js`,i.async=!0,document.body.appendChild(i),()=>{document.body.removeChild(i)}},[]),(0,Amf.jsxs)(IN,{showLogoInFooter:!1,children:[(0,Amf.jsx)(bN,{text:`Choose your aiWARE Account Plan`}),(0,Amf.jsx)(B,{sx:{width:`100vw`},children:(0,Amf.jsx)(`stripe-pricing-table`,{"pricing-table-id":(()=>{let e=ilf();return gN().stripePricingPlanId||jmf[e]})(),"publishable-key":(()=>{let e=ilf();return gN().stripePublishableKey||Mmf[e]})(),"customer-email":i,"client-reference-id":n})})]})}})),Fmf,Imf,Lmf,cP,Rmf,zmf,Bmf=s((()=>{W(),bd(),rx(),Fmf=d(m()),yN(),Imf=Z(),Lmf=d(gC()),ij(),cP=L(),Rmf=(0,Imf.makeStyles)()(e=>({paymentResultMessage:{color:`#2A323C`,textTransform:`none`,marginTop:e.spacing(4),fontSize:`18px`,fontWeight:600,lineHeight:`24px`,letterSpacing:`-1.3038520263464193e-9px`,textAlign:`center`},instanceProvisionedMessage:{color:`#2A323C`,textTransform:`none`,marginBottom:e.spacing(4),fontSize:`18px`,fontWeight:600,lineHeight:`24px`,letterSpacing:`-1.3038520263464193e-9px`,textAlign:`center`},linearProgress:{height:`7px`,backgroundColor:`#D9D9D9`,marginTop:e.spacing(2),borderRadius:`20px`},paymentResultLogo:{height:`200px`,width:`200px`},paymentResultContainer:{position:`fixed`,width:`100%`,height:`100vh`,top:`0`,left:`0`,backgroundColor:`#ffffff`,display:`flex`,justifyContent:`center`,alignItems:`center`,flexDirection:`column`,textAlign:`center`,fontSize:`14px`},loaderAnimation:{height:`200px`,width:`405px`,marginBottom:e.spacing(3)}})),zmf=()=>{let e=QA(),[t,n]=(0,Fmf.useState)(``),[r,i]=(0,Fmf.useState)(!1),[a,o]=(0,Fmf.useState)(!1),{classes:s}=Rmf();return(0,Fmf.useEffect)(()=>{let r=alf(`userId`),s,c;return r&&t!==`timeout`&&(i(!0),s=setInterval(async()=>{let t=await(await fetch(`${gN().hubUrl}/account_requests?userID=${r}&type=new`)).json(),{accountRequestStatus:i}=t?.result?.[0]||{};t&&(i===`done`||i===`error`?(clearInterval(s),clearTimeout(c),n(i),i===`done`&&setTimeout(()=>{e(`/ui/auth/login`)},2e3)):i===`requested`&&!a&&(setTimeout(()=>{clearInterval(s),clearTimeout(c),n(`timeout`)},12e4),o(!0)))},1e3),c=setTimeout(()=>{clearInterval(s)},12e4)),()=>{clearInterval(s),clearTimeout(c)}},[t,a]),(0,cP.jsxs)(B,{className:s.paymentResultContainer,children:[(0,cP.jsx)(B,{className:s.loaderAnimation,id:`loaderAnimation`,children:(0,cP.jsx)(`img`,{src:Tlt,alt:`aiware-logo`,className:s.paymentResultLogo})}),r&&t!==`done`&&t!==`error`&&t!==`timeout`&&(0,cP.jsxs)(B,{sx:{height:`200px`,width:`405px`},children:[(0,cP.jsx)(Gi,{injectFirst:!0,children:(0,cP.jsx)(Hh,{color:`primary`,className:s.linearProgress})}),(0,cP.jsx)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-in-progress`,className:s.paymentResultMessage,children:`Creating your custom experience...`})]}),!r&&(0,cP.jsx)(z,{variant:`body1`,className:s.paymentResultMessage,children:`Oops! Looks like the URL you are trying to access is invalid`}),t===`done`&&(0,cP.jsx)(jm,{in:!0,timeout:1e3,easing:`cubic-bezier(0.4, 0, 1, 1)`,children:(0,cP.jsx)(B,{sx:{height:`200px`,width:`405px`},children:(0,cP.jsx)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-success`,className:(0,Lmf.default)(s.paymentResultMessage),children:`Your new instance is now ready! Taking you to the login page...`})})}),t===`error`&&(0,cP.jsxs)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-error`,className:s.paymentResultMessage,children:[`An error occurred when creating your Organization.`,(0,cP.jsx)(`br`,{}),` Please contact support`]}),t===`timeout`&&(0,cP.jsxs)(z,{variant:`body1`,"data-testid":`os-auth-sign-up-payment-result-timeout`,className:s.paymentResultMessage,children:[`Creating your custom experience is taking longer than expected.`,(0,cP.jsx)(`br`,{}),`Please reach out to customer support`,` `,(0,cP.jsx)(`a`,{href:`mailto:support@veritone.com`,style:{color:`#0E6EEC`},children:`support@veritone.com`})]})]})}})),Vmf,Hmf,Umf,Wmf,Gmf=s((()=>{w$d(),X(),pk(),Vmf=d(m()),q(),VHe(),Hmf=L(),Umf=()=>{let e=K(),t=G(ZYd),n=G(gJe);return(0,Vmf.useEffect)(()=>{if(n===`failure`){let e=window.location.search;window.location.href=`/ui/auth/login${e}`,iVe(null),window.analytics?.reset?.()}else t?.status===`success`&&(iVe(null),window.analytics?.reset?.(),e(NUd()))},[e,t,n]),null},Wmf=({aiwareInit:e})=>{let[t,n]=(0,Vmf.useState)(!1);return(0,Vmf.useEffect)(()=>{e?.().then(()=>{n(!0)})},[e]),t?(0,Hmf.jsx)(fk,{modules:[yZd()],children:(0,Hmf.jsx)(Umf,{})}):null}})),lP,Kmf,qmf,Jmf,Ymf,Xmf,Zmf,Qmf,$mf,ehf=s((()=>{W(),ij(),YN(),CN(),lP=L(),Kmf={maxWidth:517},qmf={width:368,mx:`auto`},Jmf=/^[^\s@<>]{1,64}@[^\s@<>]{1,253}$/,Ymf={submitted:`Thank you for registering. Your request must be approved before you can join. If approved you will receive an invitation shortly.`,invited:`Thank you for registering. A confirmation email has been sent with an activation link for your new account.`},Xmf=()=>{let e=QA(),[t]=nj(),n=t.get(`status`),r=[`submitted`,`approved`,`invited`].includes(n??``)?n:`submitted`,i=t.get(`email`),a=i&&Jmf.test(i)?i:null,{config:o,slugUri:s}=JN(),c=()=>{let e=`/ui/auth/login${s}`,n=t.get(`email`);return n&&r===`approved`?`${e}?email=${encodeURIComponent(n)}`:e};return(0,lP.jsxs)(H,{gap:3,sx:Kmf,children:[(0,lP.jsx)(Zmf,{inviteStatus:r,email:a}),(0,lP.jsx)($mf,{onClick:()=>{e(c())},buttonColor:o?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:o?.uiSettings?.registrationButtonStyle?.textColor})]})},Zmf=({inviteStatus:e,email:t})=>(0,lP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-register-success-message`,children:e===`approved`?(0,lP.jsx)(Qmf,{email:t}):Ymf[e]}),Qmf=({email:e})=>(0,lP.jsxs)(lP.Fragment,{children:[`Thanks for registering! We’ve sent a verification email to`,` `,(0,lP.jsx)(`strong`,{children:e||`your email address`}),`. Please click the link in that email to verify your address before logging in. Don’t see it? Check your spam or junk folder.`]}),$mf=({buttonColor:e,buttonTextColor:t,onClick:n})=>(0,lP.jsx)(B,{sx:qmf,children:(0,lP.jsx)(SN,{type:`button`,text:`Continue to Login`,onClick:n,buttonColor:e,buttonTextColor:t})})})),thf,uP,nhf,rhf,ihf,ahf,ohf,shf,chf=s((()=>{thf=d(m()),W(),ij(),CN(),LN(),ON(),uP=L(),nhf={maxWidth:517},rhf={width:368,mx:`auto`},ihf=()=>{let[e]=nj(),t=QA(),n=e.get(`token`)??``,[r,i]=(0,thf.useState)(`loading`),[a,o]=(0,thf.useState)(0);return(0,thf.useEffect)(()=>{if(!n){i(`error`);return}uuf(n).then(e=>{e.ok?i(`success`):(o(e.status),i(`error`))})},[n]),(0,uP.jsx)(IN,{loginConfigs:{hideVeritoneBranding:!0},children:(0,uP.jsxs)(H,{gap:3,sx:nhf,"data-testid":`os-auth-self-service-email-verification`,children:[r===`loading`&&(0,uP.jsx)(ahf,{}),r===`success`&&(0,uP.jsx)(ohf,{}),r===`error`&&(0,uP.jsx)(shf,{status:a,hasToken:!!n}),r!==`loading`&&(0,uP.jsx)(B,{sx:rhf,children:(0,uP.jsx)(SN,{type:`button`,text:r===`success`?`Continue to Login`:`Return to Homepage`,onClick:()=>t(`/ui/auth/login`)})})]})})},ahf=()=>(0,uP.jsxs)(H,{alignItems:`center`,gap:2,children:[(0,uP.jsx)(Qm,{size:40}),(0,uP.jsx)(z,{variant:`body1`,textAlign:`center`,children:`Verifying your email address…`})]}),ohf=()=>(0,uP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-email-verification-success`,children:`Your email has been verified. Your account is ready — please log in to continue.`}),shf=({status:e,hasToken:t})=>(0,uP.jsx)(z,{variant:`body1`,textAlign:`center`,color:`error`,"data-testid":`os-auth-email-verification-error`,children:!t||e===401?`This verification link is invalid or has expired. Please contact your administrator for a new invitation.`:`Something went wrong while verifying your email. Please try again or contact your administrator.`})})),lhf,dP,uhf,dhf,fhf,phf,mhf,hhf,ghf,_hf=s((()=>{lhf=d(m()),W(),ij(),CN(),LN(),ON(),dP=L(),uhf={maxWidth:517},dhf={width:368,mx:`auto`},fhf={approve:`The registration request has been approved. The applicant will receive an email to complete their account setup.`,deny:`The registration request has been denied.`},phf=()=>{let[e]=nj(),t=QA(),n=e.get(`token`)??``,r=e.get(`action`)??``,i=r===`approve`||r===`deny`?r:null,[a,o]=(0,lhf.useState)(`loading`),[s,c]=(0,lhf.useState)(0);return(0,lhf.useEffect)(()=>{if(!n||!i){o(`error`);return}luf(n,i).then(e=>{e.ok?o(`success`):(c(e.status),o(`error`))})},[n,i]),(0,dP.jsx)(IN,{loginConfigs:{hideVeritoneBranding:!0},children:(0,dP.jsxs)(H,{gap:3,sx:uhf,"data-testid":`os-auth-self-service-admin-review`,children:[a===`loading`&&(0,dP.jsx)(mhf,{action:i}),a===`success`&&i&&(0,dP.jsx)(hhf,{action:i}),a===`error`&&(0,dP.jsx)(ghf,{status:s,hasValidParams:!!(n&&i)}),a!==`loading`&&(0,dP.jsx)(B,{sx:dhf,children:(0,dP.jsx)(SN,{type:`button`,text:`Return to Homepage`,onClick:()=>t(`/ui/auth/login`)})})]})})},mhf=({action:e})=>(0,dP.jsxs)(H,{alignItems:`center`,gap:2,children:[(0,dP.jsx)(Qm,{size:40}),(0,dP.jsxs)(z,{variant:`body1`,textAlign:`center`,children:[e===`approve`?`Approving`:e===`deny`?`Denying`:`Processing`,` the registration request…`]})]}),hhf=({action:e})=>(0,dP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-admin-review-success`,children:fhf[e]}),ghf=({status:e,hasValidParams:t})=>{let n;return n=t?e===401?`This link has expired or is invalid. Please use a current link from your invitation email.`:e===400?`This request has already been reviewed or is no longer pending. No further action is needed.`:`Something went wrong while processing this request. Please try again or contact support.`:`This link is missing required parameters and cannot be processed.`,(0,dP.jsx)(z,{variant:`body1`,textAlign:`center`,color:`error`,"data-testid":`os-auth-admin-review-error`,children:n})}})),vhf,fP,yhf,bhf,xhf,Shf,Chf,whf,Thf=s((()=>{vhf=d(m()),W(),ij(),CN(),LN(),ON(),fP=L(),yhf={maxWidth:517},bhf={width:368,mx:`auto`},xhf=()=>{let[e]=nj(),t=QA(),n=e.get(`token`)??``,[r,i]=(0,vhf.useState)(`loading`),a=(0,vhf.useRef)(null);return(0,vhf.useEffect)(()=>{if(!n){i(`missing-token`);return}a.current!==n&&(a.current=n,duf(n).then(()=>{i(`success`)}).catch(()=>{i(`error`)}))},[n]),(0,fP.jsx)(IN,{loginConfigs:{hideVeritoneBranding:!0},children:(0,fP.jsxs)(H,{gap:3,sx:yhf,"data-testid":`os-auth-trial-verify`,children:[r===`loading`&&(0,fP.jsx)(Shf,{}),r===`success`&&(0,fP.jsx)(Chf,{}),(r===`error`||r===`missing-token`)&&(0,fP.jsx)(whf,{missingToken:r===`missing-token`}),r!==`loading`&&(0,fP.jsx)(B,{sx:bhf,children:r===`error`?(0,fP.jsx)(SN,{type:`button`,text:`Try Again`,onClick:()=>window.location.reload()}):(0,fP.jsx)(SN,{type:`button`,text:`Go to Login`,onClick:()=>t(`/ui/auth/login`)})})]})})},Shf=()=>(0,fP.jsxs)(H,{alignItems:`center`,gap:2,children:[(0,fP.jsx)(Qm,{size:40}),(0,fP.jsx)(z,{variant:`body1`,textAlign:`center`,children:`Verifying your account…`})]}),Chf=()=>(0,fP.jsx)(z,{variant:`body1`,textAlign:`center`,"data-testid":`os-auth-trial-verify-success`,children:`Your account has been verified. You can now log in to continue.`}),whf=({missingToken:e})=>(0,fP.jsx)(z,{variant:`body1`,textAlign:`center`,color:`error`,"data-testid":`os-auth-trial-verify-error`,children:e?`This verification link is invalid or has expired. Please request a new one.`:`Something went wrong while verifying your account. Please try again.`})})),Ehf,Dhf,Ohf=s((()=>{SO(),W(),vw(),ij(),YN(),Uuf(),Ehf=L(),Dhf=()=>{let e=QA(),t=lw(),n=Epf(),r=Dpf(),{config:i,slug:a,registerUri:o,isLoading:s}=JN(),c=s||n.isPending||r.isPending,l=async()=>{try{let a=t.getValues(`email`);if(!(await n.mutateAsync(a)).available){e({pathname:`/ui/auth/login`,search:`?email=${encodeURIComponent(a)}&from=org-registration&redirect=${encodeURIComponent(window.location.href)}`});return}let s=await r.mutateAsync({id:i?.id??``,email:a,redirectUrl:`${window.location.origin}/ui/auth/signup`});s.message===`Verification email sent`?e({pathname:`${o}/confirm`,search:`?email=${a}`}):s.message===`domain not allowed`&&t.setError(`email`,{type:`manual`,message:`Your email does not match the requirements to join this Organization, registration is only available to certain domains.`})}catch(e){t.setError(`email`,{type:`manual`,message:`An error occurred, please try again later.`}),oD(e)}};return(0,Ehf.jsx)(mw,{name:`email`,rules:{required:`Email is required`},render:({field:e,fieldState:t})=>(0,Ehf.jsxs)(Ehf.Fragment,{children:[(0,Ehf.jsx)(Huf,{buttonText:`Continue`,error:!!t.error,email:e.value,setEmail:e.onChange,isLoading:c,buttonColor:i?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:i?.uiSettings?.registrationButtonStyle?.textColor,onNextStep:l}),t.error&&(0,Ehf.jsx)(z,{variant:`body2`,color:`error`,mt:3,maxWidth:368,"data-testid":`os-auth-register-email-error-message`,children:t.error.message})]})})}})),khf,pP,Ahf,jhf,Mhf,Nhf,Phf,Fhf=s((()=>{W(),khf=d(m()),ij(),YN(),CN(),pP=L(),Ahf={maxWidth:517},jhf={width:368,mx:`auto`},Mhf=()=>{let e=QA(),[t]=nj(),{config:n,slugUri:r}=JN(),i=()=>{let e=`/ui/auth/login${r}`,n=decodeURIComponent(t.get(`email`));return n?`${e}?email=${encodeURIComponent(n)}`:e},a=()=>{e(i())};return(0,khf.useEffect)(()=>{t.has(`email`)||a()},[t]),(0,pP.jsxs)(H,{gap:3,sx:Ahf,"data-testid":`os-auth-register-confirmation`,children:[(0,pP.jsx)(Nhf,{}),(0,pP.jsx)(Phf,{onClick:a,buttonColor:n?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:n?.uiSettings?.registrationButtonStyle?.textColor})]})},Nhf=()=>(0,pP.jsx)(z,{variant:`body1`,textAlign:`center`,children:`Thank you for your interest in registration. We've sent you an email to confirm your identity, that contains the registration link for the rest of the process.`}),Phf=({buttonColor:e,buttonTextColor:t,onClick:n})=>(0,pP.jsx)(B,{sx:jhf,children:(0,pP.jsx)(SN,{type:`button`,text:`Return to Homepage`,onClick:n,buttonColor:e,buttonTextColor:t,testId:`return-back-home`})})})),mP,hP,Ihf,Lhf,Rhf,zhf,Bhf=s((()=>{W(),ij(),mP=d(m()),YN(),CN(),ON(),yN(),hP=L(),Ihf={buttonContainer:{width:368,mx:`auto`},privacyPolicy:{fontFamily:`Nunito`,fontSize:`14px`,lineHeight:`20px`,letterSpacing:`-1.30385e-09px`,color:`#0C53B0`,cursor:`pointer`,textDecoration:`none`},iframe:{width:`100%`,height:`424px`},iframeStyles:{border:`1px solid #E0E0E0`,borderRadius:`6px`}},Lhf=async(e,t)=>{let n=await fetch(e);if(t===`unknown`){let e=n.headers.get(`content-type`);t=e?.includes(`pdf`)?`pdf`:e?.includes(`text`)?`text`:`unknown`}return{content:t===`pdf`?URL.createObjectURL(await n.blob()):await n.text(),fileType:t}},Rhf=(e,t)=>`
3232
3232
  <!DOCTYPE html>
3233
3233
  <html>
3234
3234
  <head>
@@ -3252,7 +3252,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
3252
3252
  `}
3253
3253
  </body>
3254
3254
  </html>
3255
- `,zhf=()=>{let e=QA(),[t]=nj(),{config:n,tosFile:r,privacyPolicyUrl:i,registerUri:a}=JN(),o=(0,mP.useRef)(null),[s,c]=(0,mP.useState)({content:``,fileType:`unknown`}),[l,u]=(0,mP.useState)(!1),d=async()=>{let n=decodeURIComponent(t.get(`email`)),i=decodeURIComponent(t.get(`token`)),o=decodeURIComponent(t.get(`referer`)),s=decodeURIComponent(t.get(`userId`)),c=decodeURIComponent(t.get(`redirect`));if(o===`login`&&r?.fileId)try{if((await auf(i,s,r.fileId,new Date().toUTCString())).errors){alert(`Something went wrong while saving your terms of service acceptance`);return}if(c)window.location.href=c;else{let e=_N()?_N()+`/api/admin/switch-app`:gN().switchAppUrl;window.location.href=e+`/default`}return}catch(e){console.error(`Error updating user setting:`,e)}e({pathname:`${a}/join`,search:`?email=${encodeURIComponent(n)}&token=${encodeURIComponent(i)}`})};return(0,mP.useEffect)(()=>{s.fileType===`unknown`&&(async()=>{if(r?.url){u(!0);try{c(await Lhf(r.url,s.fileType))}catch(e){console.error(`Error loading content:`,e)}finally{u(!1)}}})()},[r,s]),(0,mP.useEffect)(()=>{o.current&&(o.current.srcdoc=Rhf(s.content,s.fileType))},[s]),(0,mP.useEffect)(()=>{let n=t.has(`email`),i=t.has(`token`);!n&&!i?e(a):n&&i&&!r&&d()},[t,r]),(0,hP.jsxs)(H,{gap:3,sx:{width:`750px`,position:`relative`,left:`50%`,transform:`translateX(-50%)`},children:[l?(0,hP.jsx)(B,{sx:{display:`flex`,justifyContent:`center`},children:(0,hP.jsx)(Qm,{})}):r&&(0,hP.jsx)(B,{children:(0,hP.jsx)(`iframe`,{ref:o,title:r.name,style:Ihf.iframeStyles,...Ihf.iframe})}),i&&(0,hP.jsx)(z,{variant:`body2`,textAlign:`center`,component:`a`,target:`_blank`,href:i.url,sx:Ihf.privacyPolicy,"data-testid":`os-auth-register-privacy-policy`,children:`Privacy Policy`}),(0,hP.jsx)(B,{sx:Ihf.buttonContainer,children:(0,hP.jsx)(SN,{text:`Accept & Continue`,type:`button`,onClick:d,buttonColor:n?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:n?.uiSettings?.registrationButtonStyle?.textColor,testId:`os-auth-register-accept-continue-button`})})]})}})),Vhf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z`}),`FileDownloadOutlined`)})),Hhf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)([(0,r.jsx)(`path`,{d:`M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 12v2H8v-4h8v2zm2-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4h-2z`},`0`),(0,r.jsx)(`circle`,{cx:`18`,cy:`11.5`,r:`1`},`1`)],`PrintOutlined`)})),Uhf,Whf,Ghf,gP,Khf,qhf,Jhf,Yhf=s((()=>{W(),Uhf=d(m()),Whf=d(Vhf()),Ghf=d(Hhf()),YN(),gP=L(),Khf=async e=>{let t=e.toLowerCase();if(t.endsWith(`.pdf`)||t.includes(`.pdf?`))return`pdf`;if(t.endsWith(`.txt`)||t.endsWith(`.text`)||t.endsWith(`.html`))return`text`;try{let t=(await fetch(e,{method:`HEAD`})).headers.get(`content-type`)||``;if(t.includes(`pdf`))return`pdf`;if(t.includes(`text`)||t.includes(`html`))return`text`}catch(e){return console.error(`Error detecting file type:`,e),`pdf`}return`pdf`},qhf=async e=>{try{let t=await fetch(e);if(!t.ok)throw Error(`HTTP error! status: ${t.status}`);return await t.text()}catch(e){throw console.error(`Error fetching text content:`,e),e}},Jhf=()=>{let{tosFile:e}=JN(),[t,n]=(0,Uhf.useState)({content:``,fileType:`unknown`}),[r,i]=(0,Uhf.useState)(!1),[a,o]=(0,Uhf.useState)(null);return(0,Uhf.useEffect)(()=>{(async()=>{if(!(!e?.url||a===e.url)){i(!0);try{await Khf(e.url)===`pdf`?n({content:e.url,fileType:`pdf`}):n({content:await qhf(e.url),fileType:`text`}),o(e.url)}catch(t){console.error(`Error loading terms content:`,t),n({content:e.url,fileType:`pdf`}),o(e.url)}finally{i(!1)}}})()},[e?.url,a]),e?(0,gP.jsxs)(B,{sx:{width:`100%`,mb:3},children:[(0,gP.jsxs)(H,{direction:`row`,justifyContent:`space-between`,alignItems:`center`,sx:{mb:1},children:[(0,gP.jsx)(z,{sx:{color:`#212121`,fontSize:`12px`,fontFamily:`Nunito`},children:`Terms & Conditions`}),(0,gP.jsxs)(H,{direction:`row`,spacing:1,children:[(0,gP.jsx)(Xf,{size:`small`,onClick:()=>{e?.url&&window.open(e.url,`_blank`)},disabled:r,"aria-label":`Download Terms & Conditions`,sx:{color:`#555F7C`},"data-testid":`os-auth-register-terms-and-conditions-download-button`,children:(0,gP.jsx)(Whf.default,{})}),(0,gP.jsx)(Xf,{size:`small`,onClick:()=>{if(t.fileType===`pdf`&&t.content){let e=window.open(t.content,`_blank`);e&&(e.onload=()=>{e.print()})}else if(t.content){let e=window.open(``,`_blank`);if(e){let{document:n}=e;n.title=`Terms & Conditions`;let r=n.createElement(`style`);r.textContent=`body { font-family: Arial, sans-serif; padding: 20px; line-height: 1.6; } pre { white-space: pre-wrap; }`,n.head&&n.head.appendChild(r);let i=n.createElement(`h1`);i.textContent=`Terms & Conditions`;let a=n.createElement(`pre`);a.textContent=t.content,n.body&&(n.body.appendChild(i),n.body.appendChild(a)),e.focus(),e.print()}}},disabled:r||!t.content,"aria-label":`Print Terms & Conditions`,sx:{color:`#555F7C`},"data-testid":`os-auth-register-terms-and-conditions-print-button`,children:(0,gP.jsx)(Ghf.default,{})})]})]}),(0,gP.jsx)(B,{sx:{width:`100%`,height:`200px`,border:`1px solid #E0E0E0`,borderRadius:`6px`,overflowY:t.fileType===`pdf`?`hidden`:`auto`,overflowX:`hidden`,padding:t.fileType===`pdf`?0:2,backgroundColor:`#FAFAFA`},children:r?(0,gP.jsx)(B,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`},children:(0,gP.jsx)(Qm,{size:24})}):t.fileType===`pdf`?(0,gP.jsx)(B,{component:`iframe`,src:t.content,sx:{width:`100%`,height:`100%`,border:`none`,borderRadius:`6px`},title:`Terms & Conditions PDF`}):t.content?(0,gP.jsx)(z,{variant:`body2`,component:`pre`,sx:{whiteSpace:`pre-wrap`,wordWrap:`break-word`,fontFamily:`inherit`,margin:0,lineHeight:1.6},children:t.content}):(0,gP.jsx)(z,{variant:`body2`,color:`#212121`,children:`Unable to load terms content.`})})]}):null}})),Xhf,Zhf,Qhf,$hf=s((()=>{Xhf=d(m(),1),Zhf=`GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider`,Qhf=(0,Xhf.createContext)({instance:void 0,siteKey:``,language:``,isLoading:!0,executeV3:()=>{throw Error(Zhf)},executeV2Invisible:()=>{throw Error(Zhf)},reset:()=>{throw Error(Zhf)},getResponse:()=>{throw Error(Zhf)},render:()=>{throw Error(Zhf)}})})),egf,tgf,ngf=s((()=>{$hf(),egf=d(m(),1),tgf=()=>(0,egf.useContext)(Qhf)})),rgf,igf=s((()=>{rgf=()=>!!document.querySelector(`script[src*="/recaptcha/"]:not([src*="gstatic"])`)})),agf,ogf=s((()=>{agf=()=>`.grecaptcha-badge{display: none !important;}`})),sgf,cgf=s((()=>{sgf=({host:e=`google.com`,isEnterprise:t=!1,render:n,hl:r,badge:i})=>{let a=new URLSearchParams({...r&&{hl:r},...i&&{badge:i},render:n});return`https://www.${e}/recaptcha/${t?`enterprise.js`:`api.js`}?${a}`}})),lgf,ugf=s((()=>{ogf(),lgf=()=>{let e=document.createElement(`style`);e.innerHTML=agf(),document.body.appendChild(e)}})),dgf,fgf=s((()=>{cgf(),dgf=({onload:e,appendTo:t=`head`,isEnterprise:n=!1,host:r,render:i,badge:a,hl:o,...s})=>{let c=sgf({host:r,isEnterprise:n,render:i,hl:o,badge:a}),l=document.createElement(`script`);Object.entries(s).forEach(([e,t])=>{l.setAttribute(e,t?.toString()??``)}),l.src=c,l.onload=e,document[t].appendChild(l)}})),pgf,mgf=s((()=>{pgf=()=>{let e=document.querySelector(`.grecaptcha-badge`);e&&e.parentNode&&document.body.removeChild(e.parentNode)}})),hgf,ggf=s((()=>{hgf=e=>{let t=document.getElementById(e);if(t)for(;t.lastChild;)t.lastChild.remove()}})),_gf,vgf,ygf=s((()=>{_gf=`https://www.gstatic.com/recaptcha/releases`,vgf=()=>{window.___grecaptcha_cfg=void 0;let e=document.querySelector(`script[src*="/recaptcha/"]:not([src*="gstatic"])`);e&&e.remove();let t=document.querySelector(`script[src^="${_gf}"]`);t&&t.remove()}})),bgf=s((()=>{igf(),ugf(),fgf(),mgf(),ggf(),ygf()})),xgf,Sgf,Cgf,wgf,Tgf=s((()=>{ngf(),bgf(),xgf=d(m(),1),Sgf=L(),Cgf=`google-recaptcha-badge-container`,wgf=({id:e=Cgf,theme:t,language:n,badge:r=`bottomright`,onChange:i,onError:a,onExpired:o})=>{let s=(0,xgf.useRef)(null),c=tgf(),l=t??c.theme,u=n??c.language;return(0,xgf.useEffect)(()=>{if(!c.render)return;let t=document.createElement(`div`),n={sitekey:c.siteKey,badge:r,size:`invisible`,callback:i,"expired-callback":o,"error-callback":a,theme:l,...u&&{hl:u}};return c.render(t,n),s.current&&s.current.appendChild(t),()=>{hgf(e)}},[c.render,c.siteKey,r,i,a,o,l,u]),!c.render||!c.siteKey?null:(0,Sgf.jsx)(`div`,{ref:s,id:e})}})),Egf,Dgf,Ogf=s((()=>{Egf=d(m(),1),Dgf=(e=!1)=>{let[t,n]=(0,Egf.useState)(e);return[t,e=>n(t=>e??!t)]}})),kgf=s((()=>{Ogf()})),Agf,jgf,Mgf,Ngf,Pgf,Fgf=s((()=>{$hf(),bgf(),Agf=d(m(),1),jgf=L(),kgf(),Mgf=`onGoogleReCaptchaLoad`,Ngf=`google-recaptcha-container`,Pgf=({type:e,siteKey:t,language:n,scriptProps:r,isEnterprise:i=!1,host:a,theme:o=`light`,children:s,explicit:c,onLoad:l,onError:u})=>{let[d,f]=Dgf(!0),p=(0,Agf.useRef)(void 0);(0,Agf.useEffect)(()=>{let s=r?.id??`google-recaptcha-${e}-script`,d=rgf();try{let m=()=>{f(!0);let n=i?window.grecaptcha?.enterprise:window.grecaptcha;if(!n){u?.(),f(!1);return}if(c||n.ready(async()=>{p.current=n,await l?.(n),f(!1)}),c){let r={size:e===`v3`||e===`v2-invisible`?`invisible`:`normal`,...(e===`v3`||e===`v2-invisible`)&&{badge:`bottomright`},sitekey:t,theme:o,...typeof c==`object`&&{...c,"expired-callback":c.expiredCallback,"error-callback":c.errorCallback}};d||typeof c==`object`&&(e===`v3`||e===`v2-invisible`)&&c?.badge===`hidden`&&lgf(),n.ready(async()=>{typeof c==`object`&&c.container&&n.render(c.container,r,!!c.inherit),p.current=n,l&&await l(n),f(!1)})}};return window[Mgf]=m,d?m():dgf({isEnterprise:i,host:a,...(e===`v3`||e===`v2-invisible`)&&typeof c==`object`&&c?.badge&&{badge:c?.badge===`hidden`?`bottomright`:c?.badge},...n&&{hl:n},render:c||e===`v2-checkbox`?`explicit`:t,...r,onload:m,id:s}),()=>{rgf()&&vgf(),typeof c==`object`&&(e===`v3`||e===`v2-invisible`)&&!c?.container&&c?.badge?hgf(Ngf):pgf()}}catch{f(!1)}},[i,n,a,t,e]);let m=e=>{if(!p.current?.execute)throw Error(`Google ReCaptcha has not been loaded`);return p.current.execute(t,{action:e})},h=e=>{if(!p.current?.execute)throw Error(`Google ReCaptcha has not been loaded`);return p.current.execute(e)},g=(0,Agf.useMemo)(()=>({instance:p.current,siteKey:t,isLoading:d,theme:o,executeV2Invisible:h,executeV3:m,reset:p.current?.reset,getResponse:p.current?.getResponse,render:p.current?.render,...n&&{language:n}}),[t,d,n]);return(0,jgf.jsx)(Qhf.Provider,{value:g,children:s})}})),Igf=s((()=>{ngf(),Tgf(),Fgf()}));function Lgf(){let{config:e,tosFile:t}=JN(),n=!!t?.url,r=Opf(),{executeV2Invisible:i,reset:a}=tgf(),o=(0,_P.useRef)(null),s=(0,_P.useCallback)(e=>{o.current?.(e),o.current=null},[]),{onSubmit:c,errorMessage:l,setErrorMessage:u}=Hgf({getRecaptchaToken:(0,_P.useCallback)(()=>new Promise((e,t)=>{if(!i){t(Error(`reCAPTCHA is not ready`));return}o.current=n=>{if(!n){t(Error(`reCAPTCHA returned an empty token`));return}e(n)},i()}),[i]),onRegistrationFailure:(0,_P.useCallback)(()=>a?.(),[a])}),d=[{fieldKey:`firstName`,title:`First Name`,type:`text`,required:!0},{fieldKey:`lastName`,title:`Last Name`,type:`text`,required:!0},{fieldKey:`company`,title:`Company`,type:`text`,required:!0},{fieldKey:`email`,title:`Email`,type:`text`,required:!0},{fieldKey:`password`,title:`Password`,type:`password`,required:!0},{fieldKey:`confirmPassword`,title:`Confirm Password`,type:`password`,required:!0}],f=qc(od().breakpoints.down(`md`)),p=qc(`(max-height: 800px)`);return(0,vP.jsxs)(B,{sx:{width:mdf,...(f||p)&&{height:`588px`,overflowY:`auto`,overflowX:`hidden`,paddingTop:1}},children:[(0,vP.jsx)(mMd,{htmlFormId:Rgf,schema:e?.uiSettings?.customRegistrationFields,additionalFields:d,passwordPolicy:e?.uiSettings?.passwordPolicy,renderFormActions:({isSubmitting:t,isValid:i,htmlFormId:a})=>(0,vP.jsxs)(H,{gap:2,children:[(0,vP.jsx)(Jhf,{}),(0,vP.jsx)(Slf,{hasTos:n,loading:r.isPending,isSubmitting:t,disabled:!i,buttonColor:e?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:e?.uiSettings?.registrationButtonStyle?.textColor,htmlForm:a})]}),onSubmit:c,sx:{width:`100%`}}),(0,vP.jsx)(wgf,{badge:`inline`,onChange:s,style:{display:`none`}}),l&&(0,vP.jsx)(Vpf,{open:!!l,message:l,onClose:()=>u(null)})]})}var _P,vP,Rgf,zgf,Bgf,Vgf,Hgf,Ugf=s((()=>{_P=d(m()),ij(),SO(),Igf(),YN(),CN(),W(),LN(),yN(),Yhf(),Hpf(),vP=L(),Rgf=`registration-join-form`,zgf=()=>{let e=tlf();return e?(0,vP.jsx)(Pgf,{type:`v2-invisible`,siteKey:e,children:(0,vP.jsx)(Lgf,{})}):(oD(Error(`Registration recaptcha site key is not configured`)),(0,vP.jsx)(B,{sx:{width:mdf},children:(0,vP.jsx)(np,{severity:`error`,children:`Registration is unavailable due to a configuration issue. Please contact support.`})}))},Bgf=new Map([[`registration_not_approved`,QN.RegistrationNotApproved],[`account_exists`,QN.AccountExists],[`registration_configuration_invalid`,QN.RegistrationConfigurationInvalid]]),Vgf=({status:e,code:t,message:n})=>{if(t){let e=Bgf.get(t);if(e)return $N[e];if(typeof n==`string`&&n)return{description:n}}switch(e){case 401:return $N[QN.CaptchaError];case 400:return $N[QN.RegistrationError];case 409:return $N[QN.InviteExists];default:return $N[QN.EnvError]}},Hgf=({getRecaptchaToken:e,onRegistrationFailure:t})=>{let n=QA(),[r]=nj(),{config:i,registerUri:a}=JN(),o=Opf(),[s,c]=(0,_P.useState)(null);return{onSubmit:(0,_P.useCallback)(async s=>{try{let l=i.id,u=i.slug,d=i?.adminApprovalRequired??!1,f=r.get(`email`),p=s?.email||(f?decodeURIComponent(f):``),m=i?.allowedDomains??[];if(m.length>0&&p){let e=p.split(`@`)[1]?.toLowerCase();if(!m.some(t=>t.toLowerCase()===e)){c({title:`Email Domain Not Allowed`,description:`Please use an email address from one of the allowed domains: ${m.join(`, `)}`});return}}let h=s?.firstName??``,g=s?.lastName??``,_=s?.password??``,v=new Set([`firstName`,`lastName`,`email`,`password`,`confirmPassword`]),y=i?.uiSettings?.customRegistrationFields?.properties??{},b=Object.keys(s).reduce((e,t)=>{if(!v.has(t)){let n=s[t];y[t]?.type===`number`&&isFinite(Number(n))?e[t]=Number(n):e[t]=n}return e},{}),x=await e(),S=await o.mutateAsync({slug:u,orgRegistrationId:l,email:p,customFields:b,firstName:h,lastName:g,password:_,captchaResponse:x});if(S?.status===201){let e=[`approved`,`submitted`].includes(S.inviteStatus??``)?S.inviteStatus:d?`submitted`:`approved`;n({pathname:`${a}/success`,search:`?status=${e}&email=${encodeURIComponent(p)}`})}else c(Vgf(S)),t?.()}catch(e){oD(e),c($N[QN.EnvError]),t?.()}},[i,e,n,t,a,r,o]),errorMessage:s,setErrorMessage:c}}})),Wgf,Ggf,Kgf=s((()=>{ij(),vw(),YN(),LN(),ndf(),xN(),Wgf=L(),Ohf(),Fhf(),Bhf(),Yhf(),Ugf(),Ggf=()=>{let{config:e,isLoading:t}=JN(),n=QC({defaultValues:{email:``,acceptedTos:!1}}),r=CQd(`/ui/auth/signup/:slug/success`),i=()=>{let t=e?.name?.trim();return t?`Welcome to ${t} Registration`:`Welcome to Registration`};return t?(0,Wgf.jsx)(tdf,{}):(0,Wgf.jsx)(uw,{...n,children:(0,Wgf.jsxs)(IN,{loginConfigs:{name:e?.name??``,logo:e?.uiSettings?.logo,buttonColor:e?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:e?.uiSettings?.registrationButtonStyle?.textColor,hideVeritoneBranding:e?.uiSettings?.veritoneBranding},children:[!r&&(0,Wgf.jsx)(bN,{text:i(),type:`register`,subText:`Please enter the information you would like associated with your account and accept our Terms & Conditions. This is the first step on your way to exploring all of the amazing content we have to offer!`,sx:{textAlign:`left`,fontWeight:`700`,fontSize:`16px`},subTextSx:{textAlign:`left`,fontSize:`12px`}}),(0,Wgf.jsx)(BQd,{})]})})}})),yP,qgf,Jgf,Ygf=s((()=>{ij(),Wpf(),qpf(),Xpf(),Qpf(),tmf(),imf(),wmf(),Omf(),Pmf(),Bmf(),Gmf(),ehf(),chf(),_hf(),Thf(),Kgf(),yP=L(),qgf=()=>{let{slug:e}=DQd(),t=ZA(),n=t.pathname.split(`/`),r=n.findIndex(e=>e===`register`),i=n.slice(r+(e?2:1)).join(`/`),a=`../signup`;e&&(a+=`/${e}`),i&&(a+=`/${i}`);let o=t.search;return(0,yP.jsx)(zQd,{to:a+o,replace:!0})},Jgf=({aiwareInit:e,allowVanityDomain:t=!1,onLoginSuccess:n})=>(0,yP.jsxs)(HQd,{children:[(0,yP.jsx)($A,{path:`/login`,element:(0,yP.jsx)(Upf,{allowVanityDomain:t,onLoginSuccess:n})}),(0,yP.jsx)($A,{path:`/login/:slug`,element:(0,yP.jsx)(Upf,{allowVanityDomain:t,onLoginSuccess:n})}),(0,yP.jsx)($A,{path:`/forgot`,element:(0,yP.jsx)(Kpf,{})}),(0,yP.jsx)($A,{path:`/forgot/:slug`,element:(0,yP.jsx)(Kpf,{})}),(0,yP.jsx)($A,{path:`/sign-up`,element:(0,yP.jsx)(zQd,{to:`../signup`,replace:!0})}),(0,yP.jsx)($A,{path:`/register`,element:(0,yP.jsx)(zQd,{to:`../signup`,replace:!0})}),(0,yP.jsx)($A,{path:`/register/:slug/*`,element:(0,yP.jsx)(qgf,{})}),(0,yP.jsx)($A,{path:`/signup`,element:(0,yP.jsx)(Cmf,{})}),(0,yP.jsx)($A,{path:`/signup/verify`,element:(0,yP.jsx)(ihf,{})}),(0,yP.jsx)($A,{path:`/signup/review`,element:(0,yP.jsx)(phf,{})}),(0,yP.jsx)($A,{path:`/signup/trial/verify`,element:(0,yP.jsx)(xhf,{})}),(0,yP.jsxs)($A,{path:`/signup/:slug/*`,element:(0,yP.jsx)(Ggf,{}),children:[(0,yP.jsx)($A,{path:`join`,element:(0,yP.jsx)(zgf,{})}),(0,yP.jsx)($A,{path:`success`,element:(0,yP.jsx)(Xmf,{})}),(0,yP.jsx)($A,{index:!0,element:(0,yP.jsx)(Dhf,{})}),(0,yP.jsx)($A,{path:`confirm`,element:(0,yP.jsx)(Mhf,{})}),(0,yP.jsx)($A,{path:`terms-of-service`,element:(0,yP.jsx)(zhf,{})})]}),(0,yP.jsx)($A,{path:`/plans`,element:(0,yP.jsx)(Nmf,{})}),(0,yP.jsx)($A,{path:`/payment-result`,element:(0,yP.jsx)(zmf,{})}),(0,yP.jsx)($A,{path:`/restricted-provider`,element:(0,yP.jsx)(Ypf,{})}),(0,yP.jsx)($A,{path:`/link-oid`,element:(0,yP.jsx)(Zpf,{})}),(0,yP.jsx)($A,{path:`/reset-password/success`,element:(0,yP.jsx)(rmf,{})}),(0,yP.jsx)($A,{path:`/reset-password`,element:(0,yP.jsx)(emf,{})}),(0,yP.jsx)($A,{path:`/activate`,element:(0,yP.jsx)(Dmf,{})}),(0,yP.jsx)($A,{path:`/logout`,element:(0,yP.jsx)(Wmf,{aiwareInit:e})})]})})),Xgf=l({AuthRoutes:()=>Jgf,ResetPassword:()=>Muf,getConfig:()=>gN,getRestApiUrlFromConfig:()=>_N}),Zgf=s((()=>{Nuf(),Ygf(),yN()}));function*Qgf(){let e=yield F(Fv);yield At(m_f,function*(t){let n=yield D9e(t.payload.ids,e);n!==void 0&&(yield N(R_f(n)))})}function*$gf(){yield At(a_f,function*(e){yield N(N_f(!0));let t=yield F(Fv),n;switch(e.payload.ownerType){case Wb.ORGANIZATION:n=yield T9e({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t});break;case Wb.MINE:n=yield T9e({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t});break;case Wb.SHARED:n=yield T9e({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t});break;case Wb.NOTEBOOKS:n=yield T9e({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t,isNotebook:!0});break;default:break}n!==void 0&&n&&(n.data.engines.records.length===0&&!e.payload.name&&(yield N($_f(!0))),e.payload.ownerType===Wb.NOTEBOOKS?yield N(G_f(n.data.engines.records)):yield N(W_f(n.data.engines.records))),yield N(J_f(!1)),yield N(N_f(!1))})}function*e_f(){yield At(C_f,function*(e){let t=yield F(Fv),n=yield T9e({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t,isNotebook:!0});n!==void 0&&n&&(yield N(G_f(n.data.engines.records))),yield N(J_f(!1))})}function*t_f(){yield At(E_f,function*(){let e=yield P(w9e,yield F(Fv),{isPublic:!0,limit:200});e&&e.data&&e.data.flowTemplates&&e.data.flowTemplates.records&&e.data.flowTemplates.records.length>0&&(yield N(I_f(e.data.flowTemplates.records)),yield N(L_f(e.data.flowTemplates.records)))})}function*n_f(){yield At(s_f,function*(){let e,t=yield F(Fv);try{e=yield P(O9e,t)}catch{yield N({type:c_f,payload:!1})}(0,i_f.get)(e,`data.flowRevisions`,``)&&(yield N({type:c_f,payload:!0}))})}function*r_f(){yield Oe([Qgf(),e_f(),$gf(),t_f(),n_f()])}var i_f,a_f,o_f,s_f,c_f,l_f,u_f,d_f,f_f,p_f,m_f,h_f,g_f,__f,v_f,y_f,b_f,x_f,S_f,C_f,w_f,T_f,E_f,D_f,O_f,k_f,A_f,j_f,M_f,N_f,P_f,bP,F_f,I_f,L_f,R_f,z_f,B_f,V_f,H_f,xP,U_f,W_f,G_f,K_f,q_f,J_f,Y_f,X_f,Z_f,Q_f,SP,$_f,evf,tvf,CP=s((()=>{hv(),It(),Kb(),X(),i_f=d(xb()),a_f=`flow-center/FETCH_FLOWS`,o_f=`flow-center/ADD_NEW_FLOW`,s_f=`flow-center/IS_REVISIONS_EXIST_ON_SERVER`,c_f=`flow-center/SET_IS_REVISIONS_EXIST_ON_SERVER`,l_f=`flow-center/SET_FETCHING_FLOWS`,u_f=`flow-center/SET_OPEN_TEMPLATE`,d_f=`flow-center/SET_TEMPLATE_SELECTED`,f_f=`flow-center/SET_TEMPLATES`,p_f=`flow-center/SET_FILTERED_TEMPLATES_ACTION`,m_f=`flow-center/FETCH_TAGS`,h_f=`flow-center/SET_TAGS`,g_f=`flow-center/SET_TAGS_TO_STORE`,__f=`flow-center/SET_CATEGORIES`,v_f=`flow-center/SET_TEMPLATES_AUTHORS`,y_f=`flow-center/SET_SELECTED_FILTERS`,b_f=`flow-center/SET_TAG`,x_f=`flow-center/SET_FLOWS`,S_f=`flow-center/SET_NOTEBOOKS`,C_f=`flow-center/FETCH_NOTEBOOKS`,w_f=`flow-center/TOGGLE_IS_SEARCHING`,T_f=`flow-center/TOGGLE_IS_SEARCHING_LOADING`,E_f=`flow-center/SEARCH_TEMPLATES`,D_f=`flow-center/SET_SEARCHED`,O_f=`flow-center/SET_SEARCHED_TEMPLATES`,k_f=`flow-center/SET_CONFIG`,A_f=`flow-center/TOGGLE_STATE_CREATE_NEW_FLOW`,j_f=`flow-center/SET_SHOULD_CREATE_INITIAL_FLOWS`,M_f=`flow-center/GET_NODE_RED_VERSION_EDGE`,N_f=fv(l_f),P_f=fv(s_f),bP=fv(u_f),F_f=fv(d_f),I_f=fv(f_f),L_f=fv(p_f),fv(m_f),R_f=fv(h_f),z_f=fv(g_f),B_f=fv(__f),V_f=fv(v_f),H_f=fv(y_f),fv(b_f),xP=fv(a_f),U_f=fv(C_f),W_f=fv(x_f),G_f=fv(S_f),K_f=fv(o_f),q_f=fv(w_f),J_f=fv(T_f),Y_f=fv(E_f),X_f=fv(D_f),Z_f=fv(O_f),Q_f=fv(k_f),SP=fv(A_f),$_f=fv(j_f),fv(M_f),evf=ZWe({flows:[],notebooks:[],shouldCreateInitialFlows:!1,fetchingFlows:!1,templateToOpen:{},isTemplateSelected:!1,tags:[],categories:[],templatesAuthors:[],templates:[],filteredTemplates:[],selectedFilters:{},isSearching:!1,isSearchingLoading:!1,searched:``,searchedTemplates:null,config:{isFullScreen:!1,automateFullScreen:!1,zIndex:0,graphQLEndpoint:``,defaultCluster:``},isLoadingCreateNewFlow:!1,isRevisionsExistOnServer:!1},{[a_f]:e=>({...e}),[o_f]:(e,{payload:t})=>({...e,flows:[t,...e.flows]}),[l_f]:(e,{payload:t})=>({...e,fetchingFlows:t}),[u_f]:(e,{payload:t})=>({...e,templateToOpen:t}),[d_f]:(e,{payload:t})=>({...e,isTemplateSelected:t}),[h_f]:(e,{payload:t})=>({...e,tags:t}),[g_f]:(e,{payload:t})=>({...e,tags:t}),[__f]:(e,{payload:t})=>({...e,categories:t}),[v_f]:(e,{payload:t})=>({...e,templatesAuthors:t}),[y_f]:(e,{payload:t})=>({...e,selectedFilters:t}),[f_f]:(e,{payload:t})=>({...e,templates:t}),[p_f]:(e,{payload:t})=>({...e,filteredTemplates:t}),[b_f]:(e,{payload:t})=>({...e,tag:t}),[x_f]:(e,{payload:t})=>({...e,flows:t}),[S_f]:(e,{payload:t})=>({...e,notebooks:t}),[w_f]:(e,{payload:t})=>({...e,isSearching:t}),[T_f]:(e,{payload:t})=>({...e,isSearchingLoading:t}),[D_f]:(e,{payload:t})=>({...e,searched:t}),[O_f]:(e,{payload:t})=>({...e,searchedTemplates:t}),[k_f]:(e,{payload:t})=>({...e,config:t}),[A_f]:(e,{payload:t})=>({...e,isLoadingCreateNewFlow:t}),[c_f]:(e,{payload:t})=>({...e,isRevisionsExistOnServer:t}),[j_f]:(e,{payload:t})=>({...e,shouldCreateInitialFlows:t})}),tvf=`flows`}));function*nvf(){yield Oe([r_f()])}var rvf=s((()=>{It(),CP()})),ivf,avf,ovf,svf,cvf,lvf,uvf=s((()=>{hv(),ivf=`newFlowClusterID`,avf={newFlowClusterID:``},ovf=pv({name:ivf,initialState:avf,reducers:{newFlowClusterIDAction(e,t){e.newFlowClusterID=t.payload}}}),svf=e=>e?.newFlowClusterID||null,{newFlowClusterIDAction:cvf}=ovf.actions,lvf=ovf.reducer})),dvf,fvf=s((()=>{uvf(),dvf=lvf})),pvf,mvf,hvf,gvf,_vf,vvf=s((()=>{hv(),pvf=`engineDistributionType`,mvf={engineDistributionType:`instance_locked`},hvf=pv({name:pvf,initialState:mvf,reducers:{engineDistributionTypeAction(e,t){e.engineDistributionType=t.payload}}}),{engineDistributionTypeAction:gvf}=hvf.actions,_vf=hvf.reducer})),yvf,bvf=s((()=>{vvf(),yvf=_vf}));function xvf(){return{id:`flow-center`,reducerMap:{[tvf]:evf,[Svf]:dvf,[Cvf]:yvf,[wvf]:Jat},sagas:[nvf],initialActions:[]}}var Svf,Cvf,wvf,Tvf,Evf=s((()=>{CP(),rvf(),fvf(),bvf(),H_(),X(),Svf=`newFlowClusterID`,Cvf=`engineDistributionType`,wvf=`flowCenterDialog`,V_.addModules([xvf()]),Tvf=V_})),Dvf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M14 6V4h-4v2h4zM4 8v11h16V8H4zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2h4z`}),`WorkOutlineOutlined`)})),Ovf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87zM15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24zm-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2v1z`}),`PeopleAltOutlined`)})),kvf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z`}),`PersonOutlineOutlined`)})),Avf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z`}),`HistoryOutlined`)}));function jvf({categories:e,filterers:t,type:n,screen:r,onSetType:i,showNavigation:a,fullScreen:o,automateFullScreen:s}){let{classes:c}=Bvf(),l=K(),[u,d]=(0,Mvf.useState)([]),f=G(e=>e.flows.selectedFilters),p=G(e=>e.flows.isSearching);function m(e){switch(e){case`mine`:return r.toLowerCase()===e&&!p?(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Mct,alt:`myFlows`}):(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Act,alt:`myFlowsBlue`});case`templates`:return r.toLowerCase()===e&&!p?(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Rct,alt:`templates`}):(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Ict,alt:`templatesBlue`});case`containers`:return(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:ult,alt:`containerDashboard`});case`notebooks`:return r.toLowerCase()===e&&!p?(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Mct,alt:`myFlows`}):(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Act,alt:`myFlowsBlue`});case`WorkOutlineOutlinedIcon`:return(0,wP.jsx)(Pvf.default,{});case`PeopleAltOutlinedIcon`:return(0,wP.jsx)(Fvf.default,{});case`PersonOutlineOutlinedIcon`:return(0,wP.jsx)(Ivf.default,{});case`HistoryOutlinedIcon`:return(0,wP.jsx)(Lvf.default,{});default:return(0,wP.jsx)(Lvf.default,{})}}let h=e=>{let t=u.indexOf(e);d(t===-1?t=>(t.push(e),[...t]):e=>(e.splice(t,1),[...e]))},g=(e,t)=>{let n={...f},r=f[e];n[e]=[],r&&(n[e]=[...r]),n[e].includes(t)?n[e].splice(n[e].indexOf(t),1):n[e].push(t),n[e].length===0&&delete n[e],l(H_f(n))};(0,Mvf.useEffect)(()=>{g(Gb.PUBLIC,`1`)},[]);let _=e=>{l(q_f(!1)),l(J_f(!1)),l(X_f(``)),l(Z_f(null)),l(xP(e===`notebooks`?{name:``,ownerType:Wb.NOTEBOOKS}:{name:``,ownerType:Wb.MINE})),i(e)},v=()=>t.map(({text:e,group:t,options:n},r)=>(0,wP.jsx)(`div`,{children:(0,wP.jsxs)(wh,{component:`fieldset`,className:c.formControl,"data-test":`flow-center-${t}-container`,id:`flow-center-${t}-container`,children:[(0,wP.jsxs)(`div`,{className:c.filterTitleContainer,children:[(0,wP.jsx)(jh,{className:c.category,component:`legend`,children:e}),(0,wP.jsx)(`div`,{className:c.expandIconClass,onClick:()=>h(r),children:u.includes(r)?(0,wP.jsx)(Rvf.default,{fontSize:`small`,style:{fill:`#555F7C`,width:`18px!important`,height:`18px!important`}}):(0,wP.jsx)(zvf.default,{fontSize:`small`,style:{fill:`#555F7C`,width:`18px!important`,height:`18px!important`}})})]}),(0,wP.jsx)(`div`,{children:(0,wP.jsx)(Fbe,{className:c.group,children:n.map(({text:e,value:n})=>{if(!u.includes(r))return(0,wP.jsx)(Dh,{control:(0,wP.jsx)(Ym,{checked:f[t]&&f[t].includes(n),name:n,color:`primary`,onClick:()=>g(t,n)}),label:(0,wP.jsx)(z,{"data-test":`flow-center-flows-table-optionText`,className:c.listItemTextFilters,children:e}),"data-test":`flow-center-filter-item`,id:`flow-center-filter-item`},`${t}-${n}`)})})})]},t+r)},t+r));return(0,wP.jsx)(B,{className:c.boxBackground,children:(0,wP.jsxs)(B,{className:c.marginLeft,children:[(0,wP.jsx)(Gh,{className:s?c.fullScreenMode:``,children:e.map(({key:e,text:t,icon:n})=>(0,wP.jsxs)(Zh,{id:`flow-center-navigation-listItem-conatiner`,"data-test":`flow-center-navigation-tabs-${e}`,button:!0,disableRipple:!0,selected:r.toLowerCase()===e&&!p,onClick:()=>_(e),className:c.paddingLeft,classes:{selected:c.selectedPaddingLeft},children:[(0,wP.jsx)(eg,{className:c.icon,children:m(e)}),(0,wP.jsx)(ng,{"data-test":`flow-center-navigation-listItemText`,className:`flow-center-navigation-listItemText`,primary:t,classes:{primary:c.listItemText}})]},e))}),a&&(()=>{let e=s?`calc(100vh - 64px - 16px - 86px - 8px - 54px`:`calc(100vh - 64px - 16px - 86px - 8px - ${o?`0px`:`54px`})`;return(0,wP.jsxs)(wP.Fragment,{children:[(0,wP.jsx)(vh,{}),(0,wP.jsx)(`div`,{className:c.scroll,style:{height:e},children:v()})]})})()]})})}var Mvf,Nvf,Pvf,Fvf,Ivf,Lvf,Rvf,zvf,wP,Bvf,Vvf=s((()=>{Mvf=d(m()),Nvf=Z(),yh(),Mh(),Th(),Lbe(),Oh(),Xm(),tg(),rg(),Qh(),Kh(),Hm(),ip(),Pvf=d(Dvf()),Fvf=d(Ovf()),Ivf=d(kvf()),Lvf=d(Avf()),q(),CP(),rx(),Kb(),Rvf=d(Pfd()),zvf=d(rC()),wP=L(),Bvf=(0,Nvf.makeStyles)()(()=>({icon:{fontSize:`16px!important`,minWidth:`0px!important`,paddingLeft:`8px!important`,paddingRight:`8px!important`,"& svg":{fill:`#555F7C!important`}},text:{fontSize:`14px!important`},listItemText:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:`normal!important`,fontSize:`14px!important`,lineHeight:`19px!important`,letterSpacing:`-1.30385e-09px!important`},listItemTextFilters:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:`normal!important`,fontSize:`12px!important`,lineHeight:`16px!important`,letterSpacing:`-1.30385e-09px!important`,wordBreak:`break-word`},category:{fontFamily:`Nunito`,fontStyle:`normal!important`,color:`#2A323C!important`,fontSize:`14px!important`,marginright:`6px!important`,fontWeight:`500!important`,paddingLeft:`8px!important`},formControl:{marginBottom:`10px!important`,marginTop:`10px!important`},marginLeft:{paddingLeft:`8px!important`,paddingRight:`8px!important`},boxBackground:{height:`100%!important`},paddingLeft:{paddingLeft:`0px!important`,minWidth:`0px!important`,borderRadius:`4px!important`},fullScreenMode:{marginTop:`64.5px!important`},selectedPaddingLeft:{background:`#F2F5F9 !important`,color:`#1871E8 !important`},group:{paddingLeft:`8px!important`},filterTitleContainer:{display:`flex`,alignItems:`center!important`},expandIconClass:{display:`flex`,paddingLeft:`5px!important`,"&:hover":{cursor:`pointer!important`}},scroll:{overflowY:`auto`,overflowX:`hidden`}}))})),Hvf,Uvf,TP,Wvf,Gvf,Kvf,qvf=s((()=>{Hvf=d(m()),qm(),Kb(),hge(),ip(),Wm(),Nh(),oge(),Hm(),Uvf=Z(),Y(),q(),CP(),rx(),X(),SO(),W(),TP=L(),Wvf=3,Gvf=(0,Uvf.makeStyles)()(e=>({container:{marginLeft:`12px!important`},cardRoot:{display:`flex`,flexDirection:`column`,justifyContent:`center!important`,border:`0.5px solid #D5DFE9!important`,boxShadow:`none!important`,borderRadius:`4px!important`,marginRight:`10px!important`},cardContainer:{marginTop:`20px!important`,marginLeft:`20px!important`,marginBottom:`15px!important`,marginRight:`20px!important`,maxHeight:`150px`,minHeight:`150px`,display:`flex`,flexDirection:`column`},title:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`16px!important`,lineHeight:`22px!important`,letterSpacing:`-1.30385e-09px!important`,wordBreak:`break-word!important`,cursor:`pointer`,color:`#2A323C!important`},subtitle:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:500,fontSize:`12px!important`,lineHeight:`16px!important`,letterSpacing:`-1.30385e-09px!important`,color:`#5C6269!important`,wordWrap:`break-word!important`},veritoneCertifiedContainer:{display:`flex`,marginTop:`10px!important`},veritoneCertified:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:500,fontSize:`10px!important`,lineHeight:`18px!important`,letterSpacing:`-1.30385e-09px!important`,wordWrap:`break-word!important`,color:`#2A323C!important`,marginLeft:`4px!important`},pos:{marginBottom:12},centerButton:{justifyContent:`center!important`},cardContent:{padding:`0px!important`,height:`120px!important`,textOverflow:`ellipsis!important`},titleContent:{height:`82px!important`,overflow:`auto`},bottomButton:{marginTop:`10px`,padding:`0px!important`,display:`flex`,height:`30px!important`},box:{display:`flex`,marginTop:e.spacing(3.2),marginBottom:e.spacing(3.2)},viewAllButton:{color:`#6098D1!important`,textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:`normal!important`,fontSize:`12px!important`,lineHeight:`16px!important`,marginRight:`24px!important`,letterSpacing:`-1.30385e-09px!important`},createFlowButton:{textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`12px!important`,lineHeight:`16px!important`,marginLeft:`0px!important`,padding:`6px 12px 6px 12px!important`,background:e.palette.background.paper,color:`#1871E8!important`,letterSpacing:`0.02857em`},viewDetailsButton:{textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`12px!important`,lineHeight:`16px!important`,background:e.palette.background.paper,color:`#6098D1!important`,letterSpacing:`0.02857em`},createBlankFlowButton:{display:`flex`,justifyContent:`center!important`,"& svg":{fill:`#555F7C!important`}},createBlankFlowLayout:{display:`flex`,flexDirection:`column`},lowercaseButton:{textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`14px!important`,lineHeight:`19px!important`,letterSpacing:`-1.30385e-09px!important`},text:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:400,fontSize:`16px!important`,lineHeight:`22px!important`,letterSpacing:`-1.30385e-09px!important`,color:`#2A323C!important`}})),Kvf=({goToTemplateList:e,handleOpenFlowNameDialog:t,setScreen:n,handleOpenTemplateDetails:r})=>{let i=K(),{classes:a}=Gvf(),[o,s]=(0,Hvf.useState)([]),[c,l]=(0,Hvf.useState)(0),u=G(Fv),[d,f]=(0,Hvf.useState)(!0),p=(e,t)=>{e.data[t].records&&s(e.data[t].records),l(Math.min(Wvf,e.data[t].records.length))};(0,Hvf.useEffect)(()=>{if(o.length){setTimeout(()=>{f(!1)},3e3);return}w9e(u,{isPublic:!0}).then(e=>{setTimeout(()=>{f(!1)},3e3),p(e,`flowTemplates`)}).catch(e=>{oD(`error fetching flow templates: ${JSON.stringify(e)}`)})},[p]);let m=e=>{n(Wb.TEMPLATES),i(bP({id:e.id,title:e.title})),r(!0)},h=e=>{t(e)};return(0,TP.jsxs)(`div`,{className:a.container,children:[(0,TP.jsxs)(B,{mt:2,mb:2,className:a.box,children:[(0,TP.jsx)(z,{"data-test":`flow-center-flows-table-populatTemplates`,className:a.text,style:{flexGrow:1},children:(0,TP.jsx)(J,{id:`os-flow-center.1v6wsw`,defaultMessage:[{type:0,value:`Popular Templates`}]})}),(0,TP.jsx)(V,{"data-test":`flow-center-template-gallery-viewAllTemplates`,size:`small`,className:a.viewAllButton,onClick:e,children:(0,TP.jsx)(J,{id:`os-flow-center.viewall`,defaultMessage:[{type:0,value:`View All`}]})})]}),(0,TP.jsx)(U,{"data-test":`flow-center-templates-on-flows-page`,container:!0,id:`flow-center-templates`,children:o.slice(0,c).map((e,t)=>(0,TP.jsx)(U,{"data-test":`flow-center-templatesGallery`,item:!0,xs:4,children:(0,TP.jsx)(Km,{className:a.cardRoot,id:`flow-center-template-card`,children:(0,TP.jsxs)(`div`,{className:a.cardContainer,children:[(0,TP.jsxs)(Jm,{className:a.cardContent,children:[(0,TP.jsxs)(`div`,{className:a.titleContent,children:[d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:80,height:15}):(0,TP.jsx)(z,{"data-test":`flow-center-flows-templateGallery-title`,className:a.title,gutterBottom:!0,onClick:()=>m(e),children:e?.title}),d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:80,height:15,sx:{mt:`5px`}}):(0,TP.jsx)(z,{"data-test":`flow-center-flows-templateGallery-subtitle`,className:a.subtitle,"aria-multiline":!0,variant:`body2`,component:`p`,children:e.subtitle})]}),(0,TP.jsx)(`div`,{className:a.veritoneCertifiedContainer,children:d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:120,height:15}):(0,TP.jsxs)(TP.Fragment,{children:[(0,TP.jsx)(`img`,{src:Bct,alt:`veritoneCertifiedIcon`}),(0,TP.jsx)(z,{"data-test":`flow-center-flows-templateGallery-veritoneCertified`,className:a.veritoneCertified,component:`p`,children:(0,TP.jsx)(J,{id:`os-flow-center.veritonecertified`,defaultMessage:[{type:0,value:`Veritone Certified`}]})})]})})]}),(0,TP.jsxs)(ige,{className:a.bottomButton,children:[d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:120,height:20}):(0,TP.jsx)(V,{"data-test":`flow-center-template-gallery-createFlowFromTemplate-${t}`,onClick:()=>h?h(e.id):``,id:`flow-center-create-flow-btn-${t}`,size:`small`,variant:`outlined`,color:`primary`,className:a.createFlowButton,children:(0,TP.jsx)(J,{id:`os-flow-center.createflow`,defaultMessage:[{type:0,value:`Create Flow`}]})}),d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:120,height:15}):(0,TP.jsx)(V,{"data-test":`flow-center-template-gallery-viewDetailsForTemplate-${t}`,onClick:()=>m(e),size:`small`,color:`primary`,className:a.viewDetailsButton,children:(0,TP.jsx)(J,{id:`os-flow-center.viewdetails`,defaultMessage:[{type:0,value:`View Details`}]})})]})]})})},e.title+t))})]})}}));function Jvf(e,t){if(e===void 0)return Yvf;switch(t.type){case`SET_LOCALE`:return{...e,locale:t.payload};case`SET_AUTHTOKEN`:return{...e,authToken:t.payload};case`SET_CONFIG`:return{...e,config:t.payload};case`FETCH_ENGINE_DISPATCHED`:return{...e,engineFetching:!0,engineFetchingFailed:!1,engineFetchingFailedReason:null,engine:null};case`FETCH_ENGINE_FAILED`:return{...e,engineFetching:!1,engineFetchingFailed:!0,engineFetchingFailedReason:t.payload,engine:null};case`FETCH_ENGINE_SUCCEEDED`:return{...e,engineFetching:!1,engineFetchingFailed:!1,engineFetchingFailedReason:null,engine:t.payload,engineDistrubutionType:t.payload.distributionType};case`FETCH_REVISIONS`:return{...e,engineRevisionsFetching:!0,engineRevisionsFetchingFailed:!1,engineRevisionsFetchingFailedReason:null,engineRevisions:null};case`FETCH_REVISIONS_FAILED`:return{...e,engineRevisionsFetching:!1,engineRevisionsFetchingFailed:!0,engineRevisionsFetchingFailedReason:t.payload,engineRevisions:null};case`FETCH_REVISIONS_SUCCEEDED`:return{...e,engineRevisionsFetching:!1,engineRevisionsFetchingFailed:!1,engineRevisionsFetchingFailedReason:null,engineRevisions:t.payload};case`FETCH_EXECUTIONS`:return{...e,fetchingExecutions:!0,executions:null,fetchExecutionsFail:null};case`FETCH_EXECUTIONS_FAIL`:return{...e,fetchingExecutions:!1,executions:null,fetchExecutionsFail:t.payload};case`FETCH_EXECUTIONS_SUCCEES`:return{...e,fetchingExecutions:!1,executions:t.payload,fetchExecutionsFail:null};case`FETCH_SCHEDULED_JOBS_DISPATCHED`:return{...e,scheduledJobsFetching:!0,scheduledJobsFailed:!1,scheduledJobsFailedReason:null,scheduledJobs:null};case`FETCH_SCHEDULED_JOBS_FAILED`:return{...e,scheduledJobsFetching:!1,scheduledJobsFailed:!0,scheduledJobsFailedReason:t.payload,scheduledJobs:null};case`FETCH_SCHEDULED_JOBS_SUCCEEDED`:return{...e,scheduledJobsFetching:!1,scheduledJobsFailed:!1,scheduledJobsFailedReason:null,scheduledJobs:t.payload};case`FETCH_JOBS_DISPATCHED`:return{...e,jobsFetching:!0,jobsFetchingFailed:!1,jobsFetchingFailedReason:null,jobsFetched:null};case`FETCH_JOBS_FAILED`:return{...e,jobsFetching:!1,jobsFetchingFailed:!0,jobsFetchingFailedReason:t.payload,jobsFetched:null};case`FETCH_JOBS_SUCCEEDED`:return{...e,jobsFetching:!1,jobsFetchingFailed:!1,jobsFetchingFailedReason:null,jobsFetched:t.payload};case`UPDATE_FLOW_REVISION_DESCRIPTION`:return{...e,flowRevisionDescriptionUpdating:!0,flowRevisionDescriptionUpdateFailed:!1,flowRevisionDescriptionUpdateFailedReason:null,flowRevisionDescriptionUpdate:null};case`UPDATE_FLOW_REVISION_DESCRIPTION_FAILED`:return{...e,flowRevisionDescriptionUpdating:!1,flowRevisionDescriptionUpdateFailed:!0,flowRevisionDescriptionUpdateFailedReason:t.payload,flowRevisionDescriptionUpdate:null};case`UPDATE_FLOW_REVISION_DESCRIPTION_SUCCEEDED`:return{...e,flowRevisionDescriptionUpdating:!1,flowRevisionDescriptionUpdateFailed:!1,flowRevisionDescriptionUpdateFailedReason:null,flowRevisionDescriptionUpdate:t.payload};case`CLEAN_UPDATE_FLOW_REVISION_DESCRIPTION`:return{...e,flowRevisionDescriptionUpdating:!1,flowRevisionDescriptionUpdateFailed:!1,flowRevisionDescriptionUpdateFailedReason:null,flowRevisionDescriptionUpdate:null};case`RESTORE_THIS_REVISION`:return{...e,restoreThisRevisionInProgress:!0,restoreThisRevisionFailed:!1,restoreThisRevisionFailedReason:null,restoreThisRevisionResult:null};case`RESTORE_THIS_REVISION_FAILED`:return{...e,restoreThisRevisionInProgress:!1,restoreThisRevisionFailed:!0,restoreThisRevisionFailedReason:t.payload,restoreThisRevisionResult:null};case`RESTORE_THIS_REVISION_SUCCEEDED`:return{...e,restoreThisRevisionInProgress:!1,restoreThisRevisionFailed:!1,restoreThisRevisionFailedReason:null,restoreThisRevisionResult:t.payload};case`CLEAN_RESTORE_THIS_REVISION_SUCCEEDED`:return{...e,restoreThisRevisionInProgress:!1,restoreThisRevisionFailed:!1,restoreThisRevisionFailedReason:null,restoreThisRevisionResult:null};case`COPY_FLOW`:return{...e,copyFlowInProgress:!0,copyFlowFailed:!1,copyFlowFailedReason:null,copyFlowResult:null};case`COPY_FLOW_FAILED`:return{...e,copyFlowInProgress:!1,copyFlowFailed:!0,copyFlowFailedReason:t.payload,copyFlowResult:null};case`COPY_FLOW_SUCCEEDED`:return{...e,copyFlowInProgress:!1,copyFlowFailed:!1,copyFlowFailedReason:null,copyFlowResult:t.payload};case`CLEAN_COPY_FLOW`:return{...e,copyFlowInProgress:!1,copyFlowFailed:!1,copyFlowFailedReason:null,copyFlowResult:null};case`FLOW_RESUME_ACTION`:return{...e,flowResumeInProgress:!0,flowResumeFailed:!1,flowResumeFailedReason:null,flowResumeResult:null};case`FLOW_RESUME_ACTION_FAILED`:return{...e,flowResumeInProgress:!1,flowResumeFailed:!0,flowResumeFailedReason:t.payload,flowResumeResult:null};case`FLOW_RESUME_ACTION_SUCCEEDED`:return{...e,flowResumeInProgress:!1,flowResumeFailed:!1,flowResumeFailedReason:null,flowResumeResult:t.payload};case`CLEAN_FLOW_RESUME_ACTION`:return{...e,flowResumeInProgress:!1,flowResumeFailed:!1,flowResumeFailedReason:null,flowResumeResult:null};case`FLOW_PAUSE_ACTION`:return{...e,flowPauseInProgress:!0,flowPauseFailed:!1,flowPauseFailedReason:null,flowPauseResult:null};case`FLOW_PAUSE_ACTION_FAILED`:return{...e,flowPauseInProgress:!1,flowPauseFailed:!0,flowPauseFailedReason:t.payload,flowPauseResult:null};case`FLOW_PAUSE_ACTION_SUCCEEDED`:return{...e,flowPauseInProgress:!1,flowPauseFailed:!1,flowPauseFailedReason:null,flowPauseResult:t.payload};case`CLEAN_FLOW_PAUSE_ACTION`:return{...e,flowPauseInProgress:!1,flowPauseFailed:!1,flowPauseFailedReason:null,flowPauseResult:null};case`SET_ENGINE_DISTRIBUTION_TYPE_ACTION`:return{...e,engineDistrubutionType:t.payload};default:return e}}var Yvf,Xvf=s((()=>{Yvf={locale:`he`,engine:null,engineDistrubutionType:null}})),Zvf,Qvf=s((()=>{Xvf(),Zvf=Jvf}));function $vf(e,t){if(e===void 0)return eyf;switch(t.type){case`SET_LOCALE`:return{...e,locale:t.payload};case`SET_AUTHTOKEN`:return{...e,authToken:t.payload};default:return e}}var eyf,tyf=s((()=>{eyf={locale:`he`}})),nyf,ryf=s((()=>{tyf(),nyf=$vf}));function iyf(e,t){if(e===void 0)return ayf;switch(t.type){case`SET_CONFIG`:return{...e,config:t.payload};case`SET_CONFIG_PARAMS`:return{...e,params:t.payload};case`FETCH_ME_LOADING`:return{...e,me:null,meFetchingFailed:null,meFetchingLoading:!0};case`FETCH_ME_FAILED`:return{...e,me:null,meFetchingFailed:t.payload,meFetchingLoading:!1};case`FETCH_ME_SUCCEEDED`:return{...e,me:t.payload,meFetchingFailed:null,meFetchingLoading:!1};case`SET_IS_REVISIONS_EXIST_ON_SERVER`:return{...e,isRevisionsExistOnServer:t.payload};case`FETCH_ORG_USERS`:return{...e,orgUsersFetching:!0,orgUsersFetchingFailed:!1,orgUsersFetchingFailedReason:null,users:null};case`FETCH_ORG_USERS_FAILED`:return{...e,orgUsersFetching:!1,orgUsersFetchingFailed:!0,orgUsersFetchingFailedReason:t.payload,users:null};case`FETCH_ORG_USERS_SUCCEEDED`:return{...e,orgUsersFetching:!1,orgUsersFetchingFailed:!1,orgUsersFetchingFailedReason:null,users:t.payload};default:return e}}var ayf,oyf=s((()=>{ayf={isRevisionsExistOnServer:!1}})),syf,cyf=s((()=>{oyf(),syf=iyf})),lyf,uyf,dyf=s((()=>{X(),lyf=async(e,t,n)=>$v({query:uyf,graphEndpoint:t,token:n,variables:{flowId:e}}),uyf=`
3255
+ `,zhf=()=>{let e=QA(),[t]=nj(),{config:n,tosFile:r,privacyPolicyUrl:i,registerUri:a}=JN(),o=(0,mP.useRef)(null),[s,c]=(0,mP.useState)({content:``,fileType:`unknown`}),[l,u]=(0,mP.useState)(!1),d=async()=>{let n=decodeURIComponent(t.get(`email`)),i=decodeURIComponent(t.get(`token`)),o=decodeURIComponent(t.get(`referer`)),s=decodeURIComponent(t.get(`userId`)),c=decodeURIComponent(t.get(`redirect`)),l=()=>{if(c&&rlf(c))window.location.href=c;else{let e=_N()?_N()+`/api/admin/switch-app`:gN().switchAppUrl;window.location.href=e+`/default`}};if(o===`login`&&!r){l();return}if(o===`login`&&r?.fileId)try{if((await auf(i,s,r.fileId,new Date().toUTCString())).errors){alert(`Something went wrong while saving your terms of service acceptance`);return}l();return}catch(e){console.error(`Error updating user setting:`,e)}e({pathname:`${a}/join`,search:`?email=${encodeURIComponent(n)}&token=${encodeURIComponent(i)}`})};return(0,mP.useEffect)(()=>{s.fileType===`unknown`&&(async()=>{if(r?.url){u(!0);try{c(await Lhf(r.url,s.fileType))}catch(e){console.error(`Error loading content:`,e)}finally{u(!1)}}})()},[r,s]),(0,mP.useEffect)(()=>{o.current&&(o.current.srcdoc=Rhf(s.content,s.fileType))},[s]),(0,mP.useEffect)(()=>{let n=t.has(`email`),i=t.has(`token`);!n&&!i?e(a):n&&i&&!r&&d()},[t,r]),(0,hP.jsxs)(H,{gap:3,sx:{width:`750px`,position:`relative`,left:`50%`,transform:`translateX(-50%)`},children:[l?(0,hP.jsx)(B,{sx:{display:`flex`,justifyContent:`center`},children:(0,hP.jsx)(Qm,{})}):r&&(0,hP.jsx)(B,{children:(0,hP.jsx)(`iframe`,{ref:o,title:r.name,style:Ihf.iframeStyles,...Ihf.iframe})}),i&&(0,hP.jsx)(z,{variant:`body2`,textAlign:`center`,component:`a`,target:`_blank`,href:i.url,sx:Ihf.privacyPolicy,"data-testid":`os-auth-register-privacy-policy`,children:`Privacy Policy`}),(0,hP.jsx)(B,{sx:Ihf.buttonContainer,children:(0,hP.jsx)(SN,{text:`Accept & Continue`,type:`button`,onClick:d,buttonColor:n?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:n?.uiSettings?.registrationButtonStyle?.textColor,testId:`os-auth-register-accept-continue-button`})})]})}})),Vhf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z`}),`FileDownloadOutlined`)})),Hhf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)([(0,r.jsx)(`path`,{d:`M19 8h-1V3H6v5H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zM8 5h8v3H8V5zm8 12v2H8v-4h8v2zm2-2v-2H6v2H4v-4c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v4h-2z`},`0`),(0,r.jsx)(`circle`,{cx:`18`,cy:`11.5`,r:`1`},`1`)],`PrintOutlined`)})),Uhf,Whf,Ghf,gP,Khf,qhf,Jhf,Yhf=s((()=>{W(),Uhf=d(m()),Whf=d(Vhf()),Ghf=d(Hhf()),YN(),gP=L(),Khf=async e=>{let t=e.toLowerCase();if(t.endsWith(`.pdf`)||t.includes(`.pdf?`))return`pdf`;if(t.endsWith(`.txt`)||t.endsWith(`.text`)||t.endsWith(`.html`))return`text`;try{let t=(await fetch(e,{method:`HEAD`})).headers.get(`content-type`)||``;if(t.includes(`pdf`))return`pdf`;if(t.includes(`text`)||t.includes(`html`))return`text`}catch(e){return console.error(`Error detecting file type:`,e),`pdf`}return`pdf`},qhf=async e=>{try{let t=await fetch(e);if(!t.ok)throw Error(`HTTP error! status: ${t.status}`);return await t.text()}catch(e){throw console.error(`Error fetching text content:`,e),e}},Jhf=()=>{let{tosFile:e}=JN(),[t,n]=(0,Uhf.useState)({content:``,fileType:`unknown`}),[r,i]=(0,Uhf.useState)(!1),[a,o]=(0,Uhf.useState)(null);return(0,Uhf.useEffect)(()=>{(async()=>{if(!(!e?.url||a===e.url)){i(!0);try{await Khf(e.url)===`pdf`?n({content:e.url,fileType:`pdf`}):n({content:await qhf(e.url),fileType:`text`}),o(e.url)}catch(t){console.error(`Error loading terms content:`,t),n({content:e.url,fileType:`pdf`}),o(e.url)}finally{i(!1)}}})()},[e?.url,a]),e?(0,gP.jsxs)(B,{sx:{width:`100%`,mb:3},children:[(0,gP.jsxs)(H,{direction:`row`,justifyContent:`space-between`,alignItems:`center`,sx:{mb:1},children:[(0,gP.jsx)(z,{sx:{color:`#212121`,fontSize:`12px`,fontFamily:`Nunito`},children:`Terms & Conditions`}),(0,gP.jsxs)(H,{direction:`row`,spacing:1,children:[(0,gP.jsx)(Xf,{size:`small`,onClick:()=>{e?.url&&window.open(e.url,`_blank`)},disabled:r,"aria-label":`Download Terms & Conditions`,sx:{color:`#555F7C`},"data-testid":`os-auth-register-terms-and-conditions-download-button`,children:(0,gP.jsx)(Whf.default,{})}),(0,gP.jsx)(Xf,{size:`small`,onClick:()=>{if(t.fileType===`pdf`&&t.content){let e=window.open(t.content,`_blank`);e&&(e.onload=()=>{e.print()})}else if(t.content){let e=window.open(``,`_blank`);if(e){let{document:n}=e;n.title=`Terms & Conditions`;let r=n.createElement(`style`);r.textContent=`body { font-family: Arial, sans-serif; padding: 20px; line-height: 1.6; } pre { white-space: pre-wrap; }`,n.head&&n.head.appendChild(r);let i=n.createElement(`h1`);i.textContent=`Terms & Conditions`;let a=n.createElement(`pre`);a.textContent=t.content,n.body&&(n.body.appendChild(i),n.body.appendChild(a)),e.focus(),e.print()}}},disabled:r||!t.content,"aria-label":`Print Terms & Conditions`,sx:{color:`#555F7C`},"data-testid":`os-auth-register-terms-and-conditions-print-button`,children:(0,gP.jsx)(Ghf.default,{})})]})]}),(0,gP.jsx)(B,{sx:{width:`100%`,height:`200px`,border:`1px solid #E0E0E0`,borderRadius:`6px`,overflowY:t.fileType===`pdf`?`hidden`:`auto`,overflowX:`hidden`,padding:t.fileType===`pdf`?0:2,backgroundColor:`#FAFAFA`},children:r?(0,gP.jsx)(B,{sx:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100%`},children:(0,gP.jsx)(Qm,{size:24})}):t.fileType===`pdf`?(0,gP.jsx)(B,{component:`iframe`,src:t.content,sx:{width:`100%`,height:`100%`,border:`none`,borderRadius:`6px`},title:`Terms & Conditions PDF`}):t.content?(0,gP.jsx)(z,{variant:`body2`,component:`pre`,sx:{whiteSpace:`pre-wrap`,wordWrap:`break-word`,fontFamily:`inherit`,margin:0,lineHeight:1.6},children:t.content}):(0,gP.jsx)(z,{variant:`body2`,color:`#212121`,children:`Unable to load terms content.`})})]}):null}})),Xhf,Zhf,Qhf,$hf=s((()=>{Xhf=d(m(),1),Zhf=`GoogleReCaptcha Context has not yet been implemented, if you are using useGoogleReCaptcha hook, make sure the hook is called inside component wrapped by GoogleRecaptchaProvider`,Qhf=(0,Xhf.createContext)({instance:void 0,siteKey:``,language:``,isLoading:!0,executeV3:()=>{throw Error(Zhf)},executeV2Invisible:()=>{throw Error(Zhf)},reset:()=>{throw Error(Zhf)},getResponse:()=>{throw Error(Zhf)},render:()=>{throw Error(Zhf)}})})),egf,tgf,ngf=s((()=>{$hf(),egf=d(m(),1),tgf=()=>(0,egf.useContext)(Qhf)})),rgf,igf=s((()=>{rgf=()=>!!document.querySelector(`script[src*="/recaptcha/"]:not([src*="gstatic"])`)})),agf,ogf=s((()=>{agf=()=>`.grecaptcha-badge{display: none !important;}`})),sgf,cgf=s((()=>{sgf=({host:e=`google.com`,isEnterprise:t=!1,render:n,hl:r,badge:i})=>{let a=new URLSearchParams({...r&&{hl:r},...i&&{badge:i},render:n});return`https://www.${e}/recaptcha/${t?`enterprise.js`:`api.js`}?${a}`}})),lgf,ugf=s((()=>{ogf(),lgf=()=>{let e=document.createElement(`style`);e.innerHTML=agf(),document.body.appendChild(e)}})),dgf,fgf=s((()=>{cgf(),dgf=({onload:e,appendTo:t=`head`,isEnterprise:n=!1,host:r,render:i,badge:a,hl:o,...s})=>{let c=sgf({host:r,isEnterprise:n,render:i,hl:o,badge:a}),l=document.createElement(`script`);Object.entries(s).forEach(([e,t])=>{l.setAttribute(e,t?.toString()??``)}),l.src=c,l.onload=e,document[t].appendChild(l)}})),pgf,mgf=s((()=>{pgf=()=>{let e=document.querySelector(`.grecaptcha-badge`);e&&e.parentNode&&document.body.removeChild(e.parentNode)}})),hgf,ggf=s((()=>{hgf=e=>{let t=document.getElementById(e);if(t)for(;t.lastChild;)t.lastChild.remove()}})),_gf,vgf,ygf=s((()=>{_gf=`https://www.gstatic.com/recaptcha/releases`,vgf=()=>{window.___grecaptcha_cfg=void 0;let e=document.querySelector(`script[src*="/recaptcha/"]:not([src*="gstatic"])`);e&&e.remove();let t=document.querySelector(`script[src^="${_gf}"]`);t&&t.remove()}})),bgf=s((()=>{igf(),ugf(),fgf(),mgf(),ggf(),ygf()})),xgf,Sgf,Cgf,wgf,Tgf=s((()=>{ngf(),bgf(),xgf=d(m(),1),Sgf=L(),Cgf=`google-recaptcha-badge-container`,wgf=({id:e=Cgf,theme:t,language:n,badge:r=`bottomright`,onChange:i,onError:a,onExpired:o})=>{let s=(0,xgf.useRef)(null),c=tgf(),l=t??c.theme,u=n??c.language;return(0,xgf.useEffect)(()=>{if(!c.render)return;let t=document.createElement(`div`),n={sitekey:c.siteKey,badge:r,size:`invisible`,callback:i,"expired-callback":o,"error-callback":a,theme:l,...u&&{hl:u}};return c.render(t,n),s.current&&s.current.appendChild(t),()=>{hgf(e)}},[c.render,c.siteKey,r,i,a,o,l,u]),!c.render||!c.siteKey?null:(0,Sgf.jsx)(`div`,{ref:s,id:e})}})),Egf,Dgf,Ogf=s((()=>{Egf=d(m(),1),Dgf=(e=!1)=>{let[t,n]=(0,Egf.useState)(e);return[t,e=>n(t=>e??!t)]}})),kgf=s((()=>{Ogf()})),Agf,jgf,Mgf,Ngf,Pgf,Fgf=s((()=>{$hf(),bgf(),Agf=d(m(),1),jgf=L(),kgf(),Mgf=`onGoogleReCaptchaLoad`,Ngf=`google-recaptcha-container`,Pgf=({type:e,siteKey:t,language:n,scriptProps:r,isEnterprise:i=!1,host:a,theme:o=`light`,children:s,explicit:c,onLoad:l,onError:u})=>{let[d,f]=Dgf(!0),p=(0,Agf.useRef)(void 0);(0,Agf.useEffect)(()=>{let s=r?.id??`google-recaptcha-${e}-script`,d=rgf();try{let m=()=>{f(!0);let n=i?window.grecaptcha?.enterprise:window.grecaptcha;if(!n){u?.(),f(!1);return}if(c||n.ready(async()=>{p.current=n,await l?.(n),f(!1)}),c){let r={size:e===`v3`||e===`v2-invisible`?`invisible`:`normal`,...(e===`v3`||e===`v2-invisible`)&&{badge:`bottomright`},sitekey:t,theme:o,...typeof c==`object`&&{...c,"expired-callback":c.expiredCallback,"error-callback":c.errorCallback}};d||typeof c==`object`&&(e===`v3`||e===`v2-invisible`)&&c?.badge===`hidden`&&lgf(),n.ready(async()=>{typeof c==`object`&&c.container&&n.render(c.container,r,!!c.inherit),p.current=n,l&&await l(n),f(!1)})}};return window[Mgf]=m,d?m():dgf({isEnterprise:i,host:a,...(e===`v3`||e===`v2-invisible`)&&typeof c==`object`&&c?.badge&&{badge:c?.badge===`hidden`?`bottomright`:c?.badge},...n&&{hl:n},render:c||e===`v2-checkbox`?`explicit`:t,...r,onload:m,id:s}),()=>{rgf()&&vgf(),typeof c==`object`&&(e===`v3`||e===`v2-invisible`)&&!c?.container&&c?.badge?hgf(Ngf):pgf()}}catch{f(!1)}},[i,n,a,t,e]);let m=e=>{if(!p.current?.execute)throw Error(`Google ReCaptcha has not been loaded`);return p.current.execute(t,{action:e})},h=e=>{if(!p.current?.execute)throw Error(`Google ReCaptcha has not been loaded`);return p.current.execute(e)},g=(0,Agf.useMemo)(()=>({instance:p.current,siteKey:t,isLoading:d,theme:o,executeV2Invisible:h,executeV3:m,reset:p.current?.reset,getResponse:p.current?.getResponse,render:p.current?.render,...n&&{language:n}}),[t,d,n]);return(0,jgf.jsx)(Qhf.Provider,{value:g,children:s})}})),Igf=s((()=>{ngf(),Tgf(),Fgf()}));function Lgf(){let{config:e,tosFile:t}=JN(),n=!!t?.url,r=Opf(),{executeV2Invisible:i,reset:a}=tgf(),o=(0,_P.useRef)(null),s=(0,_P.useCallback)(e=>{o.current?.(e),o.current=null},[]),{onSubmit:c,errorMessage:l,setErrorMessage:u}=Hgf({getRecaptchaToken:(0,_P.useCallback)(()=>new Promise((e,t)=>{if(!i){t(Error(`reCAPTCHA is not ready`));return}o.current=n=>{if(!n){t(Error(`reCAPTCHA returned an empty token`));return}e(n)},i()}),[i]),onRegistrationFailure:(0,_P.useCallback)(()=>a?.(),[a])}),d=[{fieldKey:`firstName`,title:`First Name`,type:`text`,required:!0},{fieldKey:`lastName`,title:`Last Name`,type:`text`,required:!0},{fieldKey:`company`,title:`Company`,type:`text`,required:!0},{fieldKey:`email`,title:`Email`,type:`text`,required:!0},{fieldKey:`password`,title:`Password`,type:`password`,required:!0},{fieldKey:`confirmPassword`,title:`Confirm Password`,type:`password`,required:!0}],f=qc(od().breakpoints.down(`md`)),p=qc(`(max-height: 800px)`);return(0,vP.jsxs)(B,{sx:{width:mdf,...(f||p)&&{height:`588px`,overflowY:`auto`,overflowX:`hidden`,paddingTop:1}},children:[(0,vP.jsx)(mMd,{htmlFormId:Rgf,schema:e?.uiSettings?.customRegistrationFields,additionalFields:d,passwordPolicy:e?.uiSettings?.passwordPolicy,renderFormActions:({isSubmitting:t,isValid:i,htmlFormId:a})=>(0,vP.jsxs)(H,{gap:2,children:[(0,vP.jsx)(Jhf,{}),(0,vP.jsx)(Slf,{hasTos:n,loading:r.isPending,isSubmitting:t,disabled:!i,buttonColor:e?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:e?.uiSettings?.registrationButtonStyle?.textColor,htmlForm:a})]}),onSubmit:c,sx:{width:`100%`}}),(0,vP.jsx)(wgf,{badge:`inline`,onChange:s,style:{display:`none`}}),l&&(0,vP.jsx)(Vpf,{open:!!l,message:l,onClose:()=>u(null)})]})}var _P,vP,Rgf,zgf,Bgf,Vgf,Hgf,Ugf=s((()=>{_P=d(m()),ij(),SO(),Igf(),YN(),CN(),W(),LN(),yN(),Yhf(),Hpf(),vP=L(),Rgf=`registration-join-form`,zgf=()=>{let e=tlf();return e?(0,vP.jsx)(Pgf,{type:`v2-invisible`,siteKey:e,children:(0,vP.jsx)(Lgf,{})}):(oD(Error(`Registration recaptcha site key is not configured`)),(0,vP.jsx)(B,{sx:{width:mdf},children:(0,vP.jsx)(np,{severity:`error`,children:`Registration is unavailable due to a configuration issue. Please contact support.`})}))},Bgf=new Map([[`registration_not_approved`,QN.RegistrationNotApproved],[`account_exists`,QN.AccountExists],[`registration_configuration_invalid`,QN.RegistrationConfigurationInvalid]]),Vgf=({status:e,code:t,message:n})=>{if(t){let e=Bgf.get(t);if(e)return $N[e];if(typeof n==`string`&&n)return{description:n}}switch(e){case 401:return $N[QN.CaptchaError];case 400:return $N[QN.RegistrationError];case 409:return $N[QN.InviteExists];default:return $N[QN.EnvError]}},Hgf=({getRecaptchaToken:e,onRegistrationFailure:t})=>{let n=QA(),[r]=nj(),{config:i,registerUri:a}=JN(),o=Opf(),[s,c]=(0,_P.useState)(null);return{onSubmit:(0,_P.useCallback)(async s=>{try{let l=i.id,u=i.slug,d=i?.adminApprovalRequired??!1,f=r.get(`email`),p=s?.email||(f?decodeURIComponent(f):``),m=i?.allowedDomains??[];if(m.length>0&&p){let e=p.split(`@`)[1]?.toLowerCase();if(!m.some(t=>t.toLowerCase()===e)){c({title:`Email Domain Not Allowed`,description:`Please use an email address from one of the allowed domains: ${m.join(`, `)}`});return}}let h=s?.firstName??``,g=s?.lastName??``,_=s?.password??``,v=new Set([`firstName`,`lastName`,`email`,`password`,`confirmPassword`]),y=i?.uiSettings?.customRegistrationFields?.properties??{},b=Object.keys(s).reduce((e,t)=>{if(!v.has(t)){let n=s[t];y[t]?.type===`number`&&isFinite(Number(n))?e[t]=Number(n):e[t]=n}return e},{}),x=await e(),S=await o.mutateAsync({slug:u,orgRegistrationId:l,email:p,customFields:b,firstName:h,lastName:g,password:_,captchaResponse:x});if(S?.status===201){let e=[`approved`,`submitted`].includes(S.inviteStatus??``)?S.inviteStatus:d?`submitted`:`approved`;n({pathname:`${a}/success`,search:`?status=${e}&email=${encodeURIComponent(p)}`})}else c(Vgf(S)),t?.()}catch(e){oD(e),c($N[QN.EnvError]),t?.()}},[i,e,n,t,a,r,o]),errorMessage:s,setErrorMessage:c}}})),Wgf,Ggf,Kgf=s((()=>{ij(),vw(),YN(),LN(),ndf(),xN(),Wgf=L(),Ohf(),Fhf(),Bhf(),Yhf(),Ugf(),Ggf=()=>{let{config:e,isLoading:t}=JN(),n=QC({defaultValues:{email:``,acceptedTos:!1}}),r=CQd(`/ui/auth/signup/:slug/success`),i=()=>{let t=e?.name?.trim();return t?`Welcome to ${t} Registration`:`Welcome to Registration`};return t?(0,Wgf.jsx)(tdf,{}):(0,Wgf.jsx)(uw,{...n,children:(0,Wgf.jsxs)(IN,{loginConfigs:{name:e?.name??``,logo:e?.uiSettings?.logo,buttonColor:e?.uiSettings?.registrationButtonStyle?.backgroundColor,buttonTextColor:e?.uiSettings?.registrationButtonStyle?.textColor,hideVeritoneBranding:e?.uiSettings?.veritoneBranding},children:[!r&&(0,Wgf.jsx)(bN,{text:i(),type:`register`,subText:`Please enter the information you would like associated with your account and accept our Terms & Conditions. This is the first step on your way to exploring all of the amazing content we have to offer!`,sx:{textAlign:`left`,fontWeight:`700`,fontSize:`16px`},subTextSx:{textAlign:`left`,fontSize:`12px`}}),(0,Wgf.jsx)(BQd,{})]})})}})),yP,qgf,Jgf,Ygf=s((()=>{ij(),Wpf(),qpf(),Xpf(),Qpf(),tmf(),imf(),wmf(),Omf(),Pmf(),Bmf(),Gmf(),ehf(),chf(),_hf(),Thf(),Kgf(),yP=L(),qgf=()=>{let{slug:e}=DQd(),t=ZA(),n=t.pathname.split(`/`),r=n.findIndex(e=>e===`register`),i=n.slice(r+(e?2:1)).join(`/`),a=`../signup`;e&&(a+=`/${e}`),i&&(a+=`/${i}`);let o=t.search;return(0,yP.jsx)(zQd,{to:a+o,replace:!0})},Jgf=({aiwareInit:e,allowVanityDomain:t=!1,onLoginSuccess:n})=>(0,yP.jsxs)(HQd,{children:[(0,yP.jsx)($A,{path:`/login`,element:(0,yP.jsx)(Upf,{allowVanityDomain:t,onLoginSuccess:n})}),(0,yP.jsx)($A,{path:`/login/:slug`,element:(0,yP.jsx)(Upf,{allowVanityDomain:t,onLoginSuccess:n})}),(0,yP.jsx)($A,{path:`/forgot`,element:(0,yP.jsx)(Kpf,{})}),(0,yP.jsx)($A,{path:`/forgot/:slug`,element:(0,yP.jsx)(Kpf,{})}),(0,yP.jsx)($A,{path:`/sign-up`,element:(0,yP.jsx)(zQd,{to:`../signup`,replace:!0})}),(0,yP.jsx)($A,{path:`/register`,element:(0,yP.jsx)(zQd,{to:`../signup`,replace:!0})}),(0,yP.jsx)($A,{path:`/register/:slug/*`,element:(0,yP.jsx)(qgf,{})}),(0,yP.jsx)($A,{path:`/signup`,element:(0,yP.jsx)(Cmf,{})}),(0,yP.jsx)($A,{path:`/signup/verify`,element:(0,yP.jsx)(ihf,{})}),(0,yP.jsx)($A,{path:`/signup/review`,element:(0,yP.jsx)(phf,{})}),(0,yP.jsx)($A,{path:`/signup/trial/verify`,element:(0,yP.jsx)(xhf,{})}),(0,yP.jsxs)($A,{path:`/signup/:slug/*`,element:(0,yP.jsx)(Ggf,{}),children:[(0,yP.jsx)($A,{path:`join`,element:(0,yP.jsx)(zgf,{})}),(0,yP.jsx)($A,{path:`success`,element:(0,yP.jsx)(Xmf,{})}),(0,yP.jsx)($A,{index:!0,element:(0,yP.jsx)(Dhf,{})}),(0,yP.jsx)($A,{path:`confirm`,element:(0,yP.jsx)(Mhf,{})}),(0,yP.jsx)($A,{path:`terms-of-service`,element:(0,yP.jsx)(zhf,{})})]}),(0,yP.jsx)($A,{path:`/plans`,element:(0,yP.jsx)(Nmf,{})}),(0,yP.jsx)($A,{path:`/payment-result`,element:(0,yP.jsx)(zmf,{})}),(0,yP.jsx)($A,{path:`/restricted-provider`,element:(0,yP.jsx)(Ypf,{})}),(0,yP.jsx)($A,{path:`/link-oid`,element:(0,yP.jsx)(Zpf,{})}),(0,yP.jsx)($A,{path:`/reset-password/success`,element:(0,yP.jsx)(rmf,{})}),(0,yP.jsx)($A,{path:`/reset-password`,element:(0,yP.jsx)(emf,{})}),(0,yP.jsx)($A,{path:`/activate`,element:(0,yP.jsx)(Dmf,{})}),(0,yP.jsx)($A,{path:`/logout`,element:(0,yP.jsx)(Wmf,{aiwareInit:e})})]})})),Xgf=l({AuthRoutes:()=>Jgf,ResetPassword:()=>Muf,getConfig:()=>gN,getRestApiUrlFromConfig:()=>_N}),Zgf=s((()=>{Nuf(),Ygf(),yN()}));function*Qgf(){let e=yield F(Fv);yield At(m_f,function*(t){let n=yield D9e(t.payload.ids,e);n!==void 0&&(yield N(R_f(n)))})}function*$gf(){yield At(a_f,function*(e){yield N(N_f(!0));let t=yield F(Fv),n;switch(e.payload.ownerType){case Wb.ORGANIZATION:n=yield T9e({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t});break;case Wb.MINE:n=yield T9e({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t});break;case Wb.SHARED:n=yield T9e({name:e.payload.name,owned:!1,offset:0,limit:300,authToken:t});break;case Wb.NOTEBOOKS:n=yield T9e({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t,isNotebook:!0});break;default:break}n!==void 0&&n&&(n.data.engines.records.length===0&&!e.payload.name&&(yield N($_f(!0))),e.payload.ownerType===Wb.NOTEBOOKS?yield N(G_f(n.data.engines.records)):yield N(W_f(n.data.engines.records))),yield N(J_f(!1)),yield N(N_f(!1))})}function*e_f(){yield At(C_f,function*(e){let t=yield F(Fv),n=yield T9e({name:e.payload.name,owned:!0,offset:0,limit:300,authToken:t,isNotebook:!0});n!==void 0&&n&&(yield N(G_f(n.data.engines.records))),yield N(J_f(!1))})}function*t_f(){yield At(E_f,function*(){let e=yield P(w9e,yield F(Fv),{isPublic:!0,limit:200});e&&e.data&&e.data.flowTemplates&&e.data.flowTemplates.records&&e.data.flowTemplates.records.length>0&&(yield N(I_f(e.data.flowTemplates.records)),yield N(L_f(e.data.flowTemplates.records)))})}function*n_f(){yield At(s_f,function*(){let e,t=yield F(Fv);try{e=yield P(O9e,t)}catch{yield N({type:c_f,payload:!1})}(0,i_f.get)(e,`data.flowRevisions`,``)&&(yield N({type:c_f,payload:!0}))})}function*r_f(){yield Oe([Qgf(),e_f(),$gf(),t_f(),n_f()])}var i_f,a_f,o_f,s_f,c_f,l_f,u_f,d_f,f_f,p_f,m_f,h_f,g_f,__f,v_f,y_f,b_f,x_f,S_f,C_f,w_f,T_f,E_f,D_f,O_f,k_f,A_f,j_f,M_f,N_f,P_f,bP,F_f,I_f,L_f,R_f,z_f,B_f,V_f,H_f,xP,U_f,W_f,G_f,K_f,q_f,J_f,Y_f,X_f,Z_f,Q_f,SP,$_f,evf,tvf,CP=s((()=>{hv(),It(),Kb(),X(),i_f=d(xb()),a_f=`flow-center/FETCH_FLOWS`,o_f=`flow-center/ADD_NEW_FLOW`,s_f=`flow-center/IS_REVISIONS_EXIST_ON_SERVER`,c_f=`flow-center/SET_IS_REVISIONS_EXIST_ON_SERVER`,l_f=`flow-center/SET_FETCHING_FLOWS`,u_f=`flow-center/SET_OPEN_TEMPLATE`,d_f=`flow-center/SET_TEMPLATE_SELECTED`,f_f=`flow-center/SET_TEMPLATES`,p_f=`flow-center/SET_FILTERED_TEMPLATES_ACTION`,m_f=`flow-center/FETCH_TAGS`,h_f=`flow-center/SET_TAGS`,g_f=`flow-center/SET_TAGS_TO_STORE`,__f=`flow-center/SET_CATEGORIES`,v_f=`flow-center/SET_TEMPLATES_AUTHORS`,y_f=`flow-center/SET_SELECTED_FILTERS`,b_f=`flow-center/SET_TAG`,x_f=`flow-center/SET_FLOWS`,S_f=`flow-center/SET_NOTEBOOKS`,C_f=`flow-center/FETCH_NOTEBOOKS`,w_f=`flow-center/TOGGLE_IS_SEARCHING`,T_f=`flow-center/TOGGLE_IS_SEARCHING_LOADING`,E_f=`flow-center/SEARCH_TEMPLATES`,D_f=`flow-center/SET_SEARCHED`,O_f=`flow-center/SET_SEARCHED_TEMPLATES`,k_f=`flow-center/SET_CONFIG`,A_f=`flow-center/TOGGLE_STATE_CREATE_NEW_FLOW`,j_f=`flow-center/SET_SHOULD_CREATE_INITIAL_FLOWS`,M_f=`flow-center/GET_NODE_RED_VERSION_EDGE`,N_f=fv(l_f),P_f=fv(s_f),bP=fv(u_f),F_f=fv(d_f),I_f=fv(f_f),L_f=fv(p_f),fv(m_f),R_f=fv(h_f),z_f=fv(g_f),B_f=fv(__f),V_f=fv(v_f),H_f=fv(y_f),fv(b_f),xP=fv(a_f),U_f=fv(C_f),W_f=fv(x_f),G_f=fv(S_f),K_f=fv(o_f),q_f=fv(w_f),J_f=fv(T_f),Y_f=fv(E_f),X_f=fv(D_f),Z_f=fv(O_f),Q_f=fv(k_f),SP=fv(A_f),$_f=fv(j_f),fv(M_f),evf=ZWe({flows:[],notebooks:[],shouldCreateInitialFlows:!1,fetchingFlows:!1,templateToOpen:{},isTemplateSelected:!1,tags:[],categories:[],templatesAuthors:[],templates:[],filteredTemplates:[],selectedFilters:{},isSearching:!1,isSearchingLoading:!1,searched:``,searchedTemplates:null,config:{isFullScreen:!1,automateFullScreen:!1,zIndex:0,graphQLEndpoint:``,defaultCluster:``},isLoadingCreateNewFlow:!1,isRevisionsExistOnServer:!1},{[a_f]:e=>({...e}),[o_f]:(e,{payload:t})=>({...e,flows:[t,...e.flows]}),[l_f]:(e,{payload:t})=>({...e,fetchingFlows:t}),[u_f]:(e,{payload:t})=>({...e,templateToOpen:t}),[d_f]:(e,{payload:t})=>({...e,isTemplateSelected:t}),[h_f]:(e,{payload:t})=>({...e,tags:t}),[g_f]:(e,{payload:t})=>({...e,tags:t}),[__f]:(e,{payload:t})=>({...e,categories:t}),[v_f]:(e,{payload:t})=>({...e,templatesAuthors:t}),[y_f]:(e,{payload:t})=>({...e,selectedFilters:t}),[f_f]:(e,{payload:t})=>({...e,templates:t}),[p_f]:(e,{payload:t})=>({...e,filteredTemplates:t}),[b_f]:(e,{payload:t})=>({...e,tag:t}),[x_f]:(e,{payload:t})=>({...e,flows:t}),[S_f]:(e,{payload:t})=>({...e,notebooks:t}),[w_f]:(e,{payload:t})=>({...e,isSearching:t}),[T_f]:(e,{payload:t})=>({...e,isSearchingLoading:t}),[D_f]:(e,{payload:t})=>({...e,searched:t}),[O_f]:(e,{payload:t})=>({...e,searchedTemplates:t}),[k_f]:(e,{payload:t})=>({...e,config:t}),[A_f]:(e,{payload:t})=>({...e,isLoadingCreateNewFlow:t}),[c_f]:(e,{payload:t})=>({...e,isRevisionsExistOnServer:t}),[j_f]:(e,{payload:t})=>({...e,shouldCreateInitialFlows:t})}),tvf=`flows`}));function*nvf(){yield Oe([r_f()])}var rvf=s((()=>{It(),CP()})),ivf,avf,ovf,svf,cvf,lvf,uvf=s((()=>{hv(),ivf=`newFlowClusterID`,avf={newFlowClusterID:``},ovf=pv({name:ivf,initialState:avf,reducers:{newFlowClusterIDAction(e,t){e.newFlowClusterID=t.payload}}}),svf=e=>e?.newFlowClusterID||null,{newFlowClusterIDAction:cvf}=ovf.actions,lvf=ovf.reducer})),dvf,fvf=s((()=>{uvf(),dvf=lvf})),pvf,mvf,hvf,gvf,_vf,vvf=s((()=>{hv(),pvf=`engineDistributionType`,mvf={engineDistributionType:`instance_locked`},hvf=pv({name:pvf,initialState:mvf,reducers:{engineDistributionTypeAction(e,t){e.engineDistributionType=t.payload}}}),{engineDistributionTypeAction:gvf}=hvf.actions,_vf=hvf.reducer})),yvf,bvf=s((()=>{vvf(),yvf=_vf}));function xvf(){return{id:`flow-center`,reducerMap:{[tvf]:evf,[Svf]:dvf,[Cvf]:yvf,[wvf]:Jat},sagas:[nvf],initialActions:[]}}var Svf,Cvf,wvf,Tvf,Evf=s((()=>{CP(),rvf(),fvf(),bvf(),H_(),X(),Svf=`newFlowClusterID`,Cvf=`engineDistributionType`,wvf=`flowCenterDialog`,V_.addModules([xvf()]),Tvf=V_})),Dvf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M14 6V4h-4v2h4zM4 8v11h16V8H4zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2h4z`}),`WorkOutlineOutlined`)})),Ovf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M16.67 13.13C18.04 14.06 19 15.32 19 17v3h4v-3c0-2.18-3.57-3.47-6.33-3.87zM15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4c-.47 0-.91.1-1.33.24C14.5 5.27 15 6.58 15 8s-.5 2.73-1.33 3.76c.42.14.86.24 1.33.24zm-6 0c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H3v-.99C3.2 16.29 6.3 15 9 15s5.8 1.29 6 2v1z`}),`PeopleAltOutlined`)})),kvf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z`}),`PersonOutlineOutlined`)})),Avf=c((e=>{var t=Gu();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(bx()),r=L();e.default=(0,n.default)((0,r.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.25 2.52.77-1.28-3.52-2.09V8z`}),`HistoryOutlined`)}));function jvf({categories:e,filterers:t,type:n,screen:r,onSetType:i,showNavigation:a,fullScreen:o,automateFullScreen:s}){let{classes:c}=Bvf(),l=K(),[u,d]=(0,Mvf.useState)([]),f=G(e=>e.flows.selectedFilters),p=G(e=>e.flows.isSearching);function m(e){switch(e){case`mine`:return r.toLowerCase()===e&&!p?(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Mct,alt:`myFlows`}):(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Act,alt:`myFlowsBlue`});case`templates`:return r.toLowerCase()===e&&!p?(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Rct,alt:`templates`}):(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Ict,alt:`templatesBlue`});case`containers`:return(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:ult,alt:`containerDashboard`});case`notebooks`:return r.toLowerCase()===e&&!p?(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Mct,alt:`myFlows`}):(0,wP.jsx)(`img`,{width:`24px`,height:`24px`,src:Act,alt:`myFlowsBlue`});case`WorkOutlineOutlinedIcon`:return(0,wP.jsx)(Pvf.default,{});case`PeopleAltOutlinedIcon`:return(0,wP.jsx)(Fvf.default,{});case`PersonOutlineOutlinedIcon`:return(0,wP.jsx)(Ivf.default,{});case`HistoryOutlinedIcon`:return(0,wP.jsx)(Lvf.default,{});default:return(0,wP.jsx)(Lvf.default,{})}}let h=e=>{let t=u.indexOf(e);d(t===-1?t=>(t.push(e),[...t]):e=>(e.splice(t,1),[...e]))},g=(e,t)=>{let n={...f},r=f[e];n[e]=[],r&&(n[e]=[...r]),n[e].includes(t)?n[e].splice(n[e].indexOf(t),1):n[e].push(t),n[e].length===0&&delete n[e],l(H_f(n))};(0,Mvf.useEffect)(()=>{g(Gb.PUBLIC,`1`)},[]);let _=e=>{l(q_f(!1)),l(J_f(!1)),l(X_f(``)),l(Z_f(null)),l(xP(e===`notebooks`?{name:``,ownerType:Wb.NOTEBOOKS}:{name:``,ownerType:Wb.MINE})),i(e)},v=()=>t.map(({text:e,group:t,options:n},r)=>(0,wP.jsx)(`div`,{children:(0,wP.jsxs)(wh,{component:`fieldset`,className:c.formControl,"data-test":`flow-center-${t}-container`,id:`flow-center-${t}-container`,children:[(0,wP.jsxs)(`div`,{className:c.filterTitleContainer,children:[(0,wP.jsx)(jh,{className:c.category,component:`legend`,children:e}),(0,wP.jsx)(`div`,{className:c.expandIconClass,onClick:()=>h(r),children:u.includes(r)?(0,wP.jsx)(Rvf.default,{fontSize:`small`,style:{fill:`#555F7C`,width:`18px!important`,height:`18px!important`}}):(0,wP.jsx)(zvf.default,{fontSize:`small`,style:{fill:`#555F7C`,width:`18px!important`,height:`18px!important`}})})]}),(0,wP.jsx)(`div`,{children:(0,wP.jsx)(Fbe,{className:c.group,children:n.map(({text:e,value:n})=>{if(!u.includes(r))return(0,wP.jsx)(Dh,{control:(0,wP.jsx)(Ym,{checked:f[t]&&f[t].includes(n),name:n,color:`primary`,onClick:()=>g(t,n)}),label:(0,wP.jsx)(z,{"data-test":`flow-center-flows-table-optionText`,className:c.listItemTextFilters,children:e}),"data-test":`flow-center-filter-item`,id:`flow-center-filter-item`},`${t}-${n}`)})})})]},t+r)},t+r));return(0,wP.jsx)(B,{className:c.boxBackground,children:(0,wP.jsxs)(B,{className:c.marginLeft,children:[(0,wP.jsx)(Gh,{className:s?c.fullScreenMode:``,children:e.map(({key:e,text:t,icon:n})=>(0,wP.jsxs)(Zh,{id:`flow-center-navigation-listItem-conatiner`,"data-test":`flow-center-navigation-tabs-${e}`,button:!0,disableRipple:!0,selected:r.toLowerCase()===e&&!p,onClick:()=>_(e),className:c.paddingLeft,classes:{selected:c.selectedPaddingLeft},children:[(0,wP.jsx)(eg,{className:c.icon,children:m(e)}),(0,wP.jsx)(ng,{"data-test":`flow-center-navigation-listItemText`,className:`flow-center-navigation-listItemText`,primary:t,classes:{primary:c.listItemText}})]},e))}),a&&(()=>{let e=s?`calc(100vh - 64px - 16px - 86px - 8px - 54px`:`calc(100vh - 64px - 16px - 86px - 8px - ${o?`0px`:`54px`})`;return(0,wP.jsxs)(wP.Fragment,{children:[(0,wP.jsx)(vh,{}),(0,wP.jsx)(`div`,{className:c.scroll,style:{height:e},children:v()})]})})()]})})}var Mvf,Nvf,Pvf,Fvf,Ivf,Lvf,Rvf,zvf,wP,Bvf,Vvf=s((()=>{Mvf=d(m()),Nvf=Z(),yh(),Mh(),Th(),Lbe(),Oh(),Xm(),tg(),rg(),Qh(),Kh(),Hm(),ip(),Pvf=d(Dvf()),Fvf=d(Ovf()),Ivf=d(kvf()),Lvf=d(Avf()),q(),CP(),rx(),Kb(),Rvf=d(Pfd()),zvf=d(rC()),wP=L(),Bvf=(0,Nvf.makeStyles)()(()=>({icon:{fontSize:`16px!important`,minWidth:`0px!important`,paddingLeft:`8px!important`,paddingRight:`8px!important`,"& svg":{fill:`#555F7C!important`}},text:{fontSize:`14px!important`},listItemText:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:`normal!important`,fontSize:`14px!important`,lineHeight:`19px!important`,letterSpacing:`-1.30385e-09px!important`},listItemTextFilters:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:`normal!important`,fontSize:`12px!important`,lineHeight:`16px!important`,letterSpacing:`-1.30385e-09px!important`,wordBreak:`break-word`},category:{fontFamily:`Nunito`,fontStyle:`normal!important`,color:`#2A323C!important`,fontSize:`14px!important`,marginright:`6px!important`,fontWeight:`500!important`,paddingLeft:`8px!important`},formControl:{marginBottom:`10px!important`,marginTop:`10px!important`},marginLeft:{paddingLeft:`8px!important`,paddingRight:`8px!important`},boxBackground:{height:`100%!important`},paddingLeft:{paddingLeft:`0px!important`,minWidth:`0px!important`,borderRadius:`4px!important`},fullScreenMode:{marginTop:`64.5px!important`},selectedPaddingLeft:{background:`#F2F5F9 !important`,color:`#1871E8 !important`},group:{paddingLeft:`8px!important`},filterTitleContainer:{display:`flex`,alignItems:`center!important`},expandIconClass:{display:`flex`,paddingLeft:`5px!important`,"&:hover":{cursor:`pointer!important`}},scroll:{overflowY:`auto`,overflowX:`hidden`}}))})),Hvf,Uvf,TP,Wvf,Gvf,Kvf,qvf=s((()=>{Hvf=d(m()),qm(),Kb(),hge(),ip(),Wm(),Nh(),oge(),Hm(),Uvf=Z(),Y(),q(),CP(),rx(),X(),SO(),W(),TP=L(),Wvf=3,Gvf=(0,Uvf.makeStyles)()(e=>({container:{marginLeft:`12px!important`},cardRoot:{display:`flex`,flexDirection:`column`,justifyContent:`center!important`,border:`0.5px solid #D5DFE9!important`,boxShadow:`none!important`,borderRadius:`4px!important`,marginRight:`10px!important`},cardContainer:{marginTop:`20px!important`,marginLeft:`20px!important`,marginBottom:`15px!important`,marginRight:`20px!important`,maxHeight:`150px`,minHeight:`150px`,display:`flex`,flexDirection:`column`},title:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`16px!important`,lineHeight:`22px!important`,letterSpacing:`-1.30385e-09px!important`,wordBreak:`break-word!important`,cursor:`pointer`,color:`#2A323C!important`},subtitle:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:500,fontSize:`12px!important`,lineHeight:`16px!important`,letterSpacing:`-1.30385e-09px!important`,color:`#5C6269!important`,wordWrap:`break-word!important`},veritoneCertifiedContainer:{display:`flex`,marginTop:`10px!important`},veritoneCertified:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:500,fontSize:`10px!important`,lineHeight:`18px!important`,letterSpacing:`-1.30385e-09px!important`,wordWrap:`break-word!important`,color:`#2A323C!important`,marginLeft:`4px!important`},pos:{marginBottom:12},centerButton:{justifyContent:`center!important`},cardContent:{padding:`0px!important`,height:`120px!important`,textOverflow:`ellipsis!important`},titleContent:{height:`82px!important`,overflow:`auto`},bottomButton:{marginTop:`10px`,padding:`0px!important`,display:`flex`,height:`30px!important`},box:{display:`flex`,marginTop:e.spacing(3.2),marginBottom:e.spacing(3.2)},viewAllButton:{color:`#6098D1!important`,textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:`normal!important`,fontSize:`12px!important`,lineHeight:`16px!important`,marginRight:`24px!important`,letterSpacing:`-1.30385e-09px!important`},createFlowButton:{textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`12px!important`,lineHeight:`16px!important`,marginLeft:`0px!important`,padding:`6px 12px 6px 12px!important`,background:e.palette.background.paper,color:`#1871E8!important`,letterSpacing:`0.02857em`},viewDetailsButton:{textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`12px!important`,lineHeight:`16px!important`,background:e.palette.background.paper,color:`#6098D1!important`,letterSpacing:`0.02857em`},createBlankFlowButton:{display:`flex`,justifyContent:`center!important`,"& svg":{fill:`#555F7C!important`}},createBlankFlowLayout:{display:`flex`,flexDirection:`column`},lowercaseButton:{textTransform:`none!important`,fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:600,fontSize:`14px!important`,lineHeight:`19px!important`,letterSpacing:`-1.30385e-09px!important`},text:{fontFamily:`Nunito`,fontStyle:`normal!important`,fontWeight:400,fontSize:`16px!important`,lineHeight:`22px!important`,letterSpacing:`-1.30385e-09px!important`,color:`#2A323C!important`}})),Kvf=({goToTemplateList:e,handleOpenFlowNameDialog:t,setScreen:n,handleOpenTemplateDetails:r})=>{let i=K(),{classes:a}=Gvf(),[o,s]=(0,Hvf.useState)([]),[c,l]=(0,Hvf.useState)(0),u=G(Fv),[d,f]=(0,Hvf.useState)(!0),p=(e,t)=>{e.data[t].records&&s(e.data[t].records),l(Math.min(Wvf,e.data[t].records.length))};(0,Hvf.useEffect)(()=>{if(o.length){setTimeout(()=>{f(!1)},3e3);return}w9e(u,{isPublic:!0}).then(e=>{setTimeout(()=>{f(!1)},3e3),p(e,`flowTemplates`)}).catch(e=>{oD(`error fetching flow templates: ${JSON.stringify(e)}`)})},[p]);let m=e=>{n(Wb.TEMPLATES),i(bP({id:e.id,title:e.title})),r(!0)},h=e=>{t(e)};return(0,TP.jsxs)(`div`,{className:a.container,children:[(0,TP.jsxs)(B,{mt:2,mb:2,className:a.box,children:[(0,TP.jsx)(z,{"data-test":`flow-center-flows-table-populatTemplates`,className:a.text,style:{flexGrow:1},children:(0,TP.jsx)(J,{id:`os-flow-center.1v6wsw`,defaultMessage:[{type:0,value:`Popular Templates`}]})}),(0,TP.jsx)(V,{"data-test":`flow-center-template-gallery-viewAllTemplates`,size:`small`,className:a.viewAllButton,onClick:e,children:(0,TP.jsx)(J,{id:`os-flow-center.viewall`,defaultMessage:[{type:0,value:`View All`}]})})]}),(0,TP.jsx)(U,{"data-test":`flow-center-templates-on-flows-page`,container:!0,id:`flow-center-templates`,children:o.slice(0,c).map((e,t)=>(0,TP.jsx)(U,{"data-test":`flow-center-templatesGallery`,item:!0,xs:4,children:(0,TP.jsx)(Km,{className:a.cardRoot,id:`flow-center-template-card`,children:(0,TP.jsxs)(`div`,{className:a.cardContainer,children:[(0,TP.jsxs)(Jm,{className:a.cardContent,children:[(0,TP.jsxs)(`div`,{className:a.titleContent,children:[d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:80,height:15}):(0,TP.jsx)(z,{"data-test":`flow-center-flows-templateGallery-title`,className:a.title,gutterBottom:!0,onClick:()=>m(e),children:e?.title}),d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:80,height:15,sx:{mt:`5px`}}):(0,TP.jsx)(z,{"data-test":`flow-center-flows-templateGallery-subtitle`,className:a.subtitle,"aria-multiline":!0,variant:`body2`,component:`p`,children:e.subtitle})]}),(0,TP.jsx)(`div`,{className:a.veritoneCertifiedContainer,children:d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:120,height:15}):(0,TP.jsxs)(TP.Fragment,{children:[(0,TP.jsx)(`img`,{src:Bct,alt:`veritoneCertifiedIcon`}),(0,TP.jsx)(z,{"data-test":`flow-center-flows-templateGallery-veritoneCertified`,className:a.veritoneCertified,component:`p`,children:(0,TP.jsx)(J,{id:`os-flow-center.veritonecertified`,defaultMessage:[{type:0,value:`Veritone Certified`}]})})]})})]}),(0,TP.jsxs)(ige,{className:a.bottomButton,children:[d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:120,height:20}):(0,TP.jsx)(V,{"data-test":`flow-center-template-gallery-createFlowFromTemplate-${t}`,onClick:()=>h?h(e.id):``,id:`flow-center-create-flow-btn-${t}`,size:`small`,variant:`outlined`,color:`primary`,className:a.createFlowButton,children:(0,TP.jsx)(J,{id:`os-flow-center.createflow`,defaultMessage:[{type:0,value:`Create Flow`}]})}),d?(0,TP.jsx)(xg,{variant:`rectangular`,animation:`wave`,width:120,height:15}):(0,TP.jsx)(V,{"data-test":`flow-center-template-gallery-viewDetailsForTemplate-${t}`,onClick:()=>m(e),size:`small`,color:`primary`,className:a.viewDetailsButton,children:(0,TP.jsx)(J,{id:`os-flow-center.viewdetails`,defaultMessage:[{type:0,value:`View Details`}]})})]})]})})},e.title+t))})]})}}));function Jvf(e,t){if(e===void 0)return Yvf;switch(t.type){case`SET_LOCALE`:return{...e,locale:t.payload};case`SET_AUTHTOKEN`:return{...e,authToken:t.payload};case`SET_CONFIG`:return{...e,config:t.payload};case`FETCH_ENGINE_DISPATCHED`:return{...e,engineFetching:!0,engineFetchingFailed:!1,engineFetchingFailedReason:null,engine:null};case`FETCH_ENGINE_FAILED`:return{...e,engineFetching:!1,engineFetchingFailed:!0,engineFetchingFailedReason:t.payload,engine:null};case`FETCH_ENGINE_SUCCEEDED`:return{...e,engineFetching:!1,engineFetchingFailed:!1,engineFetchingFailedReason:null,engine:t.payload,engineDistrubutionType:t.payload.distributionType};case`FETCH_REVISIONS`:return{...e,engineRevisionsFetching:!0,engineRevisionsFetchingFailed:!1,engineRevisionsFetchingFailedReason:null,engineRevisions:null};case`FETCH_REVISIONS_FAILED`:return{...e,engineRevisionsFetching:!1,engineRevisionsFetchingFailed:!0,engineRevisionsFetchingFailedReason:t.payload,engineRevisions:null};case`FETCH_REVISIONS_SUCCEEDED`:return{...e,engineRevisionsFetching:!1,engineRevisionsFetchingFailed:!1,engineRevisionsFetchingFailedReason:null,engineRevisions:t.payload};case`FETCH_EXECUTIONS`:return{...e,fetchingExecutions:!0,executions:null,fetchExecutionsFail:null};case`FETCH_EXECUTIONS_FAIL`:return{...e,fetchingExecutions:!1,executions:null,fetchExecutionsFail:t.payload};case`FETCH_EXECUTIONS_SUCCEES`:return{...e,fetchingExecutions:!1,executions:t.payload,fetchExecutionsFail:null};case`FETCH_SCHEDULED_JOBS_DISPATCHED`:return{...e,scheduledJobsFetching:!0,scheduledJobsFailed:!1,scheduledJobsFailedReason:null,scheduledJobs:null};case`FETCH_SCHEDULED_JOBS_FAILED`:return{...e,scheduledJobsFetching:!1,scheduledJobsFailed:!0,scheduledJobsFailedReason:t.payload,scheduledJobs:null};case`FETCH_SCHEDULED_JOBS_SUCCEEDED`:return{...e,scheduledJobsFetching:!1,scheduledJobsFailed:!1,scheduledJobsFailedReason:null,scheduledJobs:t.payload};case`FETCH_JOBS_DISPATCHED`:return{...e,jobsFetching:!0,jobsFetchingFailed:!1,jobsFetchingFailedReason:null,jobsFetched:null};case`FETCH_JOBS_FAILED`:return{...e,jobsFetching:!1,jobsFetchingFailed:!0,jobsFetchingFailedReason:t.payload,jobsFetched:null};case`FETCH_JOBS_SUCCEEDED`:return{...e,jobsFetching:!1,jobsFetchingFailed:!1,jobsFetchingFailedReason:null,jobsFetched:t.payload};case`UPDATE_FLOW_REVISION_DESCRIPTION`:return{...e,flowRevisionDescriptionUpdating:!0,flowRevisionDescriptionUpdateFailed:!1,flowRevisionDescriptionUpdateFailedReason:null,flowRevisionDescriptionUpdate:null};case`UPDATE_FLOW_REVISION_DESCRIPTION_FAILED`:return{...e,flowRevisionDescriptionUpdating:!1,flowRevisionDescriptionUpdateFailed:!0,flowRevisionDescriptionUpdateFailedReason:t.payload,flowRevisionDescriptionUpdate:null};case`UPDATE_FLOW_REVISION_DESCRIPTION_SUCCEEDED`:return{...e,flowRevisionDescriptionUpdating:!1,flowRevisionDescriptionUpdateFailed:!1,flowRevisionDescriptionUpdateFailedReason:null,flowRevisionDescriptionUpdate:t.payload};case`CLEAN_UPDATE_FLOW_REVISION_DESCRIPTION`:return{...e,flowRevisionDescriptionUpdating:!1,flowRevisionDescriptionUpdateFailed:!1,flowRevisionDescriptionUpdateFailedReason:null,flowRevisionDescriptionUpdate:null};case`RESTORE_THIS_REVISION`:return{...e,restoreThisRevisionInProgress:!0,restoreThisRevisionFailed:!1,restoreThisRevisionFailedReason:null,restoreThisRevisionResult:null};case`RESTORE_THIS_REVISION_FAILED`:return{...e,restoreThisRevisionInProgress:!1,restoreThisRevisionFailed:!0,restoreThisRevisionFailedReason:t.payload,restoreThisRevisionResult:null};case`RESTORE_THIS_REVISION_SUCCEEDED`:return{...e,restoreThisRevisionInProgress:!1,restoreThisRevisionFailed:!1,restoreThisRevisionFailedReason:null,restoreThisRevisionResult:t.payload};case`CLEAN_RESTORE_THIS_REVISION_SUCCEEDED`:return{...e,restoreThisRevisionInProgress:!1,restoreThisRevisionFailed:!1,restoreThisRevisionFailedReason:null,restoreThisRevisionResult:null};case`COPY_FLOW`:return{...e,copyFlowInProgress:!0,copyFlowFailed:!1,copyFlowFailedReason:null,copyFlowResult:null};case`COPY_FLOW_FAILED`:return{...e,copyFlowInProgress:!1,copyFlowFailed:!0,copyFlowFailedReason:t.payload,copyFlowResult:null};case`COPY_FLOW_SUCCEEDED`:return{...e,copyFlowInProgress:!1,copyFlowFailed:!1,copyFlowFailedReason:null,copyFlowResult:t.payload};case`CLEAN_COPY_FLOW`:return{...e,copyFlowInProgress:!1,copyFlowFailed:!1,copyFlowFailedReason:null,copyFlowResult:null};case`FLOW_RESUME_ACTION`:return{...e,flowResumeInProgress:!0,flowResumeFailed:!1,flowResumeFailedReason:null,flowResumeResult:null};case`FLOW_RESUME_ACTION_FAILED`:return{...e,flowResumeInProgress:!1,flowResumeFailed:!0,flowResumeFailedReason:t.payload,flowResumeResult:null};case`FLOW_RESUME_ACTION_SUCCEEDED`:return{...e,flowResumeInProgress:!1,flowResumeFailed:!1,flowResumeFailedReason:null,flowResumeResult:t.payload};case`CLEAN_FLOW_RESUME_ACTION`:return{...e,flowResumeInProgress:!1,flowResumeFailed:!1,flowResumeFailedReason:null,flowResumeResult:null};case`FLOW_PAUSE_ACTION`:return{...e,flowPauseInProgress:!0,flowPauseFailed:!1,flowPauseFailedReason:null,flowPauseResult:null};case`FLOW_PAUSE_ACTION_FAILED`:return{...e,flowPauseInProgress:!1,flowPauseFailed:!0,flowPauseFailedReason:t.payload,flowPauseResult:null};case`FLOW_PAUSE_ACTION_SUCCEEDED`:return{...e,flowPauseInProgress:!1,flowPauseFailed:!1,flowPauseFailedReason:null,flowPauseResult:t.payload};case`CLEAN_FLOW_PAUSE_ACTION`:return{...e,flowPauseInProgress:!1,flowPauseFailed:!1,flowPauseFailedReason:null,flowPauseResult:null};case`SET_ENGINE_DISTRIBUTION_TYPE_ACTION`:return{...e,engineDistrubutionType:t.payload};default:return e}}var Yvf,Xvf=s((()=>{Yvf={locale:`he`,engine:null,engineDistrubutionType:null}})),Zvf,Qvf=s((()=>{Xvf(),Zvf=Jvf}));function $vf(e,t){if(e===void 0)return eyf;switch(t.type){case`SET_LOCALE`:return{...e,locale:t.payload};case`SET_AUTHTOKEN`:return{...e,authToken:t.payload};default:return e}}var eyf,tyf=s((()=>{eyf={locale:`he`}})),nyf,ryf=s((()=>{tyf(),nyf=$vf}));function iyf(e,t){if(e===void 0)return ayf;switch(t.type){case`SET_CONFIG`:return{...e,config:t.payload};case`SET_CONFIG_PARAMS`:return{...e,params:t.payload};case`FETCH_ME_LOADING`:return{...e,me:null,meFetchingFailed:null,meFetchingLoading:!0};case`FETCH_ME_FAILED`:return{...e,me:null,meFetchingFailed:t.payload,meFetchingLoading:!1};case`FETCH_ME_SUCCEEDED`:return{...e,me:t.payload,meFetchingFailed:null,meFetchingLoading:!1};case`SET_IS_REVISIONS_EXIST_ON_SERVER`:return{...e,isRevisionsExistOnServer:t.payload};case`FETCH_ORG_USERS`:return{...e,orgUsersFetching:!0,orgUsersFetchingFailed:!1,orgUsersFetchingFailedReason:null,users:null};case`FETCH_ORG_USERS_FAILED`:return{...e,orgUsersFetching:!1,orgUsersFetchingFailed:!0,orgUsersFetchingFailedReason:t.payload,users:null};case`FETCH_ORG_USERS_SUCCEEDED`:return{...e,orgUsersFetching:!1,orgUsersFetchingFailed:!1,orgUsersFetchingFailedReason:null,users:t.payload};default:return e}}var ayf,oyf=s((()=>{ayf={isRevisionsExistOnServer:!1}})),syf,cyf=s((()=>{oyf(),syf=iyf})),lyf,uyf,dyf=s((()=>{X(),lyf=async(e,t,n)=>$v({query:uyf,graphEndpoint:t,token:n,variables:{flowId:e}}),uyf=`
3256
3256
  query getFlowRevisions($flowId: ID!) {
3257
3257
  flowRevisions(flowId: $flowId, hasBuilds: true) {
3258
3258
  records {