@pega/constellationjs 0.242.3 → 0.242.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- (()=>{var e,t,n={933:(e,t,n)=>{"use strict";var r=n(515);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],n=void 0;function r(){t===n&&(t=t.slice())}function s(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var n=!0;return r(),t.push(e),function(){n&&(r(),t.splice(t.indexOf(e),1),n=!1)}}function a(){for(var e=t,r=0;r<e.length;++r)n=e,e[r]()}return function(){var t=e.apply(void 0,arguments),n=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:a()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var s=o(e),i=n&&!t;return t||(n=!1,r=!1),i&&a(),s},subscribe:s})}}},923:(e,t,n)=>{e.exports=n(933)},924:(e,t,n)=>{var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var s=e.length,a=n+(r?1:-1);for(;r?a--:++a<s;)if(t(e[a],a,e))return a;return-1}(e,f,n);var r=n-1,s=e.length;for(;++r<s;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,s=e?e.length:0;++r<s;)if(n(t,e[r]))return!0;return!1}function g(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}function f(e){return e!=e}function m(e,t){return e.has(t)}var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=d["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=d.Symbol,R=A.propertyIsEnumerable,b=I.splice,O=D?D.isConcatSpreadable:void 0,v=Math.max,x=B(d,"Map"),w=B(Object,"create");function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new U;++t<n;)this.add(e[t])}function j(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function V(e,t,n,r){var s,a=-1,o=p,i=!0,c=e.length,l=[],u=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}(t,(s=n,function(e){return s(e)}))),r?(o=h,i=!1):t.length>=200&&(o=m,i=!1,t=new F(t));e:for(;++a<c;){var d=e[a],g=n?n(d):d;if(d=r||0!==d?d:0,i&&g==g){for(var f=u;f--;)if(t[f]===g)continue e;l.push(d)}else o(t,g,r)||l.push(d)}return l}function k(e,t,n,r,s){var a=-1,o=e.length;for(n||(n=W),s||(s=[]);++a<o;){var i=e[a];t>0&&n(i)?t>1?k(i,t-1,n,r,s):g(s,i):r||(s[s.length]=i)}return s}function $(e){if(!Q(e)||(t=e,S&&S in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:c;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function B(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $(n)?n:void 0}function W(e){return Y(e)||function(e){return X(e)&&T.call(e,"callee")&&(!R.call(e,"callee")||N.call(e)==a)}(e)||!!(O&&e&&e[O])}M.prototype.clear=function(){this.__data__=w?w(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:T.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():b.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return j(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new M,map:new(x||L),string:new M}},U.prototype.delete=function(e){return G(this,e).delete(e)},U.prototype.get=function(e){return G(this,e).get(e)},U.prototype.has=function(e){return G(this,e).has(e)},U.prototype.set=function(e,t){return G(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return X(e)?V(e,k(t,1,X,!0)):[]},q=v(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=v(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var s=Array(q+1);++t<q;)s[t]=e[t];return s[q]=r,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)}(H,this,s)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&!J(e)}function X(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function J(e){var t=Q(e)?N.call(e):"";return t==o||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},174:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m.Symbol,R=I.splice,b=k(m,"Map"),O=k(Object,"create"),v=D?D.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function F(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:$(n);for(var r=0,s=t.length;null!=e&&r<s;)e=e[G(t[r++])];return r&&r==s?e:void 0}function j(e){if(!H(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}w.prototype.clear=function(){this.__data__=O?O(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return U(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(b||M),string:new w}},L.prototype.delete=function(e){return V(this,e).delete(e)},L.prototype.get=function(e){return V(this,e).get(e)},L.prototype.has=function(e){return V(this,e).has(e)},L.prototype.set=function(e,t){return V(this,e).set(e,t),this};var $=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function G(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(B.Cache||L),n}B.Cache=L;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},207:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,E=y||I||Function("return this")();var A,_=Array.prototype,S=Function.prototype,C=Object.prototype,T=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",P=S.toString,D=C.hasOwnProperty,R=C.toString,b=RegExp("^"+P.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=E.Symbol,v=C.propertyIsEnumerable,x=_.splice,w=W(E,"Map"),M=W(Object,"create"),L=O?O.prototype:void 0,U=L?L.toString:void 0;function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function $(e,t){return null!=e&&D.call(e,t)}function G(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:f;return n.test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return G(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return d.test(e)||!u.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var s,i=-1,c=t.length;++i<c;){var l=z(t[i]);if(!(s=null!=e&&n(e,l)))break;e=e[l]}return s||!!(c=e?e.length:0)&&J(c)&&function(e,t){return t=null==t?a:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&J(e.length)&&!X(e)}(e)}(e)&&D.call(e,"callee")&&(!v.call(e,"callee")||R.call(e)==o)}(e))}F.prototype.clear=function(){this.__data__=M?M(null):{}},F.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(M){var n=t[e];return n===r?void 0:n}return D.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return M?void 0!==t[e]:D.call(t,e)},F.prototype.set=function(e,t){return this.__data__[e]=M&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():x.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},V.prototype.clear=function(){this.__data__={hash:new F,map:new(w||j),string:new F}},V.prototype.delete=function(e){return B(this,e).delete(e)},V.prototype.get=function(e){return B(this,e).get(e)},V.prototype.has=function(e){return B(this,e).has(e)},V.prototype.set=function(e,t){return B(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return U?U.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,s){n.push(r?s.replace(g,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(Y.Cache||V),n}Y.Cache=V;var K=Array.isArray;function X(e){var t=Q(e)?R.call(e):"";return t==i||t==c}function J(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&R.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,$)}},828:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,s="[object Arguments]",a="[object Function]",o="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",u="[object WeakMap]",d="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),m=t&&!t.nodeType&&t,y=m&&e&&!e.nodeType&&e,I=y&&y.exports===m;var E,A,_,S=Function.prototype,C=Object.prototype,T=f["__core-js_shared__"],N=(E=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",P=S.toString,D=C.hasOwnProperty,R=C.toString,b=RegExp("^"+P.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=I?f.Buffer:void 0,v=C.propertyIsEnumerable,x=O?O.isBuffer:void 0,w=(A=Object.keys,_=Object,function(e){return A(_(e))}),M=q(f,"DataView"),L=q(f,"Map"),U=q(f,"Promise"),F=q(f,"Set"),j=q(f,"WeakMap"),V=!v.call({valueOf:1},"valueOf"),k=Y(M),$=Y(L),G=Y(U),B=Y(F),W=Y(j);function H(e){if(!ee(e)||function(e){return!!N&&N in e}(e))return!1;var t=Z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return R.call(e)};function Y(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&J(e)}(e)&&D.call(e,"callee")&&(!v.call(e,"callee")||R.call(e)==s)}(M&&z(new M(new ArrayBuffer(1)))!=d||L&&z(new L)!=i||U&&z(U.resolve())!=c||F&&z(new F)!=l||j&&z(new j)!=u)&&(z=function(e){var t=R.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case k:return d;case $:return i;case G:return c;case B:return l;case W:return u}return t});var X=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=x||function(){return!1};function Z(e){var t=ee(e)?R.call(e):"";return t==a||t==o}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(J(e)&&(X(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==l)return!e.size;if(V||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}(e))return!w(e).length;for(var n in e)if(D.call(e,n))return!1;return!0}},722:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=1,a=2,o=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",y="[object Null]",I="[object Object]",E="[object Promise]",A="[object Proxy]",_="[object RegExp]",S="[object Set]",C="[object String]",T="[object Symbol]",N="[object Undefined]",P="[object WeakMap]",D="[object ArrayBuffer]",R="[object DataView]",b=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[i]=v[c]=v[D]=v[u]=v[R]=v[d]=v[p]=v[h]=v[f]=v[m]=v[I]=v[_]=v[S]=v[C]=v[P]=!1;var x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,w="object"==typeof self&&self&&self.Object===Object&&self,M=x||w||Function("return this")(),L=t&&!t.nodeType&&t,U=L&&e&&!e.nodeType&&e,F=U&&U.exports===L,j=F&&x.process,V=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=V&&V.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,X=M["__core-js_shared__"],J=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?M.Buffer:void 0,re=M.Symbol,se=M.Uint8Array,ae=K.propertyIsEnumerable,oe=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,ue=(H=Object.keys,q=Object,function(e){return H(q(e))}),de=Ve(M,"DataView"),pe=Ve(M,"Map"),he=Ve(M,"Promise"),ge=Ve(M,"Set"),fe=Ve(M,"WeakMap"),me=Ve(Object,"create"),ye=Be(de),Ie=Be(pe),Ee=Be(he),Ae=Be(ge),_e=Be(fe),Se=re?re.prototype:void 0,Ce=Se?Se.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pe;++t<n;)this.add(e[t])}function Re(e){var t=this.__data__=new Ne(e);this.size=t.size}function be(e,t){var n=qe(e),r=!n&&He(e),s=!n&&!r&&ze(e),a=!n&&!r&&!s&&Qe(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!Q.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ge(l,c))||i.push(l);return i}function Oe(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function ve(e){return null==e?void 0===e?N:y:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var s=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return s}(e):function(e){return ee.call(e)}(e)}function xe(e){return Je(e)&&ve(e)==i}function we(e,t,n,r,o){return e===t||(null==e||null==t||!Je(e)&&!Je(t)?e!=e&&t!=t:function(e,t,n,r,o,l){var h=qe(e),g=qe(t),y=h?c:$e(e),E=g?c:$e(t),A=(y=y==i?I:y)==I,N=(E=E==i?I:E)==I,P=y==E;if(P&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(P&&!A)return l||(l=new Re),h||Qe(e)?Ue(e,t,n,r,o,l):function(e,t,n,r,o,i,c){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!i(new se(e),new se(t)));case u:case d:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case _:case C:return e==t+"";case f:var l=G;case S:var h=r&s;if(l||(l=B),e.size!=t.size&&!h)return!1;var g=c.get(e);if(g)return g==t;r|=a,c.set(e,t);var y=Ue(l(e),l(t),r,o,i,c);return c.delete(e),y;case T:if(Ce)return Ce.call(e)==Ce.call(t)}return!1}(e,t,y,n,r,o,l);if(!(n&s)){var b=A&&Q.call(e,"__wrapped__"),O=N&&Q.call(t,"__wrapped__");if(b||O){var v=b?e.value():e,x=O?t.value():t;return l||(l=new Re),o(v,x,n,r,l)}}if(!P)return!1;return l||(l=new Re),function(e,t,n,r,a,o){var i=n&s,c=Fe(e),l=c.length,u=Fe(t),d=u.length;if(l!=d&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var g=o.get(e);if(g&&o.get(t))return g==t;var f=!0;o.set(e,t),o.set(t,e);var m=i;for(;++p<l;){var y=e[h=c[p]],I=t[h];if(r)var E=i?r(I,y,h,t,e,o):r(y,I,h,e,t,o);if(!(void 0===E?y===I||a(y,I,n,r,o):E)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var A=e.constructor,_=t.constructor;A==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof _&&_ instanceof _||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,l)}(e,t,n,r,we,o))}function Me(e){return!(!Xe(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:b).test(Be(e))}function Le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return ue(e);var t,n,r,s=[];for(var a in Object(e))Q.call(e,a)&&"constructor"!=a&&s.push(a);return s}function Ue(e,t,n,r,o,i){var c=n&s,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var p=-1,h=!0,g=n&a?new De:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var f=e[p],m=t[p];if(r)var y=c?r(m,f,p,t,e,i):r(f,m,p,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(g){if(!$(t,(function(e,t){if(s=t,!g.has(s)&&(f===e||o(f,e,n,r,i)))return g.push(t);var s}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Fe(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}(r,n(e))}(e,Ze,ke)}function je(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return Oe(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(pe||Ne),string:new Te}},Pe.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Pe.prototype.get=function(e){return je(this,e).get(e)},Pe.prototype.has=function(e){return je(this,e).has(e)},Pe.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},De.prototype.add=De.prototype.push=function(e){return this.__data__.set(e,r),this},De.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.clear=function(){this.__data__=new Ne,this.size=0},Re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pe(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[s++]=o)}return a}(ce(e),(function(t){return ae.call(e,t)})))}:function(){return[]},$e=ve;function Ge(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Be(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(de&&$e(new de(new ArrayBuffer(1)))!=R||pe&&$e(new pe)!=f||he&&$e(he.resolve())!=E||ge&&$e(new ge)!=S||fe&&$e(new fe)!=P)&&($e=function(e){var t=ve(e),n=t==I?e.constructor:void 0,r=n?Be(n):"";if(r)switch(r){case ye:return R;case Ie:return f;case Ee:return E;case Ae:return S;case _e:return P}return t});var He=xe(function(){return arguments}())?xe:function(e){return Je(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},qe=Array.isArray;var ze=le||function(){return!1};function Ye(e){if(!Xe(e))return!1;var t=ve(e);return t==h||t==g||t==l||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Je(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Je(e)&&Ke(e.length)&&!!v[ve(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?be(e):Le(e);var t}e.exports=function(e,t){return we(e,t)}},431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",u="[object Object]",d="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[a]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[i]=f["[object Map]"]=f["[object Number]"]=f[u]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,_=A&&A.exports===E,S=_&&m.process,C=function(){try{var e=A&&A.require&&A.require("util").types;return e||S&&S.binding&&S.binding("util")}catch(e){}}(),T=C&&C.isTypedArray;var N,P,D,R=Array.prototype,b=Function.prototype,O=Object.prototype,v=I["__core-js_shared__"],x=b.toString,w=O.hasOwnProperty,M=(N=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",L=O.toString,U=x.call(Object),F=RegExp("^"+x.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=_?I.Buffer:void 0,V=I.Symbol,k=I.Uint8Array,$=j?j.allocUnsafe:void 0,G=(P=Object.getPrototypeOf,D=Object,function(e){return P(D(e))}),B=Object.create,W=O.propertyIsEnumerable,H=R.splice,q=V?V.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,X=Date.now,J=Ee(I,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!ve(t))return{};if(B)return B(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=this.__data__=new te(e);this.size=t.size}function se(e,t){var n=Pe(e),r=!n&&Ne(e),s=!n&&!r&&Re(e),a=!n&&!r&&!s&&we(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!w.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function ae(e,t,n){(void 0!==n&&!Te(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function oe(e,t,n){var r=e[t];w.call(e,t)&&Te(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:w.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?r:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(J||te),string:new ee}},ne.prototype.delete=function(e){var t=Ie(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return Ie(this,e).get(e)},ne.prototype.has=function(e){return Ie(this,e).has(e)},ne.prototype.set=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,ue=function(e,t,n){for(var r=-1,s=Object(e),a=n(e),o=a.length;o--;){var i=a[le?o:++r];if(!1===t(s[i],i,s))break}return e};function de(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=w.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var s=L.call(e);r&&(t?e[q]=n:delete e[q]);return s}(e):function(e){return L.call(e)}(e)}function pe(e){return xe(e)&&de(e)==a}function he(e){return!(!ve(e)||function(e){return!!M&&M in e}(e))&&(be(e)?F:h).test(function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=_e(e),n=[];for(var r in e)("constructor"!=r||!t&&w.call(e,r))&&n.push(r);return n}function fe(e,t,n,r,s){e!==t&&ue(t,(function(a,o){if(s||(s=new re),ve(a))!function(e,t,n,r,s,a,o){var i=Se(e,n),c=Se(t,n),l=o.get(c);if(l)return void ae(e,n,l);var d=a?a(i,c,n+"",e,t,o):void 0,p=void 0===d;if(p){var h=Pe(c),g=!h&&Re(c),f=!h&&!g&&we(c);d=c,h||g||f?Pe(i)?d=i:xe(A=i)&&De(A)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):g?(p=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=$?$(n):new e.constructor(n);return e.copy(r),r}(c,!0)):f?(p=!1,m=c,y=!0?(I=m.buffer,E=new I.constructor(I.byteLength),new k(E).set(new k(I)),E):m.buffer,d=new m.constructor(y,m.byteOffset,m.length)):d=[]:function(e){if(!xe(e)||de(e)!=u)return!1;var t=G(e);if(null===t)return!0;var n=w.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&x.call(n)==U}(c)||Ne(c)?(d=i,Ne(i)?d=function(e){return function(e,t,n,r){var s=!n;n||(n={});var a=-1,o=t.length;for(;++a<o;){var i=t[a],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),s?ce(n,i,c):oe(n,i,c)}return n}(e,Me(e))}(i):ve(i)&&!be(i)||(d=function(e){return"function"!=typeof e.constructor||_e(e)?{}:Z(G(e))}(c))):p=!1}var m,y,I,E;var A;p&&(o.set(c,d),s(d,c,r,a,o),o.delete(c));ae(e,n,d)}(e,t,o,n,fe,r,s);else{var i=r?r(Se(e,o),a,o+"",e,t,s):void 0;void 0===i&&(i=a),ae(e,o,i)}}),Me)}function me(e,t){return Ce(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=K(r.length-t,0),o=Array(a);++s<a;)o[s]=r[t+s];s=-1;for(var i=Array(t+1);++s<t;)i[s]=r[s];return i[t]=n(o),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)}(e,this,i)}}(e,t,Fe),e+"")}var ye=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Fe;function Ie(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?s:t)&&("number"==n||"symbol"!=n&&g.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function Se(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ce=function(e){var t=0,n=0;return function(){var r=X(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ye);function Te(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return xe(e)&&w.call(e,"callee")&&!W.call(e,"callee")},Pe=Array.isArray;function De(e){return null!=e&&Oe(e.length)&&!be(e)}var Re=Y||function(){return!1};function be(e){if(!ve(e))return!1;var t=de(e);return t==i||t==c||t==o||t==d}function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=T?function(e){return function(t){return e(t)}}(T):function(e){return xe(e)&&Oe(e.length)&&!!f[de(e)]};function Me(e){return De(e)?se(e,!0):ge(e)}var Le,Ue=(Le=function(e,t,n,r){fe(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,s=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(s=Le.length>3&&"function"==typeof s?(r--,s):void 0,a&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?De(n)&&Ae(t,n.length):"string"==r&&t in n)&&Te(n[t],e)}(t[0],t[1],a)&&(s=r<3?void 0:s,r=1),e=Object(e);++n<r;){var o=t[n];o&&Le(e,o,n,s)}return e})));function Fe(e){return e}e.exports=Ue},8:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,d=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")();var E,A=Array.prototype,_=Function.prototype,S=Object.prototype,C=I["__core-js_shared__"],T=(E=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=_.toString,P=S.hasOwnProperty,D=S.toString,R=RegExp("^"+N.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=I.Symbol,O=A.splice,v=B(I,"Map"),x=B(Object,"create"),w=b?b.prototype:void 0,M=w?w.toString:void 0;function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e,t,n){var r=e[t];P.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function V(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function k(e){if(!X(e)||(t=e,T&&T in t))return!1;var t,n=function(e){var t=X(e)?D.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:g;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function $(e,t,n,r){if(!X(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||J(e))return!0;return u.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var s=-1,a=t.length,o=a-1,i=e;null!=i&&++s<a;){var c=q(t[s]),d=n;if(s!=o){var p=i[c];void 0===(d=r?r(p,c,i):void 0)&&(d=X(p)?p:W(t[s+1])?[]:{})}j(i,c,d),i=i[c]}return e}function G(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function B(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}L.prototype.clear=function(){this.__data__=x?x(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:P.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},U.prototype.clear=function(){this.__data__=[]},U.prototype.delete=function(e){var t=this.__data__,n=V(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},U.prototype.get=function(e){var t=this.__data__,n=V(t,e);return n<0?void 0:t[n][1]},U.prototype.has=function(e){return V(this.__data__,e)>-1},U.prototype.set=function(e,t){var n=this.__data__,r=V(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new L,map:new(v||U),string:new L}},F.prototype.delete=function(e){return G(this,e).delete(e)},F.prototype.get=function(e){return G(this,e).get(e)},F.prototype.has=function(e){return G(this,e).has(e)},F.prototype.set=function(e,t){return G(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(J(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(p,(function(e,t,r,s){n.push(r?s.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||J(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(z.Cache||F),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=F;var K=Array.isArray;function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function J(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&D.call(e)==c}e.exports=function(e,t,n){return null==e?e:$(e,t,n)}},795:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m.Symbol,R=I.splice,b=$(m,"Map"),O=$(Object,"create"),v=D?D.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function F(e){if(!z(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=z(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=G(t,e)?[t]:V(t)).length;null!=e&&n<r;)e=e[W(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r<s;)a[r]=e[r+t];return a}(t,0,-1))}(e,t=G(t,e)?[t]:V(t));var n,r,s=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&T.call(e,s))||delete e[s]}function V(e){return q(e)?e:B(e)}function k(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function $(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}function G(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}w.prototype.clear=function(){this.__data__=O?O(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return U(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(b||M),string:new w}},L.prototype.delete=function(e){return k(this,e).delete(e)},L.prototype.get=function(e){return k(this,e).get(e)},L.prototype.has=function(e){return k(this,e).has(e)},L.prototype.set=function(e,t){return k(this,e).set(e,t),this};var B=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(H.Cache||L),n}H.Cache=L;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},386:e=>{class t{constructor(e,t,n,r,s){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=r,this.reflect=s,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:r,crc_shift:s,mask:a}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++){t=(n[255&(t^e[r])]^t>>>8)&a}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+s^e[o])]<<s^t<<8-s&a<<s;t>>=s}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 r=e[n];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&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,r=e.length>>n,s=1<<n,a="";for(let o=0;o<r;o++){let r="";for(let a=0;a<s;a++){let s=e[o<<n|a];s="000000000"+s.toString(16),s=s.substr(s.length-t),r+="0x"+s+", "}a+=" "+r+"\n"}return a="[\n"+a.slice(0,-3)+"\n]",a}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,s=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%s)),e/=s;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){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(r&&(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 r=0;r<t;r++)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,r,s,a){let o=new t(e,n,r,s,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)}},849: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=849,e.exports=t}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e](a,a.exports,s),a.loaded=!0,a.exports}s.m=n,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"js/"+e+"-web.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="constellation-corejs-library:",s.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var i,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){i=d;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack",t+a),i.src=n),e[n]=[r];var p=(t,r)=>{i.onerror=i.onload=null,clearTimeout(h);var s=e[n];if(delete e[n],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={290:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var a=new Promise(((n,s)=>r=e[t]=[n,s]));n.push(r[2]=a);var o=s.p+s.u(t),i=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,r[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,i,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(r in i)s.o(i,r)&&(s.m[r]=i[r]);if(c)c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunkconstellation_corejs_library=self.webpackChunkconstellation_corejs_library||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";var e={};s.r(e),s.d(e,{buildContextName:()=>W,buildModalContext:()=>Y,buildTransientContextName:()=>H,getContainerIdFromContext:()=>X,getParentContext:()=>K,getParentContextName:()=>B,getTargetFromContext:()=>z,getTransientContext:()=>q});var t={};s.r(t),s.d(t,{getResolvedTargetName:()=>gt,getRoutingInfo:()=>ft,getSemanticURLFromRoutingInfo:()=>mt});var n={};s.r(n),s.d(n,{evaluate:()=>qt,handleChange:()=>Wt,hasDeclareExpression:()=>Bt,updateDeclareExpressions:()=>Ht});var r={};s.r(r),s.d(r,{publishExpressions:()=>br,publishResponse:()=>Or});var a={};s.r(a),s.d(a,{hasBrowserEnv:()=>Ia,hasStandardBrowserEnv:()=>Ea,hasStandardBrowserWebWorkerEnv:()=>_a,origin:()=>Sa});var o={};s.r(o),s.d(o,{CONTAINER_NAMES:()=>Qu,CONTAINER_TYPES:()=>Ju,addRootContainerItem:()=>bd,areContainerItemsPresent:()=>sd,clearTransientData:()=>Ld,closeContainerItem:()=>Rd,getActiveContainerItemContext:()=>hd,getActiveContainerItemIDFromRoutingInfo:()=>zd,getActiveContainerItemName:()=>ld,getActiveContext:()=>Bd,getChildContainerItems:()=>gd,getChildContainers:()=>fd,getChildContainersContexts:()=>md,getContainerAPI:()=>jd,getContainerAccessOrder:()=>rd,getContainerData:()=>ed,getContainerItemData:()=>td,getContainerItemName:()=>od,getContainerItems:()=>nd,getContainerLimit:()=>_d,getContainerParentContext:()=>qd,getContainerType:()=>cd,getContextByTargetAndKey:()=>Hd,getDataContextName:()=>pd,getFlowContainer:()=>Kd,getLeastRecentlyUsedNonDirtyContainerItemID:()=>Pd,getParentContainerItem:()=>Yd,getRootContainerName:()=>Gd,getSuggestionContexts:()=>yd,getTargetFromContainerItemID:()=>Dd,getTransientItems:()=>xd,hasContainerItems:()=>Ad,isContainerDirty:()=>Nd,isContainerInitialized:()=>id,isContainerItemActive:()=>ud,isContainerItemContextBeingUsedInOtherContainers:()=>vd,isContainerItemExists:()=>ad,isContainerLimitReached:()=>Cd,isContainerMultipleMode:()=>Ed,isContainerSingleMode:()=>Id,purgeTransientData:()=>Ud,removeContainer:()=>Vd,replaceTransientData:()=>Md,resetContainersPayload:()=>Td,setContainerLimit:()=>Sd,updateCaseContextEtag:()=>$d,updateParentLastUpdateTime:()=>Wd,updateRelatedContextEtag:()=>kd,updateTransientData:()=>wd});var i={};s.r(i),s.d(i,{getAdditionalInfo:()=>zp,getDataPageKeys:()=>Wp,getDataPageMetadata:()=>Up,getEmbeddedPropertyMetadata:()=>bp,getFieldParameters:()=>kp,getFieldsByClassName:()=>Vp,getGenAICoach:()=>Gp,getInsight:()=>jp,getLookUpDataPage:()=>Hp,getLookUpDataPageInfo:()=>qp,getParagraph:()=>$p,getPersonalizationMetadata:()=>Fp,getPropertyMetadata:()=>Rp,getResolvedFieldMetadata:()=>Yp,getSavableDataPage:()=>Bp,isViewExists:()=>Mp,mergeStore:()=>Dp,resolveNavigation:()=>Lp,resolveView:()=>wp,updateNavigationStore:()=>vp,updateStores:()=>xp,updateViewStore:()=>Op});var c={};s.r(c),s.d(c,{dispatch:()=>th,getActionType:()=>ch,getContextValue:()=>oh,getDataObject:()=>nh,getReferenceTokens:()=>Qp,getSharedDataObject:()=>rh,getStore:()=>eh,getValue:()=>ah,isMergeable:()=>uh,lookupContextValue:()=>ih,mergeDeep:()=>dh,removeItem:()=>lh,replaceValue:()=>hh,resetStore:()=>gh,setStore:()=>Zp,updateValue:()=>ph});var l={};s.r(l),s.d(l,{activateContainerItem:()=>Wh,addContainerItem:()=>Mh,addMessages:()=>Hh,addSharedData:()=>tg,addTransientItem:()=>Lh,addWork:()=>Oh,clearTransientData:()=>Fh,createWork:()=>Th,error:()=>eg,finishAssignment:()=>Xh,initContainers:()=>xh,listAction:()=>rg,loadView:()=>Rh,mergeData:()=>Ph,openAssignment:()=>Jh,openWorkByHandle:()=>vh,postProcess:()=>Zh,purgeTransientData:()=>Vh,removeAllTransientItems:()=>zh,removeContainerItem:()=>qh,removeSharedData:()=>ng,removeTransientItem:()=>Yh,replaceContainerItem:()=>Kh,replaceTransientData:()=>jh,resetContainers:()=>wh,resetLoading:()=>Gh,setLoading:()=>$h,setSharedProperty:()=>ag,setStateProperty:()=>og,showCasePreview:()=>sg,showHarness:()=>Dh,showHistory:()=>Qh,showPage:()=>bh,upMergeAndRemoveContainerItem:()=>Bh,updateContainerItem:()=>kh,updateTransientData:()=>Uh});var u={};s.r(u),s.d(u,{doesRestApiExist:()=>Vm,getCancelTokenSource:()=>km,getCaseApi:()=>Bm,getHeaderProcessor:()=>Um,invokeCustomRestApi:()=>jm,invokeRestApi:()=>Fm,isRequestCanceled:()=>$m,registerInterceptor:()=>Gm});var d={};s.r(d),s.d(d,{fetchViewResources:()=>AE,updateViewResources:()=>EE});var p=s(722),h=s.n(p);let g,f,m;const y=e=>{e&&(g=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},g.BASEURL=e.server,g.ACTIONURL=e["action-end-point"],g.DATAURL=e["data-end-point"],m=e.reAuthUrl)},I=()=>m,E=()=>g.BASEURL,A=e=>fetch(`${g.BASEURL}${g.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),_=e=>{f=e},S=()=>f;var C=s(386),T=s(795),N=s.n(T),P=s(207),D=s.n(P),R=s(174),b=s.n(R),O=s(8),v=s.n(O),x=s(431),w=s.n(x),M=s(828),L=s.n(M);const U={APP:{APP:"app",ROOT:"root",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"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails"},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:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},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:"pzCreateDetails",PREVIEW_VIEW_NAME:"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_CONTENT:"dataInfo.content"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"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:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",GETNEXTWORK:"caseInfo.confirmationLinks.getNextWork",ACTION_REFRESH_CONDITIONS:"caseInfo.assignments[0].actions[0].refreshConditions",IS_LOCAL_ACTION:"caseInfo.isLocalAction",BUSINESS_ID:"caseInfo.businessID"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"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:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"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",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",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_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},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_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent"},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",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer"},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"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},START_PERFORMANCE_LOG:"start-performance-log",STOP_PERFORMANCE_LOG:"stop-performance-log",TOP_ACTION_LABEL:{CREATEWORK:"Create-Work",OPENASSIGNMENT:"Open-Assignment",OPENWORKBYHANDLE:"Open-Work-By-Handle",SAVEANDCLOSE:"Save-And-Close",SHOWDATA:"Show-Data",FINISHASSIGNMENT:"Finish-Assignment",GETDESCENDANTS:"Get-Descendants"}},F={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",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",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",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_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",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",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",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",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",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",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",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:"pyDetails",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",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",CONTEXT_DATA_MODAL_VIEW:{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"},DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...U},j="pyRemoteCaseDetails";class V{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=>Ah.getProperty(".RemoteSystemID",F.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===V.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=ap.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))}}const k=V,$={},G=new Map,B=e=>{let t=F.EMPTY_STRING;return t=e&&e.includes(F.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},W=(e,t,n=!1)=>{let r=F.EMPTY_STRING;if(t&&e){let s=`${t}${F.FORWARD_SLASH_STRING}${e}`;const a=ed(s);if(a||t!==F.APP.APP&&t!==F.APP.ROOT)if(a){if(n&&$[s])return r=`${s}${F.UNDERSCORE_STRING}${$[s]}`,r;$[s]?$[s]+=1:$[s]=1,r=`${s}${F.UNDERSCORE_STRING}${$[s]}`}else r=W(e,B(t));else s=`${t}${F.FORWARD_SLASH_STRING}${F.PRIMARY}`,$[s]?$[s]+=1:$[s]=1,r=`${s}${F.UNDERSCORE_STRING}${$[s]}`}return r},H=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${F.FORWARD_SLASH_STRING}${e}_${n}`}return""},q=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${F.FORWARD_SLASH_STRING}${e}_${n}`:H(e,t)}return""},z=e=>{let t=F.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},Y=(e,t)=>{if(null===e)return t;const[,n]=t.split(F.FORWARD_SLASH_STRING);return e+F.FORWARD_SLASH_STRING+n},K=e=>{const t=e.indexOf(F.FORWARD_SLASH_STRING),n=e.lastIndexOf(F.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},X=e=>{const t=e.split(F.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+F.FORWARD_SLASH_STRING+t[2]},J="SET_PROPERTY",Q="REPLACE_PROPERTY",Z="FIELD_CHANGE",ee="LOAD_VIEW",te="SHOW_PAGE",ne="SHOW_DATA",re="SHOW_INSIGHT",se="SHOW_DASHBOARD",ae="SET_LOADING",oe="RESET_LOADING",ie="SET_SHARED_PROPERTY",ce="CREATE_WORK",le="OPEN_WORK_BY_HANDLE",ue="UPDATE_DOCUMENT",de="FINISH_ASSIGNMENT",pe="CANCEL_ASSIGNMENT",he="OPEN_ASSIGNMENT",ge="MERGE_DATA",fe="REMOVE_ITEM",me="GET_DATAOBJECT_ACTIONS",ye="SHOW_HISTORY",Ie="ERROR",Ee="INIT_CONTAINERS",Ae="RESET_CONTAINERS",_e="ADD_CONTAINER_ITEM",Se="REMOVE_CONTAINER_ITEM",Ce="ADD_TRANSIENT_ITEM",Te="UPDATE_TRANSIENT_DATA",Ne="REMOVE_TRANSIENT_ITEM",Pe="REMOVE_ALL_TRANSIENT_ITEMS",De="CLEAR_TRANSIENT_DATA",Re="PURGE_TRANSIENT_DATA",be="REPLACE_TRANSIENT_DATA",Oe="ACTIVATE_CONTAINER_ITEM",ve="UPDATE_CONTAINER_ITEM",xe="UPMERGE_AND_REMOVE_CONTAINER_ITEM",we="REPLACE_CONTAINER_ITEM",Me="ACTIVATE_MODAL_CONTAINER_ITEM",Le="REMOVE_CONTAINER",Ue="ADD_SUGGESTION_CONTEXT",Fe="showView",je="showData",Ve="showInsight",ke="showDashboard",$e="openWorkByHandle",Ge="openAssignment",Be="createNewWork",We="SHOW_CANCEL_ALERT",He="openLocalAction",qe="openProcessAction",ze="caseWideActions",Ye="openBulkAction",Ke="ADD_MESSAGES",Xe="CLEAR_MESSAGES",Je="RESET_STORE",Qe="FETCH_DATAPAGE",Ze="ADD_SHARED_DATA",et="REMOVE_SHARED_DATA",tt="LIST_ACTION",nt="DELETE_CASE_SUMMARY",rt="ALTER_BLOCKING_ACTION_COUNT",st="CREATE_DATA_OBJECT",at="DELETE_DATA_OBJECT",ot="VIEW_DATA_OBJECT",it="UPDATE_DATA_OBJECT",ct="OPEN_DATA_OBJECT_ACTION",lt="SUBMIT_DATA_OBJECT_ACTION",ut="OPEN_EMBEDDED_DATA_MODAL",dt="SUBMIT_EMBEDDED_DATA_MODAL",pt="FILL_FORM_WITH_AI",ht="openCase",gt=(e,t)=>{if(!e||!t)return null;let n,r=F.EMPTY_STRING;return t&&(r=`${t}${F.FORWARD_SLASH_STRING}${e}`,n=ed(r),n||t.includes("/")?n||(r=gt(e,B(t))):r=`${t}${F.FORWARD_SLASH_STRING}${e}`),r},ft=(e,t)=>{const n=gt(e,t);return n&&ed(n)?ed(n):{}},mt=(e,t)=>sp.getSemanticURL(Fe,{page:e},t);const yt=new class{error=e=>{console.error(e)}};class It{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=n||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Pt[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],r=Nt[e.tokenType];r&&r.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}=Pt[this._state];this._subParser=new It(this._grammar,e,t)}_endSubExpression(){Pt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,It._setParent(e,this._position)):this._tree=e,this._position=e}}const Et=It,At="identifier",_t={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},St={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Ct={">":{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)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":_t,AND:_t,and:_t,"||":St,OR:St,or:St,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(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)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},Tt={BinaryExpression:function(e){const t=[];let n="";return t[0]=this.evaluateAST(e.left),e.left.operationType===At&&this._context&&(n=this._context.getFieldMetadata(e.left.value.substring(1))?.type??""),t[1]=e.right?this.evaluateAST(e.right,n):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]??"":this._contextTreeNodeContext?Ah.getLitePropertyValue(this._contextTreeNodeContext,e.value):this._context.getValue(e.value)??""},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){return this._grammar[e.operator].evaluate(e.right)}},Nt={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;for(;n&&n.operator&&this._grammar[n.operator].precedence>=t;)this._position=n,n=n._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};Et._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:At,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Pt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:At},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Nt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},Dt=["binaryOperator","unaryOperator","openParenthesis"],Rt=/^\s*$/,bt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,Ot=/\\\\/,vt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],xt=["[a-zA-Z_.\\$][(0-9)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]+)"],wt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Mt{constructor(e){this._grammar=e}static _isNegative(e){return Dt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Rt)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(bt)&&(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(Ot,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Mt._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[vt.join("|"),e.join("|"),xt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=Mt._unquote(e):e.match(wt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(bt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Mt._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Mt._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const Lt=Mt;const Ut=class{constructor(e,t){this._grammar={...Ct},this._expression=e,this._ast=null,this._context={},this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new Lt(this._grammar).tokenize(this._expression),t=new Et(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 Tt[e.operationType].call(this,e,t)}},Ft=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new Ut(n,t)},jt=e=>!e||e.buildAST(),Vt=(e,t,n)=>!e||e.evaluate(t,n),kt=(e,t,n)=>{const r=Ft(e,t),s=jt(r);return Vt(s,n)};const $t=class{static handleExpression(e,t,n,r){const s=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:s}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:Ah.getPropertyValue(`${n}.pxObjClass`,null,t)||Ah.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>th({type:J,payload:{context:t,reference:n,value:e[n]}})))}},Gt={},Bt=(e,t)=>Gt[t]&&Object.prototype.hasOwnProperty.call(Gt[t],e),Wt=e=>{const{context:t}=e;Bt(e.reference,t)&&$t.handleExpression(e.reference,e.value,Gt[t][e.reference],t)},Ht=(e={})=>{mh.copy(e,Gt)},qt=(e,t,n)=>kt(e,t,n?.pConnect.getPConnect());const zt=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 r=this.getContextObjectByName(e);if(r)if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}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),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}};const Yt=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={}){mh.copy(e,this.componentMap)}mergeOverrideMap(e={}){mh.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const Kt=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const Xt=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),s=-1===r?e:e.substring(0,r),a=Kt.getHandler(s);return a?a(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return Kt.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=Yt.getComponent(t.type);if(!r||!r.mapping)return;const s=r.mapping(t.config);if(s&&s["@map"]){const t=s["@map"],{source:r}=t;if(!r)return;const a=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,a);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];a.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let s=n[r];s&&0===s.indexOf(".")?(s=s.substring(1),t[r]=e[s]):t[r]=s})),r.push(t)}))}}}static getPropertyName(e){if(e&&mh.isString(e)){const t=e.startsWith(F.PROPERTY_ANNOTATION)||e.startsWith(F.ATTACHMENT_ANNOTATION)||e.startsWith(F.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(mh.isString(e)&&!!e?.startsWith(F.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return mh.isString(e)&&!!e?.startsWith(F.PROPERTY_ANNOTATION)}},Jt=e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},Qt=(e,t)=>{if(e&&t){const n=mh.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:s}=n;return"worklist"===s?.toLowerCase()&&r===e}return!1},Zt=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},en=(e,t)=>{const n=Ah.getPropertyValue(U.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Ah.getPropertyValue(U.CASE_INFO.AVAILABLEACTIONS,t,e);let s=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(s=e.type.toLowerCase()===U.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=nh(e);s=t?.context_data?.actionType===F.CASE}return s},tn=e=>oh(null,F.CASE_VIEW_MODE_PROP,e)===F.PERFORM_MODE&&(e.includes(F.WORKAREA)||e.includes(F.MODAL)),nn=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},rn=(e,t,n)=>{let r;const s=e?.find((e=>e.ID===t))?.actions,a=s?.filter((e=>e.ID===F.FIX_BROKEN_ASSIGNMENTS))||[];return r=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),r},sn=(e,t,n)=>{let r,s,a,o,i,c,l,u,d;const p=nh(e);return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,s=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):(r=t.getValue(U.CASE_INFO.ASSIGNMENT_ID),s=t.getValue(U.CASE_INFO.CASE_INFO_ID),a=t.getValue(U.CASE_INFO.ASSIGNMENTS),o=t.getValue(U.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(U.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(U.CASE_INFO.CASE_INFO),l=t.getValue(U.CASE_INFO.BUSINESS_ID),u=t.getValue(U.CASE_INFO.CASE_TYPE_ID),d=t.getValue(U.CASE_INFO.CASE_TYPE_NAME)),{assignmentID:r,caseID:s,assignments:a,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}};const an=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=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&th({type:ae,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]&&th({type:oe,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 on=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,s="unknown",a,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:s,promise:t,resolve:n,reject:r,actionPayload:a};return this.actionMgrActions[e]=i,o&&an.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t=null)=>{let n,r;null===t&&(t=this.getNextActionMgrId());const s=new Promise(((e,t)=>{n=e,r=t}));return this.register(t,s,n,r,e),{actionMgrID:t,promise:s}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let s=e;return r?(setTimeout((()=>{r.resolve(t)}),0),an.disableLoadingIndicator(r.actionPayload,n)):s=null,s}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let s=e;return r?(r.reject(n),an.disableLoadingIndicator(r.actionPayload,t)):s=null,s}};class cn{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((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new cn(e,t,n),r.parent=this,this.children.push(r)),r}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 r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const ln=cn;const un=class{constructor(e,t,n,r={}){this.type=U.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},dn=/(([^.]+)\[\d+\])/g,pn=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(dn);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},hn=(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:gn,WHEN:fn,DECLARATIVE_TARGET:mn,PAGELIST:yn}=F.CONTEXT_TREE_NODE_TYPES;const In=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[gn,new Map],[fn,new Map],[mn,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===yn){const n=this.references.get(gn);n.set(e,t),this.references.set(gn,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=hn(n.name,e);return-1!==r&&+r>=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),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(gn),s=this.references.get(mn);[...r.keys(),...s.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=pn(e);return+n>=t})).forEach((e=>{const t=r.get(e).parent;t?.removeChildren(),r.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((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new ln(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),s=r?.get(e);s?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,s){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const a=`${e}.${n}.${r}`,o=new un(t,n,r,s),i=this.references.get("WHEN");i?.set(a,o)}},{VIEW:En,FIELD:An,CONTEXT:_n,DECLARATIVE_TARGET:Sn,WHEN:Cn}=U.CONTEXT_TREE_NODE_TYPES;const Tn=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new In(_n,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 r=this.addContextNode(e).addNode("PAGE",t);let s=r.getReference(n);return s||(s=r.addNode("VIEW",n),r.addReference(n,s)),s}pushChildPageNodeToParentView(e,t,n){const r=e.children;let s=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){s=!0;break}s||r.push(t),t.parent=e}addViewNode(e,t,n,r){const s=this.addContextNode(e).addNode("PAGE",t);let a=null;if(r&&n!==r){a=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else a=s.addNode("VIEW",n);s.addReference(n,a);const o=t.split(".");for(;o.length>0;){o.pop();const n=o.join("."),a=this.getContextNode(e)?.getNode("PAGE",n),i=a?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,s,t);break}}return a}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,s){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const a=this.addContextNode(e),o=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,s);return o&&a.addReference(`${t}.${r}`,o),o}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,s){const a=this.getContextNode(e);a?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,s),a?.removeReference(`${t}${r}`,An,s),a?.removeReference(`${t}${r}`,Sn,s)}removeViewNode(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=o?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&o?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);o?.children.forEach((a=>{"PAGE"===a.type?this.removeViewNode(e,a.name,n,r):a.type===En?this.removeChildViewNodes(e,t,a.name,r):(s.removeReference(a.name,An,a.props.index),s.removeReference(a.name,Sn,a.props.index),"PAGELIST"!==a.type&&"Address"!==a.props?.componentName||this.deleteAllListNodes(e,a.name))})),a?.references.delete(n)}deleteAllListNodes(e,t){const n=n=>{const r=this.getContextNode(e),s=r?.references?.get(n);if(s)for(const[e]of s)e.includes(t)&&r?.references?.get(n)?.delete(e)};n(An),n(Sn)}deleteListNode(e,t,n){const r=r=>{const s=this.getContextNode(e),a=s?.references?.get(r);if(a)for(const[e]of a)e.includes(`${t.join(".")}[${n}]`)&&s?.references?.get(r)?.delete(e)};r(An),r(Sn)}getPageListNode(e,t,n,r){const s=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return s?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(An,r)}_findViewNode(e,t,n,r){let s=r.addNode("PAGE",t)?.getReference(n);if(s)return s;const a=t.split(".");for(;a.length>0;){a.pop();const e=a.join(".");if(s=r.addNode("PAGE",e)?.getReference(n),s)return s}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,s,a={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),{isDeclarativeTarget:c}=a;let l;if(l=c?i.addNode(Sn,`${t}${r}`,a):i.addNode(An,`${t}${r}`,a),l){const n=`${t}${r}`;if("Address"===l.props?.componentName&&this.deleteAllListNodes(e,l.name),o.addReference(n,l),l.value=s,l.setPreviousDefaultValue(),l.props.isInsideList){const e=t.substring(0,t.lastIndexOf("["));let n=o.getReference(e,An);n||(n=i.addNode(An,e,{}),o.addReference(e,n))}}return l}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const s=this.getContextNode(e),[a,o,i]=pn(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,a,o,{...r,rowIndex:i},!0);const c=s?.getReference(`${t}.${n}`,An);c&&c instanceof ln&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,s){this.getPageListNode(e,t,n,r)?.addEventListener(s)}mutatePageList(e,t,n,r,s=!1){const a=this.getContextNode(e),o=a?.getReference(`${t}.${n}`,An);o&&o instanceof ln&&o.triggerEvent(r,s)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(An)}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(An)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(Sn)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(An)?.get(t);r instanceof ln&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,An),n=this.getContextReferencesByType(e,Sn);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,An)?.get(t)||!!this.getContextReferencesByType(e,Sn)?.get(t)}addWhenNode(e,t,n,r,s,a){const o=this.getContextNode(e);o?.addWhen(t,n,r,s,a)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(Sn)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,s=t.pageReference??"caseInfo.content";r.push({pageReference:s,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(Cn)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,s=e.name,a=e?.props?.pageReference??"caseInfo.content";r.push({name:s,pageReference:a,referenceName:n,type:t})})),r}},Nn={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"},Pn=e=>({type:Nn.REFRESH_DATA,payload:e}),Dn={},Rn=(e,t,n,r,s)=>{if(!(e&&n&&t))return;const a=s.actionMgrID||on.getNextActionMgrId(),o={ID:e,actionID:t,context:n,caseWideAction:r,options:{...s,actionMgrID:a}};s.isFillFormWithAI?th((e=>({type:pt,payload:e}))(o)):th(Pn(o))},bn=(e,t,n,r,s)=>{if(!(e&&n&&t))return;r&&(r=mh.convertPageRefToClipboardPageNotation(r));th(Pn({ID:e,viewID:t,context:n,options:s,caseViewAction:!0,interestPage:r}))},On=(e,t,n)=>{Dn[t]||(Dn[t]={}),e&&!Dn[t][e]&&(Dn[t][e]={pageReference:n})},vn=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;const s=Rp(n.propertyName,e.getValue(F.CLASS_ID,n.pageName));return!!s?.isDeclarativeTarget},xn=e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata()?.config?.value;if(n){const r=Rp(Xt.getLeafPropertyName(n),Ah.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=vn(e,r)),n};t.some(r)}else if("object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=vn(e,t[r]),n))break;return n})(e,r?.datasource?.parameters)),t||(t=r?.datasource?.tableType===F.DECISION)}}t&&On(e.getCurrentView(),e.getContextName(),e.getPageReference())},wn=(e,t,n)=>{const r=en(e,t),s=Ah.getPropertyValue(U.CASE_INFO.ACTIVE_ACTION_ID,t,e)?Ah.getPropertyValue(U.CASE_INFO.ACTIVE_ACTION_ID,t,e):Ah.getPropertyValue(U.CASE_INFO.ASSIGNMENTACTION_ID,t,e);let a;a=r?Ah.getPropertyValue(U.CASE_INFO.CASE_INFO_ID,t,e):Ah.getPropertyValue(U.CASE_INFO.ASSIGNMENT_ID,t,e)?Ah.getPropertyValue(U.CASE_INFO.ASSIGNMENT_ID,t,e):Ah.getPropertyValue(U.CONTEXT_DATA_ASSIGNMENTID,t,e),Rn(a,s,e,r,n)},Mn=e=>{const{context:t,pageReference:n}=e,r=(e=>Dn[e]&&Object.keys(Dn[e]).length>0&&tn(e))(t);if(!r)return;if(Ah.getPropertyValue(F.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=Ah.getPropertyValue(U.CASE_INFO.CASE_INFO_ID,n,t),r=Ah.getPropertyValue(F.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),s=Ah.getPropertyValue(F.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,n,t);bn(e,r,t,s,{})}else wn(t,n,{})},Ln=(e,t)=>{const{requestType:n}=e;return e?.options?.refreshFor&&"refresh"===n&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},Un=e=>{const t=(e=>{const t=[];return Tn.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let s=r.join(".");e&&s&&(s=mh.convertPageRefToClipboardPageNotation(s),t.push({name:e,context:s}))})),t})(e),n=(e=>{const t=[];return Tn.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const s=r.split(".");s.shift();let a=s.join(".");e&&a&&(a=mh.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const Fn=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),s=Number(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}},jn={CONTENT_FIELDS_PATH:[F.CONTEXT_DATA,F.CASE_INFO.CASE_INFO,F.CONTENT],FIELD_MESSAGES_PATH:[F.CONTEXT_DATA,F.CASE_INFO.CASE_INFO,F.CONTENT,F.SUMMARY_OF_MESSAGES,F.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[F.CONTEXT_DATA,F.SUMMARY_OF_MESSAGES,F.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[F.CONTEXT_DATA,F.SUMMARY_OF_MESSAGES,F.HTTP_MESSAGES],CASE_MESSAGE_PATH:[F.CASEMESSAGES]},Vn=(e="",t="",n,r)=>{let s,a=[];null!==e&&(s=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===F.PROPERTY&&e||e){a=[F.CONTEXT_DATA,...o.split(".")];for(let e=0;e<s.length-1;e+=1)a.push(s[e]);a.push(F.SUMMARY_OF_MESSAGES,F.PROPERTY_MESSAGES,s[s.length-1])}else n===U.PAGE?a=[...jn.PAGE_MESSAGES_PATH]:n===F.HTTP?a=[...jn.HTTP_MESSAGES_PATH]:n===F.CASEMESSAGES?a=[...jn.CASE_MESSAGE_PATH]:r&&(a=[F.CONTEXT_DATA,...o.split(".")]);return a.filter(Boolean)},kn=(e,t,n)=>{const r={content:{}},s=`${t}[${n}]`,a=mh.getIn(e?.content,s.split("."));return a&&mh.setIn(r.content,s.split("."),{...a}),r},$n=(e,t,n,r,s,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,r,s),c=r>s?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)?.[0],10),s=`${a}[${r}]`;o[`${a}[${r+("up"===c?1:-1)}]`]=mh.getIn(e[t],[F.CONTEXT_DATA,...s.split(".")]),mh.deleteIn(e[t],[F.CONTEXT_DATA,...s.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{mh.setIn(e[t],[F.CONTEXT_DATA,...n.split(".")],o[n])}))},Gn=(e,t,n,r,s)=>{const a=mh.deepClone(mh.getIn(e,[`${t}`])),o=mh.getIn(a,[F.CONTEXT_DATA,F.CASE_INFO.CASE_INFO]);if(!o)return;const i=n.substring(0,n.lastIndexOf(".")),c=n.substring(n.lastIndexOf(".")+1),l=((e,t,n)=>{const r=mh.getIn(e,[F.CONTEXT_DATA,...n.split(".")]);return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(a,c,i);if(0===l.length)return;if(kn(o,c,r).content[`${c}[${r}]`]){const o={},i=`${n}[${r}]`,c=mh.getIn(a,[F.CONTEXT_DATA,...i.split(".")]);o[`${n}[${s}]`]=c,mh.deleteIn(e[t],[F.CONTEXT_DATA,...i.split(".")]),$n(e,t,l,r,s,n,o)}else $n(e,t,l,r,s,n)},Bn=e=>{const{type:t,property:n,category:r,context:s,pageReference:a}=e;let o;n&&(o=n.slice(1));const i=nh(s);let c=[];const l=mh.getIn(i,Vn(o,a,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===U.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&Tn.mutateField(s,a,n,{messages:[...c],type:U.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},Wn=e=>{const{property:t,pageReference:n,category:r,context:s,type:a,isListEntry:o,clearContextMessages:i,deletingIndex:c}=e,l={context:s,type:a};t&&!o?(Tn.mutateField(s,n,t,{type:Xe,fieldName:t}),l.property=t,l.pageReference=n):o?(l.pageReference=n,l.isListEntry=o,l.deletingIndex=c):l.category=r,th(i?{type:Xe,payload:{stateObj:e.stateObj,context:s}}:{type:Xe,payload:l})},Hn=e=>{const{messages:t,property:n,pageReference:r,category:s,context:a}=e,o={messages:t,context:a};n?(o.property=n,o.pageReference=r):o.category=s,th({type:Ke,payload:o})},qn=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===F.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&qn(e[r],t,n)}t.pop()}return n},zn=(e,t)=>{let n=Bn({context:F.APP.ROOT,category:"HTTP"});if(e){const e=Bn({context:t,category:"HTTP"});n?e&&(n=n.concat(Bn({context:t,category:"HTTP"}))):n=Bn({context:t,category:"HTTP"})}return n},Yn=e=>{let t=null;t=fd(e)[0]?ld(fd(e)[0]):e,t&&Wn({context:t,stateObj:nh(t),clearContextMessages:!0})},Kn={addMessages:Hn,getValidationErrorMessages:e=>{const t=nh(e),n=[],r=mh.getIn(t,[...jn.CONTENT_FIELDS_PATH])||{};return qn(r,[],[]).forEach((e=>{const t=mh.getIn(r,[...e,F.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].forEach((e=>{e.type===F.MESSAGES.MESSAGES_TYPE_ERROR&&(e.fieldLabel?n.push({label:`${e.fieldLabel}:`,description:e.message}):n.push(e.message))}))}))})),n},getMessages:Bn,clearMessages:Wn,getRootContainerHttpMessages:zn,clearContextMessagesInActiveWorkArea:Yn},Xn=Kn;const Jn=class{static execute(e,t,n,r){const s={};Object.prototype.hasOwnProperty.call(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{s[e]=n[e],delete n[e]})),delete n.nonFormProperties);const a={instruction:"INSERT",content:{...mh.unflatten(n)}},o=JSON.parse(JSON.stringify(a));delete o.content.classID;return{instruction:{target:mh.buildInstructionPageReference(r,e),content:{...o.content},listIndex:t,instruction:"INSERT"},actionPayload:a,displayPropertPayload:s}}};const Qn=class{static execute(e,t,n,r,s,a){const o={instruction:"UPDATE",content:{...mh.unflatten(r)}},i={content:{...o.content},target:mh.buildInstructionPageReference(s,t),listIndex:n,instruction:"UPDATE"};return a||th(rg({...o,listIndex:n-1,context:e,referenceList:`${s}${t}`})),i}};const Zn=class{static execute(e,t,n){return{target:mh.buildInstructionPageReference(n,e),listIndex:t,instruction:"DELETE"}}};const er=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:mh.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||th(rg({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const tr=class{static execute(e,t,n,r){return{target:mh.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const nr=class{static execute(e,t,n,r){return{content:{...{...mh.unflatten(n)}},target:mh.buildInstructionPageReference(r,t),instruction:"REPLACE"}}};const rr=class{static execute(e,t){return{target:mh.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const sr=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const ar=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},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 sr(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}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 r=e.getValue(this.target)||[];t?r.forEach(((e,r)=>{t.forEach((t=>{const s=Kc(t),a={};let o=!0;n&&(a[Kc(n)]=crypto.randomUUID(),o=!1);const i={[s]:e[s],...a};this.update(i,r+1,o,{isDefault:!0})}))})):r.forEach(((e,t)=>{if(n&&!e[Kc(n)]){const e={};e[Kc(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{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,r){const s=Qn.execute(this.contextName,this.target,t,e,this.pageReference,n),{isDefault:a=!1,skipPageinstruction:o}=r;if(!o){if(this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=dh(mh.deepClone(n),e,r)}if(this.current?.automatic!==a||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(s),a&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=dh(mh.deepClone(t),mh.unflatten(e),r)}}}delete(e,t){const n=Zn.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||th(rg({instruction:"DELETE",listIndex:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:s,actionPayload:a={content:{}},displayPropertPayload:o={}}=Jn.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList(t-1),!i){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=dh(mh.deepClone(n),e,r)}this.insertNode(s),n||(a.content={...a.content,...o},th(rg({...a,listIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e){const t=nr.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}deletePage(){const e=rr.execute(this.target,this.pageReference);this.insertNode(e)}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=tr.execute(this.target,e,t,this.pageReference);this.insertNode(r),th(rg({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=er.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),er.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=dh(mh.deepClone(t),e)}},or={},ir={},cr={},lr=(e,t,n)=>{const r=e.getContextName();or[r]||(or[r]={}),or[r][t]||(or[r][t]={content:[]}),ir[r]||(ir[r]=[],cr[r]=[]),zc.isStateMachineExist(r,n,t)||zc.setStateMachine(r,t,n,new ar(t,n,r))},ur=e=>Fn.formatPageReference(e),dr=(e,t)=>{const n=ir[e],r=cr[e],s=Kc(t),a=s?.substring(0,s.indexOf("["));r?.indexOf(a)<0&&cr[e].push(a),n?.indexOf(s)<0&&ir[e].push(s)},pr=e=>{delete ir[e]},hr=e=>zc.buildPageInstructionsByContext(e),gr=e=>zc.buildPageInstructionsByContext(e,!0),fr=e=>{zc.clearStateMachines(e),delete or[e]},mr=(e,t,n,r)=>{let[,s]=t.split(`${e}[${r}]`);""!==s&&void 0!==s&&(s=s.startsWith(".")?s.substring(1):s,Object.keys(n).forEach((e=>{n[`${s}.${e}`]=n[e],delete n[e]})))},yr=(e,t,n,r,s)=>{const{skipStateUpdate:a=!1}=s||{},o=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),l=ur(i);lr(n,l,c),dr(o,`${i}[${t}]`),mr(i,c,e,t);const u={instruction:F.LIST_ACTIONS.INSERT,content:{...mh.unflatten(e)}};delete JSON.parse(JSON.stringify(u)).content.classID;zc.getStateMachine(o,c,l).insert(e,t+1,a,{})},Ir=(e,t,n=0,r={})=>{const{skipStateUpdate:s=!0,pageRef:a}=r,o=t.getContextName();let i=t.getReferenceList();const c=a||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(U.CONTENT)+U.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=ur(i);lr(t,l,c),dr(o,`${i}[${n}]`),mr(i,c,e,n);zc.getStateMachine(o,c,l).update(e,n+1,s,r)},Er=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Ar=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(Er(e,n)){const n=mh.getPropertyName(e),s=n.substr(n.indexOf(".")+1).split(".");if(s.length>1){let e=mh.getIn(t,s)??"";if(!e){const n=`!P!${s.join(":")}`;e=mh.getIn(t,n)??""}mh.setIn(r,s,e)}else{const e=mh.getIn(t,s)??"";r[s[s.length-1]]=e}}})),r},_r=(e,t,n,r,s)=>{const a=e.getValue(t)||{};n&&Object.keys(a).length>0&&e.clearErrorMessages({property:r?s:e.getStateProps().value})},Sr=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:s=!1}=n,{selectionMode:a,selectionList:o,required:i}=t.getConfigProps(),c=a===F.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 h=null;const g=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);g&&(d=p?.config?.dataRelationshipContext,h=u.concat(".").concat(d),u=h);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,d,h),{datasource:{parameters:y={}}}=m,I={...y};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=mh.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(I,m,c),c){let n=o;n=ur(n);const r=t.getValue(f)||[];lr(t,n,u);const a=[];let i=r.length;e.forEach((e=>{const t=Ar(y,e,d),o={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!s){const r=zc.getStateMachine(l,u,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}a.push({instruction:e.$selected?F.LIST_ACTIONS.SELECT:F.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),th(rg({instruction:F.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:a}))}else{const n=Ar(I,e[0],d),r=(e=>e.length>1?e.pop():"")(u.split(/\[\d+\]/gm));Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[`${e}`],g?{contextPageReference:u}:{})})),t.getActionsApi().triggerFieldChange(r,n)}_r(t,f,i,c,d),r()})),Cr=e=>{if(!e)return!1;const t=gr(e);return Array.isArray(t)&&t.length>0};const Tr=(e,t,n)=>{const{skipStateUpdate:r=!1}=n,s=e.getPageReference(),a=ur(t);lr(e,t,s);zc.getStateMachine(e.getContextName(),s,a).deleteAll(r)},Nr=e=>({insert:(t,n,r,s)=>yr(t,n,e,r,s),update:(t,n,r)=>Ir(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r)=>{const s=n.getPageReference(),{stateMachineTarget:a}=zc.getStateMachineObjByPath(`${s}${e}`,n.getContextName(),!0);if(!a){let e=s.substring(0,s.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&lr(n,t,e)}zc.executeStateMachine(n.getContextName(),`${s}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n)=>((e,t,n)=>{const r=t.getContextName(),s=t.getReferenceList(),a=n||t.getPageReference(),o=`${a+s}[${e}]`,i=ur(s);Wn({type:U.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:o,context:r,isListEntry:!0,deletingIndex:e}),lr(t,i,a),dr(r,`${s}[${e}]`),zc.getStateMachine(r,a,i).delete(e+1);const c=zc.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((e=>{e.includes(`${a}${i}`)&&(c[e]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),s=n.getReferenceList(),a=n.getPageReference(),o=ur(s);lr(n,o,a),dr(r,`${s}[${t}]`),zc.getStateMachine(r,a,o).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Sr(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),s=[];let a=t.getPageReference();const o=n===F.LIST_SELECTION_MODE.MULTI;let i=o?r.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}${r}`: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 r=n.substring(n.lastIndexOf(".")+1);return Er(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&s.push(t.trim())})),Promise.resolve(s)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),s=e.getPageReference(),a=t,o=`${s}${t}`;return new Promise((t=>{let i=a;i=ur(i),lr(e,i,s),zc.getStateMachine(r,s,i).deleteAll(),_r(e,o,n,!0,a),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:s,renderMode:a,referenceList:o}=e.getComponentConfig();let i;if(r===F.LIST_SELECTION_MODE.MULTI&&s?i=s:"Editable"===a&&o&&(i=e.getStateProps().referenceList),i){i=ur(i);const r=zc.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const s=e.getContextName(),a=e.getPageReference(),o=ur(t);lr(e,o,a),zc.getStateMachine(s,a,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n={})=>Tr(e,t,n),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),s=e.getContextName();lr(e,t,r),dr(s,mh.buildInstructionPageReference(r,t)),zc.getStateMachine(s,r,t).replacePage(n)})(e,t,n),deletePage:t=>((e,t)=>{const n=e.getPageReference(),r=e.getContextName();lr(e,t,n),dr(r,mh.buildInstructionPageReference(n,t)),zc.getStateMachine(r,n,t).deletePage()})(e,t)});const Pr=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?mh.mergeDeep(e,this.fieldDefaults):mh.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=n)}getDefaultsforType(e){return this.fieldDefaults[e]}};class Dr{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,s,a){const{required:o,value:i}=a;let c=null;if(!("true"!==o&&!0!==o)){let o=r;switch(e){case"radiobuttons":o=i;break;case"attachment":{const e=n?.replace(U.CASE_INFO.CASE_INFO_CONTENT,"").replace(U.DATA_INFO.DATA_INFO_CONTENT,"");o=(ah(`.attachmentsList${e}.${t?.replace(".","")}`,"context_data",s)||[]).filter((e=>!e.delete)),0===o?.length&&(o="");break}case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),Dr.messageDispatcher(t,n,s,c,Fn.getFieldLabel(a))}return c}validateType(e,t,n,r,s,a){let o=null;const i={pageReference:n,context:s,property:t,target:a?.target,required:a?.required};let c=Pr.getDefaultsforType(a?.componentName)?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(r,i),""!==r&&Dr.messageDispatcher(t,n,s,o,a?.label));const l=a?.validationType;return c=l&&Pr.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(r,i),Dr.messageDispatcher(t,n,s,o,a?.label)),o}validate(e,t,n,r={}){const{context:s,disabled:a,readOnly:o,pageReference:i,skipRequiredValidation:c}=r;let l=null;return a||o||(c||(l=this.validateRequired(e,t,i,n,s,r)),l||(l=this.validateType(e,t,i,n,s,r))),{message:l}}static messageDispatcher(e,t,n,r,s){if(r){const a=[];a.push({type:U.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:s,message:r}),Hn({messages:a,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const Rr=new Dr,br=(e,t)=>{e.DeclareExpressions&&Ht({[t.context]:e.DeclareExpressions})},Or=(e,t,n=!1)=>{const r=mh.getIn(e,F.RESOURCES);r&&((e=>{e&&xp(e)})(r),br(r,t)),n||Ng({...e,options:t})},vr="text/javascript";const xr=new class{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={}}getTypes={SCRIPT:"script",STYLE:"link"};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="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=ap.getBuiltOnAppNames(),s=this.loadAndFilterPegaComponentsConfig(e,r);let a=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(a=this.loadAndCustomerComponentsConfig(t));const o=this.fetchSDKComponent(t),i=[];if(await Promise.all([s,a,o]).then((e=>{const t=this.mergeComponentList(e);i.push(...t)})),n.alternateDesignSystemURL&&1===i.length){const r=await this.getSvcComponentsConfigADS(e,t,n);i[0].alternateDesignSystemConfig=r}return{data:{components:i}}}mergeComponentList=e=>{const[t=[],n=[],r=[]]=e,s=[...t,...n];return this.appStaticUrl?s.map((e=>{const{name:t,type:n,subtype:s}=e,a=r.reduce(((e,r)=>(t===r.name&&n===r.type&&s===r.subtype&&(e=r),e)),{});return Object.keys(a).length>0?{...e,alternateDesignSystemConfig:{...a}}:e})):s};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((r=>{let s=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(s=!1):r[e.field]!==e.value&&(s=!1)})),s&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),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){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const n=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((function(e){return-1!==t.indexOf(e)}))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,s=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&s?.data?.components?.length>0&&(s.data.components=s.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===s?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);s.data.components[0].alternateDesignSystemConfig=r}return s}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{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){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return void 0===this.imageBlobUrlCache[t]&&(this.imageBlobUrlCache[t]=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()),this.imageBlobUrlCache[t]}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}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}async importCustomComponentMap(e){fetch(`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>(e.ok||console.error("Error while fetching custom component map"),e))).then((e=>e.text())).then((t=>{this.setCCV2LibId(e);const n=document.createElement("script");n.src=window.URL.createObjectURL(new Blob([t],{type:vr})),n.onload=()=>console.log("Custom component lib map loaded"),n.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(n)})).catch((e=>{console.error("Exception while appending custom component map : "),console.error(e)}))}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([r],{type:vr})),s.onload=()=>t(e),s.onerror=()=>n(e),document.head.appendChild(s)})).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,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=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,r)=>{const s=document.createElement(t);"script"===t?(s.onload=()=>{n(e)},s.onerror=()=>{r(e)},s.type=vr,s.charset="UTF-8",s.async=!1,s.src=e):(s.type="text/css",s.rel="stylesheet",s.href=e),document.head.appendChild(s)})).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 r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let s=n?Object.values(e)[0]:this.getStaticServerUrl();s=s.endsWith("/")?s:`${s}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(s+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(s+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(s.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),r=JSON.parse(n),a=r?.tenant_id,{restApi:o,reqType:i}=yg("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()))}},wr="component-loader",Mr={},Lr=async(e,t)=>{const n=xr.getLoader(),r=t||xr.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(xr.getLoader(wr))return xr.getLoader(wr)(e,r);const s=[];return e.forEach((e=>{if(Mr[e])return;const t=Yt.getComponent(e);if(!t){const t=`${xr.getConstellationServiceUrl()}/v860/${xr.getAppAlias()}/component/${e}.js`;return void s.push(n(t,xr.getTypes.SCRIPT))}(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;s.push(n(t,xr.getTypes.SCRIPT))}));(t.styles||[]).forEach((e=>{s.push(n(r+e,xr.getTypes.STYLE))})),Mr[e]=!0})),Promise.all(s)};class Ur{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 Fr=Ur;const jr=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const Vr=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let s=0,a=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(a=s),s+=1})),r.splice(a,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,s){this.subscribers[e]=this.subscribers[e]||[];let a=!1;if(s&&this.subscribers[e].forEach((e=>{a=e.id===t&&e.contextName===r})),!a){const s=new jr(e,t,n,r);this.subscribers[e].push(s)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}};const kr=class{static subscribe(e,t,n,r=!1,s="app"){Vr.subscribe(e,n,t,s,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){Vr.publish(e,t)}static unsubscribe(e,t,n="app"){Vr.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){Vr.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){Vr.clearContext(e)}},$r=e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Gr={CASE_INFO:`${F.DATA}.${F.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${F.DATA}.${F.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${F.DATA}.${F.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${F.DATA}.${F.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${F.DATA}.${F.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${F.DATA}.${F.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${F.DATA}.${F.CASE_INFO.ASSIGNMENT_ID}`},Br=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||Fr.getTargetViewContainerName(e)},Wr=e=>{const t=e.lastIndexOf(F.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(F.UNDERSCORE_STRING);return e.substring(t,n)},Hr=e=>e===Qu.WORKAREA,qr=e=>e===Qu.MODAL,zr=e=>e===Ie,Yr=e=>e&&e.find((e=>e.type===Ie)),Kr=e=>mh.getIn(e,Gr.CASE_INFO,{}),Xr=e=>e?e.split(" ").pop():void 0,Jr=e=>mh.getIn(e,Gr.CASE_CLASS_NAME,F.EMPTY_STRING),Qr=e=>{const t=Kr(e);return Jt(t)&&Qt(ap.getOperatorIdentifier(),t)},Zr=e=>mh.getIn(e,Gr.CASE_INFO_ID,F.EMPTY_STRING),es=e=>mh.getIn(e,Gr.CASE_FIRST_ASSIGNMENT_ID,F.EMPTY_STRING),ts=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:s}=n;e.push(Zh(qh,{containerItemID:t,context:s||pd(t),target:r}))}},ns=e=>{const t=eh();if(!e)return!1;const n=B(e),r=Dd(n),s=Dd(e);if(!r||!s)return!1;const a=td(r,n),o=td(s,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},rs=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,s=Zr(t);mh.setIn(e,"key",s);const a=Jt(Kr(t));if(!r&&(e=>{const t=mh.getIn(e,Gr.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=es(t),[,r]=n.split("!");(e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:a}),mh.setIn(e,"flowName",r)}},ss=(e,t)=>{const{attachmentsExist:n}=t;n&&mh.setIn(e,U.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),mh.setIn(e,U.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},as=(e,t,n)=>{let r=F.PROMISE_VALUE.RESOLVE;return Yr(e)?(r=F.PROMISE_VALUE.REJECT,n?on.rejectActionByID(t,!0,n):on.rejectActionByID(t)):on.resolveActionByID(t),r},os=e=>{const t=ap.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},is=()=>"true"===ap?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,cs=(e,t)=>{const n=Jr(e?.response),r=Kr(e?.response),{caseTypeID:s}=r,a=ap.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,F.DEFER_UPDATE_CASESUMMARY_VIEW))&&s&&Mp(F.CASESUMMARY_VIEW_NAME,s)&&((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r){const{caseClassName:a}=n,o=B(r),i=Dd(o),c=i&&ed(i),l=i&&ld(i),u=z(o);l&&c?.items?.[l]?.key===t?.caseID&&e.push(Zh(Rh,{containerItemID:o,context:o,container:u,containerName:u,caseId:s,viewName:U.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:o},caseClassName:a}))}})(t,e?.actionInPayload,{caseClassName:n})};function ls(e,t){return function(){return e.apply(t,arguments)}}const{toString:us}=Object.prototype,{getPrototypeOf:ds}=Object,ps=(hs=Object.create(null),e=>{const t=us.call(e);return hs[t]||(hs[t]=t.slice(8,-1).toLowerCase())});var hs;const gs=e=>(e=e.toLowerCase(),t=>ps(t)===e),fs=e=>t=>typeof t===e,{isArray:ms}=Array,ys=fs("undefined");const Is=gs("ArrayBuffer");const Es=fs("string"),As=fs("function"),_s=fs("number"),Ss=e=>null!==e&&"object"==typeof e,Cs=e=>{if("object"!==ps(e))return!1;const t=ds(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ts=gs("Date"),Ns=gs("File"),Ps=gs("Blob"),Ds=gs("FileList"),Rs=gs("URLSearchParams"),[bs,Os,vs,xs]=["ReadableStream","Request","Response","Headers"].map(gs);function ws(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),ms(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,e[o],o,e)}}function Ms(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Ls="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Us=e=>!ys(e)&&e!==Ls;const Fs=(js="undefined"!=typeof Uint8Array&&ds(Uint8Array),e=>js&&e instanceof js);var js;const Vs=gs("HTMLFormElement"),ks=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$s=gs("RegExp"),Gs=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ws(n,((n,s)=>{let a;!1!==(a=t(n,s,e))&&(r[s]=a||n)})),Object.defineProperties(e,r)},Bs="abcdefghijklmnopqrstuvwxyz",Ws="0123456789",Hs={DIGIT:Ws,ALPHA:Bs,ALPHA_DIGIT:Bs+Bs.toUpperCase()+Ws};const qs=gs("AsyncFunction"),zs=(Ys="function"==typeof setImmediate,Ks=As(Ls.postMessage),Ys?setImmediate:Ks?(Xs=`axios@${Math.random()}`,Js=[],Ls.addEventListener("message",(({source:e,data:t})=>{e===Ls&&t===Xs&&Js.length&&Js.shift()()}),!1),e=>{Js.push(e),Ls.postMessage(Xs,"*")}):e=>setTimeout(e));var Ys,Ks,Xs,Js;const Qs="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Ls):"undefined"!=typeof process&&process.nextTick||zs,Zs={isArray:ms,isArrayBuffer:Is,isBuffer:function(e){return null!==e&&!ys(e)&&null!==e.constructor&&!ys(e.constructor)&&As(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||As(e.append)&&("formdata"===(t=ps(e))||"object"===t&&As(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Is(e.buffer),t},isString:Es,isNumber:_s,isBoolean:e=>!0===e||!1===e,isObject:Ss,isPlainObject:Cs,isReadableStream:bs,isRequest:Os,isResponse:vs,isHeaders:xs,isUndefined:ys,isDate:Ts,isFile:Ns,isBlob:Ps,isRegExp:$s,isFunction:As,isStream:e=>Ss(e)&&As(e.pipe),isURLSearchParams:Rs,isTypedArray:Fs,isFileList:Ds,forEach:ws,merge:function e(){const{caseless:t}=Us(this)&&this||{},n={},r=(r,s)=>{const a=t&&Ms(n,s)||s;Cs(n[a])&&Cs(r)?n[a]=e(n[a],r):Cs(r)?n[a]=e({},r):ms(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ws(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(ws(t,((t,r)=>{n&&As(t)?e[r]=ls(t,n):e[r]=t}),{allOwnKeys:r}),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,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,a,o;const i={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)o=s[a],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&ds(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:ps,kindOfTest:gs,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ms(e))return e;let t=e.length;if(!_s(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Vs,hasOwnProperty:ks,hasOwnProp:ks,reduceDescriptors:Gs,freezeMethods:e=>{Gs(e,((t,n)=>{if(As(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];As(r)&&(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={},r=e=>{e.forEach((e=>{n[e]=!0}))};return ms(e)?r(e):r(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:Ms,global:Ls,isContextDefined:Us,ALPHABET:Hs,generateString:(e=16,t=Hs.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&As(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ss(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const s=ms(e)?[]:{};return ws(e,((e,t)=>{const a=n(e,r+1);!ys(a)&&(s[t]=a)})),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:qs,isThenable:e=>e&&(Ss(e)||As(e))&&As(e.then)&&As(e.catch),setImmediate:zs,asap:Qs};function ea(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}Zs.inherits(ea,Error,{toJSON:function(){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:Zs.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ta=ea.prototype,na={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{na[e]={value:e}})),Object.defineProperties(ea,na),Object.defineProperty(ta,"isAxiosError",{value:!0}),ea.from=(e,t,n,r,s,a)=>{const o=Object.create(ta);return Zs.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ea.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const ra=ea;function sa(e){return Zs.isPlainObject(e)||Zs.isArray(e)}function aa(e){return Zs.endsWith(e,"[]")?e.slice(0,-2):e}function oa(e,t,n){return e?e.concat(t).map((function(e,t){return e=aa(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ia=Zs.toFlatObject(Zs,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ca=function(e,t,n){if(!Zs.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Zs.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Zs.isUndefined(t[e])}))).metaTokens,s=n.visitor||l,a=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Zs.isSpecCompliantForm(t);if(!Zs.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Zs.isDate(e))return e.toISOString();if(!i&&Zs.isBlob(e))throw new ra("Blob is not supported. Use a Buffer instead.");return Zs.isArrayBuffer(e)||Zs.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let i=e;if(e&&!s&&"object"==typeof e)if(Zs.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Zs.isArray(e)&&function(e){return Zs.isArray(e)&&!e.some(sa)}(e)||(Zs.isFileList(e)||Zs.endsWith(n,"[]"))&&(i=Zs.toArray(e)))return n=aa(n),i.forEach((function(e,r){!Zs.isUndefined(e)&&null!==e&&t.append(!0===o?oa([n],r,a):null===o?n:n+"[]",c(e))})),!1;return!!sa(e)||(t.append(oa(s,n,a),c(e)),!1)}const u=[],d=Object.assign(ia,{defaultVisitor:l,convertValue:c,isVisitable:sa});if(!Zs.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Zs.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Zs.forEach(n,(function(n,a){!0===(!(Zs.isUndefined(n)||null===n)&&s.call(t,n,Zs.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function la(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function ua(e,t){this._pairs=[],e&&ca(e,this,t)}const da=ua.prototype;da.append=function(e,t){this._pairs.push([e,t])},da.toString=function(e){const t=e?function(t){return e.call(this,t,la)}:la;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const pa=ua;function ha(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ga(e,t,n){if(!t)return e;const r=n&&n.encode||ha,s=n&&n.serialize;let a;if(a=s?s(t,n):Zs.isURLSearchParams(t)?t.toString():new pa(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const fa=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Zs.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ma={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ya={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:pa,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Ia="undefined"!=typeof window&&"undefined"!=typeof document,Ea=(Aa="undefined"!=typeof navigator&&navigator.product,Ia&&["ReactNative","NativeScript","NS"].indexOf(Aa)<0);var Aa;const _a="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Sa=Ia&&window.location.href||"http://localhost",Ca={...a,...ya};const Ta=function(e){function t(e,n,r,s){let a=e[s++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),i=s>=e.length;if(a=!a&&Zs.isArray(r)?r.length:a,i)return Zs.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o;r[a]&&Zs.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],s)&&Zs.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}(r[a])),!o}if(Zs.isFormData(e)&&Zs.isFunction(e.entries)){const n={};return Zs.forEachEntry(e,((e,r)=>{t(function(e){return Zs.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Na={transitional:ma,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=Zs.isObject(e);s&&Zs.isHTMLForm(e)&&(e=new FormData(e));if(Zs.isFormData(e))return r?JSON.stringify(Ta(e)):e;if(Zs.isArrayBuffer(e)||Zs.isBuffer(e)||Zs.isStream(e)||Zs.isFile(e)||Zs.isBlob(e)||Zs.isReadableStream(e))return e;if(Zs.isArrayBufferView(e))return e.buffer;if(Zs.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ca(e,new Ca.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Ca.isNode&&Zs.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=Zs.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ca(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(Zs.isString(e))try{return(t||JSON.parse)(e),Zs.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Na.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Zs.isResponse(e)||Zs.isReadableStream(e))return e;if(e&&Zs.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw ra.from(e,ra.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ca.classes.FormData,Blob:Ca.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Zs.forEach(["delete","get","head","post","put","patch"],(e=>{Na.headers[e]={}}));const Pa=Na,Da=Zs.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"]),Ra=Symbol("internals");function ba(e){return e&&String(e).trim().toLowerCase()}function Oa(e){return!1===e||null==e?e:Zs.isArray(e)?e.map(Oa):String(e)}function va(e,t,n,r,s){return Zs.isFunction(r)?r.call(this,t,n):(s&&(t=n),Zs.isString(t)?Zs.isString(r)?-1!==t.indexOf(r):Zs.isRegExp(r)?r.test(t):void 0:void 0)}class xa{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=ba(t);if(!s)throw new Error("header name must be a non-empty string");const a=Zs.findKey(r,s);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Oa(e))}const a=(e,t)=>Zs.forEach(e,((e,n)=>s(e,n,t)));if(Zs.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(Zs.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&Da[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Zs.isHeaders(e))for(const[t,r]of e.entries())s(r,t,n);else null!=e&&s(t,e,n);return this}get(e,t){if(e=ba(e)){const n=Zs.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 r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Zs.isFunction(t))return t.call(this,e,n);if(Zs.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ba(e)){const n=Zs.findKey(this,e);return!(!n||void 0===this[n]||t&&!va(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=ba(e)){const s=Zs.findKey(n,e);!s||t&&!va(0,n[s],s,t)||(delete n[s],r=!0)}}return Zs.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!va(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return Zs.forEach(this,((r,s)=>{const a=Zs.findKey(n,s);if(a)return t[a]=Oa(r),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(s):String(s).trim();o!==s&&delete t[s],t[o]=Oa(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Zs.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Zs.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")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ra]=this[Ra]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ba(e);t[r]||(!function(e,t){const n=Zs.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})}))}(n,e),t[r]=!0)}return Zs.isArray(e)?e.forEach(r):r(e),this}}xa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Zs.reduceDescriptors(xa.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Zs.freezeMethods(xa);const wa=xa;function Ma(e,t){const n=this||Pa,r=t||n,s=wa.from(r.headers);let a=r.data;return Zs.forEach(e,(function(e){a=e.call(n,a,s.normalize(),t?t.status:void 0)})),s.normalize(),a}function La(e){return!(!e||!e.__CANCEL__)}function Ua(e,t,n){ra.call(this,null==e?"canceled":e,ra.ERR_CANCELED,t,n),this.name="CanceledError"}Zs.inherits(Ua,ra,{__CANCEL__:!0});const Fa=Ua;function ja(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ra("Request failed with status code "+n.status,[ra.ERR_BAD_REQUEST,ra.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Va=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,a=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[o];s||(s=c),n[a]=i,r[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-s<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const ka=function(e,t){let n,r,s=0,a=1e3/t;const o=(t,a=Date.now())=>{s=a,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-s;i>=a?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),a-i)))},()=>n&&o(n)]},$a=(e,t,n=3)=>{let r=0;const s=Va(50,250);return ka((n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,i=a-r,c=s(i);r=a;e({loaded:a,total:o,progress:o?a/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},Ga=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ba=e=>(...t)=>Zs.asap((()=>e(...t))),Wa=Ca.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=Zs.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},Ha=Ca.hasStandardBrowserEnv?{write(e,t,n,r,s,a){const o=[e+"="+encodeURIComponent(t)];Zs.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Zs.isString(r)&&o.push("path="+r),Zs.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function qa(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const za=e=>e instanceof wa?{...e}:e;function Ya(e,t){t=t||{};const n={};function r(e,t,n){return Zs.isPlainObject(e)&&Zs.isPlainObject(t)?Zs.merge.call({caseless:n},e,t):Zs.isPlainObject(t)?Zs.merge({},t):Zs.isArray(t)?t.slice():t}function s(e,t,n){return Zs.isUndefined(t)?Zs.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!Zs.isUndefined(t))return r(void 0,t)}function o(e,t){return Zs.isUndefined(t)?Zs.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,s,a){return a in t?r(n,s):a in e?r(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage: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,responseEncoding:o,validateStatus:i,headers:(e,t)=>s(za(e),za(t),!0)};return Zs.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=c[r]||s,o=a(e[r],t[r],r);Zs.isUndefined(o)&&a!==i||(n[r]=o)})),n}const Ka=e=>{const t=Ya({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=wa.from(i),t.url=ga(qa(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Zs.isFormData(r))if(Ca.hasStandardBrowserEnv||Ca.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(n=i.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(Ca.hasStandardBrowserEnv&&(s&&Zs.isFunction(s)&&(s=s(t)),s||!1!==s&&Wa(t.url))){const e=a&&o&&Ha.read(o);e&&i.set(a,e)}return t},Xa="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ka(e);let s=r.data;const a=wa.from(r.headers).normalize();let o,i,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=wa.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());ja((function(e){t(e),g()}),(function(e){n(e),g()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new ra("Request aborted",ra.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new ra("Network Error",ra.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||ma;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ra(t,s.clarifyTimeoutError?ra.ETIMEDOUT:ra.ECONNABORTED,e,f)),f=null},void 0===s&&a.setContentType(null),"setRequestHeader"in f&&Zs.forEach(a.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),Zs.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),h&&([c,u]=$a(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,l]=$a(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Fa(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Ca.protocols.indexOf(y)?n(new ra("Unsupported protocol "+y+":",ra.ERR_BAD_REQUEST,e)):f.send(s||null)}))},Ja=(e,t)=>{let n,r=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ra?t:new Fa(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{s(new ra(`timeout ${t} of ms exceeded`,ra.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",s):e.unsubscribe(s))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",s)));const{signal:i}=r;return i.unsubscribe=o,[i,()=>{a&&clearTimeout(a),a=null}]},Qa=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},Za=(e,t,n,r,s)=>{const a=async function*(e,t,n){for await(const r of e)yield*Qa(ArrayBuffer.isView(r)?r:await n(String(r)),t)}(e,t,s);let o,i=0,c=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return c(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw c(e),e}},cancel:e=>(c(e),a.return())},{highWaterMark:2})},eo="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,to=eo&&"function"==typeof ReadableStream,no=eo&&("function"==typeof TextEncoder?(ro=new TextEncoder,e=>ro.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ro;const so=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ao=to&&so((()=>{let e=!1;const t=new Request(Ca.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),oo=to&&so((()=>Zs.isReadableStream(new Response("").body))),io={stream:oo&&(e=>e.body)};var co;eo&&(co=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!io[e]&&(io[e]=Zs.isFunction(co[e])?t=>t[e]():(t,n)=>{throw new ra(`Response type '${e}' is not supported`,ra.ERR_NOT_SUPPORT,n)})})));const lo=async(e,t)=>{const n=Zs.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:Zs.isBlob(e)?e.size:Zs.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:Zs.isArrayBufferView(e)||Zs.isArrayBuffer(e)?e.byteLength:(Zs.isURLSearchParams(e)&&(e+=""),Zs.isString(e)?(await no(e)).byteLength:void 0))(t):n},uo=eo&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:a,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Ka(e);l=l?(l+"").toLowerCase():"text";let h,g,[f,m]=s||a||o?Ja([s,a],o):[];const y=()=>{!h&&setTimeout((()=>{f&&f.unsubscribe()})),h=!0};let I;try{if(c&&ao&&"get"!==n&&"head"!==n&&0!==(I=await lo(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Zs.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Ga(I,$a(Ba(c)));r=Za(n.body,65536,e,t,no)}}Zs.isString(d)||(d=d?"include":"omit"),g=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:d});let s=await fetch(g);const a=oo&&("stream"===l||"response"===l);if(oo&&(i||a)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=Zs.toFiniteNumber(s.headers.get("content-length")),[n,r]=i&&Ga(t,$a(Ba(i),!0))||[];s=new Response(Za(s.body,65536,n,(()=>{r&&r(),a&&y()}),no),e)}l=l||"text";let o=await io[Zs.findKey(io,l)||"text"](s,e);return!a&&y(),m&&m(),await new Promise(((t,n)=>{ja(t,n,{data:o,headers:wa.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:g})}))}catch(t){if(y(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new ra("Network Error",ra.ERR_NETWORK,e,g),{cause:t.cause||t});throw ra.from(t,t&&t.code,e,g)}}),po={http:null,xhr:Xa,fetch:uo};Zs.forEach(po,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ho=e=>`- ${e}`,go=e=>Zs.isFunction(e)||null===e||!1===e,fo=e=>{e=Zs.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let a=0;a<t;a++){let t;if(n=e[a],r=n,!go(n)&&(r=po[(t=String(n)).toLowerCase()],void 0===r))throw new ra(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+a]=r}if(!r){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(ho).join("\n"):" "+ho(e[0]):"as no adapter specified";throw new ra("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function mo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Fa(null,e)}function yo(e){mo(e),e.headers=wa.from(e.headers),e.data=Ma.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return fo(e.adapter||Pa.adapter)(e).then((function(t){return mo(e),t.data=Ma.call(e,e.transformResponse,t),t.headers=wa.from(t.headers),t}),(function(t){return La(t)||(mo(e),t&&t.response&&(t.response.data=Ma.call(e,e.transformResponse,t.response),t.response.headers=wa.from(t.response.headers))),Promise.reject(t)}))}const Io="1.7.4",Eo={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Eo[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ao={};Eo.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,a)=>{if(!1===e)throw new ra(r(s," has been removed"+(t?" in "+t:"")),ra.ERR_DEPRECATED);return t&&!Ao[s]&&(Ao[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,a)}};const _o={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ra("options must be an object",ra.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],o=t[a];if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new ra("option "+a+" must be "+n,ra.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ra("Unknown option "+a,ra.ERR_BAD_OPTION)}},validators:Eo},So=_o.validators;class Co{constructor(e){this.defaults=e,this.interceptors={request:new fa,response:new fa}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ya(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&_o.assertOptions(n,{silentJSONParsing:So.transitional(So.boolean),forcedJSONParsing:So.transitional(So.boolean),clarifyTimeoutError:So.transitional(So.boolean)},!1),null!=r&&(Zs.isFunction(r)?t.paramsSerializer={serialize:r}:_o.assertOptions(r,{encode:So.function,serialize:So.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&Zs.merge(s.common,s[t.method]);s&&Zs.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=wa.concat(a,s);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(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=[yo.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,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=0;d<u;){const e=o[d++],t=o[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=yo.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return ga(qa((e=Ya(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Zs.forEach(["delete","get","head","options"],(function(e){Co.prototype[e]=function(t,n){return this.request(Ya(n||{},{method:e,url:t,data:(n||{}).data}))}})),Zs.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,s){return this.request(Ya(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Co.prototype[e]=t(),Co.prototype[e+"Form"]=t(!0)}));const To=Co;class No{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 r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,s){n.reason||(n.reason=new Fa(e,r,s),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)}static source(){let e;return{token:new No((function(t){e=t})),cancel:e}}}const Po=No;const Do={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,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity: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};Object.entries(Do).forEach((([e,t])=>{Do[t]=e}));const Ro=Do;const bo=function e(t){const n=new To(t),r=ls(To.prototype.request,n);return Zs.extend(r,To.prototype,n,{allOwnKeys:!0}),Zs.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ya(t,n))},r}(Pa);bo.Axios=To,bo.CanceledError=Fa,bo.CancelToken=Po,bo.isCancel=La,bo.VERSION=Io,bo.toFormData=ca,bo.AxiosError=ra,bo.Cancel=bo.CanceledError,bo.all=function(e){return Promise.all(e)},bo.spread=function(e){return function(t){return e.apply(null,t)}},bo.isAxiosError=function(e){return Zs.isObject(e)&&!0===e.isAxiosError},bo.mergeConfig=Ya,bo.AxiosHeaders=wa,bo.formToJSON=e=>Ta(Zs.isHTMLForm(e)?new FormData(e):e),bo.getAdapter=fo,bo.HttpStatusCode=Ro,bo.default=bo;const Oo=bo;function vo(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 xo=vo((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var wo=function(e,t){return wo=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])},wo(e,t)};function Mo(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}wo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Lo(e,t,n,r){return new(n||(n=Promise))((function(s,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function i(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function Uo(e,t){var n,r,s,a,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Fo(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function jo(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return o}function Vo(e,t,n){if(n||2===arguments.length)for(var r,s=0,a=t.length;s<a;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))}function ko(e){return this instanceof ko?(this.v=e,this):new ko(e)}function $o(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,s=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){s[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=s[e](t)).value instanceof ko?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 Go(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Fo(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,s){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,s,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Bo=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function Wo(e){return"function"==typeof e}function Ho(e){return Wo(null==e?void 0:e.then)}var qo=vo((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 zo(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Yo=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Fo(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(Wo(c))try{c()}catch(e){s=e instanceof qo?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Fo(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{Jo(p)}catch(e){s=null!=s?s:[],e instanceof qo?s=Vo(Vo([],jo(s)),jo(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(s)throw new qo(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Jo(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)&&zo(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&zo(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Ko=Yo.EMPTY;function Xo(e){return e instanceof Yo||e&&"closed"in e&&Wo(e.remove)&&Wo(e.add)&&Wo(e.unsubscribe)}function Jo(e){Wo(e)?e():e.unsubscribe()}var Qo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Zo={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=Zo.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,Vo([e,t],jo(n))):setTimeout.apply(void 0,Vo([e,t],jo(n)))},clearTimeout:function(e){var t=Zo.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ei(e){Zo.setTimeout((function(){var t=Qo.onUnhandledError;if(!t)throw e;t(e)}))}function ti(){}var ni=ri("C",void 0,void 0);function ri(e,t,n){return{kind:e,value:t,error:n}}var si=null;function ai(e){if(Qo.useDeprecatedSynchronousErrorHandling){var t=!si;if(t&&(si={errorThrown:!1,error:null}),e(),t){var n=si,r=n.errorThrown,s=n.error;if(si=null,r)throw s}}else e()}var oi=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Xo(t)&&t.add(n)):n.destination=hi,n}return Mo(t,e),t.create=function(e,t,n){return new ui(e,t,n)},t.prototype.next=function(e){this.isStopped?pi(function(e){return ri("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?pi(ri("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?pi(ni,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}(Yo),ii=Function.prototype.bind;function ci(e,t){return ii.call(e,t)}var li=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){di(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){di(e)}else di(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){di(e)}},e}(),ui=function(e){function t(t,n,r){var s,a,o=e.call(this)||this;Wo(t)||!t?s={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&Qo.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&ci(t.next,a),error:t.error&&ci(t.error,a),complete:t.complete&&ci(t.complete,a)}):s=t;return o.destination=new li(s),o}return Mo(t,e),t}(oi);function di(e){var t;Qo.useDeprecatedSynchronousErrorHandling?(t=e,Qo.useDeprecatedSynchronousErrorHandling&&si&&(si.errorThrown=!0,si.error=t)):ei(e)}function pi(e,t){var n=Qo.onStoppedNotification;n&&Zo.setTimeout((function(){return n(e,t)}))}var hi={closed:!0,next:ti,error:function(e){throw e},complete:ti},gi="function"==typeof Symbol&&Symbol.observable||"@@observable";function fi(e){return e}function mi(e){return 0===e.length?fi:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var yi=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 r,s=this,a=(r=e)&&r instanceof oi||function(e){return e&&Wo(e.next)&&Wo(e.error)&&Wo(e.complete)}(r)&&Xo(r)?e:new ui(e,t,n);return ai((function(){var e=s,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?s._subscribe(a):s._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=Ii(t))((function(t,r){var s=new ui({next:function(t){try{e(t)}catch(e){r(e),s.unsubscribe()}},error:r,complete:t});n.subscribe(s)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[gi]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mi(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ii(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Ii(e){var t;return null!==(t=null!=e?e:Qo.Promise)&&void 0!==t?t:Promise}function Ei(e){return Wo(e[gi])}function Ai(e){return Symbol.asyncIterator&&Wo(null==e?void 0:e[Symbol.asyncIterator])}function _i(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 Si="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ci(e){return Wo(null==e?void 0:e[Si])}function Ti(e){return $o(this,arguments,(function(){var t,n,r;return Uo(this,(function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,ko(t.read())];case 3:return n=s.sent(),r=n.value,n.done?[4,ko(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,ko(r)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Ni(e){return Wo(null==e?void 0:e.getReader)}function Pi(e){if(e instanceof yi)return e;if(null!=e){if(Ei(e))return s=e,new yi((function(e){var t=s[gi]();if(Wo(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Bo(e))return r=e,new yi((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(Ho(e))return n=e,new yi((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,ei)}));if(Ai(e))return Di(e);if(Ci(e))return t=e,new yi((function(e){var n,r;try{for(var s=Fo(t),a=s.next();!a.done;a=s.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.complete()}));if(Ni(e))return Di(Ti(e))}var t,n,r,s;throw _i(e)}function Di(e){return new yi((function(t){(function(e,t){var n,r,s,a;return Lo(this,void 0,void 0,(function(){var o,i;return Uo(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Go(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.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(),s={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.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(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Ri(e,t,n,r,s){void 0===r&&(r=0),void 0===s&&(s=!1);var a=t.schedule((function(){n(),s?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!s)return a}function bi(e){return function(t){if(function(e){return Wo(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 Oi(e,t,n,r,s){return new vi(e,t,n,r,s)}var vi=function(e){function t(t,n,r,s,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=s?function(e){try{s(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return Mo(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}(oi);function xi(e,t){return void 0===t&&(t=0),bi((function(n,r){n.subscribe(Oi(r,(function(n){return Ri(r,e,(function(){return r.next(n)}),t)}),(function(){return Ri(r,e,(function(){return r.complete()}),t)}),(function(n){return Ri(r,e,(function(){return r.error(n)}),t)})))}))}function wi(e,t){return void 0===t&&(t=0),bi((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Mi(e,t){if(!e)throw new Error("Iterable cannot be null");return new yi((function(n){Ri(n,t,(function(){var r=e[Symbol.asyncIterator]();Ri(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Li(e,t){if(null!=e){if(Ei(e))return function(e,t){return Pi(e).pipe(wi(t),xi(t))}(e,t);if(Bo(e))return function(e,t){return new yi((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(Ho(e))return function(e,t){return Pi(e).pipe(wi(t),xi(t))}(e,t);if(Ai(e))return Mi(e,t);if(Ci(e))return function(e,t){return new yi((function(n){var r;return Ri(n,t,(function(){r=e[Si](),Ri(n,t,(function(){var e,t,s;try{t=(e=r.next()).value,s=e.done}catch(e){return void n.error(e)}s?n.complete():n.next(t)}),0,!0)})),function(){return Wo(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Ni(e))return function(e,t){return Mi(Ti(e),t)}(e,t)}throw _i(e)}function Ui(e,t){return t?Li(e,t):Pi(e)}function Fi(e,t,n){var r=Wo(e)||t||n?{next:e,error:t,complete:n}:e;return r?bi((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var s=!0;e.subscribe(Oi(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;s=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;s=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;s&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):fi}class ji{static portalRegex=/(?<=v2\/pages\/)(.*?)(?=\?pageClass=)/;#e=0;#t=0;#n;#r=[];constructor(){this.#n=!1,kr.subscribe(F.START_PERFORMANCE_LOG,(()=>{this.#n=!0,this.clearStorage(),this.#e=Date.now()}),F.START_PERFORMANCE_LOG),kr.subscribe(F.STOP_PERFORMANCE_LOG,(()=>{this.#n=!1,this.#t=Date.now(),this.#s()}),F.STOP_PERFORMANCE_LOG)}static getCategory(e){return e.includes("v2/cases")||e.includes("v2/assignments")?"Case":e.includes("v2/data_views")?"DataPage":e.includes("v2/pages")?"Page":""}static getPortalLabel(e,t){const n=ah(".pyPrimaryNavPages","pyPortal",t)||[];return n.find((t=>t.pyRuleName===e))?.pyLabel??e}static extractAssignmentLabel(e,t,n){e.label===F.TOP_ACTION_LABEL.OPENASSIGNMENT&&void 0===e.assignmentLabel&&(e.assignmentLabel=n?.data?.data?.caseInfo?.assignments.find((e=>e.ID===t))?.name??"")}#a(e,t,n,r){if(e<0)return;const s=this.#r[t].serviceCalls[e],a=Date.now();s.endTime=a,s.totalTimeTaken=a-s.startTime,s.httpMethod=r.config?.method,n?s.status="CANCELLED":"headers"in r&&(s.status=r.status,s.responseBytes=r.headers["content-length"])}#o(e,t,n,r,s){let a="";if(!n){const t=e.match(ji.portalRegex)[0];a=t?.split(" ")[0]}const o=`${t||a}${F.HASH_DELIMITER}${s.startTime}`,i=mh.getHashedString(o);s.urlUniqueID=i;const c={label:t||`${ji.getPortalLabel(a,r)} Portal`,actionUniqueID:i,serviceCalls:[s]};return this.#r.push(c),{actionUniqueID:i,urlUniqueID:i,topLevelAction:n}}#i(e,t,n){const r=this.#r[e];ji.extractAssignmentLabel(r,t,n);const s=n.data?.data?.caseInfo?.content;s&&(r.caseLabel=s.pyLabel,r.caseID=s.pyID)}buildActionsList(e){const{url:t,topLevelAction:n,userAction:r,actionLabel:s,context:a}=e;let o={};if(this.#n){const e={url:t.split(E()??"")[1],startTime:Date.now(),context:a,category:ji.getCategory(t)};if(n&&r)o=this.#o(t,s,!0,a,e);else if(ji.portalRegex.test(t))o=this.#o(t,s,!1,a,e);else if(this.#r.length>0){const r=this.#r[this.#r.length-1].serviceCalls,s=`${t}${F.HASH_DELIMITER}${e.startTime}${F.HASH_DELIMITER}${r.length}`,a=mh.getHashedString(s);e.urlUniqueID=a,r.push(e),o.actionUniqueID=this.#r[this.#r.length-1].actionUniqueID,o.urlUniqueID=a,o.topLevelAction=n}}return o}reformActionList(e,t,n,r){const s=t.config,{actionUniqueID:a,urlUniqueID:o,topLevelAction:i,assignmentID:c}=s;if(this.#n){const s=this.#r.findIndex((e=>e.actionUniqueID===a));if(s>=0){i&&n&&"data"in t&&this.#i(s,c,t),e=e.split(E()??"")[1];const a=this.#r[s].serviceCalls.findIndex((t=>t.url===e&&t.urlUniqueID===o));this.#a(a,s,r,t)}}}#s(){if(0===this.#r.length)return;const e={version:"1.0.0",recordedTime:this.#t-this.#e,totalActions:this.#r.length,startTime:this.#e,userActions:this.#r};localStorage.setItem("performanceData",JSON.stringify(e))}clearStorage(){localStorage.removeItem("performanceData"),this.#r=[]}}const Vi=new ji;class ki{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new ki(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):yc(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Ic()}async buildAuthorizeUrl(e){e=e||window.btoa(location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,s=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:sp.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const l=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",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=${r}&response_type=code&redirect_uri=${s}&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=-1!==t?e.indexOf("/",t+2):-1;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,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,s=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 u.append("client_id",n),r&&u.append("client_secret",r),u.append("grant_type","authorization_code"),u.append("code",l),u.append("redirect_uri",s),u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),uc(a,{method:"POST",headers:new 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?fc({pzCTkn:e?.csrf}):(mc({tokenInfo:e}),fc({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 $i=ki,Gi=async()=>new Promise((async(e,t)=>{const n=Ec();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:s=null}=n.tokenInfo,{revoke:a}=n.endPoints,{client_id:o,client_secret:i,secureCookie:c}=n,l={"content-type":"application/x-www-form-urlencoded"};i&&(l.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const u=new URLSearchParams;i||u.append("client_id",o),c&&u.append("send_token_as_cookie","true");const d=s?"refresh_token":"access_token",p="access_token"===d?r:s;!c&&p&&u.append("token",p),u.append("token_type_hint",d),await uc(a,{method:"POST",headers:new Headers(l),credentials:c?"include":"omit",body:u.toString(),withoutDefaultHeaders:!0}),fc({Authorization:null}),mc({tokenInfo:null}),e()})),Bi=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new $i(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(I()?`${I()}`:"/?reAuth=true");return t},Wi=(e,t)=>{Bi(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};kr.publish(U.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},Hi=e=>{let t="",n={},r={},s=!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)&&(s=!1),a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),e.clientSecret&&a.append("client_secret",e.clientSecret),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"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};mc({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?fc({pzCTkn:n?.csrf}):fc({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(n)},failure:t=>{if(e.popupReauth)return Wi(t,e);kr.publish(U.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:Wi};return{url:t,config:n,callback:r,isRefreshTokenPresent:s}},qi=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),zi=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}},Yi=(e,t,n)=>{const{config:r}=e,{url:s,config:a,callback:o,isRefreshTokenPresent:i}=Hi(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=dc(r.url,r,c,t);return i?uc(s,a).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),kr.publish("updateSession",{updateStatus:"success"}),l.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&qi(e.config.url,n)?(o?.failure?.(r.url,n),l):Promise.reject(e))):(o?.failure?.(r.url,n),l)},Ki=(e,t,n,r)=>{if(e.config&&qi(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(kr.unsubscribeAllWithEventType(tc),t.setUpdateSessionStatus(!0),"custom"===n?.authType){kr.publish(U.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:s}=zi(e);return dc(n,r,s,t)}return Yi(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=zi(e);return uc(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[U.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[U.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&!n.includes("/modal")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Hn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Xi=class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const Ji=class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}};const Qi=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new Ji(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels};const Zi=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){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[F.COREHEADER_APP_DEBUG_ID]:e.debugId,[F.COREHEADER_APP_DEBUG_LEVELS]:Qi.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Ah.getProperty(F.COREHEADERS,"",e);return t?{...t,debugInfo:Qi.getPreviewMode()&&{...t.debugInfo,[F.COREHEADER_APP_DEBUG_LEVELS]:Qi.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(F.SKIPCOREHEADERS))return void delete e[F.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&k.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},ec=Zi;const tc="updateSession",nc={},rc=new Xi,sc=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&&(kr.unsubscribe(U.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((()=>{kr.publish(U.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),kr.subscribe(U.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let ac={},oc={},ic={},cc="";const lc=e=>{ac=e},uc=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:s=null,cancelContext:a=n,includeRemoteSystemIdIfPresent:o=!0,actionLabel:i="",assignmentID:c=""}=r;let{topLevelAction:l=!1}=r;const u=l;l||(l=t.topLevelAction||!1),cc=s,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:d,signal:p,withoutDefaultHeaders:h=!1,...g}=t;let f={};ap.getPerformanceDashboardVisibility()&&(f={assignmentID:c,...Vi.buildActionsList({url:e,topLevelAction:l,userAction:u,actionLabel:i,context:n})});const{Authorization:m,pzCTkn:y,...I}=t.headers||{};h||ec.injectCoreAdditionalHeaders(I,t.body,n,{includeRemoteSystemIdIfPresent:o}),a&&nc[a]>=0?nc[a]+=1:a&&void 0===nc[a]&&(nc[a]=1);let E=h?{...I}:{...ec.getDefaultHeaders(),...ec.getRegisteredHeaders(),...I,context:n};if(e&&qi(e,oc)&&rc.getUpdateSessionStatus()||!rc.getUpdateSessionStatus()){qi(e,oc)&&"OAuth2.0"===oc?.authType&&(E={...I});const{restApi:t}=sp.doesRestApiExist("Logout")&&sp.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&sc.setTimerID(sc.resetInactiveTimeout(sc.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,s){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:s,complete:function(){o?r(a):n?r(t.defaultValue):s(new xo)}})}))}(Ui(Oo({context:n,...g,url:e,data:d,...p&&void 0===p.aborted&&{cancelToken:p},...p&&void 0!==p.aborted&&{signal:p},headers:E,withCredentials:!("OAuth2.0"!==oc?.authType||!oc.secureCookie)||void 0,...f})).pipe(Fi((()=>{const e=ec.getCoreHeadersFromContext(E.context);e&&(e=>{kr.publish(F.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})}))))}return dc(e,t,n,rc)},dc=(e,t,n,r)=>new Promise(((s,a)=>{kr.subscribe(tc,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?uc(e,t,n).then((e=>s(e))).catch((e=>a(e))):a(o.updateStatus.error)}),tc)})),pc=e=>{nc[e]>0&&(nc[e]-=1,0===nc[e]&&delete nc[e])};Oo.interceptors.request.use((e=>(ac.request&&(e=ac.request(e)),e)),(e=>Promise.reject(e))),Oo.interceptors.response.use((e=>{const t=e.config.url;if(ap.getPerformanceDashboardVisibility()&&Vi.reformActionList(t,e,!0,!1),202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),Hn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(Bn({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&Wn({type:"error",category:"HTTP",context:e.config.headers.context}),Bn({type:"error",category:e.config.headers.context===F.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&Wn({type:"error",category:"PAGE",context:e.config.headers.context})),pc(e.config.headers.context)),ac.response&&(e=ac.response(e)),e}),(e=>{if(e.config&&e.config.headers&&e.config.headers.context&&pc(e.config.headers.context),ap.getPerformanceDashboardVisibility()){const t=e.config.url,n=Oo.isCancel(e);Vi.reformActionList(t,n?e:e.response,!1,n)}return!e.response||!e.response.status||401!==e.response.status||e.config&&qi(e.config.url,oc)||kr.subscribe(tc,(e=>{rc.setUpdateSessionStatus(!e.updateStatus)}),tc),Ki(e,rc,oc,e.response&&e.response.status&&e.response.status===Number(cc)?cc:null)}));const hc=()=>Oo.CancelToken.source(),gc=e=>Oo.isCancel(e),fc=e=>{ec.setDefaultHeaders(e)},mc=e=>{oc={...oc,...e}},yc=e=>{ic={...ic,...e}},Ic=()=>({...ic}),Ec=()=>({...oc});const Ac=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=ed(t);if(n){const r=ld(t),{items:s={}}=n;return!(!r||!s[r]||s[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:s}=Ig("loadView",n);return uc(r,{method:s},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:s}=Ig(ze,n);return uc(`${r}?viewType=page`,{method:s},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const s={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:a}=Ig(ze,s),o=t[e];return uc(`${a}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>nh(e)?.caseMessages;static getPropertiesToReplace=e=>(rl(e)||[]).filter((e=>!e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>mh.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>k.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>k.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n}},{RESOURCE_TYPES:_c}=U,Sc={PAGE:"page",FORM:"form"},Cc={[_c.CASE]:[Be,$e,Ge],[_c.PAGE]:[Fe,Ve],[_c.DATA]:[je]},Tc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:s}=n;return e[U.REMOTE_SYSTEM_ID]||e[U.REMOTE_SYSTEM_ID.toLowerCase()]||s?r.RemoteSystemID=e[U.REMOTE_SYSTEM_ID]||e[U.REMOTE_SYSTEM_ID.toLowerCase()]||s:t&&k.isRemoteCase(t)&&(r.RemoteSystemID=k.getRemoteHeader(t)),r},Nc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1}=t;let i={};i=sl(e,{isTransientContext:a,includeDisabledFields:o}),n&&(delete i?.caseInfo?.content,a&&(i={}));const c=Il(e,!1);!a&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const s=nh(t),a=b()(s,U.CASE_INFO.CASE_INFO_CLASSID),o=Rp(n,a);("True-False"===o?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(i,e);const l=w()(c,i);let u={},d=!1;({content:u,attachmentsExist:d}=((e,t)=>{let n={},r=!1;return(e||t?.caseInfo)&&(n=e?{...t}:{...t?.caseInfo},t?.caseInfo?.attachments&&(r=!0)),{content:n,attachmentsExist:r}})(a,l));const p=[...hr(e)];s&&p.forEach((e=>{delete e.content?.EmbedListUUID__})),u.pageInstructions=p;return(ir[e]||[]).forEach((e=>{if(u?.content){const t=e?.replace(F.CASE_INFO.CASE_INFO_CONTENT,"");mh.deleteIn(u.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),!a&&l?.dataInfo?(u={...l.dataInfo,pageInstructions:u.pageInstructions},{content:u}):{content:u,attachmentsExist:d}},Pc=(e,t)=>{let n,r,s={};const a=mh.getIn(e,F.UI_RESOURCES),o=mh.getIn(e,"confirmationNote");a?(n=mh.getIn(e,F.UI_RESOURCES_CONTEXT_DATA),r=mh.getIn(e,F.ROOT),s=mh.getIn(e,F.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:l,key:u,flowName:d}=e,p=mh.getIn(e,"nextAssignmentInfo",null),h=mh.getIn(e,"nextAssignmentInfo.context",""),g=mh.getIn(e,"confirmationLinks",null),{isInCreateStage:f,openCaseViewAfterCreate:m,debugInfo:y}=t;return{data:{...i,key:u,flowName:d,coreHeaders:y&&{debugInfo:{[F.COREHEADER_APP_DEBUG_ID]:y.debugId}},caseInfo:{...i.caseInfo,actionButtons:s,headers:t.headers},[F.CONTEXT_DATA]:f?{...i[F.CONTEXT_DATA],...n,openCaseViewAfterCreate:m,errors:c}:{...i[F.CONTEXT_DATA],...n,errors:c}},semanticURL:l,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:g,key:u,root:r,...t}},Dc=async(e,t,n,r=!1,s=!1)=>{const a=mh.getIn(e,F.LOCALE_REFERENCES);await ip.loadLocaleResources(a);const o=mh.getIn(e,F.COMPONENTS);if(o)try{await Lr(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Ng({...e,options:i,directUrlUpdation:!0}):Or(e,i,s)},Rc=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},bc=e=>{if(e){const[,t]=e.split("!");return{key:Rc(e),flowName:t}}return{}},Oc=(e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[F.ERROR_IN_PAGE_IDENTIFIER]&&e[F.ERROR_FIELD_IN_PAGE]):{const s=`${e[F.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),a=`${s}${e[F.ERROR_IN_PAGE_IDENTIFIER]}`,o=mh.deepClone(e);o[F.ERROR_FIELD_IN_PAGE]=s,t.includes(a.slice(1))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("[")))?r.push(o):n.push(e);break}case Boolean(e[F.ERROR_IN_PAGE_IDENTIFIER]&&!e[F.ERROR_FIELD_IN_PAGE]):{const s=e[F.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(s)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}},vc=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:s}=t,a=n&&n.response?n.response.data:"",o=ol(r);return s&&on.rejectActionByID(s),Zh(eg,"Error action triggered",a,r,o)},xc=(e,t)=>Id(e)&&Ad(e)?Zh(Kh,t):Zh(Mh,t),wc=(e,t,n=F.APP.APP,r={})=>{let s=null;const{buildNew:a=!0}=r;return Id(e)?s=Ad(e)?ld(e):W(t,n):Ed(e)&&(Ad(e)&&!a?s=hd(e):Ad(e)&&!a||(s=W(t,n))),s},Mc=e=>e&&e.type===_e,Lc=e=>{let t=!1;const n=md(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&Cl(r)){t=!0;break}}return t},Uc=(e,t={})=>{let n=!1,r=!1,s={},a=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1}=t;if(Id(e)){const t=ld(e),r=pd(t);Cl(r)&&(n=!0),u||n||(n=Lc(t))}else if(Ed(e)&&Cd(e)){let t=Pd(e);t||(t=ld(e),r=!0),s.containerItemID=t,s.context=pd(t)}if(n){const e=l||ml;o=window.confirm(ip.getLocaleValue(e,"Messages"))}if(!o&&n&&(s={},a=!1),r){const e=ip.getLocaleValue(yl,"Messages");c?i=window.confirm(e):(window.alert(e),a=!1)}return!i&&r&&(s={},a=!1),{continueExecution:a,removeActionPayload:s}},Fc=(e,t)=>{let n=!1;const r=ap.isCoexistenceAppOfType(F.APP_TYPE.UIKIT),{insKey:s,isParallelCall:a,skipFlowNameCheck:o}=t;if(!s)return{};const[,i]=s.split("!")||"",c=o?s:Rc(s),l=od(e,c);let u={},d=!1;if(l&&!r&&(n=!0,u=td(e,l),!o)){let e=u?.flowName;const t=Wr(l),r=gd(l);if(r.length){const n=gt(t,r[0]);e=td(n,r[0])?.flowName}else n=e===i;(e!==i||a)&&(d=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:s}}},jc=(e,t,n)=>e===_c.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,s=od(e,r);return s&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:s,semanticURL:r}}})(t,n):e===_c.ASSIGNMENT?Fc(t,n):e===_c.CASE?Fc(t,{...n,skipFlowNameCheck:!0}):{},Vc=(e=[])=>{Ad(`${F.APP.APP}/${F.PREVIEW}`)&&e.push(Zh(wh,Td({context:U.APP.APP,name:F.PREVIEW})))},kc=e=>{let t;for(const n of Object.keys(Cc))if(Cc[n].includes(e)){t=n;break}return t},$c=(e,t)=>{const{data:n={},context:r,caseViewMode:s}=e,a={data:{...n},caseViewMode:s,context:B(r)};mh.deleteIn(a.data,"shared"),mh.setIn(a.data,["context_data","caseViewMode"],s),t.push({type:nt,payload:{context:a.context}}),t.push(Zh(Ph,a))},Gc=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=mh.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=mh.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:mh.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:mh.getIn(t,["payload","context"]),context:mh.getIn(t,["payload","context"])},r={type:pe,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),th(e),e=e.filter((e=>e.type!==pe))}const s=((e,t,n)=>({assignmentID:e,vcName:F.PRIMARY,targetContainerName:mh.getIn(t,["payload","target"]),context:mh.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);Id(s.targetContainerName)||t?.payload?.containerName!==F.WORKAREA||(s.isMultiDoc=!0,e=[]);const a={type:he,payload:{...s}};e.push(a),th(e)}else th(e)}},Bc=(e,t)=>w()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),Wc=e=>{let t={},n=qd(e);for(;n;){const e=Nc(n);t=Bc(e.content,t),n=qd(n)}return t};class Hc{static getChanges(e){return{...Il(e)}}static getSubmitData(e,t={}){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t,{content:s}=Nc(e,{isTransientContext:n,includeDisabledFields:r});return s}static isStateModified(e){return Cl(e)||Cr(e)||!(!e||!Al(e))}static isFormValid(e,t){return al(e,t)}static clearChangedProperties(e){return fr(e),pr(e),Nl(e)}static getEditableFields(e){return il(e)}static setCustomValidator(e,t){Rr.register(e,t)}static isPropertyEditable(e,t){return Hc.getEditableFields(e).some((e=>e.name===t))}}const qc=Hc;const zc=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}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,r){const s=`${n}${t}`,{stateMachine:a}=this.getStateMachineObjByPath(s,e,!0);if(a&&a.targetPageReference!==r.targetPageReference)return a.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][s]||(this.unConnectedStates[e][s]={}),void(this.unConnectedStates[e][s]=r);this.states[e]||(this.states[e]={}),this.states[e][s]||(this.states[e][s]={}),this.states[e][s]=r}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((s=>{const a=Tn.getContextReferences(e)?.get(s),o=n[s];if(a){const e=o.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),mh.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,n){const r=/\[\d+\]$/gm;let s=null;for(;e&&!this.isStateMachineExist(t,"",e);)s=null,n&&e.endsWith("]")?(s=e.match(r),s=s?.[s.length-1]?.substring(1,s[s.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:s}:{}}executeStateMachine(e,t,n,r=!0,s={}){const{stateMachineTarget:a,index:o}=this.getStateMachineObjByPath(t,e,r);if(!a)return!1;let[,i]=t.split(a);if(!i)return!1;null!==o&&([,i]=i.split(/^\[\d+\]/gm));const c={[Kc(i)]:n},l=this.getStateMachine(e,"",a);return null!==o?l.update(c,Number(o)+1,s.skipStateUpdate??!0,s):l.updatePage(mh.unflatten(c)),!0}registerForServerChanges(){Xp.registerForListChanges(((e,t,n)=>{!t.includes(".classID")&&qc.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n)}))}unRegisterForServerChanges(){Xp.unRegisterForListChanges()}},Yc={},Kc=e=>e.startsWith(".")?e.substring(1):e,Xc=e=>{delete Yc[e]},Jc=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=Ah.resolveContextTreeNodeProps(e),s=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.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&&s},Qc=(e,t,n,r,s)=>{let a=(ah(`.attachmentsList.${t?.replace(".","")}`,"context_data",n)||[]).filter((e=>`${r.pageReference}.${e.label}`===s));return a=mh.buildAttachmentsFormData(a),a.length>0&&(e=[...e,...a]),e},Zc=(e,t,n,r,s)=>(zc.executeStateMachine(e,r,Ah.getLitePropertyValue(n,t))||s.push(r),s),el=e=>{const{attachmentPageInstructionEnabled:t=!1}=PCore.getEnvironmentInfo().environmentInfoObject?.features?.form||{},n=e.pageReference?.replace(U.CASE_INFO.CASE_INFO_CONTENT,"")?.replace(U.DATA_INFO.DATA_INFO_CONTENT,"");return"Attachment"===e.componentName&&t&&""!==n},tl=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:s=!0}=n;return(!r||r&&!s)&&!Array.isArray(Ah.getLitePropertyValue(t,e))&&"Address"!==t.componentName},nl=(e,t={})=>{let n=[],r=[];const s=[],a=Tn.getContextReferences(e);if(!a)return{formInputs:n,attachments:r,formPageFields:s};if(({attachmentList:r,editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let s=[],a=[];for(const[o,i]of e){const e=Ah.resolveContextTreeNodeProps(i.props),c=e.propertyName;if(Jc(i.props,{includeDisabledFields:r})){const r=el(e);"Attachment"!==e.componentName||r?!r&&tl(o,e,n)&&(s=Zc(t,c,e,o,s)):a=Qc(a,c,t,e,o)}}return{attachmentList:a,editableFormFieldsReferenceList:s}})(a,e,t)),Yc[e])for(const t in Yc[e].fieldOrder)Object.hasOwn(Yc[e].fieldOrder,t)&&s.push(t);return{formInputs:n,attachments:r,formPageFields:s}},rl=e=>{let t=[];const n=Tn.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Jc(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},sl=(e,t={})=>{const n={},r=nh(e),{ignoreFieldsInsideList:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1}=t;if(a||r?.caseInfo?.content){const{formInputs:t,attachments:i,formPageFields:c}=nl(e,{ignoreFieldsInsideList:s,includeDisabledFields:o});i&&i.length>0&&mh.buildObject("caseInfo.attachments",n,i),((e,t,n)=>{e.forEach((e=>{let r=mh.getIn(t,e);"object"==typeof r&&(r=mh.deepClone(r),delete r?.classID),mh.buildObject(e,n,r)}))})(c,r,n),t&&t.length>0?t.forEach((e=>{mh.buildObject(e,n,mh.getIn(r,e))})):a||mh.buildObject("caseInfo.content",n,{})}if(!a&&r?.dataInfo?.content){const{formInputs:t}=nl(e,{ignoreFieldsInsideList:s});t.forEach((e=>{mh.buildObject(e,n,mh.getIn(r,e))}))}return n},al=(e,t)=>{const n=Tn.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,s]of n){const n=Ah.resolveContextTreeNodeProps(s.props);if(Jc(s.props)&&(!t||e.includes(t))){const e=Rr.validate(n.componentName?.toLowerCase(),n.propertyName,Ah.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},ol=(e,t=!1)=>{const n=Tn.getContextReferences(e),r=[];if(n)for(const[e,s]of n){if(!1!==Ah.resolveContextTreeNodeProps(s.props).visibility){const n=8,s=t?e:e.substring(e.indexOf("content")+n);r.push(s)}}return r},il=e=>{const t=[],n=Tn.getContextReferences(e);if(n)for(const[e,r]of n){const n=Ah.resolveContextTreeNodeProps(r.props);Jc(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};const cl=class{static getPropertyName(e){return Xt.getPropertyName(e)}static isProperty(e){return Xt.isProperty(e)}static getLeafPropertyName(e){return Xt.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};const ll=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}};class ul{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,s){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:s}]}registerForRefresh(e,t,n,r,s){const a=r.split("/").join(F.HASH_DELIMITER),o=mh.getHashedString(a);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[s]?.[n]){this.propChangeRefreshMap[s][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[s][n].push({uniqueHash:o,callback:t})}else ul.initializeRefreshCache(this.propChangeRefreshMap,s,n,o,t);else if(this.refreshMap?.[s]?.[`${e}-${n}`]){this.refreshMap[s][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[s][`${e}-${n}`].push({uniqueHash:o,callback:t})}else ul.initializeRefreshCache(this.refreshMap,s,`${e}-${n}`,o,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const dl=new ul,{APP:pl}=F;let hl={},gl={},fl={};const ml="You will lose unsaved changes. Do you want to continue?",yl="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",Il=(e=pl.APP,t,n)=>{let r=[],s=[];t||(r=ol(e,!0)),n||(s=(e=>{const t=Tn.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===Ah.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const a={};((e,t)=>{const n=gl[t]||{};Object.keys(n).forEach((t=>{Object.hasOwn(n,t)&&mh.buildObject(t,e,n[t].value)}))})(a,e);const o=hl[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&r.includes(e)||t;Object.prototype.hasOwnProperty.call(o,e)&&n&&!s.includes(e)&&mh.buildObject(e,a,o[e].value)})),a},El=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete hl[t]?.[n],delete gl[t]?.[n]},Al=e=>fl[e],_l=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:s}=t,a=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[a]?e[a].previousValue=ah(t.reference,null,n):(e[a]={initialValue:r||ah(t.reference,null,n)},e[a].previousValue=e[a].initialValue),e[a].value=t.value,s&&e[a].value===e[a].initialValue&&El(t)},Sl=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;Tn.isFieldExists(n,r)||(gl[n]=gl[n]||{},_l(gl[n],t)),hl[n]=hl[n]||{},_l(hl[n],t)},Cl=e=>{const t=gr(e)||{};return e&&hl[e]&&Object.keys(hl[e]).some((t=>hl[e][t].initialValue!==hl[e][t].value))||Object.keys(t).length>0},Tl=(e,t)=>{if(!e||!t)return!1;const n=hl[e]&&hl[e][t];return!!n&&n.previousValue!==n.value},Nl=e=>{e&&hl[e]?(hl[e]={},gl[e]={}):"all"===e&&(hl={},gl={},fl={}),fl[e]&&(fl[e]=!1)},Pl=()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===Z&&(Wt(r),(e=>{const{context:t,pageReference:n,value:r,reference:s}=e;Xp.triggerCascade(t,s,r);const a=zt.getDependencies(t,s),o=Xp.getResetDependencies(t,s),i={context:t,datapages:{}};[...a,...o].forEach((e=>{const n=mh.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=n.split("."),r=`.${e.pop()}`,s=e.join(".");zc.getStateMachine(t,s,r).deleteAll()}else ll.isPageInstruction(n)&&zc.executeStateMachine(t,n,""),th({type:J,payload:{reference:n,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}})})),a.forEach((r=>{let s=n;r.startsWith(n)||(s="");const a=r.replace(`${s}`,"").split(".").filter((e=>!!e));a.pop();const o=a.join("."),c=ah(`.${o}`,s,t)?.classID||e.classID,l=Rp(r.split(".").pop(),c),{datasource:u}=l,d={};let p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=cl.isProperty(e.value)?ah(`.${mh.getFullPropertyReference([o,mh.getPropertyName(e.value)])}`,s,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(F.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(F.NULL_STRING))})),p=u.name.concat(F.UNDERSCORE_STRING,mh.getHashedString(p.join(F.HASH_DELIMITER)));const{name:h}=u,g=Up(h);i.datapages[p]={mode:u.mode,propertyName:r,name:u.name,dataViewParameters:d,refreshStrategy:g?.refreshStrategy}})),a.length&&th({type:Qe,payload:i})})(r),(Tl(r.context,r.reference)||Cr(r.context))&&Mn(r),dl.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===tt){const{context:e,referenceList:t}=r;Mn({context:e,pageReference:t})}if(n===J||n===Q){const{reference:e,isImplicit:n,context:s,skipDirtyValidation:a=!1}=r;Tn.updateFieldNodeValue(s,e,r.value),ll.isPageInstruction(e)||a?a||(fl[`${s}`]=!0):Sl(t),(r.removePropertyFromChangedList||n)&&El(r)}if(n===De||n===Re){const{transientItemID:e,data:t}=r;mh.iterateLeafNodes(t,(t=>{El({context:e,value:"",reference:t.join(".")})}))}if(n&&[ve,Se,we].includes(n)){Nl(r.context),Xp.purgeResetDependencies(r.context),(e=>{e&&Dn[e]&&delete Dn[e]})(r.context);(r.childContainersContexts||[]).forEach((e=>{Nl(e)}));(r.transientItems||[]).forEach((e=>{Nl(e)}))}e(t)};const Dl=new class{getCoreheaders(e){const t=`${U.APP.APP}${F.FORWARD_SLASH_STRING}${F.PRIMARY}`,n=ld(t),r=pd(n),s=Ah.getProperty(F.COREHEADERS,"",r);if(s&&e in s)return s[e]}};const Rl=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 r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,s=Tn.getContextReferences(e)?.get(`${t}${r}`)?.props;return s?Ah.resolveContextTreeNodeProps(s):s})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:s}=Rr.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return s?{status:!1,message:s}:{status:!0}}},bl="OPEN_PROCESS_ACTION",Ol="OPEN_ASSIGNMENT",vl="DELETE_CASE_IN_CREATE_STAGE",xl="SAVE_AND_CLOSE",wl=e=>({type:xl,payload:e});const Ml=class{static getSavableDataPage(e){return Bp(e)}static getLookUpDataPage(e){return Hp(e)}static getLookUpDataPageInfo(e){return qp(e)}static getDataPageKeys(e){return Wp(e)}};const Ll=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=on.getNextActionMgrId();let n,r;const s=new Promise(((e,t)=>{n=e,r=t}));return on.register(t,s,n,r,e),{actionMgrID:t,promise:s}};initializeContainers(e){const t=Ee,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:F.CONTAINER_TYPE.SINGLE},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),o={...r,...e,actionMgrID:s};return th(xh(o)),a}addContainerItem(e){const t=_e,n=this.c11nEnv,r=n.getMetadata(),{children:s}=r||{};let a;s&&([a]=s);const o=n.getContextName(),i=n.getContainerName(),c=W(i,o,e?.containerType===F.CONTAINER_TYPE.SINGLE),l=gt(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)),[F.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),h={...u,...e,actionMgrID:d};return th(Mh(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=ve,n={context:pd(e.containerItemID),target:Dd(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return th(kh(a)),s}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=Oe,n={target:Dd(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return th(Wh(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Se,n={context:pd(e.containerItemID),target:Dd(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return th(qh(a)),s}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=Ae,n=Td(e),{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return th(wh(a)),s}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),s=q(t,r),a=xd(r);return s&&a.includes(s)||th(Lh({transientItemID:s,contextName:r,target:Dd(r),data:n})),s}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!xd(r).includes(t))return;th(Uh({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:s}=e;if(s&&r){if(!xd(t).includes(s))return;th(Yh({target:n,containerItemID:r,transientItemID:s}))}}createContainerPConnect(e,t,n,r=!1){Ku.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Ad(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return id(e,t)}};var Ul=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Fl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,s=e.length;return n=1===s?function(t){return Ul(t.type,e[0])}:function(t){for(var n=0;n<s;n++)if(Ul(t.type,e[n]))return!0;return!1},bi((function(e,t){var s=0;e.subscribe(Oi(t,(function(e){return n.call(r,e,s++)&&t.next(e)})))}))}function jl(e,t){return bi((function(n,r){var s=null,a=0,o=!1,i=function(){return o&&!s&&r.complete()};n.subscribe(Oi(r,(function(n){null==s||s.unsubscribe();var o=0,c=a++;Pi(e(n,c)).subscribe(s=Oi(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){s=null,i()})))}),(function(){o=!0,i()})))}))}function Vl(e,t){return bi((function(n,r){var s=0;n.subscribe(Oi(r,(function(n){r.next(e.call(t,n,s++))})))}))}function kl(e,t,n){return void 0===n&&(n=1/0),Wo(t)?kl((function(n,r){return Vl((function(e,s){return t(n,e,r,s)}))(Pi(e(n,r)))}),n):("number"==typeof t&&(n=t),bi((function(t,r){return function(e,t,n,r,s,a,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},h=function(e){return l<r?g(e):c.push(e)},g=function(e){a&&t.next(e),l++;var i=!1;Pi(n(e,u++)).subscribe(Oi(t,(function(e){null==s||s(e),a?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?Ri(t,o,(function(){return g(e)})):g(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(Oi(t,h,(function(){d=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function $l(e){return e&&Wo(e.schedule)}function Gl(e){return e[e.length-1]}function Bl(e){return $l(Gl(e))?e.pop():void 0}function Wl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ui(e,Bl(e))}function Hl(e){return bi((function(t,n){var r,s=null,a=!1;s=t.subscribe(Oi(n,void 0,void 0,(function(o){r=Pi(e(o,Hl(e)(t))),s?(s.unsubscribe(),s=null,r.subscribe(n)):a=!0}))),a&&(s.unsubscribe(),s=null,r.subscribe(n))}))}var ql=new yi((function(e){return e.complete()}));function zl(e){return e?function(e){return new yi((function(t){return e.schedule((function(){return t.complete()}))}))}(e):ql}const Yl=(e,t,n)=>Hl((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),Wl(eg(e,r,t,null,n))))),Kl=(e,t)=>n=>new yi((r=>{let s={},a=0;return n.pipe(kl((n=>{const r=Date.now();let o;return o=t||h(),o&&o(n,s)&&r-a<e?zl():(s=n,a=r,Wl(n))}))).subscribe(r)})),Xl=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s}=e,a={data_view_ID:t},{restApi:o,reqType:i}=Ig("createDataObject",a),{content:c}=Nc(s);return Ui(uc(o,{method:i,headers:r,body:{data:c.content}},s)).pipe(Vl((t=>({response:t.data,actionInPayload:e}))),Yl("Error occurred during ajax call at createDataObject Epic",n))},Jl=e=>{const{dataLookUp:t,context:n,headers:r,viewName:s,requestPayload:a}=e,o={data_view_ID:t,view_ID:s},{restApi:i,reqType:c}=Ig("readDataObject",o);return Ui(uc(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe(Vl((t=>({response:t.data,actionInPayload:e}))),Yl("Error occurred during ajax call at getDataObjectView Epic",n))},Ql=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s,key:a}=e,o={data_view_ID:t},{restApi:i,reqType:c}=Ig("updateDataObject",o),{content:l}=Nc(s);return Ui(uc(i,{method:c,headers:r,body:{data:{...l.content,...a},pageInstructions:l.pageInstructions||[]}},s)).pipe(Vl((t=>({response:t.data,actionInPayload:e}))),Yl("Error occurred during ajax call at updateDataObject Epic",n))},Zl=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:s,dataViewParameters:a}=e,o={data_view_ID:t,action_ID:s},{restApi:i,reqType:c}=Ig("openDataObjectAction",o);return Ui(uc(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe(Vl((t=>({response:t.data,actionInPayload:e}))),Yl("Error occurred during ajax call at getDataObjectView Epic",n))},eu=e=>{const{savableDatapage:t,context:n,headers:r,actionID:s,keys:a,containerItemID:o}=e,i={data_view_ID:t,action_ID:s},{restApi:c,reqType:l}=Ig("submitDataObjectAction",i),{content:u}=Nc(o);return Ui(uc(c,{method:l,headers:r,body:{data:{...u?.content,...a},pageInstructions:u?.pageInstructions||[]}},n)).pipe(Vl((t=>({response:t.data,actionInPayload:e}))),Yl("Error occurred during ajax call at getDataObjectView Epic",n))};const tu=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,s){const a={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][s]=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:r,pageReference:s}=n;bn(e,r,t,s,{})}}},nu={getData:(e,t,n,r)=>((e,t,n,r={})=>{const s={dataViewName:e},{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=Ig("getListData",s);return uc(c,{method:l,body:t,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:s,reqType:a}=Ig("getListDataCount",r);return uc(s,{method:a,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const s=!!n,a=!!r,o=s||a?"postDataViewMetadata":"getDataViewMetadata",i={dataViewName:e},{restApi:c,reqType:l}=Ig(o,i);return uc(c,s?{method:l,body:{associationFilter:n}}:a?{method:l,body:{propertyFilter:r}}:{method:l},t)},getDataObjectView:(e,t,n,r,s={})=>{const{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=s,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=Ig("readDataObject",c);return uc(u,{method:d,body:l,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},r,i)},getCaseEditMetadata:(e,t)=>Ac.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Ac.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Ac.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:s,listClass:a,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=Ig("moveListRecords",c);return uc(l,{method:u,body:{content:{sourceID:n,destinationID:r,context:s,listClass:a}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===F.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===F.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==fd("root").find((e=>e.includes("authoring-preview")))?`${F.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${xr.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=ap.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const ru=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const su=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),s=this.users[e];if(s)return s.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const a={matcher:"PRESENCE",criteria:{userId:e}};return uu.subscribe(a,this._handleUserPresence.bind(this)),r}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],uu.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)}))}))}};var au=s(924),ou=s.n(au);const iu=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),s=Object.keys(e);0===ou()(r,s).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};uu.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}};const cu=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new iu("CASE",t)}return this.subscriptions[e]}};class lu{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new su;static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=xr.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${r}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),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=xr.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),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}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const s=this.subscribers[r];s.filter.matcher===e&&mh.isEqual(s.filter.criteria,n)&&s.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n?.includes(t)||(n?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(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)}),5e3))}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.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const s=r||`${Date.now()}_${this.connectionsCount}`,a=new ru(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(a,s),s):(this.inProgressSubscriptions.push({messageSubscriber:a,id:s}),null===this.webSocket&&this.initConnection(this.connectionConfig),s)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}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 getCaseSubscription=e=>cu.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:xr.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(xr.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}`)}))};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 uu=lu;const du=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:n,pageSize:r}=e,s=n*r;let a=s-r;for(;a<s;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(t){const{pageNumber:n,pageSize:r}=t,s=n*r;let a=0;for(let t=s-r+1-1;t<s;t+=1)this.records[t]=e[a],a+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=dh(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const pu=new class{constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}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)";getData(e,t,n,r){const s=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][s]){const t=this.dataStore[e][s];return t.isDirty?[]:t.getRecords(n)}return[]}generateHash(e,t,n){const r=Up(e);let s=[];r||(s=Object.keys(t||{}).map((e=>({name:e}))));let a="",o=e;const i=[];return(r?.parameters||s).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??F.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(F.HASH_DELIMITER)&&(a=mh.getHashedString(i.join(F.HASH_DELIMITER)),o=e+F.UNDERSCORE_STRING+a),o}async getDataAsync(e,t,n={},r,s,a={}){if(this.subscribeToMessageService(e),a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,s)||a.invalidateCache){const o=await this.fetchData(e,n,r,s,t,a),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,s);if(o.length>0)return Promise.resolve({data:o});const i=await this.fetchData(e,n,r,s,t,a);return{...i.data,data:this.mergeDataStore(e,n,r,s,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){this.subscribeToMessageService(e);const s=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][s]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][s]);delete this.dataStore[e][s],this._removeDataStoreMetaEntry(e,n,s)}const{restApi:a,reqType:o}=Ig(F.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o},c=a&&n&&0===Object.keys(n).length?a.split("?")[0]:a;return uc(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[s]:t.data},this._addDataStoreMetaEntry(e,n,s)),t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const s=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const a=this.dataPageSubscribers[n];a[s]??={};const o=a[s];return!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&mh.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];Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n].pxResults)}else{const r=new du;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const s=this.dataStoreMeta[e];s[r]??=[];const a=s[r];a.includes(n)||a.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,s){const a=this.generateHash(e,t,r),o=s?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][a]||(this.dataStore[e][a]=new du);const i=this.dataStore[e][a];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,a),i.getRecords(n)}async fetchData(e,t,n,r,s,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),r&&(l.query=r),nu.getData(e,l,s,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToUpdate(e,t,n,r,s,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]=s),this.subscribeToCascadeUpdates(e,t,n,r,a)}unsubscribe(e,t,n,r,s){delete this.subscribers[e]?.callback?.[s],t&&t.length>0&&Xp.unRegisterFields(n,r,t,s)}subscribeToCascadeUpdates(e,t,n,r,s){t&&t.length>0&&Xp.registerFields(n,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),s)}subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};uu.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:s=""}=n,a=this.subscribers[r];this.markDataInstanceDirty(r,""===s?null:JSON.parse(s)),this._executeDataPageSubscriptions(e),!t&&a?.callback&&Object.keys(a.callback).forEach((t=>{a.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,s=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(s){const t=[];t.push(this.generateHash(n,s,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=Up(e);return"reloadOncePerInteraction"===t?.refreshStrategy?.type}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}};const hu=class{constructor(e,t,n,r,s=100,a=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=s,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,r,s=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),s&&!s.dataViewCallMap[t]?(this.combiner(s,e),s.dataViewCallMap[t]={promise:n,resolve:r}):s?n=s.dataViewCallMap[t].promise:(s={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(s.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(s):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const gu=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,s,a,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new hu(t,n,s,r,a,o)),this.bufferedDataQueues[e]}},fu=(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,mu=e=>e.map((e=>e.field)),yu=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let s=(t.query?.filter).logic;const a=Object.keys(n).length;fu(n,r)?("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(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const o=`F${a+t}`;n[o]=r[e],s=s.replace(e,o)})),(e.query?.filter).logic+=` OR ${s}`);const o=mu(e.query?.select);mu(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},Iu=(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]:!mh.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Eu=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:s}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:s(e,n)})}))},Au=e=>({combiner:yu,comparator:Iu,separator:Eu,...e}),_u=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Su{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={},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,r)=>{const s=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`))].join(F.HASH_DELIMITER),a=mh.getHashedString(s),o=`${e.dataSource}_${a}`,i=nu.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const s=JSON.parse(window.sessionStorage.getItem(i));if(t&&Su.searchResultsCache?.[t]?.[o])n(Su.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Su.searchResultsCache?.persisted?.[o])n(Su.searchResultsCache.persisted[o]);else{const a=new Su(e,t);JSON.stringify(s.associationFilter)===JSON.stringify(e.associationFilter)?(a.dataSourceMetaData=s.dataSourceMetaData,a.isQueryable=s.isQueryable,a.isInitialised=s.isInitialised,a.associationFilter=s.associationFilter,Su.initializeCache(t,e,o,a),n(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{_u(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,Su.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&Up(e.dataSource)){const r=new Su(e,t),s=Up(e.dataSource);r.isQueryable=!!s?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=s,_u(i,JSON.stringify({isQueryable:s?.isQueryable,dataSourceMetaData:s,isInitialised:!0})),r.context=t,Su.initializeCache(t,e,o,r),n(r)}else{const s=new Su(e,t);s.associationFilter=e.associationFilter,s.propertyFilter=e.propertyFilter,s.fetchMetaData(t).then((r=>{_u(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,Su.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new gu;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Au(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Su.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Su.searchResultsCache[e]&&(Su.searchResultsCache[e]={}),Su.searchResultsCache[e][n]=r):(void 0===Su.searchResultsCache.persisted&&(Su.searchResultsCache.persisted={}),Su.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return nu.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Su.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>pu.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)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Su.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return pu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return pu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):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)return this.fetchNQDataPromise?.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData?.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=pu.getDataAsync(this.dataSource,this.context,n.dataViewParameters),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,s)=>(Object.keys(s).every((a=>!(r?.includes(a)&&s[a]&&this.positionMatches(`${s[a]}`,e,n))||(t.push({...s}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,s=r?e.toLowerCase():e,a=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return s.startsWith(a);case"contains":return s.includes(a);case"equals":return s===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 r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,s={};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:r?"true":"false"},lhs:i,rhs:c,comparator:l};s[o]=u}}));const o=Object.keys(s).join(" OR ");return{filterConditions:s,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...nu.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...nu.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 Cu=Su;const Tu=class{static cleanCaches(e){Xp.purgeCascadeFields(e),tu.removeContext(e),Cu.clearContextedCache(e),kr.cleanContextSubscribers(e),Xc(e),Tn.removeContextTreeNode(e),uu.clearContext(e),dl.deRegisterForRefresh(e)}},Nu="GET_DESCENDANTS";const Pu=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=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(a)n.push({type:ge,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(s.length>0))return;{const t=s.shift();a=!a,n.push({type:ge,payload:{context:e,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),n.push(t)}}th(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=nh(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;return s.length<=0&&!a&&(r<=0?(n.push(e),a=!a):s.push(e),n.unshift({type:ge,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),th(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=nh(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(th({type:ge,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 nh(e)?(th({type:rt,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={...nh(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(th({type:rt,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=nh(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&mh.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),th({type:ge,payload:{context:e,data:{...n}}}),an.disableLoadingIndicator({context:e})}}},Du=(e,t)=>{const n={},r=Ml.getLookUpDataPage(e),s=Ml.getDataPageKeys(r);if(s)for(const e of s)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:s}},Ru=(e,t)=>{const n=Ml.getSavableDataPage(e),r=Ml.getDataPageKeys(n);return r.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:r}},bu=e=>{kr.publish(U.PUB_SUB_EVENTS.EVENT_CANCEL,e)},Ou=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const vu=class{constructor(e){this.c11nEnv=e}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";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(F.MODAL),s=this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(U.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(U.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(U.CASE_INFO.CASE_TYPE_ID),l=t?void 0:al(this.c11nEnv.getContextName()),u=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Sh.buildActionObject({context:n,containerItemID:e,assignmentID:a,actionID:o,caseID:s,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:u,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,s,a=null;a=t&&null!==t.actionMgrID?t.actionMgrID:on.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,s=t}));return on.register(a,o,r,s,e,t,n),{actionMgrID:a,promise:o}};showDataObjectCreateView(e,t=U.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Sh.buildActionObject({viewName:t,className:e},this.c11nEnv),r=te,{promise:s}=this.actionsApiPromise(r,n);return th({type:r,payload:{...n,containerName:U.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),s}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(!Cl(t)){return new Ll(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=We,r=Sh.buildActionObject({containerItemID:e,context:t},this.c11nEnv),s=t&&t.includes(F.MODAL);th({type:n,payload:{...r,isModalAction:s,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:a}=this.actionsApiPromise(n,r);return a.then((()=>{bu({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=eh()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(F.DATA_CLASS_NOT_FOUND));const r=Ml.getSavableDataPage(n),s=st,a=!!e&&e.includes(F.MODAL),o=Sh.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return th({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:a,isFormValid:al(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=at,r=Ml.getSavableDataPage(e),s=Ml.getDataPageKeys(r),a={};if(s)for(const e of s)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Sh.buildActionObject({dataViewName:r,dataViewParameters:a},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return th({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:""}){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 r=ot,{dataPageID:s,dataViewParameters:a}=Du(e,t),o=Sh.buildActionObject({dataLookUp:s,keyProperties:t,requestPayload:a,viewName:n.viewName||U.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:F.MODAL},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return th({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}=eh()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(F.DATA_CLASS_NOT_FOUND));const{dataPageID:s,keys:a}=Ru(r,t),o=it,i=e&&e.includes(F.MODAL),c=Sh.buildActionObject({containerItemID:e,dataPageID:s,key:a},this.c11nEnv),{promise:l}=this.actionsApiPromise(o,c);return th({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:al(e)}}),l}openDataObjectAction(e,t,n,r){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(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const s=ct,{dataViewParameters:a,dataPageID:o,dataPageKeys:i}=Du(e,t),c=Sh.buildActionObject({actionID:n,actionName:r,dataViewParameters:a,lookupDatapage:o,containerName:F.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return th({type:s,payload:{...c}}),l}submitDataObjectAction(e,t,n){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}=eh()?.getState()||{},s=r[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(F.DATA_CLASS_NOT_FOUND));const a=Yd(e),o=Dd(a),i=td(o,a)||{},{resourceType:c="",key:l=""}=i,u=lt,{dataPageID:d,keys:p}=Ru(s,t),h=Sh.buildActionObject({containerItemID:e,actionID:n,resourceType:c,key:l,keys:p,savableDatapage:d,containerName:F.MODAL,context:e},this.c11nEnv);h.context=e;const{promise:g}=this.actionsApiPromise(u,h);return th({type:u,payload:{...h,isFormValid:al(e)}}),g}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(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{};let r=ce;const s=Sh.buildActionObject({class:e,flowType:"pyStartCase",containerName:F.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:a}=this.actionsApiPromise(r,s);if(t.channelName&&(s.headers=s.headers||{},s.headers[F.X_ORIGIN_CHANNEL]=t.channelName),k.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:a}=k.getRemoteCase(e);if(s.className=e,s.class=t,s.headers=s.headers||{},s.headers.RemoteSystemID=n,k.isTraditionalRemoteCase(e)){const n={className:e,name:a,action:"createWork",remoteClassName:t};r=this.setTraditionalRemoteCaseParams(s,n)}}return Qi.getPreviewMode()&&(s.debugInfo={debugId:mh.generateUniqueID()}),th({type:r,payload:{...s}}),a}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=k.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=j,e.gadgetId=t.gadgetId??Ac.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,te}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=me,r=Sh.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,r);return th({type:n,payload:{...r}}),s}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(),r=Sh.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise("GET_DESCENDANTS",r),a=(o={...r,context:n},{type:Nu,payload:o});var o;return th(a),s}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(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||F.PRIMARY,containerName:n.targetContainer||F.PRIMARY};let s=le;const a=Sh.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);return n.channelName&&(a.headers=a.headers||{},a.headers[F.X_ORIGIN_CHANNEL]=n.channelName),a.className=t,k.isRemoteCase(t)&&(s=this.setRemoteCaseParamsForOpenCase(a,t,n.remoteCaseMeta)??s),Qi.getPreviewMode()&&![F.WORKAREA].includes(n.targetContainer)&&(a.debugInfo={debugId:mh.generateUniqueID()}),th({type:s,payload:{...n,...a}}),o}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:s,name:a}=k.getRemoteCase(t);if(e.headers=e.headers||{},e.headers.RemoteSystemID=r,e.isRemoteCase=!0,e.remoteCaseClass=t,k.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:a,action:ht,remoteClassName:s};return this.setTraditionalRemoteCaseParams(e,r)}}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(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=F.PRIMARY,r.isChild=n.isChild);let s=Ol;const a=Sh.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);if(n.channelName&&(a.headers=a.headers||{},a.headers[F.X_ORIGIN_CHANNEL]=n.channelName),k.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:o}=k.getRemoteCase(t);if(a.headers=a.headers||{},a.headers.RemoteSystemID=r,k.isTraditionalRemoteCase(t)){a.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:o,action:"openAssignment",remoteClassName:e};s=this.setTraditionalRemoteCaseParams(a,r)}}a.className=t,a.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),Qi.getPreviewMode()&&![F.WORKAREA].includes(n.containerName)&&(a.debugInfo={debugId:mh.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 th({type:s,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));const n=pd(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=Tn.getContextReferences(e);if(t)for(const[,e]of t)if(Ah.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:ip.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return Hn({messages:e,context:r,category:U.PAGE}),Promise.reject({type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const s=de,a=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:i,localActionID:c,caseActions:l,caseInfo:u,businessID:d,caseTypeID:p,caseTypeName:h}=sn(e,this.c11nEnv,{isTriggeredFromDifferentContext:a}),g=Jt(u);let f,m=!1;if(l){const e=l.find((e=>e.ID===c));m="Case"===e?.type}else f=nh(n);let{assignmentID:y}=sn(e,this.c11nEnv,{isTriggeredFromDifferentContext:a});f?.context_data?.actionType&&(m=f.context_data.actionType===F.CASE,y=y||f.context_data.assignmentID);const I=rn(i,y,c),[E,A]=o.split(" "),_={class:E,actionID:I,assignmentID:y,caseID:o,workID:A,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:m,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:d,caseTypeID:p,caseTypeName:h};e?.includes(F.MODAL)&&(_.containerName=F.MODAL,_.isModalAction=!0),_.outcome=t.outcomeID,_.jsActionQueryParams=t.jsActionQueryParams,u?.isLocalAction&&(_.viewType=Sc.FORM);const S=Sh.buildActionObject(_,this.c11nEnv),{promise:C}=this.actionsApiPromise(s,S),T=this.c11nEnv.getValue("isProcessAction","isProcessAction");return S.isProcessAction=T,Pu.executeOrQueueDeferredAction({type:s,payload:{...S,context:n}}),C}getNextWork(){const e=Ol,t=Sh.buildActionObject({containerName:F.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return th({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=Ol,n=this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,s=Sh.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:a}=this.actionsApiPromise(t,s),o={type:t,payload:{...s,caseID:n,headers:r}};return th(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(U.CASE_INFO.CASES),r=this.c11nEnv.getValue(U.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(F.MODAL)&&(s.containerName=F.MODAL,s.isModalAction=!0);const a=Sh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=pd(e);return th({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:al(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"));const{selectedList:n}=t,r=t.type,s={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:r,...t},a="OPEN_BULK_ACTION",o=Sh.buildActionObject(s,this.c11nEnv),{promise:i}=this.actionsApiPromise(a,o);return th({type:a,payload:{...o}}),i}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));const t=Se,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${F.APP.APP}/${F.MODAL}`,caseViewMode:F.PERFORM_MODE,deleteContext:!0};th({type:t,payload:n});const{promise:r}=this.actionsApiPromise(t,n);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(th({type:J,payload:{reference:U.CASE_INFO.APPROVALFLAG,value:F.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)):(th({type:J,payload:{reference:U.CASE_INFO.APPROVALFLAG,value:F.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(U.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:J,payload:{reference:U.CASE_INFO.DUPLICATECASEFLAG,value:F.DUPLICATE,context:e}},r={type:J,payload:{reference:U.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return th([n,r]),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:J,payload:{reference:U.CASE_INFO.DUPLICATECASEFLAG,value:F.IGNORE,context:e}},n={type:J,payload:{reference:U.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:J,payload:{reference:U.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return th([t,n,r]),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=t.caseID||this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,Ou(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:s,...t},o="OPEN_LOCAL_ACTION",i=Sh.buildActionObject(a,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:l}=this.actionsApiPromise(o,i),u=fd(c)[0];let d,p=!1;if(!u)return d=c,th({type:o,payload:{...i,contextName:c,continueExecution:p}}),l;d=ld(u);const h=ed(u);if(h?.accessedOrder.forEach((e=>{n===h.items[e].key&&(p=!0,d=h.items[e].context)})),!p||d&&"review"===eh()?.getState()?.data[d]?.context_data?.caseViewMode)return th({type:o,payload:{...i,contextName:c,continueExecution:p}}),l;const g=d,f=g&&g.includes(F.MODAL),m=t.assignKey||this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),y=nh(d),I=y?.caseInfo?.assignments?y.caseInfo.assignments[0]?.actions[0]?.ID:void 0,E=this.c11nEnv.getContainerName(),A=this.c11nEnv.getValue(U.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=Sh.buildActionObject({context:g,containerItemID:d,assignmentID:m,actionID:I,caseID:n,containerName:E,caseType:A,isModalAction:f,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=d;const C=pd(d),T=this.c11nEnv.getCaseSummary(),N=Jt(T),P=Sh.buildActionObject({caseID:n,containerItemID:d,cancelContext:C},this.c11nEnv);let D={};return f?(P.acTargetName=F.MODAL,P.isInCreateStage=N,P.isModalAction=f,D={...P}):D={...P,acName:gt(this.c11nEnv.getContainerName(),P.context)},th({type:o,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:D,continueExecution:p}}),l}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(U.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,Ou(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:s,isProcessAction:!0,...t},o=bl,i=Sh.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return th({type:o,payload:{...i}}),c}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="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(U.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(U.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(U.CASE_INFO.ASSIGNMENT_ID),s=Jt(this.c11nEnv.getCaseSummary()),a={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:s};t&&t.includes(F.MODAL)&&(a.acTargetName=F.MODAL);const o=Sh.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o),c=pd(t);return th({type:n,payload:{...o,containerItemID:t,context:c}}),i}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}=U,r=pe,s=pd(e),a=e&&e.includes(F.MODAL),o=this.c11nEnv.getCaseSummary(),i=Jt(o),c=this.c11nEnv.getValue(n.CASE_INFO_ID),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=Sh.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv);let d={};a?(u.acTargetName=F.MODAL,u.isInCreateStage=i,u.isModalAction=a,d={...u}):d={...u,acName:gt(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(r,u);return th({type:r,payload:d}),p.then((()=>{t||bu({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}=U,n=e,r=We,s=e&&e.includes(F.MODAL),a=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Sh.buildActionObject({caseID:a,containerItemID:e,context:n},this.c11nEnv);if(!Cl(n)){return new Ll(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{bu({caseID:a,context:this.c11nEnv.getContextName()})}))}th({type:r,payload:{...o,isModalAction:s}});const{promise:i}=this.actionsApiPromise(r,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}=U,n=We,r=e,s=r&&r.includes(F.MODAL),a=this.c11nEnv.getCaseSummary(),o=Jt(a),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Sh.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=ap.isCoexistenceAppOfType(F.APP_TYPE.UIKIT);if(c.isProcessAction=l,o&&(s||u)&&!Zt(a)){const t=this.c11nEnv.getValue("caseInfo.isFirstAssignment"),i=Cl(r);if(this.shouldDeleteCaseInCreateStage(i,t,u))return this.deleteCaseInCreateStage(e);th({type:n,payload:{...c,isModalAction:s,isChildCase:nn(a),isInCreateStage:o}})}const{promise:d}=this.actionsApiPromise(n,c);return d.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=xl,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return th(wl(n)),r}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=xl,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return th(wl(n)),r}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=vl,r=e,s=r&&r.includes(F.MODAL),a=this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(U.CASE_INFO.CASE_TYPE_ID),i=Sh.buildActionObject({caseID:a,caseType:o,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(U.CASE_INFO.PARENTCASEINFO);i.isProcessAction=c,i.parentCaseInfo=l;const u=`${F.APP.APP}/${Qu.PRIMARY}`,d=wc(u,Qu.PRIMARY);i.parentContext=d,s&&(i.targetName=F.MODAL,i.containerName=Qu.MODAL,i.isModalAction=s),th((e=>({type:vl,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{bu({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}=sp.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return uc(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:s}=sp.getRestEndPoint("updateRecents")||{},a=`${E()}${s}`;return uc(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=sp.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return uc(t,{method:"GET",headers:{}}).then((e=>(Object.keys(Tn.rootNodes).forEach((e=>{Tu.cleanCaches(e)})),Tn.rootNodes={},sessionStorage.clear(),gh(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return uc(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:Qu.PREVIEW,containerName:Qu.PREVIEW,context:U.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("pyDataPreview",e,t,{container:Qu.PREVIEW,containerName:Qu.PREVIEW,context:U.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 r=Sh.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(U.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:k.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),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const s=ee,{promise:a}=this.actionsApiPromise(s,r,!1);return th({type:s,payload:{...r}}),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 r=Sh.buildActionObject({viewName:e,className:t},this.c11nEnv),s=te,{promise:a}=this.actionsApiPromise(s,r);return Qi.getPreviewMode()&&(r.debugInfo={debugId:mh.generateUniqueID()}),th({type:s,payload:{...r,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=Sh.buildActionObject({},this.c11nEnv),r=re,{promise:s}=this.actionsApiPromise(r,n);return th({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),s}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Sh.buildActionObject({},this.c11nEnv),r=se,{promise:s}=this.actionsApiPromise(r,n);return th({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),s}showData(e,t,n,r={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 s=Sh.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n},this.c11nEnv),a=ne,{promise:o}=this.actionsApiPromise(a,s);return th({type:a,payload:{...s,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Sh.changeHandler(e,t)}eventHandler(e,t){Sh.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=Ah.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let o=this.c11nEnv.getValue(F.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),o=ah(`.${i.join(".")}.classID`,s,r)),e=mh.trimDotForProperty(e),th({type:Z,payload:{reference:a,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:o}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:s=!0,contextPageReference:a="",isListEntry:o=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName();let l=this.c11nEnv.getPageReference();const u=a?.startsWith(l)?a.replace(l,""):a;l=a||l;const d=Ah.getContextPath(l,e);let p=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(u?`${u}${e}`:e,t,{isArrayDeepMerge:s}),this.c11nEnv.isBulkAction()&&(p=!0),e||(e=this.c11nEnv.getStateProps().value),Wn({type:U.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:l,context:c,isListEntry:o}),th({type:J,payload:{reference:d,value:t,context:c,isArrayDeepMerge:s,skipDirtyValidation:i,...p&&{isStrictTracking:p},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=Me,{context:n}=e,r=n&&n.includes(F.MODAL),s=Sh.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(s.containerName=F.MODAL,s.isModalAction=r),th({type:t,payload:s});const{promise:a}=this.actionsApiPromise(t,s);return a}refreshCaseView(e,t,n,r={}){const{promise:s,actionMgrID:a}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d}=r,p={actionMgrID:a,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,optionalPayload:d};r.refreshFor&&(p.refreshFor=r?.refreshFor);const h=u||this.c11nEnv.getContextName(),g=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(F.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>tn(e)&&!en(e,t))(h,g)||en(h,g))?wn(h,n,p):bn(e,t,h,n,p),s}openEmbeddedDataModal(e,t,n,r,s,a){const o=ut,i=t.getCaseInfo().getKey(),c=`${t.getPageReference().replace(U.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,l={targetProperty:n,index:r,viewID:e,ID:i,actionType:s,interestPage:mh.convertPageRefToClipboardPageNotation(c),heading:a},u=Sh.buildActionObject(l,this.c11nEnv),{promise:d}=this.actionsApiPromise(o,u);return th({type:o,payload:{...u,containerName:U.MODAL,skipSemanticUrl:!0}}),d}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=dt,n=this.c11nEnv.getPageReference().replace(U.CASE_INFO.CASE_INFO_CONTENT,""),r=pd(e),s={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(U.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(F.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:al(r),interestPage:mh.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(F.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isModalAction:!1,target:this.c11nEnv.getTarget()};e&&e.includes(F.MODAL)&&(s.containerName=F.MODAL,s.isModalAction=!0);const a=Sh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a);if(Cl(r)){const[e,t,n]=pn(this.c11nEnv.getPageReference());Tn.mutatePageList(this.c11nEnv.getValue(F.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),e,t,{type:Xe,rowIndex:n}),th({type:Xe,payload:{pageReference:this.c11nEnv.getPageReference(),context:this.c11nEnv.getValue(F.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isListEntry:!0}})}return Pu.executeOrQueueDeferredAction({type:t,payload:{...a,context:r}}),o}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=pd(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:s}=this.actionsApiPromise(pt);return wn(t,n,{actionMgrID:s,isFillFormWithAI:!0,preserveClientChanges:!1}),r}};const xu=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:s}=Ig("getCaseStages",n);return(await uc(r,{method:s},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID)}getAvailableProcesses(){return this.c11nEnv.getValue(F.CASE_INFO.AVAILABLEPROCESSES)}getKey(){return this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(F.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(F.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${F.CONTEXT_DATA}${F.CASE_VIEW_MODE_PROP}`)===F.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${F.CONTEXT_DATA}${F.CASE_VIEW_MODE_PROP}`)===F.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO);return Jt(e)}isLocalAction(){const e=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO);return Zt(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===F.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=td(t,n),{config:s}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=s?.type===F.VIEW?s?.name:null}(e&&e.startsWith(F.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(F.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),t=B(this.c11nEnv.getContextName());let n;t&&(n=nh(t));const r=n?.caseInfo?.availableActions,s=nh(this.c11nEnv.getContextName()),a=s?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(F.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(F.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),t=this.c11nEnv.getValue(F.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(F.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_LABEL),n=this.c11nEnv.getValue(F.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],r=this.getChildAssignments()||[];let s=JSON.parse(JSON.stringify(r));s=s.map((e=>(e.isChild=!0,e)));const a=[...n,...s];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(F.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ACTIONS);return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(F.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(F.CASE_INFO.GETNEXTWORK)}},{RESOURCE_TYPES:wu}=U;const Mu=class{static openCase(e,t,n,r={}){const s={insKey:e,acTargetName:n,actionMgrID:on.getNextActionMgrId(),context:t,...r},a=le;r&&r.channelName&&(s.headers={},s.headers[F.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=on.actionManagerPromise(a,s.actionMgrID);return th({type:a,payload:s}),o}static openAssignment(e,t,n,r={}){const s={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:on.getNextActionMgrId(),context:t,...r},a=he;r&&r.channelName&&(s.headers={},s.headers[F.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=on.actionManagerPromise(a,s.actionMgrID);return th({type:a,payload:{...s}}),o}static createCase(e,t,n,r={}){const s=ce,a={class:e,acTargetName:n,actionMgrID:on.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(a.headers={},a.headers[F.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=on.actionManagerPromise(s,a.actionMgrID);return th({type:s,payload:{...a}}),o}static getNextWork(e,t,n={}){const r=he,s={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:on.getNextActionMgrId(),context:e,...n},{promise:a}=on.actionManagerPromise(r,s.actionMgrID);return th({type:r,payload:{...s}}),a}static getOpenedCaseItems(e){const t=[],n=ed(e);if(n){const{items:r={}}=n,s=Object.keys(r),a=ld(e);s.forEach((n=>{if(r[n]&&(r[n].resourceType===wu.CASE||r[n].resourceType===wu.ASSIGNMENT)){const{key:s="",context:o}=r[n],i=r[n],c=s.substring(s.indexOf(" ")+1),l=ah(".caseTypeID","caseInfo",o),u=a===n;t.push({...i,key:s,workID:s,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:n,reqType:r}=Ig($e,t);return uc(n,{method:r})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=Ig("getBulkActions"),r=e.map((e=>({ID:e}))),s=r.length,a=s/5,o={},i=[];for(let e=0;e<s;e+=a)o.cases=r.slice(e,e+a),o.cases.length&&i.push(uc(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.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID))))):l=c[e].data.availableActions;return l}};class Lu{constructor(e){Lu._instance=this,this.context=`${e}/${F.SUGGESTION}`,eh()?.getState().data?.[this.context]||th({type:Ue,payload:{context:this.context,data:{}}})}getField(e){return ah(e,"",this.context)}setField(e,t){th({type:J,payload:{reference:e,value:t,context:this.context}})}removeField(e){th({type:fe,payload:{reference:e,context:this.context}})}setState(e){th(Ph({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Uu=Lu;const Fu=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=rh();return n?mh.getIn(n,t):null}static setSharedState(e,t){e&&th(ag({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:s=!0,pageReference:a}=r;if(!e||!t)return;th(og({context:e,reference:a?`${a}.${t}`:t,value:n,isArrayDeepMerge:s}))}static getSuggestionsContext(e){return new Uu(e)}};const ju=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Ah.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Ah.getContextPath(this.datasource,this.index);return this.index+=1,zu({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Vu{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.children[this.index];return this.index+=1,zu({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const ku=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new ju(e,e.context||"",t);if(n){const n=ih(`${t.context}.${F.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new ju(e.children[0],n||e.context,t)}return e?.children?new Vu(e.children,t):void 0};class $u{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:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[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=>cl.isProperty(e))).map((e=>cl.getPropertyName(e)))}}const Gu=new $u;let Bu;Object.freeze(Gu);const Wu=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const s=e[r],a=Xt.trimAnnotation(s);if("string"!=typeof a&&"string"!=typeof s||!(mh.isValidAnnotation(s)&&mh.isPropertyRef(a)||s.startsWith("@W ")||s.startsWith("@E ")||s.startsWith("@ATTACHMENT "))){if(Array.isArray(a))a.forEach(((e,n)=>{const s={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),Wu(e,t[r][n],s)}));else if(a&&"object"==typeof a&&"exp"!==a.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},Wu(a,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=a}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Hu=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...mh.deepClone(t.inheritedProps)]};class qu{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:s}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=s,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.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this.xrayInfo={},this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=mh.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&Hu(this._inheritedConfig,t?.config),Wu(this._rawConfig,this._stateProps),this._isState=!mh.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=mh.isExpressionExist(this._rawConfig.config),this._isWhenExist=mh.isWhenExist(this._rawConfig.config),this._isValidatorExist=Rr.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=U.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let a=this.options.pageReference;if(this.options.pageReference&&(a=Xt.handleAnnotation(this.options.pageReference,this)),this._pageReference=Ah.getContextPath(a||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&mh.isWhenExist({visibility:this.meta?.config?.visibility})&&On(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=Ah.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=Xt.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=mh.isExpressionExist(e),this._isWhenExist=mh.isWhenExist(e),this._isValidatorExist=Rr.isValidatorExist(e)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===F.VIEW&&this._rawConfig.name&&(this.viewName=Xt.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&xn(this)}}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=Xt.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=Xt.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:s,disabled:a,visibility:o,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const u="Address"===this._type&&this._rawConfig?.config?.associatedView?Xt.trimAnnotation(this._rawConfig.config.associatedView):"",d=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Xt.trimAnnotation(t),label:d?.startsWith("@")?Xt.handleAnnotation(d,this,void 0):d,required:r,readOnly:s,disabled:a,visibility:o||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};Tn.addFieldNode(this._contextName,this._pageReference,(u||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value"))Tn.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",Xt.trimAnnotation(this.getPropertyName()),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;Tn.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===F.VIEW&&this._rawConfig.name&&this.viewName&&Tn.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&Tn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&Tn.addViewNode(this._contextName,this._pageReference,Xt.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&Tn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=mh.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===F.VIEW)t=F.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=F.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=Xt.isProperty(n)?Xt.trimAnnotation(n):""}e&&n.forEach((n=>{Tn.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()!==F.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList)){const{value:e,label:t,required:n,readOnly:r,disabled:s,visibility:a,validationType:o,selectionMode:i,selectionList:c,selectionKey:l,referenceList:u,renderMode:d,caption:p}=this.getRawConfigProps(),h=t||p;Tn.addPageListNode(this._contextName,this._pageReference,this.viewName??"",Xt.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Xt.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?Xt.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:s,visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:o,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:d,referenceList:u,selectionKey:l,index:this.index});const g=this.getValue(Xt.trimAnnotation(this.getPropertyName()),this._pageReference)||[];Tn.updatePageListNode(this._contextName,this._pageReference,Xt.trimAnnotation(this.getPropertyName()),g.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}setXRayInfo(e){mh.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){mh.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new xu(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getCaseInfo(),t=e.getClassName();return ip.getCaseLocaleReference(t,e.getCaseTypeName())}getListActions(){return Nr(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}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&&"Attachment"!==e.formatter?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Ah.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[F.CONTAINERS.ROOT_CONTAINER,F.CONTAINERS.VIEW_CONTAINER,F.CONTAINERS.FLOW_CONTAINER,F.CONTAINERS.MODAL_VIEW_CONTAINER,F.CONTAINERS.PREVIEW_VIEW_CONTAINER,F.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=Qu.PRIMARY,name:r,routingInfo:s}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===s)&&r?r: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=c?.getStore()?.getState()?.data[`${this.getContextName()}/${F.SUGGESTION}`],n=this.getStateProps()?.value,r=Ah.getContextPath(this.getPageReference(),n),s=t?Fu.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!s,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Pr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),mh.resolveStringBooleans(e)}getRawConfigProps(){const e={...Pr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Ah.resolveProps(e,t,this),Xt.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),Wu(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),n=this.getComponentConfig(),r=t===F.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===F.MODAL_VIEW_CONTAINER||t===F.CASE_CREATE_STAGE){const t=ld(`${F.APP.APP}/${this.getContainerName()}`),n=Bn({context:t,category:U.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||Xt.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=Bn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:U.MESSAGES.MESSAGES_TYPE_ERROR}),r=Bn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:U.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){const t=n.map((e=>ip.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=F.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=F.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===F.ROOT_CONTAINER){const t=zn(r,ld(`${F.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages;const n=Fu.getSharedState("isLoggedOut");e.isLoggedOut=n,this._stateProps.isLoggedOut=n;const s=Bn({context:F.APP.ROOT,category:"PAGE"});e.pageMessages=s,this._stateProps.pageMessages=e.pageMessages}if(t===F.HYBRID_VIEW_CONTAINER){const t=Bn({context:F.APP.APP,category:F.HTTP});e.httpMessages=t,this._stateProps.httpMessages=t}if(t===F.APP_SHELL&&e.portalDocMode===F.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Mu.getOpenedCaseItems(`${U.APP.APP}/${F.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===F.APP_SHELL){const t=Bn({context:F.APP.APP,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===F.SCALARLIST&&(this._stateProps.value=e.value),t===F.APP_SHELL||t===F.MODAL_VIEW_CONTAINER||t===F.CASE_CREATE_STAGE||n.template===F.CASE_PREVIEW){let t=Bn({context:F.APP.APP,category:"HTTP"});const n=Bn({context:ld(`${F.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(Bn({context:ld(`${F.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=Bn({context:ld(`${F.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>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(t===F.VIEW_CONTAINER||t===F.FLOW_CONTAINER||t===F.MODAL_VIEW_CONTAINER||t===F.PREVIEW_VIEW_CONTAINER||t===F.ROOT_CONTAINER){if(e.routingInfo=ft(this.getContainerName(),this._contextName),t===F.ROOT_CONTAINER&&(e.rootConfig=$u.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===F.FLOW_CONTAINER){const t=Bn({context:this.getContextName(),category:F.CASEMESSAGES}),n=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=fd(n)[0];if(r){const t=ld(r),n=c?.getStore()?.getState()?.data;n&&t&&(e.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime);const s=Bn({context:t,category:U.PAGE}),a=Bn({context:t,category:"HTTP"});e.httpMessages=a,e.pageMessages=s,this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,a?.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.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),t===F.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.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else n.template===F.CASE_VIEW||n.template===F.CASE_PREVIEW||n.template===F.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===F.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e),this.updateContextTree()}isReadOnlyField(e,t){const n=cl.isPropertyInternal(t),r=e.datasource,s=this.getComponentConfig().isSearchField,{isClassKey:a,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==F.ASSOCIATED;return!s&&(i||n||!r&&(a||o)&&c)}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig();let s="",a="";if(r===F.ASSOCIATED?(s=n,a=F.ASSOCIATED_PROPERTY_ANNOTATION):(s=t,a=F.PROPERTY_ANNOTATION),s&&"string"==typeof s&&(s.includes(a)||s.includes(F.ATTACHMENT_ANNOTATION))){const t=Xt.getPropertyName(s),n=this.getFieldMetadata(t);n&&(e.fieldMetadata=n,this.isReadOnlyField(e,t)&&(e.readOnly=!0,this._stateProps.readOnly=e.readOnly,e.fieldMetadata.isDeclarativeTarget&&this.registerAdditionalProps({readOnly:!0})))}}resolvePropertyMetadata(e,t){if(!e)return e;const n=zp(`${this._pageReference}.${t}`,this._contextName);return(n||null===n)&&(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(F.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(Rp(e,t),e)}return this.resolvePropertyMetadata(Rp(t.pop(),this.getValue(`.${t.join(".")}${F.CLASS_ID}`)),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(Rp(n,this.getValue(`${t.join(".")}${F.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(F.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[U.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(U.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>en(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()[U.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[U.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}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 Rl(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?Xt.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||Xt.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||Xt.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&!!this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;if(!1===this.getConfigProps().requiresVisibleChildren)return!0;const t=e.getConfigProps(),n={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=e._type&&n.includeTypes.includes(e._type)&&!n.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const s=e.getChildren();return!!s&&s.some((e=>e.getPConnect().getComputedVisibility()))}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 nh(e||this.getContextName())}getImagePath(e){return`${xr.getConstellationServiceUrl()}/v860/${xr.getAppAlias()}/image/${e}?org=${sp.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=ku(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}),t=[];for(;e?.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!e||!0!==$u.allowedComponetsForBulkProcessing[e]&&!0!==$u.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e?.resetIndex(),t}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),s=this?.getMetadata();let a=null;const o=ap.getLocale();if(s){const t=s?.type,n=["View","Region"],r=s?.config?.label??s?.config?.caption;if("en-US"!==o&&r?.startsWith(F.FIELD_LABEL_ANNOTATION)){const t=r.split(`${F.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),s=n?.pop();let o=`${s}`;const i=this.getFieldMetadata(o),c=i?.classID||this.getValue(`.${n?.join(".")}${F.CLASS_ID}`),l=i?.definedOnClassID;return o=`${l||c}.${o}`,ip.getLocaleValue(e,o,ip.FIELD_LABELS_BUNDLE_KEY,a)}t&&!n.includes(t)&&(a=t)}return ip.getLocaleValue(e,t,r,a)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),F.PARAGRAPH,e);return ip.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return 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?Ah.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${F.SUGGESTION}`):Ah.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:s}=e;s&&(this._inheritedConfig.hideLabel=s),r&&(this._inheritedConfig.referenceType=r),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)})),Hu(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Ah.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,s={}){let a,o;const{isArrayDeepMerge:i}=s;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(o=!0)),th({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...a&&{isStrictTracking:a},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(ll.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;hl[t]=hl[t]||{},hl[t][r]||(hl[t][r]={initialValue:ah(r,null,t)}),hl[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return oh(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(F.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=F.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),th(Ph({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;th({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){th(eg(e,t||{},n))}getComponent(){return Bu({getPConnect:()=>this})}createComponent(e,t,n,r){let s=this._pageReference;if(t){const e=ih(`${this.getPageReference()}.${F.SUMMARY_OF_LISTS}`,t,this._contextName);s=Ah.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=Xt.handleAnnotation(e,this),s=Ah.getContextPath(this._pageReference,e)||""}return Bu(zu({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:s,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}}),r)}getReferencedView(){if(this.meta)return Ah.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(F.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,zu({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new Ll(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new vu(this)),this._actionsApi}getActionManager(){return on}getGoogleMapsAPIKey(){return S()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=nh(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?Wn({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?Wn({type:"error",...e}):(Wn({type:"error",...e,context:F.APP.APP}),Wn({type:"error",...e,context:ld(`${F.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return ih(`${this.getPageReference()}.${F.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Kc(t);Yc[e]?Yc[e].fieldOrder[r]=n:Yc[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this),n&&((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,s])=>{if(Array.isArray(s)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();Tr(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<s.length;e+=1)yr(s[e],e,r,void 0,{})}else"object"==typeof s&&r(s,`${t}.${e}`)}))};r(e,t)})(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=Fu.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Ah.getContextPath(this.getPageReference(),n),s=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,s),this.getActionsApi().triggerFieldChange(n,s),t.removeField(r)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Ah.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,Fu.getSuggestionsContext(this.getContextName()).removeField(n)}}}function zu(e){const t=new qu(e);return{getPConnect:()=>t}}function Yu(e){Bu=e}const Ku=class{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:s,items:a}=e;if(s&&a){const e=s[s.length-1];if(a[e]?.view&&Object.keys(a[e].view).length>0){const s=a[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=s,{viewName:l,viewContext:u}=this.processRootViewDetails(i,s,t);if(!l)return null;return zu({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===Qu.WORKAREA||n===Qu.MODAL||l===F.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:s}={}}=e,{context:a}=t;let o=s,i=r;const c=cl.isProperty(s),l=cl.isProperty(r);if(l){const e=cl.getPropertyName(r);i=ah(`.${e}`,e.startsWith(".")?n:"",a)}if(i||(i=n),c){const e=cl.getPropertyName(s);o=ah(`.${e}`,i,a)}return c&&l&&""!==o&&(o=s,i=r),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,s;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=ld(e),a=td(e,t);a&&({key:r,flowName:s}=a)}t.addContainerItem({semanticURL:"",key:r,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}},Xu={defaultLimit:16},Ju={SINGLE:"single",MULTIPLE:"multiple"},Qu={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},Zu=()=>eh()?.getState()?.containers,ed=e=>e?eh()?.getState().containers[e]:(yt.error("getContainerData: target is the required parameter"),null),td=(e,t)=>{if(!e||!t)return null;const n=Zu(),r=n?.[e];return r&&r.items&&r.items[t]||null},nd=e=>e?eh()?.getState().containers[e]?.items:(yt.error("getContainerItems: target is the required parameter"),null),rd=e=>e?eh()?.getState().containers[e]?.accessedOrder||[]:(yt.error("getContainerAccessOrder: target is the required parameter"),[]),sd=e=>e?rd(e)?.length>0||!1:(yt.error("areContainerItemsPresent: target is the required parameter"),!1),ad=(e,t,n)=>{if(!e||!t)return yt.error("isContainerItemExists: target and key are required parameters"),!1;const r=Zu(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e===t);if(t&&a)for(const e in a)if(o(t,a[e].key))return!0;return!1},od=(e,t,n)=>{if(!e||!t)return yt.error("getContainerItemName: target and key are required parameters"),null;const r=Zu(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(o(t,a[e].key))return e;return null},id=(e,t)=>{if(!e||!t)return yt.error("isContainerInitialized: context and name are required parameters"),!1;const n=Zu();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},cd=(e,t)=>{if(!e||!t)return yt.error("getContainerType: context and name are required parameters"),null;const n=Zu(),r=n?.[`${e}/${t}`];return r&&r.type},ld=e=>{if(!e)return yt.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=Zu();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r;t=s&&s.length>0?s[s.length-1]:null}return t},ud=(e,t,n)=>{if(!e||!t)return yt.error("isContainerItemActive: target and key are required parameters"),!1;const r=od(e,t,n);return!!r&&r===ld(e)},dd=(e,t)=>{let n=null;const r=Zu();for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&r[s].items){const a=r[s].items[e];if(n=a?a[t]:null,n)break}return n},pd=e=>e?dd(e,"context"):(yt.error("getDataContextName: containerItemName is required parameters"),null),hd=e=>{if(!e)return yt.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=Zu();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r,a=s&&s.length>0?s[s.length-1]:null;t=pd(a)}return t},gd=e=>{if(!e)return yt.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const s=Zu(),a=n=>{const s=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&s.push(n),n===e&&(r=!0)})),s};for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e)&&s[e].items){const t=a(s[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},fd=e=>{if(!e)return yt.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=Zu();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},md=e=>{if(!e)return yt.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=Zu();for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e){(rd(r)||[]).forEach((n=>{pd(n)!==e&&t.push(pd(n))}))}return t},yd=e=>{const t=[...md(e),e],n=[],r=eh()?.getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${F.SUGGESTION}`)&&n.push(`${e}/${F.SUGGESTION}`)})),n},Id=e=>e?e&&ed(e)&&ed(e).type===Ju.SINGLE:(yt.error("isContainerSingleMode: target is required parameters"),null),Ed=e=>e?e&&ed(e)&&ed(e).type===Ju.MULTIPLE:(yt.error("isContainerMultipleMode: target is required parameters"),null),Ad=e=>e?ed(e)&&ed(e).items&&Object.keys(ed(e)?.items).length>0||!1:(yt.error("hasContainerItems: target is required parameters"),!1),_d=e=>e&&Xu[e]?Xu[e]:Xu.defaultLimit,Sd=(e,t=Xu.defaultLimit)=>{e?Xu[e]=t:yt.error("setContainerLimit: target is required parameter")},Cd=e=>{if(!e)return yt.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=ed(e),{items:r={}}=n,s=Object.keys(r),a=_d(e);return s&&s.length>0&&s.length>=a&&(t=!0),t},Td=e=>{if(!e||!e.name||!e.context)return yt.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=ed(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],s=fd(`${F.APP.APP}/${F.PREVIEW}`),a=md(`${F.APP.APP}/${F.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...a],childContainers:s}},Nd=e=>{if(!e)return yt.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=pd(e);return Cl(t)||Lc(e)},Pd=e=>{if(!e)return yt.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=ed(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!Nd(n)){t=n;break}}return t},Dd=e=>{if(!e)return yt.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=eh()?.getState()||{};for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(F.UNDERSCORE_STRING);return e.substring(0,n)},Rd=(e,t={})=>{if(!e)return yt.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Dd(e),r=pd(e),{skipDirtyCheck:s}=t;let a=!0,o=[];if(Nd(e)&&!s&&(a=window.confirm(ip.getLocaleValue(ml,"Messages"))),a){const{accessedOrder:t=[],items:s={},type:a}=ed(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=s[i]||{},{semanticURL:l=F.FORWARD_SLASH_STRING,context:u}=c;o.length>0&&l&&l!==F.FORWARD_SLASH_STRING?Ng({directUrlUpdation:!0,semanticURL:l,options:{containerItemID:i,context:u}}):Ng({directUrlUpdation:!0,semanticURL:F.FORWARD_SLASH_STRING,options:{}});th(qh({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:a}}))}return Promise.resolve({newAccessedOrder:o,removeItem:a})},bd=(e,t,n,r)=>{const s="root",a=W(t,s,!0),o=gt(t,s),i={data:n,context:r?"app":a},c=[Mh({root:e,containerItemID:a,context:r?"app":a,target:o,containerName:t})];c.push(Ph(i)),th(c)},Od=(e,t,n)=>{let r=rd(e);r=r.filter((e=>e!==t));let s=!1;for(let e=0;e<r.length;e+=1){if(pd(r[e])===n){s=!0;break}}return s},vd=e=>{if(!e)return yt.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=Zu(),n=pd(e),r=t?Object.keys(t):[];let s=!1;for(let t=0;t<r.length&&(s=Od(r[t],e,n),!s);t+=1);return s},xd=e=>{Array.isArray(e)||(e=[e]);const t=Zu()||{};return e.map((e=>{const n=Dd(e);return mh.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},wd=e=>{const{transientItemID:t,data:n,options:r}=e,s=mh.deepClone(eh()?.getState().data[t]);r?.reset&&mh.iterateLeafNodes(s,(e=>{"classID"!==e[e.length-1]&&mh.setIn(s,e,"")})),th(Uh({transientItemID:t,data:mh.mergeDeep(n,s)}))},Md=e=>{const{transientItemID:t,data:n}=e;th(jh({transientItemID:t,data:n}))},Ld=e=>{const t=mh.deepClone(eh()?.getState().data[e]);mh.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&mh.setIn(t,e,"")})),th(Fh({transientItemID:e,data:t}))},Ud=e=>{const t=mh.deepClone(eh()?.getState().data[e]);mh.iterateLeafNodes(t,(e=>mh.setIn(t,e,""))),th(Vh({transientItemID:e,data:t}))};class Fd{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 jd=()=>Fd,Vd=e=>{const t={containerName:e};t.childContainers=fd(e),th({type:Le,payload:t})},kd=(e,t)=>{const n=gd(e),{key:r}=td(Dd(e),e),s=[];n.forEach((e=>{const{key:n}=td(Dd(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Dd(e),context:e};s.push({type:ge,payload:n})}})),s.length&&th(s)},$d=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Dd(e),context:e};n.push({type:ge,payload:r}),n.length&&th(n)},Gd=()=>ap.isPortalLoaded?"app":"root",Bd=()=>Dl,Wd=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Dd(e),context:e};th({type:ge,payload:n})},Hd=(e,t)=>{const n=od(e,t),r=od(`${n}/workarea`,t);return pd(r)},qd=e=>e?dd(e,"parentContext"):(yt.error("getContainerParentContext: containerItemName is required parameters"),null),zd=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},Yd=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},Kd=()=>Ku,Xd=/{(.*?)}/i,Jd=/{(.*?)}/g,Qd=e=>null!==e.match(Xd),Zd=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),ep=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`}},tp=()=>Zd(window.location.pathname),np=(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 rp=new class{constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",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._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};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{Qd(e)?this.dynamicRoutesList?.push(e):this.staticRoutesList?.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>Zd(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>Zd(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,""),Zd(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),n=this._getMatchedRouteInRoutingTable(t);void 0===n&&(t=this.processUrl(this.defaultViewUrlPath,!0),n=this._getMatchedRouteInRoutingTable(t)||"");const{routeKey:r,payload:s}=this.appRoutes[n],{reqType:a,endPoint:o,params:i}=this.appRoutesMeta?.[r].restApi||{},c={...s},{caseClassName:l,caseID:u}=c;if(k.isRemoteCase(l)){const{RemoteClassGroup:e,RemoteSystemID:t}=k.getRemoteCase(l);c.caseID=u?.replace(l,e?.toUpperCase()),c.RemoteSystemID=t}const d={routeKey:r,requestType:a,routeEndpoint:o,payload:{...i,...c}};return this._resolveRoute(d,this.processUrl(e,!1),n)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let s=r;if(Qd(r)){const e=r.match(Jd);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(s=s.replace(e,n[t]))}))}const a=Tg(s),o=new URL(a);return this.isDefaultPortal()||this.getPortalName()&&!o.searchParams.toString().includes("portal=")&&o.searchParams.append("portal",this.getPortalName()),o.toString()}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:s}=e;if(s&&!r)return;const a=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(Xr(t))),o=`${U.APP.APP}${F.FORWARD_SLASH_STRING}${U.PRIMARY}`,i={semanticURL:a,directUrlUpdation:!0,options:{acName:o,context:hd(o)}};Cg(i);const c=r.substring(r.lastIndexOf("-")+1),l=t.substring(t.lastIndexOf(" ")+1),u=ap.environmentInfoObject?.pxApplication?.pyLabel;xg(`${c} (${l}) - ${u}`)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},s=r?.split("/").length,a=r?.split("/"),o=Object.keys(this.appRoutes).filter((e=>s===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 r=this.appRoutes[e].payload,s={...n};delete s.dataViewName,delete s.dataContext;const a=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(mh.isEmpty(a)||mh.isEmpty(s)?o:Object.keys(s).every((e=>Object.prototype.hasOwnProperty.call(a,e))))}));return i?this._getQueryParamsResolvedURL(i,n):""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,s]=e.includes("?")?e.split("?"):[e];if(s){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const a=new URLSearchParams(s),o={};for(const[r,s]of a.entries())if("string"==typeof s&&Qd(s)){const a=this._getDynamicKeyName(s);o[r]=n?t[a]||e[a.toLowerCase()]:t[a]}else"string"==typeof s&&(o[r]=s);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=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:r}=this.appRoutesMeta[e].restApi;let{endPoint:s}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(s=`${s}&pageName=${t.params.pageName}`);const a=s.match(Jd);if(a)for(let e=0;e<a.length;e+=1){const n=a[e].replace("{","").replace("}",""),r=new RegExp(a[e],"g");s=s.replace(r,t?.[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:s,reqType:n,body:e}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[s,a]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=s.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],Qd(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(a),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in d)Qd(d[e])?u[e]=p[e]||h[e.toLowerCase()]:u[e]=d[e];let g;a&&(g=this._getQueryParamsResolvedURL(n,p,!0));const f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!Qd(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(Jd);for(let s=0;s<t.length;s+=1){const a=t[s],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`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let s=e[r];if("string"==typeof s&&Qd(s)){const e=s.match(Jd);for(let n=0;n<e.length;n+=1){const r=e[n],a=this._getDynamicKeyName(r);if(void 0!==t[a]){const e=t[a];s=s.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${a}} in payload- {${a}} is missing in semantic url construct`)}n[r]=s}else"object"==typeof s&&(n[r]=this._resolvePayloadRecursive(s,t))}return n}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList?.find((t=>t.toLowerCase()===e.toLowerCase()));_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,s]=e.includes("?")?e.split("?"):[e],a=t.split("/");if(a.length!==r.length)return!1;let o=0;for(o=0;o<a.length;o+=1){const e=a[o].toLowerCase();if(!Qd(e)&&e!==r[o]&&ep(e)!==r[o])return!1}if(s){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(s.toLowerCase()),r=new Set,a=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())a.add(e);if(a.size!==r.size)return!1;for(const n of r){if(!a.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!o.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{np(e,t,"warning"),np("Error in Generated Routing Table",null,"error"),np("Back | Forward for this page may NOT work as intended",null,"warning"),np("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},sp=rp;const ap=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.showPerformanceDashboard=!1,this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||mh.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1}}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 sp.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return 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(F.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}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){Qi.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)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getAvailableLocalePacks(){return this.environmentInfoObject?.pyAvailableLocalePacks?.map((e=>e.pyLabel))||[]}getPerformanceDashboardVisibility(){return this.showPerformanceDashboard}setPerformanceDashboardVisibility(e){this.showPerformanceDashboard=e}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=e}getInactivityTimeout(){const e=this.environmentInfoObject?.pxOperator?.pyAuthenticationTimeout;return e?Number(e):e}isUnifiedObject(){return this.environmentInfoObject?.features?.isUnifiedObject||!1}};const op=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 r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1),[o,i]=this.getKeyAndValue(a);this.addKeyToMap(o,i),n+=`${a.split(":")[0]}}`,t=s+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 r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1);n+=this.keyMap[a],t=s+1}return n}};const ip=new class{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||e;this.localeStore[t]=n};getLocaleForRule(e=this.#c()){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,r){n||(n=this.#c());let s=!1;e&&"string"==typeof e&&(s=e.includes("@P ")),s&&(e=op.formatLocaleKey(e));const a=this.#l(e,n,t,r);return s?op.replaceWithValue(a[e]||e):a[e]||e}#l(e,t,n,r){t!==this.FIELD_LABELS_BUNDLE_KEY&&(n=n?`${n}.fields`:"fields");let s=this.localeStore[t.toUpperCase()],a=s?mh.getIn(s,n,{}):{};return!a[e]&&r&&(s=this.localeStore[this.#c().toUpperCase()],a=s?mh.getIn(s,`${r}.${n}`,{}):{}),a}#c(){return 2===ap.getFeatureMap().localizationVersion?this.GENERIC_BUNDLE_KEY_LP:this.GENERIC_BUNDLE_KEY}getParagraphLocaleValue(e,t,n){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(n,t)}getPortalLocaleReference(e){return e?`PORTAL!${e}`.toUpperCase():`PORTAL!${ap.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e,t){if(!e)return null;return 2===this.getLocalizationVersion()?`CASE!${e}`.toUpperCase():t?`${e}!CASE!${t}`.toUpperCase():null}getLocalizationVersion(){return ap.getFeatureMap().localizationVersion||1}async getLocaleJsons(e){if(!this.isCurrentLocalePackAvailable())return[];const t=ap.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:xr.getSvcLocale(t,`${e}.json`)}))),s=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(s.map((async(e,t)=>{if("fulfilled"===e.status){const s=r[t];let a;try{a=await e.value.json()}catch{a=null}a&&n.push({localeRuleKey:s.localeRuleKey,jsonData:a})}})))}return n}async loadLocaleResources(e){const t=ap.getUseLocale(),n=ap.getBaseLocale();if(ap&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await this.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}isCurrentLocalePackAvailable(){const e=ap.getLocale();return e&&ap.getAvailableLocalePacks()?.includes(e)}};let cp;const lp=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=cp.getValue(t);return cp.registerAdditionalProps({[t]:`@P ${t}`}),e}}};const up=class{static getParagraphStream(e,t){return((e,t)=>{cp=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,lp);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}};Kt.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),Kt.registerHandler("@P",((e,t,n)=>t?t.getValue(e):Ah.getLitePropertyValue(n))),Kt.registerHandler("@E",((e,t,n)=>{try{const r=Ft(e),s=jt(r);return Vt(s,t,n)}catch(e){}return!0})),Kt.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${F.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:s}=n??{};r=oh(t,`.${F.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,s)}return!0===r||"true"===r})),Kt.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let s="",a="";const o=t.getPageReference();if(e.startsWith(".")){s=`${o}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),a=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),s=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===F.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata}),i===F.DATA_PAGE))return null;if(i===F.DECISION||i===F.RULE_REFERENCE)return function(e,t){const n=Xt.getPropertyName(e?.propertyForDisplayText),r=Xt.getPropertyName(e?.propertyForValue),s=t.getContextDataValue(`.${F.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return s?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==F.DATA_PAGE)return n?.datasource?.records;const d=Xt.getPropertyName(n?.datasource?.propertyForDisplayText),p=Xt.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(Xt.isProperty(e?.value)){let t=ah(`.${mh.getFullPropertyReference([a,Xt.getPropertyName(e.value)])}`,o,g);f.push(mh.getFullPropertyReference([o,a,Xt.getPropertyName(e?.value)])),null!=t&&""!==t||(t=F.NULL_STRING),r.push(t)}else r.push(e?.value||F.NULL_STRING)})),g){const e=zt.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,s])]}else e[t]=[s]})),zt.addContextName(g,e)}const m=function(e,t,n,r){let s="",a=n;if(t.join(F.HASH_DELIMITER)&&(s=mh.getHashedString(t.join(F.HASH_DELIMITER)),a=n+F.UNDERSCORE_STRING+s),r){const e=rh(),t=e?e[n]?.[a]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=(e.getDataObject()[n]||{})[a]||{};return Array.isArray(o?.pxResults)?o.pxResults:[]}(t,r,l,c);return m.map((e=>({key:e[p]||e[`.${p}`],value:e[d]||e[`.${d}`]})))})),Kt.registerHandler("@ROUTING_INFO",((e,t)=>ft(t.getContainerName(),t.getContextName()))),Kt.registerHandler("@ENV",((e,t)=>{switch(e){case F.ENV_INFO_KEYS.APPLICATION_NAME:return ap.getApplicationName();case F.ENV_INFO_KEYS.ACCESS_GROUP:return ap.getAccessGroup();case F.ENV_INFO_KEYS.USER_NAME:return ap.getOperatorName();case F.ENV_INFO_KEYS.USER_ID:return ap.getOperatorIdentifier();case F.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(ap.getApplicationLabel()||"");case F.ENV_INFO_KEYS.USER_IMAGE:return ap.getOperatorImageInsKey();case F.ENV_INFO_KEYS.LOCALE:return ap.getUseLocale();case F.ENV_INFO_KEYS.TIMEZONE:return ap.getTimeZone();case F.ENV_INFO_KEYS.WORK_GROUP:return ap.getOperatorWorkGroup();default:return e}})),Kt.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getValue(e)||[],r=t.getComponentConfig(),s=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(s){const{fields:e,copyAll:t}=r[s],a=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=Xt.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const s=Xt.getPropertyName(e[t]);r[t]=n[s]})),a.push(r)})),a}return[]})),Kt.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let s="";const a=e.split(".").filter((e=>!!e));if(a.length>1&&(a.pop(),s=`.${a.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:a,value:o}=n;r.name=a,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${s}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),Kt.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||Ah.getLitePropertyValue(n,e),s=t?.getReferencedUser(r)||Ah.getReferencedUser(r,n);return{userId:r,userName:s?s.UserName:null}})),Kt.registerHandler("@ACTIVE_CASES",((e,t)=>Mu.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),Kt.registerHandler("@LR",(e=>e)),Kt.registerHandler("@CASE",((e,t)=>e===F.ID?t.getCaseInfo().getKey():e)),Kt.registerHandler("@SHARED",(e=>Fu.getSharedState(e))),Kt.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?up.getParagraphStream(n,t):null})),Kt.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),s=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:a}=t;let o;return mh.isEmpty(a)?o=t.getValue(`.${n}`):(o=a,o=mh.getIn(o,n)),o&&r.length>0?(s&&(o=o.filter((e=>kt(s,e)))),o.map((e=>mh.getIn(e,r)))):null})),Kt.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),Kt.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const dp="downloadAttachment",pp={},hp=e=>{const t=hc();return pp[e]=t,t},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("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},fp=e=>{let t,n,r,s;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,s=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:gp(e.pyMimeFileExtension||e.MimeType)},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:s,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null)}}},mp={uploadAttachment:(e,t,n,r)=>{const s=new FormData;s.append("appendUniqueIdToFileName",!0),s.append("file",e);const{restApi:a,reqType:o}=Ig("uploadAttachment",{});return uc(a,{method:o,headers:{"Content-Type":"multipart/form-data"},body:s,onUploadProgress:t,signal:hp(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(gc,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete pp[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const s={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,s.signal=hp(n).token}const{restApi:a,reqType:o}=Ig("linkCaseAttachment",{caseID:e});return uc(a,{...s,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:s}=Ig("getCaseAttachments",{caseID:e,includeThumbnail:n});return uc(r,{method:s},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:s}=Ig("getAttachmentCategories",{caseID:e,type:t});return uc(r,{method:s},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=Ig(dp,{attachmentID:e});return uc(r,{method:s,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=Ig("editAttachment",{attachmentID:e});return uc(r,{method:s,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=Ig("deleteAttachment",{attachmentID:e});return uc(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=Ig("downloadDocument",{documentID:e});return uc(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:s}=Ig("deleteDocument",{caseID:e,documentID:t});return uc(r,{method:s},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"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=>{pp[e]&&(pp[e].cancel(),delete pp[e])},buildFilePropsFromResponse:fp,getAttachmentURL:e=>{const{restApi:t}=Ig(dp,{attachmentID:e});return t},prepareAttachmentData:e=>{let t=[];if(e&&Object.hasOwn(e,"pyCount")&&e.pyCount>0)t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>fp(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(fp)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t}}};Kt.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):Ah.getLitePropertyValue(n),mp.prepareAttachmentData(r)})),Kt.registerHandler("@FL",((e,t)=>t.getLocalizedValue(t.getFieldMetadata(e)?.label))),Kt.registerHandler("@GENAICOACH",((e,t)=>Gp(e,t.getCurrentClassID()))),Kt.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),s=t.getPageReference();dl.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",s,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:!0}),`${s}${e}`,`${r}/${s}`,r)}));const yp={},Ip={},Ep={},Ap={},_p={},Sp={},Cp={},Tp={},Np={},Pp={},Dp=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],s=t[n];if(s){const e=Array.isArray(s)?s:[s];(Array.isArray(r)?r:[r]).forEach((t=>{const n=e.findIndex((e=>e.classID===t.classID));if(-1===n)e.push(t);else{const r={isDeclarativeTarget:!1},s={...e[n],...r,...t};e[n]=s}})),t[n]=1===e.length?e[0]:e}else t[n]=r})):mh.copy(e,t)},Rp=(e,t="")=>{if(!e)return null;const n=Ap[e];if(!n)return null;if(!t)return Array.isArray(n)?[...n]:n;let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r},bp=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let s;const a=Rp(e,t);return r.length&&(s=r.join(".")),{...a,embeddedType:n,category:s}}const[s,...a]=e.split("."),o=Rp(s,t);return o&&r.push(o.label),bp(a.join("."),o?.pageClass,o?.type,r)},Op=e=>{Dp(e,Ip)},vp=e=>{Dp(e,Ep)},xp=e=>{if(e.views&&Dp(e.views,Ip),e.navigations&&Dp(e.navigations,Ep),e.personalizations&&Dp(e.personalizations,Sp),e.insights&&Dp(e.insights,Cp),e.paragraphs&&Dp(e.paragraphs,yp),e.dataTypes&&Dp(e.dataTypes,Tp),e.datapages&&Dp(e.datapages,Np),e.genAICoaches&&Dp(e.genAICoaches,Pp),e.fields){Object.keys(e.fields).forEach((t=>{const n=e.fields[t];if(Array.isArray(n)){if(e.datapages&&n.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===n.length){const[r]=n;e.fields[t]=r}}else e.datapages&&n.datasource&&"DataPage"===n.datasource.tableType&&(n.datasource.mode=e.datapages[n.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{_p[e]=t[e]}))}Dp(e.fields,Ap)},wp=e=>Ip[e],Mp=(e,t)=>{const n=Ip[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},Lp=e=>Ep[e],Up=e=>e in _p?_p[e]:null,Fp=e=>e in Sp?Sp[e]:null,jp=e=>e in Cp?Cp[e]:null,Vp=e=>{const t={};return Object.keys(Ap).forEach((n=>{const r=Ap[n];let s;Array.isArray(r)?s=r.find((t=>e===t.classID)):e===r.classID&&(s=r),s&&(t[n]=mh.deepClone(s))})),t},kp=(e,t)=>{const n=Rp(e,t)?.datasource?.parameters;return n?mh.deepClone(n):null},$p=(e,t)=>{let n=null;const r=yp[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?mh.deepClone(n).content:null},Gp=(e,t)=>{let n=null;const r=Pp[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?mh.deepClone(n):null},Bp=e=>{if(e in Tp){const{savableDataPage:t}=Tp[e];return t}return null},Wp=e=>{const t=Np[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:s}=t;if(r)return s.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const a=Tp[n];return a?a.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},Hp=e=>{if(e in Tp){const{lookupDataPage:t}=Tp[e];return t}return null},qp=e=>{if(Object.prototype.hasOwnProperty.call(Tp,e)){const{lookupDataPageInfo:t}=Tp[e];return t}return null},zp=(e,t)=>{const n=e.split("."),r=n.pop(),s=new qu({options:{pageReference:`${n.join(".")}`,context:t}}),a=Rp(r,s.getCurrentClassID())?.additionalInformation;if(!a?.includes("@PARAGRAPH"))return a;const o=Xt.trimAnnotation(a),i=s.getCurrentClassID(),c=s.getLocaleRuleNameFromKeys(i,F.PARAGRAPH,o),l=ip.getParagraphLocaleValue(c,i,o);return l?up.getParagraphStream(l,s):null},Yp=(e,t)=>{const n=e.split("."),r=n.pop(),s=new qu({options:{pageReference:`${n.join(".")}`,context:t}}),a=Rp(r,s.getCurrentClassID()),o={};return s._classID=s.getCurrentClassID(),s.resolveConfigProps(a,o),o};class Kp{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,s,a="singleRecord"){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,s);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=mh.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,r,s){if(!e||!n||!r?.length)return;const a=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,s);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=mh.getFullPropertyReference([i,t]),t in o){const e=o[t];mh.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,r,s){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[s]){a[s]=r;const o=ah(n,t,e);a.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,s){const a=Kp._getFieldsForList(e,t,n);a.length>0&&(this.registerFields(e,t,a,r,s),tu.enableCascade(e))}unRegisterListField(e,t,n,r){const s=Kp._getFieldsForList(e,t,n);s.length>0&&this.unRegisterFields(e,t,s,r)}static _getFieldsForList(e,t,n){const r=[],s=Rp(n,ah("classID",t,e));return s&&s.datasource&&s.datasource.parameters&&Object.values(s.datasource.parameters).forEach((e=>{if(Xt.isProperty(e)){const t=Xt.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n,r){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const s=this.cascadeSubscribers[e][`${t}${n}`];s[r]&&delete s[r]}))}triggerCascade(e,t,n,r){let s=!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&&(s=!0,r?r.add(o[a]):o[a](t,n))})),s&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=ah(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=ah(t,"",e);n(e,t,r)}))}))}_getServerProperties(e,t,n,r,s){if("object"!=typeof e){s.push(n.replace(/\.(\d+)/g,"[$1]"));const a=/[a-zA-Z]+\.(\d+)\./g;if(0===this.listChangeSubscribers.length||!a.test(n))return;n=n.replace(/\.(\d+)/g,"[$1]");const o=ah(n,"",t);if(void 0===o&&!e&&0!==e)return;return void(o!==e&&r.push(n))}const a=Object.keys(e??{});for(let o=0,i=a.length;o<i;o+=1){const i=a[o],c=`${n}.${i}`;this._getServerProperties(e[i],t,c,r,s)}}getServerProperties(e,t,n=F.CASE_INFO.CASE_INFO_CONTENT){const r=[],s=[],a=mh.getIn(e,n);return a&&t?(this._getServerProperties(a,t,n,r,s),{changedListProperty:r,leafProperty:s}):{changedListProperty:r,leafProperty:s}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.match(/[.]/g).length>1){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Xp=new Kp;let Jp=null;const Qp=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),Zp=e=>{Jp=e},eh=()=>Jp,th=e=>{if(!e)return;let t=[],n=[];Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n}=Xp.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),eh()?.dispatch(e),Array.isArray(e)||"MERGE_DATA"!==e.type||Xp.handleServerChanges(e.payload.context,t,n)},nh=e=>eh()?.getState().data?.[e],rh=()=>eh()?.getState().data[F.SHARED],sh=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const s=e?.startsWith(".")?t+e:e,a=Qp(s);return mh.getIn(n,a)},ah=(e,t,n)=>sh(e,t,nh(n)),oh=(e,t,n)=>sh(t,e?`${F.CONTEXT_DATA}.${e}`:`${F.CONTEXT_DATA}`,nh(n)),ih=(e,t,n)=>((e,t,n)=>{const r=Qp(`${t}.${n}`);return mh.getIn(e,r)})(nh(n),`${F.CONTEXT_DATA}.${e}`,t),ch=e=>{const{context:t}=e,n=eh()?.getState().data[t];if(n)return ue;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?_e:ue},lh=(e,t)=>{const n=Qp(t);return mh.deleteIn(e,n)},uh=e=>!Array.isArray(e)&&"object"==typeof e,dh=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:s=[]}=n;Array.isArray(e)&&!t&&(t=[]),Array.isArray(s)&&s.length>0&&s.forEach((t=>{mh.setIn(e,t,{})}));const a=(e,t)=>{if(uh(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return w()(e,t,a);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return w()(e,t,a);{const n=t.length;if(void 0===r&&n===e.length)return w()(e,t,a)}}return""===t&&e&&"object"==typeof e?e:t};return a(e,t)},ph=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:s}=r,a=Qp(t);if("object"==typeof n){const t=dh(mh.getIn(e,a),n,{isArrayDeepMerge:s});return mh.setIn(e,a,t)}return mh.setIn(e,a,n)},hh=(e,t,n)=>{const r=Qp(t);return mh.setIn(e,r,n)},gh=()=>{const e=Je,{promise:t,actionMgrID:n}=on.actionManagerPromise(e);return th({type:e,payload:{actionMgrID:n}}),t};class fh{static mergeDeep(e,t){return w()(t,e)}static hasIn(e,t){return D()(e,t)}static getIn(e,t,n){return b()(e,t,n)}static setIn(e,t,n){return v()(e,t,n)}static deleteIn(e,t){return N()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return L()(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||-1===e.indexOf("."))return!1;let t=0;const n=e.length;for(;t<n;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[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 r=new Set;for(const s in e)t.includes(s)&&"string"==typeof e[s]&&e[s]?.startsWith("@W ")&&(n=Xt.trimAnnotation(e[s]),r.add(n));return"multirecordlist"===e?.type&&"Editable"===e?.renderMode&&Object.keys(e?.allowActions??{}).forEach((t=>{"string"==typeof e?.allowActions[t]&&e.allowActions[t]?.startsWith("@W ")&&(n=Xt.trimAnnotation(e.allowActions[t]),r.add(n))})),[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=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 r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let s=0;for(;s<r.length-1;s+=1){const e=r[s];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[s]]||(t[r[s]]=Array.isArray(n)?[]:{}),dh(t[r[s]],n,{isArrayDeepMerge:!0})):t[r[s]]=n};static getHashedString(e){return(0,C.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 h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&fh.isEqual(e[n[r]],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("."):null}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([s,a])=>{r.push(Array.isArray(e)?Number(s):s),Array.isArray(a)?a.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof a?n(a,r):t(r.slice(),a),r.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(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let s;r.reduce(((e,t,a)=>(s=e[t]?e[t]:Number.isNaN(Number(r[a+1]))?r.length-1===a?n:{}:[],e[t]=s,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{fh.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const s=t?`${t}.${r}`:r;fh.flatten(e[r],s,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(F.CASE_INFO.CASE_INFO_CONTENT,"").replace(F.DATA_INFO.DATA_INFO_CONTENT,"");return Fn.formatPageReference(n)}static buildAttachmentsFormData(e){return e.map((e=>{if(e.delete){let t="";return t=e.responseProps.ID?e.responseProps.ID:e.responseProps.pzInsKey,{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:t}}return{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}}))}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 isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&on.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"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];n="string"==typeof r?"true"===r||"false"!==r&&r:r,e[t]=n})),e}}const mh=fh,yh=F.SUMMARY_OF_LISTS,Ih=F.SUMMARY_OF_WHEN_CONDITIONS;class Eh{static updateData(e){Object.keys(e).forEach((t=>{th(Ph({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{th(Ph({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${Ih}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return Lp([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=wp([this.resolveName(e,t)]);let s=[];return Array.isArray(r)&&r.length>0?(t&&(n||(n=t.getValue(F.CLASS_ID)),s=r.filter((e=>e[F.CLASSID]===n))),0===s.length?r[0]:s[0]):r}static resolveName(e,t){return e?.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e?.startsWith("@")&&(e=Xt.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=Xt.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:t.startsWith(".")?e+t:`${t}`:e}static getRuleClass(e,t,n){let r;return t?r=t.startsWith(F.CLASS_ANNOTATION)?t.split(F.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName()):n?.authorContext&&(r=n.ruleClass),r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,s=n?.type,{ref:a,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return"navigation"===s?r=this.resolveNavigation(a||o,t):"view"===s?r=this.resolveView(a||o,t,c||""):"widget"===s&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return ah(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const s=ih(`${t}.${yh}`,e,n);s&&(r=this.resolvePropertyReference(t,s,n))}return r}static getPropertyValue(e,t,n){return e=Xt.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=Eh.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:r,hasSuggestions:s,pageReference:a,context:o}=e;let i=t||r;return n?(i=i?.startsWith?.(".")?i.substring(1):i,i?.split?.(".").reduce(((e,t)=>e?.[t]??void 0),n)):s?Eh.getPropertyValue(i,a,`${o}/${F.SUGGESTION}`):Eh.getPropertyValue(i,a,o)}static _handlePropString(e,t,n,r,s){n.startsWith("@")?e[t]=Xt.handleAnnotation(n,r,s):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const s=e[r];"string"==typeof s?this._handlePropString(e,r,s,t,n):Array.isArray(s)?s.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof s&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(mh.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(mh.mergeDeep(e,t),this._resolveProps(t,void 0,e),mh.resolveStringBooleans(t)):t}static resolveClassID(e,t,n){const r=Xt.trimAnnotation(e);let s;for(s=r.startsWith(".")?`${t}${r}`:`${r}`;s;){const e=ah(F.CLASS_ID,s,n);if(e)return e;s=s.substring(0,s.lastIndexOf("."))}return null}}const Ah=Eh;const _h=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const Sh=class{static#u=[];static#d=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=_h.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};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#p=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const s=e[r],a={actionHandler:s.handler,component:t,eventType:n,config:s.config};this.#u.push(a)}};static buildActionObject=(e,t)=>{const n={...e};return n.context=t.getContextName(),n.pageReference=t.getPageReference(),n.actionMgrID=on.getNextActionMgrId(),n};static#h=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,s={};Ah.resolveProps(r,s,n),t&&(t(e.eventType,s,n),this.#g())};static#g=()=>{if(!this.#d){if(0===this.#u.length)return;const e=this.#u.shift();this.#h(e),e.config&&"true"===e.config.parallel&&this.#u.length>0&&this.#g()}};static#f=()=>{this.#g()};static#m=(e,t,n)=>{this.#p(e,t,n),this.#f()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Ah.getContextPath(t,n)};static#y(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:s,actions:a}=n[r];if(a){const n=this.getActionHandlers(a,s,t);n&&n.length>0&&this.#m(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();if(Wn({type:U.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r}),t instanceof Event||t.nativeEvent instanceof Event||null!==t.value&&void 0===t.prop){let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const s=void 0===n?t.value:"value"in n?n.value:n.innerText,a=this.getFullRef(e);th({type:J,payload:{reference:a,value:s,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||th({type:Z,payload:{reference:a,pageReference:e.getPageReference(),value:s,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(F.CLASS_ID)}})}else{const n=e.getPageReference(),s=e.getStateProps();for(const e of Object.keys(t)){const a=s[e],o=t[e];th({type:J,payload:{reference:Ah.getContextPath(n,a),value:o,context:r}}),th({type:Z,payload:{reference:Ah.getContextPath(n,a),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const{value:r,validationValue:s}=n,a=this.getFullRef(e),o=e.getContextName();n.clearMessages&&Wn({type:U.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?s:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&th({type:Z,payload:{reference:a,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(F.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.#y(e,n)};static pause=()=>{this.#d=!0};static resume=()=>{this.#d=!1,this.#g()};static isQueueEmpty=()=>0===this.#u.length;static clearQueue=()=>{this.#u=[]};static getActionsQueue=()=>this.#u;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Ch="CREATE_WORK",Th=e=>({type:Ch,payload:e});const Nh=(e,t,n,r="")=>{const s=[];Object.keys(e).forEach((a=>{"object"==typeof e[a]&&a.includes("[")?function(e,t,n,r,s,a){const o=r.substring(0,r.indexOf("[")),i=r.substring(r.indexOf("[")+1,r.indexOf("]"));Array.isArray(t[o])&&(t[o]?.splice(+i,1,e[r]),a.push(o),n.add(`${s}.${r}`))}(e,t,n,a,r,s):e[a]&&"object"==typeof e[a]?(t[a]||(t[a]=Array.isArray(e[a])?[]:{}),Nh(e[a],t[a],n,`${r}.${a}`)):t[a]=e[a]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,s)},Ph=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[]}=t,{context:s,data:a,isArrayDeepMerge:o,preserveClientChanges:i=!1}=e,c=Il(s,!0);((e,t={})=>{const n=zc.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{mh.buildObject(e,t,n[e])}))})(s,c);const l=nh(s);let u={};if(l&&a){u=JSON.parse(JSON.stringify(l));const e=JSON.parse(JSON.stringify(a)),t=new Set;Nh(c,u,t),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=mh.trimDotForProperty(e);const[s,a,o]=pn(e);s&&a&&o&&!r.has(`${s}.${a}`)&&((mh.getIn(n,`${s}.${a}`)||[]).forEach(((e,n)=>{n!==+o&&mh.setIn(t,`${s}.${a}[${n}]`,e)})),r.add(`${s}.${a}`))}))})(t,u,e)}!function(e,t){const n=mh.getIn(e,F.REFERENCED_USERS,[]),r=mh.getIn(t,F.REFERENCED_USERS,[]);if(!Array.isArray(n)||!Array.isArray(r))return;const s=new Map;for(const e of[...r,...n])if(s.has(e.UserID)){const t=s.get(e.UserID);s.set(e.UserID,{...t,...e})}else s.set(e.UserID,e);n.length=0;for(const e of s.values())n.push(e)}(a,l);const d={caseInfo:{content:{...u?.caseInfo?.content}}};let p=a;return i?(n.forEach((e=>{mh.deleteIn(d,`caseInfo.content.${e}`)})),p=dh(a,d,{isArrayDeepMerge:!o})):((e,t)=>{const n=hl[e]||{};Object.keys(n).forEach((e=>{mh.hasIn(t,e)&&(n[e].value=mh.getIn(t,e))}))})(s,a),{type:ge,payload:{...e,data:p,...r.length>0?{propertiesToReplace:r}:null}}},Dh=e=>({type:"SHOW_HARNESS",payload:e}),Rh=e=>({type:ee,payload:e}),bh=e=>({type:te,payload:e}),Oh=e=>({type:"ADD_WORK",payload:e}),vh=e=>({type:le,payload:e}),xh=e=>({type:Ee,payload:e}),wh=e=>({type:Ae,payload:e}),Mh=e=>({type:_e,payload:e}),Lh=e=>({type:Ce,payload:e}),Uh=e=>({type:Te,payload:e}),Fh=e=>({type:De,payload:e}),jh=e=>({type:be,payload:e}),Vh=e=>({type:Re,payload:e}),kh=e=>{const{containerItemID:t}=e;return e.suggestionContexts=yd(t),{type:ve,payload:e}},$h=e=>{const{context:t}=e;return{type:ae,payload:{context:t}}},Gh=e=>{const{context:t}=e;return{type:oe,payload:{context:t}}},Bh=e=>({type:xe,payload:e}),Wh=e=>({type:Oe,payload:e}),Hh=e=>({type:Ke,payload:e}),qh=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=pd(n)),e.context=r,e.deleteContext=!vd(n),e.childContainers=fd(n),e.childContainersContexts=md(n),e.transientItems=xd([...e.childContainersContexts,n]),e.suggestionContexts=yd(n),n===t&&(e.caseID=ah(F.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ah(F.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Se,payload:e}},zh=e=>{const{containerItemID:t}=e;return e.transientItems=xd([...md(t),t]),{type:Pe,payload:e}},Yh=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Ne,payload:e}},Kh=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=pd(n)),e.context=r,e.childContainers=fd(n),e.childContainersContexts=md(n),e.transientItems=xd([...e.childContainersContexts,n]),e.suggestionContexts=yd(n),n===t&&(e.caseID=ah(F.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ah(F.CASE_INFO.REMOTESYSTEMID,"",t)),{type:we,payload:e}},Xh=e=>({type:de,payload:e}),Jh=e=>({type:he,payload:e}),Qh=e=>({type:ye,payload:e}),Zh=(e,...t)=>(Sh.resume(),e(...t)),eg=(e,t,n,r,s)=>({type:Ie,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:s}}),tg=e=>({type:Ze,payload:e}),ng=e=>({type:et,payload:e}),rg=e=>({type:tt,payload:e}),sg=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),ag=e=>({type:ie,payload:e}),og=e=>({type:J,payload:e}),ig="add",cg="replace",lg=["portal","noPortal","preview","debug","devtool"];let ug="",dg="Home",pg="",hg=!0;const gg=e=>(hg=e,hg),fg=()=>hg,mg=(e,t,n)=>sp.getSemanticURL(e,t,n),yg=(e,t)=>sp.getRestEndPoint(e,t),Ig=(e,t)=>{let n=E();const r=yg(e,t);return r?(r.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},Eg=(e,t,n)=>{const{root:r,resources:s}=e,{views:a}=s,{config:o}=r,i=ig;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(Jd);if(l){const e=mh.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},Ag=(e,t,n)=>{let r,s;r=Zd(t)?`${e}/${t}`:e;const a=Zd(n.pxURLPath);a&&(r=`${r}/${a}`);try{s=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==dg.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!sp.isDefaultPortal()){const e=sp.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return s=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&lg.includes(n)&&e.append(n,r);return e})(s,c),s.toString()&&(r+=`?${s.toString()}`),r},_g=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r},s=!1)=>{let a,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(s)a=t,o=n,i=r;else{const{uiResources:n,data:r}=e;({options:i}=e),a=t&&t.pxURLPath&&Qd(t.pxURLPath)?Eg(n,r,t.pxURLPath):t||Eg(n,r),o=sp.getEndPointInfo(a.pxURLPath),a.pxURLPath=o.urlPath}const c=Ag(ug,sp.getApplicationPath(),a),{title:l}=((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:sp.getApplicationName()),n===`${ug}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),s=r.split("/");return/\d/.test(r)?{title:`${e} - ${s[s.length-1]}`}:{title:`${e} - ${s[0]}`}})(pg,sp.getApplicationPath(),c),u=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(o,{...i,title:l});a.historyAction===ig?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(u,l,c):a.historyAction===cg&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(u,l,c)},Sg=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:ig,pxURLPath:""},t.pxURLPath=e.semanticURL),_g(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},Cg=e=>{Sg(e)},Tg=e=>{const t={pxURLPath:e};return Ag(ug,sp.getApplicationPath(),t)},Ng=e=>{const{uiResources:t}=e;fg()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,s=t.config,a=s.type,o=s.name;if("VIEW"===a.toUpperCase()){const e=r[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))&&Sg(e)},Pg=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},Dg=(e,t,n)=>{const{caseClassName:r,workID:s}=e.payload,{containerName:a,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:u}=k.getRemoteCase(r),d={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:ht,viewName:j,gadgetId:Ac.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i} ${s}`,containerName:a,name:u};th(l.showPage(d))},Rg=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&(k.isTraditionalRemoteCase(t.payload?.caseClassName)?Dg({...t},t.options):th(l.showHistory(Pg(t))))},bg=()=>sp.getApplicationPath()!==tp(),Og=e=>{const{acName:t,context:n,defaultViewLabel:r}=e,s=(e=>{const t=sp.getRoutingInfo(),n=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),s=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return t?.routes[n]?n:t?.routes[r]?r:t?.routes[s]?s:e})(r);(e=>{dg=e})(s),sp.setDefaultRoute(s);const a=W(t,n),o=gt(t,n),i="true"===ap.getIsExtraCallRequiredForDefaultHome(),c={historyAction:cg,pxURLPath:""};let u;const d={acName:o,context:a,actionConfig:{context:a}};if(i||!i&&bg()){const t=(e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),s=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&s.set(e,t);const a=new URLSearchParams(s).toString();return a?`${t}?${a}`:t}return e})(Zd(window.location.pathname+window.location.search));u=sp.getEndPointInfo(t),c.pxURLPath=u.urlPath,void 0!==u.payload?.pageClass&&(u.payload.pageClass=eh()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:u.routeEndpoint,requestType:u.requestType,payload:u.payload,options:d,routeKey:u.routeKey};k.isTraditionalRemoteCase(u?.payload?.caseClassName)?Dg(r,e,d.context):th(l[n](Pg(r)))}else u=sp.getEndPointInfo(dg),c.pxURLPath="";_g(null,{urlPathObjParam:c,infoParam:u,optionsParam:d},!0)},vg=(e,t=!1)=>{var n;ug=e.domain,!1===t&&fg()&&(n=Rg,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),sp.init(e,dg)},xg=e=>{(e=>{window.document.title=e})(e)};function wg(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 Mg=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),Lg=()=>Math.random().toString(36).substring(7).split("").join("."),Ug={INIT:`@@redux/INIT${Lg()}`,REPLACE:`@@redux/REPLACE${Lg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Lg()}`};function Fg(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 jg(e,t,n){if("function"!=typeof e)throw new Error(wg(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(wg(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(wg(1));return n(jg)(e,t)}let r=e,s=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(wg(3));return s}function d(e){if("function"!=typeof e)throw new Error(wg(4));if(c)throw new Error(wg(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(wg(6));t=!1,l(),o.delete(n),a=null}}}function p(e){if(!Fg(e))throw new Error(wg(7));if(void 0===e.type)throw new Error(wg(8));if("string"!=typeof e.type)throw new Error(wg(17));if(c)throw new Error(wg(9));try{c=!0,s=r(s,e)}finally{c=!1}return(a=o).forEach((e=>{e()})),e}p({type:Ug.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(wg(10));r=e,p({type:Ug.REPLACE})},[Mg]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(wg(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[Mg](){return this}}}}}function Vg(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const s=t[r];0,"function"==typeof e[s]&&(n[s]=e[s])}const r=Object.keys(n);let s;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:Ug.INIT}))throw new Error(wg(12));if(void 0===n(void 0,{type:Ug.PROBE_UNKNOWN_ACTION()}))throw new Error(wg(13))}))}(n)}catch(e){s=e}return function(e={},t){if(s)throw s;let a=!1;const o={};for(let s=0;s<r.length;s++){const i=r[s],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error(wg(14))}o[i]=u,a=a||u!==l}return a=a||r.length!==Object.keys(e).length,a?o:e}}function kg(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var $g=function(e){function t(t,n){return e.call(this)||this}return Mo(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Yo),Gg={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=Gg.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,Vo([e,t],jo(n))):setInterval.apply(void 0,Vo([e,t],jo(n)))},clearInterval:function(e){var t=Gg.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Bg=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Mo(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Gg.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&&Gg.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,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,zo(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}($g),Wg=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return Mo(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(Bg),Hg={now:function(){return(Hg.delegate||Date).now()},delegate:void 0},qg=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=Hg.now,e}(),zg=function(e){function t(t,n){void 0===n&&(n=qg.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Mo(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}(qg),Yg=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mo(t,e),t}(zg))(Wg),Kg=vo((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Xg=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 Mo(t,e),t.prototype.lift=function(e){var t=new Jg(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Kg},t.prototype.next=function(e){var t=this;ai((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=Fo(t.currentObservers),a=s.next();!a.done;a=s.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;ai((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;ai((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,r=n.hasError,s=n.isStopped,a=n.observers;return r||s?Ko:(this.currentObservers=null,a.push(e),new Yo((function(){t.currentObservers=null,zo(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,s=t.isStopped;n?e.error(r):s&&e.complete()},t.prototype.asObservable=function(){var e=new yi;return e.source=this,e},t.create=function(e,t){return new Jg(e,t)},t}(yi),Jg=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Mo(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:Ko},t}(Xg),Qg=function(e,t){return Qg=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])},Qg(e,t)};Object.create;Object.create;var Zg=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new Xg,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(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}Qg(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(yi);var ef=s(923),tf=Symbol.for("immer-nothing"),nf=Symbol.for("immer-draftable"),rf=Symbol.for("immer-state");function sf(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var af=Object.getPrototypeOf;function of(e){return!!e&&!!e[rf]}function cf(e){return!!e&&(uf(e)||Array.isArray(e)||!!e[nf]||!!e.constructor?.[nf]||ff(e)||mf(e))}var lf=Object.prototype.constructor.toString();function uf(e){if(!e||"object"!=typeof e)return!1;const t=af(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===lf}function df(e,t){0===pf(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function pf(e){const t=e[rf];return t?t.type_:Array.isArray(e)?1:ff(e)?2:mf(e)?3:0}function hf(e,t){return 2===pf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function gf(e,t,n){const r=pf(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function ff(e){return e instanceof Map}function mf(e){return e instanceof Set}function yf(e){return e.copy_||e.base_}function If(e,t){if(ff(e))return new Map(e);if(mf(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=uf(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[rf];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const s=n[r],a=t[s];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(af(e),t)}{const t=af(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function Ef(e,t=!1){return _f(e)||of(e)||!cf(e)||(pf(e)>1&&(e.set=e.add=e.clear=e.delete=Af),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>Ef(t,!0)))),e}function Af(){sf(2)}function _f(e){return Object.isFrozen(e)}var Sf,Cf={};function Tf(e){const t=Cf[e];return t||sf(0),t}function Nf(){return Sf}function Pf(e,t){t&&(Tf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Df(e){Rf(e),e.drafts_.forEach(Of),e.drafts_=null}function Rf(e){e===Sf&&(Sf=e.parent_)}function bf(e){return Sf={drafts_:[],parent_:Sf,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Of(e){const t=e[rf];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function vf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[rf].modified_&&(Df(t),sf(4)),cf(e)&&(e=xf(t,e),t.parent_||Mf(t,e)),t.patches_&&Tf("Patches").generateReplacementPatches_(n[rf].base_,e,t.patches_,t.inversePatches_)):e=xf(t,n,[]),Df(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==tf?e:void 0}function xf(e,t,n){if(_f(t))return t;const r=t[rf];if(!r)return df(t,((s,a)=>wf(e,r,t,s,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Mf(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let s=t,a=!1;3===r.type_&&(s=new Set(t),t.clear(),a=!0),df(s,((s,o)=>wf(e,r,t,s,o,n,a))),Mf(e,t,!1),n&&e.patches_&&Tf("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function wf(e,t,n,r,s,a,o){if(of(s)){const o=xf(e,s,a&&t&&3!==t.type_&&!hf(t.assigned_,r)?a.concat(r):void 0);if(gf(n,r,o),!of(o))return;e.canAutoFreeze_=!1}else o&&n.add(s);if(cf(s)&&!_f(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;xf(e,s),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||Mf(e,s)}}function Mf(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ef(t,n)}var Lf={get(e,t){if(t===rf)return e;const n=yf(e);if(!hf(n,t))return function(e,t,n){const r=jf(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!cf(r)?r:r===Ff(e.base_,t)?(kf(e),e.copy_[t]=$f(r,e)):r},has:(e,t)=>t in yf(e),ownKeys:e=>Reflect.ownKeys(yf(e)),set(e,t,n){const r=jf(yf(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ff(yf(e),t),o=r?.[rf];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((s=n)===(a=r)?0!==s||1/s==1/a:s!=s&&a!=a)&&(void 0!==n||hf(e.base_,t)))return!0;kf(e),Vf(e)}var s,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==Ff(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,kf(e),Vf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=yf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){sf(11)},getPrototypeOf:e=>af(e.base_),setPrototypeOf(){sf(12)}},Uf={};function Ff(e,t){const n=e[rf];return(n?yf(n):e)[t]}function jf(e,t){if(!(t in e))return;let n=af(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=af(n)}}function Vf(e){e.modified_||(e.modified_=!0,e.parent_&&Vf(e.parent_))}function kf(e){e.copy_||(e.copy_=If(e.base_,e.scope_.immer_.useStrictShallowCopy_))}df(Lf,((e,t)=>{Uf[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Uf.deleteProperty=function(e,t){return Uf.set.call(this,e,t,void 0)},Uf.set=function(e,t,n){return Lf.set.call(this,e[0],t,n,e[0])};function $f(e,t){const n=ff(e)?Tf("MapSet").proxyMap_(e,t):mf(e)?Tf("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Nf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Lf;n&&(s=[r],a=Uf);const{revoke:o,proxy:i}=Proxy.revocable(s,a);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:Nf()).drafts_.push(n),n}function Gf(e){if(!cf(e)||_f(e))return e;const t=e[rf];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=If(e,t.scope_.immer_.useStrictShallowCopy_)}else n=If(e,!0);return df(n,((e,t)=>{gf(n,e,Gf(t))})),t&&(t.finalized_=!1),n}var Bf=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...s){return r.produce(e,(e=>t.call(this,e,...s)))}}let r;if("function"!=typeof t&&sf(6),void 0!==n&&"function"!=typeof n&&sf(7),cf(e)){const s=bf(this),a=$f(e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?Df(s):Rf(s)}return Pf(s,n),vf(r,s)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===tf&&(r=void 0),this.autoFreeze_&&Ef(r,!0),n){const t=[],s=[];Tf("Patches").generateReplacementPatches_(e,r,t,s),n(t,s)}return r}sf(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){cf(e)||sf(8),of(e)&&(e=function(e){of(e)||sf(10);return Gf(e)}(e));const t=bf(this),n=$f(e,void 0);return n[rf].isManual_=!0,Rf(t),n}finishDraft(e,t){const n=e&&e[rf];n&&n.isManual_||sf(9);const{scope_:r}=n;return Pf(r,t),vf(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Tf("Patches").applyPatches_;return of(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},Wf=Bf.produce;Bf.produceWithPatches.bind(Bf),Bf.setAutoFreeze.bind(Bf),Bf.setUseStrictShallowCopy.bind(Bf),Bf.applyPatches.bind(Bf),Bf.createDraft.bind(Bf),Bf.finishDraft.bind(Bf);const Hf=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{pu.updateDataPageStore(t),Object.keys(t).forEach((n=>{mh.getIn(e,[F.SHARED,n])?Object.keys(t[n]).forEach((r=>{mh.setIn(e,[F.SHARED,n,r],t[n][r])})):mh.setIn(e,[F.SHARED,n],t[n])}))})(e,n),r&&mh.deleteIn(e,[r,"shared"])},qf=(e,t,n=!1)=>{const{context:r,caseViewMode:s=(n?void 0:F.PERFORM_MODE),containerName:a}=t;a!==Qu.WORKAREA&&s&&mh.setIn(e,[r,"context_data","caseViewMode"],s)},zf=(e,t)=>{const{context:n}=t;mh.setIn(e,[n,"context_data","actionType"],t.actionType),mh.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},Yf=(e,t=[])=>{t.forEach((t=>mh.deleteIn(e,t)))},Kf=(e,t=[])=>{t.forEach((t=>mh.deleteIn(e,t)))},Xf=(e,t=[])=>{t.forEach((t=>{mh.deleteIn(e,t)}))},Jf=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:s=!0}=n;mh.deleteIn(e,[t,"nextAssignmentInfo"]),mh.deleteIn(e,[t,"caseInfo","availableActions"]),mh.deleteIn(e,[t,"caseInfo","availableProcesses"]),mh.deleteIn(e,[t,"caseInfo","activeActionID"]),mh.deleteIn(e,[t,"caseInfo","assignments"]),mh.deleteIn(e,[t,"caseInfo","childCases"]),s&&(mh.deleteIn(e,[t,"caseInfo","confirmationLinks"]),mh.deleteIn(e,[t,"caseMessages"])),r&&(mh.deleteIn(e,[t,"caseInfo","actionButtons"]),mh.deleteIn(e,[t,"caseInfo","navigation"]))},Qf=(e,t)=>Wf(e||{},(e=>{switch(t.type){case _e:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&Jf(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(F.WORKAREA)&&-1===n.indexOf(F.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,qf(e,t.payload),zf(e,t.payload),Hf(e,t.payload),((e,t)=>{const{context:n}=t;mh.deleteIn(e,[n,"context_data","blocking_action_counter"]),mh.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload),e}case ve:{t.payload.doDeleteCaseSummary&&Jf(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;return!n||-1===n.indexOf(F.WORKAREA)&&-1===n.indexOf(F.MODAL)?e[t.payload.containerItemID]=dh(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=dh(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&zf(e,t.payload),qf(e,t.payload),Hf(e,t.payload),Kf(e,t.payload.suggestionContexts),e}case Se:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:s}=t;s&&mh.deleteIn(e,[r]),mh.deleteIn(e,[n])})(e,t.payload),Xf(e,n),Yf(e,t.payload.transientItems),Kf(e,t.payload.suggestionContexts),e}case Ae:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{mh.deleteIn(e,[t])})):mh.deleteIn(e,[n]),e}case xe:{const{context:n,contextToBeRemoved:r,data:s,childContainersContextsToBeRemoved:a}=t.payload;return Jf(e,t.payload.context),qf(e,t.payload),e[n]=dh(e[n],e[r]),e[n]=dh(e[n],s),mh.deleteIn(e,[r]),Xf(e,a),Hf(e,t.payload),e}case we:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:s=[]}}=t;let{payload:{data:a}}=t;const o=mh.getIn(e[n],"pulse");let i=mh.getIn(e[n],"OperatorID"),c=mh.getIn(e[n],"pxRequestor");return c&&a.pxRequestor&&(c=mh.mergeDeep(c,a.pxRequestor)),i&&a.OperatorID&&(i=mh.mergeDeep(i,a.OperatorID)),!r&&o&&(a=ph(a,"pulse",o),a=ph(a,"OperatorID",i),a=ph(a,"pxRequestor",c)),mh.setIn(e,n,a),qf(e,t.payload),Hf(e,t.payload),Xf(e,s),Yf(e,t.payload.transientItems),Kf(e,t.payload.suggestionContexts),e}case nt:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return Jf(e,n,{doDeleteConfirmationDetails:r}),e}case Ce:{const{transientItemID:n,data:r}=t.payload;return mh.setIn(e,n,r)}case Ne:case Pe:{const{transientItems:n}=t.payload;return n.forEach((t=>mh.deleteIn(e,t))),e}case Te:case De:{const{transientItemID:n,data:r}=t.payload;return dh(mh.getIn(e,n),r),e}case Re:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&mh.deleteIn(e,[n,t]);return e}case be:{const{transientItemID:n,data:r}=t.payload;return mh.deleteIn(e,n),mh.setIn(e,n,r)}case ie:{const{key:n,value:r}=t.payload;return mh.setIn(e,`${F.SHARED}.${n}`,r),e}case Ue:{const{context:n,data:r}=t.payload;return mh.setIn(e,n,r)}default:return e}})),Zf=(e,t)=>Wf(e,(e=>{switch(t.type){case ge:{const{propertiesToReplace:n=[]}=t.payload;return e[t.payload.context]=dh(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n]}),qf(e,t.payload,!0),Hf(e,t.payload),e}case J:{const{context:n,reference:r,value:s,isArrayDeepMerge:a}=t.payload;return ph(e[n],r,s,{isArrayDeepMerge:a}),e}case Q:{const{context:n,reference:r,value:s}=t.payload;return hh(e[n],r,s),e}case fe:return lh(e[t.payload.context],t.payload.reference),e;case ae:return mh.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case oe:return mh.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case Ze:{const{data:n}=t.payload;return Hf(e,{data:{shared:n}}),e}case et:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;mh.deleteIn(e.shared,[n,r]);const s=mh.getIn(e.shared,[n]);s&&0===Object.keys(s).length&&mh.deleteIn(e.shared,[n])})),e}case rt:{const n=mh.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?mh.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):mh.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),em=/\[(\d+)\]$/gi,tm=/(\d+)/gi,nm=/\[.\]$/gi,rm=(e,t,n,r=[F.CONTEXT_DATA,F.CASE_INFO.CASE_INFO,F.CONTENT])=>{const s=mh.getIn(t,r);if(s){const t=qn(s,[],[]);for(const s of t)mh.setIn(e[n],[...r,...s],{})}},sm=(e,t,n,r)=>{const{property:s,pageReference:a,category:o,type:i}=r.payload,c=mh.getIn(e[t],n);if(c&&o===F.CASEMESSAGES)mh.setIn(e[t],Vn(s,a,o),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&mh.setIn(e[t],Vn(s,a,o),r)}};const am=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[F.ERROR_FIELD_IN_PAGE].slice(1),s=n[F.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(s){let a=r?`caseInfo.content.${r}`:"caseInfo.content";a=a.replace(/\(/g,"[").replace(/\)/g,"]");const o=Vn(s,a,F.PROPERTY),i={type:U.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue},c=mh.getIn(e[t],o,[]);if(mh.isContains(c,i))return;mh.setIn(e[t],o,[...c,i])}})(e,t,n)}))};function om(e,t){const{err:n,formFields:r}=t.payload;let{context:s}=t.payload;const{fieldErrors:a,pageErrors:o}=Oc(n.errorDetails,r);if(mh.setIn(e,[s,...jn.FIELD_MESSAGES_PATH],{}),mh.setIn(e,[s,...jn.PAGE_MESSAGES_PATH],[]),a.forEach((t=>{if(t[F.ERROR_FIELD_IN_PAGE]){const n=t[F.ERROR_FIELD_IN_PAGE].slice(1);if(n){const t=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)}(n);if(!t)return!1;const r=n.substring(n.lastIndexOf(".")+1),a=Vn(r,t,F.PROPERTY);mh.setIn(e,[s,...a],[])}}})),a.length>0&&am(e,s,a),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:U.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[s]||(s=F.APP.APP),mh.setIn(e,[s,...jn.PAGE_MESSAGES_PATH],t)}else s.includes&&s.includes(Qu.WORKAREA)&&(s=B(s)),mh.deleteIn(e,[s,...jn.PAGE_MESSAGES_PATH]);return e}const im=(e,t)=>Wf(e||fm().data,(e=>{switch(t.type){case Ie:return t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||t.payload.err.displayButtonsOnErrors.length>0)?om(e,t):e;case ve:{const{context:n}=t.payload,r=[n,...jn.FIELD_MESSAGES_PATH],s=[n,...jn.PAGE_MESSAGES_PATH];if(mh.setIn(e,r,{}),mh.setIn(e,s,[]),n&&n.includes(Qu.WORKAREA)){const t=[K(n),...jn.PAGE_MESSAGES_PATH];mh.setIn(e,t,[])}return e}case Xe:{const{isListEntry:n}=t.payload;return n?((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return rm(e,i,c),e;const l=Vn(n,r,s,a);if(Number.isInteger(o)){mh.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=mh.getIn(e[c],t)||{};const r=Object.keys(n);n=r.map((e=>n[e])),n.forEach(((n,s)=>{const a=r[s].match(em);if(a?.length){const i=parseInt(a[0].match(tm)[0],10);i>o&&(mh.deleteIn(e[c],t.concat(r[s])),mh.setIn(e[c],t.concat(r[s].replace(nm,`[${i-1}]`)),n))}}))}else mh.setIn(e[c],l,{});return e})(e,t):((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return rm(e,o,i),e;const l=Vn(n,r,s,a);return s===F.PAGE&&i?.includes(Qu.WORKAREA)&&(c=B(i)),sm(e,c,l,t),sm(e,i,l,t),e})(e,t)}case Ke:{const{messages:n,property:r,pageReference:s,context:a,category:o}=t.payload,i=Vn(r,s,o);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&mh.setIn(e[a],Vn(r,s,o),n),e}default:return e}})),cm=(e,t)=>Wf(e,(e=>{if(t.type===tt){const{instruction:n,actions:r,context:s,referenceList:a,listIndex:o,listMoveToIndex:i,content:c={}}=t.payload,l=Qp(a);switch(n){case F.LIST_ACTIONS.INSERT:((e,t,n,r,s)=>{mh.setIn(e[t],[...n,r],s)})(e,s,l,o,c);break;case F.LIST_ACTIONS.UPDATE:((e,t,n,r,s)=>{const a=dh(mh.getIn(e[t],[...n,r],{}),s);mh.setIn(e[t],[...n,r],a)})(e,s,l,o,c);break;case F.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const s=mh.getIn(e[t],n,[]);s.splice(r,1),mh.setIn(e[t],n,s),Tn.deleteListNode(t,n,s.length)})(e,s,l,o);break;case F.LIST_ACTIONS.MOVE:((e,t,n,r,s)=>{const a=mh.getIn(e[t],[...n,r],{}),o=mh.getIn(e[t],n,[]);o.splice(r,1),o.splice(s,0,a),mh.setIn(e[t],n,o),Gn(e,t,n?.join("."),r,s)})(e,s,l,o,i);break;case F.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const s=mh.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:a,listIndex:o}=e;if(r===F.LIST_ACTIONS.SELECT){s[o]=a;const e=n?.join(".");dr(t,e)}else delete s[o]})),mh.setIn(e[t],n,s.filter(Boolean))})(e,s,l,r);break;case F.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{mh.setIn(e[t],n,[])})(e,s,l)}}return e})),lm=[Zf,Qf,im,cm],um=(e,t)=>(e||(e=fm().data),t.type===Je?fm().data:(lm.forEach((n=>{e=n(e,t)})),e)),dm=(e,t=[])=>{t.forEach((t=>{mh.deleteIn(e,[t])}))},pm=(e,t)=>{const{type:n,payload:r}=t,s=n===ve,{target:a,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:h="",clearView:g=!1}=r;return c?mh.setIn(e,[a,"items",l,"view"],c):g&&mh.deleteIn(e,[a,"items",l,"view"]),o&&mh.setIn(e,[a,"items",l,"context"],o),d&&mh.setIn(e,[a,"items",l,"flowName"],d),(!s||s&&h)&&mh.setIn(e,[a,"items",l,"key"],h.trim()),(!s||s&&i)&&mh.setIn(e,[a,"items",l,"semanticURL"],i),(!s||s&&p)&&mh.setIn(e,[a,"items",l,"resourceType"],p),dm(e,u),e},hm=(e,t)=>(e||(e=fm().containers),t.type===Je?fm().containers:Wf(e,(e=>{switch(t.type){case Ee:{const{context:n,name:r,type:s,actionMgrID:a}=t.payload,o=`${n}/${r}`;let i=null;return on.resolveActionByID(a,null,!1),e[o]?e:(i={type:s,accessedOrder:[],items:{}},mh.setIn(e,[o],i),e)}case Le:{const{containerName:n,childContainers:r=[]}=t.payload;return mh.deleteIn(e,[n]),r.forEach((t=>{mh.deleteIn(e,[t])})),e}case Ae:{const{context:n,name:r,actionMgrID:s,childContainers:a}=t.payload,o=`${n}/${r}`;return on.resolveActionByID(s,null,!1),mh.setIn(e,[o,"accessedOrder"],[]),mh.setIn(e,[o,"items"],{}),Array.isArray(a)&&a.forEach((t=>{mh.deleteIn(e,[t])})),e}case _e:{const{target:n,context:r,isInCreateStage:s,isBulkAction:a,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:h,isMinimizable:g,showProgress:f,progressMessage:m,modalOptions:y,resourceStatus:I,actionID:E,isMultiRecordData:A,acTertiary:_,parentContext:S,heading:C,isTraditionalRemoteCase:T}=t.payload,N=e[n],P=N&&N.type,D=N&&N.accessedOrder||[],R=N&&N.items||{};let b=null;return e[n]&&"single"===P&&D.length>0?pm(e,t):(b={accessedOrder:[...D,c],items:{...R,[c]:{view:i,semanticURL:o,key:u,flowName:d,context:r,isInCreateStage:s,resourceType:p,actionName:h,isMinimizable:g,...a&&{isBulkAction:a},showProgress:f,progressMessage:m,modalOptions:y,isTraditionalRemoteCase:T,resourceStatus:I,...E&&{actionID:E},..._&&{acTertiary:_},...A&&{isMultiRecordData:A},...S&&{parentContext:S},heading:C}}},on.resolveActionByID(l,null,!1),e[n]=w()(e[n],b),e)}case ve:{const{actionMgrID:n,data:r}=t.payload;let s=e;try{s=pm(e,t),on.resolveActionByID(n,r,!1)}catch{on.rejectActionByID(n,!1)}return s}case we:return((e,t)=>{const{actionMgrID:n,data:r,target:s,containerItemID:a}=t.payload;let o=e;try{const i=e&&e[s]?.type;let c=e&&e[s]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,a]:c.includes(a)?c:[...c,a],mh.setIn(e,[s,"items",a,"transientItems"],[]),mh.setIn(e,[s,"accessedOrder"],c),o=pm(e,t),on.resolveActionByID(n,r,!1)}catch{on.rejectActionByID(n,!1)}return o})(e,t);case Oe:{const{target:n,containerItemID:r,actionMgrID:s}=t.payload;try{const t=mh.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),mh.setIn(e,[n,"accessedOrder"],t),on.resolveActionByID(s,null,!1)}catch{on.rejectActionByID(s,!1)}return e}case xe:case Se:{const{target:n,containerItemID:r,actionMgrID:s,childContainers:a}=t.payload;try{const t=mh.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));mh.setIn(e,[n,"accessedOrder"],t),mh.deleteIn(e,[n,"items",r]),dm(e,a),on.resolveActionByID(s,null,!1)}catch{on.rejectActionByID(s,!1)}return e}case Ce:{const{transientItemID:n,target:r,contextName:s}=t.payload,a=mh.getIn(e,[r,"items",s,"transientItems"])??[];return mh.setIn(e,[r,"items",s,"transientItems"],[...a,n])}case Pe:{const{target:n,containerItemID:r}=t.payload;return mh.deleteIn(e,[n,"items",r,"transientItems"]),e}case Ne:{const{target:n,transientItemID:r,containerItemID:s}=t.payload,a=(mh.getIn(e,[n,"items",s,"transientItems"])??[]).filter((e=>e!==r));return mh.setIn(e,[n,"items",s,"transientItems"],a)}default:return e}})));let gm={};const fm=()=>gm,mm=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[F.CONTEXT_DATA]||e[F.CONTEXT_DATA];gm={data:{[F.APP.APP]:{...t,[F.CONTEXT_DATA]:r}},containers:{}}})(e),Vg({data:um,containers:hm}));function ym(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Bl(e),r=function(e,t){return"number"==typeof Gl(e)?e.pop():t}(e,1/0),s=e;return s.length?1===s.length?Pi(s[0]):function(e){return void 0===e&&(e=1/0),kl(fi,e)}(r)(Ui(s,n)):ql}const Im=(e,t)=>{e.data=e.data??{};const{assignments:n,availableActions:r=[]}=e.data.caseInfo??{};if(n&&Array.isArray(n)&&n.length>0&&n[0].actions&&Array.isArray(n[0].actions)&&!t?.stopMergeActions){n[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||r.push(e)})),e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.availableActions=r}},Em=(e,t)=>{if(e.confirmationLinks&&(e.data=e.data??{},e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return 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 n=e,{uiResources:{actionButtons:r,navigation:s},nextAssignmentInfo:a}=n;if(n.data&&n.data.caseInfo&&(r&&(n.data.caseInfo.actionButtons=r),s&&(n.data.caseInfo.navigation=s),t&&t[U.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions,Im(n,t),e.confirmationNote)){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}return t&&t.isCreateDataObject&&(n.data=n.data??{},n.data.dataInfo={},n.data.dataInfo.content=n.data.pyPortal,n.uiResources.root.config.context="dataInfo.content",n.uiResources.context_data.dataInfo=n.uiResources.context_data.dataInfo??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data.dataInfo.content??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data?.pyPortal,delete n.data.pyPortal,delete n.key),a&&(n.data=n.data??{},n.data.nextAssignmentInfo=a),n},Am={},{VIEW:_m,FIELD:Sm}=F.CONTEXT_TREE_NODE_TYPES,Cm=(e,t)=>{const{context:n}=e;e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag});const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if((e=>nc[e])(r)>0&&Am[r]){const t=[];Am[r].forEach(((n,r)=>{n.url===e.url&&(t.push(r),n.cancelConfig.cancel())})),t.forEach((e=>{Am[r].splice(e,1)}))}const s=hc();return e.signal=s.token,e.cancelConfig=s,Am[r]?Am[r].push(e):Am[r]=[e],uc(e.url,e,n,{cancelContext:r}).then((e=>(delete Am[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete Am[r],e}))},Tm=[(e,t)=>e.pipe(Fl(Nn.REFRESH_DATA,pt),Vl((e=>e.payload)),kl((e=>{const{context:n,contextData:r,options:s}=e,{propertyName:a="",classID:o=""}=s,i=Nc(n,{skipUUID:!1});let c=[],l=[],u=!1;ap.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:c=[],whens:l=[]}=Un(n)),u=l.some((e=>e.type===_m))):u=!0;const d=l.filter((e=>e.type===Sm)),p=mh.getPropertyName(a),h=p?p.split("."):[],g=h.pop(),f=h.join("."),m=[];if(f){const e=Rp(f,o);if(e&&"copy"===e.dataRetrievalType){const e=mh.getIn(i,`content.content.${f}`)||{};if(Object.keys(e).length>0){Object.keys(e).filter((e=>e!==g)).forEach((t=>{delete e[t],m.push(`${f}`)}))}}}e.serverPrecedenceFields=m;let y={...i.content,contextData:r};const I=Wc(n);mh.isEmpty(I)||(y=Bc(I,y));const E=((e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:s,fieldsWithWhen:a,isViewsWithWhen:o,interestPage:i,options:c}=e;let l={};const{optionalPayload:u}=c;u&&(t.content={...u});let d={...t},p=Nn.REFRESH;return r?(l=Ig(Nn.REFRESH_CASE_VIEW,e),d={...d,interestPage:i}):o&&n?l=Ig(Nn.REFRESH_CASE_DATA,e):o&&!n?l=Ig(Nn.REFRESH_ASSIGNMENT_DATA,e):(s.length>0||a.length>0)&&(d={...d,calculations:{fields:s,whens:a}},l=Ig(n?Nn.RECALCULATE_CASE_DATA:Nn.RECALCULATE_ASSIGNMENT_DATA,e),p=Nn.RECALCULATE),{restAPI:l,requestBody:d,requestType:p}})({...e,fieldsWithDeclarativeTargets:c,fieldsWithWhen:d,isViewsWithWhen:u},y);Pu.registerBlockingAction(n).catch((()=>{}));const{restAPI:A,requestBody:_,requestType:S}=E;(e={...e,requestType:S}).requestType=S;const{reqType:C,restApi:T}=A,N=t.value.data[n]?.caseInfo?.headers,P={reqHeaders:N,context:n,method:C,body:_,url:Ln(e,T)};return Ui(Cm(P,e)).pipe(Vl((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:Tc(t.headers)}))),Yl(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),kl((async e=>{if(e&&e.type===Ie)return Pu.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),vc(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:s,serverPrecedenceFields:a,requestType:o}=t,i=Fr.getTargetViewContainerName(Fe),c=gt(i,s),l={acName:c,context:s},u=Em(n,{[U.STOPMERGEACTIONS]:!0,[U.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===Nn.REFRESH&&await Dc(u,t,l);const d=Pc(u,{target:c,context:s});d.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=Ac.getPropertiesToReplace(s),h=Zh(Ph,d,{serverPrecedenceFields:a,propertiesToReplace:p});return zc.registerForServerChanges(),th(h),on.resolveActionByID(r,d),zc.unRegisterForServerChanges(),Pu.deRegisterBlockingAction(s).catch((()=>{})),[]})))],Nm=Tm,Pm=[e=>e.pipe(Fl(Qe),kl((async e=>{const{context:t}=e.payload,n={},r={},s=Object.keys(e.payload.datapages).map((s=>{const a=e.payload.datapages[s];if(a.mode===F.READONLY&&a?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=a?.refreshStrategy||{},n=rh()[a.name];if(n&&s in n){const r=n[s],{loadTime:a}=r;if(!nu.isTimeElapsed(a,e,t))return}}return nu.getData(a.name,{dataViewParameters:a.dataViewParameters},t).then((e=>{const t=a.mode===F.READONLY?r:n;t[a.name]?t[a.name][s]={pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[a.name]={[s]:{pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(s);const a=[];return Object.keys(n).length&&a.push(Ph({context:t,data:n})),Object.keys(r).length&&a.push(tg({data:r,context:t})),th(a),[]})))],Dm=Pm;class Rm{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";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>s.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{switch(e.data.action){case Rm.DISPLAY_DIRTY_POPUP:this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(kr.publish(F.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this));break;case Rm.LOAD_PREVIEW:this.loadPreview(e);break;case Rm.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case Rm.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case Rm.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case Rm.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case Rm.CLOSE_CONTAINER_ACTION:this.closeContainer(e)}}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){zu({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=zu({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",s=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(s,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:s}=e.data;let a=r;r===Rm.OPEN_WORK_ITEM&&(a=Rm.OPEN_WORK_BY_HANDLE),sp.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:a});zu({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),s,t)};openAssignment=e=>{const{pzInsKey:t,uniqueId:n}=e.data;n===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(t?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle",this.onCreateCallback.call(this,this.openAssignmentParams)),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${U.APP.APP}${F.FORWARD_SLASH_STRING}${U.PRIMARY}`;zu({meta:{},options:{context:hd(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${U.APP.APP}${F.FORWARD_SLASH_STRING}${U.PRIMARY}`;zu({meta:{},options:{context:hd(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),kr.subscribe(U.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),kr.subscribe(U.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{kr.unsubscribeAllWithEventType(U.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),kr.unsubscribeAllWithEventType(U.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:Rm.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:Rm.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:Rm.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const bm=new Rm,Om="nextAssignmentInfo",vm="nextAssignmentInfo.context",xm=e=>{const{containerName:t,isInCreateStage:n}=e;return n?F.MODAL:t||Fr.getTargetViewContainerName(Be)},wm=e=>{const t=mh.getIn(e,[F.DATA,F.CASE_INFO.CASE_INFO]);return Jt(t)&&Qt(ap.getOperatorIdentifier(),t)},Mm=[F.TOP_ACTION_LABEL.CREATEWORK,F.TOP_ACTION_LABEL.OPENASSIGNMENT,F.TOP_ACTION_LABEL.FINISHASSIGNMENT,F.TOP_ACTION_LABEL.OPENWORKBYHANDLE,F.TOP_ACTION_LABEL.SAVEANDCLOSE,F.TOP_ACTION_LABEL.SHOWDATA],Lm={getActionInfo:(e,t)=>{let n={};return Mm.includes(e)&&(n={topLevelAction:!0,actionLabel:e}),e===F.TOP_ACTION_LABEL.OPENASSIGNMENT&&(n.assignmentID=t),n}},Um=()=>({registerHeader:(...e)=>ec.registerHeader(...e),unRegisterHeader:(...e)=>ec.unRegisterHeader(...e),getRegisteredHeaders:()=>ec.getRegisteredHeaders()}),Fm=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:s={},responseType:a},o,i)=>{const{restApi:c,reqType:l}=Ig(e,n),u={method:l,headers:s,body:t,...a&&{responseType:a}};return r&&(u.signal=r.token),uc(c,u,o,i??{})},jm=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:s=!1},a)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return uc(e,{method:t,headers:r,body:n,withoutDefaultHeaders:s},a)},Vm=e=>sp.doesRestApiExist(e),km=()=>hc(),$m=e=>gc(e),Gm=e=>{lc(e)},Bm=()=>Wm;const Wm=class{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:s,viewType:a=Sc.PAGE,pageName:o,context:i=F.APP.APP,debugInfo:c,headers:l}=t;let u={};n&&n.content&&(u=n.content);const d={caseTypeID:e,content:{...u,...r},processID:s};let p={};return ap.getPerformanceDashboardVisibility()&&(p=Lm.getActionInfo(F.TOP_ACTION_LABEL.CREATEWORK)),Fm("createWork",{body:d,queryPayload:{caseClassName:e,viewType:a,params:{pageName:o}},headers:{...l,...c&&{...ec.addDebugHeaders(c)}}},i,p).then((t=>({response:t.data,requestPayload:d,headers:Tc(t.headers,e,l)})))}},Hm=(e,t)=>{const{class:n,context:r,viewType:s=Sc.PAGE}=e,{removeActionPayload:a}=t;let o=e?.pageName?e?.pageName:ap.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),Ui(Wm.createCase(n,{...e,pageName:o,viewType:s,context:r})).pipe(Vl((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Yl("Error occurred during ajax call at createWork Epic : ",r))},qm=e=>{kr.publish(F.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},zm=e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},Ym=e=>{let t=0,n=[],r="",s=!1;return e.pipe(Fl(Ch),Kl(100),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:n}=e,r=xm(e),a=gt(r,n),{continueExecution:o,removeActionPayload:i}=(e=>Id(e)?{continueExecution:!0,removeActionPayload:{}}:Uc(e))(a);return s=os(e.class),o?(e.isTraditionalUICase=s,Hm(e,{removeActionPayload:i})):(on.rejectActionByID(t),zl())})),kl((async e=>{if(e&&e.type===Ie)return e.payload.context=Gd(),n.push(vc(e)),n;const{actionInPayload:a,response:o,headers:i,removeActionPayload:c}=e;let l;l=!(a.renderInline||ap.getDefaultCasePage()||s)&&wm(o),mh.setIn(o.data,"caseInfo.isFirstAssignment",!0);const u=xm({...a,isInCreateStage:l}),d=gt(u,a.context),p=wc(d,u,a.context);if(!qr(u)&&Id(d)){const{continueExecution:e}=Uc(d);if(!e)return on.rejectActionByID(t),zl()}if(!(a?.openCaseViewAfterCreate??!0)&&!l){const e=mh.getIn(o.data,"caseInfo.content");r=`${e.pyID} ${ip.getLocaleValue("has been created.","Assignment")}`;const t=es(o),s=Jr(o);return qm({toastMessage:r}),zm({caseId:`${e.pyID}`,assignmentId:t,caseType:s}),n}const h=Em(o);let g=mg("createWork",{caseClassName:Jr(h)});g=g.replace(/{.+?}/,String(Xr(Zr(h)))),h.semanticURL=g,((e,t)=>{const n=wm(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:s}=t;mh.setIn(e,["directUrlUpdation"],(!n||s)&&!r)})(h,a);const f={acName:d,context:p};await Dc(h,a,f);const m={target:d,context:p,containerItemID:p,headers:i,semanticURL:g,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?F.REVIEW_MODE:F.PERFORM_MODE,assignmentContext:mh.getIn(h,vm),nextAssignmentInfo:mh.getIn(h,Om),resourceType:U.CASE,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo};rs(m,h);const y=Pc(h,m);s&&(y.data.caseInfo.content.coexistenceAction="openAssignment");const I=xc(d,y);return Mc(I)&&ts(n,{removeActionPayload:c,target:d}),n.push(I),Vc(n),n})),Vl((()=>{const e=is(),a=Jt(mh.getIn(n[0]?.payload,"data.caseInfo"));return s&&e&&a?bm.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Gc,n):Gc(n),as(n,t),r="",n=[],n})))},{RESOURCE_TYPES:Km}=U,Xm=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:s,isChild:a}=e,o=Kr(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?Sc.PAGE:n||(!Hr(r)&&!Hr(s)||a?Sc.PAGE:Sc.FORM)},Jm=(e,t,n,r,s)=>{if(ts(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=ld(t);let r=null;return n&&(r=td(t,n)),r?.key===e&&Ed(t)})(r.key,n))r.context=hd(n),r.containerItemID=r.context,e.push(Zh(Kh,r));else if((s?.isChild||s?.isRemote)&&s?.isMultiDoc){const t=Dd(s.context);r.target=t,r.context=s.context,r.containerItemID=s.context,e.push(Zh(Kh,r))}else{const t=Dd(r.context),n=od(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(Zh(Kh,r))):e.push(Zh(Mh,r))}},Qm=(e,t,n,r,s,a,o)=>{Id(t)&&Ad(t)?((e,t,n,r,s)=>{Xm(e,t)===Sc.FORM?(n.caseViewMode=r||F.PERFORM_MODE,s.push(Zh(kh,n))):s.push(Zh(Kh,n))})(r,s,e,a,n):Jm(n,o,t,e,r)},Zm=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:s,isGetNextWork:a,doNotMergeMessagesForStatusCode:o,assignmentID:i})=>{let c={};return ap.getPerformanceDashboardVisibility()&&(c=Lm.getActionInfo(F.TOP_ACTION_LABEL.OPENASSIGNMENT,i)),uc(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...ec.addDebugHeaders(r)}}},s,{doNotMergeHttpMessagesForStatusCode:a?o:"",...c})},ey=(e,t)=>{const n=Xm(e),{headers:r,context:s,assignmentID:a,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e,{restApi:h,reqType:g}=o?Ig("getNextWork",{viewType:n}):c?Ig("openStage",{caseID:u,stageID:l}):Ig(Ge,{assignmentID:a,viewType:n}),{removeActionPayload:f}=t,m=ap.getDefaultCasePage();let y="",I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),y=m?`${h}?viewType=${n}&pageName=${m}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{y+=`&${e}=${d[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=Tc(t,e.remoteClassName)),t})(e);return Ui(Zm({restUrl:y,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404",assignmentID:a})).pipe(Vl((e=>{if(ap.isCoexistenceAppOfType(F.APP_TYPE.UIKIT)&&!p){return Jt(e.data.data.caseInfo)?e:(y=y.replaceAll(I,"pyDetails"),ap.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:y})}return e})),kl((e=>e?.isReloadWithDifferentViewTypeRequired?Zm({restUrl:y,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404",assignmentID:a}):Wl(e))),Vl((t=>{const{key:s,flowName:o}=bc(a);return{response:{...t.data,key:s,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:Tc({...r,...t.headers})}})),Yl("Error occurred during ajax call at openAssignment Epic : ",s))},{RESOURCE_TYPES:ty}=U,ny=e=>{let t=0,n=[];const r=[];let s=!1,a=!1;return e.pipe(Fl(Ol),Vl((e=>(({actionMgrID:t}=e.payload),{...e.payload,insKey:e.payload.assignmentID}))),kl((e=>{s=e.isGetNextWork;const{context:n}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Sc.FORM:Xm(e),e.viewType=r;const o=Br(Ge,e),i=gt(o,n),{activate:c,activateContainerActionPayload:l}=jc(ty.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return Wl({type:Oe,activateContainerActionPayload:l,actionInPayload:e});const u=ld(i);let d;d=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:u?Uc(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=d;return p?(a=os(e.className),e.isTraditionalUICase=a,ey(e,{removeActionPayload:h})):(on.rejectActionByID(t),zl())})),kl((async e=>{if(e?.type===Ie){if(s){const{payload:t}=e,{err:n}=t,s=n.response.status;r.push({status:Number(s)})}return n.push(vc(e)),n}const{type:t,actionInPayload:o,response:i,viewType:c,headers:l,removeActionPayload:u,activateContainerActionPayload:d}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=Ol,r=i?.data?.caseInfo?.ID;o.isOpenStage=!0,o.stageID=e,o.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const s={type:t,payload:{...o,caseID:r,headers:l}};return n.push(s),n}const{context:p,caseViewMode:h,debugInfo:g}=o;let f=((e,t)=>{const n=Kr(e);let r;r=!ap.getDefaultCasePage()&&Jt(n);const{isChild:s,containerName:a}=t,o=s&&r,i=r&&!t.isActionFromToDoList;return o||i?F.MODAL:a||Br(Ge,t)})(i,o);a=os(i?.data?.caseInfo?.caseTypeID),o.isTraditionalUICase=a,a&&(f=o.containerName);const m=gt(f,p);if(t===Oe)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:s,isParallelAssignment:a,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=pd(s);await Dc({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:u}),e.push(Zh(Wh,{containerItemID:s,target:i,isParallelAssignment:a,insKey:o,resourceType:Km.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(n,d,{actionInPayload:o,target:m}),Vc(n),n;const y=i?.data?.caseInfo?.content,I=i?.uiResources?.root?.config?.name;y&&!y.pyViewName&&I&&"page"!==o.viewType&&mh.setIn(y,"pyViewName",I);const E=Em(i);((e,t)=>{const n=Kr(e),r=Zr(e),s=Jt(n),{skipBrowserSemanticUrlUpdate:a=!1,viewType:o,isTraditionalUICase:i}=t,c=o===Sc.PAGE&&(!s||i)&&!a,{caseTypeID:l}=n;if(c){const t=mg($e,{caseClassName:l}).replace(/{.+?}/,String(Xr(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(E,o);const A=wc(m,f,p),_={acName:m,target:m,context:A};await Dc(E,o,_);const S={target:m,context:A,containerItemID:A,headers:l,parentContext:B(o?.context),isMinimizable:Jt(mh.getIn(E,"data.caseInfo")),doDeleteCaseSummary:o.doDeleteCaseSummary,acTertiary:o.acTertiary,resourceType:U.CASE,debugInfo:g};rs(S,E,{skipFlowNameUpdate:o?.caseViewMode===F.REVIEW_MODE});const C=Pc(E,S);return o.isProcessAction&&(C.data.isProcessAction=o.isProcessAction),a&&(C.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(o,C),Qm(C,m,n,o,i,h,u),c===Sc.FORM&&ns(C.containerItemID)&&$c(C,n),Vc(n),(e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:o.assignmentID,caseKey:C.key}),n})),Vl((()=>{const e=t,s=is(),o=Jt(mh.getIn(n[0]?.payload,"data.caseInfo"));return a&&s&&o?bm.postCreateCaseMessage(n[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,th,n):th(n),as(n,e,r),n[0]?.payload?.isParallelAssignment&&th({type:Ol,payload:{...n[0].payload,isParallelCall:!0}}),n=[],n})))},ry=(e,t)=>{const{insKey:n,headers:r,context:s,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:ap.getDefaultCasePage(),l=Ig($e,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`);let p={};return ap.getPerformanceDashboardVisibility()&&(p=Lm.getActionInfo(F.TOP_ACTION_LABEL.OPENWORKBYHANDLE)),Ui(uc(u,{method:d,headers:{...r,...a&&{...ec.addDebugHeaders(a)}}},s,p)).pipe(Vl((t=>({response:t.data,actionInPayload:e,headers:Tc({...r,...t.headers}),removeActionPayload:i}))),Yl("Error occurred during ajax call at openWorkByHandle Epic : ",s))},sy="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:ay}=U,oy=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:s,type:a,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=r,p=Br($e,r),h=gt(p,l);if(a===Oe)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:s,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Br($e,s),l=gt(c,a),u=pd(r);await Dc({directUrlUpdation:!o,semanticURL:n},s,{acName:l,containerName:c,target:l,context:u}),e.push(Zh(Wh,{containerItemID:r,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:r});else{const e=wc(h,p,l,{buildNew:!0}),s=Em(o),a=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,s=Zr(e),a=n?r:Jr(e);let o=mg($e,{caseClassName:a});return o=o&&o.replace("{workID}",String(Xr(s))),o})(s,r);s.semanticURL=a,s.directUrlUpdation=!u;const g={acName:h,context:e};await Dc(s,r,g);const f=Pc(s,{target:h,context:e,containerItemID:e,semanticURL:a,headers:c,debugInfo:d});f.caseViewMode=F.REVIEW_MODE,f.resourceType=ay.CASE,n&&(f.data.caseInfo.content.coexistenceAction="openWorkByHandle"),rs(f,s,{skipFlowNameUpdate:!0});const m=xc(h,f);i.containerItemID&&Mc(m)&&t.push(Zh(qh,{containerItemID:i.containerItemID,target:h})),t.push(m)}Vc(t);(e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)})({caseKey:r.insKey,actionInContext:l})},iy=e=>{let t=0,n=[];return e.pipe(Fl(sy),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:n,isChild:r,viewType:s}=e,a=Br($e,e),o=gt(a,n);let i,c=!0;if("none"!==s){const e=Uc(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return on.rejectActionByID(t),zl();const{activate:l,activateContainerActionPayload:u}=jc(ay.CASE,o,e);return l&&!r&&"none"!==s?Wl({type:Oe,activateContainerActionPayload:u,actionInPayload:e}):ry(e,{removeActionPayload:i})})),kl((async e=>{if(e&&zr(e.type))return n.push(vc(e)),n;const t=nh(e?.actionInPayload?.context),r=os(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Em(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:nt,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r&&s.data.caseInfo?.content&&(s.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(Zh(Ph,s));const a=Dd(e?.actionInPayload?.context),o=Wr(e?.actionInPayload?.context),i=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(ns(e?.actionInPayload?.context)){const t=Pc(e?.response,{...i});$c({...t,isArrayDeepMerge:!0},n)}}}else await oy(e,n,r);return n})),Vl((()=>(th(n),as(n,t),n=[],n))))},cy="FINISH_ASSIGNMENT",{RESOURCE_TYPES:ly}=U,uy=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r}=t,s=pd(n),a=`${s?.includes("root")?F.APP.ROOT:F.APP.APP}/${Qu.MODAL}`;e.push(Zh(qh,{containerItemID:n,context:s,target:a,skipReleaseLockRequest:r}))},dy=e=>ah(".openCaseViewAfterCreate",F.CONTEXT_DATA,e)??!0,py=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r)=>{const{caseID:s}=n,a=(o=t,mh.getIn(o,Gr.NEXT_ASSIGNMENT_INFO_ID,F.EMPTY_STRING));var o;const i=Jr(t),{caseViewMode:c,headers:l,semanticURL:u,actionMgrID:d,directUrlUpdation:p,key:h,flowName:g,resourceType:f}=r;(e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:s,assignmentId:a,caseType:i}),uy(e,{...n,skipReleaseLockRequest:!0});const m=`${n?.containerItemID.includes("root")?F.APP.ROOT:F.APP.APP}/${Qu.PRIMARY}`,y=wc(m,Qu.PRIMARY),I=ec.getCoreHeadersFromContext(n.context)||!1,E=Pc(t,{target:m,context:y,containerItemID:y,caseViewMode:c,headers:l,semanticURL:u,key:h,flowName:g,resourceType:f,directUrlUpdation:p,debugInfo:I&&I.debugInfo&&{debugId:I.debugInfo[F.COREHEADER_APP_DEBUG_ID]}});if(Id(m)){const t=nh(y),s=Zr({data:t}),[,a]=s?s.split(" "):[],o=`You will lose unsaved changes for ${a}. Do you want to continue?`;if(!dy(n.context))return e;{const{continueExecution:t}=Uc(m,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,on.rejectActionByID(d),zl();e.push(Zh(Kh,E))}}else e.push(Zh(Mh,E));return t.directUrlUpdation=p,t.semanticURL=u,await Dc(t,{...E,acName:m},{acName:m,context:y}),e},hy=e=>/^app\/preview_[0-9]*/g.test(e),gy=(e,t)=>{const n=B(e);return!hy(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},fy=async(e,t,n,r,s,a,o,i,c)=>{const{headers:l}=c;if(e){const u=Id(Dd(e));let d=!1;const p=Dd(n),h=ed(p),g=ld(p);g&&h?.items?.[g]?.key===c?.actionInPayload?.caseID&&(d=!0),uy(s,{...r,skipReleaseLockRequest:!0});const f=Wr(e),m={target:Dd(e),containerItemID:e,context:e,containerName:f};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const y=K(n),I=nh(y),E=nh(r.context),A=I?.caseInfo?.ID,_=E?.caseInfo?.ID;if(u&&A===_||!u&&""===o)s.push(Zh(kh,{...t,key:o,resourceType:"",...m}));else if(a){const a=Dd(e),i=od(a,o);if(i)m.target=a,m.context=i,m.containerItemID=i,s.push(Zh(kh,{...t,key:o,resourceType:"",...m}));else{const e=fd(n)[0];if(r.target=e,r.context=wc(e,F.WORKAREA,n),r?.context){r.containerItemID=r.context,s.push(Zh(Mh,{...r,...t}));const n=r.containerItemID;s.push(Zh(Wh,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=Dd(e),r.containerName=Wr(e),r.context=e,r.containerItemID=e,mh.setIn(t,"acName",m.target),await Dc(i,t),d){const{data:e,caseViewMode:r}=t;n.includes(F.WORKAREA)&&ns(n)&&(n=K(n));const a={data:e,caseViewMode:r,context:n};mh.setIn(a.data,["context_data","caseViewMode"],r),s.push({type:nt,payload:{context:n}}),s.push(Zh(Ph,a))}if(!a&&t.caseViewMode===F.PERFORM_MODE){const t=((e,t)=>{const n=Dd(e);return od(n,t)})(e,o),n={data:{caseInfo:{headers:l}},context:t};s.push(Zh(Ph,n)),s.push(Pn(((e,t=!1,n=!1)=>{const r=on.getNextActionMgrId();return{ID:Ah.getPropertyValue(U.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Ah.getPropertyValue(U.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{uy(s,r);let e=!1;const o=Dd(n),i=ed(o),l=ld(o);if(l&&i?.items?.[l]?.key===c?.actionInPayload?.caseID&&(e=!0),a){const e=fd(n)[0];r.target=e,r.context=wc(e,F.WORKAREA,n),r.containerItemID=r.context,s.push(Zh(Mh,{...r,...t}));const a=r.containerItemID;s.push(Zh(Wh,{parentContainerTarget:e,containerItemID:a}))}if(e){const{data:e,caseViewMode:r}=t,a={data:e,caseViewMode:r,context:n};mh.setIn(a.data,["context_data","caseViewMode"],r),s.push({type:nt,payload:{context:n}}),s.push(Zh(Ph,a))}}},my=async(e,t,n,r,s)=>{((e,t,n)=>{if(t.isProcessAction&&(uy(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?F.APP.ROOT:F.APP.APP}/${Qu.PRIMARY}`,s=wc(r,Qu.PRIMARY),a={insKey:e.ID,className:e.content.classID,context:s,acTargetName:F.PRIMARY,isChild:!0},o={type:le,payload:{...a}};n.push(o)}})(e.data.caseInfo.parentCaseInfo,t,s);const a=e?.data?.caseInfo?.parentCaseInfo?.ID;if(a){const n=Dd(t?.context),r=td(n,t?.context)?.parentContext,s=Dd(r);t?.isProcessAction&&ad(s,a)&&Wd(r,e?.data?.caseInfo?.lastUpdateTime)}n.resourceType=ly.CASE,n.directUrlUpdation=!0,t.isProcessAction||await py(s,{translatedDXAPIResponse:r,actionInPayload:t},n)},yy=async(e,t,n,r,s)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===F.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:a}=t,o=Ac.getPropertiesToReplace(a);s.push(Zh(kh,{...e,...r,propertiesToReplace:o})),mh.setIn(e,"acName",r.target),await Dc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:s}=t,a=pd(s);if(a&&ns(s)){const t=K(a),o={data:n,caseViewMode:r,context:t};mh.setIn(o.data,["context_data","caseViewMode"],r),e.push({type:nt,payload:{context:t}});const i=Ac.getPropertiesToReplace(s);e.push(Zh(Ph,o,{propertiesToReplace:i}))}})(s,t,e)},Iy=async(e,t,n,r,s,a,o,i)=>{const{isCaseWideAction:c,isInCreateStage:l,containerItemID:u}=e,d=B(e.context),p=Qr(s),h=Jr(s),g=l&&!p&&!c,f=fd(d)[0],m=f?ld(f):d,y=Wr(u),I=pd(u),E=Object.freeze({target:e.target,containerItemID:u,context:I,containerName:y});g&&!hy(e.context)?await my(i,e,t,s,a):gy(e.context,m)?await fy(m,t,d,e,a,n,r,s,o):c&&!gy(e.context,m)?(uy(a,e),((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,a=B(r),o=pd(a);e.push(Zh(Rh,{containerItemID:a,context:o,container:Qu.PREVIEW,containerName:Qu.PREVIEW,caseId:s,viewName:U.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(a,e,{caseClassName:h})):await yy(t,e,s,E,a)},Ey=(e,t)=>{const{assignmentID:n,actionID:r,caseID:s,context:a,additionalHeaders:o={},isCaseWideAction:i,outcome:c,jsActionQueryParams:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:s}=e;return t&&r&&!s?Sc.PAGE:n||Sc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?ze:"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:s,viewType:d};let{restApi:g}=Ig(p,h),{reqType:f}=Ig(p,h);d&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),c&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${c}`:`${g}?outcome=${c}`),g=((e,t)=>(e&&Object.keys(e).forEach((n=>{t+=`&${n}=${e[n]}`})),t))(l,g),i&&(f="PATCH"),e.viewType=d;const{content:m,attachmentsExist:y}=Nc(a);e.attachmentsExist=y;const I=u.value.data[a]?.caseInfo?.headers||{},{etag:E}=I,A={"if-match":E,...o};let _={};return ap.getPerformanceDashboardVisibility()&&(_=Lm.getActionInfo(F.TOP_ACTION_LABEL.FINISHASSIGNMENT)),Ui(uc(g,{method:f,body:m,headers:A},a,_)).pipe(Vl((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Tc({...A,...r})}})),Yl("Error occurred during ajax call at finishAssignment Epic : ",a))},{RESOURCE_TYPES:Ay}=U,_y=(e,t)=>{let n=0,r=[],s={},a="";return e.pipe(Fl(cy),jl((e=>{const o=ap.isCoexistenceAppOfType(F.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),a=e.payload.context,Wn({context:a,stateObj:nh(a),clearContextMessages:!0}),!al(a)){const t={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return on.rejectActionByID(n,!0,t),Pu.handleDeferredActionCompletion(e.payload.context),Wl([])}return Wl(e.payload).pipe(kl((e=>{((e,t)=>{const{containerItemID:n,context:r,actionMgrID:s,isInCreateStage:a,isModalAction:o}=t;if(a&&o){const t=Wr(n),a=gt(t,r);e.push(Zh(Wh,{containerItemID:n,target:a,actionMgrID:s}))}})(r,e);const n={...e};return Ey(n,{state$:t})})),kl((async e=>{if(e&&e.type===Ie){(e=>{const t=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],n=e?.payload?.err?.response?.status;if(t&&424===n){Array.isArray(t)&&t.length>0&&t.forEach((e=>{e.isErrorButton=!0}));const n=e.payload.context,r=nh(n),s=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(t,r?.caseInfo?.actionButtons?.secondary||[]),a={data:{caseInfo:{actionButtons:{secondary:s}}},target:Dd(n),context:n};th({type:ge,payload:a})}})(e);const t=vc(e);return r.push(t),r}Cu.clearContextedCache(a);const{headers:t,actionInPayload:i,response:c}=e,{containerItemID:l,context:u=pd(l),isModalAction:d,isInCreateStage:p}=i,h=Dd(l);i.target=h;const g=Wr(l),f=Object.freeze({target:i.target,containerItemID:l,context:u,containerName:g});mh.setIn(c.data,"caseInfo.isFirstAssignment",!1),mh.setIn(c.data,F.CASE_INFO_IS_LOCAL_ACTION,!1),c?.uiResources?.root?.config?.name&&"page"!==i.viewType&&mh.setIn(c.data,"caseInfo.content.pyViewName",c?.uiResources?.root?.config?.name),(e=>{kr.publish(F.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)})({submitResponse:c});let m=Em(c,{[U.STOPMERGEACTIONS]:!c.nextAssignmentInfo});const y=Jr(m),I=B(i.context),E=fd(I)[0]?ld(fd(I)[0]):I,A=Qr(m),_=p&&!A;!d||p||gy(i.context,E)||(m=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(m,nh(l)));const S=Pc(m,{headers:t,actionMgrID:n,directUrlUpdation:!1});let C,T;ss(S.data,i),S.caseClassName=y,S.resourceType=Ay.ASSIGNMENT,S.headers=t;const N=m?.data?.caseInfo?.assignments?.some((e=>e.ID===i.assignmentID)),P=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(m,i),D=((e,t,n,r,s)=>{let a;const o=Dd(t);return a=Ed(o)?od(o,n.data?.caseInfo?.ID):ld(o),r&&e&&oh(null,F.CASE_VIEW_MODE_PROP,a)===F.PERFORM_MODE&&s})(N,E,m,d,P),R=i?.actionID===U.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;m?.data?.nextAssignmentInfo&&!R?(S.caseViewMode=F.PERFORM_MODE,C=Zr(m),T=!0):D&&!R?(S.caseViewMode=F.PERFORM_MODE,C=Zr(m),S.flowName=" ",S.deleteAssignmentSpecificResources=!1,T=!1):(S.caseViewMode=F.REVIEW_MODE,C="",T=!1);const b=Zr(m);rs(S,m,{skipFlowNameUpdate:S?.caseViewMode===F.REVIEW_MODE||D});const O=mg("createWork",{caseClassName:y}).replace(/{.+?}/,String(Xr(b)));if(m.semanticURL=O,S.semanticURL=O,d?(await Iy(i,S,T,C,m,r,e,c),_&&(s=(e=>{if(!dy(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}})(i))):p&&o&&!A?(ap.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:Qu.PRIMARY,targetContainerName:Qu.PRIMARY,viewType:Sc.PAGE,isLastStepInCreateStage:!0,context:n},s={type:he,payload:{...r}};t.push(s)})(c,r,B(u))):await yy(S,i,m,f,r),cs(e,r),Pu.handleDeferredActionCompletion(a),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:s,caseID:a}=t,o=gy(t.context,n),i=e?.data?.caseInfo?.stages||[],c=e?.data?.caseInfo?.stageID;$r({caseID:a,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:s,stages:i,stageID:c})})(S,i,E),!m?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:s}=t;return{isCaseWideAction:n,caseID:Zr(e),assignmentID:n?null:r,actionID:n?s:null}})(m,i);(e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:l})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===we));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const s=zh({target:n,containerItemID:r});s.payload.transientItems.length&&e.push(s)})(r,{transientItemID:l,target:h,isModalAction:d}),r})),Vl((()=>{const e=r.find((e=>e.type===Ie));return e?(Pu.handleDeferredActionCompletion(a),(e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[F.ERROR_FIELD_IN_PAGE]=e[F.ERROR_FIELD_IN_PAGE].replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[F.ERROR_FIELD_IN_PAGE].slice(1),r=e[F.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(r){let s=t?`caseInfo.content.${t}`:"caseInfo.content";s=s.replace(/\(/g,"[").replace(/\)/g,"]");const a=Vn(r,s,F.PROPERTY),o={type:U.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};Tn.mutateField(n,s,a[a.length-1],{messages:[o],type:U.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:a[a.length-1]})}}))})(e),on.rejectActionByID(n)):on.resolveActionByID(n,s),Gc(r),r=[],s={},r})))})))},Sy="CANCEL_ASSIGNMENT",Cy=e=>{const t={},{routeKey:n,isModalAction:r,caseID:s,context:a,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=Ig(i,{ID:s,caseID:s,viewType:Sc.PAGE});return Qi.getPreviewMode()&&(t[F.SKIPCOREHEADERS]=!0),Ui(uc(c,{method:l,headers:t},a,{includeRemoteSystemIdIfPresent:!!o})).pipe(Vl((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:Tc(t.headers)})),Yl(": Error occurred during ajax call at release lock request : ",a))},Ty=(e,t)=>{const{isModalAction:n}=t;return Cy({routeKey:"cancelAssignment",isModalAction:n,...e})},Ny=e=>{let t=0,n=[];return e.pipe(Fl(Sy),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{isModalAction:n}=e;e.context||(e.context=pd(e.containerItemID));const{context:r}=e,s=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?Qu.MODAL:Wr(n)})(e),a=gt(s,r),{continueExecution:o}=Uc(a);return o?(e.RemoteSystemID=k.getRemoteHeaderByContext(e.context)??void 0,Ty(e,{isModalAction:n})):(on.rejectActionByID(t),zl())})),kl((async e=>{if(e&&e.type===Ie)return n.push(vc(e)),n;const{actionInPayload:r,response:s}=e,{containerItemID:a,isModalAction:o,isInCreateStage:i}=r,c=Dd(a),l=pd(a),u={target:o?`${F.APP.APP}/${F.MODAL}`:c,containerItemID:a,caseViewMode:o?F.PERFORM_MODE:F.REVIEW_MODE,context:l,actionMgrID:t,key:Zr(s),skipReleaseLockRequest:!1};return i&&n.push(Zh(kh,u)),!o&&ns(a)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r}=t,s=B(n),a={context:pd(s),data:{context_data:{caseViewMode:r}}};e.push(Zh(Ph,a))})(n,{childContainerItemID:a,caseViewMode:F.REVIEW_MODE}),u.skipReleaseLockRequest=!0,n.push(Zh(qh,u)),n})),Vl((()=>(th(n),as(n,t),n=[],n))))},Py="NAVIGATE_TO_STEP",Dy=(e,t)=>{const{ID:n,stepID:r,containerItemID:s,context:a=pd(s),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?Sc.PAGE:Sc.FORM},{restApi:l,reqType:u}=Ig("navigateToStep",c),{content:d}=Nc(a),p=i.value.data[a].caseInfo.headers;return Ui(uc(`${l}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},a)).pipe(Vl((t=>({response:t.data,actionInPayload:e,headers:Tc({...p,...t.headers})}))),Yl("Error occurred during ajax call at navigateToStep Epic : ",a))},{RESOURCE_TYPES:Ry}=U,by=(e,t)=>{let n=0,r=[];return e.pipe(Fl(Py),jl((e=>(({actionMgrID:n}=e.payload),Wl(e.payload).pipe(kl((e=>(Yn(e.context),Dy(e,{state$:t})))),kl((async e=>{if(e&&zr(e.type))return r.push(vc(e)),r;const{actionInPayload:t,response:n,headers:s}=e,{containerItemID:a,context:o=pd(a),isModalAction:i}=t;Cu.clearContextedCache(t.context);const c=Dd(a),l=Wr(a),u=Object.freeze({target:c,containerItemID:a,context:o,containerName:l}),d=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name;d&&!d.pyViewName&&p&&"page"!==t.viewType&&mh.setIn(d,"pyViewName",p);const h=Em(n),g={acName:c,...u};await Dc(h,t,g);const f=Pc(h,{...u,headers:s});f.doDeleteCaseSummary=t.doDeleteCaseSummary,f.resourceType=Ry.ASSIGNMENT,rs(f,h),ss(f.data,t);const m=h.data?.caseInfo?.stages,y=h.data?.caseInfo?.stageID;return $r({caseID:Zr(h),isModalAction:i,stages:m,stageID:y}),ns(a)&&$c(f,r),r.push(Zh(kh,f)),Vc(r),r})),Vl((()=>(th(r),as(r,n),r=[],r))))))))},Oy=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:s}=Ig("deleteCaseInCreateStage",{ID:t});return Ui(uc(r,{method:s},n)).pipe(Vl((t=>({response:t.data,actionInPayload:e,headers:Tc(t.headers)}))),Yl(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},vy=e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},xy=(e,t)=>{let n,r=0,s=[];return e.pipe(Fl(vl),Vl((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),kl((e=>e.ignoreCaseDeletion?Wl({actionInPayload:e}):Oy(e))),kl((async e=>{if(e&&zr(e.type)){const{payload:t}=e,n=vc({...e,...t,actionMgrID:r});return s.push(n),s}const{actionInPayload:n}=e,{context:a,isModalAction:o}=n,i=o?Qu.MODAL:Qu.PRIMARY,c=gt(i,a);if(!o&&c){const e={acName:c,target:c,context:a},r=t.value.containers[c],{semanticURL:s}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await Dc({directUrlUpdation:!0,semanticURL:s},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:F.PRIMARY,isChild:!0},t={type:le,payload:{...e}};s.push(t)}const l={target:c,containerItemID:a,context:a,caseDeleted:!0};return s.push(Zh(qh,l)),s})),Vl((()=>(th(s),as(s,r)===F.PROMISE_VALUE.RESOLVE&&vy({caseType:n}),s=[],s))))},wy=(e,t)=>{const{assignmentID:n,actionID:r,context:s}=e,{restApi:a,reqType:o}=Ig("save",{assignmentID:n,actionID:r}),{content:i}=Nc(s),c=t.value.data[s]?.caseInfo?.headers;let l={};return ap.getPerformanceDashboardVisibility()&&(l=Lm.getActionInfo(F.TOP_ACTION_LABEL.SAVEANDCLOSE)),Ui(uc(a,{method:o,body:i,headers:{"if-match":c&&c.etag}},s,l)).pipe(Vl((t=>({response:t.data,actionInPayload:e,headers:Tc(t.headers)}))),Yl(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",s))},My=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:s}=e;let a=[];return Wl(n.payload).pipe(kl((e=>wy(e,r))),kl((e=>{if(e&&zr(e.type))return Wl(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?F.APP.ROOT:F.APP.APP}/${Qu.PRIMARY}`,n=wc(t,Qu.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:F.PRIMARY,isChild:!0},s={type:le,payload:{...r}};a.push(s)}const{containerItemID:t}=e&&e.actionInPayload,r=B(t),s=Dd(r),o=ed(s),i=ld(s);if(n.payload.canUpdateAvailableActions&&Im(e.response),o?.items?.[i]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data}},s=Ac.getPropertiesToReplace(t);a.push(Zh(Ph,n,{propertiesToReplace:s})),a.push(Zh(kh,{context:t}))}return cs(e,a),e.actionInPayload.RemoteSystemID=k.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,Cy(e.actionInPayload)})),kl((async n=>{if(n&&zr(n.type)){const{payload:t}=n,r=vc({...n,...t,actionMgrID:s});a.push(r);const o=e.action.payload.modalLoadingContainer;if(o){const e=o.context,{context_data:t}=nh(e)||{};t?.isLoading&&Rd(e)}return a}const{actionInPayload:r}=n,{context:o,containerName:i}=r,c={target:gt(i,o),containerItemID:o,context:o};return t||a.push(Zh(qh,c)),a})),Vl((()=>(th(a),as(a,s),t||(a=[]),a))))},Ly=(e,t)=>{let n,r=0;return e.pipe(Fl(xl),jl((e=>{const{saveOnly:s}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return My({action:e,state$:t,actionMgrID:r,caseType:n},s)})))},Uy=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",kr.unsubscribe(F.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",kr.subscribe(F.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:Fy}=F,{RESOURCE_TYPES:jy}=U,Vy=(e,t)=>{const{actionID:n,assignmentID:r,caseID:s,context:a,openActionType:o,modalLoadingContainer:i}=e,{isProcessAction:c}=t,l=c?qe:(e=>{const t=e.localActionType.toLowerCase();return t===Fy.CASE_WIDE||t===Fy.EXPRESS?ze:He})(e),u=Sc.FORM,{reqType:d}=Ig(l,{caseID:s,ID:r,actionID:n,viewType:u});let{restApi:p}=Ig(l,{caseID:s,ID:r,actionID:n,viewType:u});e.actionType=l===ze?F.CASE:F.ASSIGNMENT,p&&!p.includes("viewType=")&&(p=p.includes("?")?`${p}&viewType=${u}`:`${p}?viewType=${u}`);const h=i?.context??a;return Ui(uc(p,{method:d,headers:{}},h)).pipe(Vl((t=>({response:t.data,actionInPayload:e,headers:Tc(t.headers)}))),Yl(`: Error occurred during ajax call at ${o} Epic : `,h))},ky=(e,t)=>{const{isProcessAction:n}=t,r=n?qe:He;e.openActionType=r;let s;if("modal"===Br(r,e)){s=fd(e.contextName)[0]?fd(e.contextName):Dd(e.contextName);const n=s?ld(s):e.contextName,r=pd(n),a=Br(e.openActionType,e),o=gt(a,e.context),i=Y(e.context,W(a,e.context));if(th(Mh({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:F.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:"caseInfo.content",type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}}})),th($h({context:i})),e.modalLoadingContainer={target:o,context:i},!fd(e.contextName)[0])return Vy(e,t);if(!e.continueExecution)return Vy(e,t);if(!Cl(r))return Vy(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return Ui([wl(e.saveActionPayload)]).pipe(kl((e=>(e=>{let t,n=0;const r=[],s={value:eh()?.getState()};return Wl(e).pipe(Fl(xl),jl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!a){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return on.rejectActionByID(n,!0,e),Wl([])}return My({action:e,state$:s,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),kl((n=>{if(1===n.length&&zr(n[0].type)){const{continueExecution:n}=Uc(s);if(!n)return on.rejectActionByID(e.actionMgrID),ql.pipe(Fi((()=>zl()))).toPromise();if(n)return Vy(e,t)}return Vy(e,t)})),Vl((e=>e)))}return Vy(e,t)},$y=async(e,t,{headers:n,actionInPayload:r})=>{const{context:s,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Em(e),u=Br(o,r),d=c?.target??gt(u,s);let p,h,g=!1;!Ad(d)||Ed(d)&&!ad(d,e.data.caseInfo.ID)?(h=W(u,s),qr(u)&&(h=Y(s,h)),p=h,g=!0):(p=Ed(d)?od(d,e.data.caseInfo.ID):ld(d),h=pd(p));const f={acName:d,target:d,containerName:u,context:h};await Dc(l,r,f);const m=l.uiResources?.root;let y;y=m?F.PERFORM_MODE:F.REVIEW_MODE;const I=Pc(l,{target:d,context:h,containerItemID:p,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:qr(u),resourceType:jy.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});m&&rs(I,l),qr(u)&&delete I.doDeleteCaseSummary,r.openActionType===Ye&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction="submitBulkAction",I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=r.selectedList);const E=g?Mh:kh;if(t.push(Zh(E,I)),g||t.push(Zh(Gh,I)),g){const s=fd(r.contextName),a=od(s,e.data.caseInfo.ID);if(a){const e={data:{caseInfo:{headers:n}},context:a};t.push(Zh(Ph,e))}}return p!==ld(d)&&t.push(Zh(Wh,{target:d,containerItemID:p})),ns(p)&&!c?.context&&$c(I,t),I.caseViewMode===F.REVIEW_MODE&&t.push(Zh(qh,I)),t},Gy="OPEN_LOCAL_ACTION",By=(e,t)=>ky(e,t),Wy=e=>{let t=0,n=[];return e.pipe(Fl(Gy),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>By(e,{actionMgrID:t}))),kl((async e=>{if(!e)return ql;if(zr(e.type)){const t=vc(e);n.push(t);const{context_data:r}=nh(e.payload.context)||{};return r?.isLoading&&n.push(Zh(Gh,e.payload)),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return mh.setIn(s,"data.caseInfo.activeActionID",a),mh.setIn(s.data,F.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&mh.setIn(s.data,F.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await $y(s,n,{headers:r,actionInPayload:t}),Uy(t),n})),Vl((()=>(th(n),as(n,t),n=[],n))))},Hy=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:s,bulkContextID:a="",bulkContextType:o=""}=e,i=Ye,{reqType:c,restApi:l}=Ig(i,{caseTypeID:s,actionID:t,bulkContextID:a,bulkContextType:o});return Ui(uc(l,{method:c},n)).pipe(Vl((t=>({response:t.data,actionInPayload:e,headers:Tc(t.headers)}))),Yl(`: Error occurred during ajax call at ${r} Epic : `,n))},qy=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",kr.unsubscribe(F.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",kr.subscribe(F.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},zy="OPEN_BULK_ACTION",Yy=e=>{let t=0,n=[];return e.pipe(Fl(zy),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Ye;const s=Br(Ye,e),a=gt(s,n),{continueExecution:o}=Uc(a);return o?Hy(e):(on.rejectActionByID(r),zl())})(e,{actionMgrID:t}))),kl((async e=>{if(e&&zr(e.type)){const t=vc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return mh.setIn(s,"data.caseInfo.activeActionID",a),await $y(s,n,{headers:r,actionInPayload:t}),qy(t),n})),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],n))))};var Ky=Array.isArray,Xy=Object.getPrototypeOf,Jy=Object.prototype,Qy=Object.keys;function Zy(e){if(1===e.length){var t=e[0];if(Ky(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Xy(r)===Jy){var n=Qy(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var eI=Array.isArray;function tI(e){return Vl((function(t){return function(e,t){return eI(t)?e.apply(void 0,Vo([],jo(t))):e(t)}(e,t)}))}function nI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return Wo(Gl(e))?e.pop():void 0}(e),r=Zy(e),s=r.args,a=r.keys,o=new yi((function(e){var t=s.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Pi(s[t]).subscribe(Oi(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(a?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(a,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(tI(n)):o}const rI=e=>{const{actionID:t,context:n,cases:r,classID:s}=e,{content:a}=Nc(n,{nonEmptyAndChangedData:!0});let o=5;try{const e=Fu.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===s))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,{reqType:l,restApi:u}=Ig("performBulkAction",{actionID:t}),d=[],p=i.length;for(let t=0;t<p;t+=c)a.cases=i.slice(t,t+c),a.cases.length&&d.push(Ui(uc(u,{method:l,body:a},n)).pipe(Vl((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Tc({...r})}})),Yl("Error occurred during ajax call at submitbulkaction Epic : ",n)));return nI(d)},sI=e=>{kr.publish(F.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},aI="SUBMIT_BULK_ACTION",oI=e=>{let t,n=0,r=[],s="";return e.pipe(Fl(aI),jl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return on.rejectActionByID(n,!0,e),Wl([])}return Wl(e.payload).pipe(kl((e=>(t=e,rI(t)))),kl((e=>{let n=0,a=0;const o=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),a+=Number(t.failureCount),a&&t.results.map((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),s=`${n} record(s) updated`,sI({submitResponse:e}),t.target=`${F.APP.APP}/${Qu.MODAL}`,r.push(Zh(qh,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),a&&r.push(Zh(Hh,{messages:[{type:"error",message:`${a} records failed to update`,errorDetails:o,showHeader:!1}],context:B(c)||c,category:"HTTP",showHeader:!1})),r})),Vl((()=>(on.resolveActionByID(n,s),th(r),r=[],r))))})))},iI=(e,t)=>ky(e,t),cI=e=>{let t=0,n=[];return e.pipe(Fl(bl),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>(Yn(e.context),iI(e,{actionMgrID:t,isProcessAction:!0})))),kl((async e=>{if(e&&zr(e.type)){const t=vc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e;return await $y(s,n,{headers:r,actionInPayload:t}),n})),Vl((()=>(Gc(n),as(n,t),n=[],n))))},lI=e=>{let t=0,n=[];return e.pipe(Fl(Se,we),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:s,skipReleaseLockRequest:a,caseViewMode:o,resourceType:i}=e;return t!==r||s||a||!(n&&"perform"!==o&&"CASE"===i)?Wl([]):Cy(e)})),kl((e=>(e&&zr(e.type)&&n.push(vc(e)),n))),Vl((()=>(th(n),as(n,t),n=[],n))))};var uI=new zg(Bg),dI=uI;function pI(e,t,n){void 0===e&&(e=0),void 0===n&&(n=dI);var r=-1;return null!=t&&($l(t)?n=t:r=t),new yi((function(t){var s,a=(s=e)instanceof Date&&!isNaN(s)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())}),a)}))}function hI(e,t){return void 0===e&&(e=0),void 0===t&&(t=uI),e<0&&(e=0),pI(e,e,t)}function gI(e){return bi((function(t,n){var r=!1,s=null,a=null,o=function(){if(null==a||a.unsubscribe(),a=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(Oi(n,(function(t){null==a||a.unsubscribe(),r=!0,s=t,a=Oi(n,o,ti),Pi(e(t)).subscribe(a)}),(function(){o(),n.complete()}),void 0,(function(){s=a=null})))}))}const fI=(e,t,n,r,s)=>{if(s!==F.RESOURCE_STATUS.CREATE)return;zc.isStateMachineExist(e,t,n)||zc.setStateMachine(e,n,t,new ar(n,t,e));zc.getStateMachine(e,t,n).insert({},r+1,!0,{isDefault:!0})},mI=e=>{const{context:t}=e;let n={...Nc(t).content,contextData:!1};const r=Wc(t);mh.isEmpty(r)||(n=Bc(r,n));const{restApi:s,reqType:a}=Ig("refreshCaseView",e);return n.interestPage=e.interestPage,Ui(uc(s,{method:a,body:n},t)).pipe(Vl((t=>({actionInPayload:e,response:t.data,headers:Tc(t.headers)}))),Yl(": Error occurred during ajax call : ",t))},yI=e=>{let t=0,n=[],r="";return e.pipe(Fl(ut),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>mI(e))),kl((async e=>{if(e&&e.type===Ie)return n.push(vc(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:s}=e,a=t.containerName,o=gt(a,t.context);let i=wc(o,a,t.context);i=Y(t.context,i);const c=Em(s);c.key=t.ID,c.data?.caseInfo&&(c.data.caseInfo.ID=t.ID);const l={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};c.uiResources.context_data.modalView=l;const u=nh(t.context)?.context_data?.caseInfo,d=`${t.pageReference}${t.targetProperty}`,p=kn(u,d.replace(U.CASE_INFO.CASE_INFO_CONTENT,"").slice(1),t.index);c.uiResources.context_data.caseInfo={...c.uiResources.context_data.caseInfo,content:{...c.uiResources.context_data.caseInfo?.content,...p?.content}};const h={acName:o,context:i};await Dc(c,t,h);const g=Pc(c,{target:o,context:i,containerItemID:i});g.resourceStatus=t.actionType,g.isMultiRecordData=!0,g.parentContext=t.context,g.heading=t.heading;const f=xc(o,g);return r=i,n.push(f),Vc(n),{actionsOut:n,actionInPayload:t}})),Vl((({actionInPayload:e})=>(Yr(n)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],e.skipPageInstructions||fI(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},II=e=>{let t,n="",r=[];return e.pipe(Fl(dt),jl((e=>{t=e.payload;const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const t={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return on.rejectActionByID(n,!0,t),Pu.handleDeferredActionCompletion(e.payload.context),Wl([])}return Wl(e.payload).pipe(kl((e=>(t=e,mI(t)))),kl((async e=>{if(e&&e.type===Ie){const t=vc(e);return r.push(t),r}const{containerItemID:n,context:s}=t;var a,o,i,c;return a=s,o=t.parentContext,i=U.CASE_INFO.CASE_INFO_CONTENT,c=!1,hr(a).forEach((e=>{const t=mh.convertClipboardPageToPageRefNotation(e.target);zc.isStateMachineExist(o,i,t)||zc.setStateMachine(o,t,i,new ar(t,i,o));const n=zc.getStateMachine(o,i,t);switch(e.instruction.toLowerCase()){case"insert":n.insert(e.content,e.listIndex,c,{});break;case"update":n.update(e.content,e.listIndex,c,{});break;case"delete":e.listIndex?n.delete(e.listIndex,c):n.deletePage();break;case"replace":n.replacePage(e.content);break;case"move":n.move(e.listIndex,e.listMoveToIndex);break;case"delete all":n.deleteAll()}})),r.push(Zh(qh,{containerItemID:n,context:s,target:t.target,skipReleaseLockRequest:!0})),r})),Vl((()=>{if(Yr(r))on.rejectActionByID(n),Pu.handleDeferredActionCompletion(t.context);else{on.resolveActionByID(n),Pu.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(Ah.getPropertyValue(F.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Ah.getPropertyValue(U.CASE_INFO.CASE_INFO_ID,r,t.parentContext),n=Ah.getPropertyValue(F.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),a=s.replace(F.CASE_INFO.CASE_INFO_CONTENT,"");bn(e,n,t.parentContext,a,{})}else wn(t.parentContext,"caseInfo.content",{})}return th(r),r=[],r})))})))},EI=e=>{const{caseID:t,headers:n,debugInfo:r,context:s}=e,a=Ig("getDescendants",{caseID:t}),{restApi:o}=a,{reqType:i}=a;let c={};return ap.getPerformanceDashboardVisibility()&&(c=Lm.getActionInfo(F.TOP_ACTION_LABEL.GETDESCENDANTS)),Ui(uc(o,{method:i,headers:{...n,...r&&{...ec.addDebugHeaders(r)}}},s,c)).pipe(Vl((t=>({actionInPayload:e,response:t.data,headers:Tc({...n,...t.headers})}))),Yl("Error ocurred during ajax call at getDescendants Epic : ",s))},AI=e=>{let t=0,n=[];return e.pipe(Fl(Nu),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>EI(e))),kl((async e=>{if(e&&zr(e.type))return n.push(vc(e)),n;const{actionInPayload:t,response:r}=e,s={};mh.setIn(s,"caseInfo.childCases",r?.childCases);const a={data:s,context:t?.context};return n.push(Zh(Ph,a)),n})),Vl((()=>(th(n),as(n,t),n=[],n))))},_I=[Ym,ny,iy,Wy,Yy,oI,cI,_y,by,Ny,lI,Ly,xy,e=>e.pipe(Fl(We),gI((()=>hI(100))),Vl((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:s,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}=e.payload;return on.resolveActionByID(t),kr.publish(F.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!s&&n,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}),[]}))),e=>e.pipe(Fl(Me),gI((()=>hI(100))),Vl((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:s}=e.payload,a=gt(r,n);return on.resolveActionByID(t),th(Zh(Wh,{containerItemID:s,target:a,doDeleteCaseSummary:!1})),[]}))),yI,II,AI],SI=_I;function CI(){return bi((function(e,t){e.subscribe(Oi(t,ti))}))}const{RESOURCE_TYPES:TI}=U,NI=[e=>e.pipe(Fl(ee),Vl((e=>e.payload)),kl((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===Qu.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=gt(Qu.PREVIEW,e.context),n=wc(t,Qu.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);th(Mh({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:F.REVIEW_MODE,root:{type:"reference",config:{context:"caseInfo.content",name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,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(k.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=k.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:s}=Ig("loadView",t);return e.viewContext===TI.PAGE&&({restApi:r,reqType:s}=Ig(Fe,{page:e.viewName,pageClass:e.pageClass})),Ui(uc(r,{method:s,headers:n},e.context)).pipe(Vl((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:Tc(t.headers),rootView:mh.getIn(r,F.ROOT)}})),Yl(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),kl((async e=>{const t={};if(e?.type===Ie){if(t.actionsOut=vc(e),e?.payload?.context?.includes(Qu.PREVIEW)){const n={...nh(e.payload.context),caseInfo:{progress:!1,error:!0}},r=gt(Qu.PREVIEW,e.payload.context);t.actionsOut=Zh(kh,{key:n.key,target:r,containerName:Qu.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:r,headers:s}=e,{containerItemID:a,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,s=t||Fr.getTargetViewContainerName(Fe),a=r?.target??gt(s,e.context);return{target:a,context:r?.context??(t===Qu.PREVIEW&&n?e.context:wc(a,s,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=o===Qu.PREVIEW?Em(r):Em(r,{[U.STOPMERGEACTIONS]:!0,[U.ACTIONS.DELETEAVIALACTIONS]:!0}),u.directUrlUpdation=!1,await Dc(u,n,l);const d={...n,target:i,context:c,containerItemID:a||c,headers:s},p=Pc(u,d);if(p.resourceType=TI.CASE,o&&!p.updateData){p.caseViewMode=F.REVIEW_MODE;const e=Dd(p?.context);((e,t,n,r,s)=>{e&&s===Qu.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=Zh(kh,{...n,containerName:s})):e?(r.actionsOut=[],r.actionsOut.push(Zh(Wh,{target:t,containerItemID:e}))):r.actionsOut=Zh(Mh,{...n,containerName:s})})(od(e,p.key),e,p,t,o)}else p.preserveClientChanges=!0,t.actionsOut=[],o===Qu.PREVIEW&&t.actionsOut.push({type:nt,payload:{context:c}}),t.actionsOut.push(Zh(Ph,p))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:s}=e.actionConfig;return"pyCasePreview"===s&&(e=>{kr.publish(F.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),Vl((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(on.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(Fl(te),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{kr.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:s,className:a,skipSemanticUrl:o=!1,containerName:i=Fr.getTargetViewContainerName(Fe)}=e,c=n&&{...ec.addDebugHeaders(n)},l=gt(i,r);let u="",d={},p=!0;if(!o){if(u=mg(Fe,{page:s}),l&&u){const{activate:t,activateContainerActionPayload:n}=jc(TI.PAGE,l,{semanticURL:u});if(t)return Wl({type:Oe,activateContainerActionPayload:n,actionConfig:e})}if(ld(l)&&({continueExecution:p,removeActionPayload:d}=Uc(l)),!p)return on.rejectActionByID(t),zl()}const{restApi:h,reqType:g}=Ig(Fe,{page:s,pageClass:a});return Ui(uc(h,{method:g,headers:c},r)).pipe(Vl((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:Tc(t.headers),removeActionPayload:d,skipSemanticUrl:o}})),Yl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),kl((async e=>{if(e&&e.type===Ie)return n.push(vc(e)),n;let{type:t}=e;const{actionConfig:r,skipSemanticUrl:s}=e,a=r.containerName||Fr.getTargetViewContainerName(te),o=gt(a,r.context);kr.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:i,updatedType:c}=((e,t,n,r)=>{let s={},a=e;if(n.isTraditionalRemoteCase){s={...n};const e=od(r,s.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},a=Oe)}return{remoteCasePayload:s,updatedType:a}})(t,e,r,o);if(t=c??t,t===Oe){const{activateContainerActionPayload:{semanticURL:t,containerItemID:s}}=e,a={acName:o,context:pd(s)};r.isTraditionalRemoteCase||await Dc({directUrlUpdation:!0,semanticURL:t},r,a,!0),n.push(Zh(Wh,{target:o,containerItemID:s}))}else{const t=wc(o,a,r.context),{response:c,headers:l={},removeActionPayload:u}=e,d=Em(c,{isCreateDataObject:r.isCreateDataObject});d.directUrlUpdation=!s;const p={acName:o,context:t};await Dc(d,r,p);const h={target:o,context:t,containerItemID:t,headers:l,debugInfo:r.debugInfo},g=Pc(d,h);g.resourceType=U.PAGE,r.isCreateDataObject&&(g.resourceType=U.RESOURCE_TYPES.DATA,g.resourceStatus=U.RESOURCE_STATUS.CREATE,delete g.data.caseInfo),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=U.CASE,n.key=Ac.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}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(r,i,g);const f=xc(o,g);u.containerItemID&&Mc(f)&&n.push(Zh(qh,{containerItemID:u.containerItemID,target:o})),n.push(f),Vc(n)}return kr.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),Vl((()=>{on.resolveActionByID(t),th(n),n=[]})),CI())}],PI=NI;const DI=(e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:o,skipSemanticUrl:i}=e,{removeActionPayload:c}=t,{restApi:l,reqType:u,body:d}=Ig(je,{pageName:r,dataContext:s,dataContextParameters:a});let p={};return ap.getPerformanceDashboardVisibility()&&(p=Lm.getActionInfo(F.TOP_ACTION_LABEL.SHOWDATA)),Ui(uc(l,{method:u,body:d},n,p)).pipe(Vl((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:Tc(t.headers),removeActionPayload:c,skipSemanticUrl:i}))),Yl("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:RI}=U,bI=e=>{let t,n=0,r=[];return e.pipe(Fl(ne),(s=e=>(({actionMgrID:n}=e.payload),Wl(e.payload).pipe(kl((e=>((e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l}=e;let{containerName:u}=e;u||(u=Fr.getTargetViewContainerName(te));const d=gt(u,n);let p="",h={},g=!1;if(!o){p=mg(je,{pageName:r,dataViewName:s},a);const{activate:n,activateContainerActionPayload:o}=jc(RI.PAGE,d,{semanticURL:p});if(n)return Wl({type:Oe,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:g,removeActionPayload:h}=Uc(d)),!g)return on.rejectActionByID(t),zl()}return DI({context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:p,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l},{removeActionPayload:h})})(e,n))),kl((async e=>{if(e&&e.type===Ie)return r.push(vc(e)),r;const{type:n,actionConfig:s,headers:a,response:o,skipSemanticUrl:i}=e;t=mh.getIn(o,F.ROOT);const{containerName:c,parentAction:l,resourceType:u}=s,d=gt(c,s.context);let p;if(s.isDeferLoaded){p=Em(o),p.directUrlUpdation=!i;const t={acName:d,context:s.context};await Dc(p,s,t);const n={target:d,headers:a,context:s.context,containerItemID:e.containerItemID},c=Pc(p,n);return r=Zh(Ph,c),r}if(n===Oe){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,a={acName:d,context:pd(n)};await Dc({directUrlUpdation:!0,semanticURL:t},s,a,!0),r.push(Zh(Wh,{target:d,containerItemID:n,resourceType:RI.DATA}))}else if("DATA"===u&&l===lt){const{context:e}=s,t=o?.data,n={context:e,data:t};r.push(Zh(Ph,n))}else{const t=wc(d,c,s.context),{removeActionPayload:n}=e;p=Em(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await Dc(p,s,l);const u=Pc(p,{target:d,context:t,containerItemID:t,headers:a});u.resourceType=RI.DATA;const h=xc(d,u);n.containerItemID&&Mc(h)&&r.push(Zh(qh,{containerItemID:n.containerItemID,target:d})),Vc(r),r.push(h)}return r})),Vl((()=>(on.resolveActionByID(n,t),th(r),r=[],r))))),Wo(a)?kl(s,a,1):kl(s,1)));var s,a},OI=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,s={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:a,reqType:o}=Ig("deleteDataObject",s);return Ui(uc(a,{method:o},n)).pipe(Vl((t=>({response:t.data,actionInPayload:e}))),Yl("Error occurred during ajax call at deleteDataObject Epic",n))},vI=e=>{let t=0,n=[];return e.pipe(Fl(at),Kl(100),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>OI(e))),kl((async e=>{if(e&&e.type===Ie){const{payload:r}=e,s=vc({...e,...r,actionMgrID:t});return n.push(s),n}return[]})),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],n))))},xI=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,s={data_view_ID:t},{restApi:a,reqType:o}=Ig("getDataObjectActions",s);return Ui(uc(a,{method:o,body:{dataViewParameters:n}},r)).pipe(Vl((e=>({...e.data}))),Yl("Error occurred during ajax call at GET data object actions : ",e.context))},wI=e=>{let t=0,n=[];let r={};return e.pipe(Fl(me),Kl(100),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>xI(e))),kl((async e=>e&&e.type===Ie?(n.push(vc(e)),n):(r=e,[]))),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t,r),th(n),n=[],n))))},MI=[bI,e=>{let t=0,n=[];return e.pipe(Fl(st),Kl(100),jl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return on.rejectActionByID(t,!0,e),Wl([])}return Wl(e.payload).pipe(kl((e=>Xl(e))),kl((async e=>{if(e&&e.type===Ie){const{payload:r}=e,s=vc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?Qu.MODAL:Qu.PRIMARY,i={target:gt(o,s),containerItemID:s,context:s};return n.push(Zh(qh,i)),n})),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Fl(ot),Kl(100),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>Jl(e))),kl((async e=>{if(e&&e.type===Ie){const{payload:r}=e,s=vc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o}=r,i=gt(o,r.context),c=wc(i,o,r.context),l={acName:i,context:c};await Dc(s,r,l);const u=Pc(s,{target:i,context:c,containerItemID:c,headers:a});return u.resourceType=U.RESOURCE_TYPES.DATA,u.resourceStatus=U.RESOURCE_STATUS.UPDATE,u.key=JSON.stringify(r.requestPayload),n.push(Zh(Mh,u)),n})),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Fl(it),Kl(100),jl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return on.rejectActionByID(t,!0,e),Wl([])}return Wl(e.payload).pipe(kl((e=>Ql(e))),kl((async e=>{if(e&&e.type===Ie){const{payload:r}=e,s=vc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?Qu.MODAL:Qu.PRIMARY,i={target:gt(o,s),containerItemID:s,context:s};return n.push(Zh(qh,i)),n})),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],n))))})))},vI,wI,e=>{let t=0,n=[];return e.pipe(Fl(ct),Kl(100),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>Zl(e))),kl((async e=>{if(e&&e.type===Ie){const{payload:r}=e,s=vc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=r,u=gt(o,r.context);let d=W(o,c);d=Y(c,d);const p={target:u,context:d,containerItemID:d,headers:a,resourceType:U.RESOURCE_TYPES.DATA,resourceStatus:U.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l},h={acName:u,context:c};await Dc(s,r,h);const g=Pc(s,p);return n.push(Zh(Mh,g)),n})),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Fl(lt),Kl(100),jl((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const s=e.payload.context;if(!r){const e={type:U.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return on.rejectActionByID(t,!0,e),Wl([])}return Wn({context:s,stateObj:nh(s),clearContextMessages:!0}),Wl(e.payload).pipe(kl((e=>eu(e))),kl((async e=>{if(e&&e.type===Ie){const{payload:r}=e,s=vc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=r,u=gt(o,r.context),d={acName:u,context:r.context};await Dc(s,r,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:a,context:r.context};return n=((e,t,n,r)=>{const{resourceType:s,key:a,containerItemID:o}=r,i=Pc(n,t);i.resourceType=s||U.RESOURCE_TYPES.DATA;const c=K(o);e.push(Zh(qh,i));const l=ah(".dataContext","dataInfo",c),u=ah(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:s,parentAction:lt,dataContext:l,dataContextParameters:u},p=l&&u&&mg(je,{pageName:F.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(F.PREVIEW)){const t={type:ne,payload:{pageName:F.VIEW_NAMES.PY_DATA_PREVIEW,container:F.PREVIEW,containerName:F.PREVIEW,...d}};e.push(t)}else if(s!==F.PAGE&&a===p&&o?.includes(F.PRIMARY)){const t={type:ne,payload:{pageName:F.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,s,{key:l,resourceType:c,containerItemID:i}),n})),Vl((()=>(1===n.length&&zr(n[0].type)?on.rejectActionByID(t):on.resolveActionByID(t),th(n),n=[],n))))})))}],LI=MI;function UI(e,t){return void 0===t&&(t=uI),bi((function(n,r){var s=null,a=null,o=null,i=function(){if(s){s.unsubscribe(),s=null;var e=a;a=null,r.next(e)}};function c(){var n=o+e,a=t.now();if(a<n)return s=this.schedule(void 0,n-a),void r.add(s);i()}n.subscribe(Oi(r,(function(n){a=n,o=t.now(),s||(s=t.schedule(c,e),r.add(s))}),(function(){i(),r.complete()}),void 0,(function(){a=s=null})))}))}const{RESOURCE_TYPES:{CASE:FI,DATA:jI}}=U;let VI=[],kI=!1;const $I={},GI=[e=>e.pipe(Fl(ye),UI(200),Vl((e=>e.payload)),kl((e=>{kI=!1,kr.subscribe(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{kI=!0}));const t=Qi.getPreviewMode()&&ec.addDebugHeaders({debugId:mh.generateUniqueID()});$I.dataContext=e.payload.dataViewName,$I.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:s}=e;let{routeEndpoint:a}=e;a=a&&a.indexOf("viewType={viewType}")>0?a.replace("{viewType}","page"):a&&a.indexOf('viewType=""')>0?a.replace('viewType=""','viewType="page"'):a;const o=E()+a,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if(k.isRemoteCase(u)){const{RemoteSystemID:e}=k.getRemoteCase(u);l.RemoteSystemID=e}if("POST"===r){c=e.payload,a.indexOf("viewType=")<0&&(a=`${a}?viewType=page`);let i;switch(kc(s)){case FI:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case jI:i=$I;break;default:i=c}return Ui(uc(o,{method:r,body:i,headers:{...l,...t}},n)).pipe(Vl((t=>({response:{...t.data},payload:e,headers:Tc(t.headers)}))),Yl(": Error occurred during ajax call at historyEpic : ",e))}return Ui(uc(o,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe(Vl((n=>({response:n.data,payload:e,headers:{...Tc(n.headers),...t}}))))})),kl((async e=>{if(kI)return VI;if(kr.subscribe(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{kI=!0})),e&&e.type===Ie)return vc(e);const{headers:t={},response:n,payload:r}=e,s=Em(n,{[U.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),a=r.options.acName,o=Id(a)&&Ad(a)?ld(a):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:a,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[F.COREHEADER_APP_DEBUG_ID]}};let l="";const u=r?.payload?.page;let d=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(l=mg($e,{caseName:e.payload.payload.caseName}),l=l&&l.replace("{workID}",e.payload.payload.workID)||"",d=r?.payload?.caseClassName),kr.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:d});const p=mh.getIn(s,F.LOCALE_REFERENCES);await ip.loadLocaleResources(p);const h=mh.getIn(s,F.COMPONENTS);h&&await Lr(h),Or(s,r.options.actionConfig,!0),kr.publish(U.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:a,pageName:u,pageClass:d});let g=Pc(s,c);return g=((e,t,n)=>{if(e===_c.CASE){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=bc(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=F.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(kc(e.payload.routeKey),{...n.data,semanticURL:l,caseViewMode:F.REVIEW_MODE},g),VI.push(xc(a,g)),Vc(VI),VI})),Vl((()=>(kI||th(VI),VI=[],kI=!1,VI))),Yl("Error occurred"))],BI=[e=>{let t=0,n=[];return e.pipe(Fl(re),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let s="";n||(s=mg(Ve,{insightID:"{insightID}"}),s=s.replace("{insightID}",r));const{restApi:a,reqType:o}=Ig(Ve,{insightID:r});return Ui(uc(a,{method:o},t)).pipe(Vl((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),Yl(": Error occurred during ajax call at showPage Epic : ",e.context))})),kl((async e=>{if(e&&e.type===Ie)return n.push(vc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=Fr.getTargetViewContainerName(te),a=gt(s,t.context),o=wc(a,s,t.context),{response:i}=e,c=Em(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await Dc(c,t,l,u,d);const p=Pc(c,{target:a,context:o,containerItemID:o});p.resourceType=U.PAGE;const h=xc(a,p);return n.push(h),Vc(n),n})),Vl((()=>{on.resolveActionByID(t),th(n),n=[]})),CI())}],WI=[e=>{let t=0,n=[];return e.pipe(Fl(se),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),kl((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let s="";n||(s=mg(ke,{dashboardID:r}),s=s.replace("{dashboardID}",r));const{restApi:a,reqType:o}=Ig(ke,{dashboardID:r});return Ui(uc(a,{method:o},t)).pipe(Vl((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),Yl(": Error occurred during ajax call at showPage Epic : ",e.context))})),kl((async e=>{if(e&&e.type===Ie)return n.push(vc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=Fr.getTargetViewContainerName(te),a=gt(s,t.context),o=wc(a,s,t.context),{response:i}=e,c=Em(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await Dc(c,t,l,u,d);const p=Pc(c,{target:a,context:o,containerItemID:o});p.resourceType=U.PAGE;const h=xc(a,p);return n.push(h)})),Vl((()=>{on.resolveActionByID(t),th(n),n=[]})),CI())}],HI=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ym.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...Nm,...SI,...PI,...GI,...LI,...Dm,...[e=>{let t=0;return e.pipe(Fl(Je),Vl((e=>(({actionMgrID:t}=e.payload),e.payload))),Vl((()=>{const e=eh()?.getState(),n=fm();return h()(e,n)&&t>0?on.resolveActionByID(t,{}):on.rejectActionByID(t),[]})),CI())}],...BI,...WI),qI=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:s,context:a,transientItemID:o}=r;"HTTP"!==s&&[_e,ve,Se,we,Te,be].includes(n)&&(Xc(a||o),Tn.removeContextTreeNode(a||o)),e(t)},zI={},YI=e=>{const t=mh.getIn(zI,[F.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),s=mh.getIn(zI,[r,t],[]),a=s&&s.length>0&&s.indexOf(e);if(a>-1&&s.splice(a,1),!s||s&&0===s.length){mh.deleteIn(zI,[r,t]);const e=mh.getIn(zI,[r]);e&&0===Object.keys(e).length&&mh.deleteIn(zI,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),mh.deleteIn(zI,[F.CONTEXT,e]);const r=mh.getIn(zI,[F.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&mh.deleteIn(zI,[F.CONTEXT]),n.length>0&&th(ng({dataPagesToBeRemoved:n}))},KI=(e={},t)=>{Object.keys(e).forEach((n=>{const r=mh.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=mh.getIn(zI,[F.CONTEXT,n]);if(mh.getIn(zI,[e])){const r=mh.getIn(zI,[e,t],[]);mh.setIn(zI,[e,t],[...new Set([...r,n])])}else mh.setIn(zI,[e,t],[n]);r?mh.setIn(zI,[F.CONTEXT,n],[...new Set([...r,t])]):mh.setIn(zI,[F.CONTEXT,n],[t])})(n,e,t)}))}))},XI=()=>e=>t=>{const{payload:{data:n={},context:r=null,childContainersContexts:s=[]}={},type:a}=t;if(s&&s.length>0&&(a===we||a===Se)&&s.forEach((e=>{YI(e)})),a===_e||a===ge||a===Ze){const e=a===Ze?n:n.shared;KI(e,r)}else a===we?(YI(r),KI(n.shared,r)):a===Se&&YI(r);e(t)},JI=e=>t=>n=>{const{type:r,payload:{target:s,containerItemID:a,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={}}={}}=n,{PUB_SUB_EVENTS:u}=U;if(r===Se){const{resourceType:t,key:n,context:r}=mh.getIn(e.getState(),["containers",s,"items",a])||{},o={resourceType:t,key:n,context:r,containerItemID:a};kr.publish(u.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),s===`${U.APP.APP}/${F.PRIMARY}`&&l===F.CONTAINER_TYPE.MULTIPLE&&kr.publish(u.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===we||r===Se)&&i.forEach((e=>{Tu.cleanCaches(e)})),r!==we&&r!==Se||Tu.cleanCaches(o),t(n)},QI=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null}={},type:s}=t;!n||s!==_e&&s!==ve&&s!==we&&s!==Se||(fr(n),pr(n)),r&&s===De&&(fr(r),pr(r)),e(t)},ZI=function(e){void 0===e&&(e={});var t,n=new(0,Yg.constructor)(Yg.schedulerActionCtor),r=new Xg,s=function(s){t=s;var a=new Xg,o=new Xg,i=a.asObservable().pipe(xi(n)),c=new Zg(o.pipe(xi(n)),t.getState());return r.pipe(Vl((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),kl((function(e){return Ui(e).pipe(wi(n),xi(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),a.next(n),r}}};return s.run=function(e){r.next(e)},s}(),eE=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||kg;if(null!==eh())gh();else{const n=jg(mm(e),t(ef.reduxBatch,function(...e){return t=>(n,r)=>{const s=t(n,r);let a=()=>{throw new Error(wg(15))};const o={getState:s.getState,dispatch:(e,...t)=>a(e,...t)},i=e.map((e=>e(o)));return a=kg(...i)(s.dispatch),{...s,dispatch:a}}}(Pl,qI,XI,QI,ZI,JI),ef.reduxBatch));ZI.run(HI),Zp(n)}};const tE=new class{#I;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#I=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e)),n=t?mh.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(Vm("getUserSettings")){const{restApi:e,reqType:t}=Ig("getUserSettings");uc(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=()=>{ap.getUserSettings()?this.userSettings=ap.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 mh.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(!Vm("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=Ig("updateUserSettings");const{restApi:r,reqType:s}=n;return uc(r,{method:s,body:mh.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 r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#I){this.#I=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};kr.subscribe(F.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}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}},nE={publishConstellationLoadedEvent:()=>{kr.publish(F.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const rE=new class{activateContainerItemOnSwitch(e){const t=`${F.APP.APP}/${F.PRIMARY}`,n={target:t,containerItemID:od(t,e)};zu({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${F.APP.APP}/${F.PRIMARY}`,n={target:t,containerItemID:od(t,e)};zu({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){zu({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){zu({}).getPConnect().getContainerManager().resetContainers({name:F.PREVIEW,context:F.APP.APP})}isFormDirty(e){const t=`${F.APP.APP}/${F.PRIMARY}`,n=Hd(t,e);return qc.isStateModified(n)}getEventUtils(){return nE}getBroadcastUtils(){return bm}isTraditionalUICase(e){return os(e)}};const sE=class{static openCase(e,t=U.APP.APP,n={}){return n.renderInline=!0,n.pageName?ap.setDefaultCasePage(n.pageName):(ap.setDefaultCasePage(F.PY_DETAILS),n.pageName=F.PY_DETAILS),n?.disableAssignmentHeader?ap.disableAssignmentHeader(n.disableAssignmentHeader):ap.disableAssignmentHeader(!1),Mu.openCase(e,t,F.PRIMARY,n)}static createCase(e,t=U.APP.APP,n={}){return n.renderInline=!0,n.pageName?ap.setDefaultCasePage(n.pageName):(ap.setDefaultCasePage(F.PY_DETAILS),n.pageName=F.PY_DETAILS),n?.disableAssignmentHeader?ap.disableAssignmentHeader(n.disableAssignmentHeader):ap.disableAssignmentHeader(!1),Mu.createCase(e,t,F.PRIMARY,n)}static getNextWork(e=U.APP.APP,t={}){return t.renderInline=!0,t.pageName?ap.setDefaultCasePage(t.pageName):(ap.setDefaultCasePage(F.PY_DETAILS),t.pageName=F.PY_DETAILS),t?.disableAssignmentHeader?ap.disableAssignmentHeader(t.disableAssignmentHeader):ap.disableAssignmentHeader(!1),Mu.getNextWork(e,F.PRIMARY,t)}static openAssignment(e,t=U.APP.APP,n={}){return n.renderInline=!0,n.pageName?ap.setDefaultCasePage(n.pageName):(ap.setDefaultCasePage(F.PY_DETAILS),n.pageName=F.PY_DETAILS),n?.disableAssignmentHeader?ap.disableAssignmentHeader(n.disableAssignmentHeader):ap.disableAssignmentHeader(!1),Mu.openAssignment(e,t,F.PRIMARY,n)}static openPage(e,t,n=U.APP.APP,r={}){const s=te;r?.defaultCasePage?ap.setDefaultCasePage(r.defaultCasePage):ap.setDefaultCasePage(F.PY_DETAILS),r?.disableAssignmentHeader?ap.disableAssignmentHeader(r.disableAssignmentHeader):ap.disableAssignmentHeader(!1);const a={viewName:e,className:t,acTargetName:F.PRIMARY,actionMgrID:on.getNextActionMgrId(),context:n},{promise:o}=on.actionManagerPromise(s,a.actionMgrID);return th({type:s,payload:{...a}}),o}static getCurrentContextAPI(e,t=U.APP.APP){return zu({meta:{config:{}},options:{context:t,pageReference:e,containerName:F.PRIMARY}}).getPConnect()}};const aE=new class{createC11nEnv=e=>zu(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>Yt;getStateManager=()=>c;getActionCreators=()=>l;getStreamObservable=()=>r;getActionProcessor=()=>Sh;getActionHandler=()=>_h;renderApp=(e,t)=>{const n={context:F.APP.APP},r={...mh.getIn(e,F.ROOT),options:n};eE(e),Or(e,n,!0);const s=this.createC11nEnv({meta:r,isRoot:!0});kr.publish(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const r=Em(e),{data:s,uiResources:a={}}=e,o=mh.getIn(a,F.CONTEXT_DATA);await Dc(r,{},{},!1,!0);const i={...s,[F.CONTEXT_DATA]:o},{root:c}=a;bd(c,t,i,n)};fetchEndPointResource=(e,t,n)=>{uc(e,{method:"GET"},F.APP.ROOT).then((async e=>{const{data:r,status:s}=e;200===s&&this.updateStoreWithUiRoot(r,t,n)}))};loadComponent=async(e,t,n)=>Lr(n).then((()=>{const n=this.createC11nEnv({meta:e,isRoot:!0});eh()||eE({}),kr.publish(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})}));setStaticServerUrl=(e,t,n)=>{xr.initServer(e,t,n)};loadView=async(e,t,n=[])=>{y();const r=Em(e),s=mh.getIn(r,F.VIEWS),a=mh.getIn(r,F.NAVIGATIONS),o=mh.getIn(r,F.COMPONENTS)||[];o.push(...n);const i=mh.getIn(r,F.STATIC_SERVER_URL),c=mh.getIn(r,F.APPLICATION_DATA);s&&Op(s),a&&vp(a),(e=>{e&&(pg=e.pyLabel)})(c),i&&xr.initServer(i),await Lr(o,i).then((()=>this.renderApp(r,t)))};initAppShell=(e,t,n)=>{vg(e),Fr.buildActionTargetMap(t),y(n)};initRoutingTable=(e,t)=>{vg(e,!0),y(t)};setAppAlias=e=>{xr.setAppAlias(e)};getHomeRestApi=e=>{const{restApi:t}=yg("home",{portalName:e});return E()+t};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(bg()&&!t){const t=tp(),r=sp.processUrl(t,!0),s=sp._getMatchedRouteInRoutingTable(r)||"",a=sp.getRoutingInfo(),o=sp.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=a&&a.routes[s].payload;c=c.replace("{workID}",i),n=sp.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=sp.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,s,a)=>{const{config:{name:o}={}}=t;eh()||eE({}),a&&(Vd(`${F.APP.ROOT}/${o}`),jd().deleteContainerItem(`${F.APP.ROOT}/${o}`)),jd().getContainerItems()?.length>1&&!o?.startsWith("hybrid_")&&"authoring-preview"!==o&&gh(),th(Ph({data:{},context:F.APP.ROOT}));const i=this.createC11nEnv({meta:t,options:{context:F.APP.ROOT,pageReference:"",target:`${F.APP.ROOT}/${o}`}}),c=i.getPConnect(),l=c.getContextName(),u=c.getContainerName(),d=c.getContainerManager();ld(`${l}/${u}`)||"noPortal"===t.config?.renderingMode||d.initializeContainers({type:"single"});const p=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return Lr(p).then((()=>{kr.publish(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:i,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:s})}))};loadViewByName=(e,t,n,r)=>{let s=this.getViewRestApi(e,n);s===E()&&(s=this.getHomeRestApi(t)),this.fetchEndPointResource(s,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{Og(e)};checkIfSemanticURL=()=>bg();onPCoreReady=e=>{kr.subscribe(U.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};setFieldsDefaultConfigs=e=>{Pr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{_(e)};setFetchDefaultHeaders=e=>{fc(e)};setFetchAuthInfo=e=>{mc(e)};getCaseApi=()=>Mu;getMashupApi=()=>sE;enableAppRouting=e=>{gg(e)};initStore=()=>eE({});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()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=zu({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}}}};const oE=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]}};const iE=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 cE=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.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=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,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 iE(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false"}},lE=async()=>{const e=ap.getLocale(),t=ap.getFeatureMap().localizationVersion||1;if("en-US"!==e)try{let n;n=2===t?[e]:[ip.GENERIC_BUNDLE_KEY,ip.MESSAGE_BUNDLE_KEY,ip.FIELD_LABELS_BUNDLE_KEY];const r=n.map((async n=>{2===t?await(async e=>{const t=ap.getFeatureMap().availableLanguagePacks||[];if(!e||!t.includes(e))return void console.warn(`current locale ${e} is not supported by application.`);const n={locale:e},r=await Fm("getLocalizationPack",{queryPayload:n});if((201===r.status||200===r.status)&&r.data){const e=r.data;Object.keys(e).forEach((t=>{ip.setLocaleForRule(e[t],t)}))}})(n):ip.isCurrentLocalePackAvailable()&&await(async(e,t)=>{const n=await xr.getSvcLocale(t,`${e}.json`);if(n.ok&&e){const t=await n.json();ip.setLocaleForRule(t,e)}})(n,e)}));await Promise.allSettled(r)}catch(e){console.warn(e)}},uE="@P .viewConfig";let dE=0;const pE=new class{#E(e,t,n){vg(e),Fr.buildActionTargetMap(t),y(n)}init(e){const t=new cE(e),n={...t.environmentInfo,renderingMode:t.renderingMode};gg(t.enableRouting),eE({}),ap.setTheme(t.theme),ap.setCookieComplianceMethod(t.cookieComplianceMethod),ap.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Pr.updateFieldDefaults(t.fieldDefaults),ec.setDefaultHeaders(t.additionalHeaders),this.#E(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),xr.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),_(t.serviceConfig.googleMapKey),xr.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),ip.setTimezone(t.timezone),ap.setEnvironmentInfo(n),ap.setLocale(t.locale),k.setRemoteCaseMapping(t.remoteCaseMapping),uu.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),tE.init(),t.initBroadcast&&rE.getBroadcastUtils().init()}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()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=zu({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 aE.getComponentsRegistry().getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",e),s.setAttribute("async",t),s.onload=n(),s.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(s)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,s)=>{const a=new URLSearchParams(t);let o=!1;"true"===n&&(o=!0);let i=null,c=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1])}else o=!1;let l=r;i&&(l=`${l}/${i}`),c&&(l=`${l}/${c}`),o&&(a.has("noPortal")||a.append("noPortal","true"),c&&s&&a.append("view",s));const u=a.toString();return l+=u?`?${u}`:"",l};initCoreConfig=e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:s,noPortal:a,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:g}=e,{appAlias:f,contextPath:m}=n;let y=window.location.origin;const I={};if(void 0!==l&&(y=l),m&&(y=`${y}${m}`),f&&"LAUNCHPAD"!==h&&(y=`${y}/${f}`),e.restServerConfig=y,!0===d){const e=this.buildSemanticUrl(r,s,a,y,i);!o&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),I.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(I.dynamicLoadComponents=!1);let E=null;if(f){const e=f.indexOf("/app/");E=e>=0?f.substring(e+1):f}if(Object.keys(I).length>0&&window.PCore.setBehaviorOverrides(I),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===ap.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),g?.cspNonce&&(window.__webpack_nonce__=g.cspNonce),this.init(e)};launchViewByName=(e,t,n,r,s,a,o,i)=>{dE+=1;const c=i||`mashup${dE}`,l={type:"RootContainer",config:{viewConfig:uE,renderingMode:"view",name:c}};aE.loadRootComponent(e,l,s,a,o).then((()=>aE.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,s,a,o)=>{dE+=1;const i="hybrid"===o?`hybrid_${dE}`:o;dE+=1;const c=i||`mashup${dE}`,l={type:"RootContainer",config:{viewConfig:uE,renderingMode:"portal",name:c}};oE.setRuntimeParams(r),aE.loadRootComponent(e,l,n,s,a).then((()=>aE.updateStoreWithUiRoot(t,c)))};launchPortal=(e,t,n,r=[])=>{dE+=1;const s=n||`portal${dE}`,a={type:"RootContainer",config:{viewConfig:uE,renderingMode:"portal",skeleton:"LoadingComponent",name:s}};r.push(a.config.skeleton),ap.isPortalLoaded=!0,aE.loadRootComponent(e,a,r).then((()=>aE.loadPortalView(t,s)))};launchMashup=(e,t=!0)=>{const n={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}aE.loadRootComponent(e,n,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&s(849)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:o}=e;this.initCoreConfig(e);const i=async()=>(await this.importReactRoot(),r&&await xr.importCustomComponentMap(r),"true"===a&&"other"!==o&&await this.importDesignSystemComponentMap(n,s,o),t&&t(),!0);return new Promise(((e,t)=>{lE().then((async()=>{const t=aE.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await i()):kr.subscribe("component-map-loaded",(async()=>{e(await i())}))})).catch((e=>{t(e)}))}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess")};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")}},hE={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=Ig("createViewRuleByID");return uc(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=Ig("getViewRuleByID",{ID:e});return uc(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:s}=Ig("updateViewRuleByID",{ID:e});return uc(r,{method:s,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=Ig("deleteViewRuleByID",{ID:e});return uc(n,{method:r},t).then((e=>e.data))}},gE={"Content-Type":"application/json"},fE={addCaseFollower:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({users:t.map((e=>({ID:e})))});return Fm("addCaseFollower",{body:s,queryPayload:r,headers:gE},n)},deleteCaseFollower:(e,t,n)=>Fm("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>Fm("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},mE={addRelatedCases:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({cases:t});return Fm("addRelatedCases",{body:s,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>Fm("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>Fm("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},yE="operatorDetails",IE={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=Ig(yE,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return Fm(yE,{queryPayload:t})}return t?Fm("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):Fm(yE,{body:{dataViewParameters:{ID:e}}})}},EE=async e=>{const t=Em(e),n=mh.getIn(t,F.COMPONENTS);Or(t,{},!0);const r=mh.getIn(t,F.LOCALE_REFERENCES);await ip.loadLocaleResources(r||[]),await Lr(n)},AE=(e,t,n)=>Ah.resolveView(e,t,n),_E={"Content-Type":"application/json"};const SE=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,s,a,o)=>{const{getLocaleValue:i}=ip;o||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=a.getValue("pulse.pageLastEntry"));const u={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<s.length;e+=1)s[e].cancel();const d=km();return s.push(d),Fm("getFeedMessages",{queryPayload:u,cancelTokenSource:d},a.getContextName()).then((async e=>{if(200===e.status&&e.data){s.pop();const t=[],n={};let c=!1;if(e?.data){if(e?.data?.data?.FeedList){const r=e.data.data.FeedList?.pxResults;Array.isArray(r)&&r?.length>0&&r.forEach(((e,r)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${r}`,t.push(e.ID),n[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)})),c||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(c=!0)}))}if(c&&await EE({uiResources:e.data.uiResources}),!r&&(r=[{id:"All",label:i("All","Pulse"),on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let n=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i(e.pyLabel,"Pulse"),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)})),r.find((e=>"All"===e.id)).on=n)}}if(o&&a.getValue("pulse.messageIDs")){let r=a.getValue("pulse.messageIDs"),s=a.getValue("pulse.messages");r=[...r,...t],s={...s,...n},Object.values(s).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)}))})),a.updateState({pulse:{messages:s,messageIDs:r,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}})}else a.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}});const l=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:l}}return a.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{$m(e)||a.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,s)=>{const a=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return Fm("postFeedMessages",{body:a,headers:_E},s.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,s,n.length>0);return s.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(a,r,s,n.length>0);return s.updateState({pulse:{messages:o,messageIDs:i}}),c}return s.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{s.reportError(": Error occurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:s=!1})=>{const a=JSON.stringify({message:n});return Fm("editFeedMessage",{queryPayload:{messageID:e},body:a,headers:_E},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(s){n.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:a}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error occurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,n,r=!1)=>{const s={ID:e?.ID||"",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},a=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(a)?.find((e=>e?.ID===s?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===s?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...s},e=n}else e=[...e,s];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(s.ID)?{...a[s.ID],...s}:s,t={...a,[s.ID]:e};return{messages:t,messageIDs:o.includes(s.ID)?o:[s.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.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,c11nEnv:s})=>{const a=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});Fm(a,{body:o,queryPayload:{pulseContext:e},headers:_E},s.getContextName()).then((a=>{if(200===a.status)if(r){const r=s.getValue(`pulse.messages.${n}`),a=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const s=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=s-1,r=!1):(e=s+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));s.updateState({pulse:{messages:{[n]:{pxResults:a}}}})}else{const r={...s.getValue(`pulse.messages.${n}`)},a=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},s.updateState({pulse:{messages:{[e]:r}}})}else s.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{s.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let s=e;t&&(s=n);Fm("deleteFeedMessage",{queryPayload:{messageID:s}},r.getContextName()).then((s=>{if(200===s.status)if(t){const t=r.getValue(`pulse.messages.${e}`),s=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:s}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),s={...r.getValue("pulse.messages")};delete s[e],r.updateState({pulse:{messageIDs:n,messages:s}})}else r.reportError(`deleteMessage call failed with status ${s.status}`,s)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>Fm("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error occurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:s,listSize:a=5}=e,o={pulseContext:n,searchFor:r,mentionsType:s,listSize:a};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=km();return this.mentionsTagsCancelTokenSource.push(i),Fm("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=>{$m(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>Fm("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error occurred during ajax call at getMentionTypes API : ",t.response.data)}));getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,s={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const a=km();return this.mentionsTagsCancelTokenSource.push(a),Fm("getTagSuggestions",{queryPayload:s,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=>{$m(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},CE={getTaggedCases:(e,t)=>Fm("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>Fm("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 r={caseID:e},s=JSON.stringify({tags:t});return Fm("addTagsToCase",{body:s,queryPayload:r},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)=>Fm("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>pu.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},TE=(e,t)=>{kd(t.getContextName(),e.etag),$d(t.getContextName(),e.etag)},NE={getParticipants:(e,t)=>Fm("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)=>Fm("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)=>Fm("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)=>Fm("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,r)=>{const s={caseID:e},a={...n,participantRoleID:t},o={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Fm("createParticipant",{body:a,queryPayload:s,headers:o},r.getContextName()).then((t=>{TE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at createParticipant API : ",e.response),t(e.response)}))}))},updateParticipant:async(e,t,n,r)=>{const s={caseID:e,participantID:t},a={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Fm("updateParticipant",{body:n,queryPayload:s,headers:a},r.getContextName()).then((t=>{TE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at updateParticipant API : ",e.response),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},s={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{Fm("deleteParticipant",{queryPayload:r,headers:s},n.getContextName()).then((t=>{TE(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function PE(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const DE="create",RE="update",bE="delete";function OE(e,t,n,r){const s=Fp(t);if(s){switch(e){case DE:case RE:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(s.allPersonalizations[n]=t),e&&(s.defaultPersonalization=n);break}case bE:delete s.allPersonalizations[n],s.defaultPersonalization===n&&(s.defaultPersonalization="");break;default:return null}return s}return null}const vE={},xE=e=>{const t=Fp(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=PE(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=Ig("getUIListPersonalizations",{listID:e});return uc(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:PE(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},wE=(e,t,n)=>{const{restApi:r,reqType:s}=Ig("createListPersonalization",{listID:e});return OE(DE,e,t,n),uc(r,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return vE[t]=n,e}))},ME=(e,t,n)=>{const r=vE[t]||t;OE(RE,e,t,n);const{restApi:s,reqType:a}=Ig("updateListPersonalization",{listID:e,personalizationID:r})||{};return uc(s,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},LE=(e,t)=>{const n=vE[t]||t;OE(bE,e,t);const{restApi:r,reqType:s}=Ig("deleteListPersonalization",{listID:e,personalizationID:n});return uc(r,{method:s,body:{}}).then((e=>(vE[t]&&delete vE[t],e)))};const UE=function(e){return e?{createPersonalization:wE.bind(null,e),updatePersonalization:ME.bind(null,e),deletePersonalization:LE.bind(null,e),fetchPersonalizations:xE.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},FE="getDataObjects",jE="getInsightByID",VE=["LocalList","RemoteList","PromptList","DataPage"];let kE=null;const $E={},GE=e=>nu.getAppCacheKey(`PrimaryFields-${e}`);function BE(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const WE={getDataObjects:function(){const e=nu.getAppCacheKey(FE);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=Ig(FE,{}),r=uc(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(kE)return kE;const t=nu.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=Ig("getDataPages",{datapageRequestType:"explorable"});return kE=uc(n,{method:r,datapageRequestType:"explorable"}),kE.then((e=>{kE=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),kE},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=Up(e);if(t&&t.classID){let e=Vp(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!mh.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=bp(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields),s=r.size>0||n.size>0;for(const t in e)e[t].type.startsWith("Page")||s&&!(r.size>0&&r.has(t)||n.size>0&&n.has(t))?delete e[t]:e[t]?.datasource&&VE.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={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType?e[1].fieldType:e[1].isUserReference?"User reference":void 0,category:BE(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Cu.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=nu.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=Ig("getListData",{dataViewName:"D_pzGetDefaultColumns"}),s=uc(n,{method:r,body:{dataViewParameters:e}});return s.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),s},getFieldsForDataSource:function(e,t,n){if(!t){const t=Up(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 r=nu.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const s=nu.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return s.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),s},getPrimaryFieldsForDataSource:function(e="",t=""){const n=nu.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=nu.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:s,classesToFetch:a,isTopLevelClassPresent:o,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let s=!1;const a=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=GE(t);window.sessionStorage.getItem(o)||($E[t]?r.push($E[t]):(n.push(t),t===e?s=!0:a.push(t)))})),{allClasses:o,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:s,joinedClassesToFetch:a}}(e,n);return a.length&&s.push((async(e,t,n,r)=>{const s=nu.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=GE(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete $E[e]}))}));return e.forEach((e=>{$E[e]=s})),s})(a,o?e:void 0,o?t:void 0,i.length>0?i:void 0)),Promise.allSettled(s).then((()=>{const e={};return r.forEach((t=>{const n=GE(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(window.sessionStorage.getItem(n))}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=Ig("getInsightIDs");return uc(e,{method:t})},getInsightByID:function(e){const t=jp(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:s}=Ig(jE,n);return uc(r,{method:s})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=Ig(jE,t);return uc(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=Ig("createInsight");return uc(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:s}=Ig("updateInsight",n),a=t.UpdateDateTime;return uc(r,{method:s,body:JSON.stringify(t),headers:{"if-match":a,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=Ig("deleteInsight",t);return uc(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=Ig("exportToExcel");return uc(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=Ig("exportToCSV");return uc(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:s}=Ig("scheduleInsight",n);return uc(r,{method:s,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:s,reqType:a}=Ig("updateScheduledInsight",r);return uc(s,{method:a,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:s}=Ig("deleteScheduledInsight",n);return uc(r,{method:s})},translateStrings:function(e){const{restApi:t,reqType:n}=Ig("translateStrings");return uc(t,{method:n,body:JSON.stringify(e)})}};const HE=new class{addRoutes=e=>{return t=e,void sp.addRoutes(t);var t}};const qE=class{static registerModule(e,t,n){n[e]=()=>t}};const zE=class{static getCaseEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(U.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)},YE={getResolvedSemanticURL:(e,t,n)=>sp.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:$e,ACTION_SHOWDATA:je,ACTION_SHOWVIEW:Fe}),updateSemanticURLAndDocumentTitle:e=>sp.updateSemanticURLAndDocumentTitle(e)};const KE=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},XE={setTokens:e=>{mc({tokenInfo:e}),fc(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>kr.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Gi(),getAuthInstance:e=>$i.init(e),setAuthorizationHeader:e=>{fc({Authorization:e}),setTimeout((()=>kr.publish("updateSession",{updateStatus:"success"})),0)}};const JE=new class{getDebouncedSubject(e){return(new Xg).pipe(UI(e))}};Rr.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,s=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${s}(\\x2e${s})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t=ip.getLocaleValue("Enter a valid email address","Messages")),t})),Rr.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=ip.getLocaleValue("Invalid number","Messages")),t})),Rr.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?ip.getLocaleValue("Cannot be blank","Messages"):null)),Rr.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=ip.getLocaleValue("Enter a valid url","Messages")),t})),setTimeout((()=>{s.e(531).then(s.bind(s,531)).then((({isPossiblePhoneNumber:e})=>{Rr.register("phone",(t=>{let n=null;t&&!/^\+?\d+$/.test(t)&&(n=ip.getLocaleValue("Enter a valid phone number","Messages"));const r=t?.startsWith("+");if(t&&r){e(t)||(n=ip.getLocaleValue("Enter a valid phone number","Messages"))}return n}))}))}),F.PRIORITY.TRIVIAL);const QE=(e,t)=>{switch(t){case"invalid":return ip.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return ip.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};Rr.register("datetime",(e=>QE("DateTime",e))),Rr.register("date",(e=>QE("Date",e))),Rr.register("time",(e=>QE("Time",e)));const ZE={createConversation:(e,t,n,r=[])=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const s=km();r.push(s);const a={assistantID:t},o=JSON.stringify({contextID:e});return Fm("createConversation",{body:o,cancelTokenSource:s,queryPayload:a},n).then((e=>(r.pop(),e)))},sendMessage:(e,t,n,r)=>{const s={assistantID:e,conversationID:t},a=JSON.stringify({request:n});return Fm("sendMessage",{body:a,queryPayload:s},r)}};const eA=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=ap.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class tA{constructor(){tA.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"8.23.0";onPCoreReady=e=>aE.onPCoreReady(e);getComponentsRegistry=()=>aE.getComponentsRegistry();checkIfSemanticURL=()=>aE.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(bg()){const e=sp.processUrl(tp(),!0);return!!sp._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>HE;getViewResources=()=>d;configureForBrowserBookmark=e=>aE.configureForBrowserBookmark(e);getStore=()=>eh();resetStore=()=>gh();getMessageManager=()=>Xn;getCoexistenceManager=()=>rE;getStoreValue=(e,t,n)=>ah(e,t,n);getContainerUtils=()=>o;getAnnotationUtils=()=>cl;getFieldUtils=()=>Fn;getFieldDefaultUtils=()=>Pr;getAssetLoader=()=>xr;getAttachmentUtils=()=>mp;getViewRuleApi=()=>hE;getFeedUtils=()=>SE;getTagUtils=()=>CE;getGenAIAssistantUtils=()=>ZE;getStakeholderUtils=()=>NE;getUserApi=()=>IE;getCaseFollowerApi=()=>fE;getCaseUtils=()=>Ac;getStateUtils=()=>Fu;getRelatedCasesApi=()=>mE;getPersonalizationUtils=UE;getDataApi=()=>Cu;getDataApiUtils=()=>nu;getAnalyticsUtils=()=>WE;getLocaleUtils=()=>ip;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{tA.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{tA.behaviorOverrides[e]=t};getBehaviorOverrides=()=>tA.behaviorOverrides;getBehaviorOverride=e=>tA.behaviorOverrides[e];getAsynchronousUtils=()=>JE;createPConnect=e=>zu(e);getPubSubUtils=()=>kr;registerComponentCreator=e=>{Yu(e)};getConstants=()=>Object.freeze(U);getEvents=()=>zE;getRestClient=()=>u;getMashupApi=()=>sE;getEnvironmentInfo=()=>ap;getRuntimeParamsAPI=()=>oE;getSemanticUrlUtils=()=>YE;getRemoteCaseUtils=()=>k;getNavigationUtils=()=>tE;registerModule=(e,t)=>qE.registerModule(e,t,this);getErrorHandler=()=>KE;getFormUtils=()=>qc;getMessagingServiceManager=()=>uu;getMetadataUtils=()=>i;getDataPageUtils=()=>pu;getDataTypeUtils=()=>Ml;getCascadeManager=()=>Xp;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>XE;getDebugger=()=>Qi;getDeferLoadManager=()=>tu;getExpressionEngine=()=>n;getActionsSequencer=()=>Pu;getRefreshManager=()=>dl;getInitialiser=()=>pE;getBootstrapUtils=()=>aE;getContextTreeManager=()=>Tn;getPerformanceManager=()=>Vi;getAccessPrivilege=()=>eA.getInstance()}const nA=new tA;s.g.PCore=nA})()})();
1
+ (()=>{var e,t,n={933:(e,t,n)=>{"use strict";var r=n(515);Object.defineProperty(t,"reduxBatch",{enumerable:!0,get:function(){return r.reduxBatch}})},515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduxBatch=function(e){var t=[],n=void 0;function r(){t===n&&(t=t.slice())}function s(e){if("function"!=typeof e)throw new Error("Invalid listener, expected a function");var n=!0;return r(),t.push(e),function(){n&&(r(),t.splice(t.indexOf(e),1),n=!1)}}function a(){for(var e=t,r=0;r<e.length;++r)n=e,e[r]()}return function(){var t=e.apply(void 0,arguments),n=!1,r=!1;function o(e){return Array.isArray(e)?e.map((function(e){return o(e)})):t.dispatch(e)}return t.subscribe((function(){r?n=!0:a()})),Object.assign({},t,{dispatch:function(e){var t=r;t||(n=!1,r=!0);var s=o(e),i=n&&!t;return t||(n=!1,r=!1),i&&a(),s},subscribe:s})}}},923:(e,t,n)=>{e.exports=n(933)},924:(e,t,n)=>{var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c=/^\[object .+?Constructor\]$/,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")();function p(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var s=e.length,a=n+(r?1:-1);for(;r?a--:++a<s;)if(t(e[a],a,e))return a;return-1}(e,f,n);var r=n-1,s=e.length;for(;++r<s;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function h(e,t,n){for(var r=-1,s=e?e.length:0;++r<s;)if(n(t,e[r]))return!0;return!1}function g(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}function f(e){return e!=e}function m(e,t){return e.has(t)}var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=d["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=d.Symbol,R=A.propertyIsEnumerable,b=I.splice,O=D?D.isConcatSpreadable:void 0,v=Math.max,x=G(d,"Map"),w=G(Object,"create");function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.__data__=new U;++t<n;)this.add(e[t])}function j(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function V(e,t,n,r){var s,a=-1,o=p,i=!0,c=e.length,l=[],u=t.length;if(!c)return l;n&&(t=function(e,t){for(var n=-1,r=e?e.length:0,s=Array(r);++n<r;)s[n]=t(e[n],n,e);return s}(t,(s=n,function(e){return s(e)}))),r?(o=h,i=!1):t.length>=200&&(o=m,i=!1,t=new F(t));e:for(;++a<c;){var d=e[a],g=n?n(d):d;if(d=r||0!==d?d:0,i&&g==g){for(var f=u;f--;)if(t[f]===g)continue e;l.push(d)}else o(t,g,r)||l.push(d)}return l}function k(e,t,n,r,s){var a=-1,o=e.length;for(n||(n=W),s||(s=[]);++a<o;){var i=e[a];t>0&&n(i)?t>1?k(i,t-1,n,r,s):g(s,i):r||(s[s.length]=i)}return s}function $(e){if(!Q(e)||(t=e,S&&S in t))return!1;var t,n=J(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:c;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return $(n)?n:void 0}function W(e){return Y(e)||function(e){return X(e)&&T.call(e,"callee")&&(!R.call(e,"callee")||N.call(e)==a)}(e)||!!(O&&e&&e[O])}M.prototype.clear=function(){this.__data__=w?w(null):{}},M.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},M.prototype.get=function(e){var t=this.__data__;if(w){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},M.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:T.call(t,e)},M.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?r:t,this},L.prototype.clear=function(){this.__data__=[]},L.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():b.call(t,n,1),!0)},L.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},L.prototype.has=function(e){return j(this.__data__,e)>-1},L.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},U.prototype.clear=function(){this.__data__={hash:new M,map:new(x||L),string:new M}},U.prototype.delete=function(e){return B(this,e).delete(e)},U.prototype.get=function(e){return B(this,e).get(e)},U.prototype.has=function(e){return B(this,e).has(e)},U.prototype.set=function(e,t){return B(this,e).set(e,t),this},F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,r),this},F.prototype.has=function(e){return this.__data__.has(e)};var H,q,z=(H=function(e,t){return X(e)?V(e,k(t,1,X,!0)):[]},q=v(void 0===q?H.length-1:q,0),function(){for(var e=arguments,t=-1,n=v(e.length-q,0),r=Array(n);++t<n;)r[t]=e[q+t];t=-1;for(var s=Array(q+1);++t<q;)s[t]=e[t];return s[q]=r,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)}(H,this,s)});var Y=Array.isArray;function K(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}(e.length)&&!J(e)}function X(e){return function(e){return!!e&&"object"==typeof e}(e)&&K(e)}function J(e){var t=Q(e)?N.call(e):"";return t==o||t==i}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=z},174:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m.Symbol,R=I.splice,b=k(m,"Map"),O=k(Object,"create"),v=D?D.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function F(e,t){var n;t=function(e,t){if(W(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||q(e))return!0;return l.test(e)||!c.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:W(n=t)?n:$(n);for(var r=0,s=t.length;null!=e&&r<s;)e=e[B(t[r++])];return r&&r==s?e:void 0}function j(e){if(!H(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=H(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function V(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return j(n)?n:void 0}w.prototype.clear=function(){this.__data__=O?O(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return U(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(b||M),string:new w}},L.prototype.delete=function(e){return V(this,e).delete(e)},L.prototype.get=function(e){return V(this,e).get(e)},L.prototype.has=function(e){return V(this,e).has(e)},L.prototype.set=function(e,t){return V(this,e).set(e,t),this};var $=G((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(q(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function B(e){if("string"==typeof e||q(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function G(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(G.Cache||L),n}G.Cache=L;var W=Array.isArray;function H(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function q(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t,n){var r=null==e?void 0:F(e,t);return void 0===r?n:r}},207:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Arguments]",i="[object Function]",c="[object GeneratorFunction]",l="[object Symbol]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/,p=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,g=/\\(\\)?/g,f=/^\[object .+?Constructor\]$/,m=/^(?:0|[1-9]\d*)$/,y="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,I="object"==typeof self&&self&&self.Object===Object&&self,E=y||I||Function("return this")();var A,_=Array.prototype,S=Function.prototype,C=Object.prototype,T=E["__core-js_shared__"],N=(A=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",P=S.toString,D=C.hasOwnProperty,R=C.toString,b=RegExp("^"+P.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=E.Symbol,v=C.propertyIsEnumerable,x=_.splice,w=W(E,"Map"),M=W(Object,"create"),L=O?O.prototype:void 0,U=L?L.toString:void 0;function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function $(e,t){return null!=e&&D.call(e,t)}function B(e){if(!Q(e)||(t=e,N&&N in t))return!1;var t,n=X(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:f;return n.test(function(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function G(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function W(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return B(n)?n:void 0}function H(e,t,n){var r;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||ee(e))return!0;return d.test(e)||!u.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:K(r=t)?r:q(r);for(var s,i=-1,c=t.length;++i<c;){var l=z(t[i]);if(!(s=null!=e&&n(e,l)))break;e=e[l]}return s||!!(c=e?e.length:0)&&J(c)&&function(e,t){return t=null==t?a:t,!!t&&("number"==typeof e||m.test(e))&&e>-1&&e%1==0&&e<t}(l,c)&&(K(e)||function(e){return function(e){return Z(e)&&function(e){return null!=e&&J(e.length)&&!X(e)}(e)}(e)&&D.call(e,"callee")&&(!v.call(e,"callee")||R.call(e)==o)}(e))}F.prototype.clear=function(){this.__data__=M?M(null):{}},F.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(M){var n=t[e];return n===r?void 0:n}return D.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return M?void 0!==t[e]:D.call(t,e)},F.prototype.set=function(e,t){return this.__data__[e]=M&&void 0===t?r:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,n=k(t,e);return!(n<0)&&(n==t.length-1?t.pop():x.call(t,n,1),!0)},j.prototype.get=function(e){var t=this.__data__,n=k(t,e);return n<0?void 0:t[n][1]},j.prototype.has=function(e){return k(this.__data__,e)>-1},j.prototype.set=function(e,t){var n=this.__data__,r=k(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},V.prototype.clear=function(){this.__data__={hash:new F,map:new(w||j),string:new F}},V.prototype.delete=function(e){return G(this,e).delete(e)},V.prototype.get=function(e){return G(this,e).get(e)},V.prototype.has=function(e){return G(this,e).has(e)},V.prototype.set=function(e,t){return G(this,e).set(e,t),this};var q=Y((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ee(e))return U?U.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return p.test(e)&&n.push(""),e.replace(h,(function(e,t,r,s){n.push(r?s.replace(g,"$1"):t||e)})),n}));function z(e){if("string"==typeof e||ee(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function Y(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(Y.Cache||V),n}Y.Cache=V;var K=Array.isArray;function X(e){var t=Q(e)?R.call(e):"";return t==i||t==c}function J(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function Q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Z(e){return!!e&&"object"==typeof e}function ee(e){return"symbol"==typeof e||Z(e)&&R.call(e)==l}e.exports=function(e,t){return null!=e&&H(e,t,$)}},828:(e,t,n)=>{e=n.nmd(e);var r=9007199254740991,s="[object Arguments]",a="[object Function]",o="[object GeneratorFunction]",i="[object Map]",c="[object Promise]",l="[object Set]",u="[object WeakMap]",d="[object DataView]",p=/^\[object .+?Constructor\]$/,h="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,g="object"==typeof self&&self&&self.Object===Object&&self,f=h||g||Function("return this")(),m=t&&!t.nodeType&&t,y=m&&e&&!e.nodeType&&e,I=y&&y.exports===m;var E,A,_,S=Function.prototype,C=Object.prototype,T=f["__core-js_shared__"],N=(E=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",P=S.toString,D=C.hasOwnProperty,R=C.toString,b=RegExp("^"+P.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),O=I?f.Buffer:void 0,v=C.propertyIsEnumerable,x=O?O.isBuffer:void 0,w=(A=Object.keys,_=Object,function(e){return A(_(e))}),M=q(f,"DataView"),L=q(f,"Map"),U=q(f,"Promise"),F=q(f,"Set"),j=q(f,"WeakMap"),V=!v.call({valueOf:1},"valueOf"),k=Y(M),$=Y(L),B=Y(U),G=Y(F),W=Y(j);function H(e){if(!ee(e)||function(e){return!!N&&N in e}(e))return!1;var t=Z(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?b:p;return t.test(Y(e))}function q(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return H(n)?n:void 0}var z=function(e){return R.call(e)};function Y(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function K(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&J(e)}(e)&&D.call(e,"callee")&&(!v.call(e,"callee")||R.call(e)==s)}(M&&z(new M(new ArrayBuffer(1)))!=d||L&&z(new L)!=i||U&&z(U.resolve())!=c||F&&z(new F)!=l||j&&z(new j)!=u)&&(z=function(e){var t=R.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?Y(n):void 0;if(r)switch(r){case k:return d;case $:return i;case B:return c;case G:return l;case W:return u}return t});var X=Array.isArray;function J(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!Z(e)}var Q=x||function(){return!1};function Z(e){var t=ee(e)?R.call(e):"";return t==a||t==o}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(J(e)&&(X(e)||"string"==typeof e||"function"==typeof e.splice||Q(e)||K(e)))return!e.length;var t=z(e);if(t==i||t==l)return!e.size;if(V||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||C)}(e))return!w(e).length;for(var n in e)if(D.call(e,n))return!1;return!0}},722:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=1,a=2,o=9007199254740991,i="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",y="[object Null]",I="[object Object]",E="[object Promise]",A="[object Proxy]",_="[object RegExp]",S="[object Set]",C="[object String]",T="[object Symbol]",N="[object Undefined]",P="[object WeakMap]",D="[object ArrayBuffer]",R="[object DataView]",b=/^\[object .+?Constructor\]$/,O=/^(?:0|[1-9]\d*)$/,v={};v["[object Float32Array]"]=v["[object Float64Array]"]=v["[object Int8Array]"]=v["[object Int16Array]"]=v["[object Int32Array]"]=v["[object Uint8Array]"]=v["[object Uint8ClampedArray]"]=v["[object Uint16Array]"]=v["[object Uint32Array]"]=!0,v[i]=v[c]=v[D]=v[u]=v[R]=v[d]=v[p]=v[h]=v[f]=v[m]=v[I]=v[_]=v[S]=v[C]=v[P]=!1;var x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,w="object"==typeof self&&self&&self.Object===Object&&self,M=x||w||Function("return this")(),L=t&&!t.nodeType&&t,U=L&&e&&!e.nodeType&&e,F=U&&U.exports===L,j=F&&x.process,V=function(){try{return j&&j.binding&&j.binding("util")}catch(e){}}(),k=V&&V.isTypedArray;function $(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function B(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var W,H,q,z=Array.prototype,Y=Function.prototype,K=Object.prototype,X=M["__core-js_shared__"],J=Y.toString,Q=K.hasOwnProperty,Z=(W=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"",ee=K.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=F?M.Buffer:void 0,re=M.Symbol,se=M.Uint8Array,ae=K.propertyIsEnumerable,oe=z.splice,ie=re?re.toStringTag:void 0,ce=Object.getOwnPropertySymbols,le=ne?ne.isBuffer:void 0,ue=(H=Object.keys,q=Object,function(e){return H(q(e))}),de=Ve(M,"DataView"),pe=Ve(M,"Map"),he=Ve(M,"Promise"),ge=Ve(M,"Set"),fe=Ve(M,"WeakMap"),me=Ve(Object,"create"),ye=Ge(de),Ie=Ge(pe),Ee=Ge(he),Ae=Ge(ge),_e=Ge(fe),Se=re?re.prototype:void 0,Ce=Se?Se.valueOf:void 0;function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function De(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pe;++t<n;)this.add(e[t])}function Re(e){var t=this.__data__=new Ne(e);this.size=t.size}function be(e,t){var n=qe(e),r=!n&&He(e),s=!n&&!r&&ze(e),a=!n&&!r&&!s&&Qe(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!Q.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Be(l,c))||i.push(l);return i}function Oe(e,t){for(var n=e.length;n--;)if(We(e[n][0],t))return n;return-1}function ve(e){return null==e?void 0===e?N:y:ie&&ie in Object(e)?function(e){var t=Q.call(e,ie),n=e[ie];try{e[ie]=void 0;var r=!0}catch(e){}var s=ee.call(e);r&&(t?e[ie]=n:delete e[ie]);return s}(e):function(e){return ee.call(e)}(e)}function xe(e){return Je(e)&&ve(e)==i}function we(e,t,n,r,o){return e===t||(null==e||null==t||!Je(e)&&!Je(t)?e!=e&&t!=t:function(e,t,n,r,o,l){var h=qe(e),g=qe(t),y=h?c:$e(e),E=g?c:$e(t),A=(y=y==i?I:y)==I,N=(E=E==i?I:E)==I,P=y==E;if(P&&ze(e)){if(!ze(t))return!1;h=!0,A=!1}if(P&&!A)return l||(l=new Re),h||Qe(e)?Ue(e,t,n,r,o,l):function(e,t,n,r,o,i,c){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case D:return!(e.byteLength!=t.byteLength||!i(new se(e),new se(t)));case u:case d:case m:return We(+e,+t);case p:return e.name==t.name&&e.message==t.message;case _:case C:return e==t+"";case f:var l=B;case S:var h=r&s;if(l||(l=G),e.size!=t.size&&!h)return!1;var g=c.get(e);if(g)return g==t;r|=a,c.set(e,t);var y=Ue(l(e),l(t),r,o,i,c);return c.delete(e),y;case T:if(Ce)return Ce.call(e)==Ce.call(t)}return!1}(e,t,y,n,r,o,l);if(!(n&s)){var b=A&&Q.call(e,"__wrapped__"),O=N&&Q.call(t,"__wrapped__");if(b||O){var v=b?e.value():e,x=O?t.value():t;return l||(l=new Re),o(v,x,n,r,l)}}if(!P)return!1;return l||(l=new Re),function(e,t,n,r,a,o){var i=n&s,c=Fe(e),l=c.length,u=Fe(t),d=u.length;if(l!=d&&!i)return!1;var p=l;for(;p--;){var h=c[p];if(!(i?h in t:Q.call(t,h)))return!1}var g=o.get(e);if(g&&o.get(t))return g==t;var f=!0;o.set(e,t),o.set(t,e);var m=i;for(;++p<l;){var y=e[h=c[p]],I=t[h];if(r)var E=i?r(I,y,h,t,e,o):r(y,I,h,e,t,o);if(!(void 0===E?y===I||a(y,I,n,r,o):E)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var A=e.constructor,_=t.constructor;A==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof _&&_ instanceof _||(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,o,l)}(e,t,n,r,we,o))}function Me(e){return!(!Xe(e)||function(e){return!!Z&&Z in e}(e))&&(Ye(e)?te:b).test(Ge(e))}function Le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return ue(e);var t,n,r,s=[];for(var a in Object(e))Q.call(e,a)&&"constructor"!=a&&s.push(a);return s}function Ue(e,t,n,r,o,i){var c=n&s,l=e.length,u=t.length;if(l!=u&&!(c&&u>l))return!1;var d=i.get(e);if(d&&i.get(t))return d==t;var p=-1,h=!0,g=n&a?new De:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var f=e[p],m=t[p];if(r)var y=c?r(m,f,p,t,e,i):r(f,m,p,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(g){if(!$(t,(function(e,t){if(s=t,!g.has(s)&&(f===e||o(f,e,n,r,i)))return g.push(t);var s}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function Fe(e){return function(e,t,n){var r=t(e);return qe(e)?r:function(e,t){for(var n=-1,r=t.length,s=e.length;++n<r;)e[s+n]=t[n];return e}(r,n(e))}(e,Ze,ke)}function je(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Me(n)?n:void 0}Te.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},Te.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Te.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Te.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Te.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?r:t,this},Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(e){var t=this.__data__,n=Oe(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Ne.prototype.get=function(e){var t=this.__data__,n=Oe(t,e);return n<0?void 0:t[n][1]},Ne.prototype.has=function(e){return Oe(this.__data__,e)>-1},Ne.prototype.set=function(e,t){var n=this.__data__,r=Oe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Te,map:new(pe||Ne),string:new Te}},Pe.prototype.delete=function(e){var t=je(this,e).delete(e);return this.size-=t?1:0,t},Pe.prototype.get=function(e){return je(this,e).get(e)},Pe.prototype.has=function(e){return je(this,e).has(e)},Pe.prototype.set=function(e,t){var n=je(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},De.prototype.add=De.prototype.push=function(e){return this.__data__.set(e,r),this},De.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.clear=function(){this.__data__=new Ne,this.size=0},Re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Re.prototype.get=function(e){return this.__data__.get(e)},Re.prototype.has=function(e){return this.__data__.has(e)},Re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pe(r)}return n.set(e,t),this.size=n.size,this};var ke=ce?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,s=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[s++]=o)}return a}(ce(e),(function(t){return ae.call(e,t)})))}:function(){return[]},$e=ve;function Be(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||O.test(e))&&e>-1&&e%1==0&&e<t}function Ge(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function We(e,t){return e===t||e!=e&&t!=t}(de&&$e(new de(new ArrayBuffer(1)))!=R||pe&&$e(new pe)!=f||he&&$e(he.resolve())!=E||ge&&$e(new ge)!=S||fe&&$e(new fe)!=P)&&($e=function(e){var t=ve(e),n=t==I?e.constructor:void 0,r=n?Ge(n):"";if(r)switch(r){case ye:return R;case Ie:return f;case Ee:return E;case Ae:return S;case _e:return P}return t});var He=xe(function(){return arguments}())?xe:function(e){return Je(e)&&Q.call(e,"callee")&&!ae.call(e,"callee")},qe=Array.isArray;var ze=le||function(){return!1};function Ye(e){if(!Xe(e))return!1;var t=ve(e);return t==h||t==g||t==l||t==A}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Je(e){return null!=e&&"object"==typeof e}var Qe=k?function(e){return function(t){return e(t)}}(k):function(e){return Je(e)&&Ke(e.length)&&!!v[ve(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Ye(t)?be(e):Le(e);var t}e.exports=function(e,t){return we(e,t)}},431:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",s=9007199254740991,a="[object Arguments]",o="[object AsyncFunction]",i="[object Function]",c="[object GeneratorFunction]",l="[object Null]",u="[object Object]",d="[object Proxy]",p="[object Undefined]",h=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[a]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[i]=f["[object Map]"]=f["[object Number]"]=f[u]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&e&&!e.nodeType&&e,_=A&&A.exports===E,S=_&&m.process,C=function(){try{var e=A&&A.require&&A.require("util").types;return e||S&&S.binding&&S.binding("util")}catch(e){}}(),T=C&&C.isTypedArray;var N,P,D,R=Array.prototype,b=Function.prototype,O=Object.prototype,v=I["__core-js_shared__"],x=b.toString,w=O.hasOwnProperty,M=(N=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"",L=O.toString,U=x.call(Object),F=RegExp("^"+x.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=_?I.Buffer:void 0,V=I.Symbol,k=I.Uint8Array,$=j?j.allocUnsafe:void 0,B=(P=Object.getPrototypeOf,D=Object,function(e){return P(D(e))}),G=Object.create,W=O.propertyIsEnumerable,H=R.splice,q=V?V.toStringTag:void 0,z=function(){try{var e=Ee(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=j?j.isBuffer:void 0,K=Math.max,X=Date.now,J=Ee(I,"Map"),Q=Ee(Object,"create"),Z=function(){function e(){}return function(t){if(!ve(t))return{};if(G)return G(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function re(e){var t=this.__data__=new te(e);this.size=t.size}function se(e,t){var n=Pe(e),r=!n&&Ne(e),s=!n&&!r&&Re(e),a=!n&&!r&&!s&&we(e),o=n||r||s||a,i=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=i.length;for(var l in e)!t&&!w.call(e,l)||o&&("length"==l||s&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,c))||i.push(l);return i}function ae(e,t,n){(void 0!==n&&!Te(e[t],n)||void 0===n&&!(t in e))&&ce(e,t,n)}function oe(e,t,n){var r=e[t];w.call(e,t)&&Te(r,n)&&(void 0!==n||t in e)||ce(e,t,n)}function ie(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ce(e,t,n){"__proto__"==t&&z?z(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}ee.prototype.clear=function(){this.__data__=Q?Q(null):{},this.size=0},ee.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee.prototype.get=function(e){var t=this.__data__;if(Q){var n=t[e];return n===r?void 0:n}return w.call(t,e)?t[e]:void 0},ee.prototype.has=function(e){var t=this.__data__;return Q?void 0!==t[e]:w.call(t,e)},ee.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Q&&void 0===t?r:t,this},te.prototype.clear=function(){this.__data__=[],this.size=0},te.prototype.delete=function(e){var t=this.__data__,n=ie(t,e);return!(n<0)&&(n==t.length-1?t.pop():H.call(t,n,1),--this.size,!0)},te.prototype.get=function(e){var t=this.__data__,n=ie(t,e);return n<0?void 0:t[n][1]},te.prototype.has=function(e){return ie(this.__data__,e)>-1},te.prototype.set=function(e,t){var n=this.__data__,r=ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(J||te),string:new ee}},ne.prototype.delete=function(e){var t=Ie(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return Ie(this,e).get(e)},ne.prototype.has=function(e){return Ie(this,e).has(e)},ne.prototype.set=function(e,t){var n=Ie(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var le,ue=function(e,t,n){for(var r=-1,s=Object(e),a=n(e),o=a.length;o--;){var i=a[le?o:++r];if(!1===t(s[i],i,s))break}return e};function de(e){return null==e?void 0===e?p:l:q&&q in Object(e)?function(e){var t=w.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(e){}var s=L.call(e);r&&(t?e[q]=n:delete e[q]);return s}(e):function(e){return L.call(e)}(e)}function pe(e){return xe(e)&&de(e)==a}function he(e){return!(!ve(e)||function(e){return!!M&&M in e}(e))&&(be(e)?F:h).test(function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=_e(e),n=[];for(var r in e)("constructor"!=r||!t&&w.call(e,r))&&n.push(r);return n}function fe(e,t,n,r,s){e!==t&&ue(t,(function(a,o){if(s||(s=new re),ve(a))!function(e,t,n,r,s,a,o){var i=Se(e,n),c=Se(t,n),l=o.get(c);if(l)return void ae(e,n,l);var d=a?a(i,c,n+"",e,t,o):void 0,p=void 0===d;if(p){var h=Pe(c),g=!h&&Re(c),f=!h&&!g&&we(c);d=c,h||g||f?Pe(i)?d=i:xe(A=i)&&De(A)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n<r;)t[n]=e[n];return t}(i):g?(p=!1,d=function(e,t){if(t)return e.slice();var n=e.length,r=$?$(n):new e.constructor(n);return e.copy(r),r}(c,!0)):f?(p=!1,m=c,y=!0?(I=m.buffer,E=new I.constructor(I.byteLength),new k(E).set(new k(I)),E):m.buffer,d=new m.constructor(y,m.byteOffset,m.length)):d=[]:function(e){if(!xe(e)||de(e)!=u)return!1;var t=B(e);if(null===t)return!0;var n=w.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&x.call(n)==U}(c)||Ne(c)?(d=i,Ne(i)?d=function(e){return function(e,t,n,r){var s=!n;n||(n={});var a=-1,o=t.length;for(;++a<o;){var i=t[a],c=r?r(n[i],e[i],i,n,e):void 0;void 0===c&&(c=e[i]),s?ce(n,i,c):oe(n,i,c)}return n}(e,Me(e))}(i):ve(i)&&!be(i)||(d=function(e){return"function"!=typeof e.constructor||_e(e)?{}:Z(B(e))}(c))):p=!1}var m,y,I,E;var A;p&&(o.set(c,d),s(d,c,r,a,o),o.delete(c));ae(e,n,d)}(e,t,o,n,fe,r,s);else{var i=r?r(Se(e,o),a,o+"",e,t,s):void 0;void 0===i&&(i=a),ae(e,o,i)}}),Me)}function me(e,t){return Ce(function(e,t,n){return t=K(void 0===t?e.length-1:t,0),function(){for(var r=arguments,s=-1,a=K(r.length-t,0),o=Array(a);++s<a;)o[s]=r[t+s];s=-1;for(var i=Array(t+1);++s<t;)i[s]=r[s];return i[t]=n(o),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)}(e,this,i)}}(e,t,Fe),e+"")}var ye=z?function(e,t){return z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Fe;function Ie(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function Ee(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return he(n)?n:void 0}function Ae(e,t){var n=typeof e;return!!(t=null==t?s:t)&&("number"==n||"symbol"!=n&&g.test(e))&&e>-1&&e%1==0&&e<t}function _e(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||O)}function Se(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ce=function(e){var t=0,n=0;return function(){var r=X(),s=16-(r-n);if(n=r,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ye);function Te(e,t){return e===t||e!=e&&t!=t}var Ne=pe(function(){return arguments}())?pe:function(e){return xe(e)&&w.call(e,"callee")&&!W.call(e,"callee")},Pe=Array.isArray;function De(e){return null!=e&&Oe(e.length)&&!be(e)}var Re=Y||function(){return!1};function be(e){if(!ve(e))return!1;var t=de(e);return t==i||t==c||t==o||t==d}function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=s}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function xe(e){return null!=e&&"object"==typeof e}var we=T?function(e){return function(t){return e(t)}}(T):function(e){return xe(e)&&Oe(e.length)&&!!f[de(e)]};function Me(e){return De(e)?se(e,!0):ge(e)}var Le,Ue=(Le=function(e,t,n,r){fe(e,t,n,r)},me((function(e,t){var n=-1,r=t.length,s=r>1?t[r-1]:void 0,a=r>2?t[2]:void 0;for(s=Le.length>3&&"function"==typeof s?(r--,s):void 0,a&&function(e,t,n){if(!ve(n))return!1;var r=typeof t;return!!("number"==r?De(n)&&Ae(t,n.length):"string"==r&&t in n)&&Te(n[t],e)}(t[0],t[1],a)&&(s=r<3?void 0:s,r=1),e=Object(e);++n<r;){var o=t[n];o&&Le(e,o,n,s)}return e})));function Fe(e){return e}e.exports=Ue},8:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a=9007199254740991,o="[object Function]",i="[object GeneratorFunction]",c="[object Symbol]",l=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/,d=/^\./,p=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,h=/\\(\\)?/g,g=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,y="object"==typeof self&&self&&self.Object===Object&&self,I=m||y||Function("return this")();var E,A=Array.prototype,_=Function.prototype,S=Object.prototype,C=I["__core-js_shared__"],T=(E=/[^.]+$/.exec(C&&C.keys&&C.keys.IE_PROTO||""))?"Symbol(src)_1."+E:"",N=_.toString,P=S.hasOwnProperty,D=S.toString,R=RegExp("^"+N.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=I.Symbol,O=A.splice,v=G(I,"Map"),x=G(Object,"create"),w=b?b.prototype:void 0,M=w?w.toString:void 0;function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function F(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e,t,n){var r=e[t];P.call(e,t)&&Y(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function V(e,t){for(var n=e.length;n--;)if(Y(e[n][0],t))return n;return-1}function k(e){if(!X(e)||(t=e,T&&T in t))return!1;var t,n=function(e){var t=X(e)?D.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?R:g;return n.test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function $(e,t,n,r){if(!X(e))return e;t=function(e,t){if(K(e))return!1;var n=typeof e;if("number"==n||"symbol"==n||"boolean"==n||null==e||J(e))return!0;return u.test(e)||!l.test(e)||null!=t&&e in Object(t)}(t,e)?[t]:function(e){return K(e)?e:H(e)}(t);for(var s=-1,a=t.length,o=a-1,i=e;null!=i&&++s<a;){var c=q(t[s]),d=n;if(s!=o){var p=i[c];void 0===(d=r?r(p,c,i):void 0)&&(d=X(p)?p:W(t[s+1])?[]:{})}j(i,c,d),i=i[c]}return e}function B(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return k(n)?n:void 0}function W(e,t){return!!(t=null==t?a:t)&&("number"==typeof e||f.test(e))&&e>-1&&e%1==0&&e<t}L.prototype.clear=function(){this.__data__=x?x(null):{}},L.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},L.prototype.get=function(e){var t=this.__data__;if(x){var n=t[e];return n===r?void 0:n}return P.call(t,e)?t[e]:void 0},L.prototype.has=function(e){var t=this.__data__;return x?void 0!==t[e]:P.call(t,e)},L.prototype.set=function(e,t){return this.__data__[e]=x&&void 0===t?r:t,this},U.prototype.clear=function(){this.__data__=[]},U.prototype.delete=function(e){var t=this.__data__,n=V(t,e);return!(n<0)&&(n==t.length-1?t.pop():O.call(t,n,1),!0)},U.prototype.get=function(e){var t=this.__data__,n=V(t,e);return n<0?void 0:t[n][1]},U.prototype.has=function(e){return V(this.__data__,e)>-1},U.prototype.set=function(e,t){var n=this.__data__,r=V(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},F.prototype.clear=function(){this.__data__={hash:new L,map:new(v||U),string:new L}},F.prototype.delete=function(e){return B(this,e).delete(e)},F.prototype.get=function(e){return B(this,e).get(e)},F.prototype.has=function(e){return B(this,e).has(e)},F.prototype.set=function(e,t){return B(this,e).set(e,t),this};var H=z((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(J(e))return M?M.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return d.test(e)&&n.push(""),e.replace(p,(function(e,t,r,s){n.push(r?s.replace(h,"$1"):t||e)})),n}));function q(e){if("string"==typeof e||J(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function z(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(z.Cache||F),n}function Y(e,t){return e===t||e!=e&&t!=t}z.Cache=F;var K=Array.isArray;function X(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function J(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&D.call(e)==c}e.exports=function(e,t,n){return null==e?e:$(e,t,n)}},795:(e,t,n)=>{var r="__lodash_hash_undefined__",s=1/0,a="[object Function]",o="[object GeneratorFunction]",i="[object Symbol]",c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,u=/^\./,d=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,g="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,f="object"==typeof self&&self&&self.Object===Object&&self,m=g||f||Function("return this")();var y,I=Array.prototype,E=Function.prototype,A=Object.prototype,_=m["__core-js_shared__"],S=(y=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",C=E.toString,T=A.hasOwnProperty,N=A.toString,P=RegExp("^"+C.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),D=m.Symbol,R=I.splice,b=$(m,"Map"),O=$(Object,"create"),v=D?D.prototype:void 0,x=v?v.toString:void 0;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function M(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function L(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function U(e,t){for(var n,r,s=e.length;s--;)if((n=e[s][0])===(r=t)||n!=n&&r!=r)return s;return-1}function F(e){if(!z(e)||(t=e,S&&S in t))return!1;var t,n=function(e){var t=z(e)?N.call(e):"";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?P:h;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function j(e,t){e=function(e,t){return 1==t.length?e:function(e,t){for(var n=0,r=(t=B(t,e)?[t]:V(t)).length;null!=e&&n<r;)e=e[W(t[n++])];return n&&n==r?e:void 0}(e,function(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(s);++r<s;)a[r]=e[r+t];return a}(t,0,-1))}(e,t=B(t,e)?[t]:V(t));var n,r,s=W((r=(n=t)?n.length:0)?n[r-1]:void 0);return!(null!=e&&T.call(e,s))||delete e[s]}function V(e){return q(e)?e:G(e)}function k(e,t){var n,r,s=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?s["string"==typeof t?"string":"hash"]:s.map}function $(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return F(n)?n:void 0}function B(e,t){if(q(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Y(e))||(l.test(e)||!c.test(e)||null!=t&&e in Object(t))}w.prototype.clear=function(){this.__data__=O?O(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t=this.__data__;if(O){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return O?void 0!==t[e]:T.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=O&&void 0===t?r:t,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(e){var t=this.__data__,n=U(t,e);return!(n<0)&&(n==t.length-1?t.pop():R.call(t,n,1),!0)},M.prototype.get=function(e){var t=this.__data__,n=U(t,e);return n<0?void 0:t[n][1]},M.prototype.has=function(e){return U(this.__data__,e)>-1},M.prototype.set=function(e,t){var n=this.__data__,r=U(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},L.prototype.clear=function(){this.__data__={hash:new w,map:new(b||M),string:new w}},L.prototype.delete=function(e){return k(this,e).delete(e)},L.prototype.get=function(e){return k(this,e).get(e)},L.prototype.has=function(e){return k(this,e).has(e)},L.prototype.set=function(e,t){return k(this,e).set(e,t),this};var G=H((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(Y(e))return x?x.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}(t);var n=[];return u.test(e)&&n.push(""),e.replace(d,(function(e,t,r,s){n.push(r?s.replace(p,"$1"):t||e)})),n}));function W(e){if("string"==typeof e||Y(e))return e;var t=e+"";return"0"==t&&1/e==-s?"-0":t}function H(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,s=t?t.apply(this,r):r[0],a=n.cache;if(a.has(s))return a.get(s);var o=e.apply(this,r);return n.cache=a.set(s,o),o};return n.cache=new(H.Cache||L),n}H.Cache=L;var q=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Y(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&N.call(e)==i}e.exports=function(e,t){return null==e||j(e,t)}},386:e=>{class t{constructor(e,t,n,r,s){this.converter=c(),this.width=e,this.poly=t,this.xor_in=n,this.reflected_xor_in=l(n,e),this.xor_out=r,this.reflect=s,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:r,crc_shift:s,mask:a}=this;if(this.reflect){t=this.reflected_xor_in;for(let r=0;r<e.length;r++){t=(n[255&(t^e[r])]^t>>>8)&a}}else{t=this.shifted_xor_in;for(let o=0;o<e.length;o++)t=n[255&(t>>r-8+s^e[o])]<<s^t<<8-s&a<<s;t>>=s}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 r=e[n];this.reflect&&(r=l(r,8));for(let e=0;e<8;e++){let n=t&this.msb_mask;r&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,r=e.length>>n,s=1<<n,a="";for(let o=0;o<r;o++){let r="";for(let a=0;a<s;a++){let s=e[o<<n|a];s="000000000"+s.toString(16),s=s.substr(s.length-t),r+="0x"+s+", "}a+=" "+r+"\n"}return a="[\n"+a.slice(0,-3)+"\n]",a}}const n="undefined"!=typeof Buffer,r="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,s=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%s)),e/=s;return this.fromByteArray(t)}default:if(n&&Buffer.isBuffer(e))return e;if(r){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(r&&(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 r=0;r<t;r++)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,r,s,a){let o=new t(e,n,r,s,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)}},849: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=849,e.exports=t}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e](a,a.exports,s),a.loaded=!0,a.exports}s.m=n,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>"js/"+e+"-web.js",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="constellation-corejs-library:",s.l=(n,r,a,o)=>{if(e[n])e[n].push(r);else{var i,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==n||d.getAttribute("data-webpack")==t+a){i=d;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,s.nc&&i.setAttribute("nonce",s.nc),i.setAttribute("data-webpack",t+a),i.src=n),e[n]=[r];var p=(t,r)=>{i.onerror=i.onload=null,clearTimeout(h);var s=e[n];if(delete e[n],i.parentNode&&i.parentNode.removeChild(i),s&&s.forEach((e=>e(r))),t)return t(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),c&&document.head.appendChild(i)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{var e={290:0};s.f.j=(t,n)=>{var r=s.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var a=new Promise(((n,s)=>r=e[t]=[n,s]));n.push(r[2]=a);var o=s.p+s.u(t),i=new Error;s.l(o,(n=>{if(s.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var a=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+o+")",i.name="ChunkLoadError",i.type=a,i.request=o,r[1](i)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,a,[o,i,c]=n,l=0;if(o.some((t=>0!==e[t]))){for(r in i)s.o(i,r)&&(s.m[r]=i[r]);if(c)c(s)}for(t&&t(n);l<o.length;l++)a=o[l],s.o(e,a)&&e[a]&&e[a][0](),e[a]=0},n=self.webpackChunkconstellation_corejs_library=self.webpackChunkconstellation_corejs_library||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";var e={};s.r(e),s.d(e,{buildContextName:()=>H,buildModalContext:()=>K,buildTransientContextName:()=>q,getContainerIdFromContext:()=>J,getParentContext:()=>X,getParentContextName:()=>W,getTargetFromContext:()=>Y,getTransientContext:()=>z});var t={};s.r(t),s.d(t,{getResolvedTargetName:()=>mt,getRoutingInfo:()=>yt,getSemanticURLFromRoutingInfo:()=>It});var n={};s.r(n),s.d(n,{evaluate:()=>Yt,handleChange:()=>qt,hasDeclareExpression:()=>Ht,updateDeclareExpressions:()=>zt});var r={};s.r(r),s.d(r,{publishExpressions:()=>vr,publishResponse:()=>xr});var a={};s.r(a),s.d(a,{hasBrowserEnv:()=>Aa,hasStandardBrowserEnv:()=>_a,hasStandardBrowserWebWorkerEnv:()=>Ca,origin:()=>Ta});var o={};s.r(o),s.d(o,{CONTAINER_NAMES:()=>td,CONTAINER_TYPES:()=>ed,addRootContainerItem:()=>xd,areContainerItemsPresent:()=>id,clearTransientData:()=>jd,closeContainerItem:()=>vd,getActiveContainerItemContext:()=>md,getActiveContainerItemIDFromRoutingInfo:()=>Xd,getActiveContainerItemName:()=>pd,getActiveContext:()=>qd,getChildContainerItems:()=>yd,getChildContainers:()=>Id,getChildContainersContexts:()=>Ed,getContainerAPI:()=>$d,getContainerAccessOrder:()=>od,getContainerData:()=>rd,getContainerItemData:()=>sd,getContainerItemName:()=>ld,getContainerItems:()=>ad,getContainerLimit:()=>Td,getContainerParentContext:()=>Kd,getContainerType:()=>dd,getContextByTargetAndKey:()=>Yd,getDataContextName:()=>fd,getFlowContainer:()=>Qd,getLeastRecentlyUsedNonDirtyContainerItemID:()=>bd,getParentContainerItem:()=>Jd,getRootContainerName:()=>Hd,getSuggestionContexts:()=>Ad,getTargetFromContainerItemID:()=>Od,getTransientItems:()=>Ld,hasContainerItems:()=>Cd,isContainerDirty:()=>Rd,isContainerInitialized:()=>ud,isContainerItemActive:()=>hd,isContainerItemContextBeingUsedInOtherContainers:()=>Md,isContainerItemExists:()=>cd,isContainerLimitReached:()=>Pd,isContainerMultipleMode:()=>Sd,isContainerSingleMode:()=>_d,purgeTransientData:()=>Vd,removeContainer:()=>Bd,replaceTransientData:()=>Fd,resetContainersPayload:()=>Dd,setContainerLimit:()=>Nd,updateCaseContextEtag:()=>Wd,updateParentLastUpdateTime:()=>zd,updateRelatedContextEtag:()=>Gd,updateTransientData:()=>Ud});var i={};s.r(i),s.d(i,{getAdditionalInfo:()=>Xp,getDataPageKeys:()=>zp,getDataPageMetadata:()=>Vp,getEmbeddedPropertyMetadata:()=>xp,getFieldParameters:()=>Gp,getFieldsByClassName:()=>Bp,getGenAICoach:()=>Hp,getInsight:()=>$p,getLookUpDataPage:()=>Yp,getLookUpDataPageInfo:()=>Kp,getParagraph:()=>Wp,getPersonalizationMetadata:()=>kp,getPropertyMetadata:()=>vp,getResolvedFieldMetadata:()=>Jp,getSavableDataPage:()=>qp,isViewExists:()=>Fp,mergeStore:()=>Op,resolveNavigation:()=>jp,resolveView:()=>Up,updateNavigationStore:()=>Mp,updateStores:()=>Lp,updateViewStore:()=>wp});var c={};s.r(c),s.d(c,{dispatch:()=>sh,getActionType:()=>dh,getContextValue:()=>lh,getDataObject:()=>ah,getReferenceTokens:()=>th,getSharedDataObject:()=>oh,getStore:()=>rh,getValue:()=>ch,isMergeable:()=>hh,lookupContextValue:()=>uh,mergeDeep:()=>gh,removeItem:()=>ph,replaceValue:()=>mh,resetStore:()=>yh,setStore:()=>nh,updateValue:()=>fh});var l={};s.r(l),s.d(l,{activateContainerItem:()=>zh,addContainerItem:()=>Fh,addMessages:()=>Yh,addSharedData:()=>sg,addTransientItem:()=>jh,addWork:()=>wh,clearTransientData:()=>kh,createWork:()=>Dh,error:()=>rg,finishAssignment:()=>Zh,initContainers:()=>Lh,listAction:()=>og,loadView:()=>vh,mergeData:()=>bh,openAssignment:()=>eg,openWorkByHandle:()=>Mh,postProcess:()=>ng,purgeTransientData:()=>Bh,removeAllTransientItems:()=>Xh,removeContainerItem:()=>Kh,removeSharedData:()=>ag,removeTransientItem:()=>Jh,replaceContainerItem:()=>Qh,replaceTransientData:()=>$h,resetContainers:()=>Uh,resetLoading:()=>Hh,setLoading:()=>Wh,setSharedProperty:()=>cg,setStateProperty:()=>lg,showCasePreview:()=>ig,showHarness:()=>Oh,showHistory:()=>tg,showPage:()=>xh,upMergeAndRemoveContainerItem:()=>qh,updateContainerItem:()=>Gh,updateTransientData:()=>Vh});var u={};s.r(u),s.d(u,{doesRestApiExist:()=>Bm,getCancelTokenSource:()=>Gm,getCaseApi:()=>qm,getHeaderProcessor:()=>Vm,invokeCustomRestApi:()=>$m,invokeRestApi:()=>km,isRequestCanceled:()=>Wm,registerInterceptor:()=>Hm});var d={};s.r(d),s.d(d,{fetchViewResources:()=>DE,updateViewResources:()=>PE});var p=s(722),h=s.n(p);let g,f,m;const y=e=>{e&&(g=e=e||{"base-server":"http://localhost:1080/prweb/","data-end-point":"api/v1/stream/data","action-end-point":"api/v1/stream/action"},g.BASEURL=e.server,g.ACTIONURL=e["action-end-point"],g.DATAURL=e["data-end-point"],m=e.reAuthUrl)},I=()=>m,E=()=>g.BASEURL,A=e=>fetch(`${g.BASEURL}${g.ACTIONURL}`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),_=e=>{f=e},S=()=>f;var C=s(386),T=s(795),N=s.n(T),P=s(207),D=s.n(P),R=s(174),b=s.n(R),O=s(8),v=s.n(O),x=s(431),w=s.n(x),M=s(828),L=s.n(M);const U=new class{constructor(){this.needsMapping=!1}getNeedsMapping(){return this.needsMapping}setNeedsMapping(e){this.needsMapping=e}map(e){return this.needsMapping?this.replacer(e):e}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}},F={APP:{APP:"app",ROOT:"root",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"},RESOURCE_STATUS:{CREATE:"CREATE",UPDATE:"UPDATE",OPEN_FLOW_ACTION:"OPEN_FLOW_ACTION"},VIEW_NAMES:{PY_CASE_TAB:"pyCaseTab",DATA_OBJECT_CREATE_VIEW:"Create",DATA_OBJECT_EDIT_VIEW:"pyEdit",PY_DATA_PREVIEW:"pyDataPreview",PY_DETAILS:"pyDetails"},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:"D_pyGetUserWorkListByUserId",D__WORK_BASKET:"D_WorkBasket",D__PY_MY_WORK_LIST:"D_pyMyWorkList"}},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:"pzCreateDetails",PREVIEW_VIEW_NAME:"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_CONTENT:"dataInfo.content"},CASE_INFO:{CASE_INFO:"caseInfo",CASE_INFO_CONTENT:"caseInfo.content",CASE_INFO_NAME:"caseInfo.name",CASE_INFO_ID:"caseInfo.ID",CASE_INFO_CLASSID:"caseInfo.content.classID",CASE_TYPE_ID:"caseInfo.caseTypeID",CASE_TYPE_NAME:"caseInfo.caseTypeName",CASE_INFO_PZINSKEY:"caseInfo.content.pzInsKey",CASE_INFO_ACTIONS:"caseInfo.availableActions",VIEW_NAME:"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:"caseInfo.content.pyApprovalResult",DUPLICATECASEFLAG:"caseInfo.content.pyDuplicateCaseActions",DUPLICATECASEID:"caseInfo.content.pyDuplicateID",DUPLICATECASEINSKEY:"caseInfo.content.pyDuplicateCaseReference.pzInsKey",HEADERS:"caseInfo.headers",PARENTCASEINFO:"caseInfo.parentCaseInfo",REMOTESYSTEMID:"caseInfo.headers.RemoteSystemID",CASE_RELATED_CASE_TYPES:"caseInfo.relatedCaseTypes",CASES:"caseInfo.cases",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"},ACTIONS:{ACTION_ID:"actionID",ACTIONS:"availableActions",DELETEAVIALACTIONS:"deleteAvailActions",FLOWACTION:"FlowAction",DATA_PAGES:{D_PY_ADDITIONAL_CASE_ACTIONS:"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:"pyTransferAssignment"},CONTENT:"content",MODAL:"modal",STOPMERGEACTIONS:"stopMergeActions",IS_CREATE_DATA_OBJECT:"isCreateDataObject",SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME:"context_data.caseInfo.content.summary_of_assignment__.lastSubmitTime",SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME:"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",MESSAGES:{MESSAGES_TYPE_SUCCESS:"success",MESSAGES_TYPE_INFO:"info",MESSAGES_TYPE_ERROR:"error"},PUB_SUB_EVENTS:{EVENT_RENDER_APP:"renderApp",EVENT_REAUTH:"reAuth",EVENT_FULL_REAUTH:"fullReAuth",EVENT_CUSTOM_REAUTH:"customReAuth",EVENT_CANCEL:"cancel",EVENT_MINIMIZE:"minimize",EVENT_EXPRESS_LOCALACTION:"expressLocalActionSubmit",EVENT_BULKACTION:"bulkActionSubmit",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_LOGOFF:"Logoff",EVENT_TRANSIENT_ITEMS:{UPDATE_PROMOTED_FILTERS:"updatePromotedFilters"},UI_EVENTS:{SHOW_PAGE_INIT:"showPageInit",SHOW_PAGE_DONE:"showPageDone",SHOW_PAGE_STARTED:"showPageStarted"},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_CLOSED:"caseClosed",ASSIGNMENT_OPENED:"assignmentOpened",CASE_PREVIEW:"casePreview",CURRENT_ASSIGNMENT_UPDATED:"currentAssignmentUpdated",CASE_LOCK_EVENT:"caseLockEvent"},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",DATA_EVENTS:{DATA_OBJECT_CREATED:"dataObjectCreated",DATA_OBJECT_DELETED:"dataObjectDeleted",DATA_OBJECT_UPDATED:"dataObjectUpdated"},FETCH_SUCCESS:"fetchSuccess",REVERSE_COEXISTENCE_EVENTS:{HANDLE_DISCARD:"handleDiscard",CHECK_IS_FORM_DIRTY:"checkIsFormDirty"},TIMEOUT_REMINDER:"sessionAboutToTimeout",RESET_TIMER:"resetInactivityTimer"},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"},PROMISE_VALUE:{RESOLVE:"resolve",REJECT:"reject"},APP_TYPE:{UIKIT:"uikit",THEME_COSMOS:"themecosmos"},VIEW_TYPE:{PY_EMBEDASSIGNMENT:"pyEmbedAssignment",PY_DETAILS:"pyDetails"},START_PERFORMANCE_LOG:"start-performance-log",STOP_PERFORMANCE_LOG:"stop-performance-log",TOP_ACTION_LABEL:{CREATEWORK:"Create-Work",OPENASSIGNMENT:"Open-Assignment",OPENWORKBYHANDLE:"Open-Work-By-Handle",SAVEANDCLOSE:"Save-And-Close",SHOWDATA:"Show-Data",FINISHASSIGNMENT:"Finish-Assignment",GETDESCENDANTS:"Get-Descendants"}},j={CONTEXT:"context",AJAXCONTAINER:"primary",VIEW_CONTAINER:"ViewContainer",APP_SHELL:"AppShell",ROOT_CONTAINER:"RootContainer",HYBRID_VIEW_CONTAINER:"HybridViewContainer",MODAL_VIEW_CONTAINER:"ModalViewContainer",FLOW_CONTAINER:"FlowContainer",PREVIEW_VIEW_CONTAINER:"PreviewViewContainer",OBJECT_PAGE:"ObjectPage",CASE_CREATE_STAGE:"CaseCreateStage",CASE_VIEW:"CaseView",VIEW:"view",CASE_PREVIEW:"CasePreview",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",ACPRIMARY_NAME:"ACPRIMARY",ACTERTIARY_NAME:"ACTERTIARY",THREADNAMESEPARATOR:"/",JOINCHARACTER:"_",FORWARD_SLASH_STRING:"/",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_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",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",ERROR_FIELD_IN_PAGE:"erroneousInputOutputFieldInPage",ERROR_IN_PAGE_IDENTIFIER:"erroneousInputOutputIdentifier",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",DATA:"data",OPTIONS:"options",VIEWS:"uiResources.resources.views",NAVIGATIONS:"uiResources.resources.navigations",COMPONENTS:"uiResources.components",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",ASSOCIATED_PROPERTY_ANNOTATION:"@ASSOCIATED",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:"pyDetails",LIST_ACTIONS:{INSERT:"INSERT",UPDATE:"UPDATE",DELETE:"DELETE",DELETE_ALL:"DELETE ALL",MOVE:"MOVE",SELECT:"SELECT",DESELECT:"DESELECT"},LIST_ACTIONS_TYPE:{SELECT_DESELECT:"SELECT_DESELECT",DESELECT_ALL:"DESELECT_ALL"},ENV_INFO_KEYS:{APPLICATION_NAME:"APPLICATION_NAME",APPLICATION_DESC:"APPLICATION_DESC",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",CONTEXT_DATA_MODAL_VIEW:{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"},DATA_CLASS_NOT_FOUND:"Data object class not found",PRIORITY:{CRITICAL:100,HIGH:500,MEDIUM:1e3,LOW:2e3,TRIVIAL:3e3},...F,getProperty:e=>U.map(e)},V="pyRemoteCaseDetails";class k{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=>Ch.getProperty(".RemoteSystemID",j.CASE_INFO.HEADERS,e);static getRemoteHeader=e=>this.remoteCaseMapping[e]?.RemoteSystemID;static injectRemoteCaseHeader=(e,t,n)=>{if(e&&e.RemoteSystemID)return;const r=this.getRemoteHeaderByContext(n);r?e.RemoteSystemID=r:t&&this.isRemoteCase(t.caseTypeID)&&(e.RemoteSystemID=this.getRemoteHeader(t.caseTypeID))};static isTraditionalRemoteCase=(e="")=>"Traditional"===k.getRemoteCase(e)?.RemoteApplicationType;static setAdditionalParameters=()=>{const e=cp.environmentInfoObject?.pyRemoteCaseTypeList;e?.forEach((e=>{const t=this.getRemoteCase(e.pyWorkTypeImplementationClassName);t&&(t.name=e.pyWorkTypeName)}))}}const $=k,B={},G=new Map,W=e=>{let t=j.EMPTY_STRING;return t=e&&e.includes(j.FORWARD_SLASH_STRING)?e.substring(0,e.lastIndexOf("/")):e,t},H=(e,t,n=!1)=>{let r=j.EMPTY_STRING;if(t&&e){let s=`${t}${j.FORWARD_SLASH_STRING}${e}`;const a=rd(s);if(a||t!==j.APP.APP&&t!==j.APP.ROOT)if(a){if(n&&B[s])return r=`${s}${j.UNDERSCORE_STRING}${B[s]}`,r;B[s]?B[s]+=1:B[s]=1,r=`${s}${j.UNDERSCORE_STRING}${B[s]}`}else r=H(e,W(t));else s=`${t}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,B[s]?B[s]+=1:B[s]=1,r=`${s}${j.UNDERSCORE_STRING}${B[s]}`}return r},q=(e,t)=>{if(e&&t){const n=(G[t]?.[e]??0)+1;return G[t]||(G[t]={}),G[t][e]=n,`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`}return""},z=(e,t)=>{if(e&&t){const n=G[t]?.[e];return n?`${t}${j.FORWARD_SLASH_STRING}${e}_${n}`:q(e,t)}return""},Y=e=>{let t=j.EMPTY_STRING;return e&&(t=e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("_")).toLowerCase()),t},K=(e,t)=>{if(null===e)return t;const[,n]=t.split(j.FORWARD_SLASH_STRING);return e+j.FORWARD_SLASH_STRING+n},X=e=>{const t=e.indexOf(j.FORWARD_SLASH_STRING),n=e.lastIndexOf(j.FORWARD_SLASH_STRING);return t===n?e:e.substring(0,n)},J=e=>{const t=e.split(j.FORWARD_SLASH_STRING);return 2===t.length?e:t[0]+j.FORWARD_SLASH_STRING+t[2]},Q="SET_PROPERTY",Z="REPLACE_PROPERTY",ee="FIELD_CHANGE",te="LOAD_VIEW",ne="SHOW_PAGE",re="SHOW_DATA",se="SHOW_INSIGHT",ae="SHOW_DASHBOARD",oe="SET_LOADING",ie="RESET_LOADING",ce="SET_SHARED_PROPERTY",le="CREATE_WORK",ue="OPEN_WORK_BY_HANDLE",de="UPDATE_DOCUMENT",pe="FINISH_ASSIGNMENT",he="CANCEL_ASSIGNMENT",ge="OPEN_ASSIGNMENT",fe="MERGE_DATA",me="REMOVE_ITEM",ye="GET_DATAOBJECT_ACTIONS",Ie="SHOW_HISTORY",Ee="ERROR",Ae="INIT_CONTAINERS",_e="RESET_CONTAINERS",Se="ADD_CONTAINER_ITEM",Ce="REMOVE_CONTAINER_ITEM",Te="ADD_TRANSIENT_ITEM",Ne="UPDATE_TRANSIENT_DATA",Pe="REMOVE_TRANSIENT_ITEM",De="REMOVE_ALL_TRANSIENT_ITEMS",Re="CLEAR_TRANSIENT_DATA",be="PURGE_TRANSIENT_DATA",Oe="REPLACE_TRANSIENT_DATA",ve="ACTIVATE_CONTAINER_ITEM",xe="UPDATE_CONTAINER_ITEM",we="UPMERGE_AND_REMOVE_CONTAINER_ITEM",Me="REPLACE_CONTAINER_ITEM",Le="ACTIVATE_MODAL_CONTAINER_ITEM",Ue="REMOVE_CONTAINER",Fe="ADD_SUGGESTION_CONTEXT",je="showView",Ve="showData",ke="showInsight",$e="showDashboard",Be="openWorkByHandle",Ge="openAssignment",We="createNewWork",He="SHOW_CANCEL_ALERT",qe="openLocalAction",ze="openProcessAction",Ye="caseWideActions",Ke="openBulkAction",Xe="performBulkAction",Je="ADD_MESSAGES",Qe="CLEAR_MESSAGES",Ze="RESET_STORE",et="FETCH_DATAPAGE",tt="ADD_SHARED_DATA",nt="REMOVE_SHARED_DATA",rt="LIST_ACTION",st="DELETE_CASE_SUMMARY",at="ALTER_BLOCKING_ACTION_COUNT",ot="CREATE_DATA_OBJECT",it="DELETE_DATA_OBJECT",ct="VIEW_DATA_OBJECT",lt="UPDATE_DATA_OBJECT",ut="OPEN_DATA_OBJECT_ACTION",dt="SUBMIT_DATA_OBJECT_ACTION",pt="OPEN_EMBEDDED_DATA_MODAL",ht="SUBMIT_EMBEDDED_DATA_MODAL",gt="FILL_FORM_WITH_AI",ft="openCase",mt=(e,t)=>{if(!e||!t)return null;let n,r=j.EMPTY_STRING;return t&&(r=`${t}${j.FORWARD_SLASH_STRING}${e}`,n=rd(r),n||t.includes("/")?n||(r=mt(e,W(t))):r=`${t}${j.FORWARD_SLASH_STRING}${e}`),r},yt=(e,t)=>{const n=mt(e,t);return n&&rd(n)?rd(n):{}},It=(e,t)=>ip.getSemanticURL(je,{page:e},t);const Et=new class{error=e=>{console.error(e)}};class At{constructor(e,t,n){this._grammar=e,this._state="expectOperand",this._tree=null,this._exprStr=t||"",this._endState=n||{}}static _setParent(e,t){Object.defineProperty(e,"_parent",{value:t,writable:!0})}_addToken(e){const t=Rt[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],r=Dt[e.tokenType];r&&r.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}=Rt[this._state];this._subParser=new At(this._grammar,e,t)}_endSubExpression(){Rt[this._state].subHandler.call(this,this._subParser.buildAst()),this._subParser=null}setPositionInAST(e){this._position?(this._position.right=e,At._setParent(e,this._position)):this._tree=e,this._position=e}}const _t=At,St="identifier",Ct={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e&&t},Tt={operatorType:"binaryOperator",precedence:1,evaluate:(e,t)=>e||t},Nt={">":{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)=>e===t},"!=":{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e!==t},"!":{operatorType:"unaryOperator",precedence:999,evaluate:e=>{let{value:t}=e;return"true"!==t&&"false"!==t||(t="true"===t),!t}},"(":{operatorType:"openParenthesis"},")":{operatorType:"closeParenthesis"},"&&":Ct,AND:Ct,and:Ct,"||":Tt,OR:Tt,or:Tt,CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.includes(t)},NOT_CONTAINS:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.includes(t)},STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.startsWith(t)},NOT_STARTS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.startsWith(t)},ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>e.endsWith(t)},NOT_ENDS_WITH:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!e.endsWith(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)=>t.split(",").includes(e)},IS_NOT_IN_LIST:{operatorType:"binaryOperator",precedence:2,evaluate:(e,t)=>!t.split(",").includes(e)}},Pt={BinaryExpression:function(e){const t=[];let n="";return t[0]=this.evaluateAST(e.left),e.left.operationType===St&&this._context&&(n=this._context.getFieldMetadata(e.left.value.substring(1))?.type??""),t[1]=e.right?this.evaluateAST(e.right,n):"",this._grammar[e.operator].evaluate(t[0],t[1])},identifier:function(e){return this._localDataObject?this._localDataObject[e.value.substring(1)]??"":this._contextTreeNodeContext?Ch.getLitePropertyValue(this._contextTreeNodeContext,e.value):this._context.getValue(e.value)??""},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){return this._grammar[e.operator].evaluate(e.right)}},Dt={unaryOperator:function(e){this.setPositionInAST({operationType:"UnaryExpression",operator:e.value})},binaryOperator:function(e){const{precedence:t}=this._grammar[e.value];let n=this._position._parent;for(;n&&n.operator&&this._grammar[n.operator].precedence>=t;)this._position=n,n=n._parent;const r={operationType:"BinaryExpression",operator:e.value,left:this._position};_t._setParent(this._position,r),this._position=n,this.setPositionInAST(r)},identifier:function(e){const t={operationType:St,value:e.value};this.setPositionInAST(t)},literal:function(e){this.setPositionInAST({operationType:"literal",value:e.value})},subExpression:function(e){this.setPositionInAST(e)}},Rt={expectOperand:{operatorTypes:{literal:{toState:"expectBinOp"},identifier:{toState:St},unaryOperator:{},openParenthesis:{toState:"subExpression"}}},expectBinOp:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},identifier:{operatorTypes:{binaryOperator:{toState:"expectOperand"}}},subExpression:{subHandler:Dt.subExpression,endStates:{closeParenthesis:"expectBinOp"}}},bt=["binaryOperator","unaryOperator","openParenthesis"],Ot=/^\s*$/,vt=/^[a-zA-Z_.$][(0-9)a-zA-Z0-9_.$]*$/,xt=/\\\\/,wt=["'(?:(?:\\\\')|[^'])*'",'"(?:(?:\\\\")|[^"])*"',"\\s+","\\btrue\\b","\\bfalse\\b"],Mt=["[a-zA-Z_.\\$][(0-9)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]+)"],Lt=/^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;class Ut{constructor(e){this._grammar=e}static _isNegative(e){return bt.some((t=>t===e[e.length-1].tokenType))}static _isWhitespace(e){return!!e.match(Ot)}static _createWordboundary(e){return(e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).match(vt)&&(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(xt,"\\")}_getSplitRegex(){if(!this._splitRegex){const e=Object.keys(this._grammar).sort(((e,t)=>t.length-e.length)).map((e=>Ut._createWordboundary(e)),this);this._splitRegex=new RegExp(`(${[wt.join("|"),e.join("|"),Mt.join("|")].join("|")})`)}return this._splitRegex}_splitExpression(e){const t=this._getSplitRegex();return e.split(t).filter((e=>e))}_createToken(e){const t={tokenType:"literal",value:e,element:e};return'"'===e[0]||"'"===e[0]?t.value=Ut._unquote(e):e.match(Lt)?t.value=parseFloat(e):"true"===e||"false"===e?t.value="true"===e:this._grammar[e]?t.tokenType=this._grammar[e].operatorType:e.match(vt)&&(t.tokenType="identifier"),t}_getTokens(e){const t=[];let n=!1;for(let r=0;r<e.length;r+=1)Ut._isWhitespace(e[r])?t.length&&(t[t.length-1].element+=e[r]):"-"===e[r]&&Ut._isNegative(t)?n=!0:(n&&(e[r]=`-${e[r]}`,n=!1),t.push(this._createToken(e[r])));return t}tokenize(e){const t=this._splitExpression(e);return this._getTokens(t)}}const Ft=Ut;const jt=class{constructor(e,t){this._grammar={...Nt},this._expression=e,this._ast=null,this._context={},this._contextTreeNodeContext=null,this._localDataObject=t}buildAST(){const e=new Ft(this._grammar).tokenize(this._expression),t=new _t(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 Pt[e.operationType].call(this,e,t)}},Vt=(e,t)=>{const n=e.replace(/[a-zA-Z0-9_)"'\s]=[a-zA-Z0-9_("'\s]/,(e=>e.replace("=","==")));return new jt(n,t)},kt=e=>!e||e.buildAST(),$t=(e,t,n)=>!e||e.evaluate(t,n),Bt=(e,t,n)=>{const r=Vt(e,t),s=kt(r);return $t(s,n)};const Gt=class{static handleExpression(e,t,n,r){const s=this.getContext(e,r);A({actionObject:{action:"decexp",params:{source:e,value:t,targets:n},context:s}}).then((e=>e.json())).then((e=>{this.updateState(e,r)})).catch((e=>window.console.log(e)))}static getContext(e,t){const n=e.substring(0,e.indexOf("."));return{name:n,class:Ch.getPropertyValue(`${n}.pxObjClass`,null,t)||Ch.getPropertyValue(`${n}.pyClassName`,null,t)}}static updateState(e,t){Object.keys(e).forEach((n=>sh({type:Q,payload:{context:t,reference:n,value:e[n]}})))}},Wt={},Ht=(e,t)=>Wt[t]&&Object.prototype.hasOwnProperty.call(Wt[t],e),qt=e=>{const{context:t}=e;Ht(e.reference,t)&&Gt.handleExpression(e.reference,e.value,Wt[t][e.reference],t)},zt=(e={})=>{Eh.copy(e,Wt)},Yt=(e,t,n)=>Bt(e,t,n?.pConnect.getPConnect());const Kt=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 r=this.getContextObjectByName(e);if(r)if(Array.isArray(n))r[t]=n;else{const e=r[t];r[t]=[...new Set([...e,n])]}}else{const r={};Array.isArray(n)?r[t]=n:r[t]=[n],this.addContextName(e,r)}}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),r=new Set(n);return n.forEach((e=>{r.add(e)})),[...r]}};const Xt=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={}){Eh.copy(e,this.componentMap)}mergeOverrideMap(e={}){Eh.copy(e,this.overrideMap)}getOverrideMap(){return this.overrideMap}getLazyMap(){return this.lazyMap}};const Jt=new class{constructor(){this.handlers={}}registerHandler(e,t){this.handlers[e]=t}getHandler(e){return this.handlers[e]}};const Qt=class{static handleAnnotation(e,t,n){const r=e.indexOf(" "),s=-1===r?e:e.substring(0,r),a=Jt.getHandler(s);return a?a(e.substring(r+1),t,n):e}static trimAnnotation(e){if("string"!=typeof e)return e;const t=e.indexOf(" "),n=e.substring(0,t),r=e.substring(t+1);return Jt.getHandler(n)?r:e}static handleComponentMapping(e,t,n){const r=Xt.getComponent(t.type);if(!r||!r.mapping)return;const s=r.mapping(t.config);if(s&&s["@map"]){const t=s["@map"],{source:r}=t;if(!r)return;const a=n.getValue(r);if("function"==typeof t.advanced)t.advanced(e,a);else{const n=t.inputs_map;e[t.output_property]=[];const r=e[t.output_property];a.forEach((e=>{const t={};Object.keys(n).forEach((r=>{let s=n[r];s&&0===s.indexOf(".")?(s=s.substring(1),t[r]=e[s]):t[r]=s})),r.push(t)}))}}}static getPropertyName(e){if(e&&Eh.isString(e)){const t=e.startsWith(j.PROPERTY_ANNOTATION)||e.startsWith(j.ATTACHMENT_ANNOTATION)||e.startsWith(j.ASSOCIATED_PROPERTY_ANNOTATION),n=t?e.indexOf(" "):-1;return t?e.substring(n+2):e}return e}static getLeafPropertyName(e){if(Eh.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)){const t=this.getPropertyName(e),n=t.split(".");return n.length<2?t:n.pop()}return e}static isProperty(e){return Eh.isString(e)&&!!e?.startsWith(j.PROPERTY_ANNOTATION)}},Zt=e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1){if(n[e].ID===t)return"create"===n[e].transitionType&&"active"===n[e].visited_status}}return!1},en=(e,t)=>{if(e&&t){const n=Eh.getIn(t,["assignments","0","assigneeInfo"],{}),{ID:r,type:s}=n;return"worklist"===s?.toLowerCase()&&r===e}return!1},tn=e=>{const{activeActionID:t,availableActions:n}=e||{};if(t&&n){const e=n.find((e=>e.ID===t));return Boolean(e)}return!1},nn=(e,t)=>{const n=Ch.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e),r=Ch.getPropertyValue(F.CASE_INFO.AVAILABLEACTIONS,t,e);let s=!1;if(r&&n){const e=r.find((e=>e.ID===n));e&&(s=e.type.toLowerCase()===F.LOCAL_ACTION_TYPE.CASE_WIDE.toLowerCase())}if(e&&!r){const t=ah(e);s=t?.context_data?.actionType===j.CASE}return s},rn=e=>lh(null,j.CASE_VIEW_MODE_PROP,e)===j.PERFORM_MODE&&(e.includes(j.WORKAREA)||e.includes(j.MODAL)),sn=e=>{const t=e?.parentCaseInfo?.ID;return Boolean(e&&t)},an=(e,t,n)=>{let r;const s=e?.find((e=>e.ID===t))?.actions,a=s?.filter((e=>e.ID===j.FIX_BROKEN_ASSIGNMENTS))||[];return r=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),r},on=(e,t,n)=>{let r,s,a,o,i,c,l,u,d;const p=ah(e);return n?.isTriggeredFromDifferentContext?(r=p.caseInfo.assignments[0].ID,s=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):(r=t.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=t.getValue(F.CASE_INFO.CASE_INFO_ID),a=t.getValue(F.CASE_INFO.ASSIGNMENTS),o=t.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),i=t.getValue(F.CASE_INFO.AVAILABLEACTIONS),c=t.getValue(F.CASE_INFO.CASE_INFO),l=t.getValue(F.CASE_INFO.BUSINESS_ID),u=t.getValue(F.CASE_INFO.CASE_TYPE_ID),d=t.getValue(F.CASE_INFO.CASE_TYPE_NAME)),{assignmentID:r,caseID:s,assignments:a,localActionID:o,caseActions:i,caseInfo:c,businessID:l,caseTypeID:u,caseTypeName:d}};const cn=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=>{t&&void 0!==this.contextArray[e]&&this.contextArray[e]>0&&sh({type:oe,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]&&sh({type:ie,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 ln=new class{constructor(){this.counterActionMgrId=0,this.actionMgrActions=[]}getNextActionMgrId(){return this.counterActionMgrId+=1,this.counterActionMgrId.toString()}register(e,t,n,r,s="unknown",a,o=!0){if(void 0!==this.actionMgrActions[e])return null;const i={actionType:s,promise:t,resolve:n,reject:r,actionPayload:a};return this.actionMgrActions[e]=i,o&&cn.enableLoadingIndicator(i.actionPayload),e}actionManagerPromise=(e,t=null)=>{let n,r;null===t&&(t=this.getNextActionMgrId());const s=new Promise(((e,t)=>{n=e,r=t}));return this.register(t,s,n,r,e),{actionMgrID:t,promise:s}};resolveActionByID(e,t,n=!0){const r=this.actionMgrActions[e];let s=e;return r?(setTimeout((()=>{r.resolve(t)}),0),cn.disableLoadingIndicator(r.actionPayload,n)):s=null,s}rejectActionByID(e,t=!0,n){const r=this.actionMgrActions[e];let s=e;return r?(r.reject(n),cn.disableLoadingIndicator(r.actionPayload,t)):s=null,s}};class un{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((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new un(e,t,n),r.parent=this,this.children.push(r)),r}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 r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}}const dn=un;const pn=class{constructor(e,t,n,r={}){this.type=F.CONTEXT_TREE_NODE_TYPES.WHEN,this.subType=e,this.referenceName=t,this.name=n,this.props=r}},hn=/(([^.]+)\[\d+\])/g,gn=e=>{if((e?.split(".")??[]).length<3)return[e];const t=e?.match(hn);if(!t)return[e];let n,r=t[t.length-1];return e=e?.split(r)[0],e=e?.substring(0,e.length-1),[r,n]=r.split("["),n=n?.split("]")[0],[e,r,n]},fn=(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:mn,WHEN:yn,DECLARATIVE_TARGET:In,PAGELIST:En}=j.CONTEXT_TREE_NODE_TYPES;const An=class{constructor(e,t,n={}){this.type=e,this.name=t,this.children=[],this.eventSubscribers=[],this.props=n,this.references=new Map([[mn,new Map],[yn,new Map],[In,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===En){const n=this.references.get(mn);n.set(e,t),this.references.set(mn,n)}}}removePageListNodes(e,t){const n=this.children.filter((t=>t.name.startsWith(e))).filter((n=>{const r=fn(n.name,e);return-1!==r&&+r>=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),r=t?.parent;r?.removeChildNode(e)}const r=this.references.get(mn),s=this.references.get(In);[...r.keys(),...s.keys()].filter((t=>t.startsWith(e))).filter((e=>{const[,,n]=gn(e);return+n>=t})).forEach((e=>{const t=r.get(e).parent;t?.removeChildren(),r.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((r=>r.type===e&&r.name===t&&r.props.index===n))}addNode(e,t,n={}){let r=this.getNode(e,t,n.index);return r?r.props=n:(r=new dn(e,t,n),r.parent=this,this.children.push(r)),r}addEventListener(e){this.eventSubscribers.push(e)}triggerEvent(e){this.eventSubscribers.forEach((t=>{t(e)}))}removeReference(e,t,n){const r=this.references.get(t),s=r?.get(e);s?.props?.index===n&&r.delete(e)}removeNode(e,t){for(let n=this.children.length-1;n>=0;n-=1){const r=this.children[n];if(r.props.index===t&&r.name===e){this.children.splice(n,1);break}}}addWhen(e,t,n,r,s){if(!(n&&r&&e&&t))return;n.startsWith(".")&&(n=n.substring(1));const a=`${e}.${n}.${r}`,o=new pn(t,n,r,s),i=this.references.get("WHEN");i?.set(a,o)}},{VIEW:_n,FIELD:Sn,CONTEXT:Cn,DECLARATIVE_TARGET:Tn,WHEN:Nn}=F.CONTEXT_TREE_NODE_TYPES;const Pn=new class{constructor(){this.rootNodes={}}_isContextNodeExist(e){return Object.keys(this.rootNodes).includes(e)}addContextNode(e){if(!this._isContextNodeExist(e)){const t=new An(Cn,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 r=this.addContextNode(e).addNode("PAGE",t);let s=r.getReference(n);return s||(s=r.addNode("VIEW",n),r.addReference(n,s)),s}pushChildPageNodeToParentView(e,t,n){const r=e.children;let s=!1;if(r)for(let e=0;e<r.length;e+=1)if(r[e].name===n){s=!0;break}s||r.push(t),t.parent=e}addViewNode(e,t,n,r){const s=this.addContextNode(e).addNode("PAGE",t);let a=null;if(r&&n!==r){a=this._addParentViewNode(e,t,r).addNode("VIEW",n)}else a=s.addNode("VIEW",n);s.addReference(n,a);const o=t.split(".");for(;o.length>0;){o.pop();const n=o.join("."),a=this.getContextNode(e)?.getNode("PAGE",n),i=a?.getReference(r);if(i){this.pushChildPageNodeToParentView(i,s,t);break}}return a}getViewNode(e,t,n){return this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n)}addPageListNode(e,t,n,r,s){if(!r)return;r.startsWith(".")&&(r=r.substring(1));const a=this.addContextNode(e),o=a.addNode("PAGE",t)?.getReference(n)?.addNode("PAGELIST",`${t}.${r}`,s);return o&&a.addReference(`${t}.${r}`,o),o}updatePageListNode(e,t,n,r){if(!n)return;n.startsWith(".")&&(n=n.substring(1));this.addContextNode(e).removePageListNodes(`${t}.${n}`,r)}removeFieldNode(e,t,n,r,s){const a=this.getContextNode(e);a?.getNode("PAGE",t)?.getReference(n)?.removeNode(`${t}${r}`,s),a?.removeReference(`${t}${r}`,Sn,s),a?.removeReference(`${t}${r}`,Tn,s)}removeViewNode(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);this.removeChildViewNodes(e,t,n,r);const i=o?.parent?.children?.findIndex((e=>e.name===n))??-1;i>-1&&o?.parent?.children.splice(i,1)}removeChildViewNodes(e,t,n,r){const s=this.getContextNode(e),a=s?.getNode("PAGE",t),o=a?.getReference(n);o?.children.forEach((a=>{"PAGE"===a.type?this.removeViewNode(e,a.name,n,r):a.type===_n?this.removeChildViewNodes(e,t,a.name,r):(s.removeReference(a.name,Sn,a.props.index),s.removeReference(a.name,Tn,a.props.index),"PAGELIST"!==a.type&&"Address"!==a.props?.componentName||this.deleteAllListNodes(e,a.name))})),a?.references.delete(n)}deleteAllListNodes(e,t){const n=n=>{const r=this.getContextNode(e),s=r?.references?.get(n);if(s)for(const[e]of s)e.includes(t)&&r?.references?.get(n)?.delete(e)};n(Sn),n(Tn)}deleteListNode(e,t,n){const r=r=>{const s=this.getContextNode(e),a=s?.references?.get(r);if(a)for(const[e]of a)e.includes(`${t.join(".")}[${n}]`)&&s?.references?.get(r)?.delete(e)};r(Sn),r(Tn)}getPageListNode(e,t,n,r){const s=this.getContextNode(e)?.getNode("PAGE",t)?.getReference(n);return s?.children.find((e=>"PAGELIST"===e.type&&e.name===`${t}.${r}`))}getFieldNode(e,t,n,r){return this.getViewNode(e,t,n)?.getNode(Sn,r)}_findViewNode(e,t,n,r){let s=r.addNode("PAGE",t)?.getReference(n);if(s)return s;const a=t.split(".");for(;a.length>0;){a.pop();const e=a.join(".");if(s=r.addNode("PAGE",e)?.getReference(n),s)return s}return this.addViewNode(e,t,n)}addFieldNode(e,t,n,r,s,a={}){const o=this.addContextNode(e),i=this._findViewNode(e,t,n,o),{isDeclarativeTarget:c}=a;let l;if(l=c?i.addNode(Tn,`${t}${r}`,a):i.addNode(Sn,`${t}${r}`,a),l){const n=`${t}${r}`;if("Address"===l.props?.componentName&&this.deleteAllListNodes(e,l.name),o.addReference(n,l),l.value=s,l.setPreviousDefaultValue(),l.props.isInsideList){const e=t.substring(0,t.lastIndexOf("["));let n=o.getReference(e,Sn);n||(n=i.addNode(Sn,e,{}),o.addReference(e,n))}}return l}removeContextTreeNode(e){delete this.rootNodes[e]}onViewMutate(e,t,n,r){this.getViewNode(e,t,n)?.addEventListener(r)}mutateField(e,t,n,r){const s=this.getContextNode(e),[a,o,i]=gn(t);n.startsWith(".")&&(n=n.substring(1)),o&&this.mutatePageList(e,a,o,{...r,rowIndex:i},!0);const c=s?.getReference(`${t}.${n}`,Sn);c&&c instanceof dn&&c.triggerEvent(r)}onPageListMutate(e,t,n,r,s){this.getPageListNode(e,t,n,r)?.addEventListener(s)}mutatePageList(e,t,n,r,s=!1){const a=this.getContextNode(e),o=a?.getReference(`${t}.${n}`,Sn);o&&o instanceof dn&&o.triggerEvent(r,s)}getFieldsList(e){const t=this.getContextNode(e);return t?.references.get(Sn)}getFieldReferencePreviousValue(e,t){let n=this.getContextNode(e)?.references?.get(Sn)?.get(t);return n||(n=this.getContextNode(e)?.references?.get(Tn)?.get(t)),n?.value}updateFieldNodeValue(e,t,n){const r=this.getContextNode(e)?.references?.get(Sn)?.get(t);r instanceof dn&&r&&(r.previousValue=r.value,void 0===r.value&&(r.previousValue=n),r.value=n)}getContextReferences(e){if(!this.getContextNode(e))return;const t=this.getContextReferencesByType(e,Sn),n=this.getContextReferencesByType(e,Tn);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,Sn)?.get(t)||!!this.getContextReferencesByType(e,Tn)?.get(t)}addWhenNode(e,t,n,r,s,a){const o=this.getContextNode(e);o?.addWhen(t,n,r,s,a)}getDeclarativeTargets(e){const t=this.getContextNode(e),n=t?.references?.get(Tn)||new Map,r=[];return n.forEach((e=>{const t=e?.props||{},{propertyName:n=""}=t,s=t.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({pageReference:s,name:n})})),r}getWhens(e){const t=this.getContextNode(e),n=t?.references?.get(Nn)||new Map,r=[];return n.forEach((e=>{const t=e.subType,n=e.referenceName,s=e.name,a=e?.props?.pageReference??F.CASE_INFO.CASE_INFO_CONTENT;r.push({name:s,pageReference:a,referenceName:n,type:t})})),r}},Dn={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"},Rn=e=>({type:Dn.REFRESH_DATA,payload:e}),bn={},On=(e,t,n,r,s)=>{if(!(e&&n&&t))return;const a=s.actionMgrID||ln.getNextActionMgrId(),o={ID:e,actionID:t,context:n,caseWideAction:r,options:{...s,actionMgrID:a}};s.isFillFormWithAI?sh((e=>({type:gt,payload:e}))(o)):sh(Rn(o))},vn=(e,t,n,r,s)=>{if(!(e&&n&&t))return;r&&(r=Eh.convertPageRefToClipboardPageNotation(r));sh(Rn({ID:e,viewID:t,context:n,options:s,caseViewAction:!0,interestPage:r}))},xn=(e,t,n)=>{bn[t]||(bn[t]={}),e&&!bn[t][e]&&(bn[t][e]={pageReference:n})},wn=(e,t)=>{const n={pageName:(r=t.substring(t.lastIndexOf(" ")+1)).substring(0,r.lastIndexOf(".")),propertyName:r.substring(r.lastIndexOf(".")+1)};var r;const s=vp(n.propertyName,e.getValue(j.CLASS_ID,n.pageName));return!!s?.isDeclarativeTarget},Mn=e=>{let t=!1;if(e.isWhenExist())t=!0;else{const n=e.getRawMetadata()?.config?.value;if(n){const r=vp(Qt.getLeafPropertyName(n),Ch.resolveClassID(n,e.getPageReference(),e.getContextName()));t=!!r?.isDeclarativeTarget,!t&&r?.datasource?.parameters&&(t=((e,t)=>{let n=!1;if(Array.isArray(t)){const r=t=>{const r=t.value;return r.startsWith("@P")&&(n=wn(e,r)),n};t.some(r)}else if("object"==typeof t)for(const r in t)if(t[r].startsWith("@P")&&(n=wn(e,t[r]),n))break;return n})(e,r?.datasource?.parameters)),t||(t=r?.datasource?.tableType===j.DECISION)}}t&&xn(e.getCurrentView(),e.getContextName(),e.getPageReference())},Ln=(e,t,n)=>{const r=nn(e,t),s=Ch.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e)?Ch.getPropertyValue(F.CASE_INFO.ACTIVE_ACTION_ID,t,e):Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,t,e);let a;a=r?Ch.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,t,e):Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,t,e)?Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,t,e):Ch.getPropertyValue(F.CONTEXT_DATA_ASSIGNMENTID,t,e),On(a,s,e,r,n)},Un=e=>{const{context:t,pageReference:n}=e,r=(e=>bn[e]&&Object.keys(bn[e]).length>0&&rn(e))(t);if(!r)return;if(Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,n,t)){const e=Ch.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,n,t),r=Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,n,t),s=Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.INTERESTPAGE,n,t);vn(e,r,t,s,{})}else Ln(t,n,{})},Fn=(e,t)=>{const{requestType:n}=e;return e?.options?.refreshFor&&"refresh"===n&&(t+=`?refreshFor=${e?.options?.refreshFor}`),e?.options?.isFillFormWithAI&&"refresh"===n&&(t+="?fillFormWithAI=true"),t},jn=e=>{const t=(e=>{const t=[];return Pn.getDeclarativeTargets(e).forEach((({name:e,pageReference:n})=>{const r=n.split(".");r.shift();let s=r.join(".");e&&s&&(s=Eh.convertPageRefToClipboardPageNotation(s),t.push({name:e,context:s}))})),t})(e),n=(e=>{const t=[];return Pn.getWhens(e).forEach((({name:e,type:n,pageReference:r})=>{const s=r.split(".");s.shift();let a=s.join(".");e&&a&&(a=Eh.convertPageRefToClipboardPageNotation(a),t.push({name:e,context:a,type:n}))})),t})(e);return{fieldsWithDeclarativeTargets:t,whens:n}};const Vn=class{static formatPageReference(e){const t=e?.split(".").map((e=>{if(e.includes("[")){const t=e.indexOf("["),n=e.indexOf("]"),r=e.substring(t+1,n),s=Number(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}},kn={CONTENT_FIELDS_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT],FIELD_MESSAGES_PATH:[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT,j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES],PAGE_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.PAGE_MESSAGES],HTTP_MESSAGES_PATH:[j.CONTEXT_DATA,j.SUMMARY_OF_MESSAGES,j.HTTP_MESSAGES],CASE_MESSAGE_PATH:[j.CASEMESSAGES]},$n=(e="",t="",n,r)=>{let s,a=[];null!==e&&(s=(e=>e?.startsWith(".")?e.substring(1).split("."):e.split("."))(e));const o=t&&t.startsWith(".")?t.substr(1):t;if(n===j.PROPERTY&&e||e){a=[j.CONTEXT_DATA,...o.split(".")];for(let e=0;e<s.length-1;e+=1)a.push(s[e]);a.push(j.SUMMARY_OF_MESSAGES,j.PROPERTY_MESSAGES,s[s.length-1])}else n===F.PAGE?a=[...kn.PAGE_MESSAGES_PATH]:n===j.HTTP?a=[...kn.HTTP_MESSAGES_PATH]:n===j.CASEMESSAGES?a=[...kn.CASE_MESSAGE_PATH]:r&&(a=[j.CONTEXT_DATA,...o.split(".")]);return a.filter(Boolean)},Bn=(e,t,n)=>{const r={content:{}},s=`${t}[${n}]`,a=Eh.getIn(e?.content,s.split("."));return a&&Eh.setIn(r.content,s.split("."),{...a}),r},Gn=(e,t,n,r,s,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,r,s),c=r>s?"up":"down";i&&i?.length>0&&i?.forEach((n=>{const r=parseInt(n.match(/\d+/)?.[0],10),s=`${a}[${r}]`;o[`${a}[${r+("up"===c?1:-1)}]`]=Eh.getIn(e[t],[j.CONTEXT_DATA,...s.split(".")]),Eh.deleteIn(e[t],[j.CONTEXT_DATA,...s.split(".")])}));const l=Object.keys(o);l.length>0&&l.forEach((n=>{Eh.setIn(e[t],[j.CONTEXT_DATA,...n.split(".")],o[n])}))},Wn=(e,t,n,r,s)=>{const a=Eh.deepClone(Eh.getIn(e,[`${t}`])),o=Eh.getIn(a,[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO]);if(!o)return;const i=n.substring(0,n.lastIndexOf(".")),c=n.substring(n.lastIndexOf(".")+1),l=((e,t,n)=>{const r=Eh.getIn(e,[j.CONTEXT_DATA,...n.split(".")]);return Object.keys(r).filter((e=>e.includes(`${t}[`)))})(a,c,i);if(0===l.length)return;if(Bn(o,c,r).content[`${c}[${r}]`]){const o={},i=`${n}[${r}]`,c=Eh.getIn(a,[j.CONTEXT_DATA,...i.split(".")]);o[`${n}[${s}]`]=c,Eh.deleteIn(e[t],[j.CONTEXT_DATA,...i.split(".")]),Gn(e,t,l,r,s,n,o)}else Gn(e,t,l,r,s,n)},Hn=e=>{const{type:t,property:n,category:r,context:s,pageReference:a}=e;let o;n&&(o=n.slice(1));const i=ah(s);let c=[];const l=Eh.getIn(i,$n(o,a,r));return t&&"all"!==t?(l&&Array.isArray(l)&&l.length>0&&(c=l.filter((e=>e.type===t))),t===F.MESSAGES.MESSAGES_TYPE_ERROR&&c.length>0&&n&&Pn.mutateField(s,a,n,{messages:[...c],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:n}),c):l},qn=e=>{const{property:t,pageReference:n,category:r,context:s,type:a,isListEntry:o,clearContextMessages:i,deletingIndex:c}=e,l={context:s,type:a};t&&!o?(Pn.mutateField(s,n,t,{type:Qe,fieldName:t}),l.property=t,l.pageReference=n):o?(l.pageReference=n,l.isListEntry=o,l.deletingIndex=c):l.category=r,sh(i?{type:Qe,payload:{stateObj:e.stateObj,context:s}}:{type:Qe,payload:l})},zn=e=>{const{messages:t,property:n,pageReference:r,category:s,context:a}=e,o={messages:t,context:a};n?(o.property=n,o.pageReference=r):o.category=s,sh({type:Je,payload:o})},Yn=(e,t,n)=>{for(const r of Object.keys(e)){if(t.push(r),r===j.SUMMARY_OF_MESSAGES)n.push([...t]);else{"object"===typeof e[r]&&Yn(e[r],t,n)}t.pop()}return n},Kn=(e,t)=>{let n=Hn({context:j.APP.ROOT,category:"HTTP"});if(e){const e=Hn({context:t,category:"HTTP"});n?e&&(n=n.concat(Hn({context:t,category:"HTTP"}))):n=Hn({context:t,category:"HTTP"})}return n},Xn=e=>{let t=null;t=Id(e)[0]?pd(Id(e)[0]):e,t&&qn({context:t,stateObj:ah(t),clearContextMessages:!0})},Jn={addMessages:zn,getValidationErrorMessages:e=>{const t=ah(e),n=[],r=Eh.getIn(t,[...kn.CONTENT_FIELDS_PATH])||{};return Yn(r,[],[]).forEach((e=>{const t=Eh.getIn(r,[...e,j.PROPERTY_MESSAGES]);t&&Object.keys(t).forEach((e=>{t[e].forEach((e=>{e.type===j.MESSAGES.MESSAGES_TYPE_ERROR&&(e.fieldLabel?n.push({label:`${e.fieldLabel}:`,description:e.message}):n.push(e.message))}))}))})),n},getMessages:Hn,clearMessages:qn,getRootContainerHttpMessages:Kn,clearContextMessagesInActiveWorkArea:Xn},Qn=Jn;const Zn=class{static execute(e,t,n,r){const s={};Object.prototype.hasOwnProperty.call(n,"nonFormProperties")&&(n.nonFormProperties.forEach((e=>{s[e]=n[e],delete n[e]})),delete n.nonFormProperties);const a={instruction:"INSERT",content:{...Eh.unflatten(n)}},o=JSON.parse(JSON.stringify(a));delete o.content.classID;return{instruction:{target:Eh.buildInstructionPageReference(r,e),content:{...o.content},listIndex:t,instruction:"INSERT"},actionPayload:a,displayPropertPayload:s}}};const er=class{static execute(e,t,n,r,s,a){const o={instruction:"UPDATE",content:{...Eh.unflatten(r)}},i={content:{...o.content},target:Eh.buildInstructionPageReference(s,t),listIndex:n,instruction:"UPDATE"};return a||sh(og({...o,listIndex:n-1,context:e,referenceList:`${s}${t}`})),i}};const tr=class{static execute(e,t,n){return{target:Eh.buildInstructionPageReference(n,e),listIndex:t,instruction:"DELETE"}}};const nr=class{static getDeleteAllInstruction(e,t){return{instruction:"DELETE ALL",target:Eh.buildInstructionPageReference(e,t)}}static execute(e,t,n,r){r||sh(og({instruction:"DESELECT_ALL",context:e,referenceList:`${n}${t}`}))}};const rr=class{static execute(e,t,n,r){return{target:Eh.buildInstructionPageReference(r,e),listMoveToIndex:n,listIndex:t,instruction:"MOVE"}}};const sr=class{static execute(e,t,n,r){return{content:{...{...Eh.unflatten(n)}},target:Eh.buildInstructionPageReference(r,t),instruction:"REPLACE"}}};const ar=class{static execute(e,t){return{target:Eh.buildInstructionPageReference(t,e),instruction:"DELETE"}}};const or=class{constructor(e){this.next=null,this.automatic=!1,this.instruction=e,this.previous=null,this.childrenStateMachines=[]}};const ir=class{constructor(e,t,n){this.target=e,this.pageReference=t,this.contextName=n,this.root=null,this.current=null,this.changeList={},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 or(e);null===this.root&&(this.root=t),null!==this.current&&(t.previous=this.current,this.current.next=t),this.current=t}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 r=e.getValue(this.target)||[];t?r.forEach(((e,r)=>{t.forEach((t=>{const s=Jc(t),a={};let o=!0;n&&(a[Jc(n)]=crypto.randomUUID(),o=!1);const i={[s]:e[s],...a};this.update(i,r+1,o,{isDefault:!0})}))})):r.forEach(((e,t)=>{if(n&&!e[Jc(n)]){const e={};e[Jc(n)]=crypto.randomUUID(),this.update(e,t+1,!1,{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,r){const s=er.execute(this.contextName,this.target,t,e,this.pageReference,n),{isDefault:a=!1,skipPageinstruction:o}=r;if(!o){if(this.initChangeList(t-1),!a){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=gh(Eh.deepClone(n),e,r)}if(this.current?.automatic!==a||this.current?.instruction?.listIndex!==t||"UPDATE"!==this.current?.instruction.instruction)this.insertNode(s),a&&(this.current.automatic=!0);else{const t=this.current.instruction.content;this.current.instruction.content=gh(Eh.deepClone(t),Eh.unflatten(e),r)}}}delete(e,t){const n=tr.execute(this.target,e,this.pageReference);this.changeList[this.targetPageReference]?.splice(e-1,1),this.insertNode(n),t||sh(og({instruction:"DELETE",listIndex:e-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))}insert(e,t,n,r){const{instruction:s,actionPayload:a={content:{}},displayPropertPayload:o={}}=Zn.execute(this.target,t,e,this.pageReference),{isDefault:i=!1}=r;if(this.initChangeList(t-1),!i){const n=this.changeList?.[this.targetPageReference]?.[t-1].content;this.changeList[this.targetPageReference][t-1]=gh(Eh.deepClone(n),e,r)}this.insertNode(s),n||(a.content={...a.content,...o},sh(og({...a,listIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`}))),i&&(this.current.automatic=!0)}replacePage(e){const t=sr.execute(this.contextName,this.target,e,this.pageReference);this.insertNode(t)}deletePage(){const e=ar.execute(this.target,this.pageReference);this.insertNode(e)}move(e,t){const n=this.changeList[this.targetPageReference]?.splice(e-1,1);this.changeList[this.targetPageReference]?.splice(t-1,0,n[0]);const r=rr.execute(this.target,e,t,this.pageReference);this.insertNode(r),sh(og({listIndex:e-1,listMoveToIndex:t-1,context:this.contextName,referenceList:`${this.pageReference}${this.target}`,instruction:"MOVE"}))}deleteAll(e){const t=nr.getDeleteAllInstruction(this.pageReference,this.target);this.changeList[this.targetPageReference]=[],this.insertNode(t),nr.execute(this.contextName,this.target,this.pageReference,e)}updatePage(e){const t=this.current.instruction.content;this.current.instruction.content=gh(Eh.deepClone(t),e)}},cr={},lr={},ur={},dr=(e,t,n)=>{const r=e.getContextName();cr[r]||(cr[r]={}),cr[r][t]||(cr[r][t]={content:[]}),lr[r]||(lr[r]=[],ur[r]=[]),Kc.isStateMachineExist(r,n,t)||Kc.setStateMachine(r,t,n,new ir(t,n,r))},pr=e=>Vn.formatPageReference(e),hr=(e,t)=>{const n=lr[e],r=ur[e],s=Jc(t),a=s?.substring(0,s.indexOf("["));r?.indexOf(a)<0&&ur[e].push(a),n?.indexOf(s)<0&&lr[e].push(s)},gr=e=>{delete lr[e]},fr=e=>Kc.buildPageInstructionsByContext(e),mr=e=>Kc.buildPageInstructionsByContext(e,!0),yr=e=>{Kc.clearStateMachines(e),delete cr[e]},Ir=(e,t,n,r)=>{let[,s]=t.split(`${e}[${r}]`);""!==s&&void 0!==s&&(s=s.startsWith(".")?s.substring(1):s,Object.keys(n).forEach((e=>{n[`${s}.${e}`]=n[e],delete n[e]})))},Er=(e,t,n,r,s)=>{const{skipStateUpdate:a=!1}=s||{},o=n.getContextName(),i=n.getReferenceList(),c=r||n.getPageReference(),l=pr(i);dr(n,l,c),hr(o,`${i}[${t}]`),Ir(i,c,e,t);const u={instruction:j.LIST_ACTIONS.INSERT,content:{...Eh.unflatten(e)}};delete JSON.parse(JSON.stringify(u)).content.classID;Kc.getStateMachine(o,c,l).insert(e,t+1,a,{})},Ar=(e,t,n=0,r={})=>{const{skipStateUpdate:s=!0,pageRef:a}=r,o=t.getContextName();let i=t.getReferenceList();const c=a||t.getPageReference();i||(i=((e,t)=>{const n=e.indexOf(F.CONTENT)+F.CONTENT.length,r=e.lastIndexOf(`[${t}]`);return e.substring(n,r)})(c,n));const l=pr(i);dr(t,l,c),hr(o,`${i}[${n}]`),Ir(i,c,e,n);Kc.getStateMachine(o,c,l).update(e,n+1,s,r)},_r=(e,t)=>{const[,n]=e.split("."),r=t?.split(".").pop();return n===r},Sr=(e,t,n)=>{const r={};return Object.values(e).forEach((e=>{if(_r(e,n)){const n=Eh.getPropertyName(e),s=n.substr(n.indexOf(".")+1).split(".");if(s.length>1){let e=Eh.getIn(t,s)??"";if(!e){const n=`!P!${s.join(":")}`;e=Eh.getIn(t,n)??""}Eh.setIn(r,s,e)}else{const e=Eh.getIn(t,s)??"";r[s[s.length-1]]=e}}})),r},Cr=(e,t,n,r,s)=>{const a=e.getValue(t)||{};n&&Object.keys(a).length>0&&e.clearErrorMessages({property:r?s:e.getStateProps().value})},Tr=(e,t,n)=>new Promise((r=>{const{skipPageInstructions:s=!1}=n,{selectionMode:a,selectionList:o,required:i}=t.getConfigProps(),c=a===j.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 h=null;const g=(e=>e?.config?.dataRelationshipContext&&"SimpleTableSelect"===e.type&&"single"===e.config?.selectionMode)(p);g&&(d=p?.config?.dataRelationshipContext,h=u.concat(".").concat(d),u=h);const f=((e,t,n)=>e?`${t}${n}`:t)(c,u,o),m=((e,t,n,r)=>t?e.getFieldMetadata(`${n}`):e.getCurrentPageFieldMetadata(r))(t,c,d,h),{datasource:{parameters:y={}}}=m,I={...y};if(((e,t,n)=>{t?.descriptors?.length&&!n&&t.descriptors.forEach((t=>{const n=Eh.getPropertyName(t),r=n.substr(n.indexOf(".")+1).split(".");e[r.join(".")]=t}))})(I,m,c),c){let n=o;n=pr(n);const r=t.getValue(f)||[];dr(t,n,u);const a=[];let i=r.length;e.forEach((e=>{const t=Sr(y,e,d),o={};if(Object.prototype.hasOwnProperty.call(e,"displayProperty")){const t=e.displayProperty;o[t]=e[t]}const c=Object.entries(t);let p=r.findIndex((e=>c.every((([t,n])=>e[t]===n))));if(-1===p?(p=i,e.$selected&&(i+=1)):i=i?i-1:0,!s){const r=Kc.getStateMachine(l,u,n);e.$selected?r.insert(t,p+1,!0,{}):r.delete(p+1,!0)}a.push({instruction:e.$selected?j.LIST_ACTIONS.SELECT:j.LIST_ACTIONS.DESELECT,listIndex:p,content:{...t,...o}})})),sh(og({instruction:j.LIST_ACTIONS_TYPE.SELECT_DESELECT,context:l,referenceList:`${u}.${d}`,actions:a}))}else{const n=Sr(I,e[0],d),r=(e=>e.length>1?e.pop():"")(u.split(/\[\d+\]/gm));Object.keys(n).forEach((e=>{t.getActionsApi().updateFieldValue(`.${e}`,n[`${e}`],g?{contextPageReference:u}:{})})),t.getActionsApi().triggerFieldChange(r,n)}Cr(t,f,i,c,d),r()})),Nr=e=>{if(!e)return!1;const t=mr(e);return Array.isArray(t)&&t.length>0};const Pr=(e,t,n)=>{const{skipStateUpdate:r=!1}=n,s=e.getPageReference(),a=pr(t);dr(e,t,s);Kc.getStateMachine(e.getContextName(),s,a).deleteAll(r)},Dr=e=>({insert:(t,n,r,s)=>Er(t,n,e,r,s),update:(t,n,r)=>Ar(t,e,n,r),updateProperty:(t,n,r)=>((e,t,n,r)=>{const s=n.getPageReference(),{stateMachineTarget:a}=Kc.getStateMachineObjByPath(`${s}${e}`,n.getContextName(),!0);if(!a){let e=s.substring(0,s.lastIndexOf("["));const t=e.substring(e.lastIndexOf("."));e=e.substring(0,e.lastIndexOf(".")),e&&t&&dr(n,t,e)}Kc.executeStateMachine(n.getContextName(),`${s}${e}`,t,!0,r)})(t,n,e,r),deleteEntry:(t,n)=>((e,t,n)=>{const r=t.getContextName(),s=t.getReferenceList(),a=n||t.getPageReference(),o=`${a+s}[${e}]`,i=pr(s);qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,pageReference:o,context:r,isListEntry:!0,deletingIndex:e}),dr(t,i,a),hr(r,`${s}[${e}]`),Kc.getStateMachine(r,a,i).delete(e+1);const c=Kc.getUnConnectedStateMachines(r)||{};Object.keys(c).forEach((e=>{e.includes(`${a}${i}`)&&(c[e]=null)}))})(t,e,n),reorder:(t,n)=>((e,t,n)=>{const r=n.getContextName(),s=n.getReferenceList(),a=n.getPageReference(),o=pr(s);dr(n,o,a),hr(r,`${s}[${t}]`),Kc.getStateMachine(r,a,o).move(e+1,t+1)})(t,n,e),setSelectedRows:(t,n={skipPageInstructions:!1})=>Tr(t,e,n),getSelectedRows:(t=!1)=>((e,t)=>{const{selectionMode:n,selectionList:r}=t.getConfigProps(),s=[];let a=t.getPageReference();const o=n===j.LIST_SELECTION_MODE.MULTI;let i=o?r.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}${r}`: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 r=n.substring(n.lastIndexOf(".")+1);return _r(n,i)&&e[r]?`${t}${e[r]}`:t}),"");t.trim()&&s.push(t.trim())})),Promise.resolve(s)})(t,e),clearSelectedRows:()=>function(e){const{selectionList:t,required:n}=e.getConfigProps(),r=e.getContextName(),s=e.getPageReference(),a=t,o=`${s}${t}`;return new Promise((t=>{let i=a;i=pr(i),dr(e,i,s),Kc.getStateMachine(r,s,i).deleteAll(),Cr(e,o,n,!0,a),t()}))}(e),setVisibility:t=>((e,t=!0)=>{const n=e.getContextName(),{selectionMode:r,selectionList:s,renderMode:a,referenceList:o}=e.getComponentConfig();let i;if(r===j.LIST_SELECTION_MODE.MULTI&&s?i=s:"Editable"===a&&o&&(i=e.getStateProps().referenceList),i){i=pr(i);const r=Kc.getStateMachine(n,"",`${e.getPageReference()}${i}`);r&&(r.visibility=t)}})(e,t),initDefaultPageInstructions:(t,n,r)=>((e,t,n,r)=>{const s=e.getContextName(),a=e.getPageReference(),o=pr(t);dr(e,o,a),Kc.getStateMachine(s,a,o).initPageInstructions(e,n,r)})(e,t,n,r),deleteAll:(t,n={})=>Pr(e,t,n),replacePage:(t,n)=>((e,t,n)=>{const r=e.getPageReference(),s=e.getContextName();dr(e,t,r),hr(s,Eh.buildInstructionPageReference(r,t)),Kc.getStateMachine(s,r,t).replacePage(n)})(e,t,n),deletePage:t=>((e,t)=>{const n=e.getPageReference(),r=e.getContextName();dr(e,t,n),hr(r,Eh.buildInstructionPageReference(n,t)),Kc.getStateMachine(r,n,t).deletePage()})(e,t)});const Rr=new class{constructor(){this.fieldDefaults={}}updateFieldDefaults(e){e&&(Object.keys(this.fieldDefaults).length?Eh.mergeDeep(e,this.fieldDefaults):Eh.copy(e,this.fieldDefaults))}setFieldDefault(e,t,n){e&&t&&(this.fieldDefaults[e]=this.fieldDefaults[e]||{},this.fieldDefaults[e][t]=n)}getDefaultsforType(e){return this.fieldDefaults[e]}};class br{constructor(){this.validators={}}register(e,t){this.validators[e]=t}getValidator(e){return this.validators[e]}validateRequired(e,t,n,r,s,a){const{required:o,value:i}=a;let c=null;if(!("true"!==o&&!0!==o)){let o=r;switch(e){case"radiobuttons":o=i;break;case"attachment":{const e=n?.replace(F.CASE_INFO.CASE_INFO_CONTENT,"").replace(F.DATA_INFO.DATA_INFO_CONTENT,"");o=(ch(`.attachmentsList${e}.${t?.replace(".","")}`,"context_data",s)||[]).filter((e=>!e.delete)),0===o?.length&&(o="");break}case"checkbox":o&&"false"!==o||(o="");break;default:"string"==typeof o&&(o=o.trim())}c=this.getValidator("required")(o),br.messageDispatcher(t,n,s,c,Vn.getFieldLabel(a))}return c}validateType(e,t,n,r,s,a){let o=null;const i={pageReference:n,context:s,property:t,target:a?.target,required:a?.required};let c=Rr.getDefaultsforType(a?.componentName)?.["client-validations"];!1!==c&&e&&this.getValidator(e)&&(o=this.getValidator(e)(r,i),""!==r&&br.messageDispatcher(t,n,s,o,a?.label));const l=a?.validationType;return c=l&&Rr.getDefaultsforType(l)?.["client-validations"],!1!==c&&l&&this.getValidator(l)&&(o=this.getValidator(l)(r,i),br.messageDispatcher(t,n,s,o,a?.label)),o}validate(e,t,n,r={}){const{context:s,disabled:a,readOnly:o,pageReference:i,skipRequiredValidation:c}=r;let l=null;return a||o||(c||(l=this.validateRequired(e,t,i,n,s,r)),l||(l=this.validateType(e,t,i,n,s,r))),{message:l}}static messageDispatcher(e,t,n,r,s){if(r){const a=[];a.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldLabel:s,message:r}),zn({messages:a,property:e,pageReference:t,context:n})}}isValidatorExist(e){return!!e.validatetype}}const Or=new br,vr=(e,t)=>{e.DeclareExpressions&&zt({[t.context]:e.DeclareExpressions})},xr=(e,t,n=!1)=>{const r=Eh.getIn(e,j.RESOURCES);r&&((e=>{e&&Lp(e)})(r),vr(r,t)),n||Rg({...e,options:t})},wr="text/javascript";const Mr=new class{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={}}getTypes={SCRIPT:"script",STYLE:"link"};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="",r=0;return e.forEach((e=>{n+=`${0===r?"?":"&"}field${r}=${e.field}&value${r}=${e.value}`,r+=1})),this.pegaOnlyUrl?this.getSvcComponentsConfigSeparatedUrls(e,n,t):this.getSvcComponentsConfigCombinedUrl(e,n,t)}async getSvcComponentsConfigSeparatedUrls(e,t,n){const r=cp.getBuiltOnAppNames(),s=this.loadAndFilterPegaComponentsConfig(e,r);let a=Promise.resolve([]);!0!==n.skipLoadCustomerComponents&&(a=this.loadAndCustomerComponentsConfig(t));const o=this.fetchSDKComponent(t),i=[];if(await Promise.all([s,a,o]).then((e=>{const t=this.mergeComponentList(e);i.push(...t)})),n.alternateDesignSystemURL&&1===i.length){const r=await this.getSvcComponentsConfigADS(e,t,n);i[0].alternateDesignSystemConfig=r}return{data:{components:i}}}mergeComponentList=e=>{const[t=[],n=[],r=[]]=e,s=[...t,...n];return this.appStaticUrl?s.map((e=>{const{name:t,type:n,subtype:s}=e,a=r.reduce(((e,r)=>(t===r.name&&n===r.type&&s===r.subtype&&(e=r),e)),{});return Object.keys(a).length>0?{...e,alternateDesignSystemConfig:{...a}}:e})):s};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((r=>{let s=!0;e.forEach((e=>{Array.isArray(r[e.field])?r[e.field].includes(e.value)||(s=!1):r[e.field]!==e.value&&(s=!1)})),s&&this.checkForBuiltOnSupport(t,r.allowedApplications)&&n.push(r)})),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){let t=null;if(this.appStaticUrl&&this.appStaticUrl.length>8&&this.appStaticUrl!==this.staticServerURL){const n=`${this.appStaticUrl}v103/${this.appAlias}/componentslist${e}`;t=fetch(n,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>e.components)).catch((()=>[]))}else t=Promise.resolve([]);return t}checkForBuiltOnSupport(e,t){if(!e||!t||0===e.length||0===t.length)return!0;const n=e.split(",");return 0===n.length||n.some((function(e){return-1!==t.indexOf(e)}))}async getSvcComponentsConfigCombinedUrl(e,t,n){const r=`${this.staticServerURL}v102/${this.appAlias}/componentslist${t}`,s=await fetch(r,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.json())).then((e=>({data:e})));if(!0===n.skipLoadCustomerComponents&&s?.data?.components?.length>0&&(s.data.components=s.data.components.filter((e=>void 0===e.componentKey))),n.alternateDesignSystemURL&&1===s?.data?.components?.length){const r=await this.getSvcComponentsConfigADS(e,t,n);s.data.components[0].alternateDesignSystemConfig=r}return s}getSvcComponentsConfigADS(e,t,n){const r=`${n.alternateDesignSystemURL}${n.alternateDesignSystemURL?.endsWith("/")?"":"/"}components/${e[0].value}/config-ext.json`;return fetch(r,{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){const t=`${this.appStaticUrl}v102/${this.appAlias}/image/${e}`;return void 0===this.imageBlobUrlCache[t]&&(this.imageBlobUrlCache[t]=fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>e.blob())).then((e=>window.URL.createObjectURL(e))).catch()),this.imageBlobUrlCache[t]}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}`}})}getSvcComponent(e){const t=`${this.appStaticUrl}v102/${this.appAlias}/component/${e}`;return fetch(t,{method:"GET",credentials:"include",headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>{if(!e.ok)throw Error(e.statusText);return e})).then((e=>e.text())).then((e=>e)).catch()}async importCustomComponentMap(e){fetch(`${this.appStaticUrl}v100/componentlib/componentsmap/${e}`,{headers:{Authorization:`Bearer ${this.b2sJWT}`}}).then((e=>(e.ok||console.error("Error while fetching custom component map"),e))).then((e=>e.text())).then((t=>{this.setCCV2LibId(e);const n=document.createElement("script");n.src=window.URL.createObjectURL(new Blob([t],{type:wr})),n.onload=()=>console.log("Custom component lib map loaded"),n.onerror=()=>console.error("Error while appending custom component map"),document.head.appendChild(n)})).catch((e=>{console.error("Exception while appending custom component map : "),console.error(e)}))}loadSvcComponent(e){return new Promise(((t,n)=>{this.getSvcComponent(e).then((r=>{const s=document.createElement("script");s.src=window.URL.createObjectURL(new Blob([r],{type:wr})),s.onload=()=>t(e),s.onerror=()=>n(e),document.head.appendChild(s)})).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,e&&t&&"no-appstatic"!==t&&"no-cdn"!==t?(this.appStaticUrl=t.endsWith("/")?t:`${t}/`,this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.pegaOnlyUrl=!0):e&&t&&"no-appstatic"===t?(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=this.staticServerURL,this.pegaOnlyUrl=!0):e&&t&&"no-cdn"===t&&(this.staticServerURL=e.endsWith("/")?e:`${e}/`,this.appStaticUrl=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,r)=>{const s=document.createElement(t);"script"===t?(s.onload=()=>{n(e)},s.onerror=()=>{r(e)},s.type=wr,s.charset="UTF-8",s.async=!1,s.src=e):(s.type="text/css",s.rel="stylesheet",s.href=e),document.head.appendChild(s)})).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 r=[];return e.forEach((e=>{const t=Object.keys(e)[0];let s=n?Object.values(e)[0]:this.getStaticServerUrl();s=s.endsWith("/")?s:`${s}/`,this.loadedAssets[t]||(t.includes(".js")?r.push(this.getLoader()(s+t,this.getTypes.SCRIPT)):t.includes(".css")&&this.getLoader()(s+t,this.getTypes.STYLE),this.loadedAssets[t]=!0)})),Promise.all(r)}getAssetsFromIsolations(e){const t=this.b2sJWT?.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")||"",n=decodeURIComponent(s.g.atob(t).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")),r=JSON.parse(n),a=r?.tenant_id,{restApi:o,reqType:i}=Ag("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()))}},Lr="component-loader",Ur={},Fr=async(e,t)=>{const n=Mr.getLoader(),r=t||Mr.staticServerURL;if(!e||window.PCore&&!1===window.PCore.getBehaviorOverride("dynamicLoadComponents"))return Promise.resolve();if(Mr.getLoader(Lr))return Mr.getLoader(Lr)(e,r);const s=[];return e.forEach((e=>{if(Ur[e])return;const t=Xt.getComponent(e);if(!t){const t=`${Mr.getConstellationServiceUrl()}/v860/${Mr.getAppAlias()}/component/${e}.js`;return void s.push(n(t,Mr.getTypes.SCRIPT))}(t.scripts||[]).forEach((e=>{const t=e.startsWith("http")?e:r+e;s.push(n(t,Mr.getTypes.SCRIPT))}));(t.styles||[]).forEach((e=>{s.push(n(r+e,Mr.getTypes.STYLE))})),Ur[e]=!0})),Promise.all(s)};class jr{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 Vr=jr;const kr=class{constructor(e,t,n,r){this.eventType=e,this.callback=n,this.contextName=r,this.id=t}};const $r=new class{constructor(){this.subscribers={}}publish(e,t){this.subscribers[e]?.forEach((e=>{e.callback(t)}))}unsubscribe(e,t,n){const r=this.subscribers[e]||[];let s=0,a=-1;r.forEach((e=>{e.id===t&&e.contextName===n&&(a=s),s+=1})),r.splice(a,1)}unsubscribeAllWithEventType(e){this.subscribers[e]=[]}subscribe(e,t,n,r,s){this.subscribers[e]=this.subscribers[e]||[];let a=!1;if(s&&this.subscribers[e].forEach((e=>{a=e.id===t&&e.contextName===r})),!a){const s=new kr(e,t,n,r);this.subscribers[e].push(s)}}clearContext(e){const t=this.subscribers;Object.keys(t).forEach((t=>{const n=this.subscribers[t],r=[];n.forEach((t=>{t.contextName!==e&&r.push(t)})),this.subscribers[t]=r}))}};const Br=class{static subscribe(e,t,n,r=!1,s="app"){$r.subscribe(e,n,t,s,r)}static subscribeOnce(e,t,n){this.subscribe(e,t,n,!0)}static publish(e,t){$r.publish(e,t)}static unsubscribe(e,t,n="app"){$r.unsubscribe(e,t,n)}static unsubscribeAllWithEventType(e){$r.unsubscribeAllWithEventType(e)}static cleanContextSubscribers(e){$r.clearContext(e)}},Gr=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_SUBMISSION,e)},Wr={CASE_INFO:`${j.DATA}.${j.CASE_INFO.CASE_INFO}`,CASE_CLASS_NAME:`${j.DATA}.${j.CASE_INFO.CASE_TYPE_ID}`,NEXT_ASSIGNMENT_INFO_ID:`${j.DATA}.${j.NEXT_ASSIGNMENT_INFO_ID}`,ASSIGNMENTS:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTS}`,CASE_INFO_ID:`${j.DATA}.${j.CASE_INFO.CASE_INFO_ID}`,CASE_FIRST_FLOW_ACTION_NAME:`${j.DATA}.${j.CASE_INFO.ASSIGNMENTACTION_ID}`,CASE_FIRST_ASSIGNMENT_ID:`${j.DATA}.${j.CASE_INFO.ASSIGNMENT_ID}`},Hr=(e,t)=>{const{vcName:n,containerName:r}=t;return r||n||Vr.getTargetViewContainerName(e)},qr=e=>{const t=e.lastIndexOf(j.FORWARD_SLASH_STRING)+1,n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(t,n)},zr=e=>e===td.WORKAREA,Yr=e=>e===td.MODAL,Kr=e=>e===Ee,Xr=e=>e&&e.find((e=>e.type===Ee)),Jr=e=>Eh.getIn(e,Wr.CASE_INFO,{}),Qr=e=>e?e.split(" ").pop():void 0,Zr=e=>Eh.getIn(e,Wr.CASE_CLASS_NAME,j.EMPTY_STRING),es=e=>{const t=Jr(e);return Zt(t)&&en(cp.getOperatorIdentifier(),t)},ts=e=>Eh.getIn(e,Wr.CASE_INFO_ID,j.EMPTY_STRING),ns=e=>Eh.getIn(e,Wr.CASE_FIRST_ASSIGNMENT_ID,j.EMPTY_STRING),rs=(e,t)=>{const{removeActionPayload:n,target:r}=t;if(n&&n.containerItemID){const{containerItemID:t,context:s}=n;e.push(ng(Kh,{containerItemID:t,context:s||fd(t),target:r}))}},ss=e=>{const t=rh();if(!e)return!1;const n=W(e),r=Od(n),s=Od(e);if(!r||!s)return!1;const a=sd(r,n),o=sd(s,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},as=(e,t,n={})=>{const{skipFlowNameUpdate:r}=n,s=ts(t);Eh.setIn(e,"key",s);const a=Zt(Jr(t));if(!r&&(e=>{const t=Eh.getIn(e,Wr.ASSIGNMENTS,[]);return t&&t.length>0})(t)){const n=ns(t),[,r]=n.split("!");(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CURRENT_ASSIGNMENT_UPDATED,e)})({assignmentID:n,isInCreateStage:a}),Eh.setIn(e,"flowName",r)}},os=(e,t)=>{const{attachmentsExist:n}=t;n&&Eh.setIn(e,F.SUMMARY_OF_ATTACHMENTS_LAST_REFRESH_TIME,(new Date).toLocaleString()),Eh.setIn(e,F.SUMMARY_OF_ASSIGNMENT_LAST_SUBMIT_TIME,(new Date).toLocaleString())},is=(e,t,n)=>{let r=j.PROMISE_VALUE.RESOLVE;return Xr(e)?(r=j.PROMISE_VALUE.REJECT,n?ln.rejectActionByID(t,!0,n):ln.rejectActionByID(t)):ln.resolveActionByID(t),r},cs=e=>{const t=cp.getCaseTypeList();return"true"===t.filter((t=>t.pyWorkTypeImplementationClassName===e))?.[0]?.pyIsTraditionalUICase},ls=()=>"true"===cp?.environmentInfoObject?.pxMashupDetails?.pyLaunchCaseInModal,us=(e,t)=>{const n=Zr(e?.response),r=Jr(e?.response),{caseTypeID:s}=r,a=cp.getFeatureMap();(a?.deferUpdateCaseSummaryView??!Object.hasOwn(a,j.DEFER_UPDATE_CASESUMMARY_VIEW))&&s&&Fp(j.CASESUMMARY_VIEW_NAME,s)&&((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r){const{caseClassName:a}=n,o=W(r),i=Od(o),c=i&&rd(i),l=i&&pd(i),u=Y(o);l&&c?.items?.[l]?.key===t?.caseID&&e.push(ng(vh,{containerItemID:o,context:o,container:u,containerName:u,caseId:s,viewName:F.CASESUMMARY_VIEW_NAME,updateData:!0,viewLoadingContainer:{context:o},caseClassName:a}))}})(t,e?.actionInPayload,{caseClassName:n})};function ds(e,t){return function(){return e.apply(t,arguments)}}const{toString:ps}=Object.prototype,{getPrototypeOf:hs}=Object,gs=(fs=Object.create(null),e=>{const t=ps.call(e);return fs[t]||(fs[t]=t.slice(8,-1).toLowerCase())});var fs;const ms=e=>(e=e.toLowerCase(),t=>gs(t)===e),ys=e=>t=>typeof t===e,{isArray:Is}=Array,Es=ys("undefined");const As=ms("ArrayBuffer");const _s=ys("string"),Ss=ys("function"),Cs=ys("number"),Ts=e=>null!==e&&"object"==typeof e,Ns=e=>{if("object"!==gs(e))return!1;const t=hs(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Ps=ms("Date"),Ds=ms("File"),Rs=ms("Blob"),bs=ms("FileList"),Os=ms("URLSearchParams"),[vs,xs,ws,Ms]=["ReadableStream","Request","Response","Headers"].map(ms);function Ls(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,s;if("object"!=typeof e&&(e=[e]),Is(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(r=0;r<a;r++)o=s[r],t.call(null,e[o],o,e)}}function Us(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,s=n.length;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const Fs="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,js=e=>!Es(e)&&e!==Fs;const Vs=(ks="undefined"!=typeof Uint8Array&&hs(Uint8Array),e=>ks&&e instanceof ks);var ks;const $s=ms("HTMLFormElement"),Bs=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gs=ms("RegExp"),Ws=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ls(n,((n,s)=>{let a;!1!==(a=t(n,s,e))&&(r[s]=a||n)})),Object.defineProperties(e,r)},Hs="abcdefghijklmnopqrstuvwxyz",qs="0123456789",zs={DIGIT:qs,ALPHA:Hs,ALPHA_DIGIT:Hs+Hs.toUpperCase()+qs};const Ys=ms("AsyncFunction"),Ks=(Xs="function"==typeof setImmediate,Js=Ss(Fs.postMessage),Xs?setImmediate:Js?(Qs=`axios@${Math.random()}`,Zs=[],Fs.addEventListener("message",(({source:e,data:t})=>{e===Fs&&t===Qs&&Zs.length&&Zs.shift()()}),!1),e=>{Zs.push(e),Fs.postMessage(Qs,"*")}):e=>setTimeout(e));var Xs,Js,Qs,Zs;const ea="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Fs):"undefined"!=typeof process&&process.nextTick||Ks,ta={isArray:Is,isArrayBuffer:As,isBuffer:function(e){return null!==e&&!Es(e)&&null!==e.constructor&&!Es(e.constructor)&&Ss(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ss(e.append)&&("formdata"===(t=gs(e))||"object"===t&&Ss(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&As(e.buffer),t},isString:_s,isNumber:Cs,isBoolean:e=>!0===e||!1===e,isObject:Ts,isPlainObject:Ns,isReadableStream:vs,isRequest:xs,isResponse:ws,isHeaders:Ms,isUndefined:Es,isDate:Ps,isFile:Ds,isBlob:Rs,isRegExp:Gs,isFunction:Ss,isStream:e=>Ts(e)&&Ss(e.pipe),isURLSearchParams:Os,isTypedArray:Vs,isFileList:bs,forEach:Ls,merge:function e(){const{caseless:t}=js(this)&&this||{},n={},r=(r,s)=>{const a=t&&Us(n,s)||s;Ns(n[a])&&Ns(r)?n[a]=e(n[a],r):Ns(r)?n[a]=e({},r):Is(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Ls(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Ls(t,((t,r)=>{n&&Ss(t)?e[r]=ds(t,n):e[r]=t}),{allOwnKeys:r}),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,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let s,a,o;const i={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)o=s[a],r&&!r(o,e,t)||i[o]||(t[o]=e[o],i[o]=!0);e=!1!==n&&hs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:gs,kindOfTest:ms,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Is(e))return e;let t=e.length;if(!Cs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:$s,hasOwnProperty:Bs,hasOwnProp:Bs,reduceDescriptors:Ws,freezeMethods:e=>{Ws(e,((t,n)=>{if(Ss(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Ss(r)&&(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={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Is(e)?r(e):r(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:Us,global:Fs,isContextDefined:js,ALPHABET:zs,generateString:(e=16,t=zs.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Ss(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Ts(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const s=Is(e)?[]:{};return Ls(e,((e,t)=>{const a=n(e,r+1);!Es(a)&&(s[t]=a)})),t[r]=void 0,s}}return e};return n(e,0)},isAsyncFn:Ys,isThenable:e=>e&&(Ts(e)||Ss(e))&&Ss(e.then)&&Ss(e.catch),setImmediate:Ks,asap:ea};function na(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}ta.inherits(na,Error,{toJSON:function(){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:ta.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ra=na.prototype,sa={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{sa[e]={value:e}})),Object.defineProperties(na,sa),Object.defineProperty(ra,"isAxiosError",{value:!0}),na.from=(e,t,n,r,s,a)=>{const o=Object.create(ra);return ta.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),na.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const aa=na;function oa(e){return ta.isPlainObject(e)||ta.isArray(e)}function ia(e){return ta.endsWith(e,"[]")?e.slice(0,-2):e}function ca(e,t,n){return e?e.concat(t).map((function(e,t){return e=ia(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const la=ta.toFlatObject(ta,{},null,(function(e){return/^is[A-Z]/.test(e)}));const ua=function(e,t,n){if(!ta.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ta.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ta.isUndefined(t[e])}))).metaTokens,s=n.visitor||l,a=n.dots,o=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ta.isSpecCompliantForm(t);if(!ta.isFunction(s))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ta.isDate(e))return e.toISOString();if(!i&&ta.isBlob(e))throw new aa("Blob is not supported. Use a Buffer instead.");return ta.isArrayBuffer(e)||ta.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,s){let i=e;if(e&&!s&&"object"==typeof e)if(ta.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ta.isArray(e)&&function(e){return ta.isArray(e)&&!e.some(oa)}(e)||(ta.isFileList(e)||ta.endsWith(n,"[]"))&&(i=ta.toArray(e)))return n=ia(n),i.forEach((function(e,r){!ta.isUndefined(e)&&null!==e&&t.append(!0===o?ca([n],r,a):null===o?n:n+"[]",c(e))})),!1;return!!oa(e)||(t.append(ca(s,n,a),c(e)),!1)}const u=[],d=Object.assign(la,{defaultVisitor:l,convertValue:c,isVisitable:oa});if(!ta.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ta.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),ta.forEach(n,(function(n,a){!0===(!(ta.isUndefined(n)||null===n)&&s.call(t,n,ta.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),u.pop()}}(e),t};function da(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function pa(e,t){this._pairs=[],e&&ua(e,this,t)}const ha=pa.prototype;ha.append=function(e,t){this._pairs.push([e,t])},ha.toString=function(e){const t=e?function(t){return e.call(this,t,da)}:da;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ga=pa;function fa(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ma(e,t,n){if(!t)return e;const r=n&&n.encode||fa,s=n&&n.serialize;let a;if(a=s?s(t,n):ta.isURLSearchParams(t)?t.toString():new ga(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const ya=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ta.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ia={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ea={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ga,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Aa="undefined"!=typeof window&&"undefined"!=typeof document,_a=(Sa="undefined"!=typeof navigator&&navigator.product,Aa&&["ReactNative","NativeScript","NS"].indexOf(Sa)<0);var Sa;const Ca="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ta=Aa&&window.location.href||"http://localhost",Na={...a,...Ea};const Pa=function(e){function t(e,n,r,s){let a=e[s++];if("__proto__"===a)return!0;const o=Number.isFinite(+a),i=s>=e.length;if(a=!a&&ta.isArray(r)?r.length:a,i)return ta.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o;r[a]&&ta.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],s)&&ta.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}(r[a])),!o}if(ta.isFormData(e)&&ta.isFunction(e.entries)){const n={};return ta.forEachEntry(e,((e,r)=>{t(function(e){return ta.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null};const Da={transitional:Ia,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,s=ta.isObject(e);s&&ta.isHTMLForm(e)&&(e=new FormData(e));if(ta.isFormData(e))return r?JSON.stringify(Pa(e)):e;if(ta.isArrayBuffer(e)||ta.isBuffer(e)||ta.isStream(e)||ta.isFile(e)||ta.isBlob(e)||ta.isReadableStream(e))return e;if(ta.isArrayBufferView(e))return e.buffer;if(ta.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ua(e,new Na.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Na.isNode&&ta.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=ta.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ua(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return s||r?(t.setContentType("application/json",!1),function(e,t,n){if(ta.isString(e))try{return(t||JSON.parse)(e),ta.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Da.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(ta.isResponse(e)||ta.isReadableStream(e))return e;if(e&&ta.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw aa.from(e,aa.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Na.classes.FormData,Blob:Na.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ta.forEach(["delete","get","head","post","put","patch"],(e=>{Da.headers[e]={}}));const Ra=Da,ba=ta.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"]),Oa=Symbol("internals");function va(e){return e&&String(e).trim().toLowerCase()}function xa(e){return!1===e||null==e?e:ta.isArray(e)?e.map(xa):String(e)}function wa(e,t,n,r,s){return ta.isFunction(r)?r.call(this,t,n):(s&&(t=n),ta.isString(t)?ta.isString(r)?-1!==t.indexOf(r):ta.isRegExp(r)?r.test(t):void 0:void 0)}class Ma{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function s(e,t,n){const s=va(t);if(!s)throw new Error("header name must be a non-empty string");const a=ta.findKey(r,s);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=xa(e))}const a=(e,t)=>ta.forEach(e,((e,n)=>s(e,n,t)));if(ta.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(ta.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,s;return e&&e.split("\n").forEach((function(e){s=e.indexOf(":"),n=e.substring(0,s).trim().toLowerCase(),r=e.substring(s+1).trim(),!n||t[n]&&ba[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(ta.isHeaders(e))for(const[t,r]of e.entries())s(r,t,n);else null!=e&&s(t,e,n);return this}get(e,t){if(e=va(e)){const n=ta.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 r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ta.isFunction(t))return t.call(this,e,n);if(ta.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=va(e)){const n=ta.findKey(this,e);return!(!n||void 0===this[n]||t&&!wa(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function s(e){if(e=va(e)){const s=ta.findKey(n,e);!s||t&&!wa(0,n[s],s,t)||(delete n[s],r=!0)}}return ta.isArray(e)?e.forEach(s):s(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const s=t[n];e&&!wa(0,this[s],s,e,!0)||(delete this[s],r=!0)}return r}normalize(e){const t=this,n={};return ta.forEach(this,((r,s)=>{const a=ta.findKey(n,s);if(a)return t[a]=xa(r),void delete t[s];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(s):String(s).trim();o!==s&&delete t[s],t[o]=xa(r),n[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ta.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ta.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")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Oa]=this[Oa]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=va(e);t[r]||(!function(e,t){const n=ta.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,s){return this[r].call(this,t,e,n,s)},configurable:!0})}))}(n,e),t[r]=!0)}return ta.isArray(e)?e.forEach(r):r(e),this}}Ma.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ta.reduceDescriptors(Ma.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),ta.freezeMethods(Ma);const La=Ma;function Ua(e,t){const n=this||Ra,r=t||n,s=La.from(r.headers);let a=r.data;return ta.forEach(e,(function(e){a=e.call(n,a,s.normalize(),t?t.status:void 0)})),s.normalize(),a}function Fa(e){return!(!e||!e.__CANCEL__)}function ja(e,t,n){aa.call(this,null==e?"canceled":e,aa.ERR_CANCELED,t,n),this.name="CanceledError"}ta.inherits(ja,aa,{__CANCEL__:!0});const Va=ja;function ka(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new aa("Request failed with status code "+n.status,[aa.ERR_BAD_REQUEST,aa.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const $a=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s,a=0,o=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),l=r[o];s||(s=c),n[a]=i,r[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-s<t)return;const p=l&&c-l;return p?Math.round(1e3*d/p):void 0}};const Ba=function(e,t){let n,r,s=0,a=1e3/t;const o=(t,a=Date.now())=>{s=a,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),i=t-s;i>=a?o(e,t):(n=e,r||(r=setTimeout((()=>{r=null,o(n)}),a-i)))},()=>n&&o(n)]},Ga=(e,t,n=3)=>{let r=0;const s=$a(50,250);return Ba((n=>{const a=n.loaded,o=n.lengthComputable?n.total:void 0,i=a-r,c=s(i);r=a;e({loaded:a,total:o,progress:o?a/o:void 0,bytes:i,rate:c||void 0,estimated:c&&o&&a<=o?(o-a)/c:void 0,event:n,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),n)},Wa=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ha=e=>(...t)=>ta.asap((()=>e(...t))),qa=Na.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=ta.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0},za=Na.hasStandardBrowserEnv?{write(e,t,n,r,s,a){const o=[e+"="+encodeURIComponent(t)];ta.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ta.isString(r)&&o.push("path="+r),ta.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ya(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ka=e=>e instanceof La?{...e}:e;function Xa(e,t){t=t||{};const n={};function r(e,t,n){return ta.isPlainObject(e)&&ta.isPlainObject(t)?ta.merge.call({caseless:n},e,t):ta.isPlainObject(t)?ta.merge({},t):ta.isArray(t)?t.slice():t}function s(e,t,n){return ta.isUndefined(t)?ta.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!ta.isUndefined(t))return r(void 0,t)}function o(e,t){return ta.isUndefined(t)?ta.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,s,a){return a in t?r(n,s):a in e?r(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage: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,responseEncoding:o,validateStatus:i,headers:(e,t)=>s(Ka(e),Ka(t),!0)};return ta.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=c[r]||s,o=a(e[r],t[r],r);ta.isUndefined(o)&&a!==i||(n[r]=o)})),n}const Ja=e=>{const t=Xa({},e);let n,{data:r,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:c}=t;if(t.headers=i=La.from(i),t.url=ma(Ya(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),ta.isFormData(r))if(Na.hasStandardBrowserEnv||Na.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(!1!==(n=i.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}if(Na.hasStandardBrowserEnv&&(s&&ta.isFunction(s)&&(s=s(t)),s||!1!==s&&qa(t.url))){const e=a&&o&&za.read(o);e&&i.set(a,e)}return t},Qa="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Ja(e);let s=r.data;const a=La.from(r.headers).normalize();let o,i,c,l,u,{responseType:d,onUploadProgress:p,onDownloadProgress:h}=r;function g(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function m(){if(!f)return;const r=La.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());ka((function(e){t(e),g()}),(function(e){n(e),g()}),{data:d&&"text"!==d&&"json"!==d?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=m:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(m)},f.onabort=function(){f&&(n(new aa("Request aborted",aa.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new aa("Network Error",aa.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||Ia;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new aa(t,s.clarifyTimeoutError?aa.ETIMEDOUT:aa.ECONNABORTED,e,f)),f=null},void 0===s&&a.setContentType(null),"setRequestHeader"in f&&ta.forEach(a.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),ta.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),d&&"json"!==d&&(f.responseType=r.responseType),h&&([c,u]=Ga(h,!0),f.addEventListener("progress",c)),p&&f.upload&&([i,l]=Ga(p),f.upload.addEventListener("progress",i),f.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(o=t=>{f&&(n(!t||t.type?new Va(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Na.protocols.indexOf(y)?n(new aa("Unsupported protocol "+y+":",aa.ERR_BAD_REQUEST,e)):f.send(s||null)}))},Za=(e,t)=>{let n,r=new AbortController;const s=function(e){if(!n){n=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof aa?t:new Va(t instanceof Error?t.message:t))}};let a=t&&setTimeout((()=>{s(new aa(`timeout ${t} of ms exceeded`,aa.ETIMEDOUT))}),t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach((e=>{e&&(e.removeEventListener?e.removeEventListener("abort",s):e.unsubscribe(s))})),e=null)};e.forEach((e=>e&&e.addEventListener&&e.addEventListener("abort",s)));const{signal:i}=r;return i.unsubscribe=o,[i,()=>{a&&clearTimeout(a),a=null}]},eo=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,s=0;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},to=(e,t,n,r,s)=>{const a=async function*(e,t,n){for await(const r of e)yield*eo(ArrayBuffer.isView(r)?r:await n(String(r)),t)}(e,t,s);let o,i=0,c=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return c(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw c(e),e}},cancel:e=>(c(e),a.return())},{highWaterMark:2})},no="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,ro=no&&"function"==typeof ReadableStream,so=no&&("function"==typeof TextEncoder?(ao=new TextEncoder,e=>ao.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var ao;const oo=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},io=ro&&oo((()=>{let e=!1;const t=new Request(Na.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),co=ro&&oo((()=>ta.isReadableStream(new Response("").body))),lo={stream:co&&(e=>e.body)};var uo;no&&(uo=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!lo[e]&&(lo[e]=ta.isFunction(uo[e])?t=>t[e]():(t,n)=>{throw new aa(`Response type '${e}' is not supported`,aa.ERR_NOT_SUPPORT,n)})})));const po=async(e,t)=>{const n=ta.toFiniteNumber(e.getContentLength());return null==n?(async e=>null==e?0:ta.isBlob(e)?e.size:ta.isSpecCompliantForm(e)?(await new Request(e).arrayBuffer()).byteLength:ta.isArrayBufferView(e)||ta.isArrayBuffer(e)?e.byteLength:(ta.isURLSearchParams(e)&&(e+=""),ta.isString(e)?(await so(e)).byteLength:void 0))(t):n},ho=no&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:a,timeout:o,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=Ja(e);l=l?(l+"").toLowerCase():"text";let h,g,[f,m]=s||a||o?Za([s,a],o):[];const y=()=>{!h&&setTimeout((()=>{f&&f.unsubscribe()})),h=!0};let I;try{if(c&&io&&"get"!==n&&"head"!==n&&0!==(I=await po(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(ta.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Wa(I,Ga(Ha(c)));r=to(n.body,65536,e,t,so)}}ta.isString(d)||(d=d?"include":"omit"),g=new Request(t,{...p,signal:f,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:d});let s=await fetch(g);const a=co&&("stream"===l||"response"===l);if(co&&(i||a)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=ta.toFiniteNumber(s.headers.get("content-length")),[n,r]=i&&Wa(t,Ga(Ha(i),!0))||[];s=new Response(to(s.body,65536,n,(()=>{r&&r(),a&&y()}),so),e)}l=l||"text";let o=await lo[ta.findKey(lo,l)||"text"](s,e);return!a&&y(),m&&m(),await new Promise(((t,n)=>{ka(t,n,{data:o,headers:La.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:g})}))}catch(t){if(y(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new aa("Network Error",aa.ERR_NETWORK,e,g),{cause:t.cause||t});throw aa.from(t,t&&t.code,e,g)}}),go={http:null,xhr:Qa,fetch:ho};ta.forEach(go,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const fo=e=>`- ${e}`,mo=e=>ta.isFunction(e)||null===e||!1===e,yo=e=>{e=ta.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let a=0;a<t;a++){let t;if(n=e[a],r=n,!mo(n)&&(r=go[(t=String(n)).toLowerCase()],void 0===r))throw new aa(`Unknown adapter '${t}'`);if(r)break;s[t||"#"+a]=r}if(!r){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(fo).join("\n"):" "+fo(e[0]):"as no adapter specified";throw new aa("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Io(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Va(null,e)}function Eo(e){Io(e),e.headers=La.from(e.headers),e.data=Ua.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return yo(e.adapter||Ra.adapter)(e).then((function(t){return Io(e),t.data=Ua.call(e,e.transformResponse,t),t.headers=La.from(t.headers),t}),(function(t){return Fa(t)||(Io(e),t&&t.response&&(t.response.data=Ua.call(e,e.transformResponse,t.response),t.response.headers=La.from(t.response.headers))),Promise.reject(t)}))}const Ao="1.7.4",_o={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{_o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const So={};_o.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,s,a)=>{if(!1===e)throw new aa(r(s," has been removed"+(t?" in "+t:"")),aa.ERR_DEPRECATED);return t&&!So[s]&&(So[s]=!0,console.warn(r(s," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,s,a)}};const Co={assertOptions:function(e,t,n){if("object"!=typeof e)throw new aa("options must be an object",aa.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],o=t[a];if(o){const t=e[a],n=void 0===t||o(t,a,e);if(!0!==n)throw new aa("option "+a+" must be "+n,aa.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new aa("Unknown option "+a,aa.ERR_BAD_OPTION)}},validators:_o},To=Co.validators;class No{constructor(e){this.defaults=e,this.interceptors={request:new ya,response:new ya}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Xa(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:s}=t;void 0!==n&&Co.assertOptions(n,{silentJSONParsing:To.transitional(To.boolean),forcedJSONParsing:To.transitional(To.boolean),clarifyTimeoutError:To.transitional(To.boolean)},!1),null!=r&&(ta.isFunction(r)?t.paramsSerializer={serialize:r}:Co.assertOptions(r,{encode:To.function,serialize:To.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&ta.merge(s.common,s[t.method]);s&&ta.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]})),t.headers=La.concat(a,s);const o=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,o.unshift(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=[Eo.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,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=0;d<u;){const e=o[d++],t=o[d++];try{p=e(p)}catch(e){t.call(this,e);break}}try{l=Eo.call(this,p)}catch(e){return Promise.reject(e)}for(d=0,u=c.length;d<u;)l=l.then(c[d++],c[d++]);return l}getUri(e){return ma(Ya((e=Xa(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}ta.forEach(["delete","get","head","options"],(function(e){No.prototype[e]=function(t,n){return this.request(Xa(n||{},{method:e,url:t,data:(n||{}).data}))}})),ta.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,s){return this.request(Xa(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}No.prototype[e]=t(),No.prototype[e+"Form"]=t(!0)}));const Po=No;class Do{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 r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,s){n.reason||(n.reason=new Va(e,r,s),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)}static source(){let e;return{token:new Do((function(t){e=t})),cancel:e}}}const Ro=Do;const bo={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,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity: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};Object.entries(bo).forEach((([e,t])=>{bo[t]=e}));const Oo=bo;const vo=function e(t){const n=new Po(t),r=ds(Po.prototype.request,n);return ta.extend(r,Po.prototype,n,{allOwnKeys:!0}),ta.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Xa(t,n))},r}(Ra);vo.Axios=Po,vo.CanceledError=Va,vo.CancelToken=Ro,vo.isCancel=Fa,vo.VERSION=Ao,vo.toFormData=ua,vo.AxiosError=aa,vo.Cancel=vo.CanceledError,vo.all=function(e){return Promise.all(e)},vo.spread=function(e){return function(t){return e.apply(null,t)}},vo.isAxiosError=function(e){return ta.isObject(e)&&!0===e.isAxiosError},vo.mergeConfig=Xa,vo.AxiosHeaders=La,vo.formToJSON=e=>Pa(ta.isHTMLForm(e)?new FormData(e):e),vo.getAdapter=yo,vo.HttpStatusCode=Oo,vo.default=vo;const xo=vo;function wo(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 Mo=wo((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));var Lo=function(e,t){return Lo=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])},Lo(e,t)};function Uo(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}Lo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function Fo(e,t,n,r){return new(n||(n=Promise))((function(s,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function i(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,i)}c((r=r.apply(e,t||[])).next())}))}function jo(e,t){var n,r,s,a,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(s=2&i[0]?r.return:i[0]?r.throw||((s=r.return)&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;switch(r=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function Vo(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ko(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,s,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){s={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return o}function $o(e,t,n){if(n||2===arguments.length)for(var r,s=0,a=t.length;s<a;s++)!r&&s in t||(r||(r=Array.prototype.slice.call(t,0,s)),r[s]=t[s]);return e.concat(r||Array.prototype.slice.call(t))}function Bo(e){return this instanceof Bo?(this.v=e,this):new Bo(e)}function Go(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,s=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){s[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||i(e,t)}))})}function i(e,t){try{(n=s[e](t)).value instanceof Bo?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 Wo(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Vo(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,s){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,s,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ho=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function qo(e){return"function"==typeof e}function zo(e){return qo(null==e?void 0:e.then)}var Yo=wo((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 Ko(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Xo=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,s;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var o=Vo(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(qo(c))try{c()}catch(e){s=e instanceof Yo?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Vo(l),d=u.next();!d.done;d=u.next()){var p=d.value;try{Zo(p)}catch(e){s=null!=s?s:[],e instanceof Yo?s=$o($o([],ko(s)),ko(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(s)throw new Yo(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Zo(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)&&Ko(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&Ko(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Jo=Xo.EMPTY;function Qo(e){return e instanceof Xo||e&&"closed"in e&&qo(e.remove)&&qo(e.add)&&qo(e.unsubscribe)}function Zo(e){qo(e)?e():e.unsubscribe()}var ei={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ti={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=ti.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,$o([e,t],ko(n))):setTimeout.apply(void 0,$o([e,t],ko(n)))},clearTimeout:function(e){var t=ti.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function ni(e){ti.setTimeout((function(){var t=ei.onUnhandledError;if(!t)throw e;t(e)}))}function ri(){}var si=ai("C",void 0,void 0);function ai(e,t,n){return{kind:e,value:t,error:n}}var oi=null;function ii(e){if(ei.useDeprecatedSynchronousErrorHandling){var t=!oi;if(t&&(oi={errorThrown:!1,error:null}),e(),t){var n=oi,r=n.errorThrown,s=n.error;if(oi=null,r)throw s}}else e()}var ci=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Qo(t)&&t.add(n)):n.destination=fi,n}return Uo(t,e),t.create=function(e,t,n){return new pi(e,t,n)},t.prototype.next=function(e){this.isStopped?gi(function(e){return ai("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?gi(ai("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?gi(si,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}(Xo),li=Function.prototype.bind;function ui(e,t){return li.call(e,t)}var di=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){hi(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){hi(e)}else hi(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){hi(e)}},e}(),pi=function(e){function t(t,n,r){var s,a,o=e.call(this)||this;qo(t)||!t?s={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:o&&ei.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return o.unsubscribe()},s={next:t.next&&ui(t.next,a),error:t.error&&ui(t.error,a),complete:t.complete&&ui(t.complete,a)}):s=t;return o.destination=new di(s),o}return Uo(t,e),t}(ci);function hi(e){var t;ei.useDeprecatedSynchronousErrorHandling?(t=e,ei.useDeprecatedSynchronousErrorHandling&&oi&&(oi.errorThrown=!0,oi.error=t)):ni(e)}function gi(e,t){var n=ei.onStoppedNotification;n&&ti.setTimeout((function(){return n(e,t)}))}var fi={closed:!0,next:ri,error:function(e){throw e},complete:ri},mi="function"==typeof Symbol&&Symbol.observable||"@@observable";function yi(e){return e}function Ii(e){return 0===e.length?yi:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var Ei=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 r,s=this,a=(r=e)&&r instanceof ci||function(e){return e&&qo(e.next)&&qo(e.error)&&qo(e.complete)}(r)&&Qo(r)?e:new pi(e,t,n);return ii((function(){var e=s,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?s._subscribe(a):s._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=Ai(t))((function(t,r){var s=new pi({next:function(t){try{e(t)}catch(e){r(e),s.unsubscribe()}},error:r,complete:t});n.subscribe(s)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[mi]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ii(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Ai(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Ai(e){var t;return null!==(t=null!=e?e:ei.Promise)&&void 0!==t?t:Promise}function _i(e){return qo(e[mi])}function Si(e){return Symbol.asyncIterator&&qo(null==e?void 0:e[Symbol.asyncIterator])}function Ci(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 Ti="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ni(e){return qo(null==e?void 0:e[Ti])}function Pi(e){return Go(this,arguments,(function(){var t,n,r;return jo(this,(function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,Bo(t.read())];case 3:return n=s.sent(),r=n.value,n.done?[4,Bo(void 0)]:[3,5];case 4:return[2,s.sent()];case 5:return[4,Bo(r)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Di(e){return qo(null==e?void 0:e.getReader)}function Ri(e){if(e instanceof Ei)return e;if(null!=e){if(_i(e))return s=e,new Ei((function(e){var t=s[mi]();if(qo(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Ho(e))return r=e,new Ei((function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()}));if(zo(e))return n=e,new Ei((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,ni)}));if(Si(e))return bi(e);if(Ni(e))return t=e,new Ei((function(e){var n,r;try{for(var s=Vo(t),a=s.next();!a.done;a=s.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.complete()}));if(Di(e))return bi(Pi(e))}var t,n,r,s;throw Ci(e)}function bi(e){return new Ei((function(t){(function(e,t){var n,r,s,a;return Fo(this,void 0,void 0,(function(){var o,i;return jo(this,(function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),n=Wo(e),c.label=1;case 1:return[4,n.next()];case 2:if((r=c.sent()).done)return[3,4];if(o=r.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(),s={error:i},[3,11];case 6:return c.trys.push([6,,9,10]),r&&!r.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(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Oi(e,t,n,r,s){void 0===r&&(r=0),void 0===s&&(s=!1);var a=t.schedule((function(){n(),s?e.add(this.schedule(null,r)):this.unsubscribe()}),r);if(e.add(a),!s)return a}function vi(e){return function(t){if(function(e){return qo(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 xi(e,t,n,r,s){return new wi(e,t,n,r,s)}var wi=function(e){function t(t,n,r,s,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=s?function(e){try{s(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return Uo(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}(ci);function Mi(e,t){return void 0===t&&(t=0),vi((function(n,r){n.subscribe(xi(r,(function(n){return Oi(r,e,(function(){return r.next(n)}),t)}),(function(){return Oi(r,e,(function(){return r.complete()}),t)}),(function(n){return Oi(r,e,(function(){return r.error(n)}),t)})))}))}function Li(e,t){return void 0===t&&(t=0),vi((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function Ui(e,t){if(!e)throw new Error("Iterable cannot be null");return new Ei((function(n){Oi(n,t,(function(){var r=e[Symbol.asyncIterator]();Oi(n,t,(function(){r.next().then((function(e){e.done?n.complete():n.next(e.value)}))}),0,!0)}))}))}function Fi(e,t){if(null!=e){if(_i(e))return function(e,t){return Ri(e).pipe(Li(t),Mi(t))}(e,t);if(Ho(e))return function(e,t){return new Ei((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}(e,t);if(zo(e))return function(e,t){return Ri(e).pipe(Li(t),Mi(t))}(e,t);if(Si(e))return Ui(e,t);if(Ni(e))return function(e,t){return new Ei((function(n){var r;return Oi(n,t,(function(){r=e[Ti](),Oi(n,t,(function(){var e,t,s;try{t=(e=r.next()).value,s=e.done}catch(e){return void n.error(e)}s?n.complete():n.next(t)}),0,!0)})),function(){return qo(null==r?void 0:r.return)&&r.return()}}))}(e,t);if(Di(e))return function(e,t){return Ui(Pi(e),t)}(e,t)}throw Ci(e)}function ji(e,t){return t?Fi(e,t):Ri(e)}function Vi(e,t,n){var r=qo(e)||t||n?{next:e,error:t,complete:n}:e;return r?vi((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var s=!0;e.subscribe(xi(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;s=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;s=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;s&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):yi}class ki{static portalRegex=/(?<=v2\/pages\/)(.*?)(?=\?pageClass=)/;#e=0;#t=0;#n;#r=[];constructor(){this.#n=!1,Br.subscribe(j.START_PERFORMANCE_LOG,(()=>{this.#n=!0,this.clearStorage(),this.#e=Date.now()}),j.START_PERFORMANCE_LOG),Br.subscribe(j.STOP_PERFORMANCE_LOG,(()=>{this.#n=!1,this.#t=Date.now(),this.#s()}),j.STOP_PERFORMANCE_LOG)}static getCategory(e){return e.includes("v2/cases")||e.includes("v2/assignments")?"Case":e.includes("v2/data_views")?"DataPage":e.includes("v2/pages")?"Page":""}static getPortalLabel(e,t){const n=ch(".pyPrimaryNavPages","pyPortal",t)||[];return n.find((t=>t.pyRuleName===e))?.pyLabel??e}static extractAssignmentLabel(e,t,n){e.label===j.TOP_ACTION_LABEL.OPENASSIGNMENT&&void 0===e.assignmentLabel&&(e.assignmentLabel=n?.data?.data?.caseInfo?.assignments.find((e=>e.ID===t))?.name??"")}#a(e,t,n,r){if(e<0)return;const s=this.#r[t].serviceCalls[e],a=Date.now();s.endTime=a,s.totalTimeTaken=a-s.startTime,s.httpMethod=r.config?.method,n?s.status="CANCELLED":"headers"in r&&(s.status=r.status,s.responseBytes=r.headers["content-length"])}#o(e,t,n,r,s){let a="";if(!n){const t=e.match(ki.portalRegex)[0];a=t?.split(" ")[0]}const o=`${t||a}${j.HASH_DELIMITER}${s.startTime}`,i=Eh.getHashedString(o);s.urlUniqueID=i;const c={label:t||`${ki.getPortalLabel(a,r)} Portal`,actionUniqueID:i,serviceCalls:[s]};return this.#r.push(c),{actionUniqueID:i,urlUniqueID:i,topLevelAction:n}}#i(e,t,n){const r=this.#r[e];ki.extractAssignmentLabel(r,t,n);const s=n.data?.data?.caseInfo?.content;s&&(r.caseLabel=s.pyLabel,r.caseID=s.pyID)}buildActionsList(e){const{url:t,topLevelAction:n,userAction:r,actionLabel:s,context:a}=e;let o={};if(this.#n){const e={url:t.split(E()??"")[1],startTime:Date.now(),context:a,category:ki.getCategory(t)};if(n&&r)o=this.#o(t,s,!0,a,e);else if(ki.portalRegex.test(t))o=this.#o(t,s,!1,a,e);else if(this.#r.length>0){const r=this.#r[this.#r.length-1].serviceCalls,s=`${t}${j.HASH_DELIMITER}${e.startTime}${j.HASH_DELIMITER}${r.length}`,a=Eh.getHashedString(s);e.urlUniqueID=a,r.push(e),o.actionUniqueID=this.#r[this.#r.length-1].actionUniqueID,o.urlUniqueID=a,o.topLevelAction=n}}return o}reformActionList(e,t,n,r){const s=t.config,{actionUniqueID:a,urlUniqueID:o,topLevelAction:i,assignmentID:c}=s;if(this.#n){const s=this.#r.findIndex((e=>e.actionUniqueID===a));if(s>=0){i&&n&&"data"in t&&this.#i(s,c,t),e=e.split(E()??"")[1];const a=this.#r[s].serviceCalls.findIndex((t=>t.url===e&&t.urlUniqueID===o));this.#a(a,s,r,t)}}}#s(){if(0===this.#r.length)return;const e={version:"1.0.0",recordedTime:this.#t-this.#e,totalActions:this.#r.length,startTime:this.#e,userActions:this.#r};localStorage.setItem("performanceData",JSON.stringify(e))}clearStorage(){localStorage.removeItem("performanceData"),this.#r=[]}}const $i=new ki;class Bi{constructor(e,t=!0){this.config=e,t?(this.ssKeyConfig=e,this.reloadConfig()):this.updateConfig(e,!1)}static init(e,t=!0){return new Bi(e,t)}updateConfig(e,t=!0){t?window.sessionStorage.setItem(this.ssKeyConfig,JSON.stringify(this.config)):Ec(e)}reloadConfig(e=!0){if(e){const e=window.sessionStorage.getItem(this.ssKeyConfig);this.config=e?JSON.parse(e):null}else this.config=Ac()}async buildAuthorizeUrl(e){e=e||window.btoa(location.origin);let{sessionIndex:t}=this.config;const{password:n}=this.config,r=this.config.clientId?this.config.clientId:this.config.client_id,s=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:ip.getApplicationAlias(),c=this.config.userIdentifier?this.config.userIdentifier:this.config.user_identifier;t=t||this.config.tokenInfo.session_index;const l=t?`&session_index=${t}`:`${c}`?`&UserIdentifier=${c}`:`${n}`?`&Password=${window.atob(n)}`:"",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=${r}&response_type=code&redirect_uri=${s}&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=-1!==t?e.indexOf("/",t+2):-1;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,r=this.config.clientSecret?this.config.clientSecret:this.config.client_secret,s=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 u.append("client_id",n),r&&u.append("client_secret",r),u.append("grant_type","authorization_code"),u.append("code",l),u.append("redirect_uri",s),u.append("code_verifier",o),this.config?.secureCookie&&u.append("send_token_as_cookie","true"),pc(a,{method:"POST",headers:new 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?yc({pzCTkn:e?.csrf}):(Ic({tokenInfo:e}),yc({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 Gi=Bi,Wi=async()=>new Promise((async(e,t)=>{const n=_c();if(!n?.tokenInfo)return void t(new Error("Missing token information."));const{access_token:r,refresh_token:s=null}=n.tokenInfo,{revoke:a}=n.endPoints,{client_id:o,client_secret:i,secureCookie:c}=n,l={"content-type":"application/x-www-form-urlencoded"};i&&(l.authorization=`Basic ${window.btoa(`${o}:${i}`)}`);const u=new URLSearchParams;i||u.append("client_id",o),c&&u.append("send_token_as_cookie","true");const d=s?"refresh_token":"access_token",p="access_token"===d?r:s;!c&&p&&u.append("token",p),u.append("token_type_hint",d),await pc(a,{method:"POST",headers:new Headers(l),credentials:c?"include":"omit",body:u.toString(),withoutDefaultHeaders:!0}),yc({Authorization:null}),Ic({tokenInfo:null}),e()})),Hi=async e=>{const t={};if("OAuth2.0"===e?.authType){const n=new Gi(e,!1);t.reauthUrl=await n.buildAuthorizeUrl(),t.redirectOrigin=n.getRedirectUriOrigin(),window.addEventListener("message",n.authMessageHandler,!1)}else t.reauthUrl=E()+(I()?`${I()}`:"/?reAuth=true");return t},qi=(e,t)=>{Hi(t).then((t=>{const n={openReauthMessageModal:!0,reAuthenticationURL:t.reauthUrl,url:e,redirectOrigin:t.redirectOrigin};Br.publish(F.PUB_SUB_EVENTS.EVENT_REAUTH,n)}))},zi=e=>{let t="",n={},r={},s=!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)&&(s=!1),a.append("client_id",e.client_id),a.append("grant_type","refresh_token"),e.clientSecret&&a.append("client_secret",e.clientSecret),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"}},r={success:t=>{const{data:n}=t,r={access_token:n?.access_token,refresh_token:n?.refresh_token};Ic({tokenInfo:{...e.tokenInfo,...r}}),e.secureCookie?yc({pzCTkn:n?.csrf}):yc({Authorization:`${n?.token_type} ${n?.access_token}`});const{onTokenRetrieval:s}=e;s&&"function"==typeof s&&s(n)},failure:t=>{if(e.popupReauth)return qi(t,e);Br.publish(F.PUB_SUB_EVENTS.EVENT_FULL_REAUTH,e)}}}else t=`${E()}/updateSession`,n={method:"GET",headers:{}},r={failure:qi};return{url:t,config:n,callback:r,isRefreshTokenPresent:s}},Yi=(e,t)=>"OAuth2.0"===t?.authType?e?.includes(t.endPoints.token):e?.includes("updateSession"),Ki=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}},Xi=(e,t,n)=>{const{config:r}=e,{url:s,config:a,callback:o,isRefreshTokenPresent:i}=zi(n),c=r.headers&&r.headers.context;r.data&&(r.body=r.data);const l=hc(r.url,r,c,t);return i?pc(s,a).then((e=>(t.setUpdateSessionStatus(!1),o?.success?.(e,r),Br.publish("updateSession",{updateStatus:"success"}),l.then((e=>Promise.resolve(e))).catch((e=>Promise.reject(e)))))).catch((e=>e&&e.config&&Yi(e.config.url,n)?(o?.failure?.(r.url,n),l):Promise.reject(e))):(o?.failure?.(r.url,n),l)},Ji=(e,t,n,r)=>{if(e.config&&Yi(e.config.url,n))return Promise.reject(e);if(e.response&&e.response.status&&401===e.response.status&&!t.getUpdateSessionStatus()){if(Br.unsubscribeAllWithEventType(rc),t.setUpdateSessionStatus(!0),"custom"===n?.authType){Br.publish(F.PUB_SUB_EVENTS.EVENT_CUSTOM_REAUTH);const{url:n,config:r,context:s}=Ki(e);return hc(n,r,s,t)}return Xi(e,t,n)}if(e.response&&e.response.status&&401===e.response.status&&t.getUpdateSessionStatus()){const{url:t,config:n,context:r}=Ki(e);return pc(t,n,r)}if(e.response&&e.response.status&&422!==e.response.status&&424!==e.response.status&&e.config.headers.context&&e.response.data&&!r){const t=e.response.data.errorDetails&&e.response.data.errorDetails.map((t=>((e,t)=>t[F.TRACE_ID]?{type:"error",message:e.localizedValue||e.message,correlationID:t[F.TRACE_ID]}:{type:"error",message:e.localizedValue||e.message})(t,e.response.headers)));let n=e.config.headers.context;return n&&n.includes("/workarea")&&!n.includes("/modal")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),zn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return Promise.reject(e)};const Qi=class{constructor(){this.updateSessionInProgress=!1}getUpdateSessionStatus=()=>this.updateSessionInProgress;setUpdateSessionStatus=e=>{this.updateSessionInProgress=e}};const Zi=class{constructor(e){this.xrayInfo={},this.xRayDebugger=e}startXRay(){if(!this.xRayDebugger.xray)return null;const e=`${Date.now()+Math.random()}`;return this.xrayInfo[e]={startTime:Date.now()/1e3},e}startXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?this.xrayInfo[e].restApisTime:{},[t]:Date.now()}})}stopXRayRestApi(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],restApisTime:{...this.xrayInfo[e]?.restApisTime,[t]:(Date.now()-this.xrayInfo[e]?.restApisTime[t])/1e3}})}updateXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],...t})}stopXRay(e,t){this.xRayDebugger.xray&&(this.xrayInfo[e]={...this.xrayInfo[e],totalTime:Date.now()/1e3-this.xrayInfo[e].startTime},t().setXRayInfo(this.xrayInfo[e]),delete this.xrayInfo[e])}};const ec=new class{constructor(){this.xray=!1,this.onXRayCallback=null,this.xrayRuntime=new Zi(this),this.isPreview=!1,this.debugLevels="vcv=1;tracer=0;log=0"}onXRay(e){this.onXRayCallback=e}toggleXRay(e){this.xray=e,this.xrayRuntime.xrayInfo={},null!==this.onXRayCallback&&this.onXRayCallback(e)}enableXRay(){this.toggleXRay(!0)}disableXRay(){this.toggleXRay(!1)}toggle(){this.xray?this.toggleXRay(!1):this.toggleXRay(!0)}isXRayOn(){return this.xray}getXRayRuntime(){return this.xrayRuntime}setPreviewMode(){this.isPreview=!0}getPreviewMode(){return this.isPreview}enableTracer=()=>{this.debugLevels="vcv=1;tracer=1;log=0"};disableTracer=()=>{this.debugLevels="vcv=1;tracer=0;log=0"};getDebugLevels=()=>this.debugLevels};const tc=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){this.defaultHeaders={...this.defaultHeaders,...e}}getDefaultHeaders(){return this.defaultHeaders}addDebugHeaders(e={}){return{[j.COREHEADER_APP_DEBUG_ID]:e.debugId,[j.COREHEADER_APP_DEBUG_LEVELS]:ec.getDebugLevels()}}getCoreHeadersFromContext(e){if(["root","app"].includes(e)||!e)return;const t=Ch.getProperty(j.COREHEADERS,"",e);return t?{...t,debugInfo:ec.getPreviewMode()&&{...t.debugInfo,[j.COREHEADER_APP_DEBUG_LEVELS]:ec.getDebugLevels()}}:(e=e.substr(0,e.lastIndexOf(this.SPECIAL_CHARS.SLASH)),this.getCoreHeadersFromContext(e))}processCoreHeaders(e,t,n){const r=this.getCoreHeadersFromContext(n);if(r){const t=Object.keys(e);if(t.includes(j.SKIPCOREHEADERS))return void delete e[j.SKIPCOREHEADERS];const n=Object.assign({},...Object.values(r));Object.keys({...n}).forEach((r=>{t.includes(r)||(e[r]=n[r])}))}}injectCoreAdditionalHeaders(e,t,n,r){r?.includeRemoteSystemIdIfPresent&&$.injectRemoteCaseHeader(e,t,n),this.processCoreHeaders(e,t,n)}},nc=tc;const rc="updateSession",sc={},ac=new Qi,oc=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&&(Br.unsubscribe(F.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((()=>{Br.publish(F.PUB_SUB_EVENTS.TIMEOUT_REMINDER,{timeRemaining:this.expiryBuffer}),clearTimeout(t),Br.subscribe(F.PUB_SUB_EVENTS.RESET_TIMER,this.resetInactiveTimeout,"resetCallback"),this.timeoutWarned=!0}),1e3*(e-this.expiryBuffer));return this.setTimerID(t),t}};let ic={},cc={},lc={},uc="";const dc=e=>{ic=e},pc=(e,t,n="root",r={})=>{const{doNotMergeHttpMessagesForStatusCode:s=null,cancelContext:a=n,includeRemoteSystemIdIfPresent:o=!0,actionLabel:i="",assignmentID:c=""}=r;let{topLevelAction:l=!1}=r;const u=l;l||(l=t.topLevelAction||!1),uc=s,null===e&&window.console.error("Error: url passed to Service Broker fetch is null (or) undefined");const{body:d,signal:p,withoutDefaultHeaders:h=!1,...g}=t;let f={};cp.getPerformanceDashboardVisibility()&&(f={assignmentID:c,...$i.buildActionsList({url:e,topLevelAction:l,userAction:u,actionLabel:i,context:n})});const{Authorization:m,pzCTkn:y,...I}=t.headers||{};h||nc.injectCoreAdditionalHeaders(I,t.body,n,{includeRemoteSystemIdIfPresent:o}),a&&sc[a]>=0?sc[a]+=1:a&&void 0===sc[a]&&(sc[a]=1);let E=h?{...I}:{...nc.getDefaultHeaders(),...nc.getRegisteredHeaders(),...I,context:n};if(e&&Yi(e,cc)&&ac.getUpdateSessionStatus()||!ac.getUpdateSessionStatus()){Yi(e,cc)&&"OAuth2.0"===cc?.authType&&(E={...I});const{restApi:t}=ip.doesRestApiExist("Logout")&&ip.getRestEndPoint("Logout")||{restApi:null};return(!t||e&&!e.endsWith(t))&&oc.setTimerID(oc.resetInactiveTimeout(oc.getTimerID())),function(e,t){var n="object"==typeof t;return new Promise((function(r,s){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:s,complete:function(){o?r(a):n?r(t.defaultValue):s(new Mo)}})}))}(ji(xo({context:n,...g,url:e,data:d,...p&&void 0===p.aborted&&{cancelToken:p},...p&&void 0!==p.aborted&&{signal:p},headers:E,withCredentials:!("OAuth2.0"!==cc?.authType||!cc.secureCookie)||void 0,...f})).pipe(Vi((()=>{const e=nc.getCoreHeadersFromContext(E.context);e&&(e=>{Br.publish(j.PUB_SUB_EVENTS.FETCH_SUCCESS,e)})({...e})}))))}return hc(e,t,n,ac)},hc=(e,t,n,r)=>new Promise(((s,a)=>{Br.subscribe(rc,(o=>{r.setUpdateSessionStatus(!o.updateStatus),"success"===o.updateStatus?pc(e,t,n).then((e=>s(e))).catch((e=>a(e))):a(o.updateStatus.error)}),rc)})),gc=e=>{sc[e]>0&&(sc[e]-=1,0===sc[e]&&delete sc[e])};xo.interceptors.request.use((e=>(ic.request&&(e=ic.request(e)),e)),(e=>Promise.reject(e))),xo.interceptors.response.use((e=>{const t=e.config.url;if(cp.getPerformanceDashboardVisibility()&&$i.reformActionList(t,e,!0,!1),202===e.status&&e.config.headers.context&&e.data?.caseInfo?.errorMessage){const t=[{type:"error",message:e.data.caseInfo.errorMessage}];let n=e.config.headers.context;return n&&n.includes("/workarea")&&(n=n.substring(0,n.lastIndexOf("/workarea"))),zn({messages:t,category:"HTTP",context:n}),Promise.reject(e)}return e.config.headers&&e.config.headers.context&&(e.config.skipClearErrorMessages||(Hn({type:"error",category:"HTTP",context:e.config.headers.context}).length>0&&qn({type:"error",category:"HTTP",context:e.config.headers.context}),Hn({type:"error",category:e.config.headers.context===j.APP.APP?"PAGE":"",context:e.config.headers.context}).length>0&&qn({type:"error",category:"PAGE",context:e.config.headers.context})),gc(e.config.headers.context)),ic.response&&(e=ic.response(e)),e}),(e=>{if(e.config&&e.config.headers&&e.config.headers.context&&gc(e.config.headers.context),cp.getPerformanceDashboardVisibility()){const t=e.config.url,n=xo.isCancel(e);$i.reformActionList(t,n?e:e.response,!1,n)}return!e.response||!e.response.status||401!==e.response.status||e.config&&Yi(e.config.url,cc)||Br.subscribe(rc,(e=>{ac.setUpdateSessionStatus(!e.updateStatus)}),rc),Ji(e,ac,cc,e.response&&e.response.status&&e.response.status===Number(uc)?uc:null)}));const fc=()=>xo.CancelToken.source(),mc=e=>xo.isCancel(e),yc=e=>{nc.setDefaultHeaders(e)},Ic=e=>{cc={...cc,...e}},Ec=e=>{lc={...lc,...e}},Ac=()=>({...lc}),_c=()=>({...cc});const Sc=class{static isCaseActive(e,t){if(!e||!t)return!1;const n=rd(t);if(n){const r=pd(t),{items:s={}}=n;return!(!r||!s[r]||s[r].key!==e)}return!1}static getCaseEditMetadata=(e,t)=>{const n={caseID:e,viewID:"pyEdit"},{restApi:r,reqType:s}=_g("loadView",n);return pc(r,{method:s},t)};static getCaseEditLock=(e,t)=>{const n={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:r,reqType:s}=_g(Ye,n);return pc(`${r}?viewType=page`,{method:s},t)};static updateCaseEditFieldsData=(e,t,n,r)=>{const s={caseID:e,actionID:"pyUpdateCaseDetails"},{restApi:a}=_g(Ye,s),o=t[e];return pc(`${a}?viewType=form`,{method:"PATCH",body:{content:{...o}},headers:{"if-match":n}},r)};static getCaseMessages=e=>ah(e)?.caseMessages;static getPropertiesToReplace=e=>(al(e)||[]).filter((e=>!e.allowMultiple)).map((e=>e.fullPath));static getUniqueGadgetId=()=>Eh.generateUniqueID().substring(0,5);static getRemoteCaseMapping=()=>$.getRemoteCaseMapping();static isTraditionalRemoteCase=e=>$.isTraditionalRemoteCase(e);static getRemoteCaseKey=(e,t)=>{let n=t;try{e&&(n=e.slice(e.indexOf(" ")+1,e.indexOf("!")))}catch{}return n}},{RESOURCE_TYPES:Cc}=F,Tc={PAGE:"page",FORM:"form"},Nc={[Cc.CASE]:[We,Be,Ge],[Cc.PAGE]:[je,ke],[Cc.DATA]:[Ve]},Pc=(e,t,n={})=>{if(!e)return{};const r={etag:e.etag},{RemoteSystemID:s}=n;return e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||s?r.RemoteSystemID=e[F.REMOTE_SYSTEM_ID]||e[F.REMOTE_SYSTEM_ID.toLowerCase()]||s:t&&$.isRemoteCase(t)&&(r.RemoteSystemID=$.getRemoteHeader(t)),r},Dc=(e,t={})=>{const{onlyChangedData:n=!1,nonEmptyAndChangedData:r=!1,skipUUID:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1}=t;let i={};i=ol(e,{isTransientContext:a,includeDisabledFields:o}),n&&(delete i?.caseInfo?.content,a&&(i={}));const c=Al(e,!1);!a&&r&&((e,t)=>{Object.entries(e?.caseInfo?.content).forEach((([n,r])=>{const s=ah(t),a=b()(s,F.CASE_INFO.CASE_INFO_CLASSID),o=vp(n,a);("True-False"===o?.type&&!r||""===r)&&delete e.caseInfo.content[n]}))})(i,e);const l=w()(c,i);let u={},d=!1;({content:u,attachmentsExist:d}=((e,t)=>{let n={},r=!1;return(e||t?.caseInfo)&&(n=e?{...t}:{...t?.caseInfo},t?.caseInfo?.attachments&&(r=!0)),{content:n,attachmentsExist:r}})(a,l));const p=[...fr(e)];s&&p.forEach((e=>{delete e.content?.EmbedListUUID__})),u.pageInstructions=p;return(lr[e]||[]).forEach((e=>{if(u?.content){const t=e?.replace(j.CASE_INFO.CASE_INFO_CONTENT,"");Eh.deleteIn(u.content,(e=>{if(!e)return"";const t=e.split(".");let n,r="";for(n of t)if(n){if(n.includes("[")&&n.includes("]"))return r+=`['${n.substring(0,n.lastIndexOf("["))}']`,r;r+=`['${n}']`}return r})(t))}})),!a&&l?.dataInfo?(u={...l.dataInfo,pageInstructions:u.pageInstructions},{content:u}):{content:u,attachmentsExist:d}},Rc=(e,t)=>{let n,r,s={};const a=Eh.getIn(e,j.UI_RESOURCES),o=Eh.getIn(e,"confirmationNote");a?(n=Eh.getIn(e,j.UI_RESOURCES_CONTEXT_DATA),r=Eh.getIn(e,j.ROOT),s=Eh.getIn(e,j.ACTION_BUTTONS)):o&&(r={});const{data:i={},Errors:c,semanticURL:l,key:u,flowName:d}=e,p=Eh.getIn(e,"nextAssignmentInfo",null),h=Eh.getIn(e,"nextAssignmentInfo.context",""),g=Eh.getIn(e,"confirmationLinks",null),{isInCreateStage:f,openCaseViewAfterCreate:m,debugInfo:y}=t;return{data:{...i,key:u,flowName:d,coreHeaders:y&&{debugInfo:{[j.COREHEADER_APP_DEBUG_ID]:y.debugId}},caseInfo:{...i.caseInfo,actionButtons:s,headers:t.headers},[j.CONTEXT_DATA]:f?{...i[j.CONTEXT_DATA],...n,openCaseViewAfterCreate:m,errors:c}:{...i[j.CONTEXT_DATA],...n,errors:c}},semanticURL:l,nextAssignmentInfo:p,assignmentContext:h,confirmationLinks:g,key:u,root:r,...t}},bc=async(e,t,n,r=!1,s=!1)=>{const a=Eh.getIn(e,j.LOCALE_REFERENCES);await up.loadLocaleResources(a);const o=Eh.getIn(e,j.COMPONENTS);if(o)try{await Fr(o)}catch(e){console.error(e)}const i={actionConfig:t,...n};r?Rg({...e,options:i,directUrlUpdation:!0}):xr(e,i,s)},Oc=(e="")=>{const t=e.indexOf(" "),n=e.indexOf("!");return e.substring(t+1,n)},vc=e=>{if(e){const[,t]=e.split("!");return{key:Oc(e),flowName:t}}return{}},xc=(e,t)=>{const n=[],r=[];return e.forEach((e=>{((e,t,n,r)=>{switch(!0){case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&e[j.ERROR_FIELD_IN_PAGE]):{const s=`${e[j.ERROR_FIELD_IN_PAGE]}`.replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`)),a=`${s}${e[j.ERROR_IN_PAGE_IDENTIFIER]}`,o=Eh.deepClone(e);o[j.ERROR_FIELD_IN_PAGE]=s,t.includes(a.slice(1))||t.includes(a.substring(a.indexOf(".")+1,a.indexOf("[")))?r.push(o):n.push(e);break}case Boolean(e[j.ERROR_IN_PAGE_IDENTIFIER]&&!e[j.ERROR_FIELD_IN_PAGE]):{const s=e[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);t.includes(s)?r.push(e):n.push(e);break}default:n.push(e)}})(e,t,n,r)})),{fieldErrors:r,pageErrors:n}},wc=e=>{const{payload:t}=e,{err:n,context:r,actionMgrID:s}=t,a=n&&n.response?n.response.data:"",o=cl(r);return s&&ln.rejectActionByID(s),ng(rg,"Error action triggered",a,r,o)},Mc=(e,t)=>_d(e)&&Cd(e)?ng(Qh,t):ng(Fh,t),Lc=(e,t,n=j.APP.APP,r={})=>{let s=null;const{buildNew:a=!0}=r;return _d(e)?s=Cd(e)?pd(e):H(t,n):Sd(e)&&(Cd(e)&&!a?s=md(e):Cd(e)&&!a||(s=H(t,n))),s},Uc=e=>e&&e.type===Se,Fc=e=>{let t=!1;const n=Ed(e);for(let e=0;e<n.length;e+=1){const r=n[e];if(r&&Nl(r)){t=!0;break}}return t},jc=(e,t={})=>{let n=!1,r=!1,s={},a=!0,o=!1,i=!1;const{showConfirmDialogForMaxDocumentLimitReached:c=!1,dirtyMessage:l,skipChildDirtyState:u=!1}=t;if(_d(e)){const t=pd(e),r=fd(t);Nl(r)&&(n=!0),u||n||(n=Fc(t))}else if(Sd(e)&&Pd(e)){let t=bd(e);t||(t=pd(e),r=!0),s.containerItemID=t,s.context=fd(t)}if(n){const e=l||Il;o=window.confirm(up.getLocaleValue(e,"Messages"))}if(!o&&n&&(s={},a=!1),r){const e=up.getLocaleValue(El,"Messages");c?i=window.confirm(e):(window.alert(e),a=!1)}return!i&&r&&(s={},a=!1),{continueExecution:a,removeActionPayload:s}},Vc=(e,t)=>{let n=!1;const r=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT),{insKey:s,isParallelCall:a,skipFlowNameCheck:o}=t;if(!s)return{};const[,i]=s.split("!")||"",c=o?s:Oc(s),l=ld(e,c);let u={},d=!1;if(l&&!r&&(n=!0,u=sd(e,l),!o)){let e=u?.flowName;const t=qr(l),r=yd(l);if(r.length){const n=mt(t,r[0]);e=sd(n,r[0])?.flowName}else n=e===i;(e!==i||a)&&(d=!0)}return{activate:n,activateContainerActionPayload:{target:e,isParallelAssignment:d,containerItemID:l,semanticURL:u.semanticURL,insKey:s}}},kc=(e,t,n)=>e===Cc.PAGE?((e,t={})=>{let n=!1;const{semanticURL:r}=t,s=ld(e,r);return s&&(n=!0),{activate:n,activateContainerActionPayload:{target:e,containerItemID:s,semanticURL:r}}})(t,n):e===Cc.ASSIGNMENT?Vc(t,n):e===Cc.CASE?Vc(t,{...n,skipFlowNameCheck:!0}):{},$c=(e=[])=>{Cd(`${j.APP.APP}/${j.PREVIEW}`)&&e.push(ng(Uh,Dd({context:F.APP.APP,name:j.PREVIEW})))},Bc=e=>{let t;for(const n of Object.keys(Nc))if(Nc[n].includes(e)){t=n;break}return t},Gc=(e,t)=>{const{data:n={},context:r,caseViewMode:s}=e,a={data:{...n},caseViewMode:s,context:W(r)};Eh.deleteIn(a.data,"shared"),Eh.setIn(a.data,["context_data","caseViewMode"],s),t.push({type:st,payload:{context:a.context}}),t.push(ng(bh,a))},Wc=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=Eh.getIn(t,["payload","assignmentContext"]);if("other"===n||"remote"===n){const r=Eh.getIn(t,["payload","nextAssignmentInfo","ID"]);if(t?.payload?.isProcessAction){const n={acName:Eh.getIn(t,["payload","target"]),caseID:t.payload.data.caseInfo.ID,containerItemID:Eh.getIn(t,["payload","context"]),context:Eh.getIn(t,["payload","context"])},r={type:he,payload:{...n}};e.push(r),e=e.filter((e=>delete e?.payload?.data?.caseMessages)),sh(e),e=e.filter((e=>e.type!==he))}const s=((e,t,n)=>({assignmentID:e,vcName:j.PRIMARY,targetContainerName:Eh.getIn(t,["payload","target"]),context:Eh.getIn(t,["payload","context"]),..."other"===n&&{isChild:!0},isProcessAction:t?.payload?.isProcessAction,..."remote"===n&&{isRemote:!0},..."remote"===n&&{remoteClassName:t.payload.nextAssignmentInfo.className}}))(r,t,n);_d(s.targetContainerName)||t?.payload?.containerName!==j.WORKAREA||(s.isMultiDoc=!0,e=[]);const a={type:ge,payload:{...s}};e.push(a),sh(e)}else sh(e)}},Hc=(e,t)=>w()(e,t,(function(e,t){if(Array.isArray(e))return e.concat(t)})),qc=e=>{let t={},n=Kd(e);for(;n;){const e=Dc(n);t=Hc(e.content,t),n=Kd(n)}return t};class zc{static getChanges(e){return{...Al(e)}}static getSubmitData(e,t={}){const{isTransientContext:n=!1,includeDisabledFields:r=!1}=t,{content:s}=Dc(e,{isTransientContext:n,includeDisabledFields:r});return s}static isStateModified(e){return Nl(e)||Nr(e)||!(!e||!Sl(e))}static isFormValid(e,t){return il(e,t)}static clearChangedProperties(e){return yr(e),gr(e),Dl(e)}static getEditableFields(e){return ll(e)}static setCustomValidator(e,t){Or.register(e,t)}static isPropertyEditable(e,t){return zc.getEditableFields(e).some((e=>e.name===t))}}const Yc=zc;const Kc=new class{constructor(){this.states={},this.unConnectedStates={}}getStateMachine(e,t,n){return this.states?.[e]?.[`${t}${n}`]||this.unConnectedStates?.[e]?.[`${t}${n}`]}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,r){const s=`${n}${t}`,{stateMachine:a}=this.getStateMachineObjByPath(s,e,!0);if(a&&a.targetPageReference!==r.targetPageReference)return a.addChild(r),this.unConnectedStates[e]||(this.unConnectedStates[e]={}),this.unConnectedStates[e][s]||(this.unConnectedStates[e][s]={}),void(this.unConnectedStates[e][s]=r);this.states[e]||(this.states[e]={}),this.states[e][s]||(this.states[e][s]={}),this.states[e][s]=r}buildPageInstructionsByContext(e,t){const n=this.getStateMachinesByContext(e)||{},r=[];return Object.keys(n).sort().forEach((s=>{const a=Pn.getContextReferences(e)?.get(s),o=n[s];if(a){const e=o.buildSubmitPageInstructions(t);r.push(...e)}})),r}buildClientChangeList(e){const t=this.getStateMachinesByContext(e)||{};let n={};const r={};return Object.keys(t).forEach((e=>{const r=t[e].getChangeList();n={...n,...r}})),Eh.flatten(n,"",r),r}getStateMachinesByContext(e){return e?this.states?.[e]:void 0}clearStateMachines(e){this.states[e]={},this.unConnectedStates[e]={}}removeStateMachine(e,t){delete this.states[e]?.[t]}getStateMachineObjByPath(e,t,n){const r=/\[\d+\]$/gm;let s=null;for(;e&&!this.isStateMachineExist(t,"",e);)s=null,n&&e.endsWith("]")?(s=e.match(r),s=s?.[s.length-1]?.substring(1,s[s.length-1].length-1),[e]=e.split(r)):e=e.substring(0,e.lastIndexOf("."));return e?{stateMachineTarget:e,stateMachine:this.getStateMachine(t,"",e),index:s}:{}}executeStateMachine(e,t,n,r=!0,s={}){const{stateMachineTarget:a,index:o}=this.getStateMachineObjByPath(t,e,r);if(!a)return!1;let[,i]=t.split(a);if(!i)return!1;null!==o&&([,i]=i.split(/^\[\d+\]/gm));const c={[Jc(i)]:n},l=this.getStateMachine(e,"",a);return null!==o?l.update(c,Number(o)+1,s.skipStateUpdate??!0,s):l.updatePage(Eh.unflatten(c)),!0}registerForServerChanges(){Zp.registerForListChanges(((e,t,n)=>{!t.includes(".classID")&&Yc.isPropertyEditable(e,t)&&this.executeStateMachine(e,t,n)}))}unRegisterForServerChanges(){Zp.unRegisterForListChanges()}},Xc={},Jc=e=>e.startsWith(".")?e.substring(1):e,Qc=e=>{delete Xc[e]},Zc=(e,t={})=>{const{includeDisabledFields:n=!1}=t,r=Ch.resolveContextTreeNodeProps(e),s=!0!==r.readOnly&&!1!==r.visibility&&(n||!0!==r.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&&s},el=(e,t,n,r,s)=>{let a=(ch(`.attachmentsList.${t?.replace(".","")}`,"context_data",n)||[]).filter((e=>`${r.pageReference}.${e.label}`===s));return a=Eh.buildAttachmentsFormData(a),a.length>0&&(e=[...e,...a]),e},tl=(e,t,n,r,s)=>(Kc.executeStateMachine(e,r,Ch.getLitePropertyValue(n,t))||s.push(r),s),nl=e=>{const t=e.pageReference?.replace(F.CASE_INFO.CASE_INFO_CONTENT,"")?.replace(F.DATA_INFO.DATA_INFO_CONTENT,"");return"Attachment"===e.componentName&&""!==t},rl=(e,t,n)=>{const r=t.isInsideList,{ignoreFieldsInsideList:s=!0}=n;return(!r||r&&!s)&&!Array.isArray(Ch.getLitePropertyValue(t,e))&&"Address"!==t.componentName},sl=(e,t={})=>{let n=[],r=[];const s=[],a=Pn.getContextReferences(e);if(!a)return{formInputs:n,attachments:r,formPageFields:s};if(({attachmentList:r,editableFormFieldsReferenceList:n}=((e,t,n)=>{const{includeDisabledFields:r=!1}=n;let s=[],a=[];for(const[o,i]of e){const e=Ch.resolveContextTreeNodeProps(i.props),c=e.propertyName;if(Zc(i.props,{includeDisabledFields:r})){const r=nl(e);"Attachment"!==e.componentName||r?!r&&rl(o,e,n)&&(s=tl(t,c,e,o,s)):a=el(a,c,t,e,o)}}return{attachmentList:a,editableFormFieldsReferenceList:s}})(a,e,t)),Xc[e])for(const t in Xc[e].fieldOrder)Object.hasOwn(Xc[e].fieldOrder,t)&&s.push(t);return{formInputs:n,attachments:r,formPageFields:s}},al=e=>{let t=[];const n=Pn.getContextReferences(e);if(n)for(const[e,r]of n){const n=r?.props;if(Zc(n)&&"Attachment"===n?.componentName){const r="true"===n?.allowMultiple;t=[...t,{type:"File",allowMultiple:r,fullPath:e}]}}return t},ol=(e,t={})=>{const n={},r=ah(e),{ignoreFieldsInsideList:s=!0,isTransientContext:a=!1,includeDisabledFields:o=!1}=t;if(a||r?.caseInfo?.content){const{formInputs:t,attachments:i,formPageFields:c}=sl(e,{ignoreFieldsInsideList:s,includeDisabledFields:o});i&&i.length>0&&Eh.buildObject("caseInfo.attachments",n,i),((e,t,n)=>{e.forEach((e=>{let r=Eh.getIn(t,e);"object"==typeof r&&(r=Eh.deepClone(r),delete r?.classID),Eh.buildObject(e,n,r)}))})(c,r,n),t&&t.length>0?t.forEach((e=>{Eh.buildObject(e,n,Eh.getIn(r,e))})):a||Eh.buildObject(F.CASE_INFO.CASE_INFO_CONTENT,n,{})}if(!a&&r?.dataInfo?.content){const{formInputs:t}=sl(e,{ignoreFieldsInsideList:s});t.forEach((e=>{Eh.buildObject(e,n,Eh.getIn(r,e))}))}return n},il=(e,t)=>{const n=Pn.getContextReferences(e);let r=!0;if(!n)return r;for(const[e,s]of n){const n=Ch.resolveContextTreeNodeProps(s.props);if(Zc(s.props)&&(!t||e.includes(t))){const e=Or.validate(n.componentName?.toLowerCase(),n.propertyName,Ch.getLitePropertyValue(n,n.propertyName),n);r&&(r=!e.message)}}return r},cl=(e,t=!1)=>{const n=Pn.getContextReferences(e),r=[];if(n)for(const[e,s]of n){if(!1!==Ch.resolveContextTreeNodeProps(s.props).visibility){const n=8,s=t?e:e.substring(e.indexOf("content")+n);r.push(s)}}return r},ll=e=>{const t=[],n=Pn.getContextReferences(e);if(n)for(const[e,r]of n){const n=Ch.resolveContextTreeNodeProps(r.props);Zc(r.props)&&"Attachment"!==n.componentName&&"multirecordlist"!==n.type&&t.push({name:e,label:n.label,type:n.componentName?.toLowerCase()})}return t};const ul=class{static getPropertyName(e){return Qt.getPropertyName(e)}static isProperty(e){return Qt.isProperty(e)}static getLeafPropertyName(e){return Qt.getLeafPropertyName(e)}static isPropertyInternal(e){return e.startsWith("px")||e.startsWith("pz")}};const dl=class{static isPageInstruction(e){return e&&e.includes("[")&&e.includes("]")}};class pl{constructor(){this.refreshMap={},this.propChangeRefreshMap={}}static initializeRefreshCache(e,t,n,r,s){void 0===e[t]&&(e[t]={}),e[t][n]=[{uniqueHash:r,callback:s}]}registerForRefresh(e,t,n,r,s){const a=r.split("/").join(j.HASH_DELIMITER),o=Eh.getHashedString(a);if("PROP_CHANGE"===e)if(this.propChangeRefreshMap?.[s]?.[n]){this.propChangeRefreshMap[s][n].some((e=>e.uniqueHash===o))||this.propChangeRefreshMap[s][n].push({uniqueHash:o,callback:t})}else pl.initializeRefreshCache(this.propChangeRefreshMap,s,n,o,t);else if(this.refreshMap?.[s]?.[`${e}-${n}`]){this.refreshMap[s][`${e}-${n}`].some((e=>e.uniqueHash===o))||this.refreshMap[s][`${e}-${n}`].push({uniqueHash:o,callback:t})}else pl.initializeRefreshCache(this.refreshMap,s,`${e}-${n}`,o,t)}triggerRefreshForType(e,t,n){"PROP_CHANGE"===e?this.propChangeRefreshMap?.[n]?.[t]&&this.propChangeRefreshMap[n][t].forEach((e=>e.callback())):this.refreshMap?.[n]?.[`${e}-${t}`]&&this.refreshMap[n][`${e}-${t}`].forEach((e=>e.callback()))}deRegisterForRefresh(e){delete this.propChangeRefreshMap[e],delete this.refreshMap[e]}}const hl=new pl,{APP:gl}=j;let fl={},ml={},yl={};const Il="You will lose unsaved changes. Do you want to continue?",El="You have reached maximum limit of pending changes. Please commit/cancel one or more changes to continue.",Al=(e=gl.APP,t,n)=>{let r=[],s=[];t||(r=cl(e,!0)),n||(s=(e=>{const t=Pn.getContextReferences(e),n=[];if(t)for(const[e,r]of t)!0===Ch.resolveContextTreeNodeProps(r.props).readOnly&&n.push(e);return n})(e));const a={};((e,t)=>{const n=ml[t]||{};Object.keys(n).forEach((t=>{Object.hasOwn(n,t)&&Eh.buildObject(t,e,n[t].value)}))})(a,e);const o=fl[e]||{};return Object.keys(o).forEach((e=>{const n=!t&&r.includes(e)||t;Object.prototype.hasOwnProperty.call(o,e)&&n&&!s.includes(e)&&Eh.buildObject(e,a,o[e].value)})),a},_l=e=>{const{context:t}=e,n=e.reference.startsWith(".")?e.reference.substr(1):e.reference;delete fl[t]?.[n],delete ml[t]?.[n]},Sl=e=>yl[e],Cl=(e,t)=>{const{context:n,initialValue:r="",isStrictTracking:s}=t,a=t.reference.startsWith(".")?t.reference.substr(1):t.reference;e[a]?e[a].previousValue=ch(t.reference,null,n):(e[a]={initialValue:r||ch(t.reference,null,n)},e[a].previousValue=e[a].initialValue),e[a].value=t.value,s&&e[a].value===e[a].initialValue&&_l(t)},Tl=e=>{const{payload:t}=e,{context:n}=t,r=t.reference.startsWith(".")?t.reference.substr(1):t.reference;Pn.isFieldExists(n,r)||(ml[n]=ml[n]||{},Cl(ml[n],t)),fl[n]=fl[n]||{},Cl(fl[n],t)},Nl=e=>{const t=mr(e)||{};return e&&fl[e]&&Object.keys(fl[e]).some((t=>fl[e][t].initialValue!==fl[e][t].value))||Object.keys(t).length>0},Pl=(e,t)=>{if(!e||!t)return!1;const n=fl[e]&&fl[e][t];return!!n&&n.previousValue!==n.value},Dl=e=>{e&&fl[e]?(fl[e]={},ml[e]={}):"all"===e&&(fl={},ml={},yl={}),yl[e]&&(yl[e]=!1)},Rl=()=>e=>t=>{const{type:n,payload:r={}}=t||{};if(n===ee&&(qt(r),(e=>{const{context:t,pageReference:n,value:r,reference:s}=e;Zp.triggerCascade(t,s,r);const a=Kt.getDependencies(t,s),o=Zp.getResetDependencies(t,s),i={context:t,datapages:{}};[...a,...o].forEach((e=>{const n=Eh.getPropertyNameFromDependency(e);if("multiRecord"===e.mode){const e=n.split("."),r=`.${e.pop()}`,s=e.join(".");Kc.getStateMachine(t,s,r).deleteAll()}else dl.isPageInstruction(n)&&Kc.executeStateMachine(t,n,""),sh({type:Q,payload:{reference:n,value:"",context:t,isArrayDeepMerge:!0,isImplicit:!0}})})),a.forEach((r=>{let s=n;r.startsWith(n)||(s="");const a=r.replace(`${s}`,"").split(".").filter((e=>!!e));a.pop();const o=a.join("."),c=ch(`.${o}`,s,t)?.classID||e.classID,l=vp(r.split(".").pop(),c),{datasource:u}=l,d={};let p=[];u.parameters.forEach((e=>{e?.value?(d[e.name]=ul.isProperty(e.value)?ch(`.${Eh.getFullPropertyReference([o,Eh.getPropertyName(e.value)])}`,s,t):e.value,void 0===d[e.name]||null===d[e.name]||""===d[e.name]?(d[e.name]="",p.push(j.NULL_STRING)):p.push(d[e.name])):(d[e.name]="",p.push(j.NULL_STRING))})),p=u.name.concat(j.UNDERSCORE_STRING,Eh.getHashedString(p.join(j.HASH_DELIMITER)));const{name:h}=u,g=Vp(h);i.datapages[p]={mode:u.mode,propertyName:r,name:u.name,dataViewParameters:d,refreshStrategy:g?.refreshStrategy}})),a.length&&sh({type:et,payload:i})})(r),(Pl(r.context,r.reference)||Nr(r.context))&&Un(r),hl.triggerRefreshForType("PROP_CHANGE",r.reference,r.context)),n===rt){const{context:e,referenceList:t}=r;Un({context:e,pageReference:t})}if(n===Q||n===Z){const{reference:e,isImplicit:n,context:s,skipDirtyValidation:a=!1}=r;Pn.updateFieldNodeValue(s,e,r.value),dl.isPageInstruction(e)||a?a||(yl[`${s}`]=!0):Tl(t),(r.removePropertyFromChangedList||n)&&_l(r)}if(n===Re||n===be){const{transientItemID:e,data:t}=r;Eh.iterateLeafNodes(t,(t=>{_l({context:e,value:"",reference:t.join(".")})}))}if(n&&[xe,Ce,Me,De].includes(n)){Dl(r.context),Zp.purgeResetDependencies(r.context),(e=>{e&&bn[e]&&delete bn[e]})(r.context);(r.childContainersContexts||[]).forEach((e=>{Dl(e)}));(r.transientItems||[]).forEach((e=>{Dl(e)}))}e(t)};const bl=new class{getCoreheaders(e){const t=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${j.PRIMARY}`,n=pd(t),r=fd(n),s=Ch.getProperty(j.COREHEADERS,"",r);if(s&&e in s)return s[e]}};const Ol=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 r=((e,t,n)=>{const r=""===t&&n?.startsWith(".")?n.substring(1,n.length):n,s=Pn.getContextReferences(e)?.get(`${t}${r}`)?.props;return s?Ch.resolveContextTreeNodeProps(s):s})(this.c11nEnv.getContextName(),this.c11nEnv.getPageReference(),t),{message:s}=Or.validate(this.c11nEnv.getComponentName()?.toLowerCase(),t,e,r);return s?{status:!1,message:s}:{status:!0}}},vl="OPEN_PROCESS_ACTION",xl="OPEN_ASSIGNMENT",wl="DELETE_CASE_IN_CREATE_STAGE",Ml="SAVE_AND_CLOSE",Ll=e=>({type:Ml,payload:e});const Ul=class{static getSavableDataPage(e){return qp(e)}static getLookUpDataPage(e){return Yp(e)}static getLookUpDataPageInfo(e){return Kp(e)}static getDataPageKeys(e){return zp(e)}};const Fl=class{constructor(e){this.c11nEnv=e}containerManagerPromise=e=>{const t=ln.getNextActionMgrId();let n,r;const s=new Promise(((e,t)=>{n=e,r=t}));return ln.register(t,s,n,r,e),{actionMgrID:t,promise:s}};initializeContainers(e){const t=Ae,n=this.c11nEnv,r={context:n.getContextName(),name:n.getContainerName(),type:j.CONTAINER_TYPE.SINGLE},{actionMgrID:s,promise:a}=this.containerManagerPromise(t),o={...r,...e,actionMgrID:s};return sh(Lh(o)),a}addContainerItem(e){const t=Se,n=this.c11nEnv,r=n.getMetadata(),{children:s}=r||{};let a;s&&([a]=s);const o=n.getContextName(),i=n.getContainerName(),c=H(i,o,e?.containerType===j.CONTAINER_TYPE.SINGLE),l=mt(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)),[j.WORKAREA].includes(i)&&delete e.data?.coreHeaders;const{actionMgrID:d,promise:p}=this.containerManagerPromise(t),h={...u,...e,actionMgrID:d};return sh(Fh(h)),p}updateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("updateContainerItem : containerItemID is required in containerInfo object"));const t=xe,n={context:fd(e.containerItemID),target:Od(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(Gh(a)),s}activateContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("activateContainerItem : containerItemID is required in containerInfo object"));const t=ve,n={target:Od(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(zh(a)),s}removeContainerItem(e){if(!e?.containerItemID)return Promise.reject(new Error("removeContainerItem : containerItemID is required in containerInfo object"));const t=Ce,n={context:fd(e.containerItemID),target:Od(e.containerItemID)},{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(Kh(a)),s}resetContainers(e){if(!e?.context||!e?.name)return Promise.reject(new Error("resetContainers : context and name are required in containerInfo object"));const t=_e,n=Dd(e),{actionMgrID:r,promise:s}=this.containerManagerPromise(t),a={...n,...e,actionMgrID:r};return sh(Uh(a)),s}addTransientItem(e){const{id:t,data:n}=e,r=this.c11nEnv.getContextName(),s=z(t,r),a=Ld(r);return s&&a.includes(s)||sh(jh({transientItemID:s,contextName:r,target:Od(r),data:n})),s}updateTransientData(e){const{transientItemID:t,data:n}=e,r=this.c11nEnv.getContextName();if(t){if(!Ld(r).includes(t))return;sh(Vh({transientItemID:t,data:n}))}}removeTransientItem(e){const t=this.c11nEnv.getContextName(),{target:n=this.c11nEnv.getTarget(),containerItemID:r,transientItemID:s}=e;if(s&&r){if(!Ld(t).includes(s))return;sh(Jh({target:n,containerItemID:r,transientItemID:s}))}}createContainerPConnect(e,t,n,r=!1){Qu.createContainerPConnect(e,t,n,r)}hasContainerItems(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return Cd(`${e}/${t}`)}isContainerInitialized(){const e=this.c11nEnv.getContextName(),t=this.c11nEnv.getContainerName();return ud(e,t)}};var jl=function(e,t){return e===t||"function"==typeof t&&e===t.toString()};function Vl(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,s=e.length;return n=1===s?function(t){return jl(t.type,e[0])}:function(t){for(var n=0;n<s;n++)if(jl(t.type,e[n]))return!0;return!1},vi((function(e,t){var s=0;e.subscribe(xi(t,(function(e){return n.call(r,e,s++)&&t.next(e)})))}))}function kl(e,t){return vi((function(n,r){var s=null,a=0,o=!1,i=function(){return o&&!s&&r.complete()};n.subscribe(xi(r,(function(n){null==s||s.unsubscribe();var o=0,c=a++;Ri(e(n,c)).subscribe(s=xi(r,(function(e){return r.next(t?t(n,e,c,o++):e)}),(function(){s=null,i()})))}),(function(){o=!0,i()})))}))}function $l(e,t){return vi((function(n,r){var s=0;n.subscribe(xi(r,(function(n){r.next(e.call(t,n,s++))})))}))}function Bl(e,t,n){return void 0===n&&(n=1/0),qo(t)?Bl((function(n,r){return $l((function(e,s){return t(n,e,r,s)}))(Ri(e(n,r)))}),n):("number"==typeof t&&(n=t),vi((function(t,r){return function(e,t,n,r,s,a,o,i){var c=[],l=0,u=0,d=!1,p=function(){!d||c.length||l||t.complete()},h=function(e){return l<r?g(e):c.push(e)},g=function(e){a&&t.next(e),l++;var i=!1;Ri(n(e,u++)).subscribe(xi(t,(function(e){null==s||s(e),a?h(e):t.next(e)}),(function(){i=!0}),void 0,(function(){if(i)try{l--;for(var e=function(){var e=c.shift();o?Oi(t,o,(function(){return g(e)})):g(e)};c.length&&l<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(xi(t,h,(function(){d=!0,p()}))),function(){null==i||i()}}(t,r,e,n)})))}function Gl(e){return e&&qo(e.schedule)}function Wl(e){return e[e.length-1]}function Hl(e){return Gl(Wl(e))?e.pop():void 0}function ql(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ji(e,Hl(e))}function zl(e){return vi((function(t,n){var r,s=null,a=!1;s=t.subscribe(xi(n,void 0,void 0,(function(o){r=Ri(e(o,zl(e)(t))),s?(s.unsubscribe(),s=null,r.subscribe(n)):a=!0}))),a&&(s.unsubscribe(),s=null,r.subscribe(n))}))}var Yl=new Ei((function(e){return e.complete()}));function Kl(e){return e?function(e){return new Ei((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Yl}const Xl=(e,t,n)=>zl((r=>("ERR_CANCELED"!==r?.code&&console.error(e,r),ql(rg(e,r,t,null,n))))),Jl=(e,t)=>n=>new Ei((r=>{let s={},a=0;return n.pipe(Bl((n=>{const r=Date.now();let o;return o=t||h(),o&&o(n,s)&&r-a<e?Kl():(s=n,a=r,ql(n))}))).subscribe(r)})),Ql=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s}=e,a={data_view_ID:t},{restApi:o,reqType:i}=_g("createDataObject",a),{content:c}=Dc(s);return ji(pc(o,{method:i,headers:r,body:{data:c.content}},s)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at createDataObject Epic",n))},Zl=e=>{const{dataLookUp:t,context:n,headers:r,viewName:s,requestPayload:a}=e,o={data_view_ID:t,view_ID:s},{restApi:i,reqType:c}=_g("readDataObject",o);return ji(pc(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at getDataObjectView Epic",n))},eu=e=>{const{dataPageID:t,context:n,headers:r,containerItemID:s,key:a}=e,o={data_view_ID:t},{restApi:i,reqType:c}=_g("updateDataObject",o),{content:l}=Dc(s);return ji(pc(i,{method:c,headers:r,body:{data:{...l.content,...a},pageInstructions:l.pageInstructions||[]}},s)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at updateDataObject Epic",n))},tu=e=>{const{lookupDatapage:t,context:n,headers:r,actionID:s,dataViewParameters:a}=e,o={data_view_ID:t,action_ID:s},{restApi:i,reqType:c}=_g("openDataObjectAction",o);return ji(pc(i,{method:c,headers:r,body:{dataViewParameters:a}},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at getDataObjectView Epic",n))},nu=e=>{const{savableDatapage:t,context:n,headers:r,actionID:s,keys:a,containerItemID:o}=e,i={data_view_ID:t,action_ID:s},{restApi:c,reqType:l}=_g("submitDataObjectAction",i),{content:u}=Dc(o);return ji(pc(c,{method:l,headers:r,body:{data:{...u?.content,...a},pageInstructions:u?.pageInstructions||[]}},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at getDataObjectView Epic",n))};const ru=new class{constructor(){this.components={}}_checkComponent(e,t){return!!this.components[t]?.[e]}start(e,t,n,r,s){const a={viewName:e,pageReference:n,contextName:r,isInProgress:!0,active:!0,caseKey:t};this.components[r]=this.components[r]||{},this.components[r][s]=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:r,pageReference:s}=n;vn(e,r,t,s,{})}}},su="postDataViewMetadata",au={getData:(e,t,n,r)=>((e,t,n,r={})=>{const s={dataViewName:e},{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=r,{restApi:c,reqType:l}=_g("getListData",s);return pc(c,{method:l,body:t,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},n,i)})(e,t,n,r),getListCount:(e,t,n)=>{const r={dataViewName:e},{restApi:s,reqType:a}=_g("getListDataCount",r);return pc(s,{method:a,body:t},n)},getDataViewMetadata:(e,t,n,r)=>{const s=!!n,a=!!r,o=ip.doesRestApiExist(su),i=(s||a)&&o?su:"getDataViewMetadata",c={dataViewName:e},{restApi:l,reqType:u}=_g(i,c);if(o){if(s)return pc(l,{method:u,body:{associationFilter:n}},t);if(a)return pc(l,{method:u,body:{propertyFilter:r}},t)}return pc(l,{method:u},t)},getDataObjectView:(e,t,n,r,s={})=>{const{skipClearErrorMessages:a,signal:o,doNotMergeMessagesForStatusCode:i}=s,c={data_view_ID:e,view_ID:t},l={dataViewParameters:n},{restApi:u,reqType:d}=_g("readDataObject",c);return pc(u,{method:d,body:l,...o&&{signal:o},...a&&{skipClearErrorMessages:a}},r,i)},getCaseEditMetadata:(e,t)=>Sc.getCaseEditMetadata(e,t),getCaseEditLock:(e,t)=>Sc.getCaseEditLock(e,t),updateCaseEditFieldsData:(e,t,n,r)=>Sc.updateCaseEditFieldsData(e,t,n,r),moveListRecords:(e,t)=>{const{sourceID:n,destinationID:r,context:s,listClass:a,viewName:o,viewClassName:i}=e,c={viewName:o,viewClassName:i},{restApi:l,reqType:u}=_g("moveListRecords",c);return pc(l,{method:u,body:{content:{sourceID:n,destinationID:r,context:s,listClass:a}}},t)},isTimeElapsed:(e,t,n="")=>{if(t){if(e&&n===j.RELOAD_IF_OLDER_THAN)return new Date(e).setSeconds(t)<Date.now();if(e&&n===j.RELOAD_ONCE_PER_INTERACTION)return!0}return!0},getAppCacheKey:e=>void 0!==Id("root").find((e=>e.includes("authoring-preview")))?`${j.AUTHORING_PREVIEW_CONTAINER}-${e}`:`${Mr.getAppAlias()}-${e}`,isDistinctResultsOnly:e=>{const t=cp.getKeyMapping("pyGUID");return!e.some((e=>e.field===t))}};const ou=class{constructor(e,t,n){this.filter=e,this.messageHandler=t,this.contextName=n}};const iu=class{constructor(){this.users={},this.connected=!1,this.connectionsCount=1}_handleUserPresence({message:e}){const{state:t,updateById:n}=e,r=this.users[n];r&&(r.state=t,Object.keys(r.subscribers).forEach((e=>{r.subscribers[e]?.callback({state:r.state})})))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t,n){const r=this._getAutoGenId(),s=this.users[e];if(s)return s.subscribers[r]={callback:t,contextName:n},r;this.users[e]={subscribers:{[r]:{callback:t,contextName:n}}};const a={matcher:"PRESENCE",criteria:{userId:e}};return hu.subscribe(a,this._handleUserPresence.bind(this)),r}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],hu.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)}))}))}};var cu=s(924),lu=s.n(cu);const uu=class{constructor(e,t){this.atomicSubscribers={},this.connectionsCount=1,this.connected=!1,this.matcher=e,this.criteria=t}_handleAtomicMessage({message:e}){Object.keys(this.atomicSubscribers).forEach((t=>{const n=this.atomicSubscribers[t],r=Object.keys(n.criteria),s=Object.keys(e);0===lu()(r,s).length&&n.callback(e)}))}_getAutoGenId(){return this.connectionsCount+=1,`${Date.now()}_${this.connectionsCount}`}subscribe(e,t){if(!this.connected){const e={matcher:this.matcher,criteria:this.criteria};hu.subscribe(e,this._handleAtomicMessage.bind(this)),this.connected=!0}const n=this._getAutoGenId();return this.atomicSubscribers[n]={criteria:e,callback:t},n}unsubscribe(e){delete this.atomicSubscribers[e]}};const du=new class{constructor(){this.subscriptions={}}getOrCreateSubscription(e){if(!this.subscriptions[e]){const t={caseId:e};this.subscriptions[e]=new uu("CASE",t)}return this.subscriptions[e]}};class pu{static subscribers={};static connectionsCount=0;static webSocket=null;static connectionConfig=null;static inProgressSubscriptions=[];static inProgressMessages=[];static isServiceAlive=null;static serviceAliveHandler=null;static userPresence=new iu;static refreshB2SOffset=10;static initConnection(e){if(!e)return;const{messagingService:t}=e;if(!t||t&&t.length<=6)return;const n=Mr.b2sJWT;if(!n||n.length<4)return;this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close());const r=t.endsWith("/")?t+"ws":t+"/ws";try{const e=new WebSocket(`${r}`);this.webSocket=e,e.addEventListener("open",this.handleOnOpen.bind(this)),e.addEventListener("message",this.handleOnMessage.bind(this)),e.addEventListener("error",this.handleOnError.bind(this)),e.addEventListener("close",this.handleOnClose.bind(this))}catch(e){console.log(e)}}static handleOnError(e){this.getTokenExpiryTime()<=0&&(clearInterval(this.reInitInterval),this.reInitInterval=void 0),console.log("web socket connection error event: ",e)}static handleOnClose(e){null!==this.serviceAliveHandler&&(clearTimeout(this.serviceAliveHandler),this.serviceAliveHandler=null),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=Mr.b2sJWT;if(!e||e.length<4)return;this.publishMessage({token:e})}}static handleOnMessage(e){if(null!==e&&"ALIVE"===e.data)null===this.isServiceAlive&&this.checkLiveliness(8e3),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}"}`),t&&t.filter){const{matcher:e,criteria:n}=t.filter;delete n.environmentID,Object.keys(this.subscribers).forEach((r=>{const s=this.subscribers[r];s.filter.matcher===e&&Eh.isEqual(s.filter.criteria,n)&&s.messageHandler(t)}))}else if(t&&t.tokenExpiryTime){this.setTokenExpiryTime(t);const e=1e3*(this.getTokenExpiryTime()-this.refreshB2SOffset);setTimeout((()=>this.refreshB2STokenReInit()),e);let n=[];this.inProgressSubscriptions.forEach((({messageSubscriber:e,id:t})=>{n?.includes(t)||(n?.push(t),this.subscribeToSocket(e,t))})),this.inProgressSubscriptions=[],this.inProgressMessages.forEach((e=>{this.publishMessage(e)})),this.inProgressMessages=[],n=null}else console.error("filter missing from received data from messaging service",e.data)}}static reInitialization(e){this.reInitInterval||(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)}),5e3))}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.handleOnOpen.bind(this)),this.webSocket.removeEventListener("message",this.handleOnMessage.bind(this)),this.webSocket.removeEventListener("error",this.handleOnError.bind(this)),this.webSocket.removeEventListener("close",this.handleOnClose.bind(this)))}static disconnect(){null!==this.webSocket&&(this.cleanSocketListeners(),this.webSocket.close(),this.webSocket=null)}static subscribe(e,t,n,r){this.connectionsCount+=1;const s=r||`${Date.now()}_${this.connectionsCount}`,a=new ou(e,t,n);return null!==this.webSocket&&1===this.webSocket.readyState?(this.subscribeToSocket(a,s),s):(this.inProgressSubscriptions.push({messageSubscriber:a,id:s}),null===this.webSocket&&this.initConnection(this.connectionConfig),s)}static subscribeToSocket(e,t){this.subscribers[t]=e;const n={filter:e.filter,subscribe:{id:t}};this.webSocket.send(JSON.stringify(n))}static unsubscribe(e){if(this.subscribers[e]){delete this.subscribers[e];const t={unsubscribe:{id:e}};null!==this.webSocket&&1===this.webSocket.readyState&&this.webSocket.send(JSON.stringify(t))}}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 getCaseSubscription=e=>du.getOrCreateSubscription(e);static refreshB2STokenReInit=async()=>{const e={body:{B2SToken:Mr.b2sJWT}};PCore.getRestClient().invokeRestApi("refreshB2S",e).then((e=>{const{newB2SToken:t}=e.data;t&&t.length>30?(Mr.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}`)}))};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 hu=pu;const gu=class{constructor(){this.records=[],this.maxRecords=0,this.isDirty=!1}getRecords(e){if(e){const t=[],{pageNumber:n,pageSize:r}=e,s=n*r;let a=s-r;for(;a<s;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(t){const{pageNumber:n,pageSize:r}=t,s=n*r;let a=0;for(let t=s-r+1-1;t<s;t+=1)this.records[t]=e[a],a+=1;if(e.length<r){const t=(n-1)*r+e.length;this.setMaxRecordsCount(t)}}else e||(e=[]),Array.isArray(this.records)&&Array.isArray(e)&&(this.records=gh(this.records,e,{isArrayDeepMerge:!1})),this.setMaxRecordsCount(this.records.length)}setMaxRecordsCount(e){this.maxRecords=e}getMaxRecordsCount(){return this.maxRecords}};const fu=new class{constructor(){this.dataStore={},this.dataStoreMeta={},this.subscribers={},this.dataPageSubscribers={},this.isCacheEnabled=!0,this.subscribedDataPageNames=new Set}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)";getData(e,t,n,r){const s=this.generateHash(e,t,r);if(this.dataStore[e]&&this.dataStore[e][s]){const t=this.dataStore[e][s];return t.isDirty?[]:t.getRecords(n)}return[]}generateHash(e,t,n){const r=Vp(e);let s=[];r||(s=Object.keys(t||{}).map((e=>({name:e}))));let a="",o=e;const i=[];return(r?.parameters||s).forEach((e=>{t?.[e.name]?i.push(t[e.name]):i.push(e.defaultValue??j.NULL_STRING)})),n&&i.push(JSON.stringify(n)),i.join(j.HASH_DELIMITER)&&(a=Eh.getHashedString(i.join(j.HASH_DELIMITER)),o=e+j.UNDERSCORE_STRING+a),o}async getDataAsync(e,t,n={},r,s,a={}){if(this.subscribeToMessageService(e),a.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),!this.isCacheable(e,s)||a.invalidateCache){const o=await this.fetchData(e,n,r,s,t,a),i=o?.data?.data??[];return{...o.data,data:i,pageNumber:o?.data?.pageNumber,pageSize:o?.data?.pageSize,queryStats:o?.data?.queryStats,status:o?.status}}const o=this.getData(e,n,r,s);if(o.length>0)return Promise.resolve({data:o});const i=await this.fetchData(e,n,r,s,t,a);return{...i.data,data:this.mergeDataStore(e,n,r,s,i),pageNumber:i?.data?.pageNumber,pageSize:i?.data?.pageSize,queryStats:i?.data?.queryStats,status:i?.status}}async getPageDataAsync(e,t,n={},r={}){this.subscribeToMessageService(e);const s=this.generateHash(e,n,null);if(r.purgeDataPageCache&&(this.dataStore[e]={},this._removeDataStoreMetaEntry(e)),this.isCacheable(e)&&this.dataStore[e]&&this.dataStore[e][s]){if(!r?.invalidateCache)return Promise.resolve(this.dataStore[e][s]);delete this.dataStore[e][s],this._removeDataStoreMetaEntry(e,n,s)}const{restApi:a,reqType:o}=_g(j.GET_PAGE_DATA,{dataViewName:e,dataViewParameters:encodeURIComponent(JSON.stringify(n))}),i={method:o},c=a&&n&&0===Object.keys(n).length?a.split("?")[0]:a;return pc(c,i,t).then((t=>(this.isCacheable(e)&&(this.dataStore[e]={...this.dataStore[e],[s]:t.data},this._addDataStoreMetaEntry(e,n,s)),t.data)))}subscribeToDataPageUpdates(e,t,n,r={}){if(!e||!t||!n)return!1;const s=this.generateHash(n,r,null);this.dataPageSubscribers[n]??={};const a=this.dataPageSubscribers[n];a[s]??={};const o=a[s];return!o[e]&&(o[e]??=t,!0)}unsubscribeToDataPageUpdates(e,t,n={}){if(!e||!t)return!1;const r=this.generateHash(t,n,null);return delete this.dataPageSubscribers[t]?.[r]?.[e],!0}_isDataPageCached(e,t){if(t&&Eh.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];Object.keys(n).forEach((n=>{if(this.dataStore[t][n]){this.dataStore[t][n].mergeRecords(e[t][n].pxResults)}else{const r=new gu;this.dataStore[t][n]=r,r.mergeRecords(e[t][n].pxResults||[])}}))}))}_addDataStoreMetaEntry(e,t,n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e]??={};const s=this.dataStoreMeta[e];s[r]??=[];const a=s[r];a.includes(n)||a.push(n)}_removeDataStoreMetaEntry(e,t,n){if(!e||t||n||(this.dataStoreMeta[e]={}),e&&t&&n){const r=this.generateHash(e,t,null);this.dataStoreMeta[e][r]=this.dataStoreMeta[e][r].filter((e=>e!==n))}}mergeDataStore(e,t,n,r,s){const a=this.generateHash(e,t,r),o=s?.data?.data;if(!o||0===o.length)return[];this.dataStore[e]||(this.dataStore[e]={}),this.dataStore[e][a]||(this.dataStore[e][a]=new gu);const i=this.dataStore[e][a];return i.mergeRecords(o,n),i.isDirty=!1,this._addDataStoreMetaEntry(e,t,a),i.getRecords(n)}async fetchData(e,t,n,r,s,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),r&&(l.query=r),au.getData(e,l,s,c)}isDataPage(e=""){return e.startsWith("D_")||e.startsWith("Declare_")}handleCascadeUpdate(){const{dataPageName:e,scope:t}=this;t.handleMessage({message:{datapage:e,parameters:""}})}subscribeToUpdate(e,t,n,r,s,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]=s),this.subscribeToCascadeUpdates(e,t,n,r,a)}unsubscribe(e,t,n,r,s){delete this.subscribers[e]?.callback?.[s],t&&t.length>0&&Zp.unRegisterFields(n,r,t,s)}subscribeToCascadeUpdates(e,t,n,r,s){t&&t.length>0&&Zp.registerFields(n,r,t,this.handleCascadeUpdate.bind({dataPageName:e,scope:this}),s)}subscribeToMessageService(e){if(e&&this.subscribedDataPageNames.has(e))return;const t={matcher:"DATAPAGE_UPDATED",criteria:{datapage:e}};hu.subscribe(t,this.handleMessage.bind(this)),this.subscribedDataPageNames.add(e)}handleMessage(e){const{msgId:t,message:n}=e,{datapage:r,parameters:s=""}=n,a=this.subscribers[r];this.markDataInstanceDirty(r,""===s?null:JSON.parse(s)),this._executeDataPageSubscriptions(e),!t&&a?.callback&&Object.keys(a.callback).forEach((t=>{a.callback?.[t](e.message)}))}markDataInstanceDirty(e,t){let n,r;if((!t||(n=this.generateHash(e,t,null),r=this.dataStoreMeta[e]?.[n],r))&&this.dataStore[e]){Object.keys(this.dataStore[e]).filter((e=>!t||!r||r.includes(e))).forEach((t=>{this.dataStore[e][t].isDirty=!0}))}}_executeDataPageSubscriptions(e){const{message:t}=e,{datapage:n,parameters:r}=t,s=r?JSON.parse(r):null;if(this.dataPageSubscribers[n])if(s){const t=[];t.push(this.generateHash(n,s,null)),t.push(this.generateHash(n,null,null)),t.forEach((t=>{const r=this.dataPageSubscribers[n]?.[t]??{};Object.keys(r).forEach((t=>{r[t](e.message)}))}))}else{const t=this.dataPageSubscribers[n];Object.keys(t).forEach((n=>{const r=t[n];Object.keys(r).forEach((r=>{t[n][r](e.message)}))}))}}isPerInteraction(e){const t=Vp(e);return"reloadOncePerInteraction"===t?.refreshStrategy?.type}isCacheable(e,t){return!(this.isPerInteraction(e)||!this.isCacheEnabled)&&!(t&&Object.keys(t).length>1)}disableCache(e){this.isCacheEnabled=!e}};const mu=class{constructor(e,t,n,r,s=100,a=500){this.finalDataViewCall=e,this.combiner=t,this.comparator=n,this.separator=r,this.maxtime=s,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,r,s=this.findCombinableDataViewCall(e);return n=new Promise((e=>{r=e})),s&&!s.dataViewCallMap[t]?(this.combiner(s,e),s.dataViewCallMap[t]={promise:n,resolve:r}):s?n=s.dataViewCallMap[t].promise:(s={...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}},this.groupedDataViewArray.push({...e,dataViewCallMap:{[t]:{promise:n,resolve:r}}})),Object.keys(s.dataViewCallMap).length===this.maxsize?this.dequeueDataViewCallOnSizeExceed(s):(clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>this.dequeueAllDataViewCalls()),this.maxtime)),n}};const yu=class{constructor(){this.bufferedDataQueues={}}getBufferedDataQueueForDataPage(e){return this.bufferedDataQueues[e]}addBufferedDataQueueForDataPage(e,t,n,r,s,a,o){return this.getBufferedDataQueueForDataPage(e)||(this.bufferedDataQueues[e]=new mu(t,n,s,r,a,o)),this.bufferedDataQueues[e]}},Iu=(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,Eu=e=>e.map((e=>e.field)),Au=(e,t)=>{const n=(e.query?.filter).filterConditions,r=(t.query?.filter).filterConditions;let s=(t.query?.filter).logic;const a=Object.keys(n).length;Iu(n,r)?("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(r.F0.rhs.value)):(Object.keys(r).forEach(((e,t)=>{const o=`F${a+t}`;n[o]=r[e],s=s.replace(e,o)})),(e.query?.filter).logic+=` OR ${s}`);const o=Eu(e.query?.select);Eu(t.query?.select).forEach((t=>{o.includes(t)||(e.query?.select).push({field:t})}))},_u=(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]:!Eh.isEqual(e.dataViewParameters?.[n],t.dataViewParameters?.[n]))))(e,t)||((e,t)=>!e.dataViewParameters&&!t.dataViewParameters)(e,t)),Su=(e,t)=>{const{data:n}=t,{dataViewCallMap:r,filterDataOnClient:s}=e;Object.keys(r).forEach((e=>{r[e].resolve({data:s(e,n)})}))},Cu=e=>({combiner:Au,comparator:_u,separator:Su,...e}),Tu=(e,t)=>{try{window.sessionStorage.setItem(e,t)}catch(e){}};class Nu{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={},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,r)=>{const s=[...e.columns.map((e=>e.value)),...Object.entries(e.parameters).map((([e,t])=>`${e}+${t}`)),e.matchPosition,e.maxResultsDisplay].join(j.HASH_DELIMITER),a=Eh.getHashedString(s),o=`${e.dataSource}_${a}`,i=au.getAppCacheKey(e.dataSource);if(window.sessionStorage.getItem(i)){const s=JSON.parse(window.sessionStorage.getItem(i));if(t&&Nu.searchResultsCache?.[t]?.[o])n(Nu.searchResultsCache[t][o]);else if("form"!==e.cacheLifeSpan&&Nu.searchResultsCache?.persisted?.[o])n(Nu.searchResultsCache.persisted[o]);else{const a=new Nu(e,t);JSON.stringify(s.associationFilter)===JSON.stringify(e.associationFilter)?(a.dataSourceMetaData=s.dataSourceMetaData,a.isQueryable=s.isQueryable,a.isInitialised=s.isInitialised,a.associationFilter=s.associationFilter,Nu.initializeCache(t,e,o,a),n(a)):(a.associationFilter=e.associationFilter,a.propertyFilter=e.propertyFilter,a.fetchMetaData(t).then((r=>{Tu(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),a.isQueryable=r.data.isQueryable,a.dataSourceMetaData=r.data,a.isInitialised=!0,Nu.initializeCache(t,e,o,a),n(a)})).catch((e=>{a.isInitialised=!1,r(e)})))}}else if(e.deferDatasource&&Vp(e.dataSource)){const r=new Nu(e,t),s=Vp(e.dataSource);r.isQueryable=!!s?.isQueryable,r.isInitialised=!0,r.dataSourceMetaData=s,Tu(i,JSON.stringify({isQueryable:s?.isQueryable,dataSourceMetaData:s,isInitialised:!0})),r.context=t,Nu.initializeCache(t,e,o,r),n(r)}else{const s=new Nu(e,t);s.associationFilter=e.associationFilter,s.propertyFilter=e.propertyFilter,s.fetchMetaData(t).then((r=>{Tu(i,JSON.stringify({isQueryable:r.data.isQueryable,dataSourceMetaData:r.data,isInitialised:!0,associationFilter:e.associationFilter})),s.isQueryable=r.data.isQueryable,s.dataSourceMetaData=r.data,s.isInitialised=!0,Nu.initializeCache(t,e,o,s),n(s)})).catch((e=>{s.isInitialised=!1,r(e)}))}}))}static bufferedDataView=new yu;registerForBufferedCall(e){return this.isQueryable&&(this.initializeBufferCallsForDataPage(Cu(e)),this.bufferInitialized=!0),this}static clearContextedCache(e){delete Nu.searchResultsCache[e]}static initializeCache(e,t,n,r){e&&"form"===t.cacheLifeSpan?.toLowerCase()?(void 0===Nu.searchResultsCache[e]&&(Nu.searchResultsCache[e]={}),Nu.searchResultsCache[e][n]=r):(void 0===Nu.searchResultsCache.persisted&&(Nu.searchResultsCache.persisted={}),Nu.searchResultsCache.persisted[n]=r)}fetchMetaData(e){return au.getDataViewMetadata(this.dataSource,e,this.associationFilter,this.propertyFilter)}initializeBufferCallsForDataPage(e){Nu.bufferedDataView.addBufferedDataQueueForDataPage(this.dataSource,(e=>fu.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)}}getData(e,t){if(this.isQueryable){if(this.bufferInitialized)try{const t=this.buildSchemaForQueryableBufferDP(e);return Nu.bufferedDataView.getBufferedDataQueueForDataPage(this.dataSource).queueDataViewCall(t,e)}catch{const n=this.buildSchemaForQueryableDP(e,t);return fu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}const n=this.buildSchemaForQueryableDP(e,t);return fu.getDataAsync(this.dataSource,this.context,n.dataViewParameters,n.paging,n.query)}return this.fetchNonQueryableResults(e,t)}memoizedGetData(e,t){const n=e?.toLowerCase();if(this.enablePagination?n in this.cache&&this.pageNumber in this.cache[n]:n in this.cache)return this.enablePagination?this.cache[n][this.pageNumber]:this.cache[n];const r=this.getData(e,t);return this.enablePagination?(this.cache[n]=this.cache[n]||{},this.cache[n][this.pageNumber]=r):this.cache[n]=r,r}fetchData(e,t=!1,n){return this.isValidDatasource()&&this.isInitialised?(this.pageNumber=t?this.pageNumber:1,this.memoizedGetData(e,n)):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)return this.fetchNQDataPromise?.then((()=>({data:this.filterDataOnClient(e,this.nonQueryableData,t)}))).catch((e=>Promise.reject(e)));if(this.dataSourceMetaData?.structure&&"list"===this.dataSourceMetaData.structure.toLowerCase()){const n=this.buildSchemaForNonQueryableDP();return this.fetchNQDataPromise=fu.getDataAsync(this.dataSource,this.context,n.dataViewParameters),this.isNQDataFetchInProgress=!0,new Promise(((n,r)=>{this.fetchNQDataPromise?.then((r=>(this.nonQueryableData=[...r.data],this.fetchedNQData=!0,n({data:this.filterDataOnClient(e,this.nonQueryableData,t)})))).catch((e=>r(e))).finally((()=>{this.isNQDataFetchInProgress=!1,this.fetchNQDataPromise=null}))}))}return Promise.resolve(null)}filterDataOnClient(e,t,n){const r=(n?.columns??this.columns)?.filter((e=>e.useForSearch)).map((e=>e.value));return t.reduce(((t,s)=>(Object.keys(s).every((a=>!(r?.includes(a)&&s[a]&&this.positionMatches(`${s[a]}`,e,n))||(t.push({...s}),!1))),t)),[])}positionMatches(e,t,n){const r=n?.ignoreCase??this.ignoreCase,s=r?e.toLowerCase():e,a=r?t.toLowerCase():t;switch(n?.matchPosition??this.matchPosition){case"start":return s.startsWith(a);case"contains":return s.includes(a);case"equals":return s===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 r={field:e.value};t.push(r)}})),t}buildFilters(e,t){const n=t?.matchPosition??this.matchPosition,r=t?.ignoreCase??this.ignoreCase,s={};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:r?"true":"false"},lhs:i,rhs:c,comparator:l};s[o]=u}}));const o=Object.keys(s).join(" OR ");return{filterConditions:s,logic:o}}buildQuery(e,t){const n=this.buildSelect(t);return e?{select:n,filter:this.buildFilters(e,t),...au.isDistinctResultsOnly(n)&&{distinctResultsOnly:"true"}}:{select:n,...au.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 Pu=Nu;const Du=class{static cleanCaches(e){Zp.purgeCascadeFields(e),ru.removeContext(e),Pu.clearContextedCache(e),Br.cleanContextSubscribers(e),Qc(e),Pn.removeContextTreeNode(e),hu.clearContext(e),hl.deRegisterForRefresh(e)}},Ru="GET_DESCENDANTS";const bu=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=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;if(r<=0){if(a)n.push({type:fe,payload:{context:e,data:{context_data:{is_deferred_action_in_progress:!1}}}});else{if(!(s.length>0))return;{const t=s.shift();a=!a,n.push({type:fe,payload:{context:e,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),n.push(t)}}sh(n)}}executeOrQueueDeferredAction(e){if(!e?.payload?.context)return Promise.reject(new Error("Action Context is Mandatory Field."));const t=ah(e?.payload?.context);if(t){const n=[],r=t.context_data?.blocking_action_counter??0,s=t.context_data?.deferred_action_queue?[...t.context_data.deferred_action_queue]:[];let a=t.context_data?.is_deferred_action_in_progress??!1;return s.length<=0&&!a&&(r<=0?(n.push(e),a=!a):s.push(e),n.unshift({type:fe,payload:{context:e.payload.context,data:{context_data:{deferred_action_queue:s,blocking_action_counter:r,is_deferred_action_in_progress:a}}}}),sh(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=ah(e);return t&&!0===t.context_data?.is_deferred_action_in_progress?(sh({type:fe,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 ah(e)?(sh({type:at,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={...ah(e)};return t.context_data={...t.context_data},t&&t.context_data?.blocking_action_counter>0?(sh({type:at,payload:{context:e,isInitiateBlockingAction:!1}}),t.context_data.blocking_action_counter-=t.context_data.blocking_action_counter,this.schedulePendingActionOnCompletion(e,t),Promise.resolve()):Promise.reject(new Error(this.INVALID_CONTEXT_OPERATION))}cancelDeferredActionsOnError(e){if(!e)return;const t=ah(e);if(t){const n={...t};n.context_data={...n.context_data},n.context_data?.deferred_action_queue&&Eh.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),sh({type:fe,payload:{context:e,data:{...n}}}),cn.disableLoadingIndicator({context:e})}}},Ou=(e,t)=>{const n={},r=Ul.getLookUpDataPage(e),s=Ul.getDataPageKeys(r);if(s)for(const e of s)n[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];return{dataViewParameters:n,dataPageID:r,dataPageKeys:s}},vu=(e,t)=>{const n=Ul.getSavableDataPage(e),r=Ul.getDataPageKeys(n);return r.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:r}},xu=e=>{Br.publish(F.PUB_SUB_EVENTS.EVENT_CANCEL,e)},wu=(e,t,n)=>{const{callbacks:r}=n;return n.callbacks=null,e(t,n).then((e=>{"cancel"===e?r?.cancel?.():r?.submit?.()}))};const Mu=class{constructor(e){this.c11nEnv=e}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";shouldDeleteCaseInCreateStage=(e,t,n)=>!e&&t||n;getSaveActionPayload=(e,t=!1)=>{const n=e,r=n&&n.includes(j.MODAL),s=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),a=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),o=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID)?this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENTACTION_ID),i=this.c11nEnv.getContainerName(),c=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),l=t?void 0:il(this.c11nEnv.getContextName()),u=this.c11nEnv.getValue("isProcessAction","isProcessAction");return Nh.buildActionObject({context:n,containerItemID:e,assignmentID:a,actionID:o,caseID:s,containerName:i,caseType:c,isModalAction:r,isFormValid:l,isProcessAction:u,saveOnly:t},this.c11nEnv)};actionsApiPromise=(e,t,n=!0)=>{let r,s,a=null;a=t&&null!==t.actionMgrID?t.actionMgrID:ln.getNextActionMgrId();const o=new Promise(((e,t)=>{r=e,s=t}));return ln.register(a,o,r,s,e,t,n),{actionMgrID:a,promise:o}};showDataObjectCreateView(e,t=F.VIEW_NAMES.DATA_OBJECT_CREATE_VIEW){const n=Nh.buildActionObject({viewName:t,className:e},this.c11nEnv),r=ne,{promise:s}=this.actionsApiPromise(r,n);return sh({type:r,payload:{...n,containerName:F.MODAL,skipSemanticUrl:!0,isCreateDataObject:!0}}),s}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(!Nl(t)){return new Fl(this.c11nEnv).removeContainerItem({containerItemID:e,skipReleaseLockRequest:!0})}const n=He,r=Nh.buildActionObject({containerItemID:e,context:t},this.c11nEnv),s=t&&t.includes(j.MODAL);sh({type:n,payload:{...r,isModalAction:s,isDataObject:!0,skipReleaseLockRequest:!0}});const{promise:a}=this.actionsApiPromise(n,r);return a.then((()=>{xu({})}))}createDataObject(e){if(!e)return Promise.reject(new Error("containerItemID is required parameter"));const{data:t}=rh()?.getState()||{},n=t[e]?.dataInfo?.content?.classID;if(!n)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const r=Ul.getSavableDataPage(n),s=ot,a=!!e&&e.includes(j.MODAL),o=Nh.buildActionObject({containerItemID:e,dataPageID:r},this.c11nEnv),{promise:i}=this.actionsApiPromise(s,o);return sh({type:"CREATE_DATA_OBJECT",payload:{...o,isModalAction:a,isFormValid:il(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=it,r=Ul.getSavableDataPage(e),s=Ul.getDataPageKeys(r),a={};if(s)for(const e of s)a[e.keyName]=e.isAlternateKeyStorage?t[e.linkedField]:t[e.keyName];const o=Nh.buildActionObject({dataViewName:r,dataViewParameters:a},this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o);return sh({type:"DELETE_DATA_OBJECT",payload:{...o}}),i}getDataObjectView(e,t,n={viewName:""}){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 r=ct,{dataPageID:s,dataViewParameters:a}=Ou(e,t),o=Nh.buildActionObject({dataLookUp:s,keyProperties:t,requestPayload:a,viewName:n.viewName||F.VIEW_NAMES.DATA_OBJECT_EDIT_VIEW,containerName:j.MODAL},this.c11nEnv),{promise:i}=this.actionsApiPromise(r,o);return sh({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}=rh()?.getState()||{},r=n[e]?.dataInfo?.content?.classID;if(!r)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const{dataPageID:s,keys:a}=vu(r,t),o=lt,i=e&&e.includes(j.MODAL),c=Nh.buildActionObject({containerItemID:e,dataPageID:s,key:a},this.c11nEnv),{promise:l}=this.actionsApiPromise(o,c);return sh({type:"UPDATE_DATA_OBJECT",payload:{...c,isModalAction:i,isFormValid:il(e)}}),l}openDataObjectAction(e,t,n,r){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(!r)return Promise.reject(new Error(this.MSG_ACTION_NAME_REQUIRED));const s=ut,{dataViewParameters:a,dataPageID:o,dataPageKeys:i}=Ou(e,t),c=Nh.buildActionObject({actionID:n,actionName:r,dataViewParameters:a,lookupDatapage:o,containerName:j.MODAL,dataViewPayload:i,context:this.c11nEnv.getContextName()},this.c11nEnv),{promise:l}=this.actionsApiPromise(s,c);return sh({type:s,payload:{...c}}),l}submitDataObjectAction(e,t,n){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}=rh()?.getState()||{},s=r[e]?.dataInfo?.content?.classID;if(!s)return Promise.reject(new Error(j.DATA_CLASS_NOT_FOUND));const a=Jd(e),o=Od(a),i=sd(o,a)||{},{resourceType:c="",key:l=""}=i,u=dt,{dataPageID:d,keys:p}=vu(s,t),h=Nh.buildActionObject({containerItemID:e,actionID:n,resourceType:c,key:l,keys:p,savableDatapage:d,containerName:j.MODAL,context:e},this.c11nEnv);h.context=e;const{promise:g}=this.actionsApiPromise(u,h);return sh({type:u,payload:{...h,isFormValid:il(e)}}),g}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(window.pms?.plugins?.c11n?.createWork)return window.pms.plugins.c11n.createWork(e,"pyStartCase");const{dockable:n=!1}=t?.modalOptions||{};let r=le;const s=Nh.buildActionObject({class:e,flowType:"pyStartCase",containerName:j.PRIMARY,openCaseViewAfterCreate:!0,...t,modalOptions:{isDockable:n}},this.c11nEnv),{promise:a}=this.actionsApiPromise(r,s);if(t.channelName&&(s.headers=s.headers||{},s.headers[j.X_ORIGIN_CHANNEL]=t.channelName),$.isRemoteCase(e)){const{RemoteClassName:t,RemoteSystemID:n,name:a}=$.getRemoteCase(e);if(s.className=e,s.class=t,s.headers=s.headers||{},s.headers.RemoteSystemID=n,$.isTraditionalRemoteCase(e)){const n={className:e,name:a,action:"createWork",remoteClassName:t};r=this.setTraditionalRemoteCaseParams(s,n)}}return ec.getPreviewMode()&&(s.debugInfo={debugId:Eh.generateUniqueID()}),sh({type:r,payload:{...s}}),a}setTraditionalRemoteCaseParams(e,t){return e.className=t.className,e.isTraditionalRemoteCase=$.isTraditionalRemoteCase(t.className),e.remoteClassName=t.remoteClassName,e.action=t.action,e.viewName=V,e.gadgetId=t.gadgetId??Sc.getUniqueGadgetId(),e.name=t.name,e.skipSemanticUrl=!0,ne}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=ye,r=Nh.buildActionObject({dataViewID:e,dataViewParameters:t},this.c11nEnv),{promise:s}=this.actionsApiPromise(n,r);return sh({type:n,payload:{...r}}),s}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(),r=Nh.buildActionObject({caseID:e,currentContext:n},this.c11nEnv),{promise:s}=this.actionsApiPromise("GET_DESCENDANTS",r),a=(o={...r,context:n},{type:Ru,payload:o});var o;return sh(a),s}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(window.pms?.plugins?.c11n?.openWorkByHandle)return window.pms.plugins.c11n.openWorkByHandle(e,t);const r={insKey:e,acTargetName:n.targetContainer||j.PRIMARY,containerName:n.targetContainer||j.PRIMARY};let s=ue;const a=Nh.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);return n.channelName&&(a.headers=a.headers||{},a.headers[j.X_ORIGIN_CHANNEL]=n.channelName),a.className=t,$.isRemoteCase(t)&&(s=this.setRemoteCaseParamsForOpenCase(a,t,n.remoteCaseMeta)??s),ec.getPreviewMode()&&![j.WORKAREA].includes(n.targetContainer)&&(a.debugInfo={debugId:Eh.generateUniqueID()}),sh({type:s,payload:{...n,...a}}),o}setRemoteCaseParamsForOpenCase(e,t,n={}){const{RemoteSystemID:r,RemoteClassName:s,name:a}=$.getRemoteCase(t);if(e.headers=e.headers||{},e.headers.RemoteSystemID=r,e.isRemoteCase=!0,e.remoteCaseClass=t,$.isTraditionalRemoteCase(t)){e.remoteCaseMeta=n;const r={className:t,name:a,action:ft,remoteClassName:s};return this.setTraditionalRemoteCaseParams(e,r)}}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(window.pms?.plugins?.c11n?.openAssignment)return window.pms.plugins.c11n.openAssignment(e,t);const r={assignmentID:e,doDeleteCaseSummary:!0,containerName:n.containerName,isActionFromToDoList:n.isActionFromToDoList,isChild:!1};n.isChild&&(r.containerName=j.PRIMARY,r.isChild=n.isChild);let s=xl;const a=Nh.buildActionObject(r,this.c11nEnv),{promise:o}=this.actionsApiPromise(s,a);if(n.channelName&&(a.headers=a.headers||{},a.headers[j.X_ORIGIN_CHANNEL]=n.channelName),$.isRemoteCase(t)){const{RemoteClassName:e,RemoteSystemID:r,name:o}=$.getRemoteCase(t);if(a.headers=a.headers||{},a.headers.RemoteSystemID=r,$.isTraditionalRemoteCase(t)){a.remoteCaseMeta=n.remoteCaseMeta;const r={className:t,name:o,action:"openAssignment",remoteClassName:e};s=this.setTraditionalRemoteCaseParams(a,r)}}a.className=t,a.activeItemCaseViewMode=this.c11nEnv.getValue("context_data.caseViewMode"),ec.getPreviewMode()&&![j.WORKAREA].includes(n.containerName)&&(a.debugInfo={debugId:Eh.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 sh({type:s,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));const n=fd(e);let r=n;if(n?.includes("/workarea")&&(r=n.substring(0,r?.lastIndexOf("/workarea"))),(e=>{const t=Pn.getContextReferences(e);if(t)for(const[,e]of t)if(Ch.resolveContextTreeNodeProps(e.props).hasSuggestions)return!0;return!1})(n)){const e=[{type:"error",message:up.getLocaleValue(this.MSG_ACTIVE_SUGGESTION_UNATTENDED,"Messages")}];return zn({messages:e,context:r,category:F.PAGE}),Promise.reject({type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR})}const s=pe,a=t?.isTriggeredFromDifferentContext,{caseID:o,assignments:i,localActionID:c,caseActions:l,caseInfo:u,businessID:d,caseTypeID:p,caseTypeName:h}=on(e,this.c11nEnv,{isTriggeredFromDifferentContext:a}),g=Zt(u);let f,m=!1;if(l){const e=l.find((e=>e.ID===c));m="Case"===e?.type}else f=ah(n);let{assignmentID:y}=on(e,this.c11nEnv,{isTriggeredFromDifferentContext:a});f?.context_data?.actionType&&(m=f.context_data.actionType===j.CASE,y=y||f.context_data.assignmentID);const I=an(i,y,c),[E,A]=o.split(" "),_={class:E,actionID:I,assignmentID:y,caseID:o,workID:A,containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:m,doDeleteCaseSummary:!0,isInCreateStage:g,businessID:d,caseTypeID:p,caseTypeName:h};e?.includes(j.MODAL)&&(_.containerName=j.MODAL,_.isModalAction=!0),_.outcome=t.outcomeID,_.jsActionQueryParams=t.jsActionQueryParams,u?.isLocalAction&&(_.viewType=Tc.FORM);const S=Nh.buildActionObject(_,this.c11nEnv),{promise:C}=this.actionsApiPromise(s,S),T=this.c11nEnv.getValue("isProcessAction","isProcessAction");return S.isProcessAction=T,bu.executeOrQueueDeferredAction({type:s,payload:{...S,context:n}}),C}getNextWork(){const e=xl,t=Nh.buildActionObject({containerName:j.PRIMARY,isGetNextWork:!0},this.c11nEnv),{promise:n}=this.actionsApiPromise(e,t);return sh({type:e,payload:{...t}}),n}openStage(e){if(!e)return Promise.reject(new Error("stageID is required parameter for openStage"));const t=xl,n=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),r=this.c11nEnv.getCaseSummary().headers,s=Nh.buildActionObject({containerName:this.c11nEnv.getContainerName(),isOpenStage:!0,stageID:e},this.c11nEnv),{promise:a}=this.actionsApiPromise(t,s),o={type:t,payload:{...s,caseID:n,headers:r}};return sh(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(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1};e&&e.includes(j.MODAL)&&(s.containerName=j.MODAL,s.isModalAction=!0);const a=Nh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=fd(e);return sh({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:il(i),classID:this.c11nEnv.getCurrentClassID()}}),o}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(F.CASE_INFO.CASES),r=this.c11nEnv.getValue(F.CASE_INFO.ACTIVE_ACTION_ID),s={containerName:e.includes(j.MODAL)?j.MODAL:this.c11nEnv.getContainerName(),containerItemID:e,isCaseWideAction:!0,doDeleteCaseSummary:!0,isInCreateStage:!1,isModalAction:e.includes(j.MODAL)},a=Nh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a),i=fd(e);return sh({type:t,payload:{...a,context:i,cases:n,actionID:r,isFormValid:il(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"));const{selectedList:n,runningMode:r}=t,s=t.type,a={selectedList:n,vcName:t.target,actionName:t?.name,actionID:e,doDeleteCaseSummary:!0,localActionType:s,runningMode:r,...t},o="OPEN_BULK_ACTION",i=Nh.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return sh({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));const t=Ce,n={containerItemID:e,context:e,skipReleaseLockRequest:!0,target:`${j.APP.APP}/${j.MODAL}`,caseViewMode:j.PERFORM_MODE,deleteContext:!0};sh({type:t,payload:n});const{promise:r}=this.actionsApiPromise(t,n);return r}approveCase(e){return e?"string"!=typeof e?Promise.reject(new TypeError(this.MSG_CONTAINERITEMID_STRING)):(sh({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.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)):(sh({type:Q,payload:{reference:F.CASE_INFO.APPROVALFLAG,value:j.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(F.CASE_INFO.DUPLICATECASEINSKEY).split(" "),n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.DUPLICATE,context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:t,context:e}};return sh([n,r]),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:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEFLAG,value:j.IGNORE,context:e}},n={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEID,value:"",context:e}},r={type:Q,payload:{reference:F.CASE_INFO.DUPLICATECASEINSKEY,value:"",context:e}};return sh([t,n,r]),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=t.caseID||this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID);if(window.pms?.plugins?.c11n?.openLocalAction)return t.caseID=n,wu(window.pms.plugins.c11n.openLocalAction,e,t);const r=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,localActionType:s,...t},o="OPEN_LOCAL_ACTION",i=Nh.buildActionObject(a,this.c11nEnv),c=this.c11nEnv.getContextName(),{promise:l}=this.actionsApiPromise(o,i),u=Id(c)[0];let d,p=!1;if(!u)return d=c,sh({type:o,payload:{...i,contextName:c,continueExecution:p}}),l;d=pd(u);const h=rd(u);if(h?.accessedOrder.forEach((e=>{n===h.items[e].key&&(p=!0,d=h.items[e].context)})),!p||d&&"review"===rh()?.getState()?.data[d]?.context_data?.caseViewMode)return sh({type:o,payload:{...i,contextName:c,continueExecution:p}}),l;const g=d,f=g&&g.includes(j.MODAL),m=t.assignKey||this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),y=ah(d),I=y?.caseInfo?.assignments?y.caseInfo.assignments[0]?.actions[0]?.ID:void 0,E=this.c11nEnv.getContainerName(),A=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),_=this.c11nEnv.getValue("isProcessAction","isProcessAction"),S=Nh.buildActionObject({context:g,containerItemID:d,assignmentID:m,actionID:I,caseID:n,containerName:E,caseType:A,isModalAction:f,isFormValid:!0,isProcessAction:_},this.c11nEnv);S.context=d;const C=fd(d),T=this.c11nEnv.getCaseSummary(),N=Zt(T),P=Nh.buildActionObject({caseID:n,containerItemID:d,cancelContext:C},this.c11nEnv);let D={};return f?(P.acTargetName=j.MODAL,P.isInCreateStage=N,P.isModalAction=f,D={...P}):D={...P,acName:mt(this.c11nEnv.getContainerName(),P.context)},sh({type:o,payload:{...i,contextName:c,saveActionPayload:S,cancelActionPayload:D,continueExecution:p}}),l}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(F.CASE_INFO.CASE_INFO_ID)||t.caseID;if(window.pms?.plugins?.c11n?.openProcessAction)return t.caseID=n,wu(window.pms.plugins.c11n.openProcessAction,e,t);const r=this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID)||t.assignKey,s=t.type,a={caseID:n,assignmentID:r,vcName:t.target,actionName:t?.name,assignKey:r,actionID:e,doDeleteCaseSummary:!0,processActionType:s,isProcessAction:!0,...t},o=vl,i=Nh.buildActionObject(a,this.c11nEnv),{promise:c}=this.actionsApiPromise(o,i);return sh({type:o,payload:{...i}}),c}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="NAVIGATE_TO_STEP",r=this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID)?this.c11nEnv.getValue(F.NEXT_ASSIGNMENT_INFO_ID):this.c11nEnv.getValue(F.CASE_INFO.ASSIGNMENT_ID),s=Zt(this.c11nEnv.getCaseSummary()),a={ID:r,stepID:e,acTargetName:this.c11nEnv.getContainerName(),targetContainerName:this.c11nEnv.getContainerName(),containerItemID:t,doDeleteCaseSummary:!0,isInCreateStage:s};t&&t.includes(j.MODAL)&&(a.acTargetName=j.MODAL);const o=Nh.buildActionObject(a,this.c11nEnv),{promise:i}=this.actionsApiPromise(n,o),c=fd(t);return sh({type:n,payload:{...o,containerItemID:t,context:c}}),i}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}=F,r=he,s=fd(e),a=e&&e.includes(j.MODAL),o=this.c11nEnv.getCaseSummary(),i=Zt(o),c=this.c11nEnv.getValue(n.CASE_INFO_ID),l=this.c11nEnv.getValue(n.ASSIGNMENT_ID),u=Nh.buildActionObject({caseID:c,containerItemID:e,context:s},this.c11nEnv);let d={};a?(u.acTargetName=j.MODAL,u.isInCreateStage=i,u.isModalAction=a,d={...u}):d={...u,acName:mt(this.c11nEnv.getContainerName(),u.context)};const{promise:p}=this.actionsApiPromise(r,u);return sh({type:r,payload:d}),p.then((()=>{t||xu({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}=F,n=e,r=He,s=e&&e.includes(j.MODAL),a=this.c11nEnv.getValue(t.CASE_INFO_ID),o=Nh.buildActionObject({caseID:a,containerItemID:e,context:n},this.c11nEnv);if(!Nl(n)){return new Fl(this.c11nEnv).removeContainerItem({containerItemID:e}).then((()=>{xu({caseID:a,context:this.c11nEnv.getContextName()})}))}sh({type:r,payload:{...o,isModalAction:s}});const{promise:i}=this.actionsApiPromise(r,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}=F,n=He,r=e,s=r&&r.includes(j.MODAL),a=this.c11nEnv.getCaseSummary(),o=Zt(a),i=this.c11nEnv.getValue(t.CASE_INFO_ID),c=Nh.buildActionObject({caseID:i,containerItemID:e,context:r},this.c11nEnv),l=this.c11nEnv.getValue("isProcessAction","isProcessAction"),u=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(c.isProcessAction=l,o&&(s||u)&&!tn(a)){const t=this.c11nEnv.getValue(j.CASE_INFO.IS_FIRST_ASSIGNMENT),i=Nl(r);if(this.shouldDeleteCaseInCreateStage(i,t,u))return this.deleteCaseInCreateStage(e);sh({type:n,payload:{...c,isModalAction:s,isChildCase:sn(a),isInCreateStage:o}})}const{promise:d}=this.actionsApiPromise(n,c);return d.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=Ml,n=this.getSaveActionPayload(e,!0),{promise:r}=this.actionsApiPromise(t,n);return sh(Ll(n)),r}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=Ml,n=this.getSaveActionPayload(e),{promise:r}=this.actionsApiPromise(t,n);return sh(Ll(n)),r}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=wl,r=e,s=r&&r.includes(j.MODAL),a=this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),o=this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),i=Nh.buildActionObject({caseID:a,caseType:o,containerItemID:e,context:r,ignoreCaseDeletion:t},this.c11nEnv),c=this.c11nEnv.getValue("isProcessAction","isProcessAction"),l=this.c11nEnv.getValue(F.CASE_INFO.PARENTCASEINFO);i.isProcessAction=c,i.parentCaseInfo=l;const u=`${j.APP.APP}/${td.PRIMARY}`,d=Lc(u,td.PRIMARY);i.parentContext=d,s&&(i.targetName=j.MODAL,i.containerName=td.MODAL,i.isModalAction=s),sh((e=>({type:wl,payload:e}))(i));const{promise:p}=this.actionsApiPromise(n,i);return p.then((()=>{xu({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}=ip.getRestEndPoint("getRecents")||{};t=`${t}?maxResultsToFetch=${e}`;const n=E()+t;return pc(n,{method:"GET",headers:{}})}updateRecents(e,t,n,r){const{restApi:s}=ip.getRestEndPoint("updateRecents")||{},a=`${E()}${s}`;return pc(a,{method:"PATCH",headers:{"Content-Type":"application/json"},body:{pyLabel:n,pyID:t,classID:e,ID:r}})}logout(){const{restApi:e}=ip.getRestEndPoint("Logout")||{},t=`${E()}${e}`;return pc(t,{method:"GET",headers:{}}).then((e=>(Object.keys(Pn.rootNodes).forEach((e=>{Du.cleanCaches(e)})),Pn.rootNodes={},sessionStorage.clear(),yh(),Promise.resolve(e))))}invoke(e,t={}){const n={method:t.method||"GET",body:t.body};return pc(e,n,this.c11nEnv.getContextName())}showCasePreview(e,t={}){this.loadView(e,"pyCasePreview",{container:td.PREVIEW,containerName:td.PREVIEW,context:F.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("pyDataPreview",e,t,{container:td.PREVIEW,containerName:td.PREVIEW,context:F.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 r=Nh.buildActionObject({caseId:e,viewName:t,caseClassName:this.c11nEnv.getValue(F.CASE_INFO.CASE_TYPE_ID),RemoteSystemID:$.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),r={...r,...n}):r={...r,containerName:this.c11nEnv.getContainerName()};const s=te,{promise:a}=this.actionsApiPromise(s,r,!1);return sh({type:s,payload:{...r}}),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 r=Nh.buildActionObject({viewName:e,className:t},this.c11nEnv),s=ne,{promise:a}=this.actionsApiPromise(s,r);return ec.getPreviewMode()&&(r.debugInfo={debugId:Eh.generateUniqueID()}),sh({type:s,payload:{...r,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=Nh.buildActionObject({},this.c11nEnv),r=se,{promise:s}=this.actionsApiPromise(r,n);return sh({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,insightID:e}}),s}showDashboard(e,t={}){if(!e)return Promise.reject(new Error(this.MSG_DASHBOARDID_REQUIRED));const n=Nh.buildActionObject({},this.c11nEnv),r=ae,{promise:s}=this.actionsApiPromise(r,n);return sh({type:r,payload:{...n,containerName:this.c11nEnv.getContainerName(),skipSemanticUrl:t.skipSemanticUrl||!1,dashboardID:e}}),s}showData(e,t,n,r={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 s=Nh.buildActionObject({pageName:e,dataContext:t,dataContextParameters:n},this.c11nEnv),a=re,{promise:o}=this.actionsApiPromise(a,s);return sh({type:a,payload:{...s,...r,skipSemanticUrl:Boolean(r.skipSemanticUrl)}}),o}changeHandler(e,t){Nh.changeHandler(e,t)}eventHandler(e,t){Nh.eventHandler(e,t)}triggerFieldChange(e,t,n=!1){const r=this.c11nEnv.getContextName(),s=this.c11nEnv.getPageReference(),a=Ch.getContextPath(s,e);n||this.c11nEnv.getValidationApi().validate(t),this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(e,t);let o=this.c11nEnv.getValue(j.CLASS_ID);const i=e?e.split(".").filter((e=>!!e)):[];i.length>1&&(i.pop(),o=ch(`.${i.join(".")}.classID`,s,r)),e=Eh.trimDotForProperty(e),sh({type:ee,payload:{reference:a,value:t,context:r,pageReference:this.c11nEnv.getPageReference(),propertyName:e||this.c11nEnv.getComponentConfig().value,classID:o}})}updateFieldValue(e,t,n={}){const{removePropertyFromChangedList:r=!1,isArrayDeepMerge:s=!0,contextPageReference:a="",isListEntry:o=!1,skipDirtyValidation:i=!1}=n,c=this.c11nEnv.getContextName();let l=this.c11nEnv.getPageReference();const u=a?.startsWith(l)?a.replace(l,""):a;l=a||l;const d=Ch.getContextPath(l,e);let p=!1;this.c11nEnv.isInsideList()&&this.c11nEnv.getListActions().updateProperty(u?`${u}${e}`:e,t,{isArrayDeepMerge:s}),this.c11nEnv.isBulkAction()&&(p=!0),e||(e=this.c11nEnv.getStateProps().value),qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e,pageReference:l,context:c,isListEntry:o}),sh({type:Q,payload:{reference:d,value:t,context:c,isArrayDeepMerge:s,skipDirtyValidation:i,...p&&{isStrictTracking:p},...r&&{removePropertyFromChangedList:r}}})}activateModalContainerItem(e){const t=Le,{context:n}=e,r=n&&n.includes(j.MODAL),s=Nh.buildActionObject({...e,containerName:this.c11nEnv.getContainerName(),containerItemID:n},this.c11nEnv);r&&(s.containerName=j.MODAL,s.isModalAction=r),sh({type:t,payload:s});const{promise:a}=this.actionsApiPromise(t,s);return a}refreshCaseView(e,t,n,r={}){const{promise:s,actionMgrID:a}=this.actionsApiPromise("REFRESH_DATA"),{autoDetectRefresh:o,propertyName:i,preserveClientChanges:c,classID:l,context:u,optionalPayload:d}=r,p={actionMgrID:a,caseViewAction:!0,preserveClientChanges:c,propertyName:i,classID:l,optionalPayload:d};r.refreshFor&&(p.refreshFor=r?.refreshFor);const h=u||this.c11nEnv.getContextName(),g=this.c11nEnv.getPageReference();return!this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA)&&o&&(((e,t)=>rn(e)&&!nn(e,t))(h,g)||nn(h,g))?Ln(h,n,p):vn(e,t,h,n,p),s}openEmbeddedDataModal(e,t,n,r,s,a){const o=pt,i=t.getCaseInfo().getKey(),c=`${t.getPageReference().replace(F.CASE_INFO.CASE_INFO_CONTENT,"")}${n}[${r}]`,l={targetProperty:n,index:r,viewID:e,ID:i,actionType:s,interestPage:Eh.convertPageRefToClipboardPageNotation(c),heading:a},u=Nh.buildActionObject(l,this.c11nEnv),{promise:d}=this.actionsApiPromise(o,u);if(cp.getFeatureMap().granularUIRefresh){(t.getMetadata().config.children[0].children||[]).forEach((e=>{const n=Qt.trimAnnotation(e.config.value),r=vp(n.startsWith(".")?n.replace(".",""):n,e.config.classID);if(r?.isDeclarativeTarget){const e=t.getPageReference();Pn.addFieldNode(t.getContextName(),e+c,t.viewName,n,"",{isDeclarativeTarget:!0,propertyName:n,pageReference:e+c})}}))}return sh({type:o,payload:{...u,containerName:F.MODAL,skipSemanticUrl:!0}}),d}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=ht,n=this.c11nEnv.getPageReference().replace(F.CASE_INFO.CASE_INFO_CONTENT,""),r=fd(e),s={containerItemID:e,containerName:this.c11nEnv.getContainerName(),doDeleteCaseSummary:!0,isInCreateStage:!1,ID:this.c11nEnv.getValue(F.CASE_INFO.CASE_INFO_ID),viewID:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME),isFormValid:il(r),interestPage:Eh.convertPageRefToClipboardPageNotation(n),parentContext:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isModalAction:!1,target:this.c11nEnv.getTarget()};e&&e.includes(j.MODAL)&&(s.containerName=j.MODAL,s.isModalAction=!0);const a=Nh.buildActionObject(s,this.c11nEnv),{promise:o}=this.actionsApiPromise(t,a);if(Nl(r)){const[e,t,n]=gn(this.c11nEnv.getPageReference());Pn.mutatePageList(this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),e,t,{type:Qe,rowIndex:n}),sh({type:Qe,payload:{pageReference:this.c11nEnv.getPageReference(),context:this.c11nEnv.getValue(j.CONTEXT_DATA_MODAL_VIEW.PARENT_CONTEXT),isListEntry:!0}})}return bu.executeOrQueueDeferredAction({type:t,payload:{...a,context:r}}),o}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=fd(e),n=this.c11nEnv.getPageReference(),{promise:r,actionMgrID:s}=this.actionsApiPromise(gt);return Ln(t,n,{actionMgrID:s,isFillFormWithAI:!0,preserveClientChanges:!1}),r}};const Lu=class{constructor(e){this.c11nEnv=e}async getCaseStages(e,t){const n={caseID:e},{restApi:r,reqType:s}=_g("getCaseStages",n);return(await pc(r,{method:s},t)).data.stages}getCaseTypeName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_TYPE_NAME)}getName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_NAME)}getClassName(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_TYPE_ID)}getAvailableProcesses(){return this.c11nEnv.getValue(j.CASE_INFO.AVAILABLEPROCESSES)}getKey(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ID)}getID(){const e=this.getKey();if(e){const[,t]=e.split(" ");return t||e}}getAssignmentID(){return this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENT_ID)}getActions(){return this.c11nEnv.getValue(j.CASE_INFO.ACTION_BUTTONS)}getActiveFlowActionID(){return this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID)||this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENTACTION_ID)}getParentCaseInfo(){return this.c11nEnv.getValue(j.CASE_INFO.PARENTCASEINFO)}isPerform(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.PERFORM_MODE}isReview(){return this.c11nEnv.getValue(`${j.CONTEXT_DATA}${j.CASE_VIEW_MODE_PROP}`)===j.REVIEW_MODE}isAssignmentInCreateStage(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO);return Zt(e)}isLocalAction(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO);return tn(e)}getCurrentAssignmentViewName(){let e=null,t=!1;if(this.c11nEnv.getValue("context_data.caseViewMode")===j.PERFORM_MODE){if(this.isLocalAction())return e;if(this.isAssignmentInCreateStage())t=!0;else{const t=this.c11nEnv.getTarget(),n=this.c11nEnv.getContextName(),r=sd(t,n),{config:s}=t&&n?r&&r.view:this.c11nEnv.getMetadata();e=s?.type===j.VIEW?s?.name:null}(e&&e.startsWith(j.PROPERTY_ANNOTATION)||t)&&(e=this.c11nEnv.getValue(j.CASE_INFO.VIEW_NAME))}return e}getActionRefreshConditions(){const e=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),t=W(this.c11nEnv.getContextName());let n;t&&(n=ah(t));const r=n?.caseInfo?.availableActions,s=ah(this.c11nEnv.getContextName()),a=s?.caseInfo?.refreshConditions;if(e){if(r){const t=r.find((t=>t.ID===e));return t?t.refreshConditions:a}return a}return this.c11nEnv.getValue(j.CASE_INFO.ACTION_REFRESH_CONDITIONS)}getBusinessID(){return this.c11nEnv.getValue(j.CASE_INFO.BUSINESS_ID)}getAssignments(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO)?.assignments}getChildAssignments(){return this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO)?.childCases?.[0]?.assignments}isCaseWideLocalAction=()=>{const e=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),t=this.c11nEnv.getValue(j.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(j.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(j.CASE_INFO.ASSIGNMENT_LABEL),n=this.c11nEnv.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS)||[],r=this.getChildAssignments()||[];let s=JSON.parse(JSON.stringify(r));s=s.map((e=>(e.isChild=!0,e)));const a=[...n,...s];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(j.CASE_INFO.CASE_INFO_ACTIONS),t=this.c11nEnv.getValue(j.CASE_INFO.ACTIVE_ACTION_ID),n=e.find((e=>e.ID===t));return n?.name||""}getFirstCaseActionName(){const e=this.c11nEnv.getValue(j.CASE_INFO.CASE_INFO_ACTIONS);return e[0]?.name||""}hasAssignments(){const e=this.c11nEnv.getValue(j.CASE_INFO.D_CASE_ASSIGNMENTS_RESULTS),t=this.getChildAssignments();return!!(e||t||this.isCaseWideLocalAction())}hasMessages=()=>!!this.c11nEnv.getValue("caseMessages");hasGetNextWorkLinks(){return!!this.c11nEnv.getValue(j.CASE_INFO.GETNEXTWORK)}},{RESOURCE_TYPES:Uu}=F;const Fu=class{static openCase(e,t,n,r={}){const s={insKey:e,acTargetName:n,actionMgrID:ln.getNextActionMgrId(),context:t,...r},a=ue;r&&r.channelName&&(s.headers={},s.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=ln.actionManagerPromise(a,s.actionMgrID);return sh({type:a,payload:s}),o}static openAssignment(e,t,n,r={}){const s={assignmentID:e,vcName:n,doDeleteCaseSummary:!0,actionMgrID:ln.getNextActionMgrId(),context:t,...r},a=ge;r&&r.channelName&&(s.headers={},s.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=ln.actionManagerPromise(a,s.actionMgrID);return sh({type:a,payload:{...s}}),o}static createCase(e,t,n,r={}){const s=le,a={class:e,acTargetName:n,actionMgrID:ln.getNextActionMgrId(),context:t,...r};r&&r.channelName&&(a.headers={},a.headers[j.X_ORIGIN_CHANNEL]=r.channelName);const{promise:o}=ln.actionManagerPromise(s,a.actionMgrID);return sh({type:s,payload:{...a}}),o}static getNextWork(e,t,n={}){const r=ge,s={isGetNextWork:!0,vcName:t,doDeleteCaseSummary:!0,actionMgrID:ln.getNextActionMgrId(),context:e,...n},{promise:a}=ln.actionManagerPromise(r,s.actionMgrID);return sh({type:r,payload:{...s}}),a}static getOpenedCaseItems(e){const t=[],n=rd(e);if(n){const{items:r={}}=n,s=Object.keys(r),a=pd(e);s.forEach((n=>{if(r[n]&&(r[n].resourceType===Uu.CASE||r[n].resourceType===Uu.ASSIGNMENT)){const{key:s="",context:o}=r[n],i=r[n],c=s.substring(s.indexOf(" ")+1),l=ch(".caseTypeID",j.CASE_INFO.CASE_INFO,o),u=a===n;t.push({...i,key:s,workID:s,caseID:c,className:l,context:o,containerItemID:n,target:e,active:u})}}))}return t}static getCaseDetails=e=>{const t={caseID:e},{restApi:n,reqType:r}=_g(Be,t);return pc(n,{method:r})};static getCaseBulkActions=async e=>{const{restApi:t,reqType:n}=_g("getBulkActions"),r=e.map((e=>({ID:e}))),s=r.length,a=s/5,o={},i=[];for(let e=0;e<s;e+=a)o.cases=r.slice(e,e+a),o.cases.length&&i.push(pc(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.length&&(l=l.filter((t=>c[e].data.availableActions.some((e=>t.ID===e.ID))))):l=c[e].data.availableActions;return l};static getCaseBulkActionsByCaseTypeID=async e=>{const t={casetypeID:e},{restApi:n,reqType:r}=_g("getCaseBulkActions",t),s=await pc(n,{method:r});let a=[];return s.data?.availableActions?.length&&(a=s.data.availableActions),a}};class ju{constructor(e){ju._instance=this,this.context=`${e}/${j.SUGGESTION}`,rh()?.getState().data?.[this.context]||sh({type:Fe,payload:{context:this.context,data:{}}})}getField(e){return ch(e,"",this.context)}setField(e,t){sh({type:Q,payload:{reference:e,value:t,context:this.context}})}removeField(e){sh({type:me,payload:{reference:e,context:this.context}})}setState(e){sh(bh({context:this.context,data:e,isArrayDeepMerge:!0}))}}const Vu=ju;const ku=class{static getSharedState(e){const t=e.startsWith(".")?e.substring(1):e,n=oh();return n?Eh.getIn(n,t):null}static setSharedState(e,t){e&&sh(cg({key:e,value:t}))}static updateState(e,t,n,r={}){const{isArrayDeepMerge:s=!0,pageReference:a}=r;if(!e||!t)return;sh(lg({context:e,reference:a?`${a}.${t}`:t,value:n,isArrayDeepMerge:s}))}static getSuggestionsContext(e){return new Vu(e)}};const $u=class{constructor(e,t,n){this.meta=e,this.datasource=t,this.index=0,this.options=n,this.datasourceObj=Ch.getPropertyValue(t,n.pageReference,n.context)}hasNext(){return this.index<this.datasourceObj.length}next(){if(!this.hasNext())throw new Error("No Children");const e=Ch.getContextPath(this.datasource,this.index);return this.index+=1,Xu({meta:this.meta,options:{...this.options,pageReference:e}})}resetIndex(){this.index=0}};class Bu{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.children[this.index];return this.index+=1,Xu({meta:e,index:this.index,options:this.options})}resetIndex(){this.index=0}}const Gu=(e,t)=>{const n=!!e?.repeat;if(!!e?.["repeat-self"])return new $u(e,e.context||"",t);if(n){const n=uh(`${t.context}.${j.SUMMARY_OF_LISTS}`,e.pageReference,t.context);return new $u(e.children[0],n||e.context,t)}return e?.children?new Bu(e.children,t):void 0};class Wu{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:r}=e;if(t&&r){const e=t[t.length-1];r[e]&&r[e].view&&Object.keys(r[e].view).length>0&&n.push(r[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=>ul.isProperty(e))).map((e=>ul.getPropertyName(e)))}}const Hu=new Wu;let qu;Object.freeze(Hu);const zu=(e,t,n)=>{e&&(Object.keys(e).forEach((r=>{if("children"!==r){const s=e[r],a=Qt.trimAnnotation(s);if("string"!=typeof a&&"string"!=typeof s||!(Eh.isValidAnnotation(s)&&Eh.isPropertyRef(a)||s.startsWith("@W ")||s.startsWith("@E ")||s.startsWith("@ATTACHMENT "))){if(Array.isArray(a))a.forEach(((e,n)=>{const s={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||[],t[r][n]=Object.create({}),zu(e,t[r][n],s)}));else if(a&&"object"==typeof a&&"exp"!==a.type){const e={parentStateObj:t,parentKey:r,isObjHasValue:!!t[r]};t[r]=t[r]||{},zu(a,t[r],e)}}else n&&n.parentKey&&(n.isObjHasValue=!0),t[r]=a}})),n&&!n.isObjHasValue&&delete n.parentStateObj[n.parentKey])},Yu=(e,t)=>{e._inheritedProps=e._inheritedProps||[],e.inheritedProps=[...e._inheritedProps,...Eh.deepClone(t.inheritedProps)]};class Ku{constructor(e){const{meta:t,isRoot:n,options:r={},useCustomContext:s}=e;this.meta=t,this._isRoot=n,this.options=r,this.useCustomContext=s,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.viewName=r.viewName,this.parentViewName=r.viewName??"",this._referenceList=r.referenceList||"",this._isInsideList=r.isInsideList||!1,this._inheritedConfig={},this._localeRuleName=r.localeReference,this._containerTarget=r.target,this.xrayInfo={},this._readOnly=t?.config?.readOnly||r.readOnly,this._hasSuggestions=!1,this._actionsApi=null,this._classID=null,this.index=e.index,this.categoryName=r.categoryName||"",r.inheritedConfig&&(this._inheritedConfig=Eh.deepClone(r.inheritedConfig)),t?.config?.inheritedProps&&Yu(this._inheritedConfig,t?.config),zu(this._rawConfig,this._stateProps),this._isState=!Eh.isObjectEmpty(this._stateProps),this._rawConfig&&this._rawConfig.config&&(this._isExpressionExist=Eh.isExpressionExist(this._rawConfig.config),this._isWhenExist=Eh.isWhenExist(this._rawConfig.config),this._isValidatorExist=Or.isValidatorExist(this._rawConfig.config)),this._isRoot?this._contextName=F.APP.APP:this._contextName=this.meta?.config?.contextName||this.options.context,this._type=this.meta?.type;let a=this.options.pageReference;if(this.options.pageReference&&(a=Qt.handleAnnotation(this.options.pageReference,this)),this._pageReference=Ch.getContextPath(a||this.options.parentPageReference,this._pageReference),this._pageReference||(this._pageReference=""),"reference"===this._type&&(this._rawConfig=t),"reference"===this._type&&Eh.isWhenExist({visibility:this.meta?.config?.visibility})&&xn(this.viewName,this._contextName,this._pageReference),"reference"!==this._type&&t&&(this._rawConfig=Ch.resolveReference(t,this)),this._rawConfig){const e=this.getRawConfigProps();e&&(this._localeRuleName=Qt.trimAnnotation(e.localeReference)||r.localeReference,this._isExpressionExist=Eh.isExpressionExist(e),this._isWhenExist=Eh.isWhenExist(e),this._isValidatorExist=Or.isValidatorExist(e)),this._children=this._rawConfig.children,this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&(this.viewName=Qt.handleAnnotation(this._rawConfig.name,this)),this.options.hasForm&&Mn(this)}}isDeclarativeTarget(){let e=!1;if(this.getValue(this._pageReference)||""===this._pageReference){const t=Qt.trimAnnotation(this.getPropertyName()),n=this.getFieldMetadata(t);e=n?.isDeclarativeTarget||!1}return e}_getPropertyName(){const e=Qt.trimAnnotation(this.getPropertyName());return""===this._pageReference&&e.startsWith(".")?e.substring(1,e.length):e}addFieldNode(){const e=this._getPropertyName(),{value:t,label:n,required:r,readOnly:s,disabled:a,visibility:o,validationType:i,caption:c,allowMultiple:l}=this.getRawConfigProps();if(this.getValue(this._pageReference)||""===this._pageReference){const u="Address"===this._type&&this._rawConfig?.config?.associatedView?Qt.trimAnnotation(this._rawConfig.config.associatedView):"",d=n||c,p={target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Qt.trimAnnotation(t),label:d?.startsWith("@")?Qt.handleAnnotation(d,this,void 0):d,required:r,readOnly:s,disabled:a,visibility:o||this.options?.visibility,skipRequiredValidation:this.options?.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:t,validationType:i,componentName:this._rawConfig?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),index:this.index,allowMultiple:l,isDeclarativeTarget:this.isDeclarativeTarget()};Pn.addFieldNode(this._contextName,this._pageReference,(u||this.categoryName||this.viewName)??"",e,this.getValue(e),p)}}removeNode(){if(!this.isVisible())if(Object.hasOwn(this._rawConfig?.config??{},"value"))Pn.removeFieldNode(this._contextName,this._pageReference,this.viewName||"",Qt.trimAnnotation(this.getPropertyName()),this.index);else{const e=this._rawConfig?.config?.context?`${this._pageReference}${this._rawConfig?.config.context}`:this._pageReference;Pn.removeViewNode(this._contextName,e,this._rawConfig?.config?.name||this._rawConfig?.config?.id||"",this.index)}}addViewNode(){this._rawConfig?.type?.toLowerCase()===j.VIEW&&this._rawConfig.name&&this.viewName&&Pn.addViewNode(this._contextName,this._pageReference,this.viewName,this.parentViewName),"Group"===this._rawConfig?.type&&this._rawConfig?.config?.id&&Pn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.id,this.parentViewName),"Address"===this._rawConfig?.type&&this._rawConfig?.config?.associatedView&&Pn.addViewNode(this._contextName,this._pageReference,Qt.trimAnnotation(this._rawConfig.config.associatedView),this.parentViewName),"deferload"===this._rawConfig?.type?.toLowerCase()&&this._rawConfig.config?.name&&Pn.addViewNode(this._contextName,this._pageReference,this._rawConfig.config.name,this.parentViewName)}addWhenNode(){let e="",t="";const n=Eh.getWhenNames(this._rawConfig?.config),r=this.getRawConfigProps();if(r?.type&&r?.type?.toLowerCase()===j.VIEW)t=j.CONTEXT_TREE_NODE_TYPES.VIEW,e=this.getCurrentView();else{t=j.CONTEXT_TREE_NODE_TYPES.FIELD;const n=this.getPropertyName();e=Qt.isProperty(n)?Qt.trimAnnotation(n):""}e&&n.forEach((n=>{Pn.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()!==j.VIEW||"Editable"===this._rawConfig.config?.renderMode)&&this._rawConfig?.config?.referenceList)){const{value:e,label:t,required:n,readOnly:r,disabled:s,visibility:a,validationType:o,selectionMode:i,selectionList:c,selectionKey:l,referenceList:u,renderMode:d,caption:p}=this.getRawConfigProps(),h=t||p;Pn.addPageListNode(this._contextName,this._pageReference,this.viewName??"",Qt.trimAnnotation(this.getPropertyName()),{target:this._containerTarget,context:this._contextName,pageReference:this._pageReference,propertyName:Qt.trimAnnotation(this.getPropertyName()),label:h?.startsWith("@")?Qt.handleAnnotation(h,this,void 0):h,required:n,readOnly:r,disabled:s,visibility:a||this.options.visibility,skipRequiredValidation:this.options.isBulkAction,inheritedProps:this.getInheritedProps(),useCustomContext:this.useCustomContext,value:e,validationType:o,componentName:this._rawConfig.type,type:this._rawConfig.config?.type,hasSuggestions:this._hasSuggestions,isInsideList:this.isInsideList(),selectionMode:i,selectionList:c,renderMode:d,referenceList:u,selectionKey:l,index:this.index});const g=this.getValue(Qt.trimAnnotation(this.getPropertyName()),this._pageReference)||[];Pn.updatePageListNode(this._contextName,this._pageReference,Qt.trimAnnotation(this.getPropertyName()),g.length)}this.isWhenExist()&&this.addWhenNode(),this.removeNode()}setXRayInfo(e){Eh.mergeDeep(e,this.xrayInfo)}getXRayInfo(){return this.xrayInfo}getStateProps(){return this._stateProps}setStateProps(e){Eh.mergeDeep(e,this._stateProps)}getMetadata(){return this._rawConfig}getCaseInfo(){return this._caseInfo||(this._caseInfo=new Lu(this)),this._caseInfo}getCaseLocaleReference(){const e=this.getCaseInfo(),t=e.getClassName();return up.getCaseLocaleReference(t,e.getCaseTypeName())}getListActions(){return Dr(this)}getReferenceList(){return this._referenceList}isInsideList(){return this._isInsideList||/\[\d+\]/g.test(this.getPageReference())}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&&"Attachment"!==e.formatter?"referenceList":"Address"===this._type?"addressProp":"value",this.getComponentConfig()[t]}getFullReference(){const e=this.getPageReference(),t=this.getPropertyName();return Ch.getContextPath(e,t)}getContextName(){return this._contextName}getContainerName(){const{type:e}=this.getMetadata()||{},t=[j.CONTAINERS.ROOT_CONTAINER,j.CONTAINERS.VIEW_CONTAINER,j.CONTAINERS.FLOW_CONTAINER,j.CONTAINERS.MODAL_VIEW_CONTAINER,j.CONTAINERS.PREVIEW_VIEW_CONTAINER,j.CONTAINERS.HYBRID_VIEW_CONTAINER],{acTargetName:n=td.PRIMARY,name:r,routingInfo:s}=this.getComponentConfig();return(e&&t.includes(e)||"@ROUTING_INFO"===s)&&r?r: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=c?.getStore()?.getState()?.data[`${this.getContextName()}/${j.SUGGESTION}`],n=this.getStateProps()?.value,r=Ch.getContextPath(this.getPageReference(),n),s=t?ku.getSuggestionsContext(this.getContextName()).getField(r):void 0;this._hasSuggestions=!!s,e.hasSuggestions=this._hasSuggestions,this._stateProps.hasSuggestions=this._hasSuggestions}}getConfigProps(e={}){const t={...Rr.getDefaultsforType(this._type),readOnly:this._readOnly,...this._rawConfig&&this._rawConfig.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(t),this.resolveConfigProps(t,e),Eh.resolveStringBooleans(e)}getRawConfigProps(){const e={...Rr.getDefaultsforType(this._type),...this._rawConfig?.config,...this._additionalRegisteredProps,...this._inheritedConfig};return this.populateSuggestionProps(e),e}resolveConfigProps(e,t={}){return e&&(Ch.resolveProps(e,t,this),Qt.handleComponentMapping(t,{type:this.getComponentName(),config:e},this)),t}registerAdditionalProps(e={}){return Object.assign(this._additionalRegisteredProps,e),zu(e,this._stateProps),this.resolveConfigProps(this._additionalRegisteredProps)}deRegisterAdditionalProps(e=[]){return e.forEach((e=>{delete this._additionalRegisteredProps[e]})),!0}populateAdditionalProps(e){const t=this.getComponentName(),n=this.getComponentConfig(),r=t===j.ROOT_CONTAINER&&"portal"!==e.renderingMode;if(t===j.MODAL_VIEW_CONTAINER||t===j.CASE_CREATE_STAGE){const t=pd(`${j.APP.APP}/${this.getContainerName()}`),n=Hn({context:t,category:F.PAGE});e.pageMessages=n,this._stateProps.pageMessages=e.pageMessages}if(this.isEditable()){let{value:t}=this.getStateProps();void 0===t&&"multi"===this.getComponentConfig()?.selectionMode?t=this.getStateProps().selectionList||Qt.trimAnnotation(this.getRawConfigProps().selectionList):!t&&"Editable"===this.getComponentConfig()?.renderMode&&this.getStateProps().referenceList&&(t=this.getStateProps().referenceList);const n=Hn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_ERROR}),r=Hn({property:t,pageReference:this.getPageReference(),context:this.getContextName(),type:F.MESSAGES.MESSAGES_TYPE_INFO});if(n&&n[0]){const t=n.map((e=>up.getLocaleValue(e.message,"Messages")));e.validatemessage=t.join(". "),e.status=j.FIELD_LEVEL_ERROR,this._stateProps.validatemessage=e.validatemessage,this._stateProps.status=e.status}r&&r[0]&&(e.infoMessage=r[0].message,e.status=j.FIELD_LEVEL_WARNING,this._stateProps.infoMessage=e.infoMessage,this._stateProps.status=e.status)}if(t===j.ROOT_CONTAINER){const t=Kn(r,pd(`${j.APP.APP}/${this.getContainerName()}`));e.httpMessages=t,this._stateProps.httpMessages=e.httpMessages;const n=ku.getSharedState("isLoggedOut");e.isLoggedOut=n,this._stateProps.isLoggedOut=n;const s=Hn({context:j.APP.ROOT,category:"PAGE"});e.pageMessages=s,this._stateProps.pageMessages=e.pageMessages}if(t===j.HYBRID_VIEW_CONTAINER){const t=Hn({context:j.APP.APP,category:j.HTTP});e.httpMessages=t,this._stateProps.httpMessages=t}if(t===j.APP_SHELL&&e.portalDocMode===j.CONTAINER_TYPE.MULTIPLE&&(e.activeCases=Fu.getOpenedCaseItems(`${F.APP.APP}/${j.PRIMARY}`),this._stateProps.activeCases=e.activeCases),t===j.APP_SHELL){const t=Hn({context:j.APP.APP,category:"PAGE"});e.pageMessages=t,this._stateProps.pageMessages=e.pageMessages}if(e.value&&t===j.SCALARLIST&&(this._stateProps.value=e.value),t===j.APP_SHELL||t===j.MODAL_VIEW_CONTAINER||t===j.CASE_CREATE_STAGE||n.template===j.CASE_PREVIEW){let t=Hn({context:j.APP.APP,category:"HTTP"});const n=Hn({context:pd(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"});t?n&&(t=t.concat(Hn({context:pd(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}))):t=Hn({context:pd(`${j.APP.APP}/${this.getContainerName()}`),category:"HTTP"}),e.httpMessages=t?t.map((e=>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(t===j.VIEW_CONTAINER||t===j.FLOW_CONTAINER||t===j.MODAL_VIEW_CONTAINER||t===j.PREVIEW_VIEW_CONTAINER||t===j.ROOT_CONTAINER){if(e.routingInfo=yt(this.getContainerName(),this._contextName),t===j.ROOT_CONTAINER&&(e.rootConfig=Wu.getItemView(e.routingInfo,e.renderingMode),this._stateProps.rootConfig=e.rootConfig),this._stateProps.routingInfo=e.routingInfo,t===j.FLOW_CONTAINER){const t=Hn({context:this.getContextName(),category:j.CASEMESSAGES}),n=this.getContextName();e.caseMessages=t,this._stateProps.caseMessages=e.caseMessages,e.caseViewMode=this.getValue("context_data.caseViewMode"),this._stateProps.caseViewMode=e.caseViewMode;const r=Id(n)[0];if(r){const t=pd(r),n=c?.getStore()?.getState()?.data;n&&t&&(e.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime,this._stateProps.lastUpdateTime=n[t]?.caseInfo?.lastUpdateTime);const s=Hn({context:t,category:F.PAGE}),a=Hn({context:t,category:"HTTP"});e.httpMessages=a,e.pageMessages=s,this._stateProps.pageMessages=e.pageMessages,this._stateProps.httpMessages=e.httpMessages,a?.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.assignmentNames=this.getCaseInfo().getAssignments()?.map((e=>e.name)),e.childAssignmentNames=this.getCaseInfo().getChildAssignments()?.map((e=>e.name)),t===j.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.assignmentNames=e.assignmentNames,this._stateProps.childAssignmentNames=e.childAssignmentNames}else n.template===j.CASE_VIEW||n.template===j.CASE_PREVIEW||n.template===j.OBJECT_PAGE?(e.caseInfo=this.getCaseSummary(),this._stateProps.caseInfo=e.caseInfo):t===j.CASE_STAGES&&(e.stages=this.getCaseStages(),e.stageID=this.getStageID(),this._stateProps.stages=e.stages,this._stateProps.stageID=e.stageID);this.populateFieldMetadata(e),this.updateContextTree()}isReadOnlyField(e,t){const n=ul.isPropertyInternal(t),r=e.datasource,s=this.getComponentConfig().isSearchField,{isClassKey:a,isSpecial:o,isDeclarativeTarget:i}=e.fieldMetadata,c=e.listType!==j.ASSOCIATED;return!s&&(i||n||!r&&(a||o)&&c)}getPropertyDetails(e,t,n){return e===j.ASSOCIATED?{propertyValue:t,propertyAnnotation:j.ASSOCIATED_PROPERTY_ANNOTATION}:{propertyValue:n,propertyAnnotation:j.PROPERTY_ANNOTATION}}updateConfigData(e,t,n){e.fieldMetadata=t,this.isReadOnlyField(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}))}populateFieldMetadata(e){const{value:t,datasource:n,listType:r}=this.getComponentConfig(),{propertyValue:s,propertyAnnotation:a}=this.getPropertyDetails(r,n,t);if(s&&"string"==typeof s&&(s.includes(a)||s.includes(j.ATTACHMENT_ANNOTATION))){const t=Qt.getPropertyName(s),n=this.getFieldMetadata(t);n&&this.updateConfigData(e,n,t)}}resolvePropertyMetadata(e,t){if(!e)return e;const n=Xp(`${this._pageReference}.${t}`,this._contextName);return(n||null===n)&&(e.additionalInformation=n),e}getFieldMetadata(e){if(!e)return null;const t=e.split(".");if(t.length<2){let t=this.getValue(j.CLASS_ID);return!t&&this._rawConfig&&this._rawConfig.config&&this._rawConfig.config.ruleClass&&(t=this._rawConfig.config.ruleClass),this.resolvePropertyMetadata(vp(e,t),e)}return this.resolvePropertyMetadata(vp(t.pop(),this.getValue(`.${t.join(".")}${j.CLASS_ID}`)),e)}getCurrentPageFieldMetadata(e=null){let t=this.getPageReference().split(".");null!==e&&(t=e.split("."));const n=t.pop();return this.resolvePropertyMetadata(vp(n,this.getValue(`${t.join(".")}${j.CLASS_ID}`)))}getCurrentClassID(){return this._classID??this.getValue(j.CLASS_ID)}getCaseSummary(){const e={...this.getDataObject()[F.CASE_INFO.CASE_INFO]};return e.CaseID=e.CaseID||this.getValue(F.CASE_INFO.CASE_INFO_PZINSKEY),{...e,isCaseWideAction:()=>nn(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()[F.CASE_INFO.CASE_INFO].stages}getStageID(){return this.getDataObject()[F.CASE_INFO.CASE_INFO].stageID}getActions(){return this._actions}isRoot(){return this._isRoot}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 Ol(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?Qt.handleAnnotation(this._rawConfig?.config?.visibility,this):"string"!=typeof this.options?.visibility||Qt.handleAnnotation(this.options?.visibility,this)}isReadOnly(){return void 0!==this._readOnly&&("true"===this._readOnly||!0===this._readOnly||Qt.handleAnnotation(this._readOnly,this))}hasChildren(){return!!this._children}getComputedVisibility(){const e="reference"===this._type&&!!this.getReferencedView()?this.getReferencedViewPConnect().getPConnect():this;if(!1===this.getConfigProps().visibility)return!1;if(!1===this.getConfigProps().requiresVisibleChildren)return!0;const t=e.getConfigProps(),n={includeTypes:["Group","Region","View"],excludeTemplates:["ListView","SimpleTable","StudioTable"]};let r=e._type&&n.includeTypes.includes(e._type)&&!n.excludeTemplates.includes(t.template);if(!!t.highlightedData&&t.highlightedData.length&&t.showHighlightedData&&(r=!1),!r)return!0;const s=e.getChildren();return!!s&&s.some((e=>e.getPConnect().getComputedVisibility()))}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 ah(e||this.getContextName())}getImagePath(e){return`${Mr.getConstellationServiceUrl()}/v860/${Mr.getAppAlias()}/image/${e}?org=${ip.getOrganizationName()}`}skipRequiredValidation(){return this.options.isBulkAction}isBulkAction(){return this.options.isBulkAction}getChildren(){if(this._children&&this._children.length){const e=Gu(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}),t=[];for(;e?.hasNext();){const n=e.next();if(this.isBulkAction()){const e=n.getPConnect().getComponentName(),{template:t}=n.getPConnect().getConfigProps();if(!e||!0!==Wu.allowedComponetsForBulkProcessing[e]&&!0!==Wu.allowedComponetsForBulkProcessing[e]?.[t])continue}t.push(n)}return e?.resetIndex(),t}return[]}setInheritedProp(e,t){this._inheritedConfig[e]=t}getLocaleRuleName(){return this._localeRuleName}getLocalizedValue(e,t,n){const r=n||this.getLocaleRuleName(),s=this?.getMetadata();let a=null;const o=cp.getLocale();if(s){const t=s?.type,n=["View","Region"],r=s?.config?.label??s?.config?.caption;if("en-US"!==o&&r?.startsWith(j.FIELD_LABEL_ANNOTATION)){const t=r.split(`${j.FIELD_LABEL_ANNOTATION} `).pop(),n=t?.split("."),s=n?.pop();let o=`${s}`;const i=this.getFieldMetadata(o),c=i?.classID||this.getValue(`.${n?.join(".")}${j.CLASS_ID}`),l=i?.definedOnClassID;return o=`${l||c}.${o}`,up.getLocaleValue(e,o,up.FIELD_LABELS_BUNDLE_KEY,a)}t&&!n.includes(t)&&(a=t)}return up.getLocaleValue(e,t,r,a)}getLocalizedParagraphValue(e){const t=this.getLocaleRuleNameFromKeys(this.getCurrentClassID(),j.PARAGRAPH,e);return up.getParagraphLocaleValue(t,this.getCurrentClassID(),e)}getLocaleRuleNameFromKeys(e,t,n){return`${e}!${t}!${n}`}getValue(e,t){return 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?Ch.getPropertyValue(e,this.getPageReference(),`${this._contextName}/${j.SUGGESTION}`):Ch.getPropertyValue(e,t||this.getPageReference(),this._contextName)}setInheritedConfig(e){if(!e)return;const{readOnly:t,displayMode:n,referenceType:r,hideLabel:s}=e;s&&(this._inheritedConfig.hideLabel=s),r&&(this._inheritedConfig.referenceType=r),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)})),Yu(this._inheritedConfig,e))}getInheritedProps(){const e={},t={};return this._inheritedConfig.inheritedProps?.forEach((e=>{t[e.prop]=e.value})),Ch.resolveProps(t,e,this),e}setValue(e,t,n,r=!1,s={}){let a,o;const{isArrayDeepMerge:i}=s;this.isInsideList()&&this.getListActions().updateProperty(e,t),this.isBulkAction()&&(a=!0,t||(o=!0)),sh({type:"SET_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,initialValue:n,isImplicit:r,context:this.getContextName(),...void 0!==i&&{isArrayDeepMerge:i},...a&&{isStrictTracking:a},...o&&{removePropertyFromChangedList:o}}})}updateDirtyCheckChangeList(e,t){(({value:e,context:t,reference:n})=>{if(dl.isPageInstruction(n))return;const r=n?.startsWith(".")?n?.substr(1):n;fl[t]=fl[t]||{},fl[t][r]||(fl[t][r]={initialValue:ch(r,null,t)}),fl[t][r].value=e})({reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName()})}getContextDataValue(e,t){return lh(t||this.getPageReference(),e,this._contextName)}updateState(e){const t=this._pageReference.indexOf(j.CASE_INFO.CASE_INFO_CONTENT),n=this._pageReference.indexOf(".");let r=j.CASE_INFO.CASE_INFO_CONTENT;0!==t&&(r=n>0?this._pageReference.substring(n):this._pageReference),sh(bh({context:this._contextName,data:e,rootPageReference:r}))}replaceState(e,t,n={}){const{skipDirtyValidation:r=!1}=n;sh({type:"REPLACE_PROPERTY",payload:{reference:`${this.getPageReference()}${e}`,value:t,context:this.getContextName(),skipDirtyValidation:r}})}reportError(e,t,n){sh(rg(e,t||{},n))}getComponent(){return qu({getPConnect:()=>this})}createComponent(e,t,n,r){let s=this._pageReference;if(t){const e=uh(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,t,this._contextName);s=Ch.getContextPath(e||t,n)||t}else if(r&&r.pageReference){let e=r.pageReference;e=Qt.handleAnnotation(e,this),s=Ch.getContextPath(this._pageReference,e)||""}return qu(Xu({meta:e,index:this.index,options:{containerName:this.getContainerName(),hasForm:this.options.hasForm,...e.options,pageReference:s,context:this._contextName,target:this._containerTarget,readOnly:this._readOnly||this._inheritedConfig?.readOnly,viewName:this.viewName}}),r)}getReferencedView(){if(this.meta)return Ch.resolveReference(this.resolveConfigProps(this.meta),this)}_resolvePageRef(e){return this.getPageReference().includes(e)||e.startsWith(j.CLASS_ANNOTATION)?this.getPageReference():`${this.getPageReference()}${e}`}getReferencedViewPConnect(e=!1){const t={...this.getComponentConfig()};return delete t?.name,delete t?.type,Xu({meta:this.getReferencedView(),options:{...e?this.options:void 0,...t,context:this.getContextName(),pageReference:t.context?this._resolvePageRef(t.context):this.getPageReference(),viewName:this.viewName}})}getContainerManager(){return new Fl(this)}getActionsApi(){return this._actionsApi||(this._actionsApi=new Mu(this)),this._actionsApi}getActionManager(){return ln}getGoogleMapsAPIKey(){return S()}getServerURL(){return E()}getLoadingStatus(e){let t=null;return e?(t=ah(e),t=t?t.context_data:null):t=this.getDataObject().context_data,!!t&&(!!t.isLoading&&t.isLoading)}clearErrorMessages(e){e?.property?qn({type:"error",property:e.property,pageReference:this.getPageReference(),context:this.getContextName()}):e?.context?qn({type:"error",...e}):(qn({type:"error",...e,context:j.APP.APP}),qn({type:"error",...e,context:pd(`${j.APP.APP}/${this.getContainerName()}`)}))}resolveDatasourceReference(e){return uh(`${this.getPageReference()}.${j.SUMMARY_OF_LISTS}`,e,this.getContextName())||e}removeFormField(){}addFormField(){}setPageValue(e,t,n){delete e?.classID,this.setValue(t,e,void 0,void 0,{isArrayDeepMerge:!1}),((e,t,n)=>{const r=Jc(t);Xc[e]?Xc[e].fieldOrder[r]=n:Xc[e]={fieldOrder:{[r]:n}}})(this.getContextName(),`${this.getPageReference()}${t}`,this),n&&((e,t,n)=>{const r=(e,t)=>{Object.entries(e).forEach((([e,s])=>{if(Array.isArray(s)){const r=PCore.createPConnect({options:{pageReference:n.getPageReference(),context:n.getContextName(),referenceList:`${t}.${e}`}}).getPConnect();Pr(r,`${t}.${e}`,{skipStateUpdate:!0});for(let e=0;e<s.length;e+=1)Er(s[e],e,r,void 0,{})}else"object"==typeof s&&r(s,`${t}.${e}`)}))};r(e,t)})(e,t,this)}acceptSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=ku.getSuggestionsContext(this.getContextName()),n=this.getStateProps()?.value||e,r=Ch.getContextPath(this.getPageReference(),n),s=t.getField(r);this._hasSuggestions=!1,this.getActionsApi().updateFieldValue(n,s),this.getActionsApi().triggerFieldChange(n,s),t.removeField(r)}}ignoreSuggestion(e){if(this.getStateProps()?.value&&this.options.hasForm&&this._hasSuggestions){const t=this.getStateProps()?.value||e,n=Ch.getContextPath(this.getPageReference(),t);this._hasSuggestions=!1,ku.getSuggestionsContext(this.getContextName()).removeField(n)}}}function Xu(e){const t=new Ku(e);return{getPConnect:()=>t}}function Ju(e){qu=e}const Qu=class{static createContainerPConnect(e,t,n,r=!1){const{accessedOrder:s,items:a}=e;if(s&&a){const e=s[s.length-1];if(a[e]?.view&&Object.keys(a[e].view).length>0){const s=a[e],o=e.substring(0,e.lastIndexOf("_")),{view:i,context:c}=s,{viewName:l,viewContext:u}=this.processRootViewDetails(i,s,t);if(!l)return null;return Xu({meta:i,options:{context:c,pageReference:u||t,containerName:n,containerItemID:e,parentPageReference:t,hasForm:r||n===td.WORKAREA||n===td.MODAL||l===j.CREATE_DETAILS_VIEW_NAME,target:o}}).getPConnect}}return null}static processRootViewDetails(e,t,n){const{config:{context:r,name:s}={}}=e,{context:a}=t;let o=s,i=r;const c=ul.isProperty(s),l=ul.isProperty(r);if(l){const e=ul.getPropertyName(r);i=ch(`.${e}`,e.startsWith(".")?n:"",a)}if(i||(i=n),c){const e=ul.getPropertyName(s);o=ch(`.${e}`,i,a)}return c&&l&&""!==o&&(o=s,i=r),{viewName:o,viewContext:i}}static addFlowContainerItem(e){const t=e.getContainerManager(),n=e.getContextName();let r,s;if("review"!==e.getValue("context_data.caseViewMode")){const e=n.substring(0,n.lastIndexOf("_")),t=pd(e),a=sd(e,t);a&&({key:r,flowName:s}=a)}t.addContainerItem({semanticURL:"",key:r,flowName:s,caseViewMode:"perform",resourceType:"ASSIGNMENT",data:e.getDataObject(n)})}},Zu={defaultLimit:16},ed={SINGLE:"single",MULTIPLE:"multiple"},td={PRIMARY:"primary",WORKAREA:"workarea",MODAL:"modal",PREVIEW:"preview"},nd=()=>rh()?.getState()?.containers,rd=e=>e?rh()?.getState().containers[e]:(Et.error("getContainerData: target is the required parameter"),null),sd=(e,t)=>{if(!e||!t)return null;const n=nd(),r=n?.[e];return r&&r.items&&r.items[t]||null},ad=e=>e?rh()?.getState().containers[e]?.items:(Et.error("getContainerItems: target is the required parameter"),null),od=e=>e?rh()?.getState().containers[e]?.accessedOrder||[]:(Et.error("getContainerAccessOrder: target is the required parameter"),[]),id=e=>e?od(e)?.length>0||!1:(Et.error("areContainerItemsPresent: target is the required parameter"),!1),cd=(e,t,n)=>{if(!e||!t)return Et.error("isContainerItemExists: target and key are required parameters"),!1;const r=nd(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e===t);if(t&&a)for(const e in a)if(o(t,a[e].key))return!0;return!1},ld=(e,t,n)=>{if(!e||!t)return Et.error("getContainerItemName: target and key are required parameters"),null;const r=nd(),s=r?.[e],a=s&&s.items||null,o=n||((e,t)=>e?.toLowerCase()===t?.toLowerCase());if(t&&a)for(const e in a)if(o(t,a[e].key))return e;return null},ud=(e,t)=>{if(!e||!t)return Et.error("isContainerInitialized: context and name are required parameters"),!1;const n=nd();return n&&Object.prototype.hasOwnProperty.call(n,`${e}/${t}`)},dd=(e,t)=>{if(!e||!t)return Et.error("getContainerType: context and name are required parameters"),null;const n=nd(),r=n?.[`${e}/${t}`];return r&&r.type},pd=e=>{if(!e)return Et.error("getActiveContainerItemName: target is the required parameter"),null;let t=null;const n=nd();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r;t=s&&s.length>0?s[s.length-1]:null}return t},hd=(e,t,n)=>{if(!e||!t)return Et.error("isContainerItemActive: target and key are required parameters"),!1;const r=ld(e,t,n);return!!r&&r===pd(e)},gd=(e,t)=>{let n=null;const r=nd();for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&r[s].items){const a=r[s].items[e];if(n=a?a[t]:null,n)break}return n},fd=e=>e?gd(e,"context"):(Et.error("getDataContextName: containerItemName is required parameters"),null),md=e=>{if(!e)return Et.error("getActiveContainerItemContext: target is required parameters"),null;let t=null;const n=nd();if(n&&n[e]){const r=n[e],{accessedOrder:s}=r,a=s&&s.length>0?s[s.length-1]:null;t=fd(a)}return t},yd=e=>{if(!e)return Et.error("getChildContainerItems: containerItemName is required parameters"),[];const t=e.endsWith("/")?e:`${e}/`;let n=[],r=!1;const s=nd(),a=n=>{const s=[];return Object.keys(n).forEach((n=>{n.startsWith(t)&&n!==t&&s.push(n),n===e&&(r=!0)})),s};for(const e in s)if(Object.prototype.hasOwnProperty.call(s,e)&&s[e].items){const t=a(s[e].items);t&&t.length>0&&(n=n.concat(t)),n=n.sort()}return r?n:[]},Id=e=>{if(!e)return Et.error("getChildContainers: containerItemName is required parameters"),[];const t=[],n=nd();for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e&&t.push(r);return t},Ed=e=>{if(!e)return Et.error("getChildContainersContexts: parentContainerItemID is required parameters"),[];const t=[],n=nd();for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&r.startsWith(e)&&r!==e){(od(r)||[]).forEach((n=>{fd(n)!==e&&t.push(fd(n))}))}return t},Ad=e=>{const t=[...Ed(e),e],n=[],r=rh()?.getState().data||{};return t.forEach((e=>{Object.prototype.hasOwnProperty.call(r,`${e}/${j.SUGGESTION}`)&&n.push(`${e}/${j.SUGGESTION}`)})),n},_d=e=>e?e&&rd(e)&&rd(e).type===ed.SINGLE:(Et.error("isContainerSingleMode: target is required parameters"),null),Sd=e=>e?e&&rd(e)&&rd(e).type===ed.MULTIPLE:(Et.error("isContainerMultipleMode: target is required parameters"),null),Cd=e=>e?rd(e)&&rd(e).items&&Object.keys(rd(e)?.items).length>0||!1:(Et.error("hasContainerItems: target is required parameters"),!1),Td=e=>e&&Zu[e]?Zu[e]:Zu.defaultLimit,Nd=(e,t=Zu.defaultLimit)=>{e?Zu[e]=t:Et.error("setContainerLimit: target is required parameter")},Pd=e=>{if(!e)return Et.error("isContainerLimitReached: target is required parameter"),!1;let t=!1;const n=rd(e),{items:r={}}=n,s=Object.keys(r),a=Td(e);return s&&s.length>0&&s.length>=a&&(t=!0),t},Dd=e=>{if(!e||!e.name||!e.context)return Et.error("resetContainersPayload: containerInfo object should contain name and context"),null;const t=e?.name,n=rd(`${e?.context}/${t}`),r=Array.isArray(n?.accessedOrder)&&n?.accessedOrder.map((e=>n?.items[`${e}`]?.context))||[],s=Id(`${j.APP.APP}/${j.PREVIEW}`),a=Ed(`${j.APP.APP}/${j.PREVIEW}`);return{context:e?.context,name:t,containerItems:[...r,...a],childContainers:s}},Rd=e=>{if(!e)return Et.error("isContainerDirty: containerItemID is the required parameter"),!1;const t=fd(e);return Nl(t)||Fc(e)},bd=e=>{if(!e)return Et.error("getLeastRecentlyUsedNonDirtyContainerItemID: target is required parameter"),null;let t;const n=rd(e),{accessedOrder:r=[]}=n;for(let e=0;e<r.length;e+=1){const n=r[e];if(!Rd(n)){t=n;break}}return t},Od=e=>{if(!e)return Et.error("getTargetFromContainerItemID: containerItemID is the required parameter"),null;const{containers:t}=rh()?.getState()||{};for(const n in t)if(t[n]?.accessedOrder?.includes(e))return n;const n=e.lastIndexOf(j.UNDERSCORE_STRING);return e.substring(0,n)},vd=(e,t={})=>{if(!e)return Et.error("closeContainerItem: containerItemID is the required parameter"),Promise.reject(new Error("closeContainerItem: containerItemID is the required parameter"));const n=Od(e),r=fd(e),{skipDirtyCheck:s}=t;let a=!0,o=[];if(Rd(e)&&!s&&(a=window.confirm(up.getLocaleValue(Il,"Messages"))),a){const{accessedOrder:t=[],items:s={},type:a}=rd(n);o=t.filter((t=>t!==e));const i=o[o.length-1],c=s[i]||{},{semanticURL:l=j.FORWARD_SLASH_STRING,context:u}=c;o.length>0&&l&&l!==j.FORWARD_SLASH_STRING?Rg({directUrlUpdation:!0,semanticURL:l,options:{containerItemID:i,context:u}}):Rg({directUrlUpdation:!0,semanticURL:j.FORWARD_SLASH_STRING,options:{}});sh(Kh({containerItemID:e,context:r,target:n,containerInfo:{newAccessedOrder:o,containerType:a}}))}return Promise.resolve({newAccessedOrder:o,removeItem:a})},xd=(e,t,n,r)=>{const s="root",a=H(t,s,!0),o=mt(t,s),i={data:n,context:r?"app":a},c=[Fh({root:e,containerItemID:a,context:r?"app":a,target:o,containerName:t})];c.push(bh(i)),sh(c)},wd=(e,t,n)=>{let r=od(e);r=r.filter((e=>e!==t));let s=!1;for(let e=0;e<r.length;e+=1){if(fd(r[e])===n){s=!0;break}}return s},Md=e=>{if(!e)return Et.error("isContainerItemContextBeingUsedInOtherContainers: containerItemID is the required parameter"),!1;const t=nd(),n=fd(e),r=t?Object.keys(t):[];let s=!1;for(let t=0;t<r.length&&(s=wd(r[t],e,n),!s);t+=1);return s},Ld=e=>{Array.isArray(e)||(e=[e]);const t=nd()||{};return e.map((e=>{const n=Od(e);return Eh.getIn(t,[n,"items",e,"transientItems"])||[]})).flat()},Ud=e=>{const{transientItemID:t,data:n,options:r}=e,s=Eh.deepClone(rh()?.getState().data[t]);r?.reset&&Eh.iterateLeafNodes(s,(e=>{"classID"!==e[e.length-1]&&Eh.setIn(s,e,"")})),sh(Vh({transientItemID:t,data:Eh.mergeDeep(n,s)}))},Fd=e=>{const{transientItemID:t,data:n}=e;sh($h({transientItemID:t,data:n}))},jd=e=>{const t=Eh.deepClone(rh()?.getState().data[e]);Eh.iterateLeafNodes(t,(e=>{"classID"!==e[e.length-1]&&Eh.setIn(t,e,"")})),sh(kh({transientItemID:e,data:t}))},Vd=e=>{const t=Eh.deepClone(rh()?.getState().data[e]);Eh.iterateLeafNodes(t,(e=>Eh.setIn(t,e,""))),sh(Bh({transientItemID:e,data:t}))};class kd{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 $d=()=>kd,Bd=e=>{const t={containerName:e};t.childContainers=Id(e),sh({type:Ue,payload:t})},Gd=(e,t)=>{const n=yd(e),{key:r}=sd(Od(e),e),s=[];n.forEach((e=>{const{key:n}=sd(Od(e),e);if(n===r){const n={data:{caseInfo:{headers:{etag:t}}},target:Od(e),context:e};s.push({type:fe,payload:n})}})),s.length&&sh(s)},Wd=(e,t)=>{const n=[],r={data:{caseInfo:{headers:{etag:t}}},target:Od(e),context:e};n.push({type:fe,payload:r}),n.length&&sh(n)},Hd=()=>cp.isPortalLoaded?"app":"root",qd=()=>bl,zd=(e,t)=>{const n={data:{caseInfo:{lastUpdateTime:t}},target:Od(e),context:e};sh({type:fe,payload:n})},Yd=(e,t)=>{const n=ld(e,t),r=ld(`${n}/workarea`,t);return fd(r)},Kd=e=>e?gd(e,"parentContext"):(Et.error("getContainerParentContext: containerItemName is required parameters"),null),Xd=e=>{const{accessedOrder:t}=e;return t&&t.length>0?t[t.length-1]:""},Jd=e=>{if(e&&"string"==typeof e){const t=e.split("/");return t.pop(),t.join("/")}return null},Qd=()=>Qu,Zd=/{(.*?)}/i,ep=/{(.*?)}/g,tp=e=>null!==e.match(Zd),np=e=>(e&&(e.startsWith("/")&&(e=e.substring(1,e.length)),e.endsWith("/")&&(e=e.substring(0,e.length-1))),e),rp=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`}},sp=()=>np(window.location.pathname),ap=(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 op=new class{constructor(){this.staticRoutesList=[],this.dynamicRoutesList=[],this.reqContextName="",this.defaultViewUrlPath="",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._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};_createStaticDynamicRoutesList=e=>{Object.keys(e).forEach((e=>{tp(e)?this.dynamicRoutesList?.push(e):this.staticRoutesList?.push(e)}))};_getDynamicKeyName=e=>{const t=e.indexOf("{")+1,n=e.lastIndexOf("}");return e.slice(t,n)};isDefaultPortal=()=>"false"!=`${this.bDefaultPortal}`;getPortalName=()=>this.portalName;getApplicationPath=()=>np(`${this.getReqContextName()}/${this.getReqServletNameReal()}`);getReqServletNameReal=()=>`${this.reqServletNameReal}`;getAppDelimeter=()=>`${this.appDelimeter}`;getApplicationName=()=>`${this.appName}`;getApplicationAlias=()=>`${this.appAlias}`;getServletPath=()=>`${this.reqServletPath}`;getOrganizationName=()=>`${this.orgName}`;getReqContextName=()=>np(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,""),np(e)};getEndPointInfo=e=>{this.ignoreFromEndPoint?.forEach((t=>{e.includes(t)&&(e=e.substring(0,e.indexOf(t)))}));let t=this.processUrl(e,!0),n=this._getMatchedRouteInRoutingTable(t);void 0===n&&(t=this.processUrl(this.defaultViewUrlPath,!0),n=this._getMatchedRouteInRoutingTable(t)||"");const{routeKey:r,payload:s}=this.appRoutes[n],{reqType:a,endPoint:o,params:i}=this.appRoutesMeta?.[r].restApi||{},c={...s},{caseClassName:l,caseID:u}=c;if($.isRemoteCase(l)){const{RemoteClassGroup:e,RemoteSystemID:t}=$.getRemoteCase(l);c.caseID=u?.replace(l,e?.toUpperCase()),c.RemoteSystemID=t}const d={routeKey:r,requestType:a,routeEndpoint:o,payload:{...i,...c}};return this._resolveRoute(d,this.processUrl(e,!1),n)};getSemanticURL(e,t,n){return this.buildSemanticURL(e,t,n)}getResolvedSemanticURL(e,t,n={}){const r=this.getSemanticURL(e,t,n);let s=r;if(tp(r)){const e=r.match(ep);e?.forEach((e=>{const t=this._getDynamicKeyName(e);n[t]&&(s=s.replace(e,n[t]))}))}const a=Dg(s),o=new URL(a);return this.isDefaultPortal()||this.getPortalName()&&!o.searchParams.toString().includes("portal=")&&o.searchParams.append("portal",this.getPortalName()),o.toString()}updateSemanticURLAndDocumentTitle(e){const{key:t,actionName:n,caseClassName:r,isRemoteCase:s}=e;if(s&&!r)return;const a=this.getSemanticURL(n,{caseClassName:r}).replace(/{.+?}/,String(Qr(t))),o=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`,i={semanticURL:a,directUrlUpdation:!0,options:{acName:o,context:md(o)}};Pg(i);const c=r.substring(r.lastIndexOf("-")+1),l=t.substring(t.lastIndexOf(" ")+1),u=cp.environmentInfoObject?.pxApplication?.pyLabel;Lg(`${c} (${l}) - ${u}`)}buildSemanticURL(e,t,n){const{urlPattern:r}=this.appRoutesMeta?.[e]||{},s=r?.split("/").length,a=r?.split("/"),o=Object.keys(this.appRoutes).filter((e=>s===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 r=this.appRoutes[e].payload,s={...n};delete s.dataViewName,delete s.dataContext;const a=r.dataViewKeys||r.dataContextParameters||{},o=Object.keys(t).every((e=>t[e]===r[e]));return!!o&&(Eh.isEmpty(a)||Eh.isEmpty(s)?o:Object.keys(s).every((e=>Object.prototype.hasOwnProperty.call(a,e))))}));return i?this._getQueryParamsResolvedURL(i,n):""}_getQueryParamsResolvedURL(e,t,n=!1){const[r,s]=e.includes("?")?e.split("?"):[e];if(s){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;const a=new URLSearchParams(s),o={};for(const[r,s]of a.entries())if("string"==typeof s&&tp(s)){const a=this._getDynamicKeyName(s);o[r]=n?t[a]||e[a.toLowerCase()]:t[a]}else"string"==typeof s&&(o[r]=s);return`${r}?${new URLSearchParams(o).toString()}`}return r}_getQueryParamsObject(e){const t={},n=new URLSearchParams(e);for(const[e,r]of n.entries())t[e]=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:r}=this.appRoutesMeta[e].restApi;let{endPoint:s}=this.appRoutesMeta[e].restApi;t?.params&&t.params.pageName&&(s=`${s}&pageName=${t.params.pageName}`);const a=s.match(ep);if(a)for(let e=0;e<a.length;e+=1){const n=a[e].replace("{","").replace("}",""),r=new RegExp(a[e],"g");s=s.replace(r,t?.[n])}if(r){let e={};return Object.keys(r).forEach((n=>{this._isSpecialInstruction(n)&&(e={...e,...this._processInstruction(n,r[n],t)})})),{restApi:s,reqType:n,body:e}}return{restApi:s,reqType:n}}throw new Error(`Cannot find route metadata for the routeKey: ${e}.`)}_isSpecialInstruction(e){return e&&e.startsWith("@")}_processInstruction(e,t,n){const r={};return"@COPY"===e&&t.forEach((e=>{r[e]=n[e]})),r}doesRestApiExist(e){return!(!this.appRoutesMeta||!this.appRoutesMeta[e])}_resolveRoute=(e,t,n)=>{const r=[],[s,a]=t.includes("?")?t.split("?"):[t],[o,i]=n.includes("?")?n.split("?"):[n],c=s.split("/"),l=o.split("/"),u={};for(let e=0;e<l.length;e+=1)if(r[e]=l[e],tp(l[e])){u[this._getDynamicKeyName(l[e])]=c[e],r[e]=c[e]}const d=this._getQueryParamsObject(i),p=this._getQueryParamsObject(a),h={};for(const[e,t]of Object.entries(p))h[e.toLowerCase()]=t;for(const e in d)tp(d[e])?u[e]=p[e]||h[e.toLowerCase()]:u[e]=d[e];let g;a&&(g=this._getQueryParamsResolvedURL(n,p,!0));const f=this._resolvePayload(e,u,n);return{...this._resolveRouteEndPoint(f,n),urlPath:g||r.join("/")}};_resolveRouteEndPoint=(e,t)=>{let{routeEndpoint:n}=e;if(!tp(n))return e;const r={};if(r[t]=e,void 0!==e.payload){const t=n.match(ep);for(let s=0;s<t.length;s+=1){const a=t[s],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`,r)}}else this._sendWarningAndErrorMessages("Unable to resolve dynamic token(s) in routeEndpoint- payload is missing in routing table for-",r);return{...e,routeEndpoint:n}};_resolvePayload=(e,t,n)=>{if(void 0===e.payload)return e;const r={...e.payload,...this._resolvePayloadRecursive(e.payload,t)};return{...e,payload:r}};_resolvePayloadRecursive(e,t){const n={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let s=e[r];if("string"==typeof s&&tp(s)){const e=s.match(ep);for(let n=0;n<e.length;n+=1){const r=e[n],a=this._getDynamicKeyName(r);if(void 0!==t[a]){const e=t[a];s=s.replace(r,e)}else this._sendWarningAndErrorMessages(`Unable to resolve dynamic token {${a}} in payload- {${a}} is missing in semantic url construct`)}n[r]=s}else"object"==typeof s&&(n[r]=this._resolvePayloadRecursive(s,t))}return n}_getMatchedRouteInRoutingTable=e=>{let t=this._findMatchedRouteInStaticList(e);return void 0!==t?t:(t=this._findMatchedRouteInDynamicList(e),void 0!==t?t:void 0)};_findMatchedRouteInStaticList=e=>this.staticRoutesList?.find((t=>t.toLowerCase()===e.toLowerCase()));_findMatchedRouteInDynamicList=e=>{const[t,n]=e.includes("?")?e.split("?"):[e],r=t.split("/");return this.dynamicRoutesList?.find((e=>{const[t,s]=e.includes("?")?e.split("?"):[e],a=t.split("/");if(a.length!==r.length)return!1;let o=0;for(o=0;o<a.length;o+=1){const e=a[o].toLowerCase();if(!tp(e)&&e!==r[o]&&rp(e)!==r[o])return!1}if(s){const e=new URLSearchParams(n.toLowerCase()),t=new URLSearchParams(s.toLowerCase()),r=new Set,a=new Set,o=/\{[a-zA-Z]+\}/;for(const t of e.keys())r.add(t);for(const e of t.keys())a.add(e);if(a.size!==r.size)return!1;for(const n of r){if(!a.has(n))return!1;const r=t.get(n);if(e.get(n)!==r&&!o.test(r))return!1}}return!0}))};_sendWarningAndErrorMessages=(e,t)=>{ap(e,t,"warning"),ap("Error in Generated Routing Table",null,"error"),ap("Back | Forward for this page may NOT work as intended",null,"warning"),ap("Bookmark | Refresh for this page may NOT work as intended",null,"warning")}},ip=op;const cp=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.showPerformanceDashboard=!1,this.isExtraCallRequiredForDefaultHome="false"}setEnvironmentInfo(e){this.environmentInfoObject=e;const t=this.environmentInfoObject?.features||Eh.convertObjectWithStringToBoolean(this.environmentInfoObject?.pyFeatures)||{granularUIRefresh:!1};this.environmentInfoObject.features={...t,granularUIRefresh:t.granularUIRefresh||t.pyEnableGranularUIRefresh||!1}}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 ip.getPortalName()}getApplicationName(){return this.environmentInfoObject?.pxApplication?.pyRuleName}getUseLocale(){return this.environmentInfoObject?.pxLocale?.pyUseLocale}getAccessGroup(){return this.environmentInfoObject?.pxOperator?.pyAccessGroup}getTimeZone(){return this.environmentInfoObject?.pxLocale?.pyTimeZone}getTheme(){return this.themeOverrides}setTheme(e){return this.themeOverrides=e,this.themeOverrides}getBrandingInfo(){return this.brandingInfo}setBrandingInfo(e){return 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(j.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}getBuiltOnAppNames(){return this.environmentInfoObject?.pxApplication?.pyBuiltOnApplications}setPreviewMode(){ec.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)}getCaseTypeList(){return this.environmentInfoObject&&this.environmentInfoObject?.pyCaseTypeList||[]}getUserSettings(){return this.environmentInfoObject?.pyUserSettings||null}getAvailableLocalePacks(){return this.environmentInfoObject?.pyAvailableLocalePacks?.map((e=>e.pyLabel))||[]}getPerformanceDashboardVisibility(){return this.showPerformanceDashboard}setPerformanceDashboardVisibility(e){this.showPerformanceDashboard=e}getIsExtraCallRequiredForDefaultHome(){return this.isExtraCallRequiredForDefaultHome}setIsExtraCallRequiredForDefaultHome(e){this.isExtraCallRequiredForDefaultHome=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"}};const lp=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 r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1),[o,i]=this.getKeyAndValue(a);this.addKeyToMap(o,i),n+=`${a.split(":")[0]}}`,t=s+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 r=e.indexOf("{@P ",t);if(-1===r){n+=e.substring(t,e.length);break}n+=e.substring(t,r);const s=e.indexOf("}",t),a=e.substring(r,s+1);n+=this.keyMap[a],t=s+1}return n}};const up=new class{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||e;this.localeStore[t]=n};getLocaleForRule(e=this.#c()){return this.localeStore[e]}resetLocaleStore=()=>{this.localeStore={}};getLocaleValue(e,t,n,r){n||(n=this.#c());let s=!1;e&&"string"==typeof e&&(s=e.includes("@P ")),s&&(e=lp.formatLocaleKey(e));const a=this.#l(e,n,t,r);return s?lp.replaceWithValue(a[e]||e):a[e]||e}#l(e,t,n,r){t!==this.FIELD_LABELS_BUNDLE_KEY&&(n=n?`${n}.fields`:"fields");let s=this.localeStore[t.toUpperCase()],a=s?Eh.getIn(s,n,{}):{};return!a[e]&&r&&(s=this.localeStore[this.#c().toUpperCase()],a=s?Eh.getIn(s,`${r}.${n}`,{}):{}),a}#c(){return 2===cp.getFeatureMap().localizationVersion?this.GENERIC_BUNDLE_KEY_LP:this.GENERIC_BUNDLE_KEY}getParagraphLocaleValue(e,t,n){const r=this.localeStore[e.toUpperCase()];return r?decodeURIComponent(atob(r.content).split("").map((e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join("")):PCore.getMetadataUtils().getParagraph(n,t)}getPortalLocaleReference(e){return e?`PORTAL!${e}`.toUpperCase():`PORTAL!${cp.getPortalName()}`.toUpperCase()}getCaseLocaleReference(e,t){if(!e)return null;return 2===this.getLocalizationVersion()?`CASE!${e}`.toUpperCase():t?`${e}!CASE!${t}`.toUpperCase():null}getLocalizationVersion(){return cp.getFeatureMap().localizationVersion||1}async getLocaleJsons(e){if(!this.isCurrentLocalePackAvailable())return[];const t=cp.getUseLocale(),n=[],r=PCore.getLocaleUtils().localeStore;if((e=(e=e.filter((e=>!r[e]))).map((e=>e.toUpperCase()))).length>0){const r=e.map((e=>({localeRuleKey:e,promise:Mr.getSvcLocale(t,`${e}.json`)}))),s=await Promise.allSettled(r.map((e=>e.promise)));await Promise.all(s.map((async(e,t)=>{if("fulfilled"===e.status){const s=r[t];let a;try{a=await e.value.json()}catch{a=null}a&&n.push({localeRuleKey:s.localeRuleKey,jsonData:a})}})))}return n}async loadLocaleResources(e){const t=cp.getUseLocale(),n=cp.getBaseLocale();if(cp&&t&&(t!==n||"en-US"!==n)&&e?.length>0)try{(await this.getLocaleJsons(e)).forEach((e=>{this.setLocaleForRule(e.jsonData,e.localeRuleKey)}))}catch(e){console.warn(e)}}setTimezone(e){this.timezone=e}getTimeZoneInUse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone;return this.timezone||e}isCurrentLocalePackAvailable(){const e=cp.getLocale();return e&&cp.getAvailableLocalePacks()?.includes(e)}};let dp;const pp=e=>{if(e){const t=(new DOMParser).parseFromString(e,"text/html").getElementsByTagName("pega-reference")[0].getAttribute("data-rule-id")??"";if(t){const e=dp.getValue(t);return dp.registerAdditionalProps({[t]:`@P ${t}`}),e}}};const hp=class{static getParagraphStream(e,t){return((e,t)=>{dp=t;const n=e.replace(/<pega-reference(.*?)<\/pega-reference>/g,pp);return/^(<p>)\s*(<\/p>)$/.test(n)?null:n})(e,t)}};Jt.registerHandler("@L",((e,t)=>t.getLocalizedValue(e))),Jt.registerHandler("@P",((e,t,n)=>t?t.getValue(e):Ch.getLitePropertyValue(n))),Jt.registerHandler("@E",((e,t,n)=>{try{const r=Vt(e),s=kt(r);return $t(s,t,n)}catch(e){}return!0})),Jt.registerHandler("@W",((e,t,n)=>{let r;if(t)r=t.getContextDataValue(`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`);else{const{pageReference:t,context:s}=n??{};r=lh(t,`.${j.SUMMARY_OF_WHEN_CONDITIONS}.${e}`,s)}return!0===r||"true"===r})),Jt.registerHandler("@ASSOCIATED",((e,t)=>{let n={};const r=[];let s="",a="";const o=t.getPageReference();if(e.startsWith(".")){s=`${o}.${e.substring(1)}`;const r=e?e.split(".").filter((e=>!!e)):[];r.length>1&&(r.pop(),a=r.join(".")),n=t.getFieldMetadata(e.substring(1))}else n=t.getFieldMetadata(e),s=e;const i=n?.datasource?.tableType,c=n?.datasource?.mode===j.READONLY,l=n?.datasource?.name||"",u=t.getComponentConfig();if(u&&u.deferDatasource&&(u.datasourceMetadata=`@FIELD_META ${e}`,t.setStateProps({datasourceMetadata:u.datasourceMetadata}),i===j.DATA_PAGE))return null;if(i===j.DECISION||i===j.RULE_REFERENCE)return function(e,t){const n=Qt.getPropertyName(e?.propertyForDisplayText),r=Qt.getPropertyName(e?.propertyForValue),s=t.getContextDataValue(`.${j.SUMMARY_OF_EXPRESSIONS}.${e?.name}`)||[];return s?.map((e=>({key:e[r]||e[`.${r}`],value:e[n]||e[`.${n}`]})))}(n?.datasource,t);if(i!==j.DATA_PAGE)return n?.datasource?.records;const d=Qt.getPropertyName(n?.datasource?.propertyForDisplayText),p=Qt.getPropertyName(n?.datasource?.propertyForValue),h=Array.isArray(n?.datasource?.parameters)?n?.datasource?.parameters:[],g=t.getContextName(),f=[];if(h.forEach((e=>{if(Qt.isProperty(e?.value)){let t=ch(`.${Eh.getFullPropertyReference([a,Qt.getPropertyName(e.value)])}`,o,g);f.push(Eh.getFullPropertyReference([o,a,Qt.getPropertyName(e?.value)])),null!=t&&""!==t||(t=j.NULL_STRING),r.push(t)}else r.push(e?.value||j.NULL_STRING)})),g){const e=Kt.getContextObjectByName(g)||{};f.forEach((t=>{if(t in e){const n=e[t];e[t]=[...new Set([...n,s])]}else e[t]=[s]})),Kt.addContextName(g,e)}const m=function(e,t,n,r){let s="",a=n;if(t.join(j.HASH_DELIMITER)&&(s=Eh.getHashedString(t.join(j.HASH_DELIMITER)),a=n+j.UNDERSCORE_STRING+s),r){const e=oh(),t=e?e[n]?.[a]:{};return Array.isArray(t?.pxResults)?t.pxResults:[]}const o=(e.getDataObject()[n]||{})[a]||{};return Array.isArray(o?.pxResults)?o.pxResults:[]}(t,r,l,c);return m.map((e=>({key:e[p]||e[`.${p}`],value:e[d]||e[`.${d}`]})))})),Jt.registerHandler("@ROUTING_INFO",((e,t)=>yt(t.getContainerName(),t.getContextName()))),Jt.registerHandler("@ENV",((e,t)=>{switch(e){case j.ENV_INFO_KEYS.APPLICATION_NAME:return cp.getApplicationName();case j.ENV_INFO_KEYS.ACCESS_GROUP:return cp.getAccessGroup();case j.ENV_INFO_KEYS.USER_NAME:return cp.getOperatorName();case j.ENV_INFO_KEYS.USER_ID:return cp.getOperatorIdentifier();case j.ENV_INFO_KEYS.APPLICATION_DESC:return t.getLocalizedValue(cp.getApplicationLabel()||"");case j.ENV_INFO_KEYS.USER_IMAGE:return cp.getOperatorImageInsKey();case j.ENV_INFO_KEYS.LOCALE:return cp.getUseLocale();case j.ENV_INFO_KEYS.TIMEZONE:return cp.getTimeZone();case j.ENV_INFO_KEYS.WORK_GROUP:return cp.getOperatorWorkGroup();default:return e}})),Jt.registerHandler("@DATASOURCE",((e,t)=>{const n=t.getValue(e)||[],r=t.getComponentConfig(),s=Object.keys(r).find((t=>r[t]?.source?.includes(e)));if(s){const{fields:e,copyAll:t}=r[s],a=[];return n.forEach((n=>{const r={};t?Object.keys(n).forEach((e=>{const t=Qt.getPropertyName(e);r[t]=n[t]})):Object.keys(e).forEach((t=>{const s=Qt.getPropertyName(e[t]);r[t]=n[s]})),a.push(r)})),a}return[]})),Jt.registerHandler("@FIELD_META",((e,t)=>{let n,r={};if(r=e.startsWith(".")?t.getFieldMetadata(e.substring(1)):t.getFieldMetadata(e),r&&r.datasource&&r.datasource.parameters){let s="";const a=e.split(".").filter((e=>!!e));if(a.length>1&&(a.pop(),s=`.${a.join(".")}`),Array.isArray(r.datasource.parameters)){const e=[];r.datasource.parameters.forEach((n=>{const r={},{name:a,value:o}=n;r.name=a,"string"==typeof o&&o.startsWith("@P")?r.value=`@P ${s}${o.substring(3)}`:r.value=o,e.push(t.resolveConfigProps(r))})),n=e}else n=t.resolveConfigProps(r.datasource.parameters);r={...r,datasource:{...r.datasource,parameters:n}}}return r})),Jt.registerHandler("@USER",((e,t,n={})=>{const r=t?.getValue(e)||Ch.getLitePropertyValue(n,e),s=t?.getReferencedUser(r)||Ch.getReferencedUser(r,n);return{userId:r,userName:s?s.UserName:null}})),Jt.registerHandler("@ACTIVE_CASES",((e,t)=>Fu.getOpenedCaseItems(`${t.getContextName()}/${t.getContainerName()}`))),Jt.registerHandler("@LR",(e=>e)),Jt.registerHandler("@CASE",((e,t)=>e===j.ID?t.getCaseInfo().getKey():e)),Jt.registerHandler("@SHARED",(e=>ku.getSharedState(e))),Jt.registerHandler("@PARAGRAPH",((e,t)=>{const n=t.getLocalizedParagraphValue(e);return n?hp.getParagraphStream(n,t):null})),Jt.registerHandler("@FILTERED_LIST",((e,t)=>{const n=e.substring(1,e.indexOf("[")),r=e.substring(e.indexOf("]")+2),s=e.substring(e.indexOf("[")+1,e.indexOf("]"));if(!t)return null;const{useCustomContext:a}=t;let o;return Eh.isEmpty(a)?o=t.getValue(`.${n}`):(o=a,o=Eh.getIn(o,n)),o&&r.length>0?(s&&(o=o.filter((e=>Bt(s,e)))),o.map((e=>Eh.getIn(e,r)))):null})),Jt.registerHandler("@ADDRESS",((e,t)=>{const n=t.getValue(e)?.pyCountry;return n?`pyAddressForm_${n}`:"pyAddressForm"})),Jt.registerHandler("@DATATYPE",((e,t)=>t.getValue(e)));const gp="downloadAttachment",fp={},mp=e=>{const t=fc();return fp[e]=t,t},yp=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("/"),r=e=>e.some((e=>n.includes(e)));r(["excel","spreadsheet"])?t="document-xls":r(["zip","compressed","gzip","rar","tar"])&&(t="document-compress")}return t},Ip=e=>{let t,n,r,s;return t=e.pyCategoryLabel?`${e.pyCategoryLabel},`:e.pyCategoryName?`${e.pyCategoryName},`:e.Category,n=e.pxCreateOpName?e.pxCreateOpName:e.pxCreateOperator?e.pxCreateOperator:e.CreateUser?.Name||"",r=e.pyFileName?e.pyFileName:e.FileExtension&&""!==e.FileExtension&&e.FileName.endsWith(e.FileExtension)?e.FileName.substring(0,e.FileName.lastIndexOf(e.FileExtension)-1):e.FileName,s=e.pyAttachName&&e.pyFileName?e.pyAttachName.startsWith(e.pyFileName)&&e.pyAttachName.split(".").length-1===e.pyFileName.split(".").length?e.pyAttachName.split(".").pop():"":e.FileExtension,{props:{meta:`${t} ${n}`,name:e.pyAttachName?e.pyAttachName:e.FileName,icon:yp(e.pyMimeFileExtension||e.MimeType)},responseProps:{fileName:e.pyAttachName?e.pyAttachName:e.FileName,name:r,category:e.pyCategoryName?e.pyCategoryName:e.Category,extension:s,ID:e.pzInsKey?e.pzInsKey:e.ID,mimeType:e.pyMimeFileExtension?e.pyMimeFileExtension:e.MimeType,attachmentURL:e.pyAttachmentLink?e.pyAttachmentLink:e.AttachmentURL,createUser:n,createDateTime:e.pxCreateDateTime?e.pxCreateDateTime:e.CreateDateTime,responseType:e.responseType??(e.ID?"binary":null)}}},Ep={uploadAttachment:(e,t,n,r)=>{const s=new FormData;s.append("appendUniqueIdToFileName",!0),s.append("file",e);const{restApi:a,reqType:o}=_g("uploadAttachment",{});return pc(a,{method:o,headers:{"Content-Type":"multipart/form-data"},body:s,onUploadProgress:t,signal:mp(e.ID).token},r).then((t=>({type:"File",category:e.category||"File",ID:t.data.ID,clientFileID:e.ID,filename:e.name}))).catch(n?n(mc,e):e=>{throw e.isHandled=!1,e}).finally((()=>delete fp[e.ID]))},linkAttachmentsToCase:(e,t,n,r)=>{const s={};if("File"===n){const[e]=t,{clientFileID:n}=e;delete e.clientFileID,s.signal=mp(n).token}const{restApi:a,reqType:o}=_g("linkCaseAttachment",{caseID:e});return pc(a,{...s,body:{attachments:t},method:o},r)},getCaseAttachments:(e,t,n=!1)=>{const{restApi:r,reqType:s}=_g("getCaseAttachments",{caseID:e,includeThumbnail:n});return pc(r,{method:s},t).then((e=>e.data.attachments))},getAttachmentCategories:(e,t,n)=>{const{restApi:r,reqType:s}=_g("getAttachmentCategories",{caseID:e,type:t});return pc(r,{method:s},n).then((e=>e.data))},downloadAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=_g(gp,{attachmentID:e});return pc(r,{method:s,..."binary"===n&&{responseType:"arraybuffer"}},t)},editAttachment:(e,t,n)=>{const{restApi:r,reqType:s}=_g("editAttachment",{attachmentID:e});return pc(r,{method:s,body:{...t}},n)},deleteAttachment:(e,t)=>{const{restApi:n,reqType:r}=_g("deleteAttachment",{attachmentID:e});return pc(n,{method:r},t)},downloadDocument:(e,t)=>{const{restApi:n,reqType:r}=_g("downloadDocument",{documentID:e});return pc(n,{method:r},t)},deleteDocument:(e,t,n)=>{const{restApi:r,reqType:s}=_g("deleteDocument",{caseID:e,documentID:t});return pc(r,{method:s},n)},getDocumentURL:e=>{const t=PCore.getEnvironmentInfo().getDocumentUrlDP()||"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:Ip,getAttachmentURL:e=>{const{restApi:t}=_g(gp,{attachmentID:e});return t},prepareAttachmentData:e=>{let t=[];if(e&&Object.hasOwn(e,"pyCount")&&e.pyCount>0)t=e?.pxResults?.filter((e=>!!e.pzInsKey)).map((e=>Ip(e)))||[];else if(e&&"object"==typeof e){let n;n=Array.isArray(e)?e:[e],t=n?.filter((e=>e.ID&&e.FileName||e.pzInsKey)).map(Ip)}else t=[];return{hasUploadedFiles:t.length>0,categoryName:e?.pyCategoryName||t?.[0]?.responseProps?.category||"",attachments:t}}};Jt.registerHandler("@ATTACHMENT",((e,t,n)=>{let r;return r=t?t.getValue(e):Ch.getLitePropertyValue(n),Ep.prepareAttachmentData(r)})),Jt.registerHandler("@FL",((e,t)=>t.getLocalizedValue(t.getFieldMetadata(e)?.label))),Jt.registerHandler("@GENAICOACH",((e,t)=>Hp(e,t.getCurrentClassID()))),Jt.registerHandler("@REFRESH",((e,t)=>{const n=t.getCaseInfo().getKey(),r=t.getContextName(),s=t.getPageReference();hl.registerForRefresh("PROP_CHANGE",t.getActionsApi().refreshCaseView.bind(t.getActionsApi(),n,"",s,{autoDetectRefresh:!0,preserveClientChanges:!1,refreshFor:!0}),`${s}${e}`,`${r}/${s}`,r)}));const Ap={},_p={},Sp={},Cp={},Tp={},Np={},Pp={},Dp={},Rp={},bp={},Op=(e={},t={})=>{0!==Object.keys(t).length?Object.keys(e).forEach((n=>{const r=e[n],s=t[n];if(s){const e=Array.isArray(s)?s:[s];(Array.isArray(r)?r:[r]).forEach((t=>{const n=e.findIndex((e=>e.classID===t.classID));if(-1===n)e.push(t);else{const r={isDeclarativeTarget:!1},s={...e[n],...r,...t};e[n]=s}})),t[n]=1===e.length?e[0]:e}else t[n]=r})):Eh.copy(e,t)},vp=(e,t="")=>{if(!e)return null;const n=Cp[e];if(!n)return null;if(!t)return Array.isArray(n)?[...n]:n;let r;return r=Array.isArray(n)?n.find((e=>e.classID.toLowerCase()===t.toLowerCase()))||null:n.classID.toLowerCase()===t.toLowerCase()||("Page"===n.type||"Page List"===n.type)&&n?.pageClass?.toLowerCase()===t.toLowerCase()?n:null,r},xp=(e,t,n,r=[])=>{if(!t||!e)return null;if(!e.includes(".")){let s;const a=vp(e,t);return r.length&&(s=r.join(".")),{...a,embeddedType:n,category:s}}const[s,...a]=e.split("."),o=vp(s,t);return o&&r.push(o.label),xp(a.join("."),o?.pageClass,o?.type,r)},wp=e=>{Op(e,_p)},Mp=e=>{Op(e,Sp)},Lp=e=>{if(e.views&&Op(e.views,_p),e.navigations&&Op(e.navigations,Sp),e.personalizations&&Op(e.personalizations,Np),e.insights&&Op(e.insights,Pp),e.paragraphs&&Op(e.paragraphs,Ap),e.dataTypes&&Op(e.dataTypes,Dp),e.datapages&&Op(e.datapages,Rp),e.genAICoaches&&Op(e.genAICoaches,bp),e.fields){Object.keys(e.fields).forEach((t=>{const n=e.fields[t];if(Array.isArray(n)){if(e.datapages&&n.forEach((t=>{t.datasource&&"DataPage"===t.datasource.tableType&&(t.datasource.mode=e.datapages[t.datasource.name].mode)})),1===n.length){const[r]=n;e.fields[t]=r}}else e.datapages&&n.datasource&&"DataPage"===n.datasource.tableType&&(n.datasource.mode=e.datapages[n.datasource.name].mode)}));const{datapages:t={}}=e;Object.keys(t).forEach((e=>{Tp[e]=t[e]}))}Op(e.fields,Cp)},Up=e=>_p[e],Fp=(e,t)=>{const n=_p[e];return Array.isArray(n)?n.some((e=>e.classID===t)):n?.classID===t},jp=e=>Sp[e],Vp=e=>e in Tp?Tp[e]:null,kp=e=>e in Np?Np[e]:null,$p=e=>e in Pp?Pp[e]:null,Bp=e=>{const t={};return Object.keys(Cp).forEach((n=>{const r=Cp[n];let s;Array.isArray(r)?s=r.find((t=>e===t.classID)):e===r.classID&&(s=r),s&&(t[n]=Eh.deepClone(s))})),t},Gp=(e,t)=>{const n=vp(e,t)?.datasource?.parameters;return n?Eh.deepClone(n):null},Wp=(e,t)=>{let n=null;const r=Ap[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Eh.deepClone(n).content:null},Hp=(e,t)=>{let n=null;const r=bp[e];return r&&(Array.isArray(r)?n=r.find((e=>e.classID===t)):r.classID===t&&(n=r)),n?Eh.deepClone(n):null},qp=e=>{if(e in Dp){const{savableDataPage:t}=Dp[e];return t}return null},zp=e=>{const t=Rp[e];if(!t)return null;const{classID:n,isAlternateKeyStorage:r,parameters:s}=t;if(r)return s.map((e=>({keyName:e.name,isAlternateKeyStorage:r,linkedField:e.linkedField})));const a=Dp[n];return a?a.classKeys.map((e=>({keyName:e,isAlternateKeyStorage:r}))):[]},Yp=e=>{if(e in Dp){const{lookupDataPage:t}=Dp[e];return t}return null},Kp=e=>{if(Object.prototype.hasOwnProperty.call(Dp,e)){const{lookupDataPageInfo:t}=Dp[e];return t}return null},Xp=(e,t)=>{const n=e.split("."),r=n.pop(),s=new Ku({options:{pageReference:`${n.join(".")}`,context:t}}),a=vp(r,s.getCurrentClassID())?.additionalInformation;if(!a?.includes("@PARAGRAPH"))return a;const o=Qt.trimAnnotation(a),i=s.getCurrentClassID(),c=s.getLocaleRuleNameFromKeys(i,j.PARAGRAPH,o),l=up.getParagraphLocaleValue(c,i,o);return l?hp.getParagraphStream(l,s):null},Jp=(e,t)=>{const n=e.split("."),r=n.pop(),s=new Ku({options:{pageReference:`${n.join(".")}`,context:t}}),a=vp(r,s.getCurrentClassID()),o={};return s._classID=s.getCurrentClassID(),s.resolveConfigProps(a,o),o};class Qp{constructor(){this.name="CascadeManager",this.cascadeSubscribers={},this.cascadeResetSubscribers={},this.listChangeSubscribers=[]}registerResetDependencies(e,t,n,r,s,a="singleRecord"){if(!e||!n||!r?.length)return;const o=n.startsWith(".")?`${t}.${n.substring(1)}`:n,i=this.cascadeResetSubscribers[e]||{},c=this._handlePageReference(t,n,s);r.forEach((e=>{if(!e)return;let t=e.startsWith(".")?e.substring(1):e;if(t=Eh.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,r,s){if(!e||!n||!r?.length)return;const a=n.startsWith(".")?`${t}.${n.substring(1)}`:n,o=this.cascadeResetSubscribers[e]||{},i=this._handlePageReference(t,n,s);r.forEach((e=>{if(e){let t=e.startsWith(".")?e.substring(1):e;if(t=Eh.getFullPropertyReference([i,t]),t in o){const e=o[t];Eh.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,r,s){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[s]){a[s]=r;const o=ch(n,t,e);a.previousValue="object"==typeof o?null:o}}))}registerListField(e,t,n,r,s){const a=Qp._getFieldsForList(e,t,n);a.length>0&&(this.registerFields(e,t,a,r,s),ru.enableCascade(e))}unRegisterListField(e,t,n,r){const s=Qp._getFieldsForList(e,t,n);s.length>0&&this.unRegisterFields(e,t,s,r)}static _getFieldsForList(e,t,n){const r=[],s=vp(n,ch("classID",t,e));return s&&s.datasource&&s.datasource.parameters&&Object.values(s.datasource.parameters).forEach((e=>{if(Qt.isProperty(e)){const t=Qt.trimAnnotation(e);r.push(t)}})),r}unRegisterFields(e,t,n,r){this.cascadeSubscribers[e]&&n?.forEach((n=>{if(!this.cascadeSubscribers[e][`${t}${n}`])return;const s=this.cascadeSubscribers[e][`${t}${n}`];s[r]&&delete s[r]}))}triggerCascade(e,t,n,r){let s=!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&&(s=!0,r?r.add(o[a]):o[a](t,n))})),s&&(this.cascadeSubscribers[e][t].previousValue=n))}purgeCascadeFields(e){delete this.cascadeSubscribers[e]}handleServerChanges(e,t=[],n=[]){if(!e)return;const r=new Set;n.forEach((t=>{const n=ch(t,"",e);this.triggerCascade(e,t,n,r)})),r.forEach((e=>{e()})),0!==this.listChangeSubscribers.length&&0!==t.length&&t.forEach((t=>{this.listChangeSubscribers.forEach((n=>{const r=ch(t,"",e);n(e,t,r)}))}))}_getServerProperties(e,t,n,r,s){if("object"!=typeof e){s.push(n.replace(/\.(\d+)/g,"[$1]"));const a=/[a-zA-Z]+\.(\d+)\./g;if(0===this.listChangeSubscribers.length||!a.test(n))return;n=n.replace(/\.(\d+)/g,"[$1]");const o=ch(n,"",t);if(void 0===o&&!e&&0!==e)return;return void(o!==e&&r.push(n))}const a=Object.keys(e??{});for(let o=0,i=a.length;o<i;o+=1){const i=a[o],c=`${n}.${i}`;this._getServerProperties(e[i],t,c,r,s)}}getServerProperties(e,t,n=j.CASE_INFO.CASE_INFO_CONTENT){const r=[],s=[],a=Eh.getIn(e,n);return a&&t?(this._getServerProperties(a,t,n,r,s),{changedListProperty:r,leafProperty:s}):{changedListProperty:r,leafProperty:s}}_handlePageReference(e,t,n){let r=e;if("Page"===n&&t.startsWith(".")&&t.match(/[.]/g).length>1){r=`${e}${t.substring(0,t.lastIndexOf("."))}`}return r}registerForListChanges(e=(()=>{})){this.listChangeSubscribers.push(e)}unRegisterForListChanges(){this.listChangeSubscribers=[]}}const Zp=new Qp;let eh=null;const th=e=>e?.split(/\.(?![^[]+\])|\[|\]/g).filter(Boolean),nh=e=>{eh=e},rh=()=>eh,sh=e=>{if(!e)return;let t=[],n=[];Array.isArray(e)||"MERGE_DATA"!==e.type||({changedListProperty:t,leafProperty:n}=Zp.getServerProperties(e.payload.data,e.payload.context,e.payload.rootPageReference)),rh()?.dispatch(e),Array.isArray(e)||"MERGE_DATA"!==e.type||Zp.handleServerChanges(e.payload.context,t,n)},ah=e=>rh()?.getState().data?.[e],oh=()=>rh()?.getState().data[j.SHARED],ih=(e,t,n)=>{if(!(r=e)||r.startsWith('"')||r.startsWith("'"))return(e=>e&&e.trim().substring(1,e.length-1))(e);var r;const s=e?.startsWith(".")?t+e:e,a=th(s);return Eh.getIn(n,a)},ch=(e,t,n)=>ih(e,t,ah(n)),lh=(e,t,n)=>ih(t,e?`${j.CONTEXT_DATA}.${e}`:`${j.CONTEXT_DATA}`,ah(n)),uh=(e,t,n)=>((e,t,n)=>{const r=th(`${t}.${n}`);return Eh.getIn(e,r)})(ah(n),`${j.CONTEXT_DATA}.${e}`,t),dh=e=>{const{context:t}=e,n=rh()?.getState().data[t];if(n)return de;const{action:r}=e;return["createWork","showHarness","openAssignment","openWorkByHandle","initRouting"].includes(r)?Se:de},ph=(e,t)=>{const n=th(t);return Eh.deleteIn(e,n)},hh=e=>!Array.isArray(e)&&"object"==typeof e,gh=(e,t,n={})=>{const{isArrayDeepMerge:r,propertiesToReplace:s=[]}=n;Array.isArray(e)&&!t&&(t=[]),Array.isArray(s)&&s.length>0&&s.forEach((t=>{Eh.setIn(e,t,{})}));const a=(e,t)=>{if(hh(e)&&null!==t&&"string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)return w()(e,t,a);if(Array.isArray(e)&&null!==t&&Array.isArray(t)){if(r)return w()(e,t,a);{const n=t.length;if(void 0===r&&n===e.length)return w()(e,t,a)}}return""===t&&e&&"object"==typeof e?e:t};return a(e,t)},fh=(e,t,n,r={isArrayDeepMerge:!0})=>{const{isArrayDeepMerge:s}=r,a=th(t);if("object"==typeof n){const t=gh(Eh.getIn(e,a),n,{isArrayDeepMerge:s});return Eh.setIn(e,a,t)}return Eh.setIn(e,a,n)},mh=(e,t,n)=>{const r=th(t);return Eh.setIn(e,r,n)},yh=()=>{const e=Ze,{promise:t,actionMgrID:n}=ln.actionManagerPromise(e);return sh({type:e,payload:{actionMgrID:n}}),t};class Ih{static mergeDeep(e,t){return w()(t,e)}static hasIn(e,t){return D()(e,t)}static getIn(e,t,n){return b()(e,t,n)}static setIn(e,t,n){return v()(e,t,n)}static deleteIn(e,t){return N()(e,t)}static isObjectEmpty(e){return!e||0===Object.entries(e).length}static isEmpty(e){return L()(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||-1===e.indexOf("."))return!1;let t=0;const n=e.length;for(;t<n;t+=1)if(" @#$%=!<>/\\".includes(e[t]))return!1;return!0}static isWhenExist(e){const t=["visibility","disabled","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[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 r=new Set;for(const s in e)t.includes(s)&&"string"==typeof e[s]&&e[s]?.startsWith("@W ")&&(n=Qt.trimAnnotation(e[s]),r.add(n));return"multirecordlist"===e?.type&&"Editable"===e?.renderMode&&Object.keys(e?.allowActions??{}).forEach((t=>{"string"==typeof e?.allowActions[t]&&e.allowActions[t]?.startsWith("@W ")&&(n=Qt.trimAnnotation(e.allowActions[t]),r.add(n))})),[...r]}static isExpressionExist(e){const t=["disabled","visibility","readOnly","required"];let n=!1;for(const r in e)t.includes(r)&&"string"==typeof e[r]&&e[r]?.startsWith("@E ")&&(n=!0);return n}static buildDataObject(e,t){let n={};const r=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 r=t;t.startsWith(".")&&(r=t.substring(1)),n[r]=e[t]})),r}static buildObject=(e,t,n)=>{if(void 0===n)return;const r=e.split(".");let s=0;for(;s<r.length-1;s+=1){const e=r[s];e?.toString().length&&!t[e]&&(t[e]={}),t[e]&&(t=t[e])}"object"==typeof n?(t[r[s]]||(t[r[s]]=Array.isArray(n)?[]:{}),gh(t[r[s]],n,{isArrayDeepMerge:!0})):t[r[s]]=n};static getHashedString(e){return(0,C.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 h()(e,t)}static isContains(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(e[n[r]]&&Ih.isEqual(e[n[r]],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("."):null}static iterateLeafNodes(e,t){const n=(e,r=[])=>{Object.entries(e).forEach((([s,a])=>{r.push(Array.isArray(e)?Number(s):s),Array.isArray(a)?a.forEach(((e,t)=>{r.push(t),n(e,r),r.pop()})):"object"==typeof a?n(a,r):t(r.slice(),a),r.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(){return crypto.randomUUID()}static unflatten(e){const t={};return Object.entries(e).forEach((([e,n])=>{const r=e.split(".");let s;r.reduce(((e,t,a)=>(s=e[t]?e[t]:Number.isNaN(Number(r[a+1]))?r.length-1===a?n:{}:[],e[t]=s,e[t])),t)})),t}static flatten(e,t,n){t||(t=""),Array.isArray(e)?e.forEach(((e,r)=>{Ih.flatten(e,`${t}[${r}]`,n)})):"object"==typeof e&&null!==e?Object.keys(e).forEach((r=>{const s=t?`${t}.${r}`:r;Ih.flatten(e[r],s,n)})):n[t]=e}static buildInstructionPageReference(e,t){const n=`${e}${t}`.replace(j.CASE_INFO.CASE_INFO_CONTENT,"").replace(j.DATA_INFO.DATA_INFO_CONTENT,"");return Vn.formatPageReference(n)}static buildAttachmentsFormData(e){return e.map((e=>{if(e.delete){let t="";return t=e.responseProps.ID?e.responseProps.ID:e.responseProps.pzInsKey,{type:"File",attachmentFieldName:e.label,delete:!0,pzInsKey:t}}return{type:"File",attachmentFieldName:e.label,category:e.category,ID:e.handle,clientFileID:e.ID}}))}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 isString(e){return"string"==typeof e}static rejectPendingActions(e){return e.forEach((e=>e.payload.actionMgrID&&ln.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"]),n=e.indexOf(" "),r=e.substring(0,n);return t.has(r)}static trimDotForProperty(e){return"string"==typeof e&&e.startsWith(".")?e.substring(1):e}static convertObjectWithStringToBoolean(e){if(e&&!Array.isArray(e)&&"object"==typeof e)return Object.keys(e).forEach((t=>{let n;const r=e[t];n="string"==typeof r?"true"===r||"false"!==r&&r:r,e[t]=n})),e}}const Eh=Ih,Ah=j.SUMMARY_OF_LISTS,_h=j.SUMMARY_OF_WHEN_CONDITIONS;class Sh{static updateData(e){Object.keys(e).forEach((t=>{sh(bh({context:t,data:e[t]}))}))}static updateContextData(e){Object.keys(e).forEach((t=>{sh(bh({context:t,data:e[t]}))}))}static resolveWhen(e,t){return!!t.getContextDataValue(`.${_h}.${e}`)}static resolveFieldValue(e,t){return t.getLocalizedValue(e)}static resolveNavigation(e,t){return jp([this.resolveName(e,t)])}static resolveView(e,t,n=""){const r=Up([this.resolveName(e,t)]);let s=[];return Array.isArray(r)&&r.length>0?(t&&(n||(n=t.getValue(j.CLASS_ID)),s=r.filter((e=>e[j.CLASSID]===n))),0===s.length?r[0]:s[0]):r}static resolveName(e,t){return e?.startsWith("param.")?(e=e.substring(6),t.getContextDataValue(`.$parameters.${e}`)):(e?.startsWith("@")&&(e=Qt.handleAnnotation(e,t)),e)}static getContextPath(e,t){return("number"==typeof t||t)&&("number"==typeof(t=Qt.trimAnnotation(t))||"string"==typeof t)?"number"==typeof t&&parseInt(t,10)===t?`${e}[${t}]`:t.startsWith(".")?e+t:`${t}`:e}static getRuleClass(e,t,n){let r;return t?r=t.startsWith(j.CLASS_ANNOTATION)?t.split(j.CLASS_ANNOTATION)[1].trim():this.resolveClassID(t,e.getPageReference(),e.getContextName()):n?.authorContext&&(r=n.ruleClass),r}static resolveReference(e,t){const{type:n}=e;let r;if("reference"===n){const{config:n}=e,s=n?.type,{ref:a,name:o,context:i}=n||{},c=this.getRuleClass(t,i,n);return"navigation"===s?r=this.resolveNavigation(a||o,t):"view"===s?r=this.resolveView(a||o,t,c||""):"widget"===s&&(r={type:"Widget",config:{name:o,ruleClass:c}}),r}return e}static resolvePropertyReference(e,t,n){return ch(t,e,n)}static getProperty(e,t,n){let r=this.resolvePropertyReference(t,e,n);if(null==r||0===r.length){const s=uh(`${t}.${Ah}`,e,n);s&&(r=this.resolvePropertyReference(t,s,n))}return r}static getPropertyValue(e,t,n){return e=Qt.trimAnnotation(e),this.getProperty(e,t,n)}static getReferencedUser(e,t){const n=Sh.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:r,hasSuggestions:s,pageReference:a,context:o}=e;let i=t||r;return n?(i=i?.startsWith?.(".")?i.substring(1):i,i?.split?.(".").reduce(((e,t)=>e?.[t]??void 0),n)):s?Sh.getPropertyValue(i,a,`${o}/${j.SUGGESTION}`):Sh.getPropertyValue(i,a,o)}static _handlePropString(e,t,n,r,s){n.startsWith("@")?e[t]=Qt.handleAnnotation(n,r,s):e[t]=n}static _resolveProps(e,t,n){e&&Object.keys(e).forEach((r=>{const s=e[r];"string"==typeof s?this._handlePropString(e,r,s,t,n):Array.isArray(s)?s.forEach((r=>{this._resolveProps("object"==typeof r?r:e[r],t,n)})):"object"==typeof s&&this._resolveProps(e[r],t,n)}))}static resolveProps(e,t,n){return e&&t?(Eh.mergeDeep(e,t),this._resolveProps(t,n,void 0),t):t}static resolveContextTreeNodeProps(e){const t={};return e?(Eh.mergeDeep(e,t),this._resolveProps(t,void 0,e),Eh.resolveStringBooleans(t)):t}static resolveClassID(e,t,n){const r=Qt.trimAnnotation(e);let s;for(s=r.startsWith(".")?`${t}${r}`:`${r}`;s;){const e=ch(j.CLASS_ID,s,n);if(e)return e;s=s.substring(0,s.lastIndexOf("."))}return null}}const Ch=Sh;const Th=new class{constructor(){this.actionHandlers={}}getHandler(e){return this.actionHandlers[e]}registerHandler(e,t){this.actionHandlers[e]=t}};const Nh=class{static#u=[];static#d=!1;static getActionHandlers=(e,t,n)=>{const r=[];return{mouseenter:"hover",change:"onChange",blur:"onBlur"}[n]!==t||e.forEach((e=>{const t=Th.getHandler(e.action),{config:n}=e;r.push({handler:t,config:n})})),r};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#p=(e,t,n)=>{for(let r=0;r<e.length;r+=1){const s=e[r],a={actionHandler:s.handler,component:t,eventType:n,config:s.config};this.#u.push(a)}};static buildActionObject=(e,t)=>{const n={...e};return n.context="Browser"===cp.getRuntime()?t.getContextName():n.context,n.pageReference=t.getPageReference(),n.actionMgrID=ln.getNextActionMgrId(),n};static#h=e=>{const t=e.actionHandler,n=e.component,{config:r}=e,s={};Ch.resolveProps(r,s,n),t&&(t(e.eventType,s,n),this.#g())};static#g=()=>{if(!this.#d){if(0===this.#u.length)return;const e=this.#u.shift();this.#h(e),e.config&&"true"===e.config.parallel&&this.#u.length>0&&this.#g()}};static#f=()=>{this.#g()};static#m=(e,t,n)=>{this.#p(e,t,n),this.#f()};static getFullRef=e=>{const t=e.getPageReference(),n=e.getComponentConfig().value;return Ch.getContextPath(t,n)};static#y(e,t){const n=e.getComponentConfig().behaviours||[];for(let r=0;r<n.length;r+=1){const{behaviour:s,actions:a}=n[r];if(a){const n=this.getActionHandlers(a,s,t);n&&n.length>0&&this.#m(n,e,t)}}}static changeHandler=(e,t)=>{const n=e.getStateProps().value,r=e.getContextName();qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:n,pageReference:e.getPageReference(),context:r});if(("Browser"===cp.getRuntime()?t?.nativeEvent instanceof Event||t instanceof Event:!!t?.nativeEvent)||null!==t.value&&void 0===t.prop){let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const s=void 0===n?t.value:"value"in n?n.value:n.innerText,a=this.getFullRef(e);sh({type:Q,payload:{reference:a,value:s,context:r}}),void 0!==n&&this.isEditable(n)&&!this.isNonKeyInput(n)||sh({type:ee,payload:{reference:a,pageReference:e.getPageReference(),value:s,context:r,propertyName:e.getComponentConfig().value,classID:e.getValue(j.CLASS_ID)}})}else{const n=e.getPageReference(),s=e.getStateProps();for(const e of Object.keys(t)){const a=s[e],o=t[e];sh({type:Q,payload:{reference:Ch.getContextPath(n,a),value:o,context:r}}),sh({type:ee,payload:{reference:Ch.getContextPath(n,a),value:o,context:r}})}}};static blurHandler=(e,t)=>{let{target:n}=t;null===n&&t&&t.auxiliaryTarget&&(n=t.auxiliaryTarget);const{value:r,validationValue:s}=n,a=this.getFullRef(e),o=e.getContextName();n.clearMessages&&qn({type:F.MESSAGES.MESSAGES_TYPE_ERROR,property:e.getStateProps().value,pageReference:e.getPageReference(),context:o}),this.isEditable(n)&&(e.getValidationApi().validate("validationValue"in n?s:r),e.isInsideList()&&e.getListActions().updateProperty(e.getStateProps().value,r),!this.isNonKeyInput(n)&&sh({type:ee,payload:{reference:a,pageReference:e.getPageReference(),value:r,context:o,propertyName:e.getComponentConfig().value,classID:e.getValue(j.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.#y(e,n)};static pause=()=>{this.#d=!0};static resume=()=>{this.#d=!1,this.#g()};static isQueueEmpty=()=>0===this.#u.length;static clearQueue=()=>{this.#u=[]};static getActionsQueue=()=>this.#u;static EVENTS_MAP={click:"onClick",change:"onChange",hover:"onMouseEnter",blur:"onBlur"}},Ph="CREATE_WORK",Dh=e=>({type:Ph,payload:e});const Rh=(e,t,n,r="")=>{const s=[];Object.keys(e).forEach((a=>{"object"==typeof e[a]&&a.includes("[")?function(e,t,n,r,s,a){const o=r.substring(0,r.indexOf("[")),i=r.substring(r.indexOf("[")+1,r.indexOf("]"));Array.isArray(t[o])&&(t[o]?.splice(+i,1,e[r]),a.push(o),n.add(`${s}.${r}`))}(e,t,n,a,r,s):e[a]&&"object"==typeof e[a]?(t[a]||(t[a]=Array.isArray(e[a])?[]:{}),Rh(e[a],t[a],n,`${r}.${a}`)):t[a]=e[a]})),function(e,t,n){Object.keys(e).forEach((r=>{(Array.isArray(e[r])&&!n.includes(r)||!Array.isArray(e[r])&&!Object.hasOwn(t,r))&&delete e[r]}))}(t,e,s)},bh=(e,t={})=>{const{serverPrecedenceFields:n=[],propertiesToReplace:r=[]}=t,{context:s,data:a,isArrayDeepMerge:o,preserveClientChanges:i=!1}=e,c=Al(s,!0);((e,t={})=>{const n=Kc.buildClientChangeList(e)||{};Object.keys(n).forEach((e=>{Eh.buildObject(e,t,n[e])}))})(s,c);const l=ah(s);let u={};if(l&&a){u=JSON.parse(JSON.stringify(l));const e=JSON.parse(JSON.stringify(a)),t=new Set;Rh(c,u,t),((e,t,n)=>{const r=new Set;e.forEach((e=>{e=Eh.trimDotForProperty(e);const[s,a,o]=gn(e);s&&a&&o&&!r.has(`${s}.${a}`)&&((Eh.getIn(n,`${s}.${a}`)||[]).forEach(((e,n)=>{n!==+o&&Eh.setIn(t,`${s}.${a}[${n}]`,e)})),r.add(`${s}.${a}`))}))})(t,u,e)}!function(e,t){const n=Eh.getIn(e,j.REFERENCED_USERS);let r;if(void 0!==n){if(!Array.isArray(n)&&"object"==typeof n)return r=Eh.getIn(t,j.REFERENCED_USERS,{}),void Eh.setIn(e,j.REFERENCED_USERS,{...r,...n});r=Eh.getIn(t,j.REFERENCED_USERS,[]);const s=new Map;for(const e of[...r,...n])if(s.has(e.UserID)){const t=s.get(e.UserID);s.set(e.UserID,{...t,...e})}else s.set(e.UserID,e);n.length=0;for(const e of s.values())n.push(e)}}(a,l);const d={caseInfo:{content:{...u?.caseInfo?.content}}};let p=a;return i?(n.forEach((e=>{Eh.deleteIn(d,`caseInfo.content.${e}`)})),p=gh(a,d,{isArrayDeepMerge:!o})):((e,t)=>{const n=fl[e]||{};Object.keys(n).forEach((e=>{Eh.hasIn(t,e)&&(n[e].value=Eh.getIn(t,e))}))})(s,a),{type:fe,payload:{...e,data:p,...r.length>0?{propertiesToReplace:r}:null}}},Oh=e=>({type:"SHOW_HARNESS",payload:e}),vh=e=>({type:te,payload:e}),xh=e=>({type:ne,payload:e}),wh=e=>({type:"ADD_WORK",payload:e}),Mh=e=>({type:ue,payload:e}),Lh=e=>({type:Ae,payload:e}),Uh=e=>({type:_e,payload:e}),Fh=e=>({type:Se,payload:e}),jh=e=>({type:Te,payload:e}),Vh=e=>({type:Ne,payload:e}),kh=e=>({type:Re,payload:e}),$h=e=>({type:Oe,payload:e}),Bh=e=>({type:be,payload:e}),Gh=e=>{const{containerItemID:t}=e;return e.suggestionContexts=Ad(t),{type:xe,payload:e}},Wh=e=>{const{context:t}=e;return{type:oe,payload:{context:t}}},Hh=e=>{const{context:t}=e;return{type:ie,payload:{context:t}}},qh=e=>({type:we,payload:e}),zh=e=>({type:ve,payload:e}),Yh=e=>({type:Je,payload:e}),Kh=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=fd(n)),e.context=r,e.deleteContext=!Md(n),e.childContainers=Id(n),e.childContainersContexts=Ed(n),e.transientItems=Ld([...e.childContainersContexts,n]),e.suggestionContexts=Ad(n),n===t&&(e.caseID=ch(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ch(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Ce,payload:e}},Xh=e=>{const{containerItemID:t}=e;return e.transientItems=Ld([...Ed(t),t]),{type:De,payload:e}},Jh=e=>{const{transientItemID:t}=e;return e.transientItems=[t],{type:Pe,payload:e}},Qh=e=>{const{context:t,containerItemID:n}=e;let r=t;return r||(r=fd(n)),e.context=r,e.childContainers=Id(n),e.childContainersContexts=Ed(n),e.transientItems=Ld([...e.childContainersContexts,n]),e.suggestionContexts=Ad(n),n===t&&(e.caseID=ch(j.CASE_INFO.CASE_INFO_ID,"",t),e.RemoteSystemID=ch(j.CASE_INFO.REMOTESYSTEMID,"",t)),{type:Me,payload:e}},Zh=e=>({type:pe,payload:e}),eg=e=>({type:ge,payload:e}),tg=e=>({type:Ie,payload:e}),ng=(e,...t)=>(Nh.resume(),e(...t)),rg=(e,t,n,r,s)=>({type:Ee,payload:{msg:e,err:t,context:n,formFields:r,actionMgrID:s}}),sg=e=>({type:tt,payload:e}),ag=e=>({type:nt,payload:e}),og=e=>({type:rt,payload:e}),ig=e=>({type:"SHOW_CASE_PREVIEW",payload:e}),cg=e=>({type:ce,payload:e}),lg=e=>({type:Q,payload:e}),ug="add",dg="replace",pg=["portal","noPortal","preview","debug","devtool"];let hg="",gg="Home",fg="",mg=!0;const yg=e=>(mg=e,mg),Ig=()=>mg,Eg=(e,t,n)=>ip.getSemanticURL(e,t,n),Ag=(e,t)=>ip.getRestEndPoint(e,t),_g=(e,t)=>{let n=E();const r=Ag(e,t);return r?(r.restApi?.startsWith("/")||(r.restApi=`/${r.restApi}`),n?.endsWith("/")&&(n=n.substring(0,n.length-1)),r.restApi=n+r.restApi,r):{}},Sg=(e,t,n)=>{const{root:r,resources:s}=e,{views:a}=s,{config:o}=r,i=ug;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(ep);if(l){const e=Eh.getIn(t,o.context);c=c.replace(l[0],e.pyID)}return c.startsWith("/")&&(c=c.substring(1,c.length)),{pxURLPath:c,historyAction:i}},Cg=(e,t,n)=>{let r,s;r=np(t)?`${e}/${t}`:e;const a=np(n.pxURLPath);a&&(r=`${r}/${a}`);try{s=new URL(r).searchParams,r=r.includes("?")?r.split("?")[0]:r}catch(e){return console.log("Invalid url",e),""}const o=r.split("/"),i=o[o.length-1],c=new URLSearchParams(window.location.search);if(i.toLowerCase()!==gg.toLowerCase()||c.has("noPortal")||(r=`${e}/${t}`),!ip.isDefaultPortal()){const e=ip.getPortalName();c.has("portal")?c.set("portal",e):c.append("portal",e)}return s=((e,t)=>{for(const[n,r]of t.entries())!e.has(n)&&pg.includes(n)&&e.append(n,r);return e})(s,c),s.toString()&&(r+=`?${s.toString()}`),r},Tg=(e,{urlPathObjParam:t,infoParam:n,optionsParam:r},s=!1)=>{let a,o,i;if(!1===window.PCore.getBehaviorOverride("dynamicSemanticUrl"))return;if(s)a=t,o=n,i=r;else{const{uiResources:n,data:r}=e;({options:i}=e),a=t&&t.pxURLPath&&tp(t.pxURLPath)?Sg(n,r,t.pxURLPath):t||Sg(n,r),o=ip.getEndPointInfo(a.pxURLPath),a.pxURLPath=o.urlPath}const c=Cg(hg,ip.getApplicationPath(),a),{title:l}=((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:ip.getApplicationName()),n===`${hg}/${t}/`)return{title:e};const r=new URL(n).pathname.replace(`${t}/`,""),s=r.split("/");return/\d/.test(r)?{title:`${e} - ${s[s.length-1]}`}:{title:`${e} - ${s[0]}`}})(fg,ip.getApplicationPath(),c),u=((e,t)=>(void 0!==e&&(e.options=t),{stateObj:e}))(o,{...i,title:l});a.historyAction===ug?((e,t,n)=>{try{window.history.pushState(e,t,n),window.scrollTo(0,0)}catch(e){throw new Error("Error- Unable to Add to Browser History")}})(u,l,c):a.historyAction===dg&&((e,t,n)=>{try{window.history.replaceState(e,t,n)}catch(e){throw new Error("Error- Unable to Replace Browser History")}})(u,l,c)},Ng=e=>{let t=null;e.directUrlUpdation&&(t={historyAction:ug,pxURLPath:""},t.pxURLPath=e.semanticURL),Tg(e,{urlPathObjParam:t,infoParam:null,optionsParam:null},!1)},Pg=e=>{Ng(e)},Dg=e=>{const t={pxURLPath:e};return Cg(hg,ip.getApplicationPath(),t)},Rg=e=>{const{uiResources:t}=e;Ig()&&(e.directUrlUpdation||(e=>{if(e&&e.root){const{root:t}=e,{resources:n}=e,{views:r}=n,s=t.config,a=s.type,o=s.name;if("VIEW"===a.toUpperCase()){const e=r[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))&&Ng(e)},bg=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},Og=(e,t,n)=>{const{caseClassName:r,workID:s}=e.payload,{containerName:a,context:o}=t,{RemoteClassGroup:i,RemoteSystemID:c,name:u}=$.getRemoteCase(r),d={...e,headers:{RemoteSystemID:c},className:r,isTraditionalRemoteCase:!0,action:ft,viewName:V,gadgetId:Sc.getUniqueGadgetId(),context:n??o,skipSemanticUrl:!0,insKey:`${i?.toUpperCase()} ${s}`,containerName:a,name:u};sh(l.showPage(d))},vg=e=>{const t=(e=>e.state?e.state.stateObj:null)(e);t&&($.isTraditionalRemoteCase(t.payload?.caseClassName)?Og({...t},t.options):sh(l.showHistory(bg(t))))},xg=()=>ip.getApplicationPath()!==sp(),wg=e=>{const{acName:t,context:n,defaultViewLabel:r}=e,s=(e=>{const t=ip.getRoutingInfo(),n=e.split(" ").join(""),r=e.split(" ").join("-").toLowerCase(),s=(e=>{const t=e.replace(/(?=[A-Z][a-z])/g,"-").toLowerCase();return t.startsWith("-")?t.substring(1):t})(e);return t?.routes[n]?n:t?.routes[r]?r:t?.routes[s]?s:e})(r);(e=>{gg=e})(s),ip.setDefaultRoute(s);const a=H(t,n),o=mt(t,n),i="true"===cp.getIsExtraCallRequiredForDefaultHome(),c={historyAction:dg,pxURLPath:""};let u;const d={acName:o,context:a,actionConfig:{context:a}};if(i||!i&&xg()){const t=(e=>{if(e.indexOf("?")>0){const[t,n]=e.split("?"),r=new URLSearchParams(n),s=new Map;for(const[e,t]of r)"portal"!==e&&"noPortal"!==e&&"debug"!==e&&s.set(e,t);const a=new URLSearchParams(s).toString();return a?`${t}?${a}`:t}return e})(np(window.location.pathname+window.location.search));u=ip.getEndPointInfo(t),c.pxURLPath=u.urlPath,void 0!==u.payload?.pageClass&&(u.payload.pageClass=rh()?.getState()?.data?.app?.pyPortal?.classID);const n="showHistory",r={routeEndpoint:u.routeEndpoint,requestType:u.requestType,payload:u.payload,options:d,routeKey:u.routeKey};$.isTraditionalRemoteCase(u?.payload?.caseClassName)?Og(r,e,d.context):sh(l[n](bg(r)))}else u=ip.getEndPointInfo(gg),c.pxURLPath="";Tg(null,{urlPathObjParam:c,infoParam:u,optionsParam:d},!0)},Mg=(e,t=!1)=>{var n;hg=e.domain,!1===t&&Ig()&&(n=vg,window.addEventListener("popstate",(e=>n(e))),window.onbeforeunload=()=>null),ip.init(e,gg)},Lg=e=>{(e=>{window.document.title=e})(e)};function Ug(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 Fg=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),jg=()=>Math.random().toString(36).substring(7).split("").join("."),Vg={INIT:`@@redux/INIT${jg()}`,REPLACE:`@@redux/REPLACE${jg()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${jg()}`};function kg(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 $g(e,t,n){if("function"!=typeof e)throw new Error(Ug(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ug(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ug(1));return n($g)(e,t)}let r=e,s=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(Ug(3));return s}function d(e){if("function"!=typeof e)throw new Error(Ug(4));if(c)throw new Error(Ug(5));let t=!0;l();const n=i++;return o.set(n,e),function(){if(t){if(c)throw new Error(Ug(6));t=!1,l(),o.delete(n),a=null}}}function p(e){if(!kg(e))throw new Error(Ug(7));if(void 0===e.type)throw new Error(Ug(8));if("string"!=typeof e.type)throw new Error(Ug(17));if(c)throw new Error(Ug(9));try{c=!0,s=r(s,e)}finally{c=!1}return(a=o).forEach((e=>{e()})),e}p({type:Vg.INIT});return{dispatch:p,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Ug(10));r=e,p({type:Vg.REPLACE})},[Fg]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(Ug(11));function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[Fg](){return this}}}}}function Bg(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const s=t[r];0,"function"==typeof e[s]&&(n[s]=e[s])}const r=Object.keys(n);let s;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:Vg.INIT}))throw new Error(Ug(12));if(void 0===n(void 0,{type:Vg.PROBE_UNKNOWN_ACTION()}))throw new Error(Ug(13))}))}(n)}catch(e){s=e}return function(e={},t){if(s)throw s;let a=!1;const o={};for(let s=0;s<r.length;s++){const i=r[s],c=n[i],l=e[i],u=c(l,t);if(void 0===u){t&&t.type;throw new Error(Ug(14))}o[i]=u,a=a||u!==l}return a=a||r.length!==Object.keys(e).length,a?o:e}}function Gg(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}var Wg=function(e){function t(t,n){return e.call(this)||this}return Uo(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(Xo),Hg={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var s=Hg.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,$o([e,t],ko(n))):setInterval.apply(void 0,$o([e,t],ko(n)))},clearInterval:function(e){var t=Hg.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},qg=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return Uo(t,e),t.prototype.schedule=function(e,t){var n;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),Hg.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&&Hg.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,r=!1;try{this.work(e)}catch(e){r=!0,n=e||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ko(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(Wg),zg=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return Uo(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.flush(this),0)},t}(qg),Yg={now:function(){return(Yg.delegate||Date).now()},delegate:void 0},Kg=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=Yg.now,e}(),Xg=function(e){function t(t,n){void 0===n&&(n=Kg.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return Uo(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}(Kg),Jg=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uo(t,e),t}(Xg))(zg),Qg=wo((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Zg=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 Uo(t,e),t.prototype.lift=function(e){var t=new ef(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Qg},t.prototype.next=function(e){var t=this;ii((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=Vo(t.currentObservers),a=s.next();!a.done;a=s.next()){a.value.next(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;ii((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;ii((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,r=n.hasError,s=n.isStopped,a=n.observers;return r||s?Jo:(this.currentObservers=null,a.push(e),new Xo((function(){t.currentObservers=null,Ko(a,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,s=t.isStopped;n?e.error(r):s&&e.complete()},t.prototype.asObservable=function(){var e=new Ei;return e.source=this,e},t.create=function(e,t){return new ef(e,t)},t}(Ei),ef=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return Uo(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:Jo},t}(Zg),tf=function(e,t){return tf=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])},tf(e,t)};Object.create;Object.create;var nf=function(e){function t(t,n){var r=e.call(this,(function(e){var t=r.__notifier.subscribe(e);return t&&!t.closed&&e.next(r.value),t}))||this;return r.__notifier=new Zg,r.value=n,t.subscribe((function(e){e!==r.value&&(r.value=e,r.__notifier.next(e))})),r}return function(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}tf(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Ei);var rf=s(923),sf=Symbol.for("immer-nothing"),af=Symbol.for("immer-draftable"),of=Symbol.for("immer-state");function cf(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var lf=Object.getPrototypeOf;function uf(e){return!!e&&!!e[of]}function df(e){return!!e&&(hf(e)||Array.isArray(e)||!!e[af]||!!e.constructor?.[af]||If(e)||Ef(e))}var pf=Object.prototype.constructor.toString();function hf(e){if(!e||"object"!=typeof e)return!1;const t=lf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===pf}function gf(e,t){0===ff(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,r)=>t(r,n,e)))}function ff(e){const t=e[of];return t?t.type_:Array.isArray(e)?1:If(e)?2:Ef(e)?3:0}function mf(e,t){return 2===ff(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function yf(e,t,n){const r=ff(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function If(e){return e instanceof Map}function Ef(e){return e instanceof Set}function Af(e){return e.copy_||e.base_}function _f(e,t){if(If(e))return new Map(e);if(Ef(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=hf(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[of];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const s=n[r],a=t[s];!1===a.writable&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(t[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(lf(e),t)}{const t=lf(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function Sf(e,t=!1){return Tf(e)||uf(e)||!df(e)||(ff(e)>1&&(e.set=e.add=e.clear=e.delete=Cf),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>Sf(t,!0)))),e}function Cf(){cf(2)}function Tf(e){return Object.isFrozen(e)}var Nf,Pf={};function Df(e){const t=Pf[e];return t||cf(0),t}function Rf(){return Nf}function bf(e,t){t&&(Df("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Of(e){vf(e),e.drafts_.forEach(wf),e.drafts_=null}function vf(e){e===Nf&&(Nf=e.parent_)}function xf(e){return Nf={drafts_:[],parent_:Nf,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wf(e){const t=e[of];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function Mf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[of].modified_&&(Of(t),cf(4)),df(e)&&(e=Lf(t,e),t.parent_||Ff(t,e)),t.patches_&&Df("Patches").generateReplacementPatches_(n[of].base_,e,t.patches_,t.inversePatches_)):e=Lf(t,n,[]),Of(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sf?e:void 0}function Lf(e,t,n){if(Tf(t))return t;const r=t[of];if(!r)return gf(t,((s,a)=>Uf(e,r,t,s,a,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Ff(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let s=t,a=!1;3===r.type_&&(s=new Set(t),t.clear(),a=!0),gf(s,((s,o)=>Uf(e,r,t,s,o,n,a))),Ff(e,t,!1),n&&e.patches_&&Df("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Uf(e,t,n,r,s,a,o){if(uf(s)){const o=Lf(e,s,a&&t&&3!==t.type_&&!mf(t.assigned_,r)?a.concat(r):void 0);if(yf(n,r,o),!uf(o))return;e.canAutoFreeze_=!1}else o&&n.add(s);if(df(s)&&!Tf(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Lf(e,s),t&&t.scope_.parent_||"symbol"==typeof r||!Object.prototype.propertyIsEnumerable.call(n,r)||Ff(e,s)}}function Ff(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Sf(t,n)}var jf={get(e,t){if(t===of)return e;const n=Af(e);if(!mf(n,t))return function(e,t,n){const r=$f(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!df(r)?r:r===kf(e.base_,t)?(Gf(e),e.copy_[t]=Wf(r,e)):r},has:(e,t)=>t in Af(e),ownKeys:e=>Reflect.ownKeys(Af(e)),set(e,t,n){const r=$f(Af(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=kf(Af(e),t),o=r?.[of];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((s=n)===(a=r)?0!==s||1/s==1/a:s!=s&&a!=a)&&(void 0!==n||mf(e.base_,t)))return!0;Gf(e),Bf(e)}var s,a;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==kf(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Gf(e),Bf(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Af(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){cf(11)},getPrototypeOf:e=>lf(e.base_),setPrototypeOf(){cf(12)}},Vf={};function kf(e,t){const n=e[of];return(n?Af(n):e)[t]}function $f(e,t){if(!(t in e))return;let n=lf(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=lf(n)}}function Bf(e){e.modified_||(e.modified_=!0,e.parent_&&Bf(e.parent_))}function Gf(e){e.copy_||(e.copy_=_f(e.base_,e.scope_.immer_.useStrictShallowCopy_))}gf(jf,((e,t)=>{Vf[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Vf.deleteProperty=function(e,t){return Vf.set.call(this,e,t,void 0)},Vf.set=function(e,t,n){return jf.set.call(this,e[0],t,n,e[0])};function Wf(e,t){const n=If(e)?Df("MapSet").proxyMap_(e,t):Ef(e)?Df("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Rf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=jf;n&&(s=[r],a=Vf);const{revoke:o,proxy:i}=Proxy.revocable(s,a);return r.draft_=i,r.revoke_=o,i}(e,t);return(t?t.scope_:Rf()).drafts_.push(n),n}function Hf(e){if(!df(e)||Tf(e))return e;const t=e[of];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=_f(e,t.scope_.immer_.useStrictShallowCopy_)}else n=_f(e,!0);return gf(n,((e,t)=>{yf(n,e,Hf(t))})),t&&(t.finalized_=!1),n}var qf=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...s){return r.produce(e,(e=>t.call(this,e,...s)))}}let r;if("function"!=typeof t&&cf(6),void 0!==n&&"function"!=typeof n&&cf(7),df(e)){const s=xf(this),a=Wf(e,void 0);let o=!0;try{r=t(a),o=!1}finally{o?Of(s):vf(s)}return bf(s,n),Mf(r,s)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===sf&&(r=void 0),this.autoFreeze_&&Sf(r,!0),n){const t=[],s=[];Df("Patches").generateReplacementPatches_(e,r,t,s),n(t,s)}return r}cf(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){df(e)||cf(8),uf(e)&&(e=function(e){uf(e)||cf(10);return Hf(e)}(e));const t=xf(this),n=Wf(e,void 0);return n[of].isManual_=!0,vf(t),n}finishDraft(e,t){const n=e&&e[of];n&&n.isManual_||cf(9);const{scope_:r}=n;return bf(r,t),Mf(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Df("Patches").applyPatches_;return uf(e)?r(e,t):this.produce(e,(e=>r(e,t)))}},zf=qf.produce;qf.produceWithPatches.bind(qf),qf.setAutoFreeze.bind(qf),qf.setUseStrictShallowCopy.bind(qf),qf.applyPatches.bind(qf),qf.createDraft.bind(qf),qf.finishDraft.bind(qf);const Yf=(e,t)=>{const{data:{shared:n={}}={},context:r}=t;((e,t)=>{fu.updateDataPageStore(t),Object.keys(t).forEach((n=>{Eh.getIn(e,[j.SHARED,n])?Object.keys(t[n]).forEach((r=>{Eh.setIn(e,[j.SHARED,n,r],t[n][r])})):Eh.setIn(e,[j.SHARED,n],t[n])}))})(e,n),r&&Eh.deleteIn(e,[r,"shared"])},Kf=(e,t,n=!1)=>{const{context:r,caseViewMode:s=(n?void 0:j.PERFORM_MODE),containerName:a}=t;a!==td.WORKAREA&&s&&Eh.setIn(e,[r,"context_data","caseViewMode"],s)},Xf=(e,t)=>{const{context:n}=t;Eh.setIn(e,[n,"context_data","actionType"],t.actionType),Eh.setIn(e,[n,"context_data","assignmentID"],t.assignmentID)},Jf=(e,t=[])=>{t.forEach((t=>Eh.deleteIn(e,t)))},Qf=(e,t=[])=>{t.forEach((t=>Eh.deleteIn(e,t)))},Zf=(e,t=[])=>{t.forEach((t=>{Eh.deleteIn(e,t)}))},em=(e,t,n={})=>{const{deleteAssignmentSpecificResources:r=!0,doDeleteConfirmationDetails:s=!0}=n;Eh.deleteIn(e,[t,"nextAssignmentInfo"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableActions"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"availableProcesses"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"activeActionID"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"assignments"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"childCases"]),s&&(Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"confirmationLinks"]),Eh.deleteIn(e,[t,"caseMessages"])),r&&(Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"actionButtons"]),Eh.deleteIn(e,[t,j.CASE_INFO.CASE_INFO,"navigation"]))},tm=(e,t)=>zf(e||{},(e=>{switch(t.type){case Se:{if(!t.payload.data||e[t.payload.context])return e;t.payload.doDeleteCaseSummary&&em(e,t.payload.context);const{target:n}=t.payload;return!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=t.payload.data:e[t.payload.context]=t.payload.data,Kf(e,t.payload),Xf(e,t.payload),Yf(e,t.payload),((e,t)=>{const{context:n}=t;Eh.deleteIn(e,[n,"context_data","blocking_action_counter"]),Eh.deleteIn(e,[n,"context_data","deferred_action_queue"])})(e,t.payload),e}case xe:{t.payload.doDeleteCaseSummary&&em(e,t.payload.context,{deleteAssignmentSpecificResources:t.payload.deleteAssignmentSpecificResources});const{target:n,propertiesToReplace:r=[]}=t.payload;return!n||-1===n.indexOf(j.WORKAREA)&&-1===n.indexOf(j.MODAL)?e[t.payload.containerItemID]=gh(e[t.payload.containerItemID],t.payload.data,{propertiesToReplace:[...r]}):e[t.payload.context]=gh(e[t.payload.context],t.payload.data,{propertiesToReplace:[...r]}),(t.payload.actionType||t.payload.assignmentID)&&Xf(e,t.payload),Kf(e,t.payload),Yf(e,t.payload),Qf(e,t.payload.suggestionContexts),e}case Ce:{const{childContainersContexts:n=[]}=t.payload;return((e,t)=>{const{containerItemID:n,context:r,deleteContext:s}=t;s&&Eh.deleteIn(e,[r]),Eh.deleteIn(e,[n])})(e,t.payload),Zf(e,n),Jf(e,t.payload.transientItems),Qf(e,t.payload.suggestionContexts),e}case _e:{const{containerItems:n}=t.payload;return Array.isArray(n)?n.forEach((t=>{Eh.deleteIn(e,[t])})):Eh.deleteIn(e,[n]),e}case we:{const{context:n,contextToBeRemoved:r,data:s,childContainersContextsToBeRemoved:a}=t.payload;return em(e,t.payload.context),Kf(e,t.payload),e[n]=gh(e[n],e[r]),e[n]=gh(e[n],s),Eh.deleteIn(e,[r]),Zf(e,a),Yf(e,t.payload),e}case Me:{const{payload:{context:n,pulseReplace:r=!0,childContainersContexts:s=[]}}=t;let{payload:{data:a}}=t;const o=Eh.getIn(e[n],"pulse");let i=Eh.getIn(e[n],"OperatorID"),c=Eh.getIn(e[n],"pxRequestor");return c&&a.pxRequestor&&(c=Eh.mergeDeep(c,a.pxRequestor)),i&&a.OperatorID&&(i=Eh.mergeDeep(i,a.OperatorID)),!r&&o&&(a=fh(a,"pulse",o),a=fh(a,"OperatorID",i),a=fh(a,"pxRequestor",c)),Eh.setIn(e,n,a),Kf(e,t.payload),Yf(e,t.payload),Zf(e,s),Jf(e,t.payload.transientItems),Qf(e,t.payload.suggestionContexts),e}case st:{const{context:n,doDeleteConfirmationDetails:r=!0}=t.payload;return em(e,n,{doDeleteConfirmationDetails:r}),e}case Te:{const{transientItemID:n,data:r}=t.payload;return Eh.setIn(e,n,r)}case Pe:case De:{const{transientItems:n}=t.payload;return n.forEach((t=>Eh.deleteIn(e,t))),e}case Ne:case Re:{const{transientItemID:n,data:r}=t.payload;return gh(Eh.getIn(e,n),r),e}case be:{const{transientItemID:n,data:r}=t.payload;for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&Eh.deleteIn(e,[n,t]);return e}case Oe:{const{transientItemID:n,data:r}=t.payload;return Eh.deleteIn(e,n),Eh.setIn(e,n,r)}case ce:{const{key:n,value:r}=t.payload;return Eh.setIn(e,`${j.SHARED}.${n}`,r),e}case Fe:{const{context:n,data:r}=t.payload;return Eh.setIn(e,n,r)}default:return e}})),nm=(e,t)=>zf(e,(e=>{switch(t.type){case fe:{const{propertiesToReplace:n=[]}=t.payload;return e[t.payload.context]=gh(e[t.payload.context],t.payload.data,{isArrayDeepMerge:t.payload.isArrayDeepMerge,propertiesToReplace:[...n]}),Kf(e,t.payload,!0),Yf(e,t.payload),e}case Q:{const{context:n,reference:r,value:s,isArrayDeepMerge:a}=t.payload;return fh(e[n],r,s,{isArrayDeepMerge:a}),e}case Z:{const{context:n,reference:r,value:s}=t.payload;return mh(e[n],r,s),e}case me:return ph(e[t.payload.context],t.payload.reference),e;case oe:return Eh.setIn(e[t.payload.context],"context_data.isLoading",!0),e;case ie:return Eh.setIn(e[t.payload.context],"context_data.isLoading",!1),e;case tt:{const{data:n}=t.payload;return Yf(e,{data:{shared:n}}),e}case nt:{const{dataPagesToBeRemoved:n=[]}=t.payload;return n.forEach((t=>{const{dataPageName:n,dataPageNameWithHash:r}=t;Eh.deleteIn(e.shared,[n,r]);const s=Eh.getIn(e.shared,[n]);s&&0===Object.keys(s).length&&Eh.deleteIn(e.shared,[n])})),e}case at:{const n=Eh.getIn(e[t.payload.context].context_data,"blocking_action_counter",0);return t.payload.isInitiateBlockingAction?Eh.setIn(e[t.payload.context].context_data,"blocking_action_counter",n+1):Eh.setIn(e[t.payload.context].context_data,"blocking_action_counter",n-1),e}default:return e}})),rm=/\[(\d+)\]$/gi,sm=/(\d+)/gi,am=/\[.\]$/gi,om=(e,t,n,r=[j.CONTEXT_DATA,j.CASE_INFO.CASE_INFO,j.CONTENT])=>{const s=Eh.getIn(t,r);if(s){const t=Yn(s,[],[]);for(const s of t)Eh.setIn(e[n],[...r,...s],{})}},im=(e,t,n,r)=>{const{property:s,pageReference:a,category:o,type:i}=r.payload,c=Eh.getIn(e[t],n);if(c&&o===j.CASEMESSAGES)Eh.setIn(e[t],$n(s,a,o),"");else if(c&&c.length>0&&Array.isArray(c)){const r=c.filter((e=>e.type!==i));n&&n.length>0&&Eh.setIn(e[t],$n(s,a,o),r)}};const cm=(e,t,n)=>{n.forEach((n=>{((e,t,n)=>{const r=n[j.ERROR_FIELD_IN_PAGE].slice(1),s=n[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(s){let a=r?`caseInfo.content.${r}`:"caseInfo.content";a=a.replace(/\(/g,"[").replace(/\)/g,"]");const o=$n(s,a,j.PROPERTY),i={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:n.localizedValue},c=Eh.getIn(e[t],o,[]);if(Eh.isContains(c,i))return;Eh.setIn(e[t],o,[...c,i])}})(e,t,n)}))};function lm(e,t){const{err:n,formFields:r}=t.payload;let{context:s}=t.payload;const{fieldErrors:a,pageErrors:o}=xc(n.errorDetails,r);if(Eh.setIn(e,[s,...kn.FIELD_MESSAGES_PATH],{}),Eh.setIn(e,[s,...kn.PAGE_MESSAGES_PATH],[]),a.forEach((t=>{if(t[j.ERROR_FIELD_IN_PAGE]){const n=t[j.ERROR_FIELD_IN_PAGE].slice(1);if(n){const t=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)}(n);if(!t)return!1;const r=n.substring(n.lastIndexOf(".")+1),a=$n(r,t,j.PROPERTY);Eh.setIn(e,[s,...a],[])}}})),a.length>0&&cm(e,s,a),o.length>0){const t=(e=>{const t=[];return e.forEach((e=>{t.push({type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue})})),t})(o);e[s]||(s=j.APP.APP),Eh.setIn(e,[s,...kn.PAGE_MESSAGES_PATH],t)}else s.includes&&s.includes(td.WORKAREA)&&(s=W(s)),Eh.deleteIn(e,[s,...kn.PAGE_MESSAGES_PATH]);return e}const um=(e,t)=>zf(e||Im().data,(e=>{switch(t.type){case Ee:return t.payload.err.errorDetails&&("Validation fail"===t.payload.err.errorClassification||(t.payload.err?.displayButtonsOnErrors?.length??0)>0)?lm(e,t):e;case xe:{const{context:n}=t.payload,r=[n,...kn.FIELD_MESSAGES_PATH],s=[n,...kn.PAGE_MESSAGES_PATH];if(Eh.setIn(e,r,{}),Eh.setIn(e,s,[]),n&&n.includes(td.WORKAREA)){const t=[X(n),...kn.PAGE_MESSAGES_PATH];Eh.setIn(e,t,[])}return e}case Qe:{const{isListEntry:n}=t.payload;return n?((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,deletingIndex:o,stateObj:i}=t.payload,{context:c}=t.payload;if(i)return om(e,i,c),e;const l=$n(n,r,s,a);if(Number.isInteger(o)){Eh.deleteIn(e[c],l);const t=l.slice(0,l.length-1);let n=Eh.getIn(e[c],t)||{};const r=Object.keys(n);n=r.map((e=>n[e])),n.forEach(((n,s)=>{const a=r[s].match(rm);if(a?.length){const i=parseInt(a[0].match(sm)[0],10);i>o&&(Eh.deleteIn(e[c],t.concat(r[s])),Eh.setIn(e[c],t.concat(r[s].replace(am,`[${i-1}]`)),n))}}))}else Eh.setIn(e[c],l,{});return e})(e,t):((e,t)=>{const{property:n,pageReference:r,category:s,isListEntry:a,stateObj:o}=t.payload,{context:i}=t.payload;let c=i;if(o)return om(e,o,i),e;const l=$n(n,r,s,a);return s===j.PAGE&&i?.includes(td.WORKAREA)&&(c=W(i)),im(e,c,l,t),im(e,i,l,t),e})(e,t)}case Je:{const{messages:n,property:r,pageReference:s,context:a,category:o}=t.payload,i=$n(r,s,o);return n&&n.length>0&&Array.isArray(n)&&i&&i.length>0&&Eh.setIn(e[a],$n(r,s,o),n),e}default:return e}})),dm=(e,t)=>zf(e,(e=>{if(t.type===rt){const{instruction:n,actions:r,context:s,referenceList:a,listIndex:o,listMoveToIndex:i,content:c={}}=t.payload,l=th(a);switch(n){case j.LIST_ACTIONS.INSERT:((e,t,n,r,s)=>{Eh.setIn(e[t],[...n,r],s)})(e,s,l,o,c);break;case j.LIST_ACTIONS.UPDATE:((e,t,n,r,s)=>{const a=gh(Eh.getIn(e[t],[...n,r],{}),s);Eh.setIn(e[t],[...n,r],a)})(e,s,l,o,c);break;case j.LIST_ACTIONS.DELETE:((e,t,n,r)=>{const s=Eh.getIn(e[t],n,[]);s.splice(r,1),Eh.setIn(e[t],n,s),Pn.deleteListNode(t,n,s.length)})(e,s,l,o);break;case j.LIST_ACTIONS.MOVE:((e,t,n,r,s)=>{const a=Eh.getIn(e[t],[...n,r],{}),o=Eh.getIn(e[t],n,[]);o.splice(r,1),o.splice(s,0,a),Eh.setIn(e[t],n,o),Wn(e,t,n?.join("."),r,s)})(e,s,l,o,i);break;case j.LIST_ACTIONS_TYPE.SELECT_DESELECT:((e,t,n,r)=>{const s=Eh.getIn(e[t],n)||[];r.forEach((e=>{const{instruction:r,content:a,listIndex:o}=e;if(r===j.LIST_ACTIONS.SELECT){s[o]=a;const e=n?.join(".");hr(t,e)}else delete s[o]})),Eh.setIn(e[t],n,s.filter(Boolean))})(e,s,l,r);break;case j.LIST_ACTIONS_TYPE.DESELECT_ALL:((e,t,n)=>{Eh.setIn(e[t],n,[])})(e,s,l)}}return e})),pm=[nm,tm,um,dm],hm=(e,t)=>(e||(e=Im().data),t.type===Ze?Im().data:(pm.forEach((n=>{e=n(e,t)})),e)),gm=(e,t=[])=>{t.forEach((t=>{Eh.deleteIn(e,[t])}))},fm=(e,t)=>{const{type:n,payload:r}=t,s=n===xe,{target:a,context:o,semanticURL:i="",root:c,containerItemID:l,childContainers:u,flowName:d,resourceType:p="",key:h="",clearView:g=!1}=r;return c?Eh.setIn(e,[a,"items",l,"view"],c):g&&Eh.deleteIn(e,[a,"items",l,"view"]),o&&Eh.setIn(e,[a,"items",l,"context"],o),d&&Eh.setIn(e,[a,"items",l,"flowName"],d),(!s||s&&h)&&Eh.setIn(e,[a,"items",l,"key"],h.trim()),(!s||s&&i)&&Eh.setIn(e,[a,"items",l,"semanticURL"],i),(!s||s&&p)&&Eh.setIn(e,[a,"items",l,"resourceType"],p),gm(e,u),e},mm=(e,t)=>(e||(e=Im().containers),t.type===Ze?Im().containers:zf(e,(e=>{switch(t.type){case Ae:{const{context:n,name:r,type:s,actionMgrID:a}=t.payload,o=`${n}/${r}`;let i=null;return ln.resolveActionByID(a,null,!1),e[o]?e:(i={type:s,accessedOrder:[],items:{}},Eh.setIn(e,[o],i),e)}case Ue:{const{containerName:n,childContainers:r=[]}=t.payload;return Eh.deleteIn(e,[n]),r.forEach((t=>{Eh.deleteIn(e,[t])})),e}case _e:{const{context:n,name:r,actionMgrID:s,childContainers:a}=t.payload,o=`${n}/${r}`;return ln.resolveActionByID(s,null,!1),Eh.setIn(e,[o,"accessedOrder"],[]),Eh.setIn(e,[o,"items"],{}),Array.isArray(a)&&a.forEach((t=>{Eh.deleteIn(e,[t])})),e}case Se:{const{target:n,context:r,isInCreateStage:s,isBulkAction:a,semanticURL:o,root:i,containerItemID:c,actionMgrID:l,key:u,flowName:d,resourceType:p,actionName:h,isMinimizable:g,showProgress:f,progressMessage:m,modalOptions:y,resourceStatus:I,actionID:E,isMultiRecordData:A,acTertiary:_,parentContext:S,heading:C,isTraditionalRemoteCase:T}=t.payload,N=e[n],P=N&&N.type,D=N&&N.accessedOrder||[],R=N&&N.items||{};let b=null;return e[n]&&"single"===P&&D.length>0?fm(e,t):(b={accessedOrder:[...D,c],items:{...R,[c]:{view:i,semanticURL:o,key:u,flowName:d,context:r,isInCreateStage:s,resourceType:p,actionName:h,isMinimizable:g,...a&&{isBulkAction:a},showProgress:f,progressMessage:m,modalOptions:y,isTraditionalRemoteCase:T,resourceStatus:I,...E&&{actionID:E},..._&&{acTertiary:_},...A&&{isMultiRecordData:A},...S&&{parentContext:S},heading:C}}},ln.resolveActionByID(l,null,!1),e[n]=w()(e[n],b),e)}case xe:{const{actionMgrID:n,data:r}=t.payload;let s=e;try{s=fm(e,t),ln.resolveActionByID(n,r,!1)}catch{ln.rejectActionByID(n,!1)}return s}case Me:return((e,t)=>{const{actionMgrID:n,data:r,target:s,containerItemID:a}=t.payload;let o=e;try{const i=e&&e[s]?.type;let c=e&&e[s]?.accessedOrder||[];c="single"===i?c.length>0?c:[...c,a]:c.includes(a)?c:[...c,a],Eh.setIn(e,[s,"items",a,"transientItems"],[]),Eh.setIn(e,[s,"accessedOrder"],c),o=fm(e,t),ln.resolveActionByID(n,r,!1)}catch{ln.rejectActionByID(n,!1)}return o})(e,t);case ve:{const{target:n,containerItemID:r,actionMgrID:s}=t.payload;try{const t=Eh.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));t.push(r),Eh.setIn(e,[n,"accessedOrder"],t),ln.resolveActionByID(s,null,!1)}catch{ln.rejectActionByID(s,!1)}return e}case we:case Ce:{const{target:n,containerItemID:r,actionMgrID:s,childContainers:a}=t.payload;try{const t=Eh.getIn(e,[n,"accessedOrder"]).filter((e=>e!==r));Eh.setIn(e,[n,"accessedOrder"],t),Eh.deleteIn(e,[n,"items",r]),gm(e,a),ln.resolveActionByID(s,null,!1)}catch{ln.rejectActionByID(s,!1)}return e}case Te:{const{transientItemID:n,target:r,contextName:s}=t.payload,a=Eh.getIn(e,[r,"items",s,"transientItems"])??[];return Eh.setIn(e,[r,"items",s,"transientItems"],[...a,n])}case De:{const{target:n,containerItemID:r}=t.payload;return Eh.deleteIn(e,[n,"items",r,"transientItems"]),e}case Pe:{const{target:n,transientItemID:r,containerItemID:s}=t.payload,a=(Eh.getIn(e,[n,"items",s,"transientItems"])??[]).filter((e=>e!==r));return Eh.setIn(e,[n,"items",s,"transientItems"],a)}default:return e}})));let ym={};const Im=()=>ym,Em=e=>((e=>{const t=e.Data||e.data,{uiResources:n={}}=e,r=n[j.CONTEXT_DATA]||e[j.CONTEXT_DATA];ym={data:{[j.APP.APP]:{...t,[j.CONTEXT_DATA]:r}},containers:{}}})(e),Bg({data:hm,containers:mm}));function Am(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Hl(e),r=function(e,t){return"number"==typeof Wl(e)?e.pop():t}(e,1/0),s=e;return s.length?1===s.length?Ri(s[0]):function(e){return void 0===e&&(e=1/0),Bl(yi,e)}(r)(ji(s,n)):Yl}const _m=(e,t)=>{e.data=e.data??{};const{assignments:n,availableActions:r=[]}=e.data.caseInfo??{};if(n&&Array.isArray(n)&&n.length>0&&n[0].actions&&Array.isArray(n[0].actions)&&!t?.stopMergeActions){n[0].actions.forEach((e=>{"Assignment"!==e.type&&"LocalAction"!==e.type||r.push(e)})),e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.availableActions=r}},Sm=(e,t)=>{if(e.confirmationLinks&&(e.data=e.data??{},e.data.caseInfo=e.data.caseInfo??{},e.data.caseInfo.confirmationLinks=e.confirmationLinks),!e.uiResources&&e.confirmationNote){let t=e;const{confirmationNote:n}=t;return 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 n=e,{uiResources:{actionButtons:r,navigation:s},nextAssignmentInfo:a}=n;if(n.data&&n.data.caseInfo&&(r&&(n.data.caseInfo.actionButtons=r),s&&(n.data.caseInfo.navigation=s),t&&t[F.ACTIONS.DELETEAVIALACTIONS]&&delete n.data.caseInfo.availableActions,_m(n,t),e.confirmationNote)){const{confirmationNote:e}=n,t=[e];n.data.caseMessages=t}return t&&t.isCreateDataObject&&(n.data=n.data??{},n.data.dataInfo={},n.data.dataInfo.content=n.data.pyPortal,n.uiResources.root.config.context="dataInfo.content",n.uiResources.context_data.dataInfo=n.uiResources.context_data.dataInfo??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data.dataInfo.content??{},n.uiResources.context_data.dataInfo.content=n.uiResources.context_data?.pyPortal,delete n.data.pyPortal,delete n.key),a&&(n.data=n.data??{},n.data.nextAssignmentInfo=a),n},Cm={},{VIEW:Tm,FIELD:Nm}=j.CONTEXT_TREE_NODE_TYPES,Pm=(e,t)=>{const{context:n}=e;e.reqHeaders&&e.reqHeaders.etag&&(e.headers={"if-match":e.reqHeaders.etag});const r=(e=>{const{ID:t,actionID:n,context:r}=e;return`${t}.${r}.${n}`})(t);if((e=>sc[e])(r)>0&&Cm[r]){const t=[];Cm[r].forEach(((n,r)=>{n.url===e.url&&(t.push(r),n.cancelConfig.cancel())})),t.forEach((e=>{Cm[r].splice(e,1)}))}const s=fc();return e.signal=s.token,e.cancelConfig=s,Cm[r]?Cm[r].push(e):Cm[r]=[e],pc(e.url,e,n,{cancelContext:r}).then((e=>(delete Cm[r],e))).catch((e=>{throw e&&"ERR_CANCELED"!==e.code&&delete Cm[r],e}))},Dm=[(e,t)=>e.pipe(Vl(Dn.REFRESH_DATA,gt),$l((e=>e.payload)),Bl((e=>{const{context:n,contextData:r,options:s}=e,{propertyName:a="",classID:o=""}=s,i=Dc(n,{skipUUID:!1});let c=[],l=[],u=!1;cp.getFeatureMap().granularUIRefresh?(({fieldsWithDeclarativeTargets:c=[],whens:l=[]}=jn(n)),u=l.some((e=>e.type===Tm))):u=!0;const d=l.filter((e=>e.type===Nm)),p=Eh.getPropertyName(a),h=p?p.split("."):[],g=h.pop(),f=h.join("."),m=[];if(f){const e=vp(f,o);if(e&&"copy"===e.dataRetrievalType){const e=Eh.getIn(i,`content.content.${f}`)||{};if(Object.keys(e).length>0){Object.keys(e).filter((e=>e!==g)).forEach((t=>{delete e[t],m.push(`${f}`)}))}}}e.serverPrecedenceFields=m;let y={...i.content,contextData:r};const I=qc(n);Eh.isEmpty(I)||(y=Hc(I,y));const E=((e,t)=>{const{caseWideAction:n,caseViewAction:r,fieldsWithDeclarativeTargets:s,fieldsWithWhen:a,isViewsWithWhen:o,interestPage:i,options:c}=e;let l={};const{optionalPayload:u}=c;u&&(t.content={...u});let d={...t},p=Dn.REFRESH;return r?(l=_g(Dn.REFRESH_CASE_VIEW,e),d={...d,interestPage:i}):o&&n?l=_g(Dn.REFRESH_CASE_DATA,e):o&&!n?l=_g(Dn.REFRESH_ASSIGNMENT_DATA,e):(s.length>0||a.length>0)&&(d={...d,calculations:{fields:s,whens:a}},l=_g(n?Dn.RECALCULATE_CASE_DATA:Dn.RECALCULATE_ASSIGNMENT_DATA,e),p=Dn.RECALCULATE),{restAPI:l,requestBody:d,requestType:p}})({...e,fieldsWithDeclarativeTargets:c,fieldsWithWhen:d,isViewsWithWhen:u},y);bu.registerBlockingAction(n).catch((()=>{}));const{restAPI:A,requestBody:_,requestType:S}=E;(e={...e,requestType:S}).requestType=S;const{reqType:C,restApi:T}=A,N=t.value.data[n]?.caseInfo?.headers,P={reqHeaders:N,context:n,method:C,body:_,url:Fn(e,T)};return ji(Pm(P,e)).pipe($l((t=>({response:{...t.data||{}},actionConfig:e,actionMgrID:e.options.actionMgrID,headers:Pc(t.headers)}))),Xl(": Error occurred during fetch call at refreshData Epic : ",e.context,e?.options?.actionMgrID))})),Bl((async e=>{if(e&&e.type===Ee)return bu.deRegisterBlockingAction(e.payload?.context).catch((()=>{})),wc(e);const{actionConfig:t,response:n,actionMgrID:r}=e,{context:s,serverPrecedenceFields:a,requestType:o}=t,i=Vr.getTargetViewContainerName(je),c=mt(i,s),l={acName:c,context:s},u=Sm(n,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0});u.directUrlUpdation=!1,o===Dn.REFRESH&&await bc(u,t,l);const d=Rc(u,{target:c,context:s});d.preserveClientChanges=void 0===t.options.preserveClientChanges||t.options.preserveClientChanges;const p=Sc.getPropertiesToReplace(s),h=ng(bh,d,{serverPrecedenceFields:a,propertiesToReplace:p});return Kc.registerForServerChanges(),sh(h),ln.resolveActionByID(r,d),Kc.unRegisterForServerChanges(),bu.deRegisterBlockingAction(s).catch((()=>{})),[]})))],Rm=Dm,bm=[e=>e.pipe(Vl(et),Bl((async e=>{const{context:t}=e.payload,n={},r={},s=Object.keys(e.payload.datapages).map((s=>{const a=e.payload.datapages[s];if(a.mode===j.READONLY&&a?.refreshStrategy){const{timeoutSecs:e="",type:t=""}=a?.refreshStrategy||{},n=oh()[a.name];if(n&&s in n){const r=n[s],{loadTime:a}=r;if(!au.isTimeElapsed(a,e,t))return}}return au.getData(a.name,{dataViewParameters:a.dataViewParameters},t).then((e=>{const t=a.mode===j.READONLY?r:n;t[a.name]?t[a.name][s]={pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}:t[a.name]={[s]:{pxResults:e.data.data,parameters:a.dataViewParameters,loadTime:e.data?.fetchDateTime}}})).catch((()=>{}))}));await Promise.allSettled(s);const a=[];return Object.keys(n).length&&a.push(bh({context:t,data:n})),Object.keys(r).length&&a.push(sg({data:r,context:t})),sh(a),[]})))],Om=bm;class vm{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";constructor(){this.broadcastChannel=null,this.callback=null,this.isReverseCoexistenceCase=!1,this.broadcastEventToIframe=!1,this.isDirtyDialogActive=!1,this.onCreateCallback=null,this.openAssignmentParams=null}getGlobalObject=()=>s.g;getUniqueId=()=>this.getGlobalObject().uniqueId;setUniqueId=()=>{this.getGlobalObject().uniqueId=(new Date).getTime()};initBroadcastChannel=()=>{this.setUniqueId(),this.broadcastChannel=new BroadcastChannel("coexistence"),this.broadcastChannel.onmessage=e=>{switch(e.data.action){case vm.DISPLAY_DIRTY_POPUP:this.broadcastEventToIframe=e.data.fromInfinity,this.isDirtyDialogActive||(e.data.isFormDirty?(Br.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:!0,hideDelete:!0}),this.isDirtyDialogActive=!0):this.callback?.call(this));break;case vm.LOAD_PREVIEW:this.loadPreview(e);break;case vm.UPDATE_COEXISTENCE_DRILLDOWN_CASE:this.updateCoexistenceDrilldownCase(e);break;case vm.OPEN_ASSIGNMENT_ACTION:this.openAssignment(e);break;case vm.GET_NEXT_WORK_ACTION:this.getNextWork(e);break;case vm.OPEN_WORK_BY_HANDLE:this.openWorkByHandle(e);break;case vm.CLOSE_CONTAINER_ACTION:this.closeContainer(e)}}};loadPreview=e=>{const{pyID:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){Xu({}).getPConnect().getActionsApi().showCasePreview(t,{caseClassName:n})}};navigateToDefaultPage=()=>{const e=Xu({isRoot:!0}),t=PCore.getStore()?.getState().data.app?.pyPortal?.pyPrimaryNavPages;let n;Array.isArray(t)&&t[0]&&(n=t[0]);const r=n?.pyClassName||"Data-Portal",s=n?.pyRuleName||"pyHome";e.getPConnect().getActionsApi().showPage(s,r)};closeContainer=e=>{const{uniqueId:t}=e.data;t===this.getUniqueId()&&this.navigateToDefaultPage()};updateCoexistenceDrilldownCase=e=>{const{key:t,caseClassName:n,actionApi:r,caseLabel:s}=e.data;let a=r;r===vm.OPEN_WORK_ITEM&&(a=vm.OPEN_WORK_BY_HANDLE),ip.updateSemanticURLAndDocumentTitle({key:t,caseClassName:n,actionName:a});Xu({}).getPConnect().getActionsApi().updateRecents(n,t.substring(t.lastIndexOf(" ")+1),s,t)};openAssignment=e=>{const{pzInsKey:t,uniqueId:n}=e.data;n===this.getUniqueId()&&(this.onCreateCallback&&this.openAssignmentParams&&(t?this.openAssignmentParams[0].payload.data.caseInfo.assignments[0].ID=t:this.openAssignmentParams[0].payload.data.caseInfo.content.coexistenceAction="openWorkByHandle",this.onCreateCallback.call(this,this.openAssignmentParams)),this.onCreateCallback=null,this.openAssignmentParams=null)};getNextWork=e=>{const{uniqueId:t}=e.data;if(t===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;Xu({meta:{},options:{context:md(e)}}).getPConnect().getActionsApi().getNextWork()}};openWorkByHandle=e=>{const{key:t,caseClassName:n,uniqueId:r}=e.data;if(r===this.getUniqueId()){const e=`${F.APP.APP}${j.FORWARD_SLASH_STRING}${F.PRIMARY}`;Xu({meta:{},options:{context:md(e)}}).getPConnect().getActionsApi().openWorkByHandle(t,n)}};destroyBroadcastChannel=()=>{this.getBroadCastChannel()?.close(),this.broadcastChannel=null};subscribeEvents=()=>{this.setReverseCoexistenceCaseLoaded(!0),Br.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.HANDLE_DISCARD,this.handleDiscard),Br.subscribe(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY,this.postDirtyPopupMessage)};unsubscribeEvents=()=>{Br.unsubscribeAllWithEventType(F.PUB_SUB_EVENTS.REVERSE_COEXISTENCE_EVENTS.CHECK_IS_FORM_DIRTY),Br.unsubscribeAllWithEventType(F.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:vm.DIRTY_POPUP_C11N,uniqueId:this.getUniqueId()}),this.setCallBackFunction(e)};handleDiscard=()=>{this.broadcastEventToIframe?(this.broadcastChannel?.postMessage({action:vm.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:vm.OPEN_ASSIGNMENT_MODAL,uniqueId:this.getUniqueId(),key:e}),this.broadcastEventToIframe=!1,this.onCreateCallback=t,this.openAssignmentParams=n}}const xm=new vm,wm="nextAssignmentInfo",Mm="nextAssignmentInfo.context",Lm=e=>{const{containerName:t,isInCreateStage:n}=e;return n?j.MODAL:t||Vr.getTargetViewContainerName(We)},Um=e=>{const t=Eh.getIn(e,[j.DATA,j.CASE_INFO.CASE_INFO]);return Zt(t)&&en(cp.getOperatorIdentifier(),t)},Fm=[j.TOP_ACTION_LABEL.CREATEWORK,j.TOP_ACTION_LABEL.OPENASSIGNMENT,j.TOP_ACTION_LABEL.FINISHASSIGNMENT,j.TOP_ACTION_LABEL.OPENWORKBYHANDLE,j.TOP_ACTION_LABEL.SAVEANDCLOSE,j.TOP_ACTION_LABEL.SHOWDATA],jm={getActionInfo:(e,t)=>{let n={};return Fm.includes(e)&&(n={topLevelAction:!0,actionLabel:e}),e===j.TOP_ACTION_LABEL.OPENASSIGNMENT&&(n.assignmentID=t),n}},Vm=()=>({registerHeader:(...e)=>nc.registerHeader(...e),unRegisterHeader:(...e)=>nc.unRegisterHeader(...e),getRegisteredHeaders:()=>nc.getRegisteredHeaders()}),km=(e,{body:t={},queryPayload:n={},cancelTokenSource:r,headers:s={},responseType:a},o,i)=>{const{restApi:c,reqType:l}=_g(e,n),u={method:l,headers:s,body:t,...a&&{responseType:a}};return r&&(u.signal=r.token),pc(c,u,o,i??{})},$m=(e,{method:t="GET",body:n={},headers:r={},withoutDefaultHeaders:s=!1},a)=>{e.startsWith("http:")||e.startsWith("https:")||(e=E()+e);return pc(e,{method:t,headers:r,body:n,withoutDefaultHeaders:s},a)},Bm=e=>ip.doesRestApiExist(e),Gm=()=>fc(),Wm=e=>mc(e),Hm=e=>{dc(e)},qm=()=>zm;const zm=class{static createCase(e,t){const{caseInfo:n,startingFields:r,flowType:s,viewType:a=Tc.PAGE,pageName:o,context:i=j.APP.APP,debugInfo:c,headers:l}=t;let u={};n&&n.content&&(u=n.content);const d={caseTypeID:e,content:{...u,...r},processID:s};let p={};return cp.getPerformanceDashboardVisibility()&&(p=jm.getActionInfo(j.TOP_ACTION_LABEL.CREATEWORK)),km("createWork",{body:d,queryPayload:{caseClassName:e,viewType:a,params:{pageName:o}},headers:{...l,...c&&{...nc.addDebugHeaders(c)}}},i,p).then((t=>({response:t.data,requestPayload:d,headers:Pc(t.headers,e,l)})))}},Ym=(e,t)=>{const{class:n,context:r,viewType:s=Tc.PAGE}=e,{removeActionPayload:a}=t;let o=e?.pageName?e?.pageName:cp.getDefaultCasePage();return e.isTraditionalUICase&&(o="pyDetails"),ji(zm.createCase(n,{...e,pageName:o,viewType:s,context:r})).pipe($l((({response:t,headers:n})=>({response:t,actionInPayload:e,headers:n,removeActionPayload:a}))),Xl("Error occurred during ajax call at createWork Epic : ",r))},Km=e=>{Br.publish(j.PUB_SUB_EVENTS.DISPLAY_CASE_CREATED_TOASTER,e)},Xm=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)},Jm=e=>{let t=0,n=[],r="",s=!1;return e.pipe(Vl(Ph),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:n}=e,r=Lm(e),a=mt(r,n),{continueExecution:o,removeActionPayload:i}=(e=>_d(e)?{continueExecution:!0,removeActionPayload:{}}:jc(e))(a);return s=cs(e.class),o?(e.isTraditionalUICase=s,Ym(e,{removeActionPayload:i})):(ln.rejectActionByID(t),Kl())})),Bl((async e=>{if(e&&e.type===Ee)return e.payload.context=Hd(),n.push(wc(e)),n;const{actionInPayload:a,response:o,headers:i,removeActionPayload:c}=e;let l;l=!(a.renderInline||cp.getDefaultCasePage()||s)&&Um(o),Eh.setIn(o.data,F.CASE_INFO.IS_FIRST_ASSIGNMENT,!0);const u=Lm({...a,isInCreateStage:l}),d=mt(u,a.context),p=Lc(d,u,a.context);if(!Yr(u)&&_d(d)){const{continueExecution:e}=jc(d);if(!e)return ln.rejectActionByID(t),Kl()}if(!(a?.openCaseViewAfterCreate??!0)&&!l){const e=Eh.getIn(o.data,F.CASE_INFO.CASE_INFO_CONTENT);r=`${e.pyID} ${up.getLocaleValue("has been created.","Assignment")}`;const t=ns(o),s=Zr(o);return Km({toastMessage:r}),Xm({caseId:`${e.pyID}`,assignmentId:t,caseType:s}),n}const h=Sm(o);let g=Eg("createWork",{caseClassName:Zr(h)});g=g.replace(/{.+?}/,String(Qr(ts(h)))),h.semanticURL=g,((e,t)=>{const n=Um(e),{skipBrowserSemanticUrlUpdate:r=!1,isTraditionalUICase:s}=t;Eh.setIn(e,["directUrlUpdation"],(!n||s)&&!r)})(h,a);const f={acName:d,context:p};await bc(h,a,f);const m={target:d,context:p,containerItemID:p,headers:i,semanticURL:g,isInCreateStage:l,isMinimizable:l,caseViewMode:h.confirmationNote?j.REVIEW_MODE:j.PERFORM_MODE,assignmentContext:Eh.getIn(h,Mm),nextAssignmentInfo:Eh.getIn(h,wm),resourceType:F.CASE,openCaseViewAfterCreate:a.openCaseViewAfterCreate,modalOptions:a.modalOptions,debugInfo:a.debugInfo};as(m,h);const y=Rc(h,m);s&&(y.data.caseInfo.content.coexistenceAction="openAssignment");const I=Mc(d,y);return Uc(I)&&rs(n,{removeActionPayload:c,target:d}),n.push(I),$c(n),n})),$l((()=>{const e=ls(),a=Zt(Eh.getIn(n[0]?.payload,"data.caseInfo"));return s&&e&&a?xm.postCreateCaseMessage(n[0]?.payload?.nextAssignmentInfo?.ID,Wc,n):Wc(n),is(n,t),r="",n=[],n})))},{RESOURCE_TYPES:Qm}=F,Zm=(e,t=[])=>{const{viewType:n,containerName:r,targetContainerName:s,isChild:a}=e,o=Jr(t);return(e=>{if(e){const{stageID:t,stages:n=[]}=e,r=n.length;for(let e=0;e<r;e+=1)if(n[e].ID===t)return"manual"===n[e].transitionType}return!1})(o)&&e?.stageID===o.stageID?Tc.PAGE:n||(!zr(r)&&!zr(s)||a?Tc.PAGE:Tc.FORM)},ey=(e,t,n,r,s)=>{if(rs(e,{removeActionPayload:t,target:n}),((e,t)=>{const n=pd(t);let r=null;return n&&(r=sd(t,n)),r?.key===e&&Sd(t)})(r.key,n))r.context=md(n),r.containerItemID=r.context,e.push(ng(Qh,r));else if((s?.isChild||s?.isRemote)&&s?.isMultiDoc){const t=Od(s.context);r.target=t,r.context=s.context,r.containerItemID=s.context,e.push(ng(Qh,r))}else{const t=Od(r.context),n=ld(t,r.key);n?(r.target=t,r.context=n,r.containerItemID=n,e.push(ng(Qh,r))):e.push(ng(Fh,r))}},ty=(e,t,n,r,s,a,o)=>{_d(t)&&Cd(t)?((e,t,n,r,s)=>{Zm(e,t)===Tc.FORM?(n.caseViewMode=r||j.PERFORM_MODE,s.push(ng(Gh,n))):s.push(ng(Qh,n))})(r,s,e,a,n):ey(n,o,t,e,r)},ny=({restUrl:e,reqType:t,requestHeaders:n,debugInfo:r,context:s,isGetNextWork:a,doNotMergeMessagesForStatusCode:o,assignmentID:i})=>{let c={};return cp.getPerformanceDashboardVisibility()&&(c=jm.getActionInfo(j.TOP_ACTION_LABEL.OPENASSIGNMENT,i)),pc(e,{method:t,headers:{"if-match":n&&n.etag,...n,...r&&{...nc.addDebugHeaders(r)}}},s,{doNotMergeHttpMessagesForStatusCode:a?o:"",...c})},ry=(e,t)=>{const n=Zm(e),{headers:r,context:s,assignmentID:a,isGetNextWork:o,debugInfo:i,isOpenStage:c,stageID:l,caseID:u,jsActionQueryParams:d,isLastStepInCreateStage:p}=e,{restApi:h,reqType:g}=o?_g("getNextWork",{viewType:n}):c?_g("openStage",{caseID:u,stageID:l}):_g(Ge,{assignmentID:a,viewType:n}),{removeActionPayload:f}=t,m=cp.getDefaultCasePage();let y="",I=e.pageName;e.isTraditionalUICase&&(I="pyDetails"),y=m?`${h}?viewType=${n}&pageName=${m}`:I?`${h}?viewType=${n}&pageName=${I}`:`${h}?viewType=${n}`,d&&Object.keys(d).forEach((e=>{y+=`&${e}=${d[e]}`}));const E=(e=>{let t=e?.headers??{};return e?.isRemote&&(t=Pc(t,e.remoteClassName)),t})(e);return ji(ny({restUrl:y,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404",assignmentID:a})).pipe($l((e=>{if(cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT)&&!p){return Zt(e.data.data.caseInfo)?e:(y=y.replaceAll(I,"pyDetails"),cp.setDefaultCasePage("pyDetails"),{isReloadWithDifferentViewTypeRequired:!0,restUrl:y})}return e})),Bl((e=>e?.isReloadWithDifferentViewTypeRequired?ny({restUrl:y,reqType:g,requestHeaders:E,debugInfo:i,context:s,isGetNextWork:o,doNotMergeMessagesForStatusCode:"404",assignmentID:a}):ql(e))),$l((t=>{const{key:s,flowName:o}=vc(a);return{response:{...t.data,key:s,flowName:o},actionInPayload:e,viewType:n,removeActionPayload:f,headers:Pc({...r,...t.headers})}})),Xl("Error occurred during ajax call at openAssignment Epic : ",s))},{RESOURCE_TYPES:sy}=F,ay=e=>{const t="Browser"===cp.getRuntime();let n=0,r=[];const s=[];let a=!1,o=!1;return e.pipe(Vl(xl),$l((e=>(({actionMgrID:n}=e.payload),{...e.payload,...t?{insKey:e.payload.assignmentID}:{assignmentID:e.payload.assignmentID}}))),Bl((e=>{a=e.isGetNextWork;const{context:t}=e;let r;r=(e?.isChild||e?.isRemote)&&e?.isMultiDoc?Tc.FORM:Zm(e),e.viewType=r;const s=Hr(Ge,e),i=mt(s,t),{activate:c,activateContainerActionPayload:l}=kc(sy.ASSIGNMENT,i,e);if(c&&!e.isParallelCall)return ql({type:ve,activateContainerActionPayload:l,actionInPayload:e});const u=pd(i);let d;d=l?.isParallelAssignment?{continueExecution:!0,removeActionPayload:{}}:u?jc(i):{continueExecution:!0,removeActionPayload:{}};const{continueExecution:p,removeActionPayload:h}=d;return p?(o=cs(e.className),e.isTraditionalUICase=o,ry(e,{removeActionPayload:h})):(ln.rejectActionByID(n),Kl())})),Bl((async e=>{if(e?.type===Ee){if(a){const{payload:t}=e,{err:n}=t,r=n.response.status;s.push({status:Number(r)})}return r.push(wc(e)),r}const{type:t,actionInPayload:n,response:i,viewType:c,headers:l,removeActionPayload:u,activateContainerActionPayload:d}=e;if("openStage"===i?.redirectInfo?.jsAction){const e=i?.redirectInfo?.stageID,t=xl,s=i?.data?.caseInfo?.ID;n.isOpenStage=!0,n.stageID=e,n.jsActionQueryParams=i?.redirectInfo?.jsActionQueryParams;const a={type:t,payload:{...n,caseID:s,headers:l}};return r.push(a),r}const{context:p,caseViewMode:h,debugInfo:g}=n;let f=((e,t)=>{const n=Jr(e);let r;r=!cp.getDefaultCasePage()&&Zt(n);const{isChild:s,containerName:a}=t,o=s&&r,i=r&&!t.isActionFromToDoList;return o||i?j.MODAL:a||Hr(Ge,t)})(i,n);o=cs(i?.data?.caseInfo?.caseTypeID),n.isTraditionalUICase=o,o&&(f=n.containerName);const m=mt(f,p);if(t===ve)return await(async(e,t,n)=>{const{semanticURL:r,containerItemID:s,isParallelAssignment:a,insKey:o}=t,{target:i,actionInPayload:c}=n,{skipBrowserSemanticUrlUpdate:l=!1}=c,u=fd(s);await bc({directUrlUpdation:!l,semanticURL:r},c,{acName:i,target:i,context:u}),e.push(ng(zh,{containerItemID:s,target:i,isParallelAssignment:a,insKey:o,resourceType:Qm.CASE,context:u,doDeleteCaseSummary:c.doDeleteCaseSummary}))})(r,d,{actionInPayload:n,target:m}),$c(r),r;const y=i?.data?.caseInfo?.content,I=i?.uiResources?.root?.config?.name;y&&!y.pyViewName&&I&&"page"!==n.viewType&&Eh.setIn(y,"pyViewName",I);const E=Sm(i);((e,t)=>{const n=Jr(e),r=ts(e),s=Zt(n),{skipBrowserSemanticUrlUpdate:a=!1,viewType:o,isTraditionalUICase:i}=t,c=o===Tc.PAGE&&(!s||i)&&!a,{caseTypeID:l}=n;if(c){const t=Eg(Be,{caseClassName:l}).replace(/{.+?}/,String(Qr(r)));e.semanticURL=t,e.directUrlUpdation=!0}})(E,n);const A=Lc(m,f,p),_={acName:m,target:m,context:A};await bc(E,n,_);const S={target:m,context:A,containerItemID:A,headers:l,parentContext:W(n?.context),isMinimizable:Zt(Eh.getIn(E,"data.caseInfo")),doDeleteCaseSummary:n.doDeleteCaseSummary,acTertiary:n.acTertiary,resourceType:F.CASE,debugInfo:g};as(S,E,{skipFlowNameUpdate:n?.caseViewMode===j.REVIEW_MODE});const C=Rc(E,S);return n.isProcessAction&&(C.data.isProcessAction=n.isProcessAction),o&&(C.data.caseInfo.content.coexistenceAction="openAssignment"),((e,t)=>{e.acTertiary&&(t.data.caseInfo.isFirstAssignment=e.acTertiary)})(n,C),ty(C,m,r,n,i,h,u),c===Tc.FORM&&ss(C.containerItemID)&&Gc(C,r),$c(r),(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.ASSIGNMENT_OPENED,e)})({actionInContext:p,assignmentID:n.assignmentID,caseKey:C.key}),r})),$l((()=>{const e=n,t=ls(),a=Zt(Eh.getIn(r[0]?.payload,"data.caseInfo"));return o&&t&&a?xm.postCreateCaseMessage(r[0]?.payload?.data?.caseInfo?.assignments?.[0]?.ID,sh,r):sh(r),is(r,e,s),r[0]?.payload?.isParallelAssignment&&sh({type:xl,payload:{...r[0].payload,isParallelCall:!0}}),r=[],r})))},oy=(e,t)=>{const{insKey:n,headers:r,context:s,debugInfo:a,viewType:o}=e,{removeActionPayload:i}=t,c=e?.pageName?e?.pageName:cp.getDefaultCasePage(),l=_g(Be,{caseID:n,params:{pageName:c}});let{restApi:u}=l;const{reqType:d}=l;"none"===o&&(u=`${u?.split("viewType")[0]}viewType=none`);let p={};return cp.getPerformanceDashboardVisibility()&&(p=jm.getActionInfo(j.TOP_ACTION_LABEL.OPENWORKBYHANDLE)),ji(pc(u,{method:d,headers:{...r,...a&&{...nc.addDebugHeaders(a)}}},s,p)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc({...r,...t.headers}),removeActionPayload:i}))),Xl("Error occurred during ajax call at openWorkByHandle Epic : ",s))},iy="OPEN_WORK_BY_HANDLE",{RESOURCE_TYPES:cy}=F,ly=async(e,t,n)=>{const{actionInPayload:r,activateContainerActionPayload:s,type:a,response:o,removeActionPayload:i,headers:c}=e,{context:l,skipBrowserSemanticUrlUpdate:u,debugInfo:d}=r,p=Hr(Be,r),h=mt(p,l);if(a===ve)await(async(e,t)=>{const{activateContainerActionPayload:{semanticURL:n,containerItemID:r},actionInPayload:s,actionInPayload:{context:a,skipBrowserSemanticUrlUpdate:o,doDeleteCaseSummary:i}}=t,c=Hr(Be,s),l=mt(c,a),u=fd(r);await bc({directUrlUpdation:!o,semanticURL:n},s,{acName:l,containerName:c,target:l,context:u}),e.push(ng(zh,{containerItemID:r,target:l,context:u,doDeleteCaseSummary:i}))})(t,{activateContainerActionPayload:s,actionInPayload:r});else{const e=Lc(h,p,l,{buildNew:!0}),s=Sm(o),a=((e,t)=>{const{isRemoteCase:n,remoteCaseClass:r}=t,s=ts(e),a=n?r:Zr(e);let o=Eg(Be,{caseClassName:a});return o=o&&o.replace("{workID}",String(Qr(s))),o})(s,r);s.semanticURL=a,s.directUrlUpdation=!u;const g={acName:h,context:e};await bc(s,r,g);const f=Rc(s,{target:h,context:e,containerItemID:e,semanticURL:a,headers:c,debugInfo:d});f.caseViewMode=j.REVIEW_MODE,f.resourceType=cy.CASE,n&&(f.data.caseInfo.content.coexistenceAction="openWorkByHandle"),as(f,s,{skipFlowNameUpdate:!0});const m=Mc(h,f);i.containerItemID&&Uc(m)&&t.push(ng(Kh,{containerItemID:i.containerItemID,target:h})),t.push(m)}$c(t);(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_OPENED,e)})({caseKey:r.insKey,actionInContext:l})},uy=e=>{let t=0,n=[];return e.pipe(Vl(iy),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:n,isChild:r,viewType:s}=e,a=Hr(Be,e),o=mt(a,n);let i,c=!0;if("none"!==s){const e=jc(o);c=e.continueExecution,i=e.removeActionPayload}if(!c)return ln.rejectActionByID(t),Kl();const{activate:l,activateContainerActionPayload:u}=kc(cy.CASE,o,e);return l&&!r&&"none"!==s?ql({type:ve,activateContainerActionPayload:u,actionInPayload:e}):oy(e,{removeActionPayload:i})})),Bl((async e=>{if(e&&Kr(e.type))return n.push(wc(e)),n;const t=ah(e?.actionInPayload?.context),r=cs(e?.actionInPayload.className);if("none"===e?.actionInPayload?.viewType){if("perform"!==t?.context_data?.caseViewMode){const t=Sm(e?.response),s={data:{...t?.data},context:e?.actionInPayload?.context,isArrayDeepMerge:!0};n.push({type:st,payload:{context:s.context,doDeleteConfirmationDetails:!1}}),r&&s.data.caseInfo?.content&&(s.data.caseInfo.content.coexistenceAction="openWorkByHandle"),n.push(ng(bh,s));const a=Od(e?.actionInPayload?.context),o=qr(e?.actionInPayload?.context),i=Object.freeze({target:a,containerItemID:e?.actionInPayload?.context,context:e?.actionInPayload?.context,containerName:o});if(ss(e?.actionInPayload?.context)){const t=Rc(e?.response,{...i});Gc({...t,isArrayDeepMerge:!0},n)}}}else await ly(e,n,r);return n})),$l((()=>(sh(n),is(n,t),n=[],n))))},dy="FINISH_ASSIGNMENT",{RESOURCE_TYPES:py}=F,hy=(e,t)=>{const{containerItemID:n,skipReleaseLockRequest:r}=t,s=fd(n),a=`${s?.includes("root")?j.APP.ROOT:j.APP.APP}/${td.MODAL}`;e.push(ng(Kh,{containerItemID:n,context:s,target:a,skipReleaseLockRequest:r}))},gy=e=>ch(".openCaseViewAfterCreate",j.CONTEXT_DATA,e)??!0,fy=async(e,{translatedDXAPIResponse:t,actionInPayload:n},r)=>{const{caseID:s}=n,a=(o=t,Eh.getIn(o,Wr.NEXT_ASSIGNMENT_INFO_ID,j.EMPTY_STRING));var o;const i=Zr(t),{caseViewMode:c,headers:l,semanticURL:u,actionMgrID:d,directUrlUpdation:p,key:h,flowName:g,resourceType:f}=r;(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DONE,e)})({caseId:s,assignmentId:a,caseType:i}),hy(e,{...n,skipReleaseLockRequest:!0});const m=`${n?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${td.PRIMARY}`,y=Lc(m,td.PRIMARY),I=nc.getCoreHeadersFromContext(n.context)||!1,E=Rc(t,{target:m,context:y,containerItemID:y,caseViewMode:c,headers:l,semanticURL:u,key:h,flowName:g,resourceType:f,directUrlUpdation:p,debugInfo:I&&I.debugInfo&&{debugId:I.debugInfo[j.COREHEADER_APP_DEBUG_ID]}});if(_d(m)){const t=ah(y),s=ts({data:t}),[,a]=s?s.split(" "):[],o=`You will lose unsaved changes for ${a}. Do you want to continue?`;if(!gy(n.context))return e;{const{continueExecution:t}=jc(m,{dirtyMessage:o});if(!t)return r.directUrlUpdation=!1,ln.rejectActionByID(d),Kl();e.push(ng(Qh,E))}}else e.push(ng(Fh,E));return t.directUrlUpdation=p,t.semanticURL=u,await bc(t,{...E,acName:m},{acName:m,context:y}),e},my=e=>/^app\/preview_[0-9]*/g.test(e),yy=(e,t)=>{const n=W(e);return!my(e)&&(n===t||/^app\/primary_[0-9]*/g.test(n))},Iy=async(e,t,n,r,s,a,o,i,c)=>{const{headers:l}=c;if(e){const u=_d(Od(e));let d=!1;const p=Od(n),h=rd(p),g=pd(p);g&&h?.items?.[g]?.key===c?.actionInPayload?.caseID&&(d=!0),hy(s,{...r,skipReleaseLockRequest:!0});const f=qr(e),m={target:Od(e),containerItemID:e,context:e,containerName:f};t.doDeleteCaseSummary=r.doDeleteCaseSummary;const y=X(n),I=ah(y),E=ah(r.context),A=I?.caseInfo?.ID,_=E?.caseInfo?.ID;if(u&&A===_||!u&&""===o)(void 0===t?.data?.caseInfo?.content||void 0!==t.data.caseInfo.content&&"object"==typeof t.data.caseInfo.content&&0===Object.keys(t.data.caseInfo.content).length)&&(t.root=void 0,delete t.data?.caseMessages),s.push(ng(Gh,{...t,key:o,resourceType:"",...m}));else if(a){const a=Od(e),i=ld(a,o);if(i)m.target=a,m.context=i,m.containerItemID=i,s.push(ng(Gh,{...t,key:o,resourceType:"",...m}));else{const e=Id(n)[0];if(r.target=e,r.context=Lc(e,j.WORKAREA,n),r?.context){r.containerItemID=r.context,s.push(ng(Fh,{...r,...t}));const n=r.containerItemID;s.push(ng(zh,{parentContainerTarget:e,containerItemID:n}))}}}if(r.target=Od(e),r.containerName=qr(e),r.context=e,r.containerItemID=e,Eh.setIn(t,"acName",m.target),await bc(i,t),d){const{data:e,caseViewMode:r}=t;n.includes(j.WORKAREA)&&ss(n)&&(n=X(n));const a={data:e,caseViewMode:r,context:n};Eh.setIn(a.data,["context_data","caseViewMode"],r),s.push({type:st,payload:{context:n}}),s.push(ng(bh,a))}if(!a&&t.caseViewMode===j.PERFORM_MODE){const t=((e,t)=>{const n=Od(e);return ld(n,t)})(e,o),n={data:{caseInfo:{headers:l}},context:t};s.push(ng(bh,n)),s.push(Rn(((e,t=!1,n=!1)=>{const r=ln.getNextActionMgrId();return{ID:Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENT_ID,"",e),actionID:Ch.getPropertyValue(F.CASE_INFO.ASSIGNMENTACTION_ID,"",e),context:e,caseWideAction:t,contextData:n,options:{actionMgrID:r}}})(t)))}}else{hy(s,r);let e=!1;const o=Od(n),i=rd(o),l=pd(o);if(l&&i?.items?.[l]?.key===c?.actionInPayload?.caseID&&(e=!0),a){const e=Id(n)[0];r.target=e,r.context=Lc(e,j.WORKAREA,n),r.containerItemID=r.context,s.push(ng(Fh,{...r,...t}));const a=r.containerItemID;s.push(ng(zh,{parentContainerTarget:e,containerItemID:a}))}if(e){const{data:e,caseViewMode:r}=t,a={data:e,caseViewMode:r,context:n};Eh.setIn(a.data,["context_data","caseViewMode"],r),s.push({type:st,payload:{context:n}}),s.push(ng(bh,a))}}},Ey=async(e,t,n,r,s)=>{((e,t,n)=>{if(t.isProcessAction&&(hy(n,{...t,skipReleaseLockRequest:!0}),e)){const r=`${t?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${td.PRIMARY}`,s=Lc(r,td.PRIMARY),a={insKey:e.ID,className:e.content.classID,context:s,acTargetName:j.PRIMARY,isChild:!0},o={type:ue,payload:{...a}};n.push(o)}})(e.data.caseInfo.parentCaseInfo,t,s);const a=e?.data?.caseInfo?.parentCaseInfo?.ID;if(a){const n=Od(t?.context),r=sd(n,t?.context)?.parentContext,s=Od(r);t?.isProcessAction&&cd(s,a)&&zd(r,e?.data?.caseInfo?.lastUpdateTime)}n.resourceType=py.CASE,n.directUrlUpdation=!0,t.isProcessAction||await fy(s,{translatedDXAPIResponse:r,actionInPayload:t},n)},Ay=async(e,t,n,r,s)=>{e.doDeleteCaseSummary=t.doDeleteCaseSummary,e.caseViewMode===j.REVIEW_MODE&&(e.flowName=" ",e.clearView=!0);const{containerItemID:a}=t,o=Sc.getPropertiesToReplace(a);s.push(ng(Gh,{...e,...r,propertiesToReplace:o})),Eh.setIn(e,"acName",r.target),await bc(n,e),((e,t,{data:n,caseViewMode:r})=>{const{containerItemID:s}=t,a=fd(s);if(a&&ss(s)){const t=X(a),o={data:n,caseViewMode:r,context:t};Eh.setIn(o.data,["context_data","caseViewMode"],r),e.push({type:st,payload:{context:t}});const i=Sc.getPropertiesToReplace(s);e.push(ng(bh,o,{propertiesToReplace:i}))}})(s,t,e)},_y=async(e,t,n,r,s,a,o,i)=>{const{isCaseWideAction:c,isInCreateStage:l,containerItemID:u}=e,d=W(e.context),p=es(s),h=Zr(s),g=l&&!p&&!c,f=Id(d)[0],m=f?pd(f):d,y=qr(u),I=fd(u),E=Object.freeze({target:e.target,containerItemID:u,context:I,containerName:y});g&&!my(e.context)?await Ey(i,e,t,s,a):yy(e.context,m)?await Iy(m,t,d,e,a,n,r,s,o):c&&!yy(e.context,m)?(hy(a,e),((e,t,n)=>{const{containerItemID:r,caseID:s}=t;if(r&&/^app\/preview_[0-9]*/g.test(r)){const{caseClassName:t}=n,a=W(r),o=fd(a);e.push(ng(vh,{containerItemID:a,context:o,container:td.PREVIEW,containerName:td.PREVIEW,caseId:s,viewName:F.PREVIEW_VIEW_NAME,caseClassName:t,updateData:!0}))}})(a,e,{caseClassName:h})):await Ay(t,e,s,E,a)},Sy=(e,t)=>{const{assignmentID:n,actionID:r,caseID:s,context:a,additionalHeaders:o={},isCaseWideAction:i,outcome:c,jsActionQueryParams:l}=e,{state$:u}=t,d=(e=>{const{isModalAction:t,viewType:n,isInCreateStage:r,isCaseWideAction:s}=e;return t&&r&&!s?Tc.PAGE:n||Tc.FORM})(e),p=(e=>{const{isCaseWideAction:t}=e;return t?Ye:"finishAssignment"})(e),h={assignmentID:n,actionID:r,caseID:s,viewType:d};let{restApi:g}=_g(p,h),{reqType:f}=_g(p,h);d&&!g?.includes("viewType=")&&(g=g?.includes("?")?`${g}&viewType=${d}`:`${g}?viewType=${d}`),c&&!g?.includes("outcome")&&(g=g?.includes("?")?`${g}&outcome=${c}`:`${g}?outcome=${c}`),g=((e,t)=>(e&&Object.keys(e).forEach((n=>{t+=`&${n}=${e[n]}`})),t))(l,g),i&&(f="PATCH"),e.viewType=d;const{content:m,attachmentsExist:y}=Dc(a);e.attachmentsExist=y;const I=u.value.data[a]?.caseInfo?.headers||{},{etag:E}=I,A={"if-match":E,...o};let _={};return cp.getPerformanceDashboardVisibility()&&(_=jm.getActionInfo(j.TOP_ACTION_LABEL.FINISHASSIGNMENT)),ji(pc(g,{method:f,body:m,headers:A},a,_)).pipe($l((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Pc({...A,...r})}})),Xl("Error occurred during ajax call at finishAssignment Epic : ",a))},{RESOURCE_TYPES:Cy}=F,Ty=(e,t)=>{let n=0,r=[],s={},a="";return e.pipe(Vl(dy),kl((e=>{const o=cp.isCoexistenceAppOfType(j.APP_TYPE.UIKIT);if(({actionMgrID:n}=e.payload),a=e.payload.context,qn({context:a,stateObj:ah(a),clearContextMessages:!0}),!il(a)){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,t),bu.handleDeferredActionCompletion(e.payload.context),ql([])}return ql(e.payload).pipe(Bl((e=>{((e,t)=>{const{containerItemID:n,context:r,actionMgrID:s,isInCreateStage:a,isModalAction:o}=t;if(a&&o){const t=qr(n),a=mt(t,r);e.push(ng(zh,{containerItemID:n,target:a,actionMgrID:s}))}})(r,e);const n={...e};return Sy(n,{state$:t})})),Bl((async e=>{if(e&&e.type===Ee){(e=>{const t=e?.payload?.err?.response?.data?.displayButtonsOnErrors||[],n=e?.payload?.err?.response?.status;if(Array.isArray(t)&&t.length>0&&424===n){t.forEach((e=>{e.isErrorButton=!0}));const n=e.payload.context,r=ah(n),s=((e,t)=>(e.forEach((e=>{!0!==e.isErrorButton||t.some((t=>t.actionID===e.actionID))||(t=[...t,e])})),t))(t,r?.caseInfo?.actionButtons?.secondary||[]),a={data:{caseInfo:{actionButtons:{secondary:s}}},target:Od(n),context:n};sh({type:fe,payload:a})}})(e);const t=wc(e);return r.push(t),r}Pu.clearContextedCache(a);const{headers:t,actionInPayload:i,response:c}=e,{containerItemID:l,context:u=fd(l),isModalAction:d,isInCreateStage:p}=i,h=Od(l);i.target=h;const g=qr(l),f=Object.freeze({target:i.target,containerItemID:l,context:u,containerName:g});Eh.setIn(c.data,j.CASE_INFO.IS_FIRST_ASSIGNMENT,!1),Eh.setIn(c.data,j.CASE_INFO_IS_LOCAL_ACTION,!1),c?.uiResources?.root?.config?.name&&"page"!==i.viewType&&Eh.setIn(c.data,j.CASE_INFO.VIEW_NAME,c?.uiResources?.root?.config?.name),(e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,e)})({submitResponse:c});let m=Sm(c,{[F.STOPMERGEACTIONS]:!c.nextAssignmentInfo});const y=Zr(m),I=W(i.context),E=Id(I)[0]?pd(Id(I)[0]):I,A=es(m),_=p&&!A;!d||p||yy(i.context,E)||(m=((e,t)=>(e?.data?.caseInfo&&t?.caseInfo?.content&&(e.data.caseInfo.content=t?.caseInfo?.content),e))(m,ah(l)));const S=Rc(m,{headers:t,actionMgrID:n,directUrlUpdation:!1});let C,T;os(S.data,i),S.caseClassName=y,S.resourceType=Cy.ASSIGNMENT,S.headers=t;const N=m?.data?.caseInfo?.assignments?.some((e=>e.ID===i.assignmentID)),P=((e,t)=>{const{assignmentID:n}=t;return e?.data?.caseInfo?.assignments?.some((e=>e.ID===n&&"true"===e?.canPerform))})(m,i),D=((e,t,n,r,s)=>{let a;const o=Od(t);return a=Sd(o)?ld(o,n.data?.caseInfo?.ID):pd(o),r&&e&&lh(null,j.CASE_VIEW_MODE_PROP,a)===j.PERFORM_MODE&&s})(N,E,m,d,P),R=i?.actionID===F.LOCAL_ACTIONS.TRANSFER_ASSIGNMENT;m?.data?.nextAssignmentInfo&&!R?(S.caseViewMode=j.PERFORM_MODE,C=ts(m),T=!0):D&&!R?(S.caseViewMode=j.PERFORM_MODE,C=ts(m),S.flowName=" ",S.deleteAssignmentSpecificResources=!1,T=!1):(S.caseViewMode=j.REVIEW_MODE,C="",T=!1);const b=ts(m);as(S,m,{skipFlowNameUpdate:S?.caseViewMode===j.REVIEW_MODE||D});const O=Eg("createWork",{caseClassName:y}).replace(/{.+?}/,String(Qr(b)));if(m.semanticURL=O,S.semanticURL=O,d?(await _y(i,S,T,C,m,r,e,c),_&&(s=(e=>{if(!gy(e.context)){let t;const n=e?.caseTypeID,r=e?.caseTypeName;return t=e.businessID?e.businessID:e.workID,{caseID:t,caseTypeID:n,caseTypeName:r}}return{}})(i))):p&&o&&!A?(cp.setDefaultCasePage("pyDetails"),await(async(e,t,n)=>{const r={assignmentID:e?.data?.caseInfo?.assignments[0]?.ID,className:e?.data?.caseInfo?.content?.classID,containerName:td.PRIMARY,targetContainerName:td.PRIMARY,viewType:Tc.PAGE,isLastStepInCreateStage:!0,context:n},s={type:ge,payload:{...r}};t.push(s)})(c,r,W(u))):await Ay(S,i,m,f,r),us(e,r),bu.handleDeferredActionCompletion(a),((e,t,n)=>{const{isModalAction:r,isCaseWideAction:s,caseID:a}=t,o=yy(t.context,n),i=e?.data?.caseInfo?.stages||[],c=e?.data?.caseInfo?.stageID;Gr({caseID:a,isModalAction:r,isModalLaunchedFromPrimaryValue:o,isCaseWideAction:s,stages:i,stageID:c})})(S,i,E),!m?.data?.nextAssignmentInfo){const e=((e,t)=>{const{isCaseWideAction:n,assignmentID:r,actionID:s}=t;return{isCaseWideAction:n,caseID:ts(e),assignmentID:n?null:r,actionID:n?s:null}})(m,i);(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.END_OF_ASSIGNMENT_PROCESSING,e)})({...e,containerItemID:l})}return((e,{isModalAction:t,target:n,transientItemID:r})=>{if(t){const t=e.find((({type:e})=>e===Me));t?.payload&&(n=t.payload.target,r=t.payload.containerItemID)}const s=Xh({target:n,containerItemID:r});s.payload.transientItems.length&&e.push(s)})(r,{transientItemID:l,target:h,isModalAction:d}),r})),$l((()=>{const e=r.find((e=>e.type===Ee));return e?(bu.handleDeferredActionCompletion(a),(e=>{const t=e?.payload?.err?.errorDetails,n=e?.payload?.context;t?.forEach((e=>{e[j.ERROR_FIELD_IN_PAGE]=e[j.ERROR_FIELD_IN_PAGE].replace(/(\(\d\))/g,(e=>`[${parseInt(e.substring(1,e.length-1),10)-1}]`));const t=e[j.ERROR_FIELD_IN_PAGE].slice(1),r=e[j.ERROR_IN_PAGE_IDENTIFIER].slice(1);if(r){let s=t?`caseInfo.content.${t}`:"caseInfo.content";s=s.replace(/\(/g,"[").replace(/\)/g,"]");const a=$n(r,s,j.PROPERTY),o={type:F.MESSAGES.MESSAGES_TYPE_ERROR,message:e.localizedValue};Pn.mutateField(n,s,a[a.length-1],{messages:[o],type:F.MESSAGES.MESSAGES_TYPE_ERROR,fieldName:a[a.length-1]})}}))})(e),ln.rejectActionByID(n)):ln.resolveActionByID(n,s),Wc(r),r=[],s={},r})))})))},Ny="CANCEL_ASSIGNMENT",Py=e=>{const t={},{routeKey:n,isModalAction:r,caseID:s,context:a,RemoteSystemID:o}=e;o&&(t.RemoteSystemID=o);const i=n||"releaseAssignmentLock",{restApi:c,reqType:l}=_g(i,{ID:s,caseID:s,viewType:Tc.PAGE});return ec.getPreviewMode()&&(t[j.SKIPCOREHEADERS]=!0),ji(pc(c,{method:l,headers:t},a,{includeRemoteSystemIdIfPresent:!!o})).pipe($l((t=>r?{actionInPayload:e}:{response:t.data,actionInPayload:e,headers:Pc(t.headers)})),Xl(": Error occurred during ajax call at release lock request : ",a))},Dy=(e,t)=>{const{isModalAction:n}=t;return Py({routeKey:"cancelAssignment",isModalAction:n,...e})},Ry=e=>{let t=0,n=[];return e.pipe(Vl(Ny),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{isModalAction:n}=e;e.context||(e.context=fd(e.containerItemID));const{context:r}=e,s=(e=>{const{isModalAction:t,containerItemID:n}=e;return t?td.MODAL:qr(n)})(e),a=mt(s,r),{continueExecution:o}=jc(a);return o?(e.RemoteSystemID=$.getRemoteHeaderByContext(e.context)??void 0,Dy(e,{isModalAction:n})):(ln.rejectActionByID(t),Kl())})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;const{actionInPayload:r,response:s}=e,{containerItemID:a,isModalAction:o,isInCreateStage:i}=r,c=Od(a),l=fd(a),u={target:o?`${j.APP.APP}/${j.MODAL}`:c,containerItemID:a,caseViewMode:o?j.PERFORM_MODE:j.REVIEW_MODE,context:l,actionMgrID:t,key:ts(s),skipReleaseLockRequest:!1};return i&&n.push(ng(Gh,u)),!o&&ss(a)&&(async(e,t)=>{const{childContainerItemID:n,caseViewMode:r,referencedUsers:s}=t,a=W(n),o={context:fd(a),data:{referencedUsers:s,context_data:{caseViewMode:r}}};e.push(ng(bh,o))})(n,{childContainerItemID:a,caseViewMode:j.REVIEW_MODE,referencedUsers:s?.data.referencedUsers}),u.skipReleaseLockRequest=!0,n.push(ng(Kh,u)),n})),$l((()=>(sh(n),is(n,t),n=[],n))))},by="NAVIGATE_TO_STEP",Oy=(e,t)=>{const{ID:n,stepID:r,containerItemID:s,context:a=fd(s),isInCreateStage:o}=e,{state$:i}=t,c={ID:n,stepID:r,viewType:o?Tc.PAGE:Tc.FORM},{restApi:l,reqType:u}=_g("navigateToStep",c),{content:d}=Dc(a),p=i.value.data[a].caseInfo.headers;return ji(pc(`${l}`,{method:u,body:d,headers:{"if-match":p&&p.etag}},a)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc({...p,...t.headers})}))),Xl("Error occurred during ajax call at navigateToStep Epic : ",a))},{RESOURCE_TYPES:vy}=F,xy=(e,t)=>{let n=0,r=[];return e.pipe(Vl(by),kl((e=>(({actionMgrID:n}=e.payload),ql(e.payload).pipe(Bl((e=>(Xn(e.context),Oy(e,{state$:t})))),Bl((async e=>{if(e&&Kr(e.type))return r.push(wc(e)),r;const{actionInPayload:t,response:n,headers:s}=e,{containerItemID:a,context:o=fd(a),isModalAction:i}=t;Pu.clearContextedCache(t.context);const c=Od(a),l=qr(a),u=Object.freeze({target:c,containerItemID:a,context:o,containerName:l}),d=n?.data?.caseInfo?.content,p=n?.uiResources?.root?.config?.name;d&&!d.pyViewName&&p&&"page"!==t.viewType&&Eh.setIn(d,"pyViewName",p);const h=Sm(n),g={acName:c,...u};await bc(h,t,g);const f=Rc(h,{...u,headers:s});f.doDeleteCaseSummary=t.doDeleteCaseSummary,f.resourceType=vy.ASSIGNMENT,as(f,h),os(f.data,t);const m=h.data?.caseInfo?.stages,y=h.data?.caseInfo?.stageID;return Gr({caseID:ts(h),isModalAction:i,stages:m,stageID:y}),ss(a)&&Gc(f,r),r.push(ng(Gh,f)),$c(r),r})),$l((()=>(sh(r),is(r,n),r=[],r))))))))},wy=e=>{const{caseID:t,context:n}=e,{restApi:r,reqType:s}=_g("deleteCaseInCreateStage",{ID:t});return ji(pc(r,{method:s},n)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call at deleteCaseInCreateStage Epic : ",n))},My=e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CREATE_STAGE_DELETED,e)},Ly=(e,t)=>{let n,r=0,s=[];return e.pipe(Vl(wl),$l((e=>(({actionMgrID:r,caseType:n}=e.payload),e.payload))),Bl((e=>e.ignoreCaseDeletion?ql({actionInPayload:e}):wy(e))),Bl((async e=>{if(e&&Kr(e.type)){const{payload:t}=e,n=wc({...e,...t,actionMgrID:r});return s.push(n),s}const{actionInPayload:n}=e,{context:a,isModalAction:o}=n,i=o?td.MODAL:td.PRIMARY,c=mt(i,a);if(!o&&c){const e={acName:c,target:c,context:a},r=t.value.containers[c],{semanticURL:s}=(e=>{const{accessedOrder:t,items:n}=e;if(t&&t.length>1){const e=n[t[t.length-2]],{semanticURL:r}=e;if(r)return e}return{semanticURL:""}})(r);await bc({directUrlUpdation:!0,semanticURL:s},n,e)}if(n.isProcessAction&&n.parentCaseInfo){const e={insKey:n.parentCaseInfo.ID,className:n.parentCaseInfo.content.classID,context:n.parentContext,acTargetName:j.PRIMARY,isChild:!0},t={type:ue,payload:{...e}};s.push(t)}const l={target:c,containerItemID:a,context:a,caseDeleted:!0};return s.push(ng(Kh,l)),s})),$l((()=>(sh(s),is(s,r)===j.PROMISE_VALUE.RESOLVE&&My({caseType:n}),s=[],s))))},Uy=(e,t)=>{const{assignmentID:n,actionID:r,context:s}=e,{restApi:a,reqType:o}=_g("save",{assignmentID:n,actionID:r}),{content:i}=Dc(s),c=t.value.data[s]?.caseInfo?.headers;let l={};return cp.getPerformanceDashboardVisibility()&&(l=jm.getActionInfo(j.TOP_ACTION_LABEL.SAVEANDCLOSE)),ji(pc(a,{method:o,body:i,headers:{"if-match":c&&c.etag}},s,l)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call at saveAndCloseAssignment Epic at save action : ",s))},Fy=(e,t=!1)=>{const{action:n,state$:r,actionMgrID:s}=e;let a=[];return ql(n.payload).pipe(Bl((e=>Uy(e,r))),Bl((e=>{if(e&&Kr(e.type))return ql(e);if(e.actionInPayload.isProcessAction&&e.response.data.caseInfo.parentCaseInfo){const t=`${e.actionInPayload?.containerItemID.includes("root")?j.APP.ROOT:j.APP.APP}/${td.PRIMARY}`,n=Lc(t,td.PRIMARY),r={insKey:e.response.data.caseInfo.parentCaseInfo.ID,className:e.response.data.caseInfo.parentCaseInfo.content.classID,context:n,acTargetName:j.PRIMARY,isChild:!0},s={type:ue,payload:{...r}};a.push(s)}const{containerItemID:t}=e&&e.actionInPayload,r=W(t),s=Od(r),o=rd(s),i=pd(s);if(n.payload.canUpdateAvailableActions&&_m(e.response),o?.items?.[i]?.key===e?.actionInPayload?.caseID){const n={context:r,data:{...e.response.data}},s=Sc.getPropertiesToReplace(t);a.push(ng(bh,n,{propertiesToReplace:s})),a.push(ng(Gh,{context:t}))}return us(e,a),e.actionInPayload.RemoteSystemID=$.getRemoteHeaderByContext(e.actionInPayload.context)??void 0,Py(e.actionInPayload)})),Bl((async n=>{if(n&&Kr(n.type)){const{payload:t}=n,r=wc({...n,...t,actionMgrID:s});a.push(r);const o=e.action.payload.modalLoadingContainer;if(o){const e=o.context,{context_data:t}=ah(e)||{};t?.isLoading&&vd(e)}return a}const{actionInPayload:r}=n,{context:o,containerName:i}=r,c={target:mt(i,o),containerItemID:o,context:o};return t||a.push(ng(Kh,c)),a})),$l((()=>(sh(a),is(a,s),t||(a=[]),a))))},jy=(e,t)=>{let n,r=0;return e.pipe(Vl(Ml),kl((e=>{const{saveOnly:s}=e.payload;({actionMgrID:r,caseType:n}=e.payload);return Fy({action:e,state$:t,actionMgrID:r,caseType:n},s)})))},Vy=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="expressLocalActionSubmit",Br.unsubscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n)};n=e,r="expressLocalActionSubmit",Br.subscribe(j.PUB_SUB_EVENTS.EVENT_EXPRESS_LOCALACTION,n,r)}var n,r},{LOCAL_ACTION_TYPE:ky}=j,{RESOURCE_TYPES:$y}=F,By=(e,t)=>{const{actionID:n,assignmentID:r,caseID:s,context:a,openActionType:o,modalLoadingContainer:i}=e,{isProcessAction:c}=t,l=c?ze:(e=>{const t=e.localActionType.toLowerCase();return t===ky.CASE_WIDE||t===ky.EXPRESS?Ye:qe})(e),u=Tc.FORM,{reqType:d}=_g(l,{caseID:s,ID:r,actionID:n,viewType:u});let{restApi:p}=_g(l,{caseID:s,ID:r,actionID:n,viewType:u});e.actionType=l===Ye?j.CASE:j.ASSIGNMENT,p&&!p.includes("viewType=")&&(p=p.includes("?")?`${p}&viewType=${u}`:`${p}?viewType=${u}`);const h=i?.context??a;return ji(pc(p,{method:d,headers:{}},h)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(`: Error occurred during ajax call at ${o} Epic : `,h))},Gy=(e,t)=>{const{isProcessAction:n}=t,r=n?ze:qe;e.openActionType=r;let s;if("modal"===Hr(r,e)){s=Id(e.contextName)[0]?Id(e.contextName):Od(e.contextName);const n=s?pd(s):e.contextName,r=fd(n),a=Hr(e.openActionType,e),o=mt(a,e.context),i=K(e.context,H(a,e.context));if(sh(Fh({target:o,context:i,containerItemID:i,key:e.caseID,caseViewMode:j.PERFORM_MODE,actionName:e.name,showProgress:!0,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,type:"view"}},data:{key:e.caseID,caseInfo:{ID:e.caseID}}})),sh(Wh({context:i})),e.modalLoadingContainer={target:o,context:i},!Id(e.contextName)[0])return By(e,t);if(!e.continueExecution)return By(e,t);if(!Nl(r))return By(e,t);e.saveActionPayload.modalLoadingContainer=e.modalLoadingContainer,e.saveActionPayload.canUpdateAvailableActions=!e.saveActionPayload.isModalAction;return ji([Ll(e.saveActionPayload)]).pipe(Bl((e=>(e=>{let t,n=0;const r=[],s={value:rh()?.getState()};return ql(e).pipe(Vl(Ml),kl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n,caseType:t}=e.payload),!a){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),ql([])}return Fy({action:e,state$:s,actionMgrID:n,caseType:t,actionsOut:r},!0)})))})(e))),Bl((n=>{if(1===n.length&&Kr(n[0].type)){const{continueExecution:n}=jc(s);if(!n)return ln.rejectActionByID(e.actionMgrID),Yl.pipe(Vi((()=>Kl()))).toPromise();if(n)return By(e,t)}return By(e,t)})),$l((e=>e)))}return By(e,t)},Wy=async(e,t,{headers:n,actionInPayload:r})=>{const{context:s,actionName:a,openActionType:o,doDeleteCaseSummary:i,modalLoadingContainer:c}=r,l=Sm(e),u=Hr(o,r),d=c?.target??mt(u,s);let p,h,g=!1;!Cd(d)||Sd(d)&&!cd(d,e.data.caseInfo.ID)?(h=H(u,s),Yr(u)&&(h=K(s,h)),p=h,g=!0):(p=Sd(d)?ld(d,e.data.caseInfo.ID):pd(d),h=fd(p));const f={acName:d,target:d,containerName:u,context:h};await bc(l,r,f),(void 0===l?.data?.caseInfo?.content||void 0!==l.data.caseInfo.content&&"object"==typeof l.data.caseInfo.content&&0===Object.keys(l.data.caseInfo.content).length)&&delete l.data?.caseMessages;const m=l.uiResources?.root;let y;y=m?j.PERFORM_MODE:j.REVIEW_MODE;const I=Rc(l,{target:d,context:h,containerItemID:p,caseViewMode:y,doDeleteCaseSummary:i,headers:n,actionName:a,isMinimizable:!1,isInCreateStage:Yr(u),resourceType:$y.ASSIGNMENT,isProcessAction:r.isProcessAction,showProgress:r.showProgress,progressMessage:r.progressMessage,assignmentID:r.assignmentID,actionType:r.actionType});m&&as(I,l),Yr(u)&&delete I.doDeleteCaseSummary,r.openActionType===Ke&&(I.isBulkAction=!0,I.data.caseInfo.actionButtons.main[0].jsAction="async"===r.runningMode?"submitBulkActionAsync":"submitBulkAction",I.data.caseInfo.actionButtons.secondary[0].jsAction="cancelBulkAction",I.data.caseInfo.cases=r.selectedList);const E=g?Fh:Gh;if(t.push(ng(E,I)),g||t.push(ng(Hh,I)),g){const s=Id(r.contextName),a=ld(s,e.data.caseInfo.ID);if(a){const e={data:{caseInfo:{headers:n}},context:a};t.push(ng(bh,e))}}return p!==pd(d)&&t.push(ng(zh,{target:d,containerItemID:p})),ss(p)&&!c?.context&&Gc(I,t),I.caseViewMode===j.REVIEW_MODE&&t.push(ng(Kh,I)),t},Hy="OPEN_LOCAL_ACTION",qy=(e,t)=>Gy(e,t),zy=e=>{let t=0,n=[];return e.pipe(Vl(Hy),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>qy(e,{actionMgrID:t}))),Bl((async e=>{if(!e)return Yl;if(Kr(e.type)){const t=wc(e);n.push(t);const{context_data:r}=ah(e.payload.context)||{};return r?.isLoading&&n.push(ng(Hh,e.payload)),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return Eh.setIn(s,"data.caseInfo.activeActionID",a),Eh.setIn(s.data,j.CASE_INFO_IS_LOCAL_ACTION,!0),t.refreshConditions&&Eh.setIn(s.data,j.CASE_INFO_REFRESH_CONDITIONS,t.refreshConditions),await Wy(s,n,{headers:r,actionInPayload:t}),Vy(t),n})),$l((()=>(sh(n),is(n,t),n=[],n))))},Yy=e=>{const{actionID:t,context:n,openActionType:r,caseTypeID:s,bulkContextID:a="",bulkContextType:o=""}=e,i=Ke,{reqType:c,restApi:l}=_g(i,{caseTypeID:s,actionID:t,bulkContextID:a,bulkContextType:o});return ji(pc(l,{method:c},n)).pipe($l((t=>({response:t.data,actionInPayload:e,headers:Pc(t.headers)}))),Xl(`: Error occurred during ajax call at ${r} Epic : `,n))},Ky=e=>{const{callbacks:t}=e;if(t?.submit){const e=e=>{var n;t.submit(e),n="bulkActionSubmit",Br.unsubscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n)};n=e,r="bulkActionSubmit",Br.subscribe(j.PUB_SUB_EVENTS.EVENT_BULKACTION,n,r)}var n,r},Xy="OPEN_BULK_ACTION",Jy=e=>{let t=0,n=[];return e.pipe(Vl(Xy),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>((e,t)=>{const{context:n}=e,{actionMgrID:r}=t;e.openActionType=Ke;const s=Hr(Ke,e),a=mt(s,n),{continueExecution:o}=jc(a);return o?Yy(e):(ln.rejectActionByID(r),Kl())})(e,{actionMgrID:t}))),Bl((async e=>{if(e&&Kr(e.type)){const t=wc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e,{actionID:a}=t;return Eh.setIn(s,"data.caseInfo.activeActionID",a),await Wy(s,n,{headers:r,actionInPayload:t}),Ky(t),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))};var Qy=Array.isArray,Zy=Object.getPrototypeOf,eI=Object.prototype,tI=Object.keys;function nI(e){if(1===e.length){var t=e[0];if(Qy(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Zy(r)===eI){var n=tI(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}var rI=Array.isArray;function sI(e){return $l((function(t){return function(e,t){return rI(t)?e.apply(void 0,$o([],ko(t))):e(t)}(e,t)}))}function aI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return qo(Wl(e))?e.pop():void 0}(e),r=nI(e),s=r.args,a=r.keys,o=new Ei((function(e){var t=s.length;if(t)for(var n=new Array(t),r=t,o=t,i=function(t){var i=!1;Ri(s[t]).subscribe(xi(e,(function(e){i||(i=!0,o--),n[t]=e}),(function(){return r--}),void 0,(function(){r&&i||(o||e.next(a?function(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}(a,n):n),e.complete())})))},c=0;c<t;c++)i(c);else e.complete()}));return n?o.pipe(sI(n)):o}const oI=e=>{const{actionID:t,context:n,cases:r,classID:s}=e,{content:a}=Dc(n,{nonEmptyAndChangedData:!0});let o=5;try{const e=ku.getSharedState("D_pySingleExecutionBulkActionsMeta.D_pySingleExecutionBulkActionsMeta.pxResults");e?.find((e=>e.pyClassName===s))?.pyList.split(",").includes(t)&&(o=1)}catch(e){console.error('Failed to fetch to "D_pySingleExecutionBulkActionsMeta" DP response',e)}const i=r.map((e=>({ID:e}))),c=i.length/o,l=Xe,{reqType:u,restApi:d}=_g(l,{actionID:t}),p=[],h=i.length;for(let t=0;t<h;t+=c)a.cases=i.slice(t,t+c),a.cases.length&&p.push(ji(pc(d,{method:u,body:a},n)).pipe($l((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Pc({...r})}})),Xl("Error occurred during ajax call at submitbulkaction Epic : ",n)));return aI(p)},iI=e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},cI="SUBMIT_BULK_ACTION",lI=e=>{let t,n=0,r=[],s="";return e.pipe(Vl(cI),kl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),ql([])}return ql(e.payload).pipe(Bl((e=>(t=e,oI(t)))),Bl((e=>{let n=0,a=0;const o=[],{containerItemID:i,context:c}=t;return e.map((e=>{const{response:t}=e;n+=Number(t.successCount),a+=Number(t.failureCount),a&&t.results.map((e=>{"200"!==e.status&&e.error&&e.error.errorDetails&&e.error.errorDetails.forEach((t=>{o.push({ID:e.BusinessID,message:t.localizedValue})}))}))})),s=`${n} record(s) updated`,iI({submitResponse:e}),t.target=`${j.APP.APP}/${td.MODAL}`,r.push(ng(Kh,{containerItemID:i,context:c,target:t.target,skipReleaseLockRequest:!0})),a&&r.push(ng(Yh,{messages:[{type:"error",message:`${a} records failed to update`,errorDetails:o,showHeader:!1}],context:W(c)||c,category:"HTTP",showHeader:!1})),r})),$l((()=>(ln.resolveActionByID(n,s),sh(r),r=[],r))))})))},uI=e=>{const{actionID:t,context:n,cases:r}=e,{content:s}=Dc(n,{nonEmptyAndChangedData:!0});s.cases=r.map((e=>({ID:e})));const a=Xe,{reqType:o,restApi:i}=_g(a,{actionID:t,runningMode:"async"});return ji(pc(i,{method:o,body:s},n)).pipe($l((t=>{const{data:n,headers:r}=t;return{response:n,actionInPayload:e,headers:Pc({...r})}})),Xl("Error occurred during ajax call at submitbulkaction Epic : ",n))},dI=e=>{Br.publish(j.PUB_SUB_EVENTS.EVENT_BULKACTION,e)},pI="SUBMIT_BULK_ACTION_ASYNC",hI=e=>{let t,n=0,r=[],s="";return e.pipe(Vl(pI),kl((e=>{const{isFormValid:a}=e.payload;if(({actionMgrID:n}=e.payload),!a){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,e),ql([])}return ql(e.payload).pipe(kl((e=>(t=e,uI(t)))),$l((e=>{const n=[],{containerItemID:a,context:o}=t,{response:i}=e,c=Number(i.failureCount)||0;return c>0&&i.results.forEach((({status:e,error:t,BusinessID:r})=>{"200"!==e&&t&&t.errorDetails&&t.errorDetails.forEach((({localizedValue:e})=>{n.push({ID:r,message:e})}))})),s="Processing bulk actions",dI({submitResponse:i}),t.target=`${j.APP.APP}/${td.MODAL}`,r.push(ng(Kh,{containerItemID:a,context:o,target:t.target,skipReleaseLockRequest:!0})),c&&r.push(ng(Yh,{messages:[{type:"error",message:1===c?"1 record failed to update":`${c} records failed to update`,errorDetails:n,showHeader:!1}],context:W(o)||o,category:"HTTP",showHeader:!1})),r})),$l((()=>(ln.resolveActionByID(n,s),sh(r),r=[],r))))})))},gI=(e,t)=>Gy(e,t),fI=e=>{let t=0,n=[];return e.pipe(Vl(vl),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>(Xn(e.context),gI(e,{actionMgrID:t,isProcessAction:!0})))),Bl((async e=>{if(e&&Kr(e.type)){const t=wc(e);return n.push(t),n}const{actionInPayload:t,headers:r,response:s}=e;return await Wy(s,n,{headers:r,actionInPayload:t}),n})),$l((()=>(Wc(n),is(n,t),n=[],n))))},mI=e=>{let t=0,n=[];return e.pipe(Vl(Ce,Me),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{containerItemID:t,caseID:n,context:r,caseDeleted:s,skipReleaseLockRequest:a}=e,o=ah(t),i=o?.context_data?.caseViewMode,c=i===j.PERFORM_MODE;return t!==r||s||a||!(n&&c)?ql([]):Py(e)})),Bl((e=>(e&&Kr(e.type)&&n.push(wc(e)),n))),$l((()=>(sh(n),is(n,t),n=[],n))))};var yI=new Xg(qg),II=yI;function EI(e,t,n){void 0===e&&(e=0),void 0===n&&(n=II);var r=-1;return null!=t&&(Gl(t)?n=t:r=t),new Ei((function(t){var s,a=(s=e)instanceof Date&&!isNaN(s)?+e-n.now():e;a<0&&(a=0);var o=0;return n.schedule((function(){t.closed||(t.next(o++),0<=r?this.schedule(void 0,r):t.complete())}),a)}))}function AI(e,t){return void 0===e&&(e=0),void 0===t&&(t=yI),e<0&&(e=0),EI(e,e,t)}function _I(e){return vi((function(t,n){var r=!1,s=null,a=null,o=function(){if(null==a||a.unsubscribe(),a=null,r){r=!1;var e=s;s=null,n.next(e)}};t.subscribe(xi(n,(function(t){null==a||a.unsubscribe(),r=!0,s=t,a=xi(n,o,ri),Ri(e(t)).subscribe(a)}),(function(){o(),n.complete()}),void 0,(function(){s=a=null})))}))}const SI=(e,t,n,r,s)=>{if(s!==j.RESOURCE_STATUS.CREATE)return;Kc.isStateMachineExist(e,t,n)||Kc.setStateMachine(e,n,t,new ir(n,t,e));Kc.getStateMachine(e,t,n).insert({},r+1,!0,{isDefault:!0})},CI=e=>{const{context:t}=e;let n={...Dc(t).content,contextData:!1};const r=qc(t);Eh.isEmpty(r)||(n=Hc(r,n));const{restApi:s,reqType:a}=_g("refreshCaseView",e);return n.interestPage=e.interestPage,ji(pc(s,{method:a,body:n},t)).pipe($l((t=>({actionInPayload:e,response:t.data,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call : ",t))},TI=e=>{let t=0,n=[],r="";return e.pipe(Vl(pt),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>CI(e))),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),{actionsOut:n,actionInPayload:{skipPageInstructions:!0}};const{actionInPayload:t,response:s}=e,a=t.containerName,o=mt(a,t.context);let i=Lc(o,a,t.context);i=K(t.context,i);const c=Sm(s);c.key=t.ID,c.data?.caseInfo&&(c.data.caseInfo.ID=t.ID);const l={isMultiRecordData:!0,viewName:t.viewID,parentContext:t.context,interestPage:t.interestPage};c.uiResources.context_data.modalView=l;const u=ah(t.context)?.context_data?.caseInfo,d=`${t.pageReference}${t.targetProperty}`,p=Bn(u,d.replace(F.CASE_INFO.CASE_INFO_CONTENT,"").slice(1),t.index);c.uiResources.context_data.caseInfo={...c.uiResources.context_data.caseInfo,content:{...c.uiResources.context_data.caseInfo?.content,...p?.content}};const h={acName:o,context:i};await bc(c,t,h);const g=Rc(c,{target:o,context:i,containerItemID:i});g.resourceStatus=t.actionType,g.isMultiRecordData=!0,g.parentContext=t.context,g.heading=t.heading;const f=Mc(o,g);return r=i,n.push(f),$c(n),{actionsOut:n,actionInPayload:t}})),$l((({actionInPayload:e})=>(Xr(n)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],e.skipPageInstructions||SI(r,e.pageReference,e.targetProperty,e.index,e.actionType),n))))},NI=e=>{let t,n="",r=[];return e.pipe(Vl(ht),kl((e=>{t=e.payload;const{isFormValid:s}=e.payload;if(({actionMgrID:n}=e.payload),!s){const t={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(n,!0,t),bu.handleDeferredActionCompletion(e.payload.context),ql([])}return ql(e.payload).pipe(Bl((e=>(t=e,CI(t)))),Bl((async e=>{if(e&&e.type===Ee){const t=wc(e);return r.push(t),r}const{containerItemID:n,context:s}=t;var a,o,i,c;return a=s,o=t.parentContext,i=F.CASE_INFO.CASE_INFO_CONTENT,c=!1,fr(a).forEach((e=>{const t=Eh.convertClipboardPageToPageRefNotation(e.target);Kc.isStateMachineExist(o,i,t)||Kc.setStateMachine(o,t,i,new ir(t,i,o));const n=Kc.getStateMachine(o,i,t);switch(e.instruction.toLowerCase()){case"insert":n.insert(e.content,e.listIndex,c,{});break;case"update":n.update(e.content,e.listIndex,c,{});break;case"delete":e.listIndex?n.delete(e.listIndex,c):n.deletePage();break;case"replace":n.replacePage(e.content);break;case"move":n.move(e.listIndex,e.listMoveToIndex);break;case"delete all":n.deleteAll()}})),r.push(ng(Kh,{containerItemID:n,context:s,target:t.target,skipReleaseLockRequest:!0})),r})),$l((()=>{if(Xr(r))ln.rejectActionByID(n),bu.handleDeferredActionCompletion(t.context);else{ln.resolveActionByID(n),bu.handleDeferredActionCompletion(t.context);const{pageReference:r}=e.payload;if(Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.IS_MULTI_RECORD_DATA,r,t.parentContext)){const e=Ch.getPropertyValue(F.CASE_INFO.CASE_INFO_ID,r,t.parentContext),n=Ch.getPropertyValue(j.CONTEXT_DATA_MODAL_VIEW.VIEW_NAME,r,t.parentContext),s=t.pageReference?.substring(0,t.pageReference?.lastIndexOf(".")),a=s.replace(j.CASE_INFO.CASE_INFO_CONTENT,"");vn(e,n,t.parentContext,a,{})}else Ln(t.parentContext,j.CASE_INFO.CASE_INFO_CONTENT,{})}return sh(r),r=[],r})))})))},PI=e=>{const{caseID:t,headers:n,debugInfo:r,context:s}=e,a=_g("getDescendants",{caseID:t}),{restApi:o}=a,{reqType:i}=a;let c={};return cp.getPerformanceDashboardVisibility()&&(c=jm.getActionInfo(j.TOP_ACTION_LABEL.GETDESCENDANTS)),ji(pc(o,{method:i,headers:{...n,...r&&{...nc.addDebugHeaders(r)}}},s,c)).pipe($l((t=>({actionInPayload:e,response:t.data,headers:Pc({...n,...t.headers})}))),Xl("Error ocurred during ajax call at getDescendants Epic : ",s))},DI=e=>{let t=0,n=[];return e.pipe(Vl(Ru),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>PI(e))),Bl((async e=>{if(e&&Kr(e.type))return n.push(wc(e)),n;const{actionInPayload:t,response:r}=e,s={};Eh.setIn(s,"caseInfo.childCases",r?.childCases);const a={data:s,context:t?.context};return n.push(ng(bh,a)),n})),$l((()=>(sh(n),is(n,t),n=[],n))))},RI=[Jm,ay,uy,zy,Jy,lI,hI,fI,Ty,xy,Ry,mI,jy,Ly,e=>e.pipe(Vl(He),_I((()=>AI(100))),$l((e=>{const{actionMgrID:t,isChildCase:n,isModalAction:r,isProcessAction:s,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}=e.payload;return ln.resolveActionByID(t),Br.publish(j.PUB_SUB_EVENTS.EVENT_SHOW_CANCEL_ALERT,{isModalAction:r,hideDelete:!s&&n,isDataObject:a,skipReleaseLockRequest:o,isInCreateStage:i}),[]}))),e=>e.pipe(Vl(Le),_I((()=>AI(100))),$l((e=>{const{actionMgrID:t,context:n,containerName:r,containerItemID:s}=e.payload,a=mt(r,n);return ln.resolveActionByID(t),sh(ng(zh,{containerItemID:s,target:a,doDeleteCaseSummary:!1})),[]}))),TI,NI,DI],bI=RI;function OI(){return vi((function(e,t){e.subscribe(xi(t,ri))}))}const{RESOURCE_TYPES:vI}=F,xI=[e=>e.pipe(Vl(te),$l((e=>e.payload)),Bl((e=>{const t={caseID:e.caseId,viewID:e.viewName,caseClassName:e.caseClassName,RemoteSystemID:e.RemoteSystemID};if(e.containerName===td.PREVIEW&&e.context&&e.caseId&&!e.updateData){const t=mt(td.PREVIEW,e.context),n=Lc(t,td.PREVIEW,e.context,{buildNew:!0}),r=decodeURI(e.caseId);sh(Fh({...e,context:n,target:t,containerItemID:n,key:r,caseViewMode:j.REVIEW_MODE,root:{type:"reference",config:{context:j.CASE_INFO.CASE_INFO_CONTENT,name:e.viewName,type:"view"}},data:{key:r,caseInfo:{ID:r,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($.isRemoteCase(t.caseClassName)){const{RemoteSystemID:e}=$.getRemoteCase(t.caseClassName);n.RemoteSystemID=e}let{restApi:r,reqType:s}=_g("loadView",t);return e.viewContext===vI.PAGE&&({restApi:r,reqType:s}=_g(je,{page:e.viewName,pageClass:e.pageClass})),ji(pc(r,{method:s,headers:n},e.context)).pipe($l((t=>{const n=decodeURI(e.caseId);let r="";return"string"==typeof t.data?t.data?r=JSON.parse(t.data):(console.error("response data is empty!!"),r={}):r=t.data,{response:{...r,key:n},actionConfig:e,headers:Pc(t.headers),rootView:Eh.getIn(r,j.ROOT)}})),Xl(": Error ocurred during ajax call at loadView Epic : ",e.viewLoadingContainer?.context??e.context))})),Bl((async e=>{const t={};if(e?.type===Ee){if(t.actionsOut=wc(e),e?.payload?.context?.includes(td.PREVIEW)){const n={...ah(e.payload.context),caseInfo:{progress:!1,error:!0}},r=mt(td.PREVIEW,e.payload.context);t.actionsOut=ng(Gh,{key:n.key,target:r,containerName:td.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:r,headers:s}=e,{containerItemID:a,containerName:o}=n,{target:i,context:c}=(e=>{const{containerName:t,updateData:n,viewLoadingContainer:r}=e,s=t||Vr.getTargetViewContainerName(je),a=r?.target??mt(s,e.context);return{target:a,context:r?.context??(t===td.PREVIEW&&n?e.context:Lc(a,s,e.context,{buildNew:!!t}))}})(n);n.context=c;const l={acName:i,context:c};let u={};u=o===td.PREVIEW?Sm(r):Sm(r,{[F.STOPMERGEACTIONS]:!0,[F.ACTIONS.DELETEAVIALACTIONS]:!0}),u.directUrlUpdation=!1,await bc(u,n,l);const d={...n,target:i,context:c,containerItemID:a||c,headers:s},p=Rc(u,d);if(p.resourceType=vI.CASE,o&&!p.updateData){p.caseViewMode=j.REVIEW_MODE;const e=Od(p?.context);((e,t,n,r,s)=>{e&&s===td.PREVIEW?(n.data.caseInfo.progress=!1,delete n.root,r.actionsOut=ng(Gh,{...n,containerName:s})):e?(r.actionsOut=[],r.actionsOut.push(ng(zh,{target:t,containerItemID:e}))):r.actionsOut=ng(Fh,{...n,containerName:s})})(ld(e,p.key),e,p,t,o)}else p.preserveClientChanges=!0,t.actionsOut=[],o===td.PREVIEW&&t.actionsOut.push({type:st,payload:{context:c}}),t.actionsOut.push(ng(bh,p))}catch(e){console.error(e),t.rootView={type:"error",payload:e}}const{caseId:n,context:r,viewName:s}=e.actionConfig;return"pyCasePreview"===s&&(e=>{Br.publish(j.PUB_SUB_EVENTS.CASE_EVENTS.CASE_PREVIEW,e)})({caseId:n,context:r}),t})),$l((({rootView:e,actionsOut:t,actionMgrID:n=0})=>(ln.resolveActionByID(n,e),t)))),e=>{let t=0,n=[];return e.pipe(Vl(ne),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED);const{debugInfo:n,context:r,viewName:s,className:a,skipSemanticUrl:o=!1,containerName:i=Vr.getTargetViewContainerName(je)}=e,c=n&&{...nc.addDebugHeaders(n)},l=mt(i,r);let u="",d={},p=!0;if(!o){if(u=Eg(je,{page:s}),l&&u){const{activate:t,activateContainerActionPayload:n}=kc(vI.PAGE,l,{semanticURL:u});if(t)return ql({type:ve,activateContainerActionPayload:n,actionConfig:e})}if(pd(l)&&({continueExecution:p,removeActionPayload:d}=jc(l)),!p)return ln.rejectActionByID(t),Kl()}const{restApi:h,reqType:g}=_g(je,{page:s,pageClass:a});return ji(pc(h,{method:g,headers:c},r)).pipe($l((t=>{let n={};return n="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...n,key:u,semanticURL:u},actionConfig:e,headers:Pc(t.headers),removeActionPayload:d,skipSemanticUrl:o}})),Xl(": Error ocurred during ajax call at showPage Epic : ",e.context))})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;let{type:t}=e;const{actionConfig:r,skipSemanticUrl:s}=e,a=r.containerName||Vr.getTargetViewContainerName(ne),o=mt(a,r.context);Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className});const{remoteCasePayload:i,updatedType:c}=((e,t,n,r)=>{let s={},a=e;if(n.isTraditionalRemoteCase){s={...n};const e=ld(r,s.insKey);e&&(t.activateContainerActionPayload={containerItemID:e},a=ve)}return{remoteCasePayload:s,updatedType:a}})(t,e,r,o);if(t=c??t,t===ve){const{activateContainerActionPayload:{semanticURL:t,containerItemID:s}}=e,a={acName:o,context:fd(s)};r.isTraditionalRemoteCase||await bc({directUrlUpdation:!0,semanticURL:t},r,a,!0),n.push(ng(zh,{target:o,containerItemID:s}))}else{const t=Lc(o,a,r.context),{response:c,headers:l={},removeActionPayload:u}=e,d=Sm(c,{isCreateDataObject:r.isCreateDataObject});d.directUrlUpdation=!s;const p={acName:o,context:t};await bc(d,r,p);const h={target:o,context:t,containerItemID:t,headers:l,debugInfo:r.debugInfo},g=Rc(d,h);g.resourceType=F.PAGE,r.isCreateDataObject&&(g.resourceType=F.RESOURCE_TYPES.DATA,g.resourceStatus=F.RESOURCE_STATUS.CREATE,delete g.data.caseInfo),((e,t,n)=>{e.isTraditionalRemoteCase&&(n.resourceType=F.CASE,n.key=Sc.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:Qr(t.insKey)}},n.isTraditionalRemoteCase=!0,n.className=t.className)})(r,i,g);const f=Mc(o,g);u.containerItemID&&Uc(f)&&n.push(ng(Kh,{containerItemID:u.containerItemID,target:o})),n.push(f),$c(n)}return Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:o,pageName:e.actionConfig.viewName,pageClass:e.actionConfig.className}),n})),$l((()=>{ln.resolveActionByID(t),sh(n),n=[]})),OI())}],wI=xI;const MI=(e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:o,skipSemanticUrl:i}=e,{removeActionPayload:c}=t,{restApi:l,reqType:u,body:d}=_g(Ve,{pageName:r,dataContext:s,dataContextParameters:a});let p={};return cp.getPerformanceDashboardVisibility()&&(p=jm.getActionInfo(j.TOP_ACTION_LABEL.SHOWDATA)),ji(pc(l,{method:u,body:d},n,p)).pipe($l((t=>({response:{...t.data,key:o,semanticURL:o},actionConfig:e,headers:Pc(t.headers),removeActionPayload:c,skipSemanticUrl:i}))),Xl("Error occurred during ajax call at showData Epic : ",e.context))},{RESOURCE_TYPES:LI}=F,UI=e=>{let t,n=0,r=[];return e.pipe(Vl(re),(s=e=>(({actionMgrID:n}=e.payload),ql(e.payload).pipe(Bl((e=>((e,t)=>{const{context:n,pageName:r,dataContext:s,dataContextParameters:a,skipSemanticUrl:o=!1,isDeferLoaded:i=!1,parentAction:c="",resourceType:l}=e;let{containerName:u}=e;u||(u=Vr.getTargetViewContainerName(ne));const d=mt(u,n);let p="",h={},g=!1;if(!o){p=Eg(Ve,{pageName:r,dataViewName:s},a);const{activate:n,activateContainerActionPayload:o}=kc(LI.PAGE,d,{semanticURL:p});if(n)return ql({type:ve,activateContainerActionPayload:o,actionConfig:e});if(({continueExecution:g,removeActionPayload:h}=jc(d)),!g)return ln.rejectActionByID(t),Kl()}return MI({context:n,pageName:r,dataContext:s,dataContextParameters:a,semanticURL:p,skipSemanticUrl:o,containerName:u,isDeferLoaded:i,parentAction:c,resourceType:l},{removeActionPayload:h})})(e,n))),Bl((async e=>{if(e&&e.type===Ee)return r.push(wc(e)),r;const{type:n,actionConfig:s,headers:a,response:o,skipSemanticUrl:i}=e;t=Eh.getIn(o,j.ROOT);const{containerName:c,parentAction:l,resourceType:u}=s,d=mt(c,s.context);let p;if(s.isDeferLoaded){p=Sm(o),p.directUrlUpdation=!i;const t={acName:d,context:s.context};await bc(p,s,t);const n={target:d,headers:a,context:s.context,containerItemID:e.containerItemID},c=Rc(p,n);return r=ng(bh,c),r}if(n===ve){const{activateContainerActionPayload:{semanticURL:t,containerItemID:n}}=e,a={acName:d,context:fd(n)};await bc({directUrlUpdation:!0,semanticURL:t},s,a,!0),r.push(ng(zh,{target:d,containerItemID:n,resourceType:LI.DATA}))}else if("DATA"===u&&l===dt){const{context:e}=s,t=o?.data,n={context:e,data:t};r.push(ng(bh,n))}else{const t=Lc(d,c,s.context),{removeActionPayload:n}=e;p=Sm(o),p.directUrlUpdation=!i;const l={acName:d,context:t};await bc(p,s,l);const u=Rc(p,{target:d,context:t,containerItemID:t,headers:a});u.resourceType=LI.DATA;const h=Mc(d,u);n.containerItemID&&Uc(h)&&r.push(ng(Kh,{containerItemID:n.containerItemID,target:d})),$c(r),r.push(h)}return r})),$l((()=>(ln.resolveActionByID(n,t),sh(r),r=[],r))))),qo(a)?Bl(s,a,1):Bl(s,1)));var s,a},FI=e=>{const{dataViewName:t,context:n,dataViewParameters:r}=e,s={data_view_ID:t,dataViewParameters:encodeURIComponent(JSON.stringify(r))},{restApi:a,reqType:o}=_g("deleteDataObject",s);return ji(pc(a,{method:o},n)).pipe($l((t=>({response:t.data,actionInPayload:e}))),Xl("Error occurred during ajax call at deleteDataObject Epic",n))},jI=e=>{let t=0,n=[];return e.pipe(Vl(it),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>FI(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}return[]})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))},VI=e=>{const{dataViewID:t,dataViewParameters:n,context:r}=e,s={data_view_ID:t},{restApi:a,reqType:o}=_g("getDataObjectActions",s);return ji(pc(a,{method:o,body:{dataViewParameters:n}},r)).pipe($l((e=>({...e.data}))),Xl("Error occurred during ajax call at GET data object actions : ",e.context))},kI=e=>{let t=0,n=[];let r={};return e.pipe(Vl(ye),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>VI(e))),Bl((async e=>e&&e.type===Ee?(n.push(wc(e)),n):(r=e,[]))),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t,r),sh(n),n=[],n))))},$I=[UI,e=>{let t=0,n=[];return e.pipe(Vl(ot),Jl(100),kl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),ql([])}return ql(e.payload).pipe(Bl((e=>Ql(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?td.MODAL:td.PRIMARY,i={target:mt(o,s),containerItemID:s,context:s};return n.push(ng(Kh,i)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))})))},e=>{let t=0,n=[];return e.pipe(Vl(ct),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>Zl(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o}=r,i=mt(o,r.context),c=Lc(i,o,r.context),l={acName:i,context:c};await bc(s,r,l);const u=Rc(s,{target:i,context:c,containerItemID:c,headers:a});return u.resourceType=F.RESOURCE_TYPES.DATA,u.resourceStatus=F.RESOURCE_STATUS.UPDATE,u.key=JSON.stringify(r.requestPayload),n.push(ng(Fh,u)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Vl(lt),Jl(100),kl((e=>{const{isFormValid:r}=e.payload;if(({actionMgrID:t}=e.payload),!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),ql([])}return ql(e.payload).pipe(Bl((e=>eu(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r}=e,{containerItemID:s,isModalAction:a}=r,o=a?td.MODAL:td.PRIMARY,i={target:mt(o,s),containerItemID:s,context:s};return n.push(ng(Kh,i)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))})))},jI,kI,e=>{let t=0,n=[];return e.pipe(Vl(ut),Jl(100),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>tu(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,actionID:i,context:c,actionName:l}=r,u=mt(o,r.context);let d=H(o,c);d=K(c,d);const p={target:u,context:d,containerItemID:d,headers:a,resourceType:F.RESOURCE_TYPES.DATA,resourceStatus:F.RESOURCE_STATUS.OPEN_FLOW_ACTION,key:JSON.stringify(r.dataViewParameters),actionID:i,actionName:l},h={acName:u,context:c};await bc(s,r,h);const g=Rc(s,p);return n.push(ng(Fh,g)),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))},e=>{let t=0,n=[];return e.pipe(Vl(dt),Jl(100),kl((e=>{const{isFormValid:r}=e.payload;({actionMgrID:t}=e.payload);const s=e.payload.context;if(!r){const e={type:F.SUBMISSION_FAILURE_TYPE.FORM_VALIDATION_ERROR};return ln.rejectActionByID(t,!0,e),ql([])}return qn({context:s,stateObj:ah(s),clearContextMessages:!0}),ql(e.payload).pipe(Bl((e=>nu(e))),Bl((async e=>{if(e&&e.type===Ee){const{payload:r}=e,s=wc({...e,...r,actionMgrID:t});return n.push(s),n}const{actionInPayload:r,response:s,headers:a={}}=e,{containerName:o,containerItemID:i,resourceType:c,key:l}=r,u=mt(o,r.context),d={acName:u,context:r.context};await bc(s,r,d);const p={key:l,target:u,resourceType:c,containerItemID:i,headers:a,context:r.context};return n=((e,t,n,r)=>{const{resourceType:s,key:a,containerItemID:o}=r,i=Rc(n,t);i.resourceType=s||F.RESOURCE_TYPES.DATA;const c=X(o);e.push(ng(Kh,i));const l=ch(".dataContext","dataInfo",c),u=ch(".dataContextParameters","dataInfo",c),d={context:c,skipSemanticUrl:!0,resourceType:s,parentAction:dt,dataContext:l,dataContextParameters:u},p=l&&u&&Eg(Ve,{pageName:j.PY_DETAILS,dataViewName:l},u)||"";if(o?.includes(j.PREVIEW)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DATA_PREVIEW,container:j.PREVIEW,containerName:j.PREVIEW,...d}};e.push(t)}else if(s!==j.PAGE&&a===p&&o?.includes(j.PRIMARY)){const t={type:re,payload:{pageName:j.VIEW_NAMES.PY_DETAILS,containerName:"",...d}};e.push(t)}return e})(n,p,s,{key:l,resourceType:c,containerItemID:i}),n})),$l((()=>(1===n.length&&Kr(n[0].type)?ln.rejectActionByID(t):ln.resolveActionByID(t),sh(n),n=[],n))))})))}],BI=$I;function GI(e,t){return void 0===t&&(t=yI),vi((function(n,r){var s=null,a=null,o=null,i=function(){if(s){s.unsubscribe(),s=null;var e=a;a=null,r.next(e)}};function c(){var n=o+e,a=t.now();if(a<n)return s=this.schedule(void 0,n-a),void r.add(s);i()}n.subscribe(xi(r,(function(n){a=n,o=t.now(),s||(s=t.schedule(c,e),r.add(s))}),(function(){i(),r.complete()}),void 0,(function(){a=s=null})))}))}const{RESOURCE_TYPES:{CASE:WI,DATA:HI}}=F;let qI=[],zI=!1;const YI={},KI=[e=>e.pipe(Vl(Ie),GI(200),$l((e=>e.payload)),Bl((e=>{zI=!1,Br.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{zI=!0}));const t=ec.getPreviewMode()&&nc.addDebugHeaders({debugId:Eh.generateUniqueID()});YI.dataContext=e.payload.dataViewName,YI.dataContextParameters=e.payload.dataViewKeys;const{context:n,requestType:r,routeKey:s}=e;let{routeEndpoint:a}=e;a=a&&a.indexOf("viewType={viewType}")>0?a.replace("{viewType}","page"):a&&a.indexOf('viewType=""')>0?a.replace('viewType=""','viewType="page"'):a;const o=E()+a,i=e.options.context;let c;const l={},u=e?.payload?.caseClassName;if($.isRemoteCase(u)){const{RemoteSystemID:e}=$.getRemoteCase(u);l.RemoteSystemID=e}if("POST"===r){c=e.payload,a.indexOf("viewType=")<0&&(a=`${a}?viewType=page`);let i;switch(Bc(s)){case WI:i={caseTypeID:c.caseTypeID,processID:c.processID,content:{}};break;case HI:i=YI;break;default:i=c}return ji(pc(o,{method:r,body:i,headers:{...l,...t}},n)).pipe($l((t=>({response:{...t.data},payload:e,headers:Pc(t.headers)}))),Xl(": Error occurred during ajax call at historyEpic : ",e))}return ji(pc(o,{method:"GET",headers:{...l,...t}},i.substring(0,i.lastIndexOf("/")))).pipe($l((n=>({response:n.data,payload:e,headers:{...Pc(n.headers),...t}}))))})),Bl((async e=>{if(zI)return qI;if(Br.subscribe(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_STARTED,(()=>{zI=!0})),e&&e.type===Ee)return wc(e);const{headers:t={},response:n,payload:r}=e,s=Sm(n,{[F.STOPMERGEACTIONS]:!n.nextAssignmentInfo}),a=r.options.acName,o=_d(a)&&Cd(a)?pd(a):e.payload.options.context,i=o;t.RemoteSystemID=r?.payload?.RemoteSystemID;const c={target:a,context:o,containerItemID:i,headers:t,debugInfo:{debugId:t[j.COREHEADER_APP_DEBUG_ID]}};let l="";const u=r?.payload?.page;let d=r?.payload?.pageClass;r.payload&&r.payload.caseName&&r.payload.workID&&(l=Eg(Be,{caseName:e.payload.payload.caseName}),l=l&&l.replace("{workID}",e.payload.payload.workID)||"",d=r?.payload?.caseClassName),Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_INIT,{pageName:u,pageClass:d});const p=Eh.getIn(s,j.LOCALE_REFERENCES);await up.loadLocaleResources(p);const h=Eh.getIn(s,j.COMPONENTS);h&&await Fr(h),xr(s,r.options.actionConfig,!0),Br.publish(F.PUB_SUB_EVENTS.UI_EVENTS.SHOW_PAGE_DONE,{target:a,pageName:u,pageClass:d});let g=Rc(s,c);return g=((e,t,n)=>{if(e===Cc.CASE){if(t?.caseInfo?.assignments&&t?.caseInfo?.assignments.length>0){const{key:e,flowName:r}=vc(t.caseInfo.assignments[0].ID);n.key=e||t.caseInfo.ID,n.flowName=r}else n.flowName="",n.key=t?.caseInfo?.ID||t.semanticURL;n.resourceType=e,n.semanticURL=t.semanticURL,n.caseViewMode=j.REVIEW_MODE}else n.resourceType=e,n.semanticURL=t.semanticURL;return n})(Bc(e.payload.routeKey),{...n.data,semanticURL:l,caseViewMode:j.REVIEW_MODE},g),qI.push(Mc(a,g)),$c(qI),qI})),$l((()=>(zI||sh(qI),qI=[],zI=!1,qI))),Xl("Error occurred"))],XI=[e=>{let t=0,n=[];return e.pipe(Vl(se),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:t,skipSemanticUrl:n=!1,insightID:r}=e;let s="";n||(s=Eg(ke,{insightID:"{insightID}"}),s=s.replace("{insightID}",r));const{restApi:a,reqType:o}=_g(ke,{insightID:r});return ji(pc(a,{method:o},t)).pipe($l((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),Xl(": Error occurred during ajax call at showPage Epic : ",e.context))})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=Vr.getTargetViewContainerName(ne),a=mt(s,t.context),o=Lc(a,s,t.context),{response:i}=e,c=Sm(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await bc(c,t,l,u,d);const p=Rc(c,{target:a,context:o,containerItemID:o});p.resourceType=F.PAGE;const h=Mc(a,p);return n.push(h),$c(n),n})),$l((()=>{ln.resolveActionByID(t),sh(n),n=[]})),OI())}],JI=[e=>{let t=0,n=[];return e.pipe(Vl(ae),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),Bl((e=>{const{context:t,skipSemanticUrl:n=!1,dashboardID:r}=e;let s="";n||(s=Eg($e,{dashboardID:r}),s=s.replace("{dashboardID}",r));const{restApi:a,reqType:o}=_g($e,{dashboardID:r});return ji(pc(a,{method:o},t)).pipe($l((t=>{let r={};return r="string"==typeof t.data?JSON.parse(t.data):t.data,{response:{...r,key:s,semanticURL:s},actionConfig:e,skipSemanticUrl:n}})),Xl(": Error occurred during ajax call at showPage Epic : ",e.context))})),Bl((async e=>{if(e&&e.type===Ee)return n.push(wc(e)),n;const{actionConfig:t,skipSemanticUrl:r}=e,s=Vr.getTargetViewContainerName(ne),a=mt(s,t.context),o=Lc(a,s,t.context),{response:i}=e,c=Sm(i);c.directUrlUpdation=!r;const l={acName:a,context:o},u=!r,d=r;await bc(c,t,l,u,d);const p=Rc(c,{target:a,context:o,containerItemID:o});p.resourceType=F.PAGE;const h=Mc(a,p);return n.push(h)})),$l((()=>{ln.resolveActionByID(t),sh(n),n=[]})),OI())}],QI=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Am.apply(void 0,e.map((function(e){var n=e.apply(void 0,t);if(!n)throw new TypeError('combineEpics: one of the provided Epics "'+(e.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})))};try{Object.defineProperty(n,"name",{value:"combineEpics("+e.map((function(e){return e.name||"<anonymous>"})).join(", ")+")"})}catch(e){}return n}(...Rm,...bI,...wI,...KI,...BI,...Om,...[e=>{let t=0;return e.pipe(Vl(Ze),$l((e=>(({actionMgrID:t}=e.payload),e.payload))),$l((()=>{const e=rh()?.getState(),n=Im();return h()(e,n)&&t>0?ln.resolveActionByID(t,{}):ln.rejectActionByID(t),[]})),OI())}],...XI,...JI),ZI=()=>e=>t=>{const{type:n="",payload:r={}}=t||{},{category:s,context:a,transientItemID:o}=r;"HTTP"!==s&&[Se,xe,Ce,Me,Ne,Oe].includes(n)&&(Qc(a||o),Pn.removeContextTreeNode(a||o)),e(t)},eE={},tE=e=>{const t=Eh.getIn(eE,[j.CONTEXT,e],[]),n=[];t.forEach((t=>{const r=t.substr(0,t.lastIndexOf("_")),s=Eh.getIn(eE,[r,t],[]),a=s&&s.length>0&&s.indexOf(e);if(a>-1&&s.splice(a,1),!s||s&&0===s.length){Eh.deleteIn(eE,[r,t]);const e=Eh.getIn(eE,[r]);e&&0===Object.keys(e).length&&Eh.deleteIn(eE,[r]),n.push({dataPageName:r,dataPageNameWithHash:t})}})),Eh.deleteIn(eE,[j.CONTEXT,e]);const r=Eh.getIn(eE,[j.CONTEXT]);(!r||r&&0===Object.keys(r).length)&&Eh.deleteIn(eE,[j.CONTEXT]),n.length>0&&sh(ag({dataPagesToBeRemoved:n}))},nE=(e={},t)=>{Object.keys(e).forEach((n=>{const r=Eh.getIn(e,[n],{});Object.keys(r).forEach((e=>{((e,t,n)=>{const r=Eh.getIn(eE,[j.CONTEXT,n]);if(Eh.getIn(eE,[e])){const r=Eh.getIn(eE,[e,t],[]);Eh.setIn(eE,[e,t],[...new Set([...r,n])])}else Eh.setIn(eE,[e,t],[n]);r?Eh.setIn(eE,[j.CONTEXT,n],[...new Set([...r,t])]):Eh.setIn(eE,[j.CONTEXT,n],[t])})(n,e,t)}))}))},rE=()=>e=>t=>{const{payload:{data:n={},context:r=null,childContainersContexts:s=[]}={},type:a}=t;if(s&&s.length>0&&(a===Me||a===Ce)&&s.forEach((e=>{tE(e)})),a===Se||a===fe||a===tt){const e=a===tt?n:n.shared;nE(e,r)}else a===Me?(tE(r),nE(n.shared,r)):a===Ce&&tE(r);e(t)},sE=e=>t=>n=>{const{type:r,payload:{target:s,containerItemID:a,context:o,childContainersContexts:i=[],containerInfo:{newAccessedOrder:c,containerType:l}={}}={}}=n,{PUB_SUB_EVENTS:u}=F;if(r===Ce){const{resourceType:t,key:n,context:r}=Eh.getIn(e.getState(),["containers",s,"items",a])||{},o={resourceType:t,key:n,context:r,containerItemID:a};Br.publish(u.CONTAINER_EVENTS.CLOSE_CONTAINER_ITEM,o),s===`${F.APP.APP}/${j.PRIMARY}`&&l===j.CONTAINER_TYPE.MULTIPLE&&Br.publish(u.CONTAINER_EVENTS.CLOSE_MULTI_TYPE_PRIMARY_CONTAINER_ITEM,{key:n,newAccessedOrder:c})}i&&i.length>0&&(r===Me||r===Ce)&&i.forEach((e=>{Du.cleanCaches(e)})),r!==Me&&r!==Ce||Du.cleanCaches(o),t(n)},aE=()=>e=>t=>{const{payload:{context:n=null,transientItemID:r=null}={},type:s}=t;!n||s!==Se&&s!==xe&&s!==Me&&s!==Ce||(yr(n),gr(n)),r&&s===Re&&(yr(r),gr(r)),e(t)},oE=function(e){void 0===e&&(e={});var t,n=new(0,Jg.constructor)(Jg.schedulerActionCtor),r=new Zg,s=function(s){t=s;var a=new Zg,o=new Zg,i=a.asObservable().pipe(Mi(n)),c=new nf(o.pipe(Mi(n)),t.getState());return r.pipe($l((function(t){var n=t(i,c,e.dependencies);if(!n)throw new TypeError('Your root Epic "'+(t.name||"<anonymous>")+"\" does not return a stream. Double check you're not missing a return statement!");return n})),Bl((function(e){return ji(e).pipe(Li(n),Mi(n))}))).subscribe(t.dispatch),function(e){return function(n){var r=e(n);return o.next(t.getState()),a.next(n),r}}};return s.run=function(e){r.next(e)},s}(),iE=e=>{const t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Gg;if(null!==rh())yh();else{const n=$g(Em(e),t(rf.reduxBatch,function(...e){return t=>(n,r)=>{const s=t(n,r);let a=()=>{throw new Error(Ug(15))};const o={getState:s.getState,dispatch:(e,...t)=>a(e,...t)},i=e.map((e=>e(o)));return a=Gg(...i)(s.dispatch),{...s,dispatch:a}}}(Rl,ZI,rE,aE,oE,sE),rf.reduxBatch));oE.run(QI),nh(n)}};const cE=new class{#I;constructor(){this.userSettings={},this.componentCache={},this.contextMapToClearOnCancel={},this.#I=!1}getNormalizedKey(e){return e?.toString().trim().replace(/\s/g,"-").toLowerCase()}setComponentState=(e,t)=>{sessionStorage?sessionStorage.setItem(this.getNormalizedKey(e),JSON.stringify(t)):console.error("Session Storage not found")};getComponentState=e=>{const t=sessionStorage.getItem(this.getNormalizedKey(e)),n=t?Eh.isValidJson(t):void 0;return n||t};removeComponentState=e=>{sessionStorage.removeItem(this.getNormalizedKey(e))};fetchUserSettings=async()=>{if(Bm("getUserSettings")){const{restApi:e,reqType:t}=_g("getUserSettings");pc(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=()=>{cp.getUserSettings()?this.userSettings=cp.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 Eh.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(!Bm("updateUserSettings"))return Promise.resolve("updateUserSettings route is not available");n=_g("updateUserSettings");const{restApi:r,reqType:s}=n;return pc(r,{method:s,body:Eh.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 r=n.clearOnCancelForContext;if(r&&(Object.hasOwn(this.contextMapToClearOnCancel,r)?this.contextMapToClearOnCancel[r].add(this.getNormalizedKey(e)):this.contextMapToClearOnCancel[r]=new Set([this.getNormalizedKey(e)])),this.componentCache[this.getNormalizedKey(e)]=t,!this.#I){this.#I=!0;const e=e=>{const{context:t}=e||{};(this.contextMapToClearOnCancel[t]||new Set).forEach((e=>{this.resetComponentCache(e)})),delete this.contextMapToClearOnCancel[t]};Br.subscribe(j.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}resetComponentCache(e){return!("string"!=typeof e||!e?.trim())&&(!!Object.hasOwn(this.componentCache,this.getNormalizedKey(e))&&(delete this.componentCache[this.getNormalizedKey(e)],!0))}},lE={publishConstellationLoadedEvent:()=>{Br.publish(j.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS.CONSTELLATION_LOADED,{})}};const uE=new class{activateContainerItemOnSwitch(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:ld(t,e)};Xu({}).getPConnect().getContainerManager().activateContainerItem(n)}removeContainerItemOnClose(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n={target:t,containerItemID:ld(t,e)};Xu({}).getPConnect().getContainerManager().removeContainerItem(n)}showCasePreview(e,t){Xu({}).getPConnect().getActionsApi().showCasePreview(e,{caseClassName:t})}closeCasePreview(){Xu({}).getPConnect().getContainerManager().resetContainers({name:j.PREVIEW,context:j.APP.APP})}isFormDirty(e){const t=`${j.APP.APP}/${j.PRIMARY}`,n=Yd(t,e);return Yc.isStateModified(n)}getEventUtils(){return lE}getBroadcastUtils(){return xm}isTraditionalUICase(e){return cs(e)}};const dE=class{static openCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.openCase(e,t,j.PRIMARY,n)}static createCase(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.createCase(e,t,j.PRIMARY,n)}static getNextWork(e=F.APP.APP,t={}){return t.renderInline=!0,t.pageName?cp.setDefaultCasePage(t.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),t.pageName=j.PY_DETAILS),t?.disableAssignmentHeader?cp.disableAssignmentHeader(t.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.getNextWork(e,j.PRIMARY,t)}static openAssignment(e,t=F.APP.APP,n={}){return n.renderInline=!0,n.pageName?cp.setDefaultCasePage(n.pageName):(cp.setDefaultCasePage(j.PY_DETAILS),n.pageName=j.PY_DETAILS),n?.disableAssignmentHeader?cp.disableAssignmentHeader(n.disableAssignmentHeader):cp.disableAssignmentHeader(!1),Fu.openAssignment(e,t,j.PRIMARY,n)}static openPage(e,t,n=F.APP.APP,r={}){const s=ne;r?.defaultCasePage?cp.setDefaultCasePage(r.defaultCasePage):cp.setDefaultCasePage(j.PY_DETAILS),r?.disableAssignmentHeader?cp.disableAssignmentHeader(r.disableAssignmentHeader):cp.disableAssignmentHeader(!1);const a={viewName:e,className:t,acTargetName:j.PRIMARY,actionMgrID:ln.getNextActionMgrId(),context:n},{promise:o}=ln.actionManagerPromise(s,a.actionMgrID);return sh({type:s,payload:{...a}}),o}static getCurrentContextAPI(e,t=F.APP.APP){return Xu({meta:{config:{}},options:{context:t,pageReference:e,containerName:j.PRIMARY}}).getPConnect()}};const pE=new class{createC11nEnv=e=>Xu(e);getContextUtils=()=>e;getRoutingManager=()=>t;getComponentsRegistry=()=>Xt;getStateManager=()=>c;getActionCreators=()=>l;getStreamObservable=()=>r;getActionProcessor=()=>Nh;getActionHandler=()=>Th;renderApp=(e,t)=>{const n={context:j.APP.APP},r={...Eh.getIn(e,j.ROOT),options:n};iE(e),xr(e,n,!0);const s=this.createC11nEnv({meta:r,isRoot:!0});Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:s,domContainerID:t})};updateStoreWithUiRoot=async(e,t,n)=>{const r=Sm(e),{data:s,uiResources:a={}}=e,o=Eh.getIn(a,j.CONTEXT_DATA);await bc(r,{},{},!1,!0);const i={...s,[j.CONTEXT_DATA]:o},{root:c}=a;xd(c,t,i,n)};fetchEndPointResource=(e,t,n)=>{pc(e,{method:"GET"},j.APP.ROOT).then((async e=>{const{data:r,status:s}=e;200===s&&this.updateStoreWithUiRoot(r,t,n)}))};loadComponent=async(e,t,n)=>Fr(n).then((()=>{const n=this.createC11nEnv({meta:e,isRoot:!0});rh()||iE({}),Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:n,domContainerID:t})}));setStaticServerUrl=(e,t,n)=>{Mr.initServer(e,t,n)};loadView=async(e,t,n=[])=>{y();const r=Sm(e),s=Eh.getIn(r,j.VIEWS),a=Eh.getIn(r,j.NAVIGATIONS),o=Eh.getIn(r,j.COMPONENTS)||[];o.push(...n);const i=Eh.getIn(r,j.STATIC_SERVER_URL),c=Eh.getIn(r,j.APPLICATION_DATA);s&&wp(s),a&&Mp(a),(e=>{e&&(fg=e.pyLabel)})(c),i&&Mr.initServer(i),await Fr(o,i).then((()=>this.renderApp(r,t)))};initAppShell=(e,t,n)=>{Mg(e),Vr.buildActionTargetMap(t),y(n)};initRoutingTable=(e,t)=>{Mg(e,!0),y(t)};setAppAlias=e=>{Mr.setAppAlias(e)};getHomeRestApi=e=>{const{restApi:t}=Ag("home",{portalName:e});return E()+t};getViewRestApi=(e,t)=>{const{restApi:n}=((e,t)=>{let n={restApi:""};try{if(xg()&&!t){const t=sp(),r=ip.processUrl(t,!0),s=ip._getMatchedRouteInRoutingTable(r)||"",a=ip.getRoutingInfo(),o=ip.processUrl(t,!1).split("/"),i=o[o.length-1];let{caseID:c}=a&&a.routes[s].payload;c=c.replace("{workID}",i),n=ip.getRestEndPoint("loadView",{caseID:c,viewID:e})||{}}else n=ip.getRestEndPoint("showView",{page:e,pageClass:t})||{}}catch(e){}return n})(e,t);return E()+n};loadRootComponent=async(e,t,n=[],r,s,a)=>{const{config:{name:o}={}}=t;rh()||iE({}),a&&(Bd(`${j.APP.ROOT}/${o}`),$d().deleteContainerItem(`${j.APP.ROOT}/${o}`)),$d().getContainerItems()?.length>1&&!o?.startsWith("hybrid_")&&"authoring-preview"!==o&&yh(),sh(bh({data:{},context:j.APP.ROOT}));const i=this.createC11nEnv({meta:t,options:{context:j.APP.ROOT,pageReference:"",target:`${j.APP.ROOT}/${o}`}}),c=i.getPConnect(),l=c.getContextName(),u=c.getContainerName(),d=c.getContainerManager();pd(`${l}/${u}`)||"noPortal"===t.config?.renderingMode||d.initializeContainers({type:"single"});const p=["RootContainer","Region","ModalViewContainer","PreviewViewContainer","reference",...n];return Fr(p).then((()=>{Br.publish(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,{props:i,domContainerID:e,componentName:"RootContainer",portalTarget:r,styleSheetTarget:s})}))};loadViewByName=(e,t,n,r)=>{let s=this.getViewRestApi(e,n);s===E()&&(s=this.getHomeRestApi(t)),this.fetchEndPointResource(s,r)};loadPortalView=(e,t)=>{const n=this.getHomeRestApi(e);this.fetchEndPointResource(n,t,!0)};configureForBrowserBookmark=e=>{wg(e)};checkIfSemanticURL=()=>xg();onPCoreReady=e=>{Br.subscribe(F.PUB_SUB_EVENTS.EVENT_RENDER_APP,e,"renderAppCallback")};setFieldsDefaultConfigs=e=>{Rr.updateFieldDefaults(e)};setGoogleMapsAPIKey=e=>{_(e)};setFetchDefaultHeaders=e=>{yc(e)};setFetchAuthInfo=e=>{Ic(e)};getCaseApi=()=>Fu;getMashupApi=()=>dE;enableAppRouting=e=>{yg(e)};initStore=()=>iE({});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()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Xu({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}}}};const hE=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]}};const gE=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 fE=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.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=void 0===e.dynamicLoadComponents||e.dynamicLoadComponents,this.dynamicSemanticUrl=void 0===e.dynamicSemanticUrl||e.dynamicSemanticUrl,this.enableRouting=void 0===e.enableRouting||e.enableRouting,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 gE(e.serviceConfig),this.behaviorOverrides=e.behaviorOverrides,this.initBroadcast=!!e.initBroadcast,this.cookieComplianceMethod=e.cookieComplianceMethod??"none",this.isExtraCallRequiredForDefaultHome=e.isExtraCallRequiredForDefaultHome??"false"}},mE=async()=>{const e=cp.getLocale(),t=cp.getFeatureMap().localizationVersion||1;if("en-US"!==e)try{let n;n=2===t?[e]:[up.GENERIC_BUNDLE_KEY,up.MESSAGE_BUNDLE_KEY,up.FIELD_LABELS_BUNDLE_KEY];const r=n.map((async n=>{2===t?await(async e=>{const t=cp.getFeatureMap().availableLanguagePacks||[];if(!e||!t.includes(e))return void console.warn(`current locale ${e} is not supported by application.`);const n={locale:e},r=await km("getLocalizationPack",{queryPayload:n});if((201===r.status||200===r.status)&&r.data){const e=r.data;Object.keys(e).forEach((t=>{up.setLocaleForRule(e[t],t)}))}})(n):up.isCurrentLocalePackAvailable()&&await(async(e,t)=>{const n=await Mr.getSvcLocale(t,`${e}.json`);if(n.ok&&e){const t=await n.json();up.setLocaleForRule(t,e)}})(n,e)}));await Promise.allSettled(r)}catch(e){console.warn(e)}},yE="@P .viewConfig";let IE=0;const EE=new class{#E(e,t,n){Mg(e),Vr.buildActionTargetMap(t),y(n)}init(e){const t=new fE(e),n={...t.environmentInfo,renderingMode:t.renderingMode};yg(t.enableRouting),iE({}),cp.setTheme(t.theme),cp.setCookieComplianceMethod(t.cookieComplianceMethod),cp.setIsExtraCallRequiredForDefaultHome(t.isExtraCallRequiredForDefaultHome),Rr.updateFieldDefaults(t.fieldDefaults),nc.setDefaultHeaders(t.additionalHeaders),this.#E(t.routingInfo,t.actionModel,{server:t.restServerConfig,reAuthUrl:t.serviceConfig.reAuthUrl}),Mr.setAppAlias(t.serviceConfig.appAliasWithoutServlet||t.serviceConfig.appAlias),_(t.serviceConfig.googleMapKey),Mr.initServer(t.serviceConfig.staticContentServer,t.serviceConfig.appStaticContentServer,t.tokens.C11NB2S),up.setTimezone(t.timezone),cp.setEnvironmentInfo(n),cp.setLocale(t.locale),$.setRemoteCaseMapping(t.remoteCaseMapping),hu.setConnectionConfig({messagingService:t.serviceConfig.messagingService}),cE.init(),t.initBroadcast&&uE.getBroadcastUtils().init()}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()))};initCoreContainers=(e={})=>{const{containerType:t="single"}=e,n=Xu({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 pE.getComponentsRegistry().getComponent("ReactRoot").modules.forEach((t=>{e.push(t())})),Promise.allSettled(e)};importDesignSystemComponentMap=async(e,t,n)=>{try{await function(e,t="true"){return new Promise(((n,r)=>{const s=document.createElement("script");s.setAttribute("type","text/javascript"),s.setAttribute("src",e),s.setAttribute("async",t),s.onload=n(),s.onerror=()=>r(new Error("Failed to load resource from Design System")),document.body.appendChild(s)}))}(`${e}component/project/${t}/designsystems/${n}/componentsmap.js?v=${Date.now()}`)}catch(e){console.log(e)}};buildSemanticUrl=(e,t,n,r,s)=>{const a=new URLSearchParams(t);let o=!1;"true"===n&&(o=!0);let i=null,c=null;if(e){e.startsWith("/")&&(e=e.substring(1));const t=e.split("/");i=t[0],t.length>1&&t[1]&&(c=t[1])}else o=!1;let l=r;i&&(l=`${l}/${i}`),c&&(l=`${l}/${c}`),o&&(a.has("noPortal")||a.append("noPortal","true"),c&&s&&a.append("view",s));const u=a.toString();return l+=u?`?${u}`:"",l};initCoreConfig=e=>{const{routingInfo:t,serviceConfig:n,semanticUrl:r,queryParams:s,noPortal:a,noHistory:o,viewName:i,theme:c,restServerConfig:l,dynamicLoadComponents:u=!0,dynamicSemanticUrl:d=!0,renderingMode:p="FULL_PORTAL",envType:h,extras:g}=e,{appAlias:f,contextPath:m}=n;let y=window.location.origin;const I={};if(void 0!==l&&(y=l),m&&(y=`${y}${m}`),f&&"LAUNCHPAD"!==h&&(y=`${y}/${f}`),e.restServerConfig=y,!0===d){const e=this.buildSemanticUrl(r,s,a,y,i);!o&&e&&window.history.pushState({},"home",e)}else if("HYBRID"!==p){let e=window.location.href;e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")),window.history.pushState({},"home",e)),I.dynamicSemanticUrl=!1}else console.log(`renderingMode :${p}`);!0!==u&&(I.dynamicLoadComponents=!1);let E=null;if(f){const e=f.indexOf("/app/");E=e>=0?f.substring(e+1):f}if(Object.keys(I).length>0&&window.PCore.setBehaviorOverrides(I),e.appAlias=E,c){let t="object"==typeof c?c:null;if(null===t)try{t=JSON.parse(c)}catch{t={}}e.theme=t}const A={...t,domain:`${window.location.protocol}//${window.location.host}`,searchParams:window.location.search};e.routingInfo=A,e.initBroadcast="true"===cp.environmentInfoObject?.pxMashupDetails?.pyIsTraditionalCoexistence,!e.noPortal||"true"!==e.noPortal&&!0!==e.noPortal||(e.renderingMode="EMBED"),g?.cspNonce&&(window.__webpack_nonce__=g.cspNonce),this.init(e)};launchViewByName=(e,t,n,r,s,a,o,i)=>{IE+=1;const c=i||`mashup${IE}`,l={type:"RootContainer",config:{viewConfig:yE,renderingMode:"view",name:c}};pE.loadRootComponent(e,l,s,a,o).then((()=>pE.loadViewByName(t,n,r,c)))};launchView=(e,t,n=[],r,s,a,o)=>{IE+=1;const i="hybrid"===o?`hybrid_${IE}`:o;IE+=1;const c=i||`mashup${IE}`,l={type:"RootContainer",config:{viewConfig:yE,renderingMode:"portal",name:c}};hE.setRuntimeParams(r),pE.loadRootComponent(e,l,n,s,a).then((()=>pE.updateStoreWithUiRoot(t,c)))};launchPortal=(e,t,n,r=[])=>{IE+=1;const s=n||`portal${IE}`,a={type:"RootContainer",config:{viewConfig:yE,renderingMode:"portal",skeleton:"LoadingComponent",name:s}};r.push(a.config.skeleton),cp.isPortalLoaded=!0,pE.loadRootComponent(e,a,r).then((()=>pE.loadPortalView(t,s)))};launchMashup=(e,t=!0)=>{const n={type:"RootContainer",config:{renderingMode:"noPortal"},children:[{type:"ViewContainer",config:{routingInfoAnnotation:"@ROUTING_INFO",name:"primary"}}]};if(t){const t=document.getElementsByTagName(e)[0]?.parentNode;if(t){const e=document.createElement("style");e.setAttribute("id","portal-less-styles"),e.innerHTML="app-root.mashup > .case-view, app-root.mashup > .page-view { min-height: 0px !important; }",t.appendChild(e)}}pE.loadRootComponent(e,n,[PCore.getConstants().LOAD_VIEW_STRING,"ViewContainer"]),window.parent!==window&&s(849)(`${window.PCore.getAssetLoader().getStaticServerUrl()}constellation-mashup-bridge.js`).then((e=>{e.mashup.init({resizing:"stretch"})}))};start=async(e,t)=>{const{appStaticContentServer:n}=e.serviceConfig,{ccV2LibId:r,environmentId:s,isAlternateDesignSystemEnabled:a,alternateDesignSystemName:o}=e;this.initCoreConfig(e);const i=async()=>(await this.importReactRoot(),r&&await Mr.importCustomComponentMap(r),"true"===a&&"other"!==o&&await this.importDesignSystemComponentMap(n,s,o),t&&t(),!0);return new Promise(((e,t)=>{mE().then((async()=>{const t=pE.getComponentsRegistry();"ReactRoot"in t.getLazyMap()?e(!0):t.getComponent("ReactRoot")?e(await i()):Br.subscribe("component-map-loaded",(async()=>{e(await i())}))})).catch((e=>{t(e)}))}))};registerForDebugInfo=e=>{PCore.getEnvironmentInfo().setPreviewMode(),e&&PCore.getPubSubUtils().subscribe("fetchSuccess",(({debugInfo:t})=>{const n=t?.["X-Pega-App-Debug-ID"];e.postMessage({appDebugID:n})}),"fetchSuccess")};toggleTracerHeaders=e=>{e.addEventListener("message",(async e=>{const t=e?.data?.enableTracer;t?PCore.getDebugger().enableTracer():PCore.getDebugger().disableTracer()}))};loadEnvironmentInfo=async e=>{if(e.theme&&(!window.pms||"Android"!==window.pms.device.systemName))try{const t=JSON.parse(e.theme.definition);PCore.getEnvironmentInfo().setBrandingInfo(t.Branding),PCore.getEnvironmentInfo().setTheme(t.Theme)}catch{PCore.getEnvironmentInfo().setBrandingInfo({}),PCore.getEnvironmentInfo().setTheme({})}e.keyMapping&&PCore.getEnvironmentInfo().setKeyMapping(e.keyMapping),PCore.getEnvironmentInfo().setCookieComplianceMethod(e.cookieComplianceMethod??"none")}},AE={createViewRule:(e,t)=>{const{restApi:n,reqType:r}=_g("createViewRuleByID");return pc(n,{method:r,body:e},t).then((e=>e.data))},getViewRule:(e,t)=>{const{restApi:n,reqType:r}=_g("getViewRuleByID",{ID:e});return pc(n,{method:r},t).then((e=>e.data))},updateViewRule:(e,t,n)=>{const{restApi:r,reqType:s}=_g("updateViewRuleByID",{ID:e});return pc(r,{method:s,body:t},n).then((e=>e.data))},deleteViewRule:(e,t)=>{const{restApi:n,reqType:r}=_g("deleteViewRuleByID",{ID:e});return pc(n,{method:r},t).then((e=>e.data))}},_E={"Content-Type":"application/json"},SE={addCaseFollower:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({users:t.map((e=>({ID:e})))});return km("addCaseFollower",{body:s,queryPayload:r,headers:_E},n)},deleteCaseFollower:(e,t,n)=>km("deleteCaseFollower",{queryPayload:{caseID:e,followerID:t}},n),getCaseFollowers:(e,t)=>km("getCaseFollowers",{queryPayload:{caseID:e}},t).then((e=>e.data.followers))},CE={addRelatedCases:(e,t,n)=>{const r={caseID:e},s=JSON.stringify({cases:t});return km("addRelatedCases",{body:s,queryPayload:r},n)},removeRelatedCase:(e,t,n)=>km("removeRelatedCase",{queryPayload:{caseID:e,relatedCaseID:t}},n),getRelatedCases:(e,t)=>km("getRelatedCases",{queryPayload:{caseID:e}},t).then((e=>e.data.relatedCases))},TE="operatorDetails",NE={getOperatorDetails:(e,t=!1)=>{const{reqType:n}=_g(TE,{});if("GET"===n){const t={encodedOperatorId:encodeURIComponent(`{"opname":"${e}"}`)};return km(TE,{queryPayload:t})}return t?km("operatorDetailsByBusinessID",{body:{dataViewParameters:{BusinessID:e}}}):km(TE,{body:{dataViewParameters:{ID:e}}})}},PE=async e=>{const t=Sm(e),n=Eh.getIn(t,j.COMPONENTS);xr(t,{},!0);const r=Eh.getIn(t,j.LOCALE_REFERENCES);await up.loadLocaleResources(r||[]),await Fr(n)},DE=(e,t,n)=>Ch.resolveView(e,t,n),RE={"Content-Type":"application/json"};const bE=new class{constructor(){this.mentionsTagsCancelTokenSource=[],this.mentions=[]}getFeeds=(e,t,n,r,s,a,o)=>{const{getLocaleValue:i}=up;o||(this.mentions=[]);let c="";r&&Array.isArray(r)&&r?.length>0&&(r.forEach((e=>{e.on&&(c=`${c}${e.id},`)})),""===c&&(c="ClearFilters"));let l="";o&&(l=a.getValue("pulse.pageLastEntry"));const u={filterForContext:e,feedID:t,feedClass:n,filterBy:c,pageSize:10,olderThan:l};for(let e=0;e<s.length;e+=1)s[e].cancel();const d=Gm();return s.push(d),km("getFeedMessages",{queryPayload:u,cancelTokenSource:d},a.getContextName()).then((async e=>{if(200===e.status&&e.data){s.pop();const t=[],n={};let c=!1;if(e?.data){if(e?.data?.data?.FeedList){const r=e.data.data.FeedList?.pxResults;Array.isArray(r)&&r?.length>0&&r.forEach(((e,r)=>{e.ID=""!==e.pzInsKey?e.pzInsKey:`message${r}`,t.push(e.ID),n[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)})),c||"pzPostDetails"===e.pyMessageViewReference||"pzPrivatePostDetails"===e.pyMessageViewReference||(c=!0)}))}if(c&&await PE({uiResources:e.data.uiResources}),!r&&(r=[{id:"All",label:i("All","Pulse"),on:!0,disabled:!1}],e?.data?.data?.FeedFilters)){const t=e.data.data.FeedFilters?.pxResults;let n=!0;t&&Array.isArray(t)&&t?.length>0&&(t.forEach((e=>{const t={id:e.pyFeedSourceReference,label:i(e.pyLabel,"Pulse"),disabled:!1,on:"true"===e.pySelected};t.on||(n=!1),r.push(t)})),r.find((e=>"All"===e.id)).on=n)}}if(o&&a.getValue("pulse.messageIDs")){let r=a.getValue("pulse.messageIDs"),s=a.getValue("pulse.messages");r=[...r,...t],s={...s,...n},Object.values(s).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)}))})),a.updateState({pulse:{messages:s,messageIDs:r,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}})}else a.updateState({pulse:{messages:n,messageIDs:t,nextPageFirstEntry:e?.data?.nextPageFirstEntry||"",pageLastEntry:e?.data?.pageLastEntry||"",hideAttachment:e?.data?.hideAttachment||!1}});const l=[...new Map(this.mentions.flat()?.map((e=>[e.mentionsID,e]))).values()]?.filter((e=>Object.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[];return{feedFilters:r,caseMentions:l}}return a.reportError(`getFeeds call failed ${e.status}`,e.data),""})).catch((e=>{Wm(e)||a.reportError(": Error occurred during ajax call at getFeeds API : ",e.response)}))};postMessage=(e,t,n=[],r=!1,s)=>{const a=JSON.stringify({context:e,parentMessageId:r?e:"",message:t,attachments:n});return km("postFeedMessages",{body:a,headers:RE},s.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,s,n.length>0);return s.updateState({pulse:{messages:{[e]:{pxResults:t}}}}),o}const{messages:o,messageIDs:i,caseMentions:c}=this.buildMessageObject(a,r,s,n.length>0);return s.updateState({pulse:{messages:o,messageIDs:i}}),c}return s.reportError(`postMessage call failed with status ${t.status}`,t),""})).catch((e=>{s.reportError(": Error occurred during ajax call at postMessage API : ",e.response)}))};editMessage=({messageID:e,parentMessageID:t,message:n,c11nEnv:r,isReply:s=!1})=>{const a=JSON.stringify({message:n});return km("editFeedMessage",{queryPayload:{messageID:e},body:a,headers:RE},r.getContextName()).then((e=>{if(200===e?.status&&e?.data){const n=e?.data;if(s){n.parentMessageID=t;const{pxResults:e,caseMentions:a}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:{[t]:{pxResults:e}}}}),a}const{messages:a,caseMentions:o}=this.buildMessageObject(n,s,r,!1);return r.updateState({pulse:{messages:a}}),o}return r.reportError(`editMessage call failed with status ${e.status}`,e),""})).catch((e=>{r.reportError(": Error occurred during ajax call at editMessage API : ",e.response)}))};buildMessageObject=(e,t,n,r=!1)=>{const s={ID:e?.ID||"",tags:e?.tags||[],pyHasAttachment:r,pzInsKey:e?.ID||"",pyMessage:e?.message||"",mentions:e?.mentions||[],postedByUser:e?.postedByUser,pxCreateDateTime:e?.postedTime||"",pxUpdateDateTime:e?.updatedTime||"",parentMessageID:e?.parentMessageID||"",pyIsEdited:"string"==typeof e?.isEdited?"true"===e?.isEdited:e?.isEdited||!1,pyFeed:{pyPostedOn:e?.postedTime||"",pyFeedTitle:e?.postedByUser?.name||"",pyIconType:"user",pyCommentContext:"pzInsKey",pyIconReference:"pi pi-case"},pyContext:"",pxIcon:"globe",pyMessageViewReference:"pzPostDetails"},a=n.getValue("pulse.messages");if(t){let{pxResults:e=[]}=Object.values(a)?.find((e=>e?.ID===s?.parentMessageID))||{};const t=e?.findIndex((e=>e?.pzInsKey===s?.ID));if(-1!==t){const n=[...e];n[t]={...n[t],...s},e=n}else e=[...e,s];return{pxResults:e,messages:{},messageIDs:[],caseMentions:this.getCaseMentions(e)}}const o=n.getValue("pulse.messageIDs");if(o){const e=o.includes(s.ID)?{...a[s.ID],...s}:s,t={...a,[s.ID]:e};return{messages:t,messageIDs:o.includes(s.ID)?o:[s.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.prototype.hasOwnProperty.call(e,"mentionsType")))?.filter((e=>!e?.mentionsType?.toLowerCase().includes("user")))||[]};likeMessage=({pulseContext:e,likedBy:t,messageID:n,isReply:r,c11nEnv:s})=>{const a=t?"unlikeFeedMessages":"likeFeedMessages",o=JSON.stringify({ContextClass:e});km(a,{body:o,queryPayload:{pulseContext:e},headers:RE},s.getContextName()).then((a=>{if(200===a.status)if(r){const r=s.getValue(`pulse.messages.${n}`),a=r?.pxResults&&Array.isArray(r?.pxResults)&&r.pxResults?.length>0&&r.pxResults?.map((n=>{if((n={...n}).pzInsKey===e){let e=0,r=!1;const s=n.pyLikes?n?.pyLikes?.pxLikeCount:0;t?(e=s-1,r=!1):(e=s+1,r=!0),n.pyLikes={pxLikeCount:e,pxIsLiked:r}}return n}));s.updateState({pulse:{messages:{[n]:{pxResults:a}}}})}else{const r={...s.getValue(`pulse.messages.${n}`)},a=r.pyLikes?r.pyLikes.pxLikeCount:0;let o=0,i=!1;t?(o=a-1,i=!1):(o=a+1,i=!0),r.pyLikes={pxLikeCount:o,pxIsLiked:i},s.updateState({pulse:{messages:{[e]:r}}})}else s.reportError(`likeMessage call failed with status ${a.status}`,a)})).catch((e=>{s.reportError(": Error occurred during ajax call at likeMessage API : ",e.response.data)}))};deleteMessage=(e,t,n,r)=>{let s=e;t&&(s=n);km("deleteFeedMessage",{queryPayload:{messageID:s}},r.getContextName()).then((s=>{if(200===s.status)if(t){const t=r.getValue(`pulse.messages.${e}`),s=t?.pxResults&&Array.isArray(t?.pxResults)&&t.pxResults?.length>0&&t.pxResults?.filter((e=>e.pzInsKey!==n));r.updateState({pulse:{messages:{[e]:{pxResults:s}}}})}else{const t=r.getValue("pulse.messageIDs"),n=t&&Array.isArray(t)&&t?.length>0&&t?.filter((t=>t!==e)),s={...r.getValue("pulse.messages")};delete s[e],r.updateState({pulse:{messageIDs:n,messages:s}})}else r.reportError(`deleteMessage call failed with status ${s.status}`,s)})).catch((e=>{r.reportError(": Error occurred during ajax call at deleteMessage API : ",e.response)}))};getLikedUsers=(e,t)=>km("getFeedMessageLikes",{queryPayload:{messageID:e}},t.getContextName()).then((e=>e?.data?.users)).catch((e=>{t.reportError(": Error occurred during ajax call at getLikedUsers API : ",e.response)}));getMentionSuggestions=(e,t)=>{const{pulseContext:n,searchFor:r,mentionsType:s,listSize:a=5}=e,o={pulseContext:n,searchFor:r,mentionsType:s,listSize:a};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const i=Gm();return this.mentionsTagsCancelTokenSource.push(i),km("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=>{Wm(e)||t.reportError(": Error occurred during ajax call at getMentionSuggestions API : ",e.response.data)}))};getMentionTypes=e=>km("getMentionTypes",{},e.getContextName()).then((e=>e?.data)).catch((t=>{e.reportError(": Error occurred during ajax call at getMentionTypes API : ",t.response.data)}));getTagSuggestions=(e,t)=>{const{searchFor:n,listSize:r=5}=e,s={searchFor:n,listSize:r};for(let e=0;e<this.mentionsTagsCancelTokenSource.length;e+=1)this.mentionsTagsCancelTokenSource[e].cancel();const a=Gm();return this.mentionsTagsCancelTokenSource.push(a),km("getTagSuggestions",{queryPayload:s,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=>{Wm(e)||t.reportError(": Error occurred during ajax call at getTagSuggestions API : ",e.response.data)}))}},OE={getTaggedCases:(e,t)=>km("loadView",{queryPayload:{caseID:e,viewID:"pyTaggedCases"}},t.getContextName()).then((e=>e?.data)).catch((e=>{t.reportError(": Error occurred during ajax call at fetchTaggedcases API : ",e.response)})),getTags:(e,t)=>km("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 r={caseID:e},s=JSON.stringify({tags:t});return km("addTagsToCase",{body:s,queryPayload:r},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)=>km("deleteCaseTag",{queryPayload:{caseID:e,tagID:t}},n.getContextName()).catch((e=>{n.reportError(": Error occurred during ajax call at removeTag API : ",e.response)})),getTagsLandingPageURL:e=>fu.getPageDataAsync("D_pxGetTagsLandingPageURL",e.getContextName(),{},{invalidateCache:!0}).catch((t=>{e.reportError(": Error occurred during ajax call getTagsLandingPageURL API : ",t.response)}))},vE=(e,t)=>{Gd(t.getContextName(),e.etag),Wd(t.getContextName(),e.etag)},xE={getParticipants:(e,t)=>km("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)=>km("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)=>km("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)=>km("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,r)=>{const s={caseID:e},a={...n,participantRoleID:t},o={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{km("createParticipant",{body:a,queryPayload:s,headers:o},r.getContextName()).then((t=>{vE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at createParticipant API : ",e.response),t(e.response)}))}))},updateParticipant:async(e,t,n,r)=>{const s={caseID:e,participantID:t},a={"if-match":r.getCaseSummary().headers.etag};return new Promise(((e,t)=>{km("updateParticipant",{body:n,queryPayload:s,headers:a},r.getContextName()).then((t=>{vE(t.headers,r),e()})).catch((e=>{r.reportError(": Error occurred during ajax call at updateParticipant API : ",e.response),t(e.response)}))}))},deleteParticipant:(e,t,n)=>{const r={caseID:e,participantID:t},s={"if-match":n.getCaseSummary().headers.etag};return new Promise(((e,t)=>{km("deleteParticipant",{queryPayload:r,headers:s},n.getContextName()).then((t=>{vE(t.headers,n),e()})).catch((e=>{n.reportError(": Error occurred during ajax call at deleteParticipant API : ",e.response),t(e.response)}))}))}};function wE(e=[]){return e.reduce(((e,t)=>(e[t.personalizationID]={name:t.name,personalizationState:JSON.parse(t.personalizationState||"{}")},e)),{})}const ME="create",LE="update",UE="delete";function FE(e,t,n,r){const s=kp(t);if(s){switch(e){case ME:case LE:{const{markAsDefault:e,...t}=r;Object.entries(t).length>0&&(s.allPersonalizations[n]=t),e&&(s.defaultPersonalization=n);break}case UE:delete s.allPersonalizations[n],s.defaultPersonalization===n&&(s.defaultPersonalization="");break;default:return null}return s}return null}const jE={},VE=e=>{const t=kp(e);if(t)return Array.isArray(t.allPersonalizations)&&(t.allPersonalizations=wE(t.allPersonalizations)),Promise.resolve(t);const{restApi:n,reqType:r}=_g("getUIListPersonalizations",{listID:e});return pc(n,{method:r,body:{}}).then((e=>{const{data:t}=e;return{allPersonalizations:wE(t.allPersonalizations),defaultPersonalization:t.defaultPersonalization}}))},kE=(e,t,n)=>{const{restApi:r,reqType:s}=_g("createListPersonalization",{listID:e});return FE(ME,e,t,n),pc(r,{method:s,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}}).then((e=>{const n=e.data;return jE[t]=n,e}))},$E=(e,t,n)=>{const r=jE[t]||t;FE(LE,e,t,n);const{restApi:s,reqType:a}=_g("updateListPersonalization",{listID:e,personalizationID:r})||{};return pc(s,{method:a,body:{...n,personalizationState:JSON.stringify(n.personalizationState)}})},BE=(e,t)=>{const n=jE[t]||t;FE(UE,e,t);const{restApi:r,reqType:s}=_g("deleteListPersonalization",{listID:e,personalizationID:n});return pc(r,{method:s,body:{}}).then((e=>(jE[t]&&delete jE[t],e)))};const GE=function(e){return e?{createPersonalization:kE.bind(null,e),updatePersonalization:$E.bind(null,e),deletePersonalization:BE.bind(null,e),fetchPersonalizations:VE.bind(null,e)}:{createPersonalization:()=>Promise.resolve(""),updatePersonalization:()=>Promise.resolve(),deletePersonalization:()=>Promise.resolve(),fetchPersonalizations:()=>Promise.resolve({})}},WE="getDataObjects",HE="getInsightByID",qE=["LocalList","RemoteList","PromptList","DataPage"];let zE=null;const YE={},KE=e=>au.getAppCacheKey(`PrimaryFields-${e}`);function XE(e){let t;return e[1].category?t=e[1].category:e[0].indexOf(":")>0&&(t=e[0].substring(0,e[0].indexOf(":"))),t}const JE={getDataObjects:function(){const e=au.getAppCacheKey(WE);if(window.sessionStorage.getItem(e))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(e)));const{restApi:t,reqType:n}=_g(WE,{}),r=pc(t,{method:n});return r.then((t=>{window.sessionStorage.setItem(e,JSON.stringify(t))})),r},getDataPageObjects:function(e=!0){if(zE)return zE;const t=au.getAppCacheKey("getDataPageObjects");if(e&&window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=_g("getDataPages",{datapageRequestType:"explorable"});return zE=pc(n,{method:r,datapageRequestType:"explorable"}),zE.then((e=>{zE=null,window.sessionStorage.setItem(t,JSON.stringify(e))})),zE},getDataViewMetadata:function(e,t,n){if(!t){const{sourceMetadata:t,sourceFields:n}=function(e){const t=Vp(e);if(t&&t.classID){let e=Bp(t.classID);const n=new Set(t.primaryFields),r=t.rdFields?.fields?.filter((e=>e.indexOf(".")>0));if(r&&!Eh.isEmpty(r)){const n=r.reduce(((e,n)=>{const r=xp(n,t.classID);return e[n]=r,e}),{});e={...e,...n}}if(e&&Object.keys(e).length>0){const r=new Set(Array.isArray(t?.rdFields)?t?.rdFields:t?.rdFields?.fields),s=r.size>0||n.size>0;for(const t in e)e[t].type.startsWith("Page")||s&&!(r.size>0&&r.has(t)||n.size>0&&n.has(t))?delete e[t]:e[t]?.datasource&&qE.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={data:{...t,fields:Object.entries(n).map((e=>({...e[1],fieldID:e[0],fieldType:e[1].fieldType?e[1].fieldType:e[1].isUserReference?"User reference":void 0,category:XE(e),classID:e[1].associationClassID?e[1].associationClassID:e[1].classID})))}};return Promise.resolve(e)}}const r={dataSource:e,columns:[],parameters:{},associationFilter:n,matchPosition:"",ignoreCase:!1};return Pu.init(r).then((({dataSourceMetaData:e})=>Promise.resolve({data:e})))},getDefaultColumns:function(e){const t=au.getAppCacheKey(`DefaultColumns_${Object.values(e).join("_")}`);if(window.sessionStorage.getItem(t))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(t)));const{restApi:n,reqType:r}=_g("getListData",{dataViewName:"D_pzGetDefaultColumns"}),s=pc(n,{method:r,body:{dataViewParameters:e}});return s.then((e=>{window.sessionStorage.setItem(t,JSON.stringify(e))})),s},getFieldsForDataSource:function(e,t,n){if(!t){const t=Vp(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 r=au.getAppCacheKey(`RDColumns-${e}`);if(window.sessionStorage.getItem(r))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(r)));const s=au.getData("D_pxFieldsForDataSource",{dataViewParameters:{DataPageName:e}},n);return s.then((e=>{window.sessionStorage.setItem(r,JSON.stringify(e))})),s},getPrimaryFieldsForDataSource:function(e="",t=""){const n=au.getAppCacheKey(`PFColumns-${e}${t}`);if(window.sessionStorage.getItem(n))return Promise.resolve(JSON.parse(window.sessionStorage.getItem(n)));const r=au.getData("D_pxGetInitialFieldsForDataSource",{dataViewParameters:{DataPageName:e,ClassName:t}});return r.then((e=>{window.sessionStorage.setItem(n,JSON.stringify(e))})),r},getPrimaryFieldsForInsights:async function(e,t,n){const{allClasses:r,promisesToAwait:s,classesToFetch:a,isTopLevelClassPresent:o,joinedClassesToFetch:i}=function(e,t){const n=[],r=[];let s=!1;const a=[],o=[];return e&&o.push(e),t&&t.length>0&&o.push(...t),o.forEach((t=>{const o=KE(t);window.sessionStorage.getItem(o)||(YE[t]?r.push(YE[t]):(n.push(t),t===e?s=!0:a.push(t)))})),{allClasses:o,promisesToAwait:r,classesToFetch:n,isTopLevelClassPresent:s,joinedClassesToFetch:a}}(e,n);return a.length&&s.push((async(e,t,n,r)=>{const s=au.getData("D_pxGetPrimaryFieldsForInsights",{dataViewParameters:{...t&&{topLevelClassID:t},...r&&{joinedClassIDs:r.join(",")},...n&&{topLevelDataPageID:n}}}).then((t=>{const n=t.data?.data||[],r={};e.forEach((e=>{r[e]=[]})),n.forEach((({classID:e,pyFieldName:t})=>{r[e].push(t)})),Object.entries(r).forEach((([e,t])=>{const n=KE(e);window.sessionStorage.setItem(n,JSON.stringify(t))}))})).finally((()=>{e.forEach((e=>{delete YE[e]}))}));return e.forEach((e=>{YE[e]=s})),s})(a,o?e:void 0,o?t:void 0,i.length>0?i:void 0)),Promise.allSettled(s).then((()=>{const e={};return r.forEach((t=>{const n=KE(t);if(window.sessionStorage.getItem(n))try{e[t]=JSON.parse(window.sessionStorage.getItem(n))}catch{}})),{data:e}}))},getInsightIDs:function(){const{restApi:e,reqType:t}=_g("getInsightIDs");return pc(e,{method:t})},getInsightByID:function(e){const t=$p(e);if(t)return Promise.resolve({data:{pyInsights:[t]}});const n={insightID:e},{restApi:r,reqType:s}=_g(HE,n);return pc(r,{method:s})},getInsightsByID:function(e){const t={insightID:e.join(",")},{restApi:n,reqType:r}=_g(HE,t);return pc(n,{method:r})},createInsight:function(e){const{restApi:t,reqType:n}=_g("createInsight");return pc(t,{method:n,body:JSON.stringify(e),headers:{"Content-Type":"application/json"}})},updateInsight:function(e,t){const n={insightID:e},{restApi:r,reqType:s}=_g("updateInsight",n),a=t.UpdateDateTime;return pc(r,{method:s,body:JSON.stringify(t),headers:{"if-match":a,"Content-Type":"application/json"}})},deleteInsight:function(e){const t={insightID:e},{restApi:n,reqType:r}=_g("deleteInsight",t);return pc(n,{method:r})},exportToExcel:function(e){const{restApi:t,reqType:n}=_g("exportToExcel");return pc(t,{method:n,body:JSON.stringify(e)})},exportToCSV:function(e){const{restApi:t,reqType:n}=_g("exportToCSV");return pc(t,{method:n,body:JSON.stringify(e)})},scheduleInsight:(e,t)=>{const n={insightID:e},{restApi:r,reqType:s}=_g("scheduleInsight",n);return pc(r,{method:s,body:JSON.stringify(t)})},updateScheduledInsight:(e,t,n)=>{const r={insightID:e,scheduleID:t},{restApi:s,reqType:a}=_g("updateScheduledInsight",r);return pc(s,{method:a,body:JSON.stringify(n)})},deleteScheduledInsight:(e,t)=>{const n={insightID:e,scheduleID:t},{restApi:r,reqType:s}=_g("deleteScheduledInsight",n);return pc(r,{method:s})},translateStrings:function(e){const{restApi:t,reqType:n}=_g("translateStrings");return pc(t,{method:n,body:JSON.stringify(e)})}};const QE=new class{addRoutes=e=>{return t=e,void ip.addRoutes(t);var t}};const ZE=class{static registerModule(e,t,n){n[e]=()=>t}};const eA=class{static getCaseEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.CASE_EVENTS);static getDataEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.DATA_EVENTS);static getTransientEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.EVENT_TRANSIENT_ITEMS);static getBootstrapShellEvent=()=>Object.freeze(F.PUB_SUB_EVENTS.BOOTSTRAP_SHELL_EVENTS)},tA={getResolvedSemanticURL:(e,t,n)=>ip.getResolvedSemanticURL(e,t,n),getActions:()=>({ACTION_OPENWORKBYHANDLE:Be,ACTION_SHOWDATA:Ve,ACTION_SHOWVIEW:je}),updateSemanticURLAndDocumentTitle:e=>ip.updateSemanticURLAndDocumentTitle(e)};const nA=new class{constructor(){this.genericFailedMessage="Failed to display content. Contact the application administrator."}getGenericFailedMessage(){return this.genericFailedMessage}setGenericFailedMessage(e){this.genericFailedMessage=e}},rA={setTokens:e=>{Ic({tokenInfo:e}),yc(e?.csrf&&!e?.access_token?{pzCTkn:e?.csrf}:{Authorization:`${e?.token_type} ${e?.access_token}`}),setTimeout((()=>Br.publish("updateSession",{updateStatus:"success"})),0)},revokeTokens:async()=>Wi(),getAuthInstance:e=>Gi.init(e),setAuthorizationHeader:e=>{yc({Authorization:e}),setTimeout((()=>Br.publish("updateSession",{updateStatus:"success"})),0)}};const sA=new class{getDebouncedSubject(e){return(new Zg).pipe(GI(e))}};Or.register("email",(e=>{let t=null;return e&&!function(e){const t="[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+",n="\\x5c[\\x00-\\x7f]",r=`(${t}|\\x5b([^\\x0d\\x5b-\\x5d\\x80-\\xff]|${n})*\\x5d)`,s=`(${t}|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|${n})*\\x22)`;return new RegExp(`^${s}(\\x2e${s})*\\x40${r}(\\x2e${r})*$`).test(e)}(e)&&(t=up.getLocaleValue("Enter a valid email address","Messages")),t})),Or.register("integer",(e=>{let t=null;return e&&!/^(-)?\d+$/.test(e)&&(t=up.getLocaleValue("Invalid number","Messages")),t})),Or.register("required",(e=>Array.isArray(e)&&0===e.length||null==e||""===e?up.getLocaleValue("Cannot be blank","Messages"):null)),Or.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=up.getLocaleValue("Enter a valid url","Messages")),t})),setTimeout((()=>{s.e(531).then(s.bind(s,531)).then((({isPossiblePhoneNumber:e})=>{Or.register("phone",(t=>{let n=null;t&&!/^\+?\d+$/.test(t)&&(n=up.getLocaleValue("Enter a valid phone number","Messages"));const r=t?.startsWith("+");if(t&&r){e(t)||(n=up.getLocaleValue("Enter a valid phone number","Messages"))}return n}))}))}),j.PRIORITY.TRIVIAL);const aA=(e,t)=>{switch(t){case"invalid":return up.getLocaleValue(`Incorrect ${e}`,"Messages");case"incomplete":return up.getLocaleValue(`Incomplete ${e}`,"Messages");default:return null}};Or.register("datetime",(e=>aA("DateTime",e))),Or.register("date",(e=>aA("Date",e))),Or.register("time",(e=>aA("Time",e)));const oA={createConversation:(e,t,n,r=[])=>{for(const e of r)e?.cancel&&"function"==typeof e.cancel&&e.cancel();const s=Gm();r.push(s);const a={assistantID:t},o=JSON.stringify({contextID:e});return km("createConversation",{body:o,cancelTokenSource:s,queryPayload:a},n).then((e=>(r.pop(),e)))},sendMessage:(e,t,n,r)=>{const s={assistantID:e,conversationID:t},a=JSON.stringify({request:n});return km("sendMessage",{body:a,queryPayload:s},r)}};const iA=class{caseTypeAccessMap=new Map;constructor(){this.caseTypeAccessMap=cp.getCaseTypeList().reduce(((e,t)=>(e.set(t.pyWorkTypeImplementationClassName,t.hasCreateAccess??!0),e)),new Map)}hasCreateAccess(e){return this.caseTypeAccessMap.get(e)}static getInstance(){return this.instance||(this.instance=new this),this.instance}};class cA{constructor(){cA.behaviorOverrides={}}static behaviorOverrides={};getPCoreVersion=()=>"24.2.0";onPCoreReady=e=>pE.onPCoreReady(e);getComponentsRegistry=()=>pE.getComponentsRegistry();checkIfSemanticURL=()=>pE.checkIfSemanticURL();isValidSemanticURL=()=>(()=>{if(xg()){const e=ip.processUrl(sp(),!0);return!!ip._getMatchedRouteInRoutingTable(e)}return!1})();getRoutingUtils=()=>QE;getViewResources=()=>d;configureForBrowserBookmark=e=>pE.configureForBrowserBookmark(e);getStore=()=>rh();resetStore=()=>yh();getMessageManager=()=>Qn;getCoexistenceManager=()=>uE;getStoreValue=(e,t,n)=>ch(e,t,n);getContainerUtils=()=>o;getAnnotationUtils=()=>ul;getFieldUtils=()=>Vn;getFieldDefaultUtils=()=>Rr;getAssetLoader=()=>Mr;getAttachmentUtils=()=>Ep;getViewRuleApi=()=>AE;getFeedUtils=()=>bE;getTagUtils=()=>OE;getGenAIAssistantUtils=()=>oA;getStakeholderUtils=()=>xE;getUserApi=()=>NE;getCaseFollowerApi=()=>SE;getCaseUtils=()=>Sc;getStateUtils=()=>ku;getRelatedCasesApi=()=>CE;getPersonalizationUtils=GE;getDataApi=()=>Pu;getDataApiUtils=()=>au;getAnalyticsUtils=()=>JE;getLocaleUtils=()=>up;registerLocaleManager=e=>{const t=this.getLocaleUtils();Object.keys(e).forEach((n=>{t[n]=e[n]}))};setBehaviorOverrides=e=>{cA.behaviorOverrides=e};setBehaviorOverride=(e,t)=>{cA.behaviorOverrides[e]=t};getBehaviorOverrides=()=>cA.behaviorOverrides;getBehaviorOverride=e=>cA.behaviorOverrides[e];getAsynchronousUtils=()=>sA;createPConnect=e=>Xu(e);getPubSubUtils=()=>Br;registerComponentCreator=e=>{Ju(e)};getConstants=()=>Object.freeze(F);getEvents=()=>eA;getRestClient=()=>u;getMashupApi=()=>dE;getEnvironmentInfo=()=>cp;getRuntimeParamsAPI=()=>hE;getSemanticUrlUtils=()=>tA;getRemoteCaseUtils=()=>$;getNavigationUtils=()=>cE;registerModule=(e,t)=>ZE.registerModule(e,t,this);getErrorHandler=()=>nA;getFormUtils=()=>Yc;getMessagingServiceManager=()=>hu;getMetadataUtils=()=>i;getDataPageUtils=()=>fu;getDataTypeUtils=()=>Ul;getCascadeManager=()=>Zp;isDeepEqual=(e,t)=>h()(e,t);getAuthUtils=()=>rA;getDebugger=()=>ec;getDeferLoadManager=()=>ru;getExpressionEngine=()=>n;getActionsSequencer=()=>bu;getRefreshManager=()=>hl;getInitialiser=()=>EE;getBootstrapUtils=()=>pE;getContextTreeManager=()=>Pn;getPerformanceManager=()=>$i;getAccessPrivilege=()=>iA.getInstance()}const lA=new cA;s.g.PCore=lA})()})();
2
2
  //# sourceMappingURL=constellation-core-web.js.map