@pega/constellationjs 0.2421.1 → 0.2612.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.
Files changed (41) hide show
  1. package/README.md +40 -32
  2. package/dist/bootstrap-shell.js +1 -1
  3. package/dist/bootstrap-shell.js.br +0 -0
  4. package/dist/bootstrap-shell.js.gz +0 -0
  5. package/dist/constellation-core-react-native.js +2 -0
  6. package/dist/constellation-core-react-native.js.br +0 -0
  7. package/dist/constellation-core-react-native.js.gz +0 -0
  8. package/dist/constellation-core-react-native.js.map +1 -0
  9. package/dist/constellation-core-web.js +1 -1
  10. package/dist/constellation-core-web.js.br +0 -0
  11. package/dist/constellation-core-web.js.gz +0 -0
  12. package/dist/constellation-core-web.js.map +1 -1
  13. package/dist/constellation-core.797b019a.js +2 -0
  14. package/dist/constellation-core.797b019a.js.LICENSE.txt +124 -0
  15. package/dist/constellation-core.797b019a.js.br +0 -0
  16. package/dist/constellation-core.797b019a.js.gz +0 -0
  17. package/dist/constellation-core.797b019a.js.map +1 -0
  18. package/dist/constellation-core.json +1 -1
  19. package/dist/js/libphonenumber-web.js +2 -0
  20. package/dist/js/libphonenumber-web.js.br +0 -0
  21. package/dist/js/libphonenumber-web.js.gz +0 -0
  22. package/dist/js/libphonenumber-web.js.map +1 -0
  23. package/dist/js/libphonenumber.c2686009.js +2 -0
  24. package/dist/js/libphonenumber.c2686009.js.br +0 -0
  25. package/dist/js/libphonenumber.c2686009.js.gz +0 -0
  26. package/dist/js/libphonenumber.c2686009.js.map +1 -0
  27. package/dist/lib_asset.json +1 -1
  28. package/package.json +1 -1
  29. package/dist/constellation-core.7517791f.js +0 -2
  30. package/dist/constellation-core.7517791f.js.br +0 -0
  31. package/dist/constellation-core.7517791f.js.gz +0 -0
  32. package/dist/constellation-core.7517791f.js.map +0 -1
  33. package/dist/js/531-web.js +0 -2
  34. package/dist/js/531-web.js.br +0 -0
  35. package/dist/js/531-web.js.gz +0 -0
  36. package/dist/js/531-web.js.map +0 -1
  37. package/dist/js/531.177c98ad.js +0 -2
  38. package/dist/js/531.177c98ad.js.br +0 -0
  39. package/dist/js/531.177c98ad.js.gz +0 -0
  40. package/dist/js/531.177c98ad.js.map +0 -1
  41. /package/dist/{constellation-core.7517791f.js.LICENSE.txt → constellation-core-web.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ var e,t,n={953:e=>{class t{constructor(e,t,n,s,r){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=s,this.reflect=r,this.msb_mask=1<<this.width-1,this.mask=this.msb_mask-1<<1|1,this.crc_shift=this.width<8?8-this.width:0,this.shifted_xor_in=this.xor_in<<this.crc_shift;let a=this.gen_table();this.table=a,8!==this.width||this.xor_in||this.xor_out||this.reflect||(this.calculate=function(e){e=this.converter.validate_buffer(e);let t=0;for(let n=0;n<e.length;n++)t=a[t^e[n]];return t})}calculate(e){let t;e=this.converter.validate_buffer(e);let{table:n,width:s,crc_shift:r,mask:a}=this;if(this.reflect){t=this.reflected_xor_in;for(let s=0;s<e.length;s++){t=(n[255&(t^e[s])]^t>>>8)&a}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>s-8+r^e[o])]<<r^t<<8-r&a<<r;t>>=r}return t^=this.xor_out,t>>>0}calculate_no_table(e){e=this.converter.validate_buffer(e);let t=this.xor_in;for(let n=0;n<e.length;n++){let s=e[n];this.reflect&&(s=l(s,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;s&128>>e&&(n^=this.msb_mask),t<<=1,n&&(t^=this.poly)}t&=this.mask}return this.reflect&&(t=l(t,this.width)),t^=this.xor_out,t>>>0}gen_table(){let e=[];for(let t=0;t<256;t++){let n=t;this.reflect&&(n=l(n,8)),n<<=this.width-8+this.crc_shift;for(let e=0;e<8;e++)0!=(n&this.msb_mask<<this.crc_shift)?(n<<=1,n^=this.poly<<this.crc_shift):n<<=1;this.reflect&&(n=l(n>>this.crc_shift,this.width)<<this.crc_shift),n=n>>this.crc_shift&this.mask,e[t]=n>>>0}return new Int32Array(e)}print_table(){let e=this.table,t=Math.ceil(this.width/4),n=t<4?4:3,s=e.length>>n,r=1<<n,a="";for(let o=0;o<s;o++){let s="";for(let a=0;a<r;a++){let r=e[o<<n|a];r="000000000"+r.toString(16),r=r.substr(r.length-t),s+="0x"+r+", "}a+=" "+s+"\n"}return a="[\n"+a.slice(0,-3)+"\n]",a}}const n="undefined"!=typeof Buffer,s="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r=void 0!==typeof BigInt&&BigInt(256);class a{validate_buffer(e){switch(typeof e){case"number":{if(!Number.isSafeInteger(e)||e<0)throw Error(`number data must be a nonnegative safe integer, not ${e}`);if(this.fromUInt32&&e<=4294967295)return this.fromUInt32(e);const t=[];for(;e>0||t.length<4;)t.unshift(e%256),e=Math.floor(e/256);return this.fromByteArray(t)}case"string":return this.fromString(e);case"bigint":{if(e<0)throw Error(`bigint data must be nonnegative, not ${e}`);const t=[];for(;e>0||t.length<4;)t.unshift(Number(e%r)),e/=r;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(s){if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e)}throw new Error(`Unrecognized data type ${typeof e}: ${e}`)}}}class o extends a{fromUInt32(e){const t=Buffer.alloc(4);return t.writeUInt32BE(e),t}fromByteArray=Buffer.from.bind(Buffer);fromString=Buffer.from.bind(Buffer)}class i extends a{fromByteArray=Uint8Array.from.bind(Uint8Array);fromString(e){return new TextEncoder("utf-8").encode(e)}}function c(e=!1){if(s&&(e||!n))return new i;if(n)return new o;throw Error("either need TypedArrays or Buffer")}function l(e,t){let n=0;for(let s=0;s<t;s++)n=n<<1|1&e,e>>=1;return n}const u={crc1:new t(1,1,0,0,!1),crc6:new t(6,47,0,0,!1),crc8:new t(8,7,0,0,!1),crc10:new t(10,563,0,0,!1),crc16:new t(16,32773,0,0,!0),crc24:new t(24,8801531,11994318,0,!1),crc32:new t(32,79764919,4294967295,4294967295,!0),crc32c:new t(32,517762881,4294967295,4294967295,!0)};function d(e){}e.exports={CRC:t,crc:function(e,n,s,r,a){let o=new t(e,n,s,r,a);return o.calculate.bind(o)},makeBufferConverter:c,models:u,crc1:d,crc6:d,crc8:d,crc10:d,crc16:d,crc24:d,crc32:d,crc32c:d};for(let t in u){let n=u[t];e.exports[t]=n.calculate.bind(n)}},754:e=>{function t(e){return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}t.keys=()=>[],t.resolve=t,t.id=754,e.exports=t}},s={};function r(e){var t=s[e];if(void 0!==t)return t.exports;var a=s[e]={exports:{}};return n[e](a,a.exports,r),a.exports}r.m=n,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"js/libphonenumber.c2686009.js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;if("string"==typeof import.meta.url&&(e=import.meta.url),!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),e={388:0},t=t=>{var n,s,{__webpack_ids__:a,__webpack_modules__:o,__webpack_runtime__:i}=t,c=0;for(n in o)r.o(o,n)&&(r.m[n]=o[n]);for(i&&i(r);c<a.length;c++)s=a[c],r.o(e,s)&&e[s]&&e[s][0](),e[a[c]]=0},r.f.j=(n,s)=>{var a=r.o(e,n)?e[n]:void 0;if(0!==a)if(a)s.push(a[1]);else{var o=import("./"+r.u(n)).then(t,(t=>{throw 0!==e[n]&&(e[n]=void 0),t}));o=Promise.race([o,new Promise((t=>a=e[n]=[t]))]),s.push(a[1]=o)}};var a={};r.d(a,{A:()=>Av});var o={};r.r(o),r.d(o,{buildContextName:()=>Qs,buildModalContext:()=>er,buildTransientContextName:()=>Js,getContainerIdFromContext:()=>nr,getParentContext:()=>tr,getParentContextName:()=>Ks,getTargetFromContext:()=>Zs,getTransientContext:()=>Xs});var i={};r.r(i),r.d(i,{getResolvedTargetName:()=>Wa,getRoutingInfo:()=>Ha,getSemanticURLFromRoutingInfo:()=>qa});var c={};r.r(c),r.d(c,{evaluate:()=>No,handleChange:()=>So,hasDeclareExpression:()=>Co,updateDeclareExpressions:()=>_o});var l={};r.r(l),r.d(l,{hasBrowserEnv:()=>pc,hasStandardBrowserEnv:()=>hc,hasStandardBrowserWebWorkerEnv:()=>fc,navigator:()=>gc,origin:()=>mc});var u={};r.r(u),r.d(u,{publishExpressions:()=>tg,publishMetadata:()=>eg,publishResponse:()=>ng});var d={};r.r(d),r.d(d,{doesRestApiExist:()=>cg,getCancelTokenSource:()=>lg,getCaseApi:()=>pg,getHeaderProcessor:()=>ag,invokeCustomRestApi:()=>ig,invokeRestApi:()=>og,isRequestCanceled:()=>ug,registerInterceptor:()=>dg});var p={};r.r(p),r.d(p,{fetchViewResources:()=>pm,refreshViewByName:()=>fm,updateViewResources:()=>dm});var g={};r.r(g),r.d(g,{CONTAINER_NAMES:()=>Cy,CONTAINER_TYPES:()=>Ay,addRootContainerItem:()=>sA,areContainerItemsPresent:()=>Ry,cleanupTransientContainer:()=>dA,clearContainerItems:()=>gA,clearTransientData:()=>lA,closeContainerItem:()=>nA,getActiveContainerItemContext:()=>By,getActiveContainerItemIDFromRoutingInfo:()=>_A,getActiveContainerItemName:()=>Fy,getActiveContext:()=>yA,getChildContainerItemId:()=>Ty,getChildContainerItems:()=>$y,getChildContainers:()=>Gy,getChildContainersContexts:()=>Wy,getContainerAPI:()=>hA,getContainerAccessOrder:()=>Oy,getContainerData:()=>Ny,getContainerItemByKey:()=>My,getContainerItemData:()=>Dy,getContainerItemName:()=>xy,getContainerItems:()=>Py,getContainerLimit:()=>Ky,getContainerParentContext:()=>SA,getContainerType:()=>Uy,getContextByTargetAndKey:()=>CA,getDataContextName:()=>ky,getFlowContainer:()=>TA,getLeastRecentlyUsedNonDirtyContainerItemID:()=>eA,getParentContainerItem:()=>NA,getRootContainerName:()=>EA,getSuggestionContexts:()=>Hy,getTargetFromContainerItemID:()=>tA,getTransientItems:()=>oA,hasContainerItems:()=>Yy,isContainerDirty:()=>Zy,isContainerInitialized:()=>Ly,isContainerItemActive:()=>Vy,isContainerItemContextBeingUsedInOtherContainers:()=>aA,isContainerItemExists:()=>by,isContainerItemExistsWithoutKey:()=>vy,isContainerLimitReached:()=>Jy,isContainerMultipleMode:()=>zy,isContainerSingleMode:()=>qy,purgeTransientData:()=>uA,removeContainer:()=>fA,replaceTransientData:()=>cA,resetContainersPayload:()=>Xy,setContainerLimit:()=>Qy,updateCaseContextEtag:()=>IA,updateParentLastUpdateTime:()=>AA,updateRelatedContextEtag:()=>mA,updateTransientData:()=>iA});var h={};r.r(h),r.d(h,{beginDesignerRefresh:()=>IC,endDesignerRefresh:()=>EC,getAIAgent:()=>xC,getAdditionalInfo:()=>FC,getDataPageKeys:()=>MC,getDataPageMetadata:()=>NC,getDesignerViewStoreVersion:()=>mC,getEditableFieldConfigUtil:()=>jC,getEmbeddedPropertyMetadata:()=>hC,getFieldParameters:()=>OC,getFieldsByClassName:()=>PC,getFormat:()=>bC,getGenAICoach:()=>vC,getInsight:()=>DC,getLocaleUtilsForLanguage:()=>pC,getLocalizationServiceFromStore:()=>gC,getLookUpDataPage:()=>LC,getLookUpDataPageInfo:()=>UC,getParagraph:()=>RC,getPersonalizationMetadata:()=>TC,getPropertyMetadata:()=>dC,getResolvedFieldMetadata:()=>VC,getSavableDataPage:()=>wC,isViewExists:()=>SC,mergeStore:()=>uC,resolveNavigation:()=>_C,resolveView:()=>CC,updateNavigationStore:()=>yC,updateStores:()=>AC,updateViewStore:()=>fC});var f={};r.r(f),r.d(f,{dispatch:()=>qC,doesContextExist:()=>iS,getActionType:()=>ZC,getContextValue:()=>JC,getDataObject:()=>zC,getReferenceTokens:()=>GC,getSharedDataObject:()=>YC,getStore:()=>HC,getValue:()=>QC,isMergeable:()=>tS,lookupContextValue:()=>XC,mergeDeep:()=>sS,performReplaceAndRearrange:()=>nS,removeItem:()=>eS,replaceValue:()=>aS,resetStore:()=>oS,setStore:()=>WC,updateValue:()=>rS});var m={};r.r(m),r.d(m,{activateContainerItem:()=>VS,addContainerItem:()=>OS,addMessages:()=>jS,addSharedData:()=>KS,addTransientItem:()=>RS,addWork:()=>NS,clearTransientData:()=>vS,createWork:()=>ES,error:()=>YS,finishAssignment:()=>WS,initContainers:()=>DS,listAction:()=>JS,loadView:()=>SS,mergeData:()=>AS,openAssignment:()=>HS,openWorkByHandle:()=>TS,postProcess:()=>zS,purgeTransientData:()=>wS,removeAllTransientItems:()=>BS,removeContainerItem:()=>kS,removeSharedData:()=>QS,removeTransientItem:()=>$S,replaceContainerItem:()=>GS,replaceTransientData:()=>xS,resetContainers:()=>PS,resetLoading:()=>US,setLoading:()=>LS,setSharedProperty:()=>ZS,setStateProperty:()=>e_,showCasePreview:()=>XS,showHarness:()=>CS,showHistory:()=>qS,showPage:()=>_S,upMergeAndRemoveContainerItem:()=>FS,updateContainerItem:()=>MS,updateTransientData:()=>bS});var I={};r.r(I),r.d(I,{buildResizeMessage:()=>JR,mashup:()=>XR});const E=function(){this.__data__=[],this.size=0};const y=function(e,t){return e===t||e!=e&&t!=t};const A=function(e,t){for(var n=e.length;n--;)if(y(e[n][0],t))return n;return-1};var C=Array.prototype.splice;const S=function(e){var t=this.__data__,n=A(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),--this.size,!0)};const _=function(e){var t=this.__data__,n=A(t,e);return n<0?void 0:t[n][1]};const N=function(e){return A(this.__data__,e)>-1};const T=function(e,t){var n=this.__data__,s=A(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this};function D(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}D.prototype.clear=E,D.prototype.delete=S,D.prototype.get=_,D.prototype.has=N,D.prototype.set=T;const P=D;const O=function(){this.__data__=new P,this.size=0};const R=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};const b=function(e){return this.__data__.get(e)};const v=function(e){return this.__data__.has(e)};const x="object"==typeof global&&global&&global.Object===Object&&global;var w="object"==typeof self&&self&&self.Object===Object&&self;const M=x||w||Function("return this")();const L=M.Symbol;var U=Object.prototype,F=U.hasOwnProperty,V=U.toString,j=L?L.toStringTag:void 0;const k=function(e){var t=F.call(e,j),n=e[j];try{e[j]=void 0;var s=!0}catch(e){}var r=V.call(e);return s&&(t?e[j]=n:delete e[j]),r};var B=Object.prototype.toString;const $=function(e){return B.call(e)};var G=L?L.toStringTag:void 0;const W=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":G&&G in Object(e)?k(e):$(e)};const H=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const q=function(e){if(!H(e))return!1;var t=W(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const z=M["__core-js_shared__"];var Y,K=(Y=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";const Q=function(e){return!!K&&K in e};var J=Function.prototype.toString;const X=function(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var Z=/^\[object .+?Constructor\]$/,ee=Function.prototype,te=Object.prototype,ne=ee.toString,se=te.hasOwnProperty,re=RegExp("^"+ne.call(se).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ae=function(e){return!(!H(e)||Q(e))&&(q(e)?re:Z).test(X(e))};const oe=function(e,t){return null==e?void 0:e[t]};const ie=function(e,t){var n=oe(e,t);return ae(n)?n:void 0};const ce=ie(M,"Map");const le=ie(Object,"create");const ue=function(){this.__data__=le?le(null):{},this.size=0};const de=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var pe=Object.prototype.hasOwnProperty;const ge=function(e){var t=this.__data__;if(le){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return pe.call(t,e)?t[e]:void 0};var he=Object.prototype.hasOwnProperty;const fe=function(e){var t=this.__data__;return le?void 0!==t[e]:he.call(t,e)};const me=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=le&&void 0===t?"__lodash_hash_undefined__":t,this};function Ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}Ie.prototype.clear=ue,Ie.prototype.delete=de,Ie.prototype.get=ge,Ie.prototype.has=fe,Ie.prototype.set=me;const Ee=Ie;const ye=function(){this.size=0,this.__data__={hash:new Ee,map:new(ce||P),string:new Ee}};const Ae=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Ce=function(e,t){var n=e.__data__;return Ae(t)?n["string"==typeof t?"string":"hash"]:n.map};const Se=function(e){var t=Ce(this,e).delete(e);return this.size-=t?1:0,t};const _e=function(e){return Ce(this,e).get(e)};const Ne=function(e){return Ce(this,e).has(e)};const Te=function(e,t){var n=Ce(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this};function De(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}De.prototype.clear=ye,De.prototype.delete=Se,De.prototype.get=_e,De.prototype.has=Ne,De.prototype.set=Te;const Pe=De;const Oe=function(e,t){var n=this.__data__;if(n instanceof P){var s=n.__data__;if(!ce||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pe(s)}return n.set(e,t),this.size=n.size,this};function Re(e){var t=this.__data__=new P(e);this.size=t.size}Re.prototype.clear=O,Re.prototype.delete=R,Re.prototype.get=b,Re.prototype.has=v,Re.prototype.set=Oe;const be=Re;const ve=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const xe=function(e){return this.__data__.has(e)};function we(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pe;++t<n;)this.add(e[t])}we.prototype.add=we.prototype.push=ve,we.prototype.has=xe;const Me=we;const Le=function(e,t){for(var n=-1,s=null==e?0:e.length;++n<s;)if(t(e[n],n,e))return!0;return!1};const Ue=function(e,t){return e.has(t)};const Fe=function(e,t,n,s,r,a){var o=1&n,i=e.length,c=t.length;if(i!=c&&!(o&&c>i))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,p=!0,g=2&n?new Me:void 0;for(a.set(e,t),a.set(t,e);++d<i;){var h=e[d],f=t[d];if(s)var m=o?s(f,h,d,t,e,a):s(h,f,d,e,t,a);if(void 0!==m){if(m)continue;p=!1;break}if(g){if(!Le(t,(function(e,t){if(!Ue(g,t)&&(h===e||r(h,e,n,s,a)))return g.push(t)}))){p=!1;break}}else if(h!==f&&!r(h,f,n,s,a)){p=!1;break}}return a.delete(e),a.delete(t),p};const Ve=M.Uint8Array;const je=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,s){n[++t]=[s,e]})),n};const ke=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var Be=L?L.prototype:void 0,$e=Be?Be.valueOf:void 0;const Ge=function(e,t,n,s,r,a,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Ve(e),new Ve(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return y(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var i=je;case"[object Set]":var c=1&s;if(i||(i=ke),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;s|=2,o.set(e,t);var u=Fe(i(e),i(t),s,r,a,o);return o.delete(e),u;case"[object Symbol]":if($e)return $e.call(e)==$e.call(t)}return!1};const We=function(e,t){for(var n=-1,s=t.length,r=e.length;++n<s;)e[r+n]=t[n];return e};const He=Array.isArray;const qe=function(e,t,n){var s=t(e);return He(e)?s:We(s,n(e))};const ze=function(e,t){for(var n=-1,s=null==e?0:e.length,r=0,a=[];++n<s;){var o=e[n];t(o,n,e)&&(a[r++]=o)}return a};const Ye=function(){return[]};var Ke=Object.prototype.propertyIsEnumerable,Qe=Object.getOwnPropertySymbols;const Je=Qe?function(e){return null==e?[]:(e=Object(e),ze(Qe(e),(function(t){return Ke.call(e,t)})))}:Ye;const Xe=function(e,t){for(var n=-1,s=Array(e);++n<e;)s[n]=t(n);return s};const Ze=function(e){return null!=e&&"object"==typeof e};const et=function(e){return Ze(e)&&"[object Arguments]"==W(e)};var tt=Object.prototype,nt=tt.hasOwnProperty,st=tt.propertyIsEnumerable;const rt=et(function(){return arguments}())?et:function(e){return Ze(e)&&nt.call(e,"callee")&&!st.call(e,"callee")};const at=function(){return!1};var ot="object"==typeof exports&&exports&&!exports.nodeType&&exports,it=ot&&"object"==typeof module&&module&&!module.nodeType&&module,ct=it&&it.exports===ot?M.Buffer:void 0;const lt=(ct?ct.isBuffer:void 0)||at;var ut=/^(?:0|[1-9]\d*)$/;const dt=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ut.test(e))&&e>-1&&e%1==0&&e<t};const pt=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var gt={};gt["[object Float32Array]"]=gt["[object Float64Array]"]=gt["[object Int8Array]"]=gt["[object Int16Array]"]=gt["[object Int32Array]"]=gt["[object Uint8Array]"]=gt["[object Uint8ClampedArray]"]=gt["[object Uint16Array]"]=gt["[object Uint32Array]"]=!0,gt["[object Arguments]"]=gt["[object Array]"]=gt["[object ArrayBuffer]"]=gt["[object Boolean]"]=gt["[object DataView]"]=gt["[object Date]"]=gt["[object Error]"]=gt["[object Function]"]=gt["[object Map]"]=gt["[object Number]"]=gt["[object Object]"]=gt["[object RegExp]"]=gt["[object Set]"]=gt["[object String]"]=gt["[object WeakMap]"]=!1;const ht=function(e){return Ze(e)&&pt(e.length)&&!!gt[W(e)]};const ft=function(e){return function(t){return e(t)}};var mt="object"==typeof exports&&exports&&!exports.nodeType&&exports,It=mt&&"object"==typeof module&&module&&!module.nodeType&&module,Et=It&&It.exports===mt&&x.process,yt=function(){try{var e=It&&It.require&&It.require("util").types;return e||Et&&Et.binding&&Et.binding("util")}catch(e){}}();var At=yt&&yt.isTypedArray;const Ct=At?ft(At):ht;var St=Object.prototype.hasOwnProperty;const _t=function(e,t){var n=He(e),s=!n&&rt(e),r=!n&&!s&&lt(e),a=!n&&!s&&!r&&Ct(e),o=n||s||r||a,i=o?Xe(e.length,String):[],c=i.length;for(var l in e)!t&&!St.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||dt(l,c))||i.push(l);return i};var Nt=Object.prototype;const Tt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Nt)};const Dt=function(e,t){return function(n){return e(t(n))}};const Pt=Dt(Object.keys,Object);var Ot=Object.prototype.hasOwnProperty;const Rt=function(e){if(!Tt(e))return Pt(e);var t=[];for(var n in Object(e))Ot.call(e,n)&&"constructor"!=n&&t.push(n);return t};const bt=function(e){return null!=e&&pt(e.length)&&!q(e)};const vt=function(e){return bt(e)?_t(e):Rt(e)};const xt=function(e){return qe(e,vt,Je)};var wt=Object.prototype.hasOwnProperty;const Mt=function(e,t,n,s,r,a){var o=1&n,i=xt(e),c=i.length;if(c!=xt(t).length&&!o)return!1;for(var l=c;l--;){var u=i[l];if(!(o?u in t:wt.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var h=o;++l<c;){var f=e[u=i[l]],m=t[u];if(s)var I=o?s(m,f,u,t,e,a):s(f,m,u,e,t,a);if(!(void 0===I?f===m||r(f,m,n,s,a):I)){g=!1;break}h||(h="constructor"==u)}if(g&&!h){var E=e.constructor,y=t.constructor;E==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof E&&E instanceof E&&"function"==typeof y&&y instanceof y||(g=!1)}return a.delete(e),a.delete(t),g};const Lt=ie(M,"DataView");const Ut=ie(M,"Promise");const Ft=ie(M,"Set");const Vt=ie(M,"WeakMap");var jt="[object Map]",kt="[object Promise]",Bt="[object Set]",$t="[object WeakMap]",Gt="[object DataView]",Wt=X(Lt),Ht=X(ce),qt=X(Ut),zt=X(Ft),Yt=X(Vt),Kt=W;(Lt&&Kt(new Lt(new ArrayBuffer(1)))!=Gt||ce&&Kt(new ce)!=jt||Ut&&Kt(Ut.resolve())!=kt||Ft&&Kt(new Ft)!=Bt||Vt&&Kt(new Vt)!=$t)&&(Kt=function(e){var t=W(e),n="[object Object]"==t?e.constructor:void 0,s=n?X(n):"";if(s)switch(s){case Wt:return Gt;case Ht:return jt;case qt:return kt;case zt:return Bt;case Yt:return $t}return t});const Qt=Kt;var Jt="[object Arguments]",Xt="[object Array]",Zt="[object Object]",en=Object.prototype.hasOwnProperty;const tn=function(e,t,n,s,r,a){var o=He(e),i=He(t),c=o?Xt:Qt(e),l=i?Xt:Qt(t),u=(c=c==Jt?Zt:c)==Zt,d=(l=l==Jt?Zt:l)==Zt,p=c==l;if(p&&lt(e)){if(!lt(t))return!1;o=!0,u=!1}if(p&&!u)return a||(a=new be),o||Ct(e)?Fe(e,t,n,s,r,a):Ge(e,t,c,n,s,r,a);if(!(1&n)){var g=u&&en.call(e,"__wrapped__"),h=d&&en.call(t,"__wrapped__");if(g||h){var f=g?e.value():e,m=h?t.value():t;return a||(a=new be),r(f,m,n,s,a)}}return!!p&&(a||(a=new be),Mt(e,t,n,s,r,a))};const nn=function e(t,n,s,r,a){return t===n||(null==t||null==n||!Ze(t)&&!Ze(n)?t!=t&&n!=n:tn(t,n,s,r,e,a))};const sn=function(e,t){return nn(e,t)};let rn,an,on;const cn=e=>{e&&(rn=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},rn.BASEURL=e.server,rn.ACTIONURL=e["action-end-point"],rn.DATAURL=e["data-end-point"],on=e.reAuthUrl)},ln=()=>on,un=()=>rn.BASEURL,dn=e=>fetch(`${rn.BASEURL}${rn.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),pn=e=>{an=e},gn=()=>an;var hn=r(953);const fn=function(e){return"symbol"==typeof e||Ze(e)&&"[object Symbol]"==W(e)};var mn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,In=/^\w*$/;const En=function(e,t){if(He(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!fn(e))||(In.test(e)||!mn.test(e)||null!=t&&e in Object(t))};function yn(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var s=arguments,r=t?t.apply(this,s):s[0],a=n.cache;if(a.has(r))return a.get(r);var o=e.apply(this,s);return n.cache=a.set(r,o)||a,o};return n.cache=new(yn.Cache||Pe),n}yn.Cache=Pe;const An=yn;const Cn=function(e){var t=An(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t};var Sn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_n=/\\(\\)?/g;const Nn=Cn((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Sn,(function(e,n,s,r){t.push(s?r.replace(_n,"$1"):n||e)})),t}));const Tn=function(e,t){for(var n=-1,s=null==e?0:e.length,r=Array(s);++n<s;)r[n]=t(e[n],n,e);return r};var Dn=L?L.prototype:void 0,Pn=Dn?Dn.toString:void 0;const On=function e(t){if("string"==typeof t)return t;if(He(t))return Tn(t,e)+"";if(fn(t))return Pn?Pn.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n};const Rn=function(e){return null==e?"":On(e)};const bn=function(e,t){return He(e)?e:En(e,t)?[e]:Nn(Rn(e))};const vn=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const xn=function(e){if("string"==typeof e||fn(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const wn=function(e,t){for(var n=0,s=(t=bn(t,e)).length;null!=e&&n<s;)e=e[xn(t[n++])];return n&&n==s?e:void 0};const Mn=function(e,t,n){var s=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++s<r;)a[s]=e[s+t];return a};const Ln=function(e,t){return t.length<2?e:wn(e,Mn(t,0,-1))};var Un=Object.prototype.hasOwnProperty;const Fn=function(e,t){var n=-1,s=(t=bn(t,e)).length;if(!s)return!0;for(;++n<s;){var r=xn(t[n]);if("__proto__"===r&&!Un.call(e,"__proto__"))return!1;if(("constructor"===r||"prototype"===r)&&n<s-1)return!1}var a=Ln(e,t);return null==a||delete a[xn(vn(t))]};const Vn=function(e,t){return null==e||Fn(e,t)};var jn=Object.prototype.hasOwnProperty;const kn=function(e,t){return null!=e&&jn.call(e,t)};const Bn=function(e,t,n){for(var s=-1,r=(t=bn(t,e)).length,a=!1;++s<r;){var o=xn(t[s]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++s!=r?a:!!(r=null==e?0:e.length)&&pt(r)&&dt(o,r)&&(He(e)||rt(e))};const $n=function(e,t){return null!=e&&Bn(e,t,kn)};const Gn=function(e,t,n){var s=null==e?void 0:wn(e,t);return void 0===s?n:s};const Wn=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const Hn=function(e,t,n){"__proto__"==t&&Wn?Wn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var qn=Object.prototype.hasOwnProperty;const zn=function(e,t,n){var s=e[t];qn.call(e,t)&&y(s,n)&&(void 0!==n||t in e)||Hn(e,t,n)};const Yn=function(e,t,n,s){if(!H(e))return e;for(var r=-1,a=(t=bn(t,e)).length,o=a-1,i=e;null!=i&&++r<a;){var c=xn(t[r]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(r!=o){var u=i[c];void 0===(l=s?s(u,c,i):void 0)&&(l=H(u)?u:dt(t[r+1])?[]:{})}zn(i,c,l),i=i[c]}return e};const Kn=function(e,t,n){return null==e?e:Yn(e,t,n)};const Qn=function(e,t,n){(void 0!==n&&!y(e[t],n)||void 0===n&&!(t in e))&&Hn(e,t,n)};const Jn=function(e){return function(t,n,s){for(var r=-1,a=Object(t),o=s(t),i=o.length;i--;){var c=o[e?i:++r];if(!1===n(a[c],c,a))break}return t}}();var Xn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zn=Xn&&"object"==typeof module&&module&&!module.nodeType&&module,es=Zn&&Zn.exports===Xn?M.Buffer:void 0,ts=es?es.allocUnsafe:void 0;const ns=function(e,t){if(t)return e.slice();var n=e.length,s=ts?ts(n):new e.constructor(n);return e.copy(s),s};const ss=function(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t};const rs=function(e,t){var n=t?ss(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};const as=function(e,t){var n=-1,s=e.length;for(t||(t=Array(s));++n<s;)t[n]=e[n];return t};var os=Object.create;const is=function(){function e(){}return function(t){if(!H(t))return{};if(os)return os(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const cs=Dt(Object.getPrototypeOf,Object);const ls=function(e){return"function"!=typeof e.constructor||Tt(e)?{}:is(cs(e))};const us=function(e){return Ze(e)&&bt(e)};var ds=Function.prototype,ps=Object.prototype,gs=ds.toString,hs=ps.hasOwnProperty,fs=gs.call(Object);const ms=function(e){if(!Ze(e)||"[object Object]"!=W(e))return!1;var t=cs(e);if(null===t)return!0;var n=hs.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&gs.call(n)==fs};const Is=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};const Es=function(e,t,n,s){var r=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var i=t[a],c=s?s(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),r?Hn(n,i,c):zn(n,i,c)}return n};const ys=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t};var As=Object.prototype.hasOwnProperty;const Cs=function(e){if(!H(e))return ys(e);var t=Tt(e),n=[];for(var s in e)("constructor"!=s||!t&&As.call(e,s))&&n.push(s);return n};const Ss=function(e){return bt(e)?_t(e,!0):Cs(e)};const _s=function(e){return Es(e,Ss(e))};const Ns=function(e,t,n,s,r,a,o){var i=Is(e,n),c=Is(t,n),l=o.get(c);if(l)Qn(e,n,l);else{var u=a?a(i,c,n+"",e,t,o):void 0,d=void 0===u;if(d){var p=He(c),g=!p&&lt(c),h=!p&&!g&&Ct(c);u=c,p||g||h?He(i)?u=i:us(i)?u=as(i):g?(d=!1,u=ns(c,!0)):h?(d=!1,u=rs(c,!0)):u=[]:ms(c)||rt(c)?(u=i,rt(i)?u=_s(i):H(i)&&!q(i)||(u=ls(c))):d=!1}d&&(o.set(c,u),r(u,c,s,a,o),o.delete(c)),Qn(e,n,u)}};const Ts=function e(t,n,s,r,a){t!==n&&Jn(n,(function(o,i){if(a||(a=new be),H(o))Ns(t,n,i,s,e,r,a);else{var c=r?r(Is(t,i),o,i+"",t,n,a):void 0;void 0===c&&(c=o),Qn(t,i,c)}}),Ss)};const Ds=function(e){return e};const Ps=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var Os=Math.max;const Rs=function(e,t,n){return t=Os(void 0===t?e.length-1:t,0),function(){for(var s=arguments,r=-1,a=Os(s.length-t,0),o=Array(a);++r<a;)o[r]=s[t+r];r=-1;for(var i=Array(t+1);++r<t;)i[r]=s[r];return i[t]=n(o),Ps(e,this,i)}};const bs=function(e){return function(){return e}};const vs=Wn?function(e,t){return Wn(e,"toString",{configurable:!0,enumerable:!1,value:bs(t),writable:!0})}:Ds;var xs=Date.now;const ws=function(e){var t=0,n=0;return function(){var s=xs(),r=16-(s-n);if(n=s,r>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(vs);const Ms=function(e,t){return ws(Rs(e,t,Ds),e+"")};const Ls=function(e,t,n){if(!H(n))return!1;var s=typeof t;return!!("number"==s?bt(n)&&dt(t,n.length):"string"==s&&t in n)&&y(n[t],e)};const Us=function(e){return Ms((function(t,n){var s=-1,r=n.length,a=r>1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(r--,a):void 0,o&&Ls(n[0],n[1],o)&&(a=r<3?void 0:a,r=1),t=Object(t);++s<r;){var i=n[s];i&&e(t,i,s,a)}return t}))}((function(e,t,n,s){Ts(e,t,n,s)}));var Fs=Object.prototype.hasOwnProperty;const Vs=function(e){if(null==e)return!0;if(bt(e)&&(He(e)||"string"==typeof e||"function"==typeof e.splice||lt(e)||Ct(e)||rt(e)))return!e.length;var t=Qt(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Tt(e))return!Rt(e).length;for(var n in e)if(Fs.call(e,n))return!1;return!0};class js{static setNamespaceSupport=(e=!1)=>{js.namespaceEnabled=e};static isNamespaceEnabled=()=>js.namespaceEnabled??!1;static getNamespaceList=()=>{const e=globalThis.PCore,t=e?.getEnvironmentInfo?.();if(t&&"function"==typeof t.getFeatureMap)return t.getFeatureMap()?.namespaceList};static getQualifiedName=(e,t)=>{if(!js.isNamespaceEnabled())return e;const n=js.getNamespaceList();if(Array.isArray(n)){if(n.some((t=>{const n=`${t}__`;return e.startsWith(n)})))return e}return`${t}__${e}`};static getDefaultQualifiedName=e=>js.getQualifiedName(e,"PegaPlatform");static namespacePrefixedRuleName(e,t){return t?js.getQualifiedName(e,t):js.getDefaultQualifiedName(e)}static getQualifiedNameForComplexRuleReferences(e,t){const{namespace:n,marker:s}=t??{},r=`${s??"caseInfo.content"}.`,a=e.lastIndexOf(r);if(-1!==a){return e.slice(0,a+r.length)+e.slice(a+r.length).split(".").map((e=>js.namespacePrefixedRuleName(e,n))).join(".")}if(e.includes(".")){const t=e.startsWith("."),s=(t?e.slice(1):e).split(".").filter(Boolean).map((e=>js.namespacePrefixedRuleName(e,n))).join(".");return t?`.${s}`:s}return js.namespacePrefixedRuleName(e,n)}}const ks=js;const Bs=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}transformObjectToCase(e){let t,n=!1;try{const n=this.replaceToCase(JSON.stringify(e));t=JSON.parse(n)}catch(e){console.error("not a Valid JSON",e),n=!0}return n?e:t}transformCaseData(e){const t=e?.data?.caseInfo,n=e?.uiResources;return{data:{objectInfo:{content:{...t?.content}}},uiResources:{...n}}}analyseResponse(e){e?.data?.objectInfo&&window?.PCore?.getEnvironmentInfo()?.isUnifiedObject()?this.setNeedsMapping(!0):this.setNeedsMapping(!1)}replacer(e){return this.needsMapping&&(e=e.replace("caseInfo","objectInfo").replace("caseTypeName","objectTypeName").replace("caseTypeID","objectTypeID")),e}replaceToCase(e){return e.replace("objectInfo","caseInfo").replace("objectTypeName","caseTypeName").replace("objectTypeID","caseTypeID")}},$s={APP:{APP:"app",ROOT:"root",INFINITY_RUNTIME:"Infinity",PXREQUESTOR:"pxRequestor",PXUSERNAME:".pxUserName",OPERATORID:"OperatorID",USERNAME:"pxRequestor.pxUserName",PXUSERIDENTIFIER:".pxUserIdentifier",USERIDENTIFIER:"pxRequestor.pxUserIdentifier",PYIMAGEINSKEY:".pyImageInsKey",OPERATORID_IMG_INSKEY:"OperatorID.pyImageInsKey",OPERATORID_LOCALE:"OperatorID.pyUseLocale",APPLICATION_LABEL:"Application.pyLabel",APPLICATION_RULE_NAME:"Application.pyRuleName"},RESOURCE_TYPES:{ASSIGNMENT:"ASSIGNMENT",CASE:"CASE",DATA:"DATA",PAGE:"PAGE",OBJECT:"OBJECT"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:ks.getDefaultQualifiedName("pyCaseTab"),DATA_OBJECT_CREATE_VIEW:ks.getDefaultQualifiedName("Create"),DATA_OBJECT_EDIT_VIEW:ks.getDefaultQualifiedName("pyEdit"),PY_DATA_PREVIEW:ks.getDefaultQualifiedName("pyDataPreview"),PY_DETAILS:ks.getDefaultQualifiedName("pyDetails"),OBJECT_CREATE_VIEW:"Create",SUBSCRIPT_CREATE_VIEW:ks.getDefaultQualifiedName("SubscriptView")},CONTAINERS:{ROOT_CONTAINER:"RootContainer",VIEW_CONTAINER:"ViewContainer",FLOW_CONTAINER:"FlowContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer"},WORK_BASKET:{MY_WORK_LIST:"myWorkList",REPORTEE:"reportee",WORK_QUEUE:"workQueue",DATA_PAGES:{D__PY_GET_USER_WORK_LIST_BY_USER_ID:ks.getDefaultQualifiedName("D_pyGetUserWorkListByUserId"),D__WORK_BASKET:ks.getDefaultQualifiedName("D_WorkBasket"),D__PY_MY_WORK_LIST:ks.getDefaultQualifiedName("D_pyMyWorkList"),D__PY_ASSIGNMENTS_DATA:"D_pyAssignmentsData"}},CONTEXT_TREE_NODE_TYPES:{VIEW:"VIEW",FIELD:"FIELD",DECLARATIVE_TARGET:"DECLARATIVE_TARGET",WHEN:"WHEN",CONTEXT:"CONTEXT",PAGELIST:"PAGELIST"},WORKLIST:"worklist",WAIT:"wait",TODO:"todo",STANDARD_FLOW:"Standard",CASE:"CASE",ASSIGNMENT:"ASSIGNMENT",FIX_BROKEN_ASSIGNMENTS:"FixBrokenAssignments",PAGE:"PAGE",PZINSKEY:".pzInsKey",CREATE_DETAILS_VIEW_NAME:ks.getDefaultQualifiedName("pzCreateDetails"),PREVIEW_VIEW_NAME:ks.getDefaultQualifiedName("pyCasePreview"),CASESUMMARY_VIEW_NAME:"pyCaseSummary",APPSHELL_ACTIVE_CASES:"appshell-activecases",TRACE_ID:"x-b3-traceid",LOAD_VIEW_STRING:"View",PRIMARY:"primary",DEFER_UPDATE_CASESUMMARY_VIEW:"deferUpdateCaseSummaryView",NEXT_ASSIGNMENT_INFO_ID:"nextAssignmentInfo.ID",WORKCLASS:"Work-",DATA_INFO:{DATA_INFO:"dataInfo",DATA_INFO_CONTENT:"dataInfo.content",DATA_INFO_CONTEXT_KEY:"dataInfo.contextKey"},OBJECT_INFO:{OBJECT_INFO:"objectInfo",OBJECT_INFO_ID:"objectInfo.ID",OBJECT_INFO_CONTENT:"objectInfo.content",ACTIVE_ACTION_ID:"objectInfo.activeActionID",OBJECT_INFO_CONTENT_CLASS_ID:"objectInfo.content.classID"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_COLLABORATORS:"caseInfo.collaborators",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_ENCRYPTED_CONTENT:"caseInfo.encryptedContent",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_INFO_CLASSNAME:"caseInfo.className",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:ks.getQualifiedNameForComplexRuleReferences("caseInfo.content.pzInsKey"),CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:ks.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyViewName"),ACTION_BUTTONS:"caseInfo.actionButtons",ACTIVE_ACTION_ID:"caseInfo.activeActionID",ASSIGNMENT_LABEL:"caseInfo.assignments[0].name",ASSIGNMENT_ID:"caseInfo.assignments[0].ID",ASSIGNMENTS:"caseInfo.assignments",INSTRUCTIONS:"caseInfo.assignments[0].instructions",NAVIGATION:"caseInfo.navigation",STAGES:"caseInfo.stages",STAGEID:"caseInfo.stageID",CASECLASS:"caseInfo.caseClass",AVAILABLEACTIONS:"caseInfo.availableActions",AVAILABLEPROCESSES:"caseInfo.availableProcesses",D_CASE_ASSIGNMENTS_RESULTS:"caseInfo.assignments",CHILD_ASSIGNMENTS:"caseInfo.childCases",ASSIGNMENTACTION_ID:"caseInfo.assignments[0].actions[0].ID",ISINCREATESTAGE:"caseInfo.isInCreateStage",APPROVALFLAG:ks.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyApprovalResult"),DUPLICATECASEFLAG:ks.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseActions"),DUPLICATECASEID:ks.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateID"),DUPLICATECASEINSKEY:ks.getQualifiedNameForComplexRuleReferences("caseInfo.content.pyDuplicateCaseReference.pzInsKey"),HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",IS_ASSIGNMENT:"caseInfo.isAssignment",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID",IS_FIRST_ASSIGNMENT:"caseInfo.isFirstAssignment",CASE_INFO_ATTACHMENTS:"caseInfo.attachments"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:ks.getDefaultQualifiedName("D_pyAdditionalCaseActions")}},PROCESS:{FLOWPROBLEMS:"FlowProblems"},PAGE_TYPES:{PAGE:"page",LANDINGPAGE:"landingpage",LISTPAGE:"listpage"},LOCAL_ACTION_TYPE:{CASE_WIDE:"case",EXPRESS:"express",ASSIGNMENT:"Assignment",LOCAL_ACTION:"LocalAction"},LOCAL_ACTIONS:{TRANSFER_ASSIGNMENT:ks.getDefaultQualifiedName("pyTransferAssignment")},CONTENT:"content",MODAL:"modal",ACTIONAREA:"actionarea",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:ks.getQualifiedNameForComplexRuleReferences("context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime"),SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:ks.getQualifiedNameForComplexRuleReferences("context_data.caseInfo.content.summary_of_attachments__.lastRefreshTime"),CONTEXT_DATA_ASSIGNMENTID:"context_data.assignmentID",BANNER_VARIANT_SUCCESS:"success",BANNER_VARIANT_WARNING:"warning",BANNER_VARIANT_URGENT:"urgent",BANNER_VARIANT_INFO:"info",INVALID_INPUTS:"Invalid inputs",VALIDATION_FAIL:"Validation fail",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_UNMOUNT_APP:"unmountApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CLOSE_REAUTH_MODAL:"closeReAuthModal",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",EVENT_FINISH_ASSIGNMENT_DONE:"finishAssignmentDone",EVENT_SHOW_CANCEL_ALERT:"showCancelAlert",EVENT_SHOW_DELETE_ALERT:"showDeleteAlert",EVENT_DASHBOARD_FILTER_CHANGE:"dashboardFilterChange",EVENT_DASHBOARD_FILTER_CLEAR_ALL:"dashboardFilterClearAll",EVENT_PROMOTED_FILTERS_CHANGE:"promotedFiltersChange",EVENT_LOCALACTION_SUBMISSION:"localActionSubmit",EVENT_PREVIEW_DISMISS:"previewDismiss",EVENT_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{INSPECTOR:"inspector",INSPECTOR_SHOW_ALL:"inspectorShowAll",UI_DESIGNER:"uiDesigner",UI_DESIGNER_TOOLBAR_EXPANDED:"uiDesignerToolbarExpanded",SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted",THEME_CHANGE:"themeChange",THEME_MODE_CHANGE:"themeModeChange",NAV_ORIENTATION_CHANGE:"navOrientationChange",CASE_VIEW_TEMPLATE_CHANGE:"caseViewTemplateChange",MULTI_STEP_NAV_DISPLAY_CHANGE:"multiStepNavDisplayChange",CASE_STAGE_DISPLAY_CHANGE:"caseStageDisplayChange"},CASE_EVENTS:{CASE_ATTACHMENTS_UPDATED_FROM_CASEVIEW:"caseAttachmentsUpdateFromCaseview",CASE_FOLLOWER_UPDATED_BY_OPERATOR_FROM_CASEVIEW:"caseFollowerUpdateByOperatorFromCaseview",CASE_FOLLOWER_UPDATE_BY_OPERATOR_FROM_WIDGET:"caseFollowerUpdateByOperatorFromWidget",CASE_CREATED:"caseCreated",CREATE_STAGE_DONE:"caseCreatedDone",CREATE_STAGE_CANCELLED:"caseCancelled",CREATE_STAGE_SAVED:"caseSaved",CREATE_STAGE_DELETED:"caseDeleted",ASSIGNMENT_SUBMISSION:"assignmentSubmission",END_OF_ASSIGNMENT_PROCESSING:"endOfAssignmentProcessing",CLOSE_CONFIRM_VIEW:"closeConfirmView",CASE_OPENED:"caseOpened",CASE_VIEW_OPENED_AFTER_CREATE:"caseViewOpenedAfterCreate",CASE_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent",GET_NEXT_WORK:"getNextWork",SAVE_ASSIGNMENT_COMPLETE:"saveAssignmentComplete",CASE_LOAD:"caseLoad",CASE_UNLOAD:"caseUnload",CASE_EDIT_OPEN:"caseEditOpen",CASE_EDIT_CLOSE:"caseEditClose",CREATE_CASE_MODAL_OPEN:"createCaseModalOpen",CREATE_CASE_MODAL_CLOSE:"createCaseModalClose"},ASSIGNMENT_EVENTS:{ASSIGNMENT_LOAD:"assignmentLoad",ASSIGNMENT_UNLOAD:"assignmentUnload"},WORK_EVENTS:{WORK_DELETED:"workDeleted"},BOOTSTRAP_SHELL_EVENTS:{CONSTELLATION_LOADED:"CONSTELLATION_LOADED"},CONTAINER_EVENTS:{CLOSE_CONTAINER_ITEM:"CLOSE_CONTAINER_ITEM",CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM:"CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM"},DISPLAY_CASE_CREATED_TOASTER:"displayCaseCreatedToaster",DISPLAY_CASE_SUBMITTED_TOASTER:"displayCaseSubmittedToaster",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",FETCH_FAILURE:"fetchFailure",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer",PEGA_EMBED_CUSTOM:"pegaEmbedCustom",SUGGESTION_PROCESSED:"suggestion_processed",ERROR_ON_FINISH_ASSIGNMENT:"errorOnFinishAssignment",URL_NAVIGATION:"urlNavigation",ON_REFRESH_START:"onRefreshStart",ON_REFRESH_COMPLETE:"onRefreshComplete",ON_REFRESH_ERROR:"onRefreshError",EVENT_LOCALE_CHANGED:"localeChanged"},ERROR_TYPE:{CLIENT:"client",SERVER:"server"},CONTAINER_TYPE:{MULTIPLE:"multiple",SINGLE:"single",HYBRID:"HybridViewContainer"},REMOTE_SYSTEM_ID:"RemoteSystemID",LIST_SELECTION_MODE:{MULTI:"multi",SINGLE:"single",MULTI_ON_HOVER:"multi_on_hover"},SUBMISSION_FAILURE_TYPE:{FORM_VALIDATION_ERROR:"formValidationError"},USER_SETTINGS:{UTILITY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.utilityPanelExpanded",SUMMARY_PANEL_USER_STATE_PATH:"presentation.templates.CaseView.summaryPanelExpanded",ASSIGNMENT_COLLAPSED_STATE_PATH:"presentation.templates.CaseView.assignmentWidgetCollapsed",CASE_VIEW_PATH:"presentation.templates.CaseView",PORTAL_AGENT_SPLIT_VIEW_PATH:"presentation.templates.GenAICoach",PORTAL_AGENT_WIDTH_PATH:"presentation.templates.GenAICoach.agentPanelWidth"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},PORTAL_TYPE:{WSS:"wss"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:ks.getDefaultQualifiedName("pyEmbedAssignment"),PY_DETAILS:ks.getDefaultQualifiedName("pyDetails")},ACTION:"action",CONTEXT_DATA_MODAL_VIEW:{CONTEXT_DATA_MODAL_VIEW:"context_data.modalView",IS_MULTI_RECORD_DATA:"context_data.modalView.isMultiRecordData",VIEW_NAME:"context_data.modalView.viewName",PARENT_CONTEXT:"context_data.modalView.parentContext",INTERESTPAGE:"context_data.modalView.interestPage",EDIT_TYPE:"context_data.modalView.editType",ACTION_ID:"context_data.modalView.actionID"},FEED:{MESSAGE_VIEW_REFERENCE:ks.getDefaultQualifiedName("messageViewReference"),PARENT_MESSAGE_ID:ks.getDefaultQualifiedName("parentMessageID"),PX_RESULTS:ks.getDefaultQualifiedName("pxResults"),NAME:ks.getDefaultQualifiedName("name"),POSTED_BY_USER:ks.getDefaultQualifiedName("postedByUser"),UPDATED_TIME:ks.getDefaultQualifiedName("updatedTime"),POST_MESSAGE:ks.getDefaultQualifiedName("PostMessage"),PZ_INS_KEY:ks.getDefaultQualifiedName("pzInsKey"),PZ_PRIVATE_POST_DETAILS:ks.getDefaultQualifiedName("pzPrivatePostDetails"),PY_SELECTED:ks.getDefaultQualifiedName("pySelected"),PY_LABEL:ks.getDefaultQualifiedName("pyLabel"),PY_RECIPIENTS:ks.getDefaultQualifiedName("pyRecipients"),MENTIONS:ks.getDefaultQualifiedName("mentions"),PY_IS_DELETE_ENABLED:ks.getDefaultQualifiedName("pyIsDeleteEnabled"),TAGS:ks.getDefaultQualifiedName("tags"),PZ_POST_DETAILS:ks.getDefaultQualifiedName("pzPostDetails"),PY_FEED_SOURCE_REFERENCE:ks.getDefaultQualifiedName("pyFeedSourceReference"),IS_EDITED:ks.getDefaultQualifiedName("isEdited"),PY_LIKES:ks.getDefaultQualifiedName("pyLikes"),PY_POST_TYPE:ks.getDefaultQualifiedName("pyPostType"),POSTED_TIME:ks.getDefaultQualifiedName("postedTime"),PY_MESSAGE_VIEW_REFERENCE:ks.getDefaultQualifiedName("pyMessageViewReference"),ID:ks.getDefaultQualifiedName("ID"),PY_COMMENT_CONTEXT:ks.getDefaultQualifiedName("pyCommentContext"),PX_LIKE_COUNT:ks.getDefaultQualifiedName("pxLikeCount"),MESSAGE:ks.getDefaultQualifiedName("message")},CASE_VIEW_MODE:{PERFORM:"perform",REVIEW:"review",CONFIRM:"confirm"}},Gs={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID:"hybrid",HYBRID_VIEW_CONTAINER:"HybridViewContainer",HYRBID_ROOT_CONTAINERNAME:"hybridRootContainerName",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",RULE_VIEW:"RuleView",SELF_SERVICE_CASE_VIEW:"SelfServiceCaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",RULE_PREVIEW:"RulePreview",CASE_STAGES:"Stages",CASEMESSAGES:"caseMessages",SUGGESTION:"suggestion",PREVIEW:"preview",TERTIARY:"tertiary",DEFAULT:"default",ACPRIMARY:"primary",ACTERTIARY:"tertiary",PERFORM_MODE:"perform",CASE_VIEW_MODE_PROP:".caseViewMode",REVIEW_MODE:"review",WORKAREA:"workarea",OBJECTACTIONCONTAINER:"ObjectActionContainer",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",UNDERSCORE_STRING:"_",DOUBLE_UNDERSCORE_STRING:"__",WORK_ID:"WORK_ID",EMPTY_STRING:"",PROPERTY_MESSAGES:"propertyMessages__",CONTEXT_MESSAGES:"contextMessages__",HTTP_MESSAGES:"httpMessages__",PAGE_MESSAGES:"pageMessages__",SUMMARY_OF_LISTS:"summary_of_lists__",SUMMARY_OF_GROUPS:"summary_of_groups__",SUMMARY_OF_MESSAGES:"summary_of_messages__",SUMMARY_OF_FIELD_VALUES:"summary_of_field_values__",SUMMARY_OF_WHEN_CONDITIONS:"summary_of_when_conditions__",SUMMARY_OF_DYNAMIC_WHENS:"summary_of_dynamic_whens__",SUMMARY_OF_EXPRESSIONS:"summary_of_expressions__",SUMMARY_OF_ASSOCIATED_LISTS:"summary_of_associated_lists__",CONTEXT_DATA:"context_data",TABLE:e=>`Table[${e}]`,HTTP:"HTTP",PROPERTY:"PROPERTY",PAGE_ERRORS:"page_level_errors",CUSTOM_ERROR:"custom error",NO_MESSAGES:"No messages existing",PULSE_REFERENCE:"pulse.messages",IS_LOADING:"isLoading",APPROVED:"Approved",REJECTED:"Rejected",DUPLICATE:"Duplicate",IGNORE:"Ignore",PARAGRAPH:"PARAGRAPH",X_ORIGIN_CHANNEL:"x-origin-channel",AUTHORING_PREVIEW_CONTAINER:"root/authoring-preview",EMBED:"EMBED",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",ON_REFRESH_ERROR:"onRefreshError",UI_RESOURCES:"uiResources",UI_RESOURCES_CONTEXT_DATA:"uiResources.context_data",ACTION_BUTTONS:"uiResources.actionButtons",RESOURCES:"uiResources.resources",ROOT:"uiResources.root",CASE_INFO_IS_LOCAL_ACTION:"caseInfo.isLocalAction",OBJECT_INFO_IS_LOCAL_ACTION:"objectInfo.isObjectWideAction",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",UI_RESOURCES_ROOT_CONTEXT:"uiResources.root.config.context",LOCALE_REFERENCES:"uiResources.localeReferences",STATIC_SERVER_URL:"staticServer",APPLICATION_DATA:"data.Application",REFERENCED_USERS:"referencedUsers",CASE_INFO_REFRESH_CONDITIONS:"caseInfo.refreshConditions",FIELD_LEVEL_SUCCESS:"success",FIELD_LEVEL_WARNING:"warning",FIELD_LEVEL_ERROR:"error",HASH_DELIMITER:"~^|^~",NULL_STRING:"null",DATA_PAGE:"DataPage",DECISION:"Decision",RULE_REFERENCE:"RuleReference",GET_PAGE_DATA:"getPageData",PROPERTY_ANNOTATION:"@P",FIELD_LABEL_ANNOTATION:"@FL",ATTACHMENT_ANNOTATION:"@ATTACHMENT",PARAGRAPH_ANNOTATION:"@PARAGRAPH",FORMAT_ANNOTATION:"@FORMAT",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",CLASS_ASSOCIATION_ANNOTATION:"@CA",FILTERED_LIST_ANNOTATION:"@FILTERED_LIST",CLASS_ANNOTATION:"@CLASS",ASSOCIATED:"associated",CLASS_ID:".classID",CLASSID:"classID",READONLY:"readonly",SHARED:"shared",RELOAD_IF_OLDER_THAN:"reloadIfOlderThan",RELOAD_ONCE_PER_INTERACTION:"reloadOncePerInteraction",PY_DETAILS:ks.getDefaultQualifiedName("pyDetails"),PY_CONFIRM:ks.getDefaultQualifiedName("pyConfirm"),LIST_ACTIONS:{ADD:"ADD",INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT",REPLACE:"REPLACE",DELETEPAGE:"DELETEPAGE"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",APPLICATION_ID:"APPLICATION_ID",ACCESS_GROUP:"ACCESS_GROUP",USER_NAME:"USER_NAME",USER_ID:"USER_ID",USER_IMAGE:"USER_IMAGE",LOCALE:"LOCALE",TIMEZONE:"TIMEZONE",WORK_GROUP:"WORK_GROUP"},ID:"ID",SCALARLIST:"ScalarList",COREHEADERS:"coreHeaders",SKIPCOREHEADERS:"skipCoreHeaders",COREHEADER_APP_DEBUG_ID:"X-Pega-App-Debug-ID",COREHEADER_APP_DEBUG_LEVELS:"X-Pega-App-Debug-Levels",EMBEDDED_DATA_MODAL:{SHOW_ROW:"showRow",SUBMIT_ROW:"submitRow",EDIT_TYPE:"editType",ACTION_NAME:"actionName",REFRESH_CONDITIONS:"caseInfo.refreshConditions"},LOCALIZATION_V2:2,DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3,PING:6500},...$s,getProperty:e=>Bs.map(e),getDefaultQualifiedName:e=>ks.getDefaultQualifiedName(e)},Ws=ks.getDefaultQualifiedName("pyRemoteCaseDetails");class Hs{static remoteCaseMapping={};static setRemoteCaseMapping=e=>{this.remoteCaseMapping=e,this.setAdditionalParameters()};static getRemoteCaseMapping=()=>this.remoteCaseMapping;static getRemoteCase=e=>this.remoteCaseMapping?.[e];static isRemoteCase=e=>!!(e&&this.remoteCaseMapping&&this.remoteCaseMapping[e]);static getRemoteHeaderByContext=e=>gS.getProperty(".RemoteSystemID",Gs.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const s=this.getRemoteHeaderByContext(n);s?e.RemoteSystemID=s:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===Hs.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=xA.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))};static getRemoteAppPlatformVersion=e=>{if(!e)return;const t=xA.environmentInfoObject?.pyRemoteAppPlatformVersion;if(t){return JSON.parse(t)[e]}};static isRemoteCaseVersionDifferent=e=>{if(!this.isRemoteCase(e))return!1;const t=this.getRemoteHeader(e);if(!t)return!1;const n=this.getRemoteAppPlatformVersion(t);return Boolean(n)};static getRemoteHeaderFromSourceClass=e=>{const t=Object.values(this.remoteCaseMapping).find((t=>t.RemoteClassName===e));return t?.RemoteSystemID};static getRemoteCaseClassBySourceClass=e=>{if(e)for(const[t,n]of Object.entries(this.remoteCaseMapping))if(n.RemoteClassName===e)return t}}const qs=Hs,zs={},Ys=new Map,Ks=e=>{let t=Gs.EMPTY_STRING;return t=e&&e.includes(Gs.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},Qs=(e,t,n=!1)=>{let s=Gs.EMPTY_STRING;if(t&&e){let r=`${t}${Gs.FORWARD_SLASH_STRING}${e}`;const a=Ny(r);if(a||t!==Gs.APP.APP&&t!==Gs.APP.ROOT)if(a){if(n&&zs[r])return s=`${r}${Gs.UNDERSCORE_STRING}${zs[r]}`,s;zs[r]?zs[r]+=1:zs[r]=1,s=`${r}${Gs.UNDERSCORE_STRING}${zs[r]}`}else s=Qs(e,Ks(t));else r=`${t}${Gs.FORWARD_SLASH_STRING}${Gs.PRIMARY}`,zs[r]?zs[r]+=1:zs[r]=1,s=`${r}${Gs.UNDERSCORE_STRING}${zs[r]}`}return s},Js=(e,t)=>{if(e&&t){const n=(Ys[t]?.[e]??0)+1;return Ys[t]||(Ys[t]={}),Ys[t][e]=n,`${t}${Gs.FORWARD_SLASH_STRING}${e}_${n}`}return""},Xs=(e,t)=>{if(e&&t){const n=Ys[t]?.[e];return n?`${t}${Gs.FORWARD_SLASH_STRING}${e}_${n}`:Js(e,t)}return""},Zs=e=>{let t=Gs.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},er=(e,t)=>{if(null===e)return t;const[,n]=t.split(Gs.FORWARD_SLASH_STRING);return e+Gs.FORWARD_SLASH_STRING+n},tr=e=>{const t=e.indexOf(Gs.FORWARD_SLASH_STRING),n=e.lastIndexOf(Gs.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},nr=e=>{const t=e.split(Gs.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+Gs.FORWARD_SLASH_STRING+t[2]},sr="SET_PROPERTY",rr="REPLACE_PROPERTY",ar="FIELD_CHANGE",or="LOAD_VIEW",ir="SHOW_PAGE",cr="SHOW_DATA",lr="SHOW_INSIGHT",ur="SHOW_DASHBOARD",dr="SET_LOADING",pr="RESET_LOADING",gr="APP_OFFLINE",hr="APP_ONLINE",fr="SET_SHARED_PROPERTY",mr="CREATE_WORK",Ir="OPEN_WORK_BY_HANDLE",Er="UPDATE_DOCUMENT",yr="FINISH_ASSIGNMENT",Ar="SAVE_AND_CLOSE",Cr="CANCEL_ASSIGNMENT",Sr="OPEN_ASSIGNMENT",_r="NAVIGATE_TO_STEP",Nr="OPEN_LOCAL_ACTION",Tr="OPEN_PROCESS_ACTION",Dr="MERGE_DATA",Pr="REMOVE_ITEM",Or="GET_DATAOBJECT_ACTIONS",Rr="SHOW_HISTORY",br="ERROR",vr="INIT_CONTAINERS",xr="RESET_CONTAINERS",wr="ADD_CONTAINER_ITEM",Mr="REMOVE_CONTAINER_ITEM",Lr="ADD_TRANSIENT_ITEM",Ur="UPDATE_TRANSIENT_DATA",Fr="REMOVE_TRANSIENT_ITEM",Vr="REMOVE_ALL_TRANSIENT_ITEMS",jr="CLEAR_TRANSIENT_DATA",kr="PURGE_TRANSIENT_DATA",Br="REPLACE_TRANSIENT_DATA",$r="ACTIVATE_CONTAINER_ITEM",Gr="UPDATE_CONTAINER_ITEM",Wr="UPMERGE_AND_REMOVE_CONTAINER_ITEM",Hr="REPLACE_CONTAINER_ITEM",qr="ACTIVATE_MODAL_CONTAINER_ITEM",zr="REMOVE_CONTAINER",Yr="ADD_SUGGESTION_CONTEXT",Kr="showView",Qr="showData",Jr="showInsight",Xr="showDashboard",Zr="openWorkByHandle",ea="openAssignment",ta="createNewWork",na="finishAssignment",sa="SHOW_CANCEL_ALERT",ra="deleteCaseInCreateStage",aa="openLocalAction",oa="openProcessAction",ia="caseWideActions",ca="executeCaseWideActions",la="openBulkAction",ua="performBulkAction",da="launchAssignment",pa="ADD_MESSAGES",ga="CLEAR_MESSAGES",ha="RESET_STORE",fa="FETCH_DATAPAGE",ma="ADD_SHARED_DATA",Ia="REMOVE_SHARED_DATA",Ea="LIST_ACTION",ya="DELETE_CASE_SUMMARY",Aa="ALTER_BLOCKING_ACTION_COUNT",Ca="SET_APP_LOCALE",Sa="CREATE_DATA_OBJECT",_a="DELETE_DATA_OBJECT",Na="VIEW_DATA_OBJECT",Ta="UPDATE_DATA_OBJECT",Da="OPEN_DATA_OBJECT_ACTION",Pa="SUBMIT_DATA_OBJECT_ACTION",Oa="OPEN_EMBEDDED_DATA_MODAL",Ra="GET_EMBEDDED_DATA_VIEW",ba="SUBMIT_EMBEDDED_DATA_MODAL",va="SUBMIT_SUBSCRIPT",xa="FILL_FORM_WITH_AI",wa="createWork",Ma="openAssignment",La="openCase",Ua="EXECUTE_OBJECT_WIDE_ACTION",Fa="CREATE_EXTERNAL_CASE",Va="DELETE_WORK",ja="createObject",ka="getObject",Ba="getObjectWideAction",$a="createExternalObject",Ga="retrieveActionViewForNewCase",Wa=(e,t)=>{if(!e||!t)return null;let n,s=Gs.EMPTY_STRING;return t&&(s=`${t}${Gs.FORWARD_SLASH_STRING}${e}`,n=Ny(s),n||t.includes("/")?n||(s=Wa(e,Ks(t))):s=`${t}${Gs.FORWARD_SLASH_STRING}${e}`),s},Ha=(e,t)=>{const n=Wa(e,t);return n&&Ny(n)?Ny(n):{}},qa=(e,t)=>bA.getSemanticURL(Kr,{page:e},t);class za{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._exprStr=t||"",this._endState=n||{},this._subParser=null}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=no[this._state],n=this._exprStr;if(this._exprStr+=e.element,t.subHandler){this._subParser||this._startSubExpression(n);const t=this._subParser?._addToken(e);t&&(this._endSubExpression(),this._state=t)}else{if(!t.operatorTypes?.[e.tokenType]){if(this._endState[e.tokenType])return this._endState[e.tokenType];throw new Error(`Token ${e.element} (${e.tokenType}) unexpected in expression: ${this._exprStr}`)}{const n=t.operatorTypes[e.tokenType],s=to[e.tokenType];s&&s.call(this,e),n.toState&&(this._state=n.toState)}}return!1}addTokens(e){e.forEach(this._addToken,this)}buildAst(){return this._subParser&&this._endSubExpression(),this._state="complete",this._position?this._tree:null}_startSubExpression(e){const{endStates:t}=no[this._state];this._subParser=new za(this._grammar,e,t)}_endSubExpression(){no[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,za._setParent(e,this._position)):this._tree=e,this._position=e}}const Ya=za,Ka="identifier",Qa={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&(e&&t)},Ja={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&(e||t)},Xa=(e,t,n)=>{const s=""===e,r=""===t||null==t;if(s&&r)return n;if("boolean"==typeof t){const r=!!(!s&&"false"!==e&&"0"!==e)&&Boolean(e);return n?r===t:r!==t}return s!==r?!n:n?e===t:e!==t},Za={">":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>t},">=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e>=t},"<":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<t},"<=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e<=t},"==":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>"object"!=typeof e&&"object"!=typeof t&&Xa(e,t,!0)},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>"object"==typeof e||"object"==typeof t||Xa(e,t,!1)},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{const t="object"==typeof e?e.value:e;return"true"===t||"false"===t?"true"!==t:!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":Qa,AND:Qa,and:Qa,"||":Ja,OR:Ja,or:Ja,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).includes(String(t))},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).includes(String(t))},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).startsWith(String(t))},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).startsWith(String(t))},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(e).endsWith(String(t))},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(e).endsWith(String(t))},IS_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!e},IS_NOT_NULL:{operatorType:"binaryOperator",precedence:2,evaluate:e=>!!e},IS_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>String(t).split(",").includes(String(e))},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!String(t).split(",").includes(String(e))}},eo={BinaryExpression:function(e){const t=[],n=e.right,s=e.operator??"",r=e.left;if(!r)return!1;let a="boolean"==typeof r.value?"True-False":"";t[0]=this.evaluateAST(r),a||r.operationType!==Ka||(a=((e,t,n)=>{if("string"!=typeof e.value)return"";const s=e.value.substring(1),r=t?.getFieldMetadata(s)?.type??"";if(r)return r;const{pageReference:a,context:o}=n??{};if(!a||!o)return"";const i=gS.resolveClassID(e.value,a,o),c=dC(s,i);return c&&!Array.isArray(c)?c.type??"":""})(r,this._context,this._contextTreeNodeContext)),t[1]=n?this.evaluateAST(n,a):"";const o=this._grammar[s];return!!o?.evaluate&&o.evaluate(t[0],t[1])},identifier:function(e){const t="string"==typeof e.value?e.value:"";if(this._localDataObject)return lS.getIn(this._localDataObject,t?t.substring(1).split("."):[])??"";if(this._contextTreeNodeContext)return gS.getLitePropertyValue(this._contextTreeNodeContext,t)??"";if(!this._context)return"";const n=this._context.getFieldMetadata(t)?.type??"",s=this._context.getValue(t)??"";if("Decimal"===n&&"string"==typeof s){const e=parseFloat(s);return Number.isNaN(e)?"":e}return s},literal:function(e,t){return!(void 0===t||""===t||"True-False"===t)||"true"!==e.value&&"false"!==e.value?e.value??"":"true"===e.value},UnaryExpression:function(e){const t=e.operator,n=e.right;if(!t||!n)return!1;const s=this._grammar[t];return!!s?.evaluate&&s.evaluate(n)}},to={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:String(e.value)})},binaryOperator:function(e){const t=String(e.value),{precedence:n}=this._grammar[t];let s=this._position._parent;const r=s?s.operator:null,a=r?this._grammar[r]:null,o=a?a.precedence:null;if(o&&n)for(;s?.operator&&o>=n;)this._position=s,s=s._parent;const i={operationType:"BinaryExpression",operator:t,left:this._position};Ya._setParent(this._position,i),s?(this._position=s,this.setPositionInAST(i)):(this._tree=i,this._position=i)},identifier:function(e){const t={operationType:Ka,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){var t;"object"==typeof(t=e)&&null!==t&&"operationType"in t&&this.setPositionInAST(e)}},no={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:Ka},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:to.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},so=["binaryOperator","unaryOperator","openParenthesis"],ro=/^\s*$/,ao=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,oo=/\\\\/,io=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],co=["[a-zA-Z_.$][a-zA-Z0-9_.$]*(?:\\(\\d+\\))?(?:\\.[a-zA-Z0-9_.$]+)*","[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}|[0-9]{4}-[0-9]{2}-[0-9]{2}","(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"],lo=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class uo{constructor(e){this._grammar=e}static _isNegative(e){return so.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(ro)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(ao)&&(e=`\\b${e}\\b`),e}static _unquote(e){const[t]=e,n=new RegExp(`\\\\${t}`,"g");return e.substr(1,e.length-2).replace(n,t).replace(oo,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>uo._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[io.join("|"),e.join("|"),co.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e.trim()))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return e.startsWith('"')||e.startsWith("'")?t.value=uo._unquote(e):e.match(lo)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(ao)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let s=0;s<e.length;s+=1)uo._isWhitespace(e[s])?t.length&&(t[t.length-1].element+=e[s]):"-"===e[s]&&uo._isNegative(t)?n=!0:(n&&(e[s]=`-${e[s]}`,n=!1),t.push(this._createToken(e[s])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const po=uo;const go=class{constructor(e,t){this._grammar={...Za},this._expression=e,this._ast=null,this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new po(this._grammar).tokenize(this._expression),t=new Ya(this._grammar);return t.addTokens(e),this._ast=t.buildAst(),this}evaluate(e,t){return this._context=e,this._contextTreeNodeContext=t,this.evaluateAST(this._ast)}evaluateAST(e,t){return Eo(e.operationType,eo)&&eo[e.operationType].call(this,e,t)}},ho=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new go(n,t)},fo=e=>!e||e.buildAST(),mo=(e,t,n)=>!e||e.evaluate(t,n),Io=(e,t,n)=>{const s=ho(e,t),r=fo(s);return mo(r,n)},Eo=(e,t)=>e in t;const yo=class{static handleExpression(e,t,n,s){const r=this.getContext(e,s);dn({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:r}}).then((e=>e.json())).then((e=>{this.updateState(e,s)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:gS.getPropertyValue(`${n}.${ks.getDefaultQualifiedName("pxObjClass")}`,null,t)||gS.getPropertyValue(`${n}.${ks.getDefaultQualifiedName("pyClassName")}`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>qC({type:sr,payload:{context:t,reference:n,value:e[n]}})))}},Ao={},Co=(e,t)=>Ao[t]&&Object.hasOwn(Ao[t],e),So=e=>{const{context:t}=e;Co(e.reference,t)&&yo.handleExpression(e.reference,e.value,Ao[t][e.reference],t)},_o=(e={})=>{lS.copy(e,Ao)},No=(e,t,n)=>Io(e,t,n?.pConnect.getPConnect());const To=new class{constructor(){this._dataSourceMap={}}hasContextName(e){return e in this._dataSourceMap}addContextName(e,t){t&&Object.keys(t).length>0?this._dataSourceMap[e]=t:this._dataSourceMap[e]={}}getContextObjectByName(e){return e in this._dataSourceMap?this._dataSourceMap[e]:null}deleteContextName(e){this.hasContextName(e)&&delete this._dataSourceMap[e]}addOrUpdatePropertyInContext(e,t,n){if(this.hasContextName(e)){const s=this.getContextObjectByName(e);if(s)if(Array.isArray(n))s[t]=n;else{const e=s[t];s[t]=[...new Set([...e,n])]}}else{const s={};Array.isArray(n)?s[t]=n:s[t]=[n],this.addContextName(e,s)}}deletePropertyInContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);n&&t in n&&delete n[t]}}getPropertyFromContext(e,t){if(this.hasContextName(e)){const n=this.getContextObjectByName(e);if(n&&t in n)return n[t]}return[]}getDependencies(e,t){const n=this.getPropertyFromContext(e,t),s=new Set(n);return n.forEach((e=>{s.add(e)})),[...s]}};const Do=new class{constructor(){this.componentMap={},this.overrideMap={},this.lazyMap={},this.customComponentLazyMap={}}register(e,t){this.componentMap[e]=t}registerLazyMap(e,t){this.lazyMap[e]=t}registerCustomComponentLazyMap(e,t){this.customComponentLazyMap[e]=t}getComponent(e){return this.componentMap[e]}getLazyComponent(e){return this.lazyMap[e]}getCustomComponent(e){return this.customComponentLazyMap[e]}mergeComponentsMap(e={}){lS.copy(e,this.componentMap)}mergeOverrideMap(e={}){lS.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const Po=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}},Oo=/^@\w+\s+(.+)$/s;const Ro=class{static handleAnnotation(e,t,n){const s=e.indexOf(" "),r=-1===s?e:e.substring(0,s),a=Po.getHandler(r);if(!a)return e;const o=e.match(Oo);return a((o?o[1]:"").trim(),t,n)}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),s=e.substring(t+1);return Po.getHandler(n)?s:e}static handleComponentMapping(e,t,n){const s=Do.getComponent(t.type);if(!s?.mapping)return;const r=s.mapping(t.config);if(r&&r["@map"]){const t=r["@map"],{source:s}=t;if(!s)return;const a=n.getValue(s);if("function"==typeof t.advanced)t.advanced(e,a);else{const n=t.inputs_map;e[t.output_property]=[];const s=e[t.output_property];a.forEach((e=>{const t={};Object.keys(n).forEach((s=>{let r=n[s];r?.startsWith(".")?(r=r.substring(1),t[s]=e[r]):t[s]=r})),s.push(t)}))}}}static getPropertyName(e=""){if(e&&lS.isString(e)){const t=e.startsWith(Gs.PROPERTY_ANNOTATION)||e.startsWith(Gs.ATTACHMENT_ANNOTATION)||e.startsWith(Gs.ASSOCIATED_PROPERTY_ANNOTATION)||e.startsWith(Gs.CLASS_ASSOCIATION_ANNOTATION)||e.startsWith(Gs.FILTERED_LIST_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(lS.isString(e)&&!!e?.startsWith(Gs.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return lS.isString(e)&&!!e?.startsWith(Gs.PROPERTY_ANNOTATION)}};function bo(e,t){return function(){return e.apply(t,arguments)}}const{toString:vo}=Object.prototype,{getPrototypeOf:xo}=Object,{iterator:wo,toStringTag:Mo}=Symbol,Lo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Uo=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),Fo=(e,t,n)=>e===Object.prototype||!n&&null===t,Vo=(e,t)=>{let n=e;const s=[];for(;null!=n;){if(-1!==s.indexOf(n))return!1;s.push(n);const r=xo(n);if(Fo(n,r,n===e))return!1;if(Lo(n,t))return!0;n=r}return!1},jo=(ko=Object.create(null),e=>{const t=vo.call(e);return ko[t]||(ko[t]=t.slice(8,-1).toLowerCase())});var ko;const Bo=e=>(e=e.toLowerCase(),t=>jo(t)===e),$o=e=>t=>typeof t===e,{isArray:Go}=Array,Wo=$o("undefined");function Ho(e){return null!==e&&!Wo(e)&&null!==e.constructor&&!Wo(e.constructor)&&Yo(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const qo=Bo("ArrayBuffer");const zo=$o("string"),Yo=$o("function"),Ko=$o("number"),Qo=e=>null!==e&&"object"==typeof e,Jo=e=>{if(!Qo(e))return!1;const t=xo(e);return!(null!==t&&t!==Object.prototype&&null!==xo(t)||Vo(e,Mo)||Vo(e,wo))},Xo=Bo("Date"),Zo=Bo("File"),ei=Bo("Blob"),ti=Bo("FileList"),ni=Bo("Set");const si="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},ri=void 0!==si.FormData?si.FormData:void 0,ai=Bo("URLSearchParams"),[oi,ii,ci,li]=["ReadableStream","Request","Response","Headers"].map(Bo);function ui(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let s,r;if("object"!=typeof e&&(e=[e]),Go(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{if(Ho(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),a=r.length;let o;for(s=0;s<a;s++)o=r[s],t.call(null,e[o],o,e)}}function di(e,t){if(Ho(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s,r=n.length;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const pi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,gi=e=>!Wo(e)&&e!==pi;const hi=(fi="undefined"!=typeof Uint8Array&&xo(Uint8Array),e=>fi&&e instanceof fi);var fi;const mi=Bo("HTMLFormElement"),{propertyIsEnumerable:Ii}=Object.prototype,Ei=Bo("RegExp"),yi=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};ui(n,((n,r)=>{let a;!1!==(a=t(n,r,e))&&(s[r]=a||n)})),Object.defineProperties(e,s)};const Ai=Bo("AsyncFunction"),Ci=(Si="function"==typeof setImmediate,_i=Yo(pi.postMessage),Si?setImmediate:_i?(Ni=`axios@${Math.random()}`,Ti=[],pi.addEventListener("message",(({source:e,data:t})=>{e===pi&&t===Ni&&Ti.length&&Ti.shift()()}),!1),e=>{Ti.push(e),pi.postMessage(Ni,"*")}):e=>setTimeout(e));var Si,_i,Ni,Ti;const Di="undefined"!=typeof queueMicrotask?queueMicrotask.bind(pi):"undefined"!=typeof process&&process.nextTick||Ci,Pi=e=>null!=e&&Yo(e[wo]),Oi={isArray:Go,isArrayBuffer:qo,isBuffer:Ho,isFormData:e=>{if(!e)return!1;if(ri&&e instanceof ri)return!0;const t=xo(e);if(!t||t===Object.prototype)return!1;if(!Yo(e.append))return!1;const n=jo(e);return"formdata"===n||"object"===n&&Yo(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&qo(e.buffer),t},isString:zo,isNumber:Ko,isBoolean:e=>!0===e||!1===e,isObject:Qo,isPlainObject:Jo,isEmptyObject:e=>{if(!Qo(e)||Ho(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:oi,isRequest:ii,isResponse:ci,isHeaders:li,isUndefined:Wo,isDate:Xo,isFile:Zo,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:ei,isRegExp:Ei,isFunction:Yo,isStream:e=>Qo(e)&&Yo(e.pipe),isURLSearchParams:ai,isTypedArray:hi,isFileList:ti,forEach:ui,merge:function e(...t){const{caseless:n,skipUndefined:s}=gi(this)&&this||{},r={},a=(t,a)=>{if("__proto__"===a||"constructor"===a||"prototype"===a)return;const o=n&&"string"==typeof a&&di(r,a)||a,i=Lo(r,o)?r[o]:void 0;Jo(i)&&Jo(t)?r[o]=e(i,t):Jo(t)?r[o]=e({},t):Go(t)?r[o]=t.slice():s&&Wo(t)||(r[o]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||Ho(n))continue;if(ui(n,a),"object"!=typeof n||Go(n))continue;const s=Object.getOwnPropertySymbols(n);for(let e=0;e<s.length;e++){const t=s[e];Ii.call(n,t)&&a(n[t],t)}}return r},extend:(e,t,n,{allOwnKeys:s}={})=>(ui(t,((t,s)=>{n&&Yo(t)?Object.defineProperty(e,s,{__proto__:null,value:bo(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})}),{allOwnKeys:s}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,s)=>{let r,a,o;const i={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),a=r.length;a-- >0;)o=r[a],s&&!s(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&xo(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:jo,kindOfTest:Bo,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return-1!==s&&s===n},toArray:e=>{if(!e)return null;if(Go(e))return e;let t=e.length;if(!Ko(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[wo]).call(e);let s;for(;(s=n.next())&&!s.done;){const n=s.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const s=[];for(;null!==(n=e.exec(t));)s.push(n);return s},isHTMLForm:mi,hasOwnProperty:Lo,hasOwnProp:Lo,hasOwnInPrototypeChain:Vo,getSafeProp:(e,t)=>null!=e&&Vo(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;const t=xo(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every((t=>{if(Uo(t))return!1;const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&!0===n.writable}))})(e))return e;const n=Object.create(null),s=Object.create(null),r=[];let a=e;for(;null!=a&&-1===r.indexOf(a);){r.push(a);const o=a===e?t:xo(a);if(Fo(a,o,a===e))break;const i=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&i.push(...Object.getOwnPropertySymbols(a));for(const t of i)Uo(t)||Lo(s,t)||(n[t]=e[t],s[t]=!0);a=o}return n},reduceDescriptors:yi,freezeMethods:e=>{yi(e,((t,n)=>{if(Yo(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];Yo(s)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},s=e=>{e.forEach((e=>{n[e]=!0}))};return Go(e)?s(e):s(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:di,global:pi,isContextDefined:gi,isSpecCompliantForm:function(e){return!!(e&&Yo(e.append)&&"FormData"===e[Mo]&&e[wo])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(Qo(e)){if(t.has(e))return;if(Ho(e))return e;if(!("toJSON"in e)){let s;if(t.add(e),ni(e)){s=[];for(const t of e){const e=n(t);!Wo(e)&&s.push(e)}}else s=Go(e)?[]:{},ui(e,((e,t)=>{const r=n(e);!Wo(r)&&(s[t]=r)}));return t.delete(e),s}}return e};return n(e)},isAsyncFn:Ai,isThenable:e=>e&&(Qo(e)||Yo(e))&&Yo(e.then)&&Yo(e.catch),setImmediate:Ci,asap:Di,isIterable:Pi,isSafeIterable:e=>null!=e&&Vo(e,wo)&&Pi(e)},Ri=Oi.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const bi=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),vi=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function xi(e,t){return Oi.isArray(e)?e.map((e=>xi(e,t))):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function wi(e){const t=Object.create(null);return Oi.forEach(e.toJSON(),((e,n)=>{t[n]=(e=>xi(e,vi))(e)})),t}const Mi=Symbol("internals");function Li(e){return e&&String(e).trim().toLowerCase()}function Ui(e){return!1===e||null==e?e:Oi.isArray(e)?e.map(Ui):(e=>xi(e,bi))(String(e))}const Fi=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Vi(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}function ji(e,t,n,s,r){return Oi.isFunction(s)?s.call(this,t,n):(r&&(t=n),Oi.isString(t)?Oi.isString(s)?-1!==t.indexOf(s):Oi.isRegExp(s)?s.test(t):void 0:void 0)}class ki{constructor(e){e&&this.set(e)}set(e,t,n){const s=this;function r(e,t,n){const r=Li(t);if(!r)return;const a=Oi.findKey(s,r);(!a||void 0===s[a]||!0===n||void 0===n&&!1!==s[a])&&(s[a||t]=Ui(e))}const a=(e,t)=>Oi.forEach(e,((e,n)=>r(e,n,t)));if(Oi.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Oi.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,s,r;return e&&e.split("\n").forEach((function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),s=e.substring(r+1).trim();const a=Oi.hasOwnProp(t,n);!n||a&&Oi.hasOwnProp(Ri,n)||("set-cookie"===n?a?t[n].push(s):t[n]=[s]:t[n]=a?t[n]+", "+s:s)})),t})(e),t);else if(Oi.isObject(e)&&Oi.isSafeIterable(e)){let n,s,r=Object.create(null);for(const t of e){if(!Oi.isArray(t))throw new TypeError("Object iterator must return a key-value pair");s=t[0],Oi.hasOwnProp(r,s)?(n=r[s],r[s]=Oi.isArray(n)?[...n,t[1]]:[n,t[1]]):r[s]=t[1]}a(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=Li(e)){const n=Oi.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}(e);if(Oi.isFunction(t))return t.call(this,e,n);if(Oi.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Li(e)){const n=Oi.findKey(this,e);return!(!n||void 0===this[n]||t&&!ji(0,this[n],n,t))}return!1}delete(e,t){const n=this;let s=!1;function r(e){if(e=Li(e)){const r=Oi.findKey(n,e);!r||t&&!ji(0,n[r],r,t)||(delete n[r],s=!0)}}return Oi.isArray(e)?e.forEach(r):r(e),s}clear(e){const t=Object.keys(this);let n=t.length,s=!1;for(;n--;){const r=t[n];e&&!ji(0,this[r],r,e,!0)||(delete this[r],s=!0)}return s}normalize(e){const t=this,n={};return Oi.forEach(this,((s,r)=>{const a=Oi.findKey(n,r);if(a)return t[a]=Ui(s),void delete t[r];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(r):String(r).trim();o!==r&&delete t[r],t[o]=Ui(s),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Oi.forEach(this,((n,s)=>{null!=n&&!1!==n&&(t[s]=e&&Oi.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){const e=this.get("set-cookie");return Oi.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){const t=Object.create(null),n=String(e);let s=0,r=!1,a=!1;function o(e){const r=Vi(n.slice(s,e)),a=r.indexOf("=");if(a<1)return;const o=Vi(r.slice(0,a));if(!Fi.test(o))return;const i=o.toLowerCase();if("__proto__"===i||"constructor"===i||"prototype"===i)return;const c=Vi(r.slice(a+1));t[i]=function(e){const t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let n="";for(let s=1;s<t;s++){const r=e.charCodeAt(s);if(34===r)return e;if(92===r&&(s+=1,s>=t))return e;n+=e[s]}return n}(c)}for(let e=0;e<n.length;e++){const t=n.charCodeAt(e);r?a?a=!1:92===t?a=!0:34===t&&(r=!1):34===t?r=!0:44!==t&&59!==t||(o(e),s=e+1)}return o(n.length),t}(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Mi]=this[Mi]={accessors:{}}).accessors,n=this.prototype;function s(e){const s=Li(e);t[s]||(!function(e,t){const n=Oi.toCamelCase(" "+t);["get","set","has"].forEach((s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(e,n,r){return this[s].call(this,t,e,n,r)},configurable:!0})}))}(n,e),t[s]=!0)}return Oi.isArray(e)?e.forEach(s):s(e),this}}ki.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Oi.reduceDescriptors(ki.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Oi.freezeMethods(ki);const Bi=ki,$i="[REDACTED ****]";function Gi(e,t){const n=new Set(t.map((e=>String(e).toLowerCase()))),s=[],r=e=>{if(null===e||"object"!=typeof e)return e;if(Oi.isBuffer(e))return e;if(-1!==s.indexOf(e))return;let t;if(e instanceof Bi&&(e=e.toJSON()),s.push(e),Oi.isArray(e))t=[],e.forEach(((e,n)=>{const s=r(e);Oi.isUndefined(s)||(t[n]=s)}));else{if(!Oi.isPlainObject(e)&&function(e){if(Oi.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Oi.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return s.pop(),e;t=Object.create(null);for(const[s,a]of Object.entries(e)){const e=n.has(s.toLowerCase())?$i:r(a);Oi.isUndefined(e)||(t[s]=e)}}return s.pop(),t};return r(e)}function Wi(e){try{return String(e)}catch(e){return""}}class Hi extends Error{static from(e,t,n,s,r,a){let o=e.message;!o&&Oi.isArray(e.errors)&&e.errors.length&&(o=function(e){return e.errors.map((e=>{try{return e&&e.message?Wi(e.message):Wi(e)}catch(e){return""}})).filter(Boolean).join("; ")||e.name||"AggregateError"}(e));const i=new Hi(o,t||e.code,n,s,r);return Object.defineProperty(i,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),i.name=e.name,null!=e.status&&null==i.status&&(i.status=e.status),a&&Object.assign(i,a),i}constructor(e,t,n,s,r){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r,this.status=r.status)}toJSON(){const e=this.config,t=e&&Oi.hasOwnProp(e,"redact")?e.redact:void 0,n=Oi.isArray(t)&&t.length>0?Gi(e,t):Oi.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}Hi.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Hi.ERR_BAD_OPTION="ERR_BAD_OPTION",Hi.ECONNABORTED="ECONNABORTED",Hi.ETIMEDOUT="ETIMEDOUT",Hi.ECONNREFUSED="ECONNREFUSED",Hi.ERR_NETWORK="ERR_NETWORK",Hi.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Hi.ERR_DEPRECATED="ERR_DEPRECATED",Hi.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Hi.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Hi.ERR_CANCELED="ERR_CANCELED",Hi.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Hi.ERR_INVALID_URL="ERR_INVALID_URL",Hi.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const qi=Hi,zi=null;function Yi(e){return Oi.isPlainObject(e)||Oi.isArray(e)}function Ki(e){return Oi.endsWith(e,"[]")?e.slice(0,-2):e}function Qi(e,t,n){return e?e.concat(t).map((function(e,t){return e=Ki(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Ji=Oi.toFlatObject(Oi,{},null,(function(e){return/^is[A-Z]/.test(e)}));const Xi=function(e,t,n){if(!Oi.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const s=(e,t)=>{const s=Oi.getSafeProp(n,e);return Oi.isUndefined(s)?t:s},r=s("metaTokens",!0),a=s("visitor")||h,o=s("dots",!1),i=s("indexes",!1),c=s("Blob")||"undefined"!=typeof Blob&&Blob,l=s("maxDepth",100),u=c&&Oi.isSpecCompliantForm(t),d=[];if(!Oi.isFunction(a))throw new TypeError("visitor must be a function");function p(e){if(null===e)return"";if(Oi.isDate(e))return e.toISOString();if(Oi.isBoolean(e))return e.toString();if(!u&&Oi.isBlob(e))throw new qi("Blob is not supported. Use a Buffer instead.");if(Oi.isArrayBuffer(e)||Oi.isTypedArray(e)){if(u&&"function"==typeof c)return new c([e]);throw new qi("Blob is not supported. Use a Buffer instead.",qi.ERR_NOT_SUPPORT)}return e}function g(e){if(e>l)throw new qi("Object is too deeply nested ("+e+" levels). Max depth: "+l,qi.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,s){let a=e;if(Oi.isReactNative(t)&&Oi.isReactNativeBlob(e))return t.append(Qi(s,n,o),p(e)),!1;if(e&&!s&&"object"==typeof e)if(Oi.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,(function(e,s){if(!Oi.isObject(s))return s;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(s),g(t+n.length-1),s}))}(e,1);else if(Oi.isArray(e)&&function(e){return Oi.isArray(e)&&!e.some(Yi)}(e)||(Oi.isFileList(e)||Oi.endsWith(n,"[]"))&&(a=Oi.toArray(e)))return n=Ki(n),a.forEach((function(e,s){!Oi.isUndefined(e)&&null!==e&&t.append(!0===i?Qi([n],s,o):null===i?n:n+"[]",p(e))})),!1;return!!Yi(e)||(t.append(Qi(s,n,o),p(e)),!1)}const f=Object.assign(Ji,{defaultVisitor:h,convertValue:p,isVisitable:Yi});if(!Oi.isObject(e))throw new TypeError("data must be an object");return function e(n,s,r=0){if(!Oi.isUndefined(n)){if(g(r),-1!==d.indexOf(n))throw new Error("Circular reference detected in "+s.join("."));d.push(n),Oi.forEach(n,(function(n,o){!0===(!(Oi.isUndefined(n)||null===n)&&a.call(t,n,Oi.isString(o)?o.trim():o,s,f))&&e(n,s?s.concat(o):[o],r+1)})),d.pop()}}(e),t};function Zi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,(function(e){return t[e]}))}function ec(e,t){this._pairs=[],e&&Xi(e,this,t)}const tc=ec.prototype;tc.append=function(e,t){this._pairs.push([e,t])},tc.toString=function(e){const t=e?t=>e.call(this,t,Zi):Zi;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const nc=ec;function sc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function rc(e,t,n){if(!t)return e;e=e||"";const s=Oi.isFunction(n)?{serialize:n}:n,r=Oi.getSafeProp(s,"encode")||sc,a=Oi.getSafeProp(s,"serialize");let o;if(o=a?a(t,s):Oi.isURLSearchParams(t)?t.toString():new nc(t,s).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const ac=Symbol("internals");function oc(e){return e?e.length:0}function ic(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function cc(e,t){const n=e.handlers,s=oc(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):s!==t.handlersLength&&(s?t.handlerEntries.forEach((function(e,s){n[e.index]!==e.handler&&t.handlerEntries.delete(s)})):t.handlerEntries.clear()),t.handlersLength=s}const lc=class{constructor(){this.handlers=[],this[ac]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){const s={fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null},r=this[ac];null==this.handlers&&(this.handlers=[]),cc(this,r);const a=r.nextId++;return this.handlers.push(s),r.handlerEntries.set(a,{handler:s,index:this.handlers.length-1}),r.handlersLength=this.handlers.length,a}eject(e){const t=this[ac];cc(this,t);const n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(ic(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],cc(this,this[ac]))}forEach(e){const t=this[ac];cc(this,t),t.iterationDepth++;try{Oi.forEach(this.handlers,(function(t){null!==t&&e(t)}))}finally{--t.iterationDepth||(cc(this,t),ic(this.handlers),t.handlersLength=oc(this.handlers))}}},uc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},dc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:nc,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pc="undefined"!=typeof window&&"undefined"!=typeof document,gc="object"==typeof navigator&&navigator||void 0,hc=pc&&(!gc||["ReactNative","NativeScript","NS"].indexOf(gc.product)<0),fc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,mc=pc&&window.location.href||"http://localhost",Ic={...l,...dc};const Ec=100;function yc(e){if(e>Ec)throw new qi("FormData field is too deeply nested ("+e+" levels). Max depth: "+Ec,qi.ERR_FORM_DATA_DEPTH_EXCEEDED)}const Ac=function(e){function t(e,n,s,r){yc(r);let a=e[r++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),i=r>=e.length;if(a=!a&&Oi.isArray(s)?s.length:a,i)return Oi.hasOwnProp(s,a)?s[a]=Oi.isArray(s[a])?s[a].concat(n):[s[a],n]:s[a]=n,!o;Oi.hasOwnProp(s,a)&&Oi.isObject(s[a])||(s[a]=[]);return t(e,n,s[a],r)&&Oi.isArray(s[a])&&(s[a]=function(e){const t={},n=Object.keys(e);let s;const r=n.length;let a;for(s=0;s<r;s++)a=n[s],t[a]=e[a];return t}(s[a])),!o}if(Oi.isFormData(e)&&Oi.isFunction(e.entries)){const n={};return Oi.forEachEntry(e,((e,s)=>{t(function(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let s;for(;null!==(s=n.exec(e));)yc(t.length),t.push("[]"===s[0]?"":s[1]||s[0]);return t}(e),s,n,0)})),n}return null},Cc=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Sc=(e,t)=>null!=e&&Oi.hasOwnProp(e,t)?e[t]:void 0;const _c={transitional:uc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",s=n.indexOf("application/json")>-1,r=Oi.isObject(e);r&&Oi.isHTMLForm(e)&&(e=new FormData(e));if(Oi.isFormData(e))return s?JSON.stringify(Ac(e)):e;if(Oi.isArrayBuffer(e)||Oi.isBuffer(e)||Oi.isStream(e)||Oi.isFile(e)||Oi.isBlob(e)||Oi.isReadableStream(e))return e;if(Oi.isArrayBufferView(e))return e.buffer;if(Oi.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(r){const t=Sc(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Xi(e,new Ic.classes.URLSearchParams,{visitor:function(e,t,n,s){return Ic.isNode&&Oi.isBuffer(e)?(this.append(t,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((a=Oi.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Sc(this,"env"),s=n&&n.FormData;return Xi(a?{"files[]":e}:e,s&&new s,t)}}return r||s?(t.setContentType("application/json",!1),function(e,t,n){if(Oi.isString(e))try{return(t||JSON.parse)(e),Oi.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Sc(this,"transitional")||_c.transitional,n=t&&t.forcedJSONParsing,s=Sc(this,"responseType"),r="json"===s;if(Oi.isResponse(e)||Oi.isReadableStream(e))return e;if(e&&Oi.isString(e)&&(n&&!s||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,Sc(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw qi.from(e,qi.ERR_BAD_RESPONSE,this,null,Sc(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ic.classes.FormData,Blob:Ic.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Oi.forEach(Cc,(e=>{_c.headers[e]={}}));const Nc=_c;function Tc(e,t){const n=this||Nc,s=t||n,r=Bi.from(s.headers);let a=s.data;return Oi.forEach(e,(function(e){a=e.call(n,a,r.normalize(),t?t.status:void 0)})),r.normalize(),a}function Dc(e){return!(!e||!e.__CANCEL__)}const Pc=class extends qi{constructor(e,t,n){super(null==e?"canceled":e,qi.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Oc(e,t,n){const s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(new qi("Request failed with status code "+n.status,n.status>=400&&n.status<500?qi.ERR_BAD_REQUEST:qi.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Rc=/[\t\n\r]/g;function bc(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Rc,"")}function vc(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}const xc=function(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r,a=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=s[o];r||(r=c),n[a]=i,s[a]=c;let u=o,d=0;for(;u!==a;)d+=n[u++],u%=e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),c-r<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const wc=function(e,t){let n,s,r=0,a=1e3/t;const o=(t,a=Date.now())=>{r=a,n=null,s&&(clearTimeout(s),s=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-r;i>=a?o(e,t):(n=e,s||(s=setTimeout((()=>{s=null,o(n)}),a-i)))},()=>n&&o(n),(...e)=>o(e)]},Mc=(e,t,n=3)=>{let s=0;const r=xc(50,250);return wc((n=>{if(!n||!Oi.isNumber(n.loaded))return;const a=n.loaded,o=n.lengthComputable?n.total:void 0,i=Math.max(0,null!=o?Math.min(a,o):a),c=Math.max(0,i-s),l=r(c);s=Math.max(s,i);e({loaded:i,total:o,progress:o?i/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-i)/l:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},Lc=(e,t)=>{const n=null!=e;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Uc=(e,t=Oi.asap)=>(...n)=>t((()=>e(...n))),Fc=Ic.hasStandardBrowserEnv?(Vc=new URL(Ic.origin),jc=Ic.navigator&&/(msie|trident)/i.test(Ic.navigator.userAgent),e=>(e=new URL(e,Ic.origin),Vc.protocol===e.protocol&&Vc.host===e.host&&(jc||Vc.port===e.port))):()=>!0;var Vc,jc;const kc=Ic.hasStandardBrowserEnv?{write(e,t,n,s,r,a,o){if("undefined"==typeof document)return;const i=[`${e}=${encodeURIComponent(t)}`];Oi.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),Oi.isString(s)&&i.push(`path=${s}`),Oi.isString(r)&&i.push(`domain=${r}`),!0===a&&i.push("secure"),Oi.isString(o)&&i.push(`SameSite=${o}`),document.cookie=i.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const s=t[n].replace(/^\s+/,""),r=s.indexOf("=");if(-1!==r&&s.slice(0,r)===e)try{return decodeURIComponent(s.slice(r+1))}catch(e){return s.slice(r+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const Bc=/^https?:(?!\/\/)/i;function $c(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${$i}@`),n=t.indexOf("#"),s=(-1===n?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${$i}`);return-1===n?s:`${s}#${r=t.slice(n+1),r?r.replace(/(^|&)([^=&]*=)?[^&]+/g,((e,t,n="")=>`${t}${n}${$i}`)):r}`;var r}function Gc(e,t){if("string"==typeof e){const n=bc(e);if(Bc.test(n))throw new qi(`Invalid URL ${JSON.stringify($c(n))}: missing "//" after protocol`,qi.ERR_INVALID_URL,t)}}function Wc(e,t,n,s){Gc(t,s);let r=!("string"==typeof(a=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));var a;return e&&(r||!1===n)?(Gc(e,s),function(e,t){if(!t)return e;let n=e.length;for(;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}const Hc=e=>e instanceof Bi?{...e}:e,qc=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter((t=>Object.getOwnPropertyDescriptor(e,t).enumerable))):Object.keys(e);function zc(e,t){e=e||{},t=t||{};const n=Object.create(null);function s(e,t,n,s){return Oi.isPlainObject(e)&&Oi.isPlainObject(t)?Oi.merge.call({caseless:s},e,t):Oi.isPlainObject(t)?Oi.merge({},t):Oi.isArray(t)?t.slice():t}function r(e,t,n,r){return Oi.isUndefined(t)?Oi.isUndefined(e)?void 0:s(void 0,e,0,r):s(e,t,0,r)}function a(e,t){if(!Oi.isUndefined(t))return s(void 0,t)}function o(e,t){return Oi.isUndefined(t)?Oi.isUndefined(e)?void 0:s(void 0,e):s(void 0,t)}function i(n,r,a){return Oi.hasOwnProp(t,a)?s(n,r):Oi.hasOwnProp(e,a)?s(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:i,headers:(e,t,n)=>r(Hc(e),Hc(t),0,!0)};return Oi.forEach(qc({...e,...t}),(function(s){if("__proto__"===s||"constructor"===s||"prototype"===s)return;const a=Oi.hasOwnProp(c,s)?c[s]:r,o=a(Oi.hasOwnProp(e,s)?e[s]:void 0,Oi.hasOwnProp(t,s)?t[s]:void 0,s);Oi.isUndefined(o)&&a!==i||(n[s]=o)})),Oi.hasOwnProp(t,"validateStatus")&&Oi.isUndefined(t.validateStatus)&&!1===function(n){const s=Oi.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Oi.isUndefined(s)){if(!Oi.isPlainObject(s))return;if(Oi.hasOwnProp(s,n))return s[n]}const r=Oi.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Oi.isPlainObject(r)&&Oi.hasOwnProp(r,n))return r[n]}("validateStatusUndefinedResolves")&&(Oi.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const Yc=["content-type","content-length"];const Kc=function(e){const t=zc({},e),n=e=>Oi.hasOwnProp(t,e)?t[e]:void 0,s=n("data");let r=n("withXSRFToken");const a=n("xsrfHeaderName"),o=n("xsrfCookieName");let i=n("headers");const c=n("auth"),l=n("baseURL"),u=n("allowAbsoluteUrls"),d=n("url");if(t.headers=i=Bi.from(i),t.url=rc(Wc(l,d,u,t),n("params"),n("paramsSerializer")),c){const t=Oi.getSafeProp(c,"username")||"",n=Oi.getSafeProp(c,"password")||"";try{i.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))):"")))}catch(t){throw qi.from(t,qi.ERR_BAD_OPTION_VALUE,e)}}if(Oi.isFormData(s)){const e=Oi.getSafeProp(s,"getHeaders");Ic.hasStandardBrowserEnv||Ic.hasStandardBrowserWebWorkerEnv||Oi.isReactNative(s)?i.setContentType(void 0):Oi.isFunction(e)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach((([t,n])=>{Yc.includes(t.toLowerCase())&&e.set(t,n)})):e.set(t)}(i,e.call(s),n("formDataHeaderPolicy"))}if(Ic.hasStandardBrowserEnv){Oi.isFunction(r)&&(r=r(t));if(!0===r||null==r&&Fc(t.url)){const e=a&&o&&kc.read(o);e&&i.set(a,e)}}return t},Qc="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const s=Kc(e);let r=s.data;const a=Bi.from(s.headers).normalize();let o,i,c,l,u,d,{responseType:p,onUploadProgress:g,onDownloadProgress:h}=s;function f(){l&&l(),u&&u(),s.cancelToken&&s.cancelToken.unsubscribe(o),s.signal&&s.signal.removeEventListener("abort",o)}let m=new XMLHttpRequest;function I(r){if(!m)return;if(!(0!==m.status||"file"===(vc(bc(s.url))||vc(Ic.origin))||m.responseURL&&m.responseURL.startsWith("file:")))return n(new qi("Request aborted",qi.ECONNABORTED,e,m)),f(),void(m=null);try{r?d&&d(r):u&&u()}catch(e){setTimeout((()=>{throw e}))}if(!m)return;const a=Bi.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Oc((function(e){t(e),f()}),(function(e){n(e),f()}),{data:p&&"text"!==p&&"json"!==p?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:a,config:e,request:m}),m=null}m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout,"onloadend"in m?m.onloadend=I:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(I)},m.onabort=function(){m&&(n(new qi("Request aborted",qi.ECONNABORTED,e,m)),f(),m=null)},m.onerror=function(t){const s=t&&t.message?t.message:"Network Error",r=new qi(s,qi.ERR_NETWORK,e,m);r.event=t||null,n(r),f(),m=null},m.ontimeout=function(){let t=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const r=s.transitional||uc;s.timeoutErrorMessage&&(t=s.timeoutErrorMessage),n(new qi(t,r.clarifyTimeoutError?qi.ETIMEDOUT:qi.ECONNABORTED,e,m)),f(),m=null},void 0===r&&a.setContentType(null),"setRequestHeader"in m&&Oi.forEach(wi(a),(function(e,t){m.setRequestHeader(t,e)})),Oi.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),p&&"json"!==p&&(m.responseType=s.responseType),h&&([c,u,d]=Mc(h,!0),m.addEventListener("progress",c)),g&&m.upload&&([i,l]=Mc(g),m.upload.addEventListener("progress",i),m.upload.addEventListener("loadend",l)),(s.cancelToken||s.signal)&&(o=t=>{m&&(n(!t||t.type?new Pc(null,e,m):t),m.abort(),f(),m=null)},s.cancelToken&&s.cancelToken.subscribe(o),s.signal&&(s.signal.aborted?o():s.signal.addEventListener("abort",o)));const E=vc(s.url);if(E&&!Ic.protocols.includes(E))return n(new qi("Unsupported protocol "+E+":",qi.ERR_BAD_REQUEST,e)),void f();m.send(r||null)}))},Jc=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const r=function(e){if(!s){s=!0,o();const t=e instanceof Error?e:this.reason;n.abort(t instanceof qi?t:new Pc(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{a=null,r(new qi(`timeout of ${t}ms exceeded`,qi.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)})),e=null)};e.forEach((e=>{s||(e.aborted?r.call(e):e.addEventListener("abort",r,{once:!0}))}));const{signal:i}=n;return i.unsubscribe=()=>Oi.asap(o),i},Xc=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let s,r=0;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Zc=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},el=(e,t,n,s)=>{const r=async function*(e,t){for await(const n of Zc(e))yield*Xc(n,t)}(e,t);let a,o=0,i=e=>{a||(a=!0,s&&s(e))};return new ReadableStream({async pull(e){try{const{done:t,value:s}=await r.next();if(t)return i(),void e.close();let a=s.byteLength;if(n){let e=o+=a;n(e)}e.enqueue(new Uint8Array(s))}catch(e){throw i(e),e}},cancel:e=>(i(e),r.return())},{highWaterMark:2})},tl=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,nl=(e,t,n)=>t+2<n&&tl(e.charCodeAt(t+1))&&tl(e.charCodeAt(t+2)),sl=e=>e<=57?e-48:(223&e)-55,rl=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,al=e=>{const t=e.length;let n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)},ol=e=>{const t=e.length;let n=0,s=0,r=!1;for(let o=0;o<t;o++){let i=e.charCodeAt(o);37===i&&nl(e,o,t)&&(i=16*sl(e.charCodeAt(o+1))+sl(e.charCodeAt(o+2)),o+=2),9!==(a=i)&&10!==a&&12!==a&&13!==a&&32!==a&&(61!==i?!rl(i)||s>0?r=!0:n++:s++)}var a;return r||s>2||s>0&&(n+s)%4!=0||n%4==1?al(e):(e=>{const t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)})(n)},il=(e,t)=>{if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const s=e.slice(5,n),r=e.slice(n+1);if(/;base64/i.test(s))return t(r);let a=0;for(let e=0,t=r.length;e<t;e++){const n=r.charCodeAt(e);if(37===n&&nl(r,e,t))a+=1,e+=2;else if(n<128)a+=1;else if(n<2048)a+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=r.charCodeAt(e+1);t>=56320&&t<=57343?(a+=4,e++):a+=3}else a+=3}return a};const cl="1.20.0",ll={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:ul}=Oi,dl=e=>{if(!Oi.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},pl=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},gl=e=>{const t=void 0!==Oi.global&&null!==Oi.global?Oi.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=Oi.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:r,Request:a,Response:o}=e,i=r?ul(r):"function"==typeof fetch,c=ul(a),l=ul(o);if(!i)return!1;const u=i&&ul(n),d=i&&("function"==typeof s?(p=new s,e=>p.encode(e)):async e=>new Uint8Array(await new a(e).arrayBuffer()));var p;const g=c&&u&&pl((()=>{let e=!1;const t=new a(Ic.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),s=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!s})),h=l&&u&&pl((()=>Oi.isReadableStream(new o("").body))),f={stream:h&&(e=>e.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!f[e]&&(f[e]=(t,n)=>{let s=t&&t[e];if(s)return s.call(t);throw new qi(`Response type '${e}' is not supported`,qi.ERR_NOT_SUPPORT,n)})}));const m=async e=>{if(null==e)return 0;if(Oi.isBlob(e))return e.size;if(Oi.isSpecCompliantForm(e)){const t=new a(Ic.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Oi.isArrayBufferView(e)||Oi.isArrayBuffer(e)?e.byteLength:(Oi.isURLSearchParams(e)&&(e+=""),Oi.isString(e)?(await d(e)).byteLength:void 0)};return async e=>{let{url:t,method:n,data:i,signal:l,cancelToken:d,timeout:p,onDownloadProgress:I,onUploadProgress:E,responseType:y,headers:A,withCredentials:C="same-origin",fetchOptions:S,maxContentLength:_,maxBodyLength:N,maxRedirects:T}=Kc(e);const D=Oi.isNumber(_)&&_>-1,P=Oi.isNumber(N)&&N>-1;let O=r||fetch;y=y?(y+"").toLowerCase():"text";let R=Jc([l,d&&d.toAbortSignal()],p),b=null;const v=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let x,w=null;const M=()=>new qi("Request body larger than maxBodyLength limit",qi.ERR_BAD_REQUEST,e,b);try{let r;const l=(U="auth",Oi.hasOwnProp(e,U)?e[U]:void 0);if(l){const e=Oi.getSafeProp(l,"username")||"";r={username:e,password:Oi.getSafeProp(l,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,Ic.origin);if(!r&&(e.username||e.password)){const t=dl(e.username);r={username:t,password:dl(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(r&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa((L=(r.username||"")+":"+(r.password||""),encodeURIComponent(L).replace(/%([0-9A-F]{2})/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))))))),D&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){const t="string"==typeof e?e.indexOf("#"):-1;return il(-1===t?e:e.slice(0,t),ol)}(t);if(n>_)throw new qi("maxContentLength size of "+_+" exceeded",qi.ERR_BAD_RESPONSE,e,b)}if(P&&"get"!==n&&"head"!==n){const e=await m(i);if("number"==typeof e&&isFinite(e)&&(x=e,e>N))throw M()}const d=P&&(Oi.isReadableStream(i)||Oi.isStream(i)),p=(e,t,n)=>el(e,65536,(e=>{if(P&&e>N)throw w=M();t&&t(e)}),n);if(g&&"get"!==n&&"head"!==n&&(E||d)){if(x=null==x?await(async(e,t)=>{const n=Oi.toFiniteNumber(e.getContentLength());return null==n?m(t):n})(A,i):x,0!==x||d){let e,n=new a(t,{method:"POST",body:i,duplex:"half"});if(Oi.isFormData(i)&&(e=n.headers.get("content-type"))&&A.setContentType(e),n.body){const[e,t]=E&&Lc(x,Mc(Uc(E)))||[];i=p(n.body,e,t)}}}else if(d&&!c&&u&&"get"!==n&&"head"!==n)i=p(i);else if(d&&c&&!g&&"get"!==n&&"head"!==n)throw new qi("Stream request bodies are not supported by the current fetch implementation",qi.ERR_NOT_SUPPORT,e,b);Oi.isString(C)||(C=C?"include":"omit");const F=c&&"credentials"in a.prototype;if(Oi.isFormData(i)){const e=A.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&A.delete("content-type")}A.set("User-Agent","axios/"+cl,!1);const V=null==S?S:Object.assign(Object.create(null),S);V&&(delete V.body,delete V.headers,delete V.method,delete V.signal,delete V.duplex,delete V.credentials);const j=Object.assign(Object.create(null),V,{signal:R,method:n.toUpperCase(),headers:wi(A.normalize()),body:i,duplex:"half",credentials:F?C:void 0});c&&(Oi.forEach(ll,((e,t)=>{void 0===j[t]&&(j[t]=e)})),void 0===j.signal&&(j.signal=null),void 0===j.body&&(j.body=null)),0===T&&(j.redirect="manual",V&&(V.redirect="manual")),b=c&&new a(t,j);let k=await(c?O(b,V):O(t,j));const B=Bi.from(k.headers);if(D){const t=Oi.toFiniteNumber(B.getContentLength());if(null!=t&&t>_)throw new qi("maxContentLength size of "+_+" exceeded",qi.ERR_BAD_RESPONSE,e,b)}const $=h&&("stream"===y||"response"===y);if(h&&k.body&&(I||D||$&&v)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=k[e]}));const n=Oi.toFiniteNumber(B.getContentLength()),[s,r]=I&&Lc(n,Mc(Uc(I),!0))||[];let a=0;const i=t=>{if(D&&(a=t,a>_))throw new qi("maxContentLength size of "+_+" exceeded",qi.ERR_BAD_RESPONSE,e,b);s&&s(t)};k=new o(el(k.body,65536,i,(()=>{r&&r(),v&&v()})),t)}y=y||"text";let G=await f[Oi.findKey(f,y)||"text"](k,e);if(D&&!h&&!$){let t;if(null!=G&&("number"==typeof G.byteLength?t=G.byteLength:"number"==typeof G.size?t=G.size:"string"==typeof G&&(t="function"==typeof s?(new s).encode(G).byteLength:G.length)),"number"==typeof t&&t>_)throw new qi("maxContentLength size of "+_+" exceeded",qi.ERR_BAD_RESPONSE,e,b)}return!$&&v&&v(),await new Promise(((t,n)=>{Oc(t,n,{data:G,headers:Bi.from(k.headers),status:k.status,statusText:k.statusText,config:e,request:b})}))}catch(t){if(v&&v(),R&&R.aborted&&R.reason instanceof qi){const n=R.reason;throw n.config=e,b&&(n.request=b),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(w)throw b&&!w.request&&(w.request=b),w;if(t instanceof qi)throw b&&!t.request&&(t.request=b),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new qi("Network Error",qi.ERR_NETWORK,e,b,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw qi.from(t,t&&t.code,e,b,t&&t.response)}var L,U}},hl=new Map,fl=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:r}=t,a=[s,r,n];let o,i,c=a.length,l=hl;for(;c--;)o=a[c],i=l.get(o),void 0===i&&l.set(o,i=c?new Map:gl(t)),l=i;return i},ml=(fl(),{http:zi,xhr:Qc,fetch:{get:fl}});Oi.forEach(ml,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}}));const Il=e=>`- ${e}`,El=e=>Oi.isFunction(e)||null===e||!1===e;const yl={getAdapter:function(e,t){e=Oi.isArray(e)?e:[e];const{length:n}=e;let s,r;const a={};for(let o=0;o<n;o++){let n;if(s=e[o],r=s,!El(s)&&(r=ml[(n=String(s)).toLowerCase()],void 0===r))throw new qi(`Unknown adapter '${n}'`);if(r&&(Oi.isFunction(r)||(r=r.get(t))))break;a[n||"#"+o]=r}if(!r){const e=Object.entries(a).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=n?e.length>1?"since :\n"+e.map(Il).join("\n"):" "+Il(e[0]):"as no adapter specified";throw new qi("There is no suitable adapter to dispatch the request "+t,qi.ERR_NOT_SUPPORT)}return r},adapters:ml};function Al(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pc(null,e)}function Cl(e){const t=Oi.toSafeFlatObject(e);Al(t),t.headers=Bi.from(Oi.getSafeProp(t,"headers")),t.data=Tc.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return yl.getAdapter(t.adapter||Nc.adapter,t)(t).then((function(e){Al(t),t.response=e;try{e.data=Tc.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=Bi.from(e.headers),e}),(function(e){if(!Dc(e)&&(Al(t),e&&e.response)){t.response=e.response;try{e.response.data=Tc.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=Bi.from(e.response.headers)}return Promise.reject(e)}))}const Sl={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Sl[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const _l={};Sl.transitional=function(e,t,n){function s(e,t){return"[Axios v"+cl+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,a)=>{if(!1===e)throw new qi(s(r," has been removed"+(t?" in "+t:"")),qi.ERR_DEPRECATED);return t&&!_l[r]&&(_l[r]=!0,console.warn(s(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},Sl.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Nl={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new qi("options must be an object",qi.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const a=s[r],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new qi("option "+a+" must be "+n,qi.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new qi("Unknown option "+a,qi.ERR_BAD_OPTION)}},validators:Sl},Tl=Nl.validators;class Dl{constructor(e){this.defaults=e||{},this.interceptors={request:new lc,response:new lc}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack;let s="";if("string"==typeof n){const e=n.indexOf("\n");s=-1===e?"":n.slice(e+1)}if(e.stack){if(s){const t=s.indexOf("\n"),n=-1===t?-1:s.indexOf("\n",t+1),r=-1===n?"":s.slice(n+1);String(e.stack).endsWith(r)||(e.stack+="\n"+s)}}else e.stack=s}catch(e){}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=zc(this.defaults,t);const{transitional:n,paramsSerializer:s,headers:r}=t;void 0!==n&&Nl.assertOptions(n,{silentJSONParsing:Tl.transitional(Tl.boolean),forcedJSONParsing:Tl.transitional(Tl.boolean),clarifyTimeoutError:Tl.transitional(Tl.boolean),legacyInterceptorReqResOrdering:Tl.transitional(Tl.boolean),advertiseZstdAcceptEncoding:Tl.transitional(Tl.boolean),validateStatusUndefinedResolves:Tl.transitional(Tl.boolean)},!1),null!=s&&(Oi.isFunction(s)?t.paramsSerializer={serialize:s}:Nl.assertOptions(s,{encode:Tl.function,serialize:Tl.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Nl.assertOptions(t,{baseUrl:Tl.spelling("baseURL"),withXsrfToken:Tl.spelling("withXSRFToken")},!0),t.method=(Oi.getSafeProp(t,"method")||Oi.getSafeProp(this.defaults,"method")||"get").toLowerCase();let a=r&&Oi.merge(r.common,r[t.method]);r&&Oi.forEach(Cc.concat("common"),(e=>{delete r[e]})),t.headers=Bi.concat(a,r);const o=[];let i=!0;this.interceptors.request.forEach((function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;i=i&&e.synchronous;const n=t.transitional||uc;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)}));const c=[];let l;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[Cl.bind(this),void 0];for(e.unshift(...o),e.push(...c),u=e.length,l=Promise.resolve(t);d<u;)l=l.then(e[d++],e[d++]);return l}u=o.length;let p=t;for(;d<u;){const e=o[d++],t=o[d++];try{p=e?e(p):p}catch(e){if(!t){l=Promise.reject(e);break}try{const n=t.call(this,e);Oi.isThenable(n)&&(l=Promise.resolve(n).then((()=>Cl.call(this,p))))}catch(e){l=Promise.reject(e)}break}}if(!l)try{l=Cl.call(this,p)}catch(e){l=Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return rc(Wc((e=zc(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}Oi.forEach(["delete","get","head","options"],(function(e){Dl.prototype[e]=function(t,n){return this.request(zc(n||{},{method:e,url:t,data:n&&Oi.hasOwnProp(n,"data")?n.data:void 0}))}})),Oi.forEach(["post","put","patch","query"],(function(e){function t(t){return function(n,s,r){return this.request(zc(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}Dl.prototype[e]=t(),"query"!==e&&(Dl.prototype[e+"Form"]=t(!0))}));const Pl=Dl;class Ol{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const s=new Promise((e=>{n.subscribe(e),t=e})).then(e);return s.cancel=function(){n.unsubscribe(t)},s},e((function(e,s,r){n.reason||(n.reason=new Pc(e,s,r),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ol((function(t){e=t})),cancel:e}}}const Rl=Ol;const bl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(bl).forEach((([e,t])=>{void 0===bl[t]&&(bl[t]=e)}));const vl=bl;const xl=function e(t){const n=new Pl(t),s=bo(Pl.prototype.request,n);return Oi.extend(s,Pl.prototype,n,{allOwnKeys:!0}),Oi.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return e(zc(t,n))},s}(Nc);xl.Axios=Pl,xl.CanceledError=Pc,xl.CancelToken=Rl,xl.isCancel=Dc,xl.VERSION=cl,xl.toFormData=Xi,xl.AxiosError=qi,xl.Cancel=xl.CanceledError,xl.all=function(e){return Promise.all(e)},xl.spread=function(e){return function(t){return e.apply(null,t)}},xl.isAxiosError=function(e){return Oi.isObject(e)&&!0===e.isAxiosError},xl.mergeConfig=zc,xl.AxiosHeaders=Bi,xl.formToJSON=e=>Ac(Oi.isHTMLForm(e)?new FormData(e):e),xl.getAdapter=yl.getAdapter,xl.HttpStatusCode=vl,xl.default=xl;const wl=xl;function Ml(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ll=Ml((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var Ul=function(e,t){return Ul=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Ul(e,t)};function Fl(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ul(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Vl(e,t,n,s){return new(n||(n=Promise))((function(r,a){function o(e){try{c(s.next(e))}catch(e){a(e)}}function i(e){try{c(s.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((s=s.apply(e,t||[])).next())}))}function jl(e,t){var n,s,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=i(0),o.throw=i(1),o.return=i(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,i[0]&&(a=0)),a;)try{if(n=1,s&&(r=2&i[0]?s.return:i[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,i[1])).done)return r;switch(s=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,s=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],s=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function kl(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],s=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Bl(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var s,r,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}function $l(e,t,n){if(n||2===arguments.length)for(var s,r=0,a=t.length;r<a;r++)!s&&r in t||(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function Gl(e){return this instanceof Gl?(this.v=e,this):new Gl(e)}function Wl(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,r=n.apply(e,t||[]),a=[];return s=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),s[Symbol.asyncIterator]=function(){return this},s;function o(e,t){r[e]&&(s[e]=function(t){return new Promise((function(n,s){a.push([e,t,n,s])>1||i(e,t)}))},t&&(s[e]=t(s[e])))}function i(e,t){try{(n=r[e](t)).value instanceof Gl?Promise.resolve(n.value.v).then(c,l):u(a[0][2],n)}catch(e){u(a[0][3],e)}var n}function c(e){i("next",e)}function l(e){i("throw",e)}function u(e,t){e(t),a.shift(),a.length&&i(a[0][0],a[0][1])}}function Hl(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=kl(e),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(n){t[n]=e[n]&&function(t){return new Promise((function(s,r){(function(e,t,n,s){Promise.resolve(s).then((function(t){e({value:t,done:n})}),t)})(s,r,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var ql=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function zl(e){return"function"==typeof e}function Yl(e){return zl(null==e?void 0:e.then)}var Kl=Ml((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function Ql(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Jl=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,s,r;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=kl(a),i=o.next();!i.done;i=o.next()){i.value.remove(this)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this);var c=this.initialTeardown;if(zl(c))try{c()}catch(e){r=e instanceof Kl?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=kl(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{eu(p)}catch(e){r=null!=r?r:[],e instanceof Kl?r=$l($l([],Bl(r)),Bl(e.errors)):r.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(s=u.return)&&s.call(u)}finally{if(n)throw n.error}}}if(r)throw new Kl(r)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)eu(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Ql(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Ql(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),Xl=Jl.EMPTY;function Zl(e){return e instanceof Jl||e&&"closed"in e&&zl(e.remove)&&zl(e.add)&&zl(e.unsubscribe)}function eu(e){zl(e)?e():e.unsubscribe()}var tu={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},nu={setTimeout:function(e,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var r=nu.delegate;return(null==r?void 0:r.setTimeout)?r.setTimeout.apply(r,$l([e,t],Bl(n))):setTimeout.apply(void 0,$l([e,t],Bl(n)))},clearTimeout:function(e){var t=nu.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function su(e){nu.setTimeout((function(){var t=tu.onUnhandledError;if(!t)throw e;t(e)}))}function ru(){}var au=ou("C",void 0,void 0);function ou(e,t,n){return{kind:e,value:t,error:n}}var iu=null;function cu(e){if(tu.useDeprecatedSynchronousErrorHandling){var t=!iu;if(t&&(iu={errorThrown:!1,error:null}),e(),t){var n=iu,s=n.errorThrown,r=n.error;if(iu=null,s)throw r}}else e()}var lu=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Zl(t)&&t.add(n)):n.destination=mu,n}return Fl(t,e),t.create=function(e,t,n){return new gu(e,t,n)},t.prototype.next=function(e){this.isStopped?fu(function(e){return ou("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?fu(ou("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?fu(au,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Jl),uu=Function.prototype.bind;function du(e,t){return uu.call(e,t)}var pu=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){hu(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){hu(e)}else hu(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){hu(e)}},e}(),gu=function(e){function t(t,n,s){var r,a,o=e.call(this)||this;zl(t)||!t?r={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=s?s:void 0}:o&&tu.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},r={next:t.next&&du(t.next,a),error:t.error&&du(t.error,a),complete:t.complete&&du(t.complete,a)}):r=t;return o.destination=new pu(r),o}return Fl(t,e),t}(lu);function hu(e){var t;tu.useDeprecatedSynchronousErrorHandling?(t=e,tu.useDeprecatedSynchronousErrorHandling&&iu&&(iu.errorThrown=!0,iu.error=t)):su(e)}function fu(e,t){var n=tu.onStoppedNotification;n&&nu.setTimeout((function(){return n(e,t)}))}var mu={closed:!0,next:ru,error:function(e){throw e},complete:ru},Iu="function"==typeof Symbol&&Symbol.observable||"@@observable";function Eu(e){return e}function yu(e){return 0===e.length?Eu:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Au=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var s,r=this,a=(s=e)&&s instanceof lu||function(e){return e&&zl(e.next)&&zl(e.error)&&zl(e.complete)}(s)&&Zl(s)?e:new gu(e,t,n);return cu((function(){var e=r,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?r._subscribe(a):r._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Cu(t))((function(t,s){var r=new gu({next:function(t){try{e(t)}catch(e){s(e),r.unsubscribe()}},error:s,complete:t});n.subscribe(r)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[Iu]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yu(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Cu(e))((function(e,n){var s;t.subscribe((function(e){return s=e}),(function(e){return n(e)}),(function(){return e(s)}))}))},e.create=function(t){return new e(t)},e}();function Cu(e){var t;return null!==(t=null!=e?e:tu.Promise)&&void 0!==t?t:Promise}function Su(e){return zl(e[Iu])}function _u(e){return Symbol.asyncIterator&&zl(null==e?void 0:e[Symbol.asyncIterator])}function Nu(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Tu="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Du(e){return zl(null==e?void 0:e[Tu])}function Pu(e){return Wl(this,arguments,(function(){var t,n,s;return jl(this,(function(r){switch(r.label){case 0:t=e.getReader(),r.label=1;case 1:r.trys.push([1,,9,10]),r.label=2;case 2:return[4,Gl(t.read())];case 3:return n=r.sent(),s=n.value,n.done?[4,Gl(void 0)]:[3,5];case 4:return[2,r.sent()];case 5:return[4,Gl(s)];case 6:return[4,r.sent()];case 7:return r.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Ou(e){return zl(null==e?void 0:e.getReader)}function Ru(e){if(e instanceof Au)return e;if(null!=e){if(Su(e))return r=e,new Au((function(e){var t=r[Iu]();if(zl(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(ql(e))return s=e,new Au((function(e){for(var t=0;t<s.length&&!e.closed;t++)e.next(s[t]);e.complete()}));if(Yl(e))return n=e,new Au((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,su)}));if(_u(e))return bu(e);if(Du(e))return t=e,new Au((function(e){var n,s;try{for(var r=kl(t),a=r.next();!a.done;a=r.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(s=r.return)&&s.call(r)}finally{if(n)throw n.error}}e.complete()}));if(Ou(e))return bu(Pu(e))}var t,n,s,r;throw Nu(e)}function bu(e){return new Au((function(t){(function(e,t){var n,s,r,a;return Vl(this,void 0,void 0,(function(){var o,i;return jl(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Hl(e),c.label=1;case 1:return[4,n.next()];case 2:if((s=c.sent()).done)return[3,4];if(o=s.value,t.next(o),t.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i=c.sent(),r={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),s&&!s.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(r)throw r.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function vu(e,t,n,s,r){void 0===s&&(s=0),void 0===r&&(r=!1);var a=t.schedule((function(){n(),r?e.add(this.schedule(null,s)):this.unsubscribe()}),s);if(e.add(a),!r)return a}function xu(e){return function(t){if(function(e){return zl(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function wu(e,t,n,s,r){return new Mu(e,t,n,s,r)}var Mu=function(e){function t(t,n,s,r,a,o){var i=e.call(this,t)||this;return i.onFinalize=a,i.shouldUnsubscribe=o,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=r?function(e){try{r(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=s?function(){try{s()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return Fl(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(lu);function Lu(e,t){return void 0===t&&(t=0),xu((function(n,s){n.subscribe(wu(s,(function(n){return vu(s,e,(function(){return s.next(n)}),t)}),(function(){return vu(s,e,(function(){return s.complete()}),t)}),(function(n){return vu(s,e,(function(){return s.error(n)}),t)})))}))}function Uu(e,t){return void 0===t&&(t=0),xu((function(n,s){s.add(e.schedule((function(){return n.subscribe(s)}),t))}))}function Fu(e,t){if(!e)throw new Error("Iterable cannot be null");return new Au((function(n){vu(n,t,(function(){var s=e[Symbol.asyncIterator]();vu(n,t,(function(){s.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Vu(e,t){if(null!=e){if(Su(e))return function(e,t){return Ru(e).pipe(Uu(t),Lu(t))}(e,t);if(ql(e))return function(e,t){return new Au((function(n){var s=0;return t.schedule((function(){s===e.length?n.complete():(n.next(e[s++]),n.closed||this.schedule())}))}))}(e,t);if(Yl(e))return function(e,t){return Ru(e).pipe(Uu(t),Lu(t))}(e,t);if(_u(e))return Fu(e,t);if(Du(e))return function(e,t){return new Au((function(n){var s;return vu(n,t,(function(){s=e[Tu](),vu(n,t,(function(){var e,t,r;try{t=(e=s.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)}),0,!0)})),function(){return zl(null==s?void 0:s.return)&&s.return()}}))}(e,t);if(Ou(e))return function(e,t){return Fu(Pu(e),t)}(e,t)}throw Nu(e)}function ju(e,t){return t?Vu(e,t):Ru(e)}function ku(e){return xu((function(t,n){var s,r=null,a=!1;r=t.subscribe(wu(n,void 0,void 0,(function(o){s=Ru(e(o,ku(e)(t))),r?(r.unsubscribe(),r=null,s.subscribe(n)):a=!0}))),a&&(r.unsubscribe(),r=null,s.subscribe(n))}))}class Bu{constructor(e,t,n={}){this.type=e,this.name=t,this.parent=null,this.children=[],this.eventSubscribers=[],this.value="",this.previousValue="|~#-old-#~|",this.props=n,this.references=new Map}addReference(e,t){this.references.set(e,t)}getReference(e){return e?this.references.get(e):void 0}getNode(e,t,n){return this.children.find((s=>s.type===e&&s.name===t&&s.props.index===n))}addNode(e,t,n={}){let s=this.getNode(e,t,n.index);return s?s.props=n:(s=new Bu(e,t,n),s.parent=this,this.children.push(s)),s}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e,t=!1){this.eventSubscribers.forEach((t=>{t(e)})),!t&&this.parent&&this.parent.triggerEvent(e)}setPreviousDefaultValue(){"|~#-old-#~|"===this.previousValue&&(this.previousValue=this.value)}removeReference(e,t){const n=this.references.get(e);n?.props?.index===t&&this.references.delete(e)}removeChildNode(e){const t=this.children.findIndex((t=>t.name.startsWith(e)));-1!==t&&this.children.splice(t,1)}removeChildren(){this.children.splice(0,this.children.length)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const s=this.children[n];if(s.props.index===t&&s.name===e){this.children.splice(n,1);break}}}}const $u=Bu;const Gu=class{constructor(e,t,n,s={}){this.type=$s.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=s}},Wu=/(([^.]+)\[\d+\])/g,Hu=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(Wu);if(!t)return[e];let n,s=t[t.length-1];return e=e?.split(s)[0],e=e?.substring(0,e.length-1),[s,n]=s.split("["),n=n?.split("]")[0],[e,s,n]},qu=(e,t)=>{if(!e.startsWith(t))return-1;const n=e.slice(t.length).match(/\[([0-9]+)\]/);return n?parseInt(n[1],10):-1},{FIELD:zu,WHEN:Yu,DECLARATIVE_TARGET:Ku,PAGELIST:Qu}=Gs.CONTEXT_TREE_NODE_TYPES;let Ju;const Xu=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[zu,new Map],[Yu,new Map],[Ku,new Map]])}addReference(e,t){if(this.references.has(t.type)){const n=this.references.get(t.type);n.set(e,t),this.references.set(t.type,n)}else{if(t.type===Qu){const n=this.references.get(zu);n.set(e,t),this.references.set(zu,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const s=qu(n.name,e);return-1!==s&&+s>=t}));n.length>0&&n.forEach((e=>{this.removeChildNode(e.name,t)}))}removeChildNode(e,t){const n=this.children.findIndex((t=>t.name.startsWith(e)));if(-1!==n){const[t]=this.children.splice(n,1),s=t?.parent;s?.removeChildNode(e)}const s=this.references.get(zu),r=this.references.get(Ku);[...s.keys(),...r.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=Hu(e);return+n>=t})).forEach((e=>{const t=s.get(e),n=t?.parent;n?.removeChildren(),s.delete(e)}))}getReference(e,t){if(this.references.has(t))return this.references.get(t)?.get(e)}getNode(e,t,n){return this.children.find((s=>s.type===e&&s.name===t&&s.props.index===n))}addNode(e,t,n={}){let s=this.getNode(e,t,n.index);return s?s.props=n:(s=new $u(e,t,n),s.parent=this,this.children.push(s)),s}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const s=this.references.get(t),r=s?.get(e);if(r?.props?.index===n){const n=r?.props?.context;t===zu&&n&&Ju?.(n,e),s.delete(e)}}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const s=this.children[n];if(s.props.index===t&&s.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,s,r){if(!(n&&s&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const a=`${e}.${n}.${s}`,o=new Gu(t,n,s,r),i=this.references.get("WHEN");i?.set(a,o)}},{VIEW:Zu,FIELD:ed,CONTEXT:td,DECLARATIVE_TARGET:nd,WHEN:sd}=$s.CONTEXT_TREE_NODE_TYPES;const rd=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new Xu(td,e);this.rootNodes[e]=t}return this.rootNodes[e]}getContextNode(e){return e?this.rootNodes[e]:void 0}addPageNode(e,t){return this.addContextNode(e).addNode("PAGE",t)}_addParentViewNode(e,t,n){const s=this.addContextNode(e).addNode("PAGE",t);let r=s.getReference(n);return r||(r=s.addNode("VIEW",n),s.addReference(n,r)),r}pushChildPageNodeToParentView(e,t,n){const s=e.children;let r=!1;if(s)for(let e=0;e<s.length;e+=1)if(s[e].name===n){r=!0;break}r||s.push(t),t.parent=e}addViewNode(e,t,n,s,r={}){const a=this.addContextNode(e).addNode("PAGE",t);let o=null;if(s&&n!==s){o=this._addParentViewNode(e,t,s).addNode("VIEW",n,r)}else o=a.addNode("VIEW",n,r);a.addReference(n,o);const i=t.split(".");for(;i.length>0;){i.pop();const n=i.join("."),r=this.getContextNode(e)?.getNode("PAGE",n),o=r?.getReference(s);if(o){this.pushChildPageNodeToParentView(o,a,t);break}}return o}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,s,r){if(!s)return;s.startsWith(".")&&(s=s.substring(1));const a=this.addContextNode(e),o=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${s}`,r);return o&&a.addReference(`${t}.${s}`,o),o}updatePageListNode(e,t,n,s){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,s)}removeFieldNode(e,t,n,s,r){const a=this.getContextNode(e);a?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${s}`,r),a?.removeReference(`${t}${s}`,ed,r),a?.removeReference(`${t}${s}`,nd,r)}removeViewNode(e,t,n,s,r={}){const a=this.getContextNode(e),o=a?.getNode("PAGE",t),i=o?.getReference(n);if("visibility"in r&&i?.props&&"visibility"in i.props&&r.visibility!==i.props.visibility)return;this.removeChildViewNodes(e,t,n,s);const c=i?.parent?.children?.findIndex((e=>e.name===n))??-1;c>-1&&i?.parent?.children.splice(c,1)}removeChildViewNodes(e,t,n,s){const r=this.getContextNode(e),a=r?.getNode("PAGE",t),o=a?.getReference(n);o?.children.forEach((a=>{"PAGE"===a.type?this.removeViewNode(e,a.name,n,s):a.type===Zu?this.removeChildViewNodes(e,t,a.name,s):(r.removeReference(a.name,ed,a.props.index),r.removeReference(a.name,nd,a.props.index),"PAGELIST"!==a.type&&"Address"!==a.props?.componentName||this.deleteAllListNodes(e,a.name))})),a?.references.delete(n)}deleteAllListNodes(e,t,n=!0){const s=s=>{const r=this.getContextNode(e),a=r?.references?.get(s);if(a)for(const[e]of a)(n&&e===t||e.startsWith(`${t}.`)||e.startsWith(`${t}[`))&&r?.references?.get(s)?.delete(e)};s(ed),s(nd)}deleteListNode(e,t,n){const s=s=>{const r=this.getContextNode(e),a=r?.references?.get(s);if(a)for(const[e]of a)e.includes(`${t.join(".")}[${n}]`)&&r?.references?.get(s)?.delete(e)};s(ed),s(nd)}getPageListNode(e,t,n,s){const r=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return r?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${s}`))}getFieldNode(e,t,n,s){return this.getViewNode(e,t,n)?.getNode(ed,s)}_findViewNode(e,t,n,s){let r=s.addNode("PAGE",t)?.getReference(n);if(r)return r;const a=t.split(".");for(;a.length>0;){a.pop();const e=a.join(".");if(r=s.addNode("PAGE",e)?.getReference(n),r)return r}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,s,r,a={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),c=this.createFieldNode(i,t,s,a);return c&&this.updateFieldNode(o,i,c,e,t,s,r),c}createFieldNode(e,t,n,s){const{isDeclarativeTarget:r}=s;return r?e.addNode(nd,`${t}${n}`,s):e.addNode(ed,`${t}${n}`,s)}updateFieldNode(e,t,n,s,r,a,o){const i=`${r}${a}`;"Address"===n.props?.componentName&&this.deleteAllListNodes(s,n.name),e.addReference(i,n),n.value=o,n.setPreviousDefaultValue(),n.props.isInsideList&&this.handleFieldInsideList(e,t,s,r,a)}handleFieldInsideList(e,t,n,s,r){const a=tA(n),o=Dy(a,n)||{},i=`${s}${r}`;let c=null;if(o?.subscriptFieldName||o?.isPageGroup)c=s.substring(0,s.lastIndexOf(`.${o?.index??""}`))||i.substring(0,i.lastIndexOf(`.${o?.index}`)),this.createListNodeIfNotExist(e,t,c);else{const n=s.substring(0,s.lastIndexOf("["))||i.substring(0,i.lastIndexOf("["));this.createListNodeIfNotExist(e,t,n)}}createListNodeIfNotExist(e,t,n){let s=e.getReference(n,ed);s||(s=t.addNode(ed,n,{}),e.addReference(n,s))}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,s){this.getViewNode(e,t,n)?.addEventListener(s)}mutateField(e,t,n,s){const r=this.getContextNode(e),[a,o,i]=Hu(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,a,o,{...s,rowIndex:i});const c=r?.getReference(`${t}.${n}`,ed);c&&c instanceof $u&&c.triggerEvent(s)}onPageListMutate(e,t,n,s,r){this.getPageListNode(e,t,n,s)?.addEventListener(r)}mutatePageList(e,t,n,s,r=!1){const a=this.getContextNode(e),o=a?.getReference(`${t}.${n}`,ed);o&&o instanceof $u&&o.triggerEvent(s,r)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(ed)}getFieldReferenceForProperty(e,t){let n=this.getContextNode(e)?.references?.get(ed)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(nd)?.get(t)),n}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(ed)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(nd)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const s=this.getContextNode(e)?.references?.get(ed)?.get(t);s instanceof $u&&s&&(s.previousValue=s.value,void 0===s.value&&(s.previousValue=n),s.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,ed),n=this.getContextReferencesByType(e,nd);return new Map([...t.entries(),...n.entries()])}getContextReferencesByType(e,t){return this.getContextNode(e)?.references.get(t)||new Map}isFieldExists(e,t){return!!this.getContextReferencesByType(e,ed)?.get(t)||!!this.getContextReferencesByType(e,nd)?.get(t)}addWhenNode(e,t,n,s,r,a){const o=this.getContextNode(e);o?.addWhen(t,n,s,r,a)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(nd)||new Map,s=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,r=t.pageReference??$s.CASE_INFO.CASE_INFO_CONTENT;s.push({pageReference:r,name:n})})),s}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(sd)||new Map,s=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,r=e.name,a=e?.props?.pageReference??$s.CASE_INFO.CASE_INFO_CONTENT;s.push({name:r,pageReference:a,referenceName:n,type:t})})),s}},ad={CONTENT_FIELDS_PATH:[Gs.CONTEXT_DATA,Gs.CASE_INFO.CASE_INFO,Gs.CONTENT],DATA_OBJECT_CONTENT_FIELDS_PATH:[Gs.CONTEXT_DATA,Gs.DATA_INFO.DATA_INFO,Gs.CONTENT],OBJECT_CONTENT_FIELDS_PATH:[Gs.CONTEXT_DATA,Gs.OBJECT_INFO.OBJECT_INFO,Gs.CONTENT],FIELD_MESSAGES_PATH:[Gs.CONTEXT_DATA,Gs.CASE_INFO.CASE_INFO,Gs.CONTENT,Gs.SUMMARY_OF_MESSAGES,Gs.PROPERTY_MESSAGES],DATA_OBJECT_FIELD_MESSAGES_PATH:[Gs.CONTEXT_DATA,Gs.DATA_INFO.DATA_INFO,Gs.CONTENT,Gs.SUMMARY_OF_MESSAGES,Gs.PROPERTY_MESSAGES],OBJECT_FIELD_MESSAGES_PATH:[Gs.CONTEXT_DATA,Gs.OBJECT_INFO.OBJECT_INFO,Gs.CONTENT,Gs.SUMMARY_OF_MESSAGES,Gs.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[Gs.CONTEXT_DATA,Gs.SUMMARY_OF_MESSAGES,Gs.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[Gs.CONTEXT_DATA,Gs.SUMMARY_OF_MESSAGES,Gs.HTTP_MESSAGES],CASE_MESSAGE_PATH:[Gs.CASEMESSAGES]},od=(e="",t="",n,s)=>{let r=[],a=[];null!==e&&(a=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===Gs.PROPERTY&&e||e){r=[Gs.CONTEXT_DATA,...o.split(".")];for(let e=0;e<a.length-1;e+=1)r.push(a[e]);r.push(Gs.SUMMARY_OF_MESSAGES,Gs.PROPERTY_MESSAGES,a[a.length-1])}else n===$s.PAGE?r=[...ad.PAGE_MESSAGES_PATH]:n===Gs.HTTP?r=[...ad.HTTP_MESSAGES_PATH]:n===Gs.CASEMESSAGES?r=[...ad.CASE_MESSAGE_PATH]:s&&(r=[Gs.CONTEXT_DATA,...o.split(".")]);return r.filter(Boolean)},id=(e,t,n)=>{const s={content:{}},r=`${t.split(".").slice(2).join(".")}[${n}]`,a=lS.getIn(e?.content,r.split("."));return a&&lS.setIn(s.content,r.split("."),{...a}),s},cd=(e,t,n,s,r,a,o={})=>{const i=((e,t,n)=>t<n?e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)>t&&parseInt(e.match(/\d+/)?.[0],10)<=n)):e.filter((e=>parseInt(e.match(/\d+/)?.[0],10)<t&&parseInt(e.match(/\d+/)?.[0],10)>=n)))(n,s,r),c=s>r?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const s=parseInt(n.match(/\d+/)?.[0],10),r=`${a}[${s}]`;o[`${a}[${s+("up"===c?1:-1)}]`]=lS.getIn(e[t],[Gs.CONTEXT_DATA,...r.split(".")]),lS.deleteIn(e[t],[Gs.CONTEXT_DATA,...r.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{lS.setIn(e[t],[Gs.CONTEXT_DATA,...n.split(".")],o[n])}))},ld=(e,t,n,s,r)=>{const a=lS.deepClone(lS.getIn(e,[`${t}`])),o=lS.getIn(a,[Gs.CONTEXT_DATA,Gs.CASE_INFO.CASE_INFO]);if(!o)return;const i=(e=>{const t=[];let n=0;for(;n<e.length;)n+1<e.length&&!Number.isNaN(parseInt(e[n+1],10))?(t.push(`${e[n]}[${e[n+1]}]`),n+=2):(t.push(e[n]),n+=1);return t.join(".")})(n.split(".")),c=i.substring(0,i.lastIndexOf(".")),l=((e,t,n)=>{const s=lS.getIn(e,[Gs.CONTEXT_DATA,...n.split(".")],{});return Object.keys(s).filter((e=>e.includes(`${t}[`)))})(a,i.substring(i.lastIndexOf(".")+1),c);if(0===l.length)return;const u=id(o,i,s).content;if(u&&Object.keys(u).length>0){const n={},o=`${i}[${s}]`,c=lS.getIn(a,[Gs.CONTEXT_DATA,...o.split(".")]);n[`${i}[${r}]`]=c,lS.deleteIn(e[t],[Gs.CONTEXT_DATA,...o.split(".")]),cd(e,t,l,s,r,i,n)}else cd(e,t,l,s,r,i)},ud=e=>{const{type:t,property:n,category:s,context:r,pageReference:a}=e;let o;n&&(o=n.slice(1));const i=zC(r);let c=[];const l=lS.getIn(i,od(o,a,s));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===$s.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&rd.mutateField(r,a,n,{messages:[...c],type:$s.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},dd=e=>{const{property:t,pageReference:n,category:s,context:r,type:a,subType:o,isListEntry:i,clearContextMessages:c,deletingIndex:l}=e,u={context:r,type:a,subType:o};t&&!i?(rd.mutateField(r,n,t,{type:ga,fieldName:t}),u.property=t,u.pageReference=n):i?(u.pageReference=n,u.isListEntry=i,u.deletingIndex=l):u.category=s,qC(c?{type:ga,payload:{stateObj:e.stateObj,context:r}}:{type:ga,payload:u})},pd=e=>{const{messages:t,property:n,pageReference:s,category:r,context:a}=e,o={messages:t,context:a};n?(o.property=n,o.pageReference=s):o.category=r,qC({type:pa,payload:o})},gd=(e,t,n)=>{for(const s of Object.keys(e)){if(t.push(s),s===Gs.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[s]&&gd(e[s],t,n)}t.pop()}return n},hd=(e,t)=>{let n=ud({context:Gs.APP.ROOT,category:"HTTP"});if(xA.getRenderingMode()===Gs.EMBED){const e=ud({context:Gs.APP.APP,category:"HTTP"});e&&(n=n?n.concat(e):e)}if(e){const e=ud({context:t,category:"HTTP"});n?e&&(n=n.concat(ud({context:t,category:"HTTP"}))):n=ud({context:t,category:"HTTP"})}return n},fd=e=>{let t=null;t=Gy(e)[0]?Fy(Gy(e)[0]):e,t&&dd({context:t,stateObj:zC(t),clearContextMessages:!0})},md=e=>(lS.getIn(zC(e),ad.PAGE_MESSAGES_PATH)??[]).some((e=>e.subType===Gs.CUSTOM_ERROR)),Id={addMessages:pd,getValidationErrorMessages:(e,t)=>{const n=zC(e),s=(e=>{let t=ad.CONTENT_FIELDS_PATH;e?.objectInfo?t=ZI.isObjectCaseType(e?.objectInfo?.objectTypeID)?ad.OBJECT_CONTENT_FIELDS_PATH:t:e?.dataInfo?.content&&(t=ad.DATA_OBJECT_CONTENT_FIELDS_PATH);return t})(n),r=lS.getIn(n,[...s])||{},a=[];return gd(r,[],[]).forEach((e=>{const n=lS.getIn(r,[...e,Gs.PROPERTY_MESSAGES]);n&&Object.keys(n).forEach((e=>{n[e].forEach((e=>{if(e.type===Gs.MESSAGES.MESSAGES_TYPE_ERROR){const n=t?.getLocalizedMessage(e.message)??e.message;e.fieldLabel?a.push({label:`${e.fieldLabel}:`,description:n}):a.push(n)}}))}))})),a},getMessages:ud,clearMessages:dd,getRootContainerHttpMessages:hd,clearContextMessagesInActiveWorkArea:fd,clearContextMessages:e=>{const{context:t}=e;qC({type:ga,payload:{clearAll:!0,context:t}})},isCustomPageErrorExist:md};const Ed=class{constructor(e,t,n,s){this.eventType=e,this.callback=n,this.contextName=s,this.id=t}};const yd=new class{constructor(){this.subscribers={}}publish(e,t){(this.subscribers[e]||[]).slice().forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const s=this.subscribers[e]||[];let r=0,a=-1;s.forEach((e=>{e.id===t&&e.contextName===n&&(a=r),r+=1})),-1!==a&&s.splice(a,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,s,r){this.subscribers[e]=this.subscribers[e]||[];let a=!1;if(r&&this.subscribers[e].forEach((e=>{a=e.id===t&&e.contextName===s})),!a){const r=new Ed(e,t,n,s);this.subscribers[e].push(r)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],s=[];n.forEach((t=>{t.contextName!==e&&s.push(t)})),this.subscribers[t]=s}))}};const Ad=class{static subscribe(e,t,n,s=!1,r="app"){yd.subscribe(e,n,t,r,s)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){yd.publish(e,t)}static unsubscribe(e,t,n="app"){yd.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){yd.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){yd.clearContext(e)}};const Cd=new class{override=null;discoveredOffline=!1;subscribers=new Set;constructor(){"function"==typeof globalThis.addEventListener&&(globalThis.addEventListener("online",this.handleOnline),globalThis.addEventListener("offline",this.handleOffline))}isOnline(){return null!==this.override?this.override:!this.discoveredOffline&&("undefined"==typeof navigator||!("onLine"in navigator)||navigator.onLine)}setOnlineOverride(e){const t=this.isOnline();this.override=e;const n=this.isOnline();n!==t&&this.notifyAll(n)}onStatusChange(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}reportNetworkFailure(){null===this.override&&(this.discoveredOffline||(this.discoveredOffline=!0,this.notifyAll(!1)))}reportNetworkRecovery(){null===this.override&&this.discoveredOffline&&(this.discoveredOffline=!1,this.notifyAll(!0))}handleOnline=()=>{null===this.override&&(this.discoveredOffline=!1,this.notifyAll(!0))};handleOffline=()=>{null===this.override&&this.notifyAll(!1)};notifyAll(e){qC({type:e?hr:gr,payload:{context:"app"}}),this.subscribers.forEach((t=>{t(e)}))}};const Sd=new class{#e;#t;#n;#s;constructor(){this.#e="undefined"!=typeof localStorage&&"true"===localStorage.getItem("inspectorFlag"),this.#t=!1,this.#n=!1,this.#s=!1,this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0;metric=1"}#r(){return this.#n&&this.#s}toggleXRay(e){console.warn("The toggleXRay method is deprecated. Please use the toggleInspector method going forward."),e&&!this.inspectorEnabled&&this.toggleInspector(),!e&&this.inspectorEnabled&&this.toggleInspector()}get inspectorEnabled(){return this.#e}get inspectorShowAll(){return this.#t}toggleInspector(){const e="undefined"!=typeof localStorage?localStorage:null,t="true"===e?.getItem("inspectorFlag");!t&&this.#r()||(this.#e=!t,e?.setItem("inspectorFlag",this.#e.toString()),Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e))}disableInspectorIfEnabled(){if(!this.#e)return;this.#e=!1;const e="undefined"!=typeof localStorage?localStorage:null;e?.setItem("inspectorFlag",this.#e.toString()),Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR,this.#e)}toggleInspectorShowAll(){this.#t=!this.#t,Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.INSPECTOR_SHOW_ALL,this.#t)}get uiDesignerEnabled(){return this.#n}setDesignerToolbarExpanded(e){this.#s=e,Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,e)}get uiDesignerToolbarExpanded(){return this.#s}toggleUIDesigner(){this.#n=!this.#n,this.#n||(this.#s=!1),Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER,this.#n),Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.UI_DESIGNER_TOOLBAR_EXPANDED,this.#s)}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0;metric=1"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0;metric=1"};getDebugLevels=()=>this.debugLevels};class _d{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new _d(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):np(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=sp()}async buildAuthorizeUrl(e){e=e||window.btoa(window.location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,s=this.config.clientId?this.config.clientId:this.config.client_id,r=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.authorizeUri?this.config.authorizeUri:this.config.endPoints?.authorize,o=this.config.authService?this.config.authService:this.config.authentication_service||"pega",i=this.config.appAlias?this.config.appAlias:bA.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo?.session_index;let l="";t?l=`&session_index=${t}`:`${c}`?l=`&UserIdentifier=${c}`:n&&(l=`&Password=${window.atob(n)}`);const u=new Uint8Array(64);window.crypto?.getRandomValues(u),this.config.codeVerifier=this.base64UrlSafeEncode(u),this.updateConfig(this.config,!1);const d=i?`+app.alias.${i.replace(/^app\//,"")}`:"";return this.getCodeChallenge(this.config.codeVerifier)?.then((t=>`${a}?client_id=${s}&response_type=code&redirect_uri=${r}&scope=openid${d}&state=${e}&code_challenge=${t}&code_challenge_method=S256&authentication_service=${o}&enable_psyncId=true${l}`))?.catch((()=>null))}getTokenAndFinish=e=>{window.removeEventListener("message",this.authMessageHandler,!1),this.getToken(e,!1).then((()=>{})).catch((e=>{console.log(e)}))};authMessageHandler=e=>{if(e.origin!==this.getRedirectUriOrigin())return;if(!e.data||!e.data.type||"PegaAuth"!==e.data.type)return;const t=e.data.code.toString();this.getTokenAndFinish(t)};getRedirectUriOrigin=()=>{let{redirectUri:e}=this.config;e=e||this.config.redirect_uri||"";const t=e.indexOf("//"),n=e.indexOf("/",t+2);return-1!==n?e.substring(0,n):e};getToken(e,t){this.reloadConfig(t);const n=this.config.clientId?this.config.clientId:this.config.client_id,s=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,r=this.config.redirectUri?this.config.redirectUri:this.config.redirect_uri,a=this.config.tokenUri?this.config.tokenUri:this.config.endPoints?.token,{codeVerifier:o}=this.config,i=window.location.search,c=new URLSearchParams(i),l=e||c.get("code"),u=new URLSearchParams;return n&&u.append("client_id",n),s&&u.append("client_secret",s),u.append("grant_type","authorization_code"),u.append("code",l),r&&u.append("redirect_uri",r),o&&u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),Kd(a,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:u.toString()}).then((e=>e.data)).then((e=>{e.eA=Date.now()+1e3*e.expires_in;let n=!1;if(this.config.codeVerifier&&(delete this.config.codeVerifier,n=!0),e.session_index&&(this.config.session_index=e.session_index,n=!0),n){this.updateConfig(this.config,t),this.config?.secureCookie?ep({pzCTkn:e?.csrf}):(tp({tokenInfo:e}),ep({Authorization:`${e?.token_type} ${e?.access_token}`}));const{onTokenRetrieval:n}=this.config;n&&"function"==typeof n&&n(e),window.postMessage("oAuthSuccess")}return e})).catch((()=>null))}sha256Hash(e){return window.crypto?.subtle?.digest("SHA-256",(new TextEncoder).encode(e))}encode64(e){return window.btoa(new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),""))}base64UrlSafeEncode(e){return this.encode64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}getCodeChallenge(e){return this.sha256Hash(e)?.then((e=>this.base64UrlSafeEncode(e))).catch((e=>{console.log(e)})).finally((()=>null))}}const Nd=_d,Td=async()=>new Promise((async(e,t)=>{const n=rp();if(!("tokenInfo"in n)||!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:s,refresh_token:r=null}=n.tokenInfo,a=n.endPoints?.revoke,{client_id:o="",client_secret:i="",secureCookie:c,serverType:l}=n,u="launchpad"===l,d={"content-type":"application/x-www-form-urlencoded"};i&&!u&&(d.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const p=new URLSearchParams;i?u&&(p.append("client_id",o),p.append("client_secret",i)):p.append("client_id",o),c&&p.append("send_token_as_cookie","true");const g=r?"refresh_token":"access_token",h="access_token"===g?s:r;!c&&h&&p.append("token",h),p.append("token_type_hint",g),a&&await Kd(a,{method:"POST",headers:d,withCredentials:c,body:p.toString(),withoutDefaultHeaders:!0}),ep({Authorization:null}),tp({tokenInfo:null}),e()})),Dd=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Nd(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=un()+(ln()?`${ln()}`:"/?reAuth=true");return t},Pd=(e,t)=>{Dd(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};Ad.publish($s.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},Od=e=>{let t="",n={},s={},r=!0;if("OAuth2.0"===e?.authType){t=e.endPoints.token;const a=new URLSearchParams;(!e.tokenInfo.refresh_token||e.tokenInfo.refresh_token&&e.tokenInfo.refresh_token.length<=0)&&(r=!1),a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),e.client_secret&&a.append("client_secret",e.client_secret),e.secureCookie&&a.append("send_token_as_cookie","true"),e.tokenInfo?.refresh_token&&a.append("refresh_token",e.tokenInfo.refresh_token),n={method:"POST",body:a.toString(),headers:{"content-type":"application/x-www-form-urlencoded"}},s={success:t=>{const{data:n}=t,s={access_token:n?.access_token,refresh_token:n?.refresh_token};tp({tokenInfo:{...e.tokenInfo,...s}}),e.secureCookie?ep({pzCTkn:n?.csrf}):ep({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:r}=e;r&&"function"==typeof r&&r(n)},failure:t=>{if(e.popupReauth)return Pd(t,e);Ad.publish($s.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${un()}/updateSession`,n={method:"GET",headers:{}},s={failure:Pd};return{url:t,config:n,callback:s,isRefreshTokenPresent:r}},Rd=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),bd=e=>{const{config:t}=e,n=t.headers&&t.headers.context;return t.data&&(t.body=t.data),{url:t.url,config:t,context:n}},vd=e=>{const{url:t,config:n,callback:s}=Od(e);return Kd(t,n).then((e=>{s?.success?.(e),Ad.publish("updateSession",{updateStatus:"success"}),Ad.publish("OnUpdateSession",{})})).catch((e=>{throw e}))},xd=(e,t,n)=>{const{config:s}=e,{url:r,config:a,callback:o,isRefreshTokenPresent:i}=Od(n),c=s?.headers&&s.headers.context;s?.data&&(s.body=s.data);const l=Qd(s.url,s,c,t);return i?Kd(r,a).then((e=>new Promise(((n,r)=>{setTimeout((()=>{t.setUpdateSessionStatus(!1),t.latestUpdateSessionTimeStamp=Date.now(),o?.success?.(e,s),Ad.publish("updateSession",{updateStatus:"success"}),Ad.publish("OnUpdateSession",{}),l.then((e=>{n(e)})).catch((e=>{r(e)}))}),0)})))).catch((e=>e&&e.config&&Rd(e.config.url,n)?(o?.failure?.(s.url,n),l):Promise.reject(e))):(o?.failure?.(s.url,n),l)},wd=new Set(["resource is stale","resource is locked","resource in the wrong state","resource not found"]),Md=e=>"object"==typeof e&&null!==e,Ld=(e,t)=>{if(!(e=>!!e&&wd.has(e.toLowerCase()))(t))return e;if(e&&e.includes("/workarea")&&!e.includes("/modal")){const t=e.lastIndexOf("/workarea");if(-1!==t)return e.slice(0,t)}return e},Ud=(e,t,n,s)=>{if(e.config&&Rd(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&!t.getUpdateSessionStatus()&&e.config.fetchTimeStamp>t.latestUpdateSessionTimeStamp){if(Ad.unsubscribeAllWithEventType(jd),t.setUpdateSessionStatus(!0),"custom"===n?.authType){Ad.publish($s.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:s,context:r}=bd(e);return Qd(n,s,r,t)}return xd(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&!e.config.isExternalUrl&&t.getUpdateSessionStatus()){const{url:t,config:n,context:s}=bd(e);return Kd(t,n,s)}const r=(e=>{if(e instanceof ArrayBuffer)try{const t=(new TextDecoder).decode(e),n=JSON.parse(t);return Md(n)?n:{}}catch{return{}}return Md(e)?e:{}})(e.response?.data);if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&(400!==e.response.status||r.errorClassification!==$s.INVALID_INPUTS)&&e.config.headers.context&&e.response.data&&!s){const t=r.errorDetails&&r.errorDetails.map((t=>((e,t)=>t[$s.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[$s.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers))),n=Ld(e.config.headers.context,r.errorClassification);return pd({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Fd=class{constructor(){this.updateSessionInProgress=!1,this.latestUpdateSessionTimeStamp=Date.now()}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const Vd=new class{constructor(){this.externalHeaders={},this.defaultHeaders={},this.SPECIAL_CHARS={SLASH:"/"}}registerHeader(e,t){return!this.defaultHeaders[e]&&(this.externalHeaders[e]=t,!0)}unRegisterHeader(e){this.externalHeaders[e]&&delete this.externalHeaders[e]}getRegisteredHeaders(){return this.externalHeaders}setDefaultHeaders(e){e?.Prefer&&this.defaultHeaders.Prefer&&(e.Prefer=`${this.defaultHeaders.Prefer},${e.Prefer}`),this.defaultHeaders={...this.defaultHeaders,...e}}setRequestContext(e){if(!e||0===e.length)return;const t=new URLSearchParams(window.location.search),n=this.buildHeaderMapFromRequestContext(e,t);this.registerHeadersFromMap(n)}buildHeaderMapFromRequestContext(e,t){const n={};return e?.forEach((e=>{Array.isArray(e.IncludeInHeaders)&&e.IncludeInHeaders.forEach((s=>{const r=s.Value,a=t.get(e.Key);a&&(n[r]||(n[r]=[]),n[r].push(`${e.Key}=${a}`))}))})),n}registerHeadersFromMap(e){Object.entries(e).forEach((([e,t])=>{t.length>0&&this.registerHeader(e,t.join("; "))}))}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[Gs.COREHEADER_APP_DEBUG_ID]:e.debugId,[Gs.COREHEADER_APP_DEBUG_LEVELS]:Sd.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=gS.getProperty(Gs.COREHEADERS,"",e);return t?{...t,debugInfo:Sd.getPreviewMode()&&{...t.debugInfo,[Gs.COREHEADER_APP_DEBUG_LEVELS]:Sd.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const s=this.getCoreHeadersFromContext(n);if(s){const t=Object.keys(e);if(t.includes(Gs.SKIPCOREHEADERS))return void delete e[Gs.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(s));Object.keys({...n}).forEach((s=>{t.includes(s)||(e[s]=n[s])}))}}injectCoreAdditionalHeaders(e,t,n,s){s?.includeRemoteSystemIdIfPresent&&qs.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}};const jd="updateSession",kd={},Bd=new Fd,$d=new class{constructor(){this.timerID=void 0,this.expiryBuffer=45,this.timeoutWarned=!1}setTimerID=e=>{this.timerID=e};getTimerID=()=>this.timerID;resetInactiveTimeout=e=>{const t=window.PCore?.getEnvironmentInfo().getInactivityTimeout();if(this.timeoutWarned&&(Ad.unsubscribe($s.PUB_SUB_EVENTS.RESET_TIMER,"resetCallback"),this.timeoutWarned=!1),t)return e&&clearTimeout(e),this.startInactivityTimeout(t>60?t:60)};startInactivityTimeout=e=>{const t=setTimeout((()=>{Ad.publish($s.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),Ad.subscribe($s.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let Gd={},Wd={},Hd={},qd="";const zd=e=>(e=>"ERR_NETWORK"===e.code||"ECONNABORTED"===e.code||"Network Offline"===e.message||!0===e.isOffline)(e)?(zC(e.config?.headers?.context)?.isLoading&&qC({type:pr,payload:{context:e.config?.headers?.context}}),Cd.reportNetworkFailure(),Promise.reject(new Error("Network Offline"))):((e=>"Network Offline"!==e.message&&Boolean(zC(Gs.APP.APP)?.context_data?.isOffline))(e)&&Cd.reportNetworkRecovery(),!e.response&&e.cause?.response&&(e.response=e.cause.response),(e=>Boolean(e.response&&401===e.response.status&&!e.config?.isExternalUrl&&(!e.config||!Rd(e.config.url,Wd))))(e)&&Ad.subscribe(jd,(e=>{Bd.setUpdateSessionStatus(!e.updateStatus)}),jd),Ud(e,Bd,Wd,(e=>e.response&&e.response.status&&e.response.status===Number(qd)?qd:null)(e))),Yd=e=>{if("OAuth2.0"===e?.authType&&e.secureCookie||e.customCookies)return!0},Kd=(e,t,n="root",s={})=>{const{doNotMergeHttpMessagesForStatusCode:r=null,cancelContext:a=n,includeRemoteSystemIdIfPresent:o=!0}=s;qd=r,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:i,signal:c,responseType:l,adapter:u,withoutDefaultHeaders:d=!1,...p}=t,{Authorization:g,pzCTkn:h,...f}=t.headers||{};d||Vd.injectCoreAdditionalHeaders(f,t.body,n,{includeRemoteSystemIdIfPresent:o}),a&&kd[a]>=0?kd[a]+=1:a&&void 0===kd[a]&&(kd[a]=1);let m=d?{...f}:{...Vd.getDefaultHeaders(),...Vd.getRegisteredHeaders(),...f,context:n};if(p.isExternalUrl=(e=>!e?.startsWith(un()||""))(e||""),p.fetchTimeStamp=Date.now(),e&&Rd(e,Wd)&&Bd.getUpdateSessionStatus()||!Bd.getUpdateSessionStatus()||p.isExternalUrl){Rd(e,Wd)&&"OAuth2.0"===Wd?.authType&&(m={...f});const{restApi:t}=bA.doesRestApiExist("Logout")&&bA.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&$d.setTimerID($d.resetInactiveTimeout($d.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(s,r){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:r,complete:function(){o?s(a):n?s(t.defaultValue):r(new Ll)}})}))}(ju(wl({context:n,...p,url:e,data:i,...c&&void 0===c.aborted&&{cancelToken:c},...c&&void 0!==c.aborted&&{signal:c},responseType:l,adapter:u,headers:m,withCredentials:Yd(Wd)})).pipe((A=zl(I=()=>{const e=Vd.getCoreHeadersFromContext(m.context);var t;e&&(t={...e},Ad.publish(Gs.PUB_SUB_EVENTS.FETCH_SUCCESS,t))})||E||y?{next:I,error:E,complete:y}:I)?xu((function(e,t){var n;null===(n=A.subscribe)||void 0===n||n.call(A);var s=!0;e.subscribe(wu(t,(function(e){var n;null===(n=A.next)||void 0===n||n.call(A,e),t.next(e)}),(function(){var e;s=!1,null===(e=A.complete)||void 0===e||e.call(A),t.complete()}),(function(e){var n;s=!1,null===(n=A.error)||void 0===n||n.call(A,e),t.error(e)}),(function(){var e,t;s&&(null===(e=A.unsubscribe)||void 0===e||e.call(A)),null===(t=A.finalize)||void 0===t||t.call(A)})))})):Eu,ku((e=>{const t=m,n=!!t?.[Gs.COREHEADER_APP_DEBUG_ID]?{debugInfo:{[Gs.COREHEADER_APP_DEBUG_ID]:t?.[Gs.COREHEADER_APP_DEBUG_ID],[Gs.COREHEADER_APP_DEBUG_LEVELS]:Sd.getDebugLevels()}}:Vd.getCoreHeadersFromContext(m.context);var s;throw n&&(s={...n,error:e},Ad.publish(Gs.PUB_SUB_EVENTS.FETCH_FAILURE,s)),e}))))}var I,E,y,A;return Qd(e,t,n,Bd)},Qd=(e,t,n,s)=>new Promise(((r,a)=>{Ad.subscribe(jd,(o=>{s.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?Kd(e,t,n).then((e=>r(e))).catch((e=>a(e))):a(o.updateStatus.error)}),jd)})),Jd=e=>{kd[e]>0&&(kd[e]-=1,0===kd[e]&&delete kd[e])};wl.interceptors.request.use((e=>Cd.isOnline()?(Gd?.request&&(e=Gd.request(e)),e):(zC(e.context)?.isLoading&&qC({type:pr,payload:{context:e.context}}),qC({type:gr,payload:{context:"app"}}),Promise.reject(new Error("Network Offline")))),(e=>Promise.reject(e))),wl.interceptors.response.use((e=>{if(202===e.status&&e.config.headers.context&&e.data?.caseInfo&&"object"==typeof e.data.caseInfo&&"errorMessage"in e.data.caseInfo){const t=[{type:"error",message:String(e.data.caseInfo.errorMessage)}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),pd({messages:t,category:"HTTP",context:n}),Promise.reject(e)}if(e.config.headers&&e.config.headers.context){if(!e.config.skipClearErrorMessages){ud({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&dd({type:"error",category:"HTTP",context:e.config.headers.context}),ud({type:"error",category:e.config.headers.context===Gs.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&dd({type:"error",category:"PAGE",context:e.config.headers.context});e.config.headers.context.slice(e.config.headers.context.lastIndexOf("/")+1).startsWith("primary")&&(ud({type:"error",category:"HTTP",context:Gs.APP.APP}).length>0&&dd({type:"error",category:"HTTP",context:Gs.APP.APP}),ud({type:"error",category:"PAGE",context:Gs.APP.APP}).length>0&&dd({type:"error",category:"PAGE",context:Gs.APP.APP}))}Jd(e.config.headers.context)}return Gd?.response&&(e=Gd.response(e)),e}),(e=>(e.config&&e.config.headers&&e.config.headers.context&&Jd(e.config.headers.context),Gd?.error?Promise.resolve(Gd.error(e)).then((t=>((e,t)=>{if("boolean"==typeof t)return t?zd(e):Promise.reject(e);if((n=t)&&"object"==typeof n&&("continueWithDefaultErrorHandler"in n||"error"in n)){const n=t.error??e;return t.continueWithDefaultErrorHandler??1?zd((e=>!(!e||"object"!=typeof e)&&"isAxiosError"in e&&"config"in e)(n)?n:e):Promise.reject(n)}var n;return zd(e)})(e,t))):zd(e))));const Xd=()=>wl.CancelToken.source(),Zd=e=>wl.isCancel(e),ep=e=>{Vd.setDefaultHeaders(e)},tp=e=>{Wd={...Wd,...e}},np=e=>{Hd={...Hd,...e}},sp=()=>({...Hd}),rp=()=>({...Wd});const ap=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),s=e.substring(t+1,n),r=Number(s)+1;return`${e.substring(0,t)}(${r})${e.substring(n+1)}`}return e}));return t.join(".")}static formatePageReferenceToArrayIndex(e){const t=e?.split(".").map((e=>{if(e.includes("(")){const t=e.indexOf("("),n=e.indexOf(")"),s=e.substring(t+1,n),r=Number(s);if(!Number.isNaN(r)){const s=r-1;return`${e.substring(0,t)}[${s}]${e.substring(n+1)}`}}return e}));return t.join(".")}static getFieldLabel(e){let t=e?.label;if(!t&&e?.inheritedProps){const n=e?.inheritedProps;(n.showLabel??1)&&(t=n.label)}return t}};const op=class{static execute(e,t,n,s){const r=!xA.isInfinityRuntime(),a={};Object.hasOwn(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{a[e]=n[e],delete n[e]})),delete n.nonFormProperties);const o={instruction:"string"==typeof t?"ADD":"INSERT",content:{...lS.unflatten(n)}},i=JSON.parse(JSON.stringify(o)),c=i.content.classID||i.content["@class"];delete i.content.classID;return{instruction:{target:lS.buildInstructionPageReference(s,e),content:{...r&&c?{"@class":c}:{},...i.content},["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"string"==typeof t?"ADD":"INSERT"},actionPayload:o,displayPropertPayload:a}}};const ip=class{static execute(e,t,n,s,r,a,o,i){const c=!xA.isInfinityRuntime(),l="string"==typeof n?`${t}(${n})`:`${t}[${n-1}]`,u=QC(".classID",`${r}${l}`,e)||QC(".@class",`${r}${l}`,e),d={instruction:"UPDATE",content:{...lS.unflatten(s)},isDefault:i},p={content:{...c&&u?{"@class":u}:{},...d.content},target:lS.buildInstructionPageReference(r,t),["string"==typeof n?"groupIndex":"listIndex"]:n,instruction:"UPDATE"};return a||qC(JS({...d,["string"==typeof n?"groupIndex":"listIndex"]:"string"==typeof n?n:n-1,context:e,referenceList:`${r}${t}`,skipDirtyValidation:o})),p}};const cp=class{static execute(e,t,n){return{target:lS.buildInstructionPageReference(n,e),["string"==typeof t?"groupIndex":"listIndex"]:t,instruction:"DELETE"}}};const lp=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:lS.buildInstructionPageReference(e,t)}}static execute(e,t,n,s){s||qC(JS({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const up=class{static execute(e,t,n,s){return{target:lS.buildInstructionPageReference(s,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const dp=class{static execute(e,t,n){const s=!xA.isInfinityRuntime(),r={instruction:"REPLACE",content:{...lS.unflatten(t)}},a=r.content.classID||r.content["@class"];delete r.content.classID;return{instruction:{target:lS.buildInstructionPageReference(n,e),content:{...s&&a?{"@class":a}:{},...r.content},instruction:"REPLACE"},actionPayload:r}}};const pp=class{static execute(e,t){return{target:lS.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const gp=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const hp=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},this.hasEncryptedContent=!1,this.targetPageReference=t+e,this.children=[],this.visibility=!0}addChild(e){null===this.current&&this.insertNode({}),this.current.childrenStateMachines.push(e)}insertNode(e){const t=new gp(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}applyEncryptedContent(e){void 0!==e&&(this.current.instruction.encryptedContent=e)}buildChildSumbitPageInstructions(e,t){let n=[];return e.childrenStateMachines.forEach((e=>{e.visibility&&(n=n.concat(e.buildSubmitPageInstructions(t)))})),n}buildSubmitPageInstructions(e=!1){let t=this.root,n=[];for(;t;)!t.instruction.instruction||e&&t.automatic||n.push(t.instruction),n=[...n,...this.buildChildSumbitPageInstructions(t,e)],t=t.next;return n}initPageInstructions(e,t,n){const s=e.getValue(this.target)||[];if(Array.isArray(s)){if(t)return void s.forEach(((e,s)=>{t.forEach((t=>{const r=VI(t),a={};let o=!0;n&&(a[VI(n)]=crypto.randomUUID(),o=!1);const i={[r]:lS.getIn(e,r),...a};this.update(i,s+1,o,{isDefault:!0,skipDirtyValidation:!0})}))}));s.forEach(((e,t)=>{if(n&&!e[VI(n)]){const e={};e[VI(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{isDefault:!0,skipDirtyValidation:!0})}}))}t&&s&&"object"==typeof s&&!Array.isArray(s)&&Object.keys(s).length>0&&this.processObjectRows(s,t,n)}processObjectRows(e,t,n){Object.keys(e).forEach((s=>{const r=e[s];t.forEach((e=>{const t=VI(e),a={};let o=!0;n&&(a[VI(n)]=crypto.randomUUID(),o=!1);const i={[`${t}`]:lS.getIn(r,t),...a};this.update(i,s,o,{isDefault:!0})}))}))}getChangeList(){return this.changeList}initChangeList(e){this.changeList[this.targetPageReference]=this.changeList[this.targetPageReference]||[],this.changeList[this.targetPageReference][e]=this.changeList[this.targetPageReference][e]||{}}update(e,t,n,s){const{isDefault:r=!1,skipPageinstruction:a,skipDirtyValidation:o=!1,encryptedContent:i}=s,c=ip.execute(this.contextName,this.target,t,e,this.pageReference,n,o,r);if(!a){if("string"==typeof t?this.initChangeList(t):this.initChangeList(t-1),!r){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=sS(lS.deepClone(n),e,s)}if(this.current?.automatic===r&&(this.current?.instruction?.groupIndex===t||this.current?.instruction?.listIndex===t)&&"UPDATE"===this.current?.instruction.instruction){const t=this.current.instruction.content;return this.current.instruction.content=sS(lS.deepClone(t),lS.unflatten(e),s),void this.applyEncryptedContent(i)}this.insertNode(c),this.applyEncryptedContent(i),r&&(this.current.automatic=!0)}}delete(e,t){const n=cp.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||qC(JS({instruction:"DELETE",listIndex:"string"==typeof e?e:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,s){const{instruction:r,actionPayload:a={content:{}},displayPropertPayload:o={}}=op.execute(this.target,t,e,this.pageReference),{isDefault:i=!1,encryptedContent:c,skipDirtyValidation:l=!1}=s;if(this.initChangeList("string"==typeof t?t:t-1),!i){const n=this.changeList?.[this.targetPageReference]?.["string"==typeof t?t:t-1].content;this.changeList[this.targetPageReference]["string"==typeof t?t:t-1]=sS(lS.deepClone(n),e,s)}this.root&&!this.root.instruction?.instruction&&this.current&&!this.current.instruction?.instruction?this.root.instruction=r:this.insertNode(r),this.applyEncryptedContent(c),n||(a.content={...a.content,...o},qC(JS({...a,["string"==typeof t?"groupIndex":"listIndex"]:"string"==typeof t?t:t-1,c11nEnv:s.c11nEnv,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,skipDirtyValidation:l}))),i&&(this.current.automatic=!0)}replacePage(e,t,n,s,r){const a=s??this.pageReference,o=n??this.target,{instruction:i,actionPayload:c}=dp.execute(o,e,a);this.insertNode(i),this.applyEncryptedContent(r),t||qC(JS({...c,context:this.contextName,referenceList:`${a}${lS.convertClipboardPageToPageRefNotation(o)}`}))}deletePage(e){const t=pp.execute(this.target,this.pageReference);this.insertNode(t),e||qC(JS({instruction:"DELETEPAGE",context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const s=up.execute(this.target,e,t,this.pageReference);this.insertNode(s),qC(JS({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=lp.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),lp.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){if(!this.current?.instruction||!e)return;const t=this.current.instruction.content||{};this.current.instruction.content=sS(lS.deepClone(t),e)}},fp={},mp={},Ip={},Ep=(e,t,n)=>{fp[e]||(fp[e]={}),fp[e][t]||(fp[e][t]={content:[]}),mp[e]||(mp[e]=[],Ip[e]=[]),UI.isStateMachineExist(e,n,t)||UI.setStateMachine(e,t,n,new hp(t,n,e))},yp=e=>ap.formatPageReference(e),Ap=(e,t)=>{const n=mp[e],s=Ip[e],r=VI(t),a=r?.substring(0,r.indexOf("["));s?.indexOf(a)<0&&Ip[e].push(a),n?.indexOf(r)<0&&mp[e].push(r)},Cp=e=>{delete mp[e]},Sp=e=>UI.buildPageInstructionsByContext(e),_p=e=>{UI.clearStateMachines(e),delete fp[e]},Np=(e,t,n,s)=>{let[,r]=t.split(`${e}[${s}]`);""!==r&&void 0!==r&&(r=r.startsWith(".")?r.substring(1):r,Object.keys(n).forEach((e=>{n[`${r}.${e}`]=n[e],delete n[e]})))},Tp=(e,t,n,s,r)=>{const{skipStateUpdate:a=!1,insertIfEmpty:o=!1,skipDirtyValidation:i=!1}=r||{},c=n.getContextName(),l=n.getReferenceList(),u=s||n.getPageReference(),d=yp(l);Ep(c,d,u),Ap(c,`${l}[${t}]`),Np(l,u,e,t);const p={instruction:Gs.LIST_ACTIONS.INSERT,content:{...lS.unflatten(e)}};delete JSON.parse(JSON.stringify(p)).content.classID;const g=UI.getStateMachine(c,u,d);o&&g?.root||g.insert(e,t+1,a,{c11nEnv:n,skipDirtyValidation:i})},Dp=(e,t,n=0,s={})=>{const{skipStateUpdate:r=!0,pageRef:a}=s,o=t.getContextName();let i=t.getReferenceList();const c=a||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf($s.CONTENT)+$s.CONTENT.length,s=e.lastIndexOf(`[${t}]`);return e.substring(n,s)})(c,n));const l=yp(i);Ep(o,l,c),Ap(o,`${i}[${n}]`),Np(i,c,e,n);UI.getStateMachine(o,c,l).update(e,n+1,r,s)},Pp=(e,t)=>{const[,n]=e.split("."),s=t?.split(".").pop();return n===s},Op=e=>{const t=lS.getPropertyName(e),n=t.indexOf(".");return n>=0?t.slice(n+1):t},Rp=(e,t,n)=>{const s={};return Object.values(e).forEach((e=>{if(Pp(e,n)){const n=Op(e).split(".");if(n.length>1){let e=lS.getIn(t,n)??"";if(!e){const s=`!P!${n.join(":")}`;e=lS.getIn(t,s)??""}lS.setIn(s,n,e)}else{const e=lS.getIn(t,n)??"";s[n[n.length-1]]=e}}})),s},bp=(e,t,n,s,r)=>{const a=e.getValue(t)||{};n&&Object.keys(a).length>0&&e.clearErrorMessages({property:s?r:e.getStateProps().value})},vp=(e,t,n)=>new Promise((s=>{const{skipPageInstructions:r=!1}=n,{selectionMode:a,selectionList:o,required:i}=t.getConfigProps(),c=a===Gs.LIST_SELECTION_MODE.MULTI,l=t.getContextName();let u=t.getPageReference(),d=((e,t,n)=>e?n.substring(1):t.substring(t.lastIndexOf(".")+1))(c,u,o);const p=t.getRawMetadata();let g=null;const h=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);h&&(d=p?.config?.dataRelationshipContext,g=u.concat(".").concat(d),u=g);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,s)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(s))(t,c,d,g),{datasource:{parameters:I={}}}=m,E={...I};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{e[Op(t)]=t}))})(E,m,c),c){let n=o;n=yp(n);const s=t.getValue(f)||[];Ep(t.getContextName(),n,u);const a=[];let i=s.length;e.forEach((e=>{const t=Rp(I,e,d),o={};if(Object.hasOwn(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=s.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!r){const s=UI.getStateMachine(l,u,n);e.$selected?s.insert(t,p+1,!0,{}):s.delete(p+1,!0)}a.push({instruction:e.$selected?Gs.LIST_ACTIONS.SELECT:Gs.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),qC(JS({instruction:Gs.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:a}))}else{const n=Rp(E,e[0],d),s=((e,t)=>{const{selectionKey:n,renderMode:s,referenceList:r,value:a}=e.getRawConfigProps()??{};let o=a;if(n?o=n:"Editable"===s&&(o=r),!o||"string"!=typeof o)return;const i=VI(lS.getPropertyName(o));return i.trim()?i.startsWith(`${t}.`)?`.${i.substring(t.length+1)}`:`.${i}`:void 0})(t,d),r={...h?{contextPageReference:u}:{},...s?{associatedProperty:s}:{}},a=p?.config?.compositeKeys||[];if(t.getRawConfigProps().onlyAllowRefreshOnCompositeKeys&&a.length){const s=a?.reduce(((e,t)=>(e[Op(t)]=t,e)),{})||{},o=Rp(s,e[0],d);Object.keys(o).forEach((e=>{delete n[e],t.getActionsApi().updateFieldValue(`.${e}`,o[e],r),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,o[e])}));const i=(e=>e.length>1&&e.pop()||"")(u.split(/\[\d+\]/gm));t.getActionsApi().updateFieldValue(i,n,r),t.getActionsApi().triggerFieldChange(i,n)}else Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[e],r),t.getActionsApi().triggerFieldChange(`.${d}.${e}`,n[e])}))}bp(t,f,i,c,d),s()})),xp=e=>{if(!e)return!1;const t=(n=e,UI.buildPageInstructionsByContext(n,!0));var n;return Array.isArray(t)&&t.length>0};const wp=(e,t,n={})=>{const{skipStateUpdate:s=!1}=n,r=e.getPageReference(),a=yp(t);Ep(e.getContextName(),t,r);UI.getStateMachine(e.getContextName(),r,a).deleteAll(s);const o=UI.getUnConnectedStateMachines(e.getContextName())||{};Object.keys(o).forEach((e=>{e.includes(`${r}${a}`)&&e!==`${r}${a}`&&(o[e]=null)}))},Mp=e=>({insert:(t,n,s,r)=>Tp(t,n,e,s,r),update:(t,n,s)=>Dp(t,e,n,s),updateProperty:(t,n,s)=>((e,t,n,s={})=>{const r=n.getPageReference(),{stateMachineTarget:a}=UI.getStateMachineObjByPath(`${r}${e}`,n.getContextName(),`${r}${e}`.endsWith("]"));if(!a){let e=r.substring(0,r.lastIndexOf("["));e||(e=r.substring(0,r.lastIndexOf(".")));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&Ep(n.getContextName(),t,e)}UI.executeStateMachine(n.getContextName(),`${r}${e}`,t,!0,s)})(t,n,e,s),deleteEntry:(t,n,s)=>((e,t,n,s)=>{const{skipStateUpdate:r=!1}=s||{},a=t.getContextName(),o=t.getReferenceList(),i=n||t.getPageReference(),c=`${i+o}[${e}]`,l=yp(o);dd({type:$s.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:c,context:a,isListEntry:!0,deletingIndex:e}),Ep(a,l,i),Ap(a,`${o}[${e}]`);const u=UI.getStateMachine(a,i,l);"string"==typeof e?u.delete(e,r):u.delete(e+1,r);const d=UI.getUnConnectedStateMachines(a)||{};Object.keys(d).forEach((e=>{e.includes(`${i}${l}`)&&e!==`${i}${l}`&&(d[e]=null)}))})(t,e,n,s),reorder:(t,n)=>((e,t,n)=>{const s=n.getContextName(),r=n.getReferenceList(),a=n.getPageReference(),o=yp(r);Ep(s,o,a),rd.deleteAllListNodes(s,`${a}${o}`,!1),Ap(s,`${r}[${t}]`),UI.getStateMachine(s,a,o).move(e+1,t+1);const i=UI.getUnConnectedStateMachines(s)||{};Object.keys(i)?.forEach((e=>{e.includes(`${a}${o}`)&&e!==`${a}${o}`&&delete i[e]}))})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>vp(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:s}=t.getConfigProps(),r=[];let a=t.getPageReference();const o=n===Gs.LIST_SELECTION_MODE.MULTI;let i=o?s.substring(1):a.substring(a.lastIndexOf(".")+1);const c=t.getRawMetadata();let l=null;c?.config?.dataRelationshipContext&&"SimpleTableSelect"===c.type&&"single"===c.config?.selectionMode&&(i=c.config.dataRelationshipContext,l=a.concat(".").concat(i),a=l);const u=o?`${a}${s}`:a;let d=t.getValue(u)||[];if(Array.isArray(d)||(d=[d]),e)return Promise.resolve(d);const{datasource:{parameters:p={}}={}}=o?t.getFieldMetadata(`${i}`):t.getCurrentPageFieldMetadata(l);return d.forEach((e=>{const t=Object.values(p).reduce(((t,n)=>{const s=n.substring(n.lastIndexOf(".")+1);return Pp(n,i)&&e[s]?`${t}${e[s]}`:t}),"");t.trim()&&r.push(t.trim())})),Promise.resolve(r)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),s=e.getContextName(),r=e.getPageReference(),a=t,o=`${r}${t}`;return new Promise((t=>{let i=a;i=yp(i),Ep(s,i,r),UI.getStateMachine(s,r,i).deleteAll(),bp(e,o,n,!0,a),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:s,selectionList:r,renderMode:a,referenceList:o}=e.getComponentConfig();let i;if(s===Gs.LIST_SELECTION_MODE.MULTI&&r?i=r:"Editable"===a&&o&&(i=e.getStateProps().referenceList),i){i=yp(i);const s=UI.getStateMachine(n,"",`${e.getPageReference()}${i}`);s&&(s.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,s)=>((e,t,n,s)=>{const r=e.getContextName(),a=e.getPageReference(),o=yp(t);Ep(r,o,a),UI.getStateMachine(r,a,o).initPageInstructions(e,n,s)})(e,t,n,s),deleteAll:(t,n)=>wp(e,t,n),replacePage:(t,n,s)=>((e,t,n,s)=>{const{skipStateUpdate:r=!1}=s||{},a=e.getPageReference(),o=e.getContextName();Ep(o,t,a),Ap(o,lS.buildInstructionPageReference(a,t)),UI.getStateMachine(o,a,t).replacePage(n,r)})(e,t,n,s),deletePage:(t,n)=>((e,t,n)=>{const{skipStateUpdate:s=!1}=n||{},r=e.getPageReference(),a=e.getContextName();Ep(a,t,r),Ap(a,lS.buildInstructionPageReference(r,t)),UI.getStateMachine(a,r,t).deletePage(s)})(e,t,n)});const Lp=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?lS.mergeDeep(e,this.fieldDefaults):lS.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},"object"==typeof this.fieldDefaults[e]&&null!==this.fieldDefaults[e]&&(this.fieldDefaults[e][t]=n))}getDefaultsforType(e){return this.fieldDefaults[e]}},Up="downloadAttachment",Fp={};function Vp(e,t){const n=ks.getDefaultQualifiedName(t);return n!==t&&n in e?e[n]:e[t]}const jp=e=>{const t=Xd();return Fp[e]=t,t};function kp(e){const t=new URL(e,window.location.origin),n=xA.environmentInfoObject?.encCSRFToken;return n&&t.searchParams.set("pzencv1zzz",n),t.searchParams.set("mode","stream"),t.toString()}async function Bp(e){const t=function(){if("undefined"!=typeof window&&"showSaveFilePicker"in window)return window.showSaveFilePicker}();if(!t)return null;try{const n=await t({suggestedName:e}),s=await n.createWritable();return{fh:n,writable:s}}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return null;throw e}}async function $p(e,t,n){const s=await Bp(t);if(s)try{const t=await async function(e,t){let n;await Kd(e,{method:"GET",adapter:async e=>(n=e,{data:null,status:204,statusText:"No Content",headers:{},config:e}),withoutDefaultHeaders:!1},t,{includeRemoteSystemIdIfPresent:!0});const s={};return Object.entries(n?.headers??{}).forEach((([e,t])=>{"string"==typeof t&&(s[e]=t)})),s}(e,n),r=await fetch(e,{method:"GET",headers:t});if(!r.ok)throw new Error(`Download failed: ${r.status}`);if(!r.body)throw new Error("Download response has no body");await r.body.pipeTo(s.writable)}catch(e){throw await s.writable.abort().catch((()=>{})),e}}const Gp=e=>{let t="document-doc";if(!e)return t;if(e.startsWith("audio"))t="audio";else if(e.startsWith("video"))t="video";else if(e.startsWith("image"))t="picture";else if(e.includes("pdf"))t="document-pdf";else{const[,n]=e.split("/"),s=e=>e.some((e=>n.includes(e)));s(["excel","spreadsheet"])?t="document-xls":s(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},Wp=e=>{const t=Vp(e,"pyCategoryLabel"),n=Vp(e,"pyCategoryName"),s=Vp(e,"Category"),r=Vp(e,"pxCreateOpName"),a=Vp(e,"pxCreateOperator"),o=e.CreateUser,i=Vp(e,"pyFileName"),c=Vp(e,"FileName"),l=Vp(e,"FileExtension"),u=Vp(e,"pyAttachName"),d=Vp(e,"pyMimeFileExtension"),p=Vp(e,"MimeType"),g=Vp(e,"pzInsKey"),h=Vp(e,"ID"),f=Vp(e,"pyAttachmentLink"),m=Vp(e,"AttachmentURL"),I=Vp(e,"pxAttachmentCreateTime"),E=Vp(e,"pxCreateDateTime"),y=Vp(e,"CreateDateTime"),A=Vp(e,"pxStorageType"),C=Vp(e,"pyFileSize"),S=Vp(e,"error"),_=Vp(e,"thumbnail"),N=Vp(e,"pyIsLargeAttachment"),T=Vp(e,"IsLargeAttachment");let D,P,O,R;return D=t?`${t},`:n?`${n},`:s,P=r||(a||o?.Name||""),O=i||(l&&""!==l&&c?.endsWith(l)?c.substring(0,c.lastIndexOf(l)-1):c),R=u&&i?u.startsWith(i)&&u.split(".").length-1===i.split(".").length?u.split(".").pop():"":l??"",{props:{meta:`${D} ${P}`,name:u??c??"",icon:Gp(d??p??""),error:S??null,thumbnail:_??null},responseProps:{fileName:u??c??"",name:O??"",category:n??s??"",extension:R,ID:g??h??"",mimeType:d??p??"",attachmentURL:f??m??"",createUser:P??"",createDateTime:I??E??y??"",responseType:e.responseType??(h?"binary":null),localAttachment:!!e.localAttachment,storageType:A??void 0,fileSize:C??void 0,isLargeAttachment:void 0!==N?"true"===N:T}}},Hp=e=>{let t=[],n=!1;if(e&&Object.hasOwn(e,ks.getDefaultQualifiedName("pyCount"))){n=!0;const s=Vp(e,"pxResults");t=Array.isArray(s)?s.filter((e=>!!Vp(e,"pzInsKey"))).map((e=>Wp(e))):[]}else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>Vp(e,"ID")&&Vp(e,"FileName")||Vp(e,"pzInsKey"))).map(Wp)}else t=[];const s=e?Vp(e,"pyCategoryName"):void 0;return{hasUploadedFiles:t.length>0,categoryName:("string"==typeof s?s:"")||t?.[0]?.responseProps?.category||"",attachments:t,isOldAttachment:n}},qp={uploadAttachment:(e,t,n,s,r,a)=>{const o=new FormData;o.append("appendUniqueIdToFileName","true"),o.append("file",e),r&&o.append("contextID",r),a&&o.append("category",a);const{restApi:i,reqType:c}=p_("uploadAttachment",{}),l={"Content-Type":"multipart/form-data"};return Boolean(xA?.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories)&&(l["x-pega-stream-support"]="repository-stream"),Kd(i,{method:c,headers:l,body:o,onUploadProgress:t,signal:jp(e.ID).token},s).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(Zd,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete Fp[e.ID]))},linkAttachmentsToCase:(e,t,n,s)=>{const r={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,n&&(r.signal=jp(n).token)}const{restApi:a,reqType:o}=p_("linkCaseAttachment",{caseID:e});return Kd(a,{...r,body:{attachments:t},method:o},s)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:s,reqType:r}=p_("getCaseAttachments",{caseID:e,includeThumbnail:n});return Kd(s,{method:r},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:s,reqType:r}=p_("getAttachmentCategories",{caseID:e,type:t});return Kd(s,{method:r},n).then((e=>e.data))},downloadAttachment:(e,t,n,s,r)=>{e=e.replace(/\//g,"_");const{restApi:a,reqType:o}=p_(Up,{attachmentID:e}),i=r&&a?(()=>{const e=new URL(a,window.location.origin);return e.searchParams.set("encoding",r),e.toString()})():a;return function(e){const t=xA.environmentInfoObject;return!(!t?.pyFeatures?.pyEnableStreamingForRepositories||"repository"!==e?.toLowerCase()||"EMBED"===t?.renderingMode&&!xA.isPegaMobile())}(s)&&a?async function(e){return await vd(rp()),{data:kp(e)}}(a):Kd(i,{method:o,..."binary"===n&&!r&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:s,reqType:r}=p_("editAttachment",{attachmentID:e});return Kd(s,{method:r,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:s}=p_("deleteAttachment",{attachmentID:e});return Kd(n,{method:s},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:s}=p_("downloadDocument",{documentID:e});return Kd(n,{method:s},t)},deleteDocument:(e,t,n)=>{const{restApi:s,reqType:r}=p_("deleteDocument",{caseID:e,documentID:t});return Kd(s,{method:r},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||ks.getDefaultQualifiedName("D_pxGetDocumentURL");return PCore.getDataPageUtils().getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getDocumentURL API : ",t.response)}))},cancelRequest:e=>{Fp[e]&&(Fp[e].cancel(),delete Fp[e])},buildFilePropsFromResponse:Wp,getAttachmentURL:e=>{const{restApi:t}=p_(Up,{attachmentID:e});return t},prepareAttachmentData:Hp,validateAttachments:(e,t)=>{let n=e;if((e=>null!==e&&"object"==typeof e&&"hasUploadedFiles"in e&&"boolean"==typeof e.hasUploadedFiles)(t)){const{attachments:e}=t;0===e.length&&(n="")}else{const{attachments:e}=Hp(t);0===e.length&&(n="")}return n},streamDownloadAttachment:async(e,t,n)=>{if(!xA.environmentInfoObject?.pyFeatures?.pyEnableStreamingForRepositories)return;e=e.replace(/\//g,"_");const{restApi:s}=p_(Up,{attachmentID:e});s&&(await vd(rp()),await $p(kp(s),t,n))}};let zp=!1;const Yp=e=>{zp=e},Kp=new Map,Qp=(e,t)=>{Kp.set(e,t)},Jp=e=>{Kp.delete(e)};class Xp{constructor(){this.validators={}}static messageDispatcher(e,t,n,s,r,a){if(s){const o=[];o.push({type:$s.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:r,message:s,...a??{}}),pd({messages:o,property:e,pageReference:t,context:n})}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,s,r,a){const{required:o,value:i}=a;let c=null;if(!("true"!==o&&!0!==o)){let o=s;switch(e){case"radiobuttons":o=i;break;case"attachment":o=qp.validateAttachments(s,i);break;case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),Xp.messageDispatcher(t,n,r,c,ap.getFieldLabel(a),{subType:"required"})}return c}validateType(e,t,n,s,r,a){let o=null;const i={pageReference:n,context:r,property:t,...a};let c=Lp.getDefaultsforType(a?.componentName||"")?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(s,i),(""!==s||Lp.getDefaultsforType(a?.componentName||"")?.showErrorWhenEmpty)&&Xp.messageDispatcher(t,n,r,o,a?.label));const l=a?.validationType;return c=l&&Lp.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(s,i),Xp.messageDispatcher(t,n,r,o,a?.label)),o}validate(e,t,n,s={}){const{context:r,disabled:a,readOnly:o,pageReference:i,skipRequiredValidation:c}=s;let l=null;return a||o||(c||zp||(l=this.validateRequired(e,t,i,n,r,s)),l||(l=this.validateType(e,t,i,n,r,s))),{message:l}}isValidatorExist(e){return!!e.validatetype}}const Zp=new Xp,eg=e=>{e&&AC(e)},tg=(e,t)=>{e.DeclareExpressions&&t.context&&_o({[t.context]:e.DeclareExpressions})},ng=(e,t,n=!1)=>{const s=lS.getIn(e,Gs.RESOURCES);s&&(eg(s),tg(s,t)),n||A_({...e,options:t})};class sg{static createCase(e,t){const{caseInfo:n,startingFields:s,flowType:r,viewType:a=oI.PAGE,pageName:o,context:i=Gs.APP.APP,debugInfo:c,headers:l,theType:u,retrieveActionViewForNewObject:d=!1}=t;let p={};n&&n.content&&(p=n.content);const{content:g={},pageInstructions:h}=sg.getExternalCaseOrObjectContent(e,d,i);let f={[sg.getKeyBasedOnWorkType(e)]:e,content:{...p,...s,...g}};if(f={...f,...h&&{pageInstructions:h},...!ZI.isObjectCaseType(e)&&{processID:r}},"CREATE_EXTERNAL_CASE"===u){const e=zC(i)?.caseInfo?.content;if(e){const t=lS.pruneKeys(e,new Set(["pxObjClass",ks.getDefaultQualifiedName("pxObjClass"),"EmbedListUUID__",ks.getDefaultQualifiedName("EmbedListUUID__")]),!1);f.content[Gs.getDefaultQualifiedName("pyAddCaseContextPage")]=t}}const m=sg.getObjectTypeViewPayload(d,e);return og(ZI.getRouteKeyForCreateWork(e,d),{body:f,queryPayload:{...m,...ZI.isExternalCaseType(e)?{casetypeID:e}:{caseClassName:e},viewType:a,params:{pageName:o}},headers:{...l,...c&&{...Vd.addDebugHeaders(c)}}},i).then((t=>({response:t.data,requestPayload:f,headers:cI(t.headers,e,l)})))}static getObjectTypeViewPayload=(e,t)=>e?ZI.shouldUseUnifiedHandling()?{casetypeID:t,actionID:Gs.getDefaultQualifiedName(Gs.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{objectTypeID:t,actionID:Gs.getDefaultQualifiedName(Gs.VIEW_NAMES.OBJECT_CREATE_VIEW)}:{};static getExternalCaseOrObjectContent=(e,t,n)=>{const s=ZI.isExternalObject(e),r=ZI.isExternalCaseType(e);if((r||s)&&!t){const e=lI(n,{isExternalObject:Boolean(!r&&s)}),{content:t,pageInstructions:a}=e.content;return{content:t,pageInstructions:a}}return{}};static getKeyBasedOnWorkType=e=>ZI.shouldUseUnifiedHandling()?"caseTypeID":ZI.isObjectCaseType(e)?"objectTypeID":"caseTypeID"}const rg=sg,ag=()=>({registerHeader:(...e)=>Vd.registerHeader(...e),unRegisterHeader:(...e)=>Vd.unRegisterHeader(...e),getRegisteredHeaders:()=>Vd.getRegisteredHeaders()}),og=(e,{body:t={},queryPayload:n={},cancelTokenSource:s,headers:r={},responseType:a},o,i)=>{const{restApi:c,reqType:l}=p_(e,n),u={method:l,headers:r,body:t,...a&&{responseType:a}};s&&(u.signal=s.token);const d="createWork"===e?ZI.appendExcludeQueryParamToUrl(c):c;return Kd(d,u,o,i??{})},ig=(e,{method:t="GET",body:n={},headers:s={},withoutDefaultHeaders:r=!1},a)=>{e.startsWith("http:")||e.startsWith("https:")||(e=un()+e);return Kd(e,{method:t,headers:s,body:n,withoutDefaultHeaders:r},a)},cg=e=>bA.doesRestApiExist(e),lg=()=>Xd(),ug=e=>Zd(e),dg=e=>{Gd=e},pg=()=>rg,gg=new Set;function hg(e){try{const t=new URL(e);"https:"!==t.protocol&&"http:"!==t.protocol||gg.add(t.origin)}catch{}}function fg(e){let t,n;try{t=new URL(e,window.location.href).origin}catch{throw new Error("Blocked: malformed URL")}try{n=window.location.origin??new URL(window.location.href).origin}catch{n=""}if(t!==n&&!gg.has(t))throw new Error(`Blocked: untrusted script origin "${t}"`)}const mg="getCustomComponent",Ig="text/javascript";function Eg(e){let t;try{t=new URL(e).protocol}catch{throw new Error("Component fetch blocked: malformed dev server URL")}if("http:"!==t&&"https:"!==t)throw new Error(`Component fetch blocked: unsupported dev server URL scheme "${t}"`)}const yg=new class{getTypes={SCRIPT:"script",STYLE:"link"};constructor(){this.loaderObj={},this.staticServerURL="",this.appStaticUrl=null,this.pegaOnlyUrl=!1,this.loadedAssets={},this.componentsConfig=null,this.appAlias="",this.b2sJWT=null,this.ccV2LibId="",this.imageBlobUrlCache={}}getStaticServerUrl(){return this.staticServerURL}setCCV2LibId(e){this.ccV2LibId=e}getCCV2LibId(){return this.ccV2LibId}async getThemeSchemaJSON(){const e=`${this.staticServerURL}themeOverrides.schema.json`;return fetch(e).then((e=>e.json()))}getConstellationServiceUrl(){return this.staticServerURL?.endsWith("/")?this.staticServerURL.substring(0,this.staticServerURL.length-1):this.staticServerURL}setAppAlias(e){this.appAlias=e}getAppAlias(){return this.appAlias}async getSvcComponentsConfig(e,t={}){let n="",s=0;return e.forEach((e=>{n+=`${0===s?"?":"&"}field${s}=${e.field}&value${s}=${e.value}`,s+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const s=xA.getBuiltOnAppNames(),r=this.loadAndFilterPegaComponentsConfig(e,s);let a=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(a=this.loadAndCustomerComponentsConfig(t,e));const o=[],i=xA.environmentInfoObject?.pyInfinityStaticService;if(i){const e=[],t=await Promise.all([r,a]),[n,s]=t,i=[];for(const t of s)!0===t.isSdkOverridden?e.push(t.componentDefinition):i.push(t.componentDefinition);const c=this.mergeComponentList([n,i,e]);o.push(...c)}else{const e=this.fetchSDKComponent(t);await Promise.all([r,a,e]).then((e=>{const t=this.mergeComponentList(e);o.push(...t)}))}if(n.alternateDesignSystemURL&&1===o.length){const s=await this.getSvcComponentsConfigADS(e,t,n);o[0].alternateDesignSystemConfig=s}return{data:{components:o}}}mergeComponentList=e=>{const[t=[],n=[],s=[]]=e,r=[...t,...n];return this.appStaticUrl?r.map((e=>{const{name:t,type:n,subtype:r}=e,a=s.reduce(((e,s)=>(t===s.name&&n===s.type&&r===s.subtype&&(e=s),e)),{});return Object.keys(a).length>0?{...e,alternateDesignSystemConfig:{...a}}:e})):r};async fetchSDKComponent(e){if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v102/${this.appAlias}/componentslist-ext${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}return Promise.resolve([])}async loadAndFilterPegaComponentsConfig(e,t){return this.loadPegaComponentsConfig().then((()=>{const n=[];return this.componentsConfig&&this.componentsConfig.forEach((s=>{let r=!0;e.forEach((e=>{Array.isArray(s[e.field])?s[e.field].includes(e.value)||(r=!1):s[e.field]!==e.value&&(r=!1)})),r&&this.checkForBuiltOnSupport(t,s.allowedApplications)&&n.push(s)})),n}))}async loadPegaComponentsConfig(){let e=null;if(null===this.componentsConfig){const t=`${this.staticServerURL}components/componentsconfig.json?v=${(new Date).getTime()}`;e=fetch(t,{method:"GET"}).then((e=>e.json())).then((async e=>{this.componentsConfig=e,this.ccV2LibId&&await this.loadLibraryComponentsConfig(this.ccV2LibId).then((e=>{e&&e.length>0&&(this.componentsConfig=(this.componentsConfig||[]).concat(e))})).catch((e=>{console.error(`Exception while appending custom component config from library ${this.ccV2LibId} : ${e}`)}))})).catch()}else e=Promise.resolve();return e}async loadLibraryComponentsConfig(e){let t=null;return t=fetch(`${this.appStaticUrl}v100/componentlib/componentsconfig/${e}?v=${Date.now()}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw console.error("Error while fetching custom component config/library component config"),new Error(e.statusText);return e})).then((e=>e.json())).then((e=>Promise.resolve(e))).catch((t=>(console.error(`Exception while fetching custom component config from library ${e} : ${t}`),{error:t.message}))),t}async loadAndCustomerComponentsConfig(e,t){let n=null;const s=xA.environmentInfoObject?.pyInfinityStaticService;if(s){const e={};t.forEach(((t,n)=>{e[`field${n}`]=t.field,e[`value${n}`]=t.value})),n=PCore.getDataPageUtils().getDataAsync(ks.getDefaultQualifiedName("D_pzGetComponentsConfig"),"",e).then((e=>e.data.map((e=>({componentDefinition:JSON.parse(e.pxComponentDefinition),isSdkOverridden:void 0!==e.pyIsSDKOverridden&&e.pyIsSDKOverridden})))))}else if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const t=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;n=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else n=Promise.resolve([]);return n}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((e=>t.includes(e)))}async getSvcComponentsConfigCombinedUrl(e,t,n){const s=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,r=await fetch(s,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&r?.data?.components?.length>0&&(r.data.components=r.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===r?.data?.components?.length){const s=await this.getSvcComponentsConfigADS(e,t,n);r.data.components[0].alternateDesignSystemConfig=s}return r}getSvcComponentsConfigADS(e,t,n){const s=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(s,{method:"GET"}).then((e=>{if(e.ok)return e.json();throw new Error(e.statusText)})).catch((e=>({error:e.message})))}getSvcImage(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).catch()}getSvcImageUrl(e){try{const t=xA.environmentInfoObject?.pyInfinityStaticService,{callUrlKey:n,queryPayload:s,callUrl:r}=this.buildImageRequest(e,t);return this.imageBlobUrlCache[r]||(this.imageBlobUrlCache[r]=this.fetchImage(n,s,r,t)),this.imageBlobUrlCache[r]}catch(e){return Promise.resolve(null)}}buildImageRequest(e,t){let n,s="getBinaryFile",r=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;if(t){const t=/DATA-CONTENT-IMAGE\s([^!]*)!.*\/OPERATORIMAGES\//i,a=e.match(t);if(a){const e=a[1]?.trim();if(!e)throw console.warn("AssetLoader.buildImageRequest: operator image key is missing user id"),new Error("AssetLoader.buildImageRequest: operator image key is missing user id");s="getOperatorImage",n={user_ID:e.toLowerCase()}}else n={fileID:e};r=p_(s,n)?.restApi||r}return{callUrlKey:s,queryPayload:n,callUrl:r}}fetchImage(e,t,n,s){return s?og(e,{queryPayload:t}).then((e=>{const n=this.decodeBase64ToByteArray(e.data),s=this.getMimeTypeFromKey(t?.fileID||t?.user_ID||""),r=new Blob([n],{type:s});return window.URL.createObjectURL(r)})).catch((e=>{throw console.error("Error fetching image:",e),e})):fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()}decodeBase64ToByteArray(e){const t=atob(e),n=t.length,s=new Uint8Array(n);for(let e=0;e<n;e+=1)s[e]=t.charCodeAt(e);return s}getMimeTypeFromKey(e){const t={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif"},n=e.toLowerCase().split("!").pop()||"";return t[n]?t[n]:"application/octet-stream"}getSvcLocale(e,t){const n=`${this.appStaticUrl}v102/${this.appAlias}/locales/${e}/${t}`;return fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}})}getSvcAvailableLocales(){const e=`${this.appStaticUrl}v102/app/${this.appAlias}/locales/getLocaleCodes`;return fetch(e,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).catch((()=>[]))}async getSvcComponent(e){try{const t=xA.environmentInfoObject?.pyC11nDXCBDevURL;if(t){const e=t.replace(/\/+$/,"");Eg(e);const n=await fetch(`${e}/index.js`);if(!n.ok)throw new Error(n.statusText);return await n.text()}const n=xA.environmentInfoObject?.pyInfinityStaticService;if(n){const t=xA.environmentInfoObject?.pxApplication?.pxUpdateDateTime,n=t?lS.parsePegaDateTimeToTimestamp(t):null,s=`${e}${n?`?v=${n}`:""}`;return(await og(mg,{queryPayload:{componentName:s}})).data}const s=await fetch(`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}});if(!s.ok)throw new Error(s.statusText);return await s.text()}catch(e){throw console.error("Error fetching service component:",e),e}}async importCustomComponentMap(e,t){try{const n=xA.environmentInfoObject?.pyInfinityStaticService,s=xA.environmentInfoObject?.pyC11nDXCBDevURL;let r=`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`;if(s){Eg(s);const e=s.replace(/\/+$/,"");r=`${e}/index.js`}if(n&&!s){const n=xA.environmentInfoObject?.pxApplication?.pxUpdateDateTime,s=lS.parsePegaDateTimeToTimestamp(n),r=lS.parsePegaDateTimeToTimestamp(t),a=[];s&&a.push(`v=${s}`),r&&a.push(`libV=${r}`);const o=a.length?`${e}?${a.join("&")}`:e,i=await og(mg,{queryPayload:{componentName:o}});return void await this.appendCustomScriptToHead(i.data)}if(n||s){if("undefined"==typeof document)return;return void await new Promise(((e,t)=>{const n=document.createElement("script");n.src=r,n.type="text/javascript";const s=setTimeout((()=>{t(new Error(`Timed out waiting for custom component script to load: ${r}`))}),3e4);n.onload=()=>{clearTimeout(s),e()},n.onerror=()=>{clearTimeout(s),t(new Error("Error while appending custom component map"))},document.head.appendChild(n)}))}const a=await fetch(r,{headers:{Authorization:`Bearer ${this.b2sJWT}`}});a.ok||console.error("Error while fetching custom component map");const o=await a.text();this.setCCV2LibId(e),await this.appendCustomScriptToHead(o)}catch(e){console.error("Exception while appending custom component map (or load blocked):",e)}}async appendCustomScriptToHead(e){if("undefined"!=typeof document)try{await new Promise(((t,n)=>{const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([e],{type:Ig}));const r=setTimeout((()=>{n(new Error("Timed out waiting for custom component script to load"))}),3e4);s.onload=()=>{clearTimeout(r),t()},s.onerror=()=>{clearTimeout(r),n(new Error("Error while appending custom component map"))},document.head.appendChild(s)}))}catch(e){console.error("Exception appendCustomScriptToHead:",e)}}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((s=>{if("undefined"==typeof document)return void n(e);const r=document.createElement("script");r.src=window.URL.createObjectURL(new Blob([s],{type:Ig})),r.onload=()=>t(e),r.onerror=()=>n(e),document.head.appendChild(r)})).catch((()=>{n(e)}))}))}initServer(e,t,n){console.log(`asset-loader.initServer(${e}, ${t})`),this.appStaticUrl=null,this.staticServerURL=null,this.pegaOnlyUrl=!1,this.componentsConfig=null,gg.clear(),e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0,hg(this.staticServerURL),hg(this.appStaticUrl)):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0,hg(this.staticServerURL)):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,hg(this.staticServerURL)),console.log(`asset-loader.initServer() staticServerURL=${this.staticServerURL}, appStaticUrl=${this.appStaticUrl}, pegaOnlyUrl=${this.pegaOnlyUrl})`),this.b2sJWT=n}register(e,t){this.loaderObj[e]=t}getLoader(e){let t;const n=(e,t)=>new Promise(((n,s)=>{if("undefined"==typeof document)return void s(e);const r=document.createElement(t);if("script"===t){const t=r;t.onload=()=>{n(e)},t.onerror=()=>{s(e)},t.type=Ig,t.charset="UTF-8",t.async=!1,t.src=e}else{const t=r;t.type="text/css",t.rel="stylesheet",t.href=e}document.head.appendChild(r)})).catch((e=>{console.log(e)}));return t=e?this.loaderObj[e]:n,t}loadAssets(e,t){const{isDevServerMode:n}=t;if(!e)return Promise.resolve();const s=[];return e.forEach((e=>{const t=Object.keys(e)[0];let r=n?Object.values(e)[0]:this.getStaticServerUrl();r=r.endsWith("/")?r:`${r}/`,this.loadedAssets[t]||(t.includes(".js")?s.push(this.getLoader()(r+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(r+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(s)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(r.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),s=JSON.parse(n),a=s?.tenant_id,{restApi:o,reqType:i}=d_("getAssetsFromIsolations",{isolationID:a,assetPath:e})||{},c=`${this.appStaticUrl}${o}`;return fetch(c,{method:i,credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob()))}},Ag="component-loader",Cg={},Sg=async(e,t)=>{if(!e?.length||!1===window.PCore?.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();const n=yg.getLoader(),s=t||yg.staticServerURL;if(yg.getLoader(Ag))return yg.getLoader(Ag)(e,s);const r=new Set(Object.keys(Cg)),a=e.flatMap((e=>{if(r.has(e))return[];const t=Do.getComponent(e);if(!t){const t=`${yg.getConstellationServiceUrl()}/v860/${yg.getAppAlias()}/component/${e}.js`;return r.add(e),[n(t,yg.getTypes.SCRIPT)]}const a=(t.scripts||[]).map((e=>n(e.startsWith("http")?e:`${s}${e}`,yg.getTypes.SCRIPT))),o=(t.styles||[]).map((e=>n(`${s}${e}`,yg.getTypes.STYLE)));return r.add(e),[...a,...o]}));return Promise.all(a.map((e=>e.catch((e=>console.error("Error loading asset:",e))))))},_g="component-state-lru-index";function Ng(e){return"object"==typeof e&&null!==e&&"key"in e&&"accessedAt"in e&&"string"==typeof e.key&&"number"==typeof e.accessedAt}function Tg(){try{const e=sessionStorage.getItem(_g);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Ng):[]}catch{return[]}}function Dg(e){try{sessionStorage.setItem(_g,JSON.stringify(e))}catch{}}function Pg(e){const t=Tg().filter((t=>t.key!==e));t.unshift({key:e,accessedAt:Date.now()}),Dg(t)}const Og=()=>"undefined"!=typeof sessionStorage?sessionStorage:null;const Rg=new class{#a;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#a=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t,n)=>{Og()?n?.managed&&"FULL_PORTAL"!==xA.getRenderingMode()||(Og()?.setItem(this.getNormalizedKey(e),JSON.stringify(t)),n?.managed&&(Pg(this.getNormalizedKey(e)),function(e){const t=Tg();if(t.length<=100)return[];const n=[],s=t.slice(0,100),r=t.slice(100);for(const t of r){try{e(t.key)}catch{}n.push(t.key)}Dg(s)}((e=>{Og()?.removeItem(e)})))):console.error("Session Storage not found")};getComponentState=(e,t)=>{if(t?.managed&&"FULL_PORTAL"!==xA.getRenderingMode())return;const n=Og()?.getItem(this.getNormalizedKey(e))??null,s=n?lS.isValidJson(n):void 0;return t?.managed&&null!=(s??n)&&Pg(this.getNormalizedKey(e)),s||n};removeComponentState=(e,t)=>{t?.managed&&"FULL_PORTAL"!==xA.getRenderingMode()||(Og()?.removeItem(this.getNormalizedKey(e)),t?.managed&&function(e){const t=Tg(),n=t.filter((t=>t.key!==e));n.length!==t.length&&Dg(n)}(this.getNormalizedKey(e)))};fetchUserSettings=async()=>{if(cg("getUserSettings")){const{restApi:e,reqType:t}=p_("getUserSettings");Kd(e,{method:t,headers:{}}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong while fetching getUserSettings");this.userSettings=e.data})).catch((e=>console.error(e)))}};init=()=>{xA.getUserSettings()?this.userSettings=xA.getUserSettings():this.fetchUserSettings()};getUserSettings=e=>{if(!e)throw new Error("path is required parameter");if("string"!=typeof e)throw new TypeError("path must be string");return lS.getIn(this.userSettings,e,{})};setUserSettings=async(e,t)=>{if(!e)return Promise.reject(new Error("path is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("path must be string"));if(null==t||""===t)return Promise.reject(new Error("value is required parameter"));let n;if(!cg("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=p_("updateUserSettings");const{restApi:s,reqType:r}=n;return Kd(s,{method:r,body:lS.setIn({},e,t)}).then((e=>{if(200!==e.status||!e.data)throw new Error("something went wrong");this.userSettings=e.data})).catch((e=>{console.error(e)}))};setComponentCache(e,t,n={}){if("string"!=typeof e||!e?.trim())return;const s=n.clearOnCancelForContext;if(s&&(Object.hasOwn(this.contextMapToClearOnCancel,s)?this.contextMapToClearOnCancel[s].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[s]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#a){this.#a=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};Ad.subscribe(Gs.PUB_SUB_EVENTS.EVENT_CANCEL,e,"RESET_COMPONENT_CACHE")}}getComponentCache(e){return"string"==typeof e&&e?.trim()?Object.hasOwn(this.componentCache,this.getNormalizedKey(e))?this.componentCache[this.getNormalizedKey(e)]:void 0:null}getURLParam(e,t){let n=new URL(globalThis.location.href).searchParams.get(e);return n?(n=t?atob(n):n,n):null}setURLParam(e,t,n){if(!xA.shouldUseURLParams())return;const s=new URL(globalThis.location.href);if(t=n?btoa(t):t,s.searchParams.get(e)===t)return;s.searchParams.set(e,t);globalThis.history.pushState({type:"ui-navigation"},"",s)}setURLParams(e){const t=new URL(globalThis.location.href);Object.entries(e).forEach((([e,n])=>{t.searchParams.set(e,n)}));globalThis.history.pushState({type:"update-history"},"",t)}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}};const bg=new class{constructor(){this.contextArray={},this.pauseDuration=2e3,this.waitingToPutUpIndicator=!1}getLoadingContext(e){let t=null;return e&&(({context:t}=e),t||(t=e.containerItemID),t||(t=e.contextName)),t}enableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.addToContextArray(n),this.waitingToPutUpIndicator||(this.waitingToPutUpIndicator=!0,this.pauseBeforeShowing(n).then((e=>{Cd.isOnline()&&t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&qC({type:dr,payload:{context:e}})}))))}pauseBeforeShowing=e=>new Promise((t=>{setTimeout((()=>t(e)),this.pauseDuration)}));disableLoadingIndicator(e,t=!0){const n=this.getLoadingContext(e);n&&(this.waitingToPutUpIndicator=!1,this.removeFromContextArray(n),t&&void 0!==this.contextArray[n]&&0===this.contextArray[n]&&qC({type:pr,payload:{context:n}}))}addToContextArray=e=>{void 0===this.contextArray[e]&&(this.contextArray[e]=0),this.contextArray[e]+=1};removeFromContextArray=e=>{void 0!==this.contextArray[e]&&this.contextArray[e]>0&&(this.contextArray[e]-=1)}};const vg=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions={}}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,s,r="unknown",a,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:r,promise:t,resolve:n,reject:s,actionPayload:a};return this.actionMgrActions[e]=i,o&&bg.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t="")=>{let n,s;""===t&&(t=this.getNextActionMgrId());const r=new Promise(((e,t)=>{n=e,s=t}));if(!n||!s)throw new Error("resolveFn or rejectFn is not defined.");return this.register(t,r,n,s,e),{actionMgrID:t,promise:r}};resolveActionByID(e,t,n=!0){const s=this.actionMgrActions[e];let r=e;return s?(setTimeout((()=>{s.resolve(t)}),0),bg.disableLoadingIndicator(s.actionPayload,n)):r=null,r}rejectActionByID(e,t=!0,n){const s=this.actionMgrActions[e];let r=e;return s?(s.reject(n),bg.disableLoadingIndicator(s.actionPayload,t)):r=null,r}setRemoteCaseHeaderByContext(e,t){t&&(e.headers=e.headers||{},e.headers.RemoteSystemID=t)}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=qs.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=Ws,e.gadgetId=t.gadgetId??ZI.getUniqueGadgetId(),e.name=t.name,e.isRemoteCase=!0,e.skipSemanticUrl=!0,ir}};class xg{static actionsTargetMap=new Map;static getTargetViewContainerName=e=>{if(e){const t=e.toLowerCase();let n="primary";return this.actionsTargetMap.has(t)&&(n=this.actionsTargetMap.get(t)),n}return""};static buildActionTargetMap=e=>{e&&Object.keys(e).forEach((t=>{const n=e[t];n&&n.actions&&n.actions.forEach((e=>{this.actionsTargetMap.set(e.toLowerCase(),t)}))}))}}const wg=xg,Mg=(e,t,n,s)=>bA.getResolvedSemanticURL(e,t,n,s),Lg={getResolvedSemanticURL:Mg,getActions:()=>({ACTION_OPENWORKBYHANDLE:Zr,ACTION_SHOWDATA:Qr,ACTION_SHOWVIEW:Kr,ACTION_GETOBJECT:ka,ACTION_SHOWINSIGHT:Jr,ACTION_SHOWDASHBOARD:Xr}),updateSemanticURLAndDocumentTitle:(e,t)=>bA.updateSemanticURLAndDocumentTitle(e,t),getSemanticURLForToaster:(e,t,n=!1,s)=>Mg(n?ka:Zr,{caseClassName:e},{[n?"objectID":"workID"]:t},s)},Ug={CASE_INFO:`${Gs.DATA}.${Gs.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${Gs.DATA}.${Gs.CASE_INFO.CASE_TYPE_ID}`,CASE_TYPE_NAME:`${Gs.DATA}.${Gs.CASE_INFO.CASE_TYPE_NAME}`,CASE_INFO_ID:`${Gs.DATA}.${Gs.CASE_INFO.CASE_INFO_ID}`,BUSINESS_ID:`${Gs.DATA}.${Gs.CASE_INFO.BUSINESS_ID}`},Fg=e=>lS.getIn(e,Gs.getProperty(Ug.CASE_CLASS_NAME),Gs.EMPTY_STRING),Vg=e=>lS.getIn(e,Gs.getProperty(Ug.CASE_INFO_ID),Gs.EMPTY_STRING),jg=(e,t)=>{const n=Vg(t);lS.setIn(e,"key",n)},kg=e=>lS.getIn(e,Gs.getProperty(Ug.CASE_INFO),{}),Bg=e=>{const t=HC();if(!e)return!1;const n=Ks(e),s=tA(n),r=tA(e);if(!s||!r)return!1;const a=Dy(s,n),o=Dy(r,e);if(!a||!o)return!1;const{key:i}=a;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.objectInfo?.ID),i&&c&&i===c},$g=e=>{const t=Vg(e),n=lS.getIn(e,Gs.getProperty(Ug.BUSINESS_ID),Gs.EMPTY_STRING),s=t.toLowerCase().includes(n.toLowerCase())?n:t,r=Fg(e),a=(o=e,lS.getIn(o,Gs.getProperty(Ug.CASE_TYPE_NAME),Gs.EMPTY_STRING));var o;return{businessID:n,caseType:r,resolvedURL:Lg.getSemanticURLForToaster(r,s,ZI.isObjectCaseType(r)),caseTypeName:a}};const Gg=class{constructor(e){this.c11nEnv=e}validate(e,t){const{value:n}=this.c11nEnv.getStateProps();if(!t&&!(t=n)){const e=this.c11nEnv.getComponentConfig(),n=this.c11nEnv.getStateProps();t="multi"===e.selectionMode?n.selectionList:"Editable"===e.renderMode?n.referenceList:"single"===e.selectionMode?n.selectionKey:n.value}const s=zI(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:r}=Zp.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,s);return r?{status:!1,message:r}:{status:!0}}validateEmail(e,t={}){const n=Zp.getValidator("email");if(!n)return{status:"success"};const s=n(e,t);return s?{status:"failure",message:s}:{status:"success"}}},Wg="OPEN_PROCESS_ACTION",Hg="OPEN_ASSIGNMENT",qg="DELETE_CASE_IN_CREATE_STAGE",zg="SAVE_AND_CLOSE",Yg=e=>({type:zg,payload:e}),Kg="DELETE_WORK",Qg=e=>({type:Kg,payload:e});const Jg=class{static getSavableDataPage(e){return wC(e)}static getLookUpDataPage(e){return LC(e)}static getLookUpDataPageInfo(e){return UC(e)}static getDataPageKeys(e){return MC(e)}};const Xg=class{static getPropertyName(e){return Ro.getPropertyName(e)}static isProperty(e){return Ro.isProperty(e)}static getLeafPropertyName(e){return Ro.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};class Zg{static createContainerPConnect(e,t,n,s=!1){const{accessedOrder:r,items:a}=e;if(r&&a){const e=r[r.length-1];if(a[e]?.view&&Object.keys(a[e].view).length>0){const r=a[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=r,{viewName:l,viewContext:u}=this.processRootViewDetails(i,r,t);if(!l)return null;return Dm({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:s||n===Cy.WORKAREA||n===Cy.MODAL||l===Gs.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:s,name:r}={}}=e,{context:a}=t;let o=r,i=s;const c=Xg.isProperty(r),l=Xg.isProperty(s);if(l){const e=Xg.getPropertyName(s);i=QC(`.${e}`,e.startsWith(".")?n:"",a)}if(i||(i=n),c){const e=Xg.getPropertyName(r);o=QC(`.${e}`,i,a)}return c&&l&&""!==o&&(o=r,i=s),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let s,r;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=Fy(e),a=Dy(e,t);a&&({key:s,flowName:r}=a)}t.addContainerItem({semanticURL:"",key:s,flowName:r,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}static hasContainerItems=e=>{const t=e.getContextName(),n=e.getContainerName();return PCore.getContainerUtils().hasContainerItems(`${t}/${n}`)};static hasGetNextWorkLinks=e=>e.getValue(Gs.CASE_INFO.GETNEXTWORK);static getActiveCaseActionName=e=>{const t=e.getValue(Gs.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(Gs.CASE_INFO.ACTIVE_ACTION_ID),s=t.find((e=>e.ID===n));return s?.name||""};static getFirstCaseActionName=e=>{const t=e.getValue(Gs.CASE_INFO.CASE_INFO_ACTIONS);return t[0]?.name||""};static hasNotificationMessages=e=>!!e.getValue("caseMessages");static isCaseWideLocalAction=e=>{const t=e.getValue(Gs.CASE_INFO.ACTIVE_ACTION_ID),n=e.getValue(Gs.CASE_INFO.CASE_INFO_ACTIONS);if(n&&t){const e=n.find((e=>e.ID===t));return"Case"===e?.type}return!1};static getChildCaseAssignments=e=>{const t=e.getValue(Gs.CASE_INFO.CHILD_ASSIGNMENTS);let n=[];return t&&t.length>0&&t.forEach((({assignments:e=[],Name:t,caseTypeID:s})=>{const r=e.map((e=>({...e,caseName:t,caseTypeID:s})));n=n.concat(r)})),n};static hasAssignments=e=>{const t=e.getValue(Gs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),n=Zg.getChildCaseAssignments(e);return!!(Array.isArray(n)&&n.length>0||Array.isArray(t)&&t.length>0||Zg.isCaseWideLocalAction(e))};static showBanner=e=>{const t=e();return Zg.hasNotificationMessages(t)||!Zg.hasAssignments(t)};static showTodo=e=>"perform"!==e.getValue("context_data.caseViewMode");static isRenderWithToDoWrapper=(e,t)=>{const n=e(),{showWithToDo:s}=t;return s&&(!Zg.isCaseWideLocalAction(n)||Zg.showTodo(n))};static getToDoAssignments=e=>{const t=e.getValue(Gs.CASE_INFO.CASE_INFO_ACTIONS),n=e.getValue(Gs.CASE_INFO.ASSIGNMENT_LABEL),s=e.getValue(Gs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],r=Zg.getChildCaseAssignments(e)||[];let a=JSON.parse(JSON.stringify(r));a=a.map((e=>(e.isChild=!0,e)));const o=[...s,...a];let i=JSON.parse(JSON.stringify(o));return t&&!Zg.showTodo(e)&&(i=i.map((t=>(t.name=Zg.getActiveCaseActionName(e)||t?.name||n,t)))),i}}const eh=Zg;const th=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=vg.getNextActionMgrId();let n,s;const r=new Promise(((e,t)=>{n=e,s=t}));if(!n||!s)throw new Error("resolveFn or rejectFn is not defined.");return vg.register(t,r,n,s,e),{actionMgrID:t,promise:r}};initializeContainers(e){const t=vr,n=this.c11nEnv,s={context:n.getContextName(),name:n.getContainerName(),type:Gs.CONTAINER_TYPE.SINGLE},{actionMgrID:r,promise:a}=this.containerManagerPromise(t),o={...s,...e,actionMgrID:r};return qC(DS(o)),a}addContainerItem(e){const t=wr,n=this.c11nEnv,s=n.getMetadata(),{children:r}=s||{};let a;Array.isArray(r)&&r.length>0&&([a]=r);const o=n.getContextName(),i=n.getContainerName(),c=Qs(i,o,e?.containerType===Gs.CONTAINER_TYPE.SINGLE),l=Wa(i,o),u={root:{...a,config:{...a?.config,context:a?.config?.context||n.getPageReference?.()}},containerItemID:c,context:c,target:l,containerName:i};e=JSON.parse(JSON.stringify(e)),[Gs.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),g={...u,...e,actionMgrID:d};return qC(OS(g)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=Gr,n={context:ky(e.containerItemID),target:tA(e.containerItemID)},{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return qC(MS(a)),r}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=$r,n={target:tA(e.containerItemID)},{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return qC(VS(a)),r}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Mr,n={context:ky(e.containerItemID),target:tA(e.containerItemID)},{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return qC(kS(a)),r}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=xr,n=Xy(e),{actionMgrID:s,promise:r}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:s};return qC(PS(a)),r}addTransientItem(e){const{id:t,data:n,sourceContainerItemId:s}=e,r=this.c11nEnv.getContextName(),a=Xs(t,r),o=oA(r);if(a&&o.includes(a))return a;let i=n;if(s){const e=zC(s);if(!e)throw new Error(`addTransientItem: source container item "${s}" not found in store`);i=lS.deepClone(e)}return qC(RS({transientItemID:a,contextName:r,target:tA(r),data:i})),a}updateTransientData(e){const{transientItemID:t,data:n}=e,s=this.c11nEnv.getContextName();if(t){if(!oA(s).includes(t))return;qC(bS({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:s,transientItemID:r}=e;if(r&&s){if(!oA(t).includes(r))return;qC($S({target:n,containerItemID:s,transientItemID:r}))}}createContainerPConnect(e,t,n,s=!1){eh.createContainerPConnect(e,t,n,s)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Yy(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Ly(e,t)}};function nh(e,t){return xu((function(n,s){var r=null,a=0,o=!1,i=function(){return o&&!r&&s.complete()};n.subscribe(wu(s,(function(n){null==r||r.unsubscribe();var o=0,c=a++;Ru(e(n,c)).subscribe(r=wu(s,(function(e){return s.next(t?t(n,e,c,o++):e)}),(function(){r=null,i()})))}),(function(){o=!0,i()})))}))}function sh(e,t){return xu((function(n,s){var r=0;n.subscribe(wu(s,(function(n){s.next(e.call(t,n,r++))})))}))}function rh(e,t,n){return void 0===n&&(n=1/0),zl(t)?rh((function(n,s){return sh((function(e,r){return t(n,e,s,r)}))(Ru(e(n,s)))}),n):("number"==typeof t&&(n=t),xu((function(t,s){return function(e,t,n,s,r,a,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},g=function(e){return l<s?h(e):c.push(e)},h=function(e){a&&t.next(e),l++;var i=!1;Ru(n(e,u++)).subscribe(wu(t,(function(e){null==r||r(e),a?g(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?vu(t,o,(function(){return h(e)})):h(e)};c.length&&l<s;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(wu(t,g,(function(){d=!0,p()}))),function(){null==i||i()}}(t,s,e,n)})))}function ah(e){return e&&zl(e.schedule)}function oh(e){return e[e.length-1]}function ih(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return ah(oh(e))?e.pop():void 0}(e);return ju(e,n)}var ch=Ml((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),lh=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return Fl(t,e),t.prototype.lift=function(e){var t=new uh(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new ch},t.prototype.next=function(e){var t=this;cu((function(){var n,s;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var r=kl(t.currentObservers),a=r.next();!a.done;a=r.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(s=r.return)&&s.call(r)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;cu((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;cu((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,s=n.hasError,r=n.isStopped,a=n.observers;return s||r?Xl:(this.currentObservers=null,a.push(e),new Jl((function(){t.currentObservers=null,Ql(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,s=t.thrownError,r=t.isStopped;n?e.error(s):r&&e.complete()},t.prototype.asObservable=function(){var e=new Au;return e.source=this,e},t.create=function(e,t){return new uh(e,t)},t}(Au),uh=function(e){function t(t,n){var s=e.call(this)||this;return s.destination=t,s.source=n,s}return Fl(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:Xl},t}(lh),dh=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return Fl(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,s=e._value;if(t)throw n;return this._throwIfClosed(),s},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(lh);function ph(e,t){return xu((function(n,s){var r=0;n.subscribe(wu(s,(function(n){return e.call(t,n,r++)&&s.next(n)})))}))}class gh extends dh{constructor(e,t){super(t)}}const hh=(...e)=>ph((t=>e.includes(t.type)));var fh=new Au((function(e){return e.complete()}));function mh(e){return e?function(e){return new Au((function(t){return e.schedule((function(){return t.complete()}))}))}(e):fh}const Ih=(e,t,n)=>ku((s=>("ERR_CANCELED"!==s?.code&&console.error(e,s),ih(YS(e,s,t,null,n))))),Eh=(e,t)=>n=>new Au((s=>{let r={},a=0;return n.pipe(rh((n=>{const s=Date.now();let o;return o=t||sn,o&&o(n,r)&&s-a<e?mh():(r=n,a=s,ih(n))}))).subscribe(s)})),yh=e=>{const{dataPageID:t,context:n,headers:s,containerItemID:r}=e,a={data_view_ID:t},{restApi:o,reqType:i}=p_("createDataObject",a),{content:c}=lI(r);return ju(Kd(o,{method:i,headers:s,body:{data:c.content,pageInstructions:c?.pageInstructions}},r)).pipe(sh((t=>({response:t.data,actionInPayload:e}))),Ih("Error occurred during ajax call at createDataObject Epic",n))},Ah=e=>{const{dataLookUp:t,context:n,headers:s,viewName:r,requestPayload:a}=e,o={data_view_ID:t,view_ID:r},{restApi:i,reqType:c}=p_("readDataObject",o);return ju(Kd(i,{method:c,headers:s,body:{dataViewParameters:a}},n)).pipe(sh((t=>({response:t.data,headers:cI(t.headers),actionInPayload:e}))),Ih("Error occurred during ajax call at getDataObjectView Epic",n))},Ch=e=>{const{dataPageID:t,context:n,headers:s,containerItemID:r,key:a}=e,o={data_view_ID:t},{restApi:i,reqType:c}=p_("updateDataObject",o),{content:l}=lI(r);return ju(Kd(i,{method:c,headers:{...s,"if-match":e?.etag},body:{data:{...l.content,...a},pageInstructions:l.pageInstructions||[]}},r)).pipe(sh((t=>({response:t.data,actionInPayload:e}))),Ih("Error occurred during ajax call at updateDataObject Epic",n))},Sh=e=>{const{lookupDatapage:t,context:n,headers:s,actionID:r,dataViewParameters:a}=e,o={data_view_ID:t,action_ID:r},{restApi:i,reqType:c}=p_("openDataObjectAction",o);return ju(Kd(i,{method:c,headers:s,body:{dataViewParameters:a}},n)).pipe(sh((t=>({response:t.data,headers:cI(t.headers),actionInPayload:e}))),Ih("Error occurred during ajax call at getDataObjectView Epic",n))},_h=e=>{const{savableDatapage:t,context:n,headers:s,actionID:r,keys:a,containerItemID:o,jsActionQueryParams:i}=e,c={data_view_ID:t,action_ID:r};let{restApi:l}=p_("submitDataObjectAction",c);const{reqType:u}=p_("submitDataObjectAction",c),{content:d}=lI(o);return l=dE(i,l),ju(Kd(l,{method:u,headers:{...s,"if-match":e?.etag},body:{data:{...d?.content,...a},pageInstructions:d?.pageInstructions||[]}},n)).pipe(sh((t=>({response:t.data,actionInPayload:e}))),Ih("Error occurred during ajax call at getDataObjectView Epic",n))};const Nh=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,s,r){const a={viewName:e,pageReference:n,contextName:s,isInProgress:!0,active:!0,caseKey:t};this.components[s]=this.components[s]||{},this.components[s][r]=a}stop(e,t){this._checkComponent(e,t)&&(this.components[t][e].isInProgress=!1)}remove(e,t){this._checkComponent(e,t)&&delete this.components[t][e]}removeContext(e){delete this.components[e]}enableCascade(e){this.components[e]&&Object.values(this.components[e]).forEach((e=>{e.isInProgress&&(e.cascade=!0)}))}activate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!0)}deactivate(e,t){this._checkComponent(e,t)&&(this.components[t][e].active=!1)}refreshActiveComponents(e){e&&this.components[e]&&Object.keys(this.components[e]).forEach((t=>{this.refreshComponent(t,e)}))}refreshComponent(e,t){if(!this._checkComponent(e,t))return;const n=this.components[t][e];if(n.active&&n.cascade){const{caseKey:e,viewName:s,pageReference:r}=n;mE(e,s,t,r,{})}}},Th="postDataViewMetadata",Dh={getData:(e,t,n,s)=>((e,t,n,s={})=>{const r={dataViewName:e},{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=s,{restApi:c,reqType:l}=p_("getListData",r);return Kd(c,{method:l,body:t,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},n,i)})(e,t,n,s),getListCount:(e,t,n)=>{const s={dataViewName:e},{restApi:r,reqType:a}=p_("getListDataCount",s);return Kd(r,{method:a,body:t},n)},getDataViewMetadata:(e,t,n,s)=>{const r=!!n,a=!!s,o=bA.doesRestApiExist(Th),i=(r||a)&&o?Th:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:u}=p_(i,c);if(o){if(r)return Kd(l,{method:u,body:{associationFilter:n}},t);if(a)return Kd(l,{method:u,body:{propertyFilter:s}},t)}return Kd(l,{method:u},t)},getDataObjectView:(e,t,n,s,r={})=>{const{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=r,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=p_("readDataObject",c);return Kd(u,{method:d,body:l,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},s,i)},getCaseEditMetadata:(e,t)=>ZI.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>ZI.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,s)=>ZI.updateCaseEditFieldsData(e,t,n,s),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:s,context:r,listClass:a,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=p_("moveListRecords",c);return Kd(l,{method:u,body:{content:{sourceID:n,destinationID:s,context:r,listClass:a}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===Gs.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===Gs.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Gy("root").find((e=>e.includes("authoring-preview")))?`${Gs.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${yg.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=xA.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}},Ph=/{(.*?)}/i,Oh=/{(.*?)}/g,Rh=e=>null!==e.match(Ph),bh=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),vh=e=>{const t=e[e.length-1],n=e[e.length-2];if("y"!==t.toLowerCase())return`${e}s`;switch(n.toLowerCase()){case"a":case"e":case"i":case"o":case"u":return`${e}s`;default:return`${e=e.substring(0,e.length-1)}ies`}},xh=e=>e.replaceAll("+","%20"),wh=["portal","noPortal","debug","activeTab","contextParam","lang"],Mh=e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),s=new URLSearchParams(n),r=new Map;for(const[e,t]of s)wh.includes(e)||r.set(e,t);const a=xh(new URLSearchParams(Array.from(r.entries())).toString());return a?`${t}?${a}`:t}return e},Lh=(e,t)=>e.includes("/assignments")?((e,t)=>{const n=e.split("/"),s=n.indexOf("assignments"),r=n.slice(s-2).join("/"),a=n[n.length-1],o=d_(ea,{assignmentID:a});return{routeEndpoint:o?.restApi,requestType:o?.reqType,payload:{assignmentID:a},options:t,routeKey:da,urlPath:r}})(e,t):bA.getEndPointInfo(e),Uh=()=>{const e=xA.environmentInfoObject?.pyExecutionRuntimeName;return"Infinity"===e};const Fh=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const Vh=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,s=this.users[n];s&&(s.state=t,Object.keys(s.subscribers).forEach((e=>{s.subscribers[e]?.callback({state:s.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const s=this._getAutoGenId(),r=this.users[e];if(r)return r.subscribers[s]={callback:t,contextName:n},s;this.users[e]={subscribers:{[s]:{callback:t,contextName:n}}};const a={matcher:"PRESENCE",criteria:{userId:e}};return lf.subscribe(a,this._handleUserPresence.bind(this)),s}unsubscribe(e,t){const n={matcher:"PRESENCE",unsubscribeUsers:{users:[e]}};this.users[e]&&this.users[e].subscribers&&(delete this.users[e].subscribers[t],0===Object.keys(this.users[e].subscribers).length&&(delete this.users[e],lf.publishMessage(n)))}getUserState(e){return this.users[e]&&this.users[e].state}clearContext(e){Object.keys(this.users).forEach((t=>{Object.keys(this.users[t].subscribers).forEach((n=>{this.users[t].subscribers[n].contextName===e&&this.unsubscribe(t,n)}))}))}};const jh=function(e,t,n,s){for(var r=e.length,a=n+(s?1:-1);s?a--:++a<r;)if(t(e[a],a,e))return a;return-1};const kh=function(e){return e!=e};const Bh=function(e,t,n){for(var s=n-1,r=e.length;++s<r;)if(e[s]===t)return s;return-1};const $h=function(e,t,n){return t==t?Bh(e,t,n):jh(e,kh,n)};const Gh=function(e,t){return!!(null==e?0:e.length)&&$h(e,t,0)>-1};const Wh=function(e,t,n){for(var s=-1,r=null==e?0:e.length;++s<r;)if(n(t,e[s]))return!0;return!1};const Hh=function(e,t,n,s){var r=-1,a=Gh,o=!0,i=e.length,c=[],l=t.length;if(!i)return c;n&&(t=Tn(t,ft(n))),s?(a=Wh,o=!1):t.length>=200&&(a=Ue,o=!1,t=new Me(t));e:for(;++r<i;){var u=e[r],d=null==n?u:n(u);if(u=s||0!==u?u:0,o&&d==d){for(var p=l;p--;)if(t[p]===d)continue e;c.push(u)}else a(t,d,s)||c.push(u)}return c};var qh=L?L.isConcatSpreadable:void 0;const zh=function(e){return He(e)||rt(e)||!!(qh&&e&&e[qh])};const Yh=function e(t,n,s,r,a){var o=-1,i=t.length;for(s||(s=zh),a||(a=[]);++o<i;){var c=t[o];n>0&&s(c)?n>1?e(c,n-1,s,r,a):We(a,c):r||(a[a.length]=c)}return a};const Kh=Ms((function(e,t){return us(e)?Hh(e,Yh(t,1,us,!0)):[]}));const Qh=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=0,this.connected=!1,this.matcher=e,this.criteria=t,this.messagingServiceSubscriptionID=""}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t];if(!n)return;const s=Object.keys(n.criteria),r=Object.keys(e);0===Kh(s,r).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){const n=this._getAutoGenId();if(!this.messagingServiceSubscriptionID){this.messagingServiceSubscriptionID=n;const e={matcher:this.matcher,criteria:this.criteria},t=lf.subscribe(e,this._handleAtomicMessage.bind(this),void 0,n);this.messagingServiceSubscriptionID=t||n,this.connected=!0}return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e],0===Object.keys(this.atomicSubscribers).length&&(this.connected=!1,this.messagingServiceSubscriptionID&&(lf.unsubscribe(this.messagingServiceSubscriptionID),this.messagingServiceSubscriptionID=""))}};const Jh=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new Qh("CASE",t)}return this.subscriptions[e]}};const Xh=class{static transformReference(e){return e.replace(/^[^.]*\./,"caseInfo.content.")}static extractReferenceParts(e){const t=e.split("."),n=t.pop()||"";return{pageReference:t.join("."),propertyName:n}}static getContextPath(e){return e.includes("workarea")?e:By(`${e}/workarea`)||""}static publishCaseValuesUpdate(e,t){const n=this.getContextPath(t.actionInContext);Object.entries(e.message).forEach((([e,t])=>{const s=this.transformReference(e),{pageReference:r,propertyName:a}=this.extractReferenceParts(s);e.match(/\.\w+\[\d+\]\.\w+/)&&UI.executeStateMachine(n,s,t,!0,{skipStateUpdate:!0});qC([{type:sr,payload:{reference:s,value:t,context:n}},{type:ar,payload:{reference:s,value:t,context:n,pageReference:r,propertyName:a}}])}))}},{RESOURCE_TYPES:Zh}=$s;const ef=class{static openCase(e,t,n,s={}){const r={insKey:e,acTargetName:n,actionMgrID:vg.getNextActionMgrId(),context:t,...s},a=Ir;s&&s.channelName?r.headers={[Gs.X_ORIGIN_CHANNEL]:s.channelName}:xA.isWSSPortal()&&(r.headers={[Gs.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=vg.actionManagerPromise(a,r.actionMgrID);return qC({type:a,payload:r}),o}static openAssignment(e,t,n,s={}){const r={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:vg.getNextActionMgrId(),context:t,...s},a=Sr;s&&s.channelName?r.headers={[Gs.X_ORIGIN_CHANNEL]:s.channelName}:xA.isWSSPortal()&&(r.headers={[Gs.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=vg.actionManagerPromise(a,r.actionMgrID);return qC({type:a,payload:{...r}}),o}static createCase(e,t,n,s={}){const r=mr,a={class:e,acTargetName:n,actionMgrID:vg.getNextActionMgrId(),context:t,...s};s&&s.channelName?a.headers={[Gs.X_ORIGIN_CHANNEL]:s.channelName}:xA.isWSSPortal()&&(a.headers={[Gs.X_ORIGIN_CHANNEL]:"WSS"});const{promise:o}=vg.actionManagerPromise(r,a.actionMgrID);return qC({type:r,payload:{...a}}),o}static getNextWork(e,t,n={}){const s=Sr,r={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:vg.getNextActionMgrId(),context:e,...n},{promise:a}=vg.actionManagerPromise(s,r.actionMgrID);return qC({type:s,payload:{...r}}),a}static getOpenedCaseItems(e){const t=[],n=Ny(e);if(n){const{items:s={}}=n,r=Object.keys(s),a=Fy(e);r.forEach((n=>{if(s[n]&&(s[n].resourceType===Zh.CASE||s[n].resourceType===Zh.ASSIGNMENT||s[n].resourceType===Zh.OBJECT)){const{key:r="",context:o}=s[n],i=s[n],c=r.substring(r.indexOf(" ")+1),l=QC(".caseTypeID",Gs.CASE_INFO.CASE_INFO,o),u=a===n;t.push({...i,key:r,workID:r,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=(e,t)=>{if(!e)return Promise.reject(new Error("Case ID is required"));const n={caseID:e},{restApi:s,reqType:r}=p_(Zr,n),a={},o=qs.getRemoteHeaderFromSourceClass(t??"");return o&&(a.RemoteSystemID=o),Kd(s,{method:r,headers:a})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=p_("getBulkActions"),s=e.map((e=>({ID:e}))),r=s.length,a=r/5,o={},i=[];for(let e=0;e<r;e+=a)o.cases=s.slice(e,e+a),o.cases.length&&i.push(Kd(t,{method:n,body:o}));const c=await Promise.all(i);let l=[];for(let e=0;e<c.length;e+=1)0===e?l=c[e].data.availableActions:l.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID)))));return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:s}=p_("getCaseBulkActions",t),r=await Kd(n,{method:s});let a=[];return r.data?.availableActions?.length&&(a=r.data.availableActions),a};static getAssignmentBulkActions=async e=>{const{restApi:t,reqType:n}=p_("getAssignmentBulkActions"),s={assignments:e.map((e=>({ID:e})))},r=await Kd(t,{method:n,body:s});return r.data?.availableActions??[]}};class tf{static CLOSE_CONTAINER_ITEM_EVENT=$s.PUB_SUB_EVENTS.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM;static objectRedirectionSubIds={};static truncateNamespace(e){let t=e;return!ks.isNamespaceEnabled()&&e&&e.includes("__")&&(t=e.substring(e.indexOf("__")+2)),t}static handleOpenObject(e){const{ObjectID:t}=e;let n;({ActionName:n}=e),n=this.truncateNamespace(n);const s=Rg.getComponentCache("lastActionID")||"";if("string"==typeof s&&s?.toLowerCase()!==n?.toLowerCase())return;let r=!1;const a=Fy("app/modal");a&&(r=Dy("app/modal",a)?.isMinimizable??!1),!a||r?ef.openCase(t,Gs.APP.APP,Gs.PRIMARY,{isAutoRedirection:!0}):Ad.subscribe(this.CLOSE_CONTAINER_ITEM_EVENT,(e=>{e?.containerItemID===a&&(Ad.unsubscribe(this.CLOSE_CONTAINER_ITEM_EVENT,"closeContainerItemForRedirection"),ef.openCase(t,Gs.APP.APP,Gs.PRIMARY,{isAutoRedirection:!0}))}),"closeContainerItemForRedirection",!0)}static handleRefreshObject(e){ef.openCase(e,Gs.APP.APP,Gs.PRIMARY,{forceRefresh:!0})}static handleObjectRedirection(e,t){const{message:n,filter:s}=e,{caseId:r,currUserID:a}=t;if(s?.criteria?.CurrentObjectID!==r||s?.criteria?.UserID?.toLowerCase()!==a?.toLowerCase())return;const{RedirectionType:o}=n||{};switch(o){case"OpenObject":this.handleOpenObject(n);break;case"RefreshObject":this.handleRefreshObject(r)}}static subscribeToRedirection(e){const t=xA.getOperatorIdentifier()||"",n={matcher:"REDIRECTION",criteria:{CurrentObjectID:e,UserID:t?.toLowerCase()}},s=lf.subscribe(n,(n=>{this.handleObjectRedirection(n,{caseId:e,currUserID:t})}));this.objectRedirectionSubIds[e]=s}static unsubscribeToRedirection(e){lf.unsubscribe(this.objectRedirectionSubIds[e]),delete this.objectRedirectionSubIds[e]}static subscribeToEvent(e,t){let n=null;if(e===Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD?n=e=>{const{caseId:t}=e;this.objectRedirectionSubIds[t]||this.subscribeToRedirection(t)}:e===Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD&&(n=e=>{const{caseId:t}=e;this.objectRedirectionSubIds[t]&&this.unsubscribeToRedirection(t)}),!n)throw new Error(`Unhandled eventKey: ${e}`);Ad.subscribe(e,n,t)}static unsubscribeToEvent(e,t){Ad.unsubscribe(e,t)}static subscribeToCaseEvents(){this.subscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.subscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}static unsubscribeToCaseEvents(){this.unsubscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_open_for_redirection"),this.unsubscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_close_for_redirection")}}const nf=tf,sf=e=>{if("number"==typeof e)return Number.isFinite(e)?e:void 0;if("string"==typeof e&&""!==e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}},rf=()=>{const e=xA.getFeatureMap()?.pyMessageSequencingDelayInMS;if("number"!=typeof e&&"string"!=typeof e)return 100;const t=Number(e);return Number.isFinite(t)&&t>0&&t<=3e3?t:100};class af{streams=new Map;arrivalCounter=0;enqueue(e,t,n){const{sequenceStreamId:s}=e,r={sequenceNumber:sf(e.sequenceNumber),timestamp:sf(e.timestamp),arrival:this.arrivalCounter,data:t};this.arrivalCounter+=1;const a=this.streams.get(s);if(a)return a.entries.push(r),void(a.entries.length>=20&&(console.warn(`SequencingBuffer: stream "${s}" reached 20 held messages; delivering now, later messages may arrive out of order`),this.flushStream(s)));this.streams.set(s,{entries:[r],dispatch:n,timer:setTimeout((()=>this.flushStream(s)),rf())})}flushAll(){Array.from(this.streams.keys()).forEach((e=>this.flushStream(e)))}flushStream(e){const t=this.streams.get(e);t&&(clearTimeout(t.timer),this.streams.delete(e),af.sortEntries(e,t.entries),t.entries.forEach((n=>{try{t.dispatch(n.data)}catch(t){console.error(`SequencingBuffer: delivering a message of stream "${e}" failed`,t)}})))}static sortEntries(e,t){t.every((e=>void 0!==e.sequenceNumber))?t.sort(af.compareBySequenceNumber):t.every((e=>void 0!==e.timestamp))?t.sort(af.compareByTimestamp):console.warn(`SequencingBuffer: stream "${e}" delivered in receiving order because ${af.describeViolation(t)}`)}static describeViolation(e){return e.some((e=>void 0===e.sequenceNumber&&void 0===e.timestamp))?"a message has no ordering key":"messages mix sequenceNumber-only and timestamp-only ordering keys"}static compareBySequenceNumber(e,t){return e.sequenceNumber!==t.sequenceNumber?(e.sequenceNumber??0)-(t.sequenceNumber??0):e.timestamp!==t.timestamp?void 0===e.timestamp?1:void 0===t.timestamp?-1:e.timestamp-t.timestamp:e.arrival-t.arrival}static compareByTimestamp(e,t){return e.timestamp!==t.timestamp?(e.timestamp??0)-(t.timestamp??0):e.arrival-t.arrival}}const of=new af;class cf{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new Vh;static refreshB2SOffset=10;static agentSubscribeIdMap=new Map;static filterKeyToSubscriberIdMap=new Map;static get offlineEnabled(){return"undefined"!=typeof navigator&&(navigator.userAgent||"").includes("pxUsesOffline")}static isAuthenticated=!1;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=yg.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(of.flushAll(),this.webSocket.close(),this.cleanSocketListeners());const s=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${s}`);this.webSocket=e,this.boundHandleOnOpen=this.handleOnOpen.bind(this),this.boundHandleOnMessage=this.handleOnMessage.bind(this),this.boundHandleOnError=this.handleOnError.bind(this),this.boundHandleOnClose=this.handleOnClose.bind(this),e.addEventListener("open",this.boundHandleOnOpen),e.addEventListener("message",this.boundHandleOnMessage),e.addEventListener("error",this.boundHandleOnError),e.addEventListener("close",this.boundHandleOnClose)}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0,this.isAuthenticated=!1),console.error("web socket error - readyState:",this.webSocket?.readyState,"| isTrusted:",e?.isTrusted)}static handleOnClose(e){of.flushAll(),null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),this.isAuthenticated=!1,console.debug("web socket closed - code:",e?.code,"| wasClean:",e?.wasClean),e&&4001===e.code||this.connectionConfig?.disableReInit||this.reInitInterval||this.getTokenExpiryTime()<=0||this.reInitialization()}static handleOnOpen(){if(clearInterval(this.reInitInterval),this.reInitInterval=void 0,null!==this.webSocket&&1===this.webSocket.readyState){const e=yg.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static unsubscribeAgentMessageCaseValues(e){if(e.assignmentID){const t=cf.agentSubscribeIdMap.get(e.assignmentID);cf.unsubscribe(t??""),cf.agentSubscribeIdMap.delete(e.assignmentID)}}static subscribeAgentMessageCaseValues(e){const t={matcher:"COACH_UPDATE",criteria:{caseId:e.caseKey,assignmentId:e.assignmentID}},n=cf.subscribe(t,(t=>{Xh.publishCaseValuesUpdate(t,e)}));cf.agentSubscribeIdMap.set(e.assignmentID,n)}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(Gs.PRIORITY.PING),this.isServiceAlive=!0;else{let t=null;try{t=JSON.parse(e.data)}catch(t){console.error("Invalid data received from messaging service",e.data)}if(t&&t.msgId&&this.webSocket?.send(`{"ack":"${t.msgId}"}`),(e=>!!e?.filter)(t))"string"==typeof t.sequencing?.sequenceStreamId&&""!==t.sequencing.sequenceStreamId?of.enqueue(t.sequencing,t,(e=>this.dispatchMessage(e,!0))):(t.sequencing&&console.warn("Message has a sequencing block without a usable sequenceStreamId; delivering it without ordering"),this.dispatchMessage(t));else if(t?.tokenExpiryTime){Ad.subscribe(Gs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,cf.subscribeAgentMessageCaseValues),Ad.subscribe(Gs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,cf.unsubscribeAgentMessageCaseValues),this.isAuthenticated=!0,this.setTokenExpiryTime({tokenExpiryTime:t.tokenExpiryTime});const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e),this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{this.subscribeToSocket(e,t)})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[]}else console.error("filter missing from received data from messaging service",e.data)}}static dispatchMessage(e,t=!1){const{matcher:n,criteria:s}=e.filter;delete s.environmentID,s.productionLevel&&delete s.productionLevel,this.dispatchToSubscribers(n,s,e,t)}static dispatchToSubscribers(e,t,n,s=!1){Object.keys(this.subscribers).forEach((r=>{const a=this.subscribers[r];if(a?.filter&&a.filter.matcher===e&&lS.isEqual(a.filter.criteria,t)){if(!s)return void a.messageHandler(n);try{a.messageHandler(n)}catch(e){console.error(`Subscriber "${r}" failed while handling a sequenced message`,e)}}}))}static reInitialization(e){this.reInitInterval||(Object.keys(this.subscribers).forEach((e=>{this.unsubscribe(e,!0)})),Object.keys(this.subscribers).forEach((e=>{this.inProgressSubscriptions.push({messageSubscriber:this.subscribers[e],id:e})})),e?this.initConnection(this.connectionConfig):this.reInitInterval=setInterval((()=>{this.initConnection(this.connectionConfig)}),5500))}static checkLiveliness(e){!1===this.isServiceAlive?this.reInitialization(!0):this.isServiceAlive=!1,null!==this.serviceAliveHandler&&clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=setTimeout((()=>{this.checkLiveliness(e)}),e)}static setConnectionConfig(e){this.connectionConfig=e}static cleanSocketListeners(){null!==this.webSocket&&(this.webSocket.removeEventListener("open",this.boundHandleOnOpen),this.webSocket.removeEventListener("message",this.boundHandleOnMessage),this.webSocket.removeEventListener("error",this.boundHandleOnError),this.webSocket.removeEventListener("close",this.boundHandleOnClose))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),of.flushAll(),this.webSocket.close(),this.webSocket=null)}static getFilterKey(e){return`${e.matcher}:${JSON.stringify(e.criteria)}`}static findExistingSubscriberId(e){return this.filterKeyToSubscriberIdMap.get(this.getFilterKey(e))}static subscribe(e,t,n,s){this.connectionsCount+=1;const r=s||`${Date.now()}_${this.connectionsCount}`;if("COACH_UPDATE"===e.matcher){const t=this.findExistingSubscriberId(e);if(t)return t}const a=new Fh(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState&&this.isAuthenticated?(this.subscribeToSocket(a,r),r):(this.inProgressSubscriptions.push({messageSubscriber:a,id:r}),e&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e),r),this.offlineEnabled&&(this.subscribers[r]=a),null===this.webSocket&&this.initConnection(this.connectionConfig),r)}static subscribeToSocket(e,t){this.subscribers[t]=e,e.filter&&this.filterKeyToSubscriberIdMap.set(this.getFilterKey(e.filter),t);if(Object.keys(this.subscribers).filter((t=>this.subscribers[t]===e)).length>1)return;const n={filter:e.filter,subscribe:{id:t}};this.webSocket?.send(JSON.stringify(n))}static unsubscribe(e,t){if(this.subscribers[e]){if(!t){const t=this.subscribers[e].filter;t&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(t)),delete this.subscribers[e]}const n={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(n))}this.offlineEnabled&&!t&&this.removeFromInProgressSubscriptions(e)}static removeFromInProgressSubscriptions(e){const t=this.inProgressSubscriptions.findIndex((t=>t.id===e));if(-1!==t){const e=this.inProgressSubscriptions[t].messageSubscriber.filter;e&&this.filterKeyToSubscriberIdMap.delete(this.getFilterKey(e)),this.inProgressSubscriptions.splice(t,1)}}static publishMessage(e){null!==this.webSocket?null===this.webSocket||1!==this.webSocket.readyState?this.inProgressMessages.push(e):this.webSocket.send(JSON.stringify(e)):console.error("Web socket not initialized.")}static getUserPresence=()=>this.userPresence;static dispatchLocalMessage(e){const{matcher:t,criteria:n,message:s={}}=e,{environmentID:r,productionLevel:a,...o}=n,i={msgId:`local_${Date.now()}`,filter:{matcher:t,criteria:o},message:s};this.dispatchToSubscribers(t,o,i)}static getCaseSubscription=e=>Jh.getOrCreateSubscription(e);static initObjectRedirectionSubscription=()=>nf.subscribeToCaseEvents();static refreshB2STokenReInit=async()=>{if(Uh()){const e={body:{B2SToken:yg.b2sJWT}};og("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(yg.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close()):console.log("refreshB2S: invalid b2s length")})).catch((e=>{console.log(`refreshB2S: error occurred while fetching: ${e}`)}))}else if(!cg("refreshB2S")){ig("/uas/api/v1/isolations/token/websocket-ticket",{method:"GET",withoutDefaultHeaders:!1},"").then((e=>{const{token:t}=e.data;t&&(yg.b2sJWT=t,this.setTokenExpiryTime({tokenExpiryTime:Math.round(Date.now()/1e3)+60}),this.webSocket?.close())})).catch((e=>{console.error(`websocket-ticket: error occurred while fetching: ${e}`)}))}};static getTokenExpiryTime=()=>{const e=Math.round(Date.now()/1e3);return this.tokenExpiryTime-e};static setTokenExpiryTime=e=>{this.tokenExpiryTime=e.tokenExpiryTime};static clearContext(e){Object.keys(this.subscribers).forEach((t=>{this.subscribers[t].contextName===e&&this.unsubscribe(t)})),this.userPresence.clearContext(e)}}const lf=cf;const uf=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(Number.isInteger(e?.pageNumber)&&Number.isInteger(e?.pageSize)){const t=[],{pageNumber:n,pageSize:s}=e,r=n*s;let a=r-s;for(;a<r;a+=1){if(!this.records[a])return this.maxRecords===a?t:[];t.push(this.records[a])}return t}return this.records}mergeRecords(e,t){if(Number.isInteger(t?.pageNumber)&&Number.isInteger(t?.pageSize)){const{pageNumber:n,pageSize:s}=t,r=n*s;let a=0;for(let t=r-s+1-1;t<r;t+=1)this.records[t]=e[a],a+=1;if(e.length<s){const t=(n-1)*s+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=sS(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const df=new class{SUBSCRIPTION_STATUS_FAILED="FAILED";SUBSCRIPTION_STATUS_SUCCESS="SUCCESS";DATAPAGE_NOT_CACHED="Data Page Not Cached";DUPLICATE_SUBSCRIPTION_ID="Duplicate Subscription Id";MISSING_MANDATORY_FIELD="Missing Mandatory Field(s)";constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Map}getDataViewParameters(e,t){if(!e||!t)return e;if(!t.parameters)return{};const n=Array.isArray(t.parameters)?t.parameters:[t.parameters],s=new Set(n.map((e=>e.name))),r={};return Object.keys(e).forEach((t=>{s.has(t)&&(r[t]=e[t])})),r}resolveParameterValue(e,t,n,s,r){return lS.resolveParameterValue(e,t,n,s,r)}formatParameterValue(e,t,n,s,r){return lS.formatParameterValue(e,t,n,s,r)}resolveAndFormatParameters(e,t,n,s,r){return lS.resolveAndFormatParameters(e,t,n,s,r)}getData(e,t,n,s){const r=this.generateHash(e,t,s);if(this.dataStore[e]&&this.dataStore[e][r]){const t=this.dataStore[e][r];return t.isDirty?[]:t.getRecords(n)}return[]}async getDataAsync(e,t,n={},s,r,a={}){const o=NC(e),i=this.getDataViewParameters(n,o);a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e));const c={skipClearErrorMessages:!0,...a};if(!this.isCacheable(e,r)||a.invalidateCache){const n=await this.fetchData(e,i,s,r,t,c);return{...n.data,data:this.isCacheable(e,r)?this.mergeDataStore(e,i,s,r,n):n.data?.data??[],pageNumber:n?.data?.pageNumber,pageSize:n?.data?.pageSize,queryStats:n?.data?.queryStats,status:n?.status}}const l=this.getData(e,i,s,r);if(l.length>0)return Promise.resolve({data:l});const u=await this.fetchData(e,i,s,r,t,c);return{...u.data,data:this.mergeDataStore(e,i,s,r,u),pageNumber:u?.data?.pageNumber,pageSize:u?.data?.pageSize,queryStats:u?.data?.queryStats,status:u?.status}}async getPageDataAsync(e,t,n={},s={}){const r=this.generateHash(e,n,null);if(s.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][r]){if(!s?.invalidateCache)return Promise.resolve(this.dataStore[e][r]);delete this.dataStore[e][r],this._removeDataStoreMetaEntry(e,n,r)}const{restApi:a,reqType:o}=p_(Gs.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o,...s.skipClearErrorMessages&&{skipClearErrorMessages:s.skipClearErrorMessages}};if(s.enableStreaming){const e=s.streamOptions||{};Object.assign(i,{responseType:"stream",adapter:"fetch",headers:{Accept:"text/event-stream"},...e})}const c=a&&n&&0===Object.keys(n).length?a.split("?")[0]:a;return Kd(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[r]:t.data},this._addDataStoreMetaEntry(e,n,r)),s.enableStreaming?t:t.data)))}subscribeToDataPageUpdates(e,t,n,s={}){if(!e||!t||!n)return!1;const r=this.generateHash(n,s,null);this.dataPageSubscribers[n]??={};const a=this.dataPageSubscribers[n];a[r]??={};const o=a[r];return this.subscribeToMessageService(n,e),!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const s=this.generateHash(t,n,null);delete this.dataPageSubscribers[t]?.[s]?.[e];const r=this.subscribedDataPageNames.get(t)??0;return r<=1?(this.subscribedDataPageNames.delete(t),e&&lf.unsubscribe(e)):this.subscribedDataPageNames.set(t,r-1),!0}unsubscribeToDatapageUpdates(e,t,n={}){return this.unsubscribeToDataPageUpdates(e,t??"",n)}_isDataPageCached(e,t){if(t&&lS.isObjectEmpty(t))return!!this.dataStore[e];const n=this.generateHash(e,t,null);return!!this.dataStoreMeta[e]?.[n]?.length}updateDataPageStore(e={}){Object.keys(e).forEach((t=>{this.dataStore[t]||(this.dataStore[t]={});const n=e[t],s=ks.getDefaultQualifiedName("pxResults");Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n][s])}else{const r=new uf;this.dataStore[t][n]=r,r.mergeRecords(e[t][n][s]||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const s=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const r=this.dataStoreMeta[e];r[s]??=[];const a=r[s];a.includes(n)||a.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const s=this.generateHash(e,t,null);this.dataStoreMeta[e][s]=this.dataStoreMeta[e][s].filter((e=>e!==n))}}mergeDataStore(e,t,n,s,r){const a=this.generateHash(e,t,s),o=r?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][a]||(this.dataStore[e][a]=new uf);const i=this.dataStore[e][a];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,a),i.getRecords(n)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")||e.startsWith(ks.getDefaultQualifiedName("D_"))||e.startsWith(ks.getDefaultQualifiedName("Declare_"))}subscribeToUpdate(e,t,n,s,r,a){this.subscribers[e]=this.subscribers[e]||{},this.subscribers[e].callback=this.subscribers[e].callback||{},a&&!this.subscribers[e].callback?.[a]&&(this.subscribers[e].callback[a]=r),this.subscribeToCascadeUpdates(e,t,n,s,a)}unsubscribe(e,t,n,s,r){delete this.subscribers[e]?.callback?.[r],t&&t.length>0&&BC.unRegisterFields(n,s,t,r)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:s,parameters:r=""}=n,a=this.subscribers[s];this.markDataInstanceDirty(s,""===r?null:JSON.parse(r)),t&&this._executeDataPageSubscriptions(e),!t&&a?.callback&&Object.keys(a.callback).forEach((t=>{a.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,s;if((!t||(n=this.generateHash(e,t,null),s=this.dataStoreMeta[e]?.[n],s?.push(this.generateHash(e,null)),s))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!s||s.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:s}=t,r=s?JSON.parse(s):null;if(this.dataPageSubscribers[n])if(r){const t=[];t.push(this.generateHash(n,r,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const s=this.dataPageSubscribers[n]?.[t]??{};Object.keys(s).forEach((t=>{s[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const s=t[n];Object.keys(s).forEach((s=>{t[n][s](e.message)}))}))}}isPerInteraction(e){const t=NC(e);return!t||"reloadOncePerInteraction"===t.refreshStrategy?.type}disableCache(e){this.isCacheEnabled=!e}generateHash(e,t,n){const s=NC(e);let r=[];s||(r=Object.keys(t||{}).map((e=>({name:e}))));const a=s?.parameters||r;let o="",i=e;const c=[];return Array.isArray(a)&&a.forEach((e=>{t?.[e.name]?c.push(t[e.name]):c.push(e.defaultValue??Gs.NULL_STRING)})),n&&c.push(JSON.stringify(n)),c.join(Gs.HASH_DELIMITER)&&(o=lS.getHashedString(c.join(Gs.HASH_DELIMITER)),i=e+Gs.UNDERSCORE_STRING+o),i}async fetchData(e,t,n,s,r,a){const{additionalApiParams:{useExtendedTimeout:o=!1,includeTotalCount:i=!1}={},...c}=a,l={dataViewParameters:t};return i&&(l.includeTotalCount=!0),o&&(l.useExtendedTimeout=!0),n&&(l.paging=n),s&&(l.query=s),Dh.getData(e,l,r,c)}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToCascadeUpdates(e,t,n,s,r){t&&t.length>0&&BC.registerFields(n,s,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),r)}subscribeToMessageService(e,t){if(e&&this.subscribedDataPageNames.has(e)){const t=this.subscribedDataPageNames.get(e)??0;return void this.subscribedDataPageNames.set(e,t+1)}const n={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};lf.subscribe(n,this.handleMessage.bind(this),void 0,t),this.subscribedDataPageNames.set(e,1)}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}};const pf=class{constructor(e,t,n,s,r=100,a=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=s,this.maxtime=r,this.maxsize=a,this.groupedDataViewArray=[]}findCombinableDataViewCall(e){return this.groupedDataViewArray.find((t=>this.comparator(t,e)))}dequeueAllDataViewCalls(){for(this.groupedDataViewArray.reverse();this.groupedDataViewArray.length>0;){const e=this.groupedDataViewArray.pop();this.finalDataViewCall(e).then((t=>{this.separator(e,t)}))}clearTimeout(this.timeoutId)}dequeueDataViewCallOnSizeExceed(e){const t=this.groupedDataViewArray.findIndex((t=>this.comparator(t,e)));this.groupedDataViewArray[t]&&(this.groupedDataViewArray.splice(t,1),this.finalDataViewCall(e).then((t=>{this.separator(e,t)})))}queueDataViewCall(e,t){let n,s,r=this.findCombinableDataViewCall(e);return n=new Promise((e=>{s=e})),r&&!r.dataViewCallMap[t]?(this.combiner(r,e),r.dataViewCallMap[t]={promise:n,resolve:s}):r?n=r.dataViewCallMap[t].promise:(r={...e,dataViewCallMap:{[t]:{promise:n,resolve:s}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:s}}})),Object.keys(r.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(r):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const gf=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,s,r,a,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new pf(t,n,r,s,a,o)),this.bufferedDataQueues[e]}},hf=(e,t)=>((e,t)=>1===Object.keys(e).length&&Object.keys(e).length===Object.keys(t).length)(e,t)&&((e,t)=>"EQ"===t.F0.comparator&&(e.F0.comparator===t.F0.comparator||"IN"===e.F0.comparator))(e,t)&&e.F0.ignoreCase===t.F0.ignoreCase,ff=e=>e.map((e=>e.field)),mf=(e,t)=>{const n=(e.query?.filter).filterConditions,s=(t.query?.filter).filterConditions;let r=(t.query?.filter).logic;const a=Object.keys(n).length;hf(n,s)?("EQ"===n.F0.comparator&&(e=>{const t=e?.F0.rhs?.value;e.F0.rhs={values:[t]},e.F0.comparator="IN"})(n),(n.F0.rhs?.values).push(s.F0.rhs?.value)):(Object.keys(s).forEach(((e,t)=>{const o=`F${a+t}`;n[o]=s[e],r=r.replace(e,o)})),(e.query?.filter).logic+=` OR ${r}`);const o=ff(e.query?.select);ff(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},If=(e,t)=>((e,t)=>Object.keys(e.filterConditions).length%Object.keys(t.filterConditions).length==0&&!Object.keys(t.filterConditions).some((n=>e.filterConditions[n].lhs.field!==t.filterConditions[n]?.lhs.field)))(e.query?.filter,t.query?.filter)&&(((e,t)=>e.dataViewParameters&&t.dataViewParameters&&Object.keys(t.dataViewParameters).length===Object.keys(e.dataViewParameters).length&&!Object.keys(e.dataViewParameters).some((n=>"string"==typeof t.dataViewParameters?.[n]?e.dataViewParameters?.[n]!==t.dataViewParameters?.[n]:!lS.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Ef=(e,t)=>{const{data:n}=t,{dataViewCallMap:s,filterDataOnClient:r}=e;Object.keys(s).forEach((e=>{s[e].resolve({data:r(e,n)})}))},yf=e=>({combiner:mf,comparator:If,separator:Ef,...e}),Af=(e,t)=>{if("undefined"!=typeof window)try{window.sessionStorage.setItem(e,t)}catch(e){}},Cf=(e,t="",n="IS_NULL")=>({comparator:n,lhs:{field:e},...t&&{rhs:{value:t}}}),Sf=e=>null!=e&&"object"==typeof e&&!("then"in e);class _f{constructor(e,t){this.isInitialised=!1,this.isQueryable=!0,this.dataSourceMetaData={},this.nonQueryableData=[],this.fetchedNQData=!1,this.previousSearchText=null,this.totalRecordCount=0,this.fetchedRecordCount=0,this.cache=new Map,this.keyCache=new Map,this.pageNumber=0,this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null,this.dataSource="",this.bufferInitialized=!1,e&&(this.listType=e.listType,this.dataSource=e.dataSource,e.enablePagination?(this.enablePagination=e.enablePagination,this.pageSize=e.pageSize):this.maxResultsDisplay=e.maxResultsDisplay,this.parameters=e.parameters,this.columns=e.columns,this.matchPosition=e.matchPosition,this.ignoreCase=!1!==e.ignoreCase,this.dataSourceMetaData=e.dataSourceMetaData,this.context=t)}static searchResultsCache={};static init(e,t){return new Promise(((n,s)=>{const r=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(Gs.HASH_DELIMITER),a=lS.getHashedString(r),o=`${e.dataSource}_${a}`,i=`__dataviewmetadata__${e.dataSource}`,c=Dh.getAppCacheKey(i);if("undefined"!=typeof window&&window.sessionStorage.getItem(c)){const r=JSON.parse(`${window.sessionStorage.getItem(c)}`);if(t&&_f.searchResultsCache?.[t]?.[o])n(_f.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&_f.searchResultsCache?.persisted?.[o])n(_f.searchResultsCache.persisted[o]);else{const a=new _f(e,t);JSON.stringify(r.associationFilter)===JSON.stringify(e.associationFilter)?(a.dataSourceMetaData=r.dataSourceMetaData,a.isQueryable=r.isQueryable,a.isInitialised=r.isInitialised,a.associationFilter=r.associationFilter,_f.initializeCache(t,e,o,a),n(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((s=>{Af(c,JSON.stringify({isQueryable:s.data.isQueryable,dataSourceMetaData:s.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=s.data.isQueryable,a.dataSourceMetaData=s.data,a.isInitialised=!0,_f.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,s(e)})))}}else if(e.deferDatasource&&NC(e.dataSource)){const s=new _f(e,t),r=NC(e.dataSource);s.isQueryable=!!r?.isQueryable,s.isInitialised=!0,s.dataSourceMetaData=r,Af(c,JSON.stringify({isQueryable:r?.isQueryable,dataSourceMetaData:r,isInitialised:!0})),s.context=t,_f.initializeCache(t,e,o,s),n(s)}else{const r=new _f(e,t);r.associationFilter=e.associationFilter,r.propertyFilter=e.propertyFilter,r.fetchMetaData(t).then((s=>{Af(c,JSON.stringify({isQueryable:s.data.isQueryable,dataSourceMetaData:s.data,isInitialised:!0,associationFilter:e.associationFilter})),r.isQueryable=s.data.isQueryable,r.dataSourceMetaData=s.data,r.isInitialised=!0,_f.initializeCache(t,e,o,r),n(r)})).catch((e=>{r.isInitialised=!1,s(e)}))}}))}static bufferedDataView=new gf;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(yf(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete _f.searchResultsCache[e]}static initializeCache(e,t,n,s){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===_f.searchResultsCache[e]&&(_f.searchResultsCache[e]={}),_f.searchResultsCache[e][n]=s):(void 0===_f.searchResultsCache.persisted&&(_f.searchResultsCache.persisted={}),_f.searchResultsCache.persisted[n]=s)}fetchMetaData(e){return Dh.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){_f.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>df.getDataAsync(this.dataSource,this.context,e.dataViewParameters,e.paging,e.query)),e.combiner,e.separator,e.comparator,e.waitTime,e.maxSize)}buildSchemaForQueryableBufferDP(e){return{...this.buildSchemaForQueryableDP(e),paging:void 0,filterDataOnClient:this.filterDataOnClient.bind(this)}}buildQueryWithKeys=(e,t,n)=>{const s=this.buildSelect(n),r=((e=[],t={},n="")=>{if(!e.length||!Object.keys(t))return;const s={};return e.forEach(((e,n)=>{const r=t[e];let a;a=r?Cf(e,r,"EQ"):Cf(e),s[`T${n+1}`]=a})),{logic:Object.keys(s).join(` ${n} `),filterConditions:s}})(e,t,"AND");return{select:s,...r&&{filter:r},...Dh.isDistinctResultsOnly(s)&&{distinctResultsOnly:"true"}}};buildSchemaForQueryableDPWithKeys=(e,t,n)=>({dataViewParameters:this.parameters,query:this.buildQueryWithKeys(e,t,n),paging:this.buildPageOptions()});getRowDataByKeys=async(e,t,n)=>this.memoizedGetRowDataByKeys(e,t,n);buildKeyCacheKey(e,t,n){const s=e.map((e=>[e,t[e]??""])),r=n?.columns?.map((e=>e.value));return JSON.stringify({filterEntries:s,columns:r,pageNumber:this.pageNumber})}memoizedGetRowDataByKeys(e,t,n){const s=this.buildKeyCacheKey(e,t,n);(n?.invalidateCache||n?.purgeDataPageCache)&&this.keyCache.delete(s);const r=this.keyCache.get(s);if(r)return r;const a=this.isQueryable?this.buildSchemaForQueryableDPWithKeys(e,t,n):this.buildSchemaForNonQueryableDP(),o=df.getDataAsync(this.dataSource,this.context,a.dataViewParameters,this.isQueryable?a.paging:void 0,this.isQueryable?a.query:void 0,{...n}).catch((e=>(this.keyCache.delete(s),Promise.reject(e))));return this.keyCache.set(s,o),o}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return _f.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return df.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return df.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query,{...t})}return this.fetchNonQueryableResults(e,t)}getCachedResult(e,t){if(this.enablePagination&&Sf(t)&&t.has(this.pageNumber))return t.get(this.pageNumber);const n=this.cache.get(e);return this.enablePagination||!n||Sf(n)?void 0:n}handleCacheError(e,t){if(this.enablePagination){const t=this.cache.get(e);t&&Sf(t)&&t.delete(this.pageNumber)}else this.cache.delete(e);return Promise.reject(t)}storeCacheResult(e,t){if(this.enablePagination){let n=this.cache.get(e);n&&Sf(n)||(n=new Map,this.cache.set(e,n)),n.set(this.pageNumber,t)}else this.cache.set(e,t)}isResultCached(e){if(!this.isInitialised||!this.isValidDatasource()||this.context&&!iS(this.context))return!1;const t=e.toLowerCase(),n=this.cache.get(t);return!!n&&(!this.enablePagination||Sf(n)&&n.has(this.pageNumber))}memoizedGetData(e,t){const n=e?.toLowerCase(),s=this.cache.get(n);if(this.isResultCached(e)&&s){const e=this.getCachedResult(n,s);if(e)return e}const r=this.getData(e,t).catch((e=>this.handleCacheError(n,e)));return this.storeCacheResult(n,r),r}fetchData(e,t=!1,n){return this.isValidDatasource()?this.context&&!iS(this.context)?Promise.resolve({data:[]}):this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e??"",n)):Promise.reject(new Error):Promise.reject(new Error)}fetchPaginatedData(e){return this.pageNumber+=1,this.fetchData(e,!0)}fetchNonQueryableResults(e,t){if(void 0===e)return Promise.resolve({data:[]});if(this.fetchedNQData)return Promise.resolve({data:this.filterDataOnClient(e,this.nonQueryableData,t)});if(this.isNQDataFetchInProgress&&this.fetchNQDataPromise)return this.fetchNQDataPromise.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData&&"structure"in this.dataSourceMetaData&&"list"===this.dataSourceMetaData.structure?.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=df.getDataAsync(this.dataSource,this.context,n.dataViewParameters,void 0,void 0,t),this.isNQDataFetchInProgress=!0,new Promise(((n,s)=>{this.fetchNQDataPromise?.then((s=>(this.nonQueryableData=[...s.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>s(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const s=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,r)=>{const a=s?.some((t=>{const s=_f.resolveEmbeddedPath(t),a=lS.getIn(r,s);return null!=a&&this.positionMatches(`${a}`,e,n)}));return a&&t.push({...r}),t}),[])}static resolveEmbeddedPath(e){return e.startsWith("!P!")||e.startsWith("!PL!")?e.substring(e.lastIndexOf("!")+1).replace(/:/g,"."):e}positionMatches(e,t,n){const s=n?.ignoreCase??this.ignoreCase,r=s?e.toLowerCase():e,a=s?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return r.startsWith(a);case"contains":return r.includes(a);case"equals":return r===a;default:return!1}}buildSelect(e){const t=[],n=[];return(e?.columns??this.columns)?.forEach((e=>{if(!n.includes(e.value)){n.push(e.value);const s={field:e.value};t.push(s)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,s=t?.ignoreCase??this.ignoreCase,r={};let a=0;(t?.columns??this.columns)?.forEach((t=>{if(t.useForSearch){const o=`F${a}`;a+=1;const i={field:t.value},c={value:e};let l="CONTAINS";"start"===n?l="STARTS_WITH":"equals"===n&&(l="EQ");const u={...`${parseFloat(e)}`!==e==!0&&{ignoreCase:s?"true":"false"},lhs:i,rhs:c,comparator:l};r[o]=u}}));const o=Object.keys(r).join(" OR ");return{filterConditions:r,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...Dh.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...Dh.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}}buildPageOptions(){return this.enablePagination?{pageNumber:this.pageNumber,pageSize:this.pageSize}:{maxResultsToFetch:this.maxResultsDisplay}}buildSchemaForQueryableDP(e,t){return{dataViewParameters:this.parameters,query:this.buildQuery(e,t),paging:this.buildPageOptions()}}buildSchemaForNonQueryableDP(){return{dataViewParameters:this.parameters}}isValidDatasource(){return!!this.dataSource}}const Nf=_f;class Tf{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,s,r){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:s,callback:r}]}registerForRefresh(e,t,n,s,r){n=lS.convertClipboardPageToPageRefNotation(n);const a=s.split("/").join(Gs.HASH_DELIMITER),o=lS.getHashedString(a);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[r]?.[n]){this.propChangeRefreshMap[r][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[r][n].push({uniqueHash:o,callback:t})}else Tf.initializeRefreshCache(this.propChangeRefreshMap,r,n,o,t);else if(this.refreshMap?.[r]?.[`${e}-${n}`]){this.refreshMap[r][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[r][`${e}-${n}`].push({uniqueHash:o,callback:t})}else Tf.initializeRefreshCache(this.refreshMap,r,`${e}-${n}`,o,t)}triggerPropChangeRefresh(e,t){const n=this.propChangeRefreshMap?.[t];if(!n)return!1;const s=gS.getPropertyValue(Gs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,e,t),{interestPage:r=""}=s||{},a=e=>lS.convertPageRefToClipboardPageNotation(e).replace(`${Gs.CASE_INFO?.CASE_INFO_CONTENT}${r}`,"");if(n[e]){const t=a(e);return n[e].forEach((e=>e.callback(t))),!0}const o=rd.getContextReferences(t)?.get(e),i=o&&gS.resolveContextTreeNodeProps(o.props)||{},{contextPageRef:c}=i;if(c&&n[c]){const e=a(c);return n[c].forEach((t=>t.callback(e))),!0}for(const t of Object.keys(n)){let s;if(lS.segmentsMatch(t,e)?s=e:c&&lS.segmentsMatch(t,c)&&(s=c),s){const e=a(s);return n[t].forEach((t=>t.callback(e))),!0}}return!1}triggerRefreshForType(e,t,n){return"PROP_CHANGE"===e?this.triggerPropChangeRefresh(t,n):!!this.refreshMap?.[n]?.[`${e}-${t}`]&&(this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback())),!0)}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const Df=new Tf;const Pf=class{static cleanCaches(e){BC.purgeCascadeFields(e),Nh.removeContext(e),Nf.clearContextedCache(e),Ad.cleanContextSubscribers(e),jI(e),rd.removeContextTreeNode(e),lf.clearContext(e),Df.deRegisterForRefresh(e)}},Of="GET_DESCENDANTS",Rf={REFRESH_DATA:"REFRESH_DATA",WHENS:"WHENS",DECLARE_EXPRESSIONS:"DECLARE_EXPRESSIONS",REFRESH:"refresh",REFRESH_CASE_DATA:"refreshCaseData",REFRESH_ASSIGNMENT_DATA:"refreshAssignmentData",REFRESH_CASE_VIEW:"refreshCaseView",RECALCULATE:"recalculate",RECALCULATE_CASE_DATA:"recalculateCaseData",RECALCULATE_ASSIGNMENT_DATA:"recalculateAssignmentData",REFRESH_EXTERNAL_OBJECT:"refreshExternalObjectData",REFRESH_EXTERNAL_CASE_DATA:"refreshExternalCaseData"};const bf=new class{constructor(){this.runtimeParams={},this.runtimeParamsMap={}}setRuntimeParams(e){this.runtimeParams=e}getRuntimeParams(){return this.runtimeParams}setRuntimeParam(e,t){this.runtimeParamsMap[e]=t}getRuntimeParam(e){return this.runtimeParamsMap[e]}},vf=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},xf=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)},wf=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e),Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,e)},Mf=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,e)},Lf=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_LOAD,e)},Uf=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.ASSIGNMENT_EVENTS.ASSIGNMENT_UNLOAD,e)};const Ff=new class{MISSING_CONTEXT_PARAM="context is required parameter";INVALID_CONTEXT_DETAILS="Invalid Context";INVALID_CONTEXT_OPERATION="Invalid Operation on Given Context";schedulePendingActionOnCompletion(e,t){const n=[],s=t.context_data?.blocking_action_counter??0,r=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;if(s<=0){if(a)n.push({type:Dr,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(r.length>0))return;{const t=r.shift();a=!a,n.push({type:Dr,payload:{context:e,data:{context_data:{deferred_action_queue:r,blocking_action_counter:s,is_deferred_action_in_progress:a}}}}),t&&n.push(t)}}qC(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=zC(e?.payload?.context);if(t){const n=[],s=t.context_data?.blocking_action_counter??0,r=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;return r.length<=0&&!a&&(s<=0?(n.push(e),a=!a):r.push(e),n.unshift({type:Dr,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:r,blocking_action_counter:s,is_deferred_action_in_progress:a}}}}),qC(n)),Promise.resolve()}return Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}handleDeferredActionCompletion(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=zC(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(qC({type:Dr,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}}),this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}registerBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));return zC(e)?(qC({type:Aa,payload:{context:e,isInitiateBlockingAction:!0}}),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_DETAILS))}deRegisterBlockingAction(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t={...zC(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(qC({type:Aa,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=1,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=zC(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&lS.rejectPendingActions(n.context_data.deferred_action_queue)&&(n.context_data.deferred_action_queue=[]),n.context_data?.blocking_action_counter&&(n.context_data.blocking_action_counter=0),n.context_data?.is_deferred_action_in_progress&&(n.context_data.is_deferred_action_in_progress=!1),qC({type:Dr,payload:{context:e,data:{...n}}}),bg.disableLoadingIndicator({context:e})}}isDeferredActionInProgress(e){if(!e)return Promise.reject(new Error(this.MISSING_CONTEXT_PARAM));const t=zC(e);return!(!t||!0!==t.context_data?.is_deferred_action_in_progress)}},Vf=(e,t)=>{const n={},s=Jg.getLookUpDataPage(e),r=Jg.getDataPageKeys(s);if(r)for(const e of r)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:s,dataPageKeys:r}},jf=(e,t)=>{const n=Jg.getSavableDataPage(e),s=Jg.getDataPageKeys(n);return s?.forEach((e=>{e.isAlternateKeyStorage&&(e.keyName===e.linkedField||Object.keys(t).includes(e.linkedField))?e.keyName=t[e.linkedField]:e.isAlternateKeyStorage&&Object.keys(t).includes(e.keyName)&&e.keyName!==e.linkedField?(t[e.linkedField]=t[e.keyName],delete t[e.keyName]):e.keyName=t[e.keyName]})),{keys:t,dataPageID:n,dataPageKeys:s}},kf=e=>{Ad.publish($s.PUB_SUB_EVENTS.EVENT_CANCEL,e)},Bf=(e,t,n)=>ZI.shouldUseUnifiedHandling()||(e=>{if(e.includes(Gs.ACTIONAREA))return!0;const t=NA(e),n=Fy(`${t}/${Gs.ACTIONAREA}`);return Boolean(n?.includes(Gs.ACTIONAREA))})(e)?yr:lE(t,n??!1),$f=(e,t,n)=>{const{callbacks:s}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?s?.cancel?.():s?.submit?.()}))},Gf=(e,t,n)=>n||t!==Gs.ACTION?e.getValue($s.CASE_INFO.ACTIVE_ACTION_ID):e.getValue($s.CASE_INFO.ASSIGNMENTACTION_ID),Wf=(e,t)=>{t&&(e.remoteCaseMeta=t)};const Hf=class{MSG_CLASSNAME_REQUIRED="className is required parameter";MSG_CLASSNAME_STRING="className must be a string";MSG_ACTION_ID_REQUIRED="actionID is required parameter";MSG_ACTION_ID_STRING="actionID must be a string";MSG_ACTION_NAME_REQUIRED="actionName is required parameter";MSG_ACTION_NAME_STRING="actionName must be a string";MSG_KEY_PROPERTIES_REQUIRED="keyProperties is required parameter";MSG_DATAVIEWID_REQUIRED="dataViewID is required parameter";MSG_DATAVIEWID_STRING="dataViewID must be a string";MSG_CONTAINERITEMID_REQUIRED="containerItemID is required parameter";MSG_CONTAINERITEMID_STRING="containerItemID must be a string";MSG_PAGENAME_REQUIRED="pageName is required parameter";MSG_PAGENAME_STRING="pageName must be string";MSG_INSIGHTID_REQUIRED="insightID is required parameter";MSG_DASHBOARDID_REQUIRED="DashboardID is required parameter";MSG_ACTIVE_SUGGESTION_UNATTENDED="You must accept or decline autofilled fields.";MSG_CASE_ID_REQUIRED="caseID is required parameter";MSG_CONTEXT_STRING="context must be string";MSG_SUBSCRIPT_VIEW_REQUIRED="subscriptView is required";constructor(e){this.c11nEnv=e}shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getCaseID=e=>e.caseID||this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID))||e?.links?.open?.href?.split("/")?.[2];getSaveActionPayload=(e,t=!1,n=!1)=>{const s=e,r=s&&s.includes(Gs.MODAL),a=this.c11nEnv.getValue($s.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue($s.CASE_INFO.ASSIGNMENT_ID),i=this.c11nEnv.getValue($s.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue($s.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue($s.CASE_INFO.ASSIGNMENTACTION_ID),c=this.c11nEnv.getContainerName(),l=this.c11nEnv.getValue($s.CASE_INFO.CASE_TYPE_ID),u=t?void 0:YI(this.c11nEnv.getContextName()),d=this.c11nEnv.getValue("isProcessAction","isProcessAction");return mS.buildActionObject({context:s,containerItemID:e,assignmentID:o,actionID:i,caseID:a,containerName:c,caseType:l,isModalAction:r,isFormValid:u,isProcessAction:d,saveOnly:t,autosave:n},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let s,r,a="";a=t&&null!==t.actionMgrID?t.actionMgrID||"":vg.getNextActionMgrId();const o=new Promise(((e,t)=>{s=e,r=t}));if(!s||!r)throw new Error("resolveFn or rejectFn is not defined.");return vg.register(a,o,s,r,e,t,n),{actionMgrID:a,promise:o}};showDataObjectCreateView(e,t=$s.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=mS.buildActionObject({viewName:t,className:e},this.c11nEnv),s=ir,{promise:r}=this.actionsApiPromise(s,n);return qC({type:s,payload:{...n,containerName:$s.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),r}cancelDataObject(e){if(!e)return Promise.reject(new Error("containerItemId is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=e;if(!gy(t)){return new th(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=sa,s=mS.buildActionObject({containerItemID:e,context:t},this.c11nEnv),r=t&&t.includes(Gs.MODAL);qC({type:n,payload:{...s,isModalAction:r,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:a}=this.actionsApiPromise(n,s);return a.then((()=>{kf({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=HC()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(Gs.DATA_CLASS_NOT_FOUND));if(CC($s.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW)){const t=this.handleSubscript.call(this,e,this.c11nEnv);if(t)return t}const s=Jg.getSavableDataPage(n),r=Sa,a=!!e&&e.includes(Gs.MODAL),o=mS.buildActionObject({containerItemID:e,dataPageID:s},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return qC({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:a,isFormValid:YI(e)}}),i}deleteDataObject(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=_a,s=Jg.getSavableDataPage(e),r=Jg.getDataPageKeys(s),a={};if(r)for(const e of r)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=mS.buildActionObject({dataViewName:s,dataViewParameters:a},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return qC({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:"",readOnly:!1,actionName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));const s=Na,{dataPageID:r,dataViewParameters:a}=Vf(e,t),o=mS.buildActionObject({dataLookUp:r,keyProperties:t,requestPayload:a,viewName:n.viewName||$s.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:Gs.MODAL,readOnly:n.readOnly,actionName:n.actionName},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return qC({type:"VIEW_DATA_OBJECT",payload:{...o}}),i}updateDataObject(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if(!t)return Promise.reject(new Error("keys is required parameter"));const{data:n}=HC()?.getState()||{},s=n[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(Gs.DATA_CLASS_NOT_FOUND));const{dataPageID:r,keys:a}=jf(s,t),o=Ta,i=e&&e.includes(Gs.MODAL),c=mS.buildActionObject({containerItemID:e,dataPageID:r,key:a},this.c11nEnv),l=n[e]?.caseInfo?.headers?.etag,{promise:u}=this.actionsApiPromise(o,c);return qC({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:YI(e),etag:l}}),u}openDataObjectAction(e,t,n,s){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(!t)return Promise.reject(new TypeError(this.MSG_KEY_PROPERTIES_REQUIRED));if("object"!=typeof t)return Promise.reject(new TypeError("keyProperties must be a object"));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if(!s)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const r=Da,{dataViewParameters:a,dataPageID:o,dataPageKeys:i}=Vf(e,t),c=mS.buildActionObject({actionID:n,actionName:s,dataViewParameters:a,lookupDatapage:o,containerName:Gs.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(r,c);return qC({type:r,payload:{...c}}),l}submitDataObjectAction(e,t,n,s){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));if(!t)return Promise.reject(new Error(this.MSG_KEY_PROPERTIES_REQUIRED));if(!n)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));const{data:r}=HC()?.getState()||{},a=r[e]?.dataInfo?.content?.classID;if(!a)return Promise.reject(new Error(Gs.DATA_CLASS_NOT_FOUND));const o=s?.jsActionQueryParams,i=NA(e),c=tA(i),l=Dy(c,i)||{},{resourceType:u="",key:d=""}=l,p=Pa,{dataPageID:g,keys:h}=jf(a,t),f=mS.buildActionObject({containerItemID:e,actionID:n,resourceType:u,key:d,keys:h,savableDatapage:g,containerName:Gs.MODAL,context:e,jsActionQueryParams:o},this.c11nEnv);f.context=e;const m=r[e]?.caseInfo?.headers?.etag,{promise:I}=this.actionsApiPromise(p,f);return qC({type:p,payload:{...f,isFormValid:YI(e),etag:m}}),I}createWork(e,t={flowType:"",containerName:"",openCaseViewAfterCreate:!1,modalOptions:{dockable:!1},startingFields:Object,remoteCaseMeta:{},channelName:""}){if(!e)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(e=qs.getRemoteCaseClassBySourceClass(e)??e,window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,ks.getDefaultQualifiedName("pyStartCase"),t);const{dockable:n=!1}=t?.modalOptions||{};let s=t.theType?t.theType:(e=>{const t=ZI.shouldUseUnifiedHandling();return ZI.isExternalCaseType(e)?Fa:ZI.isExternalObject(e)?t?Fa:"CREATE_EXTERNAL_OBJECT":t?mr:ZI.isObjectCaseType(e)?"CREATE_OBJECT":mr})(e);const r=mS.buildActionObject({class:e,flowType:ks.getDefaultQualifiedName("pyStartCase"),containerName:Gs.PRIMARY,openCaseViewAfterCreate:!0,...t,theType:s,modalOptions:{isDockable:n}},this.c11nEnv);Wf(r,t.remoteCaseMeta);const{promise:a}=this.actionsApiPromise(s,r);if(r.headers={...r.headers},t.channelName?r.headers[Gs.X_ORIGIN_CHANNEL]=t.channelName:xA.isWSSPortal()&&(r.headers[Gs.X_ORIGIN_CHANNEL]="WSS"),s=this.handleRemoteCaseForCreateWork(e,r,s),Sd.getPreviewMode()){r.debugInfo={debugId:lS.generateUniqueID()};const e=Vd.getCoreHeadersFromContext(r?.context||""),t=String(e?.debugInfo?.[Gs.COREHEADER_APP_DEBUG_ID]||"");t&&s!==mr&&(r.debugInfo={debugId:t})}return qC({type:s,payload:{...r}}),a}handleRemoteCaseForCreateWork(e,t,n){if(qs.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:s,name:r}=qs.getRemoteCase(e);if(t.className=e,t.class=n,vg.setRemoteCaseHeaderByContext(t,s),qs.isTraditionalRemoteCase(e)||qs.isRemoteCaseVersionDifferent(e)){const s={className:e,name:r,action:wa,remoteClassName:n};return vg.setTraditionalRemoteCaseParams(t,s)}}return n}createCase(e,t={}){return this.createWork(e,{...t,theType:"CREATE_WORK"})}getDataObjectActions(e,t){if(!e)return Promise.reject(new Error(this.MSG_DATAVIEWID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_DATAVIEWID_STRING));const n=Or,s=mS.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:r}=this.actionsApiPromise(n,s);return qC({type:n,payload:{...s}}),r}getDescendants(e,t){if(!e)return Promise.reject(new Error(this.MSG_CASE_ID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTEXT_STRING));const n=t||this.c11nEnv.getContextName(),s=mS.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:r}=this.actionsApiPromise("GET_DESCENDANTS",s),a=(o={...s,context:n},{type:Of,payload:o});var o;return qC(a),r}openWorkByHandle(e,t,n={}){if(!e)return Promise.reject(new Error("workID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("workID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(t=qs.getRemoteCaseClassBySourceClass(t)??t,window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const s={insKey:e,acTargetName:n.targetContainer||Gs.PRIMARY,containerName:n.targetContainer||Gs.PRIMARY};let r=ZI.shouldUseUnifiedHandling()||!ZI.isObjectCaseType(t)?Ir:"GET_OBJECT";const a=mS.buildActionObject(s,this.c11nEnv);Wf(a,n.remoteCaseMeta);const{promise:o}=this.actionsApiPromise(r,a);return a.headers={...a.headers},n.channelName?a.headers[Gs.X_ORIGIN_CHANNEL]=n.channelName:xA.isWSSPortal()&&(a.headers[Gs.X_ORIGIN_CHANNEL]="WSS"),a.className=t,qs.isRemoteCase(t)&&(r=this.setRemoteCaseParamsForOpenCase(a,t,r,n.remoteCaseMeta)),Sd.getPreviewMode()&&n.targetContainer!==Gs.WORKAREA&&(a.debugInfo={debugId:lS.generateUniqueID()}),qC({type:r,payload:{...n,...a}}),o}setRemoteCaseParamsForOpenCase(e,t,n,s={}){const{RemoteSystemID:r,RemoteClassName:a,name:o}=qs.getRemoteCase(t);if(vg.setRemoteCaseHeaderByContext(e,r),e.isRemoteCase=!0,e.remoteCaseClass=t,e.remoteCaseMeta=s,qs.isTraditionalRemoteCase(t)||qs.getRemoteAppPlatformVersion(r??"")){const n={className:t,name:o,action:La,remoteClassName:a};return vg.setTraditionalRemoteCaseParams(e,n)}return n}openAssignment(e,t,n={isActionFromToDoList:!1,isChild:!1,context:"",viewType:"",skipBrowserSemanticUrlUpdate:!1,containerName:"",channelName:"",remoteCaseMeta:{}}){if(!e)return Promise.reject(new Error("assignmentID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("assignmentID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(t=qs.getRemoteCaseClassBySourceClass(t)??t,window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const s={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1,...void 0!==n.renderInline&&{renderInline:n.renderInline},...void 0!==n.pageName&&{pageName:n.pageName}};n.isChild&&(s.containerName=Gs.PRIMARY,s.isChild=n.isChild);let r=Hg;const a=mS.buildActionObject(s,this.c11nEnv);Wf(a,n.remoteCaseMeta);const{promise:o}=this.actionsApiPromise(r,a);if(a.headers=a.headers||{},n.channelName?a.headers[Gs.X_ORIGIN_CHANNEL]=n.channelName:xA.isWSSPortal()&&(a.headers[Gs.X_ORIGIN_CHANNEL]="WSS"),qs.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:s,name:o}=qs.getRemoteCase(t);if(vg.setRemoteCaseHeaderByContext(a,s),a.remoteCaseMeta=n.remoteCaseMeta,qs.isTraditionalRemoteCase(t)||qs.getRemoteAppPlatformVersion(s??"")){const n={className:t,name:o,action:Ma,remoteClassName:e};r=vg.setTraditionalRemoteCaseParams(a,n)}}a.className=t,a.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Sd.getPreviewMode()&&![Gs.WORKAREA].includes(n.containerName)&&(a.debugInfo={debugId:lS.generateUniqueID()});const i={context:a.context||n.context,containerName:a.containerName||n.containerName,targetContainerName:a.containerName||n.containerName,viewType:a.viewType||n.viewType,skipBrowserSemanticUrlUpdate:n.skipBrowserSemanticUrlUpdate};return qC({type:r,payload:{...a,...i}}),o}finishAssignment(e,t={outcomeID:"",jsActionQueryParams:{}}){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));e.endsWith(Gs.ACTIONAREA)&&(e=Fy(e)||e);const n=ky(e);let s=n;if(n?.includes(`/${Gs.WORKAREA}`)&&(s=n.substring(0,s?.lastIndexOf(`/${Gs.WORKAREA}`))),KI(n)){const e=[{type:"error",message:this.c11nEnv.getLocalizationService().getLocalizedMessage(this.MSG_ACTIVE_SUGGESTION_UNATTENDED)}];return pd({messages:e,context:s,category:$s.PAGE}),Promise.reject({type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const r=t?.isTriggeredFromDifferentContext,{caseID:a,assignments:o,localActionID:i,caseActions:c,caseInfo:l,businessID:u,caseTypeID:d,caseTypeName:p}=uE(e,this.c11nEnv,{isTriggeredFromDifferentContext:r}),g=tE(l);let h,f=!1;const m=c?.find((e=>e.ID===i));m?f="Case"===m?.type:h=zC(n);let{assignmentID:I}=uE(e,this.c11nEnv,{isTriggeredFromDifferentContext:r});h?.context_data?.actionType&&(f=h.context_data.actionType===Gs.CASE,I=I||h.context_data.assignmentID);const E=cE(o,I,i,l?.activeActionID),[y,A]=a.split(" "),C={class:y,actionID:E,assignmentID:I,caseID:a,workID:A,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:f,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:u,caseTypeID:d,caseTypeName:p};e?.includes(Gs.MODAL)&&(C.containerName=Gs.MODAL,C.isModalAction=!0),C.outcome=t.outcomeID,C.jsActionQueryParams=t.jsActionQueryParams,l?.isLocalAction&&(C.viewType=oI.FORM);const S=Bf(e,d,l?.isObjectWideAction),_=mS.buildActionObject(C,this.c11nEnv),{promise:N}=this.actionsApiPromise(S,_);return _.isProcessAction=this.c11nEnv.getValue("isProcessAction","isProcessAction")||zC(n).context_data.isProcessAction,_.headers??={},xA.isWSSPortal()&&(_.headers[Gs.X_ORIGIN_CHANNEL]="WSS"),Ff.executeOrQueueDeferredAction({type:S,payload:{..._,context:n}}),N}getNextWork(){if("HYBRID"===xA.getRenderingMode())return Ad.publish($s.PUB_SUB_EVENTS.CASE_EVENTS.GET_NEXT_WORK,{userIdentifier:xA.getOperatorIdentifier()}),Promise.resolve();const e=Hg,t=mS.buildActionObject({containerName:Gs.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return qC({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Hg,n=this.c11nEnv.getValue($s.CASE_INFO.CASE_INFO_ID),s=this.c11nEnv.getCaseSummary().headers,r=mS.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:a}=this.actionsApiPromise(t,r),o={type:t,payload:{...r,caseID:n,headers:s}};return qC(o),a}submitBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION",n=this.c11nEnv.getValue($s.CASE_INFO.CASES),s=this.c11nEnv.getValue($s.CASE_INFO.ACTIVE_ACTION_ID),r=this.c11nEnv.getValue($s.CASE_INFO.IS_ASSIGNMENT),a={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(Gs.MODAL)&&(a.containerName=Gs.MODAL,a.isModalAction=!0);const o=mS.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(t,o),c=ky(e);return qC({type:t,payload:{...o,context:c,cases:n,actionID:s,isAssignment:r,isFormValid:YI(c),classID:this.c11nEnv.getCurrentClassID()}}),i}submitBulkActionAsync(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t="SUBMIT_BULK_ACTION_ASYNC",n=this.c11nEnv.getValue($s.CASE_INFO.CASES),s=this.c11nEnv.getValue($s.CASE_INFO.ACTIVE_ACTION_ID),r={containerName:e.includes(Gs.MODAL)?Gs.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(Gs.MODAL)},a=mS.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=ky(e);return qC({type:t,payload:{...a,context:i,cases:n,actionID:s,isFormValid:YI(i),classID:this.c11nEnv.getCurrentClassID()}}),o}openBulkAction(e,t){if(!e)return Promise.reject(new Error("actionID is required parameter for openBulkAction"));if("string"!=typeof e)return Promise.reject(new TypeError("actionID must be a string openBulkAction"));if(window.pms?.plugins?.c11n?.openBulkAction){const{callbacks:n}=t;return t.callbacks=null,window.pms.plugins.c11n.openBulkAction(e,t).then((e=>{"cancel"===e?n?.cancel?.():n?.submit?.()}))}const{selectedList:n,runningMode:s}=t,r=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,runningMode:s,...t},o="OPEN_BULK_ACTION",i=mS.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return qC({type:o,payload:{...i}}),c}cancelBulkAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));return new th(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(qC({type:sr,payload:{reference:$s.CASE_INFO.APPROVALFLAG,value:Gs.APPROVED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}rejectCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(qC({type:sr,payload:{reference:$s.CASE_INFO.APPROVALFLAG,value:Gs.REJECTED,context:e}}),this.finishAssignment(e)):Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED))}resolveDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const[,t]=this.c11nEnv.getValue($s.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:sr,payload:{reference:$s.CASE_INFO.DUPLICATECASEFLAG,value:Gs.DUPLICATE,context:e}},s={type:sr,payload:{reference:$s.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return qC([n,s]),this.finishAssignment(e)}ignoreDuplicateCase(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t={type:sr,payload:{reference:$s.CASE_INFO.DUPLICATECASEFLAG,value:Gs.IGNORE,context:e}},n={type:sr,payload:{reference:$s.CASE_INFO.DUPLICATECASEID,value:"",context:e}},s={type:sr,payload:{reference:$s.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return qC([t,n,s]),this.finishAssignment(e)}openLocalAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.getCaseID(t);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,$f(window.pms.plugins.c11n.openLocalAction,e,t);const s=t.assignKey||this.c11nEnv.getValue($s.CASE_INFO.ASSIGNMENT_ID),r=t.type,a={caseID:n,assignmentID:s,vcName:t.target,actionName:t?.name,assignKey:s,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},o=t.containerName===Gs.ACTIONAREA?Nr:(e=>ZI.shouldUseUnifiedHandling()||"Object"!==e.type&&!ZI.isObjectCaseType(e?.caseClassName||"")&&!window.location.href.includes("/objects/")?Nr:"OPEN_OBJECT_ACTION")(t),i=mS.buildActionObject(a,this.c11nEnv);t.containerName!==Gs.ACTIONAREA&&t.containerName!==Gs.WORKAREA||(i.skipMergeAssignmentsAndActions=!1);const{promise:c}=this.actionsApiPromise(o,i),l=this.c11nEnv.getContextName(),u=Gy(l)[0];let d;if(d=Fy(u),d?.includes("actionarea")&&o===Nr)return qC({type:o,payload:{...i}}),c;if("Object"===t.type)return qC({type:o,payload:{...i}}),c;const p=Fy(u),g=n!==this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID))&&p&&qs.getRemoteHeaderByContext(p)||qs.getRemoteHeaderByContext(l);if(vg.setRemoteCaseHeaderByContext(i,g),!u)return d=l,qC({type:o,payload:{...i,contextName:l,continueExecution:!1}}),c;const{continueExecution:h,containerItemID:f}=Ty(l,n,u);if(d=f,!h||d&&"review"===HC()?.getState()?.data[d]?.context_data?.caseViewMode)return qC({type:o,payload:{...i,contextName:l,continueExecution:h}}),c;const m=d,I=m&&m.includes(Gs.MODAL),E=t.assignKey||this.c11nEnv.getValue($s.CASE_INFO.ASSIGNMENT_ID),y=zC(d),A=y?.caseInfo?.assignments?y.caseInfo.assignments[0]?.actions[0]?.ID:void 0,C=this.c11nEnv.getContainerName(),S=this.c11nEnv.getValue($s.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),N=mS.buildActionObject({context:m,containerItemID:d,assignmentID:E,actionID:A,caseID:n,containerName:C,caseType:S,isModalAction:I,isFormValid:!0,isProcessAction:_},this.c11nEnv);N.context=d;const T=ky(d),D=this.c11nEnv.getCaseSummary(),P=tE(D),O=mS.buildActionObject({caseID:n,containerItemID:d,cancelContext:T},this.c11nEnv);let R={};return I?(O.acTargetName=Gs.MODAL,O.isInCreateStage=P,O.isModalAction=I,R={...O}):R={...O,acName:Wa(this.c11nEnv.getContainerName(),O.context)},qC({type:o,payload:{...i,contextName:l,saveActionPayload:N,cancelActionPayload:R,continueExecution:h}}),c}openProcessAction(e,t){if(!e)return Promise.reject(new Error(this.MSG_ACTION_ID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_ACTION_ID_STRING));const n=this.c11nEnv.getValue($s.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,$f(window.pms.plugins.c11n.openProcessAction,e,t);const s=this.c11nEnv.getValue($s.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,r=t.type,a={caseID:n,assignmentID:s,vcName:t.target,actionName:t?.name,assignKey:s,actionID:e,doDeleteCaseSummary:!0,processActionType:r,isProcessAction:!0,...t},o=Wg,i=mS.buildActionObject(a,this.c11nEnv),c=this.c11nEnv.getContextName(),l=Gy(c)[0];let u=qs.getRemoteHeaderByContext(c);if(!u&&l){const e=Ny(l);e?.accessedOrder.forEach((s=>{(t.caseID||n)===e.items[s].key&&(u=qs.getRemoteHeaderByContext(e.items[s].context))}))}vg.setRemoteCaseHeaderByContext(i,u);const{promise:d}=this.actionsApiPromise(o,i),{containerItemID:p}=Ty(c,n,l);return qC({type:o,payload:{...i,saveContainerItemID:p}}),d}navigateToStep(e,t){if(!e)return Promise.reject(new Error("stepID is required parameter"));if("string"!=typeof e)return Promise.reject(new TypeError("stepID must be a string"));if(!t)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=_r,s=this.c11nEnv.getValue($s.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue($s.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue($s.CASE_INFO.ASSIGNMENT_ID),r=tE(this.c11nEnv.getCaseSummary()),a=this.c11nEnv.getValue($s.CASE_INFO.CASE_INFO_ID),o={ID:s,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:r,caseID:a};t&&t.includes(Gs.MODAL)&&(o.acTargetName=Gs.MODAL);const i=mS.buildActionObject(o,this.c11nEnv),{promise:c}=this.actionsApiPromise(n,i),l=ky(t);return qC({type:n,payload:{...i,containerItemID:t,context:l}}),c}cancelAssignment(e,t){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:n}=$s,s=Cr,r=ky(e),a=e&&e.includes(Gs.MODAL),o=this.c11nEnv.getCaseSummary(),i=tE(o),c=this.c11nEnv.getValue(Gs.getProperty(n.CASE_INFO_ID)),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=mS.buildActionObject({caseID:c,containerItemID:e,context:r},this.c11nEnv);let d={};a?(u.acTargetName=Gs.MODAL,u.isInCreateStage=i,u.isModalAction=a,d={...u}):d={...u,acName:Wa(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(s,u);return qC({type:s,payload:d}),p.then((()=>{t||kf({caseID:c,assignmentID:l,context:this.c11nEnv.getContextName()})}))}cancelLocalAction(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=$s,n=e,s=sa,r=e&&e.includes(Gs.MODAL),a=this.c11nEnv.getValue(t.CASE_INFO_ID),o=mS.buildActionObject({caseID:a,containerItemID:e,context:n},this.c11nEnv);if(!gy(n)){return new th(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{Mf(a),kf({caseID:a,context:this.c11nEnv.getContextName()})}))}qC({type:s,payload:{...o,isModalAction:r}});const{promise:i}=this.actionsApiPromise(s,o);return i}cancelCreateStageAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const{CASE_INFO:t}=$s,n=sa,s=e,r=s&&s.includes(Gs.MODAL),a=this.c11nEnv.getCaseSummary(),o=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_TYPE_ID)),i=tE(a),c=this.c11nEnv.getValue(Gs.getProperty(t.CASE_INFO_ID)),l=mS.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv),u=this.c11nEnv.getValue("isProcessAction","isProcessAction"),d=xA.isCoexistenceAppOfType(Gs.APP_TYPE.UIKIT);l.isProcessAction=u;const p=xA.getRenderingMode();if(i&&(r||d||"EMBED"===p)&&!eE(a)){const t=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.IS_FIRST_ASSIGNMENT)),c=gy(s);if(this.shouldDeleteCaseInCreateStage(c,t,d)){const t=!0===Boolean(ZI.isExternalObject(o));return this.deleteCaseInCreateStage(e,t)}qC({type:n,payload:{...l,isModalAction:r,isChildCase:oE(a),isInCreateStage:i}})}const{promise:g}=this.actionsApiPromise(n,l);return g.then((()=>{}))}saveAssignment(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=zg,n=this.getSaveActionPayload(e,!0),{promise:s}=this.actionsApiPromise(t,n);return Ff.executeOrQueueDeferredAction(Yg(n)),s}saveAndClose(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=zg,n=this.getSaveActionPayload(e),{promise:s}=this.actionsApiPromise(t,n);return qC(Yg(n)),s}deleteCaseInCreateStage(e,t=!1){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const n=qg,s=e,r=s&&s.includes(Gs.MODAL),a=this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID)),o=this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.CASE_TYPE_ID)),i=mS.buildActionObject({caseID:a,caseType:o,containerItemID:e,context:s,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.PARENTCASEINFO));i.isProcessAction=c,i.parentCaseInfo=l;const u=`${Gs.APP.APP}/${Cy.PRIMARY}`,d=EI(u,Cy.PRIMARY);i.parentContext=d,r&&(i.targetName=Gs.MODAL,i.containerName=Cy.MODAL,i.isModalAction=r),qC((e=>({type:qg,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{kf({caseID:a,context:this.c11nEnv.getContextName()})}))}getRecents(e){if(!e)return Promise.reject(new Error("maxResultsToFetch is required parameter"));if("number"!=typeof e)return Promise.reject(new TypeError("maxResultsToFetch must be number"));let{restApi:t}=bA.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=un()+t;return Kd(n,{method:"GET",headers:{}})}updateRecents(e,t,n,s){const{restApi:r}=bA.getRestEndPoint("updateRecents")||{},a=`${un()}${r}`;return Kd(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:s}})}logout(){const{restApi:e}=bA.getRestEndPoint("Logout")||{},t=`${un()}${e}`;return Kd(t,{method:"GET",headers:{}}).then((e=>(Object.keys(rd.rootNodes).forEach((e=>{Pf.cleanCaches(e)})),rd.rootNodes={},sessionStorage.clear(),oS(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return Kd(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,ks.getDefaultQualifiedName("pyCasePreview"),{container:Cy.PREVIEW,containerName:Cy.PREVIEW,context:$s.APP.APP,...t})}showDataPreview(e,t,n){return e?"string"!=typeof e?Promise.reject(new TypeError("dataContext must be string")):t?"object"!=typeof t?Promise.reject(new TypeError("dataContextParameters must be an object")):this.showData(ks.getDefaultQualifiedName("pyDataPreview"),e,t,{container:Cy.PREVIEW,containerName:Cy.PREVIEW,context:$s.APP.APP,...n||{},skipSemanticUrl:!0}):Promise.reject(new Error("dataContextParameters is required parameter")):Promise.reject(new Error("dataContext is required parameter"))}loadView(e,t,n){let s=mS.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.CASE_TYPE_ID)),RemoteSystemID:qs.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv);n||(n={containerName:this.c11nEnv.getContainerName(),updateData:!1}),n&&"object"==typeof n?(Object.hasOwn(n,"container")&&!Object.hasOwn(n,"containerName")&&(n.containerName=n.container),s={...s,...n}):s={...s,containerName:this.c11nEnv.getContainerName()};const r=or,{promise:a}=this.actionsApiPromise(r,s,!1);return qC({type:r,payload:{...s}}),a}showPage(e,t,n={containerName:"",skipSemanticUrl:""}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error(this.MSG_CLASSNAME_REQUIRED));if("string"!=typeof t)return Promise.reject(new TypeError(this.MSG_CLASSNAME_STRING));if(window.pms?.plugins?.c11n?.showPage)return window.pms.plugins.c11n.showPage(e,t,n);const s=mS.buildActionObject({viewName:e,className:t},this.c11nEnv),r=ir,{promise:a}=this.actionsApiPromise(r,s);return Sd.getPreviewMode()&&(s.debugInfo={debugId:lS.generateUniqueID()}),qC({type:r,payload:{...s,...n,containerName:n.containerName||this.c11nEnv.getContainerName(),skipSemanticUrl:n.skipSemanticUrl}}),a}showInsight(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_INSIGHTID_REQUIRED));const n=mS.buildActionObject({},this.c11nEnv),s=lr,{promise:r}=this.actionsApiPromise(s,n);return qC({type:s,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),r}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=mS.buildActionObject({},this.c11nEnv),s=ur,{promise:r}=this.actionsApiPromise(s,n);return qC({type:s,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),r}showData(e,t,n,s={containerName:"",skipSemanticUrl:!1}){if(!e)return Promise.reject(new Error(this.MSG_PAGENAME_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_PAGENAME_STRING));if(!t)return Promise.reject(new Error("dataContext is required parameter"));if("string"!=typeof t)return Promise.reject(new TypeError("dataContext must be string"));const r=mS.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n,RemoteSystemID:qs.getRemoteHeaderByContext(this.c11nEnv.getContextName())},this.c11nEnv),a=cr;s?.containerName||(s.containerName="HYBRID"===xA.getRenderingMode()?bf.getRuntimeParam(Gs.HYRBID_ROOT_CONTAINERNAME):wg.getTargetViewContainerName(a));const{promise:o}=this.actionsApiPromise(a,r);return qC({type:a,payload:{...r,...s,skipSemanticUrl:Boolean(s.skipSemanticUrl)}}),o}changeHandler(e,t){mS.changeHandler(e,t)}eventHandler(e,t){mS.eventHandler(e,t)}triggerFieldChange(e,t,n=!1,s={skipDirtyValidation:!1,skipPageInstructionGeneration:!1}){const r=this.c11nEnv.getContextName(),a=this.c11nEnv.getPageReference(),o=gS.getContextPath(a,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&!s.skipPageInstructionGeneration&&this.c11nEnv.getListActions().updateProperty(e,t,s);let i=this.c11nEnv.getValue(Gs.CLASS_ID);const c=e?e.split(".").filter((e=>!!e)):[];c.length>1&&(c.pop(),i=QC(`.${c.join(".")}.classID`,a,r)),e=lS.trimDotForProperty(e),qC({type:ar,payload:{reference:o,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:i}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:s=!1,isArrayDeepMerge:r=!0,contextPageReference:a="",isListEntry:o=!1,skipDirtyValidation:i=!1,associatedProperty:c,skipPageInstructionGeneration:l=!1}=n,u=this.c11nEnv.getContextName();let d=this.c11nEnv.getPageReference();const p=a?.startsWith(d)?a.replace(d,""):a;d=a||d;const g=gS.getContextPath(d,e);let h=!1;this.c11nEnv.isInsideList()&&!l&&this.c11nEnv.getListActions().updateProperty(p?`${p}${e}`:e,t,{isArrayDeepMerge:r,skipDirtyValidation:i}),this.c11nEnv.isBulkAction()&&(h=!0),e||(e=this.c11nEnv.getStateProps().value),dd({type:$s.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:d,context:u,isListEntry:o}),qC({type:sr,payload:{reference:g,value:t,context:u,isArrayDeepMerge:r,skipDirtyValidation:i,...h&&{isStrictTracking:h},...s&&{removePropertyFromChangedList:s},...c&&{associatedProperty:`${d}${c}`}}})}activateModalContainerItem(e){const t=qr,{context:n}=e,s=n&&n.includes(Gs.MODAL),r=mS.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);s&&(r.containerName=Gs.MODAL,r.isModalAction=s),qC({type:t,payload:r});const{promise:a}=this.actionsApiPromise(t,r);return a}refreshCaseView(e,t,n,s={}){const{promise:r,actionMgrID:a}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d,isArrayDeepMerge:p}=s,g={actionMgrID:a,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,isArrayDeepMerge:p,optionalPayload:d};s.refreshFor&&(g.refreshFor=s?.refreshFor),s.resetForm&&(g.resetForm=s?.resetForm),s.skipPayloadGeneration&&(g.skipPayloadGeneration=s?.skipPayloadGeneration);const h=u||this.c11nEnv.getContextName(),f=this.c11nEnv.getPageReference(),m=this.c11nEnv.getValue(Gs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW),{isMultiRecordData:I,editType:E}=m||{};if(o&&I&&E===Gs.ACTION){const t=this.c11nEnv.getValue($s.CASE_INFO.ASSIGNMENT_ID),{actionID:n,interestPage:s,interestPageActionID:r,isLocalAction:a}=m;IE(e,t,n,h,s,r,a,I,E,g)}else!I&&o&&(aE(h,f)||sE(h,f))?NE(h,n,g):mE(e,t,h,n,g);return r}refreshEmbeddedDataWithAction(e,t,n,s,r,a,o,i,c={}){const{promise:l}=this.actionsApiPromise(Rf.REFRESH_DATA),u=this.c11nEnv.getContextName();return IE(e,t,n,u,s||this.c11nEnv.getPageReference(),r,a,o,i,c),l}openEmbeddedDataModal(e,t,n,s,r,a,o,i,c=!1,l=$s.MODAL){const u=Oa;let d=t.getCaseInfo().getKey();const p=t.getValue($s.CASE_INFO.IS_LOCAL_ACTION),g=t.getValue($s.CASE_INFO.ASSIGNMENT_ID),h=Gf(t,o,p),f=t.getPageReference();let m="string"==typeof s?`${t.getPageReference().replace(Gs.getProperty($s.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${s}`:`${t.getPageReference().replace(Gs.getProperty($s.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${s}]`;f.startsWith($s.OBJECT_INFO.OBJECT_INFO)&&!d&&(d=t.getCaseInfo().getObjectKey(),m=`${t.getPageReference().replace($s.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${s}]`);const I=t.getMetadata(),E=Array.isArray(I?.config?.children)&&I.config.children[0]?.children||[],y={readOnly:c,targetProperty:n,index:s,viewID:e,ID:d,actionType:r,interestPage:lS.convertPageRefToClipboardPageNotation(m),heading:a,editType:o,interestPageActionID:o===Gs.ACTION?i:void 0,actionID:h,isLocalAction:p,operationFlag:Gs.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof s,assignmentID:p||o!==Gs.ACTION?void 0:g,columns:E},A=mS.buildActionObject(y,this.c11nEnv);if(o===Gs.ACTION){const e=lS.getETag(A.context);A.headers={"If-Match":e}}const{promise:C}=this.actionsApiPromise(u,A);return xA.getFeatureMap().granularUIRefresh&&E.forEach((e=>{const n=Ro.trimAnnotation(e.config.value),s=dC(n.startsWith(".")?n.replace(".",""):n,e.config.classID);s&&!Array.isArray(s)&&s.isDeclarativeTarget&&rd.addFieldNode(t.getContextName(),f+m,t.viewName??"",n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:f+m})})),qC({type:u,payload:{...A,containerName:l,skipSemanticUrl:!0}}),C}getEmbeddedDataView(e,t,n,s,r,a="",o="",i=!1,c=""){const l=Ra;let u=t.getCaseInfo().getKey();const d=t.getValue($s.CASE_INFO.IS_LOCAL_ACTION),p=t.getValue($s.CASE_INFO.ASSIGNMENT_ID),g=Gf(t,a,d),h=t.getPageReference();let f="string"==typeof s?`${t.getPageReference().replace(Gs.getProperty($s.CASE_INFO.CASE_INFO_CONTENT),"")}${n}.${s}`:`${t.getPageReference().replace(Gs.getProperty($s.CASE_INFO.CASE_INFO_CONTENT),"")}${n}[${s}]`;h.startsWith($s.OBJECT_INFO.OBJECT_INFO)&&!u&&(u=t.getCaseInfo().getObjectKey(),f=`${t.getPageReference().replace($s.OBJECT_INFO.OBJECT_INFO_CONTENT,"")}${n}[${s}]`);const m={readOnly:i,targetProperty:n,index:s,viewID:e,ID:u,actionType:r,interestPage:lS.convertPageRefToClipboardPageNotation(f),editType:a,interestPageActionID:a===Gs.ACTION?o:void 0,actionID:g,isLocalAction:d,operationFlag:Gs.EMBEDDED_DATA_MODAL.SHOW_ROW,isPageGroup:"string"==typeof s,assignmentID:d||a!==Gs.ACTION?void 0:p,containerName:c},I=mS.buildActionObject(m,this.c11nEnv);if(a===Gs.ACTION){const e=lS.getETag(I.context);I.headers={"If-Match":e}}const{promise:E}=this.actionsApiPromise(l,I);return qC({type:l,payload:{...I,skipSemanticUrl:!0}}),E}submitEmbeddedDataModal(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ba;let n=this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID));const s=this.c11nEnv.getValue(Gs.getProperty($s.CASE_INFO.ASSIGNMENT_ID));let r=this.c11nEnv.getPageReference().replace(Gs.getProperty($s.CASE_INFO.CASE_INFO_CONTENT),"");const a=ky(e),o=this.c11nEnv.getValue(Gs.getProperty(Gs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW)),{interestPageActionID:i,editType:c,isLocalAction:l,actionID:u,viewName:d,parentContext:p}=o;r.startsWith($s.OBJECT_INFO.OBJECT_INFO)&&!n&&(n=this.c11nEnv.getValue($s.OBJECT_INFO.OBJECT_INFO_ID),r=this.c11nEnv.getPageReference().replace($s.OBJECT_INFO.OBJECT_INFO_CONTENT,"")),dd({context:a,stateObj:zC(a),clearContextMessages:!0});const g={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:n,viewID:d,isFormValid:YI(a),interestPage:lS.convertPageRefToClipboardPageNotation(r),parentContext:p,isModalAction:!1,target:this.c11nEnv.getTarget(),editType:c,actionID:u,operationFlag:Gs.EMBEDDED_DATA_MODAL.SUBMIT_ROW,interestPageActionID:i,isLocalAction:l,assignmentID:s};e&&e.includes(Gs.MODAL)&&(g.containerName=Gs.MODAL,g.isModalAction=!0);const h=mS.buildActionObject(g,this.c11nEnv);if(c===Gs.ACTION){const e=lS.getETag(h.context);h.headers={"If-Match":e}}const{promise:f}=this.actionsApiPromise(t,h);if(gy(a)){const[e,t,n]=Hu(this.c11nEnv.getPageReference());rd.mutatePageList(p,e,t,{type:ga,rowIndex:n}),qC({type:ga,payload:{pageReference:this.c11nEnv.getPageReference(),context:p,isListEntry:!0}})}return Ff.executeOrQueueDeferredAction({type:t,payload:{...h,context:a}}),f}fillFormWithAI(e){if(!e)return Promise.reject(new Error(this.MSG_CONTAINERITEMID_REQUIRED));if("string"!=typeof e)return Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING));const t=ky(e),n=this.c11nEnv.getPageReference(),{promise:s,actionMgrID:r}=this.actionsApiPromise(xa);return NE(t,n,{actionMgrID:r,isFillFormWithAI:!0,preserveClientChanges:!1}),s}handleSubscript(e,t){if(!CC($s.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW))return Promise.reject(new Error(this.MSG_SUBSCRIPT_VIEW_REQUIRED));const n=va,s=mS.buildActionObject({containerItemID:e},t);qC({type:n,payload:{...s,isDataObject:!0,skipReleaseLockRequest:!0,isFormValid:YI(e),context:e}});const{promise:r}=this.actionsApiPromise(n,s);return r}showSubscriptCreateView(e,t,n,s=$s.VIEW_NAMES.SUBSCRIPT_CREATE_VIEW){const r=mS.buildActionObject({viewName:s,className:e,referenceListStr:t,subscriptName:n},this.c11nEnv),a=ir,{promise:o}=this.actionsApiPromise(a,r);return qC({type:a,payload:{...r,containerName:$s.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),o}deleteWork(e,t,n){if(!e)return Promise.reject(new Error("workId is required parameter"));const s=Va,r=ZI.isExternalCaseType(t),a=mS.buildActionObject({workId:e,caseTypeID:t,isExternalCase:r,...n?.skipDeleteConfirmation&&{skipDeleteConfirmation:!0},...n?.enableBackNavigation&&{enableBackNavigation:!0}},this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);return qC(Qg({...a})),o}deleteDataRecord(e,t){if(!e)return Promise.reject(new Error("className is required parameter"));if(!t)return Promise.reject(new Error("keys is required parameter"));const n=Va,s=mS.buildActionObject({className:e,keys:t},this.c11nEnv),{promise:r}=this.actionsApiPromise(n,s);return qC(Qg({...s})),r}};const qf=class{constructor(e){this.c11nEnv=e}buildRemoteCaseHeaders(e,t){const n={};if(e){const s=qs.getRemoteCaseClassBySourceClass(e)??e;qs.injectRemoteCaseHeader(n,{caseTypeID:s},t)}return n}async getCaseStages(e,t,n){const s={caseID:e},{restApi:r,reqType:a}=p_("getCaseStages",s),{caseTypeID:o}=n||{},i=this.buildRemoteCaseHeaders(o,t);return(await Kd(r,{method:a,headers:i},t)).data.stages}async getCaseActions(e,t,n){const s={caseID:e},{restApi:r,reqType:a}=p_("getActions",s),{caseTypeID:o}=n||{},i=this.buildRemoteCaseHeaders(o,t);return(await Kd(r,{method:a,headers:i},t)).data}getCaseTypeName(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_TYPE_NAME))}getName(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_NAME))}getClassName(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_TYPE_ID))}getAvailableProcesses(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.AVAILABLEPROCESSES))}getKey(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_ID))}getObjectKey(){return this.c11nEnv.getValue(Gs.OBJECT_INFO.OBJECT_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ASSIGNMENT_ID))}getActions(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ACTION_BUTTONS))}getActiveFlowActionID(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ACTIVE_ACTION_ID))||this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ASSIGNMENTACTION_ID))}getParentCaseInfo(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.PARENTCASEINFO))}isPerform(){return this.c11nEnv.getValue(`${Gs.CONTEXT_DATA}${Gs.CASE_VIEW_MODE_PROP}`)===Gs.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${Gs.CONTEXT_DATA}${Gs.CASE_VIEW_MODE_PROP}`)===Gs.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO));return tE(e)}isReviewAfterCreateStage(){if(!this.isReview())return!1;const e=this.c11nEnv.getContextName(),t=Wy(e)[0];if(!t)return!1;const n=HC()?.getState().data[t]?.caseInfo?.stages;if(!Array.isArray(n))return!1;const s=[...n].reverse().find((e=>"object"==typeof e&&null!==e&&"visited_status"in e&&"transitionType"in e&&"completed"===e.visited_status));return"create"===s?.transitionType}isLocalAction(){const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO));return eE(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===Gs.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),s=Dy(t,n),{config:r}=t&&n?s&&s.view:this.c11nEnv.getMetadata();e=r?.type===Gs.VIEW?r?.name:null}(e&&e.startsWith(Gs.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(ks.getQualifiedNameForComplexRuleReferences(Gs.getProperty(Gs.CASE_INFO.VIEW_NAME))))}return e}getValueByPath(e,t){let n=e;if((t=t.replace("@P ","").trim()).includes(ks.getDefaultQualifiedName("pyViewContext"))){const t=e.caseInfo?.content??{},s=t[ks.getDefaultQualifiedName("pyViewContext")];if(!s)return n.caseInfo.content;if("string"==typeof s&&s.includes("(")&&s.includes(")")){const e=s.substring(1,s.indexOf("(")),n=parseInt(s.substring(s.indexOf("(")+1,s.indexOf(")")),10)-1;if(Array.isArray(t[e]))return t[e][n];const r=e.split(".").reduce(((e,t)=>e?.[t]),t);if(Array.isArray(r))return r[n]}}const s=t.split(/[.[\]]/).filter((e=>e));for(const e of s)if("object"==typeof n&&null!==n&&e in n)n=n[e];else{if(!Array.isArray(n)||Number.isNaN(Number(e)))return;n=n[parseInt(e,10)-1]}return n}getCurrentAssignmentViewClassName(){const e=this.c11nEnv.getTarget(),t=this.c11nEnv.getContextName(),n=Dy(e,t),{config:s}=e&&t&&n?n.view:this.c11nEnv.getMetadata(),r=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO)),a=s?.type===Gs.VIEW?s.context:null;if(a){const e=this.getValueByPath({caseInfo:r},a);if("object"==typeof e&&null!==e&&"classID"in e)return e.classID}return null}getActionRefreshConditions(){if(this.c11nEnv.getValue(Gs.getProperty(Gs.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)))return this.c11nEnv.getValue(Gs.getProperty(Gs.EMBEDDED_DATA_MODAL.REFRESH_CONDITIONS));const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ACTIVE_ACTION_ID)),t=Ks(this.c11nEnv.getContextName());let n;t&&(n=zC(t));const s=n?.caseInfo?.availableActions,r=zC(this.c11nEnv.getContextName()),a=r?.caseInfo?.refreshConditions;if(e){if(s){const t=s.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ACTION_REFRESH_CONDITIONS))}getBusinessID(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.BUSINESS_ID))}getAssignments(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO))?.assignments}getChildAssignments(){return this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO))?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ACTIVE_ACTION_ID)),t=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_ACTIONS));if(t&&e){const n=t.find((t=>t.ID===e));return"Case"===n?.type}return!1};getAllAssignments(){const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ASSIGNMENT_LABEL)),n=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS))||[],s=this.getChildAssignments()||[];let r=JSON.parse(JSON.stringify(s));r=r.map((e=>(e.isChild=!0,e)));const a=[...n,...r];let o=JSON.parse(JSON.stringify(a));return e&&!this.isPerform()&&(o=o.map((e=>(e.name=this.getActiveCaseActionName()||e?.name||t,e)))),o}getActiveCaseActionName(){const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_ACTIONS)),t=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.ACTIVE_ACTION_ID)),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_ACTIONS));return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(Gs.getProperty(Gs.CASE_INFO.GETNEXTWORK))}isObjectWideAction(){const e=this.c11nEnv.getValue(Gs.OBJECT_INFO.OBJECT_INFO);return eE(e)}getCaseCollaborators=(e=!0)=>{const t=this.c11nEnv.getValue(Gs.CASE_INFO.CASE_INFO_COLLABORATORS)||[];if(e){const e=xA.getOperatorIdentifier();return t.filter((t=>t.ID!==e))}return t}};const zf=class{constructor(e){this.c11nEnv=e}getContextKey(){return this.c11nEnv.getValue(Gs.getProperty(Gs.DATA_INFO.DATA_INFO_CONTEXT_KEY))}};class Yf{constructor(e){Yf._instance=this,this.context=`${e}/${Gs.SUGGESTION}`,HC()?.getState().data?.[this.context]||qC({type:Yr,payload:{context:this.context,data:{}}})}getField(e){return QC(e,"",this.context)}setField(e,t){qC({type:sr,payload:{reference:e,value:t,context:this.context}})}removeField(e,t={}){qC({type:Pr,payload:{reference:e,context:this.context,...t}}),Ad.publish(Gs.PUB_SUB_EVENTS.SUGGESTION_PROCESSED,{reference:e,context:this.context,...t})}setState(e){qC(AS({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Kf=Yf;const Qf=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=YC();return n?lS.getIn(n,t):null}static setSharedState(e,t){e&&qC(ZS({key:e,value:t}))}static updateState(e,t,n,s={}){const{isArrayDeepMerge:r=!0,pageReference:a,removePropertyFromChangedList:o=!1,skipDirtyValidation:i=!1}=s;if(!e||!t)return;qC(e_({context:e,reference:a?`${a}.${t}`:t,value:n,isArrayDeepMerge:r,removePropertyFromChangedList:o,skipDirtyValidation:i}))}static getSuggestionsContext(e){return new Kf(e)}static triggerRefresh(e,t){TE({context:e,pageReference:t})}};class Jf{static getParagraphStream(e,t,n){return((e,t,n)=>{if(!e)return e;const s=(new DOMParser).parseFromString(e,"text/html"),r=s.querySelectorAll("pega-reference");for(const e of r){const n=e.getAttribute("data-rule-id");if(n){const r=t.getValue(n),a=s.createTextNode(r??"");e.replaceWith(a),t.registerAdditionalProps({[n]:`@P ${n}`})}else e.replaceWith("")}let a;return a="simple"===n?lS.decodeHtmlEntities(s?.body?.textContent||""):s?.body?.innerHTML||"",/^(<p>)\s*(<\/p>)$/.test(a)?null:a})(e,t,n)}static isDecisionParagraph(e,t){const n=RC(e,t);return!!n?.useDecision}static processParagraph(e,t){const n=t.getCurrentClassID(),s=RC(e,n);let r;if(s?.useDecision){const n=s.dynamicContents.length;for(let a=0;a<n-1;a+=1)if(gS.resolveWhen(s.dynamicContents[a].when,t)){r=s.dynamicContents[a],e=`${e}#${r.when}`;break}r||(r=s.dynamicContents.pop())}else r=s;const a=s?.definedOnClassID,o=FA().getParagraphLocaleValue(a||n,e);return o?Jf.getParagraphStream(o.content,t,o?.category||r?.category||s?.category):r?.content?Jf.getParagraphStream(r.content,t,r?.category||s?.category):null}static processBannerDecisionParagraph(e,t){const n=t.getCurrentClassID(),s=RC(e,n);let r;if(s?.useDecision){const n=s.dynamicContents.length;for(let a=0;a<n-1;a+=1)if(gS.resolveWhen(s.dynamicContents[a].when,t)){r=s.dynamicContents[a],e=`${e}#${r.when}`;break}r||(r=s.dynamicContents.pop())}else r=s;const a=s?.definedOnClassID,o=FA().getParagraphLocaleValue(a||n,e);let i=null;return o?i=Jf.getParagraphStream(o.content,t,o.category||r?.category||s?.category):r?.content&&(i=Jf.getParagraphStream(r.content,t,r?.category||s?.category)),{htmlContent:i,messageType:r?.messageType,dismissBanner:r?.dismissBanner,isBanner:r?.isBanner}}static getParagraphProperties(e,t){const n=t.getCurrentClassID(),s=RC(e,n);return{useDecision:s?.useDecision,isBanner:s?.isBanner,messageType:s?.messageType,dismissBanner:s?.dismissBanner}}static isADecisionParagraph(e,t){return this.getParagraphProperties(e,t).useDecision}static isBanner(e,t){return this.getParagraphProperties(e,t).isBanner}static getParagraphMessageType(e,t){return this.getParagraphProperties(e,t).messageType}static isDismissibleBanner(e,t){return this.getParagraphProperties(e,t).dismissBanner}static hasDecisionBannerContent(e,t){const n=t.getCurrentClassID(),s=RC(e,n);return!(!s?.useDecision||!s?.dynamicContents)&&s.dynamicContents.some((e=>e.isBanner))}}const Xf=Jf;class Zf{constructor(e){this.fieldType=e}applyFallback(e){const t=Lp.getDefaultsforType(this.fieldType);e.currencyISOCode=e.currencyISOCode||t?.currencyISOCode||"USD"}}class em{static getStrategy(e){switch(e){case"Currency":case"Decimal":case"Integer":case"Percentage":return new Zf(e);default:return}}}const tm="DATAPAGE",nm="VIEW",sm="FIELD",rm="CASE",am="PARAGRAPH",om=(e,t,n,s)=>{const r=[nm,sm,am],a=[tm,am].includes(e)&&s?`#${s}`:"",o=e===tm?"@BASECLASS":n;return e===tm||r.includes(e)?`${o}!${e}!${t}${a}`.toUpperCase():`${e}!${t}${a}`.toUpperCase()};class im{static COMMON_LABELS="COMMONLABELS";static MESSAGES="MESSAGES";static COMPONENT_FIELDS="COMPONENTFIELDS";lookupList=[];constructor(e,t){this.localeReference=t,this.locale=e}getLocalizedText(e,t){const n=[...this.localeReference?[this.localeReference.toUpperCase()]:[],...this.lookupList,im.COMPONENT_FIELDS,im.COMMON_LABELS],s=this.#o(e,n)||e;return(t?this.#i(s,t):s)||e}getLocalizedMessage(e,t){const n=this.#o(e,[im.MESSAGES,im.COMMON_LABELS])??e;return(t?this.#i(n,t):n)||e}getLocalizedDataPage(e,t,n,s){if(!t||!n||!e)return e;const r=[om(tm,t,void 0,n),im.COMMON_LABELS,...this.lookupList],a=this.#o(e,r)??e;return(s?this.#i(a,s):a)||e}#i(e,t){return 0===t.length?e:e.replace(/\{(\d+)\}/g,((e,n)=>t[""+(Number(n)-1)]??e))}#o(e,t=this.lookupList){if(0===t.length)return;const n=pC(this.locale);for(const s of t){const t=this.#c(e,n.localeStore[s]);if(t)return t}}#c(e,t={}){const n=t[e];if("string"==typeof n)return n}setLookupList(e){Array.isArray(e)&&(this.lookupList=e)}}const cm=e=>Bs.getNeedsMapping()||e?.info===$s.OBJECT_INFO.OBJECT_INFO?$s.OBJECT_INFO.OBJECT_INFO:$s.CASE_INFO.CASE_INFO,lm=(e,t)=>{const n=cm(t);e.data=e.data??{};const{assignments:s,availableActions:r=[]}=e.data[n]??{};if(s&&Array.isArray(s)&&s.length>0&&s[0].actions&&Array.isArray(s[0].actions)&&!t?.stopMergeActions){s[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||r.push(e)})),e.data[n]=e.data[n]??{},e.data[n].availableActions=r}},um=(e,t)=>{const n=cm(t),s=Zm();if(e.confirmationLinks&&(e.data=e.data??{},e.data[n]=e.data[n]??{},e.data[n].confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return void 0===s||s||lm(t),t=((e,t)=>{const n=[e];return t.data=t.data??{},t.data.caseMessages=n,t})(n,t),t}if(!e.uiResources||!e.data||!e?.uiResources?.root)return e;const r=e,{uiResources:{actionButtons:a,navigation:o,settings:i},nextAssignmentInfo:c}=r;if(a&&a.main&&(a.main=a.main.map((e=>"createWork"===e.jsAction?{...e,jsAction:"createCase"}:e))),r.data&&r.data[n]&&(a&&(r.data[n].actionButtons=a),o&&(r.data[n].navigation=o),i&&(r.data[n].settings=i),t&&t[$s.ACTIONS.DELETEAVIALACTIONS]&&delete r.data[n].availableActions,void 0===s||s||lm(r,t),e.confirmationNote)){const{confirmationNote:e}=r,t=[e];r.data.caseMessages=t}return t&&t.isCreateDataObject&&(r.data=r.data??{},r.data.dataInfo={},r.data.dataInfo.content=r.data.pyPortal,r.uiResources.root.config.context="dataInfo.content",r.uiResources.context_data.dataInfo=r.uiResources.context_data.dataInfo??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data.dataInfo.content??{},r.uiResources.context_data.dataInfo.content=r.uiResources.context_data?.pyPortal,delete r.data.pyPortal,delete r.key),c&&(r.data=r.data??{},r.data.nextAssignmentInfo=c),r},dm=async e=>{const t=um(e),n=lS.getIn(t,Gs.COMPONENTS);ng(t,{},!0),await Sg(n)},pm=(e,t,n)=>gS.resolveView(e,t,n),gm=(e,t,n,s)=>{const r=e[t];if(!r)return!1;const a=lS.getIn(r,$s.CASE_INFO.CASE_INFO_CLASSID);return lS.getIn(r,Gs.CASE_INFO.VIEW_NAME)===n&&(!s||a===s)},hm=e=>{const{accessedOrder:t,items:n}=e;if(!t||!n)return null;const s=t[t.length-1];return s?n[s]?.context??null:null},fm=(e,t="",n="")=>{let s=n||null;if(!s){const n=`${$s.APP.APP}/primary`;s=((e,t)=>{const n=HC();if(!n)return null;const s=n.getState(),{data:r,containers:a}=s;if(!a||!r)return null;const o=`${$s.APP.APP}/primary`;if(a[o]){const n=hm(a[o]);if(n&&gm(r,n,e,t))return n}for(const n of Object.keys(a)){if(n===o)continue;const s=hm(a[n]);if(s&&gm(r,s,e,t))return s}return null})(e,t),s||(s=By(n))}if(!s)return Promise.reject(new Error(`Unable to find an active context for view "${e}".`));const r=zC(s);if(!r)return Promise.reject(new Error(`No data found for context "${s}".`));const a=lS.getIn(r,$s.CASE_INFO.CASE_INFO_ID)||"",o=Dm({options:{context:s,pageReference:$s.CASE_INFO.CASE_INFO_CONTENT}});return IC(),o.getPConnect().getActionsApi().refreshCaseView(a,e,"",{autoDetectRefresh:!0,preserveClientChanges:!1}).finally((()=>{EC()}))};let mm=function(e){return e.CURRENCY="Currency",e.PERCENTAGE="Percentage",e.DECIMAL="Decimal",e.INTEGER="Integer",e.TEXT_SINGLE_LINE="Text (single line)",e.TEXT_PARAGRAPH="Text (paragraph)",e.EMAIL="Email",e.URL="URL",e.PHONE="Phone",e.PICKLIST="Picklist",e.USER_REFERENCE="User Reference",e.BOOLEAN="Boolean",e.DATE_AND_TIME="Date & time",e.DATE_ONLY="Date only",e.TIME_ONLY="Time only",e.IDENTIFIER="Identifier",e.DOUBLE="Double",e.TEXT_ENCRYPTED="Text Encrypted",e.PASSWORD="Password",e}({});const Im=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=gS.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=gS.getContextPath(this.datasource,this.index);return this.index+=1,Dm({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Em{constructor(e,t){this.children=e,this.index=0,this.options=t}hasNext(){return this.index<this.children.length}next(){if(!this.hasNext())throw new Error("No Children");const e=this.index,t=this.children[e];this.index+=1;const n=t?._relativePath??`${this.options?.relativePath??""}.children[${e}]`;return Dm({meta:t,index:this.index,options:{...this.options,relativePath:n}})}resetIndex(){this.index=0}}const ym=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new Im(e,e.context||"",t);if(n){const n=XC(`${t.context}.${Gs.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new Im(e.children[0],n||e.context,t)}return e?.children?new Em(e.children,t):void 0};class Am{static allowedComponetsForBulkProcessing={Currency:!0,TextInput:!0,Phone:!0,Percentage:!0,Email:!0,Integer:!0,Decimal:!0,URL:!0,SemanticLink:!0,Checkbox:!0,RadioButtons:!0,DateTime:!0,Date:!0,Time:!0,Text:!0,TextArea:!0,RichText:!0,Dropdown:!0,Search:!0,Location:!0,Attachment:!0,AutoComplete:!0,MultiSelect:!0,UserReference:!0,Region:!0,TextContent:!0,View:{Forms:!0,DefaultForm:!0,OneColumn:!0,TwoColumn:!0,ThreeColumn:!0}};static getItemView(e,t){const n=[];if(e&&["portal","view"].includes(t)){const{accessedOrder:t,items:s}=e;if(t&&s){const e=t[t.length-1];s[e]&&s[e].view&&Object.keys(s[e].view).length>0&&n.push(s[e])}}return n}static getDependentProperties=e=>{let t=[];return e._rawConfig?.config?.parameters?t=Object.values(e._rawConfig?.config?.parameters||{}):e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters&&(t=(e.getFieldMetadata(e.getStateProps()?.value)?.datasource?.parameters||[]).map((e=>e?.value))),t.filter((e=>Xg.isProperty(e))).map((e=>Xg.getPropertyName(e)))}}const Cm=new Am;let Sm;Object.freeze(Cm);const _m=(e,t,n)=>{e&&(Object.keys(e).forEach((s=>{if("children"!==s){const r=e[s],a=Ro.trimAnnotation(r);if("string"!=typeof a&&"string"!=typeof r||!(lS.isValidAnnotation(r)&&lS.isPropertyRef(a)||r.startsWith("@W ")||r.startsWith("@DW ")||r.startsWith("@E ")||r.startsWith("@PARAGRAPH ")||r.startsWith("@ATTACHMENT "))){if(Array.isArray(a))a.forEach(((e,n)=>{const r={parentStateObj:t,parentKey:s,isObjHasValue:!!t[s]};t[s]=t[s]||[],t[s][n]=Object.create({}),_m(e,t[s][n],r)}));else if(a&&"object"==typeof a&&"exp"!==a.type){const e={parentStateObj:t,parentKey:s,isObjHasValue:!!t[s]};t[s]=t[s]||{},_m(a,t[s],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),r.startsWith("@PARAGRAPH ")?t[s]=r:t[s]=a}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Nm=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...lS.deepClone(t.inheritedProps)]};class Tm{constructor(e){const{meta:t,isRoot:n,options:s={},useCustomContext:r}=e;this.meta=t,this._isRoot=n,this.options=s,this.useCustomContext=r,this._rawConfig=t?.config,this._isExpressionExist=!1,this._isWhenExist=!1,this._isValidatorExist=!1,this._pageReference="",this._referenceContext="",this._contextName="",this._stateProps={},this._actions={},this._children="",this._additionalRegisteredProps={},this._caseInfo=null,this._dataInfo=null,this.viewName=s.viewName,this.parentViewName=s.viewName??"",this._referenceList=s.referenceList||"",this._isInsideList=s.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=s.localeReference,this._containerTarget=s.target,this._readOnly=t?.config?.readOnly||s.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=s.categoryName||"",this._relativePath=s.relativePath??"",s.inheritedConfig&&(this._inheritedConfig=lS.deepClone(s.inheritedConfig)),t?.config?.inheritedProps&&Nm(this._inheritedConfig,t?.config),this.meta?.config?.value&&"string"==typeof this.meta?.config?.value&&this.meta?.config?.value?.startsWith("@P ")&&this.meta?.config?.value?.includes("(")&&(this.meta.config.value=ap.formatePageReferenceToArrayIndex(this.meta.config.value)),_m(this._rawConfig,this._stateProps),this._isState=!lS.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=lS.isExpressionExist(this._rawConfig.config),this._isWhenExist=lS.isWhenExist(this._rawConfig.config),this._isValidatorExist=Zp.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=$s.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context||"",this._type=this.meta?.type;let a=this.options.pageReference;this.options.pageReference&&(a=Ro.handleAnnotation(this.options.pageReference,this)),this._pageReference=gS.getContextPath(a||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t);const o="reference"===this._type&&lS.isWhenExist({visibility:this.meta?.config?.visibility}),i=this._checkAndSetDecisionParagraph("instructions",this._rawConfig?.instructions);let c=!1;if("reference"!==this._type&&t&&(this._rawConfig=gS.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=Ro.trimAnnotation(e.localeReference)||s.localeReference,this._isExpressionExist=lS.isExpressionExist(e),this._isWhenExist=lS.isWhenExist(e),this._isValidatorExist=Zp.isValidatorExist(e),c=this._checkAndSetDecisionParagraph("label",e?.label)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===Gs.VIEW&&this._rawConfig.name&&(this.viewName=Ro.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&SE(this)}(o||i||c)&&EE(this.viewName,this._contextName,this._pageReference)}_checkAndSetDecisionParagraph(e,t){let n=!1;if(t&&t.startsWith(Gs.PARAGRAPH_ANNOTATION)){const s=Ro.trimAnnotation(t);n=Xf.isDecisionParagraph(s,this.getCurrentClassID()),n&&this.setStateProps({[e]:t})}return n}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=Ro.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=Ro.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,contextPage:n,label:s,required:r,readOnly:a,disabled:o,visibility:i,validationType:c,caption:l,allowMultiple:u,useRFC822Validation:d}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const p="Address"===this._type&&this._rawConfig?.config?.associatedView?Ro.trimAnnotation(this._rawConfig.config.associatedView):"",g=s||l,h=this._rawConfig?.type,f={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Ro.trimAnnotation(t),label:g?.startsWith("@")?Ro.handleAnnotation(g,this,void 0):g,required:r,readOnly:a,disabled:o,visibility:i||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:c,...n&&{contextPageRef:`${this._pageReference}${Ro.trimAnnotation(n)}`},componentName:h,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:u,isDeclarativeTarget:this.isDeclarativeTarget(),...this._type===mm.EMAIL&&{useRFC822Validation:d}};rd.addFieldNode(this._contextName,this._pageReference,(p||this.categoryName||this.viewName)??"",e,this.getValue(e),f)}}removeNode(){if(Object.hasOwn(this._rawConfig?.config??{},"value")&&"Address"!==this._type)rd.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",Ro.trimAnnotation(this.getPropertyName()),this.index);else if("Address"===this._type&&this._rawConfig?.config?.associatedView)rd.removeViewNode(this._contextName,this._pageReference,Ro.trimAnnotation(this._rawConfig.config.associatedView),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference,t={visibility:this.options?.visibility??this._rawConfig?.config?.visibility??this._rawConfig?.config?.referenceVisibility};rd.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index,t)}}addViewNode(){if(!this.isReadOnly()){if(this._rawConfig?.type?.toLowerCase()===Gs.VIEW&&this._rawConfig.name&&this.viewName){const e={visibility:this.options?.visibility??this._rawConfig.config?.visibility??this._rawConfig.config?.referenceVisibility};rd.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName,e)}"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&rd.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&rd.addViewNode(this._contextName,this._pageReference,Ro.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&rd.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}}addWhenNode(){let e="",t="";const n=lS.getWhenNames(this._rawConfig?.config),s=this.getRawConfigProps();if(s?.type&&s?.type?.toLowerCase()===Gs.VIEW)t=Gs.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=Gs.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=Ro.isProperty(n)?Ro.trimAnnotation(n):""}e&&n.forEach((n=>{rd.addWhenNode(this.getContextName(),this.getPageReference(),t,e,n,{pageReference:this.getPageReference(),context:this.getContextName()})}))}updateContextTree(){if(this.isVisible()&&(this.addViewNode(),this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&"DISPLAY_ONLY"!==this._inheritedConfig.displayMode&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode&&this.addFieldNode(),(this._rawConfig?.type?.toLowerCase()!==Gs.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList&&"DISPLAY_ONLY"!==this._rawConfig.config?.displayMode)){const{value:e,label:t,required:n,contextPage:s,readOnly:r,disabled:a,visibility:o,validationType:i,selectionMode:c,selectionList:l,selectionKey:u,referenceList:d,renderMode:p,caption:g,uniqueField:h}=this.getRawConfigProps(),f=t||g;let m=[];["Multiselect","Checkbox"].includes(this._rawConfig.type)&&(m=this.getSelfReferencingDatapageKeys()),rd.addPageListNode(this._contextName,this._pageReference,this.viewName??"",Ro.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Ro.trimAnnotation(this.getPropertyName()),label:f?.startsWith("@")?Ro.handleAnnotation(f,this,void 0):f,required:n,readOnly:r,disabled:a,...s&&{contextPageRef:`${this._pageReference}${Ro.trimAnnotation(s)}`},visibility:o||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:i,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:c,selectionList:l,renderMode:p,referenceList:d,selectionKey:u,index:this.index,uniqueField:h,selfReferencingDatapageKeys:["Multiselect","Checkbox"].includes(this._rawConfig.type)?m:void 0});const I=this.getValue(Ro.trimAnnotation(this.getPropertyName()),this._pageReference)||[];rd.updatePageListNode(this._contextName,this._pageReference,Ro.trimAnnotation(this.getPropertyName()),I.length)}this.isWhenExist()&&this.addWhenNode(),this.isVisible()||this.removeNode()}getStateProps(){return this._stateProps}setStateProps(e){lS.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getSharedDataPageForReferenceList(){const e=this.getCaseInfo().getClassName(),t=this.getCurrentView();if(!t||!e)return;const n=pm(t,this,e);if(!n)return;const s=this.getRawMetadata()?.config?.referenceList;if(!s)return;let r={};"object"==typeof n.config?.parameters&&null!==n.config.parameters&&(r=n.config.parameters);const a=lS.generateDataPageHashWithParameters(r,s,this),o=YC(),i=o?o[s]?.[a]:{};return Array.isArray(i?.[ks.getDefaultQualifiedName("pxResults")])?i[ks.getDefaultQualifiedName("pxResults")]:void 0}getCaseInfo(){return this._caseInfo||(this._caseInfo=new qf(this)),this._caseInfo}getDataInfo(){return this._dataInfo||(this._dataInfo=new zf(this)),this._dataInfo}getCaseLocaleReference(e){const t=this.getRawConfigProps(),n=e||this.getValue(Gs.getProperty(Gs.CASE_INFO.CASE_TYPE_ID))||this.getValue(Gs.CLASS_ID,Gs.getProperty(Gs.DATA_INFO.DATA_INFO_CONTENT))||t?.referenceClass||t?.className;return n?om(rm,n):null}getListActions(){return Mp(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())||/\[\d+\]/g.test(this.getPropertyName())}getRawMetadata(){return this.getMetadata()}setReferenceList(e){this._referenceList=e}getComponentConfig(){return this.getMetadata()?.config||{}}isExpressionExist(){return this._isExpressionExist}isWhenExist(){return this._isWhenExist}isConditionExist(){return this.isExpressionExist()||this.isWhenExist()}isBoundToState(){return this._isState}getPageReference(){return this._pageReference}getPropertyName(){const e=this.getComponentConfig();let t;return t="multi"===e.selectionMode?"selectionList":"single"===e.selectionMode&&e.selectionKey?"selectionKey":"Editable"===e.renderMode?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return gS.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[Gs.CONTAINERS.ROOT_CONTAINER,Gs.CONTAINERS.VIEW_CONTAINER,Gs.CONTAINERS.FLOW_CONTAINER,Gs.CONTAINERS.MODAL_VIEW_CONTAINER,Gs.CONTAINERS.PREVIEW_VIEW_CONTAINER,Gs.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=Cy.PRIMARY,name:s,routingInfo:r}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===r)&&s?s:this.options.containerName||n}getTarget(){return this._containerTarget}getCurrentView(){return this.viewName}populateSuggestionProps(e){if(this._rawConfig?.config&&Object.hasOwn(this._rawConfig.config,"value")&&this.getStateProps()?.value&&this.options.hasForm){const t=f?.getStore()?.getState()?.data[`${this.getContextName()}/${Gs.SUGGESTION}`],n=this.getStateProps()?.value,s=gS.getContextPath(this.getPageReference(),n),r=t?Qf.getSuggestionsContext(this.getContextName()).getField(s):void 0;this._hasSuggestions=!!r,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Lp.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig},n=em.getStrategy(this._type);return n?.applyFallback(t),this.populateSuggestionProps(t),this.resolveConfigProps(t,e),lS.resolveStringBooleans(e)}getLocalizationService(e){const t=this.getComponentName(),n=e||("View"===t?this._rawConfig?.config?.template:t),s=xA.getLocale()??"en-US",r=new im(s,n),a=this.getCaseLocaleReference();return r.setLookupList(["APP!APPLICATION"]),a&&r.setLookupList([a]),r}getRawConfigProps(){const{_deepProps:e,...t}={...Lp.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),t}resolveConfigProps(e,t={}){return e&&(gS.resolveProps(e,t,this),Ro.handleComponentMapping(t,{type:this.getComponentName()||"",config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),_m(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=e=>e?.map((e=>({...e,message:this.getLocalizationService()?.getLocalizedMessage(e.message)??e.message}))),n=this.getComponentName(),s=this.getComponentConfig(),r=n===Gs.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(n===Gs.MODAL_VIEW_CONTAINER||n===Gs.CASE_CREATE_STAGE||n===Gs.OBJECTACTIONCONTAINER){const n=Fy(`${Gs.APP.APP}/${this.getContainerName()}`),s=ud({context:n,category:$s.PAGE});e.pageMessages=t(s),this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||Ro.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=ud({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:$s.MESSAGES.MESSAGES_TYPE_ERROR}),s=ud({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:$s.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){e.validatemessage=n.map((e=>this.getLocalizationService().getLocalizedMessage(e.message).replace(/\.$/,""))).join(". ")+(n[n.length-1].message.endsWith(".")?".":""),e.status=Gs.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status;const s=n?.find((e=>"error"===e.type&&"required"===e.subType));s&&!e.required&&this.isVisible()&&this.clearErrorMessages({property:t,subType:"required"})}s&&s[0]&&(e.infoMessage=s[0].message,e.status=Gs.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(n===Gs.ROOT_CONTAINER){const n=hd(r,Fy(`${Gs.APP.APP}/${this.getContainerName()}`));e.httpMessages=Array.isArray(n)?t(n):n,this._stateProps.httpMessages=e.httpMessages;const s=Qf.getSharedState("isLoggedOut");e.isLoggedOut=s,this._stateProps.isLoggedOut=s;const a=ud({context:Gs.APP.ROOT,category:"PAGE"});e.pageMessages=t(a),this._stateProps.pageMessages=e.pageMessages}if(n===Gs.HYBRID_VIEW_CONTAINER){const n=ud({context:Gs.APP.APP,category:Gs.HTTP});e.httpMessages=t(n),this._stateProps.httpMessages=n}if(n===Gs.APP_SHELL&&e.portalDocMode===Gs.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=ef.getOpenedCaseItems(`${$s.APP.APP}/${Gs.PRIMARY}`),this._stateProps.activeCases=e.activeCases),n===Gs.APP_SHELL){const n=Gs.APP.APP,s=Fy(`${n}/${this.getContainerName()}`),r=[...ud({context:n,category:"PAGE"})||[],...ud({context:s,category:"PAGE"})||[]],a=r.length>0?r:void 0;e.pageMessages=a&&t(a),this._stateProps.pageMessages=e.pageMessages}if(e.value&&n===Gs.SCALARLIST&&(this._stateProps.value=e.value),n===Gs.APP_SHELL||n===Gs.MODAL_VIEW_CONTAINER||n===Gs.CASE_CREATE_STAGE||s.template===Gs.CASE_PREVIEW||s.template===Gs.RULE_PREVIEW){let t=ud({context:Gs.APP.APP,category:"HTTP"});const n="HYBRID"===xA.getRenderingMode()?`${this.getContextName()}/${this.getContainerName()}`:`${Gs.APP.APP}/${this.getContainerName()}`,s=ud({context:Fy(n),category:"HTTP"});t?s&&(t=t.concat(ud({context:Fy(n),category:"HTTP"}))):t=ud({context:Fy(n),category:"HTTP"}),e.httpMessages=t?t.map((e=>this.getLocalizationService().getLocalizedMessage(e.message))):t,this._stateProps.httpMessages=e.httpMessages,t?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}if(n===Gs.VIEW_CONTAINER||n===Gs.FLOW_CONTAINER||n===Gs.MODAL_VIEW_CONTAINER||n===Gs.PREVIEW_VIEW_CONTAINER||n===Gs.ROOT_CONTAINER||n===Gs.OBJECTACTIONCONTAINER){if(e.routingInfo=Ha(this.getContainerName(),this._contextName),n===Gs.ROOT_CONTAINER&&(e.rootConfig=Am.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,n===Gs.FLOW_CONTAINER||n===Gs.OBJECTACTIONCONTAINER){const n=ud({context:this.getContextName(),category:Gs.CASEMESSAGES}),s=this.getContextName();e.caseMessages=n,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=Gy(s)[0];if(r){const n=Fy(r),s=f?.getStore()?.getState()?.data;s&&n&&(e.lastUpdateTime=s[n]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=s[n]?.caseInfo?.lastUpdateTime);const a=ud({context:n,category:$s.PAGE}),o=ud({context:n,category:"HTTP"});e.httpMessages=t(o),e.pageMessages=t(a),this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,o?.forEach((t=>{t.errorDetails&&(e.errorDetails=e.errorDetails?e.errorDetails.push(...t.errorDetails):t.errorDetails,this._stateProps.errorDetails=e.errorDetails),t.correlationID&&(e.correlationID=t.correlationID)}))}}if(e.loadingInfo=this.getLoadingStatus(this.getContextName()),e.isAppOffline=zC(Gs.APP.APP).context_data?.isOffline,e.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),n===Gs.MODAL_VIEW_CONTAINER){const t=e.routingInfo?.accessedOrder||[],n=t[t.length-1];n&&(e.loadingInfo=this.getLoadingStatus(n))}this._stateProps.loadingInfo=e.loadingInfo,this._stateProps.isAppOffline=e.isAppOffline,this._stateProps.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else s.template===Gs.CASE_VIEW||s.template===Gs.RULE_VIEW||s.template===Gs.SELF_SERVICE_CASE_VIEW||s.template===Gs.CASE_PREVIEW||s.template===Gs.RULE_PREVIEW||s.template===Gs.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):n===Gs.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);const a=this.getInheritedProps()?.shouldAutoRefresh;a&&this.meta?.config?.value?.includes("@P")&&void 0===this.meta.config._autoRefresh_&&(this.meta.config._autoRefresh_=`@REFRESH ${this.meta.config?.value.split("@P ")[1]}`),this.populateFieldMetadata(e),this.updateContextTree()}populateFieldMetadata(e){const{value:t,datasource:n,listType:s}=this.getComponentConfig(),{propertyValue:r,propertyAnnotation:a}=this.getPropertyDetails(s,n,t);if(r&&"string"==typeof r&&(r.includes(a)||r.includes(Gs.ATTACHMENT_ANNOTATION))){const t=Ro.getPropertyName(r),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=FC(`${this._pageReference}.${t}`,this._contextName);if(e?.additionalInformation&&this.setStateProps({additionalInformation:n}),!Array.isArray(e)){e.additionalInformation=n;const{inputFormat:t}=e;if("string"==typeof t&&t.startsWith("@")){const n=Ro.handleAnnotation(t,this);"object"==typeof n&&null!==n&&"pattern"in n&&"string"==typeof n.pattern?e.inputFormat={pattern:n.pattern}:e.inputFormat=null}}return e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(Gs.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(dC(e,t),e)}const n=t.pop(),s=t.join(".")?".":"";let r=this.getValue(`${s}${t.join(".")}${Gs.CLASS_ID}`);return r||(r=lS.resolvePageClass(e,this.getCurrentClassID())),this.resolvePropertyMetadata(dC(n,r),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(dC(n,this.getValue(`${t.join(".")}${Gs.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(Gs.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[Gs.getProperty($s.CASE_INFO.CASE_INFO)]};return e.CaseID=e.CaseID||this.getValue(Gs.getProperty($s.CASE_INFO.CASE_INFO_PZINSKEY)),{...e,isCaseWideAction:()=>sE(this.getContextName(),this.getPageReference())}}getReferencedUser(e){const t=this.getValue("referencedUsers");if(Array.isArray(t)){const n=t.find((t=>t.UserID===e));if(n)return{userId:n.UserID,UserName:n.UserName}}return t&&t[e]?t[e]:null}getCaseStages(){return this.getDataObject()[$s.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[$s.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}getRelativePath(){return this._relativePath}resolveContextProps(e){const{value:t}=this.getStateProps();t&&(e.error=this.getContextDataValue(`${this.getPageReference()+t}.error`),e.validatemessage=this.getContextDataValue(`${this.getPageReference()+t}.validatemessage`))}isValidatorExist(){return!!this._isValidatorExist}getValidationApi(){return new Gg(this)}isEditable(){return!(!this._rawConfig||!this._rawConfig.config||this._inheritedConfig&&this._inheritedConfig.readOnly||!(Object.hasOwn(this._rawConfig.config,"value")||this._rawConfig.config.selectionList||"Editable"===this._rawConfig.config.renderMode&&this._rawConfig.config.referenceList)||"string"==typeof this._rawConfig.config?.value&&this._rawConfig.config.value.includes("@FILTERED_LIST")||Object.hasOwn(this._rawConfig.config,"readOnly")&&("true"===this._rawConfig.config.readOnly||!0===this._rawConfig.config.readOnly)||Object.hasOwn(this._rawConfig.config,"disabled")&&!0===this._rawConfig.config.disabled)}isVisible(){return this._rawConfig?.config&&Object.hasOwn(this._rawConfig?.config,"visibility")&&"string"==typeof this._rawConfig?.config?.visibility?Ro.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||Ro.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||"string"==typeof this._readOnly&&!0===Ro.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(e=[]){const t="reference"===this._type&&!!this.getReferencedView(),n=t?this.getReferencedViewPConnect().getPConnect():this;if(t){const t=`${this.getRawMetadata()?.config?.name}!${this._ruleClass}`;if(e.includes(t))return!1;e.push(t)}if(!1===this.getConfigProps().visibility)return!1;if(!1===n.getConfigProps().requiresVisibleChildren||!1===this.getConfigProps().requiresVisibleChildren)return!0;const s=n.getConfigProps(),r={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let a=n._type&&r.includeTypes.includes(n._type)&&!r.excludeTemplates.includes(s.template);if(!!s.highlightedData&&s.highlightedData.length&&s.showHighlightedData&&(a=!1),!a)return!0;const o=n.getChildren();return!!o&&o.some((t=>t.getPConnect().getComputedVisibility(e)))}getChildrenIterator(){return this._children.setContext(this.getPageReference()),this._children}setAction(e,t){this._actions[e]=t}getComponentName(){return this._rawConfig&&this._rawConfig.type}isComponentRefreshable(){return!(!this._rawConfig||!this._rawConfig.isRefreshable)}getDataObject(e){return zC(e||this.getContextName())}getImagePath(e){return`${yg.getConstellationServiceUrl()}/v860/${yg.getAppAlias()}/image/${e}?org=${bA.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=this.options?.inheritedProps?.find((e=>"shouldAutoRefresh"===e?.prop));e&&(this._inheritedConfig._inheritedProps=[...this._inheritedConfig._inheritedProps||[],e]);const t=ym(this._rawConfig,{pageReference:this._pageReference,context:this._contextName,localeReference:this._localeRuleName,hasForm:this.options.hasForm,isBulkAction:this.options.isBulkAction,containerName:this.getContainerName(),containerItemName:this.options.containerItemName,viewName:this.viewName,inheritedConfig:this._inheritedConfig,target:this._containerTarget,readOnly:this._readOnly,categoryName:"Group"===this._type?this._rawConfig?.config?.id:null,relativePath:this._relativePath}),n=[];for(;t?.hasNext();){const e=t.next();this.isBulkAction()&&this.#l(e)||n.push(e)}return t?.resetIndex(),n}return[]}setInheritedProp(e,t,n=!1){this._inheritedConfig[e]=t;const s=Object.hasOwn(this._inheritedConfig._deepProps??{},e);(n||s)&&(this._inheritedConfig._deepProps={...this._inheritedConfig._deepProps,[e]:t})}getDeepInheritedProps(){return{...this._inheritedConfig?._deepProps}}getDeepInheritedConfig(){const e=this.getDeepInheritedProps();return Object.keys(e).length>0?{...e,_deepProps:e}:void 0}#u(e){const t=this.getDeepInheritedConfig();return t?{...e,inheritedConfig:{...e.inheritedConfig,...t}}:e}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const s=n||this.getLocaleRuleName(),r=s&&t?`${s}#${t}`:s,a=this.getLocalizationService(r).getLocalizedText(e);return a===e?this.getLocalizationService().getLocalizedText(e):a}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return e=e?.replace(/\((\d+)\)/g,((e,t)=>`[${parseInt(t,10)-1}]`)),this.useCustomContext?(e=e.startsWith?.(".")?e.substring(1):e,e.split?.(".").reduce(((e,t)=>e?.[t]??void 0),this.useCustomContext)):this._hasSuggestions&&this.getStateProps()?.value===e?gS.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${Gs.SUGGESTION}`):gS.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:s,hideLabel:r}=e;r&&(this._inheritedConfig.hideLabel=r),s&&(this._inheritedConfig.referenceType=s),n&&(this._inheritedConfig.displayMode=n),(this._inheritedConfig.readOnly||t)&&(this._inheritedConfig.readOnly=t),e.inheritedProps&&(e.inheritedProps?.forEach((e=>{"required"===e.prop&&(this._inheritedConfig[e.prop]=e.value)})),Nm(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),gS.resolveProps(t,e,this),e}setValue(e,t,n,s=!1,r={}){if(!lS.isValidPropertyReference(e))return;let a,o;const{isArrayDeepMerge:i}=r;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(o=!0)),qC({type:"SET_PROPERTY",payload:{reference:gS.getContextPath(this.getPageReference(),e),value:t,initialValue:n,isImplicit:s,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...a&&{isStrictTracking:a},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){const n={reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()};py(n)}getContextDataValue(e,t){return JC(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(Gs.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let s=Gs.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(s=n>0?this._pageReference.substring(n):this._pageReference),qC(AS({context:this._contextName,data:e,rootPageReference:s}))}replaceState(e,t,n={}){if(!lS.isValidPropertyReference(e))return;const{skipDirtyValidation:s=!1}=n;qC({type:"REPLACE_PROPERTY",payload:{reference:gS.getContextPath(this.getPageReference(),e),value:t,context:this.getContextName(),skipDirtyValidation:s}})}reportError(e,t,n){qC(YS(e,t||{},n,t?.formFields))}getComponent(){return Sm({getPConnect:()=>this})}createComponent(e,t,n,s){let r=this._pageReference;if(t){const e=XC(`${this.getPageReference()}.${Gs.SUMMARY_OF_LISTS}`,t,this._contextName);r=gS.getContextPath(e||t,n)||t}else if(s&&s.pageReference){let e=s.pageReference;e=Ro.handleAnnotation(e,this),r=gS.getContextPath(this._pageReference,e)||""}return Sm(Dm({meta:e,index:this.index,options:this.#u({containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:r,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}),useCustomContext:this.useCustomContext}),s)}getReferencedView(){if(this.meta)return gS.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(Gs.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()},n=this.options?.inheritedConfig?._inheritedProps?.find((e=>"shouldAutoRefresh"===e.prop));return n&&!t?.inheritedProps?.some((e=>"shouldAutoRefresh"===e.prop))&&t?.inheritedProps?.push(n),delete t?.name,delete t?.type,Dm({meta:this.getReferencedView(),options:this.#u({...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName})})}getContainerManager(){return new th(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new Hf(this)),this._actionsApi}getActionManager(){return vg}doesContextExist(e){return iS(e??this.getContextName())}getGoogleMapsAPIKey(){return gn()}getServerURL(){return un()}getLoadingStatus(e){let t=null;return e?(t=zC(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?dd({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName(),...e.subType&&{subType:e.subType}}):e?.context?dd({type:"error",...e}):(dd({type:"error",...e,context:Gs.APP.APP}),dd({type:"error",...e,context:Fy(`${Gs.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return XC(`${this.getPageReference()}.${Gs.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.replaceState(t,e),n?((e,t,n)=>{const s=(e,t)=>{Object.entries(e).forEach((([e,r])=>{if(Array.isArray(r)){const s=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();wp(s,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<r.length;e+=1)Tp(r[e],e,s,void 0,{})}else"object"==typeof r&&s(r,`${t}.${e}`)}))};s(e,t)})(e,t,this):kI(this.getContextName(),`${this.getPageReference()}${t}`,this.getStateProps()?.value??"")}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=Qf.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,s=gS.getContextPath(this.getPageReference(),n),r=t.getField(s);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,r),this.getActionsApi().triggerFieldChange(n,r),t.removeField(s,{actionPerformed:"accepted"})}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=gS.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,Qf.getSuggestionsContext(this.getContextName()).removeField(n,{actionPerformed:"ignored"});const s=To.getDependencies(this._contextName,n);s?.forEach((e=>{Qf.getSuggestionsContext(this.getContextName()).removeField(e,{actionPerformed:"ignored"})}))}}getSelfReferencingDatapageKeys(){const e=[],t=this.getPropertyName(),n=this.getFieldMetadata(t),{datasource:{parameters:s={}}={}}=n||{};return Object.values(s).forEach((n=>{const[,s]=n.split("."),r=t?.split(".").pop();s===r&&e.push(n.substring(n.lastIndexOf(".")+1))})),e}isReadOnlyField(){const{value:e,datasource:t,listType:n}=this.getComponentConfig(),{propertyValue:s,propertyAnnotation:r}=this.getPropertyDetails(n,t,e);if(!s||"string"!=typeof s||!s.includes(r)&&!s.includes(Gs.ATTACHMENT_ANNOTATION))return!1;const a=Ro.getPropertyName(s),o=this.getFieldMetadata(a);if(!o)return!1;const i={...this.getComponentConfig(),fieldMetadata:o,template:this._rawConfig?.config?.template};return this.#d(i,a)}#d(e,t){const n=Xg.isPropertyInternal(t),s=e.datasource,r=this.getComponentConfig().isSearchField,{isClassKey:a,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata??{},c="DataReference"===e.template||"ObjectReference"===this.meta?.type,l=e.listType!==Gs.ASSOCIATED;return!r&&!!(i||n||!s&&(a&&!c||o)&&l)}getPropertyDetails(e,t,n){return e===Gs.ASSOCIATED?{propertyValue:t,propertyAnnotation:Gs.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:Gs.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,t.additionalInformation&&(e.additionalInformation=t?.additionalInformation),t.inputFormat&&"string"!=typeof t.inputFormat&&(e.inputFormat=t.inputFormat),this.#d(e,n)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})),e.fieldMetadata?.isReadOnly&&(e.readOnly=!0,this.registerAdditionalProps({readOnly:!0}))}#l(e){const t=e.getPConnect().getComponentName(),n=e.getPConnect().getConfigProps().template;return!(!0===Am.allowedComponetsForBulkProcessing[t]||!0===Am.allowedComponetsForBulkProcessing[t]?.[n])}}function Dm(e){const t=new Tm(e);return{getPConnect:()=>t}}function Pm(e){Sm=e}const Om={CASE_INFO:`${Gs.DATA}.${Gs.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${Gs.DATA}.${Gs.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${Gs.DATA}.${Gs.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${Gs.DATA}.${Gs.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${Gs.DATA}.${Gs.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${Gs.DATA}.${Gs.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${Gs.DATA}.${Gs.CASE_INFO.ASSIGNMENT_ID}`},Rm=(e,t)=>{const{vcName:n,containerName:s}=t;return s||n||wg.getTargetViewContainerName(e)},bm=e=>{const t=e.lastIndexOf(Gs.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(Gs.UNDERSCORE_STRING);return e.substring(t,n)},vm=e=>e===Cy.WORKAREA,xm=e=>e===Cy.MODAL,wm=e=>e===$r,Mm=e=>e===br,Lm=e=>e&&e.find((e=>e.type===br)),Um=e=>lS.getIn(e,Om.CASE_INFO,{}),Fm=e=>e?e.split(" ").pop():void 0,Vm=e=>lS.getIn(e,Om.CASE_CLASS_NAME,Gs.EMPTY_STRING),jm=(e,t=!1)=>{const n=t?kg(e):Um(e);return tE(n)&&nE(xA.getOperatorIdentifier(),n)},km=e=>lS.getIn(e,Om.CASE_INFO_ID,Gs.EMPTY_STRING),Bm=e=>lS.getIn(e,Om.CASE_FIRST_ASSIGNMENT_ID,Gs.EMPTY_STRING),$m=(e,t)=>{const{removeActionPayload:n,target:s}=t;if(n&&n.containerItemID){const{containerItemID:t,context:r}=n;e.push(zS(kS,{containerItemID:t,context:r||ky(t),target:s}))}},Gm=e=>{const t=e.context;if(ZI.shouldUseUnifiedHandling()){const e=tA(t),{accessedOrder:n=[],type:s}=Ny(e),r=n.filter((e=>e!==t));qC(kS({containerItemID:t,context:t,target:e,containerInfo:{newAccessedOrder:r,containerType:s}}))}else nA(t,{skipDirtyCheck:!0})},Wm=e=>{const t=HC();if(!e)return!1;const n=Ks(e),s=tA(n),r=tA(e);if(!s||!r)return!1;const a=Dy(s,n),o=Dy(r,e);if(!a||!o)return!1;const{key:i}=a||{};let{key:c}=o||{};return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),i&&c&&i===c},Hm=(e,t,n={})=>{const{skipFlowNameUpdate:s}=n,r=km(t);lS.setIn(e,"key",r);const a=tE(Um(t));if(!s&&(e=>{const t=lS.getIn(e,Om.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=Bm(t),[,s]=n.split("!");o={assignmentID:n,isInCreateStage:a},Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,o),lS.setIn(e,"flowName",s)}var o},qm=(e,t)=>{const{attachmentsExist:n}=t;n&&lS.setIn(e,$s.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),lS.setIn(e,$s.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},zm=(e,t,n)=>{let s=Gs.PROMISE_VALUE.RESOLVE;return Lm(e)?(s=Gs.PROMISE_VALUE.REJECT,n?vg.rejectActionByID(t,!0,n):vg.rejectActionByID(t)):vg.resolveActionByID(t),s},Ym=e=>ZI.isCoexistenceCase(e),Km=()=>"true"===xA?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,Qm=(e,t,n,s)=>{const{containerItemID:r}=t;if(r){const{caseClassName:a,skipAssignmentsUpdate:o}=s,i=Ks(r),c=tA(i),l=c&&Ny(c),u=c&&Fy(c),d=Zs(i),p=n?.data?.caseInfo?.ID;u&&l?.items?.[u]?.key===t?.caseID&&e.push(zS(SS,{containerItemID:i,context:i,container:d,containerName:d,caseId:p,viewName:Gs.getDefaultQualifiedName($s.CASESUMMARY_VIEW_NAME),updateData:!0,viewLoadingContainer:{context:i},caseClassName:a,...void 0!==o&&{skipAssignmentsUpdate:o}}))}},Jm=async(e,t)=>{const{context:n,containerItemID:s,shouldUpdateCaseActionsInParentContext:r}=e,a=t?.data?.caseInfo?.ID?km(t):void 0;if(!n||!a)return;const o=a?`${a}_actionsLoading`:"actionsLoading";try{const i=new Tm({}),c=new qf(i);Rg.setComponentCache(o,!0);const l=t?.data?.caseInfo?.caseTypeID?Vm(t):void 0,u=await c.getCaseActions(a,n,{caseTypeID:l});lm(t);const d=lS.getIn(t.data,Gs.getProperty(Gs.CASE_INFO.CASE_INFO_ACTIONS)),p=Array.isArray(u.availableProcesses)&&u.availableProcesses.length>0?{availableProcesses:u.availableProcesses}:[],g=u?.availableActions,h=["pyUpdateCaseDetails"],f=Array.isArray(g)&&g.find((e=>h.includes(e.ID))),m={data:{caseInfo:{availableActions:[...u.availableActions,...void 0!==d?d:[]],...p,editActions:f?[f]:[]}}};Rg.setComponentCache(o,!1),qC(zS(AS,{context:n,...m})),!0===r&&s&&(async(e,t)=>{const{containerItemID:n,caseID:s}=t;if(n){const t=Ks(n),r=tA(t),a=r&&Ny(r),o=r&&Fy(r);o&&a?.items?.[o]?.key===s&&qC(zS(AS,{context:t,...e}))}})(m,e)}catch(e){Rg.setComponentCache(o,!1),console.error("Error fetching case actions:",e)}},Xm=(e,t)=>{const n=Vm(e?.response),s=Um(e?.response),{caseTypeID:r}=s,a=xA.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,Gs.DEFER_UPDATE_CASESUMMARY_VIEW))&&r&&Qm(t,e?.actionInPayload,e?.response,{caseClassName:n,skipAssignmentsUpdate:!e?.actionInPayload?.context?.includes(Gs.PREVIEW)})},Zm=()=>xA.isOptimizedCaseLoadingEnabled(),eI=(e,t)=>{Zm()&&Jm(t,e)},tI=e=>zC(e)?.context_data?.caseViewMode,nI=e=>!(!Rg.getComponentCache("redirectionInProgress")||!e)&&(zm([],e),!0);const sI=new class{confirmHandler=null;registerConfirmHandler(e){this.confirmHandler=e||null}confirm(e){return this.confirmHandler?this.confirmHandler(e):Promise.resolve(window.confirm(e))}},rI=sI,{RESOURCE_TYPES:aI}=$s,oI={PAGE:"page",FORM:"form"},iI={[aI.CASE]:[ta,Zr,ea],[aI.OBJECT]:[ja,ka,$a],[aI.PAGE]:[Kr,Jr],[aI.DATA]:[Qr],ASSIGNMENT:[da]},cI=(e,t,n={})=>{if(!e)return{};const s={etag:e.etag},{RemoteSystemID:r}=n;return e[$s.REMOTE_SYSTEM_ID]||e[$s.REMOTE_SYSTEM_ID.toLowerCase()]||r?s.RemoteSystemID=e[$s.REMOTE_SYSTEM_ID]||e[$s.REMOTE_SYSTEM_ID.toLowerCase()]||r:t&&qs.isRemoteCase(t)&&(s.RemoteSystemID=qs.getRemoteHeader(t)),s},lI=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:s=!1,skipUUID:r=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i,isExternalObject:c}=t;let l={};l=qI(e,{isTransientContext:a,includeDisabledFields:o,isObjectWideAction:i,isExternalObject:c}),n&&(delete l?.caseInfo?.content,a&&(l={}));const u=oy(e,!1),d=zC(e),p=Gn(d,Gs.CASE_INFO.CASE_INFO_ENCRYPTED_CONTENT),g=void 0!==p;!a&&s&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,s])=>{const r=zC(t),a=Gn(r,$s.CASE_INFO.CASE_INFO_CLASSID),o=dC(n,a);("True-False"===o?.type&&!s||""===s)&&delete e.caseInfo.content[n]}))})(l,e);const h=Us(u,l);let f={};({content:f}=((e,t,n=!1,s=!1)=>{let r={};const a=ZI.shouldUseUnifiedHandling()||!n&&!s?t?.caseInfo:t?.objectInfo;return(e||a)&&(r=e?{...t}:{...a}),{content:r}})(a,h,i,c));const m=[...Sp(e)];if(r){const e=ks.getDefaultQualifiedName("EmbedListUUID__");m.forEach((t=>{delete t.content?.EmbedListUUID__,delete t.content?.[e]}))}f.pageInstructions=m;if((mp[e]||[]).forEach((e=>{if(f?.content){const t=e?.replace(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_CONTENT),"");lS.deleteIn(f.content,(e=>{if(!e)return"";const t=e.split(".");let n,s="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return s+=`['${n.substring(0,n.lastIndexOf("["))}']`,s;s+=`['${n}']`}return s})(t))}})),g&&(f.encryptedContent=p),!a&&h?.dataInfo)return f={...h.dataInfo,pageInstructions:f.pageInstructions},{content:f};const I=QC(ks.getQualifiedNameForComplexRuleReferences(".pzAdditionalPayload"),Gs.CASE_INFO.CASE_INFO_CONTENT,e);return f.content&&I&&(f.content[ks.getDefaultQualifiedName("pzAdditionalPayload")]=I),{content:f}},uI=(e,t)=>{let n,s,r={};const a=lS.getIn(e,Gs.UI_RESOURCES),o=lS.getIn(e,"confirmationNote");a?(n=lS.getIn(e,Gs.UI_RESOURCES_CONTEXT_DATA),s=lS.getIn(e,Gs.ROOT),r=lS.getIn(e,Gs.ACTION_BUTTONS)):o&&!t.isActiveWorkAreaPrimaryAndWorkareaAbsent&&(s={});const{data:i={},Errors:c,flowName:l}=e;let{semanticURL:u,key:d}=e;const p=i?.objectInfo?.ID;p&&(d=d||p,u=u||`objects/${p}`);const g=lS.getIn(e,"nextAssignmentInfo",null),h=lS.getIn(e,"nextAssignmentInfo.context",""),f=lS.getIn(e,"confirmationLinks",null),{isInCreateStage:m,openCaseViewAfterCreate:I,debugInfo:E,isExternalObjectCreationFlow:y,isExternalCaseCreationFlow:A}=t;return{data:{...i,key:d,flowName:l,coreHeaders:E&&{debugInfo:{[Gs.COREHEADER_APP_DEBUG_ID]:E.debugId}},[Gs.getProperty(Gs.CASE_INFO.CASE_INFO)]:{...i[Gs.getProperty(Gs.CASE_INFO.CASE_INFO)],actionButtons:r,headers:t.headers},[Gs.CONTEXT_DATA]:m?{...i[Gs.CONTEXT_DATA],...n,openCaseViewAfterCreate:I,errors:c,...y&&{isExternalObjectCreationFlow:y},...A&&{isExternalCaseCreationFlow:A}}:{...i[Gs.CONTEXT_DATA],...n,errors:c}},semanticURL:u,nextAssignmentInfo:g,assignmentContext:h,confirmationLinks:f,key:d,root:s,...t}},dI=async(e,t,n,s=!1,r=!1)=>{const a=lS.getIn(e,Gs.COMPONENTS);if(a)try{await Sg(a)}catch(e){console.error(e)}const o={actionConfig:t,...n};s?A_({...e,options:o,directUrlUpdation:!0}):ng(e,o,r)},pI=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},gI=e=>{if(e){const[,t]=e.split("!");return{key:pI(e),flowName:t}}return{}},hI=(e,t,n,s)=>{switch(!0){case Boolean(e[Gs.ERROR_IN_PAGE_IDENTIFIER]&&e[Gs.ERROR_FIELD_IN_PAGE]):{const r=`${e[Gs.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),a=`${r}${e[Gs.ERROR_IN_PAGE_IDENTIFIER]}`,o=lS.deepClone(e);o[Gs.ERROR_FIELD_IN_PAGE]=r,t.includes(a.slice(1))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("[")))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("(")))?s.push(o):n.push(e);break}case Boolean(e[Gs.ERROR_IN_PAGE_IDENTIFIER]&&!e[Gs.ERROR_FIELD_IN_PAGE]):{const r=e[Gs.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(r)?s.push(e):n.push(e);break}default:n.push(e)}},fI=e=>{const{payload:t}=e,{err:n,context:s,actionMgrID:r}=t,a=n&&n.response?n.response.data:"",o=QI(s);return r&&vg.rejectActionByID(r,!0,n),zS(YS,"Error action triggered",a,s,o)},mI=(e,t)=>qy(e)&&Yy(e)?zS(GS,t):zS(OS,t),II=(e,t)=>{t&&e.caseInfo?.content&&(e.caseInfo.content.remoteCaseMeta=t)},EI=(e,t,n=Gs.APP.APP,s={})=>{let r=null;const{buildNew:a=!0}=s;return qy(e)?r=Yy(e)?Fy(e):Qs(t,n):zy(e)&&(Yy(e)&&!a?r=By(e):Yy(e)&&!a||(r=Qs(t,n))),r},yI=e=>e&&e.type===wr,AI=e=>{let t=!1;const n=Wy(e);for(let e=0;e<n.length;e+=1){const s=n[e];if(s&&gy(s)){t=!0;break}}return t},CI=async(e,t={})=>{let n=!1,s=!1,r={},a=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1,loadingContext:d}=t,p=FA();if(qy(e)){const t=Fy(e);if(!t)return{continueExecution:a,removeActionPayload:r};const s=ky(t);gy(s)&&(n=!0),u||n||(n=AI(t))}else if(zy(e)&&Jy(e)){let t=eA(e);t||(t=Fy(e),s=!0),r.containerItemID=t,r.context=ky(t)}if(n){const t={context:d||e};bg.disableLoadingIndicator(t);const n=l||ry;o=await rI.confirm(p.getLocaleValue(n,"Messages")),bg.enableLoadingIndicator(t)}if(!o&&n&&(r={},a=!1),s){const t={context:d||e};bg.disableLoadingIndicator(t);const n=p.getLocaleValue(ay,"Messages");c?i=await rI.confirm(n):(await rI.confirm(n),a=!1),bg.enableLoadingIndicator(t)}return!i&&s&&(r={},a=!1),{continueExecution:a,removeActionPayload:r}},SI=(e,t)=>{let n=!1;const s=xA.isCoexistenceAppOfType(Gs.APP_TYPE.UIKIT),{insKey:r,isParallelCall:a,skipFlowNameCheck:o}=t;if(!r)return{};const[,i]=r.split("!")||"",c=o?r:pI(r),l=xy(e,c);let u={},d=!1;if(l&&!s&&((e,t)=>{const n=Dy(e,t);return n?.resourceType})(e,l)===t?.type&&(n=!0,u=Dy(e,l),!o)){let e=u?.flowName;const t=bm(l),s=$y(l);if(s.length){const n=((e,t)=>e?.includes(Gs.WORKAREA)?Gs.WORKAREA:t)(s[0],t),r=Wa(n,s[0]);e=Dy(r,s[0])?.flowName}else n=e===i;(e!==i||a)&&(d=!0)}return n=((e,t)=>!t&&e)(n,t.forceRefresh),{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:r}}},_I=(e,t,n)=>e===aI.PAGE?((e,t={})=>{let n=!1;const{semanticURL:s}=t,r=xy(e,s);return r&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:r,semanticURL:s}}})(t,n):e===aI.ASSIGNMENT?SI(t,{...n,type:e}):e===aI.CASE||e===aI.OBJECT?SI(t,{...n,skipFlowNameCheck:!0,type:e}):{},NI=e=>{if(e){const t=(e=>{const t=Py(e);if(!t)return null;for(const[e,n]of Object.entries(t))if(!n.key&&n.resourceType===$s.PAGE)return e;return null})(e);if(t)return{activate:!0,activateContainerActionPayload:{target:e,containerItemID:t,semanticURL:""}}}return{activate:!1}},TI=(e,t,n)=>{const{semanticURL:s,isDefaultNavPage:r}=((e,t)=>{const n=u_(Kr,{page:e,pageClass:t}),s=HC()?.getState()?.data?.app?.pyPortal?.pyPrimaryNavPages,r=Array.isArray(s)?s[0]:void 0;return{semanticURL:n,isDefaultNavPage:!(r?.pyRuleName!==e||r?.pyClassName!==t)}})(e,t);if(n&&s&&!r){const e=_I(aI.PAGE,n,{semanticURL:s});if(e.activate)return{semanticURL:s,activate:!0,activateContainerActionPayload:e.activateContainerActionPayload}}if(r){const e=NI(n);return e.activate?{semanticURL:s,...e}:{semanticURL:"",activate:!1}}return{semanticURL:s,activate:!1}},DI=(e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e),PI=(e=[])=>{Yy(`${Gs.APP.APP}/${Gs.PREVIEW}`)&&e.push(zS(PS,Xy({context:$s.APP.APP,name:Gs.PREVIEW})))},OI=e=>{let t;for(const n of Object.keys(iI))if(iI[n].includes(e)){t=n;break}return t},RI=(e,t,n="",s={})=>{const{data:r={},context:a,caseViewMode:o,skipMergeAssignmentsAndActions:i=!0}=e,c={data:{...r},caseViewMode:o,context:Ks(a)};lS.deleteIn(c.data,"shared"),lS.setIn(c.data,["context_data","caseViewMode"],o),t.push({type:ya,payload:{context:c.context,skipMergeAssignmentsAndActions:i}});const l=n&&![$s.CASE_INFO.CASE_INFO_CONTENT,$s.DATA_INFO.DATA_INFO_CONTENT].includes(n),{propertiesToReplace:u=[]}=s;t.push(zS(AS,{...c,...l&&{uiRootReference:n}},...u.length>0?[{propertiesToReplace:u}]:[]))},bI=e=>{if(Array.isArray(e)&&e.length>0){const t=(e=>{const t=e[0];for(const t of e)if("other"===t?.payload?.nextAssignmentInfo?.context||"remote"===t?.payload?.nextAssignmentInfo?.context)return t;return t})(e),n=lS.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const s=lS.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:lS.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:lS.getIn(t,["payload","context"]),context:lS.getIn(t,["payload","context"])},s={type:Cr,payload:{...n}};e.push(s),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),qC(e),e=e.filter((e=>e.type!==Cr))}const r=((e,t,n)=>({assignmentID:e,vcName:Gs.PRIMARY,targetContainerName:lS.getIn(t,["payload","target"]),context:lS.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(s,t,n);qy(r.targetContainerName)||t?.payload?.containerName!==Gs.WORKAREA||(r.isMultiDoc=!0,e=[]);const a={type:Sr,payload:{...r}};e.push(a),qC(e)}else qC(e)}},vI=(e,t)=>Us(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),xI=e=>{let t={},n=SA(e);for(;n;){const e=lI(n);t=vI(e.content,t),n=SA(n)}return t},wI=e=>{e?.containerItemID&&Qf.updateState(e.containerItemID,"traditionalGadgetId",ZI.getUniqueGadgetId(),{skipDirtyValidation:!0})};class MI{static getChanges(e){return{...oy(e)}}static getSubmitData(e,t){const{isTransientContext:n=!1,includeDisabledFields:s=!1,onlyChangedData:r=!1}=t||{},{content:a}=lI(e,{isTransientContext:n,includeDisabledFields:s,onlyChangedData:r});return a}static isStateModified(e){return gy(e)}static hasUnsavedChanges(e){return gy(e)||xp(e??null)}static resetComplexObjectDirtyStatus(e){return ly(e)}static isFormValid(e,t){return YI(e,t)}static clearChangedProperties(e){return _p(e),Cp(e),fy(e)}static getEditableFields(e){return JI(e)}static setCustomValidator(e,t){Zp.register(e,t)}static isPropertyEditable(e,t){return MI.getEditableFields(e).some((e=>e.name===t))}}const LI=MI;const UI=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}getAllStateMachines(e,t,n){return{states:this.states?.[e]?.[`${t}${n}`],unConnectedStates:this.unConnectedStates?.[e]?.[`${t}${n}`]}}getAllStateMachinesByContext(e){return{states:this.states?.[e],unConnectedStates:this.unConnectedStates?.[e]}}isStateMachineExist(e,t,n){return!!this.states?.[e]?.[`${t}${n}`]||!!this.unConnectedStates?.[e]?.[`${t}${n}`]}getUnConnectedStateMachines(e){return this.unConnectedStates?.[e]}setStateMachine(e,t,n,s){const r=`${n}${t}`,{stateMachine:a}=this.getStateMachineObjByPath(r,e,!0,!0),o=(t,n,s=!1)=>{const r=s?this.states:this.unConnectedStates;r[e]||(r[e]={}),r[e][t]||(r[e][t]={}),r[e][t]=n};if(a&&a.targetPageReference!==s.targetPageReference)return a.addChild(s),void o(r,s);const i=Object.entries(this.states[e]||{}).filter((([e])=>{if(e.includes(r)){const t=e.substring(0,r.length).length;return e.substring(t).startsWith("[")||e.substring(t).startsWith(".")}return!1})).reduce(((e,[t,n])=>({...e,[t]:n})),{});Object.keys(i)?.length?(Object.entries(i).forEach((([t,n])=>{delete this.states[e][t],s.addChild(n),o(t,n)})),this.states[e][r]=s):o(r,s,!0)}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},s=[];return Object.keys(n).sort().forEach((r=>{const a=rd.getContextReferences(e)?.get(r),o=a&&gS.resolveContextTreeNodeProps(a.props)||{},i=n[r];if(a&&!0!==o.readOnly){const e=i.buildSubmitPageInstructions(t);s.push(...e)}else if(i.hasEncryptedContent){const e=i.buildSubmitPageInstructions(t).filter((e=>void 0!==e.encryptedContent));s.push(...e)}else a||this.setStateMachineEmpty(e,r)})),s}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const s={};return Object.keys(t).forEach((e=>{const s=t[e].getChangeList();n={...n,...s}})),lS.flatten(n,"",s),s}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}setStateMachineEmpty(e,t){const n=this.getStateMachine(e,t,"");n.root=null,n.current=null,n.hasEncryptedContent=!1;const s=this.getUnConnectedStateMachines(e)||{};Object.keys(s).forEach((e=>{e.includes(t)&&delete s[e]}))}removeStateMachine(e,t){delete this.states[e]?.[t]}createStateMachine(e,t){let n=e.substring(0,e.lastIndexOf("["));const s=n.substring(n.lastIndexOf("."));n=n.substring(0,n.lastIndexOf(".")),n&&s&&Ep(t,s,n)}getStateMachineObjByPath(e,t,n,s=!1){const r=/\[\d+\]$/gm,a=e;let o;for(;e&&!this.isStateMachineExist(t,"",e);){const i=tA(t),c=Dy(i,t)||{},l=c?.isPageGroup||c?.subscriptFieldName||"string"==typeof c?.index;if(o=null,n&&e.endsWith("]")){if(o=e.match(r),o=o?.[o.length-1]?.substring(1,o[o.length-1].length-1),[e]=e.split(r),!s&&!this.isStateMachineExist(t,"",e)){this.createStateMachine(a,t);break}}else{if(c?.index&&e.includes(c.index)&&l){const t=e.split(".");o=t[3],e=t.slice(0,3).join(".");break}e=e.substring(0,e.lastIndexOf("."))}}return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:o}:{}}executeStateMachine(e,t,n,s=!0,r={}){const{stateMachineTarget:a,index:o}=this.getStateMachineObjByPath(t,e,s);if(!a)return!1;const i=tA(e),c=Dy(i,e)||{};let[,l]=t.split(a);if(!l)return!1;const u=c?.subscriptFieldName&&t.includes(c?.index)||c?.isPageGroup;null!==o&&([,l]=u?l.split(/(?=\.\w+)/):l.split(/^\[\d+\]/gm));const d={[VI(l)]:n},p=this.getStateMachine(e,"",a);if(null!==o)if(u){const t=Sp(e);"CREATE"===c?.resourceStatus&&t.forEach((e=>{"UPDATE"!==e.instruction||e.groupIndex!==c.index||e.content[c.subscriptFieldName]||p.update({[c.subscriptFieldName]:c.index},o,r.skipStateUpdate??!0,r)})),p?.update(d,o,r.skipStateUpdate??!0,r)}else p?.update(d,Number(o)+1,r.skipStateUpdate??!0,r);else p?.updatePage(lS.unflatten(d));return!0}setUniqueField(e,t,n){const s=rd.getContextReferences(e)?.get(n)?.props?.uniqueField;s&&(t.content||(t.content={}),t.content[VI(s)]=crypto.randomUUID())}getBasePageReference(e){return QC($s.DATA_INFO.DATA_INFO_CONTENT,"",e)?$s.DATA_INFO.DATA_INFO_CONTENT:$s.CASE_INFO.CASE_INFO_CONTENT}mergeServerPageInstructions(e,t){t.forEach((t=>{if(t.target){const n=lS.convertClipboardPageToPageRefNotation(t.target),s=`${this.getBasePageReference(e)}${n}`;if(!this.isStateMachineExist(e,s,"")){const t=s.substring(s.lastIndexOf(".")),n=s.substring(0,s.lastIndexOf("."));Ep(e,t,n)}const r=this.getStateMachine(e,s,"");"INSERT"===t.instruction&&this.setUniqueField(e,t,s),void 0!==t.encryptedContent&&r&&(r.hasEncryptedContent=!0),r?.insertNode(t)}}))}registerForServerChanges(){BC.registerForListChanges(((e,t,n)=>{setTimeout((()=>{this.generatePageInstructions(e,t,n)}),0)}))}registerForServerChangesSync(){BC.registerForListChanges(((e,t,n)=>{this.generatePageInstructions(e,t,n)}))}generatePageInstructions(e,t,n){const s="].";if(!t.includes(".classID")&&LI.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n),!t.includes(".classID")&&t.includes(s)){const r=t.substring(0,t.lastIndexOf("[")),a=LI.getEditableFields(e);if(["multiselect","checkbox"].includes(a.find((e=>e.name===r))?.type)){const a=rd.getContextReferences(e),o=a?.get(r),i=t.substring(t.lastIndexOf(s)+2);o?.props.selfReferencingDatapageKeys?.includes(i)&&this.executeStateMachine(e,t,n)}}}unRegisterForServerChanges(){BC.unRegisterForListChanges()}},FI={},VI=e=>e.startsWith(".")?e.substring(1):e,jI=e=>{delete FI[e]},kI=(e,t,n)=>{const s=VI(t);FI[e]?FI[e].fieldOrder[s]=n:FI[e]={fieldOrder:{[s]:n}}},BI=(e,t={})=>{const{includeDisabledFields:n=!1}=t,s=gS.resolveContextTreeNodeProps(e),r=!0!==s.readOnly&&!1!==s.visibility&&(n||!0!==s.disabled),a="string"==typeof e?.value&&e?.value.includes("@FILTERED_LIST"),o=(e=>e.selectionList||e.selectionKey||"Editable"===e.renderMode&&e.referenceList)(e);return(e?.value||o)&&!a&&r},$I=(e,t,n,s,r)=>(UI.executeStateMachine(e,s,gS.getLitePropertyValue(n,t))||r.push(s),r),GI=(e,t,n)=>{const s=t.isInsideList,{ignoreFieldsInsideList:r=!0}=n;return(!s||s&&!r)&&!Array.isArray(gS.getLitePropertyValue(t,e))&&!(t.componentName&&["Address","Attachment"].includes(t.componentName))},WI=(e,t={})=>{let n=[];const s=[],r=rd.getContextReferences(e);return r?(({editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:s=!1}=n;let r=[];for(const[a,o]of e){const e=gS.resolveContextTreeNodeProps(o.props),i=e.propertyName;BI(o.props,{includeDisabledFields:s})&&GI(a,e,n)&&(r=$I(t,i,e,a,r))}return{editableFormFieldsReferenceList:r}})(r,e,t)),FI[e]&&s.push(...Object.keys(FI[e].fieldOrder??{})),{formInputs:n,formPageFields:s}):{formInputs:n,formPageFields:s}},HI=e=>{let t=[];const n=rd.getContextReferences(e);if(n)for(const[e,s]of n){const n=s?.props;if(BI(n)&&"Attachment"===n?.componentName){const s="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:s,fullPath:e}]}}return t},qI=(e,t={})=>{const n={},s=zC(e),{ignoreFieldsInsideList:r=!0,isTransientContext:a=!1,includeDisabledFields:o=!1,isObjectWideAction:i=!1,isExternalObject:c=!1}=t,l=((e,t,n)=>ZI.shouldUseUnifiedHandling()||!e&&!t?n?.caseInfo:n?.objectInfo)(i,c,s);if(a||l){const{formInputs:t,formPageFields:i}=WI(e,{ignoreFieldsInsideList:r,includeDisabledFields:o});((e,t,n)=>{e.forEach((e=>{let s=lS.getIn(t,e);"object"==typeof s&&(s=lS.deepClone(s),delete s?.classID),lS.buildObject(e,n,s)}))})(i,s,n),t&&t.length>0?t.forEach((e=>{lS.buildObject(e,n,lS.getIn(s,e))})):a||lS.buildObject($s.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!a&&s?.dataInfo?.content){const{formInputs:t}=WI(e,{ignoreFieldsInsideList:r});t.forEach((e=>{lS.buildObject(e,n,lS.getIn(s,e))}))}return n},zI=(e,t,n)=>{const s=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,r=rd.getContextReferences(e)?.get(`${t}${s}`)?.props;return r?gS.resolveContextTreeNodeProps(r):r},YI=(e,t)=>{const n=rd.getContextReferences(e);let s=!0;if(!n)return s;for(const[e,r]of n){const n=gS.resolveContextTreeNodeProps(r.props);if(BI(r.props)&&(!t||e.includes(t))){const e=Zp.validate(n.componentName?.toLowerCase(),n.propertyName,gS.getLitePropertyValue(n,n.propertyName),n);s&&(s=!e.message)}}return s},KI=e=>{const t=rd.getContextReferences(e);if(t)for(const[,e]of t){if(gS.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0}return!1},QI=(e,t=!1)=>{const n=rd.getContextReferences(e),s=[];if(n)for(const[e,r]of n){if(!1!==gS.resolveContextTreeNodeProps(r.props).visibility){const n=8,r=t?e:e.substring(e.indexOf("content")+n);s.push(r)}}return s},JI=e=>{const t=[],n=rd.getContextReferences(e);if(n)for(const[e,s]of n){const n=gS.resolveContextTreeNodeProps(s.props);BI(s.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};class XI{static getCaseInlineEditAction(e){return e?xA.getInlineEditActions(e):[]}static isCaseActive(e,t){if(!e||!t)return!1;const n=Ny(t);if(n){const s=Fy(t),{items:r={}}=n;return!(!s||!r[s]||r[s].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:ks.getDefaultQualifiedName("pyEdit")},{restApi:s,reqType:r}=p_("loadView",n);return Kd(s,{method:r},t)};static getCaseView=(e,t,n,s={})=>{const{signal:r}=s,a={caseID:e,viewID:t},{restApi:o,reqType:i}=p_("loadView",a);return Kd(o,{method:i,...r&&{signal:r}},n)};static isExternalCaseType=e=>{let t;return this.shouldUseUnifiedHandling()?(t=xA.getCaseTypeList()?.find((t=>t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e)),!!t):(t=xA.getCaseTypeList()?.find((t=>"Case"===t.objectType&&t.DisplayMandatoryInputsForObject&&t.pyWorkTypeImplementationClassName===e)),!!t)};static getCaseEditLock=(e,t,n)=>{const s={caseID:e,actionID:this.getCaseInlineEditAction(n)[0]??ks.getDefaultQualifiedName("pyUpdateCaseDetails")},{restApi:r,reqType:a}=p_(ia,s);return Kd(`${r}?viewType=page`,{method:a},t)};static updateCaseEditFieldsData=(e,t,n,s,r)=>{const a=this.getCaseInlineEditAction(r),o=a.length?a:[ks.getDefaultQualifiedName("pyUpdateCaseDetails")],i=t[e],c=(t,n)=>{const[r,...a]=t;return((t,n)=>{const r={caseID:e,actionID:t},{restApi:a}=p_(ia,r);return Kd(`${a}?viewType=form`,{method:"PATCH",body:{content:{...i}},headers:{"if-match":n}},s)})(r,n).then((e=>a.length>0?c(a,e.headers.etag):e))};return c(o,n)};static getCaseMessages=e=>zC(e)?.caseMessages;static getPropertiesToReplace=e=>(HI(e)||[]).map((e=>({path:e.fullPath,allowMultiple:e.allowMultiple})));static getPropertiesToReArrange=e=>(HI(e)||[]).filter((e=>e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>lS.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>qs.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>qs.isTraditionalRemoteCase(e);static isCoexistenceCase=e=>!!e&&(xA.getCaseTypeList()?.some((t=>t.pyWorkTypeImplementationClassName===e&&"true"===t.pyIsTraditionalUICase))??!1);static isRemoteCase=e=>qs.isRemoteCase(e);static isRemoteCaseVersionDifferent=e=>qs.isRemoteCaseVersionDifferent(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n};static isObjectCaseType=e=>{const t=xA.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e));return t&&t.length>0&&"Object"===t[0].objectType};static isExternalObject=e=>{const t=xA.getCaseTypeList()?.filter((t=>t.pyWorkTypeImplementationClassName===e)),{DisplayMandatoryInputsForObject:n,objectType:s}=t?.[0]||{};return t&&t.length>0&&n&&"Object"===s};static getRouteKeyForCreateWork=(e,t=!1)=>this.isExternalCaseType(e)&&t?Ga:this.isExternalObject(e)&&t?this.shouldUseUnifiedHandling()?Ga:"retrieveActionViewForNewObject":this.shouldUseUnifiedHandling()?wa:this.isObjectCaseType(e)?ja:wa;static shouldUseUnifiedHandling=()=>!0;static shouldAppendExcludeQueryParam=()=>xA.isOptimizedCaseLoadingEnabled();static appendExcludeQueryParamToUrl=e=>{if(!e)return e;if(!this.shouldAppendExcludeQueryParam())return e;let t=e;if(t.includes("excludeAdditionalActions=true"))return t=t.replace("excludeAdditionalActions=true","exclude=availableActions,availableProcesses,assignments"),t;const n=t.includes("?")?"&":"?";return`${t}${n}exclude=availableActions,availableProcesses`};static setTraditionalGadgetId=e=>{e.traditionalGadgetId=XI.getUniqueGadgetId()}}const ZI=XI,eE=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},tE=e=>{if(ZI.shouldUseUnifiedHandling()&&ZI.isObjectCaseType(String(e?.caseTypeID))&&!eE(e))return!0;if(ZI.isObjectCaseType(String(e?.objectTypeID))&&!eE(e))return!0;if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},nE=(e,t)=>{if(e&&t){const n=lS.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:s,type:r}=n;return"worklist"===r?.toLowerCase()&&s===e}return!1},sE=(e,t)=>{const n=gS.getPropertyValue($s.CASE_INFO.ACTIVE_ACTION_ID,t,e),s=gS.getPropertyValue($s.CASE_INFO.AVAILABLEACTIONS,t,e);let r=!1;if(s&&n){const e=s.find((e=>e.ID===n));e&&(r=e.type.toLowerCase()===$s.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!s){const t=zC(e);r=t?.context_data?.actionType===Gs.CASE}return r},rE=e=>JC(null,Gs.CASE_VIEW_MODE_PROP,e)===Gs.PERFORM_MODE&&(e.includes(Gs.WORKAREA)||e.includes(Gs.MODAL)||e.includes(Gs.ACTIONAREA)),aE=(e,t)=>rE(e)&&!sE(e,t),oE=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},iE=(e,t,n)=>{let s;const r=e?.find((e=>e.ID===t))?.actions,a=r?.filter((e=>e.ID===Gs.FIX_BROKEN_ASSIGNMENTS))||[];return s=n&&a?.length>0?a[0].ID:n||((e,t)=>{if(!Array.isArray(e)||!t)throw new Error("Invalid parameters passed to getAssignmentActionID API");return e.find((e=>e.ID===t))?.actions?.[0]?.ID})(e,t),s},cE=(e,t,n,s)=>{let r;return r=e?iE(e,t,n):s||ks.getDefaultQualifiedName("Create"),r},lE=(e,t)=>ZI.shouldUseUnifiedHandling()?yr:ZI.isObjectCaseType(e)||t?Ua:yr,uE=(e,t,n)=>{let s,r,a,o,i,c,l,u,d;const p=zC(e),g=p?.caseInfo?.caseTypeID||p?.objectInfo?.objectTypeID,h=ZI.shouldUseUnifiedHandling();return n?.isTriggeredFromDifferentContext||e.includes(Gs.ACTIONAREA)?(s=e.includes(Gs.ACTIONAREA)?void 0:p.caseInfo?.assignments?.[0]?.ID,r=p.caseInfo.ID,a=p.caseInfo.assignments,o=p.caseInfo.activeActionID,i=p.caseInfo.availableActions,c=p.caseInfo,l=p.caseInfo.businessID,u=p.caseInfo.caseTypeID,d=p.caseInfo.caseTypeName):!h&&p?.objectInfo&&ZI.isObjectCaseType(g)?(r=p.objectInfo.ID,o=p.objectInfo.activeActionID,i=p.objectInfo.availableActions,c=p.objectInfo,l=p.objectInfo.businessID,u=p.objectInfo.objectTypeID,d=p.objectInfo.objectTypeName):(s=t.getValue(Gs.getProperty($s.CASE_INFO.ASSIGNMENT_ID)),r=t.getValue(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID)),a=t.getValue(Gs.getProperty($s.CASE_INFO.ASSIGNMENTS)),o=t.getValue(Gs.getProperty($s.CASE_INFO.ACTIVE_ACTION_ID)),i=t.getValue(Gs.getProperty($s.CASE_INFO.AVAILABLEACTIONS)),c=t.getValue(Gs.getProperty($s.CASE_INFO.CASE_INFO)),l=t.getValue(Gs.getProperty($s.CASE_INFO.BUSINESS_ID)),u=t.getValue(Gs.getProperty($s.CASE_INFO.CASE_TYPE_ID)),d=t.getValue(Gs.getProperty($s.CASE_INFO.CASE_TYPE_NAME))),{assignmentID:s,caseID:r,assignments:a,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}},dE=(e,t)=>{if(Object.keys(e??{}).length>0&&t?.startsWith("http")){const n=new URL(t),s=new URLSearchParams(n.search);return Object.keys(e).forEach((t=>{s.append(t,String(e[t]))})),n.search=s.toString(),n.toString()}return t},pE=(e,t="case")=>{const n=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],s=e?.payload?.err?.response?.status;if(Array.isArray(n)&&n.length>0&&424===s){n.forEach((e=>{e.isErrorButton=!0}));const s=e.payload.context,r=zC(s),a=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(n,r?.caseInfo?.actionButtons?.secondary||[]),o={data:{["dataObject"===t?$s.DATA_INFO.DATA_INFO:$s.CASE_INFO.CASE_INFO]:{actionButtons:{secondary:a}}},target:tA(s),context:s};qC({type:Dr,payload:o})}},gE=e=>({type:Rf.REFRESH_DATA,payload:e}),hE={},fE=(e,t,n,s,r,a,o,i,c,l)=>{if(!(e&&s&&t))return;const u=l.actionMgrID||vg.getNextActionMgrId(),d={ID:e,actionID:t,objectTypeID:n,context:s,caseWideAction:r,isObjectType:a,isExternalObject:o,isExternalCase:i,casetypeID:c,options:{...l,actionMgrID:u}};l.isFillFormWithAI?qC((e=>({type:xa,payload:e}))(d)):qC(gE(d))},mE=(e,t,n,s,r)=>{if(!(e&&n&&t))return;s&&(s=lS.convertPageRefToClipboardPageNotation(s));qC(gE({ID:e,viewID:t,context:n,options:r,caseViewAction:!0,interestPage:s}))},IE=(e,t,n,s,r,a,o,i,c,l={})=>{if(!((e||t)&&s&&n&&r))return;r&&(r=lS.convertPageRefToClipboardPageNotation(r));const u={ID:o||c!==Gs.ACTION?e:t,actionID:n,context:s,options:l,interestPage:r,interestPageActionID:a,isLocalAction:o,isMultiRecordData:i,editType:c};qC(gE(u))},EE=(e,t,n)=>{hE[t]||(hE[t]={}),e&&!hE[t][e]&&(hE[t][e]={pageReference:n})},yE=(e,t,n)=>{const s={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;const a=dC(s.propertyName,n||e.getValue(Gs.CLASS_ID,s.pageName));return!!a?.isDeclarativeTarget},AE=(e,t,n)=>{const s=n||e.getRawMetadata()?.config?.value;let r=!1;if(s){const n=Ro.trimAnnotation(s);let a;a=t?lS.resolvePageClass(n,t):gS.resolveClassID(s,e.getPageReference(),e.getContextName());const o=dC(Ro.getLeafPropertyName(s),a);if(r=!!o?.isDeclarativeTarget,!r&&o?.additionalInformation){const e=Ro.trimAnnotation(o?.additionalInformation);r=Xf.isDecisionParagraph(e,o.classID)}!r&&o?.datasource?.parameters&&(r=((e,t,n)=>{let s=!1;if(Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(s=yE(e,r,n)),s};t.some(r)}else if("object"==typeof t)for(const r of Object.keys(t))if(t[r].startsWith("@P")&&(s=yE(e,t[r],n),s))break;return s})(e,o?.datasource?.parameters,t)),r||(r=o?.datasource?.tableType===Gs.DECISION)}return r},CE=(e,t)=>{const n=n=>(e=>"string"==typeof e&&e.startsWith(Gs.PROPERTY_ANNOTATION))(n)&&AE(e,t,n),s=e=>!(!e||"object"!=typeof e)&&Object.values(e).some((e=>n(e)||s(e)));return s(e.getRawMetadata()?.config)},SE=e=>{(e.isWhenExist()||CE(e))&&EE(e.getCurrentView(),e.getContextName(),e.getPageReference())},_E=e=>{if(!e)return!1;const t=HC()?.getState()?.data?.[e],n=t?.caseInfo?.caseTypeID||t?.objectInfo?.objectTypeID;return ZI.isObjectCaseType(n)},NE=(e,t,n)=>{const s=sE(e,t);let r,a,o="",i="";const c=n=>gS.getPropertyValue(n,t,e)||"",l=ZI.shouldUseUnifiedHandling(),u=c($s.CASE_INFO.CASE_INFO_CLASSID)||c($s.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID)||n?.classID||"",d=ZI.isObjectCaseType(u)||t.startsWith(Gs.OBJECT_INFO.OBJECT_INFO),p=ZI.isExternalCaseType(c($s.CASE_INFO.CASE_INFO_CLASSID)),g=ZI.isExternalObject(u),h=c(Gs.getProperty($s.CASE_INFO.BUSINESS_ID));if(d&&_E(e)&&!p)o=u,n.isObjectWideAction=!0,r=c(l?$s.CASE_INFO.ACTIVE_ACTION_ID:$s.OBJECT_INFO.ACTIVE_ACTION_ID),r||(r=Gs.getDefaultQualifiedName(Gs.VIEW_NAMES.OBJECT_CREATE_VIEW)),a=c(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID))||o;else if(p&&!h)r=Gs.getDefaultQualifiedName(Gs.VIEW_NAMES.OBJECT_CREATE_VIEW),a=c($s.CASE_INFO.CASE_INFO_CLASSID),i=c($s.CASE_INFO.CASE_TYPE_ID);else if(r=c($s.CASE_INFO.ACTIVE_ACTION_ID)||c($s.CASE_INFO.ASSIGNMENTACTION_ID),s)a=c(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID));else{a=c(Gs.getProperty($s.CASE_INFO.ASSIGNMENT_ID))||c(Gs.getProperty($s.CONTEXT_DATA_ASSIGNMENTID))}fE(a,r,o,e,s,d,g,p,i,n)},TE=e=>{const{context:t,pageReference:n}=e,s=(e=>hE[e]&&Object.keys(hE[e]).length>0&&rE(e))(t);if(!s)return;const r=gS.getPropertyValue(Gs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,t),{isMultiRecordData:a,editType:o}=r||{};if(a){const e=gS.getPropertyValue($s.CASE_INFO.CASE_INFO_ID,n,t),s=gS.getPropertyValue($s.CASE_INFO.ASSIGNMENT_ID,n,t),{interestPage:i,interestPageActionID:c,actionID:l,isLocalAction:u,viewName:d}=r;o===Gs.ACTION?IE(e,s,l,t,i,c,u,a,o):mE(e,d,t,i,{})}else NE(t,n,{})},DE=(e,t)=>{const{requestType:n}=e;if(e?.options?.refreshFor&&"refresh"===n){t+=`?refreshFor=${e.options.refreshFor.replace(/\[(\d+)\]/g,((e,t)=>`(${parseInt(t,10)+1})`))}`}return e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},PE=(e,t)=>{const n=e.url===t.url,s=e.interestPage===t.interestPage;return n&&s},OE=(e,t)=>{const n=e.url?.includes("/refresh?refreshFor="),s=t.url?.includes("/refresh?refreshFor="),r=e.url?.endsWith("/refresh")&&!n,a=t.url?.endsWith("/refresh")&&!s;if(r&&a)return PE(e,t);if(r&&s)return!0;if(n){if(a)return"CANCEL_REFRESH";if(s)return PE(e,t)}return!1},RE=e=>{const t=(e=>{const t=[];return rd.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const s=n.split(".");s.shift();let r=s.join(".");e&&r&&(r=lS.convertPageRefToClipboardPageNotation(r),t.push({name:e,context:r}))})),t})(e),n=(e=>{const t=[];return rd.getWhens(e).forEach((({name:e,type:n,pageReference:s})=>{const r=s.split(".");r.shift();let a=r.join(".");e&&a&&(a=lS.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const bE=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}},vE={IDLE:"idle",SAVING:"saving",SKIPPED:"skipped",ERROR:"error"},xE='input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="month"], input[type="week"], input[type="datetime-local"], input:not([type])',wE=`${xE}, textarea, [contenteditable="true"]`,ME=new Map,LE=new Map,UE=new Set,FE=new Map,VE=new Map,jE=new Set,kE=(e,t)=>{FE.get(e)?.forEach((e=>e(t)))},BE=(e,t)=>{const n=LE.get(e);void 0!==n&&clearTimeout(n),LE.set(e,setTimeout((()=>{LE.delete(e),t()}),(()=>{const e=Number(xA.getFeatureMap()?.pyAutoSaveDurationInMS);return e>0?e:5e3})()))},$E=e=>{const t=Ks(e),n=tA(t);return!n||!zy(n)||Fy(n)===t},GE=async e=>{if(UE.has(e))return;if(jE.has(e))return;const t=ME.get(e);if(!t)return;if(!$E(e))return;const n="undefined"!=typeof document?document.activeElement:null;if(n&&n===(e=>Kp.get(e)??null)(e)&&n.matches(xE))return void BE(e,(()=>GE(e).catch((()=>{}))));(e=>{const t=VE.get(e);if(t&&0!==t.size){for(const[n,s]of t)UI.executeStateMachine(e,n,s,!0,{skipStateUpdate:!1,skipDirtyValidation:!1})||qC(e_({reference:n,value:s,context:e,isImplicit:!1,skipDirtyValidation:!1}));VE.delete(e)}})(e);let s=!1;Yp(!0);try{if(!LI.hasUnsavedChanges(e))return;s=LI.isFormValid(e)}finally{Yp(!1)}if(s){UE.add(e),kE(e,vE.SAVING);try{await((e,t)=>{const n=e,s=n.includes(Gs.MODAL),r=QC($s.CASE_INFO.CASE_INFO_ID,null,n),a=QC($s.CASE_INFO.ASSIGNMENT_ID,null,n),o=QC($s.CASE_INFO.ACTIVE_ACTION_ID,null,n)||QC($s.CASE_INFO.ASSIGNMENTACTION_ID,null,n),i=QC($s.CASE_INFO.CASE_TYPE_ID,null,n),c=QC("isProcessAction","isProcessAction",n),l=vg.getNextActionMgrId(),u={context:n,containerItemID:e,assignmentID:a,actionID:o,caseID:r,containerName:t,caseType:i,isModalAction:s,isFormValid:void 0,isProcessAction:c,saveOnly:!0,autosave:!0,actionMgrID:l};let d,p;const g=new Promise(((e,t)=>{d=e,p=t}));if(!d||!p)throw new Error("Promise executor did not synchronously assign resolveFn/rejectFn.");return vg.register(l,g,d,p,zg,u,!0),Ff.executeOrQueueDeferredAction(Yg(u)),g})(e,t.containerName),LI.clearChangedProperties(e),kE(e,vE.IDLE)}catch{kE(e,vE.ERROR)}finally{UE.delete(e)}}else kE(e,vE.SKIPPED)},WE=()=>{if("undefined"==typeof document)return;const e=document.activeElement;if(e?.matches(wE))for(const e of ME.keys())LE.has(e)&&$E(e)&&BE(e,(()=>GE(e).catch((()=>{}))))},HE=WE,qE=e=>{"Tab"===e.key&&WE()},zE=e=>{const{target:t}=e;if("undefined"!=typeof Element&&t instanceof Element&&t.matches(xE))for(const e of ME.keys())LE.has(e)&&$E(e)&&(Qp(e,t),BE(e,(()=>GE(e).catch((()=>{})))))},YE=e=>ME.has(e),KE=e=>{const t=LE.get(e);void 0!==t&&clearTimeout(t),LE.delete(e),UE.delete(e),ME.delete(e),jE.delete(e),VE.delete(e),Jp(e),0===ME.size&&"undefined"!=typeof document&&(document.removeEventListener("pointerdown",HE),document.removeEventListener("keydown",qE),document.removeEventListener("input",zE,{capture:!0}))},QE=e=>{const t=`${e}/`;for(const e of[...ME.keys()])e.startsWith(t)&&KE(e)},JE=e=>{const t=LE.get(e);void 0!==t&&(clearTimeout(t),LE.delete(e))},XE=e=>{ME.has(e)&&(jE.has(e)||BE(e,(()=>GE(e).catch((()=>{})))))},ZE=e=>{jE.delete(e),LI.hasUnsavedChanges(e)&&XE(e)},{APP:ey}=Gs;let ty={},ny={},sy={};const ry="You will lose unsaved changes. Do you want to continue?",ay="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",oy=(e=ey.APP,t,n)=>{let s=[],r=[];t||(s=QI(e,!0)),n||(r=(e=>{const t=rd.getContextReferences(e),n=[];if(t)for(const[e,s]of t)!0===gS.resolveContextTreeNodeProps(s.props).readOnly&&n.push(e);return n})(e));const a={};((e,t,n)=>{const s=ny[t]||{};Object.keys(s).forEach((t=>{const r=s[t].associatedProperty;Object.hasOwn(s,t)&&(void 0===r||n.includes(r))&&lS.buildObject(t,e,s[t].value)}))})(a,e,s);const o=ty[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&s.includes(e)||t;Object.hasOwn(o,e)&&n&&!r.includes(e)&&lS.buildObject(e,a,o[e].value)})),a},iy=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete ty[t]?.[n],delete ny[t]?.[n]};Ju=(e,t)=>{iy({context:e,reference:t});const n=t.lastIndexOf(".");n<1||n===t.length-1||dd({type:Gs.MESSAGES.MESSAGES_TYPE_ERROR,context:e,pageReference:t.slice(0,n),property:t.slice(n)})};const cy=e=>e&&sy[e],ly=e=>{e&&sy[e]&&(sy[e]=!1)},uy=(e,t)=>{const{context:n,initialValue:s="",isStrictTracking:r,associatedProperty:a}=t,o=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[o]?e[o].previousValue=QC(t.reference,null,n):(e[o]={initialValue:s||QC(t.reference,null,n)},e[o].previousValue=e[o].initialValue),e[o].value=t.value,a&&(e[o].associatedProperty=a),r&&e[o].value===e[o].initialValue&&iy(t)},dy=e=>{const{payload:t}=e,{context:n}=t,s=t.reference.startsWith(".")?t.reference.substr(1):t.reference;rd.isFieldExists(n,s)||(ny[n]=ny[n]||{},uy(ny[n],t)),ty[n]=ty[n]||{},uy(ty[n],t)},py=({value:e,context:t,reference:n})=>{const s=tA(t),r=Dy(s,t)||{};if(bE.isPageInstruction(n)||r?.subscriptFieldName)return;const a=n?.startsWith(".")?n?.substr(1):n;ty[t]=ty[t]||{};ty[t][a]||(ty[t][a]={initialValue:QC(a,null,t)}),ty[t][a].value=e},gy=e=>e&&ty[e]&&Object.keys(ty[e]).some((t=>ty[e][t].initialValue!==ty[e][t].value))||!!cy(e),hy=(e,t)=>{if(!e||!t)return!1;const n=ty[e]&&ty[e][t];return!!n&&n.previousValue!==n.value},fy=e=>{e&&ty[e]?(ty[e]={},ny[e]={}):"all"===e&&(ty={},ny={},sy={}),sy[e]&&(sy[e]=!1),Jp(e)},my=(e,t,n=new Set)=>{if(n.has(t))return;n.add(t);[...To.getDependencies(e,t),...BC.getResetDependencies(e,t)].forEach((t=>{const s=lS.getPropertyNameFromDependency(t);if("object"==typeof t&&"multiRecord"===t.mode){const t=s.split("."),n=`.${t.pop()}`,r=t.join(".");if(UI.isStateMachineExist(e,r,n)){UI.getStateMachine(e,r,n).deleteAll()}else if(YE(e)){UI.setStateMachine(e,n,r,new hp(n,r,e));const t=UI.getStateMachine(e,r,n);t?.deleteAll(!1)}}else bE.isPageInstruction(s)&&UI.executeStateMachine(e,s,""),qC({type:sr,payload:{reference:s,value:"",context:e,isArrayDeepMerge:!0,isImplicit:!0}});my(e,s,n)}))},Iy={propertyChangeMiddleware:()=>e=>t=>{const{type:n,payload:s={}}=t||{};if(n===ar&&(So(s),(e=>{const{context:t,pageReference:n,value:s,reference:r}=e;BC.triggerCascade(t,r,s);const a=To.getDependencies(t,r),o={context:t,datapages:{}};my(t,r),a.forEach((s=>{let r=n;s.startsWith(n)||(r="");const a=s.replace(`${r}`,"").split(".").filter((e=>!!e));a.pop();const i=a.join("."),c=QC(`.${i}`,r,t)?.classID||e.classID,l=dC(s.split(".").pop(),c),{datasource:u}=l,d={},p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=Xg.isProperty(e.value)?QC(`.${lS.getFullPropertyReference([i,lS.getPropertyName(e.value)])}`,r,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(Gs.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(Gs.NULL_STRING))}));const g=u.name.concat(Gs.UNDERSCORE_STRING,lS.getHashedString(p.join(Gs.HASH_DELIMITER))),{name:h}=u,f=NC(h);o.datapages[g]={mode:u.mode,propertyName:s,name:u.name,dataViewParameters:d,refreshStrategy:f?.refreshStrategy}})),a.length&&qC({type:fa,payload:o})})(s),Ff.registerBlockingAction(s.context).catch((()=>{})),setTimeout((()=>{(hy(s.context,s.reference)||xp(s.context))&&TE(s),Df.triggerRefreshForType("PROP_CHANGE",s.reference,s.context),Ff.deRegisterBlockingAction(s.context).catch((()=>{}))}),0)),n===Ea&&!s?.isDefault){const{context:e,referenceList:t,c11nEnv:n,listIndex:r,instruction:a,skipDirtyValidation:o=!1}=s;0===r&&"INSERT"===a&&n&&(e=>{let t=!1;const n=e?.getRawMetadata()?.config;n?.type&&"multirecordlist"===n.type&&n?.contextClass&&(t=function e(t,n){for(const s of n){const n=Dm({meta:s}).getPConnect();if(n.isWhenExist()||CE(n,t))return!0;if(s.children&&e(t,s.children))return!0}return!1}(n.contextClass,n.children??[])),t&&EE(e.getCurrentView(),e.getContextName(),e.getPageReference())})(n),setTimeout((()=>{Df.triggerRefreshForType("PROP_CHANGE",t,e)||TE({context:e,pageReference:t})}),0),o||(sy[`${e}`]=!0)}if(n===sr||n===rr){const{reference:e,isImplicit:n,context:r,skipDirtyValidation:a=!1}=s;rd.updateFieldNodeValue(r,e,s.value),bE.isPageInstruction(e)||a?a||(sy[`${r}`]=!0):dy(t),(s.removePropertyFromChangedList||n)&&iy(s)}if(n===jr||n===kr){const{transientItemID:e,data:t}=s;lS.iterateLeafNodes(t,(t=>{iy({context:e,reference:t.join(".")})}))}if(n&&[Gr,Mr,Hr,Vr].includes(n)){fy(s.context),BC.purgeResetDependencies(s.context),(r=s.context)&&hE[r]&&delete hE[r];(s.childContainersContexts||[]).forEach((e=>{fy(e)}));(s.transientItems||[]).forEach((e=>{fy(e)}))}var r;e(t)},getChanges:oy,recordChange:dy,isDirty:()=>Object.keys(ty).some((e=>gy(e))),isPropertyDirty:hy,isContextDirty:gy,resetChangedProperties:fy,deleteRecordedChange:iy,isComplexObjectMerged:cy,resetComplexObjectDirtyStatus:ly};const Ey=new class{getCoreheaders(e){const t=`${$s.APP.APP}${Gs.FORWARD_SLASH_STRING}${Gs.PRIMARY}`,n=Fy(t),s=ky(n),r=gS.getProperty(Gs.COREHEADERS,"",s);if(r&&e in r)return r[e]}},yy={defaultLimit:16},Ay={SINGLE:"single",MULTIPLE:"multiple"},Cy={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Sy=()=>HC()?.getState()?.containers;function _y(e){return"string"==typeof e&&""!==e.trim()}const Ny=e=>_y(e)?HC()?.getState().containers[e]:null,Ty=(e,t,n)=>{if(!n)return{continueExecution:!1,containerItemID:e};const s=Ny(n);let r=!1,a=e;return s?.accessedOrder.forEach((e=>{t===s.items[e].key&&(r=!0,a=s.items[e].context)})),{continueExecution:r,containerItemID:a}},Dy=(e,t)=>{if(!_y(e)||!_y(t))return null;const n=Sy(),s=n?.[e];return s&&s.items&&s.items[t]||null},Py=e=>_y(e)?HC()?.getState().containers[e]?.items:null,Oy=e=>_y(e)&&HC()?.getState().containers[e]?.accessedOrder||[],Ry=e=>_y(e)&&Oy(e)?.length>0||!1,by=(e,t,n)=>{if(!_y(e)||!_y(t))return!1;const s=Sy(),r=s?.[e],a=r&&r.items||null,o=n||((e,t)=>e===t);if(t&&a)for(const e of Object.keys(a))if(o(t,a[e].key))return!0;return!1},vy=e=>{const{containers:t}=HC()?.getState()||{};return!(!t||!_y(e))&&Object.keys(t).some((n=>t[n]?.accessedOrder?.includes(e)))},xy=(e,t,n)=>{if(!_y(e)||!_y(t))return null;const s=Sy(),r=s?.[e],a=r&&r.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e of Object.keys(a))if(o(t,a[e].key))return e;return null},wy=(e,t)=>{if(e&&t)for(const r of Object.keys(t))if(n=e,s=t[r].key,n?.toLowerCase()===s?.toLowerCase())return t[r];var n,s;return null},My=e=>{if(!_y(e))return null;const t=Sy()??{};for(const n of Object.keys(t))if(t[n]){const s=t[n].items??null,r=wy(e,s);if(r)return r}return null},Ly=(e,t)=>{if(!_y(e)||!_y(t))return!1;const n=Sy();return n&&Object.hasOwn(n,`${e}/${t}`)},Uy=(e,t)=>{if(!_y(e)||!_y(t))return null;const n=Sy(),s=n?.[`${e}/${t}`];return s&&s.type},Fy=e=>{if(!_y(e))return null;let t=null;const n=Sy();if(n&&n[e]){const s=n[e],{accessedOrder:r}=s;t=r&&r.length>0?r[r.length-1]:null}return t},Vy=(e,t,n)=>{if(!_y(e)||!_y(t))return!1;const s=xy(e,t,n);return!!s&&s===Fy(e)},jy=(e,t)=>{let n=null;const s=Sy();if(!s)return null;for(const r of Object.keys(s))if(s[r].items){const a=s[r].items[e];if(n=a?a[t]:null,n)break}return n},ky=e=>_y(e)?jy(e,"context"):null,By=e=>{if(!_y(e))return null;let t=null;const n=Sy();if(n&&n[e]){const s=n[e],{accessedOrder:r}=s,a=r&&r.length>0?r[r.length-1]:null;t=ky(a)}return t},$y=e=>{if(!_y(e))return[];const t=e.endsWith("/")?e:`${e}/`;let n=[],s=!1;const r=Sy();if(!r)return[];const a=n=>{const r=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&r.push(n),n===e&&(s=!0)})),r};for(const e of Object.keys(r))if(r[e].items){const t=a(r[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return s?n:[]},Gy=e=>{if(!_y(e))return[];const t=[],n=Sy();if(!n)return[];const s=`${e}${Gs.FORWARD_SLASH_STRING}`;for(const e of Object.keys(n))e.startsWith(s)&&t.push(e);return t},Wy=e=>{if(!_y(e))return[];const t=[],n=Sy();if(!n)return[];const s=`${e}${Gs.FORWARD_SLASH_STRING}`;for(const r of Object.keys(n))if(r.startsWith(s)){(Oy(r)||[]).forEach((n=>{ky(n)!==e&&t.push(ky(n))}))}return t},Hy=e=>{const t=[...Wy(e),e],n=[],s=HC()?.getState().data||{};return t.forEach((e=>{Object.hasOwn(s,`${e}/${Gs.SUGGESTION}`)&&n.push(`${e}/${Gs.SUGGESTION}`)})),n},qy=e=>_y(e)?e&&Ny(e)&&Ny(e).type===Ay.SINGLE:null,zy=e=>_y(e)?e&&Ny(e)&&Ny(e).type===Ay.MULTIPLE:null,Yy=e=>_y(e)&&Ny(e)&&Ny(e).items&&Object.keys(Ny(e)?.items).length>0||!1,Ky=e=>e&&yy[e]?yy[e]:yy.defaultLimit,Qy=(e,t=yy.defaultLimit)=>{_y(e)&&(yy[e]=t)},Jy=e=>{if(!_y(e))return!1;let t=!1;const n=Ny(e),{items:s={}}=n,r=Object.keys(s),a=Ky(e);return r&&r.length>0&&r.length>=a&&(t=!0),t},Xy=e=>{if(!e||!_y(e.name)||!_y(e.context))return null;const t=e?.name,n=Ny(`${e?.context}/${t}`),s=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],r=Gy(`${Gs.APP.APP}/${Gs.PREVIEW}`),a=Wy(`${Gs.APP.APP}/${Gs.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...s,...a],childContainers:r}},Zy=e=>{if(!_y(e))return!1;const t=ky(e);return gy(t)||AI(e)},eA=e=>{if(!_y(e))return null;let t;const n=Ny(e),{accessedOrder:s=[]}=n;for(let e=0;e<s.length;e+=1){const n=s[e];if(!Zy(n)){t=n;break}}return t},tA=e=>{if(!_y(e))return null;const{containers:t}=HC()?.getState()||{};if(t)for(const n of Object.keys(t))if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(Gs.UNDERSCORE_STRING);return e.slice(0,n)},nA=async(e,t={})=>{if(!_y(e))return Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=tA(e),s=ky(e),{skipDirtyCheck:r}=t;let a=!0,o=[];if(Zy(e)&&!r&&(bg.disableLoadingIndicator({context:s}),a=await rI.confirm(FA().getLocaleValue(ry,"Messages")),bg.enableLoadingIndicator({context:s})),a){const{accessedOrder:r=[],items:a={},type:i}=Ny(n);o=r.filter((t=>t!==e));const c=o[o.length-1],l=a[c]||{},{semanticURL:u=Gs.FORWARD_SLASH_STRING,context:d}=l;o.length>0&&u&&u!==Gs.FORWARD_SLASH_STRING?A_({directUrlUpdation:!0,semanticURL:u,options:{containerItemID:c,context:d}}):A_({directUrlUpdation:!0,semanticURL:Gs.FORWARD_SLASH_STRING,options:{}});qC(kS({containerItemID:e,context:s,target:n,containerInfo:{newAccessedOrder:o,containerType:i},...void 0!==t.eventName?{eventName:t.eventName}:{}}))}return{newAccessedOrder:o,removeItem:a}},sA=(e,t,n,s)=>{const r="root",a=Qs(t,r,!0),o=Wa(t,r),i={data:n,context:s?"app":a},c=[OS({root:e,containerItemID:a,context:s?"app":a,target:o,containerName:t})];c.push(AS(i)),qC(c)},rA=(e,t,n)=>{let s=Oy(e);s=s.filter((e=>e!==t));let r=!1;for(let e=0;e<s.length;e+=1){if(ky(s[e])===n){r=!0;break}}return r},aA=e=>{if(!_y(e))return!1;const t=Sy(),n=ky(e),s=t?Object.keys(t):[];let r=!1;for(let t=0;t<s.length&&(r=rA(s[t],e,n),!r);t+=1);return r},oA=e=>{Array.isArray(e)||(e=[e]);const t=Sy()||{};return e.map((e=>{const n=tA(e);return lS.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},iA=e=>{const{transientItemID:t,data:n,options:s}=e,r=lS.deepClone(HC()?.getState().data[t]);s?.reset&&lS.iterateLeafNodes(r,(e=>{"classID"!==e[e.length-1]&&lS.setIn(r,e,"")})),qC(bS({transientItemID:t,data:lS.mergeDeep(n,r)}))},cA=e=>{const{transientItemID:t,data:n}=e;qC(xS({transientItemID:t,data:n}))},lA=e=>{const t=lS.deepClone(HC()?.getState().data[e]);lS.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&lS.setIn(t,e,"")})),qC(vS({transientItemID:e,data:t}))},uA=e=>{const t=lS.deepClone(HC()?.getState().data[e]);lS.iterateLeafNodes(t,(e=>lS.setIn(t,e,""))),qC(wS({transientItemID:e,data:t}))},dA=e=>{HC()?.getState().data[e]&&uA(e);const t=e.lastIndexOf("/"),n=t>0?e.substring(0,t):e,s=tA(n);qC($S({transientItemID:e,containerItemID:n,target:s}))};class pA{static addContainerItems(e){this.items=e}static getContainerItems(){return this.items}static deleteContainerItem(e){const t=this?.items?.indexOf(e);void 0!==t&&-1!==t&&this.items.splice(t,1)}}const gA=(e,t={})=>{if(!_y(e))return;const n=Ny(e),s=Array.isArray(n?.accessedOrder)?n.accessedOrder:[];if(0===s.length)return;const{remove:r,keep:a}=t;let o;if(void 0!==a){const e=new Set(a);o=s.filter((t=>!e.has(t)))}else if(void 0!==r){const e=new Set(r);o=s.filter((t=>e.has(t)))}else o=[...s];for(const t of o){const n=ky(t),s=oA(t);qC(kS({containerItemID:t,context:n,target:e,...s.length>0&&{transientItems:s}}))}},hA=()=>pA,fA=e=>{const t={containerName:e};t.childContainers=Gy(e),qC({type:zr,payload:t})},mA=(e,t)=>{const n=$y(e),{key:s}=Dy(tA(e),e),r=[];n.forEach((e=>{const{key:n}=Dy(tA(e),e);if(n===s){const n={data:{caseInfo:{headers:{etag:t}}},target:tA(e),context:e};r.push({type:Dr,payload:n})}})),r.length&&qC(r)},IA=(e,t)=>{const n=[],s={data:{caseInfo:{headers:{etag:t}}},target:tA(e),context:e};n.push({type:Dr,payload:s}),n.length&&qC(n)},EA=()=>xA.isPortalLoaded?"app":"root",yA=()=>Ey,AA=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:tA(e),context:e};qC({type:Dr,payload:n})},CA=(e,t)=>{const n=xy(e,t),s=xy(`${n}/workarea`,t);return ky(s)},SA=e=>_y(e)?jy(e,"parentContext"):null,_A=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},NA=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},TA=()=>eh,DA=()=>"undefined"==typeof window?"":bh(window.location.pathname),PA=()=>"undefined"==typeof window?"":bh(window.location.pathname+window.location.search),OA=(e,t,n)=>{switch(n){case"warning":t?console.warn(e,t):console.warn(e);break;case"error":t?console.error(e,t):console.error(e);break;default:t?console.log(e,t):console.error(e)}};const RA=new class{staticRoutesList=[];constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",this.staticRoutePage="",this.defaultClassName="",this.portalName=""}init=(e,t)=>{e&&e.routes&&e.routesMeta?(this.routingInfo=e,this.appRoutes=e.routes,this.appRoutesMeta=e.routesMeta,this.reqContextName=e.reqContextName,this.reqServletPath=e.reqServletPath,this.appName=e.appName,this.appAlias=e.appAlias,this.orgName=e.orgName,this.defaultViewUrlPath=t,this.defaultClassName="",this._createStaticDynamicRoutesList(this.appRoutes),this.appDelimeter=e.appDelimeter,this.reqServletNameReal=e.pxReqServletNameReal,this.bDefaultPortal=e.isDefaultPortal,this.portalName=e.portalName,this.ignoreFromEndPoint=["reactMode=dev","reactMode=prod"]):console.error("Routing info is not appropriate. Missing routes and routesMeta objects in routingInfo",JSON.stringify(e))};addRoutes=e=>{e?.routes&&e.routesMeta&&(this.appRoutes={...this.appRoutes,...e.routes},this.appRoutesMeta={...this.appRoutesMeta,...e.routesMeta},this.routingInfo&&(this.routingInfo.routes={...this.routingInfo.routes,...e.routes},this.routingInfo.routesMeta={...this.routingInfo.routesMeta,...e.routesMeta}),this._createStaticDynamicRoutesList(e.routes))};setDefaultRoute=e=>{this.defaultViewUrlPath=e};setStaticRoutePage=e=>{this.staticRoutePage=e};getStaticRoutePage=()=>this.staticRoutePage||"";setDefaultClassName=e=>{this.defaultClassName=e};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((t=>{Rh(t)?this.dynamicRoutesList?.push(t):this.staticRoutesList?.push({[t]:e[t]})}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>bh(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>bh(this.reqContextName);getRoutingInfo=()=>this.routingInfo;processUrl=(e,t)=>{t&&(e=e.toLowerCase()),e&&(e=decodeURIComponent(e));const n=new RegExp(this.getApplicationPath(),"i");return(e=e.replace(n,"")).startsWith("/")&&Uh()&&"PREVIEW"!==xA.getRenderingMode()&&this.setDefaultClassName(""),bh(e)};stripIgnoredParams(e){return this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))})),e}getRouteDetails=(e,t)=>{if(!t)return this.appRoutes[e];let n="",s={caseClassName:"",caseID:"",RemoteSystemID:void 0,page:""};return Object.keys(this.appRoutes||{}).forEach((t=>{const r=this.appRoutes[t];r&&r.payload&&r.payload.page===e&&(n=r.routeKey,s={...r.payload})})),!n&&this.appRoutes&&this.appRoutes[e]&&(n=this.appRoutes[e].routeKey,s={...this.appRoutes[e].payload}),{routeKey:n,payload:s}};transformRemoteCasePayload(e){const{caseClassName:t,caseID:n}=e;if(!qs.isRemoteCase(t))return e;const{RemoteClassGroup:s,RemoteSystemID:r}=qs.getRemoteCase(t??"");return{...e,caseID:n?.replace(t??"",s?.toUpperCase()),RemoteSystemID:r}}getEndPointInfo=e=>{e=this.stripIgnoredParams(e);const t=Uh();let n=this.processUrl(e,!0),s=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0);s||(n=this.processUrl(this.defaultViewUrlPath,!t),s=this._getMatchedRouteInRoutingTable(n,t?this.defaultClassName:void 0)||"");const{routeKey:r,payload:a}=this.getRouteDetails(s,t);if(!this.appRoutesMeta?.[r]?.restApi)return null;const{reqType:o,endPoint:i,params:c}=this.appRoutesMeta[r].restApi,l={routeKey:r,requestType:o,routeEndpoint:i,payload:{...c,...this.transformRemoteCasePayload(a)}};return this._resolveRoute(l,this.processUrl(e,!1),s)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={},s){const r=this.getSemanticURL(e,t,n);let a=r;if(Rh(r)){const e=r.match(Oh);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(a=a.replace(e,String(n[t])))}))}const o=y_(a,s),i=new URL(o);return this.isDefaultPortal()||!this.getPortalName()||i.searchParams.toString().includes("portal=")||i.searchParams.append("portal",this.getPortalName()),s&&!i.searchParams.has("lang")&&i.searchParams.append("lang",s),xh(i.toString())}buildDocumentTitle(e,t,n){const s=n??"";return xA.getCaseLabelFirstInTitle()?e&&t?`${e} (${t}) - ${s}`:s:e&&t?`${t}: ${e} - ${s}`:s}updateSemanticURLAndDocumentTitle(e,t){const{key:n,actionName:s,caseClassName:r,isRemoteCase:a,name:o}=e;if(a&&!r)return;const i=this.getSemanticURL(s,{caseClassName:r}).replace(/{.+?}/,String(Fm(n))),c=`${$s.APP.APP}${Gs.FORWARD_SLASH_STRING}${$s.PRIMARY}`,l={semanticURL:i,directUrlUpdation:!0,options:{acName:c,context:By(c)}},u=DA();i&&!u.includes(i)&&E_(l,t);const d=n.substring(n.lastIndexOf(" ")+1),p=xA.environmentInfoObject?.pxApplication?.pyLabel,g=this.buildDocumentTitle(o,d,p);O_(g)}buildSemanticURL(e,t,n){const{urlPattern:s}=this.appRoutesMeta?.[e]||{},r=s?.split("/").length,a=s?.split("/");this.setDefaultClassName(t?.pageClass||this.defaultClassName);const o=Object.keys(this.appRoutes).filter((e=>r===e.split("/").length)).filter((e=>{const t=e.split("?")[0].split("/");return a?.every(((e,n)=>e.startsWith("{")||e===t[n]))}));if(1===o.length)return this._getQueryParamsResolvedURL(o[0],n);if(0===Object.keys(t).length)return"";const i=o.find((e=>{const s=this.appRoutes[e].payload,r={...n};delete r.dataViewName,delete r.dataContext;const a=s.dataViewKeys||s.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===s[e]));return!!o&&(lS.isEmpty(a)||lS.isEmpty(r)?o:Object.keys(r).every((e=>Object.hasOwn(a,e))))}));return i?this._getQueryParamsResolvedURL(i,n):o.includes("cases/{id}")&&n?.id?"cases/{id}":""}_getQueryParamsResolvedURL(e,t,n=!1){const[s,r]=e.includes("?")?e.split("?"):[e];if(r&&t&&Object.keys(t).length>0){const e={};for(const[n,s]of Object.entries(t))e[n.toLowerCase()]=s;const a=new URLSearchParams(r),o={};for(const[s,r]of a.entries())if("string"==typeof r&&Rh(r)){const a=this._getDynamicKeyName(r),i=a.toLowerCase(),c=n?e:t,l=n?t[a]??c[i]:c[a];null!=l&&(o[s]=l)}else"string"==typeof r&&(o[s]=r);const i=new URLSearchParams(Object.entries(o).map((([e,t])=>[e,String(t??"")])));return`${s}?${xh(i.toString())}`}return s}_getQueryParamsObject(e){const t={};if(!e)return t;for(const n of e.split("&")){const e=n.indexOf("=");if(-1!==e){const s=n.slice(0,e),r=n.slice(e+1);try{t[decodeURIComponent(s)]=decodeURIComponent(r)}catch{t[s]=r}}}return t}getRestEndPoint(e,t){try{return this._buildRestApi(e,t)}catch(e){return console.error(e),null}}_buildRestApi(e,t){if(e&&this.appRoutesMeta?.[e]){const{reqType:n,body:s}=this.appRoutesMeta[e].restApi;let{endPoint:r}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(r=`${r}&pageName=${t.params.pageName}`);const a=r.match(Oh);if(a)for(let e=0;e<a.length;e+=1){const n=a[e].replace("{","").replace("}",""),s=new RegExp(a[e],"g");r=r.replace(s,t?.[n])}if(s){let e={};return Object.keys(s).forEach((n=>{if(t&&this._isSpecialInstruction(n)){const r=s[n];Array.isArray(r)&&r.every((e=>"string"==typeof e))&&(e={...e,...this._processInstruction(n,r,t)})}})),{restApi:r,reqType:n,body:e}}return{restApi:r,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const s={};return"@COPY"===e&&t.forEach((e=>{s[e]=n?.[e]})),s}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveMatchedRouteQueryParams=(e,t,n,s)=>{if(!e)return;const r=t.indexOf("?"),a=-1!==r?t.substring(r+1):void 0;if(a){const e=`${n.join("/")}?${a}`;return this._getQueryParamsResolvedURL(e,s,!0)}};_resolveRoute=(e,t,n)=>{const s=[],[r,a]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=r.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(s[e]=l[e],Rh(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],s[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(a),g={};for(const[e,t]of Object.entries(p))g[e.toLowerCase()]=t;for(const e of Object.keys(d))Rh(d[e])?u[e]=p[e]||g[e.toLowerCase()]:u[e]=d[e];const h=this._resolveMatchedRouteQueryParams(a,n,s,p),f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:h||s.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!Rh(n))return e;const s={};if(s[t]=e,void 0!==e.payload){const t=n.match(Oh);for(let r=0;r<t.length;r+=1){const a=t[r],o=this._getDynamicKeyName(a);if(void 0!==e.payload[o]){const t=e.payload[o];n=n.replace(a,t)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${o}} in routeEndpoint- ${o} is missing in payload`,s)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",s);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const s={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:s}};_resolvePayloadRecursive(e,t){if(Array.isArray(e))return e.map((e=>this._resolvePayloadRecursive(e,t))).flat();const n={};for(const s of Object.keys(e)){let r=e[s];if("string"==typeof r&&Rh(r)){const e=r.match(Oh)??[];for(const n of e){const e=this._getDynamicKeyName(n);void 0!==t[e]?r=r.replace(n,t[e]):this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${e}} in payload - {${e}} is missing in semantic url construct`)}n[s]=r}else n[s]=r&&"object"==typeof r?this._resolvePayloadRecursive(r,t):r}return n}_getMatchedRouteInRoutingTable=(e,t)=>{const[n]=e.includes("?")?e.split("?"):[e];let s=this._findMatchedRouteInStaticList(n,t);return void 0!==s?s:(s=this._findMatchedRouteInDynamicList(e),void 0!==s?s:void 0)};_findMatchedRouteInStaticList=(e,t)=>{if(!this.staticRoutesList||!e)return;const n=e.toLowerCase(),s=t?.toLowerCase();if(Uh()){const e=this._findMatchingRouteByClass(n,s);if(!e)return;const t=Object.values(e)[0],r=t?.payload?.page||"";return this.setStaticRoutePage(r),Object.keys(e)[0]}return this._findInStaticList(n)};_findMatchingRouteByClass=(e,t)=>{if(this.staticRoutesList)return this.staticRoutesList.find((n=>Object.entries(n).some((([n,s])=>{if(!s)return!1;const r=s.payload?.page?.toLowerCase(),a=s.payload?.pageClass?.toLowerCase(),o=r===e||n.toLowerCase()===e;return t?o&&a===t:o}))))};_findInStaticList=e=>{if(!this.staticRoutesList)return;const t=this.staticRoutesList.find((t=>Object.keys(t)[0].toLowerCase()===e));return t?Object.keys(t)[0]:void 0};_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],s=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,r]=e.includes("?")?e.split("?"):[e],a=t.split("/");if(a.length!==s.length)return!1;let o=0;for(o=0;o<a.length;o+=1){const e=a[o].toLowerCase();if(!Rh(e)&&e!==s[o]&&vh(e)!==s[o])return!1}if(r){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(r.toLowerCase()),s=new Set,a=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())s.add(t);for(const e of t.keys())a.add(e);if(a.size!==s.size)return!1;for(const n of s){if(!a.has(n))return!1;const s=t.get(n);if(e.get(n)!==s&&!o.test(s??""))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{OA(e,t,"warning"),OA("Error in Generated Routing Table",null,"error"),OA("Back | Forward for this page may NOT work as intended",null,"warning"),OA("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},bA=RA;const vA=new class{constructor(){this.languagePacks=[]}getLocalizationBundles(e=xA.getLocale()){return(this.languagePacks.find((t=>t.pyLangCode===e))?.pyBundles??this.languagePacks.find((e=>e.pyLangCode===Gs.DEFAULT.toUpperCase()))?.pyBundles??[]).sort(((e,t)=>e.pyOrder-t.pyOrder))}async loadLocaleBundle(e){const t=e.map((e=>df.getPageDataAsync("D_pzBundlesForLocalization","",{locale:e,onlyApp:"false"},{invalidateCache:!0}))),n=(await Promise.allSettled(t)).filter((e=>"fulfilled"===e.status)).flatMap((e=>e.value.pyLanguagePacks));this.setLanguagePack(n)}setLanguagePack(e){e.forEach((e=>{const t=this.languagePacks.findIndex((t=>t.pyLangCode===e.pyLangCode));-1!==t?this.languagePacks[t]=e:this.languagePacks.push(e)}))}};const xA=new class{constructor(){this.environmentInfoObject=null,this.isPortalLoaded=!1,this.pageName=null,this.KeyMapping={},this.isAssignmentHeaderHidden=!1,this.coexistenceMeta={appType:"",isCoexistence:!1},this.brandingInfo=null,this.cookieComplianceMethod="none",this.isExtraCallRequiredForDefaultHome="false",this.enablePriorityAndUrgencyImprovements=!1}setEnvironmentInfo(e){const t=e?.pxOperator?.pyUserName,n=t?lS.decodeHtmlEntities(t):void 0,s={...e,pxOperator:e.pxOperator?{...e.pxOperator,...n?{pyUserName:n}:{}}:e.pxOperator};this.environmentInfoObject=s;const r=this.environmentInfoObject?.features||lS.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...r,granularUIRefresh:r.granularUIRefresh||r.pyEnableGranularUIRefresh||!1},this.environmentInfoObject.pyGenAIEnabled=!!this.environmentInfoObject.pyGenAIEnabled,ks.setNamespaceSupport(this.getFeatureMap()?.isNamespaceEnabled);const a=e.requestContext;if(Array.isArray(a)&&a.length>0){const e=a.filter((e=>e.IncludeInURL)).map((e=>e.Key));e.length>0&&R_(e)}vA.setLanguagePack(this.environmentInfoObject.pyLanguagePacks||[])}getOperatorName(){return this.environmentInfoObject?.pxOperator?.pyUserName}getOperatorWorkGroup(){return this.environmentInfoObject?.pxOperator?.pyWorkGroup}getOperatorIdentifier(){return this.environmentInfoObject?.pxOperator?.pyUserIdentifier}getOperatorImageInsKey(){return this.environmentInfoObject?.pxOperator?.pyImageInsKey}getApplicationLabel(){return this.environmentInfoObject?.pxApplication?.pyLabel}getPortalName(){return bA.getPortalName()}setCaseLabelFirstInTitle(e=!0){this.caseLabelFirstInTitle=e}getCaseLabelFirstInTitle(){return this.caseLabelFirstInTitle}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getApplicationID(){return this.environmentInfoObject?.pxApplication?.pyRuleId}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone?.trim()||void 0}getTheme(e){return"dark"===e?.type?this.darkThemeOverrides:this.themeOverrides}setTheme(e,t){return"dark"===t?.type?this.darkThemeOverrides=e:this.themeOverrides=e,Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.THEME_CHANGE,e),"dark"===t?.type?this.darkThemeOverrides:this.themeOverrides}getNavOrientation(){return this.navOrientation??this.environmentInfoObject?.pyNavOrientation}setNavOrientation(e){return this.navOrientation=e,Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.NAV_ORIENTATION_CHANGE,e),this.navOrientation}setIsWebEmbed(e){return this.isWebEmbed=e,this.isWebEmbed}isWSSPortal(){return this.environmentInfoObject?.pyPortalTemplate===Gs.PORTAL_TYPE.WSS}isDefaultWSSPortal(){return this.isWSSPortal()&&!this.environmentInfoObject?.pyFullObjectDisplayTemplate}isInfinityRuntime(){return"Infinity"===this.environmentInfoObject?.pyExecutionRuntimeName}isGenAIEnabled(){return!!this.environmentInfoObject?.pyGenAIEnabled}getRewriteGenAIDP(){return this.environmentInfoObject?.pyRewriteGenAIDP}isBlueprintExperience(){return!!this.environmentInfoObject?.features?.fromBlueprintExperience}getBrandingInfo(e){return"dark"===e?.type?this.brandingInfoDark:this.brandingInfo}setBrandingInfo(e,t){return"dark"===t?.type?this.brandingInfoDark=e:this.brandingInfo=e,this.brandingInfo}getCookieComplianceMethod(){return this.cookieComplianceMethod}setCookieComplianceMethod(e){this.cookieComplianceMethod=e}setLocale(e){const t=e.replaceAll("-","_").split("_").slice(0,2);this.locale=t.join("-"),this.environmentInfoObject?.pxLocale&&(this.environmentInfoObject.pxLocale.pyUseLocale=this.locale)}getLocale=()=>this.locale;getEnvironmentKeys(){return Object.keys(Gs.ENV_INFO_KEYS)}getMaxAttachmentSize(){return this.environmentInfoObject?.pxApplication?.pyMaxAttachmentSize}getDefaultOperatorDP(){return this.environmentInfoObject?.pxApplication?.pyDefaultOperatorDP}getDocumentUrlDP(){return this.environmentInfoObject?.pxApplication?.pyDocumentUrlDP}getCaseInstanceListDP(){return this.environmentInfoObject?.pxApplication?.pyCaseInstanceListDP}getBaseLocale(){return this.environmentInfoObject?.pxApplication?.pyBaseLocale||"en-US"}getRenderingMode(){return this.environmentInfoObject?.renderingMode}isPegaMobile(){return!!window.pms?.plugins?.c11n_spa||!!window.pms?.plugins?.c11n}isOfflineEnabled(){return"undefined"!=typeof navigator&&(navigator.userAgent||"").includes("pxUsesOffline")}shouldUseURLParams(){return"FULL_PORTAL"===this.environmentInfoObject?.renderingMode&&this.getFeatureMap()?.pyUseURLParams}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){Sd.setPreviewMode()}setDefaultCasePage(e){this.pageName=e}getDefaultCasePage(){return this.pageName}disableAssignmentHeader(e){this.isAssignmentHeaderHidden=e}isAssignmentHeaderDisabled(){return this.isAssignmentHeaderHidden}getDefaultPortal(){return this.environmentInfoObject?.pxOperator?.pyDefaultPortal}updateFeatureMap(e){const t=this.environmentInfoObject?.features;return this.environmentInfoObject&&e&&(this.environmentInfoObject?.features?this.environmentInfoObject.features={...t,...e}:this.environmentInfoObject.features={...e}),this.getFeatureMap()}getFeatureMap(){return this.environmentInfoObject?.features||{}}setKeyMapping(e){return this.KeyMapping=e,this.KeyMapping}getKeyMapping(e){const t=this.KeyMapping[e];return void 0!==t?t:null}setCoexistenceMeta(e){return e&&(this.coexistenceMeta=e),this.getCoexistenceMeta()}getCoexistenceMeta(){return this.coexistenceMeta}isCoexistenceAppOfType(e){return!(!this.coexistenceMeta.isCoexistence||this.coexistenceMeta.appType!==e)}isOptimizedCaseLoadingEnabled(){return this.getFeatureMap().pyEnableOptimizedCaseLoading||this.getFeatureMap().optimizedCaseLoading||!1}isOpenCasePageAfterCreateInMultiDocEnabled(){return this.getFeatureMap().pyOpenCasePageAfterCreateInMultiDoc??!0}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getClassesAccessList(){return this.environmentInfoObject?.pyClassesAccessList?.pxResults??[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getLocalizationVersion(){const e=this.getFeatureMap().pyLocalizationVersion,t=this.getFeatureMap().localizationVersion;return void 0!==t?t:void 0!==e?parseInt(e,10):1}getLocalizationBundles(e=this.locale){return vA.getLocalizationBundles(e)}getAvailableLocalePacks(){return this.getFeatureMap()?.availableLanguagePacks||void 0}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getEnablePriorityAndUrgencyImprovements(){return this.enablePriorityAndUrgencyImprovements}setEnablePriorityAndUrgencyImprovements(e){this.enablePriorityAndUrgencyImprovements=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}getRuntime(){return"undefined"!=typeof window&&window.document?"Browser":"Native"}getInlineEditActions(e){return this.environmentInfoObject?.pyInlineEditActions?.filter((t=>t.pyClassName===e)).map((e=>e.pyActionName))??[]}getInlineEditActionViews(e){return this.environmentInfoObject?.pyInlineEditActions?.filter((t=>t.pyClassName===e)).map((e=>e.pyViewName))??[]}getFullObjectDisplayTemplate(){return this.environmentInfoObject?.pyFullObjectDisplayTemplate??void 0}setFullObjectDisplayTemplate(e){this.environmentInfoObject&&(this.environmentInfoObject.pyFullObjectDisplayTemplate=e),Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.CASE_VIEW_TEMPLATE_CHANGE,e)}getMultiStepNavDisplay(){return this.environmentInfoObject?.pyMultiStepNavDisplay??void 0}setMultiStepNavDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyMultiStepNavDisplay=e),Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.MULTI_STEP_NAV_DISPLAY_CHANGE,e)}getCaseStageDisplay(){return this.environmentInfoObject?.pyCaseStageDisplay??void 0}setCaseStageDisplay(e){this.environmentInfoObject&&(this.environmentInfoObject.pyCaseStageDisplay=e),Ad.publish(Gs.PUB_SUB_EVENTS.UI_EVENTS.CASE_STAGE_DISPLAY_CHANGE,e)}},wA=e=>"fulfilled"===e.status,MA=async(e=xA.getLocale())=>{try{await(async e=>{const t=xA.getAvailableLocalePacks(),n=xA.getLocalizationBundles(e);let s;if(e&&t&&t.includes(e)?s=[og("getLocalizationPack",{queryPayload:{locale:e}})]:n.length>0&&(s=n.map((e=>og("getLocalizationPack",{queryPayload:{version:e.pyBundleVersion,bundle:e.pyBundleName}})))),!s||0===s.length)return;const r=200,a=201,o=await Promise.allSettled(s),i=pC(e??"en-US");o.filter(wA).forEach((({value:e})=>{if([r,a].includes(e.status)&&e.data){const t=e.data;Object.keys(t).forEach((e=>{i.setLocaleForRule(t[e],e)}))}}))})(e)}catch(e){console.warn(e)}};const LA=class{static regex=/\{@P[^}]*\s*:\s*[^}]*\}/g;static subRegex=/:'[a-zA-Z0-9!@#$&()\\-`.+,/\s"]*'/;static keyMap={};static formatLocaleKey(e){let t=0,n="";for(;t<=e.length;){const s=e.indexOf("{@P ",t);if(-1===s){n+=e.substring(t,e.length);break}n+=e.substring(t,s);const r=e.indexOf("}",t),a=e.substring(s,r+1),[o,i]=this.getKeyAndValue(a);this.addKeyToMap(o,i),n+=`${a.split(":")[0]}}`,t=r+1}return n}static getKeyAndValue(e){const t=e.indexOf(":"),n=e.indexOf("}");return[`${e.substring(0,t)}}`,e.substring(t+1,n)]}static addKeyToMap(e,t){this.keyMap[e]=t}static replaceWithValue(e){let t=0,n="";for(;t<=e.length;){const s=e.indexOf("{@P ",t);if(-1===s){n+=e.substring(t,e.length);break}n+=e.substring(t,s);const r=e.indexOf("}",t),a=e.substring(s,r+1);n+=this.keyMap[a],t=r+1}return n}};class UA{GENERIC_BUNDLE_KEY="@BASECLASS!GENERIC!PYGENERICFIELDS";FIELD_LABELS_BUNDLE_KEY="@BASECLASS!LABEL!PYFIELDLABELS";GENERIC_BUNDLE_KEY_LP="GENERIC!GENERICFIELDS";MESSAGE_BUNDLE_KEY="@BASECLASS!MESSAGE!PYMESSAGES";BASE_CLASS="@BASECLASS";DATA_PAGE_LOCALECONTEXT="datapage";constructor(){this.localeStore={},this.getLocaleValue=this.getLocaleValue.bind(this)}setLocaleForRule=(e,t)=>{const n=e.LocaleContent,s=t.toUpperCase();s.startsWith("@BASECLASS!DATAPAGE!")&&s.split(/[!#]/).length<4?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&"fields"in t&&this.updateLocaleStore(t,`${s}#${e}`.toUpperCase())})):"GENERIC!GENERICFIELDS"===s?Object.entries(n).forEach((([e,t])=>{null!==t&&"object"==typeof t&&this.sanitizeLocaleField(t,e.toUpperCase())})):this.sanitizeLocaleField(n,s)};updateLocaleStore=(e,t)=>{const n=e.fields||e,s=this.localeStore[t];s?lS.mergeDeep(n,s):n&&"object"==typeof n&&(this.localeStore[t]=n)};sanitizeLocaleField=(e,t)=>{["DASHBOARDSMANAGER","DATAEXPLORER","INSIGHT"].includes(t.toUpperCase())&&Object.entries(e).forEach((([,e])=>{null!==e&&"object"==typeof e&&"fields"in e&&this.updateLocaleStore(e,t)})),this.updateLocaleStore(e,t)};getLocaleForRule(e){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,s){const r=this.#p(n,t),a=this.#g(e);a&&(e=LA.formatLocaleKey(e));const o=r?this.localeStore[r.toUpperCase()]??{}:{},i=s?this.localeStore[s.toUpperCase()]??{}:{};return"MESSAGES"===n?.toUpperCase()&&"string"==typeof e?this.getLocalizedErrorMessage(o,e)||e:a?LA.replaceWithValue(o[e]||i[e]||e):o[e]||i[e]||e}#p(e,t){return e?.toUpperCase().startsWith("@BASECLASS!DATAPAGE!")?t?`${e}#${t}`:e:e||t}getParagraphLocaleValue(e,t){const n=`${e}!${Gs.PARAGRAPH}!${t}`,s=this.localeStore[n.toUpperCase()];return s?{category:s.category,content:decodeURIComponent(atob(s.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}:null}getPortalLocaleReference(e){return 2!==xA.getLocalizationVersion()?"":e?`PORTAL!${e}`.toUpperCase():`PORTAL!${xA.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e){return e?`CASE!${e}`.toUpperCase():null}getLocalizationVersion(){return 2}async getLocaleJsons(e){if(!await this.isCurrentLocalePackAvailable())return[];const t=xA.getUseLocale(),n=[],s=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!s[e]))).map((e=>e.toUpperCase()))).length>0){const s=e.map((e=>({localeRuleKey:e,promise:yg.getSvcLocale(t,`${e}.json`)}))),r=await Promise.allSettled(s.map((e=>e.promise)));await Promise.all(r.map((async(e,t)=>{if("fulfilled"===e.status){const r=s[t];let a;try{a=await e.value.json()}catch{a=null}a&&n.push({localeRuleKey:r.localeRuleKey,jsonData:a})}})))}return n}async loadLocaleResources(e){await vA.loadLocaleBundle(e),await Promise.all(e.map((e=>MA(e))))}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}matchPatternWithText(e,t){let n=t;const s=[];for(let t=0;t<e.length;){const r=e[t];if(0!==r.length){const e=n.indexOf(r);if(-1===e)return null;if(t>0){const t=n.slice(0,e);s.push(t)}n=n.slice(e+r.length)}t+=1}return n&&s.push(n),s}getLocalizedErrorMessage(e,t){let n="";if(e[t])return e[t];for(const s of Object.keys(e)){const r=s.split(/\{\d+\}/),a=this.matchPatternWithText(r,t);if(a){const t=e[s];if(n=this.replacePlaceHolders(a,t),n)return n}}return n}replacePlaceHolders(e,t){for(let n=0;n<e.length;){if(!t.includes(`{${n+1}}`))return"";t=t.replace(`{${n+1}}`,e[n]),n+=1}return t}async isCurrentLocalePackAvailable(){const e=xA.getLocale();return this.availableLangPacks||(this.availableLangPacks=await yg.getSvcAvailableLocales()),e&&this.availableLangPacks.includes(e)}getBaseComponentLabels=()=>this.getLocaleForRule("COSMOSFIELDS");#g(e){let t=!1;return e&&"string"==typeof e&&(t=e.includes("@P ")),t}}const FA=e=>{const t=e??xA.getLocale()??"en-US";return pC(t)};Po.registerHandler("@L",((e,t)=>t?t.getLocalizationService(t.getLocaleRuleName()).getLocalizedText(e):e)),Po.registerHandler("@P",((e,t,n)=>n?gS.getLitePropertyValue(n):t.getValue(e))),Po.registerHandler("@E",((e,t,n)=>{try{const s=ho(e),r=fo(s);return mo(r,t,n)}catch(e){}return!0})),Po.registerHandler("@W",((e,t,n)=>{let s;if(n){const{pageReference:t,context:r}=n;s=JC(t,`.${Gs.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,r)}else s=t.getContextDataValue(`.${Gs.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);return!0===s||"true"===s})),Po.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const s=[];let r="",a="";const o=t.getPageReference();if(e.startsWith(".")){r=`${o}.${e.substring(1)}`;const s=e.split(".").filter((e=>!!e));s.length>1&&(s.pop(),a=s.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),r=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===Gs.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&("object"==typeof u.datasourceMetadata&&null!==u.datasourceMetadata||(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata})),i===Gs.DATA_PAGE))return null;if(i===Gs.DECISION||i===Gs.RULE_REFERENCE)return function(e,t){const n=Ro.getPropertyName(e?.propertyForDisplayText??""),s=Ro.getPropertyName(e?.propertyForValue??""),r=t.getContextDataValue(`.${Gs.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return r?.map((e=>({key:e[s]||e[`.${s}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==Gs.DATA_PAGE){const e=t.getLocalizationService(n?.localeReference);return n?.datasource?.records?.map((t=>({key:t.key,value:e.getLocalizedText(t.value)})))}const d=Ro.getPropertyName(n?.datasource?.propertyForDisplayText),p=Ro.getPropertyName(n?.datasource?.propertyForValue),g=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],h=t.getContextName(),f=[];if(g.forEach((e=>{if(Ro.isProperty(e?.value)){let t=QC(`.${lS.getFullPropertyReference([a,Ro.getPropertyName(e.value)])}`,o,h);f.push(lS.getFullPropertyReference([o,a,Ro.getPropertyName(e?.value)])),null!=t&&""!==t||(t=Gs.NULL_STRING),s.push(t)}else s.push(e?.value||Gs.NULL_STRING)})),h){const e=To.getContextObjectByName(h)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,r])]}else e[t]=[r]})),To.addContextName(h,e)}const m=function(e,t,n,s){let r="",a=n;if(t.join(Gs.HASH_DELIMITER)&&(r=lS.getHashedString(t.join(Gs.HASH_DELIMITER)),a=n+Gs.UNDERSCORE_STRING+r),s){const e=YC(),t=e?e[n]?.[a]:{};return Array.isArray(t?.[ks.getDefaultQualifiedName("pxResults")])?t[ks.getDefaultQualifiedName("pxResults")]:[]}const o=e.getDataObject(),i=o?.[n]||{},c=i?.[a]||{};return Array.isArray(c?.[ks.getDefaultQualifiedName("pxResults")])?c[ks.getDefaultQualifiedName("pxResults")]:[]}(t,s,l,c),I=t.getLocalizationService();return m.map((e=>{let t=e[d]||e[`.${d}`];var n;return"string"==typeof t&&(n=t,t=I.getLocalizedDataPage(n,l,d)),{key:e[p]||e[`.${p}`],value:t}}))})),Po.registerHandler("@ROUTING_INFO",((e,t)=>Ha(t.getContainerName(),t.getContextName()))),Po.registerHandler("@ENV",((e,t)=>{switch(e){case Gs.ENV_INFO_KEYS.APPLICATION_NAME:return xA.getApplicationName();case Gs.ENV_INFO_KEYS.ACCESS_GROUP:return xA.getAccessGroup();case Gs.ENV_INFO_KEYS.APPLICATION_ID:return xA.getApplicationID()||xA.getApplicationName();case Gs.ENV_INFO_KEYS.USER_NAME:return xA.getOperatorName();case Gs.ENV_INFO_KEYS.USER_ID:return xA.getOperatorIdentifier();case Gs.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizationService().getLocalizedText(xA.getApplicationLabel()||"");case Gs.ENV_INFO_KEYS.USER_IMAGE:return xA.getOperatorImageInsKey();case Gs.ENV_INFO_KEYS.LOCALE:return xA.getUseLocale();case Gs.ENV_INFO_KEYS.TIMEZONE:return xA.getTimeZone();case Gs.ENV_INFO_KEYS.WORK_GROUP:return xA.getOperatorWorkGroup();default:return e}})),Po.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getSharedDataPageForReferenceList()||t.getValue(e)||[],s=t.getComponentConfig(),r=Object.keys(s).find((t=>s[t]?.source?.includes(e)));if(r){const{fields:e,copyAll:t,filterDownloadedFields:a}=s[r],o=[];return n.forEach((n=>{const s={};t||a?Object.keys(n).forEach((e=>{const t=Ro.getPropertyName(e);s[t]=n[t]})):Object.keys(e).forEach((t=>{const r=Ro.getPropertyName(e[t]);s[t]=n[r]})),o.push(s)})),o}return[]})),Po.registerHandler("@FIELD_META",((e,t)=>{let n,s={};if(s=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),s&&s.datasource&&s.datasource.parameters){let r="";const a=e.split(".").filter((e=>!!e));if(a.length>1&&(a.pop(),r=`.${a.join(".")}`),Array.isArray(s.datasource.parameters)){const e=[];s.datasource.parameters.forEach((n=>{const s={},{name:a,value:o}=n;s.name=a,"string"==typeof o&&o.startsWith("@P")?s.value=`@P ${r}${o.substring(3)}`:s.value=o,e.push(t.resolveConfigProps(s))})),n=e}else n=t.resolveConfigProps(s.datasource.parameters);s={...s,datasource:{...s.datasource,parameters:n}}}return s})),Po.registerHandler("@USER",((e,t,n)=>{const s=n?gS.getLitePropertyValue(n,e):t.getValue(e),r=n?gS.getReferencedUser(s,n):t.getReferencedUser(s);return{userId:s,userName:r?r.UserName:null}})),Po.registerHandler("@ACTIVE_CASES",((e,t)=>ef.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),Po.registerHandler("@LR",(e=>e)),Po.registerHandler("@CASE",((e,t)=>e===Gs.ID?t.getCaseInfo().getKey():e)),Po.registerHandler("@SHARED",(e=>Qf.getSharedState(e))),Po.registerHandler("@PARAGRAPH",((e,t)=>{const{useDecision:n,isBanner:s,messageType:r,dismissBanner:a}=Xf.getParagraphProperties(e,t),o=Xf.hasDecisionBannerContent(e,t);return n&&o?Xf.processBannerDecisionParagraph(e,t):s?{htmlContent:Xf.processParagraph(e,t),messageType:r,dismissBanner:a}:Xf.processParagraph(e,t)})),Po.registerHandler("@FORMAT",((e,t)=>{const n=t.getCurrentClassID(),s=bC(e,n);if(!s?.dynamicContents?.length)return null;const{dynamicContents:r}=s;for(let e=0;e<r.length-1;e+=1)if(gS.resolveWhen(r[e].when,t))return{pattern:r[e].content};return{pattern:r[r.length-1].content}})),Po.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),s=e.substring(e.indexOf("]")+2),r=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:a}=t;let o;return lS.isEmpty(a)?o=t.getValue(`.${n}`):(o=a,o=lS.getIn(o,n)),o&&s.length>0?(r&&(o=o.filter((e=>Io(r,e)))),o.map((e=>lS.getIn(e,s)))):null})),Po.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.[ks.getDefaultQualifiedName("pyCountry")];return n?`${PCore.getDefaultQualifiedName("pyAddressForm")}_${n}`:PCore.getDefaultQualifiedName("pyAddressForm")})),Po.registerHandler("@DATATYPE",((e,t)=>t.getValue(e))),Po.registerHandler("@ATTACHMENT",((e,t,n)=>{let s;return s=n?gS.getLitePropertyValue(n):t.getValue(e),qp.prepareAttachmentData(s)}));const VA=e=>{const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)};function jA(e,t){const n=e.authorContext;if("string"!=typeof n||!n)return!1;return(n.startsWith(".")?n.substring(1):n)===t}function kA(e,t){const n=e.config;if(!n?.name||"string"!=typeof n.name)return null;const s=t(n.name);return s?Array.isArray(s)?s.find((e=>e.classID===n.ruleClass))??null:s:null}function BA(e,t,n,s="root",r=[]){if(e.config&&function(e,t){const n="string"!=typeof(s=e.value)?null:s.startsWith("@")?s.replace(/^@\w+\s+\./,""):null;var s;return!!n&&n===t}(e.config,t)&&r.push({type:e?.type,config:e.config,path:s}),!e.children)return r;for(let a=0;a<e.children.length;a+=1){const o=e.children[a],i=`${s}.children[${a}]`,c="reference"===o.type?kA(o,n):o;c&&BA(c,t,n,i,r)}return r}Po.registerHandler("@FL",((e,t)=>{const n=(e=>e.startsWith(".")?e.slice(1):e)(e),s=t.getFieldMetadata(n);return s&&s.label?t.getLocalizationService(s.localeReference).getLocalizedText(s.label):VA(n)})),Po.registerHandler("@DEFERRED",((e,t)=>{const n=t.getFieldMetadata(e);return n?.isDeclarativeTarget?{isDeferred:!0,propertyName:e}:t.getValue(e)})),Po.registerHandler("@GENAICOACH",((e,t)=>vC(e,t.getCurrentClassID()))),Po.registerHandler("@AIAGENT",((e,t)=>{const n=xC(e,t.getCurrentClassID());if(n)return n;const s=t.getComponentConfig();if(s){const n=s?.coaches?.find((t=>t?.config?.coach?.substring(9)===e&&t?.config?.ruleNamespace))?.config;if(n?.label){const s={label:n.label};t.resolveConfigProps({label:n.label},s);const r=s.label;return{insName:xA.getFeatureMap()?.isNamespaceEnabled&&e.includes(Gs.DOUBLE_UNDERSCORE_STRING)?e:`${n.ruleNamespace}${Gs.DOUBLE_UNDERSCORE_STRING}${e}`,label:t.getLocalizedValue(r),type:"agent"}}}return null})),Po.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),s=t.getContextName(),r=t.getPageReference();Df.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",r,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:`${r.replace("caseInfo.content","")}${e}`,resetForm:!0}),`${r}${e}`,`${s}/${r}`,s)})),Po.registerHandler("@DW",((e,t,n)=>{let s;const r=`${Gs.CONTEXT_DATA}.${Gs.SUMMARY_OF_DYNAMIC_WHENS}.${e}`;if(n){const{context:e}=n??{};s=QC(r,null,e)}else s=t.getValue(r);return!0===s||"true"===s})),Po.registerHandler("@CA",((e,t,n)=>n?gS.getLitePropertyValue(n):t.getValue(e)));const $A=new Set(["autocomplete","dropdown"]),GA=["displayAs","hideLabel","linkReference","localeReference","matchPosition","referenceType","selectionMode"];function WA(e,t,n){const s=t.config,r=function(e){const t=e.config??{},n={};return GA.forEach((e=>{void 0!==t[e]&&(n[e]=t[e])})),void 0===t.contextClass&&void 0===t.targetObjectClass||(n.contextClass=t.contextClass??t.targetObjectClass),void 0!==t.referenceList&&(n.referenceList=t.referenceList),n.parameters=t.parameters,n}(e),a=function(e){const t=e.inheritedProps;return Array.isArray(t)?t.reduce(((e,t)=>("object"!=typeof t||null===t||Array.isArray(t)||"prop"in t&&"string"==typeof t.prop&&"value"in t&&(e[t.prop]=t.value),e)),{}):{}}(n),o={...s??{},...r,...a};return"AutoComplete"===t.type&&void 0!==r.referenceList&&(o.datasource=r.referenceList),o}function HA(e,t,n,s){try{if(!e.name||"string"!=typeof e.name)return null;const t=s(e.name);let r;if(Array.isArray(t))r=t;else{if(!t)return null;r=[t]}const a=r.find((t=>t.classID===e.ruleClass));if(!a||!function(e){const t=e.config;return!!t&&"DataReference"===t.template&&"string"==typeof t.displayAs&&$A.has(t.displayAs.toLowerCase())}(a))return null;const o=function(e){const t=e?.children;return Array.isArray(t)&&t.length>0?t[0]:null}(a);return o?{type:o.type,config:WA(a,o,e),path:n}:null}catch{return null}}function qA(e,t,n,s="root",r=[]){if(e.config&&jA(e.config,t)){const t=HA(e.config,e.type,s,n);t&&r.push(t)}if(!e.children)return r;for(let a=0;a<e.children.length;a+=1){const o=e.children[a],i=`${s}.children[${a}]`,c="reference"!==o.type||o.config&&jA(o.config,t)?o:kA(o,n);c&&qA(c,t,n,i,r)}return r}function zA(e,t,n){const s=xA.getInlineEditActionViews(t),r=function(e,t){if(!e||"object"!=typeof e)return null;if(Array.isArray(e))return e.find((e=>e.classID===t))??null;return e}(n(s&&s.length>0?s[0]:ks.getDefaultQualifiedName("pyEdit")),t);if(!r)return[];const a=BA(r,e,n,"root");return a.length>0?a:qA(r,e,n)}const YA={},KA={},QA={};let JA=0,XA=!1;const ZA={},eC={},tC={},nC={},sC={},rC={},aC={},oC={},iC={},cC={},lC={},uC=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const s=e[n],r=t[n];r?((e,t,n,s)=>{const r=Array.isArray(n)?n:[n];(Array.isArray(s)?s:[s]).forEach((e=>{const t=r.findIndex((t=>t.classID===e.classID));if(-1===t)r.push(e);else{const n={isDeclarativeTarget:!1},s={...r[t],...n,...e};r[t]=s}})),t[e]=1===r.length?r[0]:r})(n,t,r,s):t[n]=s})):lS.copy(e,t)},dC=(e,t="")=>{if(!e)return null;const n=eC[e];if(!n)return null;if(!t)return lS.deepClone(n);let s;return s=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()||e.associationClassID?.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||n.associationClassID?.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,s?lS.deepClone(s):null},pC=e=>(cC[e]||(cC[e]=new UA),cC[e]),gC=(e,t)=>(lC[e]||(lC[e]=t()),lC[e]),hC=(e,t,n,s=[])=>{if(!t||!e)return null;if(!e.includes(".")){let r;const a=dC(e,t);return s.length&&(r=s.join(".")),{...a,embeddedType:n,category:r}}const[r,...a]=e.split("."),o=dC(r,t);return o&&s.push(o.label),hC(a.join("."),o?.pageClass,o?.type,s)},fC=e=>{0!==Object.keys(e).length&&(uC(e,QA),XA&&(JA+=1))},mC=()=>JA,IC=()=>{XA=!0},EC=()=>{XA=!1},yC=e=>{uC(e,ZA)},AC=e=>{(e=>{e.views&&Object.keys(e.views).length>0&&(uC(e.views,QA),XA&&(JA+=1)),e.navigations&&uC(e.navigations,ZA),e.personalizations&&uC(e.personalizations,nC),e.insights&&uC(e.insights,sC),e.paragraphs&&uC(e.paragraphs,YA),e.formats&&uC(e.formats,KA),e.dataTypes&&uC(e.dataTypes,rC),e.datapages&&uC(e.datapages,aC),e.genAICoaches&&uC(e.genAICoaches,oC),e.AIAgents&&uC(e.AIAgents,iC)})(e),(e=>{const t=e.fields||{};Object.keys(t).forEach((n=>{const s=t[n];if(Array.isArray(s)){if(s.forEach((t=>{e.datapages&&t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages?.[t.datasource.name].mode);const s=om(sm,n,t.definedOnClassID??t.classID);t.localeReference=s})),1===s.length){const[e]=s;t[n]=e}}else e.datapages&&s?.datasource&&"DataPage"===s.datasource.tableType&&(s.datasource.mode=e.datapages[s.datasource.name].mode)}))})(e);const{datapages:t={}}=e;Object.keys(t).forEach((e=>{tC[e]=t[e]})),uC(e.fields,eC)},CC=e=>QA[e],SC=(e,t)=>{const n=QA[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},_C=e=>ZA[e],NC=e=>e in tC?tC[e]:null,TC=e=>e in nC?nC[e]:null,DC=e=>e in sC?sC[e]:null,PC=e=>{const t={};return Object.keys(eC).forEach((n=>{const s=eC[n];let r;Array.isArray(s)?r=s.find((t=>e===t.classID)):e===s.classID&&(r=s),r&&(t[n]=lS.deepClone(r))})),t},OC=(e,t)=>{const n=dC(e,t),s=n?.datasource?.parameters;return s?lS.deepClone(s):null},RC=(e,t)=>{let n=null;const s=YA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?lS.deepClone(n):null},bC=(e,t)=>{let n=null;const s=KA[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?lS.deepClone(n):null},vC=(e,t)=>{let n=null;const s=oC[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?lS.deepClone(n):null},xC=(e,t)=>{let n=null;const s=iC[e];return s&&(Array.isArray(s)?n=s.find((e=>e.classID===t)):s.classID===t&&(n=s)),n?lS.deepClone(n):null},wC=e=>{if(e in rC){const{savableDataPage:t}=rC[e];return t}return null},MC=e=>{const t=aC[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:s,parameters:r}=t;if(s)return r.map((e=>({keyName:e.name,isAlternateKeyStorage:s,linkedField:e.linkedField})));const a=rC[n];return a?a.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:s}))):[]},LC=e=>{if(e in rC){const{lookupDataPage:t}=rC[e];return t}return null},UC=e=>{if(Object.hasOwn(rC,e)){const{lookupDataPageInfo:t}=rC[e];return t}return null},FC=(e,t)=>{const n=e.split("."),s=n.pop(),r=new Tm({options:{pageReference:`${n.join(".")}`,context:t}}),a=dC(s,r.getCurrentClassID())?.additionalInformation;if(!a?.includes("@PARAGRAPH"))return a;const o=Ro.trimAnnotation(a);return Xf.processParagraph(o,r)},VC=(e,t)=>{const n=e.split("."),s=n.pop(),r=new Tm({options:{pageReference:`${n.join(".")}`,context:t}}),a=dC(s,r.getCurrentClassID()),o={};return r._classID=r.getCurrentClassID(),r.resolveConfigProps(a,o),o},jC=(e,t)=>zA(e,t,CC);class kC{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,s,r,a="singleRecord"){if(!e||!n||!s?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,r);s.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=lS.getFullPropertyReference([c,t]),t in i){const e=i[t];e.find((e=>e.propertyName===o))||e.push({propertyName:o,mode:a})}else i[t]=[{propertyName:o,mode:a}]})),Object.keys(i).length>0&&(this.cascadeResetSubscribers[e]=i)}deregisterResetDependencies(e,t,n,s,r){if(!e||!n||!s?.length)return;const a=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,r);s.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=lS.getFullPropertyReference([i,t]),t in o){const e=o[t];lS.removeExistingDependentProperty(e,a)}}})),Object.keys(o).length>0&&(this.cascadeResetSubscribers[e]=o)}getResetDependencies(e,t){return this.cascadeResetSubscribers[e]?.[t]||[]}purgeResetDependencies(e){e&&this.cascadeResetSubscribers[e]&&delete this.cascadeResetSubscribers[e]}registerFields(e,t,n,s,r){this.cascadeSubscribers[e]=this.cascadeSubscribers[e]||{},n?.forEach((n=>{this.cascadeSubscribers[e][`${t}${n}`]=this.cascadeSubscribers[e][`${t}${n}`]||{};const a=this.cascadeSubscribers[e][`${t}${n}`];if(!a[r]){a[r]=s;const o=QC(n,t,e);a.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,s,r){const a=kC._getFieldsForList(e,t,n);a.length>0&&(this.registerFields(e,t,a,s,r),Nh.enableCascade(e))}unRegisterListField(e,t,n,s){const r=kC._getFieldsForList(e,t,n);r.length>0&&this.unRegisterFields(e,t,r,s)}static _getFieldsForList(e,t,n){const s=[],r=dC(n,QC("classID",t,e));return r&&!Array.isArray(r)&&r.datasource&&r.datasource.parameters&&Object.values(r.datasource.parameters).forEach((e=>{if(Ro.isProperty(e)){const t=Ro.trimAnnotation(e);s.push(t)}})),s}unRegisterFields(e,t,n,s){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const r=this.cascadeSubscribers[e][`${t}${n}`];r[s]&&delete r[s]}))}triggerCascade(e,t,n,s){let r=!1;this.cascadeSubscribers[e]&&this.cascadeSubscribers[e][t]&&(Object.keys(this.cascadeSubscribers[e][t]).forEach((a=>{const o=this.cascadeSubscribers[e][t];"previousValue"!==a&&o.previousValue!==n&&(r=!0,s?s.add(o[a]):o[a](t,n))})),r&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const s=new Set;n.forEach((t=>{const n=QC(t,"",e);this.triggerCascade(e,t,n,s)})),s.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const s=QC(t,"",e);n(e,t,s)}))}))}_updateChangedProperties(e,t,n,s,r,a,o,i){const c=n&&i.some((e=>s.startsWith(e)));if(e!==t||c){const e=s.lastIndexOf("."),t=s.substring(0,e),i=s.substring(e),c=Id.getMessages({type:"error",property:i,context:r,pageReference:t});if(c?.length>0&&o.push(s),!n)return;a.push(s)}}isChangedListPropertyExist(e){let t=!0;return 0!==this.listChangeSubscribers.length&&lS.isValidPageListProperty(e)||(t=!1),t}_getServerProperties(e,t,n,s,r,a,o){if("object"!=typeof e){r.push(n.replace(/\.(\d+)/g,"[$1]"));const i=this.isChangedListPropertyExist(n);n=n.replace(/\.(\d+)/g,"[$1]");const c=QC(n,"",t);if(void 0===c&&!e&&0!==e)return;return void this._updateChangedProperties(c,e,i,n,t,s,a,o)}const i=Object.keys(e??{});for(let c=0,l=i.length;c<l;c+=1){const l=i[c],u=`${n}.${l}`;if(Array.isArray(e[l])){const n=QC(u,"",t);n&&n?.length===e[l].length||o.push(u.replace(/\.(\d+)/g,"[$1]"))}this._getServerProperties(e[l],t,u,s,r,a,o)}}getServerProperties(e,t,n=Gs.CASE_INFO.CASE_INFO_CONTENT){const s=[],r=[],a=[],o=lS.getIn(e,n);return o&&t?(this._getServerProperties(o,t,n,s,a,r,[]),{changedListProperty:s,leafProperty:a,changedPropertyWithError:r}):{changedListProperty:s,leafProperty:a,changedPropertyWithError:r}}_handlePageReference(e,t,n){let s=e;if("Page"===n&&t.startsWith(".")&&t.slice(1).includes(".")){s=`${e}${t.substring(0,t.lastIndexOf("."))}`}return s}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const BC=new kC;let $C=null;const GC=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),WC=e=>{$C=e},HC=()=>$C,qC=e=>{if(!e)return;let t=[],n=[],s=[];if(Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n,changedPropertyWithError:s}=BC.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),$C?.dispatch(e),!Array.isArray(e)&&"MERGE_DATA"===e.type){if(s.length&&!e.payload.skipValidation){s.map((e=>{const t=e.lastIndexOf(".");return{property:e.substring(t),pageReference:e.substring(0,t)}})).forEach((({property:t,pageReference:n})=>{Id.clearMessages({type:"error",property:t,pageReference:n,context:e.payload.context});const s=rd.getFieldReferenceForProperty(e.payload.context,`${n}${t}`);if(s){const e=gS.resolveContextTreeNodeProps(s.props);Zp.validate(e.componentName?.toLowerCase(),e.propertyName,gS.getLitePropertyValue(e,e.propertyName),e)}}))}BC.handleServerChanges(e.payload.context,t,n)}},zC=e=>HC()?.getState().data?.[e],YC=()=>HC()?.getState().data[Gs.SHARED],KC=(e,t,n)=>{if(!(s=e)||s.startsWith('"')||s.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var s;const r=e?.startsWith(".")?t+e:e,a=GC(r);return lS.getIn(n,a)},QC=(e,t,n)=>KC(e,t,zC(n)),JC=(e,t,n)=>KC(t,e?`${Gs.CONTEXT_DATA}.${e}`:`${Gs.CONTEXT_DATA}`,zC(n)),XC=(e,t,n)=>((e,t,n)=>{const s=GC(`${t}.${n}`);return lS.getIn(e,s)})(zC(n),`${Gs.CONTEXT_DATA}.${e}`,t),ZC=e=>{const{context:t}=e,n=HC()?.getState().data[t];if(n)return Er;const{action:s}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(s)?wr:Er},eS=(e,t)=>{const n=GC(t);return lS.deleteIn(e,n)},tS=e=>!Array.isArray(e)&&"object"==typeof e,nS=(e,t=[],n=[])=>{Array.isArray(t)&&t.length>0&&t.forEach((t=>{t.allowMultiple?t.allowMultiple&&!n.includes(t.path)&&lS.setIn(e,t.path,[]):lS.setIn(e,t.path,{})})),n.length>0&&lS.rearrangeProperties(n,e)},sS=(e,t,n={})=>{const{isArrayDeepMerge:s,propertiesToReplace:r=[],propertiesToReArrange:a=[]}=n;Array.isArray(e)&&!t&&(t=[]),nS(e,r,a);const o=(e,t)=>{if(tS(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return Array.isArray(t)?t:Us(e,t,o);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(s)return Us(e,t,o);{const n=t.length;if(void 0===s&&n===e.length)return Us(e,t,o)}}return""===t&&e&&"object"==typeof e?e:t};return o(e,t)},rS=(e,t,n,s={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:r}=s,a=GC(t);if("object"==typeof n){const t=sS(lS.getIn(e,a),n,{isArrayDeepMerge:r});return lS.setIn(e,a,t)}return lS.setIn(e,a,n)},aS=(e,t,n)=>{const s=GC(t);return lS.setIn(e,s,n)},oS=()=>{const e=ha,{promise:t,actionMgrID:n}=vg.actionManagerPromise(e);return qC({type:e,payload:{actionMgrID:n}}),t},iS=e=>{const t=HC()?.getState();return!!t?.data?.[e]};class cS{static mergeDeep(e,t){return Us(t,e)}static hasIn(e,t){return $n(e,t)}static getIn(e,t,n){return Gn(e,t,n)}static setIn(e,t,n){return Kn(e,t,n)}static deleteIn(e,t){return Vn(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return Vs(e)}static deepClone(e={}){return JSON.parse(JSON.stringify(e))}static copy(e,t){Object.keys(e).forEach((n=>{t[n]=e[n]}))}static isPropertyRef(e){if(!e||!e.includes("."))return!1;for(let t=0;t<e.length;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isValidPropertyReference(e){return"string"==typeof e&&(""===e||""!==e.trim())}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const s of Object.keys(e)){const r=e[s];r&&"object"==typeof r&&!Array.isArray(r)?n=n||cS.isWhenExist(r):t.includes(s)&&"string"==typeof r&&r?.startsWith("@W ")&&(n=!0)}return n||"multirecordlist"!==e?.type||"Editable"!==e?.renderMode||(n=Object.keys(e?.allowActions??{}).some((t=>"string"==typeof e?.allowActions?.[t]&&e.allowActions[t]?.startsWith("@W ")))),n}static getWhenNames(e){const t=["visibility","disabled","readOnly","required"];let n="";const s=new Set;if(e&&Object.keys(e).forEach((r=>{const a=e[r];t.includes(r)&&"string"==typeof a&&a.startsWith("@W ")&&(n=Ro.trimAnnotation(a),s.add(n))})),"multirecordlist"===e?.type&&"Editable"===e?.renderMode){const t=e?.allowActions??{};Object.keys(t).forEach((e=>{"string"==typeof t[e]&&t[e]?.startsWith("@W ")&&(n=Ro.trimAnnotation(t[e]),s.add(n))}))}return[...s]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const s of Object.keys(e))t.includes(s)&&"string"==typeof e[s]&&e[s]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const s=n;if(t.indexOf(".")>0){t.split(".").forEach((e=>{if(e.includes("[")){const[t]=e.split("[");n[t]=[],n=n[t],e=e.substring(e.indexOf("[")+1,e.lastIndexOf("]"))}n[e]={},n=n[e]}))}else n[t]={},n=n[t];return Object.keys(e).forEach((t=>{let s=t;t.startsWith(".")&&(s=t.substring(1)),n[s]=e[t]})),s}static buildObject=(e,t,n)=>{if(void 0===n)return;const s=e.split(".");let r=0;for(;r<s.length-1;r+=1){const e=s[r];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[s[r]]||(t[s[r]]=Array.isArray(n)?[]:{}),sS(t[s[r]],n,{isArrayDeepMerge:!0})):t[s[r]]=n};static getHashedString(e){return(0,hn.crc32)(e).toString(16)}static getPropertyName(e){if(e){const t=e.startsWith("@P"),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getPropertyNameFromDependency(e){return"string"==typeof e?e:e.propertyName}static isValidJson(e){try{return JSON.parse(e)}catch(e){return console.error("not a Valid JSON",e),!1}}static isEqual(e,t){return sn(e,t)}static isContains(e,t){const n=Object.keys(e);for(let s=0;s<n.length;s+=1)if(e[n[s]]&&cS.isEqual(e[n[s]],t))return!0;return!1}static removeExistingDependentProperty(e,t){const n=e.findIndex((e=>e.propertyName===t));n>=0&&e.splice(n,1)}static getFullPropertyReference(e){return Array.isArray(e)?e.filter((e=>!!e)).join("."):""}static iterateLeafNodes(e,t){const n=(e,s=[])=>{Object.entries(e).forEach((([r,a])=>{s.push(Array.isArray(e)?Number(r):r),Array.isArray(a)?a.forEach(((e,t)=>{s.push(t),n(e,s),s.pop()})):"object"==typeof a?n(a,s):t(s.slice(),a),s.pop()}))};n(e)}static resolveStringBooleans(e){const t=["required","readOnly","visibility"];return Object.keys(e).forEach((n=>{t.includes(n)&&"string"==typeof e[n]&&(e[n]="true"===e[n])})),e}static generateUniqueID(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();const e="undefined"!=typeof performance&&"function"==typeof performance.now?performance.now().toString(36).replace(".",""):Math.random().toString(36).slice(2);return`${Date.now().toString(36)}${e}`}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const s=e.split(".");let r;s.reduce(((e,t,a)=>(r=e[t]?e[t]:Number.isNaN(Number(s[a+1]))?s.length-1===a?n:{}:[],e[t]=r,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,s)=>{cS.flatten(e,`${t}[${s}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((s=>{const r=t?`${t}.${s}`:s;cS.flatten(e[s],r,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=e.startsWith(Gs.OBJECT_INFO.OBJECT_INFO)?`${e}${t}`.replace(Gs.OBJECT_INFO.OBJECT_INFO_CONTENT,""):`${e}${t}`.replace(Gs.CASE_INFO.CASE_INFO_CONTENT,"").replace(Gs.DATA_INFO.DATA_INFO_CONTENT,"");return ap.formatPageReference(n)}static convertPageRefToClipboardPageNotation(e){return e.replace(/\[\d+\]/g,(e=>e.replace(/\d+/g,(e=>`${parseInt(e,10)+1}`)).replace("[","(").replace("]",")")))}static convertClipboardPageToPageRefNotation(e){return e.replace(/\(\d+\)/g,(e=>e.replace(/\d+/g,(e=>""+(parseInt(e,10)-1))).replace("(","[").replace(")","]")))}static segmentsMatch=(e,t)=>{const n=e.split("."),s=t.split(".");return n.length===s.length&&n.every(((e,t)=>{if(e===s[t])return!0;if(e.endsWith("()")){const n=e.slice(0,-2),r=s[t];return r.startsWith(n)&&/^\[\d+\]$/.test(r.slice(n.length))}return!1}))};static isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&vg.rejectActionByID(e.payload.actionMgrID))),!0}static isValidAnnotation(e){const t=new Set(["@DATASOURCE","@ACTIVE_CASES","@ADDRESS","@ASSOCIATED","@ATTACHMENT","@CASE","@FILTERED_LIST","@PARAGRAPH","@P","@ROUTING_INFO","@USER","@W","@E","@SHARED","@CA"]),n=e.indexOf(" "),s=e.substring(0,n);return t.has(s)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static decodeHtmlEntities(e){if("undefined"!=typeof document){const t=document.createElement("textarea");return t.innerHTML=e,t.value}let t=e;return Object.entries({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#x27;":"'","&#x2F;":"/","&#47;":"/"}).forEach((([e,n])=>{t=t.split(e).join(n)})),t=t.replace(/&#(\d+);/g,((e,t)=>String.fromCharCode(parseInt(t,10)))),t=t.replace(/&#x([a-f\d]+);/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))),t}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const s=e[t];"string"==typeof s?n="true"===s||"false"!==s&&s:"object"==typeof s?(n=s,cS.convertObjectWithStringToBoolean(s)):n=s,e[t]=n})),e}static rearrangeProperties(e,t){e.forEach((e=>{let n=cS.getIn(t,e);if(!n)return;const s=Object.hasOwn(n,ks.getDefaultQualifiedName("pyCount"));if(s&&(n=n.pxResults),!n)return;const r=n.filter((e=>!e.error)),a=n.filter((e=>e.error));cS.setIn(t,s?`${e}.pxResults`:e,[...r,...a])}))}static getETag(e){if(!e)return;let t=e;const n=t?.split("/")||[],s=["workarea","modal","actionarea"],r=n.findIndex((e=>s.some((t=>e.startsWith(t)))));return-1!==r&&(t=n.slice(0,r+1).join("/")),HC()?.getState()?.data[t]?.caseInfo?.headers?.etag}static PAGELIST_PATH_REGEX=/^(?!.*\.\.)(?!\d)\w+(\.\w+)*\.\d+(\.\w+)+$/;static isValidPageListProperty(e){return cS.PAGELIST_PATH_REGEX.test(e)}static generateDataPageHashWithParameters(e,t,n){const s=[];let r="";const a=n.getPageReference(),o=n.getContextName();Object.keys(e).forEach((t=>{const n=e[t];let r=Ro.isProperty(n)?QC(`.${Ro.getPropertyName(n)}`,a,o):n;null!=r&&""!==r||(r=Gs.NULL_STRING),s.push(r)}));let i=t;const c=s.join(Gs.HASH_DELIMITER);return c&&(r=cS.getHashedString(c),i=t+Gs.UNDERSCORE_STRING+r),i}static parsePegaDateTimeToTimestamp(e){if(!e)return null;const t=e.replace(" GMT","").match(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})\.(\d{3})$/);if(!t){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}const[,n,s,r,a,o,i,c]=t.map(Number);return new Date(n,s-1,r,a,o,i,c).getTime()}static formatToUTCDate(e,t){if(!e)return e;const n=new Date(e);if(Number.isNaN(n.getTime()))return e;const s=(e,t=2)=>String(e).padStart(t,"0"),r=n.getUTCFullYear(),a=s(n.getUTCMonth()+1),o=s(n.getUTCDate());if("Date"===t)return`${r}${a}${o}`;return`${r}${a}${o}T${s(n.getUTCHours())}${s(n.getUTCMinutes())}${s(n.getUTCSeconds())}.${s(n.getUTCMilliseconds(),3)} GMT`}static isLeafProperty(e){return Boolean(e)&&!e.includes(".")}static getMetadataType(e,t,n){const s=cS.isLeafProperty(e)?dC(e,t):n.getFieldMetadata(e);return Array.isArray(s)?s[0]?.type:s?.type}static toStringParameterValue(e){return"string"==typeof e?e:e instanceof Date?e.toISOString():null}static resolveParameterValue(e,t,n,s,r){if(n&&Object.hasOwn(n,e))return n[e];if(!Xg.isProperty(t))return t;const a=null!==r?Xg.getPropertyName(t):Xg.getLeafPropertyName(t);return s.getValue(`.${a}`)}static formatParameterValue(e,t,n,s,r){if(!Xg.isProperty(t))return e;const a=null!==s?Xg.getPropertyName(t):Xg.getLeafPropertyName(t);if(!a)return e;const o=cS.getMetadataType(a,r,n);if(!o)return e;const i=cS.toStringParameterValue(e);return"Date"===o?i?i.includes("T")?cS.formatToUTCDate(i,"Date"):cS.formatToUTCDate(`${i}T00:00:00Z`,"Date"):e:"DateTime"===o&&i?cS.formatToUTCDate(i,"DateTime"):e}static resolveAndFormatParameters(e,t,n,s,r){const a={};for(const o of Object.keys(e)){const i=e[o];if("string"!=typeof i)a[o]=i;else{const e=cS.resolveParameterValue(o,i,r,t,n);a[o]=cS.formatParameterValue(e,i,t,n,s)}}return a}static normalizePropertyRef(e){const t=e.replace(/\[\d+\]/g,"");return t.startsWith(".")?t.substring(1):t}static resolvePageClass(e,t){if(!t)return;const n=(e=this.normalizePropertyRef(e)).split(".");let s;s=n.length>1?n.slice(0,-1):n;let r=t;for(const e of s){const t=dC(e,r);if(!t)return;if(Array.isArray(t)&&t[0]?.pageClass?r=t[0].pageClass:!Array.isArray(t)&&t.pageClass&&(r=t.pageClass),!r)return}return r}static isNestedObject(e){return ms(e)&&!Array.isArray(e)}static pruneKeys=(e,t,n=!1)=>{if(!H(e))return e;const s=t instanceof Set?t:new Set(t);return n?(cS.isNestedObject(e)?Object.keys(e).forEach((t=>{const n=e[t];if(s.has(t)){const n=Object.getOwnPropertyDescriptor(e,t);n&&n.configurable?delete e[t]:Reflect.set(e,t,void 0)}else n&&(ms(n)||Array.isArray(n))&&cS.pruneKeys(n,s,!0)})):Array.isArray(e)&&e.forEach((e=>{(ms(e)||Array.isArray(e))&&cS.pruneKeys(e,s,!0)})),e):Array.isArray(e)?e.map((e=>ms(e)||Array.isArray(e)?cS.pruneKeys(e,s,!1):e)):cS.isNestedObject(e)?Object.keys(e).reduce(((t,n)=>{if(!s.has(n)){const r=e[n];t[n]=ms(r)||Array.isArray(r)?cS.pruneKeys(r,s,!1):r}return t}),{}):e}}const lS=cS,uS=Gs.SUMMARY_OF_LISTS,dS=Gs.SUMMARY_OF_WHEN_CONDITIONS;class pS{static updateData(e){Object.keys(e).forEach((t=>{qC(AS({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{qC(AS({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${dS}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){const n=this.resolveName(e,t);return _C("string"==typeof n?n:"")}static resolveView(e,t,n=""){const s=CC(this.resolveName(e,t));let r=[];if(Array.isArray(s)&&s.length>0){if(t&&s.length>1){if(n||(n=t.getValue(Gs.CLASS_ID)||""),!n)return;r=s.filter((e=>e[Gs.CLASSID]===n))}return 0===r.length?s[0]:r[0]}return s}static resolveName(e,t){return e&&"string"==typeof e&&e.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e&&"string"==typeof e&&e.startsWith("@")&&(e=Ro.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=Ro.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&Number.isInteger(t)?`${e}[${t}]`:"string"==typeof t&&t.startsWith(".")?e+t:t:e}static getRuleClass(e,t,n){let s;if(t)s=t.startsWith(Gs.CLASS_ANNOTATION)?t.split(Gs.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName(),e.getValue(Gs.CASE_INFO.CASE_INFO_CLASSID));else if(n?.authorContext){const t=e.getFieldMetadata(n.authorContext);if(t){const e=["refer","copy"].includes(t.dataRetrievalType),n="Page List"===t.type;s=e&&n?t.pageClass:t.classID}s||(s=n.ruleClass)}return s}static resolveReference(e,t){const{type:n}=e;let s;if("reference"===n){const{config:n}=e,r=n?.type,{ref:a,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return t&&(t._ruleClass=c),"navigation"===r?s=this.resolveNavigation(a||o,t):"view"===r?s=this.resolveView(a||o,t,c||""):"widget"===r&&(s={type:"Widget",config:{name:o,ruleClass:c}}),s}return e}static resolvePropertyReference(e,t,n){return QC(t,e,n)}static getProperty(e,t,n){let s=this.resolvePropertyReference(t,e,n);if(null==s||0===s.length){const r=XC(`${t}.${uS}`,e,n);r&&(s=this.resolvePropertyReference(t,r,n))}return s}static getPropertyValue(e,t,n){return e=Ro.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=pS.getLitePropertyValue(t,"referencedUsers");if(Array.isArray(n)){const t=n.find((t=>t.UserID===e));if(t)return{userId:t.UserID,UserName:t.UserName}}return n?.[e]}static getLitePropertyValue(e,t){if(!e)return;const{useCustomContext:n,propertyName:s,hasSuggestions:r,pageReference:a,context:o}=e;let i=t||s||"";return n?(i=i.startsWith(".")?i.substring(1):i,i.split(".").reduce(((e,t)=>e?.[t]??void 0),n)):r&&i===s?pS.getPropertyValue(i,a,o?`${o}/${Gs.SUGGESTION}`:void 0):pS.getPropertyValue(i,a,o||void 0)}static _handlePropString(e,t,n,s,r){n.startsWith("@")?e[t]=Ro.handleAnnotation(n,s,r):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((s=>{const r=e[s];"string"==typeof r?this._handlePropString(e,s,r,t,n):Array.isArray(r)?r.forEach((s=>{this._resolveProps("object"==typeof s?s:e[s],t,n)})):"object"==typeof r&&this._resolveProps(e[s],t,n)}))}static resolveProps(e,t,n){return e&&t?(lS.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(lS.mergeDeep(e,t),this._resolveProps(t,void 0,e),lS.resolveStringBooleans(t)):t}static resolvePropertyPageClass(e,t){const n=lS.resolvePageClass(e,t),s=e.substring(e.lastIndexOf(".")+1),r=dC(s,n);let a;if(r)return a=Array.isArray(r)?r[0]?.pageClass:r.pageClass,a}static resolveClassID(e,t,n,s){const r=Ro.trimAnnotation(e);let a=r.startsWith(".")?`${t}${r}`:r;for(;a;){const e=QC(Gs.CLASS_ID,a,n);if(e)return e;if(s){const e=this.resolvePropertyPageClass(r,s);if(e)return e}const t=a.lastIndexOf(".");if(-1===t)break;a=a.substring(0,t)}return null}}const gS=pS;const hS=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}},fS=hS;const mS=class{static#h=[];static#f=!1;static getActionHandlers=(e,t,n)=>{const s=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=fS.getHandler(e.action),{config:n}=e;s.push({handler:t,config:n})})),s};static isEditable=e=>{const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t||"DATETIME"===t};static isNonKeyInput=e=>{const{tagName:t,type:n}=e;return"SELECT"===t||"checkbox"===n||"radio"===n};static#m=(e,t,n)=>{for(let s=0;s<e.length;s+=1){const r=e[s],a={actionHandler:r.handler,component:t,eventType:n,config:r.config};this.#h.push(a)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===xA.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=vg.getNextActionMgrId(),n};static#I=e=>{const t=e.actionHandler,n=e.component,{config:s}=e,r={};gS.resolveProps(s,r,n),t&&(t(e.eventType,r,n),this.#E())};static#E=()=>{if(!this.#f){if(0===this.#h.length)return;const e=this.#h.shift();if(!e)return;this.#I(e),e.config&&"true"===e.config.parallel&&this.#h.length>0&&this.#E()}};static#y=()=>{this.#E()};static#A=(e,t,n)=>{this.#m(e,t,n),this.#y()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return gS.getContextPath(t,n)};static#C(e,t){const n=e.getComponentConfig().behaviours||[];for(let s=0;s<n.length;s+=1){const{behaviour:r,actions:a}=n[s];if(a){const n=this.getActionHandlers(a,r,t);n&&n.length>0&&this.#A(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,s=e.getContextName();dd({type:$s.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:s});if(!("Browser"===xA.getRuntime()?"nativeEvent"in t&&t.nativeEvent instanceof Event||t instanceof Event:"nativeEvent"in t&&!!t.nativeEvent||t instanceof Event)&&"value"in t&&(null===t.value||"prop"in t&&void 0!==t.prop)){if("object"==typeof(r=t)&&null!==r){const n=e.getPageReference(),r=e.getStateProps();for(const e of Object.keys(t)){const a=r[e],o=t[e];qC({type:sr,payload:{reference:gS.getContextPath(n,a),value:o,context:s}}),qC({type:ar,payload:{reference:gS.getContextPath(n,a),value:o,context:s}})}}}else{let n,{target:r}=t;null===r&&t&&"auxiliaryTarget"in t&&t.auxiliaryTarget&&(r=t.auxiliaryTarget),n=void 0===r?"value"in t?t.value:void 0:"value"in r?r.value:r.innerText;const a=this.getFullRef(e);qC({type:sr,payload:{reference:a,value:n,context:s}}),void 0!==r&&this.isEditable(r)&&!this.isNonKeyInput(r)||qC({type:ar,payload:{reference:a,pageReference:e.getPageReference(),value:n,context:s,propertyName:e.getComponentConfig().value,classID:e.getValue(Gs.CLASS_ID)}})}var r};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&"auxiliaryTarget"in t&&(n=t.auxiliaryTarget);const{value:s,validationValue:r}=n,a=this.getFullRef(e),o=e.getContextName();n.clearMessages&&dd({type:$s.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?r:s),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,s),this.isNonKeyInput(n)||qC({type:ar,payload:{reference:a,pageReference:e.getPageReference(),value:s,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(Gs.CLASS_ID)}}))};static eventHandler=(e,t)=>{const{type:n}=t;switch(n){case"change":this.changeHandler(e,t);break;case"blur":this.blurHandler(e,t)}n&&this.#C(e,n)};static pause=()=>{this.#f=!0};static resume=()=>{this.#f=!1,this.#E()};static isQueueEmpty=()=>0===this.#h.length;static clearQueue=()=>{this.#h=[]};static getActionsQueue=()=>this.#h;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},IS="CREATE_WORK",ES=e=>({type:IS,payload:e});const yS=(e,t,n,s,r="")=>{const a=[];Object.keys(e).forEach((o=>{"object"==typeof e[o]&&o.includes("[")?function(e,t,n,s,r,a,o){const i=s.substring(0,s.indexOf("[")),c=s.substring(s.indexOf("[")+1,s.indexOf("]"));let l=t[i];const u=`${lS.trimDotForProperty(r)}.${i}`;o.includes(u)&&Object.hasOwn(l,ks.getDefaultQualifiedName("pyCount"))&&(l=l.pxResults),Array.isArray(l)&&(l?.splice(+c,1,e[s]),a.push(i),n.add(`${r}.${s}`))}(e,t,n,o,r,a,s):e[o]&&"object"==typeof e[o]?(t[o]||(t[o]=Array.isArray(e[o])?[]:{}),yS(e[o],t[o],n,s,`${r}.${o}`)):t[o]=e[o]})),function(e,t,n){Object.keys(e).forEach((s=>{(Array.isArray(e[s])&&!n.includes(s)||!Array.isArray(e[s])&&!Object.hasOwn(t,s))&&delete e[s]}))}(t,e,a)},AS=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:s=[],propertiesToReArrange:r=[]}=t,{context:a,data:o,isArrayDeepMerge:i,preserveClientChanges:c=!1}=e,l=oy(a,!0),u=zC(a);let d={};if(u&&o){d=JSON.parse(JSON.stringify(u));const e=JSON.parse(JSON.stringify(o));r.length>0&&lS.rearrangeProperties(r,d);const t=new Set;yS(l,d,t,r),((e,t,n)=>{const s=new Set;e.forEach((e=>{e=lS.trimDotForProperty(e);const[r,a,o]=Hu(e);if(r&&a&&o&&!s.has(`${r}.${a}`)){const e=lS.getIn(n,`${r}.${a}`)||[];Array.isArray(e)&&e.forEach(((e,n)=>{n!==+o&&lS.setIn(t,`${r}.${a}[${n}]`,e)})),s.add(`${r}.${a}`)}}))})(t,d,e)}!function(e,t){const n=lS.getIn(e,Gs.REFERENCED_USERS);let s;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return s=lS.getIn(t,Gs.REFERENCED_USERS,{}),void lS.setIn(e,Gs.REFERENCED_USERS,{...s,...n});s=lS.getIn(t,Gs.REFERENCED_USERS,[]);const r=new Map;for(const e of[...s,...n])if(r.has(e.UserID)){const t=r.get(e.UserID);r.set(e.UserID,{...t,...e})}else r.set(e.UserID,e);n.length=0;for(const e of r.values())n.push(e)}}(o,u);const p=lS.getIn(e?.data,Gs.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID),g=ZI.isExternalObject(p),h=g?{[Gs.OBJECT_INFO.OBJECT_INFO]:{[Gs.CONTENT]:{...d[Gs.OBJECT_INFO.OBJECT_INFO]?.[Gs.CONTENT]}}}:{[Gs.CASE_INFO.CASE_INFO]:{[Gs.CONTENT]:{...d[Gs.CASE_INFO.CASE_INFO]?.[Gs.CONTENT]}}},f=g?Gs.OBJECT_INFO.OBJECT_INFO_CONTENT:Gs.CASE_INFO.CASE_INFO_CONTENT;let m=o;return c?(n.forEach((e=>{const t=`${f}.${e}`;lS.deleteIn(h,t)})),m=sS(o,h,{isArrayDeepMerge:i??!0})):((e,t)=>{const n=ty[e]||{};Object.keys(n).forEach((e=>{lS.hasIn(t,e)&&(n[e].value=lS.getIn(t,e))}))})(a,o),{type:Dr,payload:{...e,data:m,...s.length>0?{propertiesToReplace:s}:null,...r.length>0?{propertiesToReArrange:r}:null}}},CS=e=>({type:"SHOW_HARNESS",payload:e}),SS=e=>({type:or,payload:e}),_S=e=>({type:ir,payload:e}),NS=e=>({type:"ADD_WORK",payload:e}),TS=e=>({type:Ir,payload:e}),DS=e=>({type:vr,payload:e}),PS=e=>({type:xr,payload:e}),OS=e=>({type:wr,payload:e}),RS=e=>({type:Lr,payload:e}),bS=e=>({type:Ur,payload:e}),vS=e=>({type:jr,payload:e}),xS=e=>({type:Br,payload:e}),wS=e=>({type:kr,payload:e}),MS=e=>{const{containerItemID:t}=e;e.suggestionContexts=Hy(t);const n=e?.data?.caseInfo?.content,s=Object.keys(n||{}).length>0;return e.propertiesToReplace||(e.propertiesToReplace=s?ZI.getPropertiesToReplace(t):[]),{type:Gr,payload:e}},LS=e=>{const{context:t}=e;return{type:dr,payload:{context:t}}},US=e=>{const{context:t}=e;return{type:pr,payload:{context:t}}},FS=e=>({type:Wr,payload:e}),VS=e=>({type:$r,payload:e}),jS=e=>({type:pa,payload:e}),kS=e=>{const{context:t,containerItemID:n}=e;let s=t;return s||(s=ky(n)),e.context=s,e.deleteContext=!aA(n),e.childContainers=Gy(n),e.childContainersContexts=Wy(n),e.transientItems=oA([...e.childContainersContexts,n]),e.suggestionContexts=Hy(n),n===t&&(e.caseID=QC(Gs.CASE_INFO.CASE_INFO_ID,"",t)||QC(Gs.OBJECT_INFO.OBJECT_INFO_ID,"",t),e.RemoteSystemID=QC(Gs.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Mr,payload:e}},BS=e=>{const{containerItemID:t}=e;return e.transientItems=oA([...Wy(t),t]),{type:Vr,payload:e}},$S=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Fr,payload:e}},GS=e=>{const{context:t,containerItemID:n}=e;let s=t;if(s||(s=ky(n)),e.context=s,e.childContainers=Gy(n),e.childContainersContexts=Wy(n),e.transientItems=oA([...e.childContainersContexts,n]),e.suggestionContexts=Hy(n),n===t){e.caseID=QC(Gs.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=QC(Gs.CASE_INFO.REMOTESYSTEMID,"",t);const n=QC(Gs.CASE_INFO.CASE_INFO_CLASSNAME,"",t);qs.isTraditionalRemoteCase(n)&&(e.skipReleaseLockRequest=!0)}return{type:Hr,payload:e}},WS=e=>({type:yr,payload:e}),HS=e=>({type:Sr,payload:e}),qS=e=>({type:Rr,payload:e}),zS=(e,...t)=>(mS.resume(),e(...t)),YS=(e,t,n,s,r)=>({type:br,payload:{msg:e,err:t,context:n,formFields:s,actionMgrID:r}}),KS=e=>({type:ma,payload:e}),QS=e=>({type:Ia,payload:e}),JS=e=>({type:Ea,payload:e}),XS=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),ZS=e=>({type:fr,payload:e}),e_=e=>({type:sr,payload:e}),t_="add",n_="replace",s_=["portal","noPortal","preview","debug","devtool","activeTab","contextParam","lang"];let r_="",a_="Home",o_="",i_=!0;const c_=e=>(i_=e,i_),l_=()=>i_,u_=(e,t,n)=>bA.getSemanticURL(e,t,n),d_=(e,t)=>bA.getRestEndPoint(e,t),p_=(e,t)=>{let n=un();const s=d_(e,t);return s?(s.restApi?.startsWith("/")||(s.restApi=`/${s.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),s.restApi=n+s.restApi,s):{}},g_=(e,t,n)=>{const{root:s,resources:r}=e,{views:a}=r,{config:o}=s,i=t_;let c="";if(n)c=n;else{const e=a[o.name];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);c=t.config.urlPath}const l=c.match(Oh);if(l){const e=lS.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},h_=(e,t)=>{const n=`${e}/${t}`;if(!("EMBED"===xA.getRenderingMode()))return n;const s=bA.getRoutingInfo()?.authServiceAlias;if(!s)return n;const r=encodeURIComponent(s);let a;try{a=new URL(n)}catch{return n}const o=a.pathname.split("/").filter(Boolean),i=o.findIndex((e=>"app"===e.toLowerCase()));if(i<0)return n;"prauth"!==o[i-1]?.toLowerCase()&&o.splice(i,0,"PRAuth");const c=o.findIndex((e=>"app"===e.toLowerCase()))+2;return c!==o.length&&o[c]===r||o.splice(c,0,r),a.pathname=`/${o.join("/")}`,a.toString().replace(/\/$/,"")},f_=(e,t,n,s)=>{let r,a;r=bh(t)?h_(e,t):e;const o=bh(n?.pxURLPath||"");o&&(r=`${r}/${o}`);try{a=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const i=r.split("/"),c=i[i.length-1],l=new URLSearchParams("undefined"==typeof window?"":window.location.search);if(Uh()?(r=((e,t,n,s,r)=>{const a=bA.getStaticRoutePage(),o=a_?.toLowerCase(),i=a?.toLowerCase(),c=s?.toLowerCase();return i!==o&&c!==o||r.has("noPortal")?e:h_(t,n)})(r,e,t,c,l),bA.setStaticRoutePage("")):c.toLowerCase()!==a_.toLowerCase()||l.has("noPortal")||(r=h_(e,t)),!bA.isDefaultPortal()){const e=bA.getPortalName();l.has("portal")?l.set("portal",e):l.append("portal",e)}a=((e,t,n)=>{for(const[n,s]of t.entries())!e.has(n)&&s_.includes(n)&&e.append(n,s);n&&!e.has("lang")&&e.append("lang",n);const s=bA.getRoutingInfo()?.embedQueryParams;if(s)for(const[t,n]of Object.entries(s))e.has(t)||e.append(t,String(n));return e})(a,l,s);const u=xh(a.toString());return u&&(r+=`?${u}`),r},m_=(e,{urlPathObjParam:t,infoParam:n,optionsParam:s,queryParam:r},a=!1,o)=>{let i,c,l;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(a)i=t,c=n,l=s;else{const{uiResources:n,data:s}=e;({options:l}=e),i=t&&t.pxURLPath&&Rh(t.pxURLPath)?g_(n,s,t.pxURLPath):t||g_(n,s),c=bA.getEndPointInfo(i.pxURLPath),i.pxURLPath=c.urlPath}let u=f_(r_,bA.getApplicationPath(),i,o);const{title:d}=((e,t,n)=>{if(e=(e=>{let t=e.split(" ");return t=t.map((e=>e.charAt(0).toUpperCase()+e.slice(1))),t.join(" ")})(e=e&&""!==e?e:bA.getApplicationName()),n===`${r_}/${t}/`)return{title:e};const s=new URL(n).pathname.replace(`${t}/`,""),r=s.split("/");return/\d/.test(s)?{title:`${e} - ${r[r.length-1]}`}:{title:`${e} - ${r[0]}`}})(o_,bA.getApplicationPath(),u),p=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(c,{...l,title:d});i?.historyAction===t_?((e,t,n)=>{if("undefined"!=typeof window)try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(p,d,u):i?.historyAction===n_&&(r&&(u+=`?${r}`),((e,t,n)=>{if("undefined"!=typeof window)try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(p,d,u))},I_=(e,t)=>{let n=null;e.directUrlUpdation&&(n={historyAction:t_,pxURLPath:""},n.pxURLPath=e.semanticURL),m_(e,{urlPathObjParam:n,infoParam:null,optionsParam:null},!1,t)},E_=(e,t)=>{I_(e,t)},y_=(e,t)=>{const n={pxURLPath:e};return f_(r_,bA.getApplicationPath(),n,t)},A_=e=>{const{uiResources:t}=e;l_()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:s}=n,r=t.config,a=r.type,o=r.name;if("VIEW"===a.toUpperCase()){const e=s[o];let t=e;Array.isArray(e)&&e.length>0&&([t]=e);const n=t.config;if(n.type){const e=n.type;return!(!n.urlPath||"PAGE"!==e.toUpperCase())}}return!1}return!1})(t))&&I_(e)},C_=e=>{const t={routeEndpoint:e.routeEndpoint,requestType:e.requestType,payload:e.payload,routeKey:e.routeKey,options:null};return e.options&&(t.options=e.options),t},S_=(e,t,n)=>{const{caseClassName:s,workID:r}=e.payload,{containerName:a,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:l}=qs.getRemoteCase(s),u={...e,headers:{RemoteSystemID:c},className:s,isTraditionalRemoteCase:qs.isTraditionalRemoteCase(s),isRemoteCase:qs.isRemoteCase(s),action:La,viewName:Ws,gadgetId:ZI.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${r}`,containerName:a,name:l};qC(m.showPage(u))};let __=!1;const N_=async e=>{if(__)return void(__=!1);const t=(e=>"ui-navigation"===e.state?.type?(Ad.publish($s.PUB_SUB_EVENTS.URL_NAVIGATION,e.state),null):e.state?e.state.stateObj:null)(e);if(t){const e=EA(),n=Fy(`${e}/primary`);if(n&&Zy(n)){const e=FA().getLocaleValue(ry,"Messages");if(!await rI.confirm(e))return __=!0,void window.history.go(1)}qs.isRemoteCase(t.payload?.caseClassName)?S_({...t},t.options):qC(m.showHistory(C_(t)))}},T_=()=>bA.getApplicationPath()!==DA(),D_=e=>{const{acName:t,context:n,defaultViewLabel:s,ruleName:r,className:a}=e,o=((e,t)=>{const n=bA.getRoutingInfo();if(Uh()&&Object.values(n?.routes??{}).find((n=>n?.payload?.pageClass===t&&n?.payload?.page===e)))return e;const s=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),a=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return n?.routes?.[s]?s:n?.routes?.[r]?r:n?.routes?.[a]?a:e})(r||s,a);(e=>{a_=e})(o),bA.setDefaultRoute(o),bA.setDefaultClassName(a);const i=Qs(t,n),c=Wa(t,n),l=(()=>{const e=xA.getIsExtraCallRequiredForDefaultHome();return!0===e||"true"===e})(),u={historyAction:n_,pxURLPath:""};let d,p=null;const g={acName:c,context:i,actionConfig:{context:i}};if(l||!l&&T_()){const t=Mh(PA());xA.shouldUseURLParams()&&(p=t.includes("?")?t.split("?")[1]:null),d=Lh(t,g),u.pxURLPath=d.urlPath,void 0!==d.payload?.pageClass&&(d.payload.pageClass=HC()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",s={routeEndpoint:d.routeEndpoint,requestType:d.requestType,payload:d.payload,options:g,routeKey:d.routeKey};h=d?.payload?.caseClassName,h&&qs.isRemoteCase(h)&&(qs.isTraditionalRemoteCase(h)||qs.isRemoteCaseVersionDifferent(h))?S_(s,e,g.context):qC(m[n](C_(s)))}else d=bA.getEndPointInfo(a_),u.pxURLPath="";var h;m_(null,{urlPathObjParam:u,infoParam:d,optionsParam:g,queryParam:p},!0)},P_=(e,t=!1)=>{var n;r_=e.domain,!1===t&&l_()&&(n=N_,"undefined"!=typeof window&&window.addEventListener("popstate",(e=>n(e))),"undefined"!=typeof window&&(window.onbeforeunload=()=>null)),bA.init(e,a_)},O_=e=>{(e=>{"undefined"!=typeof window&&(window.document.title=e)})(e)},R_=e=>{for(const t of e)s_.includes(t)||s_.push(t)};var b_=Symbol.for("immer-nothing"),v_=Symbol.for("immer-draftable"),x_=Symbol.for("immer-state");function w_(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var M_=Object,L_=M_.getPrototypeOf,U_="constructor",F_="prototype",V_="configurable",j_="enumerable",k_="writable",B_="value",$_=e=>!!e&&!!e[x_];function G_(e){return!!e&&(q_(e)||X_(e)||!!e[v_]||!!e[U_]?.[v_]||Z_(e)||eN(e))}var W_=M_[F_][U_].toString(),H_=new WeakMap;function q_(e){if(!e||!tN(e))return!1;const t=L_(e);if(null===t||t===M_[F_])return!0;const n=M_.hasOwnProperty.call(t,U_)&&t[U_];if(n===Object)return!0;if(!nN(n))return!1;let s=H_.get(n);return void 0===s&&(s=Function.toString.call(n),H_.set(n,s)),s===W_}function z_(e,t,n=!0){if(0===Y_(e)){(n?Reflect.ownKeys(e):M_.keys(e)).forEach((n=>{t(n,e[n],e)}))}else e.forEach(((n,s)=>t(s,n,e)))}function Y_(e){const t=e[x_];return t?t.type_:X_(e)?1:Z_(e)?2:eN(e)?3:0}var K_=(e,t,n=Y_(e))=>2===n?e.has(t):M_[F_].hasOwnProperty.call(e,t),Q_=(e,t,n=Y_(e))=>2===n?e.get(t):e[t],J_=(e,t,n,s=Y_(e))=>{2===s?e.set(t,n):3===s?e.add(n):e[t]=n};var X_=Array.isArray,Z_=e=>e instanceof Map,eN=e=>e instanceof Set,tN=e=>"object"==typeof e,nN=e=>"function"==typeof e,sN=e=>"boolean"==typeof e;var rN=e=>e.copy_||e.base_,aN=e=>e.modified_?e.copy_:e.base_;function oN(e,t){if(Z_(e))return new Map(e);if(eN(e))return new Set(e);if(X_(e))return Array[F_].slice.call(e);const n=q_(e);if(!0===t||"class_only"===t&&!n){const t=M_.getOwnPropertyDescriptors(e);delete t[x_];let n=Reflect.ownKeys(t);for(let s=0;s<n.length;s++){const r=n[s],a=t[r];!1===a[k_]&&(a[k_]=!0,a[V_]=!0),(a.get||a.set)&&(t[r]={[V_]:!0,[k_]:!0,[j_]:a[j_],[B_]:e[r]})}return M_.create(L_(e),t)}{const t=L_(e);if(null!==t&&n)return{...e};const s=M_.create(t);return M_.assign(s,e)}}function iN(e,t=!1){return lN(e)||$_(e)||!G_(e)||(Y_(e)>1&&M_.defineProperties(e,{set:cN,add:cN,clear:cN,delete:cN}),M_.freeze(e),t&&z_(e,((e,t)=>{iN(t,!0)}),!1)),e}var cN={[B_]:function(){w_(2)}};function lN(e){return null===e||!tN(e)||M_.isFrozen(e)}var uN="MapSet",dN="Patches",pN="ArrayMethods",gN={};function hN(e){const t=gN[e];return t||w_(0),t}var fN,mN=e=>!!gN[e];var IN=()=>fN;function EN(e,t){t&&(e.patchPlugin_=hN(dN),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yN(e){AN(e),e.drafts_.forEach(SN),e.drafts_=null}function AN(e){e===fN&&(fN=e.parent_)}var CN=e=>fN={drafts_:[],parent_:fN,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:mN(uN)?hN(uN):void 0,arrayMethodsPlugin_:mN(pN)?hN(pN):void 0};function SN(e){const t=e[x_];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function _N(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[x_].modified_&&(yN(t),w_(4)),G_(e)&&(e=NN(t,e));const{patchPlugin_:s}=t;s&&s.generateReplacementPatches_(n[x_].base_,e,t)}else e=NN(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&iN(t,n)}(t,e,!0),yN(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==b_?e:void 0}function NN(e,t){if(lN(t))return t;const n=t[x_];if(!n){return vN(t,e.handledSet_,e)}if(!DN(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}RN(n,e)}return n.copy_}function TN(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var DN=(e,t)=>e.scope_===t,PN=[];function ON(e,t,n,s){const r=rN(e),a=e.type_;if(void 0!==s){if(Q_(r,s,a)===t)return void J_(r,s,n,a)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;z_(r,((e,n)=>{if($_(n)){const s=t.get(n)||[];s.push(e),t.set(n,s)}}))}const o=e.draftLocations_.get(t)??PN;for(const e of o)J_(r,e,n,a)}function RN(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const s=n.getPath(e);s&&n.generatePatches_(e,s,t)}TN(e)}}function bN(e,t,n){const{scope_:s}=e;if($_(n)){const r=n[x_];DN(r,s)&&r.callbacks_.push((function(){FN(e);const s=aN(r);ON(e,n,s,t)}))}else G_(n)&&e.callbacks_.push((function(){const r=rN(e);3===e.type_?r.has(n)&&vN(n,s.handledSet_,s):Q_(r,t,e.type_)===n&&s.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&vN(Q_(e.copy_,t,e.type_),s.handledSet_,s)}))}function vN(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||$_(e)||t.has(e)||!G_(e)||lN(e)||(t.add(e),z_(e,((s,r)=>{if($_(r)){const t=r[x_];if(DN(t,n)){const n=aN(t);J_(e,s,n,e.type_),TN(t)}}else G_(r)&&vN(r,t,n)}))),e}var xN={get(e,t){if(t===x_)return e;let n=e.scope_.arrayMethodsPlugin_;const s=1===e.type_&&"string"==typeof t;if(s&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const r=rN(e);if(!K_(r,t,e.type_))return function(e,t,n){const s=LN(t,n);return s?B_ in s?s[B_]:s.get?.call(e.draft_):void 0}(e,r,t);const a=r[t];if(e.finalized_||!G_(a))return a;if(s&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return a;if(a===MN(e.base_,t)||function(e,t,n){if(1!==e.type_||!e.allIndicesReassigned_||e.assigned_?.get(t)||!G_(n)||n[x_])return!1;return e.baseRefs_.has(n)}(e,t,a)){FN(e);const n=1===e.type_?+t:t,s=VN(e.scope_,a,e,n);return e.copy_[n]=s}return a},has:(e,t)=>t in rN(e),ownKeys:e=>Reflect.ownKeys(rN(e)),set(e,t,n){const s=LN(rN(e),t);if(s?.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){const s=MN(rN(e),t),o=s?.[x_];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(((r=n)===(a=s)?0!==r||1/r==1/a:r!=r&&a!=a)&&(void 0!==n||K_(e.base_,t,e.type_)))return!0;FN(e),UN(e)}var r,a;return e.copy_[t]===n&&(void 0!==n||K_(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),bN(e,t,n)),!0},deleteProperty:(e,t)=>(FN(e),void 0!==MN(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),UN(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=rN(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s?{[k_]:!0,[V_]:1!==e.type_||"length"!==t,[j_]:s[j_],[B_]:n[t]}:s},defineProperty(){w_(11)},getPrototypeOf:e=>L_(e.base_),setPrototypeOf(){w_(12)}},wN={};for(let e in xN){let t=xN[e];wN[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function MN(e,t){const n=e[x_];return(n?rN(n):e)[t]}function LN(e,t){if(!(t in e))return;let n=L_(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=L_(n)}}function UN(e){e.modified_||(e.modified_=!0,e.parent_&&UN(e.parent_))}function FN(e){e.copy_||(e.assigned_=new Map,e.copy_=oN(e.base_,e.scope_.immer_.useStrictShallowCopy_))}wN.deleteProperty=function(e,t){return wN.set.call(this,e,t,void 0)},wN.set=function(e,t,n){return xN.set.call(this,e[0],t,n,e[0])};function VN(e,t,n,s){const[r,a]=Z_(t)?hN(uN).proxyMap_(t,n):eN(t)?hN(uN).proxySet_(t,n):function(e,t){const n=X_(e),s={type_:n?1:0,scope_:t?t.scope_:IN(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let r=s,a=xN;n&&(r=[s],a=wN);const{revoke:o,proxy:i}=Proxy.revocable(r,a);return s.draft_=i,s.revoke_=o,[i,s]}(t,n);return(n?.scope_??IN()).drafts_.push(r),a.callbacks_=n?.callbacks_??[],a.key_=s,n&&void 0!==s?function(e,t,n){e.callbacks_.push((function(s){const r=t;if(!r||!DN(r,s))return;s.mapSetPlugin_?.fixSetContents(r);const a=aN(r);ON(e,r.draft_??r,a,n),RN(r,s)}))}(n,a,s):a.callbacks_.push((function(e){e.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)})),r}function jN(e){if(!G_(e)||lN(e))return e;const t=e[x_];let n,s=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=oN(e,t.scope_.immer_.useStrictShallowCopy_),s=t.scope_.immer_.shouldUseStrictIteration()}else n=oN(e,!0);return z_(n,((e,t)=>{J_(n,e,jN(t))}),s),t&&(t.finalized_=!1),n}globalThis.Iterator;var kN=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(nN(e)&&!nN(t)){const n=t;t=e;const s=this;return function(e=n,...r){return s.produce(e,(e=>t.call(this,e,...r)))}}let s;if(nN(t)||w_(6),void 0===n||nN(n)||w_(7),G_(e)){const r=CN(this),a=VN(r,e,void 0);let o=!0;try{s=t(a),o=!1}finally{o?yN(r):AN(r)}return EN(r,n),_N(s,r)}if(!e||!tN(e)){if(s=t(e),void 0===s&&(s=e),s===b_&&(s=void 0),this.autoFreeze_&&iN(s,!0),n){const t=[],r=[];hN(dN).generateReplacementPatches_(e,s,{patches_:t,inversePatches_:r}),n(t,r)}return s}w_(1)},this.produceWithPatches=(e,t)=>{if(nN(e))return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,s;return[this.produce(e,t,((e,t)=>{n=e,s=t})),n,s]},sN(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),sN(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),sN(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){G_(e)||w_(8),$_(e)&&(e=function(e){$_(e)||w_(10);return jN(e)}(e));const t=CN(this),n=VN(t,e,void 0);return n[x_].isManual_=!0,AN(t),n}finishDraft(e,t){const n=e&&e[x_];n&&n.isManual_||w_(9);const{scope_:s}=n;return EN(s,t),_N(void 0,s)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const s=t[n];if(0===s.path.length&&"replace"===s.op){e=s.value;break}}n>-1&&(t=t.slice(n+1));const s=hN(dN).applyPatches_;return $_(e)?s(e,t):this.produce(e,(e=>s(e,t)))}},BN=kN.produce;function $N(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var GN=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),WN=()=>Math.random().toString(36).substring(7).split("").join("."),HN={INIT:`@@redux/INIT${WN()}`,REPLACE:`@@redux/REPLACE${WN()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${WN()}`};function qN(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function zN(e,t,n){if("function"!=typeof e)throw new Error($N(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error($N(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error($N(1));return n(zN)(e,t)}let s=e,r=t,a=new Map,o=a,i=0,c=!1;function l(){o===a&&(o=new Map,a.forEach(((e,t)=>{o.set(t,e)})))}function u(){if(c)throw new Error($N(3));return r}function d(e){if("function"!=typeof e)throw new Error($N(4));if(c)throw new Error($N(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error($N(6));t=!1,l(),o.delete(n),a=null}}}function p(e){if(!qN(e))throw new Error($N(7));if(void 0===e.type)throw new Error($N(8));if("string"!=typeof e.type)throw new Error($N(17));if(c)throw new Error($N(9));try{c=!0,r=s(r,e)}finally{c=!1}return(a=o).forEach((e=>{e()})),e}p({type:HN.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error($N(10));s=e,p({type:HN.REPLACE})},[GN]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error($N(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[GN](){return this}}}}}function YN(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const r=t[s];0,"function"==typeof e[r]&&(n[r]=e[r])}const s=Object.keys(n);let r;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:HN.INIT}))throw new Error($N(12));if(void 0===n(void 0,{type:HN.PROBE_UNKNOWN_ACTION()}))throw new Error($N(13))}))}(n)}catch(e){r=e}return function(e={},t){if(r)throw r;let a=!1;const o={};for(let r=0;r<s.length;r++){const i=s[r],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error($N(14))}o[i]=u,a=a||u!==l}return a=a||s.length!==Object.keys(e).length,a?o:e}}function KN(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function QN(e){return({dispatch:t,getState:n})=>s=>r=>"function"==typeof r?r(t,n,e):s(r)}var JN=QN(),XN=QN,ZN="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?KN:KN.apply(null,arguments)};"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function eT(e,t){function n(...n){if(t){let s=t(...n);if(!s)throw new Error(uT(0));return{type:e,payload:s.payload,..."meta"in s&&{meta:s.meta},..."error"in s&&{error:s.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>function(e){return qN(e)&&"type"in e&&"string"==typeof e.type}(t)&&t.type===e,n}var tT=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function nT(e){return G_(e)?BN(e,(()=>{})):e}var sT="RTK_autoBatch",rT=e=>t=>{setTimeout(t,e)},aT=(e={type:"raf"})=>t=>(...n)=>{const s=t(...n);let r=!0,a=!1,o=!1;const i=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?(l=window.requestAnimationFrame,u=100,e=>{let t=!1;const n=()=>{t||(t=!0,cancelAnimationFrame(s),clearTimeout(r),e())},s=l(n),r=setTimeout(n,u)}):rT(10):"callback"===e.type?e.queueNotification:rT(e.timeout);var l,u;const d=()=>{o=!1,a&&(a=!1,i.forEach((e=>e())))};return Object.assign({},s,{subscribe(e){const t=s.subscribe((()=>r&&e()));return i.add(e),()=>{t(),i.delete(e)}},dispatch(e){try{return r=!e?.meta?.[sT],a=!r,a&&(o||(o=!0,c(d))),s.dispatch(e)}finally{r=!0}}})};function oT(e){const t=function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:s=!0,actionCreatorCheck:r=!0}=e??{};let a=new tT;return t&&("boolean"==typeof t?a.push(JN):a.push(XN(t.extraArgument))),a},{reducer:n,middleware:s,devTools:r=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o,enhancers:i}=e||{};let c,l;if("function"==typeof n)c=n;else{if(!qN(n))throw new Error(uT(1));c=YN(n)}l="function"==typeof s?s(t):t();let u=KN;r&&(u=ZN({trace:!1,..."object"==typeof r&&r}));const d=function(...e){return t=>(n,s)=>{const r=t(n,s);let a=()=>{throw new Error($N(15))};const o={getState:r.getState,dispatch:(e,...t)=>a(e,...t)},i=e.map((e=>e(o)));return a=KN(...i)(r.dispatch),{...r,dispatch:a}}}(...l),p=(e=>function(t){const{autoBatch:n=!0}=t??{};let s=new tT(e);return n&&s.push(aT("object"==typeof n?n:void 0)),s})(d);return zN(c,o,u(..."function"==typeof i?i(p):p()))}function iT(e){const t={},n=[];let s;const r={addCase(e,n){const s="string"==typeof e?e:e.type;if(!s)throw new Error(uT(28));if(s in t)throw new Error(uT(29));return t[s]=n,r},addAsyncThunk:(e,s)=>(s.pending&&(t[e.pending.type]=s.pending),s.rejected&&(t[e.rejected.type]=s.rejected),s.fulfilled&&(t[e.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:e.settled,reducer:s.settled}),r),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),r),addDefaultCase:e=>(s=e,r)};return e(r),[t,n,s]}function cT(e,t){let n,[s,r,a]=iT(t);if("function"==typeof e)n=()=>nT(e());else{const t=nT(e);n=()=>t}function o(e=n(),t){let o=[s[t.type],...r.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===o.filter((e=>!!e)).length&&(o=[a]),o.reduce(((e,n)=>{if(n){if($_(e)){const s=n(e,t);return void 0===s?e:s}if(G_(e))return BN(e,(e=>n(e,t)));{const s=n(e,t);if(void 0===s){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return s}}return e}),e)}return o.getInitialState=n,o}var{assign:lT}=Object;function uT(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const dT=e=>{let t=new Set,n=t;const s=()=>{t===n&&(t=new Set(t))},r=e=>{let n=!0;return s(),t.add(e),()=>{n&&(s(),t.delete(e),n=!1)}},a=()=>{const e=Array.from(t);n=t,e.forEach((e=>e()))};return(...t)=>{const n=e(...t);let s=!1,o=!1;const i=e=>Array.isArray(e)?e.map(i):n.dispatch(e);return n.subscribe((()=>{o?s=!0:a()})),{...n,dispatch:e=>{const t=o;t||(s=!1,o=!0);const n=i(e),r=s&&!t;return t||(s=!1,o=!1),r&&a(),n},subscribe:r}}},pT=(e,t)=>{const{data:{shared:n={}}={},context:s}=t;((e,t)=>{df.updateDataPageStore(t),Object.keys(t).forEach((n=>{lS.getIn(e,[Gs.SHARED,n])?Object.keys(t[n]).forEach((s=>{lS.setIn(e,[Gs.SHARED,n,s],t[n][s])})):lS.setIn(e,[Gs.SHARED,n],t[n])}))})(e,n),s&&lS.deleteIn(e,[s,"shared"])},gT=(e,t,n=!1)=>{const{context:s,caseViewMode:r=(n?void 0:Gs.PERFORM_MODE),containerName:a}=t;a!==Cy.WORKAREA&&r&&lS.setIn(e,[s,"context_data","caseViewMode"],r)},hT=(e,t)=>{const{context:n}=t;lS.setIn(e,[n,"context_data","actionType"],t.actionType),lS.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},fT=e=>null!==e&&"object"==typeof e,mT=(e,t=[])=>{t.forEach((t=>lS.deleteIn(e,t)))},IT=(e,t=[])=>{t.forEach((t=>lS.deleteIn(e,t)))},ET=(e,t=[])=>{t.forEach((t=>{lS.deleteIn(e,t)}))},yT=(e,t,n={})=>{const{deleteAssignmentSpecificResources:s=!0,doDeleteConfirmationDetails:r=!0,skipMergeAssignmentsAndActions:a=!0}=n;lS.deleteIn(e,[t,"nextAssignmentInfo"]),a&&(lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"availableActions"]),lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"availableProcesses"]),lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"assignments"])),lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"activeActionID"]),lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"childCases"]),r&&(lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"confirmationLinks"]),lS.deleteIn(e,[t,"caseMessages"])),s&&(lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"actionButtons"]),lS.deleteIn(e,[t,Gs.CASE_INFO.CASE_INFO,"navigation"]))},AT=cT({},(e=>{e.addCase(wr,((e,t)=>{if(!t.payload.data||e[t.payload.context])return;t.payload.doDeleteCaseSummary&&yT(e,t.payload.context);const{target:n}=t.payload;n&&(n.includes(Gs.WORKAREA)||n.includes(Gs.MODAL))?e[t.payload.context]=t.payload.data:e[t.payload.containerItemID]=t.payload.data,gT(e,t.payload),hT(e,t.payload),pT(e,t.payload),((e,t)=>{const{context:n}=t;lS.deleteIn(e,[n,"context_data","blocking_action_counter"]),lS.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload)})).addCase(Gr,((e,t)=>{t.payload.doDeleteCaseSummary&&yT(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:s=[]}=t.payload;if(n&&(n.includes(Gs.WORKAREA)||n.includes(Gs.MODAL))){const n=e[t.payload.context];fT(n)&&(e[t.payload.context]=sS(n,t.payload.data,{propertiesToReplace:[...s]}))}else{const n=e[t.payload.containerItemID];fT(n)&&(e[t.payload.containerItemID]=sS(n,t.payload.data,{propertiesToReplace:[...s]}))}(t.payload.actionType||t.payload.assignmentID)&&hT(e,t.payload),gT(e,t.payload),pT(e,t.payload),IT(e,t.payload.suggestionContexts)})).addCase(Mr,((e,t)=>{const{childContainersContexts:n=[]}=t.payload;((e,t)=>{const{containerItemID:n,context:s,deleteContext:r}=t;r&&lS.deleteIn(e,[s]),lS.deleteIn(e,[n])})(e,t.payload),ET(e,n),mT(e,t.payload.transientItems),IT(e,t.payload.suggestionContexts)})).addCase(xr,((e,t)=>{const{containerItems:n}=t.payload;Array.isArray(n)?n.forEach((t=>{lS.deleteIn(e,[t])})):lS.deleteIn(e,[n])})).addCase(Wr,((e,t)=>{const{context:n,contextToBeRemoved:s,data:r,childContainersContextsToBeRemoved:a}=t.payload;yT(e,t.payload.context),gT(e,t.payload);const o=e[n],i=e[s];if(!fT(o)||!fT(i))return;const c=sS(o,i);fT(c)&&(e[n]=sS(c,r),lS.deleteIn(e,[s]),ET(e,a),pT(e,t.payload))})).addCase(Hr,((e,t)=>{const{context:n,pulseReplace:s=!0,childContainersContexts:r=[]}=t.payload;let{data:a}=t.payload;const o=lS.getIn(e[n],"pulse");let i=lS.getIn(e[n],"OperatorID"),c=lS.getIn(e[n],"pxRequestor");c&&a.pxRequestor&&(c=lS.mergeDeep(c,a.pxRequestor)),i&&a.OperatorID&&(i=lS.mergeDeep(i,a.OperatorID)),!s&&o&&(a=rS(a,"pulse",o),a=rS(a,"OperatorID",i),a=rS(a,"pxRequestor",c)),lS.setIn(e,n,a),gT(e,t.payload),pT(e,t.payload),ET(e,r),mT(e,t.payload.transientItems),IT(e,t.payload.suggestionContexts)})).addCase(ya,((e,t)=>{const{context:n,doDeleteConfirmationDetails:s=!0,skipMergeAssignmentsAndActions:r=!0}=t.payload;yT(e,n,{doDeleteConfirmationDetails:s,skipMergeAssignmentsAndActions:r})})).addCase(Lr,((e,t)=>{const{transientItemID:n,data:s}=t.payload;lS.setIn(e,n,s)})).addCase(Fr,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>lS.deleteIn(e,t)))})).addCase(Vr,((e,t)=>{const{transientItems:n}=t.payload;n.forEach((t=>lS.deleteIn(e,t)))})).addCase(Ur,((e,t)=>{const{transientItemID:n,data:s}=t.payload;sS(lS.getIn(e,n),s)})).addCase(jr,((e,t)=>{const{transientItemID:n,data:s}=t.payload;sS(lS.getIn(e,n),s)})).addCase(kr,((e,t)=>{const{transientItemID:n,data:s}=t.payload;Object.keys(s??{}).forEach((t=>{lS.deleteIn(e,[n,t])}))})).addCase(Br,((e,t)=>{const{transientItemID:n,data:s}=t.payload;lS.deleteIn(e,n),lS.setIn(e,n,s)})).addCase(fr,((e,t)=>{const{key:n,value:s}=t.payload;lS.setIn(e,`${Gs.SHARED}.${n}`,s)})).addCase(Yr,((e,t)=>{const{context:n,data:s}=t.payload;return lS.setIn(e,n,s)}))}));function CT(e){if("object"==typeof e&&null!==e&&"payload"in e&&"object"==typeof e.payload&&null!==e.payload){const t=e.payload.context;return"string"==typeof t?t:void 0}}const ST=eT(Ca),_T=cT({},(e=>{e.addCase(Dr,((e,t)=>{const{propertiesToReplace:n=[],propertiesToReArrange:s=[],uiRootReference:r="",interestPath:a}=t.payload,o=r&&"string"==typeof t.payload.context?`${t.payload.context}.${r}`:t.payload.context,i="string"==typeof o?GC(o):[],c={isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n],propertiesToReArrange:[...s]};if(r&&i.length)lS.setIn(e,i,sS(lS.getIn(e,i),lS.getIn(t.payload.data,GC(r)),c));else if(a){const r=lS.getIn(e[t.payload.context],a),o=lS.getIn(t.payload.data,a),i=sS(r,o,{isArrayDeepMerge:!0}),c=lS.getIn(t.payload.data.context_data,a);nS(e[t.payload.context],[...n],[...s]),lS.setIn(e[t.payload.context],a,i),e[t.payload.context]&&c&&lS.setIn(e[t.payload.context].context_data,a,sS(lS.getIn(e[t.payload.context].context_data,a),c,{isArrayDeepMerge:!0}))}else e[t.payload.context]=sS(e[t.payload.context],t.payload.data,c);gT(e,t.payload,!0),pT(e,t.payload)})).addCase(sr,((e,t)=>{const{context:n,reference:s,value:r,isArrayDeepMerge:a}=t.payload;rS(e[n],s,r,{isArrayDeepMerge:a})})).addCase(rr,((e,t)=>{const{context:n,reference:s,value:r}=t.payload;aS(e[n],s,r)})).addCase(Pr,((e,t)=>{eS(e[t.payload.context],t.payload.reference)})).addCase(dr,((e,t)=>{lS.setIn(e[t.payload.context],"context_data.isLoading",!0)})).addCase(pr,((e,t)=>{lS.setIn(e[t.payload.context],"context_data.isLoading",!1)})).addCase(gr,((e,t)=>{const n=CT(t);n&&(e[n]||(e[n]={}),lS.setIn(e[n],"context_data.isOffline",!0))})).addCase(hr,((e,t)=>{const n=CT(t);n&&(e[n]||(e[n]={}),lS.setIn(e[n],"context_data.isOffline",!1))})).addCase(ma,((e,t)=>{const{data:n}=t.payload;pT(e,{data:{shared:n}})})).addCase(Ia,((e,t)=>{const{dataPagesToBeRemoved:n=[]}=t.payload;n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:s}=t;lS.deleteIn(e.shared,[n,s]);const r=lS.getIn(e.shared,[n]);r&&0===Object.keys(r).length&&lS.deleteIn(e.shared,[n])}))})).addCase(Aa,((e,t)=>{const n=lS.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);t.payload.isInitiateBlockingAction?lS.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):lS.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1)})).addCase(ST,((e,t)=>{e.locale=lS.getIn(t.payload,"locale","")}))})),NT=/\[(\d+)\]$/gi,TT=/(\d+)/gi,DT=/\[\d+\]$/,PT=(e,t,n,s=[Gs.CONTEXT_DATA,Gs.CASE_INFO.CASE_INFO,Gs.CONTENT])=>{const r=lS.getIn(t,s);if(r){const t=gd(r,[],[]);for(const r of t)lS.setIn(e[n],[...s,...r],{})}},OT=(e,t,n,s)=>{const{property:r,pageReference:a,category:o,type:i,subType:c}=s.payload,l=lS.getIn(e[t],n);if(l&&o===Gs.CASEMESSAGES)lS.setIn(e[t],od(r,a,o),"");else if(l&&l.length>0&&Array.isArray(l)){let s;s=c?l.filter((e=>!(e.type===i&&e.subType===c))):l.filter((e=>e.type!==i)),n&&n.length>0&&lS.setIn(e[t],od(r,a,o),s)}},RT=(e,t)=>{const{property:n,pageReference:s,category:r,isListEntry:a,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return PT(e,i,c),e;const l=od(n,s,r,a);if(Number.isInteger(o)){lS.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=lS.getIn(e[c],t)||{};const s=(u=Object.keys(n),[...u].sort(((e,t)=>{const n=e.match(NT),s=t.match(NT);if(!n&&!s)return e.localeCompare(t);if(!n&&s)return-1;if(n?.length&&s?.length){const e=n[0].match(TT),t=s[0].match(TT);if(e?.length&&t?.length)return parseInt(e[0],10)-parseInt(t[0],10)}return 1})));n=s.map((e=>n[e])),n.forEach(((n,r)=>{const a=s[r].match(NT);if(a?.length){const i=parseInt(a[0].match(TT)[0],10);i>o&&(lS.deleteIn(e[c],t.concat(s[r])),lS.setIn(e[c],t.concat(s[r].replace(DT,`[${i-1}]`)),n))}}))}else lS.setIn(e[c],l,{});var u;return e};function bT(e,t){const n=lS.getIn(e,t);return void 0!==n?.dataInfo?.content}const vT=(e,t)=>{const n=lS.getIn(e,t);return!0===ZI.isObjectCaseType(n?.objectInfo?.objectTypeID)};function xT(e,t){let n=ad.FIELD_MESSAGES_PATH;return bT(e,t)?n=ad.DATA_OBJECT_FIELD_MESSAGES_PATH:vT(e,t)&&(n=ad.OBJECT_FIELD_MESSAGES_PATH),n}const wT=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const s=lS.getIn(n,Gs.ERROR_FIELD_IN_PAGE).slice(1),r=lS.getIn(n,Gs.ERROR_IN_PAGE_IDENTIFIER).slice(1);if(r){let a="caseInfo.content";bT(e,t)?a="dataInfo.content":vT(e,t)&&(a="objectInfo.content");let o=s?`${a}.${s}`:a;o=o.replace(/\(/g,"[").replace(/\)/g,"]");const i=od(r,o,Gs.PROPERTY),c=lS.getIn(e[t],`${o}.classID`),l=dC(r,c),u=xA.getLocale()??"en-US",d=new im(u,l?.localeReference),p={type:$s.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue,...l?.label&&{fieldLabel:d.getLocalizedText(l.label)}},g=lS.getIn(e[t],i,[]);if(lS.isContains(g,p))return;lS.setIn(e[t],i,[...g,p])}})(e,t,n)}))};function MT(e,t){const{err:n,formFields:s}=t.payload;let{context:r}=t.payload;const{fieldErrors:a,pageErrors:o}=((e,t)=>{const n=new Map(t.map(((e,t)=>[e,t]))),s=e=>n.get((e=>{const t=(e.erroneousInputOutputFieldInPage||"").replace(/^\./,""),n=(e.erroneousInputOutputIdentifier||"").replace(/^\./,"");return t?`${t}.${n}`:n})(e))??Number.MAX_SAFE_INTEGER,r=e.slice().sort(((e,t)=>s(e)-s(t))),a=[],o=[];for(const e of r)hI(e,t,a,o);return{fieldErrors:o,pageErrors:a}})(n.errorDetails,s),i=xT(e,r);if(lS.setIn(e,[r,...i],{}),lS.setIn(e,[r,...ad.PAGE_MESSAGES_PATH],[]),a.forEach((t=>{const n=lS.getIn(t,Gs.ERROR_FIELD_IN_PAGE);if(n){const t=n.slice(1);if(t){const n=function(e){let t=null;const n=e.lastIndexOf(".");return n<0?null:(t=e.substring(0,n),t?`caseInfo.content.${t}`.replace(/\(/g,"[").replace(/\)/g,"]"):t)}(t);if(!n)return!1;const s=t.substring(t.lastIndexOf(".")+1),a=od(s,n,Gs.PROPERTY);lS.setIn(e,[r,...a],[])}}})),a.length>0&&wT(e,r,a),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{const n=e.erroneousInputOutputFieldInPage?.replace(/^\./,"");t.push({type:$s.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue,...n&&{fieldInPage:n}})})),t})(o);e[r]||(r=Gs.APP.APP),lS.setIn(e,[r,...ad.PAGE_MESSAGES_PATH],t)}else r.includes&&r.includes(Cy.WORKAREA)&&(r=Ks(r)),lS.deleteIn(e,[r,...ad.PAGE_MESSAGES_PATH]);return e}const LT=cT({},(e=>{e.addCase(br,((e,t)=>t.payload.err.errorDetails&&(t.payload.err.errorClassification===$s.VALIDATION_FAIL||t.payload.err.errorClassification===$s.INVALID_INPUTS||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?MT(e,t):e)).addCase(Gr,((e,t)=>{const{context:n}=t.payload,s=[n,...xT(e,n)],r=[n,...ad.PAGE_MESSAGES_PATH];if(lS.setIn(e,s,{}),lS.setIn(e,r,[]),n&&n.includes(Cy.WORKAREA)){const t=[tr(n),...ad.PAGE_MESSAGES_PATH];lS.setIn(e,t,[])}})).addCase(ga,((e,t)=>{const{isListEntry:n,clearAll:s,context:r}=t.payload;return s?(lS.deleteIn(e,[r,Gs.CONTEXT_DATA]),e):n?RT(e,t):((e,t)=>{const{property:n,pageReference:s,category:r,isListEntry:a,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return PT(e,o,i),e;const l=od(n,s,r,a);return r===Gs.PAGE&&i?.includes(Cy.WORKAREA)&&(c=Ks(i)),OT(e,c,l,t),OT(e,i,l,t),e})(e,t)})).addCase(pa,((e,t)=>{const{messages:n,property:s,pageReference:r,context:a,category:o}=t.payload,i=od(s,r,o);n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&lS.setIn(e[a],od(s,r,o),n)}))})),UT=(e,t,n,s,r)=>{lS.setIn(e[t],[...n,s],r)},FT=[_T,AT,LT,cT({},(e=>{e.addCase(Ea,((e,t)=>{const{instruction:n,actions:s,context:r,referenceList:a,listIndex:o,groupIndex:i,listMoveToIndex:c,content:l={}}=t.payload,u=GC(a);switch(n){case Gs.LIST_ACTIONS.ADD:UT(e,r,u,i,l);break;case Gs.LIST_ACTIONS.INSERT:UT(e,r,u,o,l);break;case Gs.LIST_ACTIONS.UPDATE:((e,t,n,s,r)=>{const a=sS(lS.getIn(e[t],[...n,s],{}),r);lS.setIn(e[t],[...n,s],a)})(e,r,u,o??i,l);break;case Gs.LIST_ACTIONS.DELETE:((e,t,n,s,r)=>{const a=lS.getIn(e[t],n,[]);"string"==typeof s?delete a[s]:a.splice(s,1),lS.setIn(e[t],n,a),rd.deleteListNode(t,[r],a.length)})(e,r,u,o??i,a);break;case Gs.LIST_ACTIONS.MOVE:((e,t,n,s,r)=>{const a=lS.getIn(e[t],[...n,s],{}),o=lS.getIn(e[t],n,[]);o.splice(s,1),o.splice(r,0,a),lS.setIn(e[t],n,o),ld(e,t,n?.join("."),s,r)})(e,r,u,o,c);break;case Gs.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,s)=>{const r=lS.getIn(e[t],n)||[];s.forEach((e=>{const{instruction:s,content:a,listIndex:o}=e;if(s===Gs.LIST_ACTIONS.SELECT){r[o]=a;const e=n?.join(".");Ap(t,e)}else delete r[o]})),lS.setIn(e[t],n,r.filter(Boolean))})(e,r,u,s);break;case Gs.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{lS.setIn(e[t],n,[])})(e,r,u);break;case Gs.LIST_ACTIONS.REPLACE:((e,t,n,s)=>{lS.setIn(e[t],n,s)})(e,r,u,l);break;case Gs.LIST_ACTIONS.DELETEPAGE:((e,t,n)=>{lS.setIn(e[t],n,{})})(e,r,u)}}))}))],VT=(e,t)=>(e||(e=WT().data),t.type===ha?WT().data:(FT.forEach((n=>{e=n(e,t)})),e)),jT={},kT=(e,t=[])=>{t.forEach((t=>{lS.deleteIn(e,[t])}))},BT=(e,t)=>{const{type:n,payload:s}=t,r=n===Gr,{target:a,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:g="",clearView:h=!1}=s;return c?lS.setIn(e,[a,"items",l,"view"],c):h&&lS.deleteIn(e,[a,"items",l,"view"]),o&&lS.setIn(e,[a,"items",l,"context"],o),d&&lS.setIn(e,[a,"items",l,"flowName"],d),(!r||r&&g)&&lS.setIn(e,[a,"items",l,"key"],g.trim()),((e,t,n,s)=>{""===e&&lS.deleteIn(t,[n,"items",s,"key"])})(g,e,a,l),(!r||r&&i)&&lS.setIn(e,[a,"items",l,"semanticURL"],i),(!r||r&&p)&&lS.setIn(e,[a,"items",l,"resourceType"],p),kT(e,u),e},$T=cT(jT,(e=>{e.addCase(ha,(()=>jT)).addCase(vr,((e,t)=>{const{context:n,name:s,type:r,actionMgrID:a}=t.payload,o=`${n}/${s}`;if(vg.resolveActionByID(a,null,!1),e[o])return e;lS.setIn(e,[o],{type:r,accessedOrder:[],items:{}})})).addCase(zr,((e,t)=>{const{containerName:n,childContainers:s=[]}=t.payload;lS.deleteIn(e,[n]),s.forEach((t=>{lS.deleteIn(e,[t])}))})).addCase(xr,((e,t)=>{const{context:n,name:s,actionMgrID:r,childContainers:a}=t.payload,o=`${n}/${s}`;vg.resolveActionByID(r,null,!1),lS.setIn(e,[o,"accessedOrder"],[]),lS.setIn(e,[o,"items"],{}),Array.isArray(a)&&a.forEach((t=>{lS.deleteIn(e,[t])}))})).addCase(wr,((e,t)=>{const{target:n,context:s,isInCreateStage:r,isBulkAction:a,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:g,isMinimizable:h,showProgress:f,progressMessage:m,modalOptions:I,resourceStatus:E,actionID:y,isMultiRecordData:A,acTertiary:C,parentContext:S,heading:_,isTraditionalRemoteCase:N,readOnly:T,referenceList:D,subscriptName:P,subscriptFieldName:O,pageGroupName:R,isPageGroup:b,index:v,isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:U,enableBackNavigation:F}=t.payload,V=e[n],j=V&&V.type,k=V&&V.accessedOrder||[],B=V&&V.items||{};if(e[n]&&"single"===j&&k.length>0)return BT(e,t);const $={accessedOrder:[...k,c],items:{...B,[c]:{view:i,semanticURL:o,key:u,flowName:d,readOnly:T,context:s,isInCreateStage:r,resourceType:p,actionName:g,isMinimizable:h,...a&&{isBulkAction:a},showProgress:f,progressMessage:m,modalOptions:I,isTraditionalRemoteCase:N,resourceStatus:E,referenceList:D,subscriptName:P,subscriptFieldName:O,pageGroupName:R,isPageGroup:b,index:v,...y&&{actionID:y},...C&&{acTertiary:C},...A&&{isMultiRecordData:A},...S&&{parentContext:S},...x&&{isDeleteConfirmation:x,workId:w,caseTypeID:M,className:L,keys:U,enableBackNavigation:F},heading:_}}};vg.resolveActionByID(l,null,!1),e[n]=Us(e[n],$)})).addCase(Gr,((e,t)=>{const{actionMgrID:n,data:s}=t.payload;try{BT(e,t),vg.resolveActionByID(n,s,!1)}catch{vg.rejectActionByID(n,!1)}})).addCase(Hr,((e,t)=>((e,t)=>{const{actionMgrID:n,data:s,target:r,containerItemID:a}=t.payload;let o=e;try{const i=e&&e[r]?.type;let c=e&&e[r]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,a]:c.includes(a)?c:[...c,a],lS.setIn(e,[r,"items",a,"transientItems"],[]),lS.setIn(e,[r,"accessedOrder"],c),o=BT(e,t),vg.resolveActionByID(n,s,!1)}catch{vg.rejectActionByID(n,!1)}return o})(e,t))).addCase($r,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:r}=t.payload;try{const t=lS.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));t.push(s),lS.setIn(e,[n,"accessedOrder"],t),vg.resolveActionByID(r,null,!1)}catch{vg.rejectActionByID(r,!1)}})).addCase(Wr,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:r,childContainers:a}=t.payload;try{const t=lS.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));lS.setIn(e,[n,"accessedOrder"],t),lS.deleteIn(e,[n,"items",s]),kT(e,a),vg.resolveActionByID(r,null,!1)}catch{vg.rejectActionByID(r,!1)}})).addCase(Mr,((e,t)=>{const{target:n,containerItemID:s,actionMgrID:r,childContainers:a}=t.payload;try{const t=lS.getIn(e,[n,"accessedOrder"]).filter((e=>e!==s));lS.setIn(e,[n,"accessedOrder"],t),lS.deleteIn(e,[n,"items",s]),kT(e,a),vg.resolveActionByID(r,null,!1)}catch{vg.rejectActionByID(r,!1)}})).addCase(Lr,((e,t)=>{const{transientItemID:n,target:s,contextName:r}=t.payload,a=lS.getIn(e,[s,"items",r,"transientItems"])??[];lS.setIn(e,[s,"items",r,"transientItems"],[...a,n])})).addCase(Vr,((e,t)=>{const{target:n,containerItemID:s}=t.payload;lS.deleteIn(e,[n,"items",s,"transientItems"])})).addCase(Fr,((e,t)=>{const{target:n,transientItemID:s,containerItemID:r}=t.payload,a=(lS.getIn(e,[n,"items",r,"transientItems"])??[]).filter((e=>e!==s));lS.setIn(e,[n,"items",r,"transientItems"],a)}))}));let GT={};const WT=()=>GT,HT=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,s=n[Gs.CONTEXT_DATA]||e[Gs.CONTEXT_DATA];GT={data:{locale:xA.getLocale(),[Gs.APP.APP]:{...t,[Gs.CONTEXT_DATA]:s}},containers:{}}})(e),{data:VT,containers:$T}),qT=(e,t=!1)=>e===Gs.ACTION?t?Rf.REFRESH_CASE_DATA:Rf.REFRESH_ASSIGNMENT_DATA:Rf.REFRESH_CASE_VIEW,zT=(e,t,n)=>{const s=[];t&&n&&s.push({page:t,actionID:n});let r=e;for(;r;){const e=gS.getPropertyValue(Gs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,"",r);if(!e?.isMultiRecordData||e.editType!==Gs.ACTION||!e.interestPage||!e.interestPageActionID)break;e.interestPage!==t&&s.unshift({page:e.interestPage,actionID:e.interestPageActionID}),r=e.parentContext}return s},YT=e=>{const{context:t}=e;let n={...lI(t).content,contextData:!1};const s=xI(t);lS.isEmpty(s)||(n=vI(s,n));const r=qT(e.editType,e.isLocalAction),{restApi:a,reqType:o}=p_(r,{ID:e.isLocalAction||e.editType!==Gs.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=a;return e.editType===Gs.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID,xA.getFeatureMap()?.pyEnableOptimisationForEmbedTable&&(n.actionIdArrayToBeProcessed=zT(t,e.interestPage,e.interestPageActionID))),n.interestPage=e.interestPage,ju(Kd(i,{method:o,body:n,headers:e.headers},t)).pipe(sh((t=>({actionInPayload:e,response:t.data,headers:cI(t.headers)}))),Ih(": Error occurred during ajax call : ",t))},KT={},{VIEW:QT,FIELD:JT}=Gs.CONTEXT_TREE_NODE_TYPES,XT=(e,t,n)=>{const s=t.value.data[n]?.objectInfo?.headers,r=t.value.data[n]?.caseInfo?.headers;return!ZI.shouldUseUnifiedHandling()&&e&&s?s:r},ZT=e=>kd[e]>0&&KT[e],eD=(e,t)=>{const{caseWideAction:n,caseViewAction:s,fieldsWithDeclarativeTargets:r,fieldsWithWhen:a,isViewsWithWhen:o,interestPage:i,options:c,isMultiRecordData:l,editType:u,isLocalAction:d,interestPageActionID:p,context:g}=e,{optionalPayload:h}=c;h&&(t.content={...h});let f={},m={...t},I=Rf.REFRESH;if(s||l&&u===Gs.ACTION){const t=qT(u,d);l&&u===Gs.ACTION&&(m.interestPageActionID=p,xA.getFeatureMap()?.pyEnableOptimisationForEmbedTable&&(m.actionIdArrayToBeProcessed=zT(g))),f=p_(t,e),m={...m,interestPage:i}}else o?f=((e,t)=>{const{isObjectType:n,isExternalObject:s,actionID:r,context:a,isExternalCase:o,casetypeID:i}=e,c=Gs.getDefaultQualifiedName(Gs.VIEW_NAMES.OBJECT_CREATE_VIEW);if(t||n&&_E(a)){let t=s&&r===c?Rf.REFRESH_EXTERNAL_OBJECT:Rf.REFRESH_CASE_DATA;const n=ZI.shouldUseUnifiedHandling();return s&&r===c&&n&&(t=Rf.REFRESH_EXTERNAL_CASE_DATA),p_(t,e)}return p_(o&&i&&r===c?Rf.REFRESH_EXTERNAL_CASE_DATA:Rf.REFRESH_ASSIGNMENT_DATA,e)})(e,n):(r.length>0||a.length>0)&&({restAPI:f,requestBody:m,requestType:I}=((e,t,n,s,r)=>(r={...r,calculations:{fields:t,whens:n}},{restAPI:p_(s?Rf.RECALCULATE_CASE_DATA:Rf.RECALCULATE_ASSIGNMENT_DATA,e),requestBody:r,requestType:Rf.RECALCULATE}))(e,r,a,n,m));return{restAPI:f,requestBody:m,requestType:I}},tD=[(e,t)=>e.pipe(hh(Rf.REFRESH_DATA,xa),sh((e=>e.payload)),ph((e=>!nI(e?.options?.actionMgrID))),rh((e=>{const{context:n,contextData:s,options:r,isObjectType:a}=e,{propertyName:o="",classID:i="",isObjectWideAction:c,skipPayloadGeneration:l}=r,u=l?{content:{}}:lI(n,{skipUUID:!1,isObjectWideAction:c});let d=[],p=[],g=!1;xA.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:d=[],whens:p=[]}=RE(n)),g=p.some((e=>e.type===QT))):g=!0;const h=p.filter((e=>e.type===JT)),f=lS.getPropertyName(o),m=f?f.split("."):[],I=m.pop(),E=m.join("."),y=[];E&&((e,t,n,s,r)=>{const a=dC(e,t);if(!a||"copy"!==a.dataRetrievalType)return;const o=lS.getIn(n,`content.content.${e}`);if(!o||"object"!=typeof o)return;(s?Object.keys(o).filter((e=>e!==s)):Object.keys(o)).length>0&&r.push(e)})(E,i,u,I,y),e.serverPrecedenceFields=y;let A={...u.content,contextData:s};const C=xI(n);lS.isEmpty(C)||(A=vI(C,A));const S=eD({...e,fieldsWithDeclarativeTargets:d,fieldsWithWhen:h,isViewsWithWhen:g},A);Ff.registerBlockingAction(n).catch((()=>{}));const{restAPI:_,requestBody:N,requestType:T}=S;(e={...e,requestType:T}).requestType=T;const{reqType:D,restApi:P}=_,O={...XT(a,t,n)};O&&!O.etag&&e.isMultiRecordData&&e.editType===Gs.ACTION&&(O.etag=lS.getETag(e.context));return ju(((e,t)=>{const{context:n}=e;(e=>{const{reqHeaders:t}=e;t&&(e.headers=e.headers||{},t.etag&&(e.headers["if-match"]=t.etag))})(e);const s=(e=>{const{ID:t,actionID:n,context:s}=e;return`${t}.${s}.${n}`})(t);if(t.interestPage&&(e.interestPage=t.interestPage),ZT(s)){const t=[];for(let n=0;n<KT[s].length;){const r=KT[s][n],a=OE(r,e);if("CANCEL_REFRESH"===a){const e=new Error;return e.code="ERR_CANCELED",Promise.reject(e)}!0===a&&(t.push(n),r.cancelConfig?.cancel()),n+=1}t.forEach((e=>{KT[s].splice(e,1)}))}const r=Xd();return e.signal=r.token,e.cancelConfig=r,KT[s]?KT[s].push(e):KT[s]=[e],Ad.publish($s.PUB_SUB_EVENTS.ON_REFRESH_START,{context:n}),Kd(e.url,e,n,{cancelContext:s}).then((e=>(delete KT[s],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete KT[s],e}))})({reqHeaders:O,context:n,method:D,body:N,url:DE(e,P)},e)).pipe(sh((t=>{const s=((e,t,n)=>{const s=ZI.shouldUseUnifiedHandling(),r=ZI.isObjectCaseType(t)||n;if(s||!r)return e;const a=lS.getIn(e?.data,$s.OBJECT_INFO.OBJECT_INFO_CONTENT_CLASS_ID);return ZI.isExternalObject(a)?e:Bs.transformCaseData(e)})(t?.data,r?.classID,a);return r?.resetForm&&rd.removeContextTreeNode(n),{response:{...s},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:cI(t.headers)}})),Ih(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),rh((async e=>{if(e&&e.type===br)return Ff.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),"ERR_CANCELED"===e.payload?.err?.code?[]:(Ad.publish(Gs.ON_REFRESH_ERROR,{context:e.payload?.context}),fI(e));const{actionConfig:t,response:n,actionMgrID:s}=e,{context:r,serverPrecedenceFields:a,requestType:o}=t,i=wg.getTargetViewContainerName(Kr),c=Wa(i,r),l={acName:c,context:r},u=um(n,{[$s.STOPMERGEACTIONS]:!0,[$s.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===Rf.REFRESH&&await dI(u,t,l);const d=uI(u,{target:c,context:r});t.interestPage&&(d.interestPath=`caseInfo.content${lS.convertClipboardPageToPageRefNotation(t.interestPage)}`),d.isArrayDeepMerge=t.options?.isArrayDeepMerge,d.preserveClientChanges=void 0===t.options?.preserveClientChanges||t.options.preserveClientChanges;const p=ZI.getPropertiesToReArrange(r),g=zS(AS,d,{serverPrecedenceFields:a,propertiesToReArrange:p}),h=g.payload?.data?.pageInstructions;return h?.length>0&&(delete g.payload?.data?.pageInstructions,UI.mergeServerPageInstructions(r,h)),qC(g),vg.resolveActionByID(s,d),Ad.publish($s.PUB_SUB_EVENTS.ON_REFRESH_COMPLETE,{context:r}),Ff.deRegisterBlockingAction(r).catch((()=>{})),[]})))],nD=[e=>e.pipe(hh(fa),rh((async e=>{const{context:t}=e.payload,n={},s={},r=Object.keys(e.payload.datapages).map((r=>{const a=e.payload.datapages[r];if(a.mode===Gs.READONLY&&a?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=a?.refreshStrategy||{},n=YC()[a.name];if(n&&r in n){const s=n[r],{loadTime:a}=s;if(!Dh.isTimeElapsed(a,e,t))return}}return Dh.getData(a.name,{dataViewParameters:a.dataViewParameters},t).then((e=>{const t=a.mode===Gs.READONLY?s:n;t[a.name]?t[a.name][r]={pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[a.name]={[r]:{pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(r);const a=[];return Object.keys(n).length&&a.push(AS({context:t,data:n})),Object.keys(s).length&&a.push(KS({data:s,context:t})),qC(a),[]})))];class sD{static OPEN_ASSIGNMENT_ACTION="openAssignment";static DIRTY_POPUP_C11N="displayDirtyPopupFromConstellation";static HANDLE_INFINITY_DISCARD="handleDiscardInInfinity";static OPEN_ASSIGNMENT_MODAL="openAssignmentInModal";static DISPLAY_DIRTY_POPUP="displayDirtyPopup";static LOAD_PREVIEW="loadPreview";static UPDATE_COEXISTENCE_DRILLDOWN_CASE="updateCoexistenceDrilldownCase";static OPEN_WORK_ITEM="openWorkItem";static OPEN_WORK_BY_HANDLE="openWorkByHandle";static GET_NEXT_WORK_ACTION="getNextWork";static CLOSE_CONTAINER_ACTION="closeContainer";static CANCEL_CASE="cancelCase";static CREATE_WORK="createWork";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>r.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId())switch(e.data.action){case sD.DISPLAY_DIRTY_POPUP:this.displayDirtyPopup(e);break;case sD.LOAD_PREVIEW:this.loadPreview(e);break;case sD.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case sD.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case sD.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case sD.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case sD.CLOSE_CONTAINER_ACTION:this.closeContainer(e);break;case sD.CANCEL_CASE:this.handleCaseCancel();break;case sD.CREATE_WORK:this.createWork(e)}}};displayDirtyPopup=e=>{this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this))};handleCaseCancel=()=>{const e=Gy($s.APP.APP),t=e[e.length-1],n=Fy(t),s=zC(n)?.caseInfo?.ID;if(s&&n&&Dm({}).getPConnect().getActionsApi().getDescendants(s,n),Wm(n)){const e=NA(n);e&&Dm({}).getPConnect().getActionsApi().getDescendants(s,e)}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){Dm({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=`${$s.APP.APP}${Gs.FORWARD_SLASH_STRING}${$s.PRIMARY}`;if(!0!==qy(e))return;const t=ks.getDefaultQualifiedName("Data-Portal"),n=ks.getDefaultQualifiedName("pyHome"),s=Dm({isRoot:!0}),r=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let a;Array.isArray(r)&&r[0]&&(a=r[0]);const o=a?.pyClassName||t,i=a?.pyRuleName||n;s.getPConnect().getActionsApi().showPage(i,o)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:s,caseLabel:r,uniqueId:a}=e.data;if(a!==this.getUniqueId())return;let o=s;s===sD.OPEN_WORK_ITEM&&(o=sD.OPEN_WORK_BY_HANDLE),bA.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:o,name:r});Dm({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),r,t)};openAssignment=e=>{const{pzInsKey:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){if(this.onCreateCallback&&this.openAssignmentParams&&(t&&this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0]&&this.openAssignmentParams[0].payload&&this.openAssignmentParams[0].payload.data&&(this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle"),t)){Dm({}).getPConnect().getActionsApi().openAssignment(t,n,{containerName:$s.PRIMARY,context:$s.APP.APP})}this.onCreateCallback=null,this.openAssignmentParams=null}};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${$s.APP.APP}${Gs.FORWARD_SLASH_STRING}${$s.PRIMARY}`;Dm({meta:{},options:{context:By(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:s}=e.data;if(s===this.getUniqueId()){const e=`${$s.APP.APP}${Gs.FORWARD_SLASH_STRING}${$s.PRIMARY}`;Dm({meta:{},options:{context:By(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};createWork=e=>{const{strClassName:t,uniqueId:n,strFlowParams:s,caseInitProperties:r}=e.data;if(n===this.getUniqueId()){const e=`${$s.APP.APP}${Gs.FORWARD_SLASH_STRING}${$s.PRIMARY}`,n=Dm({meta:{},options:{context:By(e)}}),a=new URLSearchParams((r+s).slice(1)),o=this.setStartingFields(a);n.getPConnect().getActionsApi().createWork(t,{startingFields:o})}};setStartingFields=e=>{const t={};return e.forEach(((e,n)=>{n&&(t[n]=e)})),t};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),Ad.subscribe($s.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),Ad.subscribe($s.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{Ad.unsubscribeAllWithEventType($s.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),Ad.unsubscribeAllWithEventType($s.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD),this.setReverseCoexistenceCaseLoaded(!1),this.isDirtyDialogActive=!1};init=(e=!0)=>{null===this.broadcastChannel&&this.initBroadcastChannel(),e&&this.subscribeEvents()};destroy=()=>{this.destroyBroadcastChannel(),this.unsubscribeEvents()};setCallBackFunction=e=>{this.callback=e};setReverseCoexistenceCaseLoaded=e=>{this.isReverseCoexistenceCase=e};setIsDirtyDialogActive=e=>{this.isDirtyDialogActive=e};getBroadCastChannel=()=>this.broadcastChannel;getCallBackFunction=()=>this.callback;isReverseCoexistenceCaseLoaded=()=>this.isReverseCoexistenceCase;postDirtyPopupMessage=({callBackFunction:e})=>{this.broadcastChannel?.postMessage({action:sD.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:sD.HANDLE_INFINITY_DISCARD,uniqueId:this.getUniqueId()}),this.broadcastEventToIframe=!1):(this.callback?.call(this),this.callback=null),this.isDirtyDialogActive=!1};postCreateCaseMessage=(e,t,n)=>{null===this.broadcastChannel&&this.init(!1),this.broadcastChannel?.postMessage({action:sD.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const rD=new sD,aD="nextAssignmentInfo",oD="nextAssignmentInfo.context",iD=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Gs.MODAL:t||wg.getTargetViewContainerName(ta)},cD=async(e,t)=>{if(qy(e))return{continueExecution:!0,removeActionPayload:{},dirtyCheckPerformed:!1};return{...await CI(e,t),dirtyCheckPerformed:!0}},lD=e=>{if(ZI.shouldUseUnifiedHandling()&&!xA.isInfinityRuntime())return e?.uiResources?.root?.config?.name===ks.getDefaultQualifiedName("pzCreateDetails")||!1;const t=lS.getIn(e,[Gs.DATA,Gs.CASE_INFO.CASE_INFO]);return tE(t)&&nE(xA.getOperatorIdentifier(),t)},uD=(e,t)=>{const{class:n,context:s,viewType:r=oI.PAGE}=e,{removeActionPayload:a}=t;let o=e?.pageName?e?.pageName:xA.getDefaultCasePage();return e.isTraditionalUICase&&(o=ks.getDefaultQualifiedName("pyDetails")),ju(rg.createCase(n,{...e,pageName:o,viewType:r,context:s})).pipe(sh((({response:t,headers:n})=>(Bs.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Ih("Error occurred during ajax call at createWork Epic : ",s))},dD=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},pD=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},gD=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_VIEW_OPENED_AFTER_CREATE,e)},hD=e=>{let t,n=0,s=[],r={},a=!1,o=!1;return e.pipe(hh(IS),Eh(100),sh((e=>(({actionMgrID:n}=e.payload),e.payload))),rh((e=>{const{context:s}=e;if(t=e.class,o=!1,ZI.isExternalCaseType(t)&&(dd({context:s,stateObj:zC(s),clearContextMessages:!0}),!YI(s))){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(n,!0,e),mh()}const r=iD(e),i=Wa(r,s);return a=Ym(t),ju(cD(i,{loadingContext:s})).pipe(rh((({continueExecution:t,removeActionPayload:s,dirtyCheckPerformed:r})=>t?(o=r,e.isTraditionalUICase=a,uD(e,{removeActionPayload:s})):(vg.rejectActionByID(n),fh))))})),rh((async e=>{if(e?.type===br)return e.payload.context=((e,t)=>ZI.isExternalCaseType(e)&&t?t:EA())(t,e.payload.context),s.push(fI(e)),s;const{actionInPayload:i,response:c,headers:l,removeActionPayload:u}=e,d=ZI.isExternalCaseType(i.class);let p=lD(c);(i.renderInline||xA.getDefaultCasePage()||a)&&(p=!1),lS.setIn(c.data,$s.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const g=iD({...i,isInCreateStage:p}),h=Wa(g,i.context),f=EI(h,g,i.context),{openCaseViewAfterCreate:m}=i;if(!o&&((e,t,n)=>!xm(e)&&qy(t)&&(n??!0))(g,h,m)){const{continueExecution:e}=await CI(h,{loadingContext:i.context});if(!e)return vg.rejectActionByID(n),s}const I=i?.openCaseViewAfterCreate??!0,E=um(c);if(!I&&!p&&!(e=>zy(e)&&xA.isOpenCasePageAfterCreateInMultiDocEnabled())(h)){const e=Bm(c),{businessID:t,caseType:n,resolvedURL:a,caseTypeName:o}=$g(c);return r={caseId:t,label:o,href:a},dD(r),pD({caseId:t,assignmentId:e,caseType:n,ID:km(E)}),d&&Gm(i),s}const y=String(Fm(km(E)));let A=u_("createWork",{caseClassName:Vm(E)});A=A.replace(/{.+?}/,y),E.semanticURL=A,Rg.setComponentCache(y,Vd.addDebugHeaders(i.debugInfo)),((e,t)=>{const n=lD(e),{skipBrowserSemanticUrlUpdate:s=!1,isTraditionalUICase:r}=t,a=r&&!Km();lS.setIn(e,["directUrlUpdation"],(!n||a)&&!s)})(E,i);const C={acName:h,context:f},S=tI(f);await dI(E,i,C);const _={target:h,context:f,containerItemID:f,headers:l,semanticURL:A,isInCreateStage:p,isMinimizable:p,caseViewMode:E.confirmationNote?Gs.REVIEW_MODE:Gs.PERFORM_MODE,currentCaseViewMode:S,assignmentContext:lS.getIn(E,oD),nextAssignmentInfo:lS.getIn(E,aD),resourceType:$s.CASE,openCaseViewAfterCreate:i.openCaseViewAfterCreate,modalOptions:i.modalOptions,debugInfo:i.debugInfo};Hm(_,E);const N=uI(E,_);II(N.data,i.remoteCaseMeta),a&&(delete N.data.caseInfo.actionButtons,N.data.caseInfo.content.coexistenceAction="openAssignment"),ZI.setTraditionalGadgetId(N.data);const T=mI(h,N);return yI(T)&&$m(s,{removeActionPayload:u,target:h}),d&&Gm(i),s.push(T),eI(E,_),gD({caseId:y}),s})),sh((()=>{const e=Km(),t=tE(lS.getIn(s[0]?.payload,"data.caseInfo"));return a&&e&&t?rD.postCreateCaseMessage(s[0]?.payload?.nextAssignmentInfo?.ID,bI,s):bI(s),zm(s,n),r={},s=[],s})))},{RESOURCE_TYPES:fD}=$s,mD=(e,t)=>{const{containerItemID:n,context:s,actionMgrID:r,isInCreateStage:a,isModalAction:o}=t;if(a&&o){const t=bm(n),a=Wa(t,s);e.push(zS(VS,{containerItemID:n,target:a,actionMgrID:r}))}},ID=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:s,isInCreateStage:r,isProcessAction:a}=t,o=ky(n),i=`${o?.includes("root")?Gs.APP.ROOT:Gs.APP.APP}/${Cy.MODAL}`;e.push(zS(kS,{containerItemID:n,context:o,target:i,skipReleaseLockRequest:s,isInCreateStage:r,isProcessAction:a}))},ED=e=>QC(".openCaseViewAfterCreate",Gs.CONTEXT_DATA,e)??!0,yD=async(e,{translatedDXAPIResponse:t,actionInPayload:n},s,r,a)=>{const{caseID:o}=n,i=(c=t,lS.getIn(c,Om.NEXT_ASSIGNMENT_INFO_ID,Gs.EMPTY_STRING));var c;const l=r?Fg(t):Vm(t),{caseViewMode:u,headers:d,semanticURL:p,actionMgrID:g,directUrlUpdation:h,key:f,flowName:m,resourceType:I}=s,E=tA(n?.context),y=Dy(E,n?.context)?.acTertiary;Object.assign(a,{caseId:o,assignmentId:i,caseType:l,isSubmitFromBlendedUI:y}),ID(e,{...n,skipReleaseLockRequest:!0});const A=`${n?.containerItemID.includes("root")?Gs.APP.ROOT:Gs.APP.APP}/${Cy.PRIMARY}`,C=EI(A,Cy.PRIMARY),S=Vd.getCoreHeadersFromContext(n.context)||!1,_=uI(t,{target:A,context:C,containerItemID:C,caseViewMode:u,headers:d,semanticURL:p,key:f,flowName:m,resourceType:I,directUrlUpdation:h,debugInfo:S&&S.debugInfo&&{debugId:S.debugInfo[Gs.COREHEADER_APP_DEBUG_ID]},shouldUpdateCaseActionsInParentContext:!0});if(qy(A)){const t=zC(C),r=km({data:t}),[,a]=r?r.split(" "):[],o=`You will lose unsaved changes for ${a}. Do you want to continue?`;if(!ED(n.context))return e;{const{continueExecution:t}=await CI(A,{dirtyMessage:o});if(!t)return s.directUrlUpdation=!1,vg.rejectActionByID(g),mh();_.currentCaseViewMode=tI(_?.context),e.push(zS(GS,_)),n.__deferCaseActionsPayload=_}}else{if(!((e,t)=>zy(e)&&(ED(t)||xA.isOpenCasePageAfterCreateInMultiDocEnabled()))(A,n.context))return e;e.push(zS(OS,_))}return t.directUrlUpdation=h,t.semanticURL=p,await dI(t,{..._,acName:A},{acName:A,context:C}),e},AD=(e,{isModalAction:t,target:n,transientItemID:s})=>{if(t){const t=e.find((({type:e})=>e===Hr));t?.payload&&(n=t.payload.target,s=t.payload.containerItemID)}const r=BS({target:n,containerItemID:s});r.payload.transientItems.length&&e.push(r)},CD=e=>/^app\/preview_[0-9]*/g.test(e),SD=(e,t)=>{const n=Ks(e);return!CD(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},_D=e=>{if(!ED(e.context)){let t;const n=e?.caseTypeID,s=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:s}}return{}},ND=(e,t,n,s)=>{const{data:r,caseViewMode:a}=t,o={data:r,caseViewMode:a,context:n};if(lS.setIn(o.data,["context_data","caseViewMode"],a),e.push({type:ya,payload:{context:n}}),s){const t={data:Bs.transformObjectToCase(r),caseViewMode:a,context:n};e.push(zS(AS,t))}e.push(zS(AS,o))},TD=async(e,t,n,s,r,a,o,i,c,l)=>{const{headers:u}=c,d=l?Gs.OBJECT_INFO.OBJECT_INFO:Gs.CASE_INFO.CASE_INFO;if(e){if("object"!=typeof c?.response?.uiResources?.root){const t=(e,t)=>{const n=e.findIndex((e=>e.ID===t));if(-1!==n){const[t]=e.splice(n,1);e.unshift(t)}return e},n=zC(e),s=c?.response?.data?.caseInfo?.assignments??[],r=n?.caseInfo?.assignments??[],a=tI(e)===Gs.PERFORM_MODE,o=s[0]?.ID!==r[0]?.ID,i=s.length>0&&r.length>0;a&&o&&i&&c?.response?.data?.caseInfo?.assignments&&(c.response.data.caseInfo.assignments=t(s,r[0]?.ID))}const p=qy(tA(e));let g=!1;const h=tA(n),f=Ny(h),m=Fy(h);m&&f?.items?.[m]?.key===c?.actionInPayload?.caseID&&(g=!0),ID(r,{...s,skipReleaseLockRequest:!0});const I=bm(e),E={target:tA(e),containerItemID:e,context:e,containerName:I};t.doDeleteCaseSummary=s.doDeleteCaseSummary;const y=tr(n),A=zC(y),C=zC(s.context),S=A[d]?.ID,_=C[d]?.ID,N=zC(e)?.caseInfo?.ID;if(p&&S===_||!p&&(""===o||E.containerItemID.includes(Gs.WORKAREA)&&t.caseViewMode===Gs.REVIEW_MODE&&N===t.data?.caseInfo?.ID||!a&&t.root&&0===Object.keys(t.root).length&&N===t.data?.caseInfo?.ID))if((void 0===t?.data[d]?.content||void 0!==t.data[d].content&&"object"==typeof t.data[d].content&&0===Object.keys(t.data[d].content).length)&&(t.root=void 0,delete t.data?.caseMessages),e.includes(Gs.WORKAREA)&&t.caseViewMode===Gs.REVIEW_MODE&&((e,t)=>{const n=e?.assignmentID,s=t?.data?.caseInfo?.assignments??[],r=s[0]?.ID;return n!==r})(s,i)&&(t.flowName=" ",t.clearView=!0,t.root?.config?.name!==Gs.PY_CONFIRM&&(t.root=void 0)),e.includes(Gs.ACTIONAREA))r.push(zS(AS,{...t,key:o,resourceType:"",...E}));else{const e=Dy(E.target,E.containerItemID);e?.resourceType!==fD.PAGE&&r.push(zS(MS,{...t,key:o,resourceType:"",...E}))}else if(a){const a=tA(e),i=xy(a,o);if(i)E.target=a,E.context=i,E.containerItemID=i,r.push(zS(MS,{...t,key:o,resourceType:"",...E}));else{const e=Gy(n)[0];if(s.target=e,s.context=EI(e,Gs.WORKAREA,n),s?.context){s.containerItemID=s.context,r.push(zS(OS,{...s,...t}));const n=s.containerItemID;r.push(zS(VS,{parentContainerTarget:e,containerItemID:n}))}}}if(s.target=tA(e),s.containerName=bm(e),s.context=e,s.containerItemID=e,s.shouldUpdateCaseActionsInParentContext=!0,lS.setIn(t,"acName",E.target),await dI(i,t),s.__deferCaseActionsPayload=s,g&&(n.includes(Gs.WORKAREA)&&Wm(n)&&(n=tr(n)),ND(r,t,n,l)),!a&&t.caseViewMode===Gs.PERFORM_MODE){const t=((e,t)=>{const n=tA(e);return xy(n,t)})(e,o),n={data:{[d]:{headers:u}},context:t};r.push(zS(AS,n)),r.push(gE(((e,t=!1,n=!1)=>{const s=vg.getNextActionMgrId();return{ID:gS.getPropertyValue($s.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:gS.getPropertyValue($s.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:s}}})(t)))}}else{ID(r,s);let e=!1;const o=tA(n),i=Ny(o),u=Fy(o);if(u&&i?.items?.[u]?.key===c?.actionInPayload?.caseID&&(e=!0),a){const e=Gy(n)[0];s.target=e,s.context=EI(e,Gs.WORKAREA,n),s.containerItemID=s.context,r.push(zS(OS,{...s,...t}));const a=s.containerItemID;r.push(zS(VS,{parentContainerTarget:e,containerItemID:a}))}e&&ND(r,t,n,l)}},DD=async(e,t,n,s,r,a,o)=>{const i=a?"objectInfo":"caseInfo";((e,t,n)=>{if(t.isProcessAction&&(ID(n,{...t,skipReleaseLockRequest:!0}),e)){const s=`${t?.containerItemID.includes("root")?Gs.APP.ROOT:Gs.APP.APP}/${Cy.PRIMARY}`,r=EI(s,Cy.PRIMARY),a={insKey:e.ID,className:e.content.classID,context:r,acTargetName:Gs.PRIMARY,isChild:!0},o={type:Ir,payload:{...a}};n.push(o)}})(e.data[i].parentCaseInfo,t,r);const c=e?.data[i]?.parentCaseInfo?.ID;if(c){const n=tA(t?.context),s=Dy(n,t?.context)?.parentContext,r=tA(s);t?.isProcessAction&&by(r,c)&&AA(s,e?.data[i]?.lastUpdateTime)}n.resourceType=fD.CASE,n.directUrlUpdation=!0,t.isProcessAction||await yD(r,{translatedDXAPIResponse:s,actionInPayload:t},n,a,o)},PD=async(e,t,n,s,r)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===Gs.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:a}=t;qy(tA(a))||lS.setIn(e.data,["context_data","caseViewMode"],e.caseViewMode);const o=ZI.getPropertiesToReplace(a);r.push(zS(MS,{...e,...s,propertiesToReplace:o})),lS.setIn(e,"acName",s.target),await dI(n,e),((e,t,n)=>{const{containerItemID:s}=t,r=ky(s),{data:a,caseViewMode:o}=n;if(r&&Wm(s)){const n=tr(r),i={data:a,caseViewMode:o,context:n};lS.setIn(i.data,["context_data","caseViewMode"],o),e.push({type:ya,payload:{context:n}});const c=ZI.getPropertiesToReplace(s);e.push(zS(AS,i,{propertiesToReplace:c})),t.shouldUpdateCaseActionsInParentContext=!0,t.__deferCaseActionsPayload=t}})(r,t,e)},OD=async(e,t,n,s,r,a,o,i,c,l={})=>{const{isCaseWideAction:u,isInCreateStage:d,containerItemID:p}=e,g=Ks(e.context),h=jm(r,c),f=c?Fg(r):Vm(r),m=d&&!h&&!u,I=Gy(g)[0],E=I?Fy(I):g,y=bm(p),A=ky(p),C=Object.freeze({target:e.target,containerItemID:p,context:A,containerName:y});m&&!CD(e.context)?await DD(i,e,t,r,a,c,l):SD(e.context,E)?await TD(E,t,g,e,a,n,s,r,o,c):!u&&!c||SD(e.context,E)?await PD(t,e,r,C,a):(ID(a,e),((e,t,n)=>{const{containerItemID:s,caseID:r}=t;if(s&&/^app\/preview_[0-9]*/g.test(s)){const{caseClassName:t}=n,a=Ks(s),o=ky(a);e.push(zS(SS,{containerItemID:a,context:o,container:Cy.PREVIEW,containerName:Cy.PREVIEW,caseId:r,viewName:$s.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(a,e,{caseClassName:f}))},RD=(e,t,n)=>{const{isModalAction:s,isCaseWideAction:r,caseID:a}=t,o=SD(t.context,n),i=e?.data?.caseInfo?.stages,c=e?.data?.caseInfo?.stageID;vf({caseID:a,isModalAction:s,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:r,stages:i,stageID:c})},bD=e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[Gs.ERROR_FIELD_IN_PAGE]=e[Gs.ERROR_FIELD_IN_PAGE].replace(/(\(\d+\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[Gs.ERROR_FIELD_IN_PAGE].slice(1),s=e[Gs.ERROR_IN_PAGE_IDENTIFIER],r=s.startsWith(".")?s.slice(1):s;if(r){let a=t?`caseInfo.content.${t}`:"caseInfo.content";a=Gs.getProperty(a.replace(/\(/g,"[").replace(/\)/g,"]"));const o=od(r,a,Gs.PROPERTY),i={type:$s.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};rd.mutateField(n,a,o[o.length-1],{messages:[i],type:$s.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:s})}}))},vD=e=>{const t=zC("app")?.pyPortal?.pyPrimaryNavPages,n=Array.isArray(t)?t[0]:null;return n?(LI.clearChangedProperties(e),[{type:ir,payload:{className:n.pyClassName,containerName:Gs.PRIMARY,context:Gs.APP.APP,pageReference:"pyPortal",viewName:n.pyRuleName,skipSemanticUrl:""}}]):[]},xD=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Gs.MODAL:t||wg.getTargetViewContainerName(ja)},wD=e=>e?.uiResources?.root?.config?.name===ks.getDefaultQualifiedName("pzCreateDetails")||!1,MD=(e,t)=>{const n=wD(e),{skipBrowserSemanticUrlUpdate:s=!1}=t;lS.setIn(e,["directUrlUpdation"],!n&&!s)},LD=e=>e.confirmationNote?Gs.REVIEW_MODE:Gs.PERFORM_MODE,UD=(e,t)=>{let n;return n=!e.renderInline&&!xA.getDefaultCasePage()&&wD(t),n},FD=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Gs.MODAL:t||wg.getTargetViewContainerName($a)},VD=(e,t)=>{const{class:n,context:s,viewType:r=oI.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:xA.getDefaultCasePage();return ju(rg.createCase(n,{...e,pageName:o,viewType:r,context:s,retrieveActionViewForNewObject:!0})).pipe(sh((({response:t,headers:n})=>(Bs.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Ih("Error occurred during ajax call at createObject Epic : ",s))},jD="CREATE_EXTERNAL_CASE",kD=e=>{let t=0,n=[],s=!1;return e.pipe(hh(jD),Eh(100),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const{context:n}=e,r=FD(e),a=Wa(r,n);return s=!1,ju(cD(a,{loadingContext:n})).pipe(rh((({continueExecution:n,removeActionPayload:r,dirtyCheckPerformed:a})=>n?(s=a,VD(e,{removeActionPayload:r})):(vg.rejectActionByID(t),fh))))})),rh((async e=>{if(e&&e.type===br)return e.payload.context=EA(),n.push(fI(e)),n;const{actionInPayload:r,response:a,headers:o,removeActionPayload:i}=e,c=UD(r,a);lS.setIn(a.data,Gs.getProperty(Gs.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const l=FD({...r,isInCreateStage:c}),u=Wa(l,r.context),d=EI(u,l,r.context);if(!s&&!xm(l)&&qy(u)){const{continueExecution:e}=await CI(u,{loadingContext:r.context});if(!e)return vg.rejectActionByID(t),n}const p=um(a);let g=u_(wa,{caseClassName:Vm(p)});g=g.replace(/{.+?}/,String(Fm(km(p)))),p.semanticURL=g,MD(p,r);const h={acName:u,context:d};await dI(p,r,h);const f={target:u,context:d,headers:o,semanticURL:g,caseViewMode:LD(p),containerItemID:d,isInCreateStage:c,isMinimizable:c,assignmentContext:lS.getIn(p,oD),nextAssignmentInfo:lS.getIn(p,aD),resourceType:$s.RESOURCE_TYPES.CASE,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalCaseCreationFlow:!0};Hm(f,p);const m=uI(p,f),I=mI(u,m);return yI(I)&&$m(n,{removeActionPayload:i,target:u}),n.push(I),PI(n),n})),sh((()=>(bI(n),zm(n,t),n=[],n))))},{RESOURCE_TYPES:BD}=$s,$D=(e,t={})=>{const{viewType:n,containerName:s,targetContainerName:r,isChild:a}=e,o=Um(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?oI.PAGE:n||(!vm(s)&&!vm(r)||a?oI.PAGE:oI.FORM)},GD=(e,t,n,s,r)=>{if($m(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=Fy(t);let s=null;return n&&(s=Dy(t,n)),s?.key===e&&zy(t)})(s.key,n))s.context=By(n),s.containerItemID=s.context,e.push(zS(GS,s));else if((r?.isChild||r?.isRemote)&&r?.isMultiDoc){const t=tA(r.context);s.target=t,s.context=r.context,s.containerItemID=r.context,e.push(zS(GS,s))}else{const t=tA(s.context),n=xy(t,s.key);n?(s.target=t,s.context=n,s.containerItemID=n,e.push(zS(GS,s))):e.push(zS(OS,s))}},WD=(e,t,n,s,r,a,o)=>{qy(t)&&Yy(t)?((e,t,n,s,r)=>{$D(e,t)===oI.FORM?(n.caseViewMode=s||Gs.PERFORM_MODE,r.push(zS(MS,n))):r.push(zS(GS,n))})(s,r,e,a,n):GD(n,o,t,e,s)},HD=(e,t,n)=>{if(!(e&&t&&(e=>{const{inlineViewType:t,caseTypeID:n,RedirectURL:s}=e;if(t&&t.toLowerCase().includes("remote"))return!1;const r=qs.getRemoteCaseClassBySourceClass(n)??n;return!qs.isRemoteCase(r)&&!!s})(t)&&t.RedirectURL))return!1;try{const e=new URL(t.RedirectURL);if("https:"===e.protocol)return globalThis.open(e.href,"_blank","noopener,noreferrer"),vg.resolveActionByID(n),!0}catch{}return!1},qD=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:s,context:r,isGetNextWork:a,doNotMergeMessagesForStatusCode:o})=>{const i=ZI.appendExcludeQueryParamToUrl(e);return Kd(i,{method:t,headers:{"if-match":n&&n.etag,...n,...s&&{...Vd.addDebugHeaders(s)}}},r,{doNotMergeHttpMessagesForStatusCode:a?o:""})},zD=(e,t)=>{const n=$D(e),{headers:s,context:r,assignmentID:a,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e;let g,h;({restApi:g,reqType:h}=o?p_("getNextWork",{viewType:n}):c?p_("openStage",{caseID:u,stageID:l}):p_(ea,{assignmentID:a,viewType:n}));const{removeActionPayload:f}=t,m=xA.getDefaultCasePage();let I="",E=e.pageName;e.isTraditionalUICase&&(E=ks.getDefaultQualifiedName("pyDetails")),I=m?`${g}?viewType=${n}&pageName=${m}`:E?`${g}?viewType=${n}&pageName=${E}`:`${g}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{I+=`&${e}=${d[e]}`}));const y=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=cI(t,e.remoteClassName)),t})(e);return ju(qD({restUrl:I,reqType:h,requestHeaders:y,debugInfo:i,context:r,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"})).pipe(sh((e=>{if(xA.isCoexistenceAppOfType(Gs.APP_TYPE.UIKIT)&&!p){return tE(e.data.data.caseInfo)?e:(I=E?I.replaceAll(E,ks.getDefaultQualifiedName("pyDetails")):I,xA.setDefaultCasePage(ks.getDefaultQualifiedName("pyDetails")),{isReloadWithDifferentViewTypeRequired:!0,restUrl:I})}return e})),rh((e=>e?.isReloadWithDifferentViewTypeRequired?qD({restUrl:I,reqType:h,requestHeaders:y,debugInfo:i,context:r,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404"}):ih(e))),sh((t=>{const{key:r,flowName:o}=gI(a);return Bs.analyseResponse(t),{response:{...t.data,key:r,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:cI({...s,...t.headers})}})),Ih("Error occurred during ajax call at openAssignment Epic : ",r))},{RESOURCE_TYPES:YD}=$s,KD=e=>{const t="Browser"===xA.getRuntime();let n=0,s=[];const r=[];let a=!1,o=!1;return e.pipe(hh(Hg),sh((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),rh((e=>{a=e.isGetNextWork;const{context:t}=e;let s;s=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?oI.FORM:$D(e),e.viewType=s;const r=Rm(ea,e),i=Wa(r,t),{activate:c,activateContainerActionPayload:l}=_I(YD.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return ih({type:$r,activateContainerActionPayload:l,actionInPayload:e});const u=Fy(i);let d;return d=l?.isParallelAssignment?Promise.resolve({continueExecution:!0,removeActionPayload:{}}):u?CI(i,{loadingContext:t}):Promise.resolve({continueExecution:!0,removeActionPayload:{}}),ju(d).pipe(rh((({continueExecution:t,removeActionPayload:s})=>t?(o=Ym(e.className),e.isTraditionalUICase=o,xA.isWSSPortal()&&(e.headers={...e.headers,[Gs.X_ORIGIN_CHANNEL]:"WSS"}),zD(e,{removeActionPayload:s})):(vg.rejectActionByID(n),fh))))})),rh((async e=>{if(e?.type===br){if(a){const{payload:t}=e,{err:n}=t,s=n.response.status;r.push({status:Number(s)})}return s.push(fI(e)),s}const{type:t,actionInPayload:i,response:c,viewType:l,headers:u,removeActionPayload:d,activateContainerActionPayload:p}=e;if("openStage"===c?.redirectInfo?.jsAction){const e=c?.redirectInfo?.stageID,t=Hg,n=c?.data?.caseInfo?.ID;i.isOpenStage=!0,i.stageID=e,i.jsActionQueryParams=c?.redirectInfo?.jsActionQueryParams;const r={type:t,payload:{...i,caseID:n,headers:u}};return s.push(r),s}if(HD(a,c?.data?.caseInfo,n))return s;const{context:g,caseViewMode:h,debugInfo:f}=i,m=c?.data?.caseInfo?.assignments?.find((e=>e.ID===i.assignmentID));i.caseViewMode=((e,t)=>e&&"false"===String(e.canPerform)?Gs.REVIEW_MODE:t??Gs.PERFORM_MODE)(m,h);const I=c?.data?.caseInfo?.caseTypeID;o=Ym(I),i.isTraditionalUICase=o;let E=((e,t)=>{const n=Um(e);let s;s=!xA.getDefaultCasePage()&&tE(n);const{isChild:r,containerName:a,isTraditionalUICase:o}=t,i=r&&s,c=s&&!t.isActionFromToDoList;return!i&&!c||o||t.renderInline?a||Rm(ea,t):Gs.MODAL})(c,i);o&&(E=i.containerName??E);const y=Wa(E,g);if(t===$r)return await(async(e,t,n)=>{const{semanticURL:s,containerItemID:r,isParallelAssignment:a,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=ky(r);await dI({directUrlUpdation:!l,semanticURL:s},c,{acName:i,target:i,context:u}),e.push(zS(VS,{containerItemID:r,target:i,isParallelAssignment:a,insKey:o,resourceType:BD.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(s,p,{actionInPayload:i,target:y}),s;const A=c?.data?.caseInfo?.content,C=c?.data?.caseInfo?.ID,S=c?.uiResources?.root?.config?.name,_=c?.uiResources?.root?.config?.context;A&&!A[ks.getDefaultQualifiedName("pyViewName")]&&S&&"page"!==i.viewType&&(lS.setIn(A,ks.getDefaultQualifiedName("pyViewName"),S),lS.setIn(A,ks.getDefaultQualifiedName("pyViewContext"),_));const N=um(c);((e,t)=>{const n=Um(e),s=km(e),r=tE(n),{skipBrowserSemanticUrlUpdate:a=!1,viewType:o,isTraditionalUICase:i}=t,c=i&&!Km(),l=o===oI.PAGE&&(!r||c)&&!a,{caseTypeID:u}=n;if(l){const t=u_(Zr,{caseClassName:u}).replace(/{.+?}/,String(Fm(s)));e.semanticURL=t,e.directUrlUpdation=!0}})(N,i);const T=EI(y,E,g),D={...i.debugInfo,debugId:i.debugInfo?.debugId??Vd.getCoreHeadersFromContext(g)?.debugInfo?.[Gs.COREHEADER_APP_DEBUG_ID]};D.debugId&&Rg.setComponentCache(C,Vd.addDebugHeaders(D));const P={acName:y,target:y,context:T};await dI(N,i,P);const O={target:y,context:T,containerItemID:T,headers:u,parentContext:Ks(i?.context),isMinimizable:tE(lS.getIn(N,"data.caseInfo")),doDeleteCaseSummary:i.doDeleteCaseSummary,acTertiary:i.acTertiary,resourceType:$s.ASSIGNMENT,debugInfo:f,shouldUpdateCaseActionsInParentContext:!0,caseID:C};Hm(O,N,{skipFlowNameUpdate:i?.caseViewMode===Gs.REVIEW_MODE});const R=uI(N,O);var b;return II(R.data,i.remoteCaseMeta),i.isProcessAction&&(R.data.isProcessAction=i.isProcessAction),((e,t)=>{e&&(delete t.data.caseInfo.actionButtons,t.data.caseInfo.content.coexistenceAction="openAssignment")})(o,R),ZI.setTraditionalGadgetId(R.data),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(i,R),R.caseViewMode=i.caseViewMode,WD(R,y,s,i,c,h,d),((e,t)=>{if(e=qs.getRemoteCaseClassBySourceClass(e)??e,qs.isRemoteCase(e)){const{RemoteClassName:n,RemoteSystemID:s,name:r}=qs.getRemoteCase(e);if(t.headers?.RemoteSystemID||vg.setRemoteCaseHeaderByContext(t,s),qs.isTraditionalRemoteCase(e)||qs.getRemoteAppPlatformVersion(s)){t.assignmentID=t.assignments?.[0]?.ID;const s={className:e,name:r,action:Ma,remoteClassName:n};vg.setTraditionalRemoteCaseParams(t,s)}}})(I,R.data.caseInfo),l===oI.FORM&&Wm(R.containerItemID)&&(R.skipMergeAssignmentsAndActions=!1,RI(R,s,_)),eI(N,O),b={actionInContext:g,assignmentID:i.assignmentID,caseKey:R.key},Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,b),s})),sh((()=>{const e=n,t=Km(),a=tE(lS.getIn(s[0]?.payload,"data.caseInfo"));return o&&t&&a?rD.postCreateCaseMessage(s[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,qC,s):qC(s),zm(s,e,r),s[0]?.payload?.isParallelAssignment&&qC({type:Hg,payload:{...s[0].payload,isParallelCall:!0}}),s=[],s})))};const QD=(e,t)=>{const{insKey:n,headers:s,context:r,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:xA.getDefaultCasePage(),l=p_(Zr,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),u=ZI.appendExcludeQueryParamToUrl(u),ju(Kd(u,{method:d,headers:{...s,...a&&{...Vd.addDebugHeaders(a)}}},r)).pipe(sh((t=>(Bs.analyseResponse(t),{response:t.data,actionInPayload:e,headers:cI({...s,...t.headers}),removeActionPayload:i}))),Ih("Error occurred during ajax call at openWorkByHandle Epic : ",r))},JD="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:XD}=$s,ZD=async(e,t,n)=>{const s=t?.containerItemID||null,r=s&&Gy(s)[0]?Fy(Gy(s)[0]):s,a=r||s,o=ky(a)||a,i=tA(o)||tA(a),c=o?tI(o):void 0,l=r?zC(r)?.caseInfo?.ID:void 0,u=e?.insKey;if(!(o&&a&&c===Gs.REVIEW_MODE&&r!==s&&l&&u&&l===u))return;let d;try{d=await(p=QD({...e,context:o,viewType:"none"},{removeActionPayload:void 0}),h="object"==typeof g,new Promise((function(e,t){var n=new gu({next:function(t){e(t),n.unsubscribe()},error:t,complete:function(){h?e(g.defaultValue):t(new Ll)}});p.subscribe(n)})))}catch(e){return}var p,g,h;if(!d||Mm(d.type))return;const f=um(d.response),m=[{path:Gs.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}],I={...f?.data,caseInfo:{...f?.data?.caseInfo??{},assignments:f?.data?.caseInfo?.assignments??[]}};n.push(zS(GS,{containerItemID:a,target:i,context:o,data:I,caseViewMode:Gs.REVIEW_MODE,isArrayDeepMerge:!0,propertiesToReplace:m}))},eP=async(e,t,n)=>{const{actionInPayload:s,activateContainerActionPayload:r,type:a,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=s,p=Rm(Zr,s),g=Wa(p,l);if(wm(a))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:s},actionInPayload:r,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Rm(Zr,r),l=Wa(c,a),u=ky(s);await dI({directUrlUpdation:!o,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u}),e.push(zS(VS,{containerItemID:s,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:r,actionInPayload:s}),await ZD(s,r,t);else{const r=EI(g,p,l,{buildNew:!0}),a=um(o),h=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:s}=t,r=km(e),a=n?s:Vm(e);let o=u_(Zr,{caseClassName:a},{id:t?.insKey});return o=o?.replace("{workID}",String(Fm(r)))?.replace("{id}",t?.insKey),o})(a,s);a.semanticURL=h,a.directUrlUpdation=!u;const f={acName:g,context:r};await dI(a,s,f);const m=uI(a,{target:g,context:r,containerItemID:r,semanticURL:h,headers:c,debugInfo:d});m.caseViewMode=Gs.REVIEW_MODE,m.resourceType=XD.CASE,II(m.data,s.remoteCaseMeta),n&&(m.data.caseInfo.content.coexistenceAction="openWorkByHandle",m.data.caseID=m.data.caseInfo.ID),ZI.setTraditionalGadgetId(m.data),Hm(m,a,{skipFlowNameUpdate:!0}),m.currentCaseViewMode=tI(e?.actionInPayload?.context);const I=mI(g,m);i.containerItemID&&yI(I)&&t.push(zS(kS,{containerItemID:i.containerItemID,target:g})),t.push(I),eI(a,m)}const h=s.insKey;wf({caseKey:h,actionInContext:l})},tP=e=>{let t=0,n=[],s=!1;return e.pipe(hh(JD),sh((e=>(({actionMgrID:t,isAutoRedirection:s=!1}=e.payload),e.payload))),rh((e=>{const{context:n,isChild:r,viewType:a}=e,o=Rm(Zr,e),i=Wa(o,n);let{activate:c,activateContainerActionPayload:l}=_I(XD.CASE,i,e);const u=qy(i);if(!c&&!u&&e.insKey&&i){const t=((e,t)=>{const n=xy(e,t);if(!n)return null;const s=Dy(e,n);if(s?.resourceType!==XD.ASSIGNMENT||"string"!=typeof s?.context||""===s.context)return null;const r="string"==typeof s.semanticURL?s.semanticURL.trim():"";return r?{target:e,containerItemID:n,semanticURL:r,insKey:t}:null})(i,e.insKey);t&&(c=!0,l=t)}const d=c&&!r&&"none"!==a;return ju("none"===a||d?Promise.resolve({continueExecution:!0,removeActionPayload:void 0}):CI(i,{loadingContext:n})).pipe(rh((({continueExecution:n,removeActionPayload:r})=>n?d?(wI(l),ih({type:$r,activateContainerActionPayload:l,actionInPayload:e})):(s&&Rg.setComponentCache("redirectionInProgress",!0),QD(e,{removeActionPayload:r})):(vg.rejectActionByID(t),fh))))})),rh((async e=>{if(e&&Mm(e.type))return n.push(fI(e)),n;const t=zC(e?.actionInPayload?.context),s=Ym(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=um(e?.response),r={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ya,payload:{context:r.context,doDeleteConfirmationDetails:!1}}),s&&r.data.caseInfo?.content&&(r.data.caseInfo.content.coexistenceAction="openWorkByHandle",r.data.caseID=r.data.caseInfo.ID),II(r.data,e.actionInPayload.remoteCaseMeta),ZI.setTraditionalGadgetId(r.data),n.push(zS(AS,r));const a=tA(e?.actionInPayload?.context),o=bm(e?.actionInPayload?.context),i=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(Wm(e?.actionInPayload?.context)){const t=uI(e?.response,{...i});RI({...t,isArrayDeepMerge:!0},n)}e.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,e.actionInPayload.containerItemID=e?.actionInPayload?.context,e.actionInPayload.caseID=e?.actionInPayload?.insKey,eI(t,e?.actionInPayload)}}else await eP(e,n,s);return n})),sh((()=>(s&&Rg.setComponentCache("redirectionInProgress",!1),qC(n),zm(n,t),n=[],n))))},nP="FINISH_ASSIGNMENT",sP=(e,t)=>{const{assignmentID:n,actionID:s,caseID:r,context:a,additionalHeaders:o={},outcome:i,jsActionQueryParams:c,headers:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:s,isCaseWideAction:r}=e;return t&&s&&!r?oI.PAGE:n||oI.FORM})(e),p=(e=>{const{isCaseWideAction:t,caseTypeID:n}=e;return ZI.shouldUseUnifiedHandling()?t||ZI.isObjectCaseType(n)?ca:na:t?ca:na})(e),g={assignmentID:n,actionID:s,caseID:r,viewType:d};let{restApi:h}=p_(p,g);const{reqType:f}=p_(p,g);d&&!h?.includes("viewType=")&&(h=h?.includes("?")?`${h}&viewType=${d}`:`${h}?viewType=${d}`),i&&!h?.includes("outcome")&&(h=h?.includes("?")?`${h}&outcome=${i}`:`${h}?outcome=${i}`),h=dE(c,h),h=ZI.appendExcludeQueryParamToUrl(h),e.viewType=d;const{content:m}=lI(a),I=u.value.data[a]?.caseInfo?.headers||{},{etag:E}=I,y={"if-match":E,...l,...o};return ju(Kd(h,{method:f,body:m,headers:y},a)).pipe(sh((t=>{const{data:n,headers:s}=t;return Bs.analyseResponse(n),{response:n,actionInPayload:e,headers:cI({...y,...s})}})),Ih("Error occurred during ajax call at finishAssignment Epic : ",a))},rP=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)},aP=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.ERROR_ON_FINISH_ASSIGNMENT,e)},{RESOURCE_TYPES:oP}=$s,iP=e=>{const t=HC()?.getState()?.data,n=t?Object.keys(t).find((e=>e.includes(Gs.WORKAREA))):void 0;return/^app\/primary(_\d+)?$/.test(e)&&!n},cP=(e,t)=>{let n,s=0,r=[],a={},o="",i={},c=!1,l=!1;return e.pipe(hh(nP),rh((e=>{let u,d;const p=xA.isCoexistenceAppOfType(Gs.APP_TYPE.UIKIT);if(({actionMgrID:s}=e.payload),o=e.payload.context,dd({context:o,stateObj:zC(o),clearContextMessages:!0}),!YI(o)||md(o)){const t={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(s,!0,t),Ff.handleDeferredActionCompletion(e.payload.context).then((()=>{aP({errorType:$s.ERROR_TYPE.CLIENT})})),ih([])}return ih(e.payload).pipe(rh((e=>{Rg.setComponentCache("lastActionID",e?.actionID),mD(r,e);const n={...e};return sP(n,{state$:t})})),rh((async e=>{if(e&&e.type===br){pE(e);const t=fI(e);return r.push(t),r}Nf.clearContextedCache(o);const{headers:t,actionInPayload:g,response:h}=e,{containerItemID:f,context:m=ky(f),isModalAction:I,isInCreateStage:E}=g;c=g.isCaseWideAction,l=g.isProcessAction;const y=tA(f);g.target=y;const A=bm(f),C=Object.freeze({target:g.target,containerItemID:f,context:m,containerName:A});lS.setIn(h.data,Gs.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),lS.setIn(h.data,Gs.CASE_INFO_IS_LOCAL_ACTION,!1),h?.uiResources?.root?.config?.name&&"page"!==g.viewType&&lS.setIn(h.data,Gs.CASE_INFO.VIEW_NAME,h?.uiResources?.root?.config?.name),rP({submitResponse:h});let S=um(h,{[$s.STOPMERGEACTIONS]:!h.nextAssignmentInfo});const _=Vm(S),N=Ks(g.context),T=Gy(N)[0]?Fy(Gy(N)[0]):N,D=jm(S),P=E&&!D;!I||E||SD(g.context,T)||(S=DI(S,zC(f)));const O=uI(S,{headers:t,actionMgrID:s,directUrlUpdation:!1,isActiveWorkAreaPrimaryAndWorkareaAbsent:iP(T||"")});qm(O.data,g),O.caseClassName=_,O.resourceType=oP.ASSIGNMENT,O.headers=t;const R=S?.uiResources?.root;if("AutoClose"===R?.type){const e=HC()?.getState()?.data?.[C.context]?.caseInfo,{ID:t,name:n,content:s}=e;return r=await(async e=>{const{target:t,containerItemID:n,context:s}=e,r=By("app/primary"),a=Dy(t,n)?.parentContext,o=Boolean(t)&&zy(t),i=zy("app/primary");if(o&&a!==Gs.APP.APP){if(await nA(n,{skipDirtyCheck:!0}),0===Oy(t).length)return vD(s)}else{if(!r||!i||a)return vD(s);await nA(r,{skipDirtyCheck:!0,eventName:"Dismiss case"})}return[]})(g),b={ID:t,caseName:n,content:s,status:Um(S).status},Ad.publish(Gs.PUB_SUB_EVENTS.DISPLAY_CASE_SUBMITTED_TOASTER,b),r}var b;let v,x;const w=S?.data?.caseInfo?.assignments?.some((e=>e.ID===g.assignmentID)),M=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(S,g),L=((e,t,n,s,r)=>{let a;const o=tA(t);a=zy(o)?xy(o,n.data?.caseInfo?.ID):Fy(o);let i=!0;if(e&&a){const e=gS.getPropertyValue($s.CASE_INFO.ASSIGNMENTACTION_ID,"",a),t=gS.getPropertyValue($s.CASE_INFO.ASSIGNMENT_ID,"",a);if(e){const s=n?.data?.caseInfo?.assignments?.find((e=>e.ID===t)),r=s?.actions;r&&!r.some((t=>t?.ID===e))&&(i=!1)}}return s&&e&&i&&JC(null,Gs.CASE_VIEW_MODE_PROP,a)===Gs.PERFORM_MODE&&r})(w,T,S,I,M),U=g?.actionID===$s.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;if(S?.data?.nextAssignmentInfo&&!U)O.caseViewMode=Gs.PERFORM_MODE,v=km(S),x=!0;else if(L&&!U)S?.confirmationNote&&S?.uiResources?.root?.config?.name===Gs.PY_CONFIRM?O.caseViewMode=Gs.REVIEW_MODE:O.caseViewMode=Gs.PERFORM_MODE,v=km(S),O.flowName=" ",O.deleteAssignmentSpecificResources=!1,x=!1;else{O.caseViewMode=Gs.REVIEW_MODE,lS.setIn(O.data,"context_data.caseViewMode",Gs.REVIEW_MODE);const e=qy(tA(T)),t=(e=>{if(e){const{stageID:t,stages:n=[]}=e,s=n.length;for(let e=0;e<s;e+=1)if(n[e].ID===t)return"resolution"===n[e].transitionType}return!1})(S?.data?.caseInfo);v=!S?.confirmationNote||!t&&S?.uiResources?.root?.config?.name!==Gs.PY_CONFIRM||e?"":km(S),x=!1}const F=km(S);Hm(O,S,{skipFlowNameUpdate:O?.caseViewMode===Gs.REVIEW_MODE||L});const V=u_("createWork",{caseClassName:_}).replace(/{.+?}/,String(Fm(F)));if(S.semanticURL=V,O.semanticURL=V,I?(await OD(g,O,x,v,S,r,e,h,!1,i),P&&(a=_D(g))):E&&p&&!D?(xA.setDefaultCasePage(Gs.PY_DETAILS),await(async(e,t,n)=>{const s={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Cy.PRIMARY,targetContainerName:Cy.PRIMARY,viewType:oI.PAGE,isLastStepInCreateStage:!0,context:n},r={type:Sr,payload:{...s}};t.push(r)})(h,r,Ks(m))):await PD(O,g,S,C,r),T?.includes(Gs.ACTIONAREA)&&m===T){fy(m);const e=zC(T);r=[{type:Nr,payload:{actionID:e.caseInfo.activeActionID,context:T,containerItemID:f,target:tA(T),actionMgrID:vg.getNextActionMgrId(),containerName:Gs.ACTIONAREA,localActionType:$s.LOCAL_ACTION_TYPE.CASE_WIDE,caseID:e.caseInfo.ID}}]}if(Xm(e,r),Ff.handleDeferredActionCompletion(o).catch((()=>{})),RD(O,g,T),!S?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:s,actionID:r}=t;return{isCaseWideAction:n,caseID:km(e),assignmentID:n?null:s,actionID:r||null}})(S,g);xf({...e,containerItemID:f})}return AD(r,{transientItemID:f,target:y,isModalAction:I}),u=S,d=g,n=g,r})),sh((()=>{const t=r.find((e=>e.type===br));var p;if(t?(Ff.handleDeferredActionCompletion(o).then((()=>{aP({errorType:$s.ERROR_TYPE.SERVER})})).catch((()=>{})),bD(t),vg.rejectActionByID(s)):vg.resolveActionByID(s,a),i?.caseId&&(p=i,Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,p)),bI(r),Zm()&&u&&d&&eI(u,d.__deferCaseActionsPayload??d),!t&&(c||l)){const t=e.payload.caseID;Mf(t),(e=>{Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION,e)})({updateState:!0})}return!t&&n&&(e=>{Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_FINISH_ASSIGNMENT_DONE,e)})(n),r=[],a={},i={},r})))})))},lP="CANCEL_ASSIGNMENT",uP=e=>{const t={},{routeKey:n,isModalAction:s,caseID:r,context:a,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=p_(i,{ID:r,caseID:r,viewType:oI.PAGE}),u=Rg.getComponentCache(r),d=u&&"object"==typeof u?u:{},p=ZI.appendExcludeQueryParamToUrl(c);return ju(Kd(p,{method:l,headers:{...t,...d}},a,{includeRemoteSystemIdIfPresent:!!o})).pipe(sh((t=>(Rg.resetComponentCache(r),s?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:cI(t.headers)}))),Ih(": Error occurred during ajax call at release lock request : ",a))},dP=(e,t)=>{const{isModalAction:n}=t;return uP({routeKey:"cancelAssignment",isModalAction:n,...e})},pP=e=>{let t=0,n=[];return e.pipe(hh(lP),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const{isModalAction:n}=e;e.context||(e.context=ky(e.containerItemID));const{context:s}=e,r=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?Cy.MODAL:bm(n)})(e),a=Wa(r,s);return ju(CI(a,{loadingContext:s})).pipe(rh((({continueExecution:s})=>s?(e.RemoteSystemID=qs.getRemoteHeaderByContext(e.context)??void 0,ju(dP(e,{isModalAction:n}))):(vg.rejectActionByID(t),fh))))})),rh((e=>{if(e&&e.type===br)return n.push(fI(e)),ju([n]);const{actionInPayload:s,response:r}=e,{containerItemID:a,isModalAction:o,isInCreateStage:i}=s;r?.data.caseInfo&&(r.data.caseInfo.availableProcesses=r.data.caseInfo.availableProcesses??[]);const c=tA(a),l=ky(a),u={target:o?`${Gs.APP.APP}/${Gs.MODAL}`:c,containerItemID:a,caseViewMode:o?Gs.PERFORM_MODE:Gs.REVIEW_MODE,context:l,actionMgrID:t,key:km(r),skipReleaseLockRequest:!1};return i&&n.push(zS(MS,u)),!o&&Wm(a)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:s,referencedUsers:r,response:a}=t,o=Ks(n),i=ky(o);let c=!1;const l=a?.data?.caseInfo;l&&(c=Object.prototype.hasOwnProperty.call(l,"assignments"),l.assignments??=[]);const u={context:i,data:{...a.data,referencedUsers:r,context_data:{caseViewMode:s}}},d=[];c&&d.push({path:Gs.CASE_INFO.ASSIGNMENTS,allowMultiple:!0}),d.length>0?e.push(zS(AS,u,{propertiesToReplace:d})):e.push(zS(AS,u))})(n,{childContainerItemID:a,caseViewMode:Gs.REVIEW_MODE,referencedUsers:r?.data.referencedUsers,response:r}),u.skipReleaseLockRequest=!0,e.actionInPayload.shouldUpdateCaseActionsInParentContext=!0,eI(e?.response,e?.actionInPayload),n.push(zS(kS,u)),ju([n])})),sh((()=>(qC(n),zm(n,t),n=[],n))))},gP="NAVIGATE_TO_STEP",hP=(e,t)=>{const{ID:n,stepID:s,containerItemID:r,context:a=ky(r),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:s,viewType:o?oI.PAGE:oI.FORM},{restApi:l,reqType:u}=p_("navigateToStep",c),{content:d}=lI(a),p=i.value.data[a].caseInfo.headers,g=ZI.appendExcludeQueryParamToUrl(l);return ju(Kd(`${g}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},a)).pipe(sh((t=>({response:t.data,actionInPayload:e,headers:cI({...p,...t.headers})}))),Ih("Error occurred during ajax call at navigateToStep Epic : ",a))},{RESOURCE_TYPES:fP}=$s,mP=(e,t)=>{let n=0,s=[];return e.pipe(hh(gP),nh((e=>{let r,a;return({actionMgrID:n}=e.payload),ih(e.payload).pipe(rh((e=>(fd(e.context),hP(e,{state$:t})))),rh((async e=>{if(e&&Mm(e.type))return s.push(fI(e)),s;const{actionInPayload:t,response:n,headers:o}=e,{containerItemID:i,context:c=ky(i),isModalAction:l}=t;Nf.clearContextedCache(t.context);const u=tA(i),d=bm(i),p=Object.freeze({target:u,containerItemID:i,context:c,containerName:d}),g=n?.data?.caseInfo?.content,h=n?.uiResources?.root?.config?.name,f=n?.uiResources?.root?.config?.context;g&&!g[ks.getDefaultQualifiedName("pyViewName")]&&h&&"page"!==t.viewType&&(lS.setIn(g,ks.getDefaultQualifiedName("pyViewName"),h),lS.setIn(g,ks.getDefaultQualifiedName("pyViewContext"),f)),r=um(n);const m={acName:u,...p};await dI(r,t,m),a=uI(r,{...p,headers:o}),n?.nextAssignmentInfo||(a.caseViewMode=Gs.REVIEW_MODE),Xm(e,s),a.doDeleteCaseSummary=t.doDeleteCaseSummary,a.resourceType=fP.ASSIGNMENT,a.caseID=km(r),Hm(a,r),qm(a.data,t);const I=r.data?.caseInfo?.stages,E=r.data?.caseInfo?.stageID;if(vf({caseID:km(r),isModalAction:l,stages:I,stageID:E}),Wm(i)){const e=ZI.getPropertiesToReplace(i);RI(a,s,"",{propertiesToReplace:e})}return s.push(zS(MS,a)),a.shouldUpdateCaseActionsInParentContext=!0,s})),sh((()=>(qC(s),r&&a&&eI(r,a),zm(s,n),s=[],s))))})))},IP=e=>{const{caseID:t,context:n}=e,{restApi:s,reqType:r}=p_(ra,{ID:t});return ju(Kd(s,{method:r},n)).pipe(sh((t=>(Bs.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:cI(t.headers)}))),Ih(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},EP=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},yP=(e,t)=>{let n,s=0,r=[];return e.pipe(hh(qg),sh((e=>(({actionMgrID:s,caseType:n}=e.payload),e.payload))),rh((e=>e.ignoreCaseDeletion?ih({actionInPayload:e}):IP(e))),rh((async e=>{if(e&&Mm(e.type)){const{payload:t}=e,n=fI({...e,...t,actionMgrID:s});return r.push(n),r}const{actionInPayload:n}=e,{context:a,isModalAction:o}=n,i=o?Cy.MODAL:Cy.PRIMARY,c=Wa(i,a);if(!o&&c){const e={acName:c,target:c,context:a},s=t.value.containers[c],{semanticURL:r}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:s}=e;if(s)return e}return{semanticURL:""}})(s);await dI({directUrlUpdation:!0,semanticURL:r},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:Gs.PRIMARY,isChild:!0},t={type:Ir,payload:{...e}};r.push(t)}const l={target:c,containerItemID:a,context:a,caseDeleted:!0};return r.push(zS(kS,l)),r})),sh((()=>(qC(r),zm(r,s)===Gs.PROMISE_VALUE.RESOLVE&&EP({caseType:n}),r=[],r))))};function AP(e,t){return zl(t)?rh(e,t,1):rh(e,1)}const CP=(e,t)=>{const{assignmentID:n,actionID:s,context:r}=e,{restApi:a,reqType:o}=p_("save",{assignmentID:n,actionID:s}),{content:i}=lI(r),c=t.value.data[r]?.caseInfo?.headers,l=ZI.appendExcludeQueryParamToUrl(a);return ju(Kd(l,{method:o,body:i,headers:{"if-match":c&&c.etag}},r)).pipe(sh((t=>({response:t.data,actionInPayload:e,headers:cI(t.headers)}))),Ih(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",r))},SP=(e,t=!1)=>{const{action:n,state$:s,actionMgrID:r}=e,a=!0===n.payload.autosave;let o=[];return ih(n.payload).pipe(rh((e=>CP(e,s))),AP((e=>{if(e&&Mm(e.type))return ih(e);const{containerItemID:t}=e&&e.actionInPayload,s=Ks(t),r=tA(s),i=Ny(r),c=Gy(s)[0];let l=c?Fy(c):s;!qy(tA(l))&&({containerItemID:l}=Ty(l,e.actionInPayload.caseID,c));const u=Fy(r);n.payload.canUpdateAvailableActions&&lm(e.response);const d=qs.getRemoteHeaderByContext(e.actionInPayload.context),p={...e.actionInPayload,RemoteSystemID:null===d?void 0:d};if(l&&o.push(zS(AS,{context:l,data:{caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}})),i?.items?.[u]?.key===e?.actionInPayload?.caseID){const n={context:s,data:{...e.response.data,caseInfo:{...e.response.data?.caseInfo||{},headers:e.headers}}},r=ZI.getPropertiesToReplace(t);o.push(zS(AS,n,{propertiesToReplace:r}))}return a||o.push(zS(MS,{context:t})),Xm(e,o),uP(p)})),rh((async n=>{if(n&&Mm(n.type)){const{payload:t}=n,s=fI({...n,...t,actionMgrID:r});o.push(s);const a=e.action.payload.modalLoadingContainer;if(a){const e=a.context,{context_data:t}=zC(e)||{};t?.isLoading&&nA(e)}return o}const{actionInPayload:s,response:i}=n,{context:c,containerName:l}=s,u={target:Wa(l,c),containerItemID:c,context:c};return s.shouldUpdateCaseActionsInParentContext=!0,eI(i,s),t||a||o.push(zS(kS,u)),o})),sh((()=>{var e;return qC(o),zm(o,r),a||(e={context:n.payload.context,assignmentID:n.payload.assignmentID},Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.SAVE_ASSIGNMENT_COMPLETE,e)),t||(o=[]),Ff.isDeferredActionInProgress(n.payload.context)&&Ff.handleDeferredActionCompletion(n.payload.context),o})))},_P=(e,t)=>{let n,s=0;return e.pipe(hh(zg),nh((e=>{const{saveOnly:r}=e.payload;({actionMgrID:s,caseType:n}=e.payload);return SP({action:e,state$:t,actionMgrID:s,caseType:n},r)})))},NP=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",Ad.unsubscribe(Gs.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,s="expressLocalActionSubmit",Ad.subscribe(Gs.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,s)}var n,s},{LOCAL_ACTION_TYPE:TP}=Gs,{RESOURCE_TYPES:DP}=$s,PP=(e,t)=>{const{actionID:n,assignmentID:s,caseID:r,context:a,openActionType:o,modalLoadingContainer:i,headers:c}=e,{isProcessAction:l}=t,u=l?oa:(e=>{const t=e.localActionType?.toLowerCase();return t===TP.CASE_WIDE||t===TP.EXPRESS||t&&e.isPromotedAction?ia:aa})(e),d=oI.FORM,{reqType:p}=p_(u,{caseID:r,ID:s,actionID:n,viewType:d});let{restApi:g}=p_(u,{caseID:r,ID:s,actionID:n,viewType:d});e.actionType=u===ia?Gs.CASE:Gs.ASSIGNMENT,g&&!g.includes("viewType=")&&(g=g.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),g=ZI.appendExcludeQueryParamToUrl(g);const h=i?.context??a;return ju(Kd(g,{method:p,headers:c},h)).pipe(sh((t=>({response:t.data,actionInPayload:e,headers:cI(t.headers,"",e.headers)}))),Ih(`: Error occurred during ajax call at ${o} Epic : `,h))},OP=(e,t)=>{const{isProcessAction:n}=t,s=n?oa:aa;e.openActionType=s;let r;if("modal"===Rm(s,e)){if(!Cd.isOnline()||e.isAppOffline)return vg.rejectActionByID(e.actionMgrID),Promise.resolve();r=Gy(e.contextName)[0]?Gy(e.contextName)[0]:tA(e.contextName);const n=r?Fy(r):e.contextName,s=ky(n),a=Rm(e.openActionType,e),o=Wa(a,e.context),i=er(e.context,Qs(a,e.context));if(qC(OS({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:Gs.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:Gs.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}},headers:{...e.headers}})),qC(LS({context:i})),e.modalLoadingContainer={target:o,context:i},!Gy(e.contextName)[0])return PP(e,t);if(!e.continueExecution)return PP(e,t);if(!gy(s))return PP(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return ju([Yg(e.saveActionPayload)]).pipe(rh((e=>(e=>{let t,n=0;const s=[],r={value:HC()?.getState()};return ih(e).pipe(hh(zg),nh((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!a){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(n,!0,e),ih([])}return SP({action:e,state$:r,actionMgrID:n,caseType:t,actionsOut:s},!0)})))})(e))),rh((n=>1===n.length&&Mm(n[0].type)?ju(CI(r,{loadingContext:e.context})).pipe(rh((({continueExecution:n})=>n?PP(e,t):(vg.rejectActionByID(e.actionMgrID),fh)))):PP(e,t))),sh((e=>e)))}return PP(e,t)},RP=async(e,t,{headers:n,actionInPayload:s})=>{const{context:r,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c,skipMergeAssignmentsAndActions:l}=s,u=um(e),d=Rm(o,s),p=c?.target??Wa(d,r);let g,h,f=!1;!Yy(p)||zy(p)&&!by(p,e.data.caseInfo.ID)?(h=Qs(d,r),xm(d)&&(h=er(r,h)),g=h,f=!0):(g=zy(p)?xy(p,e.data.caseInfo.ID):Fy(p),h=ky(g));const m={acName:p,target:p,containerName:d,context:h};await dI(u,s,m),(void 0===u?.data?.caseInfo?.content||void 0!==u.data.caseInfo.content&&"object"==typeof u.data.caseInfo.content&&0===Object.keys(u.data.caseInfo.content).length)&&delete u.data?.caseMessages;const I=u.uiResources?.root;let E;E=I?Gs.PERFORM_MODE:Gs.REVIEW_MODE;const y=uI(u,{target:p,context:h,containerItemID:g,caseViewMode:E,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:xm(d),resourceType:DP.ASSIGNMENT,isProcessAction:s.isProcessAction,showProgress:s.showProgress,progressMessage:s.progressMessage,assignmentID:s.assignmentID,actionType:s.actionType,skipMergeAssignmentsAndActions:l});let A;if(I&&Hm(y,u),xm(d)&&delete y.doDeleteCaseSummary,s.openActionType===la&&(y.isBulkAction=!0,y.data.caseInfo.actionButtons.main[0].jsAction="async"===s.runningMode?"submitBulkActionAsync":"submitBulkAction",y.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",y.data.caseInfo.cases=s.selectedList,y.data.caseInfo.isAssignment=s.isAssignment),A=f?OS:s.isProcessAction||(e=>e.containerItemID?.includes(Gs.ACTIONAREA)&&e.context?.includes(Gs.ACTIONAREA))(s)?GS:MS,y.data.context_data.isProcessAction=s.isProcessAction,t.push(zS(A,y)),f||t.push(zS(US,y)),f){const r=Gy(s.contextName),a=xy(r,e.data.caseInfo.ID);if(a){const e={data:{caseInfo:{headers:n}},context:a};t.push(zS(AS,e))}}g!==Fy(p)&&t.push(zS(VS,{target:p,containerItemID:g})),Wm(g)&&!c?.context&&RI(y,t);const C="other"===y.nextAssignmentInfo?.context;!s.isProcessAction||Ym(y.nextAssignmentInfo?.className)||C||Xm({response:u,actionInPayload:{...s,containerItemID:g}},t),y.caseViewMode===Gs.REVIEW_MODE&&t.push(zS(kS,y)),y.shouldUpdateCaseActionsInParentContext=!0;return lS.getIn(e.data,["caseInfo","isLocalAction"])||eI(u,y),t},bP="OPEN_LOCAL_ACTION",vP=(e,t)=>OP(e,t),xP=e=>{let t=0,n=[];return e.pipe(hh(bP),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),ph((()=>!nI(t))),rh((e=>vP(e,{actionMgrID:t}))),rh((async e=>{if(!e)return fh;if(Mm(e.type)){const t=fI(e);n.push(t);const{context_data:s}=zC(e.payload.context)||{};return s?.isLoading&&n.push(zS(US,e.payload)),n}const{actionInPayload:t,headers:s,response:r}=e,{actionID:a}=t;lS.setIn(r,"data.caseInfo.activeActionID",a);return(e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,e)})(lS.getIn(r,"data.caseInfo.ID")),lS.setIn(r.data,Gs.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&lS.setIn(r.data,Gs.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await RP(r,n,{headers:s,actionInPayload:t}),NP(t),n})),sh((()=>(qC(n),zm(n,t),n=[],n))))},wP=e=>{const{actionID:t,context:n,openActionType:s,caseTypeID:r,bulkContextID:a="",bulkContextType:o=""}=e,i=la,{reqType:c,restApi:l}=p_(i,{caseTypeID:r,actionID:t,bulkContextID:a,bulkContextType:o});return ju(Kd(l,{method:c},n)).pipe(sh((t=>({response:t.data,actionInPayload:e,headers:cI(t.headers)}))),Ih(`: Error occurred during ajax call at ${s} Epic : `,n))},MP=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",Ad.unsubscribe(Gs.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,s="bulkActionSubmit",Ad.subscribe(Gs.PUB_SUB_EVENTS.EVENT_BULKACTION,n,s)}var n,s},LP="OPEN_BULK_ACTION",UP=e=>{let t=0,n=[];return e.pipe(hh(LP),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>((e,t)=>{const{context:n}=e,{actionMgrID:s}=t;e.openActionType=la;const r=Rm(la,e),a=Wa(r,n);return ju(CI(a,{loadingContext:n})).pipe(rh((({continueExecution:t})=>t?wP(e):(vg.rejectActionByID(s),fh))))})(e,{actionMgrID:t}))),rh((async e=>{if(e&&Mm(e.type??"")){const t=fI(e);return n.push(t),n}const{actionInPayload:t,headers:s,response:r}=e,{actionID:a}=t;return lS.setIn(r,"data.caseInfo.activeActionID",a),await RP(r,n,{headers:s,actionInPayload:t}),MP(t),n})),sh((()=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t),qC(n),n=[],n))))};var FP=Array.isArray,VP=Object.getPrototypeOf,jP=Object.prototype,kP=Object.keys;function BP(e){if(1===e.length){var t=e[0];if(FP(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&VP(s)===jP){var n=kP(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var s;return{args:e,keys:null}}var $P=Array.isArray;function GP(e){return sh((function(t){return function(e,t){return $P(t)?e.apply(void 0,$l([],Bl(t))):e(t)}(e,t)}))}function WP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return zl(oh(e))?e.pop():void 0}(e),s=BP(e),r=s.args,a=s.keys,o=new Au((function(e){var t=r.length;if(t)for(var n=new Array(t),s=t,o=t,i=function(t){var i=!1;Ru(r[t]).subscribe(wu(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return s--}),void 0,(function(){s&&i||(o||e.next(a?function(e,t){return e.reduce((function(e,n,s){return e[n]=t[s],e}),{})}(a,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(GP(n)):o}const HP=e=>{const{actionID:t,context:n,cases:s,classID:r,isAssignment:a}=e,{content:o}=lI(n,{nonEmptyAndChangedData:!0});let i=5;try{const e=Qf.getSharedState(ks.getQualifiedNameForComplexRuleReferences("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults"));e?.find((e=>e[ks.getDefaultQualifiedName("pyClassName")]===r))?.pyList.split(",").includes(t)&&(i=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const c=s.map((e=>({ID:e}))),l=c.length/i,u=a?"performAssignmentBulkAction":ua,{reqType:d,restApi:p}=p_(u,{actionID:t}),g=[],h=c.length;for(let t=0;t<h;t+=l){const s=c.slice(t,t+l);a?o.assignments=s:o.cases=s,s.length&&g.push(ju(Kd(p,{method:d,body:o},n)).pipe(sh((t=>{const{data:n,headers:s}=t;return{response:n,actionInPayload:e,headers:cI({...s})}})),Ih("Error occurred during ajax call at submitbulkaction Epic : ",n)))}return WP(g)},qP=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},zP="SUBMIT_BULK_ACTION",YP=e=>{let t,n=0,s=[],r="";return e.pipe(hh(zP),nh((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(n,!0,e),ih([])}return ih(e.payload).pipe(rh((e=>(t=e,HP(t)))),rh((e=>{let n=0,a=0;const o=[],{containerItemID:i,context:c}=t;return e.forEach((e=>{const{response:t}=e;n+=Number(t.successCount),a+=Number(t.failureCount),a&&t.results.forEach((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),r=`${n} record(s) updated`,qP({submitResponse:e}),t.target="HYBRID"===xA.getRenderingMode()?tA(i):`${Gs.APP.APP}/${Cy.MODAL}`,s.push(zS(kS,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),a&&s.push(zS(jS,{messages:[{type:"error",message:1===a?"1 record failed to update":`${a} records failed to update`,errorDetails:o,showHeader:!1}],context:Ks(c)||c,category:"HTTP",showHeader:!1})),s})),sh((()=>(vg.resolveActionByID(n,r),qC(s),s=[],s))))})))},KP=e=>{const{actionID:t,context:n,cases:s}=e,{content:r}=lI(n,{nonEmptyAndChangedData:!0});r.cases=s.map((e=>({ID:e})));const a=ua,{reqType:o,restApi:i}=p_(a,{actionID:t,runningMode:"async"});return ju(Kd(i,{method:o,body:r},n)).pipe(sh((t=>{const{data:n,headers:s}=t;return{response:n,actionInPayload:e,headers:cI({...s})}})),Ih("Error occurred during ajax call at submitbulkactionasync Epic : ",n))},QP=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},JP="SUBMIT_BULK_ACTION_ASYNC",XP=e=>{let t,n=0,s=[],r={};return e.pipe(hh(JP),nh((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(n,!0,e),ih([])}return ih(e.payload).pipe(nh((e=>(t=e,KP(t)))),sh((e=>{const{containerItemID:n,context:a}=t,{response:o}=e;return r={caseID:o.caseID,caseTypeID:"BackgroundJob"},QP({submitResponse:o}),t.target=`${Gs.APP.APP}/${Cy.MODAL}`,s.push(zS(kS,{containerItemID:n,context:a,target:t.target,skipReleaseLockRequest:!0})),s})),sh((()=>(vg.resolveActionByID(n,r),qC(s),s=[],s))))})))},ZP=(e,t)=>OP(e,t),eO=e=>{let t=0,n=[];return e.pipe(hh(Wg),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const n=Rm(oa,e),s=Wa(n,e.context);return ju(CI(s,{loadingContext:e.context})).pipe(rh((({continueExecution:n})=>n?(fd(e.context),ZP(e,{actionMgrID:t,isProcessAction:!0})):(vg.rejectActionByID(e.actionMgrID),fh))))})),rh((async e=>{if(e&&Mm(e.type)){const t=fI(e);return n.push(t),n}const{actionInPayload:t,headers:s,response:r}=e;return await RP(r,n,{headers:s,actionInPayload:t}),n})),sh((()=>(bI(n),zm(n,t),n=[],n))))},tO=e=>{let t=0,n=[];return e.pipe(hh(Mr,Hr),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const{containerItemID:t,caseID:n,context:s,caseDeleted:r,skipReleaseLockRequest:a,currentCaseViewMode:o,isProcessAction:i,isInCreateStage:c,deleteWork:l}=e,u=o===Gs.PERFORM_MODE,d=n&&u;return l?ih([]):i&&c?uP(e):t!==s||r||a||!d?t?.includes(Gs.MODAL)&&tI(NA(t))===Gs.REVIEW_MODE?uP(e):ih([]):uP(e)})),rh((e=>(e&&Mm(e.type)&&n.push(fI(e)),n))),sh((()=>(qC(n),zm(n,t),n=[],n))))};var nO=function(e){function t(t,n){return e.call(this)||this}return Fl(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Jl),sO={setInterval:function(e,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var r=sO.delegate;return(null==r?void 0:r.setInterval)?r.setInterval.apply(r,$l([e,t],Bl(n))):setInterval.apply(void 0,$l([e,t],Bl(n)))},clearInterval:function(e){var t=sO.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},rO=function(e){function t(t,n){var s=e.call(this,t,n)||this;return s.scheduler=t,s.work=n,s.pending=!1,s}return Fl(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var s=this.id,r=this.scheduler;return null!=s&&(this.id=this.recycleAsyncId(r,s,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),sO.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&sO.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,s=!1;try{this.work(e)}catch(e){s=!0,n=e||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,s=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ql(s,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(nO),aO={now:function(){return(aO.delegate||Date).now()},delegate:void 0},oO=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=aO.now,e}(),iO=new(function(e){function t(t,n){void 0===n&&(n=oO.now);var s=e.call(this,t,n)||this;return s.actions=[],s._active=!1,s}return Fl(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(oO))(rO),cO=iO;function lO(e,t,n){void 0===e&&(e=0),void 0===n&&(n=cO);var s=-1;return null!=t&&(ah(t)?n=t:s=t),new Au((function(t){var r,a=(r=e)instanceof Date&&!isNaN(r)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=s?this.schedule(void 0,s):t.complete())}),a)}))}function uO(e,t){return void 0===e&&(e=0),void 0===t&&(t=iO),e<0&&(e=0),lO(e,e,t)}function dO(e){return xu((function(t,n){var s=!1,r=null,a=null,o=function(){if(null==a||a.unsubscribe(),a=null,s){s=!1;var e=r;r=null,n.next(e)}};t.subscribe(wu(n,(function(t){null==a||a.unsubscribe(),s=!0,r=t,a=wu(n,o,ru),Ru(e(t)).subscribe(a)}),(function(){o(),n.complete()}),void 0,(function(){r=a=null})))}))}const pO=(e,t,n,s,r)=>{if(r!==Gs.RESOURCE_STATUS.CREATE)return;UI.isStateMachineExist(e,t,n)||UI.setStateMachine(e,n,t,new hp(n,t,e));UI.getStateMachine(e,t,n).insert({},"string"==typeof s?s:s+1,!0,{isDefault:!0})},gO=(e,t,n,s,r)=>{"string"==typeof t&&e.data?.caseInfo?.content&&n&&("CREATE"===s||"UPDATE"===s)&&(e.data.caseInfo.content[r][t][n]=t)},hO=e=>{const t=!e.isLocalAction&&e.editType===Gs.ACTION;return{...t?{}:{activeActionID:e.actionID},assignments:[{ID:e.assignmentID,...t?{actions:[{ID:e.actionID}]}:{}}]}},fO=e=>{let t=0,n=[],s="";return e.pipe(hh(Oa),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>YT(e))),rh((async e=>{if(e&&e.type===br)return n.push(fI(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:r,headers:a}=e,o=t.containerName,i=Wa(o,t.context);let c=EI(i,o,t.context);c=er(t.context,c);const{pageReference:l,targetProperty:u,index:d,subscriptFieldName:p,pageGroupName:g,actionType:h,isPageGroup:f}=t,m=l?.startsWith($s.OBJECT_INFO.OBJECT_INFO);let I=null;m?(I=Bs.transformCaseData(r),I.uiResources.root.config.context=`${l}${u}[${d}]`):I=r;const E=um(I);E.key=t.ID,E.data?.caseInfo?(E.data.caseInfo.ID=t.ID,gO(E,d,p,h,g)):E.data?.objectInfo&&(E.data.objectInfo.ID=t.ID);const{interestPageActionID:y,editType:A,isLocalAction:C,actionID:S}=t,_={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage,interestPageActionID:y,editType:A,isLocalAction:C,actionID:S};E.uiResources.context_data.modalView=_;const N=zC(t.context)?.context_data?.caseInfo,T=`${t.pageReference}${t.targetProperty}`,D=id(N,T,t.index);E.uiResources.context_data.caseInfo={...E.uiResources.context_data.caseInfo,content:lS.mergeDeep(E.uiResources.context_data.caseInfo?.content,D?.content)};const P=gS.getProperty(Gs.CASE_INFO.REMOTESYSTEMID,"",t.context),O={acName:i,context:c};await dI(E,t,O);const R={target:i,context:c,containerItemID:c,headers:a,index:d,subscriptFieldName:p,pageGroupName:g,isPageGroup:f};P&&(R.headers={...R.headers,RemoteSystemID:P});const b=uI(E,R);b.resourceStatus=t.actionType,b.isMultiRecordData=!0,b.readOnly=t.readOnly,b.parentContext=t.context,b.heading=t.heading,b.data.caseInfo&&A===Gs.ACTION&&(b.data.caseInfo={...b.data.caseInfo,...hO(t),isLocalAction:t.isLocalAction}),b.clearStateMachine=!1;const v=mI(i,b);s=c,n.push(v);let x={changedListProperty:[],leafProperty:[]};return A===Gs.ACTION&&(UI.registerForServerChanges(),x=BC.getServerProperties(b.data,c)),{actionsOut:n,actionInPayload:t,serverProps:x}})),sh((({actionInPayload:e,serverProps:r={changedListProperty:[],leafProperty:[]}})=>{if(Lm(n)?vg.rejectActionByID(t):vg.resolveActionByID(t),e.skipPageInstructions||pO(s,e.pageReference,e.targetProperty,e.index,e.actionType),qC(n),n=[],e.editType===Gs.ACTION){BC.handleServerChanges(s,r.changedListProperty,r.leafProperty),UI.unRegisterForServerChanges();const t=Gs.getProperty($s.CASE_INFO.CASE_INFO_CONTENT)+lS.convertClipboardPageToPageRefNotation(e.interestPage);e.columns.forEach((n=>{const r=Ro.trimAnnotation(n.config.value),a=QC(r,t,s),o=dC(r.startsWith(".")?r.split(".").pop():r,n.config.classID);rd.addFieldNode(s,t,e.viewID,r,a,{isDeclarativeTarget:!!o?.isDeclarativeTarget,context:s,propertyName:r,pageReference:t,value:n.config.value,isInsideList:/\[\d+\]/.test(t)||/\[\d+\]/.test(r)})}))}return n})))},mO=e=>{const{context:t}=e;let n={...lI(t).content,contextData:!1};const s=xI(t);lS.isEmpty(s)||(n=vI(s,n));const r=((e,t=!1)=>e===Gs.ACTION?t?Rf.REFRESH_CASE_DATA:Rf.REFRESH_ASSIGNMENT_DATA:Rf.REFRESH_CASE_VIEW)(e.editType,e.isLocalAction),{restApi:a,reqType:o}=p_(r,{ID:e.isLocalAction||e.editType!==Gs.ACTION?e.ID:e.assignmentID,actionID:e.actionID,viewID:e.viewID});let i=a;return e.editType===Gs.ACTION&&(i+=`?operation=${e.operationFlag}`,n.interestPageActionID=e.interestPageActionID),n.interestPage=e.interestPage,ju(Kd(i,{method:o,body:n,headers:e.headers},t)).pipe(sh((t=>({actionInPayload:e,response:t.data,headers:cI(t.headers)}))),Ih(": Error occurred during getEmbeddedDataView request : ",t))},IO=(e,t,n)=>"string"==typeof n?`${e}${t}.${n}`:`${e}${t}[${n}]`,EO=(e,t,n,s,r)=>{const a=e.data?.caseInfo?.content;if(a){const e=((e,t,n)=>{const s=(e,t)=>{if((e=>"object"==typeof e&&null!==e)(e))return e[t]},r=t.replace(/^\./,"").split(".");let a=e;for(const e of r)a=s(a,e);return"string"==typeof n?s(a,n)??null:Array.isArray(a)?a[n]??null:null})(a,s,r);e&&qC(e_({context:t,reference:n,value:e}))}const o=e.uiResources?.context_data;o&&qC(e_({context:t,reference:Gs.CONTEXT_DATA,value:o}))},yO=e=>{let t=0,n=[];return e.pipe(hh(Ra),sh((e=>{const{payload:n}=e;return({actionMgrID:t}=n),n})),rh((e=>mO(e))),AP((async e=>{const t={rootView:null,data:null,uiResources:null,containerContext:null};if(e?.type===br)return n.push(fI(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0},responseData:t};const{actionInPayload:s,response:r,headers:a}=e,{pageReference:o,targetProperty:i,index:c,containerName:l}=s,u=o?.startsWith($s.OBJECT_INFO.OBJECT_INFO),{context:d,containerContext:p,target:g}=(e=>{const{containerName:t,context:n}=e;if(!t)return{context:n,containerContext:null,target:null};const s=Wa(t,n),r=EI(s,t,n)||t,a=er(n,r);return{context:a,containerContext:a,target:s}})(s),h=((e,t,n,s,r)=>{if(r){const r=Bs.transformCaseData(e);return r.uiResources.root.config.context=IO(t,n,s),r}return e})(r,o,i,c,u),f=um(h);f.key=s.ID;const m=IO(o,i,c),I=l?{acName:g,context:d}:{context:d};if(await dI(f,s,I),l&&g){const e=uI(f,{target:g,context:d,containerItemID:d,headers:a,index:c});e.resourceStatus=s.actionType,e.isMultiRecordData=!0,e.readOnly=s.readOnly,e.parentContext=s.context,e.clearStateMachine=!1;const t=mI(g,e);n.push(t)}else EO(f,d,m,i,c);const E=f.uiResources?.root||null;return E?.config&&(E.config.context=m),t.rootView=E,t.data=f.data,t.uiResources=f.uiResources,t.containerContext=p,{actionsOut:n,actionInPayload:s,responseData:t}})),sh((({actionsOut:e,responseData:s})=>{Lm(e)?vg.rejectActionByID(t):vg.resolveActionByID(t,s);return n=[],e})))},AO=e=>{let t,n="",s=[];return e.pipe(hh(ba),nh((e=>{t=e.payload;const{isFormValid:r}=e.payload;if(({actionMgrID:n}=e.payload),!r){const t={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(n,!0,t),Ff.handleDeferredActionCompletion(e.payload.context),ih([])}return ih(e.payload).pipe(rh((e=>(t=e,YT(t)))),rh((async e=>((e,t)=>{if(e&&"action"===t.editType&&e.type!==br){const{context:n,pageReference:s}=t,r={context:n},{response:a}=e,o=s?.startsWith($s.OBJECT_INFO.OBJECT_INFO);let i=null;o?(i=Bs.transformCaseData(a),i.uiResources.root.config.context=s):i=a;const c=um(i);c.key=t.ID,c.data?.caseInfo?c.data.caseInfo.ID=t.ID:c.data?.objectInfo&&(c.data.objectInfo.ID=t.ID);const l=uI(c,r);l.skipValidation=!0;const u=zS(AS,l);UI.registerForServerChangesSync(),qC(u),UI.unRegisterForServerChanges()}return e})(e,t))),rh((async e=>{if(e&&e.type===br){const t=fI(e);return s.push(t),s}const{containerItemID:n,context:r,pageReference:a,interestPage:o}=t,i=o?.replace(/\(\d+\)$/,"");return((e,t,n,s,r)=>{Sp(e).forEach((e=>{const a=r&&"replace"===e.instruction.toLowerCase()?lS.convertClipboardPageToPageRefNotation(r):lS.convertClipboardPageToPageRefNotation(e.target);UI.isStateMachineExist(t,n,a)||UI.setStateMachine(t,a,n,new hp(a,n,t));const o=UI.getStateMachine(t,n,a);switch(e.instruction.toLowerCase()){case"insert":o.insert(e.content,e.listIndex,s,{encryptedContent:e.encryptedContent});break;case"update":o.update(e.content,e.listIndex??e.groupIndex,s,{encryptedContent:e.encryptedContent});break;case"delete":e.listIndex?o.delete(e.listIndex,s):e.groupIndex?o.delete(e.groupIndex,s):o.deletePage();break;case"replace":o.replacePage(e.content,s,r?e.target:void 0,r?n:void 0,e.encryptedContent);break;case"move":o.move(e.listIndex,e.listMoveToIndex);break;case"add":o.insert(e.content,e.groupIndex,s,{encryptedContent:e.encryptedContent});break;case"delete all":o.deleteAll()}}))})(r,t.parentContext,a.startsWith($s.OBJECT_INFO.OBJECT_INFO_CONTENT)?Gs.getProperty($s.OBJECT_INFO.OBJECT_INFO_CONTENT):Gs.getProperty($s.CASE_INFO.CASE_INFO_CONTENT),!1,i),s.push(zS(kS,{containerItemID:n,context:r,target:t.target,skipReleaseLockRequest:!0})),s})),sh((()=>{if(Lm(s))vg.rejectActionByID(n),Ff.handleDeferredActionCompletion(t.context);else{vg.resolveActionByID(n),Ff.handleDeferredActionCompletion(t.context);const{pageReference:s}=e.payload,r=gS.getPropertyValue(Gs.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,s,t.parentContext);r?((e,t)=>{const{pageReference:n,isMultiRecordData:s}=t,r=gS.getPropertyValue(Gs.getProperty($s.CASE_INFO.CASE_INFO_ID),n,e.parentContext),a=gS.getPropertyValue(Gs.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,e.parentContext),o=gS.getPropertyValue($s.CASE_INFO.ASSIGNMENT_ID,n,e.parentContext),i=gS.getPropertyValue(Gs.CONTEXT_DATA_MODAL_VIEW.CONTEXT_DATA_MODAL_VIEW,n,e.parentContext),{interestPage:c,interestPageActionID:l,actionID:u,isLocalAction:d}=i,p=e.pageReference.substring(0,e.pageReference?.lastIndexOf(".")).replace(Gs.getProperty(Gs.CASE_INFO.CASE_INFO_CONTENT),"");"action"===i.editType?IE(r,o,u,e.parentContext,c,l,d,s,i.editType):mE(r,a,e.parentContext,p,{})})(t,{isMultiRecordData:r,pageReference:s}):NE(t.parentContext,Gs.getProperty(Gs.CASE_INFO.CASE_INFO_CONTENT),{})}return qC(s),s=[],s})))})))},CO=e=>{const{caseID:t,headers:n,debugInfo:s,context:r}=e,a=p_("getDescendants",{caseID:t}),{restApi:o}=a,{reqType:i}=a;return ju(Kd(o,{method:i,headers:{...n,...s&&{...Vd.addDebugHeaders(s)}}},r)).pipe(sh((t=>({actionInPayload:e,response:t.data,headers:cI({...n,...t.headers})}))),Ih("Error ocurred during ajax call at getDescendants Epic : ",r))},SO=e=>{let t=0,n=[];return e.pipe(hh(Of),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>CO(e))),rh((async e=>{if(e&&Mm(e.type))return n.push(fI(e)),n;const{actionInPayload:t,response:s}=e,r={};lS.setIn(r,"caseInfo.childCases",s?.childCases??[]),s?.uiResources?.resources&&AC(s.uiResources.resources),s?.uiResources?.components&&await Sg(s.uiResources.components),s?.uiResources?.localeReferences&&lS.setIn(r,"localeReferences",s.uiResources.localeReferences),s?.uiResources?.childCases_context_data&&lS.setIn(r,"childCases_context_data",s.uiResources.childCases_context_data);const a={data:r,context:t?.context};return n.push(zS(AS,a)),n})),sh((()=>(qC(n),zm(n,t),n=[],n))))},_O=e=>{let t,n="",s=[],r={};return e.pipe(hh(va),nh((e=>{t=e.payload;const{isFormValid:a}=e.payload;return({actionMgrID:n}=e.payload),a?ih(e.payload).pipe(rh((e=>(t=e,ih({})))),rh((async()=>{const{containerItemID:e}=t,a=zC(e),o=e,i=a?.dataInfo.content;delete i.classID;const c=Ks(o),l=Gy(c).length,u=Gy(c)[l-1]?Fy(Gy(c)[l-1]):c,d=tA(e),p=Dy(d,e)||{},g=p?.referenceList?.replaceAll(".",""),h=p?.subscriptName,f=zC(u),m={containerItemID:u,data:{...f,caseInfo:{content:{...i}}}};s.push(zS(MS,m)),((e,t,n)=>{gy(t)&&e.push(zS(kS,{containerItemID:n,skipReleaseLockRequest:!0}))})(s,o,e);const I=(({itemData:e,workareaContainerData:t,subscriptData:n,pageGroupName:s,activeWorkArea:r,subscriptFieldName:a,actionMgrID:o,containerItemID:i})=>{const c={referenceList:e?.referenceList,ID:t?.caseInfo?.ID,index:n[a],containerName:$s.MODAL,pageReference:$s.CASE_INFO.CASE_INFO_CONTENT,viewID:$s.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW,skipSemanticUrl:!0,actionType:$s.RESOURCE_STATUS.CREATE,interestPage:`.${s}.${n[a]??""}`,targetProperty:`.${s??""}`,pageGroupName:s,context:r??"",subscriptFieldName:a};return{type:Oa,payload:{isInCreateStage:!1,isModalAction:!0,parentContext:"",target:"",...c,actionMgrID:o,containerItemID:i,doDeleteCaseSummary:!1,isFormValid:!0}}})({itemData:p,workareaContainerData:f,subscriptData:i,pageGroupName:g,activeWorkArea:u,subscriptFieldName:h,actionMgrID:n,containerItemID:e});return s.push(I),r=i,s})),sh((()=>(vg.resolveActionByID(n,r),qC(s),s=[],s)))):(((e,t)=>{const n={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};vg.rejectActionByID(e,!0,n),Ff.handleDeferredActionCompletion(t)})(n,e.payload.context),ih([]))})))},NO=[hD,kD,KD,tP,xP,UP,YP,XP,eO,cP,mP,pP,tO,_P,yP,e=>e.pipe(hh(sa),dO((()=>uO(100))),sh((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:s,isProcessAction:r,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:c,context:l}=e.payload;return vg.resolveActionByID(t),Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:s,hideDelete:!r&&n,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i,containerItemID:l||c}),[]}))),e=>e.pipe(hh(qr),dO((()=>uO(100))),sh((e=>{const{actionMgrID:t,context:n,containerName:s,containerItemID:r}=e.payload,a=Wa(s,n);return vg.resolveActionByID(t),qC(zS(VS,{containerItemID:r,target:a,doDeleteCaseSummary:!1})),[]}))),fO,yO,AO,SO,_O];function TO(){return xu((function(e,t){e.subscribe(wu(t,ru))}))}const{RESOURCE_TYPES:DO}=$s,PO="pyCasePreview",OO=(e,t)=>{const n=ZI.isObjectCaseType(e.caseClassName);if(e.key&&!n){const n=tA(e?.context),s=xy(n,e.key),r=e?.context;(s||e.updateData||(e=>{const t=HC();if(!e)return!1;const n=Ks(e),s=tA(n),r=tA(e);if(!s||!r)return!1;const a=Dy(s,n),o=Dy(r,e);if(!a||!o)return!1;const{key:i}=a;let{key:c}=o;return c||(c=t?.getState().data?.[e]?.caseInfo?.ID),!(!i||!c||i===c)})(r))&&t.actionsOut.push(zS(AS,e))}else t.actionsOut.push(zS(AS,e))},RO=[e=>e.pipe(hh(or),sh((e=>e.payload)),ph((e=>!nI(e.actionMgrID))),rh((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===Cy.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=Wa(Cy.PREVIEW,e.context),n=EI(t,Cy.PREVIEW,e.context,{buildNew:!0}),s=decodeURI(e.caseId);qC(OS({...e,context:n,target:t,containerItemID:n,key:s,caseViewMode:Gs.REVIEW_MODE,root:{type:"reference",config:{context:Gs.getProperty(Gs.CASE_INFO.CASE_INFO_CONTENT),name:e.viewName,type:"view"}},data:{key:s,caseInfo:{ID:s,progress:!0,error:!1,caseTypeID:e.caseClassName,content:{classID:e.caseClassName}}}})),e.viewLoadingContainer={target:t,context:n}}const n={};if(t.RemoteSystemID)n.RemoteSystemID=t.RemoteSystemID;else if(qs.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=qs.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}const{restApi:s,reqType:r}=((e,t)=>{let n=p_("loadView",t);e.viewContext===DO.PAGE&&(n=p_(Kr,{page:e.viewName,pageClass:e.pageClass}));const s=ks.getDefaultQualifiedName(PO);return e.containerName===Cy.PREVIEW&&Boolean(e.caseId)&&e.viewContext!==DO.PAGE&&(e.viewName===s||e.viewName===PO)&&(n=p_(Zr,{caseID:e.caseId,params:{pageName:s}})),n})(e,t);return ju(Kd(ZI.appendExcludeQueryParamToUrl(s),{method:r,headers:n},e.context)).pipe(sh((t=>{const n=decodeURI(e.caseId);let s="";return"string"==typeof t.data?t.data?s=JSON.parse(t.data):(console.error("response data is empty!!"),s={}):s=t.data,{response:{...s,key:n},actionConfig:e,headers:cI(t.headers),rootView:lS.getIn(s,Gs.ROOT)}})),Ih(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),rh((async e=>{const t={};if(e?.type===br){if(t.actionsOut=fI(e),e?.payload?.context?.includes(Cy.PREVIEW)){const n={...zC(e.payload.context),caseInfo:{progress:!1,error:!0}},s=Wa(Cy.PREVIEW,e.payload.context);t.actionsOut=zS(MS,{key:n.key,target:s,containerName:Cy.PREVIEW,context:e.payload.context,containerItemID:e.payload.context,data:n})}return t}try{t.actionMgrID=e?.actionConfig?.actionMgrID,t.rootView=e?.rootView;const{actionConfig:n,response:s,headers:r}=e;e?.actionConfig?.skipAssignmentsUpdate&&(delete s?.data?.caseInfo?.assignments,delete s?.data?.caseInfo?.availableActions,delete s?.data?.caseInfo?.availableProcesses);const{containerItemID:a,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:s}=e,r=t||wg.getTargetViewContainerName(Kr),a=s?.target??Wa(r,e.context);return{target:a,context:s?.context??(t===Cy.PREVIEW&&n?e.context:EI(a,r,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=um(s),u.directUrlUpdation=!1,await dI(u,n,l);const d={...n,target:i,context:c,containerItemID:a||c,headers:r},p=uI(u,d);if(p.resourceType=DO.CASE,n.viewName===Gs.PY_CONFIRM&&(p.caseViewMode=Gs.REVIEW_MODE,lS.setIn(p.data,["context_data","caseViewMode"],Gs.REVIEW_MODE)),o&&!p.updateData){p.caseViewMode=Gs.REVIEW_MODE,lS.setIn(p.data,["context_data","caseViewMode"],p.caseViewMode);const e=tA(p?.context);((e,t,n,s,r)=>{e&&r===Cy.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,eI(n,n),s.actionsOut=zS(MS,{...n,containerName:r})):e?(s.actionsOut=[],s.actionsOut.push(zS(VS,{target:t,containerItemID:e}))):s.actionsOut=zS(OS,{...n,containerName:r})})(xy(e,p.key),e,p,t,o)}else{p.preserveClientChanges=!0,t.actionsOut=[],o===Cy.PREVIEW&&t.actionsOut.push({type:ya,payload:{context:c,skipMergeAssignmentsAndActions:!1}});const{viewName:e}=n;e===ks.getDefaultQualifiedName(PO)&&eI(p,p),OO(p,t)}}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:s,viewName:r}=e.actionConfig;return r===ks.getDefaultQualifiedName(PO)&&(e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:s}),t})),sh((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(vg.resolveActionByID(n,e),Bs.setNeedsMapping(!1),t)))),e=>{let t=0,n=[];return e.pipe(hh(ir),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{Ad.publish($s.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:s,viewName:r,className:a,skipSemanticUrl:o=!1,containerName:i=wg.getTargetViewContainerName(Kr)}=e,c=n&&{...Vd.addDebugHeaders(n)},l=Wa(i,s);let u="";if(!o){const{semanticURL:t,activate:n,activateContainerActionPayload:s}=TI(r,a,l);if(u=t,n)return wI(s),ih({type:$r,activateContainerActionPayload:s,actionConfig:e})}return ju(Fy(l)?CI(l,{loadingContext:s}):Promise.resolve({continueExecution:!0,removeActionPayload:{}})).pipe(rh((({continueExecution:n,removeActionPayload:i})=>{if(!n)return vg.rejectActionByID(t),fh;const{restApi:l,reqType:d}=p_(Kr,{page:r,pageClass:a});return ju(Kd(l,{method:d,headers:c},s)).pipe(sh((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:cI(t.headers),removeActionPayload:i,skipSemanticUrl:o}})),Ih(": Error ocurred during ajax call at showPage Epic : ",e.context))})))})),rh((async e=>{const t={};if(t.actionManagerID=e?.actionConfig?.actionMgrID,e&&e.type===br)return n.push(fI(e)),t;let{type:s}=e;const{actionConfig:r,skipSemanticUrl:a}=e,o=r.containerName||wg.getTargetViewContainerName(ir),i=Wa(o,r.context);Ad.publish($s.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),Ad.publish($s.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:c,updatedType:l}=((e,t,n,s)=>{let r={},a=e;if(n.isRemoteCase){r={...n};const e=xy(s,r.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},a=$r)}return{remoteCasePayload:r,updatedType:a}})(s,e,r,i);if(s=l??s,r.isDeferLoaded){const{response:s,headers:o={}}=e,{isCreateDataObject:c,context:l}=r,u=um(s,{isCreateDataObject:c});u.directUrlUpdation=!a;const d={acName:i,context:l};await dI(u,r,d);const p=uI(u,{containerItemID:l,target:i,headers:o,context:l});t.rootView=lS.getIn(u,Gs.ROOT),n.push(zS(AS,p))}else if(s===$r){const{activateContainerActionPayload:{semanticURL:t,containerItemID:s}}=e,a={acName:i,context:ky(s)};r.isTraditionalRemoteCase||await dI({directUrlUpdation:!0,semanticURL:t},r,a,!0),n.push(zS(VS,{target:i,containerItemID:s}))}else{const t=EI(i,o,r.context),{response:s,headers:l={},removeActionPayload:u}=e,d=um(s,{isCreateDataObject:r.isCreateDataObject});d.directUrlUpdation=!a;const p={acName:i,context:t},g=tI(t);await dI(d,r,p);const h={target:i,context:t,containerItemID:t,headers:l,debugInfo:r.debugInfo,currentCaseViewMode:g,referenceList:r?.referenceListStr,subscriptName:r?.subscriptName},f=uI(d,h);f.resourceType=$s.PAGE,r.isCreateDataObject&&(f.resourceType=$s.RESOURCE_TYPES.DATA,f.resourceStatus=$s.RESOURCE_STATUS.CREATE,delete f.data.caseInfo,f.referenceList=r.referenceListStr,f.subscriptName=r.subscriptName),((e,t,n)=>{e.isRemoteCase&&(n.resourceType=$s.CASE,n.key=ZI.getRemoteCaseKey(t.assignmentID,t.insKey),n.data.caseInfo={...n.data.caseInfo,...t,classID:t.className,target:n.target,containerItemID:n.containerItemID,caseTypeID:t.className,content:{pyLabel:t.name,pyID:Fm(ZI.getRemoteCaseKey(t.assignmentID,t.insKey))}},II(n.data,t.remoteCaseMeta),n.isTraditionalRemoteCase=e.isTraditionalRemoteCase||!1,n.className=t.className)})(r,c,f),f.data??={},f.data.traditionalGadgetId=ZI.getUniqueGadgetId();const m=mI(i,f);u.containerItemID&&yI(m)&&n.push(zS(kS,{containerItemID:u.containerItemID,target:i})),n.push(m)}return Ad.publish($s.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:i,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),t})),sh((({actionManagerID:e=0,rootView:t})=>{vg.resolveActionByID(e,t),qC(n),n=[]})),TO())}],bO=(e,t,n)=>{const{context:s,pageName:r,dataContext:a,dataContextParameters:o,semanticURL:i,skipSemanticUrl:c,RemoteSystemID:l}=e,{removeActionPayload:u}=t,{restApi:d,reqType:p,body:g}=p_(Qr,{pageName:r,dataContext:a,dataContextParameters:o}),h={};return h.RemoteSystemID=l,ju(Kd(d,{method:p,headers:h,body:g},s)).pipe(sh((t=>({response:{...t.data,key:i,semanticURL:i},actionConfig:e,headers:cI(t.headers),removeActionPayload:u,skipSemanticUrl:c}))),Ih("Error occurred during ajax call at showData Epic : ",e.context,String(n)))},{RESOURCE_TYPES:vO}=$s,xO=e=>{const{dataViewName:t,context:n,dataViewParameters:s}=e,r={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(s))},{restApi:a,reqType:o}=p_("deleteDataObject",r);return ju(Kd(a,{method:o},n)).pipe(sh((t=>({response:t.data,actionInPayload:e}))),Ih("Error occurred during ajax call at deleteDataObject Epic",n))},wO=e=>{const{dataViewID:t,dataViewParameters:n,context:s}=e,r={data_view_ID:t},{restApi:a,reqType:o}=p_("getDataObjectActions",r);return ju(Kd(a,{method:o,body:{dataViewParameters:n}},s)).pipe(sh((e=>({...e.data}))),Ih("Error occurred during ajax call at GET data object actions : ",e.context))},MO=[e=>{let t,n=0,s=[];return e.pipe(hh(cr),AP((e=>(({actionMgrID:n}=e.payload),ih(e.payload).pipe(rh((e=>((e,t)=>{const{context:n,pageName:s,dataContext:r,dataContextParameters:a,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l,containerName:u,RemoteSystemID:d}=e,p=Wa(u,n);let g="";const h={context:n,pageName:s,dataContext:r,dataContextParameters:a,semanticURL:g,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l,RemoteSystemID:d};if(!o){g=u_(Qr,{pageName:s,dataViewName:r},a),h.semanticURL=g;const{activate:o,activateContainerActionPayload:i}=_I(vO.PAGE,p,{semanticURL:g});return o?ih({type:$r,activateContainerActionPayload:i,actionConfig:e}):ju(CI(p,{loadingContext:n})).pipe(rh((({continueExecution:e,removeActionPayload:n})=>e?bO(h,{removeActionPayload:n},t):(vg.rejectActionByID(t),fh))))}return bO(h,{removeActionPayload:{}},t)})(e,n))),rh((async e=>{if(e&&e.type===br)return s.push(fI(e)),s;const{type:n,actionConfig:r,headers:a,response:o,skipSemanticUrl:i}=e;t=lS.getIn(o,Gs.ROOT);const{containerName:c,parentAction:l,resourceType:u}=r,d=Wa(c,r.context);let p;const g=tI(r?.context);if(r.isDeferLoaded){p=um(o),p.directUrlUpdation=!i;const t={acName:d,context:r.context};await dI(p,r,t);const n={target:d,headers:a,context:r.context,containerItemID:e.containerItemID},c=uI(p,n);return s=zS(AS,c),s}if(n===$r){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,a={acName:d,context:ky(n)};await dI({directUrlUpdation:!0,semanticURL:t},r,a,!0),s.push(zS(VS,{target:d,containerItemID:n,resourceType:vO.DATA}))}else if("DATA"===u&&l===Pa){const{context:e}=r,t=o?.data,n={context:e,data:t};s.push(zS(AS,n))}else{const t=EI(d,c,r.context),{removeActionPayload:n}=e;p=um(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await dI(p,r,l);const u=uI(p,{target:d,context:t,containerItemID:t,headers:a,currentCaseViewMode:g});u.resourceType=vO.DATA;const h=mI(d,u);n.containerItemID&&yI(h)&&s.push(zS(kS,{containerItemID:n.containerItemID,target:d})),PI(s),s.push(h)}return s})),sh((()=>(vg.resolveActionByID(n,t),qC(s),s=[],s))))))))},e=>{let t=0,n=[];return e.pipe(hh(Sa),Eh(100),nh((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:t}=e.payload),!s){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(t,!0,e),ih([])}return ih(e.payload).pipe(rh((e=>yh(e))),rh((async e=>{if(e&&e.type===br){const{payload:s}=e,r=fI({...e,...s,actionMgrID:t});return n.push(r),{actionsOut:n,data:void 0}}const{actionInPayload:s}=e,{containerItemID:r,isModalAction:a}=s,o=a?Cy.MODAL:Cy.PRIMARY,i={target:Wa(o,r),containerItemID:r,context:r};return n.push(zS(kS,i)),{actionsOut:n,data:e?.response}})),sh((({data:e})=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t,e),qC(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(hh(Na),Eh(100),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>Ah(e))),rh((async e=>{if(e&&e.type===br){const{payload:s}=e,r=fI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s,response:r,headers:a={}}=e,{containerName:o,readOnly:i,actionName:c}=s,l=Wa(o,s.context),u=EI(l,o,s.context),d={acName:l,context:u};if(r?.data?.dataInfo){const{dataInfo:e}=r.data;e.dataContext||=s.dataLookUp,e.dataContextParameters||=s.requestPayload}await dI(r,s,d);const p=uI(r,{target:l,context:u,containerItemID:u,headers:a});return p.resourceType=$s.RESOURCE_TYPES.DATA,p.resourceStatus=$s.RESOURCE_STATUS.UPDATE,p.readOnly=i,p.actionName=c,p.key=JSON.stringify(s.requestPayload),n.push(zS(OS,p)),n})),sh((()=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t),qC(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(hh(Ta),Eh(100),nh((e=>{const{isFormValid:s}=e.payload;if(({actionMgrID:t}=e.payload),!s){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(t,!0,e),ih([])}return ih(e.payload).pipe(rh((e=>Ch(e))),rh((async e=>{if(e&&e.type===br){const{payload:s}=e,r=fI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s}=e,{containerItemID:r,isModalAction:a}=s,o=a?Cy.MODAL:Cy.PRIMARY,i={target:Wa(o,r),containerItemID:r,context:r};return n.push(zS(kS,i)),n})),sh((()=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t),qC(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(hh(_a),Eh(100),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>xO(e))),rh((async e=>{if(e&&e.type===br){const{payload:s}=e,r=fI({...e,...s,actionMgrID:t});return n.push(r),n}return[]})),sh((()=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t),qC(n),n=[],n))))},e=>{let t=0,n=[];let s={};return e.pipe(hh(Or),Eh(100),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>wO(e))),rh((async e=>e&&e.type===br?(n.push(fI(e)),n):(s=e,[]))),sh((()=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t,s),qC(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(hh(Da),Eh(100),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>Sh(e))),rh((async e=>{if(e&&e.type===br){const{payload:s}=e,r=fI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s,response:r,headers:a={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=s,u=Wa(o,s.context);let d=Qs(o,c);d=er(c,d);const p={target:u,context:d,containerItemID:d,headers:a,resourceType:$s.RESOURCE_TYPES.DATA,resourceStatus:$s.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(s.dataViewParameters),actionID:i,actionName:l};if(r?.data?.dataInfo){const{dataInfo:e}=r.data;e.dataContext||=s.lookupDatapage,e.dataContextParameters||=s.dataViewParameters}const g={acName:u,context:c};await dI(r,s,g);const h=uI(r,p);return n.push(zS(OS,h)),n})),sh((()=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t),qC(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(hh(Pa),Eh(100),nh((e=>{const{isFormValid:s}=e.payload;({actionMgrID:t}=e.payload);const r=e.payload.context;if(!s){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(t,!0,e),ih([])}return dd({context:r,stateObj:zC(r),clearContextMessages:!0}),ih(e.payload).pipe(rh((e=>_h(e))),rh((async e=>{if(e&&e.type===br){pE(e,"dataObject");const{payload:s}=e,r=fI({...e,...s,actionMgrID:t});return n.push(r),n}const{actionInPayload:s,response:r,headers:a={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=s,u=Wa(o,s.context),d={acName:u,context:s.context};await dI(r,s,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:a,context:s.context};return n=((e,t,n,s)=>{const{resourceType:r,key:a,containerItemID:o}=s,i=uI(n,t);i.resourceType=r||$s.RESOURCE_TYPES.DATA;const c=tr(o);e.push(zS(kS,i));const l=QC(".dataContext","dataInfo",c),u=QC(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:r,parentAction:Pa,dataContext:l,dataContextParameters:u},p=l&&u&&u_(Qr,{pageName:Gs.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(Gs.PREVIEW)){const t={type:cr,payload:{pageName:Gs.VIEW_NAMES.PY_DATA_PREVIEW,container:Gs.PREVIEW,containerName:Gs.PREVIEW,...d}};e.push(t)}else if(r!==Gs.PAGE&&a===p&&o?.includes(Gs.PRIMARY)){const t={type:cr,payload:{pageName:Gs.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,r,{key:l,resourceType:c,containerItemID:i}),n})),sh((()=>(1===n.length&&Mm(n[0].type)?vg.rejectActionByID(t):vg.resolveActionByID(t),qC(n),n=[],n))))})))}];function LO(e,t){return void 0===t&&(t=iO),xu((function(n,s){var r=null,a=null,o=null,i=function(){if(r){r.unsubscribe(),r=null;var e=a;a=null,s.next(e)}};function c(){var n=o+e,a=t.now();if(a<n)return r=this.schedule(void 0,n-a),void s.add(r);i()}n.subscribe(wu(s,(function(n){a=n,o=t.now(),r||(r=t.schedule(c,e),s.add(r))}),(function(){i(),s.complete()}),void 0,(function(){a=r=null})))}))}const{RESOURCE_TYPES:{CASE:UO,DATA:FO,OBJECT:VO}}=$s;let jO=[],kO=!1,BO=!1,$O=null,GO=null;const WO={},HO=[e=>e.pipe(hh(Rr),LO(200),sh((e=>e.payload)),rh((e=>{BO=!1,Ad.subscribe($s.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{BO=!0}));const t=Sd.getPreviewMode()&&Vd.addDebugHeaders({debugId:lS.generateUniqueID()});WO.dataContext=e.payload.dataViewName,WO.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:s,routeKey:r}=e;let{routeEndpoint:a}=e;a&&(a.indexOf("viewType={viewType}")>0?a=a.replace("{viewType}","page"):a.indexOf('viewType=""')>0&&(a=a.replace('viewType=""','viewType="page"'))),kO=r===ka,kO&&Bs.setNeedsMapping(!0);const o=un()+a,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if(qs.isRemoteCase(u)){const{RemoteSystemID:e}=qs.getRemoteCase(u);l.RemoteSystemID=e}if(xA.isWSSPortal()&&(l[Gs.X_ORIGIN_CHANNEL]="WSS"),"POST"===s){c=e.payload,a.indexOf("viewType=")<0&&(a=`${a}?viewType=page`);let i;switch(OI(r)){case UO:case VO:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case FO:i=WO;break;default:i=c}return ju(Kd(o,{method:s,body:i,headers:{...l,...t}},n)).pipe(sh((t=>({response:{...t.data},payload:e,headers:cI(t.headers,"",l)}))),Ih(": Error occurred during ajax call at historyEpic : ",e))}return ju(Kd(ZI.appendExcludeQueryParamToUrl(o),{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(sh((n=>({response:n.data,payload:e,headers:{...cI(n.headers),...t}}))),ku((s=>{if(r===da){const n={messages:[{type:"error",message:s.response.data.errorDetails[0].localizedValue}],category:"PAGE"};Rg.setComponentCache("assignments-launchAssignment-Error",n);const r=Mh(PA()),a=bA.getEndPointInfo(r.split("/assignments")[0]),o=un()+a.routeEndpoint;return e={...e,routeKey:Zr,resetSemanticURL:!0},ju(Kd(o,{method:a.reqType,headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(sh((n=>({response:n.data,payload:e,headers:{...cI(n.headers),...t}}))))}return ih(YS(": Error occurred during ajax call at historyEpic : ",s,n))})))})),rh((async e=>{if(BO)return jO;if(Ad.subscribe($s.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{BO=!0})),e&&e.type===br)return fI(e);const{headers:t={},response:n,payload:s}=e,r=um(n,{[$s.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),a=s.options.acName,o=qy(a)&&Yy(a)?Fy(a):e.payload.options.context,i=o;t.RemoteSystemID=s?.payload?.RemoteSystemID,GO={target:a,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[Gs.COREHEADER_APP_DEBUG_ID]}};let c=s?.payload?.pageClass;const l=s?.payload?.page,u=kO?ka:Zr,d=kO?s.payload.objectID:s.payload.workID,p=kO?"{objectID}":"{workID}";let g=kO?`objects/${d}`:"";s?.payload?.caseName&&d&&(g=u_(u,{caseName:e.payload.payload.caseName}),g=g?.replace(p,d)||"",c=s?.payload?.caseClassName),(s?.routeKey===da||s?.resetSemanticURL)&&((e,t)=>{const n=km(t);let s=u_(Zr,{caseClassName:Vm(t)},{id:n});s=s?.replace("{workID}",String(Fm(n))).replace("{id}",String(Fm(n))),A_({directUrlUpdation:!0,semanticURL:s,options:{}})})(0,r),((e,t)=>{const n=t?.data?.caseInfo;e===da&&n?.caseTypeID&&n?.content&&Ym(n.caseTypeID)&&(n.content.coexistenceAction=ea)})(s?.routeKey,r),(e=>{const t=e?.data?.caseInfo;if(!t)return;const{ID:n,caseTypeID:s}=t;n&&s&&Ym(s)&&(e.data.caseID=n)})(r),Ad.publish($s.PUB_SUB_EVENTS.EVENT_PREVIEW_DISMISS,{pageName:l,pageClass:c}),Ad.publish($s.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:l,pageClass:c});const h=lS.getIn(r,Gs.COMPONENTS);h&&await Sg(h),ng(r,s.options.actionConfig,!0),Ad.publish($s.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:a,pageName:l,pageClass:c});let f=uI(r,GO);return f=((e,t,n)=>{if(e===aI.CASE||e===aI.OBJECT||e===aI.ASSIGNMENT){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:s}=gI(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=s}else n.flowName="",n.key=t?.caseInfo?.ID||t?.objectInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,e===aI.ASSIGNMENT?(n.caseViewMode=Gs.PERFORM_MODE,n.resourceType=aI.CASE):n.caseViewMode=Gs.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(OI(e.payload.routeKey),{...n.data,semanticURL:g,caseViewMode:Gs.REVIEW_MODE},f),f.data.traditionalGadgetId=ZI.getUniqueGadgetId(),jO.push(mI(a,f)),$O=r,((e,t)=>{let n=Rg.getComponentCache("assignments-launchAssignment-Error")||{};n&&"object"==typeof n&&Object.keys(n).length>0&&(n={...n,context:e},t.push(zS(jS,n)),Rg.resetComponentCache("assignments-launchAssignment-Error"))})(o,jO),jO})),sh((()=>(BO||qC(jO),$O&&GO&&eI($O,GO),jO=[],kO=!1,BO=!1,GO=null,$O=null,jO))),Ih("Error occurred"))],qO=[e=>{let t=0;return e.pipe(hh(ha),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),sh((()=>{const e=HC()?.getState(),n=WT();return sn(e,n)&&t>0?vg.resolveActionByID(t,{}):vg.rejectActionByID(t),[]})),TO())}],zO=[e=>{let t=0,n=[];return e.pipe(hh(lr),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:s}=e;let r,a="";n||(a=u_(Jr,{insightID:"{insightID}"}),a=a.replace("{insightID}",s),r=bA.getEndPointInfo(a));const{restApi:o,reqType:i}=p_(Jr,{...r?.payload||[],insightID:s});return ju(Kd(o,{method:i},t)).pipe(sh((t=>{let s={};return s="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...s,key:a,semanticURL:a},actionConfig:e,skipSemanticUrl:n}})),Ih(": Error occurred during ajax call at showPage Epic : ",e.context))})),rh((async e=>{if(e&&e.type===br)return n.push(fI(e)),n;const{actionConfig:t,skipSemanticUrl:s}=e,r=wg.getTargetViewContainerName(ir),a=Wa(r,t.context),o=EI(a,r,t.context),{response:i}=e,c=um(i);c.directUrlUpdation=!s;const l={acName:a,context:o},u=!s,d=s;await dI(c,t,l,u,d);const p=uI(c,{target:a,context:o,containerItemID:o});p.resourceType=$s.PAGE;const g=mI(a,p);return n.push(g),n})),sh((()=>{vg.resolveActionByID(t),qC(n),n=[]})),TO())}],YO=[e=>{let t=0,n=[];return e.pipe(hh(ur),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:s}=e;let r="";n||(r=u_(Xr,{dashboardID:s}),r=r.replace("{dashboardID}",s));const{restApi:a,reqType:o}=p_(Xr,{dashboardID:s});return ju(Kd(a,{method:o},t)).pipe(sh((t=>{let s={};return s="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...s,key:r,semanticURL:r},actionConfig:e,skipSemanticUrl:n}})),Ih(": Error occurred during ajax call at showPage Epic : ",e.context))})),rh((async e=>{if(e&&e.type===br)return n.push(fI(e)),n;const{actionConfig:t,skipSemanticUrl:s}=e,r=wg.getTargetViewContainerName(ir),a=Wa(r,t.context),o=EI(a,r,t.context),{response:i}=e,c=um(i);c.directUrlUpdation=!s;const l={acName:a,context:o},u=!s,d=s;await dI(c,t,l,u,d);const p=uI(c,{target:a,context:o,containerItemID:o});p.resourceType=$s.PAGE;const g=mI(a,p);return n.push(g)})),sh((()=>{vg.resolveActionByID(t),qC(n),n=[]})),TO())}],KO=(e,t)=>{const{class:n,context:s,viewType:r=oI.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:xA.getDefaultCasePage();return ju(rg.createCase(n,{...e,pageName:o,viewType:r,context:s})).pipe(sh((({response:t,headers:n})=>(Bs.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Ih("Error occurred during ajax call at createObject Epic : ",s))},QO="CREATE_OBJECT",JO=e=>{let t,n=0,s=[],r={};let a=!1;return e.pipe(hh(QO),Eh(100),nh((e=>{if(({actionMgrID:n}=e.payload),ZI.isExternalObject(e.payload.class)&&!YI(e.payload.context)){const e={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(n,!0,e),ih([])}return ih(e.payload).pipe(rh((e=>{const{context:s}=e;t=e.class;const r=xD(e),o=Wa(r,s);return a=!1,ju(cD(o,{loadingContext:s})).pipe(rh((({continueExecution:t,removeActionPayload:s,dirtyCheckPerformed:r})=>t?(a=r,KO(e,{removeActionPayload:s})):(vg.rejectActionByID(n),fh))))})),rh((async e=>{if(e&&e.type===br)return e.payload.context=((e,t)=>ZI.isExternalObject(e)&&t?t:EA())(t,e.payload.context),s.push(fI(e)),s;const{actionInPayload:o,response:i,headers:c,removeActionPayload:l}=e,u=UD(o,i);lS.setIn(i.data,Gs.getProperty(Gs.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const d=xD({...o,isInCreateStage:u}),p=Wa(d,o.context),g=EI(p,d,o.context);if(((e,t)=>{ZI.isExternalObject(e.class)&&(e.containerItemID=e.context,ID(t,e))})(o,s),!a&&((e,t,n)=>!xm(e)&&qy(t)&&!ZI.isExternalObject(n))(d,p,t)){const{continueExecution:e}=await CI(p,{loadingContext:o.context});if(!e)return vg.rejectActionByID(n),s}if(((e,t)=>!e&&!t)(o?.openCaseViewAfterCreate??!0,u)){const{businessID:e,caseType:t,resolvedURL:n}=$g(i);return r={id:e,label:t,href:n},dD(r),pD({caseId:e,caseType:t}),s}(e=>{ZI.isExternalObject(e.class)&&dD({content:FA().getLocaleValue("Successfully submitted!","Assignment")})})(o);const h=um(i),f=String(Fm(Vg(h)));let m=u_(ja,{caseClassName:Fg(h)});m=m.replace(/{.+?}/,f),h.semanticURL=m,Rg.setComponentCache(f,Vd.addDebugHeaders(o.debugInfo)),MD(h,o);const I={acName:p,context:g};await dI(h,o,I);const E={target:p,context:g,headers:c,semanticURL:m,caseViewMode:LD(h),containerItemID:g,isInCreateStage:u,isMinimizable:u,assignmentContext:lS.getIn(h,oD),nextAssignmentInfo:lS.getIn(h,aD),resourceType:$s.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:o.openCaseViewAfterCreate,modalOptions:o.modalOptions,debugInfo:o.debugInfo};jg(E,h);const y=uI(h,E),A=mI(p,y);return((e,t,n)=>{if(yI(e)){const{removeActionPayload:e,target:s}=t;$m(n,{removeActionPayload:e,target:s})}})(A,{removeActionPayload:l,target:p},s),s.push(A),s})),sh((()=>(bI(s),zm(s,n),setTimeout((()=>(e=>{ZI.isExternalObject(e)&&Bs.setNeedsMapping(!1)})(t))),r={},s=[],s))))})))},XO=(e,t)=>{const{assignmentID:n,actionID:s,caseID:r,context:a,additionalHeaders:o={},jsActionQueryParams:i}=e,{state$:c}=t,l=oI.PAGE,u="executeObjectWideAction",d={assignmentID:n,actionID:s,viewType:l,objectID:r};let{restApi:p}=p_(u,d);const{reqType:g}=p_(u,d);l&&!p?.includes("viewType=")&&(p=p?.includes("?")?`${p}&viewType=${l}`:`${p}?viewType=${l}`),p=dE(i,p),e.viewType=l;const{content:h}=lI(a,{isObjectWideAction:!0}),f=c.value.data[a]?.objectInfo?.headers||{},{etag:m}=f,I={"if-match":m,...o};return ju(Kd(p,{method:g,body:h,headers:I},a)).pipe(sh((t=>{const{data:n,headers:s}=t;return Bs.analyseResponse(t.data),{actionInPayload:e,response:n,headers:cI({...I,...s})}})),Ih("Error occurred during ajax call at executeObjectWideAction Epic : ",a))},ZO=(e,t)=>{const{isCaseWideAction:n}=t;return{isCaseWideAction:n,caseID:Vg(e)}},{RESOURCE_TYPES:eR}=$s,tR=(e,t)=>{let n=0,s=[],r={},a="";return e.pipe(hh(Ua),nh((e=>{if(({actionMgrID:n}=e.payload),a=e.payload.context,dd({context:a,stateObj:zC(a),clearContextMessages:!0}),!YI(a)){const t={type:$s.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return vg.rejectActionByID(n,!0,t),Ff.handleDeferredActionCompletion(e.payload.context),ih([])}return ih(e.payload).pipe(rh((e=>{mD(s,e);const n={...e};return XO(n,{state$:t})})),rh((async e=>{if(e?.type===br){const t=fI(e);return s.push(t),s}Nf.clearContextedCache(a);const{headers:t,actionInPayload:o,response:i}=e,{containerItemID:c,isModalAction:l,isInCreateStage:u}=o,d=tA(c);o.target=d,lS.setIn(i.data,Gs.OBJECT_INFO_IS_LOCAL_ACTION,!1),rP({submitResponse:i});let p=um(i,{[$s.STOPMERGEACTIONS]:!i.nextAssignmentInfo});const g=Fg(p),h=Ks(o.context),f=Gy(h)[0]?Fy(Gy(h)[0]):h,m=(e=>{const t=kg(e);return tE(t)&&nE(xA.getOperatorIdentifier(),t)})(p),I=u&&!m;!l||u||SD(o.context,f)||(p=DI(p,zC(c)));const E=uI(p,{headers:t,actionMgrID:n,directUrlUpdation:!1});((e,t)=>{const{attachmentsExist:n}=t;n&&lS.setIn(e,$s.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),lS.setIn(e,$s.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())})(E.data,o),E.caseClassName=g,E.resourceType=eR.ASSIGNMENT,E.headers=t;const y=Vg(p);jg(E,p);const A=u_(ja,{caseClassName:g}).replace(/{.+?}/,String(Fm(y)));p.semanticURL=A,E.semanticURL=A,await OD(o,E,!1,y,p,s,e,i,!0),I&&(r=_D(o),pD({caseId:o.caseID,caseType:o.caseTypeID,assignmentId:o.assignmentID})),((e,t)=>{const n=Fg(e?.response),s=kg(e?.response),{caseTypeID:r}=s,a=xA.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,Gs.DEFER_UPDATE_CASESUMMARY_VIEW))&&r&&SC(Gs.CASESUMMARY_VIEW_NAME,r)&&Qm(t,e?.actionInPayload,e?.response,{caseClassName:n})})(e,s),Ff.handleDeferredActionCompletion(a),RD(E,o,f);const C=ZO(p,o);return xf({...C,containerItemID:c}),AD(s,{transientItemID:c,target:d,isModalAction:l}),s})),sh((()=>{const e=s.find((e=>e.type===br));return e?(Ff.handleDeferredActionCompletion(a),bD(e),vg.rejectActionByID(n)):vg.resolveActionByID(n,r),bI(s),Bs.setNeedsMapping(!1),s=[],r={},s})))})))},nR=(e,t)=>{const{insKey:n,headers:s,context:r,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e.pageName?e.pageName:Gs.VIEW_NAMES.PY_DETAILS,l=p_(ka,{objectID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;return"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`),ju(Kd(u,{method:d,headers:{...s,...a&&{...Vd.addDebugHeaders(a)}}},r)).pipe(sh((t=>(Bs.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:cI({...s,...t.headers}),removeActionPayload:i}))),Ih("Error occurred during ajax call at getObject Epic : ",r))},sR="GET_OBJECT",{RESOURCE_TYPES:rR}=$s,aR=async(e,t)=>{const{actionInPayload:n,activateContainerActionPayload:s,type:r,response:a,removeActionPayload:o,headers:i}=e,{context:c,skipBrowserSemanticUrlUpdate:l,debugInfo:u}=n,d=Rm(ka,n),p=Wa(d,c);if(wm(r))await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:s},actionInPayload:r,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Rm(ka,r),l=Wa(c,a),u=ky(s);await dI({directUrlUpdation:!o,semanticURL:n},r,{acName:l,containerName:c,target:l,context:u}),e.push(zS(VS,{containerItemID:s,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:n});else{const e=EI(p,d,c,{buildNew:!0}),s=um(a),r=(e=>{const t=Vg(e),n=Fg(e);let s=u_(ka,{objectClassName:n});return s=s?.replace("{objectID}",String(Fm(t))),s})(s);s.semanticURL=r,s.directUrlUpdation=!l;const g={acName:p,context:e};await dI(s,n,g);const h=uI(s,{target:p,context:e,containerItemID:e,semanticURL:r,headers:i,debugInfo:u});h.caseViewMode=Gs.REVIEW_MODE,h.resourceType=rR.OBJECT,jg(h,s);const f=mI(p,h);o.containerItemID&&yI(f)&&t.push(zS(kS,{containerItemID:o.containerItemID,target:p})),t.push(f)}const g=n.insKey;wf({caseKey:g,actionInContext:c})},oR="OPEN_OBJECT_ACTION",iR=e=>{const{actionID:t,caseID:n,context:s,openActionType:r,modalLoadingContainer:a}=e,o=oI.FORM,i=p_(Ba,{objectID:n,actionID:t,viewType:o}),{reqType:c}=i;let{restApi:l}=i;e.actionType=Gs.RESOURCE_TYPES.OBJECT,l&&!l.includes("viewType=")&&(l=l.includes("?")?`${l}&viewType=${o}`:`${l}?viewType=${o}`);const u=a?.context??s;return ju(Kd(l,{method:c,headers:{}},u)).pipe(sh((t=>(Bs.analyseResponse(t.data),{response:t.data,actionInPayload:e,headers:cI(t.headers)}))),Ih(`: Error occurred during ajax call at ${r} Epic : `,u))},cR=async(e,t,{headers:n,actionInPayload:s})=>{const{context:r,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=s,l=um(e,{info:$s.OBJECT_INFO.OBJECT_INFO}),u=Rm(o,s),d=c?.target??Wa(u,r),{context:p,containerItemID:g,isNewContainerItem:h}=((e,t,n,s)=>{let r,a,o=!1;const i=zy(e);return!Yy(e)||i&&!by(e,s)?(a=Qs(t,n),xm(t)&&(a=er(n,a)),r=a,o=!0):(r=i?xy(e,s):Fy(e),a=ky(r)),{context:a,containerItemID:r,isNewContainerItem:o}})(d,u,r,e.data.objectInfo.ID),f={acName:d,target:d,containerName:u,context:p};await dI(l,s,f);const m=l.uiResources?.root,I=(e=>e?Gs.PERFORM_MODE:Gs.REVIEW_MODE)(m),E=uI(l,{target:d,context:p,containerItemID:g,caseViewMode:I,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:xm(u),resourceType:$s.RESOURCE_TYPES.OBJECT,isProcessAction:s.isProcessAction,showProgress:s.showProgress,progressMessage:s.progressMessage,actionType:s.actionType});if(m&&jg(E,l),xm(u)&&delete E.doDeleteCaseSummary,t.push(zS((e=>e?OS:MS)(h),E)),h||t.push(zS(US,E)),h){const r=Gy(s.contextName),a=xy(r,e.data.objectInfo.ID);if(a){const e={data:{objectInfo:{headers:n}},context:a};t.push(zS(AS,e))}}return g!==Fy(d)&&t.push(zS(VS,{target:d,containerItemID:g})),Bg(g)&&!c?.context&&RI(E,t),t},lR=e=>{e.openActionType=Ba;if(Rm(e.openActionType,e)===Gs.MODAL){const t=Rm(e.openActionType,e),n=Wa(t,e.context),s=er(e.context,Qs(t,e.context));return qC(OS({target:n,context:s,containerItemID:s,key:e.caseID,caseViewMode:Gs.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:Gs.getProperty(Gs.CASE_INFO.CASE_INFO_CONTENT),type:"view"}},data:{key:e.caseID,objectInfo:{ID:e.caseID}}})),qC(LS({context:s})),e.modalLoadingContainer={target:n,context:s},iR(e)}return iR(e)},uR=e=>{const{containerName:t,isInCreateStage:n}=e;return n?Gs.MODAL:t||wg.getTargetViewContainerName($a)},dR=(e,t)=>{const{class:n,context:s,viewType:r=oI.PAGE}=e,{removeActionPayload:a}=t,o=e?.pageName?e?.pageName:xA.getDefaultCasePage();return ju(rg.createCase(n,{...e,pageName:o,viewType:r,context:s,retrieveActionViewForNewObject:!0})).pipe(sh((({response:t,headers:n})=>(Bs.analyseResponse(t),{response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Ih("Error occurred during ajax call at createObject Epic : ",s))},pR="CREATE_EXTERNAL_OBJECT",gR=e=>{const{workId:t,context:n,isExternalCase:s}=e,r=s?ra:"deleteWork",{restApi:a,reqType:o}=p_(r,{ID:t});return ju(Kd(a,{method:o},n)).pipe(sh((t=>({response:t.data,actionInPayload:e,headers:cI(t.headers)}))),Ih("Error occurred during ajax call at deleteWork Epic : ",n))},hR=e=>{Ad.publish(Gs.PUB_SUB_EVENTS.WORK_EVENTS.WORK_DELETED,e)},fR=((...e)=>(t,n)=>new Au((s=>{const r=e.map((e=>e(t,n).subscribe(s)));return()=>{r.forEach((e=>e.unsubscribe()))}})))(...tD,...NO,...RO,...HO,...MO,...nD,...qO,...zO,...YO,...[JO,e=>{let t=0,n=[];return e.pipe(hh(sR),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const{context:n,isChild:s,viewType:r}=e,a=Rm(ka,e),o=Wa(a,n);return ju("none"!==r?CI(o,{loadingContext:n}):Promise.resolve({continueExecution:!0,removeActionPayload:void 0})).pipe(rh((({continueExecution:n,removeActionPayload:a})=>{if(!n)return vg.rejectActionByID(t),fh;const{activate:i,activateContainerActionPayload:c}=_I(rR.OBJECT,o,e);return i&&!s&&"none"!==r?ih({type:$r,activateContainerActionPayload:c,actionInPayload:e}):nR(e,{removeActionPayload:a})})))})),rh((async e=>{if(e&&Mm(e.type))return n.push(fI(e)),n;if("none"===e?.actionInPayload?.viewType){const t=zC(e?.actionInPayload?.context);if(t?.context_data?.caseViewMode!==Gs.PERFORM_MODE){const t=um(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:ya,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),n.push(zS(AS,s));const r=tA(e?.actionInPayload?.context),a=bm(e?.actionInPayload?.context),o=Object.freeze({target:r,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:a});if(Bg(e?.actionInPayload?.context)){const t=uI(e?.response,{...o});RI({...t,isArrayDeepMerge:!0},n)}}}else await aR(e,n);return n})),sh((()=>(qC(n),zm(n,t),n=[],n))))},tR,e=>{let t=0,n=[];return e.pipe(hh(oR),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>lR(e))),rh((async e=>{if(Mm(e.type)){const t=fI(e);n.push(t);const s=zC(e.payload.context);return s?.context_data?.isLoading&&n.push(zS(US,e.payload)),n}const{actionInPayload:t,headers:s,response:r}=e,{actionID:a}=t;return lS.setIn(r,"data.objectInfo.activeActionID",a),lS.setIn(r.data,Gs.getProperty(Gs.OBJECT_INFO_IS_LOCAL_ACTION),!0),t.refreshConditions&&lS.setIn(r.data,Gs.getProperty(Gs.CASE_INFO_REFRESH_CONDITIONS),t.refreshConditions),await cR(r,n,{headers:s,actionInPayload:t}),NP(t),n})),sh((()=>(qC(n),zm(n,t),n=[],n))))},e=>{let t=0,n=[],s=!1;return e.pipe(hh(pR),Eh(100),sh((e=>(({actionMgrID:t}=e.payload),e.payload))),rh((e=>{const{context:n}=e,r=uR(e),a=Wa(r,n);return s=!1,ju(cD(a,{loadingContext:n})).pipe(rh((({continueExecution:n,removeActionPayload:r,dirtyCheckPerformed:a})=>n?(s=a,dR(e,{removeActionPayload:r})):(vg.rejectActionByID(t),fh))))})),rh((async e=>{if(e&&e.type===br)return e.payload.context=EA(),n.push(fI(e)),n;const{actionInPayload:r,response:a,headers:o,removeActionPayload:i}=e,c=UD(r,a);lS.setIn(a.data,Gs.getProperty(Gs.CASE_INFO.IS_FIRST_ASSIGNMENT),!0);const l=uR({...r,isInCreateStage:c}),u=Wa(l,r.context),d=EI(u,l,r.context);if(!s&&!xm(l)&&qy(u)){const{continueExecution:e}=await CI(u,{loadingContext:r.context});if(!e)return vg.rejectActionByID(t),n}const p=um(a);let g=u_($a,{caseClassName:Fg(p)});g=g.replace(/{.+?}/,String(Fm(Vg(p)))),p.semanticURL=g,MD(p,r);const h={acName:u,context:d};await dI(p,r,h);const f={target:u,context:d,headers:o,semanticURL:g,caseViewMode:LD(p),containerItemID:d,isInCreateStage:c,isMinimizable:c,assignmentContext:lS.getIn(p,oD),nextAssignmentInfo:lS.getIn(p,aD),resourceType:$s.RESOURCE_TYPES.OBJECT,openCaseViewAfterCreate:r.openCaseViewAfterCreate,modalOptions:r.modalOptions,debugInfo:r.debugInfo,isExternalObjectCreationFlow:!0};jg(f,p);const m=uI(p,f),I=mI(u,m);return yI(I)&&$m(n,{removeActionPayload:i,target:u}),n.push(I),n})),sh((()=>(bI(n),zm(n,t),n=[],n))))},e=>{let t,n=0,s=[];return e.pipe(hh(Kg),sh((e=>(({actionMgrID:n,caseTypeID:t}=e.payload),e.payload))),rh((e=>{if(!e.skipDeleteConfirmation&&!e.ignoreWorkDeletion){const s=Cy.MODAL,r=Wa(s,e.context),a=er(e.context,Qs(s,e.context));return qC([zS(OS,{target:r,context:a,containerItemID:a,containerName:s,isDeleteConfirmation:!0,actionName:"Delete",workId:e.workId,caseTypeID:t,className:e.className,keys:e.keys,...e.enableBackNavigation&&{enableBackNavigation:!0},data:{caseInfo:{caseTypeID:t}}})]),vg.resolveActionByID(n),fh}return e.ignoreWorkDeletion?ih({actionInPayload:e}):gR(e)})),rh((async e=>{if(e&&Mm(e.type)){const{payload:t}=e;return s.push(fI({...e,...t,actionMgrID:n})),s}const{actionInPayload:t}=e,{context:r}=t;if(dD({content:FA().getLocaleValue("Deleted successfully!","Messages")}),r?.includes(Gs.PREVIEW)&&s.push(zS(PS,Xy({context:Gs.APP.APP,name:Gs.PREVIEW}))),r?.includes(Gs.MODAL)){const e=Cy.MODAL,t=Wa(e,r),n=Dy(t,r);n?.enableBackNavigation&&window?.history?.back()}return s})),sh((()=>(qC(s),zm(s,n)===Gs.PROMISE_VALUE.RESOLVE&&hR({caseTypeID:t}),s=[],s))))}]),mR=()=>e=>t=>{const{type:n="",payload:s={}}=t||{},{category:r,context:a,transientItemID:o}=s;"HTTP"!==r&&[wr,Gr,Mr,Hr,Ur,Br].includes(n)&&(jI(a||o),rd.removeContextTreeNode(a||o),n!==wr&&n!==Mr||-1===s?.target?.indexOf("modal")||Ad.publish($s.PUB_SUB_EVENTS.PEGA_EMBED_CUSTOM,n)),e(t)},IR={},ER=e=>{const t=lS.getIn(IR,[Gs.CONTEXT,e],[]),n=[];t.forEach((t=>{const s=t.substr(0,t.lastIndexOf("_")),r=lS.getIn(IR,[s,t],[]),a=r&&r.length>0&&r.indexOf(e);if(a>-1&&r.splice(a,1),!r||r&&0===r.length){lS.deleteIn(IR,[s,t]);const e=lS.getIn(IR,[s]);e&&0===Object.keys(e).length&&lS.deleteIn(IR,[s]),n.push({dataPageName:s,dataPageNameWithHash:t})}})),lS.deleteIn(IR,[Gs.CONTEXT,e]);const s=lS.getIn(IR,[Gs.CONTEXT]);(!s||s&&0===Object.keys(s).length)&&lS.deleteIn(IR,[Gs.CONTEXT]),n.length>0&&qC(QS({dataPagesToBeRemoved:n}))},yR=(e={},t)=>{Object.keys(e).forEach((n=>{const s=lS.getIn(e,[n],{});Object.keys(s).forEach((e=>{((e,t,n)=>{const s=lS.getIn(IR,[Gs.CONTEXT,n]);if(lS.getIn(IR,[e])){const s=lS.getIn(IR,[e,t],[]);lS.setIn(IR,[e,t],[...new Set([...s,n])])}else lS.setIn(IR,[e,t],[n]);s?lS.setIn(IR,[Gs.CONTEXT,n],[...new Set([...s,t])]):lS.setIn(IR,[Gs.CONTEXT,n],[t])})(n,e,t)}))}))},AR=()=>e=>t=>{(Array.isArray(t)?t:[t]).forEach((e=>{const{payload:{data:t={},context:n=null,childContainersContexts:s=[]}={},type:r}=e;if(((e,t)=>{t&&t.length>0&&(e===Hr||e===Mr)&&t.forEach((e=>{ER(e)}))})(r,s),r===wr||r===Dr||r===ma){const e=r===ma?t:t.shared;yR(e,n)}else r===Hr?(ER(n),yR(t.shared,n)):r===Mr&&ER(n)})),e(t)},{PUB_SUB_EVENTS:CR}=$s,SR=e=>t=>n=>{const{type:s,payload:{target:r,containerItemID:a,context:o,deleteContext:i,childContainersContexts:c=[],containerInfo:{newAccessedOrder:l,containerType:u}={newAccessedOrder:new Array,containerType:""},eventName:d}={}}=n;s===Mr&&((e,t,n,s,r,a)=>{const{resourceType:o,key:i,context:c}=lS.getIn(e.getState(),["containers",t,"items",n])||{},l={resourceType:o,key:i,context:c,containerItemID:n,...void 0!==s?{eventName:s}:{}};Ad.publish(CR.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,l),t===`${$s.APP.APP}/${Gs.PRIMARY}`&&a===Gs.CONTAINER_TYPE.MULTIPLE&&Ad.publish(CR.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:i,newAccessedOrder:r})})(e,r,a,d,l,u),((e,t)=>{t&&t.length>0&&(e===Hr||e===Mr)&&t.forEach((e=>{e&&Pf.cleanCaches(e)}))})(s,c),o&&(s===Hr||s===Mr&&i)&&Pf.cleanCaches(o),t(n)},_R=e=>e===`${Gs.APP.APP}/${Gs.MODAL}`,NR=(e,t,n,s,r)=>{var a;e&&t&&(_R(r)?(a={caseId:e,caseClass:n,context:s||""},Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_CASE_MODAL_OPEN,a)):(e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,e)})({caseId:e,caseClass:n,context:s||""}))},TR=(e,t)=>{var n;e&&(_R(t)?(n={caseId:e,caseClass:"",context:""},Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_CASE_MODAL_CLOSE,n)):(e=>{Ad.publish(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,e)})({caseId:e}))},DR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t){const{type:e,payload:n}=t,{target:s,key:r,context:a,data:o}=n||{};if((e=>e===`${Gs.APP.APP}/${Gs.PRIMARY}`)(s)||_R(s)){const t=o?.caseInfo?.ID,n=a||"",i=QC(Gs.CASE_INFO.CASE_INFO_ID,"",n)||"",c=o?.caseInfo?.caseTypeID||"";e!==Hr&&e!==Mr||TR(i,s),e!==wr&&e!==Hr||NR(r,!!t,c,n,s)}}e(t)},PR=()=>e=>t=>{const{payload:{context:n=null,transientItemID:s=null,clearStateMachine:r=!0}={},type:a}=t;n&&(a===wr||a===Gr||a===Hr||a===Mr)&&r&&(_p(n),Cp(n)),s&&a===jr&&(_p(s),Cp(s)),e(t)},OR=e=>lS.getIn(e,Gs.CASE_INFO.ASSIGNMENT_ID),RR=e=>{Object.keys(lf.subscribers).forEach((t=>{"COACH_UPDATE"===lf.subscribers[t].filter.matcher&&lf.subscribers[t].filter.criteria?.caseId===e&&lf.unsubscribe(t)}))},bR=(e,t)=>{if(n=t.target,n?.toString().includes(Gs.MODAL))return;var n;const{context:s,data:r,resourceType:a,caseID:o}=t;e===wr?((e,t,n)=>{if(n===Gs.RESOURCE_TYPES.ASSIGNMENT){const n=OR(t),s=lS.getIn(t,["caseInfo","ID"]);n&&s&&Lf({actionInContext:e,assignmentID:n,caseKey:s})}else if(n===Gs.RESOURCE_TYPES.CASE&&e?.includes("workarea")){const n=lS.getIn(t,["caseInfo","ID"]),s=OR(t);n&&s&&Lf({actionInContext:e,assignmentID:s,caseKey:n})}})(s,r,a):e===Gr?((e,t,n)=>{if(n!==Gs.RESOURCE_TYPES.ASSIGNMENT)return;const s=OR(zC(e)),r=OR(t),a=lS.getIn(t,["caseInfo","ID"]);s&&s!==r&&Uf({actionInContext:e,assignmentID:s,caseKey:a}),r&&a&&Lf({actionInContext:e,assignmentID:r,caseKey:a})})(s,r,a):e===Mr&&o?((e,t)=>{if(e?.includes("workarea")){const n=OR(zC(e));n&&Uf({actionInContext:e,assignmentID:n,caseKey:t})}else RR(t)})(s,o):e===Hr&&o&&((e,t,n,s)=>{if(e?.includes("workarea")){const t=OR(zC(e));t&&Uf({actionInContext:e,assignmentID:t,caseKey:s})}else RR(s);if(n===Gs.RESOURCE_TYPES.ASSIGNMENT){const n=OR(t);n&&Lf({actionInContext:e,assignmentID:n,caseKey:s})}})(s,r,a,o)},vR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t){const{type:e,payload:s}=t;"object"==typeof(n=s)&&null!==n&&bR(e,s)}var n;e(t)},xR=[yr,Cr,_r,"DELETE_CASE_IN_CREATE_STAGE",Nr,Tr],wR=new Set([wr,Hr,Gr,Mr,Ar,Oa,ar,Ea,...xR]),MR=(e,t)=>{if(!(e=>{const t=e?.data?.caseInfo?.settings?.autoSave;if(null!=t)return Boolean(t);const n=e?.containerItemID??e?.context;if(n){const e=QC("caseInfo.settings.autoSave",null,n);if(null!=e)return Boolean(e)}return!1})(t))return!1;const n=t.containerItemID||e,s=t.target||tA(n),r=Dy(s,n),a=t.resourceType||r?.resourceType,o=t.key||r?.key;return a===Gs.RESOURCE_TYPES.ASSIGNMENT&&Boolean(o)},LR=(e,t,n)=>{e===wr||e===Hr||e===Gr&&t.data?(YE(n)&&KE(n),e===Hr&&QE(n),MR(n,t)&&((e,t)=>{0===ME.size&&"undefined"!=typeof document&&(document.addEventListener("pointerdown",HE,{passive:!0}),document.addEventListener("keydown",qE,{passive:!0}),document.addEventListener("input",zE,{capture:!0,passive:!0})),ME.set(e,t)})(n,{containerName:t.containerName??""})):e===Mr&&(YE(n)&&KE(n),QE(n))},UR=(e,t)=>{if(e!==Mr||!t.includes(Gs.MODAL))return;const n=tr(t),s=`${n}/`;for(const e of jE)(e===n||e.startsWith(s))&&ZE(e)},FR=(e,t,n)=>{e!==Ar?e!==Oa?xR.includes(e)&&JE(n):(e=>{JE(e),jE.add(e)})(n):t.autosave||JE(n)},VR=()=>e=>t=>{if(t&&"object"==typeof t&&"type"in t&&"payload"in t&&"string"==typeof t.type&&wR.has(t.type)&&("object"==typeof(n=t.payload)&&null!==n)){const{type:e,payload:n}=t,s=((e,t)=>e===Nr?t.saveActionPayload?.containerItemID:e===Tr?t.saveContainerItemID??t.context:t.containerItemID??t.context)(e,n);s&&(UR(e,s),LR(e,n,s),YE(s)&&(((e,t)=>{if(t.context)e===ar?(Qp(t.context,null),XE(t.context)):e!==Ea||t?.isDefault||t?.skipDirtyValidation||XE(t.context)})(e,n),FR(e,n,s)))}var n;e(t)},jR=(()=>{const e=new lh;let t=null,n=null;const s=s=>(n=s,t=new gh(e.asObservable(),s.getState()),n=>r=>{const a=n(r);var o;return t?.next(s.getState()),"object"==typeof(o=r)&&null!==o&&"type"in o&&"string"==typeof o.type&&e.next(r),a});return s.run=s=>{if(!t||!n)throw new Error("Epic middleware must be added to the store before calling run().");return s(e.asObservable(),t).subscribe((e=>{n?.dispatch(e)}))},s})(),kR=e=>{if(null!==HC())return void oS();const t=[Iy.propertyChangeMiddleware,mR,AR,PR,jR,vR,VR,DR,SR],n=oT({reducer:HT(e),middleware:e=>e({serializableCheck:!1,thunk:!1}).concat(t),enhancers:e=>e().prepend(dT).concat(dT)});jR.run(fR),WC(n)},BR=["ar","arc","ckb","dv","fa","ha","he","khw","ks","ps","ur","yi"],$R=e=>BR.includes(e.split("-")[0])?"rtl":"ltr";const GR=async function(e){if(!e)return;const t=xA.getLocale();xA.setLocale(e);const n=xA.getLocale();if(n&&n!==t){if(R_(["lang"]),"undefined"!=typeof window){const e=new URL(window.location.href);e.searchParams.set("lang",n),window.history.replaceState(window.history.state,"",e.toString())}xA.isInfinityRuntime()&&await vA.loadLocaleBundle([n]),await MA(n),"undefined"!=typeof document&&(document.documentElement.lang=n,document.documentElement.dir=$R(n)),qC({type:Ca,payload:{locale:n}}),Ad.publish(Gs.PUB_SUB_EVENTS.EVENT_LOCALE_CHANGED,{locale:n,previousLocale:t})}};class WR{static EDIT_OPEN="edit_open";static EDIT_CLOSE="edit_close";static VIEW_OPEN="view_open";static VIEW_CLOSE="view_close";static caseCollabSubIds={};static init(e){e&&(this.collabConfig=e)}static dispatchCollaboratorAction=(e,t,n,s,r)=>{qC({type:"LIST_ACTION",payload:{instruction:e,context:t,referenceList:s,listIndex:n,content:r,skipDirtyValidation:!0}})};static handleCaseCollaboratorsUpdate(e,t){const n=t?.message??{},[s,r]=Object.entries(n)[0];if(s===xA.getOperatorIdentifier())return;const a={ID:s,state:r},o=QC(Gs.CASE_INFO.CASE_INFO_COLLABORATORS,"",e)||[],i=o.findIndex((e=>e.ID===s));if(-1!==i)"closed"===r?this.dispatchCollaboratorAction("DELETE",e,i,Gs.CASE_INFO.CASE_INFO_COLLABORATORS,null):this.dispatchCollaboratorAction("REPLACE",e,null,`${Gs.CASE_INFO.CASE_INFO_COLLABORATORS}[${i}]`,a);else{if("closed"===r)return;this.dispatchCollaboratorAction("INSERT",e,o.length,Gs.CASE_INFO.CASE_INFO_COLLABORATORS,a)}}static subscribeToCollaborators(e,t){const n=lf.subscribe({matcher:"CASE_COLLABORATOR",criteria:{caseId:e}},(e=>this.handleCaseCollaboratorsUpdate(t,e)));this.caseCollabSubIds[e]=n}static unsubscribeToCollaborators(e){lf.unsubscribe(this.caseCollabSubIds[e]),delete this.caseCollabSubIds[e]}static publishCaseEvent(e,t){lf.publishMessage({filter:{matcher:"CASE_COLLABORATOR",criteria:{caseId:t}},message:e})}static subscribeToEvent(e,t,n){let s=null;if(e===Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN||e===Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE?s=e=>this.publishCaseEvent(t,e):e===Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD?s=e=>{const{caseId:t,context:n}=e;this.caseCollabSubIds[t]||this.subscribeToCollaborators(t,n)}:e===Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD&&(s=e=>{const{caseId:t}=e;this.caseCollabSubIds[t]&&this.unsubscribeToCollaborators(t)}),!s)throw new Error(`Unhandled eventKey: ${e}`);Ad.subscribe(e,s,n)}static unsubscribeFromEvent(e,t){Ad.unsubscribe(e,t)}static subscribeToCaseEvents(){WR.collabConfig?.appEnabled&&WR.collabConfig?.portalEnabled&&(this.subscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,this.VIEW_OPEN,"case_view_open"),this.subscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,this.VIEW_CLOSE,"case_view_close"),this.subscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,this.EDIT_OPEN,"case_edit_open"),this.subscribeToEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,this.EDIT_CLOSE,"case_edit_close"))}static unsubscribeToCaseEvents(){WR.collabConfig?.appEnabled&&WR.collabConfig?.portalEnabled&&(this.unsubscribeFromEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_LOAD,"case_view_open"),this.unsubscribeFromEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_UNLOAD,"case_view_close"),this.unsubscribeFromEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_OPEN,"case_edit_open"),this.unsubscribeFromEvent(Gs.PUB_SUB_EVENTS.CASE_EVENTS.CASE_EDIT_CLOSE,"case_edit_close"))}}const HR=WR;const qR=new class{#S(e,t,n,s,r){let a=!1;return e.IncludeInURL&&void 0!==t&&(s[e.Key]=t,"portal"===e.Key&&t!==n&&(a=!0)),Array.isArray(e.IncludeInHeaders)&&void 0!==t&&e.IncludeInHeaders.forEach((n=>{r[n.Value]||(r[n.Value]=[]),r[n.Value].push(`${e.Key}=${t}`)})),a}#_(e,t,n){const s={},r={};let a=!1;return Array.isArray(e)&&e.forEach((e=>{const o=t[e.Key];this.#S(e,o,n,s,r)&&(a=!0)})),{urlParams:s,headerMap:r,isPortalChanged:a}}#N(e){const t=Rg.getComponentCache("lastActionID");return nf.truncateNamespace(e)===nf.truncateNamespace("string"==typeof t?t:(t??"").toString())}#T({message:e}){const{RequestContext:t,ActionName:n}=e;if(!this.#N(n))return;const s=JSON.parse(t),r=xA.environmentInfoObject?.requestContext,a=new URL(window.location.href).searchParams.get("portal"),{urlParams:o,headerMap:i,isPortalChanged:c}=this.#_(r,s,a);Rg.setURLParams(o),Object.entries(i).forEach((([e,t])=>{Vd.registerHeader(e,t.join("; "))})),Rg.setComponentCache("lastActionID",""),c&&globalThis.location.reload()}subscribeToGlobalEvents(){const e=lS.generateUniqueID(),t={matcher:"SWITCH_REQUEST_CONTEXT",criteria:{UserID:xA.getOperatorIdentifier()||""}};lf.subscribe(t,this.#T.bind(this),void 0,e)}},zR={publishConstellationLoadedEvent:()=>{Ad.publish(Gs.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const YR=new class{activateContainerItemOnSwitch(e){const t=`${Gs.APP.APP}/${Gs.PRIMARY}`,n={target:t,containerItemID:xy(t,e)};Dm({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${Gs.APP.APP}/${Gs.PRIMARY}`,n={target:t,containerItemID:xy(t,e)};Dm({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){const n=Dm({meta:{type:"PreviewViewContainer",config:{name:Gs.PREVIEW}},options:{context:Gs.APP.APP,target:"root/hybrid_preview"}});n.getPConnect().getContainerManager().resetContainers({name:Gs.PRIMARY,context:Gs.APP.APP}),Ly(Gs.APP.APP,Gs.PREVIEW)||n.getPConnect().getContainerManager().initializeContainers({type:"multiple",name:Gs.PREVIEW}),n.getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){Dm({}).getPConnect().getContainerManager().resetContainers({name:Gs.PREVIEW,context:Gs.APP.APP})}isFormDirty(e){const t=`${Gs.APP.APP}/${Gs.PRIMARY}`,n=CA(t,e);return LI.isStateModified(n)}getEventUtils(){return zR}getBroadcastUtils(){return rD}isTraditionalUICase(e){return Ym(e)}};const KR=class{static openCase(e,t=$s.APP.APP,n={}){return n.renderInline=!0,n.pageName?(xA.setDefaultCasePage(ks.getDefaultQualifiedName(n.pageName)),n.pageName=ks.getDefaultQualifiedName(n.pageName)):(xA.setDefaultCasePage(ks.getDefaultQualifiedName(Gs.PY_DETAILS)),n.pageName=ks.getDefaultQualifiedName(Gs.PY_DETAILS)),n?.disableAssignmentHeader?xA.disableAssignmentHeader(n.disableAssignmentHeader):xA.disableAssignmentHeader(!1),ef.openCase(e,t,Gs.PRIMARY,n)}static createCase(e,t=$s.APP.APP,n={}){return n.renderInline=!0,n.pageName?(xA.setDefaultCasePage(ks.getDefaultQualifiedName(n.pageName)),n.pageName=ks.getDefaultQualifiedName(n.pageName)):(xA.setDefaultCasePage(ks.getDefaultQualifiedName(Gs.PY_DETAILS)),n.pageName=ks.getDefaultQualifiedName(Gs.PY_DETAILS)),n?.disableAssignmentHeader?xA.disableAssignmentHeader(n.disableAssignmentHeader):xA.disableAssignmentHeader(!1),ef.createCase(e,t,Gs.PRIMARY,n)}static getNextWork(e=$s.APP.APP,t={}){return t.renderInline=!0,t.pageName?(xA.setDefaultCasePage(ks.getDefaultQualifiedName(t.pageName)),t.pageName=ks.getDefaultQualifiedName(t.pageName)):(xA.setDefaultCasePage(ks.getDefaultQualifiedName(Gs.PY_DETAILS)),t.pageName=ks.getDefaultQualifiedName(Gs.PY_DETAILS)),t?.disableAssignmentHeader?xA.disableAssignmentHeader(t.disableAssignmentHeader):xA.disableAssignmentHeader(!1),ef.getNextWork(e,Gs.PRIMARY,t)}static openAssignment(e,t=$s.APP.APP,n={}){return n.renderInline=!0,n.pageName?(xA.setDefaultCasePage(ks.getDefaultQualifiedName(n.pageName)),n.pageName=ks.getDefaultQualifiedName(n.pageName)):(xA.setDefaultCasePage(ks.getDefaultQualifiedName(Gs.PY_DETAILS)),n.pageName=ks.getDefaultQualifiedName(Gs.PY_DETAILS)),n?.disableAssignmentHeader?xA.disableAssignmentHeader(n.disableAssignmentHeader):xA.disableAssignmentHeader(!1),ef.openAssignment(e,t,Gs.PRIMARY,n)}static openPage(e,t,n=$s.APP.APP,s={}){const r=ir;s?.defaultCasePage?(xA.setDefaultCasePage(ks.getDefaultQualifiedName(s.defaultCasePage)),s.defaultCasePage=ks.getDefaultQualifiedName(s.defaultCasePage)):xA.setDefaultCasePage(ks.getDefaultQualifiedName(Gs.PY_DETAILS)),s?.disableAssignmentHeader?xA.disableAssignmentHeader(s.disableAssignmentHeader):xA.disableAssignmentHeader(!1);const a={viewName:e,className:t,acTargetName:Gs.PRIMARY,actionMgrID:vg.getNextActionMgrId(),context:n},{promise:o}=vg.actionManagerPromise(r,a.actionMgrID);return qC({type:r,payload:{...a}}),o}static getCurrentContextAPI(e,t=$s.APP.APP){return Dm({meta:{config:{}},options:{context:t,pageReference:e,containerName:Gs.PRIMARY}}).getPConnect()}};function QR(e){if(!e||"*"===e||"null"===e)return"";try{const t=new URL(e);return"https:"!==t.protocol&&"http:"!==t.protocol||"null"===t.origin?"":t.origin}catch{return""}}function JR(e){if(e.contentRect)return{height:e.contentRect.height};const t=Array.isArray(e.contentBoxSize)?e.contentBoxSize[0]:e.contentBoxSize;return"blockSize"in t?{height:t.blockSize}:"height"in t&&"number"==typeof t.height?{height:t.height}:{height:0}}const XR=new class{gadgetName="";resize=!1;parentOrigin="";boundOnMessage=this.onMessage.bind(this);init(e){if("undefined"==typeof window)return;const{resizing:t,parentOrigin:n}=e;this.gadgetName=window.name,this.resize="stretch"===t,this.parentOrigin="",n?this.parentOrigin=QR(n):document.referrer?this.parentOrigin=QR(document.referrer):this.parentOrigin=QR(function(){try{const{ancestorOrigins:e}=window.location;if(e&&e.length>0)return e[0]??""}catch{}return""}());const s=document.getElementsByTagName("app-root")[0];s.classList.add("mashup"),window.parent!==window&&this.resize&&this._registerResizeObserver(s)}send(e){const{action:t,message:n}=e,s=JSON.stringify({gadgetName:this.gadgetName,action:t,message:n});window.parent.postMessage(s,this.parentOrigin||window.location.origin)}_registerResizeObserver(e){new ResizeObserver((e=>{for(const t of e){const e=JR(t);this.send({action:"resize",message:e})}})).observe(e)}_updateUrl(e){window.history.pushState({},"home",e),PCore.configureForBrowserBookmark({semanticURL:"",context:Gs.APP.ROOT,acName:"primary"})}onMessage(e){if(!this.parentOrigin||e.origin!==this.parentOrigin)return!1;if("string"!=typeof e.data)return!1;let t;try{t=JSON.parse(e.data)}catch{return!1}return"UpdateUrl"===t.action&&this._updateUrl(t.message.url),!0}getMessageHandler(){return this.boundOnMessage}};"undefined"!=typeof window&&window.addEventListener("message",XR.getMessageHandler(),!1);const ZR={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},eb={type:"RootContainer",config:{renderingMode:"hybrid"},children:[{type:"HybridViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary",contextName:"app"},children:[]}]},tb="portal-less-styles";const nb=new class{createC11nEnv=e=>Dm(e);getContextUtils=()=>o;getRoutingManager=()=>i;getComponentsRegistry=()=>Do;getStateManager=()=>f;getActionCreators=()=>m;getStreamObservable=()=>u;getActionProcessor=()=>mS;getActionHandler=()=>fS;renderApp=(e,t)=>{const n={context:Gs.APP.APP},s={...lS.getIn(e,Gs.ROOT),options:n};kR(e),ng(e,n,!0);const r=this.createC11nEnv({meta:s,isRoot:!0});Ad.publish($s.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:r,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const{data:s,uiResources:r={}}=e,{root:a}=r,o=lS.getIn(r,Gs.CONTEXT_DATA),i=um(e);await dI(i,{},{},!1,!0);const c={...s,[Gs.CONTEXT_DATA]:o};sA(a,t,c,n)};fetchEndPointResource=(e,t,n)=>{Kd(e,{method:"GET"},Gs.APP.ROOT).then((e=>{200===e.status&&this.updateStoreWithUiRoot(e.data,t,n)}))};loadComponent=async(e,t,n)=>{await Sg(n);const s=this.createC11nEnv({meta:e,isRoot:!0});HC()||kR({}),Ad.publish($s.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};setStaticServerUrl=(e,t,n)=>{yg.initServer(e,t,n)};loadView=async(e,t,n=[])=>{cn();const s=um(e),r=lS.getIn(s,Gs.VIEWS),a=lS.getIn(s,Gs.NAVIGATIONS),o=lS.getIn(s,Gs.COMPONENTS)||[];o.push(...n);const i=lS.getIn(s,Gs.STATIC_SERVER_URL),c=lS.getIn(s,Gs.APPLICATION_DATA);r&&fC(r),a&&yC(a),(e=>{e&&(o_=e.pyLabel)})(c),i&&yg.initServer(i),await Sg(o,i),this.renderApp(s,t)};initAppShell=(e,t,n)=>{P_(e),wg.buildActionTargetMap(t),cn(n)};initRoutingTable=(e,t)=>{P_(e,!0),cn(t)};setAppAlias=e=>{yg.setAppAlias(e)};getHomeRestApi=e=>{const t=un(),{restApi:n}=d_("home",{portalName:e});return`${t}${n}`};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(T_()&&!t){const t=DA(),s=bA.processUrl(t,!0),r=bA._getMatchedRouteInRoutingTable(s)||"",a=bA.getRoutingInfo(),o=bA.processUrl(t,!1).split("/"),i=o[o.length-1],c=a?.routes?.[r]?.payload?.caseID?.replace("{workID}",i).replace("{id}",i);n=bA.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=bA.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return un()+n};loadRootComponent=async(e,t,n=[],s,r,a)=>{const{config:o}=t||{},i=o?.name;if(HC()||kR({}),a){const e=`${Gs.APP.ROOT}/${i}`;fA(e),hA().deleteContainerItem(e)}(hA().getContainerItems()||[]).length>1&&!i?.startsWith("hybrid_")&&"authoring-preview"!==i&&oS(),qC(AS({data:{},context:Gs.APP.ROOT}));const c=this.createC11nEnv({meta:t,options:{context:Gs.APP.ROOT,pageReference:"",target:`${Gs.APP.ROOT}/${i}`}}),l=c.getPConnect(),u=`${l.getContextName()}/${l.getContainerName()}`;Fy(u)||"noPortal"===o?.renderingMode||l.getContainerManager().initializeContainers({type:"single"});const d=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference","URL",...n];await Sg(d),Ad.publish($s.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:c,domContainerID:e,componentName:"RootContainer",portalTarget:s,styleSheetTarget:r})};loadViewByName=(e,t,n,s)=>{let r=this.getViewRestApi(e,n);r===un()&&(r=this.getHomeRestApi(t)),this.fetchEndPointResource(r,s)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{D_(e)};checkIfSemanticURL=()=>T_();onPCoreReady=e=>{Ad.subscribe($s.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};onPCoreCleanup=e=>{Ad.subscribe($s.PUB_SUB_EVENTS.EVENT_UNMOUNT_APP,e,"unmountAppCallback")};setFieldsDefaultConfigs=e=>{Lp.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{pn(e)};setFetchDefaultHeaders=e=>{ep(e)};setFetchAuthInfo=e=>{tp(e)};getCaseApi=()=>ef;getMashupApi=()=>KR;enableAppRouting=e=>{c_(e)};initStore=()=>kR({});getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`;return fetch(`${e}/api/application/v2/data_views/D_pxBootstrapConfig`,{method:"GET",headers:new Headers({Authorization:n})}).then((e=>e.json()))};getBootstrapConfigViaSB=async(e,t,n)=>{const s=n?`?dataViewParameters=${encodeURIComponent(JSON.stringify({themeID:n}))}`:"";return Kd(`${e}/api/application/v2/data_views/D_pxBootstrapConfig${s}`,{method:"GET",headers:new Headers(t)}).then((e=>{if(e.data)return e.data;throw Error("D_pxBootstrapConfig load failed.",{cause:e.status})}))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Dm({meta:ZR,options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};loadMashup=async(e,t=!0)=>{if(t){const t=document.querySelector(e)??document.getElementsByTagName(e)[0],n=t?.parentNode;if(n&&!document.getElementById(tb)){const e=document.createElement("style");e.id=tb,e.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",n.appendChild(e)}}await this.loadRootComponent(e,ZR,[Gs.LOAD_VIEW_STRING,"ViewContainer"]),globalThis.parent!==globalThis&&XR.init({resizing:"stretch"})};bootstrapWithAuthHeader=async(e,t,n=[],s,r)=>{const{customRendering:a=!1,onPCoreReadyCallback:o,staticContentServerUrl:i,dynamicSetCookie:c=!1,renderingMode:l,locale:u,envType:d,themeID:p,customCookies:g=!1,enableRouting:h}=e;let{restServerUrl:f,authInfo:m,authorizationHeader:I,appAlias:E,theme:y={}}=e,A=e.additionalHeaders?{...e.additionalHeaders}:{},C=null;const S=!I&&m&&!m.authType;if(m||(e.authInfo={},m=e.authInfo),(I&&0===Object.keys(m).length||g&&!S&&!m.authType)&&(m.authType="custom"),m.customCookies=g,!I&&m.tokenInfo?.access_token){const{tokenInfo:e}=m;I=`${e.token_type} ${e.access_token}`}if(m.tokenInfo?.csrf&&(A={...A,pzCTkn:m.tokenInfo.csrf}),E&&-1===E.indexOf("/")&&(E=`app/${E}`),"LAUNCHPAD"===d){A={...A,"X-Constellation-App":"Pega"},f=f.endsWith("/dx")?f:`${f}/dx`;const e=p?`?themeID=${p}`:"";globalThis.PCore&&(C=await this.getLPConfig(`${f}/api/application/v2/environmentInfo${e}`,I,A,g)),0===Object.keys(y).length&&C?.theme?.definition&&(y=JSON.parse(C.theme.definition).Theme)}else C=S?await this.preInitBootstrapConfig(e,E,A,p):await this.getBootstrapConfigExtended(E?`${f}/${E}`:`${f}`,I,A,p,g,u);const _=C?.pyConfigJSON?JSON.parse(C.pyConfigJSON):{...C};"LAUNCHPAD"===d&&await this.applyEnvironmentInfoResponse(_),_.restServerConfig=f,_.dynamicSemanticUrl=!1,_.dynamicSetCookie=c,_.enableRouting=!1,_.serviceConfig?Object.assign(_.serviceConfig,{contextPath:"",appAlias:E}):_.serviceConfig={contextPath:"",appAlias:E,staticContentServer:i,appStaticContentServer:"no-appstatic"},_.additionalHeaders={Authorization:I,...A},_.envType=d,_.dynamicLoadComponents=!a,_.dynamicSemanticUrl=!a,_.noHistory=!0,_.theme=y??{};const N=p&&_?.themeObject?_.themeObject:null;_.theme=N||y,_.renderingMode=l??_.renderingMode,_.locale=u||_.locale,e.semanticUrlArgs&&(_.semanticUrlArgs=e.semanticUrlArgs);const T=i||_.serviceConfig.staticContentServer;if(_.isSdk?(_.enableRouting=h,_.dynamicSemanticUrl=_.enableRouting,yg.initServer(i,"no-appstatic")):(_.serviceConfig.staticContentServer=T,_.serviceConfig.appStaticContentServer=_.serviceConfig.appStaticContentServer||"no-appstatic",yg.initServer(T,T)),"EMBED"===_.renderingMode&&m?.authentication_service&&"pega"!==m.authentication_service&&(_.routingInfo||(_.routingInfo={}),_.routingInfo.authServiceAlias=m.authentication_service),await ib.initCoreConfig(_),o&&Ad.subscribe($s.PUB_SUB_EVENTS.EVENT_RENDER_APP,o,"renderAppCallback"),"LAUNCHPAD"===_.envType&&"EMBED"===_.renderingMode&&xA.setIsWebEmbed(!0),m&&["OAuth2.0","custom"].includes(m?.authType)&&this.setFetchAuthInfo(m),!a){const e=xA.environmentInfoObject?.pyInfinityStaticService;let a=null;if(e){const e=await df.getDataAsync("D_pxGetComponentLibraryListAndMap","",{});Array.isArray(e.data)&&e.data.length>0&&(a=e.data)}const o=new Promise((async(e,t)=>{try{const t=async()=>{await this.importReactRoot(),e(!0)};Ad.subscribe("component-map-loaded",t),"ReactRoot"in Do.getLazyMap()&&e(!0)}catch(e){t(e)}}));await o,ib.initCoreContainers(),await this.loadRootContainerWithHybrid(t,n,s,r),a&&await Promise.all(a.map((({pyComponentMap:e,pxUpdateDateTime:t})=>yg.importCustomComponentMap(e,t))))}};loadRootContainerWithHybrid=(e,t=[],n,s)=>(t.push(Gs.CONTAINER_TYPE?.HYBRID||"HybridViewContainer",Gs.LOAD_VIEW_STRING),this.loadRootComponent(e,eb,t,n,s));getBootstrapConfigExtended=async(e,t,n,s,r,a)=>{const o={};s&&(o.themeID=s),a&&(o.locale=a);const i=`${e}/api/application/v2/data_views/D_pxBootstrapConfig${s||a?`?dataViewParameters=${encodeURIComponent(JSON.stringify(o))}`:""}`,c=t?{Authorization:t,...n}:n;return fetch(i,{method:"GET",headers:new Headers(c),credentials:t&&!r?"same-origin":"include"}).then((e=>{if(e.ok)return e.json();throw Error("D_pxBootstrapConfig load failed.",{cause:e.status})}))};getLPConfig=async(e,t,n,s)=>{const r=new Headers({...n,...t&&{Authorization:t}}),a=await fetch(e,{method:"GET",headers:r,credentials:t&&!s?"same-origin":"include"});if(!a.ok)throw new Error("environmentInfo load failed.",{cause:a.status});return a.json()};applyEnvironmentInfoResponse=async e=>{const{environmentInfo:t,pyCaseTypeList:n,theme:s,keyMapping:r}=e,{pxApplication:a,features:o,pxLocale:i}=t,c={simpleTable:{pageInstructionUUIDGeneration:!1},...o},l=Intl.DateTimeFormat().resolvedOptions().timeZone.toUpperCase(),u="ETC/UNKNOWN"===l?"America/New_York":l;e.environmentInfo={...t,pxApplication:{...a},features:c,pyCaseTypeList:n,pxLocale:{...i,pyTimeZone:u}},e.timezone=u;const d=Object.keys(e.environmentInfo);return{isEnvInfoValid:["pxOperator","pxLocale","pxApplication"].every((e=>d.includes(e))),theme:s,keyMapping:r,features:c}};importReactRoot=async()=>{const e=[];return Do.getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};preInitBootstrapConfig=async(e,t,n,s)=>{const{restServerUrl:r,customRendering:a=!1,staticContentServerUrl:o,dynamicSetCookie:i=!1,authInfo:c,renderingMode:l,locale:u,timezone:d="America/New_York",envType:p,theme:g={}}=e,h=s??null,f={restServerUrl:r,restServerConfig:r,dynamicSetCookie:i,enableRouting:!1,serviceConfig:{contextPath:"",appAlias:t,staticContentServer:o,appStaticContentServer:"no-appstatic"},additionalHeaders:{...n},envType:p,dynamicLoadComponents:!a,dynamicSemanticUrl:!a,noHistory:!0,themeIDObj:h,theme:h||g,renderingMode:l,locale:u,timezone:d,tokens:{C11NB2S:""}};return yg.initServer(o,"no-appstatic"),await ib.init(f),c&&["OAuth2.0","custom"].includes(c?.authType)&&this.setFetchAuthInfo(c),this.getBootstrapConfigViaSB(t?`${r}/${t}`:`${r}`,n,s)}};const sb=class{constructor(e){this.appAlias=e.appAlias,this.appAliasWithoutServlet=e.appAliasWithoutServlet,this.googleMapKey=e.googleMapKey,this.staticContentServer=e.staticContentServer,this.appStaticContentServer=e.appStaticContentServer??null,this.contextPath=e.contextPath,this.messagingService=e.messagingService??null,this.reAuthUrl=e.reAuthUrl??null}};const rb=class{constructor(e){this.routingInfo=e.routingInfo,this.actionModel=e.actionModel,this.additionalHeaders=e.additionalHeaders,this.tokens=e.tokens,this.semanticUrl=e.semanticUrl,this.queryParams=e.queryParams,this.noPortal=e.noPortal,this.portalTemplate=e.portalTemplate,this.timezone=e.timezone,this.noHistory=e.noHistory,this.viewName=e.viewName,this.theme=e.theme,this.fieldDefaults=e.fieldDefaults,this.restServerConfig=e.restServerConfig,this.dynamicLoadComponents=e.dynamicLoadComponents??!0,this.dynamicSemanticUrl=e.dynamicSemanticUrl??!0,this.enableRouting=e.enableRouting??!0,this.locale=e.locale,this.environmentInfo=e.environmentInfo,this.renderingMode=e.renderingMode??"FULL_PORTAL",this.remoteCaseMapping=e.remoteCaseMapping??{},this.envType=e.envType,this.serviceConfig=new sb(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false",this.enablePriorityAndUrgencyImprovements=e.enablePriorityAndUrgencyImprovements??!1,this.storePercentageAsDecimal=e.storeC11nPercentageAsDecimal??!1,this.collab=e.collab,this.requestContext=e.requestContext,this.pzencv1zzz=e.pzencv1zzz}},ab="@P .viewConfig";let ob=0;const ib=new class{async init(e){const t=new rb(e);c_(t.enableRouting),kR({}),Lp.updateFieldDefaults(t.fieldDefaults),Lp.setFieldDefault("Percentage","storePercentageAsDecimal",t.storePercentageAsDecimal),this.#D(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl});const{appAliasWithoutServlet:n,appAlias:s,googleMapKey:r,staticContentServer:a,appStaticContentServer:o}=t.serviceConfig;yg.setAppAlias(n||s),pn(r),yg.initServer(a,o,t.tokens.C11NB2S),qs.setRemoteCaseMapping(t.remoteCaseMapping),HR.init(t.collab),HR.subscribeToCaseEvents(),nf.subscribeToCaseEvents(),lf.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),t.initBroadcast&&YR.getBroadcastUtils().init(),Vd.setDefaultHeaders(t.additionalHeaders),Vd.setRequestContext(t.requestContext),"Infinity"===t.envType&&await this.loadEnvironmentInfoFromDataPage(t);const i={...t.environmentInfo,encCSRFToken:t.pzencv1zzz,renderingMode:t.renderingMode,...t.portalTemplate?{pyPortalTemplate:t.portalTemplate}:{}};i.pyCaseTypeList?.forEach((e=>{const t=e.pyWorkTypeImplementationClassName;t&&(e.localeReference=om(rm,t))})),i.features?.isNamespaceEnabled&&(t.additionalHeaders.Prefer="namespaced",Vd.setDefaultHeaders(t.additionalHeaders)),this.configureTheme(t.theme),xA.setCookieComplianceMethod(t.cookieComplianceMethod),xA.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),xA.setEnablePriorityAndUrgencyImprovements(t.enablePriorityAndUrgencyImprovements),xA.setEnvironmentInfo(i);const c=new URLSearchParams(window.location.search).get("lang")||t.locale||navigator.language||"en-US";xA.setLocale(c),"undefined"!=typeof document&&(document.documentElement.lang=c,document.documentElement.dir=$R(c)),FA().setTimezone(t.timezone),Rg.init(),"Infinity"!==t.envType&&qR.subscribeToGlobalEvents(),t.initBroadcast&&YR.getBroadcastUtils().init(),await MA()}configureTheme=e=>{if(e){const t=e.light,n=e.dark;void 0!==t&&void 0!==n?(this.#P(t),this.#P(n,{type:"dark"})):xA.setTheme(e)}};getBootstrapConfig=async(e,t)=>{const n=`${t.token_type} ${t.access_token}`,s=`${e}/api/application/v2/data_views/${ks.getDefaultQualifiedName("D_pxBootstrapConfig")}`;return(await fetch(s,{method:"GET",headers:new Headers({Authorization:n})})).json()};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Dm({meta:{type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfo:"@ROUTING_INFO",name:"primary"}}]},options:{context:"root",pageReference:"",target:"root"}});return n.getPConnect().getContainerManager().initializeContainers({type:t,name:"primary",context:"app"}),{props:{getPConnect:n.getPConnect}}};importReactRoot=async()=>{const e=[];return nb.getComponentsRegistry().getComponent("ReactRoot")?.modules?.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{fg(e)}catch(e){return void console.error("Design system load blocked: untrusted or malformed URL",e)}try{await((e,t="true")=>new Promise(((n,s)=>{if("undefined"==typeof document)return void s(new Error("document is not available in this environment"));const r=document.createElement("script");r.type="text/javascript",r.src=e,r.async="true"===t,r.onload=()=>n(void 0),r.onerror=()=>s(new Error("Failed to load resource from Design System")),document.body.appendChild(r)})))(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,s,r)=>{const a=new URLSearchParams(t),o="true"===n&&!!e,i=new URLSearchParams(window.location.search).get("lang");i&&!a.has("lang")&&a.set("lang",i);let c=null,l=null,u=null;if(e){const t=(e.startsWith("/")?e.substring(1):e).split("/");c=t[0]||null,l=t[1]||null,"assignments"===t[2]&&t[3]&&(u=t[3])}const d=[s];c&&d.push(c),l&&d.push(l),u&&d.push("assignments",u),o&&(a.has("noPortal")||a.append("noPortal","true"),l&&r&&a.append("view",r));const p=a.toString();return d.join("/")+(p?`?${p}`:"")};initCoreConfig=async e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:s,queryParams:r,noPortal:a,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:g,extras:h}=e,{appAlias:f,contextPath:m}=n,I=window.location,E=I.origin;let y=l??E;const A={};if(m&&(y+=m),f&&"LAUNCHPAD"!==g&&(y+=`/${f}`),e.restServerConfig=y,this.#O(),!0===d){const e=this.buildSemanticUrl(s,r,a,y,i);!o&&e&&"undefined"!=typeof window&&window.history.replaceState({},"home",e)}else if("HYBRID"!==p){const e=I.href,t=e.indexOf("?");t>0&&"undefined"!=typeof window&&window.history.pushState({},"home",e.substring(0,t)),A.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(A.dynamicLoadComponents=!1);let C=null;if(f){const e=f.indexOf("/app/");C=e>=0?f.substring(e+1):f}if((!1===A.dynamicSemanticUrl||!1===A.dynamicLoadComponents)&&PCore.setBehaviorOverrides(A),e.appAlias=C,c)if("object"==typeof c)e.theme=c;else try{e.theme=JSON.parse(c)}catch{e.theme={}}let S=I?`${I.protocol}//${I.host}`:t.domain;if("EMBED"===p)try{S=new URL(e.restServerConfig).origin}catch{}const _={...t,domain:S,searchParams:I?I.search:"",embedQueryParams:e.semanticUrlArgs};e.routingInfo=_,e.initBroadcast="true"===xA.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),h?.cspNonce&&(window.__webpack_nonce__=h.cspNonce),xA.setCaseLabelFirstInTitle(e.extras?.useDefaultBrowserTabTitle??!0),await this.init(e)};launchViewByName=async(e,t,n,s,r,a,o,i,c=[])=>{ob+=1;const l=i||`mashup${ob}`,u={type:"RootContainer",config:{viewConfig:ab,renderingMode:"view",name:l}};await nb.loadRootComponent(e,u,r,a,o),await this.loadCustomComponentLibrariesIfEnabled(c),nb.loadViewByName(t,n,s,l)};launchView=(e,t,n=[],s,r,a,o)=>{let i;ob+=1,i="hybrid"===o?`hybrid_${ob}`:o||`mashup${ob}`;const c={type:"RootContainer",config:{viewConfig:ab,renderingMode:"portal",name:i}};o===Gs.HYBRID&&bf.setRuntimeParam(Gs.HYRBID_ROOT_CONTAINERNAME,i),bf.setRuntimeParams(s),nb.loadRootComponent(e,c,n,r,a).then((()=>nb.updateStoreWithUiRoot(t,i,!1)))};launchPortal=async(e,t,n=`portal${ob+=1}`,s=[],r=[])=>{const a="LoadingComponent",o={type:"RootContainer",config:{viewConfig:ab,renderingMode:"portal",skeleton:a,name:n}},i=[...s,a];xA.isPortalLoaded=!0;try{return await nb.loadRootComponent(e,o,i),await this.loadCustomComponentLibrariesIfEnabled(r),nb.loadPortalView(t,n)}catch(e){throw console.error(`Failed to launch portal ${t}:`,e),e}};launchMashup=(e,t=!0,n=[])=>{const s={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t&&!document.getElementById("portal-less-styles")){const t=document.getElementsByTagName(e),n=t[0]?.parentNode;if(n){const e=document.createElement("style");e.id="portal-less-styles",e.textContent="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",n.appendChild(e)}}if((async()=>{await nb.loadRootComponent(e,s,[Gs.LOAD_VIEW_STRING,"ViewContainer"]),await this.loadCustomComponentLibrariesIfEnabled(n)})(),window.parent!==window){const e=yg.getStaticServerUrl();r(754)(`${e}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))}};loadEnvironmentInfoFromDataPage=async e=>{if("wss"===e.portalType&&(e.environmentInfo={...e.environmentInfo,features:{case:{createInModal:!1}}}),e.environmentInfo?.pyDataPages&&Array.isArray(e.environmentInfo.pyDataPages)){const t=e.environmentInfo.pyDataPages;setTimeout((()=>{this.loadDataPagesIntoEnvironmentInfo(t).catch((e=>{console.error("Error loading data pages into environment info:",e)}))}),Gs.PRIORITY.TRIVIAL)}};loadDataPagesIntoEnvironmentInfo=async e=>{if(!e?.length)return;const t=xA.environmentInfoObject;if(!t)return;const n=e.filter((({pyName:e,pyPath:t})=>!(!e||!t)||(console.warn("Invalid data page configuration: missing pyName or pyPath"),!1)));if(0===n.length)return;const s=await Promise.allSettled(n.map((async({pyName:e,pyPath:t})=>{try{return{pyPath:t,response:await df.getPageDataAsync(e,"",{})}}catch(t){return console.error(`Failed to load data page ${e}:`,t),null}}))),r=s.length;let a=!1;for(let e=0;e<r;e+=1){const n=s[e];if("fulfilled"===n.status&&n.value){const{pyPath:e,response:s}=n.value;this.setNestedProperty(t,e,s),a=!0}}a&&xA.setEnvironmentInfo(t)};#R(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}setNestedProperty(e,t,n){const s=t.startsWith(".")?t.slice(1):t;if(!s)return void("object"==typeof n&&null!==n&&Object.assign(e,n));const r=s.split("."),a=r.length;let o=e;for(let e=0;e<a-1;e+=1){const t=r[e],n=o[t];if(this.#R(n))o=n;else{const e={};o[t]=e,o=e}}o[r[a-1]]=n}start=async(e,t)=>{const{serviceConfig:{appStaticContentServer:n},ccV2LibId:s,environmentId:r,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:o}=e;await this.initCoreConfig(e);const i=xA.environmentInfoObject?.pyC11nDXCBDevURL,c="true"===a&&"other"!==o,l=async()=>{await this.importReactRoot();const e=[];i?e.push(yg.importCustomComponentMap("")):s&&e.push(yg.importCustomComponentMap(s)),c&&e.push(this.importDesignSystemComponentMap(n,r,o)),e.length&&await Promise.all(e),t?.()},u=nb.getComponentsRegistry();if("ReactRoot"in u.getLazyMap())return!0;return u.getComponent("ReactRoot")?(await l(),!0):new Promise((e=>{Ad.subscribeOnce("component-map-loaded",(async()=>{await l(),Ad.unsubscribe("component-map-loaded","component-map-loaded-id"),e(!0)}),"component-map-loaded-id")}))};registerForDebugInfo=e=>{if(xA.setPreviewMode(),!e)return;const t=({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];n&&e.postMessage({appDebugID:n})};Ad.subscribe("fetchSuccess",t,"fetchSuccess"),Ad.subscribe("fetchFailure",t,"fetchFailure")};toggleTracerHeaders=e=>{e.addEventListener("message",(e=>{const t=e?.data?.enableTracer;t?Sd.enableTracer():Sd.disableTracer()}))};loadEnvironmentInfo=async e=>{const t="Android"===window.pms?.device.systemName;if(e.theme&&!t)try{const t=JSON.parse(e.theme.definition),n=t.Branding,s=t.Theme;xA.setBrandingInfo(n),xA.setTheme(s)}catch{xA.setBrandingInfo({}),xA.setTheme({})}if(e.darkTheme&&!t){const t={type:"dark"};try{const n=JSON.parse(e.darkTheme.definition);xA.setBrandingInfo(n.Branding,t),xA.setTheme(n.Theme,t)}catch{xA.setBrandingInfo({},t),xA.setTheme(void 0,t)}}e.keyMapping&&xA.setKeyMapping(e.keyMapping),xA.setCookieComplianceMethod(e.cookieComplianceMethod??"none")};async loadCustomComponentLibrariesIfEnabled(e){e?.length>0&&xA.environmentInfoObject?.pyInfinityStaticService&&await this.loadCustomComponentLibraries(e)}async loadCustomComponentLibraries(e){const t=e.map((e=>this.importSingleCustomComponent(e)));await Promise.all(t)}importSingleCustomComponent(e){return"object"==typeof e&&"pyComponentMap"in e?yg.importCustomComponentMap(e.pyComponentMap,e.pxUpdateDateTime):yg.importCustomComponentMap(e)}#D(e,t,n){P_(e),wg.buildActionTargetMap(t),cn(n)}#O(){document.querySelectorAll('head link[rel~="icon"], head link[rel~="apple-touch-icon"]').forEach((e=>{e.setAttribute("href",e.href)}))}#P(e,t){if(null===e)return;if("object"==typeof e)return void xA.setTheme(e,t);let n;try{n=JSON.parse(e)}catch{return void xA.setTheme("dark"===t?.type?void 0:{},t)}xA.setTheme(n,t)}},cb={createViewRule:(e,t)=>{const{restApi:n,reqType:s}=p_("createViewRuleByID");return Kd(n,{method:s,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:s}=p_("getViewRuleByID",{ID:e});return Kd(n,{method:s},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:s,reqType:r}=p_("updateViewRuleByID",{ID:e});return Kd(s,{method:r,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:s}=p_("deleteViewRuleByID",{ID:e});return Kd(n,{method:s},t).then((e=>e.data))},getCalculatedFields:(e,t,n)=>{const{restApi:s,reqType:r}=p_("getCalculatedFieldsInViewByID",{caseID:e,viewID:t});return Kd(s,{method:r,body:{calculations:{fields:n}}}).then((e=>e.data))}},lb={"Content-Type":"application/json"},ub={addCaseFollower:(e,t,n)=>{const s={caseID:e},r=JSON.stringify({users:t.map((e=>({ID:e})))});return og("addCaseFollower",{body:r,queryPayload:s,headers:lb},n)},deleteCaseFollower:(e,t,n)=>og("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>og("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},db={addRelatedCases:(e,t,n)=>{const s={caseID:e},r=JSON.stringify({cases:t});return og("addRelatedCases",{body:r,queryPayload:s},n)},removeRelatedCase:(e,t,n)=>og("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>og("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},pb="operatorDetails",gb={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=p_(pb,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return og(pb,{queryPayload:t})}return t?og("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):og(pb,{body:{dataViewParameters:{ID:e}}})}},hb="postCustomFeedMessages",fb={"Content-Type":"application/json"};const mb=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,s,r,a,o)=>{const i=a.getLocalizationService();o||(this.mentions=[]);let c="";s&&Array.isArray(s)&&s?.length>0&&(s.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=a.getValue("pulse.pageLastEntry"));const u={filterForContext:"pyDataFeed"===t?encodeURIComponent(e):e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<r.length;e+=1)r[e].cancel();const d=lg();return r.push(d),og("getFeedMessages",{queryPayload:u,cancelTokenSource:d},a.getContextName()).then((async t=>{if(200!==t.status||!t.data)return a.reportError(`getFeeds call failed ${t.status}`,t.data),t;{r.pop();const n=[],c={};let l=!1,u=[];if(t?.data){if(u=Array.isArray(t.data.data.MessageTypes)&&t.data.data.MessageTypes.length?t.data.data.MessageTypes:[],t?.data?.data?.FeedList){const e=t.data.data.FeedList?.pxResults;Array.isArray(e)&&e?.length>0&&e.forEach(((e,t)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${t}`,n.push(e.ID),c[e.ID]=e,e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(...e.mentions)})),l||["pzPostDetails","pzPrivatePostDetails"].includes(e.pyMessageViewReference)||(l=!0)}))}if(l&&await dm({uiResources:t.data.uiResources}),!s&&(s=[{id:"All",label:i.getLocalizedText("All"),on:!0,disabled:!1}],t?.data?.data?.FeedFilters)){const e=t.data.data.FeedFilters?.pxResults;let n=!0;if(e&&Array.isArray(e)&&e?.length>0){e.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i.getLocalizedText(e.pyLabel),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),s.push(t)}));const t=s.find((e=>"All"===e.id));t&&(t.on=n)}}}if(o&&a.getValue("pulse.messageIDs")){let e=a.getValue("pulse.messages");e={...e,...c},Object.values(e).forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(e.mentions),e?.pxResults&&Array.isArray(e?.pxResults)&&e.pxResults?.length>0&&e.pxResults.forEach((e=>{e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0&&this.mentions.push(...e.mentions)}))}))}if(vy(a.getContextName())){a.updateState({pulse:{messages:o&&a.getValue("pulse.messageIDs")?{...a.getValue("pulse.messages"),...c}:c,messageIDs:o&&a.getValue("pulse.messageIDs")?[...a.getValue("pulse.messageIDs"),...n]:n,nextPageFirstEntry:t?.data?.nextPageFirstEntry||"",pageLastEntry:t?.data?.pageLastEntry||"",hideAttachment:t?.data?.hideAttachment||!1,postTypes:u,pulseContext:e}});const r=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()].filter((e=>Object.hasOwn(e,"mentionsType"))).filter((e=>!e?.mentionsType?.toLowerCase().includes("user")));return{feedFilters:s,caseMentions:r}}}})).catch((e=>{if(!ug(e))return a.reportError(": Error occurred during ajax call at getFeeds API : ",e.response),e.response}))};postMessage=(e,t,n,s=[],r=!1,a=[])=>{const o={message:t,context:e,parentMessageId:r?e:"",attachments:s,pyRecipients:a.length?a:void 0},i=0===a.length?{body:JSON.stringify(o),headers:fb}:{body:JSON.stringify(o),queryPayload:{type:"PegaSocial-Post-Private"},headers:fb};return og(a.length?hb:"postFeedMessages",i,n.getContextName()).then((t=>{if((201===t.status||200===t.status)&&t.data){const a=t?.data;if(r){a.parentMessageID=e;const{pxResults:t,caseMentions:o}=this.buildMessageObject(a,r,n,s.length>0);return n.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(a,r,n,s.length>0);return n.updateState({pulse:{messages:o,messageIDs:i}}),c}return n.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postMessage API : ",e.response),e.response}))};postCustomMessage=(e,t,n)=>og(hb,{body:t,queryPayload:{type:e},headers:fb},n.getContextName()).then((async e=>{if(201===e.status&&e.data){const s=e.data.data,r={ID:s.ID,pzInsKey:s.ID,classID:s.classID,pyPostType:s.pyPostType,postedByUser:s.postedByUser,pyIsDeleteEnabled:s.pyIsDeleteEnabled,pyMessageViewReference:s.messageViewReference,pyFeed:{pyIconType:"user",pyCommentContext:s.pyCommentContext,pyPostedOn:s.postedTime,pyFeedTitle:s.postedByUser.name,pyIconReference:s.postedByUser.ID},...s.PostMessage};pm(s.messageViewReference,n,t.context)||await dm({uiResources:e.data.uiResources}),n.updateState({pulse:{messages:{[r.ID]:r,...n.getValue("pulse.messages")},messageIDs:[r.ID,...n.getValue("pulse.messageIDs")]}})}return n.reportError(`postCustomMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw n.reportError(": Error occurred during ajax call at postCustomMessage API : ",e.response),e.response}));editMessage=({messageID:e,parentMessageID:t,message:n,pConnectObj:s,isReply:r=!1,recipients:a=[]})=>{const o=JSON.stringify({message:n,...a.length&&{pyRecipients:a}});return og("editFeedMessage",{queryPayload:{messageID:e},body:o,headers:fb},s.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(r){n.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(n,r,s,!1);return s.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(n,r,s,!1);return s.updateState({pulse:{messages:a}}),o}return s.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{throw s.reportError(": Error occurred during ajax call at editMessage API : ",e.response),e.response}))};buildMessageObject=(e,t,n,s=!1)=>{const r={ID:e?.ID||"",classID:e?.classID||"PegaSocial-Message",tags:e?.tags||[],pyHasAttachment:s,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsDeleteEnabled:e?.pyIsDeleteEnabled||!1,pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:e?.pyCommentContext||".pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:e?.messageViewReference||"pzPostDetails",pyPostType:e?.pyPostType,pyRecipients:e?.pyRecipients?.length?e.pyRecipients:void 0},a=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(a)?.find((e=>e?.ID===r?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===r?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...r},e=n}else e=[...e,r];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(r.ID)?{...a[r.ID],...r}:r,t={...a,[r.ID]:e};return{messages:t,messageIDs:o.includes(r.ID)?o:[r.ID,...o],caseMentions:this.getCaseMentions(Object.values(t))}}};getCaseMentions=e=>{const t=e?.filter((e=>e?.mentions&&Array.isArray(e?.mentions)&&e.mentions?.length>0))?.map((e=>e.mentions))?.concat(this.mentions);return[...new Map(t.flat()?.map((e=>[e.mentionsID,e]))).values()].filter((e=>Object.hasOwn(e,"mentionsType"))).filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:s,pConnectObj:r})=>{const a=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});og(a,{body:o,queryPayload:{pulseContext:e},headers:fb},r.getContextName()).then((a=>{if(200===a.status)if(s){const s=r.getValue(`pulse.messages.${n}`),a=s?.pxResults&&Array.isArray(s?.pxResults)&&s.pxResults?.length>0&&s.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,s=!1;const r=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=r-1,s=!1):(e=r+1,s=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:s}}return n}));r.updateState({pulse:{messages:{[n]:{pxResults:a}}}})}else{const s={...r.getValue(`pulse.messages.${n}`)},a=s.pyLikes?s.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),s.pyLikes={pxLikeCount:o,pxIsLiked:i},r.updateState({pulse:{messages:{[e]:s}}})}else r.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{r.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,s)=>{let r=e;t&&(r=n);og("deleteFeedMessage",{queryPayload:{messageID:r}},s.getContextName()).then((r=>{if(200===r.status)if(t){const t=s.getValue(`pulse.messages.${e}`),r=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));s.updateState({pulse:{messages:{[e]:{pxResults:r}}}})}else{const t=s.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),r={...s.getValue("pulse.messages")};delete r[e],s.updateState({pulse:{messageIDs:n,messages:r}})}else s.reportError(`deleteMessage call failed with status ${r.status}`,r)})).catch((e=>{s.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>og("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName());getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:s,mentionsType:r,listSize:a=5}=e,o={pulseContext:n,searchFor:s,mentionsType:r,listSize:a};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=lg();return this.mentionsTagsCancelTokenSource.push(i),og("getMentionSuggestions",{queryPayload:o,cancelTokenSource:i},t.getContextName()).then((e=>(this.mentionsTagsCancelTokenSource=[],200===e.status&&e.data?e?.data:(t.reportError(`Get mention suggestions call failed ${e.status}`,e.data),[])))).catch((e=>{ug(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>og("getMentionTypes",{},e.getContextName());getPostTypeView=(e,t,n)=>og("getViewRuleByMessageType",{queryPayload:{type:e,contextID:n??""}},t.getContextName());getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:s=5}=e,r={searchFor:n,listSize:s};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const a=lg();return this.mentionsTagsCancelTokenSource.push(a),og("getTagSuggestions",{queryPayload:r,cancelTokenSource:a},t.getContextName()).then((e=>{this.mentionsTagsCancelTokenSource=[];let n=[];return 200===e.status&&e?.data?n=e?.data?.tags&&Array.isArray(e?.data?.tags)&&e.data.tags.length>0&&e.data.tags?.map((e=>`#${e}`)):t.reportError(`Get tag suggestions call failed ${e.status}`,e.data),n})).catch((e=>{ug(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},Ib={getTaggedCases:(e,t)=>{const n={caseID:e,viewID:ks.getDefaultQualifiedName("pyTaggedCases")};return og("loadView",{queryPayload:n},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)}))},getTags:(e,t)=>og("getCaseTags",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.tagsList)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTags API : ",e.response)})),postTags:(e,t,n)=>{const s={caseID:e},r=JSON.stringify({tags:t});return og("addTagsToCase",{body:r,queryPayload:s},n.getContextName()).then((e=>e?.data?.results)).catch((e=>{n.reportError(": Error occurred during ajax call at postTags API : ",e.response)}))},removeTag:(e,t,n)=>og("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>{const t=ks.getDefaultQualifiedName("D_pxGetTagsLandingPageURL");return df.getPageDataAsync(t,e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))}},Eb=(e,t)=>{mA(t.getContextName(),e.etag),IA(t.getContextName(),e.etag)},yb={getParticipants:(e,t)=>og("getAllParticipants",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.data.content.pyParticipants)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipants API : ",e.response)})),getRoleView:(e,t,n)=>og("getParticipantRoleView",{queryPayload:{caseID:e,participant_roleID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getParticipantRoles:(e,t)=>og("getParticipantRoles",{queryPayload:{caseID:e}},t.getContextName()).then((e=>e?.data?.participant_roles)).catch((e=>{t.reportError(": Error occurred during ajax call at getParticipantRoles API : ",e.response)})),getParticipant:(e,t,n)=>og("getParticipant",{queryPayload:{caseID:e,participantID:t}},n.getContextName()).then((e=>e?.data)).catch((e=>{n.reportError(": Error occurred during ajax call at getParticipant API : ",e.response)})),createParticipant:async(e,t,n,s,r)=>{const a={caseID:e},o={...n,participantRoleID:t},i={"if-match":s.getCaseSummary().headers.etag};return new Promise(((e,t)=>{og("createParticipant",{body:o,queryPayload:a,headers:i},s.getContextName()).then((t=>{Eb(t.headers,s),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=QI(r||s.getContextName());s.reportError(": Error occurred during ajax call at createParticipant API : ",{...e.response.data,formFields:n},r),t(e.response)}))}))},updateParticipant:async(e,t,n,s,r)=>{const a={caseID:e,participantID:t},o={"if-match":s.getCaseSummary().headers.etag};return new Promise(((e,t)=>{og("updateParticipant",{body:n,queryPayload:a,headers:o},s.getContextName()).then((t=>{Eb(t.headers,s),e()})).catch((e=>{e.response.data.errorDetails?.forEach((e=>{e.erroneousInputOutputFieldInPage=e.erroneousInputOutputFieldInPage.replace(/\.pyWorkParty\([^)]*\)/,"")}));const n=QI(r||s.getContextName());s.reportError(": Error occurred during ajax call at updateParticipant API : ",{...e.response.data,formFields:n},r),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const s={caseID:e,participantID:t},r={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{og("deleteParticipant",{queryPayload:s,headers:r},n.getContextName()).then((t=>{Eb(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function Ab(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const Cb="create",Sb="update",_b="delete";function Nb(e,t,n,s){const r=TC(t);if(r){switch(e){case Cb:case Sb:{const{markAsDefault:e,...t}=s;Object.entries(t).length>0&&(r.allPersonalizations[n]=t),e&&(r.defaultPersonalization=n);break}case _b:delete r.allPersonalizations[n],r.defaultPersonalization===n&&(r.defaultPersonalization="");break;default:return null}return r}return null}const Tb={},Db=async e=>{const t=TC(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=Ab(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:s}=p_("getUIListPersonalizations",{listID:e});return Kd(n,{method:s,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:Ab(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},Pb=async(e,t,n)=>{const{restApi:s,reqType:r}=p_("createListPersonalization",{listID:e});return Nb(Cb,e,t,n),Kd(s,{method:r,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return Tb[t]=n,e}))},Ob=async(e,t,n)=>{const s=Tb[t]||t;Nb(Sb,e,t,n);const{restApi:r,reqType:a}=p_("updateListPersonalization",{listID:e,personalizationID:s})||{};return Kd(r,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},Rb=async(e,t)=>{const n=Tb[t]||t;Nb(_b,e,t);const{restApi:s,reqType:r}=p_("deleteListPersonalization",{listID:e,personalizationID:n});return Kd(s,{method:r,body:{}}).then((e=>(Tb[t]&&delete Tb[t],e)))};const bb=function(e){return e?{createPersonalization:Pb.bind(null,e),updatePersonalization:Ob.bind(null,e),deletePersonalization:Rb.bind(null,e),fetchPersonalizations:Db.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},vb="undefined"!=typeof window?window.sessionStorage:{getItem:()=>null,setItem:()=>{}},xb="getDataObjects",wb="getInsightByID",Mb=["LocalList","RemoteList","PromptList","DataPage"];let Lb=null;const Ub=[];const Fb={},Vb=e=>Dh.getAppCacheKey(`PrimaryFields-${e}`);function jb(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}function kb(e){return"object"==typeof e&&null!==e}function Bb(e){return{...e[1],fieldID:e[0],fieldType:e[1].fieldType||(e[1].isUserReference?"User reference":void 0),category:jb(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID}}function $b({data:e}){const t=(e,t)=>om("FIELD",e,t),n="string"==typeof e.classID?e.classID:"",s=om("CASE",n);e.classNameLocaleReference=s;const r=Array.isArray(e.fields)?e.fields:[];for(let e=0;e<r.length;e+=1){const n=r[e];if(kb(n)){const e={nameLocaleReference:"INSIGHTS",categoryLocaleReference:"INSIGHTS",parentCategoryLocaleReference:"INSIGHTS"},r=n.definedOnClassIDs;if("string"==typeof r){const a=r.split(":").reverse(),o="string"==typeof n.fieldID?n.fieldID:"",i=o.split("!").pop()?.split(":").reverse()||[];a[0]&&i[0]&&(e.nameLocaleReference=t(i[0],a[0])),a[1]&&i[1]&&(e.categoryLocaleReference=t(i[1],a[1])),a[2]&&i[2]?e.parentCategoryLocaleReference=t(i[2],a[2]):n.parentCategory&&(e.parentCategoryLocaleReference=s)}Object.assign(n,e)}}return{data:e}}const Gb={getDataObjects:function(){const e=Dh.getAppCacheKey(xb);if(vb.getItem(e))return Promise.resolve(JSON.parse(`${vb.getItem(e)}`));const{restApi:t,reqType:n}=p_(xb,{}),s=Kd(t,{method:n});return s.then((t=>{vb.setItem(e,JSON.stringify(t))})),s},getDataPageObjects:function(e=!0){if(Lb)return Lb;const t=Dh.getAppCacheKey("getDataPageObjects");if(e&&vb.getItem(t))return Promise.resolve(JSON.parse(`${vb.getItem(t)}`));const{restApi:n,reqType:s}=p_("getDataPages",{datapageRequestType:"explorable"});return Lb=Kd(n,{method:s,datapageRequestType:"explorable"}),Lb.then((e=>{Lb=null,vb.setItem(t,JSON.stringify(e))})),Lb},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=NC(e);if(t&&t.classID){let e=PC(t.classID);const n=t.rdFields,s=(n&&!Array.isArray(n)?n.fields:void 0)?.filter((e=>e.indexOf(".")>0));if(s&&!lS.isEmpty(s)){const n=s.reduce(((e,n)=>{const s=hC(n,t.classID);var r;return s&&"type"in(r=s)&&"classID"in r&&(e[n]=s),e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){for(const t of Object.keys(e))e[t].type.startsWith("Page")?delete e[t]:e[t]?.datasource&&Mb.includes(e[t].datasource.tableType)&&(e[t].fieldType="Picklist");return{sourceFields:e,sourceMetadata:t}}}return{}}(e);if(t&&n&&Object.keys(n).length>0){const e={...t,fields:Object.entries(n).map(Bb)};if(kb(s=e)&&"string"==typeof s.classID&&Array.isArray(s.fields)){const t=$b({data:e});return Promise.resolve(t)}}}var s;const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Nf.init(r).then((({dataSourceMetaData:e})=>e?$b({data:e}):{data:{classID:"",className:"",isQueryable:!1,fields:[]}}))},getDefaultColumns:function(e){const t=Dh.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(vb.getItem(t))return Promise.resolve(JSON.parse(`${vb.getItem(t)}`));const n={dataViewName:ks.getDefaultQualifiedName("D_pzGetDefaultColumns")},{restApi:s,reqType:r}=p_("getListData",n),a=Kd(s,{method:r,body:{dataViewParameters:e}});return a.then((e=>{vb.setItem(t,JSON.stringify(e))})),a},getFieldsForDataSource:function(e,t,n){if(!t){const t=NC(e),n=Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields;return n?Promise.resolve({data:{data:n.map((e=>({pyFieldName:e})))}}):Promise.resolve({data:{data:[]}})}const s=Dh.getAppCacheKey(`RDColumns-${e}`);if(vb.getItem(s))return Promise.resolve(JSON.parse(`${vb.getItem(s)}`));const r=Dh.getData(ks.getDefaultQualifiedName("D_pxFieldsForDataSource"),{dataViewParameters:{DataPageName:e}},n);return r.then((e=>{vb.setItem(s,JSON.stringify(e))})),r},getPrimaryFieldsForDataSource:function(e="",t=""){const n=Dh.getAppCacheKey(`PFColumns-${e}${t}`);if(vb.getItem(n))return Promise.resolve(JSON.parse(`${vb.getItem(n)}`));const s=Dh.getData(ks.getDefaultQualifiedName("D_pxGetInitialFieldsForDataSource"),{dataViewParameters:{DataPageName:e,ClassName:t}});return s.then((e=>{vb.setItem(n,JSON.stringify(e))})),s},getPrimaryFieldsForInsights:async function(e,t,n,s){const{allClasses:r,promisesToAwait:a,classesToFetch:o,isTopLevelClassPresent:i,joinedClassesToFetch:c}=function(e,t){const n=[],s=[];let r=!1;const a=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=Vb(t);if(vb.getItem(o))return;const i=Fb[t];i?s.push(i):(n.push(t),t===e?r=!0:a.push(t))})),{allClasses:o,promisesToAwait:s,classesToFetch:n,isTopLevelClassPresent:r,joinedClassesToFetch:a}}(e,n);return o.length&&a.push((async(e,t,n,s,r)=>{const a=Dh.getData(ks.getDefaultQualifiedName("D_pxGetPrimaryFieldsForInsights"),{dataViewParameters:{...t&&{topLevelClassID:t},...s&&{joinedClassIDs:s.join(",")},...n&&{topLevelDataPageID:n}}},r).then((t=>{const n=t.data?.data||[],s={};e.forEach((e=>{s[e]=[]})),n.forEach((e=>{const t=e.classID,n=e[ks.getDefaultQualifiedName("pyFieldName")];s[t].push(n)})),Object.entries(s).forEach((([e,t])=>{const n=Vb(e);vb.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete Fb[e]}))}));return e.forEach((e=>{Fb[e]=a})),a})(o,i?e:void 0,i?t:void 0,c.length>0?c:void 0,s)),Promise.allSettled(a).then((()=>{const e={};return r.forEach((t=>{const n=Vb(t);if(vb.getItem(n))try{e[t]=JSON.parse(`${vb.getItem(n)}`)}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=p_("getInsightIDs");return Kd(e,{method:t})},getInsightByID:function(e){const t=DC(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:s,reqType:r}=p_(wb,n);return Kd(s,{method:r})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:s}=p_(wb,t);return Kd(n,{method:s})},loadClassResources:async e=>{const t=e.filter((e=>!Ub.includes(e)));if(0===t.length)return;const n={classIDs:e.join(",")},{restApi:s,reqType:r}=p_("getClassResources",n);return Kd(s,{method:r}).then((e=>{e.data.resources&&(Ub.push(...t),eg(e.data.resources))}))},createInsight:function(e){const{restApi:t,reqType:n}=p_("createInsight");return Kd(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:s,reqType:r}=p_("updateInsight",n);let a;return"UpdateDateTime"in t&&(a=t.UpdateDateTime),Kd(s,{method:r,body:JSON.stringify(t),headers:{"if-match":a,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:s}=p_("deleteInsight",t);return Kd(n,{method:s})},exportToExcel:function(e){const{restApi:t,reqType:n}=p_("exportToExcel");return Kd(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=p_("exportToCSV");return Kd(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:s,reqType:r}=p_("scheduleInsight",n);return Kd(s,{method:r,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const s={insightID:e,scheduleID:t},{restApi:r,reqType:a}=p_("updateScheduledInsight",s);return Kd(r,{method:a,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:s,reqType:r}=p_("deleteScheduledInsight",n);return Kd(s,{method:r})},translateStrings:function(e){const{restApi:t,reqType:n}=p_("translateStrings");return Kd(t,{method:n,body:JSON.stringify(e)})}};const Wb=new class{addRoutes=e=>{return t=e,void bA.addRoutes(t);var t}};const Hb=class{static registerModule(e,t,n){n[e]=()=>t}};const qb=class{static getCaseEvent=()=>Object.freeze($s.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze($s.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze($s.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze($s.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS);static getBulkProcessEvent=()=>Object.freeze($s.PUB_SUB_EVENTS.EVENT_BULKACTION);static getLocalActionProcessEvent=()=>Object.freeze($s.PUB_SUB_EVENTS.EVENT_LOCALACTION_SUBMISSION)};const zb=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},Yb={setTokens:e=>{tp({tokenInfo:e}),ep(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>Ad.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Td(),getAuthInstance:e=>Nd.init(e),setAuthorizationHeader:e=>{ep({Authorization:e}),setTimeout((()=>Ad.publish("updateSession",{updateStatus:"success"})),0)}};const Kb=new class{getDebouncedSubject(e){return(new lh).pipe(LO(e))}},Qb=(()=>{const e="[!#-'*+/0-9=?A-Z\\^_`a-z{|}~\\-]+",t="\\\\[\\x00-\\x7f]",n=`(?:${e}|${`"(?:[^\\r"\\\\\\x80-\\xff]|${t})*"`})`,s=`(?:${e}|${`\\[(?:[^\\r\\[\\]\\\\\\x80-\\xff]|${t})*\\]`})`;return new RegExp(`^${`${n}(?:\\.${n})*`}@${`${s}(?:\\.${s})*`}$`)})();const Jb=(()=>{const e="[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+";return new RegExp(`^${`${`(?:${`${e}(?:\\.${e})*`}|"(?:[^\\x0d\\x22\\x5c]|\\\\[\\x00-\\x7f])+")`}@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?\\.)+[A-Za-z]{2,63}`}$`)})();Zp.register("email",((e,{useRFC822Validation:t})=>{let n=null;const s=t?(r=e,Qb.test(r)):function(e){return Jb.test(e)}(e);var r;return e&&!s&&(n="Enter a valid email address"),n})),Zp.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t="Invalid number"),t})),Zp.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?"Cannot be blank":null)),Zp.register("url",(e=>{let t=null;return e&&!function(e){let t;try{t=new URL(e)}catch{return!1}return"http:"===t.protocol||"https:"===t.protocol||"ftp:"===t.protocol}(e)&&(t="Enter a valid url"),t})),setTimeout((()=>{const e="Enter a valid phone number";r.e(667).then(r.bind(r,816)).then((({parsePhoneNumberFromString:t})=>{Zp.register("phone",(n=>{let s=null;n&&!/^\+?\d+$/.test(n)&&(s=e);const r=n?.startsWith("+");if(n&&r){const r=t(n);r&&r.isPossible()&&n===r.number||(s=e)}return s}))}))}),Gs.PRIORITY.TRIVIAL);const Xb=(e,t)=>{switch(t){case"invalid":return`Incorrect ${e}`;case"incomplete":return`Incomplete ${e}`;default:return null}};Zp.register("datetime",(e=>Xb("date and time",e))),Zp.register("date",(e=>Xb("date",e))),Zp.register("time",(e=>Xb("time",e)));const Zb=e=>{for(const t of e)if(t?.error)return"Error with one or more files";return null};Zp.register("attachment",(e=>{let t=null;return e?("pyCount"in e&&Array.isArray(e.pxResults)?t=Zb(e.pxResults):Array.isArray(e)?t=Zb(e):"error"in e&&e.error&&(t="Error with one or more files"),t):t}));const ev=()=>{const e={},t="undefined"!=typeof Intl?Intl.DateTimeFormat().resolvedOptions().timeZone:void 0;t&&(e["user-timezone"]=t);const n="undefined"!=typeof navigator?navigator.language:void 0;return n&&(e["user-locale"]=n),e},tv="createConversation",nv="sendMessage",sv="getConversations",rv="getMessages",av="createConversationForAgent",ov="sendMessageForAgent",iv="getCoach",cv=(e,t,n,s,r,a,o)=>{for(const e of o)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=lg();return o.push(i),og(e,{queryPayload:sv===e?{assistantID:t,contextID:n,pageSize:s,pageIndex:r}:{agentID:t,contextID:n,pageSize:s,pageIndex:r},cancelTokenSource:i,headers:ev()},a).then((e=>(o.pop(),e)))},lv=(e,t,n,s,r)=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=lg();return r.push(a),og(e,{queryPayload:rv===e?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},cancelTokenSource:a,headers:ev()},s).then((e=>(r.pop(),e)))},uv=(e,t,n,s,r,a,o=!1)=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const i=lg();return r.push(i),og(e,{body:JSON.stringify({contextID:t,executeStarterQuestion:!1,...a&&a.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...e===av&&o&&{showAgentRecommendations:o}}),cancelTokenSource:i,queryPayload:e===tv?{assistantID:n}:{agentID:n},headers:ev()},s).then((e=>(r.pop(),e)))},dv=(e,t,n,s,r,a,o)=>{const i={...s&&{request:s},...o&&o.additionalInstruction&&{additionalInstruction:o.additionalInstruction},...o&&o.isManualConfirmationSupported&&{capabilities:{tools:{isManualConfirmationSupported:!0}}},...o&&o.toolsReviewed&&o.toolsReviewed.length>0&&{toolsReviewed:o.toolsReviewed},...a&&a?.length>0&&{attachments:a}};return og(e,{body:JSON.stringify(i),queryPayload:e===nv?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},headers:ev()},r)},pv=(e,t,n,s,r,a,o,i)=>{const c={...s&&{request:s},...o&&o.additionalInstruction&&{additionalInstruction:o.additionalInstruction},...a&&a.length>0&&{attachments:a},...o&&o.toolsReviewed&&o.toolsReviewed.length>0&&{toolsReviewed:o.toolsReviewed},capabilities:{stream:{isEnabled:!0},...o&&o.isManualConfirmationSupported&&{tools:{isManualConfirmationSupported:!0}}},...o&&o.questionnaire&&{questionnaire:o.questionnaire}},l=e===nv?{assistantID:t,conversationID:n}:{agentID:t,conversationID:n},{restApi:u,reqType:d}=p_(e,l),p={method:d,headers:{Accept:"text/event-stream",...ev()},body:JSON.stringify(c),responseType:"stream",adapter:"fetch",...i&&{signal:i.token}};return Kd(u,p,r)},gv=(e,t,n,s,r)=>{for(const e of s)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const a=lg();return s.push(a),og(e,{queryPayload:e===iv?{assistantID:t,...r&&{contextID:r}}:{agentID:t,...r&&{contextID:r}},cancelTokenSource:a},n).then((e=>(s.pop(),e))).catch((e=>{throw s.pop(),e}))},hv={createConversation:(e,t,n,s=[])=>uv(tv,e,t,n,s),sendMessage:(e,t,n,s,r)=>r?.enableStreaming?pv(nv,e,t,n,s,void 0,r):dv(nv,e,t,n,s),createConversationForAgent:(e,t,n,s=[],r,a)=>uv(av,e,t,n,s,r,a),sendMessageForAgent:(e,t,n,s,r,a)=>a?.enableStreaming?pv(ov,e,t,n,s,r,a,a.cancelTokenSource):dv(ov,e,t,n,s,r,a),getAgent:(e,t,n,s=[])=>gv("getAgent",e,t,s,n),getCoach:(e,t,n,s=[])=>gv(iv,e,t,s,n),likeAgentMessage:(e,t,n,s)=>{const r={queryPayload:{agentID:e,conversationID:t,messageID:n},headers:ev()};return og("likeAgentMessage",r,s)},unLikeAgentMessage:(e,t,n,s,r="")=>{const a={queryPayload:{agentID:e,conversationID:t,messageID:n},body:JSON.stringify({feedbackText:r}),headers:ev()};return og("dislikeAgentMessage",a,s)},getConversations:(e,t,n,s,r,a=[])=>cv(sv,e,t,n,s,r,a),getConversationsForAgent:(e,t,n,s,r,a=[])=>cv("getConversationsForAgent",e,t,n,s,r,a),getMessages:(e,t,n,s=[])=>lv(rv,e,t,n,s),getMessagesForAgent:(e,t,n,s=[])=>lv("getMessagesForAgent",e,t,n,s)};const fv=new class{async rewriteText(e){const{originalText:t,rewriteAction:n,additionalInstructions:s,context:r}=e,a=xA.isInfinityRuntime(),o=xA.getRewriteGenAIDP()??ks.getDefaultQualifiedName("D_RewriteWithAI"),i={OriginalText:t,RewriteAction:n,AdditionalInstructions:s||""};try{let e,t;if(a){const t=await df.getPageDataAsync(o,r,i),n=Object.fromEntries(Object.entries(t)).pyResponseData;e="string"==typeof n?n:void 0}else{const n=(await df.getDataAsync(o,r,i)).data[0],s=n[ks.getDefaultQualifiedName("Content")];e="string"==typeof s?s:void 0;const a=n[ks.getDefaultQualifiedName("ErrorMessage")];t="string"==typeof a?a:void 0}return e?{success:!0,rewrittenText:e}:{success:!1,errorMessage:t||"AI rewrite failed: No rewritten text returned"}}catch(e){return{success:!1,errorMessage:e instanceof Error?e.message:"An unexpected error occurred during AI rewrite"}}}};const mv=class{classAccessMap=new Map;constructor(){const e=xA.getClassesAccessList();0!==e.length?this.classAccessMap=e.reduce(((e,t)=>(e.set(t.pyClassName,t.pyHasCreateAccess),e)),new Map):this.classAccessMap=xA.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.classAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};const Iv=class{static AUTOSAVE_SAVE_STATUS=vE;static isAutosaveEnabledForContext(e){return YE(e)}static subscribeAutosaveStatus(e,t){return((e,t)=>{let n=FE.get(e);return n||(n=new Set,FE.set(e,n)),n.add(t),()=>{const n=FE.get(e);n&&(n.delete(t),0===n.size&&FE.delete(e))}})(e,t)}static notifyChange(e,t,n){YE(e)&&(((e,t,n)=>{let s=VE.get(e);s||(s=new Map,VE.set(e,s)),s.set(t,n)})(e,t,n),XE(e))}};class Ev{static behaviorOverrides={};getPersonalizationUtils=bb;constructor(){Ev.behaviorOverrides={}}getPCoreVersion=()=>"26.1.2";onPCoreReady=e=>nb.onPCoreReady(e);onPCoreCleanup=e=>nb.onPCoreCleanup(e);getComponentsRegistry=()=>nb.getComponentsRegistry();checkIfSemanticURL=()=>nb.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(T_()){const e=bA.processUrl(DA(),!0);return!!bA._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>Wb;getViewResources=()=>p;configureForBrowserBookmark=e=>nb.configureForBrowserBookmark(e);getStore=()=>HC();resetStore=()=>oS();getMessageManager=()=>Id;getCoexistenceManager=()=>YR;getStoreValue=(e,t,n)=>QC(e,t,n);getContainerUtils=()=>g;getAnnotationUtils=()=>Xg;getFieldUtils=()=>ap;getFieldDefaultUtils=()=>Lp;getAssetLoader=()=>yg;getAttachmentUtils=()=>qp;getViewRuleApi=()=>cb;getFeedUtils=()=>mb;getTagUtils=()=>Ib;getGenAIAssistantUtils=()=>hv;getGenAIUtils=()=>fv;getStakeholderUtils=()=>yb;getUserApi=()=>gb;getCaseFollowerApi=()=>ub;getCaseUtils=()=>ZI;getStateUtils=()=>Qf;getRelatedCasesApi=()=>db;getDataApi=()=>Nf;getDataApiUtils=()=>Dh;getAnalyticsUtils=()=>Gb;getLocaleUtils=e=>{const t=e??xA.getLocale()??"en-US";return pC(t)};registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{Ev.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{Ev.behaviorOverrides[e]=t};getBehaviorOverrides=()=>Ev.behaviorOverrides;getBehaviorOverride=e=>Ev.behaviorOverrides[e];getAsynchronousUtils=()=>Kb;createPConnect=e=>Dm(e);getPubSubUtils=()=>Ad;registerComponentCreator=e=>{Pm(e)};getConstants=()=>Object.freeze($s);getResolvedConstantValue=e=>Gs.getProperty(e);getEvents=()=>qb;getRestClient=()=>d;getMashupApi=()=>KR;getEnvironmentInfo=()=>xA;switchLocale=e=>GR(e);getRuntimeParamsAPI=()=>bf;getSemanticUrlUtils=()=>Lg;getRemoteCaseUtils=()=>qs;getNavigationUtils=()=>Rg;registerModule=(e,t)=>Hb.registerModule(e,t,this);getErrorHandler=()=>zb;getFormUtils=()=>LI;getAutosaveUtils=()=>Iv;getMessagingServiceManager=()=>lf;getMetadataUtils=()=>h;getDataPageUtils=()=>df;getDataTypeUtils=()=>Jg;getCascadeManager=()=>BC;isDeepEqual=(e,t)=>sn(e,t);getAuthUtils=()=>Yb;getDebugger=()=>Sd;getDeferLoadManager=()=>Nh;getExpressionEngine=()=>c;getActionsSequencer=()=>Ff;getRefreshManager=()=>Df;getInitialiser=()=>ib;getBootstrapUtils=()=>nb;getContextTreeManager=()=>rd;getAccessPrivilege=()=>mv.getInstance();getObjectTransformer=()=>Bs;getAllStateMachines=(e,t,n)=>t&&n?UI.getAllStateMachines(e,t,n):UI.getAllStateMachinesByContext(e);isNamespaceEnabled=()=>ks.isNamespaceEnabled();getQualifiedName=(e,t)=>ks.getQualifiedName(e,t);getDefaultQualifiedName=e=>this.getQualifiedName(e,"PegaPlatform");getNameSpaceUtils=()=>ks;getNetworkUtils=()=>Cd;getMashupBridge=()=>I;getConfirmDialogService=()=>rI}const yv=new Ev;globalThis.PCore=yv;const Av=yv;var Cv=a.A;export{Cv as default};
2
+ //# sourceMappingURL=constellation-core.797b019a.js.map