@elliemae/pui-app-bridge 2.23.1 → 2.23.2

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/dist/umd/index.js CHANGED
@@ -13,13 +13,13 @@
13
13
  *
14
14
  * This source code is licensed under the MIT license found in the
15
15
  * LICENSE file in the root directory of this source tree.
16
- */var e=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.iterator;function $(y){return y===null||typeof y!="object"?null:(y=O&&y[O]||y["@@iterator"],typeof y=="function"?y:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,D={};function L(y,T,_){this.props=y,this.context=T,this.refs=D,this.updater=_||M}L.prototype.isReactComponent={},L.prototype.setState=function(y,T){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,T,"setState")},L.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function z(){}z.prototype=L.prototype;function ne(y,T,_){this.props=y,this.context=T,this.refs=D,this.updater=_||M}var j=ne.prototype=new z;j.constructor=ne,N(j,L.prototype),j.isPureReactComponent=!0;var le=Array.isArray,E=Object.prototype.hasOwnProperty,fe={current:null},de={key:!0,ref:!0,__self:!0,__source:!0};function ge(y,T,_){var oe,te={},ye=null,Se=null;if(T!=null)for(oe in T.ref!==void 0&&(Se=T.ref),T.key!==void 0&&(ye=""+T.key),T)E.call(T,oe)&&!de.hasOwnProperty(oe)&&(te[oe]=T[oe]);var xe=arguments.length-2;if(xe===1)te.children=_;else if(1<xe){for(var be=Array(xe),ke=0;ke<xe;ke++)be[ke]=arguments[ke+2];te.children=be}if(y&&y.defaultProps)for(oe in xe=y.defaultProps,xe)te[oe]===void 0&&(te[oe]=xe[oe]);return{$$typeof:e,type:y,key:ye,ref:Se,props:te,_owner:fe.current}}function ee(y,T){return{$$typeof:e,type:y.type,key:T,ref:y.ref,props:y.props,_owner:y._owner}}function me(y){return typeof y=="object"&&y!==null&&y.$$typeof===e}function ve(y){var T={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(_){return T[_]})}var G=/\/+/g;function Pe(y,T){return typeof y=="object"&&y!==null&&y.key!=null?ve(""+y.key):T.toString(36)}function X(y,T,_,oe,te){var ye=typeof y;(ye==="undefined"||ye==="boolean")&&(y=null);var Se=!1;if(y===null)Se=!0;else switch(ye){case"string":case"number":Se=!0;break;case"object":switch(y.$$typeof){case e:case i:Se=!0}}if(Se)return Se=y,te=te(Se),y=oe===""?"."+Pe(Se,0):oe,le(te)?(_="",y!=null&&(_=y.replace(G,"$&/")+"/"),X(te,T,_,"",function(ke){return ke})):te!=null&&(me(te)&&(te=ee(te,_+(!te.key||Se&&Se.key===te.key?"":(""+te.key).replace(G,"$&/")+"/")+y)),T.push(te)),1;if(Se=0,oe=oe===""?".":oe+":",le(y))for(var xe=0;xe<y.length;xe++){ye=y[xe];var be=oe+Pe(ye,xe);Se+=X(ye,T,_,be,te)}else if(be=$(y),typeof be=="function")for(y=be.call(y),xe=0;!(ye=y.next()).done;)ye=ye.value,be=oe+Pe(ye,xe++),Se+=X(ye,T,_,be,te);else if(ye==="object")throw T=String(y),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return Se}function we(y,T,_){if(y==null)return y;var oe=[],te=0;return X(y,oe,"","",function(ye){return T.call(_,ye,te++)}),oe}function Ke(y){if(y._status===-1){var T=y._result;T=T(),T.then(function(_){(y._status===0||y._status===-1)&&(y._status=1,y._result=_)},function(_){(y._status===0||y._status===-1)&&(y._status=2,y._result=_)}),y._status===-1&&(y._status=0,y._result=T)}if(y._status===1)return y._result.default;throw y._result}var Ce={current:null},nt={transition:null},Te={ReactCurrentDispatcher:Ce,ReactCurrentBatchConfig:nt,ReactCurrentOwner:fe};function lt(){throw Error("act(...) is not supported in production builds of React.")}u.Children={map:we,forEach:function(y,T,_){we(y,function(){T.apply(this,arguments)},_)},count:function(y){var T=0;return we(y,function(){T++}),T},toArray:function(y){return we(y,function(T){return T})||[]},only:function(y){if(!me(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},u.Component=L,u.Fragment=a,u.Profiler=p,u.PureComponent=ne,u.StrictMode=l,u.Suspense=v,u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Te,u.act=lt,u.cloneElement=function(y,T,_){if(y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var oe=N({},y.props),te=y.key,ye=y.ref,Se=y._owner;if(T!=null){if(T.ref!==void 0&&(ye=T.ref,Se=fe.current),T.key!==void 0&&(te=""+T.key),y.type&&y.type.defaultProps)var xe=y.type.defaultProps;for(be in T)E.call(T,be)&&!de.hasOwnProperty(be)&&(oe[be]=T[be]===void 0&&xe!==void 0?xe[be]:T[be])}var be=arguments.length-2;if(be===1)oe.children=_;else if(1<be){xe=Array(be);for(var ke=0;ke<be;ke++)xe[ke]=arguments[ke+2];oe.children=xe}return{$$typeof:e,type:y.type,key:te,ref:ye,props:oe,_owner:Se}},u.createContext=function(y){return y={$$typeof:d,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},y.Provider={$$typeof:f,_context:y},y.Consumer=y},u.createElement=ge,u.createFactory=function(y){var T=ge.bind(null,y);return T.type=y,T},u.createRef=function(){return{current:null}},u.forwardRef=function(y){return{$$typeof:g,render:y}},u.isValidElement=me,u.lazy=function(y){return{$$typeof:S,_payload:{_status:-1,_result:y},_init:Ke}},u.memo=function(y,T){return{$$typeof:x,type:y,compare:T===void 0?null:T}},u.startTransition=function(y){var T=nt.transition;nt.transition={};try{y()}finally{nt.transition=T}},u.unstable_act=lt,u.useCallback=function(y,T){return Ce.current.useCallback(y,T)},u.useContext=function(y){return Ce.current.useContext(y)},u.useDebugValue=function(){},u.useDeferredValue=function(y){return Ce.current.useDeferredValue(y)},u.useEffect=function(y,T){return Ce.current.useEffect(y,T)},u.useId=function(){return Ce.current.useId()},u.useImperativeHandle=function(y,T,_){return Ce.current.useImperativeHandle(y,T,_)},u.useInsertionEffect=function(y,T){return Ce.current.useInsertionEffect(y,T)},u.useLayoutEffect=function(y,T){return Ce.current.useLayoutEffect(y,T)},u.useMemo=function(y,T){return Ce.current.useMemo(y,T)},u.useReducer=function(y,T,_){return Ce.current.useReducer(y,T,_)},u.useRef=function(y){return Ce.current.useRef(y)},u.useState=function(y){return Ce.current.useState(y)},u.useSyncExternalStore=function(y,T,_){return Ce.current.useSyncExternalStore(y,T,_)},u.useTransition=function(){return Ce.current.useTransition()},u.version="18.3.1"},2155(s,u,e){"use strict";s.exports=e(6018)},162(s){s.exports=function(e,i,a,l){var p=a?a.call(l,e,i):void 0;if(p!==void 0)return!!p;if(e===i)return!0;if(typeof e!="object"||!e||typeof i!="object"||!i)return!1;var f=Object.keys(e),d=Object.keys(i);if(f.length!==d.length)return!1;for(var g=Object.prototype.hasOwnProperty.bind(i),v=0;v<f.length;v++){var x=f[v];if(!g(x))return!1;var S=e[x],O=i[x];if(p=a?a.call(l,S,O,x):void 0,p===!1||p===void 0&&S!==O)return!1}return!0}}},jt={};function Y(s){var u=jt[s];if(u!==void 0)return u.exports;var e=jt[s]={id:s,loaded:!1,exports:{}};return dr[s](e,e.exports,Y),e.loaded=!0,e.exports}Y.n=s=>{var u=s&&s.__esModule?()=>s.default:()=>s;return Y.d(u,{a:u}),u},Y.d=(s,u)=>{for(var e in u)Y.o(u,e)&&!Y.o(s,e)&&Object.defineProperty(s,e,{enumerable:!0,get:u[e]})},Y.o=(s,u)=>Object.prototype.hasOwnProperty.call(s,u),Y.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},Y.nmd=s=>(s.paths=[],s.children||(s.children=[]),s),(()=>{var s;globalThis.importScripts&&(s=globalThis.location+"");var u=globalThis.document;if(!s&&u&&(u.currentScript&&u.currentScript.tagName.toUpperCase()==="SCRIPT"&&(s=u.currentScript.src),!s)){var e=u.getElementsByTagName("script");if(e.length)for(var i=e.length-1;i>-1&&(!s||!/^http(s?):/.test(s));)s=e[i--].src}if(!s)throw new Error("Automatic publicPath is not supported in this browser");s=s.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),Y.p=s})(),Y.nc=void 0;var Gt={};return(()=>{"use strict";Y.r(Gt),Y.d(Gt,{CAppBridge:()=>Nn,Event:()=>le,LaunchMode:()=>z,MicroAppManager:()=>ne,ScriptLoader:()=>Mr,ScriptingObject:()=>me,SecurityContext:()=>s,StyleLoader:()=>Fr});var s=(r=>(r.USER="USER",r.PARTNER="PARTNER",r))(s||{}),u=Y(114),e=Y.n(u),i=Y(2249),a=Y.n(i),l=Y(7181),p=Y.n(l),f=Y(7605),d=Y.n(f),g=Y(277),v=Y.n(g);const x=JSON.parse('{"appId":"microfe","activeEnv":"localhost","googleTagManager":true,"sessionTimeoutWarnInterval":"7200000","sessionTimeoutInterval":"9000000","microFrontendApps":{"loanapp":{"name":"Loan","hostUrl":"./loan","development":{"files":["index.js"]},"production":{"files":["index.js"]}},"taskapp":{"name":"Task","hostUrl":"./task","mode":"development","development":{"files":["index.dev.js"]},"production":{"files":["index.js"]}},"travelhub":{"name":"TravelHub","hostUrl":"./travelhub","development":{"files":["app.js","landing.js","app.css","landing.css"]},"production":{"files":["app.js","landing.js","app.css","landing.css"]}},"flights":{"name":"Flights","hostUrl":"./flights","development":{"files":["app.js","app.css"]},"production":{"files":["app.js","app.css"]}},"hotels":{"name":"Hotels","hostUrl":"./hotels","development":{"files":["app.js","app.css"]},"production":{"files":["app.js","app.css"]}},"ssfapp":{"name":"SSF App","hostUrl":"./ssf-app","microappManager":"ssf"}},"serviceEndpoints":{"api":"","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"},"env":{"localhost":{"serviceEndpoints":{"api":"","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"dev":{"serviceEndpoints":{"api":"https://dev.api.puiservice.rd.elliemae.io","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"dev2":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa":{"serviceEndpoints":{"api":"https://dev.api.puiservice.rd.elliemae.io","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa2":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa3":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"int":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-osb1":{"serviceEndpoints":{"api":"https://encompass-peg-api.elliemae.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-osb2":{"serviceEndpoints":{"api":"https://encompass-peg2-api.elliemae.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg":{"serviceEndpoints":{"api":"https://peg2-west.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-oapi-west":{"serviceEndpoints":{"api":"https://peg2-west.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-oapi-east":{"serviceEndpoints":{"api":"https://peg2-east.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg2-oapi-east":{"serviceEndpoints":{"api":"https://peg2-east.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg3":{"serviceEndpoints":{"api":"https://pel1.api.ellielabs.com","idp":"https://peg3.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"stage":{"serviceEndpoints":{"api":"https://stg.api.elliemae.com","idp":"https://stg.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"beta":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"demo":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"epc":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"prod":{"serviceEndpoints":{"api":"https://api.elliemae.com","idp":"https://idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}}}}'),S="latest",O=r=>r.replace(/([^:]\/)\/+/g,"$1"),$=r=>{const t=document.createElement("a");return t.href=r,t.href},M=r=>r?.replace?.(/\/?$/,"/"),N=(r,t)=>`${r.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`,D=()=>window.navigator.userAgent.includes("jsdom"),L=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var z=(r=>(r.DEVELOPMENT="development",r.PRODUCTION="production",r))(z||{}),ne=(r=>(r.SSF="ssf",r.APPSDK="appsdk",r))(ne||{});class j{#e=x;#t;#r;constructor(t){this.#t=t?.version||S,this.#r=M(t?.baseUrl||"")}#s=t=>{const{activeEnv:n,env:o,...c}=t,h=o[n]||{};this.#e=v()({},c,h)};get=(t="",n=null)=>e()(a()(this.#e,t,n));set=(t,n)=>{p()(this.#e,t,n)};has=(t="")=>d()(this.#e,t);#n=()=>{if(!/(?:\/)(\d+\.\d+|latest)(?:\/?)?$/.test(this.#r)){const n=this.#t.match(/^(?:\d+\.\d+)*/g);return M(`${this.#r}${n?.[0]||S}`)}return this.#r};load=async t=>{const n=t??`${this.#n()}app.config.json`;let o;try{o=await fetch(n)}catch(c){if(!t&&this.#t!==S){await this.load(`${this.#r}latest/app.config.json`);return}throw new Error("Failed to fetch app config",{cause:c})}if(o.ok)try{const c=await o.json();this.#s(c)}catch(c){if(!t&&this.#t!==S)await this.load(`${this.#r}latest/app.config.json`);else throw new Error("Failed to parse app config",{cause:c})}else{if(!t&&this.#t!==S){await this.load(`${this.#r}latest/app.config.json`);return}throw new Error("Failed to load app config")}}}class le{name;objectId;id;constructor(t){const{name:n,objectId:o}=t;if(!n)throw new Error("Event name is required");if(!o)throw new Error("Scripting object id is required");this.objectId=o,this.name=n,this.id=`${this.objectId}.${this.name}`.toLowerCase()}}class E{static[Symbol.hasInstance](t){return typeof t=="object"&&t!==null&&"getType"in t&&typeof t.getType=="function"&&t.getType()==="ProxyEvent"}#e;objectId;name;id;getType(){return"ProxyEvent"}constructor(t){const{name:n,objectId:o,eventSrc:c}=t;if(!n)throw new Error("Event name is required");if(!o)throw new Error("Scripting object id is required");if(!c)throw new Error("Event source is required");this.objectId=o,this.name=n,this.#e=c,this.id=`${this.objectId}.${this.name}`.toLowerCase()}subscribe=t=>this.#e.subscribe({eventId:this.id,callback:t});unsubscribe=t=>{this.#e.unsubscribe({eventId:this.id,token:t})}}const fe=r=>r instanceof le,de=(r,t)=>`${r.toLowerCase()}.${t.toLowerCase()}`,ge="function",ee=(r,t)=>typeof r===ge&&!!t&&!t.startsWith("_");class me{#e;#t="Object";constructor(t,n){this.#e=t,this.#t=n||this.#t}get id(){return this.#e}get objectType(){return this.#t}_toJSON=()=>{const t=[],n=[];return Object.keys(this).forEach(o=>{const c=this[o];fe(c)?n.push(o):ee(c,o)&&t.push(o)}),{objectId:this.#e,objectType:this.#t,functions:t,events:n}};_dispose=()=>{};dispose=()=>{}}var ve=Y(5345),G=Y.n(ve);const X={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let we;const Ke=new Uint8Array(16);function Ce(){if(!we&&(we=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!we))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return we(Ke)}var nt;const Te=[];for(let r=0;r<256;++r)Te.push((r+256).toString(16).slice(1));function lt(r,t=0){return Te[r[t+0]]+Te[r[t+1]]+Te[r[t+2]]+Te[r[t+3]]+"-"+Te[r[t+4]]+Te[r[t+5]]+"-"+Te[r[t+6]]+Te[r[t+7]]+"-"+Te[r[t+8]]+Te[r[t+9]]+"-"+Te[r[t+10]]+Te[r[t+11]]+Te[r[t+12]]+Te[r[t+13]]+Te[r[t+14]]+Te[r[t+15]]}function y(r,t=0){const n=lt(r,t);if(!nt(n))throw TypeError("Stringified UUID is invalid");return n}const T=null;function _(r,t,n){if(X.randomUUID&&!t&&!r)return X.randomUUID();r=r||{};const o=r.random||(r.rng||Ce)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){n=n||0;for(let c=0;c<16;++c)t[n+c]=o[c];return t}return lt(o)}const oe=_;var te=(r=>(r.Analytics="analytics",r.Application="application",r.Auth="auth",r.Form="form",r.Global="global",r.Http="http",r.Loan="loan",r.LoanV2="loanV2",r.MemStorage="memstorage",r.Module="module",r.Service="service",r.Session="session",r.Styling="styling",r.Transaction="transaction",r.TransactionTemplate="transactiontemplate",r))(te||{});const ye="module";var Se=(r=>(r.USER="USER",r.PARTNER="PARTNER",r))(Se||{});class xe{#e=t=>t.trim().toLowerCase();#t=new Map;#r=new Map;#s=t=>{const{so:n,guestId:o}=t,c=this.#e(n.id),h=this.#r.get(o);if(!h)this.#r.set(o,new Map([[c,t]]));else{if(h.has(c))throw new Error(`Scripting Object ${n.id} already exists for guest ${o}`);h.set(c,t)}};#n=({so:t})=>{if(t._dispose&&typeof t._dispose=="function")try{t._dispose()}catch{}};#a=({objectId:t,guestId:n})=>{if(t===ye&&!n)for(const[,c]of this.#r){const h=c.get(t);if(h)return h}const o=n?this.#r.get(n):null;return o?o.get(t)??null:null};#o=({objectId:t,guestId:n}={})=>{if(n){if(!t){const c=this.#r.get(n);c&&c.forEach(this.#n),this.#r.delete(n);return}const o=this.#r.get(n);if(o){const c=o.get(t);c&&this.#n(c),o.delete(t)}}else t&&this.#r.forEach(o=>{const c=o.get(t);c&&this.#n(c),o.delete(t)})};addScriptingObject=(t,n)=>{const{guestId:o}=n||{};if(!t?.id||!t?._toJSON)throw new Error("Object is not derived from ScriptingObject");const c=this.#e(t.id);if(c===ye&&!o)throw new Error("Guest id is required to add Module scripting object");if(o){this.#s({so:t,...n,guestId:o});return}if(this.#t.has(c))throw new Error(`Scripting Object ${t.id} already exists`);this.#t.set(c,{so:t,...n})};getObject=(t,n)=>{const o=this.#e(t);let c=this.#a({objectId:o,guestId:n?.id});c=c??this.#t.get(o)??null;const{so:h}=c||{};return h||null};has=(t,n)=>this.getObject(t,n)!==null;listScriptingObjects=t=>{const n=new Set(this.#t.keys()),o=this.#r.get(t);if(o)for(const c of o.keys())n.add(c);return Array.from(n)};removeScriptingObject=(t,n)=>{const o=this.#e(t);if(n)this.#o({objectId:o,guestId:n});else{this.#o({objectId:o});const c=this.#t.get(o);c&&this.#n(c),this.#t.delete(o)}};removeAllScriptingObjects=t=>{t?this.#o({guestId:t}):(this.#t.forEach(this.#n),this.#t.clear())}}class be{__TYPE__="Proxy";id;objectType;constructor(t,n){this.id=t,this.objectType=n}}const ke=r=>r?.constructor?.name==="Proxy"||r?.constructor?.name==="ScriptingObjectProxy"||r?.__TYPE__==="Proxy";class Ht{#e=new Map;#t=new WeakMap;#r;constructor(t){this.#r=t}#s=(t,n)=>{const o=new Promise(c=>{setTimeout(()=>{c()},n)});return Promise.race([t,o])};#n=t=>{const{eventName:n,scriptingObject:o,eventParams:c,listeners:h}=t;h.forEach(m=>{m.criteria&&!(c&&this.#o(c,m.criteria))||Promise.resolve(m.callback({obj:o,eventName:n,eventParams:c})).catch(w=>{this.#r?.warn(`Error in event listener for "${n}": ${w.message}`)})})};#a=async({eventId:t,eventName:n,scriptingObject:o,eventParams:c,feedbackWaitTime:h})=>{const w=(this.#e.get(t)||[]).map(C=>C.criteria&&!(c?this.#o(c,C.criteria):!1)?Promise.resolve():this.#s(C.callback({obj:o,eventName:n,eventParams:c}),h));return(await Promise.all(w)).flat(1/0).filter(C=>C!==void 0)};#o(t,n){return Object.entries(n).every(([o,c])=>{const h=t[o];if("eq"in c)return h===c.eq;if("in"in c)return Array.isArray(c.in)&&c.in.includes(h);if("includes"in c)return Array.isArray(h)&&h.includes(c.includes);if("gt"in c){const m=typeof h=="number"?h:Number(h);return!Number.isNaN(m)&&m>c.gt}if("lt"in c){const m=typeof h=="number"?h:Number(h);return!Number.isNaN(m)&&m<c.lt}if("regex"in c){let m=this.#t.get(c);if(m===void 0){try{m=new RegExp(c.regex)}catch{m=null}this.#t.set(c,m)}return m!==null&&typeof h=="string"&&m.test(h)}return!1})}dispatchEvent=async(t,n)=>{const{event:{id:o,name:c},eventParams:h,eventOptions:m}=n,{timeout:w}=m??{};if(!o)throw new Error("Event Id is required");const A=this.#e.get(o)||[];return!w||w<=0?(this.#n({eventName:c,scriptingObject:t,eventParams:h,listeners:A}),Promise.resolve()):this.#a({eventId:o,eventName:c,scriptingObject:t,eventParams:h,feedbackWaitTime:w})};subscribe=t=>{const{eventId:n,callback:o,criteria:c}=t;if(!n)throw new Error("eventId is required");if(!o)throw new Error("Callback is required");const h=this.#e.get(n)||[],m=oe();return h.push({token:m,criteria:c,callback:o}),this.#e.set(n,h),m};unsubscribe=t=>{const{eventId:n,token:o}=t;if(!n)throw new Error("eventId id is required");if(o){const c=this.#e.get(n)||[],h=c.findIndex(m=>m.token===o);h>-1&&(c.splice(h,1),this.#e.set(n,c))}else this.#e.delete(n)};unsubscribeAll=()=>{this.#e.clear()}}const Rt=Y.p+"671d9de68be598da64ca.html?resource",St="pui-app-container-",Wt=({id:r,instanceId:t,manifestPath:n,hostUrl:o,options:c})=>new Promise((h,m)=>{const w=document.createElement("div");w.setAttribute("style","display: flex;width: 100%;height: 100%;flex-direction: column;overflow: hidden;");const A=document.createElement("iframe");A.setAttribute("id",t),A.setAttribute("data-testid",r),A.setAttribute("title",c.title),A.setAttribute("allowfullscreen","true"),A.setAttribute("allowtransparency","true"),c.permissionPolicy&&A.setAttribute("allow",c.permissionPolicy),c.sandbox&&A.setAttribute("sandbox",c.sandbox),A.setAttribute("style",c.style??"flex-grow: 1;border: none;margin: 0;padding: 0;display: block;min-width: 100%;height: 100%;");const C=c.src??Rt.default??Rt;let F=C;if(c.queryParams){const U=c.queryParams.replace(/[^a-zA-Z0-9&=_.~%+-]/g,"");F=`${C}${C.includes("?")?"&":"?"}${U}`}A.setAttribute("src",F);const V=1e4;let J=!1;const se=setTimeout(()=>{J||(J=!0,m(new Error(`iframe for ${r} failed to load within ${V}ms`)))},V);A.addEventListener("error",()=>{J||(J=!0,clearTimeout(se),m(new Error(`iframe for ${r} failed to load`)))}),A.addEventListener("load",()=>{if(J)return;if(J=!0,clearTimeout(se),!A.contentDocument){m(new Error("Frame content window is null"));return}const U=A.contentDocument,ue=U.getElementById(St);ue&&(ue.id=`${ue.id}${r}`);let K=U.getElementsByTagName("base")?.[0];K?K.href=new URL(n,o).href:(K=U.createElement("base"),K.href=new URL(n,o).href,U.getElementsByTagName("head")[0].appendChild(K)),h(A)}),w.appendChild(A);const{containerId:Z}=c;(document.getElementById(Z??"")??document.body).appendChild(w)}),$t=r=>document.getElementById(r),Ge={create:Wt,remove:r=>{const t=$t(r);t&&t.parentElement?.remove()},get:$t},re=()=>({breakpoints:["512px","768px","1024px","350px"],spaces:["0","4px","8px","12px","16px","32px","48px","56px","64px","72px"],fontSizes:["0.8461rem","0.9230rem","1rem","1.0769rem","1.2307rem","1.3846rem","1.8461rem","2.7692rem"],fontWeights:[100,200,300,400,500,600,700,800,900],lineHeights:["1rem","1.15rem","1.25rem","1.5rem"],letterSpacings:["normal","0.1rem","-0.05rem","0.25rem"],fonts:["proxima-nova, Arial, sans-serif"],colors:{neutral:["#FFFFFF","#F6F7F9","#EBEDF0","#E0E3E8","#CBCFD7","#B0B9C8","#8C93A6","#697489","#464F5C","#353C46","#25292F"],brand:["#F6FBFF","#EBF6FF","#A3D6FF","#52A6EC","#1394E5","#1E79C2","#006AA9","#005181","#C9E7FF"],success:["#E1F4ED","#E1F4ED","#289F6B","#207E56","#185D44"],warning:["#FFEFD8","#E06C29","#B25119","#853C12"],danger:["#FBEBED","#FBEBED","#ED5A64","#C64252","#A11B2B"]},shadows:["0 1px 5px 0 rgba(0, 0, 0, 0.13), 0 2px 4px 0 rgba(0, 0, 0, 0.2)","0 6px 20px 0 rgba(0, 0, 0, 0.24), 0 8px 17px 0 rgba(0, 0, 0, 0.19)","0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19)","0 16px 28px 0 rgba(0, 0, 0, 0.24), 0 25px 55px 0 rgba(0, 0, 0, 0.19)","0 27px 24px 0 rgba(0, 0, 0, 0.24), 0 40px 77px 0 rgba(0, 0, 0, 0.19)"],zIndex:[1e3,2e3,3e3,500,4e3],states:[null,"@media (prefers-reduced-motion: no-preference)","@media (prefers-reduced-motion: reduce)","&:first-child","&:last-child","&:odd","&:even","&:visited","&:checked","&:focus-within","&:hover","&:focus","&:focus-visible","&:active","&:disabled, &[aria-disabled=true]","&::placeholder"]});var et=Y(7020),Ae=Y(2155),Kt=Y(162),ft=Y.n(Kt);function _e(r){function t(k,I,R,H,b){for(var ie=0,P=0,Oe=0,ae=0,pe,W,$e=0,Ue=0,q,Ne=q=pe=0,ce=0,Me=0,Pt=0,Fe=0,Bt=R.length,It=Bt-1,Ze,B="",je="",pr="",fr="",ct;ce<Bt;){if(W=R.charCodeAt(ce),ce===It&&P+ae+Oe+ie!==0&&(P!==0&&(W=P===47?10:47),ae=Oe=ie=0,Bt++,It++),P+ae+Oe+ie===0){if(ce===It&&(0<Me&&(B=B.replace(J,"")),0<B.trim().length)){switch(W){case 32:case 9:case 59:case 13:case 10:break;default:B+=R.charAt(ce)}W=59}switch(W){case 123:for(B=B.trim(),pe=B.charCodeAt(0),q=1,Fe=++ce;ce<Bt;){switch(W=R.charCodeAt(ce)){case 123:q++;break;case 125:q--;break;case 47:switch(W=R.charCodeAt(ce+1)){case 42:case 47:e:{for(Ne=ce+1;Ne<It;++Ne)switch(R.charCodeAt(Ne)){case 47:if(W===42&&R.charCodeAt(Ne-1)===42&&ce+2!==Ne){ce=Ne+1;break e}break;case 10:if(W===47){ce=Ne+1;break e}}ce=Ne}}break;case 91:W++;case 40:W++;case 34:case 39:for(;ce++<It&&R.charCodeAt(ce)!==W;);}if(q===0)break;ce++}switch(q=R.substring(Fe,ce),pe===0&&(pe=(B=B.replace(V,"").trim()).charCodeAt(0)),pe){case 64:switch(0<Me&&(B=B.replace(J,"")),W=B.charCodeAt(1),W){case 100:case 109:case 115:case 45:Me=I;break;default:Me=Ct}if(q=t(I,Me,q,W,b+1),Fe=q.length,0<We&&(Me=n(Ct,B,Pt),ct=w(3,q,Me,I,Xe,Be,Fe,W,b,H),B=Me.join(""),ct!==void 0&&(Fe=(q=ct.trim()).length)===0&&(W=0,q="")),0<Fe)switch(W){case 115:B=B.replace(it,m);case 100:case 109:case 45:q=B+"{"+q+"}";break;case 107:B=B.replace(K,"$1 $2"),q=B+"{"+q+"}",q=Le===1||Le===2&&h("@"+q,3)?"@-webkit-"+q+"@"+q:"@"+q;break;default:q=B+q,H===112&&(q=(je+=q,""))}else q="";break;default:q=t(I,n(I,B,Pt),q,H,b+1)}pr+=q,q=Pt=Me=Ne=pe=0,B="",W=R.charCodeAt(++ce);break;case 125:case 59:if(B=(0<Me?B.replace(J,""):B).trim(),1<(Fe=B.length))switch(Ne===0&&(pe=B.charCodeAt(0),pe===45||96<pe&&123>pe)&&(Fe=(B=B.replace(" ",":")).length),0<We&&(ct=w(1,B,I,k,Xe,Be,je.length,H,b,H))!==void 0&&(Fe=(B=ct.trim()).length)===0&&(B="\0\0"),pe=B.charCodeAt(0),W=B.charCodeAt(1),pe){case 0:break;case 64:if(W===105||W===99){fr+=B+R.charAt(ce);break}default:B.charCodeAt(Fe-1)!==58&&(je+=c(B,pe,W,B.charCodeAt(2)))}Pt=Me=Ne=pe=0,B="",W=R.charCodeAt(++ce)}}switch(W){case 13:case 10:P===47?P=0:1+pe===0&&H!==107&&0<B.length&&(Me=1,B+="\0"),0<We*xt&&w(0,B,I,k,Xe,Be,je.length,H,b,H),Be=1,Xe++;break;case 59:case 125:if(P+ae+Oe+ie===0){Be++;break}default:switch(Be++,Ze=R.charAt(ce),W){case 9:case 32:if(ae+ie+P===0)switch($e){case 44:case 58:case 9:case 32:Ze="";break;default:W!==32&&(Ze=" ")}break;case 0:Ze="\\0";break;case 12:Ze="\\f";break;case 11:Ze="\\v";break;case 38:ae+P+ie===0&&(Me=Pt=1,Ze="\f"+Ze);break;case 108:if(ae+P+ie+qe===0&&0<Ne)switch(ce-Ne){case 2:$e===112&&R.charCodeAt(ce-3)===58&&(qe=$e);case 8:Ue===111&&(qe=Ue)}break;case 58:ae+P+ie===0&&(Ne=ce);break;case 44:P+Oe+ae+ie===0&&(Me=1,Ze+="\r");break;case 34:case 39:P===0&&(ae=ae===W?0:ae===0?W:ae);break;case 91:ae+P+Oe===0&&ie++;break;case 93:ae+P+Oe===0&&ie--;break;case 41:ae+P+ie===0&&Oe--;break;case 40:if(ae+P+ie===0){if(pe===0)switch(2*$e+3*Ue){case 533:break;default:pe=1}Oe++}break;case 64:P+Oe+ae+ie+Ne+q===0&&(q=1);break;case 42:case 47:if(!(0<ae+ie+Oe))switch(P){case 0:switch(2*W+3*R.charCodeAt(ce+1)){case 235:P=47;break;case 220:Fe=ce,P=42}break;case 42:W===47&&$e===42&&Fe+2!==ce&&(R.charCodeAt(Fe+2)===33&&(je+=R.substring(Fe,ce+1)),Ze="",P=0)}}P===0&&(B+=Ze)}Ue=$e,$e=W,ce++}if(Fe=je.length,0<Fe){if(Me=I,0<We&&(ct=w(2,je,Me,k,Xe,Be,Fe,H,b,H),ct!==void 0&&(je=ct).length===0))return fr+je+pr;if(je=Me.join(",")+"{"+je+"}",Le*qe!==0){switch(Le!==2||h(je,2)||(qe=0),qe){case 111:je=je.replace(Ee,":-moz-$1")+je;break;case 112:je=je.replace(Re,"::-webkit-input-$1")+je.replace(Re,"::-moz-$1")+je.replace(Re,":-ms-input-$1")+je}qe=0}}return fr+je+pr}function n(k,I,R){var H=I.trim().split(U);I=H;var b=H.length,ie=k.length;switch(ie){case 0:case 1:var P=0;for(k=ie===0?"":k[0]+" ";P<b;++P)I[P]=o(k,I[P],R).trim();break;default:var Oe=P=0;for(I=[];P<b;++P)for(var ae=0;ae<ie;++ae)I[Oe++]=o(k[ae]+" ",H[P],R).trim()}return I}function o(k,I,R){var H=I.charCodeAt(0);switch(33>H&&(H=(I=I.trim()).charCodeAt(0)),H){case 38:return I.replace(ue,"$1"+k.trim());case 58:return k.trim()+I.replace(ue,"$1"+k.trim());default:if(0<1*R&&0<I.indexOf("\f"))return I.replace(ue,(k.charCodeAt(0)===58?"":"$1")+k.trim())}return k+I}function c(k,I,R,H){var b=k+";",ie=2*I+3*R+4*H;if(ie===944){k=b.indexOf(":",9)+1;var P=b.substring(k,b.length-1).trim();return P=b.substring(0,k).trim()+P+";",Le===1||Le===2&&h(P,1)?"-webkit-"+P+P:P}if(Le===0||Le===2&&!h(b,1))return b;switch(ie){case 1015:return b.charCodeAt(10)===97?"-webkit-"+b+b:b;case 951:return b.charCodeAt(3)===116?"-webkit-"+b+b:b;case 963:return b.charCodeAt(5)===110?"-webkit-"+b+b:b;case 1009:if(b.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+b+b;case 978:return"-webkit-"+b+"-moz-"+b+b;case 1019:case 983:return"-webkit-"+b+"-moz-"+b+"-ms-"+b+b;case 883:if(b.charCodeAt(8)===45)return"-webkit-"+b+b;if(0<b.indexOf("image-set(",11))return b.replace(wt,"$1-webkit-$2")+b;break;case 932:if(b.charCodeAt(4)===45)switch(b.charCodeAt(5)){case 103:return"-webkit-box-"+b.replace("-grow","")+"-webkit-"+b+"-ms-"+b.replace("grow","positive")+b;case 115:return"-webkit-"+b+"-ms-"+b.replace("shrink","negative")+b;case 98:return"-webkit-"+b+"-ms-"+b.replace("basis","preferred-size")+b}return"-webkit-"+b+"-ms-"+b+b;case 964:return"-webkit-"+b+"-ms-flex-"+b+b;case 1023:if(b.charCodeAt(8)!==99)break;return P=b.substring(b.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+P+"-webkit-"+b+"-ms-flex-pack"+P+b;case 1005:return Z.test(b)?b.replace(se,":-webkit-")+b.replace(se,":-moz-")+b:b;case 1e3:switch(P=b.substring(13).trim(),I=P.indexOf("-")+1,P.charCodeAt(0)+P.charCodeAt(I)){case 226:P=b.replace(Ie,"tb");break;case 232:P=b.replace(Ie,"tb-rl");break;case 220:P=b.replace(Ie,"lr");break;default:return b}return"-webkit-"+b+"-ms-"+P+b;case 1017:if(b.indexOf("sticky",9)===-1)break;case 975:switch(I=(b=k).length-10,P=(b.charCodeAt(I)===33?b.substring(0,I):b).substring(k.indexOf(":",7)+1).trim(),ie=P.charCodeAt(0)+(P.charCodeAt(7)|0)){case 203:if(111>P.charCodeAt(8))break;case 115:b=b.replace(P,"-webkit-"+P)+";"+b;break;case 207:case 102:b=b.replace(P,"-webkit-"+(102<ie?"inline-":"")+"box")+";"+b.replace(P,"-webkit-"+P)+";"+b.replace(P,"-ms-"+P+"box")+";"+b}return b+";";case 938:if(b.charCodeAt(5)===45)switch(b.charCodeAt(6)){case 105:return P=b.replace("-items",""),"-webkit-"+b+"-webkit-box-"+P+"-ms-flex-"+P+b;case 115:return"-webkit-"+b+"-ms-flex-item-"+b.replace(He,"")+b;default:return"-webkit-"+b+"-ms-flex-line-pack"+b.replace("align-content","").replace(He,"")+b}break;case 973:case 989:if(b.charCodeAt(3)!==45||b.charCodeAt(4)===122)break;case 931:case 953:if(at.test(k)===!0)return(P=k.substring(k.indexOf(":")+1)).charCodeAt(0)===115?c(k.replace("stretch","fill-available"),I,R,H).replace(":fill-available",":stretch"):b.replace(P,"-webkit-"+P)+b.replace(P,"-moz-"+P.replace("fill-",""))+b;break;case 962:if(b="-webkit-"+b+(b.charCodeAt(5)===102?"-ms-"+b:"")+b,R+H===211&&b.charCodeAt(13)===105&&0<b.indexOf("transform",10))return b.substring(0,b.indexOf(";",27)+1).replace(Q,"$1-webkit-$2")+b}return b}function h(k,I){var R=k.indexOf(I===1?":":"{"),H=k.substring(0,I!==3?R:10);return R=k.substring(R+1,k.length-1),Tt(I!==2?H:H.replace(Qe,"$1"),R,I)}function m(k,I){var R=c(I,I.charCodeAt(0),I.charCodeAt(1),I.charCodeAt(2));return R!==I+";"?R.replace(bt," or ($1)").substring(4):"("+I+")"}function w(k,I,R,H,b,ie,P,Oe,ae,pe){for(var W=0,$e=I,Ue;W<We;++W)switch(Ue=Je[W].call(F,k,$e,R,H,b,ie,P,Oe,ae,pe)){case void 0:case!1:case!0:case null:break;default:$e=Ue}if($e!==I)return $e}function A(k){switch(k){case void 0:case null:We=Je.length=0;break;default:if(typeof k=="function")Je[We++]=k;else if(typeof k=="object")for(var I=0,R=k.length;I<R;++I)A(k[I]);else xt=!!k|0}return A}function C(k){return k=k.prefix,k!==void 0&&(Tt=null,k?typeof k!="function"?Le=1:(Le=2,Tt=k):Le=0),C}function F(k,I){var R=k;if(33>R.charCodeAt(0)&&(R=R.trim()),Ot=R,R=[Ot],0<We){var H=w(-1,I,R,R,Xe,Be,0,0,0,0);H!==void 0&&typeof H=="string"&&(I=H)}var b=t(Ct,R,I,0,0);return 0<We&&(H=w(-2,b,R,R,Xe,Be,b.length,0,0,0),H!==void 0&&(b=H)),Ot="",qe=0,Be=Xe=1,b}var V=/^\0+/g,J=/[\0\r\f]/g,se=/: */g,Z=/zoo|gra/,Q=/([,: ])(transform)/g,U=/,\r+?/g,ue=/([\t\r\n ])*\f?&/g,K=/@(k\w+)\s*(\S*)\s*/,Re=/::(place)/g,Ee=/:(read-only)/g,Ie=/[svh]\w+-[tblr]{2}/,it=/\(\s*(.*)\s*\)/g,bt=/([\s\S]*?);/g,He=/-self|flex-/g,Qe=/[^]*?(:[rp][el]a[\w-]+)[^]*/,at=/stretch|:\s*\w+\-(?:conte|avail)/,wt=/([^-])(image-set\()/,Be=1,Xe=1,qe=0,Le=1,Ct=[],Je=[],We=0,Tt=null,xt=0,Ot="";return F.use=A,F.set=C,r!==void 0&&C(r),F}const De=_e;var dt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};const ht=dt;function Yt(r){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=r(n)),t[n]}}var Mt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,tt=Yt(function(r){return Mt.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),Ft=Y(4674),kt=Y.n(Ft),gt,Dt,ze,rt,zr,Vr;function Ve(){return(Ve=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r}).apply(this,arguments)}var hr=function(r,t){for(var n=[r[0]],o=0,c=t.length;o<c;o+=1)n.push(t[o],r[o+1]);return n},Xt=function(r){return r!==null&&typeof r=="object"&&(r.toString?r.toString():Object.prototype.toString.call(r))==="[object Object]"&&!(0,et.typeOf)(r)},Nt=Object.freeze([]),ot=Object.freeze({});function mt(r){return typeof r=="function"}function Jt(r){return r.displayName||r.name||"Component"}function Zt(r){return r&&typeof r.styledComponentId=="string"}var st=typeof process<"u"&&!0&&("MISSING_ENV_VAR".REACT_APP_SC_ATTR||"MISSING_ENV_VAR".SC_ATTR)||"data-styled",Ln="5.3.11",_t=typeof window<"u"&&"HTMLElement"in window,Br=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&("MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY!==void 0&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY!==""?"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY!=="false"&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY:"MISSING_ENV_VAR".SC_DISABLE_SPEEDY!==void 0&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY!==""&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY!=="false"&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY)),Gr={},Un={};function zn(){for(var r=arguments.length<=0?void 0:arguments[0],t=[],n=1,o=arguments.length;n<o;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach(function(c){r=r.replace(/%[a-z]/,c)}),r}function Ye(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];throw new Error("An error occurred. See https://git.io/JUIaE#"+r+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var Hr=function(){function r(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=r.prototype;return t.indexOfGroup=function(n){for(var o=0,c=0;c<n;c++)o+=this.groupSizes[c];return o},t.insertRules=function(n,o){if(n>=this.groupSizes.length){for(var c=this.groupSizes,h=c.length,m=h;n>=m;)(m<<=1)<0&&Ye(16,""+n);this.groupSizes=new Uint32Array(m),this.groupSizes.set(c),this.length=m;for(var w=h;w<m;w++)this.groupSizes[w]=0}for(var A=this.indexOfGroup(n+1),C=0,F=o.length;C<F;C++)this.tag.insertRule(A,o[C])&&(this.groupSizes[n]++,A++)},t.clearGroup=function(n){if(n<this.length){var o=this.groupSizes[n],c=this.indexOfGroup(n),h=c+o;this.groupSizes[n]=0;for(var m=c;m<h;m++)this.tag.deleteRule(c)}},t.getGroup=function(n){var o="";if(n>=this.length||this.groupSizes[n]===0)return o;for(var c=this.groupSizes[n],h=this.indexOfGroup(n),m=h+c,w=h;w<m;w++)o+=this.tag.getRule(w)+`/*!sc*/
17
- `;return o},r}(),Lt=new Map,Ut=new Map,At=1,zt=function(r){if(Lt.has(r))return Lt.get(r);for(;Ut.has(At);)At++;var t=At++;return Lt.set(r,t),Ut.set(t,r),t},Wr=function(r){return Ut.get(r)},Kr=function(r,t){t>=At&&(At=t+1),Lt.set(r,t),Ut.set(t,r)},Yr="style["+st+'][data-styled-version="5.3.11"]',Xr=new RegExp("^"+st+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Jr=function(r,t,n){for(var o,c=n.split(","),h=0,m=c.length;h<m;h++)(o=c[h])&&r.registerName(t,o)},Zr=function(r,t){for(var n=(t.textContent||"").split(`/*!sc*/
18
- `),o=[],c=0,h=n.length;c<h;c++){var m=n[c].trim();if(m){var w=m.match(Xr);if(w){var A=0|parseInt(w[1],10),C=w[2];A!==0&&(Kr(C,A),Jr(r,C,w[3]),r.getTag().insertRules(A,o)),o.length=0}else o.push(m)}}},Qt=function(){return Y.nc},gr=function(r){var t=document.head,n=r||t,o=document.createElement("style"),c=function(w){for(var A=w.childNodes,C=A.length;C>=0;C--){var F=A[C];if(F&&F.nodeType===1&&F.hasAttribute(st))return F}}(n),h=c!==void 0?c.nextSibling:null;o.setAttribute(st,"active"),o.setAttribute("data-styled-version","5.3.11");var m=Qt();return m&&o.setAttribute("nonce",m),n.insertBefore(o,h),o},_r=function(){function r(n){var o=this.element=gr(n);o.appendChild(document.createTextNode("")),this.sheet=function(c){if(c.sheet)return c.sheet;for(var h=document.styleSheets,m=0,w=h.length;m<w;m++){var A=h[m];if(A.ownerNode===c)return A}Ye(17)}(o),this.length=0}var t=r.prototype;return t.insertRule=function(n,o){try{return this.sheet.insertRule(o,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var o=this.sheet.cssRules[n];return o!==void 0&&typeof o.cssText=="string"?o.cssText:""},r}(),Qr=function(){function r(n){var o=this.element=gr(n);this.nodes=o.childNodes,this.length=0}var t=r.prototype;return t.insertRule=function(n,o){if(n<=this.length&&n>=0){var c=document.createTextNode(o),h=this.nodes[n];return this.element.insertBefore(c,h||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},r}(),qr=function(){function r(n){this.rules=[],this.length=0}var t=r.prototype;return t.insertRule=function(n,o){return n<=this.length&&(this.rules.splice(n,0,o),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},r}(),mr=_t,en={isServer:!_t,useCSSOMInjection:!Br},vt=function(){function r(n,o,c){n===void 0&&(n=ot),o===void 0&&(o={}),this.options=Ve({},en,{},n),this.gs=o,this.names=new Map(c),this.server=!!n.isServer,!this.server&&_t&&mr&&(mr=!1,function(h){for(var m=document.querySelectorAll(Yr),w=0,A=m.length;w<A;w++){var C=m[w];C&&C.getAttribute(st)!=="active"&&(Zr(h,C),C.parentNode&&C.parentNode.removeChild(C))}}(this))}r.registerId=function(n){return zt(n)};var t=r.prototype;return t.reconstructWithOptions=function(n,o){return o===void 0&&(o=!0),new r(Ve({},this.options,{},n),this.gs,o&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(c=(o=this.options).isServer,h=o.useCSSOMInjection,m=o.target,n=c?new qr(m):h?new _r(m):new Qr(m),new Hr(n)));var n,o,c,h,m},t.hasNameForId=function(n,o){return this.names.has(n)&&this.names.get(n).has(o)},t.registerName=function(n,o){if(zt(n),this.names.has(n))this.names.get(n).add(o);else{var c=new Set;c.add(o),this.names.set(n,c)}},t.insertRules=function(n,o,c){this.registerName(n,o),this.getTag().insertRules(zt(n),c)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(zt(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var o=n.getTag(),c=o.length,h="",m=0;m<c;m++){var w=Wr(m);if(w!==void 0){var A=n.names.get(w),C=o.getGroup(m);if(A&&C&&A.size){var F=st+".g"+m+'[id="'+w+'"]',V="";A!==void 0&&A.forEach(function(J){J.length>0&&(V+=J+",")}),h+=""+C+F+'{content:"'+V+`"}/*!sc*/
19
- `}}}return h}(this)},r}(),tn=/(a)(d)/gi,vr=function(r){return String.fromCharCode(r+(r>25?39:97))};function qt(r){var t,n="";for(t=Math.abs(r);t>52;t=t/52|0)n=vr(t%52)+n;return(vr(t%52)+n).replace(tn,"$1-$2")}var yt=function(r,t){for(var n=t.length;n;)r=33*r^t.charCodeAt(--n);return r},yr=function(r){return yt(5381,r)};function br(r){for(var t=0;t<r.length;t+=1){var n=r[t];if(mt(n)&&!Zt(n))return!1}return!0}var rn=yr("5.3.11"),nn=function(){function r(t,n,o){this.rules=t,this.staticRulesId="",this.isStatic=(o===void 0||o.isStatic)&&br(t),this.componentId=n,this.baseHash=yt(rn,n),this.baseStyle=o,vt.registerId(n)}return r.prototype.generateAndInjectStyles=function(t,n,o){var c=this.componentId,h=[];if(this.baseStyle&&h.push(this.baseStyle.generateAndInjectStyles(t,n,o)),this.isStatic&&!o.hash)if(this.staticRulesId&&n.hasNameForId(c,this.staticRulesId))h.push(this.staticRulesId);else{var m=ut(this.rules,t,n,o).join(""),w=qt(yt(this.baseHash,m)>>>0);if(!n.hasNameForId(c,w)){var A=o(m,"."+w,void 0,c);n.insertRules(c,w,A)}h.push(w),this.staticRulesId=w}else{for(var C=this.rules.length,F=yt(this.baseHash,o.hash),V="",J=0;J<C;J++){var se=this.rules[J];if(typeof se=="string")V+=se;else if(se){var Z=ut(se,t,n,o),Q=Array.isArray(Z)?Z.join(""):Z;F=yt(F,Q+J),V+=Q}}if(V){var U=qt(F>>>0);if(!n.hasNameForId(c,U)){var ue=o(V,"."+U,void 0,c);n.insertRules(c,U,ue)}h.push(U)}}return h.join(" ")},r}(),on=/^\s*\/\/.*$/gm,sn=[":","[",".","#"];function wr(r){var t,n,o,c,h=r===void 0?ot:r,m=h.options,w=m===void 0?ot:m,A=h.plugins,C=A===void 0?Nt:A,F=new De(w),V=[],J=function(Q){function U(ue){if(ue)try{Q(ue+"}")}catch{}}return function(ue,K,Re,Ee,Ie,it,bt,He,Qe,at){switch(ue){case 1:if(Qe===0&&K.charCodeAt(0)===64)return Q(K+";"),"";break;case 2:if(He===0)return K+"/*|*/";break;case 3:switch(He){case 102:case 112:return Q(Re[0]+K),"";default:return K+(at===0?"/*|*/":"")}case-2:K.split("/*|*/}").forEach(U)}}}(function(Q){V.push(Q)}),se=function(Q,U,ue){return U===0&&sn.indexOf(ue[n.length])!==-1||ue.match(c)?Q:"."+t};function Z(Q,U,ue,K){K===void 0&&(K="&");var Re=Q.replace(on,""),Ee=U&&ue?ue+" "+U+" { "+Re+" }":Re;return t=K,n=U,o=new RegExp("\\"+n+"\\b","g"),c=new RegExp("(\\"+n+"\\b){2,}"),F(ue||!U?"":U,Ee)}return F.use([].concat(C,[function(Q,U,ue){Q===2&&ue.length&&ue[0].lastIndexOf(n)>0&&(ue[0]=ue[0].replace(o,se))},J,function(Q){if(Q===-2){var U=V;return V=[],U}}])),Z.hash=C.length?C.reduce(function(Q,U){return U.name||Ye(15),yt(Q,U.name)},5381).toString():"",Z}var er=Ae.createContext(),Vn=er.Consumer,tr=Ae.createContext(),xr=(tr.Consumer,new vt),rr=wr();function nr(){return(0,Ae.useContext)(er)||xr}function Sr(){return(0,Ae.useContext)(tr)||rr}function an(r){var t=(0,Ae.useState)(r.stylisPlugins),n=t[0],o=t[1],c=nr(),h=(0,Ae.useMemo)(function(){var w=c;return r.sheet?w=r.sheet:r.target&&(w=w.reconstructWithOptions({target:r.target},!1)),r.disableCSSOMInjection&&(w=w.reconstructWithOptions({useCSSOMInjection:!1})),w},[r.disableCSSOMInjection,r.sheet,r.target]),m=(0,Ae.useMemo)(function(){return wr({options:{prefix:!r.disableVendorPrefixes},plugins:n})},[r.disableVendorPrefixes,n]);return(0,Ae.useEffect)(function(){ft()(n,r.stylisPlugins)||o(r.stylisPlugins)},[r.stylisPlugins]),Ae.createElement(er.Provider,{value:h},Ae.createElement(tr.Provider,{value:m},r.children))}var Ar=function(){function r(t,n){var o=this;this.inject=function(c,h){h===void 0&&(h=rr);var m=o.name+h.hash;c.hasNameForId(o.id,m)||c.insertRules(o.id,m,h(o.rules,m,"@keyframes"))},this.toString=function(){return Ye(12,String(o.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return r.prototype.getName=function(t){return t===void 0&&(t=rr),this.name+t.hash},r}(),cn=/([A-Z])/,ln=/([A-Z])/g,un=/^ms-/,pn=function(r){return"-"+r.toLowerCase()};function Er(r){return cn.test(r)?r.replace(ln,pn).replace(un,"-ms-"):r}var Cr=function(r){return r==null||r===!1||r===""};function ut(r,t,n,o){if(Array.isArray(r)){for(var c,h=[],m=0,w=r.length;m<w;m+=1)(c=ut(r[m],t,n,o))!==""&&(Array.isArray(c)?h.push.apply(h,c):h.push(c));return h}if(Cr(r))return"";if(Zt(r))return"."+r.styledComponentId;if(mt(r)){if(typeof(C=r)!="function"||C.prototype&&C.prototype.isReactComponent||!t)return r;var A=r(t);return ut(A,t,n,o)}var C;return r instanceof Ar?n?(r.inject(n,o),r.getName(o)):r:Xt(r)?function F(V,J){var se,Z,Q=[];for(var U in V)V.hasOwnProperty(U)&&!Cr(V[U])&&(Array.isArray(V[U])&&V[U].isCss||mt(V[U])?Q.push(Er(U)+":",V[U],";"):Xt(V[U])?Q.push.apply(Q,F(V[U],U)):Q.push(Er(U)+": "+(se=U,(Z=V[U])==null||typeof Z=="boolean"||Z===""?"":typeof Z!="number"||Z===0||se in ht||se.startsWith("--")?String(Z).trim():Z+"px")+";"));return J?[J+" {"].concat(Q,["}"]):Q}(r):r.toString()}var Tr=function(r){return Array.isArray(r)&&(r.isCss=!0),r};function Et(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return mt(r)||Xt(r)?Tr(ut(hr(Nt,[r].concat(n)))):n.length===0&&r.length===1&&typeof r[0]=="string"?r:Tr(ut(hr(r,n)))}var Bn=/invalid hook call/i,Gn=new Set,Hn=function(r,t){if(0)var n,o,c},or=function(r,t,n){return n===void 0&&(n=ot),r.theme!==n.theme&&r.theme||t||n.theme},fn=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,dn=/(^-|-$)/g;function sr(r){return r.replace(fn,"-").replace(dn,"")}var ir=function(r){return qt(yr(r)>>>0)};function Vt(r){return typeof r=="string"&&!0}var ar=function(r){return typeof r=="function"||typeof r=="object"&&r!==null&&!Array.isArray(r)},hn=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};function gn(r,t,n){var o=r[n];ar(t)&&ar(o)?Or(o,t):r[n]=t}function Or(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(var c=0,h=n;c<h.length;c++){var m=h[c];if(ar(m))for(var w in m)hn(w)&&gn(r,m[w],w)}return r}var pt=Ae.createContext(),Wn=pt.Consumer;function Kn(r){var t=gt(pt),n=Dt(function(){return function(o,c){if(!o)return Ye(14);if(mt(o)){var h=o(c);return h}return Array.isArray(o)||typeof o!="object"?Ye(8):c?Ve({},c,{},o):o}(r.theme,t)},[r.theme,t]);return r.children?ze.createElement(pt.Provider,{value:n},r.children):null}var cr={};function Pr(r,t,n){var o=Zt(r),c=!Vt(r),h=t.attrs,m=h===void 0?Nt:h,w=t.componentId,A=w===void 0?function(K,Re){var Ee=typeof K!="string"?"sc":sr(K);cr[Ee]=(cr[Ee]||0)+1;var Ie=Ee+"-"+ir("5.3.11"+Ee+cr[Ee]);return Re?Re+"-"+Ie:Ie}(t.displayName,t.parentComponentId):w,C=t.displayName,F=C===void 0?function(K){return Vt(K)?"styled."+K:"Styled("+Jt(K)+")"}(r):C,V=t.displayName&&t.componentId?sr(t.displayName)+"-"+t.componentId:t.componentId||A,J=o&&r.attrs?Array.prototype.concat(r.attrs,m).filter(Boolean):m,se=t.shouldForwardProp;o&&r.shouldForwardProp&&(se=t.shouldForwardProp?function(K,Re,Ee){return r.shouldForwardProp(K,Re,Ee)&&t.shouldForwardProp(K,Re,Ee)}:r.shouldForwardProp);var Z,Q=new nn(n,V,o?r.componentStyle:void 0),U=Q.isStatic&&m.length===0,ue=function(K,Re){return function(Ee,Ie,it,bt){var He=Ee.attrs,Qe=Ee.componentStyle,at=Ee.defaultProps,wt=Ee.foldedComponentIds,Be=Ee.shouldForwardProp,Xe=Ee.styledComponentId,qe=Ee.target,Le=function(H,b,ie){H===void 0&&(H=ot);var P=Ve({},b,{theme:H}),Oe={};return ie.forEach(function(ae){var pe,W,$e,Ue=ae;for(pe in mt(Ue)&&(Ue=Ue(P)),Ue)P[pe]=Oe[pe]=pe==="className"?(W=Oe[pe],$e=Ue[pe],W&&$e?W+" "+$e:W||$e):Ue[pe]}),[P,Oe]}(or(Ie,(0,Ae.useContext)(pt),at)||ot,Ie,He),Ct=Le[0],Je=Le[1],We=function(H,b,ie,P){var Oe=nr(),ae=Sr(),pe=b?H.generateAndInjectStyles(ot,Oe,ae):H.generateAndInjectStyles(ie,Oe,ae);return pe}(Qe,bt,Ct,void 0),Tt=it,xt=Je.$as||Ie.$as||Je.as||Ie.as||qe,Ot=Vt(xt),k=Je!==Ie?Ve({},Ie,{},Je):Ie,I={};for(var R in k)R[0]!=="$"&&R!=="as"&&(R==="forwardedAs"?I.as=k[R]:(Be?Be(R,tt,xt):!Ot||tt(R))&&(I[R]=k[R]));return Ie.style&&Je.style!==Ie.style&&(I.style=Ve({},Ie.style,{},Je.style)),I.className=Array.prototype.concat(wt,Xe,We!==Xe?We:null,Ie.className,Je.className).filter(Boolean).join(" "),I.ref=Tt,(0,Ae.createElement)(xt,I)}(Z,K,Re,U)};return ue.displayName=F,(Z=Ae.forwardRef(ue)).attrs=J,Z.componentStyle=Q,Z.displayName=F,Z.shouldForwardProp=se,Z.foldedComponentIds=o?Array.prototype.concat(r.foldedComponentIds,r.styledComponentId):Nt,Z.styledComponentId=V,Z.target=o?r.target:r,Z.withComponent=function(K){var Re=t.componentId,Ee=function(it,bt){if(it==null)return{};var He,Qe,at={},wt=Object.keys(it);for(Qe=0;Qe<wt.length;Qe++)He=wt[Qe],bt.indexOf(He)>=0||(at[He]=it[He]);return at}(t,["componentId"]),Ie=Re&&Re+"-"+(Vt(K)?K:sr(Jt(K)));return Pr(K,Ve({},Ee,{attrs:J,componentId:Ie}),n)},Object.defineProperty(Z,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(K){this._foldedDefaultProps=o?Or({},r.defaultProps,K):K}}),Object.defineProperty(Z,"toString",{value:function(){return"."+Z.styledComponentId}}),c&&kt()(Z,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),Z}var Ir=function(r){return function t(n,o,c){if(c===void 0&&(c=ot),!(0,et.isValidElementType)(o))return Ye(1,String(o));var h=function(){return n(o,c,Et.apply(void 0,arguments))};return h.withConfig=function(m){return t(n,o,Ve({},c,{},m))},h.attrs=function(m){return t(n,o,Ve({},c,{attrs:Array.prototype.concat(c.attrs,m).filter(Boolean)}))},h}(Pr,r)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(r){Ir[r]=Ir(r)});var mn=function(){function r(n,o){this.rules=n,this.componentId=o,this.isStatic=br(n),vt.registerId(this.componentId+1)}var t=r.prototype;return t.createStyles=function(n,o,c,h){var m=h(ut(this.rules,o,c,h).join(""),""),w=this.componentId+n;c.insertRules(w,w,m)},t.removeStyles=function(n,o){o.clearRules(this.componentId+n)},t.renderStyles=function(n,o,c,h){n>2&&vt.registerId(this.componentId+n),this.removeStyles(n,c),this.createStyles(n,o,c,h)},r}();function Yn(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var c=Et.apply(void 0,[r].concat(n)),h="sc-global-"+ir(JSON.stringify(c)),m=new mn(c,h);function w(C){var F=nr(),V=Sr(),J=gt(pt),se=rt(F.allocateGSInstance(h)).current;return F.server&&A(se,C,F,J,V),zr(function(){if(!F.server)return A(se,C,F,J,V),function(){return m.removeStyles(se,F)}},[se,C,F,J,V]),null}function A(C,F,V,J,se){if(m.isStatic)m.renderStyles(C,Gr,V,se);else{var Z=Ve({},F,{theme:or(F,J,w.defaultProps)});m.renderStyles(C,Z,V,se)}}return ze.memo(w)}function Xn(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var c=Et.apply(void 0,[r].concat(n)).join(""),h=ir(c);return new Ar(h,c)}var Jn=function(){function r(){var n=this;this._emitSheetCSS=function(){var o=n.instance.toString();if(!o)return"";var c=Qt();return"<style "+[c&&'nonce="'+c+'"',st+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+o+"</style>"},this.getStyleTags=function(){return n.sealed?Ye(2):n._emitSheetCSS()},this.getStyleElement=function(){var o;if(n.sealed)return Ye(2);var c=((o={})[st]="",o["data-styled-version"]="5.3.11",o.dangerouslySetInnerHTML={__html:n.instance.toString()},o),h=Qt();return h&&(c.nonce=h),[Ae.createElement("style",Ve({},c,{key:"sc-0-0"}))]},this.seal=function(){n.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}var t=r.prototype;return t.collectStyles=function(n){return this.sealed?Ye(2):Ae.createElement(an,{sheet:this.instance},n)},t.interleaveWithNodeStream=function(n){return Ye(3)},r}(),Zn=function(r){var t=ze.forwardRef(function(n,o){var c=gt(pt),h=r.defaultProps,m=or(n,c,h);return ze.createElement(r,Ve({},n,{theme:m,ref:o}))});return Vr(t,r),t.displayName="WithTheme("+Jt(r)+")",t},_n=function(){return gt(pt)},Qn={StyleSheet:vt,masterSheet:xr};const qn=null,vn=r=>Object.keys(r).reduce((t,n)=>(t[n]=(o,...c)=>Et`
16
+ */var e=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),d=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),O=Symbol.iterator;function $(y){return y===null||typeof y!="object"?null:(y=O&&y[O]||y["@@iterator"],typeof y=="function"?y:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,D={};function L(y,T,_){this.props=y,this.context=T,this.refs=D,this.updater=_||M}L.prototype.isReactComponent={},L.prototype.setState=function(y,T){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,T,"setState")},L.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function z(){}z.prototype=L.prototype;function ne(y,T,_){this.props=y,this.context=T,this.refs=D,this.updater=_||M}var j=ne.prototype=new z;j.constructor=ne,N(j,L.prototype),j.isPureReactComponent=!0;var le=Array.isArray,E=Object.prototype.hasOwnProperty,fe={current:null},de={key:!0,ref:!0,__self:!0,__source:!0};function ge(y,T,_){var oe,te={},ye=null,Se=null;if(T!=null)for(oe in T.ref!==void 0&&(Se=T.ref),T.key!==void 0&&(ye=""+T.key),T)E.call(T,oe)&&!de.hasOwnProperty(oe)&&(te[oe]=T[oe]);var xe=arguments.length-2;if(xe===1)te.children=_;else if(1<xe){for(var be=Array(xe),ke=0;ke<xe;ke++)be[ke]=arguments[ke+2];te.children=be}if(y&&y.defaultProps)for(oe in xe=y.defaultProps,xe)te[oe]===void 0&&(te[oe]=xe[oe]);return{$$typeof:e,type:y,key:ye,ref:Se,props:te,_owner:fe.current}}function ee(y,T){return{$$typeof:e,type:y.type,key:T,ref:y.ref,props:y.props,_owner:y._owner}}function me(y){return typeof y=="object"&&y!==null&&y.$$typeof===e}function ve(y){var T={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(_){return T[_]})}var G=/\/+/g;function Pe(y,T){return typeof y=="object"&&y!==null&&y.key!=null?ve(""+y.key):T.toString(36)}function X(y,T,_,oe,te){var ye=typeof y;(ye==="undefined"||ye==="boolean")&&(y=null);var Se=!1;if(y===null)Se=!0;else switch(ye){case"string":case"number":Se=!0;break;case"object":switch(y.$$typeof){case e:case i:Se=!0}}if(Se)return Se=y,te=te(Se),y=oe===""?"."+Pe(Se,0):oe,le(te)?(_="",y!=null&&(_=y.replace(G,"$&/")+"/"),X(te,T,_,"",function(ke){return ke})):te!=null&&(me(te)&&(te=ee(te,_+(!te.key||Se&&Se.key===te.key?"":(""+te.key).replace(G,"$&/")+"/")+y)),T.push(te)),1;if(Se=0,oe=oe===""?".":oe+":",le(y))for(var xe=0;xe<y.length;xe++){ye=y[xe];var be=oe+Pe(ye,xe);Se+=X(ye,T,_,be,te)}else if(be=$(y),typeof be=="function")for(y=be.call(y),xe=0;!(ye=y.next()).done;)ye=ye.value,be=oe+Pe(ye,xe++),Se+=X(ye,T,_,be,te);else if(ye==="object")throw T=String(y),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return Se}function we(y,T,_){if(y==null)return y;var oe=[],te=0;return X(y,oe,"","",function(ye){return T.call(_,ye,te++)}),oe}function Ke(y){if(y._status===-1){var T=y._result;T=T(),T.then(function(_){(y._status===0||y._status===-1)&&(y._status=1,y._result=_)},function(_){(y._status===0||y._status===-1)&&(y._status=2,y._result=_)}),y._status===-1&&(y._status=0,y._result=T)}if(y._status===1)return y._result.default;throw y._result}var Ce={current:null},nt={transition:null},Te={ReactCurrentDispatcher:Ce,ReactCurrentBatchConfig:nt,ReactCurrentOwner:fe};function lt(){throw Error("act(...) is not supported in production builds of React.")}u.Children={map:we,forEach:function(y,T,_){we(y,function(){T.apply(this,arguments)},_)},count:function(y){var T=0;return we(y,function(){T++}),T},toArray:function(y){return we(y,function(T){return T})||[]},only:function(y){if(!me(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},u.Component=L,u.Fragment=a,u.Profiler=p,u.PureComponent=ne,u.StrictMode=l,u.Suspense=v,u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Te,u.act=lt,u.cloneElement=function(y,T,_){if(y==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+y+".");var oe=N({},y.props),te=y.key,ye=y.ref,Se=y._owner;if(T!=null){if(T.ref!==void 0&&(ye=T.ref,Se=fe.current),T.key!==void 0&&(te=""+T.key),y.type&&y.type.defaultProps)var xe=y.type.defaultProps;for(be in T)E.call(T,be)&&!de.hasOwnProperty(be)&&(oe[be]=T[be]===void 0&&xe!==void 0?xe[be]:T[be])}var be=arguments.length-2;if(be===1)oe.children=_;else if(1<be){xe=Array(be);for(var ke=0;ke<be;ke++)xe[ke]=arguments[ke+2];oe.children=xe}return{$$typeof:e,type:y.type,key:te,ref:ye,props:oe,_owner:Se}},u.createContext=function(y){return y={$$typeof:d,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},y.Provider={$$typeof:f,_context:y},y.Consumer=y},u.createElement=ge,u.createFactory=function(y){var T=ge.bind(null,y);return T.type=y,T},u.createRef=function(){return{current:null}},u.forwardRef=function(y){return{$$typeof:g,render:y}},u.isValidElement=me,u.lazy=function(y){return{$$typeof:S,_payload:{_status:-1,_result:y},_init:Ke}},u.memo=function(y,T){return{$$typeof:x,type:y,compare:T===void 0?null:T}},u.startTransition=function(y){var T=nt.transition;nt.transition={};try{y()}finally{nt.transition=T}},u.unstable_act=lt,u.useCallback=function(y,T){return Ce.current.useCallback(y,T)},u.useContext=function(y){return Ce.current.useContext(y)},u.useDebugValue=function(){},u.useDeferredValue=function(y){return Ce.current.useDeferredValue(y)},u.useEffect=function(y,T){return Ce.current.useEffect(y,T)},u.useId=function(){return Ce.current.useId()},u.useImperativeHandle=function(y,T,_){return Ce.current.useImperativeHandle(y,T,_)},u.useInsertionEffect=function(y,T){return Ce.current.useInsertionEffect(y,T)},u.useLayoutEffect=function(y,T){return Ce.current.useLayoutEffect(y,T)},u.useMemo=function(y,T){return Ce.current.useMemo(y,T)},u.useReducer=function(y,T,_){return Ce.current.useReducer(y,T,_)},u.useRef=function(y){return Ce.current.useRef(y)},u.useState=function(y){return Ce.current.useState(y)},u.useSyncExternalStore=function(y,T,_){return Ce.current.useSyncExternalStore(y,T,_)},u.useTransition=function(){return Ce.current.useTransition()},u.version="18.3.1"},2155(s,u,e){"use strict";s.exports=e(6018)},162(s){s.exports=function(e,i,a,l){var p=a?a.call(l,e,i):void 0;if(p!==void 0)return!!p;if(e===i)return!0;if(typeof e!="object"||!e||typeof i!="object"||!i)return!1;var f=Object.keys(e),d=Object.keys(i);if(f.length!==d.length)return!1;for(var g=Object.prototype.hasOwnProperty.bind(i),v=0;v<f.length;v++){var x=f[v];if(!g(x))return!1;var S=e[x],O=i[x];if(p=a?a.call(l,S,O,x):void 0,p===!1||p===void 0&&S!==O)return!1}return!0}}},jt={};function Y(s){var u=jt[s];if(u!==void 0)return u.exports;var e=jt[s]={id:s,loaded:!1,exports:{}};return dr[s](e,e.exports,Y),e.loaded=!0,e.exports}Y.n=s=>{var u=s&&s.__esModule?()=>s.default:()=>s;return Y.d(u,{a:u}),u},Y.d=(s,u)=>{for(var e in u)Y.o(u,e)&&!Y.o(s,e)&&Object.defineProperty(s,e,{enumerable:!0,get:u[e]})},Y.o=(s,u)=>Object.prototype.hasOwnProperty.call(s,u),Y.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},Y.nmd=s=>(s.paths=[],s.children||(s.children=[]),s),(()=>{var s;globalThis.importScripts&&(s=globalThis.location+"");var u=globalThis.document;if(!s&&u&&(u.currentScript&&u.currentScript.tagName.toUpperCase()==="SCRIPT"&&(s=u.currentScript.src),!s)){var e=u.getElementsByTagName("script");if(e.length)for(var i=e.length-1;i>-1&&(!s||!/^http(s?):/.test(s));)s=e[i--].src}if(!s)throw new Error("Automatic publicPath is not supported in this browser");s=s.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),Y.p=s})(),Y.nc=void 0;var Gt={};return(()=>{"use strict";Y.r(Gt),Y.d(Gt,{CAppBridge:()=>kn,Event:()=>le,LaunchMode:()=>z,MicroAppManager:()=>ne,ScriptLoader:()=>Mr,ScriptingObject:()=>me,SecurityContext:()=>s,StyleLoader:()=>Fr});var s=(r=>(r.USER="USER",r.PARTNER="PARTNER",r))(s||{}),u=Y(114),e=Y.n(u),i=Y(2249),a=Y.n(i),l=Y(7181),p=Y.n(l),f=Y(7605),d=Y.n(f),g=Y(277),v=Y.n(g);const x=JSON.parse('{"appId":"microfe","activeEnv":"localhost","googleTagManager":true,"sessionTimeoutWarnInterval":"7200000","sessionTimeoutInterval":"9000000","microFrontendApps":{"loanapp":{"name":"Loan","hostUrl":"./loan","development":{"files":["index.js"]},"production":{"files":["index.js"]}},"taskapp":{"name":"Task","hostUrl":"./task","mode":"development","development":{"files":["index.dev.js"]},"production":{"files":["index.js"]}},"travelhub":{"name":"TravelHub","hostUrl":"./travelhub","development":{"files":["app.js","landing.js","app.css","landing.css"]},"production":{"files":["app.js","landing.js","app.css","landing.css"]}},"flights":{"name":"Flights","hostUrl":"./flights","development":{"files":["app.js","app.css"]},"production":{"files":["app.js","app.css"]}},"hotels":{"name":"Hotels","hostUrl":"./hotels","development":{"files":["app.js","app.css"]},"production":{"files":["app.js","app.css"]}},"ssfapp":{"name":"SSF App","hostUrl":"./ssf-app","microappManager":"ssf"}},"serviceEndpoints":{"api":"","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"},"env":{"localhost":{"serviceEndpoints":{"api":"","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"dev":{"serviceEndpoints":{"api":"https://dev.api.puiservice.rd.elliemae.io","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"dev2":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa":{"serviceEndpoints":{"api":"https://dev.api.puiservice.rd.elliemae.io","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa2":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"qa3":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"int":{"serviceEndpoints":{"api":"https://int.api.ellielabs.com","idp":"https://int.idp.ellielabs.com","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-osb1":{"serviceEndpoints":{"api":"https://encompass-peg-api.elliemae.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-osb2":{"serviceEndpoints":{"api":"https://encompass-peg2-api.elliemae.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg":{"serviceEndpoints":{"api":"https://peg2-west.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-oapi-west":{"serviceEndpoints":{"api":"https://peg2-west.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg-oapi-east":{"serviceEndpoints":{"api":"https://peg2-east.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg2-oapi-east":{"serviceEndpoints":{"api":"https://peg2-east.api.ellielabs.com","idp":"https://peg.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"peg3":{"serviceEndpoints":{"api":"https://pel1.api.ellielabs.com","idp":"https://peg3.idp.ellielabs.com/authorize","logger":"https://int.api.ellielabs.com/diagnostics/v2/logging"}},"stage":{"serviceEndpoints":{"api":"https://stg.api.elliemae.com","idp":"https://stg.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"beta":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"demo":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"epc":{"serviceEndpoints":{"api":"https://concept.api.elliemae.com","idp":"https://concept.idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}},"prod":{"serviceEndpoints":{"api":"https://api.elliemae.com","idp":"https://idp.elliemae.com/authorize","logger":"https://api.ellielabs.com/diagnostics/v2/logging"}}}}'),S="latest",O=r=>r.replace(/([^:]\/)\/+/g,"$1"),$=r=>{const t=document.createElement("a");return t.href=r,t.href},M=r=>r?.replace?.(/\/?$/,"/"),N=(r,t)=>`${r.replace(/\/+$/,"")}/${t.replace(/^\/+/,"")}`,D=()=>window.navigator.userAgent.includes("jsdom"),L=r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");var z=(r=>(r.DEVELOPMENT="development",r.PRODUCTION="production",r))(z||{}),ne=(r=>(r.SSF="ssf",r.APPSDK="appsdk",r))(ne||{});class j{#e=x;#t;#r;constructor(t){this.#t=t?.version||S,this.#r=M(t?.baseUrl||"")}#s=t=>{const{activeEnv:n,env:o,...c}=t,h=o[n]||{};this.#e=v()({},c,h)};get=(t="",n=null)=>e()(a()(this.#e,t,n));set=(t,n)=>{p()(this.#e,t,n)};has=(t="")=>d()(this.#e,t);#n=()=>{if(!/(?:\/)(\d+\.\d+|latest)(?:\/?)?$/.test(this.#r)){const n=this.#t.match(/^(?:\d+\.\d+)*/g);return M(`${this.#r}${n?.[0]||S}`)}return this.#r};load=async t=>{const n=t??`${this.#n()}app.config.json`;let o;try{o=await fetch(n)}catch(c){if(!t&&this.#t!==S){await this.load(`${this.#r}latest/app.config.json`);return}throw new Error("Failed to fetch app config",{cause:c})}if(o.ok)try{const c=await o.json();this.#s(c)}catch(c){if(!t&&this.#t!==S)await this.load(`${this.#r}latest/app.config.json`);else throw new Error("Failed to parse app config",{cause:c})}else{if(!t&&this.#t!==S){await this.load(`${this.#r}latest/app.config.json`);return}throw new Error("Failed to load app config")}}}class le{name;objectId;id;constructor(t){const{name:n,objectId:o}=t;if(!n)throw new Error("Event name is required");if(!o)throw new Error("Scripting object id is required");this.objectId=o,this.name=n,this.id=`${this.objectId}.${this.name}`.toLowerCase()}}class E{static[Symbol.hasInstance](t){return typeof t=="object"&&t!==null&&"getType"in t&&typeof t.getType=="function"&&t.getType()==="ProxyEvent"}#e;objectId;name;id;getType(){return"ProxyEvent"}constructor(t){const{name:n,objectId:o,eventSrc:c}=t;if(!n)throw new Error("Event name is required");if(!o)throw new Error("Scripting object id is required");if(!c)throw new Error("Event source is required");this.objectId=o,this.name=n,this.#e=c,this.id=`${this.objectId}.${this.name}`.toLowerCase()}subscribe=t=>this.#e.subscribe({eventId:this.id,callback:t});unsubscribe=t=>{this.#e.unsubscribe({eventId:this.id,token:t})}}const fe=r=>r instanceof le,de=(r,t)=>`${r.toLowerCase()}.${t.toLowerCase()}`,ge="function",ee=(r,t)=>typeof r===ge&&!!t&&!t.startsWith("_");class me{#e;#t="Object";constructor(t,n){this.#e=t,this.#t=n||this.#t}get id(){return this.#e}get objectType(){return this.#t}_toJSON=()=>{const t=[],n=[];return Object.keys(this).forEach(o=>{const c=this[o];fe(c)?n.push(o):ee(c,o)&&t.push(o)}),{objectId:this.#e,objectType:this.#t,functions:t,events:n}};_dispose=()=>{};dispose=()=>{}}var ve=Y(5345),G=Y.n(ve);const X={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let we;const Ke=new Uint8Array(16);function Ce(){if(!we&&(we=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!we))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return we(Ke)}var nt;const Te=[];for(let r=0;r<256;++r)Te.push((r+256).toString(16).slice(1));function lt(r,t=0){return Te[r[t+0]]+Te[r[t+1]]+Te[r[t+2]]+Te[r[t+3]]+"-"+Te[r[t+4]]+Te[r[t+5]]+"-"+Te[r[t+6]]+Te[r[t+7]]+"-"+Te[r[t+8]]+Te[r[t+9]]+"-"+Te[r[t+10]]+Te[r[t+11]]+Te[r[t+12]]+Te[r[t+13]]+Te[r[t+14]]+Te[r[t+15]]}function y(r,t=0){const n=lt(r,t);if(!nt(n))throw TypeError("Stringified UUID is invalid");return n}const T=null;function _(r,t,n){if(X.randomUUID&&!t&&!r)return X.randomUUID();r=r||{};const o=r.random||(r.rng||Ce)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){n=n||0;for(let c=0;c<16;++c)t[n+c]=o[c];return t}return lt(o)}const oe=_;var te=(r=>(r.Analytics="analytics",r.Application="application",r.Auth="auth",r.Form="form",r.Global="global",r.Http="http",r.Loan="loan",r.LoanV2="loanV2",r.MemStorage="memstorage",r.Module="module",r.Service="service",r.Session="session",r.Styling="styling",r.Transaction="transaction",r.TransactionTemplate="transactiontemplate",r))(te||{});const ye="module";var Se=(r=>(r.USER="USER",r.PARTNER="PARTNER",r))(Se||{});class xe{#e=t=>t.trim().toLowerCase();#t=new Map;#r=new Map;#s=t=>{const{so:n,guestId:o}=t,c=this.#e(n.id),h=this.#r.get(o);if(!h)this.#r.set(o,new Map([[c,t]]));else{if(h.has(c))throw new Error(`Scripting Object ${n.id} already exists for guest ${o}`);h.set(c,t)}};#n=({so:t})=>{if(t._dispose&&typeof t._dispose=="function")try{t._dispose()}catch{}};#a=({objectId:t,guestId:n})=>{if(t===ye&&!n)for(const[,c]of this.#r){const h=c.get(t);if(h)return h}const o=n?this.#r.get(n):null;return o?o.get(t)??null:null};#o=({objectId:t,guestId:n}={})=>{if(n){if(!t){const c=this.#r.get(n);c&&c.forEach(this.#n),this.#r.delete(n);return}const o=this.#r.get(n);if(o){const c=o.get(t);c&&this.#n(c),o.delete(t)}}else t&&this.#r.forEach(o=>{const c=o.get(t);c&&this.#n(c),o.delete(t)})};addScriptingObject=(t,n)=>{const{guestId:o}=n||{};if(!t?.id||!t?._toJSON)throw new Error("Object is not derived from ScriptingObject");const c=this.#e(t.id);if(c===ye&&!o)throw new Error("Guest id is required to add Module scripting object");if(o){this.#s({so:t,...n,guestId:o});return}if(this.#t.has(c))throw new Error(`Scripting Object ${t.id} already exists`);this.#t.set(c,{so:t,...n})};getObject=(t,n)=>{const o=this.#e(t);let c=this.#a({objectId:o,guestId:n?.id});c=c??this.#t.get(o)??null;const{so:h}=c||{};return h||null};has=(t,n)=>this.getObject(t,n)!==null;listScriptingObjects=t=>{const n=new Set(this.#t.keys()),o=this.#r.get(t);if(o)for(const c of o.keys())n.add(c);return Array.from(n)};removeScriptingObject=(t,n)=>{const o=this.#e(t);if(n)this.#o({objectId:o,guestId:n});else{this.#o({objectId:o});const c=this.#t.get(o);c&&this.#n(c),this.#t.delete(o)}};removeAllScriptingObjects=t=>{t?this.#o({guestId:t}):(this.#t.forEach(this.#n),this.#t.clear())}}class be{__TYPE__="Proxy";id;objectType;constructor(t,n){this.id=t,this.objectType=n}}const ke=r=>r?.constructor?.name==="Proxy"||r?.constructor?.name==="ScriptingObjectProxy"||r?.__TYPE__==="Proxy";class Ht{#e=new Map;#t=new WeakMap;#r;constructor(t){this.#r=t}#s=(t,n)=>{const o=new Promise(c=>{setTimeout(()=>{c()},n)});return Promise.race([t,o])};#n=t=>{const{eventName:n,scriptingObject:o,eventParams:c,listeners:h}=t;h.forEach(m=>{m.criteria&&!(c&&this.#o(c,m.criteria))||Promise.resolve(m.callback({obj:o,eventName:n,eventParams:c})).catch(w=>{this.#r?.warn(`Error in event listener for "${n}": ${w.message}`)})})};#a=async({eventId:t,eventName:n,scriptingObject:o,eventParams:c,feedbackWaitTime:h})=>{const w=(this.#e.get(t)||[]).map(C=>C.criteria&&!(c?this.#o(c,C.criteria):!1)?Promise.resolve():this.#s(C.callback({obj:o,eventName:n,eventParams:c}),h));return(await Promise.all(w)).flat(1/0).filter(C=>C!==void 0)};#o(t,n){return Object.entries(n).every(([o,c])=>{const h=t[o];if("eq"in c)return h===c.eq;if("in"in c)return Array.isArray(c.in)&&c.in.includes(h);if("includes"in c)return Array.isArray(h)&&h.includes(c.includes);if("gt"in c){const m=typeof h=="number"?h:Number(h);return!Number.isNaN(m)&&m>c.gt}if("lt"in c){const m=typeof h=="number"?h:Number(h);return!Number.isNaN(m)&&m<c.lt}if("regex"in c){let m=this.#t.get(c);if(m===void 0){try{m=new RegExp(c.regex)}catch{m=null}this.#t.set(c,m)}return m!==null&&typeof h=="string"&&m.test(h)}return!1})}dispatchEvent=async(t,n)=>{const{event:{id:o,name:c},eventParams:h,eventOptions:m}=n,{timeout:w}=m??{};if(!o)throw new Error("Event Id is required");const A=this.#e.get(o)||[];return!w||w<=0?(this.#n({eventName:c,scriptingObject:t,eventParams:h,listeners:A}),Promise.resolve()):this.#a({eventId:o,eventName:c,scriptingObject:t,eventParams:h,feedbackWaitTime:w})};subscribe=t=>{const{eventId:n,callback:o,criteria:c}=t;if(!n)throw new Error("eventId is required");if(!o)throw new Error("Callback is required");const h=this.#e.get(n)||[],m=oe();return h.push({token:m,criteria:c,callback:o}),this.#e.set(n,h),m};unsubscribe=t=>{const{eventId:n,token:o}=t;if(!n)throw new Error("eventId id is required");if(o){const c=this.#e.get(n)||[],h=c.findIndex(m=>m.token===o);h>-1&&(c.splice(h,1),this.#e.set(n,c))}else this.#e.delete(n)};unsubscribeAll=()=>{this.#e.clear()}}const Rt=Y.p+"671d9de68be598da64ca.html?resource",St="pui-app-container-",Wt=({id:r,instanceId:t,manifestPath:n,hostUrl:o,options:c})=>new Promise((h,m)=>{const w=document.createElement("div");w.setAttribute("style","display: flex;width: 100%;height: 100%;flex-direction: column;overflow: hidden;");const A=document.createElement("iframe");A.setAttribute("id",t),A.setAttribute("data-testid",r),A.setAttribute("title",c.title),A.setAttribute("allowfullscreen","true"),A.setAttribute("allowtransparency","true"),c.permissionPolicy&&A.setAttribute("allow",c.permissionPolicy),c.sandbox&&A.setAttribute("sandbox",c.sandbox),A.setAttribute("style",c.style??"flex-grow: 1;border: none;margin: 0;padding: 0;display: block;min-width: 100%;height: 100%;");const C=c.src??Rt.default??Rt;let F=C;if(c.queryParams){const U=c.queryParams.replace(/[^a-zA-Z0-9&=_.~%+-]/g,"");F=`${C}${C.includes("?")?"&":"?"}${U}`}A.setAttribute("src",F);const V=1e4;let J=!1;const se=setTimeout(()=>{J||(J=!0,m(new Error(`iframe for ${r} failed to load within ${V}ms`)))},V);A.addEventListener("error",()=>{J||(J=!0,clearTimeout(se),m(new Error(`iframe for ${r} failed to load`)))}),A.addEventListener("load",()=>{if(J||!A.contentDocument)return;J=!0,clearTimeout(se);const U=A.contentDocument,ue=U.getElementById(St);ue&&(ue.id=`${ue.id}${r}`);let K=U.getElementsByTagName("base")?.[0];K?K.href=new URL(n,o).href:(K=U.createElement("base"),K.href=new URL(n,o).href,U.getElementsByTagName("head")[0].appendChild(K)),h(A)}),w.appendChild(A);const{containerId:Z}=c;(document.getElementById(Z??"")??document.body).appendChild(w)}),$t=r=>document.getElementById(r),Ge={create:Wt,remove:r=>{const t=$t(r);t&&t.parentElement?.remove()},get:$t},re=()=>({breakpoints:["512px","768px","1024px","350px"],spaces:["0","4px","8px","12px","16px","32px","48px","56px","64px","72px"],fontSizes:["0.8461rem","0.9230rem","1rem","1.0769rem","1.2307rem","1.3846rem","1.8461rem","2.7692rem"],fontWeights:[100,200,300,400,500,600,700,800,900],lineHeights:["1rem","1.15rem","1.25rem","1.5rem"],letterSpacings:["normal","0.1rem","-0.05rem","0.25rem"],fonts:["proxima-nova, Arial, sans-serif"],colors:{neutral:["#FFFFFF","#F6F7F9","#EBEDF0","#E0E3E8","#CBCFD7","#B0B9C8","#8C93A6","#697489","#464F5C","#353C46","#25292F"],brand:["#F6FBFF","#EBF6FF","#A3D6FF","#52A6EC","#1394E5","#1E79C2","#006AA9","#005181","#C9E7FF"],success:["#E1F4ED","#E1F4ED","#289F6B","#207E56","#185D44"],warning:["#FFEFD8","#E06C29","#B25119","#853C12"],danger:["#FBEBED","#FBEBED","#ED5A64","#C64252","#A11B2B"]},shadows:["0 1px 5px 0 rgba(0, 0, 0, 0.13), 0 2px 4px 0 rgba(0, 0, 0, 0.2)","0 6px 20px 0 rgba(0, 0, 0, 0.24), 0 8px 17px 0 rgba(0, 0, 0, 0.19)","0 12px 15px 0 rgba(0, 0, 0, 0.24), 0 17px 50px 0 rgba(0, 0, 0, 0.19)","0 16px 28px 0 rgba(0, 0, 0, 0.24), 0 25px 55px 0 rgba(0, 0, 0, 0.19)","0 27px 24px 0 rgba(0, 0, 0, 0.24), 0 40px 77px 0 rgba(0, 0, 0, 0.19)"],zIndex:[1e3,2e3,3e3,500,4e3],states:[null,"@media (prefers-reduced-motion: no-preference)","@media (prefers-reduced-motion: reduce)","&:first-child","&:last-child","&:odd","&:even","&:visited","&:checked","&:focus-within","&:hover","&:focus","&:focus-visible","&:active","&:disabled, &[aria-disabled=true]","&::placeholder"]});var et=Y(7020),Ae=Y(2155),Kt=Y(162),ft=Y.n(Kt);function _e(r){function t(k,I,R,H,b){for(var ie=0,P=0,Oe=0,ae=0,pe,W,$e=0,Ue=0,q,Ne=q=pe=0,ce=0,Me=0,Pt=0,Fe=0,Bt=R.length,It=Bt-1,Ze,B="",je="",pr="",fr="",ct;ce<Bt;){if(W=R.charCodeAt(ce),ce===It&&P+ae+Oe+ie!==0&&(P!==0&&(W=P===47?10:47),ae=Oe=ie=0,Bt++,It++),P+ae+Oe+ie===0){if(ce===It&&(0<Me&&(B=B.replace(J,"")),0<B.trim().length)){switch(W){case 32:case 9:case 59:case 13:case 10:break;default:B+=R.charAt(ce)}W=59}switch(W){case 123:for(B=B.trim(),pe=B.charCodeAt(0),q=1,Fe=++ce;ce<Bt;){switch(W=R.charCodeAt(ce)){case 123:q++;break;case 125:q--;break;case 47:switch(W=R.charCodeAt(ce+1)){case 42:case 47:e:{for(Ne=ce+1;Ne<It;++Ne)switch(R.charCodeAt(Ne)){case 47:if(W===42&&R.charCodeAt(Ne-1)===42&&ce+2!==Ne){ce=Ne+1;break e}break;case 10:if(W===47){ce=Ne+1;break e}}ce=Ne}}break;case 91:W++;case 40:W++;case 34:case 39:for(;ce++<It&&R.charCodeAt(ce)!==W;);}if(q===0)break;ce++}switch(q=R.substring(Fe,ce),pe===0&&(pe=(B=B.replace(V,"").trim()).charCodeAt(0)),pe){case 64:switch(0<Me&&(B=B.replace(J,"")),W=B.charCodeAt(1),W){case 100:case 109:case 115:case 45:Me=I;break;default:Me=Ct}if(q=t(I,Me,q,W,b+1),Fe=q.length,0<We&&(Me=n(Ct,B,Pt),ct=w(3,q,Me,I,Xe,Be,Fe,W,b,H),B=Me.join(""),ct!==void 0&&(Fe=(q=ct.trim()).length)===0&&(W=0,q="")),0<Fe)switch(W){case 115:B=B.replace(it,m);case 100:case 109:case 45:q=B+"{"+q+"}";break;case 107:B=B.replace(K,"$1 $2"),q=B+"{"+q+"}",q=Le===1||Le===2&&h("@"+q,3)?"@-webkit-"+q+"@"+q:"@"+q;break;default:q=B+q,H===112&&(q=(je+=q,""))}else q="";break;default:q=t(I,n(I,B,Pt),q,H,b+1)}pr+=q,q=Pt=Me=Ne=pe=0,B="",W=R.charCodeAt(++ce);break;case 125:case 59:if(B=(0<Me?B.replace(J,""):B).trim(),1<(Fe=B.length))switch(Ne===0&&(pe=B.charCodeAt(0),pe===45||96<pe&&123>pe)&&(Fe=(B=B.replace(" ",":")).length),0<We&&(ct=w(1,B,I,k,Xe,Be,je.length,H,b,H))!==void 0&&(Fe=(B=ct.trim()).length)===0&&(B="\0\0"),pe=B.charCodeAt(0),W=B.charCodeAt(1),pe){case 0:break;case 64:if(W===105||W===99){fr+=B+R.charAt(ce);break}default:B.charCodeAt(Fe-1)!==58&&(je+=c(B,pe,W,B.charCodeAt(2)))}Pt=Me=Ne=pe=0,B="",W=R.charCodeAt(++ce)}}switch(W){case 13:case 10:P===47?P=0:1+pe===0&&H!==107&&0<B.length&&(Me=1,B+="\0"),0<We*xt&&w(0,B,I,k,Xe,Be,je.length,H,b,H),Be=1,Xe++;break;case 59:case 125:if(P+ae+Oe+ie===0){Be++;break}default:switch(Be++,Ze=R.charAt(ce),W){case 9:case 32:if(ae+ie+P===0)switch($e){case 44:case 58:case 9:case 32:Ze="";break;default:W!==32&&(Ze=" ")}break;case 0:Ze="\\0";break;case 12:Ze="\\f";break;case 11:Ze="\\v";break;case 38:ae+P+ie===0&&(Me=Pt=1,Ze="\f"+Ze);break;case 108:if(ae+P+ie+qe===0&&0<Ne)switch(ce-Ne){case 2:$e===112&&R.charCodeAt(ce-3)===58&&(qe=$e);case 8:Ue===111&&(qe=Ue)}break;case 58:ae+P+ie===0&&(Ne=ce);break;case 44:P+Oe+ae+ie===0&&(Me=1,Ze+="\r");break;case 34:case 39:P===0&&(ae=ae===W?0:ae===0?W:ae);break;case 91:ae+P+Oe===0&&ie++;break;case 93:ae+P+Oe===0&&ie--;break;case 41:ae+P+ie===0&&Oe--;break;case 40:if(ae+P+ie===0){if(pe===0)switch(2*$e+3*Ue){case 533:break;default:pe=1}Oe++}break;case 64:P+Oe+ae+ie+Ne+q===0&&(q=1);break;case 42:case 47:if(!(0<ae+ie+Oe))switch(P){case 0:switch(2*W+3*R.charCodeAt(ce+1)){case 235:P=47;break;case 220:Fe=ce,P=42}break;case 42:W===47&&$e===42&&Fe+2!==ce&&(R.charCodeAt(Fe+2)===33&&(je+=R.substring(Fe,ce+1)),Ze="",P=0)}}P===0&&(B+=Ze)}Ue=$e,$e=W,ce++}if(Fe=je.length,0<Fe){if(Me=I,0<We&&(ct=w(2,je,Me,k,Xe,Be,Fe,H,b,H),ct!==void 0&&(je=ct).length===0))return fr+je+pr;if(je=Me.join(",")+"{"+je+"}",Le*qe!==0){switch(Le!==2||h(je,2)||(qe=0),qe){case 111:je=je.replace(Ee,":-moz-$1")+je;break;case 112:je=je.replace(Re,"::-webkit-input-$1")+je.replace(Re,"::-moz-$1")+je.replace(Re,":-ms-input-$1")+je}qe=0}}return fr+je+pr}function n(k,I,R){var H=I.trim().split(U);I=H;var b=H.length,ie=k.length;switch(ie){case 0:case 1:var P=0;for(k=ie===0?"":k[0]+" ";P<b;++P)I[P]=o(k,I[P],R).trim();break;default:var Oe=P=0;for(I=[];P<b;++P)for(var ae=0;ae<ie;++ae)I[Oe++]=o(k[ae]+" ",H[P],R).trim()}return I}function o(k,I,R){var H=I.charCodeAt(0);switch(33>H&&(H=(I=I.trim()).charCodeAt(0)),H){case 38:return I.replace(ue,"$1"+k.trim());case 58:return k.trim()+I.replace(ue,"$1"+k.trim());default:if(0<1*R&&0<I.indexOf("\f"))return I.replace(ue,(k.charCodeAt(0)===58?"":"$1")+k.trim())}return k+I}function c(k,I,R,H){var b=k+";",ie=2*I+3*R+4*H;if(ie===944){k=b.indexOf(":",9)+1;var P=b.substring(k,b.length-1).trim();return P=b.substring(0,k).trim()+P+";",Le===1||Le===2&&h(P,1)?"-webkit-"+P+P:P}if(Le===0||Le===2&&!h(b,1))return b;switch(ie){case 1015:return b.charCodeAt(10)===97?"-webkit-"+b+b:b;case 951:return b.charCodeAt(3)===116?"-webkit-"+b+b:b;case 963:return b.charCodeAt(5)===110?"-webkit-"+b+b:b;case 1009:if(b.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+b+b;case 978:return"-webkit-"+b+"-moz-"+b+b;case 1019:case 983:return"-webkit-"+b+"-moz-"+b+"-ms-"+b+b;case 883:if(b.charCodeAt(8)===45)return"-webkit-"+b+b;if(0<b.indexOf("image-set(",11))return b.replace(wt,"$1-webkit-$2")+b;break;case 932:if(b.charCodeAt(4)===45)switch(b.charCodeAt(5)){case 103:return"-webkit-box-"+b.replace("-grow","")+"-webkit-"+b+"-ms-"+b.replace("grow","positive")+b;case 115:return"-webkit-"+b+"-ms-"+b.replace("shrink","negative")+b;case 98:return"-webkit-"+b+"-ms-"+b.replace("basis","preferred-size")+b}return"-webkit-"+b+"-ms-"+b+b;case 964:return"-webkit-"+b+"-ms-flex-"+b+b;case 1023:if(b.charCodeAt(8)!==99)break;return P=b.substring(b.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+P+"-webkit-"+b+"-ms-flex-pack"+P+b;case 1005:return Z.test(b)?b.replace(se,":-webkit-")+b.replace(se,":-moz-")+b:b;case 1e3:switch(P=b.substring(13).trim(),I=P.indexOf("-")+1,P.charCodeAt(0)+P.charCodeAt(I)){case 226:P=b.replace(Ie,"tb");break;case 232:P=b.replace(Ie,"tb-rl");break;case 220:P=b.replace(Ie,"lr");break;default:return b}return"-webkit-"+b+"-ms-"+P+b;case 1017:if(b.indexOf("sticky",9)===-1)break;case 975:switch(I=(b=k).length-10,P=(b.charCodeAt(I)===33?b.substring(0,I):b).substring(k.indexOf(":",7)+1).trim(),ie=P.charCodeAt(0)+(P.charCodeAt(7)|0)){case 203:if(111>P.charCodeAt(8))break;case 115:b=b.replace(P,"-webkit-"+P)+";"+b;break;case 207:case 102:b=b.replace(P,"-webkit-"+(102<ie?"inline-":"")+"box")+";"+b.replace(P,"-webkit-"+P)+";"+b.replace(P,"-ms-"+P+"box")+";"+b}return b+";";case 938:if(b.charCodeAt(5)===45)switch(b.charCodeAt(6)){case 105:return P=b.replace("-items",""),"-webkit-"+b+"-webkit-box-"+P+"-ms-flex-"+P+b;case 115:return"-webkit-"+b+"-ms-flex-item-"+b.replace(He,"")+b;default:return"-webkit-"+b+"-ms-flex-line-pack"+b.replace("align-content","").replace(He,"")+b}break;case 973:case 989:if(b.charCodeAt(3)!==45||b.charCodeAt(4)===122)break;case 931:case 953:if(at.test(k)===!0)return(P=k.substring(k.indexOf(":")+1)).charCodeAt(0)===115?c(k.replace("stretch","fill-available"),I,R,H).replace(":fill-available",":stretch"):b.replace(P,"-webkit-"+P)+b.replace(P,"-moz-"+P.replace("fill-",""))+b;break;case 962:if(b="-webkit-"+b+(b.charCodeAt(5)===102?"-ms-"+b:"")+b,R+H===211&&b.charCodeAt(13)===105&&0<b.indexOf("transform",10))return b.substring(0,b.indexOf(";",27)+1).replace(Q,"$1-webkit-$2")+b}return b}function h(k,I){var R=k.indexOf(I===1?":":"{"),H=k.substring(0,I!==3?R:10);return R=k.substring(R+1,k.length-1),Tt(I!==2?H:H.replace(Qe,"$1"),R,I)}function m(k,I){var R=c(I,I.charCodeAt(0),I.charCodeAt(1),I.charCodeAt(2));return R!==I+";"?R.replace(bt," or ($1)").substring(4):"("+I+")"}function w(k,I,R,H,b,ie,P,Oe,ae,pe){for(var W=0,$e=I,Ue;W<We;++W)switch(Ue=Je[W].call(F,k,$e,R,H,b,ie,P,Oe,ae,pe)){case void 0:case!1:case!0:case null:break;default:$e=Ue}if($e!==I)return $e}function A(k){switch(k){case void 0:case null:We=Je.length=0;break;default:if(typeof k=="function")Je[We++]=k;else if(typeof k=="object")for(var I=0,R=k.length;I<R;++I)A(k[I]);else xt=!!k|0}return A}function C(k){return k=k.prefix,k!==void 0&&(Tt=null,k?typeof k!="function"?Le=1:(Le=2,Tt=k):Le=0),C}function F(k,I){var R=k;if(33>R.charCodeAt(0)&&(R=R.trim()),Ot=R,R=[Ot],0<We){var H=w(-1,I,R,R,Xe,Be,0,0,0,0);H!==void 0&&typeof H=="string"&&(I=H)}var b=t(Ct,R,I,0,0);return 0<We&&(H=w(-2,b,R,R,Xe,Be,b.length,0,0,0),H!==void 0&&(b=H)),Ot="",qe=0,Be=Xe=1,b}var V=/^\0+/g,J=/[\0\r\f]/g,se=/: */g,Z=/zoo|gra/,Q=/([,: ])(transform)/g,U=/,\r+?/g,ue=/([\t\r\n ])*\f?&/g,K=/@(k\w+)\s*(\S*)\s*/,Re=/::(place)/g,Ee=/:(read-only)/g,Ie=/[svh]\w+-[tblr]{2}/,it=/\(\s*(.*)\s*\)/g,bt=/([\s\S]*?);/g,He=/-self|flex-/g,Qe=/[^]*?(:[rp][el]a[\w-]+)[^]*/,at=/stretch|:\s*\w+\-(?:conte|avail)/,wt=/([^-])(image-set\()/,Be=1,Xe=1,qe=0,Le=1,Ct=[],Je=[],We=0,Tt=null,xt=0,Ot="";return F.use=A,F.set=C,r!==void 0&&C(r),F}const De=_e;var dt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};const ht=dt;function Yt(r){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=r(n)),t[n]}}var Mt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,tt=Yt(function(r){return Mt.test(r)||r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)<91}),Ft=Y(4674),kt=Y.n(Ft),gt,Dt,ze,rt,Lr,Ur;function Ve(){return(Ve=Object.assign||function(r){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r}).apply(this,arguments)}var hr=function(r,t){for(var n=[r[0]],o=0,c=t.length;o<c;o+=1)n.push(t[o],r[o+1]);return n},Xt=function(r){return r!==null&&typeof r=="object"&&(r.toString?r.toString():Object.prototype.toString.call(r))==="[object Object]"&&!(0,et.typeOf)(r)},Nt=Object.freeze([]),ot=Object.freeze({});function mt(r){return typeof r=="function"}function Jt(r){return r.displayName||r.name||"Component"}function Zt(r){return r&&typeof r.styledComponentId=="string"}var st=typeof process<"u"&&!0&&("MISSING_ENV_VAR".REACT_APP_SC_ATTR||"MISSING_ENV_VAR".SC_ATTR)||"data-styled",Dn="5.3.11",_t=typeof window<"u"&&"HTMLElement"in window,zr=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&("MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY!==void 0&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY!==""?"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY!=="false"&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY:"MISSING_ENV_VAR".SC_DISABLE_SPEEDY!==void 0&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY!==""&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY!=="false"&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY)),Vr={},Nn={};function Ln(){for(var r=arguments.length<=0?void 0:arguments[0],t=[],n=1,o=arguments.length;n<o;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach(function(c){r=r.replace(/%[a-z]/,c)}),r}function Ye(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];throw new Error("An error occurred. See https://git.io/JUIaE#"+r+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var Br=function(){function r(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=r.prototype;return t.indexOfGroup=function(n){for(var o=0,c=0;c<n;c++)o+=this.groupSizes[c];return o},t.insertRules=function(n,o){if(n>=this.groupSizes.length){for(var c=this.groupSizes,h=c.length,m=h;n>=m;)(m<<=1)<0&&Ye(16,""+n);this.groupSizes=new Uint32Array(m),this.groupSizes.set(c),this.length=m;for(var w=h;w<m;w++)this.groupSizes[w]=0}for(var A=this.indexOfGroup(n+1),C=0,F=o.length;C<F;C++)this.tag.insertRule(A,o[C])&&(this.groupSizes[n]++,A++)},t.clearGroup=function(n){if(n<this.length){var o=this.groupSizes[n],c=this.indexOfGroup(n),h=c+o;this.groupSizes[n]=0;for(var m=c;m<h;m++)this.tag.deleteRule(c)}},t.getGroup=function(n){var o="";if(n>=this.length||this.groupSizes[n]===0)return o;for(var c=this.groupSizes[n],h=this.indexOfGroup(n),m=h+c,w=h;w<m;w++)o+=this.tag.getRule(w)+`/*!sc*/
17
+ `;return o},r}(),Lt=new Map,Ut=new Map,At=1,zt=function(r){if(Lt.has(r))return Lt.get(r);for(;Ut.has(At);)At++;var t=At++;return Lt.set(r,t),Ut.set(t,r),t},Gr=function(r){return Ut.get(r)},Hr=function(r,t){t>=At&&(At=t+1),Lt.set(r,t),Ut.set(t,r)},Wr="style["+st+'][data-styled-version="5.3.11"]',Kr=new RegExp("^"+st+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Yr=function(r,t,n){for(var o,c=n.split(","),h=0,m=c.length;h<m;h++)(o=c[h])&&r.registerName(t,o)},Xr=function(r,t){for(var n=(t.textContent||"").split(`/*!sc*/
18
+ `),o=[],c=0,h=n.length;c<h;c++){var m=n[c].trim();if(m){var w=m.match(Kr);if(w){var A=0|parseInt(w[1],10),C=w[2];A!==0&&(Hr(C,A),Yr(r,C,w[3]),r.getTag().insertRules(A,o)),o.length=0}else o.push(m)}}},Qt=function(){return Y.nc},gr=function(r){var t=document.head,n=r||t,o=document.createElement("style"),c=function(w){for(var A=w.childNodes,C=A.length;C>=0;C--){var F=A[C];if(F&&F.nodeType===1&&F.hasAttribute(st))return F}}(n),h=c!==void 0?c.nextSibling:null;o.setAttribute(st,"active"),o.setAttribute("data-styled-version","5.3.11");var m=Qt();return m&&o.setAttribute("nonce",m),n.insertBefore(o,h),o},Jr=function(){function r(n){var o=this.element=gr(n);o.appendChild(document.createTextNode("")),this.sheet=function(c){if(c.sheet)return c.sheet;for(var h=document.styleSheets,m=0,w=h.length;m<w;m++){var A=h[m];if(A.ownerNode===c)return A}Ye(17)}(o),this.length=0}var t=r.prototype;return t.insertRule=function(n,o){try{return this.sheet.insertRule(o,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var o=this.sheet.cssRules[n];return o!==void 0&&typeof o.cssText=="string"?o.cssText:""},r}(),Zr=function(){function r(n){var o=this.element=gr(n);this.nodes=o.childNodes,this.length=0}var t=r.prototype;return t.insertRule=function(n,o){if(n<=this.length&&n>=0){var c=document.createTextNode(o),h=this.nodes[n];return this.element.insertBefore(c,h||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},r}(),_r=function(){function r(n){this.rules=[],this.length=0}var t=r.prototype;return t.insertRule=function(n,o){return n<=this.length&&(this.rules.splice(n,0,o),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},r}(),mr=_t,Qr={isServer:!_t,useCSSOMInjection:!zr},vt=function(){function r(n,o,c){n===void 0&&(n=ot),o===void 0&&(o={}),this.options=Ve({},Qr,{},n),this.gs=o,this.names=new Map(c),this.server=!!n.isServer,!this.server&&_t&&mr&&(mr=!1,function(h){for(var m=document.querySelectorAll(Wr),w=0,A=m.length;w<A;w++){var C=m[w];C&&C.getAttribute(st)!=="active"&&(Xr(h,C),C.parentNode&&C.parentNode.removeChild(C))}}(this))}r.registerId=function(n){return zt(n)};var t=r.prototype;return t.reconstructWithOptions=function(n,o){return o===void 0&&(o=!0),new r(Ve({},this.options,{},n),this.gs,o&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(c=(o=this.options).isServer,h=o.useCSSOMInjection,m=o.target,n=c?new _r(m):h?new Jr(m):new Zr(m),new Br(n)));var n,o,c,h,m},t.hasNameForId=function(n,o){return this.names.has(n)&&this.names.get(n).has(o)},t.registerName=function(n,o){if(zt(n),this.names.has(n))this.names.get(n).add(o);else{var c=new Set;c.add(o),this.names.set(n,c)}},t.insertRules=function(n,o,c){this.registerName(n,o),this.getTag().insertRules(zt(n),c)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(zt(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var o=n.getTag(),c=o.length,h="",m=0;m<c;m++){var w=Gr(m);if(w!==void 0){var A=n.names.get(w),C=o.getGroup(m);if(A&&C&&A.size){var F=st+".g"+m+'[id="'+w+'"]',V="";A!==void 0&&A.forEach(function(J){J.length>0&&(V+=J+",")}),h+=""+C+F+'{content:"'+V+`"}/*!sc*/
19
+ `}}}return h}(this)},r}(),qr=/(a)(d)/gi,vr=function(r){return String.fromCharCode(r+(r>25?39:97))};function qt(r){var t,n="";for(t=Math.abs(r);t>52;t=t/52|0)n=vr(t%52)+n;return(vr(t%52)+n).replace(qr,"$1-$2")}var yt=function(r,t){for(var n=t.length;n;)r=33*r^t.charCodeAt(--n);return r},yr=function(r){return yt(5381,r)};function br(r){for(var t=0;t<r.length;t+=1){var n=r[t];if(mt(n)&&!Zt(n))return!1}return!0}var en=yr("5.3.11"),tn=function(){function r(t,n,o){this.rules=t,this.staticRulesId="",this.isStatic=(o===void 0||o.isStatic)&&br(t),this.componentId=n,this.baseHash=yt(en,n),this.baseStyle=o,vt.registerId(n)}return r.prototype.generateAndInjectStyles=function(t,n,o){var c=this.componentId,h=[];if(this.baseStyle&&h.push(this.baseStyle.generateAndInjectStyles(t,n,o)),this.isStatic&&!o.hash)if(this.staticRulesId&&n.hasNameForId(c,this.staticRulesId))h.push(this.staticRulesId);else{var m=ut(this.rules,t,n,o).join(""),w=qt(yt(this.baseHash,m)>>>0);if(!n.hasNameForId(c,w)){var A=o(m,"."+w,void 0,c);n.insertRules(c,w,A)}h.push(w),this.staticRulesId=w}else{for(var C=this.rules.length,F=yt(this.baseHash,o.hash),V="",J=0;J<C;J++){var se=this.rules[J];if(typeof se=="string")V+=se;else if(se){var Z=ut(se,t,n,o),Q=Array.isArray(Z)?Z.join(""):Z;F=yt(F,Q+J),V+=Q}}if(V){var U=qt(F>>>0);if(!n.hasNameForId(c,U)){var ue=o(V,"."+U,void 0,c);n.insertRules(c,U,ue)}h.push(U)}}return h.join(" ")},r}(),rn=/^\s*\/\/.*$/gm,nn=[":","[",".","#"];function wr(r){var t,n,o,c,h=r===void 0?ot:r,m=h.options,w=m===void 0?ot:m,A=h.plugins,C=A===void 0?Nt:A,F=new De(w),V=[],J=function(Q){function U(ue){if(ue)try{Q(ue+"}")}catch{}}return function(ue,K,Re,Ee,Ie,it,bt,He,Qe,at){switch(ue){case 1:if(Qe===0&&K.charCodeAt(0)===64)return Q(K+";"),"";break;case 2:if(He===0)return K+"/*|*/";break;case 3:switch(He){case 102:case 112:return Q(Re[0]+K),"";default:return K+(at===0?"/*|*/":"")}case-2:K.split("/*|*/}").forEach(U)}}}(function(Q){V.push(Q)}),se=function(Q,U,ue){return U===0&&nn.indexOf(ue[n.length])!==-1||ue.match(c)?Q:"."+t};function Z(Q,U,ue,K){K===void 0&&(K="&");var Re=Q.replace(rn,""),Ee=U&&ue?ue+" "+U+" { "+Re+" }":Re;return t=K,n=U,o=new RegExp("\\"+n+"\\b","g"),c=new RegExp("(\\"+n+"\\b){2,}"),F(ue||!U?"":U,Ee)}return F.use([].concat(C,[function(Q,U,ue){Q===2&&ue.length&&ue[0].lastIndexOf(n)>0&&(ue[0]=ue[0].replace(o,se))},J,function(Q){if(Q===-2){var U=V;return V=[],U}}])),Z.hash=C.length?C.reduce(function(Q,U){return U.name||Ye(15),yt(Q,U.name)},5381).toString():"",Z}var er=Ae.createContext(),Un=er.Consumer,tr=Ae.createContext(),xr=(tr.Consumer,new vt),rr=wr();function nr(){return(0,Ae.useContext)(er)||xr}function Sr(){return(0,Ae.useContext)(tr)||rr}function on(r){var t=(0,Ae.useState)(r.stylisPlugins),n=t[0],o=t[1],c=nr(),h=(0,Ae.useMemo)(function(){var w=c;return r.sheet?w=r.sheet:r.target&&(w=w.reconstructWithOptions({target:r.target},!1)),r.disableCSSOMInjection&&(w=w.reconstructWithOptions({useCSSOMInjection:!1})),w},[r.disableCSSOMInjection,r.sheet,r.target]),m=(0,Ae.useMemo)(function(){return wr({options:{prefix:!r.disableVendorPrefixes},plugins:n})},[r.disableVendorPrefixes,n]);return(0,Ae.useEffect)(function(){ft()(n,r.stylisPlugins)||o(r.stylisPlugins)},[r.stylisPlugins]),Ae.createElement(er.Provider,{value:h},Ae.createElement(tr.Provider,{value:m},r.children))}var Ar=function(){function r(t,n){var o=this;this.inject=function(c,h){h===void 0&&(h=rr);var m=o.name+h.hash;c.hasNameForId(o.id,m)||c.insertRules(o.id,m,h(o.rules,m,"@keyframes"))},this.toString=function(){return Ye(12,String(o.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return r.prototype.getName=function(t){return t===void 0&&(t=rr),this.name+t.hash},r}(),sn=/([A-Z])/,an=/([A-Z])/g,cn=/^ms-/,ln=function(r){return"-"+r.toLowerCase()};function Er(r){return sn.test(r)?r.replace(an,ln).replace(cn,"-ms-"):r}var Cr=function(r){return r==null||r===!1||r===""};function ut(r,t,n,o){if(Array.isArray(r)){for(var c,h=[],m=0,w=r.length;m<w;m+=1)(c=ut(r[m],t,n,o))!==""&&(Array.isArray(c)?h.push.apply(h,c):h.push(c));return h}if(Cr(r))return"";if(Zt(r))return"."+r.styledComponentId;if(mt(r)){if(typeof(C=r)!="function"||C.prototype&&C.prototype.isReactComponent||!t)return r;var A=r(t);return ut(A,t,n,o)}var C;return r instanceof Ar?n?(r.inject(n,o),r.getName(o)):r:Xt(r)?function F(V,J){var se,Z,Q=[];for(var U in V)V.hasOwnProperty(U)&&!Cr(V[U])&&(Array.isArray(V[U])&&V[U].isCss||mt(V[U])?Q.push(Er(U)+":",V[U],";"):Xt(V[U])?Q.push.apply(Q,F(V[U],U)):Q.push(Er(U)+": "+(se=U,(Z=V[U])==null||typeof Z=="boolean"||Z===""?"":typeof Z!="number"||Z===0||se in ht||se.startsWith("--")?String(Z).trim():Z+"px")+";"));return J?[J+" {"].concat(Q,["}"]):Q}(r):r.toString()}var Tr=function(r){return Array.isArray(r)&&(r.isCss=!0),r};function Et(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return mt(r)||Xt(r)?Tr(ut(hr(Nt,[r].concat(n)))):n.length===0&&r.length===1&&typeof r[0]=="string"?r:Tr(ut(hr(r,n)))}var zn=/invalid hook call/i,Vn=new Set,Bn=function(r,t){if(0)var n,o,c},or=function(r,t,n){return n===void 0&&(n=ot),r.theme!==n.theme&&r.theme||t||n.theme},un=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,pn=/(^-|-$)/g;function sr(r){return r.replace(un,"-").replace(pn,"")}var ir=function(r){return qt(yr(r)>>>0)};function Vt(r){return typeof r=="string"&&!0}var ar=function(r){return typeof r=="function"||typeof r=="object"&&r!==null&&!Array.isArray(r)},fn=function(r){return r!=="__proto__"&&r!=="constructor"&&r!=="prototype"};function dn(r,t,n){var o=r[n];ar(t)&&ar(o)?Or(o,t):r[n]=t}function Or(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];for(var c=0,h=n;c<h.length;c++){var m=h[c];if(ar(m))for(var w in m)fn(w)&&dn(r,m[w],w)}return r}var pt=Ae.createContext(),Gn=pt.Consumer;function Hn(r){var t=gt(pt),n=Dt(function(){return function(o,c){if(!o)return Ye(14);if(mt(o)){var h=o(c);return h}return Array.isArray(o)||typeof o!="object"?Ye(8):c?Ve({},c,{},o):o}(r.theme,t)},[r.theme,t]);return r.children?ze.createElement(pt.Provider,{value:n},r.children):null}var cr={};function Pr(r,t,n){var o=Zt(r),c=!Vt(r),h=t.attrs,m=h===void 0?Nt:h,w=t.componentId,A=w===void 0?function(K,Re){var Ee=typeof K!="string"?"sc":sr(K);cr[Ee]=(cr[Ee]||0)+1;var Ie=Ee+"-"+ir("5.3.11"+Ee+cr[Ee]);return Re?Re+"-"+Ie:Ie}(t.displayName,t.parentComponentId):w,C=t.displayName,F=C===void 0?function(K){return Vt(K)?"styled."+K:"Styled("+Jt(K)+")"}(r):C,V=t.displayName&&t.componentId?sr(t.displayName)+"-"+t.componentId:t.componentId||A,J=o&&r.attrs?Array.prototype.concat(r.attrs,m).filter(Boolean):m,se=t.shouldForwardProp;o&&r.shouldForwardProp&&(se=t.shouldForwardProp?function(K,Re,Ee){return r.shouldForwardProp(K,Re,Ee)&&t.shouldForwardProp(K,Re,Ee)}:r.shouldForwardProp);var Z,Q=new tn(n,V,o?r.componentStyle:void 0),U=Q.isStatic&&m.length===0,ue=function(K,Re){return function(Ee,Ie,it,bt){var He=Ee.attrs,Qe=Ee.componentStyle,at=Ee.defaultProps,wt=Ee.foldedComponentIds,Be=Ee.shouldForwardProp,Xe=Ee.styledComponentId,qe=Ee.target,Le=function(H,b,ie){H===void 0&&(H=ot);var P=Ve({},b,{theme:H}),Oe={};return ie.forEach(function(ae){var pe,W,$e,Ue=ae;for(pe in mt(Ue)&&(Ue=Ue(P)),Ue)P[pe]=Oe[pe]=pe==="className"?(W=Oe[pe],$e=Ue[pe],W&&$e?W+" "+$e:W||$e):Ue[pe]}),[P,Oe]}(or(Ie,(0,Ae.useContext)(pt),at)||ot,Ie,He),Ct=Le[0],Je=Le[1],We=function(H,b,ie,P){var Oe=nr(),ae=Sr(),pe=b?H.generateAndInjectStyles(ot,Oe,ae):H.generateAndInjectStyles(ie,Oe,ae);return pe}(Qe,bt,Ct,void 0),Tt=it,xt=Je.$as||Ie.$as||Je.as||Ie.as||qe,Ot=Vt(xt),k=Je!==Ie?Ve({},Ie,{},Je):Ie,I={};for(var R in k)R[0]!=="$"&&R!=="as"&&(R==="forwardedAs"?I.as=k[R]:(Be?Be(R,tt,xt):!Ot||tt(R))&&(I[R]=k[R]));return Ie.style&&Je.style!==Ie.style&&(I.style=Ve({},Ie.style,{},Je.style)),I.className=Array.prototype.concat(wt,Xe,We!==Xe?We:null,Ie.className,Je.className).filter(Boolean).join(" "),I.ref=Tt,(0,Ae.createElement)(xt,I)}(Z,K,Re,U)};return ue.displayName=F,(Z=Ae.forwardRef(ue)).attrs=J,Z.componentStyle=Q,Z.displayName=F,Z.shouldForwardProp=se,Z.foldedComponentIds=o?Array.prototype.concat(r.foldedComponentIds,r.styledComponentId):Nt,Z.styledComponentId=V,Z.target=o?r.target:r,Z.withComponent=function(K){var Re=t.componentId,Ee=function(it,bt){if(it==null)return{};var He,Qe,at={},wt=Object.keys(it);for(Qe=0;Qe<wt.length;Qe++)He=wt[Qe],bt.indexOf(He)>=0||(at[He]=it[He]);return at}(t,["componentId"]),Ie=Re&&Re+"-"+(Vt(K)?K:sr(Jt(K)));return Pr(K,Ve({},Ee,{attrs:J,componentId:Ie}),n)},Object.defineProperty(Z,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(K){this._foldedDefaultProps=o?Or({},r.defaultProps,K):K}}),Object.defineProperty(Z,"toString",{value:function(){return"."+Z.styledComponentId}}),c&&kt()(Z,r,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),Z}var Ir=function(r){return function t(n,o,c){if(c===void 0&&(c=ot),!(0,et.isValidElementType)(o))return Ye(1,String(o));var h=function(){return n(o,c,Et.apply(void 0,arguments))};return h.withConfig=function(m){return t(n,o,Ve({},c,{},m))},h.attrs=function(m){return t(n,o,Ve({},c,{attrs:Array.prototype.concat(c.attrs,m).filter(Boolean)}))},h}(Pr,r)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(r){Ir[r]=Ir(r)});var hn=function(){function r(n,o){this.rules=n,this.componentId=o,this.isStatic=br(n),vt.registerId(this.componentId+1)}var t=r.prototype;return t.createStyles=function(n,o,c,h){var m=h(ut(this.rules,o,c,h).join(""),""),w=this.componentId+n;c.insertRules(w,w,m)},t.removeStyles=function(n,o){o.clearRules(this.componentId+n)},t.renderStyles=function(n,o,c,h){n>2&&vt.registerId(this.componentId+n),this.removeStyles(n,c),this.createStyles(n,o,c,h)},r}();function Wn(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var c=Et.apply(void 0,[r].concat(n)),h="sc-global-"+ir(JSON.stringify(c)),m=new hn(c,h);function w(C){var F=nr(),V=Sr(),J=gt(pt),se=rt(F.allocateGSInstance(h)).current;return F.server&&A(se,C,F,J,V),Lr(function(){if(!F.server)return A(se,C,F,J,V),function(){return m.removeStyles(se,F)}},[se,C,F,J,V]),null}function A(C,F,V,J,se){if(m.isStatic)m.renderStyles(C,Vr,V,se);else{var Z=Ve({},F,{theme:or(F,J,w.defaultProps)});m.renderStyles(C,Z,V,se)}}return ze.memo(w)}function Kn(r){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var c=Et.apply(void 0,[r].concat(n)).join(""),h=ir(c);return new Ar(h,c)}var Yn=function(){function r(){var n=this;this._emitSheetCSS=function(){var o=n.instance.toString();if(!o)return"";var c=Qt();return"<style "+[c&&'nonce="'+c+'"',st+'="true"','data-styled-version="5.3.11"'].filter(Boolean).join(" ")+">"+o+"</style>"},this.getStyleTags=function(){return n.sealed?Ye(2):n._emitSheetCSS()},this.getStyleElement=function(){var o;if(n.sealed)return Ye(2);var c=((o={})[st]="",o["data-styled-version"]="5.3.11",o.dangerouslySetInnerHTML={__html:n.instance.toString()},o),h=Qt();return h&&(c.nonce=h),[Ae.createElement("style",Ve({},c,{key:"sc-0-0"}))]},this.seal=function(){n.sealed=!0},this.instance=new vt({isServer:!0}),this.sealed=!1}var t=r.prototype;return t.collectStyles=function(n){return this.sealed?Ye(2):Ae.createElement(on,{sheet:this.instance},n)},t.interleaveWithNodeStream=function(n){return Ye(3)},r}(),Xn=function(r){var t=ze.forwardRef(function(n,o){var c=gt(pt),h=r.defaultProps,m=or(n,c,h);return ze.createElement(r,Ve({},n,{theme:m,ref:o}))});return Ur(t,r),t.displayName="WithTheme("+Jt(r)+")",t},Jn=function(){return gt(pt)},Zn={StyleSheet:vt,masterSheet:xr};const _n=null,gn=r=>Object.keys(r).reduce((t,n)=>(t[n]=(o,...c)=>Et`
20
20
  @media (max-width: ${r[n]}) {
21
21
  ${Et(o,...c)};
22
22
  }
23
- `,t),{}),yn=r=>({space:{...r.spaces,xxxs:r.spaces[1],xxs:r.spaces[2],xxs2:r.spaces[3],xs:r.spaces[4],s:r.spaces[5],m:r.spaces[6],l:r.spaces[7],xl:r.spaces[8],xxl:r.spaces[9]},fontSizes:{...r.fontSizes,title:{500:r.fontSizes[3],600:r.fontSizes[4],700:r.fontSizes[5],800:r.fontSizes[6],900:r.fontSizes[7]},subTitle:{300:r.fontSizes[1],400:r.fontSizes[2]},label:{200:r.fontSizes[0],300:r.fontSizes[1],400:r.fontSizes[2]},value:{300:r.fontSizes[1],400:r.fontSizes[2],500:r.fontSizes[3],600:r.fontSizes[4]},hyperlink:{200:r.fontSizes[0],300:r.fontSizes[1],400:r.fontSizes[2]},microText:{200:r.fontSizes[0]}},fontWeights:{...r.fontWeights,thin:r.fontWeights[0],light:r.fontWeights[1],regular:r.fontWeights[3],semibold:r.fontWeights[5],bold:r.fontWeights[8]},lineHeights:{...r.lineHeights,r:r.lineHeights[0],m:r.lineHeights[1],l:r.lineHeights[2],xl:r.lineHeights[3]},letterSpacings:{normal:r.letterSpacings[0],tracked:r.letterSpacings[1],tight:r.letterSpacings[2],mega:r.letterSpacings[3]},fonts:{...r.fonts,default:r.fonts[0]},colors:{neutral:{"000":r.colors.neutral[0],"050":r.colors.neutral[1],"080":r.colors.neutral[2],100:r.colors.neutral[3],200:r.colors.neutral[4],300:r.colors.neutral[5],400:r.colors.neutral[6],500:r.colors.neutral[7],600:r.colors.neutral[8],700:r.colors.neutral[9],800:r.colors.neutral[10]},brand:{100:r.colors.brand[0],200:r.colors.brand[1],250:r.colors.brand[8],300:r.colors.brand[2],400:r.colors.brand[3],500:r.colors.brand[4],600:r.colors.brand[5],700:r.colors.brand[6],800:r.colors.brand[7]},success:{300:r.colors.success[0],400:r.colors.success[1],600:r.colors.success[2],900:r.colors.success[3],950:r.colors.success[4]},warning:{400:r.colors.warning[0],500:r.colors.warning[1],600:r.colors.warning[1],900:r.colors.warning[2],950:r.colors.warning[3]},danger:{200:r.colors.danger[0],400:r.colors.danger[1],600:r.colors.danger[2],900:r.colors.danger[3],950:r.colors.danger[4]}},shadows:{xs:r.shadows[0],s:r.shadows[1],m:r.shadows[2],l:r.shadows[3],xl:r.shadows[4]},breakpoints:{...r.breakpoints,xsmall:r.breakpoints[3],small:r.breakpoints[0],medium:r.breakpoints[1],large:r.breakpoints[2]},media:vn({xsmall:r.breakpoints[3],small:r.breakpoints[0],medium:r.breakpoints[1],large:r.breakpoints[2]}),zIndex:{dialog:r.zIndex[0],popper:r.zIndex[1],tooltip:r.zIndex[2],backdrop:r.zIndex[3],loader:r.zIndex[4]},states:{_:r.states[0],motionSafe:r.states[1],motionReduce:r.states[2],first:r.states[3],last:r.states[4],odd:r.states[5],even:r.states[6],visited:r.states[7],checked:r.states[8],focusWithin:r.states[9],hover:r.states[10],focus:r.states[11],focusVisible:r.states[12],active:r.states[13],disabled:r.states[14],placeholder:r.states[15]}}),bn=((r=re())=>()=>yn(r))(),to=()=>{try{return window.parent.document,window.parent}catch{return window}},lr=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),jr=r=>Number(r.replace("px","")),Rr=()=>{const{width:r}=lr(),{breakpoints:t}=bn();return r<=jr(t.small)?"small":r<=jr(t.medium)?"medium":"large"},wn="microFrontendApps",xn=()=>!0,Sn=r=>xn()?!0:String(r).toLowerCase()===z.PRODUCTION.toLowerCase(),An=r=>r?new URL(r).pathname:"",En=r=>{const t=document.createElement("a");return t.href=r,t.href},Cn=(r,t)=>{const n=t.match(/^(?:\d+\.\d+)*/g);return r.replace(/{SYSTEM_VERSION}/,n&&n[0]||S)},$r=r=>!r||!r.length?!1:r.every(t=>typeof t=="string"),Tn=(r,t)=>{const{mode:n=z.PRODUCTION}=t;if(String(n).toLowerCase()!==z.PRODUCTION.toLowerCase()&&String(n).toLowerCase()!==z.DEVELOPMENT.toLowerCase())throw new Error(`invalid mode '${String(n)}' for ${r}`);const{production:o,development:c,microappManager:h=ne.APPSDK}=t;if(String(h).toLowerCase()===ne.APPSDK.toLowerCase()){if(String(n).toLowerCase()===z.PRODUCTION.toLowerCase()){if(!o)throw new Error(`microFrontendApps.${r} is missing production section in app.config.json`);if(!$r(o.files))throw new Error("invalid value for production.files")}if(String(n).toLowerCase()===z.DEVELOPMENT.toLowerCase()){if(!c)throw new Error(`microFrontendApps.${r} is missing development section in app.config.json`);if(!$r(c.files))throw new Error("invalid value for development.files")}}},On=({id:r,config:t,version:n="latest"})=>{const{mode:o=z.PRODUCTION,production:c,development:h,...m}=t,w=Sn(o)?c:h,A=v()({id:r},{name:r,mode:z.PRODUCTION,manifestPath:"./{SYSTEM_VERSION}/",securityContext:s.USER,isJsModule:!0},m,{mode:o},w);return A.hostUrl=M(En(A.hostUrl||"")),A.homeRoute=M(A.homeRoute)||An(A.hostUrl),A.manifestPath=M(Cn(A.manifestPath,n)),A};class Pn{#e=[];init=({version:t,appConfig:n})=>{const o=n.get(wn);o&&(this.#e=Object.keys(o).map(c=>(Tn(c,o[c]),On({id:c,config:o[c],version:t}))))};getConfigById=t=>this.#e.find(n=>n.id===t)}const In="ice-script-";class Mr{#e;constructor(t){this.#e=t}#t=({href:t,isESMModule:n=!0,documentEle:o})=>{const c=o.createElement("link");c.rel=n?"modulepreload":"preload",c.href=t,c.crossOrigin="anonymous",n||(c.as="script"),o.head.appendChild(c)};#r=({id:t,href:n,documentEle:o,isESMModule:c=!0})=>new Promise((h,m)=>{const w=o.createElement("script");w.id=t,w.src=O(n),w.crossOrigin="anonymous",w.nonce="__CSP_NONCE__",!D()&&c?w.type="module":w.async=!1,w.onload=h.bind(null,w.id),w.onerror=A=>{this.#e.error({message:`Error loading script ${w.src}`,exception:new Error(A)}),m(new Error(`Unable to load script ${w.src}`,{cause:new Error(A)}))},o.head.appendChild(w)});load=async(t,n)=>{const{documentEle:o,isESMModule:c}=n,h=/^https?:\/\//i,{cdnAssets:m,nonCdnAssets:w}=t.reduce((A,C,F)=>{const V=`${In}${n.name.toLowerCase()}-${F}`;if(h.test(C))A.cdnAssets.push({id:V,href:C}),this.#t({href:C,documentEle:o,isESMModule:c});else{const J=new URL(C,n.hostUrl);A.nonCdnAssets.push({id:V,href:J.href}),this.#t({href:J.href,documentEle:o,isESMModule:c})}return A},{cdnAssets:[],nonCdnAssets:[]});for(const{href:A,id:C}of[...m,...w])await this.#r({id:C,href:A,documentEle:o,isESMModule:c});return[...m,...w].map(A=>A.id)};remove=(t="",n=document)=>new Promise(o=>{const c=n.getElementById(t);if(!c){this.#e.warn(`script with id ${t} not found`),o();return}c.remove(),o()});removeDynamicImportedScripts=(t,n)=>{const o=new RegExp(L(t),"i"),c=n.getElementsByTagName("script");for(let h=c.length-1;h>=0;h-=1){const m=c[h],{src:w}=m;o.test(w)&&m.remove()}};removePrefetchLinks=(t,n)=>{const o=new RegExp(L(t),"i"),c=n.querySelectorAll('[rel="prefetch"]');for(let h=c.length-1;h>=0;h-=1){const m=c[h],{href:w}=m;o.test(w)&&m.remove()}}}const jn="ice-style-";class Fr{#e;constructor(t){this.#e=t}#t=({id:t,href:n,documentEle:o})=>new Promise((c,h)=>{const m=o.createElement("link");m.id=t,m.nonce="__CSP_NONCE__",m.rel="stylesheet",m.href=O(n),m.onload=c.bind(null,m.id),m.onerror=w=>{this.#e.error({message:`Error loading stylesheet ${m.href}`,exception:new Error(w)}),h(new Error(`Unable to load stylesheet ${m.href}`,{cause:new Error(w)}))},o.head.appendChild(m)});load=async(t,n)=>{const o=[],c=t.map((h,m)=>{const w=new URL(h,n.hostUrl),A=`${jn}${n.name.toLowerCase()}-${m}`;return o.push(A),this.#t({id:A,href:w.href,documentEle:n.documentEle})});return await Promise.all(c),o};remove=(t="",n=document)=>new Promise(o=>{const c=n.getElementById(t);if(!c){this.#e.warn(`style with id ${t} not found`),o();return}c.remove(),o()});removeDynamicImportedStyles=(t,n)=>{const o=new RegExp(L(t),"i"),c=n.querySelectorAll('[rel="stylesheet"]');for(let h=c.length-1;h>=0;h-=1){const m=c[h],{href:w}=m;o.test(w)&&m.remove()}}}const kr=r=>r.replace(/\/\d+\.\d+/,"/latest"),Rn=r=>{let t;try{t=new URL(r)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},ur=new Map,$n=()=>ur.clear(),Dr=async({hostUrl:r,manifestPath:t})=>{const n=new URL(`${t}manifest.json`,r),o=O(n.href),c=ur.get(o);if(c)return c;const h=await fetch(o);if(h.ok){const{headers:w}=h;if((w?.get?.("content-type")??"").includes("application/json")){const C=await h.json();return ur.set(o,C),C}throw new Error(`manifest ${n.href} is not a valid json`)}const m=kr(t);if(t!==m)return Dr({hostUrl:r,manifestPath:kr(t)});throw new Error(`unable to get manifest ${n.href}`)},Nr={get:Dr,getFullFileNameofAssets:(r,t=[])=>t.reduce((n,o)=>{const c=r[o];if(c)n.push(c);else if(Rn(o))n.push(o);else throw new Error(`unable to locate ${o} in manifest`);return n},[]),clearCache:$n};class Mn{#e;#t;#r;#s;#n;constructor(t){this.#t=t.guest,this.#e=t.containerId,this.#r=t?.version||S,this.#s=t.soManager,this.#n=t.eventManager}get version(){return this.#r}getObject=t=>{try{const n=this.#s.getObject(t,this.#t);if(!n)return Promise.resolve(null);const o=new be(n.id,n.objectType);return Object.keys(n).forEach(c=>{const h=n[c];h instanceof le?Object.defineProperty(o,c,{value:new le({name:c,objectId:n.id}),enumerable:!0}):ee(h,c)&&Object.defineProperty(o,c,{value:(...m)=>(Object.defineProperty(h,"callContext",{value:{guest:this.#t},configurable:!0,enumerable:!0,writable:!0}),n[c](...m)),enumerable:!0})}),Promise.resolve(o)}catch(n){return Promise.reject(n)}};setAppWindowSize=t=>{if(!this.#e)return;const{size:n}=t,o=document.getElementById(this.#e);o&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`)};subscribe=t=>this.#n.subscribe(t);unsubscribe=t=>{this.#n.unsubscribe(t)}}class Fn{constructor(){window.emui||(window.emui={}),window.emui.registerApp=this.#e}#e=({appId:t,app:n})=>{if(!t)throw new Error("appId is required");if(t==="__proto__"||t==="constructor"||t==="prototype")throw new Error(`Invalid appId: ${t}`);if(!n?.uuid)throw new Error("application uuid is required");if(window.emui[t]=window.emui[t]||[],Array.isArray(window.emui[t])){const o=window.emui[t].findIndex(c=>c.uuid===n.uuid);o>-1?window.emui[t][o]=n:window.emui[t].push(n)}else{let o=window.emui[t];o?.uuid===n.uuid?(o={...o,...n},window.emui[t]=[o]):typeof o.init>"u"?window.emui[t]=[{...o,...n}]:window.emui[t]=[window.emui[t],n]}};get=({id:t,instanceId:n})=>{const o=window.emui?.[t];return Array.isArray(o)?o.find(h=>h.uuid===n)??null:o?.uuid===n?o:null};add=({id:t,instanceId:n,documentEle:o})=>{if(!n)throw new Error(`instanceId (uuid) is required to register application ${t}`);const c={uuid:n,init:null,mount:null,unmount:null},h=window.emui[t];h?Array.isArray(h)?h.push(c):window.emui[t]=[h,c]:window.emui[t]=[c],o.defaultView&&(o.defaultView.emui=o.defaultView.emui??{},o.defaultView.emui.uuid=n)};delete=({id:t,instanceId:n})=>{if(Array.isArray(window.emui[t])){const o=window.emui[t].findIndex(c=>c.uuid===n);o>-1&&window.emui[t].splice(o,1),window.emui[t].length===0&&delete window.emui[t]}else delete window.emui[t]}}const kn=12e4,Lr=["click","scroll","keypress","touchstart"],Dn=/\.css$/,Ur=r=>Dn.test(r);class Nn{#e;#t;#r;#s;#n;#a=new Pn;#o;#l;#i=new Map;#c=new Fn;#u=!0;constructor(t){const{logger:n}=t;if(!n)throw new Error("logger is required");this.#e=t.logger,this.#t=t.version,this.#u=t.extendSession??!0,this.#n=new j({version:t.version,baseUrl:t.appConfigBaseUrl}),this.#r=new Mr(n),this.#s=new Fr(n),this.#o=new xe,this.#l=new Ht(this.#e)}#h(t){return typeof t=="function"}#g=t=>t instanceof E||typeof t?.subscribe=="function";#m=(t,n)=>`Application ${t} with instance id ${n} is not found. Most probably the appId property of app.config.json is not set to ${t}`;#v=(t,n=document)=>{const{elementIds:o}=this.#i.get(t)||{};o&&o.forEach(c=>{const h=n.getElementById(c);h&&h.remove()})};#y=({id:t,instanceId:n,documentEle:o,elementIds:c})=>{const h=this.#c.get({id:t,instanceId:n});if(!h)throw new Error(this.#m(t,n));this.#i.set(n,{id:t,instanceId:n,elementIds:c,guest:{guestWindow:o?.defaultView,...h}})};#b=async({id:t,instanceId:n,containerId:o,hostUrl:c,manifestPath:h,homeRoute:m,initialRoute:w,history:A,theme:C})=>{const F=this.#c.get({id:t,instanceId:n});if(!F)throw new Error(`Application ${t} with instance id ${n} is not found. Most probably the appId property of app.config.json is not set to ${t}`);if(!F.init||typeof F.init!="function")throw new Error(`Application ${t} with instance id ${n} doesn't expose init method`);const V=new Mn({guest:{id:t},version:this.#t,containerId:o,logger:this.#e,soManager:this.#o,eventManager:this.#l});return F.init({host:V,hostUrl:c,manifestPath:h,homeRoute:m,initialRoute:w,prevState:null,history:A,theme:C,hostBreakpoint:Rr(),hostViewportSize:lr(),logger:this.#e})};#w=async t=>{try{const{id:n,instanceId:o,files:c,name:h,hostUrl:m,documentEle:w,isJsModule:A}=t;this.#e.debug(`Application ${n} with instance id ${o} is loading...`);let C=c;const F=await Nr.get(t);C=Nr.getFullFileNameofAssets(F,c);const V=C.filter(U=>Ur(U)),J=C.filter(U=>!Ur(U)),se={name:h,hostUrl:m,documentEle:w,isESMModule:A},[Z,Q]=await Promise.all([this.#s.load(V,se),this.#r.load(J,se)]);this.#y({id:n,instanceId:o,documentEle:w,elementIds:[...Z,...Q]}),await this.#b(t),this.#e.audit(`Application ${n} with instance id ${o} loaded`)}catch(n){const o=`Application load failed. Unable to load one or more resources for ${t.id} with instance id ${t.instanceId}. ${n.message}`;throw this.#e.error({message:o,appId:t.id,exception:n}),new Error(o)}};#p=({id:t,instanceId:n,hostUrl:o,documentEle:c})=>{this.#e.debug(`Application ${t} with instance id ${n} unloading...`),this.#c.get({id:t,instanceId:n})&&(this.#v(n,c),this.#r.removeDynamicImportedScripts(o,c),this.#r.removePrefetchLinks(o,c),this.#s.removeDynamicImportedStyles(o,c),this.#c.delete({id:t,instanceId:n}),this.#e.audit(`Application ${t} with instance id ${n} unloaded`))};#f=async({id:t,instanceId:n})=>{const o=this.#c.get({id:t,instanceId:n});if(!o?.mount||typeof o?.mount!="function")throw new Error(`Application ${t} with instance id ${n} doesn't expose mount method`);return o.mount({containerId:`${St}${t}`,hostBreakpoint:Rr(),hostViewportSize:lr()})};#d=({id:t,instanceId:n})=>{const o=this.#c.get({id:t,instanceId:n});if(!o?.unmount)return null;if(typeof o.unmount!="function")throw new Error(`Application ${t} with instance id ${n} doesn't expose unmount method`);return o.unmount({containerId:`${St}${t}`})};#x=({id:t,instanceId:n})=>{if(this.#u)try{const o=this.#o.getObject(te.Application);if(!o){this.#e.warn({message:`Application scripting object not available for ${t} to manage session`});return}const c=this.#i.get(n);if(!c)return;c.keepAlive=G()(async()=>{try{await o.keepSessionAlive()}catch(m){this.#e.error(`Error keeping session alive. ${m.message}`)}},kn);const h=Ge.get(n);Lr.forEach(m=>{h?.contentDocument?.addEventListener(m,c.keepAlive)})}catch(o){this.#e.warn({message:`Application scripting object not available for ${t} to manage session`,exception:o})}};#S=t=>{if(!this.#u||!t)return;const{keepAlive:n,instanceId:o}=t;if(n){const h=Ge.get(o)?.contentDocument;h&&Lr.forEach(m=>{h.removeEventListener(m,n)}),t.keepAlive?.cancel()}};addScriptingObject=(t,n)=>{if(ke(t)){const o=this.cloneScriptingObject(t);this.#o.addScriptingObject(o,n)}else this.#o.addScriptingObject(t,n)};cloneScriptingObject=t=>{if(!t)throw new Error("proxy is required");const n=new me(t.id,t.objectType);let o=[];return Object.keys(t).forEach(c=>{const h=t[c];if(this.#g(h)){const m=new le({name:h.name||c,objectId:n.id});Object.defineProperty(n,c,{value:m,enumerable:!0});const w=({eventParams:C,eventOptions:F})=>this.dispatchEvent({event:m,eventParams:C,eventOptions:F}),A=h.subscribe(w);o.push(()=>{h.unsubscribe(A)})}else if(this.#h(h)&&(Object.defineProperty(n,c,{value:async(...m)=>{const w=await h(...m);return ke(w)?this.cloneScriptingObject(w):w},enumerable:!0}),c==="dispose")){const m=n.dispose;Object.defineProperty(n,c,{value:()=>(n._dispose(),m.apply(n)),enumerable:!0})}}),n._dispose=()=>{o.forEach(c=>{c?.()}),o=[]},n};closeAllApps=async()=>{await Promise.all([...this.#i.keys()].map(this.closeApp))};closeApp=async t=>{if(!t)throw new Error("instanceId is required");const n=this.#i.get(t);if(!n){this.#e.warn(`Application with instance id ${t} is not found`);return}const{id:o}=n,c=this.#a.getConfigById(o);if(!c){this.#e.warn(`Configuration for application ${o} is not found`),this.#i.delete(t),Ge.remove(t);return}const{hostUrl:h}=c;try{this.#S(n),await this.#d({id:o,instanceId:t})}finally{const m=Ge.get(t);m?.contentDocument&&this.#p({id:o,instanceId:t,hostUrl:h,documentEle:m.contentDocument}),this.#i.delete(t),Ge.remove(t)}};dispatchEvent=async t=>{const{event:{id:n,name:o},eventOptions:c={}}=t,{guestId:h}=c;if(!n)throw new Error("Event Id is required");const m=n.split(".")?.[0],w=h?this.#o.getObject(m,{id:h}):this.#o.getObject(m);return w?this.#l.dispatchEvent(w,t):(this.#e.warn(`Attempt to dispatch event ${o} on unknown object ${m}`),Promise.resolve())};getApp=t=>this.#i.get(t)?.guest;getApps=()=>[...this.#i.values()].map(t=>t.guest);init=async()=>{await this.#n.load(),this.#a.init({version:this.#t,appConfig:this.#n})};mountApp=async t=>{if(!t)throw new Error("instanceId is required");const{id:n}=this.#i.get(t)||{};if(!n)throw new Error(`Application with instance id ${t} is not found`);const o=this.#a.getConfigById(n);if(!o)throw new Error(`Application with id ${n} is not found`);await this.#f({...o,instanceId:t})};openApp=async t=>{const{id:n,frameOptions:o,history:c,theme:h,homeRoute:m,initialRoute:w}=t,A=oe(),C=this.#a.getConfigById(n);if(!C)throw new Error(`Application ${n} is not found in app config`);const F=await Ge.create({id:n,instanceId:A,manifestPath:C.manifestPath,hostUrl:C.hostUrl,options:{title:C.name,...o}});if(!F?.contentDocument)throw new Error("unable to create iframe for the microapp");try{return this.#c.add({id:n,instanceId:A,documentEle:F.contentDocument}),await this.#w({instanceId:A,history:c,theme:h,documentEle:F.contentDocument,containerId:o?.containerId,...C,homeRoute:m??C.homeRoute,initialRoute:w}),await this.#f({instanceId:A,...C}),this.#x({id:n,instanceId:A}),A}catch(V){throw this.#p({id:n,instanceId:A,hostUrl:C.hostUrl,documentEle:F.contentDocument}),Ge.remove(A),V}};removeAllEventSubscriptions=()=>{this.#l.unsubscribeAll()};removeAllScriptingObjects=t=>{this.#o.removeAllScriptingObjects(t)};removeScriptingObject=(t,n)=>{this.#o.removeScriptingObject(t,n)};unmountApp=async t=>{if(!t)throw new Error("instanceId is required");const{id:n}=this.#i.get(t)||{};if(!n)throw new Error(`Application with instance id ${t} is not found`);const o=this.#a.getConfigById(n);if(!o)throw new Error(`Application with id ${n} is not found`);await this.#d({...o,instanceId:t})}}})(),Gt})());
23
+ `,t),{}),mn=r=>({space:{...r.spaces,xxxs:r.spaces[1],xxs:r.spaces[2],xxs2:r.spaces[3],xs:r.spaces[4],s:r.spaces[5],m:r.spaces[6],l:r.spaces[7],xl:r.spaces[8],xxl:r.spaces[9]},fontSizes:{...r.fontSizes,title:{500:r.fontSizes[3],600:r.fontSizes[4],700:r.fontSizes[5],800:r.fontSizes[6],900:r.fontSizes[7]},subTitle:{300:r.fontSizes[1],400:r.fontSizes[2]},label:{200:r.fontSizes[0],300:r.fontSizes[1],400:r.fontSizes[2]},value:{300:r.fontSizes[1],400:r.fontSizes[2],500:r.fontSizes[3],600:r.fontSizes[4]},hyperlink:{200:r.fontSizes[0],300:r.fontSizes[1],400:r.fontSizes[2]},microText:{200:r.fontSizes[0]}},fontWeights:{...r.fontWeights,thin:r.fontWeights[0],light:r.fontWeights[1],regular:r.fontWeights[3],semibold:r.fontWeights[5],bold:r.fontWeights[8]},lineHeights:{...r.lineHeights,r:r.lineHeights[0],m:r.lineHeights[1],l:r.lineHeights[2],xl:r.lineHeights[3]},letterSpacings:{normal:r.letterSpacings[0],tracked:r.letterSpacings[1],tight:r.letterSpacings[2],mega:r.letterSpacings[3]},fonts:{...r.fonts,default:r.fonts[0]},colors:{neutral:{"000":r.colors.neutral[0],"050":r.colors.neutral[1],"080":r.colors.neutral[2],100:r.colors.neutral[3],200:r.colors.neutral[4],300:r.colors.neutral[5],400:r.colors.neutral[6],500:r.colors.neutral[7],600:r.colors.neutral[8],700:r.colors.neutral[9],800:r.colors.neutral[10]},brand:{100:r.colors.brand[0],200:r.colors.brand[1],250:r.colors.brand[8],300:r.colors.brand[2],400:r.colors.brand[3],500:r.colors.brand[4],600:r.colors.brand[5],700:r.colors.brand[6],800:r.colors.brand[7]},success:{300:r.colors.success[0],400:r.colors.success[1],600:r.colors.success[2],900:r.colors.success[3],950:r.colors.success[4]},warning:{400:r.colors.warning[0],500:r.colors.warning[1],600:r.colors.warning[1],900:r.colors.warning[2],950:r.colors.warning[3]},danger:{200:r.colors.danger[0],400:r.colors.danger[1],600:r.colors.danger[2],900:r.colors.danger[3],950:r.colors.danger[4]}},shadows:{xs:r.shadows[0],s:r.shadows[1],m:r.shadows[2],l:r.shadows[3],xl:r.shadows[4]},breakpoints:{...r.breakpoints,xsmall:r.breakpoints[3],small:r.breakpoints[0],medium:r.breakpoints[1],large:r.breakpoints[2]},media:gn({xsmall:r.breakpoints[3],small:r.breakpoints[0],medium:r.breakpoints[1],large:r.breakpoints[2]}),zIndex:{dialog:r.zIndex[0],popper:r.zIndex[1],tooltip:r.zIndex[2],backdrop:r.zIndex[3],loader:r.zIndex[4]},states:{_:r.states[0],motionSafe:r.states[1],motionReduce:r.states[2],first:r.states[3],last:r.states[4],odd:r.states[5],even:r.states[6],visited:r.states[7],checked:r.states[8],focusWithin:r.states[9],hover:r.states[10],focus:r.states[11],focusVisible:r.states[12],active:r.states[13],disabled:r.states[14],placeholder:r.states[15]}}),vn=((r=re())=>()=>mn(r))(),qn=()=>{try{return window.parent.document,window.parent}catch{return window}},lr=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),jr=r=>Number(r.replace("px","")),Rr=()=>{const{width:r}=lr(),{breakpoints:t}=vn();return r<=jr(t.small)?"small":r<=jr(t.medium)?"medium":"large"},yn="microFrontendApps",bn=()=>!0,wn=r=>bn()?!0:String(r).toLowerCase()===z.PRODUCTION.toLowerCase(),xn=r=>r?new URL(r).pathname:"",Sn=r=>{const t=document.createElement("a");return t.href=r,t.href},An=(r,t)=>{const n=t.match(/^(?:\d+\.\d+)*/g);return r.replace(/{SYSTEM_VERSION}/,n&&n[0]||S)},$r=r=>!r||!r.length?!1:r.every(t=>typeof t=="string"),En=(r,t)=>{const{mode:n=z.PRODUCTION}=t;if(String(n).toLowerCase()!==z.PRODUCTION.toLowerCase()&&String(n).toLowerCase()!==z.DEVELOPMENT.toLowerCase())throw new Error(`invalid mode '${String(n)}' for ${r}`);const{production:o,development:c,microappManager:h=ne.APPSDK}=t;if(String(h).toLowerCase()===ne.APPSDK.toLowerCase()){if(String(n).toLowerCase()===z.PRODUCTION.toLowerCase()){if(!o)throw new Error(`microFrontendApps.${r} is missing production section in app.config.json`);if(!$r(o.files))throw new Error("invalid value for production.files")}if(String(n).toLowerCase()===z.DEVELOPMENT.toLowerCase()){if(!c)throw new Error(`microFrontendApps.${r} is missing development section in app.config.json`);if(!$r(c.files))throw new Error("invalid value for development.files")}}},Cn=({id:r,config:t,version:n="latest"})=>{const{mode:o=z.PRODUCTION,production:c,development:h,...m}=t,w=wn(o)?c:h,A=v()({id:r},{name:r,mode:z.PRODUCTION,manifestPath:"./{SYSTEM_VERSION}/",securityContext:s.USER,isJsModule:!0},m,{mode:o},w);return A.hostUrl=M(Sn(A.hostUrl||"")),A.homeRoute=M(A.homeRoute)||xn(A.hostUrl),A.manifestPath=M(An(A.manifestPath,n)),A};class Tn{#e=[];init=({version:t,appConfig:n})=>{const o=n.get(yn);o&&(this.#e=Object.keys(o).map(c=>(En(c,o[c]),Cn({id:c,config:o[c],version:t}))))};getConfigById=t=>this.#e.find(n=>n.id===t)}const On="ice-script-";class Mr{#e;constructor(t){this.#e=t}#t=({href:t,isESMModule:n=!0,documentEle:o})=>{const c=o.createElement("link");c.rel=n?"modulepreload":"preload",c.href=t,c.crossOrigin="anonymous",n||(c.as="script"),o.head.appendChild(c)};#r=({id:t,href:n,documentEle:o,isESMModule:c=!0})=>new Promise((h,m)=>{const w=o.createElement("script");w.id=t,w.src=O(n),w.crossOrigin="anonymous",w.nonce="__CSP_NONCE__",!D()&&c?w.type="module":w.async=!1,w.onload=h.bind(null,w.id),w.onerror=A=>{this.#e.error({message:`Error loading script ${w.src}`,exception:new Error(A)}),m(new Error(`Unable to load script ${w.src}`,{cause:new Error(A)}))},o.head.appendChild(w)});load=async(t,n)=>{const{documentEle:o,isESMModule:c}=n,h=/^https?:\/\//i,{cdnAssets:m,nonCdnAssets:w}=t.reduce((A,C,F)=>{const V=`${On}${n.name.toLowerCase()}-${F}`;if(h.test(C))A.cdnAssets.push({id:V,href:C}),this.#t({href:C,documentEle:o,isESMModule:c});else{const J=new URL(C,n.hostUrl);A.nonCdnAssets.push({id:V,href:J.href}),this.#t({href:J.href,documentEle:o,isESMModule:c})}return A},{cdnAssets:[],nonCdnAssets:[]});for(const{href:A,id:C}of[...m,...w])await this.#r({id:C,href:A,documentEle:o,isESMModule:c});return[...m,...w].map(A=>A.id)};remove=(t="",n=document)=>new Promise(o=>{const c=n.getElementById(t);if(!c){this.#e.warn(`script with id ${t} not found`),o();return}c.remove(),o()});removeDynamicImportedScripts=(t,n)=>{const o=new RegExp(L(t),"i"),c=n.getElementsByTagName("script");for(let h=c.length-1;h>=0;h-=1){const m=c[h],{src:w}=m;o.test(w)&&m.remove()}};removePrefetchLinks=(t,n)=>{const o=new RegExp(L(t),"i"),c=n.querySelectorAll('[rel="prefetch"]');for(let h=c.length-1;h>=0;h-=1){const m=c[h],{href:w}=m;o.test(w)&&m.remove()}}}const Pn="ice-style-";class Fr{#e;constructor(t){this.#e=t}#t=({id:t,href:n,documentEle:o})=>new Promise((c,h)=>{const m=o.createElement("link");m.id=t,m.nonce="__CSP_NONCE__",m.rel="stylesheet",m.href=O(n),m.onload=c.bind(null,m.id),m.onerror=w=>{this.#e.error({message:`Error loading stylesheet ${m.href}`,exception:new Error(w)}),h(new Error(`Unable to load stylesheet ${m.href}`,{cause:new Error(w)}))},o.head.appendChild(m)});load=async(t,n)=>{const o=[],c=t.map((h,m)=>{const w=new URL(h,n.hostUrl),A=`${Pn}${n.name.toLowerCase()}-${m}`;return o.push(A),this.#t({id:A,href:w.href,documentEle:n.documentEle})});return await Promise.all(c),o};remove=(t="",n=document)=>new Promise(o=>{const c=n.getElementById(t);if(!c){this.#e.warn(`style with id ${t} not found`),o();return}c.remove(),o()});removeDynamicImportedStyles=(t,n)=>{const o=new RegExp(L(t),"i"),c=n.querySelectorAll('[rel="stylesheet"]');for(let h=c.length-1;h>=0;h-=1){const m=c[h],{href:w}=m;o.test(w)&&m.remove()}}}const In=r=>r.replace(/\/\d+\.\d+/,"/latest"),jn=r=>{let t;try{t=new URL(r)}catch{return!1}return t.protocol==="http:"||t.protocol==="https:"},ur=new Map,kr={get:async({hostUrl:r,manifestPath:t})=>{const n=new URL(`${t}manifest.json`,r),o=O(n.href),c=ur.get(o);if(c)return c;const h=async m=>{const w=await fetch(m);if(!w.ok)throw new Error(`unable to get manifest ${m}`);if(!(w.headers?.get?.("content-type")??"").includes("application/json"))throw new Error(`manifest ${m} is not a valid json`);const C=await w.json();return ur.set(m,C),C};try{return await h(o)}catch(m){const w=In(t);if(t!==w){const A=O(new URL(`${w}manifest.json`,r).href);return await h(A)}throw m}},getFullFileNameofAssets:(r,t=[])=>t.reduce((n,o)=>{const c=r[o];if(c)n.push(c);else if(jn(o))n.push(o);else throw new Error(`unable to locate ${o} in manifest`);return n},[]),clearCache:()=>ur.clear()};class Rn{#e;#t;#r;#s;#n;constructor(t){this.#t=t.guest,this.#e=t.containerId,this.#r=t?.version||S,this.#s=t.soManager,this.#n=t.eventManager}get version(){return this.#r}getObject=t=>{try{const n=this.#s.getObject(t,this.#t);if(!n)return Promise.resolve(null);const o=new be(n.id,n.objectType);return Object.keys(n).forEach(c=>{const h=n[c];h instanceof le?Object.defineProperty(o,c,{value:new le({name:c,objectId:n.id}),enumerable:!0}):ee(h,c)&&Object.defineProperty(o,c,{value:(...m)=>(Object.defineProperty(h,"callContext",{value:{guest:this.#t},configurable:!0,enumerable:!0,writable:!0}),n[c](...m)),enumerable:!0})}),Promise.resolve(o)}catch(n){return Promise.reject(n)}};setAppWindowSize=t=>{if(!this.#e)return;const{size:n}=t,o=document.getElementById(this.#e);o&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`)};subscribe=t=>this.#n.subscribe(t);unsubscribe=t=>{this.#n.unsubscribe(t)}}class $n{constructor(){window.emui||(window.emui={}),window.emui.registerApp=this.#e}#e=({appId:t,app:n})=>{if(!t)throw new Error("appId is required");if(t==="__proto__"||t==="constructor"||t==="prototype")throw new Error(`Invalid appId: ${t}`);if(!n?.uuid)throw new Error("application uuid is required");if(window.emui[t]=window.emui[t]||[],Array.isArray(window.emui[t])){const o=window.emui[t].findIndex(c=>c.uuid===n.uuid);o>-1?window.emui[t][o]=n:window.emui[t].push(n)}else{let o=window.emui[t];o?.uuid===n.uuid?(o={...o,...n},window.emui[t]=[o]):typeof o.init>"u"?window.emui[t]=[{...o,...n}]:window.emui[t]=[window.emui[t],n]}};get=({id:t,instanceId:n})=>{const o=window.emui?.[t];return Array.isArray(o)?o.find(h=>h.uuid===n)??null:o?.uuid===n?o:null};add=({id:t,instanceId:n,documentEle:o})=>{if(!n)throw new Error(`instanceId (uuid) is required to register application ${t}`);const c={uuid:n,init:null,mount:null,unmount:null},h=window.emui[t];h?Array.isArray(h)?h.push(c):window.emui[t]=[h,c]:window.emui[t]=[c],o.defaultView&&(o.defaultView.emui=o.defaultView.emui??{},o.defaultView.emui.uuid=n)};delete=({id:t,instanceId:n})=>{if(Array.isArray(window.emui[t])){const o=window.emui[t].findIndex(c=>c.uuid===n);o>-1&&window.emui[t].splice(o,1),window.emui[t].length===0&&delete window.emui[t]}else delete window.emui[t]}}const Mn=12e4,Dr=["click","scroll","keypress","touchstart"],Fn=/\.css$/,Nr=r=>Fn.test(r);class kn{#e;#t;#r;#s;#n;#a=new Tn;#o;#l;#i=new Map;#c=new $n;#u=!0;constructor(t){const{logger:n}=t;if(!n)throw new Error("logger is required");this.#e=t.logger,this.#t=t.version,this.#u=t.extendSession??!0,this.#n=new j({version:t.version,baseUrl:t.appConfigBaseUrl}),this.#r=new Mr(n),this.#s=new Fr(n),this.#o=new xe,this.#l=new Ht(this.#e)}#h(t){return typeof t=="function"}#g=t=>t instanceof E||typeof t?.subscribe=="function";#m=(t,n)=>`Application ${t} with instance id ${n} is not found. Most probably the appId property of app.config.json is not set to ${t}`;#v=(t,n=document)=>{const{elementIds:o}=this.#i.get(t)||{};o&&o.forEach(c=>{const h=n.getElementById(c);h&&h.remove()})};#y=({id:t,instanceId:n,documentEle:o,elementIds:c})=>{const h=this.#c.get({id:t,instanceId:n});if(!h)throw new Error(this.#m(t,n));this.#i.set(n,{id:t,instanceId:n,elementIds:c,guest:{guestWindow:o?.defaultView,...h}})};#b=async({id:t,instanceId:n,containerId:o,hostUrl:c,manifestPath:h,homeRoute:m,initialRoute:w,history:A,theme:C})=>{const F=this.#c.get({id:t,instanceId:n});if(!F)throw new Error(`Application ${t} with instance id ${n} is not found. Most probably the appId property of app.config.json is not set to ${t}`);if(!F.init||typeof F.init!="function")throw new Error(`Application ${t} with instance id ${n} doesn't expose init method`);const V=new Rn({guest:{id:t},version:this.#t,containerId:o,logger:this.#e,soManager:this.#o,eventManager:this.#l});return F.init({host:V,hostUrl:c,manifestPath:h,homeRoute:m,initialRoute:w,prevState:null,history:A,theme:C,hostBreakpoint:Rr(),hostViewportSize:lr(),logger:this.#e})};#w=async t=>{try{const{id:n,instanceId:o,files:c,name:h,hostUrl:m,documentEle:w,isJsModule:A}=t;this.#e.debug(`Application ${n} with instance id ${o} is loading...`);let C=c;const F=await kr.get(t);C=kr.getFullFileNameofAssets(F,c);const V=C.filter(U=>Nr(U)),J=C.filter(U=>!Nr(U)),se={name:h,hostUrl:m,documentEle:w,isESMModule:A},[Z,Q]=await Promise.all([this.#s.load(V,se),this.#r.load(J,se)]);this.#y({id:n,instanceId:o,documentEle:w,elementIds:[...Z,...Q]}),await this.#b(t),this.#e.audit(`Application ${n} with instance id ${o} loaded`)}catch(n){const o=`Application load failed. Unable to load one or more resources for ${t.id} with instance id ${t.instanceId}. ${n.message}`;throw this.#e.error({message:o,appId:t.id,exception:n}),new Error(o)}};#p=({id:t,instanceId:n,hostUrl:o,documentEle:c})=>{this.#e.debug(`Application ${t} with instance id ${n} unloading...`),this.#c.get({id:t,instanceId:n})&&(this.#v(n,c),this.#r.removeDynamicImportedScripts(o,c),this.#r.removePrefetchLinks(o,c),this.#s.removeDynamicImportedStyles(o,c),this.#c.delete({id:t,instanceId:n}),this.#e.audit(`Application ${t} with instance id ${n} unloaded`))};#f=async({id:t,instanceId:n})=>{const o=this.#c.get({id:t,instanceId:n});if(!o?.mount||typeof o?.mount!="function")throw new Error(`Application ${t} with instance id ${n} doesn't expose mount method`);return o.mount({containerId:`${St}${t}`,hostBreakpoint:Rr(),hostViewportSize:lr()})};#d=({id:t,instanceId:n})=>{const o=this.#c.get({id:t,instanceId:n});if(!o?.unmount)return null;if(typeof o.unmount!="function")throw new Error(`Application ${t} with instance id ${n} doesn't expose unmount method`);return o.unmount({containerId:`${St}${t}`})};#x=({id:t,instanceId:n})=>{if(this.#u)try{const o=this.#o.getObject(te.Application);if(!o){this.#e.warn({message:`Application scripting object not available for ${t} to manage session`});return}const c=this.#i.get(n);if(!c)return;c.keepAlive=G()(async()=>{try{await o.keepSessionAlive()}catch(m){this.#e.error(`Error keeping session alive. ${m.message}`)}},Mn);const h=Ge.get(n);Dr.forEach(m=>{h?.contentDocument?.addEventListener(m,c.keepAlive)})}catch(o){this.#e.warn({message:`Application scripting object not available for ${t} to manage session`,exception:o})}};#S=t=>{if(!this.#u||!t)return;const{keepAlive:n,instanceId:o}=t;if(n){const h=Ge.get(o)?.contentDocument;h&&Dr.forEach(m=>{h.removeEventListener(m,n)}),t.keepAlive?.cancel()}};addScriptingObject=(t,n)=>{if(ke(t)){const o=this.cloneScriptingObject(t);this.#o.addScriptingObject(o,n)}else this.#o.addScriptingObject(t,n)};cloneScriptingObject=t=>{if(!t)throw new Error("proxy is required");const n=new me(t.id,t.objectType);let o=[];return Object.keys(t).forEach(c=>{const h=t[c];if(this.#g(h)){const m=new le({name:h.name||c,objectId:n.id});Object.defineProperty(n,c,{value:m,enumerable:!0});const w=({eventParams:C,eventOptions:F})=>this.dispatchEvent({event:m,eventParams:C,eventOptions:F}),A=h.subscribe(w);o.push(()=>{h.unsubscribe(A)})}else if(this.#h(h)&&(Object.defineProperty(n,c,{value:async(...m)=>{const w=await h(...m);return ke(w)?this.cloneScriptingObject(w):w},enumerable:!0}),c==="dispose")){const m=n.dispose;Object.defineProperty(n,c,{value:()=>(n._dispose(),m.apply(n)),enumerable:!0})}}),n._dispose=()=>{o.forEach(c=>{c?.()}),o=[]},n};closeAllApps=async()=>{await Promise.all([...this.#i.keys()].map(this.closeApp))};closeApp=async t=>{if(!t)throw new Error("instanceId is required");const n=this.#i.get(t);if(!n){this.#e.warn(`Application with instance id ${t} is not found`);return}const{id:o}=n,c=this.#a.getConfigById(o);if(!c){this.#e.warn(`Configuration for application ${o} is not found`),this.#i.delete(t),Ge.remove(t);return}const{hostUrl:h}=c;try{this.#S(n),await this.#d({id:o,instanceId:t})}finally{const m=Ge.get(t);m?.contentDocument&&this.#p({id:o,instanceId:t,hostUrl:h,documentEle:m.contentDocument}),this.#i.delete(t),Ge.remove(t)}};dispatchEvent=async t=>{const{event:{id:n,name:o},eventOptions:c={}}=t,{guestId:h}=c;if(!n)throw new Error("Event Id is required");const m=n.split(".")?.[0],w=h?this.#o.getObject(m,{id:h}):this.#o.getObject(m);return w?this.#l.dispatchEvent(w,t):(this.#e.warn(`Attempt to dispatch event ${o} on unknown object ${m}`),Promise.resolve())};getApp=t=>this.#i.get(t)?.guest;getApps=()=>[...this.#i.values()].map(t=>t.guest);init=async()=>{await this.#n.load(),this.#a.init({version:this.#t,appConfig:this.#n})};mountApp=async t=>{if(!t)throw new Error("instanceId is required");const{id:n}=this.#i.get(t)||{};if(!n)throw new Error(`Application with instance id ${t} is not found`);const o=this.#a.getConfigById(n);if(!o)throw new Error(`Application with id ${n} is not found`);await this.#f({...o,instanceId:t})};openApp=async t=>{const{id:n,frameOptions:o,history:c,theme:h,homeRoute:m,initialRoute:w}=t,A=oe(),C=this.#a.getConfigById(n);if(!C)throw new Error(`Application ${n} is not found in app config`);const F=await Ge.create({id:n,instanceId:A,manifestPath:C.manifestPath,hostUrl:C.hostUrl,options:{title:C.name,...o}});if(!F?.contentDocument)throw new Error("unable to create iframe for the microapp");try{return this.#c.add({id:n,instanceId:A,documentEle:F.contentDocument}),await this.#w({instanceId:A,history:c,theme:h,documentEle:F.contentDocument,containerId:o?.containerId,...C,homeRoute:m??C.homeRoute,initialRoute:w}),await this.#f({instanceId:A,...C}),this.#x({id:n,instanceId:A}),A}catch(V){throw this.#p({id:n,instanceId:A,hostUrl:C.hostUrl,documentEle:F.contentDocument}),Ge.remove(A),V}};removeAllEventSubscriptions=()=>{this.#l.unsubscribeAll()};removeAllScriptingObjects=t=>{this.#o.removeAllScriptingObjects(t)};removeScriptingObject=(t,n)=>{this.#o.removeScriptingObject(t,n)};unmountApp=async t=>{if(!t)throw new Error("instanceId is required");const{id:n}=this.#i.get(t)||{};if(!n)throw new Error(`Application with instance id ${t} is not found`);const o=this.#a.getConfigById(n);if(!o)throw new Error(`Application with id ${n} is not found`);await this.#d({...o,instanceId:t})}}})(),Gt})());
24
24
 
25
25
  //# sourceMappingURL=index.js.map
Binary file
Binary file